1dnl Process this file with autoconf to produce a configure script. 2 3# Copyright (C) 2012, 2014 Free Software Foundation, Inc. 4 5# Copying and distribution of this file, with or without modification, 6# are permitted in any medium without royalty provided the copyright 7# notice and this notice are preserved. This file is offered as-is, 8# without any warranty. 9 10dnl Written by Brendan O'Dea <bod@debian.org> 11 12AC_INIT([GNU help2man], m4_esyscmd_s([./help2man.PL --version]), 13 [bug-help2man@gnu.org]) 14 15AC_CONFIG_SRCDIR(help2man.PL) 16AC_CONFIG_AUX_DIR([build-aux]) 17AC_SUBST(auxdir, $ac_aux_dir) 18 19LOCAL_PROG_PERL(5.008) 20test -z "$PERL" && AC_MSG_ERROR([perl 5.8 required]) 21 22LOCAL_PERL_MODULE(Locale::gettext) 23AC_PATH_PROG(MSGFMT, msgfmt) 24 25AC_PROG_CC 26AC_SEARCH_LIBS(dlsym, dl) 27AC_SEARCH_LIBS(bindtextdomain, intl) 28 29nls_default=yes 30test "x$ac_cv_module_Locale__gettext" = xno && nls_default=no 31test -z "$MSGFMT" && nls_default=no 32test "x$ac_cv_search_dlsym" = xno && nls_default=no 33test "x$ac_cv_search_bindtextdomain" = xno && nls_default=no 34 35AC_ARG_ENABLE([nls], AC_HELP_STRING([--enable-nls], 36 [enable support for generating localised pages]), 37 [ac_cv_enable_nls=$enableval], [ac_cv_enable_nls=$nls_default]) 38 39AC_SUBST(extra_make_all, '') 40AC_SUBST(extra_make_install, '') 41AC_SUBST(extra_extract_args, '') 42if test "$ac_cv_enable_nls" = yes 43then 44 # note: the following tests should match what is used to set nls_default above 45 test "x$ac_cv_module_Locale__gettext" = xno && 46 AC_MSG_ERROR([perl module Locale::gettext required]) 47 48 test -z "$MSGFMT" && AC_MSG_ERROR([gettext required]) 49 50 test "x$ac_cv_search_dlsym" = xno && 51 AC_MSG_ERROR([dlsym() required]) 52 53 test "x$ac_cv_search_bindtextdomain" = xno && 54 AC_MSG_ERROR([bindtextdomain() required]) 55 56 extra_make_all='preload man_l10n info_l10n' 57 extra_make_install='install_preload install_l10n' 58 extra_extract_args='--with-gettext' 59fi 60 61AC_PROG_INSTALL 62LOCAL_PROG_OR_MISSING(makeinfo) 63LOCAL_PROG_OR_MISSING(install-info) 64LOCAL_PROG_OR_MISSING(msgmerge) 65LOCAL_PROG_OR_MISSING(xgettext) 66LOCAL_PROG_OR_MISSING(po4a-updatepo) 67LOCAL_PROG_OR_MISSING(po4a-translate) 68 69AC_CONFIG_FILES([Makefile]) 70AC_OUTPUT 71