about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configure.ng13
-rw-r--r--doc/Makefile.am4
-rw-r--r--src/portab/portabtest.c2
3 files changed, 15 insertions, 4 deletions
diff --git a/configure.ng b/configure.ng
index 0b0a6588..1e141c9f 100644
--- a/configure.ng
+++ b/configure.ng
@@ -66,6 +66,7 @@ AC_PROG_AWK
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
+AC_PROG_MKDIR_P
 AC_PROG_RANLIB
 
 # -- Compiler Features --
@@ -466,8 +467,12 @@ AC_ARG_WITH(tcp-wrappers,
 				LDFLAGS="-L$withval/lib $LDFLAGS"
 			fi
 			AC_MSG_CHECKING(for hosts_access)
+			saved_LIBS="$LIBS"
 			LIBS="-lwrap $LIBS"
+			LIBS_END="-lwrap $LIBS_END"
 			AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/socket.h>
 #include <tcpd.h>
 int allow_severity = 0;
 int deny_severity = 0;
@@ -481,6 +486,7 @@ int deny_severity = 0;
 				AC_MSG_RESULT(no)
 				AC_MSG_ERROR([Can't enable TCP wrappers!])
 			])
+			LIBS="$saved_LIBS"
 		fi
 	]
 )
@@ -636,9 +642,12 @@ AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
 AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
 AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
 
-# Add additional CFLAGS, eventually specified on the command line, but after
-# running this configure script. Useful for "-Werror" for example.
+# Add additional CFLAGS, LDFLAGS and LIBS which were specified on the command
+# line or by some tests from above, but after running this script. Useful for
+# adding "-Werror", for example:
 test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
+test -n "$LDFLAGS_END" && LDFLAGS="$LDFLAGS $LDFLAGS_END"
+test -n "$LIBS_END" && LIBS="$LIBS $LIBS_END"
 
 # -- Generate files --
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 04f74b60..27942dd3 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -54,11 +54,11 @@ maintainer-clean-local:
 all: $(generated_docs)
 
 install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
-	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
+	$(MKDIR_P) -m 755 $(DESTDIR)$(sysconfdir)
 	@if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
 	  make install-config; \
 	 fi
-	$(mkinstalldirs) $(DESTDIR)$(docdir)
+	$(MKDIR_P) -m 755 $(DESTDIR)$(docdir)
 	for f in $(static_docs) $(toplevel_docs); do \
 	  $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
 	 done
diff --git a/src/portab/portabtest.c b/src/portab/portabtest.c
index b104739e..3602feec 100644
--- a/src/portab/portabtest.c
+++ b/src/portab/portabtest.c
@@ -24,6 +24,8 @@
 
 #include "exp.h"
 
+int allow_severity = 0, deny_severity = 0;
+
 static void
 Panic(char *Reason)
 {