From: Ben Pfaff Date: Sat, 24 Apr 2010 18:32:44 +0000 (-0700) Subject: perl-module: Add --without-perl-module configure flag. X-Git-Tag: v0.7.5~49 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f7864559d1e334f1c3b37d02cce0b9c9830d8e7;p=pspp-builds.git perl-module: Add --without-perl-module configure flag. The built Perl module is not useful for cross-compilation. By default it is disabled for cross-compilation, but cross-compilation to Mingw32 is not always detected as cross-compilation (since some Linux systems can run Windows binaries directly, via Wine), so this option helps in such cases. Reported by Michel Boaventura . --- diff --git a/INSTALL b/INSTALL index e45f5875..6654e90b 100644 --- a/INSTALL +++ b/INSTALL @@ -237,6 +237,10 @@ Optional Features In these cases you can use --without-lib{xx} to force configure to disregard it. +`--without-perl-module' + Disable building the Perl module, in case it does not build properly + or you do not need it. + `--enable-anachronistic-dependencies' If you use this option, some of the checks for dependent libraries will be relaxed, permitting configure to succeed when older versions diff --git a/configure.ac b/configure.ac index 7ba69097..40626e80 100644 --- a/configure.ac +++ b/configure.ac @@ -222,11 +222,19 @@ if test x"$with_gui_tools" = x"yes" ; then fi AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes") -if test x"$cross_compiling" != x"yes"; then - WITH_PERL_MODULE=yes -else - WITH_PERL_MODULE=no -fi +AC_ARG_WITH( + [perl-module], + [AS_HELP_STRING([--without-perl-module], [do not build the Perl module])], + [case $with_perl_module in # ( + yes|no) ;; # ( + *) AC_MSG_FAILURE([--with-perl-module argument must be 'yes' or 'no']) ;; + esac + WITH_PERL_MODULE=$with_perl_module], + [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)