[postgis-commits] svn - r3494 - in trunk: . liblwgeom/cunit

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Mon Jan 5 12:54:13 PST 2009


Author: mcayland
Date: 2009-01-05 12:54:12 -0800 (Mon, 05 Jan 2009)
New Revision: 3494

Modified:
   trunk/configure.ac
   trunk/liblwgeom/cunit/Makefile.in
Log:
Allow CPPFLAGS/LDFLAGS parameters from the command line to be passed into the CUnit Makefile, since CUnit is the only dependency that cannot determine its own flags using a --with-X parameter. This allows CUnit to be installed in a non-standard location if required.


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2009-01-05 14:44:41 UTC (rev 3493)
+++ trunk/configure.ac	2009-01-05 20:54:12 UTC (rev 3494)
@@ -157,15 +157,22 @@
 dnl
 dnl Detect CUnit if it is installed (used for unit testing)
 dnl
+dnl Note that we pass any specified CPPFLAGS and LDFLAGS into the Makefile as CUnit is
+dnl the only compile-time dependency that cannot obtain any specialised flags using
+dnl a --with-X parameter, and so we allow this information to be passed in if
+dnl required.
+dnl
 
 CUNIT_LDFLAGS=""
 AC_CHECK_HEADER([CUnit/CUnit.h], [
-	AC_CHECK_LIB([cunit], [CU_initialize_registry], [CUNIT_LDFLAGS=-lcunit], [AC_MSG_WARN([could not locate CUnit required for liblwgeom unit tests])])
+	CUNIT_CPPFLAGS="$CPPFLAGS"
+	AC_CHECK_LIB([cunit], [CU_initialize_registry], [CUNIT_LDFLAGS="$LDFLAGS -lcunit"], [AC_MSG_WARN([could not locate CUnit required for liblwgeom unit tests])])
 	],
 	[
 	AC_MSG_WARN([could not locate CUnit required for liblwgeom unit tests])
 	])
 	
+AC_SUBST([CUNIT_CPPFLAGS])
 AC_SUBST([CUNIT_LDFLAGS])
 
 

Modified: trunk/liblwgeom/cunit/Makefile.in
===================================================================
--- trunk/liblwgeom/cunit/Makefile.in	2009-01-05 14:44:41 UTC (rev 3493)
+++ trunk/liblwgeom/cunit/Makefile.in	2009-01-05 20:54:12 UTC (rev 3494)
@@ -14,7 +14,7 @@
 CFLAGS=@CFLAGS@ @WARNFLAGS@
 
 CUNIT_LDFLAGS=@CUNIT_LDFLAGS@
-CUNIT_CPPFLAGS=-I..
+CUNIT_CPPFLAGS=@CUNIT_CPPFLAGS@ -I..
 
 OBJS=	cu_tester.o \
 	cu_algorithm.o



More information about the postgis-commits mailing list