1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/main.c)
AC_CONFIG_AUX_DIR(scripts)
AM_INIT_AUTOMAKE(quinn-diff, 0.51)
AM_CONFIG_HEADER(config.h)
PACKAGE=quinn-diff
AC_SUBST(PACKAGE)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
VERSION=0.51
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
dnl Electric Fence; see ftp://ftp.debian.org/pub/debian/dists/unstable/main/source/devel/
opt_efence=no
AC_ARG_WITH(efence, [ --with-efence compile with electric fence], opt_efence=yes)
if test "$opt_efence" = "yes"; then
case "x$withval" in
x/*|x.*)
EFENCE="$withval"
;;
*)
EFENCE="/usr/lib/libefence.a"
;;
esac
if test ! -s "$EFENCE"; then
AC_MSG_RESULT([Warning: $EFENCE does not exist])
else
AC_MSG_RESULT([Compiling with electric fence ($EFENCE)])
fi
else
EFENCE=
fi
AC_SUBST(EFENCE)
withval=""
dnl ccmalloc; see http://iseran.ira.uka.de/~armin/ccmalloc/
opt_ccmalloc=no
AC_ARG_WITH(ccmalloc, [ --with-ccmalloc compile with ccmalloc], opt_ccmalloc=yes)
if test "$opt_ccmalloc" = "yes"; then
case "x$withval" in
x/*|x.*)
CCMALLOC="$withval"
;;
*)
CCMALLOC="/usr/lib/libccmalloc.a"
;;
esac
if test ! -s "$CCMALLOC"; then
AC_MSG_RESULT([Warning: $CCMALLOC does not exist; not using it])
CCMALLOC=
else
AC_MSG_RESULT([Compiling with ccmalloc ($CCMALLOC)])
CCMALLOC="$CCMALLOC -ldl"
fi
else
CCMALLOC=
fi
AC_SUBST(CCMALLOC)
withval=""
dnl --with-includes
AC_ARG_WITH(includes, [ --with-includes=DIR search include DIR for optional packages below])
case "x$withval" in
x/*|x.*)
if test ! -d "$withval"; then
AC_MSG_RESULT([Warning: Directory $withval does not exist])
else
CPPFLAGS="$CPPFLAGS -I$withval"
AC_MSG_RESULT([adding $withval to include search path for following packages])
fi
;;
*)
;;
esac
dnl Checks for libraries.
AC_CHECK_LIB(glib, g_hash_table_lookup)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror strstr strtol strtoul)
dnl Check for whether GCC's debug flags are wanted
opt_debug=no
AC_ARG_WITH(debug, [ --with-debug compile with maximum (GCC) warnings and debug info], opt_debug=yes)
if test "$opt_debug" = "yes"; then
CFLAGS="-g3 -ggdb3 -W -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline"
AC_MSG_RESULT([Compiling with maximum warnings and debug information])
else
CFLAGS="-O2"
fi
withval=""
dnl CFLAGS="$CFLAGS $DEBUG_FLAGS"
AC_OUTPUT([Makefile doc/Makefile src/Makefile])
|