aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac136
1 files changed, 75 insertions, 61 deletions
diff --git a/configure.ac b/configure.ac
index 40e76cf..cd1de55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl configure.ac -*- autoconf-*-
dnl
dnl This file is part of GNU Anubis.
-dnl Copyright (C) 2001-2014 The Anubis Team.
+dnl Copyright (C) 2001-2024 The Anubis Team.
dnl
dnl GNU Anubis is free software; you can redistribute it and/or modify it
dnl under the terms of the GNU General Public License as published by the
@@ -18,34 +18,63 @@ dnl with GNU Anubis. If not, see <http://www.gnu.org/licenses/>.
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([GNU Anubis], [4.1.92], [bug-anubis@gnu.org])
-AC_PREREQ([2.63])
+AC_PREREQ([2.64])
+AC_INIT([GNU Anubis], [4.3], [bug-anubis@gnu.org])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_SRCDIR([src/main.c])
-AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-bzip2 std-options silent-rules])
-AC_GNU_SOURCE
+AM_INIT_AUTOMAKE([1.16 gnits tar-ustar dist-bzip2 std-options silent-rules subdir-objects])
+AC_USE_SYSTEM_EXTENSIONS
dnl Enable silent rules by default:
AM_SILENT_RULES([yes])
dnl Checks for programs.
AC_PROG_CC
-gl_EARLY
AC_PROG_YACC
-AM_PROG_LEX
-AC_PATH_PROG(idecrypt_path,idecrypt,/usr/sbin/idecrypt,
-$PATH:/sbin:/usr/sbin:/usr/local/sbin)
-AC_DEFINE_UNQUOTED(IDECRYPT_PATH,"${idecrypt_path}",
-[Define if IDECRYPT_PATH is present.])
-
-dnl Checks for header files.
-AC_HEADER_STDC
+AC_PROG_LEX([noyywrap])
+AC_PROG_RANLIB
+
+# *********************************************************************
+# GPG v2 (for the testsuite)
+# The testsuite needs to create GPG keys, which would be prohibitively
+# slow without the %transient-key statement, which appeared in GPG 2.1
+# *********************************************************************
+AC_ARG_VAR([GPG],[Name of the gpg version 2 binary])
+AC_MSG_CHECKING([for the GPG v2 binary])
+uGPG=$GPG
+unset GPG
+gpgver() {
+ GPG_VERSION_STRING=$($1 --version|head -n 1|sed -e 's/.* //')
+ oIFS=$IFS
+ IFS="."
+ set -- $GPG_VERSION_STRING
+ GPG_VERSION_MAJOR=$1
+ GPG_VERSION_MINOR=$2
+ IFS=$oIFS
+}
+for prog in $uGPG gpg2 gpg
+do
+ gpgver $prog
+ if test -n "$GPG_VERSION_MAJOR" -a -n "$GPG_VERSION_MINOR"; then
+ if test $GPG_VERSION_MAJOR -eq 2; then
+ if test $GPG_VERSION_MINOR -ge 1; then
+ GPG=$prog
+ break
+ fi
+ elif test $GPG_VERSION_MAJOR -gt 2; then
+ GPG=$prog
+ break
+ fi
+ fi
+done
+AC_MSG_RESULT([${GPG:-none}${GPG:+, $GPG_VERSION_STRING}])
+AM_CONDITIONAL([COND_GPG2],[test -n "$GPG"])
+
AC_TYPE_SIZE_T
AC_TYPE_PID_T
-AC_TYPE_SIGNAL
AC_CHECK_TYPE(u_char, unsigned char)
-AC_CHECK_HEADERS(arpa/inet.h sys/types.h sys/socket.h socket.h locale.h)
+AC_CHECK_HEADERS(arpa/inet.h sys/types.h sys/socket.h socket.h locale.h sysexits.h)
AC_CHECK_TYPE([socklen_t], ,
[AC_DEFINE_UNQUOTED([socklen_t], [int], [Type to use instead of socklen_t, if <sys/types.h> does not define])],
@@ -62,24 +91,19 @@ AC_CHECK_TYPE([socklen_t], ,
])
dnl Checks for library functions.
-gl_INIT
-
AC_CHECK_FUNCS(getrlimit setrlimit socketpair)
AC_CHECK_FUNCS(setegid setregid setresgid seteuid setreuid)
AC_CHECK_FUNCS(daemon putenv)
-AC_FUNC_SETVBUF_REVERSED
-AH_BOTTOM([
-#if defined (SETVBUF_REVERSED)
-# define SETVBUF(str,buf,mode,size) setvbuf(str,mode,buf,size)
-#else
-# define SETVBUF(str,buf,mode,size) setvbuf(str,buf,mode,size)
-#endif
-])
-
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, gethostbyaddr)
+AM_PATH_LIBGCRYPT([1.7.0], [status_gcrypt=yes], [status_gcrypt=no])
+AM_CONDITIONAL([GCRYPT_COND], [test "$status_gcrypt" = yes])
+if test "$status_gcrypt" = yes; then
+ AC_DEFINE([USE_GCRYPT], [1], [Define if using libgcrypt])
+fi
+
AC_SUBST(ADD_INCLUDES)
case $build in
*-apple-darwin*)
@@ -88,26 +112,25 @@ esac
dnl Internationalization macros.
AM_GNU_GETTEXT([external], [need-formatstring-macros])
-AM_GNU_GETTEXT_VERSION([0.16])
+AM_GNU_GETTEXT_VERSION([0.21])
+
+IMPRIMATUR_INIT(doc/imprimatur)
-AC_SUBST([M4_DEFS])
AC_SUBST([GUILE_SCRIPTS])
-GINT_INIT([gint],[1.8 with-guile nodoc std-site-dir],
+GINT_INIT([gint],[2.2.0 with-guile nodoc std-site-dir],
[useguile=yes
AC_DEFINE(WITH_GUILE,1,[Enable Guile support])
- GUILE_SCRIPTS='$(GUILE_SCM)'
- M4_DEFS="$M4_DEFS -DWITH_GUILE"],
+ GUILE_SCRIPTS='$(GUILE_SCM)'],
[useguile=no])
if test "$useguile" = "no"; then
AC_MSG_RESULT([Disabling GUILE support...])
fi
+AM_CONDITIONAL([GUILE_COND], [test "$useguile" = "yes"])
dnl Use option --without-gpgme to NOT compile GnuPG (GPGME library) support.
-AC_SUBST(ANUBIS_GPGFILES)
AC_ARG_WITH(gpgme,
- AC_HELP_STRING([--without-gpgme],
- [without GnuPG (GPGME library) support]),
+ AS_HELP_STRING([--without-gpgme],[without GnuPG (GPGME library) support]),
[with_gpgme=${withval}],
[with_gpgme=yes])
if test "$with_gpgme" = "no"; then
@@ -120,7 +143,6 @@ fi
if test "$with_gpgme" = "no"; then
AC_MSG_RESULT([Disabling GPGME support...])
else
- AC_PATH_PROG(GPG, gpg)
findgpgmedir() { :
if test -f "$1/include/gpgme.h"; then
gpgmedir=1
@@ -139,9 +161,8 @@ else
else
AC_CHECK_HEADERS(gpgme.h)
fi
- ANUBIS_GPGFILES='$(GPGFILES)'
- M4_DEFS="$M4_DEFS -DWITH_GPG"
fi
+AM_CONDITIONAL([GPG_COND],[test "$with_gpgme" = "yes"])
AC_SUBST(GSASL_LIBS)
AC_CHECK_LIB(resolv, res_query)
@@ -155,8 +176,7 @@ AC_SUBST(ANUBIS_BIN_ADM)
dnl Use option --enable-gcc-debug to enable GCC debug code.
AC_ARG_ENABLE(gcc-debug,
- AC_HELP_STRING([--enable-gcc-debug],
- [enable GCC DEBUG code]),
+ AS_HELP_STRING([--enable-gcc-debug],[enable GCC DEBUG code]),
[enable_gcc_debug=yes],
[enable_gcc_debug=no])
if test "$enable_gcc_debug" = "yes" && (test "$GCC" = "yes"); then
@@ -177,7 +197,6 @@ MU_CHECK_GSASL(0.2.3, [
AC_MSG_RESULT([Enabling GSASL support...])
ANUBIS_SBIN_ADM='$(adm_sbin_programs)'
ANUBIS_BIN_ADM='$(adm_bin_programs)'
- M4_DEFS="$M4_DEFS -DWITH_GSASL"
AC_CHECK_LIB(gdbm, gdbm_open,
[WITH_GDBM=yes
@@ -186,8 +205,7 @@ MU_CHECK_GSASL(0.2.3, [
[AC_MSG_RESULT([Disabling GDBM support...])])
AC_ARG_WITH(mysql,
- AC_HELP_STRING([--with-mysql],
- [Configure to work with MySQL]),
+ AS_HELP_STRING([--with-mysql],[Configure to work with MySQL]),
[case $withval in
yes) USE_SQL=0
ANUBIS_CHECK_LIB(mysqlclient,
@@ -215,8 +233,7 @@ MU_CHECK_GSASL(0.2.3, [
esac])
AC_ARG_WITH(postgres,
- AC_HELP_STRING([--with-postgres],
- [Configure to work with Postgres]),
+ AS_HELP_STRING([--with-postgres],[Configure to work with Postgres]),
[case $withval in
yes) USE_SQL=0
ANUBIS_CHECK_LIB(pq,
@@ -246,16 +263,17 @@ MU_CHECK_GSASL(0.2.3, [
fi
AC_LIBOBJ(lbuf)])
+AM_CONDITIONAL([GSASL_COND],[test "$WITH_GSASL" = yes])
+AM_CONDITIONAL([GDBM_COND],[test "$WITH_GDBM" = yes])
ANUBIS_CHECK_TLS([
- M4_DEFS="$M4_DEFS -DWITH_SSL -DWITH_GNUTLS"
AC_DEFINE(USE_GNUTLS, 1, [Define to 1 if USE_GNUTLS is requested.])])
AM_CONDITIONAL([TLS_COND], [test $anubis_cv_gnutls = yes])
+AC_PATH_PROG([CERTTOOL],[certtool])
dnl Use option --with-socks-proxy to compile SOCKS v4/5 proxy support.
AC_ARG_WITH(socks-proxy,
- AC_HELP_STRING([--with-socks-proxy],
- [with SOCKS v4/5 proxy support]),
+ AS_HELP_STRING([--with-socks-proxy],[with SOCKS v4/5 proxy support]),
[with_socks_proxy=${withval}],
[with_socks_proxy=no])
if test "$with_socks_proxy" = "yes"; then
@@ -265,8 +283,7 @@ fi
dnl Use option --with-pcre to compile PCRE library support.
AC_ARG_WITH(pcre,
- AC_HELP_STRING([--with-pcre],
- [with PCRE library support]),
+ AS_HELP_STRING([--with-pcre],[with PCRE library support]),
[with_pcre=${withval}],
[with_pcre=no])
if test "$with_pcre" = "yes"; then
@@ -279,8 +296,7 @@ fi
dnl Use option --with-pam to compile PAM support.
AC_ARG_WITH(pam,
- AC_HELP_STRING([--with-pam],
- [with Pluggable Authentication Modules support]),
+ AS_HELP_STRING([--with-pam],[with Pluggable Authentication Modules support]),
[with_pam=${withval}],
[with_pam=no])
if test "$with_pam" = "yes"; then
@@ -294,8 +310,7 @@ fi
dnl Use option --with-tcp-wrappers to compile libwrap library support.
AC_ARG_WITH(tcp-wrappers,
- AC_HELP_STRING([--with-tcp-wrappers],
- [with libwrap (TCP wrappers) support]),
+ AS_HELP_STRING([--with-tcp-wrappers],[with libwrap (TCP wrappers) support]),
[with_tcp_wrappers=${withval}],
[with_tcp_wrappers=no])
if test "$with_tcp_wrappers" = "yes"; then
@@ -309,8 +324,7 @@ fi
dnl Use option --with-unprivileged-user
AC_ARG_WITH(unprivileged-user,
- AC_HELP_STRING([--with-unprivileged-user=USER],
- [set an unprivileged user (default is "nobody")]))
+ AS_HELP_STRING([--with-unprivileged-user=USER],[set an unprivileged user (default is "nobody")]))
if test -z "$with_unprivileged_user"; then
with_unprivileged_user="nobody"
fi
@@ -366,7 +380,6 @@ with_unprivileged_user=$with_unprivileged_user])
AC_CONFIG_FILES([Makefile
build/Makefile
- build/guile-1.6/Makefile
contrib/Makefile
gint/Makefile
doc/Makefile
@@ -374,13 +387,14 @@ AC_CONFIG_FILES([Makefile
examples/Makefile
examples/pam/Makefile
guile/Makefile
- lib/Makefile
po/Makefile.in
scripts/Makefile
src/Makefile
- testsuite/Makefile
- testsuite/data/Makefile
- testsuite/etc/Makefile
])
+# Initialize the test suite.
+AC_CONFIG_TESTDIR(tests)
+AC_CONFIG_FILES([tests/Makefile tests/atlocal])
+AM_MISSING_PROG([AUTOM4TE], [autom4te])
+
AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.