From 2303a21b2918bd9851af9998274aa0b310c15ab8 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Tue, 6 Nov 2012 12:10:06 +0000 Subject: [PATCH] Fix typo that meant --with-ascend-binary=yes didn't set WITH_ASCEND_BINDARY Use autoconf to set WITH_TCP value, and write WITH_TCP to autoconf.h (and therefore features.h) Write WITH_THREADS to autoconf.h (and therefore features.h) --- configure | 38 +++++++++++++++++++++++++++++++++----- configure.in | 28 +++++++++++++++++++++++----- src/include/libradius.h | 4 ---- 3 files changed, 56 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 42f58bf081f..81bfead24f6 100755 --- a/configure +++ b/configure @@ -776,6 +776,7 @@ with_radacctdir with_raddbdir with_ascend_binary with_threads +with_tcp with_vmps with_dhcp with_static_modules @@ -1439,6 +1440,7 @@ Optional Packages: --with-raddbdir=DIR Directory for config files SYSCONFDIR/raddb --with-ascend-binary Include support for Ascend binary filter attributes (default=yes) --with-threads Use threads, if available. (default=yes) + --with-tcp Compile in TCP support. (default=yes) --with-vmps Compile in VMPS support. (default=yes) --with-dhcp Compile in DHCP support. (default=yes) --with-static-modules=QUOTED-MODULE-LIST @@ -15365,14 +15367,14 @@ if test "${with_ascend_binary+set}" = set; then : yes) ;; *) - WITH_ASCEND_BINARY="" + WITH_ASCEND_BINARY=no esac fi -if test "X$WITH_ASCEND_BINARY" = "Xyes"; then +if test "x$WITH_ASCEND_BINARY" = "xyes"; then -$as_echo "#define WITH_ASCEND_BINARY /**/" >>confdefs.h +$as_echo "#define WITH_ASCEND_BINARY 1" >>confdefs.h fi @@ -15384,12 +15386,31 @@ if test "${with_threads+set}" = set; then : yes) ;; *) - WITH_THREADS="" + WITH_THREADS=no esac fi +WITH_TCP=yes + +# Check whether --with-tcp was given. +if test "${with_tcp+set}" = set; then : + withval=$with_tcp; case "$withval" in + yes) + ;; + *) + WITH_TCP=no + esac + +fi + +if test "x$WITH_TCP" = "xyes"; then + +$as_echo "#define WITH_TCP 1" >>confdefs.h + +fi + WITH_VMPS=yes # Check whether --with-vmps was given. @@ -15428,7 +15449,6 @@ $as_echo "#define WITH_DHCP 1" >>confdefs.h fi - STATIC_MODULES= # Check whether --with-static_modules was given. @@ -16063,6 +16083,12 @@ fi fi +if test "x$WITH_THEADS" = "xyes"; then + +$as_echo "#define WITH_THREADS 1" >>confdefs.h + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -18439,6 +18465,8 @@ $as_echo "top_builddir=$top_builddir" >&6; } + + mysubdirs="" if test "x$EXPERIMENTAL" = "xyes"; then bar=`ls -1 "${srcdir}"/src/modules/rlm_*/configure | sed 's%/configure%%'` diff --git a/configure.in b/configure.in index 7f26156090d..b2adc7517a4 100644 --- a/configure.in +++ b/configure.in @@ -273,11 +273,11 @@ AC_ARG_WITH(ascend-binary, yes) ;; *) - WITH_ASCEND_BINARY="" + WITH_ASCEND_BINARY=no esac ] ) -if test "X$WITH_ASCEND_BINARY" = "Xyes"; then - AC_DEFINE(WITH_ASCEND_BINARY, [], [Include support for Ascend binary filter attributes]) +if test "x$WITH_ASCEND_BINARY" = "xyes"; then + AC_DEFINE(WITH_ASCEND_BINARY, [1], [Include support for Ascend binary filter attributes]) fi dnl extra argument: --with-threads @@ -288,10 +288,25 @@ AC_ARG_WITH(threads, yes) ;; *) - WITH_THREADS="" + WITH_THREADS=no esac ] ) +dnl extra argument: --with-tcp +WITH_TCP=yes +AC_ARG_WITH(tcp, +[ --with-tcp Compile in TCP support. (default=yes)], +[ case "$withval" in + yes) + ;; + *) + WITH_TCP=no + esac ] +) +if test "x$WITH_TCP" = "xyes"; then + AC_DEFINE(WITH_TCP, [1], [define if you want TCP support (For RADSec et al)]) +fi + dnl extra argument: --with-vmps WITH_VMPS=yes AC_ARG_WITH(vmps, @@ -322,7 +337,6 @@ if test "x$WITH_DHCP" = "xyes"; then AC_DEFINE(WITH_DHCP, [1], [define if you want DHCP support]) fi - dnl # dnl # Allow the user to specify a list of modules to be linked dnl # statically to the server. @@ -547,6 +561,10 @@ else ) fi +if test "x$WITH_THEADS" = "xyes"; then + AC_DEFINE(WITH_THREADS, [1], [define if you want thread support]) +fi + dnl Check if we need -lsocket AC_CHECK_LIB(dl, dlopen) diff --git a/src/include/libradius.h b/src/include/libradius.h index 2744bb6d67f..79919728383 100644 --- a/src/include/libradius.h +++ b/src/include/libradius.h @@ -68,10 +68,6 @@ RCSIDH(libradius_h, "$Id$") #include #include -#ifndef WITHOUT_TCP -#define WITH_TCP (1) -#endif - #ifdef __cplusplus extern "C" { #endif -- 2.47.3