[PATCH]: Fix configure.ac to allow linking against PCRE on Cygwin

Tim Rice tim at multitalents.net
Fri Nov 23 14:12:40 EST 2001


On Thu, 22 Nov 2001, Corinna Vinschen wrote:

> Hi,
>
> the current configure.ac file contains an unfortunately static
> setting of $LIBS when the host system is Cygwin.  It always
> adds -lregex to $LIBS before the --with-pcre setting is evaluated.
> The later adding of -lpcreposix -lpcre doesn't work correctly
> since it follows later in the link order.
>
> +case "$host" in
> +*-*-cygwin*)
I'd rather not see another case $host
Please try this patch and see if it solves your problem
--------------------< cut >--------------------
--- configure.ac.old	Sat Nov  3 11:09:33 2001
+++ configure.ac	Thu Nov 22 18:43:51 2001
@@ -65,7 +65,7 @@
 	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)
@@ -409,7 +409,10 @@
 				LIBS="$LIBS -lpcreposix -lpcre"
 			],
 			[
+				AC_CHECK_LIB(regex, regcomp, LIBS="$LIBS -lregex",
+			[
 				AC_MSG_ERROR([*** No regex library found.])
+				])
 			])
 		]
 	)
--------------------< end cut >--------------------

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net





More information about the openssh-unix-dev mailing list