configure.ac: Define DEPENDS_ON_LIBINTL if LIBINTL is nonempty.
[pspp-builds.git] / configure.ac
index a3a07a87e07816848ffd8f9c8416e20a8d9913ee..5ad33fee463609f1f00003b069f9afdb47a4bd65 100644 (file)
@@ -32,12 +32,14 @@ PSPP_CC_FOR_BUILD
 PSPP_PERL
 
 dnl Internationalization macros.
-AC_ARG_ENABLE(nls, [AS_HELP_STRING([--disable-nls], [do not use Native Language Support])])
-if  test x"$enable_nls" != x"no"  ; then
- AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.])
+AC_PROVIDE([AM_PO_SUBDIRS])    # PSPP provides its own po/ support.
+AM_GNU_GETTEXT([external], [need-ngettext])
+AM_GNU_GETTEXT_VERSION([0.17])
+if test -n "$LIBINTL"; then
+  AC_DEFINE([DEPENDS_ON_LIBINTL], [1], 
+    [Define to 1 if libintl is a separate library, not integrated into libc])
 fi
 
-
 dnl Checks for libraries.
 AC_SYS_LARGEFILE
 AC_SEARCH_LIBS([sin], [m])
@@ -190,7 +192,13 @@ if test x"$with_gui_tools" = x"yes" ; then
 fi
 AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes")
 
-AM_CONDITIONAL(WITH_PERL_MODULE, test x"$cross_compiling" != x"yes")
+if test x"$cross_compiling" != x"yes"; then
+   WITH_PERL_MODULE=yes
+else
+   WITH_PERL_MODULE=no
+fi     
+AC_SUBST([WITH_PERL_MODULE])
+AM_CONDITIONAL(WITH_PERL_MODULE, test $WITH_PERL_MODULE = yes)
 
 AC_SEARCH_LIBS([cblas_dsdot], [gslcblas],,[PSPP_REQUIRED_PREREQ([libgslcblas])])
 AC_SEARCH_LIBS([gsl_cdf_binomial_P], [gsl],,[PSPP_REQUIRED_PREREQ([libgsl (version 1.8 or later)])])
@@ -272,7 +280,8 @@ RELOCATABLE_STRIP=:
 
 PSPP_CHECK_PREREQS
 
-AC_CONFIG_FILES([Makefile gl/Makefile tests/atlocal perl-module/lib/PSPP.pm])
+AC_CONFIG_FILES(
+  [Makefile gl/Makefile po/Makefile tests/atlocal perl-module/lib/PSPP.pm])
 
 AC_OUTPUT
 echo "PSPP configured successfully."