]> source.dussan.org Git - tigervnc.git/commitdiff
- improved jpeg configuration, parameter --with-installed-jpeg replaced by --with...
authorAdam Tkac <atkac@redhat.com>
Mon, 14 Apr 2008 13:53:45 +0000 (13:53 +0000)
committerAdam Tkac <atkac@redhat.com>
Mon, 14 Apr 2008 13:53:45 +0000 (13:53 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2463 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/configure.ac

index c4c7de3ec9445c714f57f2905180cde3b122843b..a31032b44917f5d23e617574af19d7dfa7d41369 100644 (file)
@@ -1,16 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ([2.61])
 AC_INIT([librfb], [1.5.0a1], [http://www.tightvnc.com/bugs.html])
 
-dnl dirty hack to prevent use of -g in CFLAGS and CXXFLAGS
-ac_cv_prog_cc_g=no
-ac_cv_prog_cxx_g=no
-
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_CXX
+AC_PROG_INSTALL
 AC_PROG_RANLIB
 AC_PROG_MAKE_SET
-AC_LANG_CPLUSPLUS
+AC_LANG([C++])
 
 case "`(uname -sr) 2>/dev/null`" in
 "SunOS 5"*)
@@ -79,22 +77,25 @@ AC_SUBST(ZLIB_DIR)
 AC_SUBST(ZLIB_INCLUDE)
 AC_SUBST(ZLIB_LIB)
 
-AC_ARG_WITH(installed-jpeg,
-[  --with-installed-jpeg   use the version of jpeg which is installed on the
-                          system instead of the one distributed with VNC])
-
-if test "$with_installed_jpeg" = yes; then
-  echo "using installed jpeg"
-  JPEG_LIB=-ljpeg
+AC_ARG_WITH([tight-jpeg],
+       AS_HELP_STRING([--with-tight-jpeg], 
+                      [use libjpeg which is distributed with VNC]),
+       [], [with_tight_jpeg='no'])
+
+if test "x$with_tight_jpeg" = xno; then
+  AC_SEARCH_LIBS([jpeg_destroy_compress], [jpeg],
+       [JPEG_LIB='-ljpeg'],
+       [JPEG_DIR=jpeg
+        JPEG_INCLUDE='-I$(top_srcdir)/jpeg'
+        JPEG_LIB='$(top_srcdir)/jpeg/libjpeg.la'])
 else
-  JPEG_DIR=jpeg/build
-  JPEG_INCLUDE='-I$(top_srcdir)/jpeg'
-  JPEG_LIB='$(top_srcdir)/jpeg/build/libjpeg.a'
-  echo "configuring jpeg..."
-  (mkdir jpeg/build; cd jpeg/build; ../configure)
-  echo "...done configuring jpeg"
+       JPEG_DIR=jpeg
+       JPEG_INCLUDE='-I$(top_srcdir)/jpeg'
+       JPEG_LIB='$(top_srcdir)/jpeg/libjpeg.la'
 fi
 
+AC_CONFIG_SUBDIRS([jpeg])
+
 AC_SUBST(JPEG_DIR)
 AC_SUBST(JPEG_INCLUDE)
 AC_SUBST(JPEG_LIB)