]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add --enable-builtin-tiff configure arg to tell spandsp to use pre-built libtiff...
authorMichael Jerris <mike@jerris.com>
Wed, 22 Jul 2009 18:44:16 +0000 (18:44 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 22 Jul 2009 18:44:16 +0000 (18:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14318 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/spandsp/configure.ac

index 7efaa0557e38e20bbec50bc81552d3560d1007f4..d01237690c0578a8de18a88cdf8064d0d1b4713b 100644 (file)
@@ -130,6 +130,9 @@ AC_ARG_ENABLE(sse4_2,       [  --enable-sse4-2      Enable SSE4.2 support])
 AC_ARG_ENABLE(sse4a,        [  --enable-sse4a       Enable SSE4A support])
 AC_ARG_ENABLE(sse5,         [  --enable-sse5        Enable SSE5 support])
 AC_ARG_ENABLE(fixed_point,  [  --enable-fixed-point Enable fixed point support])
+AC_ARG_ENABLE(builtin_tiff,
+[AC_HELP_STRING([--enable-builtin-tiff],[build with builtin libtiff])],[enable_builtin_tiff="$enableval"],[enable_builtin_tiff="no"])
+
 
 AC_FUNC_ERROR_AT_LINE
 AC_FUNC_VPRINTF
@@ -187,7 +190,6 @@ AC_CHECK_HEADERS([sys/ioctl.h])
 AC_CHECK_HEADERS([sys/fcntl.h])
 AC_CHECK_HEADERS([sndfile.h])
 AC_CHECK_HEADERS([fftw3.h], , [AC_CHECK_HEADERS([fftw.h])])
-AC_CHECK_HEADERS([tiffio.h])
 AC_CHECK_HEADERS([pthread.h])
 if test "${build}" == "${host}"
 then
@@ -265,8 +267,6 @@ AC_SEARCH_LIBS([logf], [m], AC_DEFINE([HAVE_LOGF], [1], [Define to 1 if you have
 AC_SEARCH_LIBS([log10f], [m], AC_DEFINE([HAVE_LOG10F], [1], [Define to 1 if you have the log10f() function.]))
 
 # Checks for libraries.
-AC_CHECK_LIB([tiff], [TIFFOpen], , AC_MSG_ERROR("Can't build without libtiff (does your system require a libtiff-devel package?)"), -lm)
-
 AC_CHECK_LIB([xml2], [xmlParseFile], [AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have the 'libxml2' library (-lxml2).]) SIMLIBS="$SIMLIBS -lxml2"])
 
 if test -n "$enable_tests" ; then
@@ -415,6 +415,20 @@ if test "$enable_mmx" = "yes" ; then
     AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
 fi
 
+if test "$enable_builtin_tiff" = "yes" ; then
+  abs_tiffdir="`cd $srcdir/../tiff-3.8.2/ && pwd`"
+  save_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS -I$abs_tiffdir/libtiff"
+  AC_CHECK_HEADERS([tiffio.h])
+  CFLAGS="$save_CFLAGS"
+  COMP_VENDOR_CFLAGS="-I$abs_tiffdir/libtiff $COMP_VENDOR_CFLAGS"
+  COMP_VENDOR_LDFLAGS="-L$abs_tiffdir/libtiff $COMP_VENDOR_LDFLAGS"
+  LIBS="$LIBS $abs_tiffdir/libtiff/libtiff.la"
+else
+  AC_CHECK_HEADERS([tiffio.h])
+  AC_CHECK_LIB([tiff], [TIFFOpen], , AC_MSG_ERROR("Can't build without libtiff (does your system require a libtiff-devel package?)"), -lm)
+fi
+
 TESTLIBS="$SIMLIBS $TESTLIBS"
 
 AC_SUBST(CC_FOR_BUILD)