After discussion with Constantin reverted 2433, 2434, 2436, 2437 and 2438
(build automation and i18n changes). Latest server changes (2439 and 2440)
are OK.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2442 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/x0vncserver/Image.cxx b/unix/x0vncserver/Image.cxx
index 9e9a5bb..f998c6a 100644
--- a/unix/x0vncserver/Image.cxx
+++ b/unix/x0vncserver/Image.cxx
@@ -20,10 +20,6 @@
 // Image.cxx
 //
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
diff --git a/unix/x0vncserver/Image.h b/unix/x0vncserver/Image.h
index 4e1442d..4cac8b4 100644
--- a/unix/x0vncserver/Image.h
+++ b/unix/x0vncserver/Image.h
@@ -23,10 +23,6 @@
 #ifndef __IMAGE_H__
 #define __IMAGE_H__
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
diff --git a/unix/x0vncserver/Makefile.am b/unix/x0vncserver/Makefile.am
deleted file mode 100644
index 59fa6c5..0000000
--- a/unix/x0vncserver/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-bin_PROGRAMS = x0vncserver
-
-x0vncserver_SOURCES = buildtime.c Geometry.cxx Geometry.h Image.cxx Image.h \
-	PollingManager.cxx PollingManager.h PollingScheduler.cxx \
-	PollingScheduler.h TimeMillis.cxx TimeMillis.h XPixelBuffer.cxx \
-	XPixelBuffer.h x0vncserver.cxx \
-	$(UNIX_DIR)/vncconfig/QueryConnectDialog.cxx
-
-x0vncserver_CPPFLAGS = -I$(UNIX_DIR) -I$(COMMON_DIR) -I$(TX_DIR) \
-	-I$(VNCCONFIG_DIR)
-
-x0vncserver_LDADD = $(RFB_LIBS) $(NETWORK_LIBS) $(RDR_LIBS) $(TX_LIBS) \
-	$(ZLIB_LIBS) $(JPEG_LIBS) -lXext -lX11
diff --git a/unix/x0vncserver/Makefile.in b/unix/x0vncserver/Makefile.in
new file mode 100644
index 0000000..ade1526
--- /dev/null
+++ b/unix/x0vncserver/Makefile.in
@@ -0,0 +1,30 @@
+
+SRCS = Image.cxx TimeMillis.cxx PollingScheduler.cxx PollingManager.cxx \
+       Geometry.cxx XPixelBuffer.cxx \
+       x0vncserver.cxx ../vncconfig/QueryConnectDialog.cxx
+
+OBJS = $(SRCS:.cxx=.o)
+
+program = x0vncserver
+
+DEP_LIBS = $(COMMON)/rfb/librfb.a \
+           $(COMMON)/network/libnetwork.a \
+           $(COMMON)/rdr/librdr.a \
+	   $(TOP)/tx/libtx.a
+
+EXTRA_LIBS = @ZLIB_LIB@ @JPEG_LIB@ @INET_LIB@ @X_PRE_LIBS@ @X_LIBS@ \
+             @XTEST_LIB@ -lXext -lX11 @X_EXTRA_LIBS@ @CL_LIB@ @DMEDIA_LIB@
+
+# X_CFLAGS are really CPPFLAGS
+DIR_CPPFLAGS = -I$(COMMON) -I$(TOP) -I$(TOP)/tx -I$(TOP)/vncconfig \
+  @XTEST_DEFINE@ @READDISPLAY_DEFINE@ @MITSHM_DEFINE@ @X_CFLAGS@
+
+all:: $(program)
+
+$(program): $(OBJS) buildtime.o $(DEP_LIBS)
+	rm -f $(program)
+	$(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) buildtime.o $(DEP_LIBS) $(LIBS) $(EXTRA_LIBS)
+
+buildtime.o: $(OBJS) $(DEP_LIBS)
+
+# followed by boilerplate.mk
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx
index e260f32..4eb6b22 100644
--- a/unix/x0vncserver/x0vncserver.cxx
+++ b/unix/x0vncserver/x0vncserver.cxx
@@ -20,10 +20,6 @@
 // FIXME: Check cases when screen width/height is not a multiply of 32.
 //        e.g. 800x600.
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <strings.h>
 #include <sys/types.h>
 #include <sys/stat.h>