From dbcdf19fb7646bccd551913ce02d20405253fe68 Mon Sep 17 00:00:00 2001 From: ayers Date: Sun, 16 May 2004 19:24:27 +0000 Subject: [PATCH] * config.mak.in: Replace LIBWRAP with AUX_LIBS so that they will be included in gsweb.make makefile fragment. * configure.ac: Fine tune check to test whether we need libnsl. * GSWeb.framework/gsweb.gsdoc: Remove obsolete documentation of libwrap realted build option. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@19355 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 +++ GSWeb.framework/gsweb.gsdoc | 4 -- config.mak.in | 2 +- configure | 99 +++++++++++++++++++++++++++++++++++-- configure.ac | 31 ++++++++++-- 5 files changed, 131 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab165fd..7f3563d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,12 @@ * GSWeb.framework/GSWSession.m, * GSWeb.framework/GSWTemplateParser.m: Do not initialize va_list with NULL. + + * config.mak.in: Replace LIBWRAP with AUX_LIBS so that they will + be included in gsweb.make makefile fragment. + * configure.ac: Fine tune check to test whether we need libnsl. + * GSWeb.framework/gsweb.gsdoc: Remove obsolete documentation of + libwrap realted build option. 2004-05-14 Manuel Guesdon diff --git a/GSWeb.framework/gsweb.gsdoc b/GSWeb.framework/gsweb.gsdoc index 1a807d1..0815cea 100644 --- a/GSWeb.framework/gsweb.gsdoc +++ b/GSWeb.framework/gsweb.gsdoc @@ -25,10 +25,6 @@ Use GNUstepWeb with gdl2 library - LIBWRAP=yes - - Link with tcpd_libwrap (you know: hosts.deny, hosts.allow and this kind of things) - GSWDEBUG_DEEP=yes Activate deep debug features (works only if debug=yes is set) diff --git a/config.mak.in b/config.mak.in index 1ead576..d43c9cb 100644 --- a/config.mak.in +++ b/config.mak.in @@ -3,7 +3,7 @@ # DYNAMIC_LINKER=simple GDL2=@GDL2@ -LIBWRAP=@LIBWRAP@ +AUX_LIBS=@AUX_LIBS@ #EOControl dependancy ifeq ($(GDL2),yes) diff --git a/configure b/configure index ddda669..a30fb69 100755 --- a/configure +++ b/configure @@ -1212,6 +1212,7 @@ fi #-------------------------------------------------------------------- # Check for libwrap #-------------------------------------------------------------------- +saved_LIBS="$LIBS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2027,15 +2028,107 @@ else fi if test "$wrap_ok" = yes; then - AUX_LIBS="$AUX_LIBS -lwrap" - USE_LIBWRAP=1 - cat >>confdefs.h <<\_ACEOF + LIBS="-lwrap" + echo -n "checking whether libnsl is needed... " + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + int allow_severity, deny_severity; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +struct request_info *request; hosts_access(request); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + need_nsl=no +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +need_nsl=yes +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + echo $need_nsl + if test "$need_nsl" = yes; then + LIBS="$LIBS -lnsl"; + echo -n "checking whether -lwrap and -lnsl work... " + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + int allow_severity, deny_severity; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +struct request_info *request; hosts_access(request); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + need_nsl=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +need_nsl=error +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$need_nsl" = error; then + echo -n " libwrap seems unusable even with libnsl! :" + wrap_ok=no + fi + echo $need_nsl + fi + + if test "$wrap_ok" = yes; then + AUX_LIBS="$AUX_LIBS $LIBS" + HAVE_LIBWRAP=1 + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBWRAP 1 _ACEOF + fi fi LIBWRAP=$wrap_ok +LIBS="$saved_LIBS" #-------------------------------------------------------------------- # Check recent libxml for XML parser diff --git a/configure.ac b/configure.ac index 1384123..8ee3269 100644 --- a/configure.ac +++ b/configure.ac @@ -56,13 +56,38 @@ AC_SUBST(GDL2) #-------------------------------------------------------------------- # Check for libwrap #-------------------------------------------------------------------- +saved_LIBS="$LIBS" AC_CHECK_LIB(wrap, main, wrap_ok=yes, wrap_ok=no) if test "$wrap_ok" = yes; then - AUX_LIBS="$AUX_LIBS -lwrap" - USE_LIBWRAP=1 - AC_DEFINE(HAVE_LIBWRAP) + LIBS="-lwrap" + echo -n "checking whether libnsl is needed... " + AC_TRY_LINK([#include + int allow_severity, deny_severity;], + [struct request_info *request; hosts_access(request);], + need_nsl=no, need_nsl=yes) + echo $need_nsl + if test "$need_nsl" = yes; then + LIBS="$LIBS -lnsl"; + echo -n "checking whether -lwrap and -lnsl work... " + AC_TRY_LINK([#include + int allow_severity, deny_severity;], + [struct request_info *request; hosts_access(request);], + need_nsl=yes,need_nsl=error) + if test "$need_nsl" = error; then + echo -n " libwrap seems unusable even with libnsl! :" + wrap_ok=no + fi + echo $need_nsl + fi + + if test "$wrap_ok" = yes; then + AUX_LIBS="$AUX_LIBS $LIBS" + HAVE_LIBWRAP=1 + AC_DEFINE(HAVE_LIBWRAP) + fi fi AC_SUBST(LIBWRAP,$wrap_ok) +LIBS="$saved_LIBS" #-------------------------------------------------------------------- # Check recent libxml for XML parser