From 894d4e35d05fb7541cfaa09a01c129e223796b5c Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 14 Apr 2008 13:53:45 +0000 Subject: [PATCH] - improved jpeg configuration, parameter --with-installed-jpeg replaced by --with-tight-jpeg git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2463 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/configure.ac | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/common/configure.ac b/common/configure.ac index c4c7de3e..a31032b4 100644 --- a/common/configure.ac +++ b/common/configure.ac @@ -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) -- 2.39.5