configure.in fixes for 2.9.9p2
openssh-unix-dev at thewrittenword.com
openssh-unix-dev at thewrittenword.com
Sat Sep 29 13:48:55 EST 2001
configure.in patches for 2.9.9p2:
1. Allow --with-pcre to take a path specifying the root of the
PCRE install (ROOT/include, ROOT/lib)
2. Ditto for --with-zlib
3. $no_libnsl and $no_libsocket can be determined programmatically
4. Check for innetgr, getspnam, and util in the default $LIBS before
checking in -lrpc, -lgen, and -lutil, respectively
5. dirname() is in -lgen on some systems (Solaris 2.5.1, IRIX)
--
albert chin (china at thewrittenword.com)
-- snip snip
--- configure.in.orig Thu Sep 27 01:16:56 2001
+++ configure.in Thu Sep 27 10:11:04 2001
@@ -320,34 +308,59 @@
)
AC_ARG_WITH(pcre,
- [ --with-pcre Override built in regex library with pcre],
+ [ --with-pcre[[=PATH]] Override built in regex library with pcre
+ (optionally in PATH)],
[
+ case "$withval" in
+ no) ;;
+ *)
+ if test "x$withval" != "xyes"; then
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LDFLAGS="${LDFLAGS} -L$withval/lib"
+ fi
- AC_CHECK_LIB(pcre, pcre_info,
- [
- AC_DEFINE(HAVE_LIBPCRE)
- LIBS="$LIBS -lpcreposix -lpcre"
- no_comp_check="yes"
- ],
- [ AC_MSG_ERROR([*** Can not locate pcre libraries.]) ]
- )
+ AC_CHECK_HEADER(pcreposix.h,
+ AC_CHECK_LIB(pcre, pcre_info,[
+ AC_DEFINE(HAVE_LIBPCRE)
+ LIBS="$LIBS -lpcreposix -lpcre"
+ no_comp_check=yes],
+ AC_MSG_ERROR([*** unable to locate pcre library ***])),
+ AC_MSG_ERROR([*** unable to locate pcreposix.h include file ***]))
+ ;;
+ esac
]
)
# Checks for libraries.
-if test -z "$no_libnsl" ; then
- AC_CHECK_LIB(nsl, yp_match, , )
-fi
-if test -z "$no_libsocket" ; then
- AC_CHECK_LIB(socket, main, , )
-fi
+AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
+AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
dnl SCO OS3 needs this for libwrap
-AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
+AC_CHECK_FUNC(innetgr, ,
+ AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc))
+
+AC_CHECK_FUNC(getspnam, ,
+ AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
+AC_CHECK_FUNC(login, ,
+ AC_CHECK_LIB(util, login,
+ AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil"))
+
+dnl zlib is required
+AC_ARG_WITH(zlib,
+ [ --with-zlib=PATH Use zlib in PATH],
+ [
+ if test -d "$withval"; then
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LDFLAGS="${LDFLAGS} -L$withval/lib"
+ fi
+ ]
+)
+
+AC_CHECK_HEADER(zlib.h,
+ AC_CHECK_LIB(z, gzread, ,
+ AC_MSG_ERROR([*** zlib missing. install first or check config.log ***])),
+ AC_MSG_ERROR([*** zlib missing. install first or check config.log ***]))
-AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")
-AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
-AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
# We don't want to check if we did an pcre override.
if test -z "$no_comp_check" ; then
@@ -481,7 +494,14 @@
)
dnl Checks for library functions.
-AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock dirname fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup waitpid _getpty __b64_ntop)
+AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup waitpid _getpty __b64_ntop)
+
+dnl IRIX and Solaris 2.5.1 have dirname() in libgen
+AC_CHECK_FUNCS(dirname, ,[
+ AC_CHECK_LIB(gen, dirname,[
+ LIBS="$LIBS -lgen"
+ AC_DEFINE(HAVE_DIRNAME)])])
+
dnl Checks for time functions
AC_CHECK_FUNCS(gettimeofday time)
dnl Checks for libutil functions
More information about the openssh-unix-dev
mailing list