2005-04-28 10:26:44 +02:00
|
|
|
AC_INIT(src/bip.c)
|
|
|
|
AM_CONFIG_HEADER(src/config.h)
|
2008-12-25 18:34:36 +01:00
|
|
|
AM_INIT_AUTOMAKE(bip,0.8.0)
|
2005-04-28 10:26:44 +02:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
2008-12-29 14:07:09 +01:00
|
|
|
|
2005-04-28 10:26:44 +02:00
|
|
|
AM_PROG_LEX
|
2007-09-02 14:59:19 +02:00
|
|
|
AC_PROG_YACC
|
2005-04-28 10:26:44 +02:00
|
|
|
|
2005-05-02 00:29:31 +02:00
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
[ --enable-debug Turn on debugging],
|
2008-12-25 18:34:36 +01:00
|
|
|
[ enable_debug=$enableval ],
|
|
|
|
[ enable_debug=no ])
|
|
|
|
|
2008-12-28 15:47:43 +01:00
|
|
|
AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes)
|
2008-12-25 18:34:36 +01:00
|
|
|
|
|
|
|
case $enable_debug in
|
|
|
|
yes)
|
|
|
|
CFLAGS="-O0 -g -W -Wall"
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
CFLAGS="-O2 -W -Wall"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR(bad value ${enable_debug} for --enable-debug)
|
|
|
|
esac
|
2005-05-02 00:29:31 +02:00
|
|
|
|
2008-12-29 09:15:27 +01:00
|
|
|
backtrace=
|
2008-12-28 15:47:43 +01:00
|
|
|
if test x$enable_debug = xyes ; then
|
2008-12-29 09:15:27 +01:00
|
|
|
AC_CHECK_FUNC(backtrace_symbols_fd, [
|
|
|
|
AC_DEFINE(HAVE_BACKTRACE, [], [Use Glibcs backtrace function on fatal()])
|
|
|
|
LDFLAGS="-rdynamic $LDFLAGS"
|
|
|
|
backtrace="(with backtrace)"
|
|
|
|
])
|
2008-12-28 15:47:43 +01:00
|
|
|
fi
|
|
|
|
|
2005-05-12 10:29:27 +02:00
|
|
|
AC_ARG_ENABLE(oidentd,
|
|
|
|
[ --enable-oidentd Enable oidentd support (bip overwrites ~/.oidentd.conf with this on!)],
|
2008-12-29 09:15:27 +01:00
|
|
|
enable_oidentd=yes
|
|
|
|
AC_DEFINE([HAVE_OIDENTD], [], [Enable oidentd.conf management support]),
|
|
|
|
[enable_oidentd=no]
|
2005-05-12 10:29:27 +02:00
|
|
|
)
|
2008-12-25 18:34:36 +01:00
|
|
|
|
|
|
|
AM_CONDITIONAL(OIDENTD, test x$enable_identd = xyes)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(openssl,
|
|
|
|
[ --disable-openssl Drop OpenSSL support],
|
|
|
|
[ enable_openssl=$enableval ],
|
|
|
|
[ enable_openssl=yes ])
|
|
|
|
|
|
|
|
if test "x$enable_openssl" = "xyes" ; then
|
2008-12-29 09:15:27 +01:00
|
|
|
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [
|
|
|
|
AC_MSG_ERROR([library 'crypto' is required for OpenSSL support])
|
|
|
|
], -lcrypto)
|
|
|
|
AC_CHECK_LIB(ssl, SSL_read, [], [
|
|
|
|
AC_MSG_ERROR([library 'ssl' is required for OpenSSL support])
|
|
|
|
])
|
2005-04-28 10:26:44 +02:00
|
|
|
fi
|
|
|
|
AC_OUTPUT(Makefile src/Makefile samples/Makefile)
|
2008-12-25 18:34:36 +01:00
|
|
|
|
|
|
|
echo OPENSSL: $enable_openssl
|
2008-12-29 09:15:27 +01:00
|
|
|
echo DEBUG: $enable_debug $backtrace
|
2008-12-25 18:34:36 +01:00
|
|
|
echo OIDENTD: $enable_oidentd
|