]> granicus.if.org Git - postgis/commitdiff
Enable configure to accept the additional parameter --with-gettext=no to disable...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sat, 14 Jan 2012 00:49:05 +0000 (00:49 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sat, 14 Jan 2012 00:49:05 +0000 (00:49 +0000)
This makes it possible to explicitly disable builds at configure time if required for
platforms where this causes problems such as Windows (see bug #748).

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

configure.ac

index eb3258b87a1a1569a2848c06f126823c7873d957..faa69dceb583eadfb799b828c35820dccec07272 100644 (file)
@@ -539,23 +539,26 @@ GETTEXT_LDFLAGS=""
 
 AC_ARG_WITH([gettext], 
        [AS_HELP_STRING([--with-gettext=PATH], [specify a path to non-default gettext installation])], 
-       [GETTEXT_PATH="$withval"], [GETTEXT_PATH=""])
+       [GETTEXT_PATH="$withval"], [GETTEXT_PATH="yes"])
 
 LDFLAGS_SAVE="$LDFLAGS"
 CFLAGS_SAVE="$CFLAGS"
 
-if test "x$GETTEXT_PATH" != "x"; then
-       AC_MSG_RESULT([checking user-specified gettext location: $GETTEXT_PATH])
-       GETTEXT_CFLAGS="-I$GETTEXT_PATH/include"
-       GETTEXT_LDFLAGS="-L$GETTEXT_PATH/lib"
-       LDFLAGS="$GETTEXT_LDFLAGS $LDFLAGS"
-       CFLAGS="$GETTEXT_CFLAGS $CFLAGS"
-fi
+if test "x$GETTEXT_PATH" != "xno"; then
+       dnl If user has specified a custom gettext installation path, use it.
+       if test "x$GETTEXT_PATH" != "xyes"; then
+               AC_MSG_RESULT([checking user-specified gettext location: $GETTEXT_PATH])
+               GETTEXT_CFLAGS="-I$GETTEXT_PATH/include"
+               GETTEXT_LDFLAGS="-L$GETTEXT_PATH/lib"
+               LDFLAGS="$GETTEXT_LDFLAGS $LDFLAGS"
+               CFLAGS="$GETTEXT_CFLAGS $CFLAGS"
+       fi
 
-AM_GNU_GETTEXT([external], [], [])
+       AM_GNU_GETTEXT([external], [], [])
 
-if test "x$LIBINTL" = "x"; then
-       USE_NLS=no
+       if test "x$LIBINTL" = "x"; then
+               USE_NLS=no
+       fi
 fi
 
 AC_SUBST([GETTEXT_CFLAGS])