1 dnl Process this file with autoconf to produce a configure script.
3 # Copyright (C) 2012 Free Software Foundation, Inc.
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.
10 dnl Written by Brendan O'Dea <bod@debian.org>
12 AC_INIT([GNU help2man], m4_esyscmd_s([./help2man.PL --version]),
13 [bug-help2man@gnu.org])
15 AC_CONFIG_SRCDIR([help2man.PL])
18 test -z "$PERL" && AC_MSG_ERROR([perl 5.8 required])
20 AC_PERL_MODULE(Locale::gettext)
21 AC_PATH_PROG(MSGFMT, msgfmt)
24 AC_SEARCH_LIBS(dlsym, dl)
25 AC_SEARCH_LIBS(bindtextdomain, intl)
28 test "x$ac_cv_module_Locale__gettext" = xno && nls_default=no
29 test -z "$MSGFMT" && nls_default=no
30 test "x$ac_cv_search_dlsym" = xno && nls_default=no
31 test "x$ac_cv_search_bindtextdomain" = xno && nls_default=no
33 AC_ARG_ENABLE([nls], AC_HELP_STRING([--enable-nls],
34 [enable support for generating localised pages]),
35 [ac_cv_enable_nls=$enableval], [ac_cv_enable_nls=$nls_default])
37 AC_SUBST(extra_make_all, '')
38 AC_SUBST(extra_make_install, '')
39 AC_SUBST(extra_extract_args, '')
40 if test "$ac_cv_enable_nls" = yes
42 # note: the following tests should match what is used to set nls_default above
43 test "x$ac_cv_module_Locale__gettext" = xno &&
44 AC_MSG_ERROR([perl module Locale::gettext required])
46 test -z "$MSGFMT" && AC_MSG_ERROR([gettext required])
48 test "x$ac_cv_search_dlsym" = xno &&
49 AC_MSG_ERROR([dlsym() required])
51 test "x$ac_cv_search_bindtextdomain" = xno &&
52 AC_MSG_ERROR([bindtextdomain() required])
54 extra_make_all='preload man_l10n'
55 extra_make_install='install_preload install_l10n'
56 extra_extract_args='--with-gettext'
60 AC_PATH_PROG(MAKEINFO, makeinfo, :)
61 AC_PATH_PROG(INSTALL_INFO, install-info, :)
63 AC_CONFIG_FILES([Makefile])