diff -r 000000000000 -r 707d51fedbe0 configure.ac --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/configure.ac Tue Jan 24 23:57:11 2012 +0000 @@ -0,0 +1,94 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_INIT([gutcheck],[1.50],[ali@juiblex.co.uk]) +AC_PREREQ(2.59) +AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_SRCDIR([gutcheck/gutcheck.c]) +AC_CONFIG_FILES([Makefile +gclib/Makefile +gutcheck/Makefile +test/Makefile +test/harness/Makefile +test/compatibility/Makefile +doc/Makefile +]) +AM_INIT_AUTOMAKE(no-define) +AC_CANONICAL_HOST + +################################################## +# Checks for programs. +################################################## +AC_PROG_CC +LT_INIT +# Libtool supports a --disable-shared option to tell it to avoid +# building shared versions of libraries. We don't have any libraries +# but we do want to support building static versions of our executables. +# Libtool can do this (under the right circumstances) so we overload +# this switch for this purpose. +# +# The libtool option that we use (-static-libtool-libs) means to use +# static linking with libraries that supply a .la file and which +# include a non-empty value for "old_library". If the library doesn't +# include a .la file (they are deleted by some distributions), then +# this option will have no effect and likewise if old_library is set +# to '' (eg., if the library was build with --disable-static) then +# again -static-libtool-libs will have no effect. +# +# If old_library is set to a non-empty value, then specifying +# -static-libtool-libs will cause the link to fail if the old library +# cannot be found (libtool will not fallback to a shared library +# in these circumstances). This can happen with Fedora, for example, +# if a main mingw32 library package is installed but not the +# coresponding static sub-package. The solution is to either +# install the relevant static sub-packages or don't use --disable-shared. +AS_IF([test "$enable_shared" = no],[ + LDFLAGS="$LDFLAGS -static-libtool-libs" +]) +PKG_PROG_PKG_CONFIG + +################################################## +# Checks for header files. +################################################## + +################################################## +# Checks for typedefs, structures, and compiler characteristics. +################################################## + +################################################## +# Checks for libraries. +################################################## +AC_MSG_CHECKING([whether to use glib]) +AC_ARG_WITH([glib],[AS_HELP_STRING([--without-glib], + [use internal re-invented wheel rather than glib2])]) +AS_IF([test "$with_glib" != no],[ + AC_MSG_RESULT([yes]) + PKG_CHECK_MODULES([GLIB],[glib-2.0]) + AC_DEFINE([HAVE_GLIB],[1],[Define if you have glib version 2.x]) +],[ + AC_MSG_RESULT([no]) +]) +AM_CONDITIONAL([HAVE_GLIB],[test "$with_glib" != no]) + +# NOTE: If we are using a static version of glib then we +# should define GLIB_STATIC_COMPILATION. This isn't needed +# when glib is built only for static use (in which case +# glibconfig.h will already define GLIB_STATIC_COMPILATION). +# It's not easy to tell if libtool will actually link with +# a static glib but luckily we don't currently need to; +# this pre-processor define only affects the behaviour of +# libraries which use glib and we don't have any. + +################################################## +# Checks for library functions. +################################################## +AC_CHECK_FUNCS_ONCE([mkstemp]) + +################################################## +# Checks for processor independent files. +################################################## + +################################################## +# Generate the various configured files +################################################## +AC_OUTPUT