From 30301827f7e306d6c24e6464312ea77462d18411 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Sat, 14 Jan 2012 00:49:05 +0000 Subject: [PATCH] Enable configure to accept the additional parameter --with-gettext=no to disable NLS builds. 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 | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index eb3258b87..faa69dceb 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) -- 2.40.0