diff options
author | Brendan O'Dea <bod@debian.org> | 2009-10-30 13:38:53 +1100 |
---|---|---|
committer | Brendan O'Dea <bod@debian.org> | 2009-10-30 13:38:53 +1100 |
commit | 900447205a0aae44e47c840983c83cd225efa498 (patch) | |
tree | 9f8308eda13b126c10210ba0273ebb6f6da1b511 /configure.in | |
parent | 1428471944f2239f32774414a305fba7bb82749d (diff) | |
download | help2man-900447205a0aae44e47c840983c83cd225efa498.tar.gz |
select a reasonable configure default for --enable-nls
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/configure.in b/configure.in index d3e91a1..f403133 100644 --- a/configure.in +++ b/configure.in @@ -1,30 +1,39 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(help2man.PL) -AC_PROG_PERL(5.005) -test -z "$PERL" && AC_MSG_ERROR([perl 5.005 required]) +AC_PROG_PERL(5.008) +test -z "$PERL" && AC_MSG_ERROR([perl 5.8 required]) + +AC_PERL_MODULE(Locale::gettext) +AC_PATH_PROG(MSGFMT, msgfmt) + +AC_PROG_CC +AC_SEARCH_LIBS(dlsym, dl) + +AC_MSG_CHECKING([for pre-loadable libintl]) +preload=`LD_PRELOAD="preloadable_libintl.so" sh -c 'echo yes' 2>/dev/null` +AC_MSG_RESULT(${preload:=no}) + +nls_default=yes +test "$ac_cv_module_Locale__gettext" = no && nls_default=no +test -z "$MSGFMT" && nls_default=no +test "$preload" = no && nls_default=no AC_ARG_ENABLE([nls], AC_HELP_STRING([--enable-nls], - [enable support for generating localised pages (default is YES)]), - [ac_cv_enable_nls=$enableval], [ac_cv_enable_nls=yes]) + [enable support for generating localised pages]), + [ac_cv_enable_nls=$enableval], [ac_cv_enable_nls=$nls_default]) AC_SUBST(extra_make_all, '') AC_SUBST(extra_make_install, '') if test "$ac_cv_enable_nls" = yes then - AC_PROG_CC - AC_SEARCH_LIBS(dlsym, dl) - AC_PERL_MODULE(Locale::gettext) + # note: the following tests should match what is used to set nls_default above test "$ac_cv_module_Locale__gettext" = no && AC_MSG_ERROR([perl module Locale::gettext required]) - AC_PATH_PROG(MSGFMT, msgfmt) test -z "$MSGFMT" && AC_MSG_ERROR([gettext required]) - AC_MSG_CHECKING([for pre-loadable libintl]) - preload=`LD_PRELOAD="preloadable_libintl.so" sh -c 'echo yes' 2>/dev/null` - AC_MSG_RESULT(${preload:=no}) - test "$preload" = no && \ + test "$preload" = no && AC_MSG_ERROR([libpreloadable_libintl.so required (gettext 0.12+)]) extra_make_all='preload man_l10n' |