summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2001-11-26 17:19:43 -0800
committerTim Rice <tim@multitalents.net>2001-11-26 17:19:43 -0800
commitfe1d100ffdf3595f3aaddc02efbf0b49a265d90c (patch)
treeb2657508f6c2bec9b1912d6dc8d881895572db37 /configure.ac
parentf7c6f95682684856db063d104be88a6e3b22a828 (diff)
[contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c,
openbsd-compat/bsd-cygwin_util.h, openbsd-compat/daemon.c] Allow SSHD to install as service under WIndows 9x/Me [configure.ac] Fix to allow linking against PCRE on Cygwin Patches by Corinna Vinschen <vinschen@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 35 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index e1844eb5..d86a2062 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.4 2001/11/03 19:09:33 tim Exp $
+# $Id: configure.ac,v 1.5 2001/11/27 01:19:43 tim Exp $
AC_INIT
AC_CONFIG_SRCDIR([ssh.c])
@@ -65,7 +65,7 @@ case "$host" in
AC_DEFINE(DISABLE_LASTLOG)
;;
*-*-cygwin*)
- LIBS="$LIBS -lregex /usr/lib/textmode.o"
+ LIBS="$LIBS /usr/lib/textmode.o"
AC_DEFINE(HAVE_CYGWIN)
AC_DEFINE(USE_PIPES)
AC_DEFINE(DISABLE_SHADOW)
@@ -401,18 +401,43 @@ AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first
# We don't want to check if we did an pcre override.
if test -z "$no_comp_check" ; then
AC_CHECK_FUNC(regcomp,
- [ AC_DEFINE(HAVE_REGCOMP)],
[
- AC_CHECK_LIB(pcre, pcre_info,
+ AC_CHECK_FUNC(regsub,
+ [
+ has_regcomp=no
+ ],
+ [
+ AC_DEFINE(HAVE_REGCOMP)
+ has_regcomp=yes
+ ]
+ )
+ ],
+ [
+ has_regcomp=no
+ ]
+ )
+ # Either regcomp wasn't defined or regsub is defined (which means
+ # that the libc regex is probably an old non-POSIX implementation.
+ # Now check for -lregex and -lpcreposix to find some usable regex
+ # implementation.
+ if test "$has_regcomp" = "no" ; then
+ AC_CHECK_LIB(regex, regcomp,
[
- AC_DEFINE(HAVE_LIBPCRE)
- LIBS="$LIBS -lpcreposix -lpcre"
+ AC_DEFINE(HAVE_REGCOMP)
+ LIBS="$LIBS -lregex"
],
[
- AC_MSG_ERROR([*** No regex library found.])
- ])
- ]
- )
+ AC_CHECK_LIB(pcre, pcre_info,
+ [
+ AC_DEFINE(HAVE_LIBPCRE)
+ LIBS="$LIBS -lpcreposix -lpcre"
+ ],
+ [
+ AC_MSG_ERROR([*** No regex library found.])
+ ])
+ ]
+ )
+ fi
fi
dnl UnixWare 2.x