dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59c) AC_INIT(razor, 0.1, krh@redhat.com) AM_INIT_AUTOMAKE(razor, 0.1) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE # libtool versioning - this applies to all libraries in this package # # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details # LT_CURRENT=1 LT_REVISION=0 LT_AGE=0 AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AM_PROG_LIBTOOL AC_PROG_MAKE_SET AC_PROG_LN_S AC_SYS_LARGEFILE AM_PROG_CC_C_O # Taken from dbus AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no) AC_ARG_ENABLE(verbose-mode, [ --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE) if test "${enable_verbose_mode}" != no; then # To get -rdynamic you pass -export-dynamic to libtool. AC_DEFINE(BUILT_R_DYNAMIC,1,[whether -export-dynamic was passed to libtool]) R_DYNAMIC_LDFLAG=-export-dynamic else R_DYNAMIC_LDFLAG= fi AC_SUBST(R_DYNAMIC_LDFLAG) #### gcc warning flags if test "x$GCC" = "xyes"; then changequote(,)dnl case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac case " $CFLAGS " in *[\ \ ]-Wchar-subscripts[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wchar-subscripts" ;; esac case " $CFLAGS " in *[\ \ ]-Wmissing-declarations[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; esac case " $CFLAGS " in *[\ \ ]-Wnested-externs[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wnested-externs" ;; esac case " $CFLAGS " in *[\ \ ]-Wcast-align[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wcast-align" ;; esac case " $CFLAGS " in *[\ \ ]-Wformat[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wformat" ;; esac case " $CFLAGS " in *[\ \ ]-Wformat-security[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wformat-security" ;; esac if test "x$enable_ansi" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-D_POSIX_C_SOURCE*) ;; *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;; esac case " $CFLAGS " in *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;; *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; esac fi changequote([,])dnl fi # gcc default visibility stuff have_gcc4=no AC_MSG_CHECKING(for -fvisibility) AC_COMPILE_IFELSE([ #if defined(__GNUC__) && (__GNUC__ >= 4) #else #error Need GCC 4.0 for visibility #endif int main () { return 0; } ], have_gcc4=yes) if test "x$have_gcc4" = "xyes"; then CFLAGS="$CFLAGS -fvisibility=hidden" fi AC_MSG_RESULT($have_gcc4) PKG_CHECK_MODULES(CURL, [libcurl]) AC_SUBST(CURL_CFLAGS) AC_SUBST(CURL_LIBS) ZLIB_LIBS="" AC_ARG_WITH(zlib, [ --with-zlib=