]> granicus.if.org Git - postgis/commitdiff
#250: Fix to get mingw to compile using conditional -lregex
authorRegina Obe <lr@pcorp.us>
Fri, 18 Sep 2009 14:10:55 +0000 (14:10 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 18 Sep 2009 14:10:55 +0000 (14:10 +0000)
Had to change configure.ac too so -lregex is not put in if its built-in.

git-svn-id: http://svn.osgeo.org/postgis/trunk@4511 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
liblwgeom/cunit/Makefile.in
postgis/Makefile.in

index c2370b5c7e9a1e23b467db83feb84b0c69ab5fbe..be1e796ec4ba13d7fe632a0d33b698b3ac117203 100644 (file)
@@ -536,8 +536,11 @@ CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS"
 dnl AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS])
 
 SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj"
+AC_CHECK_FUNCS(regexec, REGEX_LIBS= , [AC_CHECK_LIB(regex, regexec, REGEX_LIBS="$REGEX_LIBS -lregex")])
+
 AC_SUBST([SHLIB_LINK])
 dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK])
+AC_SUBST([REGEX_LIBS])
 
 dnl Output the relevant files
 AC_OUTPUT([liblwgeom/Makefile liblwgeom/cunit/Makefile postgis/Makefile postgis/sqldefines.h loader/Makefile topology/Makefile regress/Makefile doc/Makefile doc/html/image_src/Makefile])
index 0a052019111d0c4be15369984142425180930528..93a6343a1600a6605a9d4e0e40a5d9e7db003774 100644 (file)
@@ -13,7 +13,7 @@
 CC=@CC@
 CFLAGS=@CFLAGS@ @WARNFLAGS@
 
-CUNIT_LDFLAGS=@CUNIT_LDFLAGS@
+CUNIT_LDFLAGS=@CUNIT_LDFLAGS@ @REGEX_LIBS@
 CUNIT_CPPFLAGS=@CUNIT_CPPFLAGS@ -I..
 
 OBJS=  \
index fc66cbdd4259f1a8633b279232d13b60a327fb57..75fec41f13d4d0643d0efa453aabe9bc6f0deeb7 100644 (file)
@@ -62,7 +62,7 @@ OBJS=$(PG_OBJS)
 # older version of PostGIS, rather than with the static liblwgeom.a 
 # supplied with newer versions of PostGIS
 PG_CPPFLAGS+=@CPPFLAGS@ -I../liblwgeom
-SHLIB_LINK+=@SHLIB_LINK@ ../liblwgeom/liblwgeom.a
+SHLIB_LINK+=@SHLIB_LINK@ ../liblwgeom/liblwgeom.a @REGEX_LIBS@
 
 # Extra files to remove during 'make clean'
 EXTRA_CLEAN=$(SQL_OBJS)