]> source.dussan.org Git - tigervnc.git/commitdiff
- use unix/configure.ac as top-level configure.ac base
authorAdam Tkac <atkac@redhat.com>
Fri, 4 Sep 2009 12:08:56 +0000 (12:08 +0000)
committerAdam Tkac <atkac@redhat.com>
Fri, 4 Sep 2009 12:08:56 +0000 (12:08 +0000)
- create stub top-level Makefile.am
- make common/ subtree compilable

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/unified_buildsys@3892 3789f03b-4d11-0410-bbf8-ca57d06f2519

17 files changed:
common/common-config.win.h [deleted file]
common/configure.ac [deleted file]
common/network/Makefile.am
common/network/TcpSocket.cxx
common/os/Makefile.am
common/os/net.c
common/os/net.h
common/os/print.c
common/os/print.h
common/rdr/FdInStream.cxx
common/rdr/FdOutStream.cxx
common/rdr/Makefile.am
common/rfb/Makefile.am
common/rfb/util.cxx
common/rfb/util.h
configure.ac [new file with mode: 0644]
unix/configure.ac [deleted file]

diff --git a/common/common-config.win.h b/common/common-config.win.h
deleted file mode 100644 (file)
index 2f84e9c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* common-config.win.h - Platform-specific definitions for Windows */
-
-#define HAVE_VSNPRINTF 1
-#ifdef _MSC_VER
-/* Older versions of MSVC lacks vsnprintf. MinGW has it, and if this
-   macro is defined before stdio.h is included, things will break. */
-#define vsnprintf _vsnprintf
-#endif
-
-#define HAVE_SNPRINTF 1
-#define snprintf _snprintf
diff --git a/common/configure.ac b/common/configure.ac
deleted file mode 100644 (file)
index 54e2f3d..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ([2.57])
-AC_INIT([librfb], [0.0.91], [http://www.tigervnc.org])
-
-AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
-
-dnl Checks for programs.
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_LIBTOOL
-AC_LANG([C++])
-
-AC_CONFIG_HEADERS([common-config.h])
-CPPFLAGS="-DHAVE_COMMON_CONFIG_H $CPPFLAGS"
-
-case "`(uname -sr) 2>/dev/null`" in
-"SunOS 5"*)
-  SOLARIS=yes
-  ;;
-"IRIX 6"*)
-  LDFLAGS="-L/usr/lib32 $LDFLAGS"
-  ;;
-"LynxOS 2"*)
-  SJLJ_EXCEPTIONS=yes
-  ;;
-esac
-
-case "$host_os" in
-    mingw*)
-        CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_IE=0x0500"
-        CXXFLAGS="$CXXFLAGS -mthreads"
-        ;;
-esac
-
-dnl FIXME: Remove duplication between this script and ../unix/configure.in
-if test "$GCC" = yes; then
-  CFLAGS="$CFLAGS -Wall"
-  if test "$SOLARIS" = yes; then
-    CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int"
-  fi
-fi
-if test "$GXX" = yes; then
-  CXXFLAGS="$CXXFLAGS -Wall"
-  if test "$SOLARIS" = yes; then
-    CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -fpermissive"
-  fi
-  if test "$SJLJ_EXCEPTIONS" = yes; then
-    CXXFLAGS="$CXXFLAGS -fsjlj-exceptions"
-  fi
-fi
-
-dnl Check for zlib library
-INCLUDED_ZLIB=no
-AC_ARG_WITH([included-zlib],
-       AS_HELP_STRING([--with-included-zlib],
-                      [use libz which is distributed with VNC]),
-       [INCLUDED_ZLIB=yes],
-       [AC_SEARCH_LIBS([inflateEnd], [z], [], [INCLUDED_ZLIB=yes])])
-
-AM_CONDITIONAL([INCLUDED_ZLIB], [ test "x$INCLUDED_ZLIB" = xyes ])
-AC_CONFIG_SUBDIRS([zlib])
-
-dnl Check for libjpeg library
-INCLUDED_JPEG=yes
-AC_ARG_WITH([system-jpeg],
-       AS_HELP_STRING([--with-system-jpeg], 
-                      [use libjpeg which is distributed with the O/S]),
-       [AC_SEARCH_LIBS([jpeg_destroy_compress], [jpeg],
-                       [INCLUDED_JPEG=no], [])],
-       [])
-
-AM_CONDITIONAL([INCLUDED_JPEG], [ test "x$INCLUDED_JPEG" = xyes ])
-AC_CONFIG_SUBDIRS([jpeg])
-
-AC_CHECK_FUNCS([vsnprintf snprintf strcasecmp strncasecmp])
-
-# IPv6 related functions
-AC_CHECK_FUNCS([inet_ntop getaddrinfo])
-
-AC_CHECK_TYPES([socklen_t], [], [], [[#include <sys/socket.h>]])
-
-AC_CHECK_HEADERS([sys/select.h])
-
-AC_OUTPUT([Makefile
-          os/Makefile
-          rdr/Makefile
-          network/Makefile
-          Xregion/Makefile
-          rfb/Makefile])
index c4bad9349faac914f522da3cd2e2998cc0fcb637..3db5536236d202333cb849693695cd973916260e 100644 (file)
@@ -4,5 +4,5 @@ HDRS = Socket.h TcpSocket.h
 
 libnetwork_la_SOURCES = $(HDRS) TcpSocket.cxx
 
-libnetwork_la_CPPFLAGS = -I$(top_srcdir)
+libnetwork_la_CPPFLAGS = -I$(top_srcdir)/common
 
index 7ceff0b002514da6618050ead4fd697f81ba015b..c95dfcfc77573dd8ea7a64e46f3294a8f783442b 100644 (file)
@@ -16,8 +16,8 @@
  * USA.
  */
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #ifdef WIN32
index 3d892609294f6006e62b21fbacd93e8ec7b9bf1f..5e37290636be2e7208431fa3535436bb10f471d5 100644 (file)
@@ -3,3 +3,6 @@ noinst_LTLIBRARIES = libos.la
 HDRS = net.h print.h
 
 libos_la_SOURCES = $(HDRS) print.c net.c
+
+libos_la_CPPFLAGS = -I$(top_srcdir)/common
+
index 50ce868766f7829868620a15c5d434867aa4d52e..5c0ac2d376414174dd3b646011ea3cc27412c82e 100644 (file)
@@ -16,8 +16,8 @@
  * USA.
  */
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #include <stdlib.h>
index acaf50f5523c84f86ae7a5e2b878e6d6f91ab903..bd8b21cc45e768b1e8d6f4a9a61a234e538e1bae 100644 (file)
 #ifndef OS_NET_H
 #define OS_NET_H
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
-#endif
-
-#ifdef WIN32
-#include <common-config.win.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #ifdef __cplusplus
index 0f26de36888b7670d6974089db82854610a14615..4be22035cc1e4fe152fd6868219ad5acb85a1413 100644 (file)
@@ -16,8 +16,8 @@
  * USA.
  */
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #include <os/print.h>
index 523f3a1f11369c65f406be341eac71687badb9ea..442dd6423dd2be5e4dea46d99f3064ce2beddb15 100644 (file)
 #ifndef OS_PRINT_H
 #define OS_PRINT_H
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
-#endif
-
-#ifdef WIN32
-#include <common-config.win.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #include <stdarg.h>
index e2281b49d05d43253d5aecbb96b706ab642e3f7d..adb14c504032eea4a5185729cf3b874bd0d02983 100644 (file)
@@ -16,8 +16,8 @@
  * USA.
  */
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #include <stdio.h>
index c771166e67c7b06a1ae70734642ffd7f39020f17..c84c946fa8dcd9d24547ac488ee945325602a50d 100644 (file)
@@ -16,8 +16,8 @@
  * USA.
  */
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #include <stdio.h>
index e9a01c10e8e7cccbe68b5f4a49f2555ed17066b5..589ad80947ca86ecc9d9a78bcc463080a6b2fc9d 100644 (file)
@@ -9,10 +9,10 @@ librdr_la_SOURCES = $(HDRS) Exception.cxx FdInStream.cxx FdOutStream.cxx \
        InStream.cxx RandomStream.cxx ZlibInStream.cxx ZlibOutStream.cxx \
        HexInStream.cxx HexOutStream.cxx
 
-librdr_la_CPPFLAGS = -I$(top_srcdir)
+librdr_la_CPPFLAGS = -I$(top_srcdir)/common
 librdr_la_LIBADD =
 
 if INCLUDED_ZLIB
-librdr_la_CPPFLAGS += -I$(top_srcdir)/zlib
-librdr_la_LIBADD += $(top_srcdir)/zlib/libz.la
+librdr_la_CPPFLAGS += -I$(top_srcdir)/common/zlib
+librdr_la_LIBADD += $(top_srcdir)/common/zlib/libz.la
 endif
index fdb119d9128345d72e84244a0e8415f4e076093f..eec00762c1f0fda2d174f7b9a64e5cbf10d25f0c 100644 (file)
@@ -41,10 +41,10 @@ librfb_la_SOURCES = $(HDRS) Blacklist.cxx CConnection.cxx CMsgHandler.cxx \
        VNCServerST.cxx ZRLEEncoder.cxx ZRLEDecoder.cxx encodings.cxx \
        secTypes.cxx util.cxx
 
-librfb_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/../win
+librfb_la_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/win
 librfb_la_LIBADD =
 
 if INCLUDED_JPEG
-librfb_la_CPPFLAGS += -I$(top_srcdir)/jpeg
-librfb_la_LIBADD += $(top_srcdir)/jpeg/libjpeg.la
+librfb_la_CPPFLAGS += -I$(top_srcdir)/common/jpeg
+librfb_la_LIBADD += $(top_srcdir)/common/jpeg/libjpeg.la
 endif
index a50ea58628713021fd696be3a5acdc166c80ba05..265114f9bd93523d6159831a6908a5d015c3f813 100644 (file)
@@ -30,8 +30,8 @@
  * is provided ``as is'' without express or implied warranty.
  */
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #include <rfb/util.h>
index 933df5272f45ccd397d02a116f0d99276ee04558..4124769a2f31aaaaa913883b7f2a9383a2dff4de 100644 (file)
@@ -23,8 +23,8 @@
 #ifndef __RFB_UTIL_H__
 #define __RFB_UTIL_H__
 
-#ifdef HAVE_COMMON_CONFIG_H
-#include <common-config.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
 #include <limits.h>
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..1847bc7
--- /dev/null
@@ -0,0 +1,156 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ([2.57])
+AC_INIT([tigervnc], [0.0.91], [http://www.tigervnc.org])
+AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
+
+AC_CONFIG_SUBDIRS([common/jpeg common/zlib])
+
+AC_CONFIG_HEADERS([config.h])
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+AC_LANG([C++])
+dnl AM_GNU_GETTEXT([external])
+dnl AM_GNU_GETTEXT_VERSION([0.14.1])
+
+case "`(uname -sr) 2>/dev/null`" in
+"SunOS 5"*)
+       SOLARIS=yes
+       USE_MITSHM=yes
+       USE_SUN_OVL=yes
+       ;;
+"IRIX 6"*)
+       LDFLAGS="-L/usr/lib32 $LDFLAGS"
+       USE_MITSHM=yes
+       USE_READDISPLAY=yes
+       ;;
+"LynxOS 2"*)
+       SJLJ_EXCEPTIONS=yes
+       ;;
+esac
+
+case "$host_os" in
+mingw*)
+       CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_IE=0x0500"
+       CXXFLAGS="$CXXFLAGS -mthreads"
+       ;;
+esac
+
+dnl FIXME: Check for MIT-SHM properly, add a corresponding --with option.
+if test "$USE_MITSHM" = yes; then
+       MITSHM_DEFINE="-DHAVE_MITSHM"
+fi
+AC_SUBST(MITSHM_DEFINE)
+
+if test "$GCC" = yes; then
+       CFLAGS="$CFLAGS -Wall"
+       if test "$SOLARIS" = yes; then
+               CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int"
+       fi
+fi
+if test "$GXX" = yes; then
+       CXXFLAGS="$CXXFLAGS -Wall"
+       if test "$SOLARIS" = yes; then
+               CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -fpermissive"
+       fi
+       if test "$SJLJ_EXCEPTIONS" = yes; then
+               CXXFLAGS="$CXXFLAGS -fsjlj-exceptions"
+       fi
+fi
+
+AC_PATH_XTRA
+
+VNCCONFIG_DIR='vncconfig'
+AC_ARG_ENABLE([vncconfig],
+       AS_HELP_STRING([--enable-vncconfig],
+                      [build the vncconfig utility (default yes)]),
+       [if test "$enableval" = no; then VNCCONFIG_DIR=; fi ], [])
+AC_SUBST(VNCCONFIG_DIR)
+
+dnl Check for the XTest X11 extension library.
+AC_CHECK_LIB(Xtst,XTestGrabControl,USE_XTEST=yes,USE_XTEST=,
+            ["$X_LIBS" -lXext -lX11])
+if test "$USE_XTEST" = yes; then
+       XTEST_DEFINE='-DHAVE_XTEST'
+       XTEST_LIB=-lXtst
+else
+       echo Warning: No XTest extension, building x0vncserver view-only
+       XTEST_DEFINE=
+       XTEST_LIB=
+fi
+AC_SUBST(XTEST_DEFINE)
+AC_SUBST(XTEST_LIB)
+
+dnl Support for READDISPLAY (Irix) and SUN_OVL (Solaris) extensions
+dnl FIXME: Implement corresponding --with options.
+if test "$USE_READDISPLAY" = yes; then
+       READDISPLAY_DEFINE='-DHAVE_READDISPLAY'
+elif test "$USE_SUN_OVL" = yes; then
+       READDISPLAY_DEFINE='-DHAVE_SUN_OVL'
+else
+       READDISPLAY_DEFINE=
+fi
+AC_SUBST(READDISPLAY_DEFINE)
+
+dnl Under Lynx/OS 2.3, we have to link with -lbsd to resolve
+dnl gethostbyname, inet_addr, htons etc. Check if it's necessary.
+dnl NOTE: Did not want to use AC_SEARCH_LIBS which would add
+dnl   -lbsd to LIBS. We set INET_LIB instead.
+AC_LANG_SAVE
+AC_LANG_C
+AC_CHECK_FUNC(gethostbyname,INET_LIB_REQ=,INET_LIB_REQ=yes)
+if test "$INET_LIB_REQ" = yes; then
+       AC_CHECK_LIB(bsd,gethostbyname,INET_LIB=-lbsd,INET_LIB=)
+fi
+AC_LANG_RESTORE
+AC_SUBST(INET_LIB)
+
+dnl Check for zlib library
+INCLUDED_ZLIB=no
+AC_ARG_WITH([included-zlib],
+       AS_HELP_STRING([--with-included-zlib],
+                      [use libz which is distributed with VNC]),
+       [INCLUDED_ZLIB=yes],
+       [AC_SEARCH_LIBS([inflateEnd], [z], [], [INCLUDED_ZLIB=yes])])
+
+AM_CONDITIONAL([INCLUDED_ZLIB], [ test "x$INCLUDED_ZLIB" = xyes ])
+AC_CONFIG_SUBDIRS([zlib])
+
+dnl Check for libjpeg library
+INCLUDED_JPEG=yes
+AC_ARG_WITH([system-jpeg],
+       AS_HELP_STRING([--with-system-jpeg], 
+                      [use libjpeg which is distributed with the O/S]),
+       [AC_SEARCH_LIBS([jpeg_destroy_compress], [jpeg],
+                       [INCLUDED_JPEG=no], [])],
+       [])
+
+AM_CONDITIONAL([INCLUDED_JPEG], [ test "x$INCLUDED_JPEG" = xyes ])
+AC_CONFIG_SUBDIRS([jpeg])
+
+AC_CHECK_FUNCS([vsnprintf snprintf strcasecmp strncasecmp])
+
+# IPv6 related functions
+AC_CHECK_FUNCS([inet_ntop getaddrinfo])
+
+AC_CHECK_TYPES([socklen_t], [], [], [[#include <sys/socket.h>]])
+
+AC_CHECK_HEADERS([sys/select.h])
+
+AC_OUTPUT([
+Makefile
+common/Makefile
+common/os/Makefile
+common/rdr/Makefile
+common/network/Makefile
+common/Xregion/Makefile
+common/rfb/Makefile
+unix/Makefile
+unix/tx/Makefile
+unix/x0vncserver/Makefile
+unix/vncviewer/Makefile
+unix/vncconfig/Makefile
+unix/vncpasswd/Makefile
+])
diff --git a/unix/configure.ac b/unix/configure.ac
deleted file mode 100644 (file)
index f903dfc..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ([2.57])
-AC_INIT([tigervnc], [0.0.91], [http://www.tigervnc.org])
-AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
-
-AC_SUBST([COMMON_DIR], ['$(top_srcdir)/../common'])
-
-AC_CONFIG_SUBDIRS([../common])
-
-dnl Checks for programs.
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_LIBTOOL
-AC_LANG([C++])
-AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.14.1])
-
-case "`(uname -sr) 2>/dev/null`" in
-"SunOS 5"*)
-  SOLARIS=yes
-  USE_MITSHM=yes
-  USE_SUN_OVL=yes
-  ;;
-"IRIX 6"*)
-  LDFLAGS="-L/usr/lib32 $LDFLAGS"
-  USE_MITSHM=yes
-  USE_READDISPLAY=yes
-  ;;
-"LynxOS 2"*)
-  SJLJ_EXCEPTIONS=yes
-  ;;
-esac
-
-dnl FIXME: Check for MIT-SHM properly, add a corresponding --with option.
-if test "$USE_MITSHM" = yes; then
-  MITSHM_DEFINE="-DHAVE_MITSHM"
-fi
-AC_SUBST(MITSHM_DEFINE)
-
-if test "$GCC" = yes; then
-  CFLAGS="$CFLAGS -Wall"
-  if test "$SOLARIS" = yes; then
-    CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int"
-  fi
-fi
-if test "$GXX" = yes; then
-  CXXFLAGS="$CXXFLAGS -Wall"
-  if test "$SOLARIS" = yes; then
-    CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -fpermissive"
-  fi
-  if test "$SJLJ_EXCEPTIONS" = yes; then
-    CXXFLAGS="$CXXFLAGS -fsjlj-exceptions"
-  fi
-fi
-
-AC_PATH_XTRA
-
-AC_ARG_ENABLE(vncconfig,
-[  --enable-vncconfig      build the vncconfig utility (assumed by default),
-                          use --disable-vncconfig to skip building vncconfig])
-if test "$enable_vncconfig" = no; then
-  echo "vncconfig utility will not be built"
-  VNCCONFIG_DIR=
-else
-  VNCCONFIG_DIR='vncconfig'
-fi
-AC_SUBST(VNCCONFIG_DIR)
-
-dnl Check for the XTest X11 extension library.
-AC_CHECK_LIB(Xtst,XTestGrabControl,USE_XTEST=yes,USE_XTEST=,
-["$X_LIBS" -lXext -lX11])
-if test "$USE_XTEST" = yes; then
-  XTEST_DEFINE='-DHAVE_XTEST'
-  XTEST_LIB=-lXtst
-else
-  echo Warning: No XTest extension, building x0vncserver view-only
-  XTEST_DEFINE=
-  XTEST_LIB=
-fi
-AC_SUBST(XTEST_DEFINE)
-AC_SUBST(XTEST_LIB)
-
-dnl Support for READDISPLAY (Irix) and SUN_OVL (Solaris) extensions
-dnl FIXME: Implement corresponding --with options.
-if test "$USE_READDISPLAY" = yes; then
-  READDISPLAY_DEFINE='-DHAVE_READDISPLAY'
-elif test "$USE_SUN_OVL" = yes; then
-  READDISPLAY_DEFINE='-DHAVE_SUN_OVL'
-else
-  READDISPLAY_DEFINE=
-fi
-AC_SUBST(READDISPLAY_DEFINE)
-
-dnl Under Lynx/OS 2.3, we have to link with -lbsd to resolve
-dnl gethostbyname, inet_addr, htons etc. Check if it's necessary.
-dnl NOTE: Did not want to use AC_SEARCH_LIBS which would add
-dnl   -lbsd to LIBS. We set INET_LIB instead.
-AC_LANG_SAVE
-AC_LANG_C
-AC_CHECK_FUNC(gethostbyname,INET_LIB_REQ=,INET_LIB_REQ=yes)
-if test "$INET_LIB_REQ" = yes; then
-  AC_CHECK_LIB(bsd,gethostbyname,INET_LIB=-lbsd,INET_LIB=)
-fi
-AC_LANG_RESTORE
-AC_SUBST(INET_LIB)
-
-AC_OUTPUT(Makefile
-         tx/Makefile
-         x0vncserver/Makefile
-         vncviewer/Makefile
-         vncconfig/Makefile
-         vncpasswd/Makefile
-         po/Makefile.in
-)