From fe1d100ffdf3595f3aaddc02efbf0b49a265d90c Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Mon, 26 Nov 2001 17:19:43 -0800 Subject: [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 --- configure.ac | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) (limited to 'configure.ac') 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 -- cgit v1.2.3