From 8ce8820c4e8596302baddc582180e503d5ccf923 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 5 Nov 2008 16:55:07 +0000 Subject: [PATCH] fix configure.in when running autoreconf git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10917 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CCache/config.h.in | 6 +++--- CCache/configure.in | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CCache/config.h.in b/CCache/config.h.in index 49ccd8325..893f98bd9 100644 --- a/CCache/config.h.in +++ b/CCache/config.h.in @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.in by autoheader. */ +/* Define to 1 if you would like to have zlib compression for ccache. */ +#undef ENABLE_ZLIB + /* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF @@ -110,6 +113,3 @@ /* Define _GNU_SOURCE so that we get all necessary prototypes */ #undef _GNU_SOURCE - -/* Define to 1 if you like to have zlib compression for the ccache. */ -#undef ENABLE_ZLIB diff --git a/CCache/configure.in b/CCache/configure.in index 1ac94d3fd..7dccd6d2a 100644 --- a/CCache/configure.in +++ b/CCache/configure.in @@ -44,6 +44,7 @@ if test x"$ccache_cv_COMPAR_FN_T" = x"yes"; then AC_DEFINE(HAVE_COMPAR_FN_T, 1, [ ]) fi +dnl Note: This could be replaced by AC_FUNC_SNPRINTF() in the autoconf macro archive AC_CACHE_CHECK([for C99 vsnprintf],ccache_cv_HAVE_C99_VSNPRINTF,[ AC_TRY_RUN([ #include @@ -70,12 +71,14 @@ if test x"$ccache_cv_HAVE_C99_VSNPRINTF" = x"yes"; then fi dnl Check for zlib. +dnl Note: This could be replaced by CHECK_ZLIB() in the autoconf macro archive AC_ARG_ENABLE([zlib], AS_HELP_STRING([--enable-zlib], [enable zlib support for ccache compression]),, [enable_zlib=yes]) if test x"$enable_zlib" = x"yes"; then - AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, gzdopen, LIBS="-lz $LIBS"; AC_DEFINE(ENABLE_ZLIB))) + AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, gzdopen, [LIBS="-lz $LIBS" + AC_DEFINE([ENABLE_ZLIB], 1, [Define to 1 if you would like to have zlib compression for ccache.]) ] )) fi AC_CONFIG_FILES([Makefile])