summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2003-09-11 22:19:31 -0700
committerTim Rice <tim@multitalents.net>2003-09-11 22:19:31 -0700
commit1e1ef645661427c77a6bc3fd22aacabfade5f784 (patch)
tree321d23989021e833539251e479b695fa7209f810
parentc82afd5c8844c2cd5c411124fb077ca15dce6095 (diff)
[configure.ac] Move libgen tests to before libwrap to unbreak
UnixWare 2.03 using --with-tcp-wrappers.
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac84
2 files changed, 45 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index ce319f38..5215799f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
- (dtucker) [configure.ac] Bug #588, #615: Move other libgen tests to after
the dirname test, to allow a broken dirname to be detected correctly.
Based partially on patch supplied by alex.kiernan at thus.net. ok djm@
+ - (tim) [configure.ac] Move libgen tests to before libwrap to unbreak
+ UnixWare 2.03 using --with-tcp-wrappers.
20030910
- (dtucker) [configure.ac] Bug #636: Add support for Cray's new X1 machine.
@@ -1064,4 +1066,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
-$Id: ChangeLog,v 1.2979 2003/09/11 04:42:55 dtucker Exp $
+$Id: ChangeLog,v 1.2980 2003/09/12 05:19:31 tim Exp $
diff --git a/configure.ac b/configure.ac
index d5d6f546..ad0eedc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.150 2003/09/11 04:42:56 dtucker Exp $
+# $Id: configure.ac,v 1.151 2003/09/12 05:19:31 tim Exp $
AC_INIT
AC_CONFIG_SRCDIR([ssh.c])
@@ -463,6 +463,47 @@ if test "x$with_tcp_wrappers" != "xno" ; then
fi
fi
+dnl IRIX and Solaris 2.5.1 have dirname() in libgen
+AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
+ AC_CHECK_LIB(gen, dirname,[
+ AC_CACHE_CHECK([for broken dirname],
+ ac_cv_have_broken_dirname, [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lgen"
+ AC_TRY_RUN(
+ [
+#include <libgen.h>
+#include <string.h>
+
+int main(int argc, char **argv) {
+ char *s, buf[32];
+
+ strncpy(buf,"/etc", 32);
+ s = dirname(buf);
+ if (!s || strncmp(s, "/", 32) != 0) {
+ exit(1);
+ } else {
+ exit(0);
+ }
+}
+ ],
+ [ ac_cv_have_broken_dirname="no" ],
+ [ ac_cv_have_broken_dirname="yes" ]
+ )
+ LIBS="$save_LIBS"
+ ])
+ if test "x$ac_cv_have_broken_dirname" = "xno" ; then
+ LIBS="$LIBS -lgen"
+ AC_DEFINE(HAVE_DIRNAME)
+ AC_CHECK_HEADERS(libgen.h)
+ fi
+ ])
+])
+
+AC_CHECK_FUNC(getspnam, ,
+ AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
+AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
+
AC_ARG_WITH(rpath,
[ --without-rpath Disable auto-added -R linker paths],
[
@@ -685,47 +726,6 @@ AC_CHECK_DECL(tcsendbreak,
[#include <termios.h>]
)
-dnl IRIX and Solaris 2.5.1 have dirname() in libgen
-AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
- AC_CHECK_LIB(gen, dirname,[
- AC_CACHE_CHECK([for broken dirname],
- ac_cv_have_broken_dirname, [
- save_LIBS="$LIBS"
- LIBS="$LIBS -lgen"
- AC_TRY_RUN(
- [
-#include <libgen.h>
-#include <string.h>
-
-int main(int argc, char **argv) {
- char *s, buf[32];
-
- strncpy(buf,"/etc", 32);
- s = dirname(buf);
- if (!s || strncmp(s, "/", 32) != 0) {
- exit(1);
- } else {
- exit(0);
- }
-}
- ],
- [ ac_cv_have_broken_dirname="no" ],
- [ ac_cv_have_broken_dirname="yes" ]
- )
- LIBS="$save_LIBS"
- ])
- if test "x$ac_cv_have_broken_dirname" = "xno" ; then
- LIBS="$LIBS -lgen"
- AC_DEFINE(HAVE_DIRNAME)
- AC_CHECK_HEADERS(libgen.h)
- fi
- ])
-])
-
-AC_CHECK_FUNC(getspnam, ,
- AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
-AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
-
dnl Checks for time functions
AC_CHECK_FUNCS(gettimeofday time)
dnl Checks for utmp functions