Accept --with-sfcgal with no arguments as a valid way to enable it
authorSandro Santilli <strk@keybit.net>
Mon, 26 Oct 2015 08:33:57 +0000 (08:33 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 26 Oct 2015 08:33:57 +0000 (08:33 +0000)
Closes #3348

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

configure.ac

index 1a7adcb1a3df6fe9fc55d106f929ac6e62237595..81170fa292934bcc67fdb67944593a5347034723 100644 (file)
@@ -664,11 +664,14 @@ dnl ===========================================================================
 AC_ARG_WITH([sfcgal], 
        [AS_HELP_STRING([--with-sfcgal=PATH], [Add SFCGAL support. ARG allows to specify an alternate PATH to sfcgal-config])], 
        [SFCGAL_CONFIG="$withval"], 
-       [AC_PATH_PROG([SFCGAL_CONFIG], [sfcgal-config], [])])
+       [with_sfcgal=yes])
 
 HAVE_SFCGAL="no"
 
 if test "x$with_sfcgal" != "xno"; then
+  if test "x$with_sfcgal" = "xyes"; then
+         AC_PATH_PROG([SFCGAL_CONFIG], [sfcgal-config], [])
+  fi
        if test -x "$SFCGAL_CONFIG"; then
                SFCGAL_VERSION=`$SFCGAL_CONFIG --version` || AC_MSG_ERROR([cannot determine sfcgal version (tried with $SFCGAL_CONFIG --version)])
                SFCGAL_LDFLAGS=`$SFCGAL_CONFIG --libs`