| 3 |
|
|
| 4 |
|
AC_REVISION([$Id$]) |
| 5 |
|
|
| 6 |
< |
AC_PREREQ(2.63) |
| 6 |
> |
AC_PREREQ(2.64) |
| 7 |
|
AC_INIT([ircd-hybrid], [7.2.4]) |
| 8 |
|
AM_INIT_AUTOMAKE(1.11) |
| 9 |
|
AM_MAINTAINER_MODE |
| 10 |
|
AC_CONFIG_HEADER(config.h) |
| 11 |
|
AC_CONFIG_SRCDIR(src/ircd.c) |
| 12 |
|
|
| 13 |
– |
|
| 13 |
|
# Checks for programs. |
| 14 |
< |
AC_PROG_CC |
| 14 |
> |
AC_PROG_CC_C99 |
| 15 |
> |
AS_IF([test "$ac_cv_prog_cc_c99" = "no"], |
| 16 |
> |
[AC_MSG_ERROR([no C99 compiler found. Aborting.])]) |
| 17 |
|
AC_PROG_YACC |
| 18 |
|
AM_PROG_LEX |
| 19 |
|
AC_PROG_INSTALL |
| 20 |
|
|
| 20 |
– |
|
| 21 |
|
#ltdl stuff |
| 22 |
|
LT_INIT([dlopen disable-static]) |
| 23 |
|
LTDL_INIT |
| 24 |
|
LIBTOOL="$LIBTOOL --silent" |
| 25 |
|
|
| 26 |
– |
|
| 26 |
|
# Checks for libraries. |
| 27 |
|
AX_CHECK_LIB_IPV4 |
| 28 |
|
AX_CHECK_LIB_IPV6 |
| 29 |
|
|
| 31 |
– |
|
| 30 |
|
# Checks for typedefs, structures, and compiler characteristics. |
| 33 |
– |
AC_C_CONST |
| 34 |
– |
AC_C_INLINE |
| 31 |
|
AC_C_BIGENDIAN |
| 32 |
|
|
| 37 |
– |
AC_CHECK_SIZEOF(int64_t) |
| 38 |
– |
AC_CHECK_SIZEOF(long long) |
| 39 |
– |
|
| 40 |
– |
if test "$ac_cv_sizeof_int64_t" = 8; then |
| 41 |
– |
AC_CHECK_TYPE(uint64_t) |
| 42 |
– |
AC_CHECK_TYPE(int64_t) |
| 43 |
– |
elif test "$ac_cv_sizeof_long_long" = 8; then |
| 44 |
– |
AC_CHECK_TYPE(uint64_t, unsigned long long) |
| 45 |
– |
AC_CHECK_TYPE(int64_t, long long) |
| 46 |
– |
else |
| 47 |
– |
AC_MSG_ERROR([Your system doesn't appear to have 64 bit integers. Aborting.]) |
| 48 |
– |
fi |
| 49 |
– |
|
| 50 |
– |
|
| 33 |
|
# Checks for library functions. |
| 34 |
< |
AC_CHECK_FUNCS_ONCE(snprintf \ |
| 35 |
< |
vsnprintf \ |
| 36 |
< |
mmap \ |
| 37 |
< |
strtok_r \ |
| 56 |
< |
usleep \ |
| 57 |
< |
strlcat \ |
| 34 |
> |
AC_CHECK_FUNCS_ONCE(mmap \ |
| 35 |
> |
strtok_r \ |
| 36 |
> |
usleep \ |
| 37 |
> |
strlcat \ |
| 38 |
|
strlcpy) |
| 39 |
|
|
| 40 |
|
# Checks for header files. |
| 55 |
|
|
| 56 |
|
dnl check for /dev/null so we can use it to hold evil fd's |
| 57 |
|
AC_MSG_CHECKING([for /dev/null]) |
| 58 |
< |
if test -c /dev/null ; then |
| 59 |
< |
AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null]) |
| 60 |
< |
AC_MSG_RESULT(yes) |
| 81 |
< |
else |
| 58 |
> |
AS_IF([test -c /dev/null], [ |
| 59 |
> |
AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null]) |
| 60 |
> |
AC_MSG_RESULT([yes])], [ |
| 61 |
|
AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null]) |
| 62 |
< |
AC_MSG_RESULT(no - using devnull.log) |
| 84 |
< |
fi |
| 62 |
> |
AC_MSG_RESULT([no - using devnull.log])]) |
| 63 |
|
|
| 64 |
|
|
| 65 |
|
AC_SEARCH_LIBS(crypt, crypt) |
| 72 |
|
AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib],[Disable ziplinks support]), |
| 73 |
|
[zlib=$enableval],[zlib=yes]) |
| 74 |
|
|
| 75 |
< |
if test "$zlib" = yes; then |
| 75 |
> |
AS_IF([test "$zlib" = "yes"], [ |
| 76 |
|
AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, zlibVersion, |
| 77 |
|
[ |
| 78 |
|
LIBS="-lz $LIBS" |
| 79 |
|
AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if zlib (-lz) is available.]) |
| 80 |
|
], zlib=no) |
| 81 |
|
], zlib=no) |
| 82 |
< |
fi |
| 82 |
> |
]) |
| 83 |
|
|
| 84 |
|
AC_ARG_WITH(libpcre-path, |
| 85 |
|
AS_HELP_STRING([--with-libpcre-path=DIR], [Path to libpcre.so for PCRE support.]), |
| 88 |
|
AC_ARG_ENABLE(libpcre, AS_HELP_STRING([--disable-libpcre],[Disable PCRE support]), |
| 89 |
|
[libpcre=$enableval],[libpcre=yes]) |
| 90 |
|
|
| 91 |
< |
if test "$libpcre" = yes; then |
| 91 |
> |
AS_IF([test "$libpcre" = "yes"], [ |
| 92 |
|
AC_CHECK_HEADER(pcre.h, [AC_CHECK_LIB(pcre, pcre_study, |
| 93 |
|
[ |
| 94 |
|
LIBS="-lpcre $LIBS" |
| 95 |
|
AC_DEFINE(HAVE_LIBPCRE, 1, [Define to 1 if libpcre (-lpcre) is available.]) |
| 96 |
|
], libpcre=no) |
| 97 |
|
], libpcre=no) |
| 98 |
< |
fi |
| 98 |
> |
]) |
| 99 |
|
AM_CONDITIONAL(ENABLE_PCRE, [test "$libpcre" = yes]) |
| 100 |
|
|
| 101 |
|
|
| 105 |
|
--disable-openssl Disable OpenSSL support. ], |
| 106 |
|
[ cf_enable_openssl=$enableval ], |
| 107 |
|
[ cf_enable_openssl="auto" ]) |
| 108 |
< |
AC_MSG_CHECKING(for OpenSSL) |
| 108 |
> |
AC_MSG_CHECKING([for OpenSSL]) |
| 109 |
|
if test "$cf_enable_openssl" != "no"; then |
| 110 |
|
cf_openssl_basedir="" |
| 111 |
|
if test "$cf_enable_openssl" != "auto" && |
| 150 |
|
dnl we have a problem. |
| 151 |
|
if test ! -z "$cf_openssl_basedir"; then |
| 152 |
|
LIBS="-lcrypto -lssl $LIBS" |
| 153 |
< |
AC_MSG_RESULT($cf_openssl_basedir) |
| 153 |
> |
AC_MSG_RESULT([$cf_openssl_basedir]) |
| 154 |
|
cf_enable_openssl="yes" |
| 155 |
|
AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl]) |
| 156 |
|
else |
| 157 |
< |
AC_MSG_RESULT(not found. Please check your path.) |
| 157 |
> |
AC_MSG_RESULT([not found. Please check your path.]) |
| 158 |
|
cf_enable_openssl="no" |
| 159 |
|
fi |
| 160 |
|
unset cf_openssl_basedir |
| 161 |
|
else |
| 162 |
|
dnl If --disable-openssl was specified |
| 163 |
< |
AC_MSG_RESULT(disabled) |
| 163 |
> |
AC_MSG_RESULT([disabled]) |
| 164 |
|
fi |
| 165 |
|
AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes]) |
| 166 |
|
|
| 168 |
|
AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert], |
| 169 |
|
[Enable assert() statements]), |
| 170 |
|
[assert=$enableval], [assert=no]) |
| 171 |
< |
if test "$assert" = no; then |
| 172 |
< |
AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.]) |
| 173 |
< |
fi |
| 171 |
> |
|
| 172 |
> |
AS_IF([test "$assert" = "no"], |
| 173 |
> |
[AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])]) |
| 174 |
|
|
| 175 |
|
|
| 176 |
|
AC_ARG_ENABLE(small-net, AS_HELP_STRING([--enable-small-net], |