configure changes
Dave Dykstra
dwd at bell-labs.com
Wed Oct 24 04:13:36 EST 2001
On Sun, Oct 21, 2001 at 06:24:49PM -0700, Tim Rice wrote:
...
> I have added a test for broken dirname() on Solaris 2.5.1 by
> Dan Astoorian <djast at cs.toronto.edu>. Dan please test.
I tested it and found 3 problems:
1. -lgen was not being passed to the test program.
2. the wrong variable $ac_cv_have_getopt_optreset was being tested,
should have been ac_cv_have_broken_dirname
3. Can't define HAVE_LIBGEN_H because openbsd-compat/dirname.h defines
the parameter with "const" but Solaris 2.5.1 libgen.h defines
it without.
Patch is below. I tested on Solaris 2.5.1 where it properly detected the
broken dirname and on Irix 6.2 where it found a working dirname in -lgen.
- Dave Dykstra
--- configure.in.O Tue Oct 23 12:57:41 2001
+++ configure.in Tue Oct 23 13:49:48 2001
@@ -430,7 +430,7 @@
# Checks for header files.
AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
- getopt.h glob.h lastlog.h libgen.h limits.h login.h \
+ getopt.h glob.h lastlog.h limits.h login.h \
login_cap.h maillock.h netdb.h netgroup.h \
netinet/in_systm.h paths.h poll.h pty.h regex.h \
security/pam_appl.h shadow.h stddef.h stdint.h \
@@ -584,6 +584,8 @@
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>
@@ -604,10 +606,12 @@
[ ac_cv_have_broken_dirname="no" ],
[ ac_cv_have_broken_dirname="yes" ]
)
+ LIBS="$save_LIBS"
])
- if test "x$ac_cv_have_getopt_optreset" = "xno" ; then
+ if test "x$ac_cv_have_broken_dirname" = "xno" ; then
LIBS="$LIBS -lgen"
AC_DEFINE(HAVE_DIRNAME)
+ AC_CHECK_HEADERS(libgen.h)
fi
])
])
More information about the openssh-unix-dev
mailing list