From 74b60c5712f2a84904b95d008953c140a9bd5dd2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:49:50 +0200 Subject: Adding upstream version 2.9.4. Signed-off-by: Daniel Baumann --- m4/man-arg-automatic-create.m4 | 13 +++++++ m4/man-arg-automatic-update.m4 | 14 ++++++++ m4/man-arg-cache-owner.m4 | 31 ++++++++++++++++ m4/man-arg-cats.m4 | 14 ++++++++ m4/man-arg-config-file.m4 | 21 +++++++++++ m4/man-arg-db.m4 | 16 +++++++++ m4/man-arg-device.m4 | 15 ++++++++ m4/man-arg-mandirs.m4 | 32 +++++++++++++++++ m4/man-arg-manual.m4 | 13 +++++++ m4/man-arg-override-dir.m4 | 17 +++++++++ m4/man-arg-sections.m4 | 17 +++++++++ m4/man-arg-setuid.m4 | 32 +++++++++++++++++ m4/man-arg-systemdsystemunitdir.m4 | 24 +++++++++++++ m4/man-arg-systemdtmpfilesdir.m4 | 24 +++++++++++++ m4/man-arg-undoc.m4 | 17 +++++++++ m4/man-bdb.m4 | 52 +++++++++++++++++++++++++++ m4/man-check-progs.m4 | 19 ++++++++++ m4/man-compress-lib.m4 | 13 +++++++ m4/man-gnu-nroff.m4 | 24 +++++++++++++ m4/man-heirloom-nroff.m4 | 33 +++++++++++++++++ m4/man-libseccomp.m4 | 18 ++++++++++ m4/man-linguas.m4 | 72 ++++++++++++++++++++++++++++++++++++++ m4/man-po4a.m4 | 9 +++++ m4/man-tar-sort-name.m4 | 21 +++++++++++ m4/man-trans-subst.m4 | 12 +++++++ 25 files changed, 573 insertions(+) create mode 100644 m4/man-arg-automatic-create.m4 create mode 100644 m4/man-arg-automatic-update.m4 create mode 100644 m4/man-arg-cache-owner.m4 create mode 100644 m4/man-arg-cats.m4 create mode 100644 m4/man-arg-config-file.m4 create mode 100644 m4/man-arg-db.m4 create mode 100644 m4/man-arg-device.m4 create mode 100644 m4/man-arg-mandirs.m4 create mode 100644 m4/man-arg-manual.m4 create mode 100644 m4/man-arg-override-dir.m4 create mode 100644 m4/man-arg-sections.m4 create mode 100644 m4/man-arg-setuid.m4 create mode 100644 m4/man-arg-systemdsystemunitdir.m4 create mode 100644 m4/man-arg-systemdtmpfilesdir.m4 create mode 100644 m4/man-arg-undoc.m4 create mode 100644 m4/man-bdb.m4 create mode 100644 m4/man-check-progs.m4 create mode 100644 m4/man-compress-lib.m4 create mode 100644 m4/man-gnu-nroff.m4 create mode 100644 m4/man-heirloom-nroff.m4 create mode 100644 m4/man-libseccomp.m4 create mode 100644 m4/man-linguas.m4 create mode 100644 m4/man-po4a.m4 create mode 100644 m4/man-tar-sort-name.m4 create mode 100644 m4/man-trans-subst.m4 (limited to 'm4') diff --git a/m4/man-arg-automatic-create.m4 b/m4/man-arg-automatic-create.m4 new file mode 100644 index 0000000..599da2c --- /dev/null +++ b/m4/man-arg-automatic-create.m4 @@ -0,0 +1,13 @@ +# man-arg-automatic-create.m4 serial 1 +dnl MAN_ARG_AUTOMATIC_CREATE +dnl Add an --enable-automatic-create option. + +AC_DEFUN([MAN_ARG_AUTOMATIC_CREATE], +[ +AC_ARG_ENABLE([automatic-create], +[AS_HELP_STRING([--enable-automatic-create], [allow man to create user databases on the fly])], + [if test "$enableval" = "yes" + then + AC_DEFINE([MAN_DB_CREATES], [1], [Allow man to create user databases on the fly.]) + fi]) +]) diff --git a/m4/man-arg-automatic-update.m4 b/m4/man-arg-automatic-update.m4 new file mode 100644 index 0000000..2519bd7 --- /dev/null +++ b/m4/man-arg-automatic-update.m4 @@ -0,0 +1,14 @@ +# man-arg-automatic-update.m4 serial 1 +dnl MAN_ARG_AUTOMATIC_UPDATE +dnl Add a --disable-automatic-update option. + +AC_DEFUN([MAN_ARG_AUTOMATIC_UPDATE], +[ +AC_ARG_ENABLE([automatic-update], +[AS_HELP_STRING([--disable-automatic-update], [don't allow man to update databases on the fly])], + [if test "$enableval" = "yes" + then + AC_DEFINE([MAN_DB_UPDATES], [1], [Allow man to update databases on the fly.]) + fi], + [AC_DEFINE([MAN_DB_UPDATES], [1], [Allow man to update databases on the fly.])]) +]) diff --git a/m4/man-arg-cache-owner.m4 b/m4/man-arg-cache-owner.m4 new file mode 100644 index 0000000..eaffed0 --- /dev/null +++ b/m4/man-arg-cache-owner.m4 @@ -0,0 +1,31 @@ +# man-arg-cache-owner.m4 serial 2 +dnl MAN_ARG_CACHE_OWNER +dnl Add an --enable-cache-owner option. + +AC_DEFUN([MAN_ARG_CACHE_OWNER], +[ +AC_ARG_ENABLE([cache-owner], +[AS_HELP_STRING([--enable-cache-owner[=ARG]], [make system-wide cache files be owned by user ARG [arg=man]]) +AS_HELP_STRING([--disable-cache-owner], [don't constrain ownership of system-wide cache files])], + [if test "$enableval" = "yes" + then + enableval=man + fi + if test "$enableval" = "no" + then + man_owner= + cache_top_owner=root + AC_MSG_NOTICE([System-wide cache files will have unconstrained ownership]) + else + man_owner=$enableval + cache_top_owner=$enableval + AC_MSG_NOTICE([System-wide cache files will be owned by $enableval]) + AC_DEFINE_UNQUOTED([MAN_OWNER], ["$man_owner"], + [Define as the owner of system-wide cache files.]) + fi], + [man_owner=man + cache_top_owner=man + AC_DEFINE_UNQUOTED([MAN_OWNER], ["$man_owner"])]) +AC_SUBST([man_owner]) +AC_SUBST([cache_top_owner]) +]) diff --git a/m4/man-arg-cats.m4 b/m4/man-arg-cats.m4 new file mode 100644 index 0000000..e17bd7a --- /dev/null +++ b/m4/man-arg-cats.m4 @@ -0,0 +1,14 @@ +# man-arg-cats.m4 serial 1 +dnl MAN_ARG_CATS +dnl Add a --disable-cats option. + +AC_DEFUN([MAN_ARG_CATS], +[ +AC_ARG_ENABLE([cats], +[AS_HELP_STRING([--disable-cats], [don't allow man to create/update cat files])], + [if test "$enableval" = "yes" + then + AC_DEFINE([MAN_CATS], [1], [Allow man to create/update cat files.]) + fi], + [AC_DEFINE([MAN_CATS], [1], [Allow man to create/update cat files.])]) +]) diff --git a/m4/man-arg-config-file.m4 b/m4/man-arg-config-file.m4 new file mode 100644 index 0000000..41494af --- /dev/null +++ b/m4/man-arg-config-file.m4 @@ -0,0 +1,21 @@ +# man-arg-config-file.m4 serial 1 +dnl MAN_ARG_CONFIG_FILE +dnl Add a --with-config-file option. + +AC_DEFUN([MAN_ARG_CONFIG_FILE], +[ +AC_ARG_WITH([config-file], +[AS_HELP_STRING([--with-config-file=CF], [use config file CF [CF=SYSCONFDIR/man_db.conf]])], + [if test "$withval" = "yes" || test "$withval" = "no" + then + AC_MSG_ERROR([--with-config-file requires an argument]) + else + config_file=$withval + fi], + [: ${config_file=\$\{sysconfdir\}/man_db.conf}]) +config_file_basename=${config_file##*/} +config_file_dirname=`AS_DIRNAME(["$config_file"])` +AC_SUBST([config_file]) +AC_SUBST([config_file_basename]) +AC_SUBST([config_file_dirname]) +]) diff --git a/m4/man-arg-db.m4 b/m4/man-arg-db.m4 new file mode 100644 index 0000000..9b409bf --- /dev/null +++ b/m4/man-arg-db.m4 @@ -0,0 +1,16 @@ +# man-arg-db.m4 serial 1 +dnl MAN_ARG_DB +dnl Add a --with-db option. + +AC_DEFUN([MAN_ARG_DB], +[ +AC_ARG_WITH([db], +[AS_HELP_STRING([--with-db=LIBRARY], [use database library LIBRARY (db5, db4, db3, db2, db1, db, gdbm, ndbm)])], + [if test "$withval" = "yes" || test "$withval" = "no" + then + AC_MSG_ERROR([--with-db requires an argument]) + else + db=$withval + fi], + [: ${db=no}]) +]) diff --git a/m4/man-arg-device.m4 b/m4/man-arg-device.m4 new file mode 100644 index 0000000..7a82bb7 --- /dev/null +++ b/m4/man-arg-device.m4 @@ -0,0 +1,15 @@ +# man-arg-device.m4 serial 1 +dnl MAN_ARG_DEVICE +dnl Add a --with-device option. + +AC_DEFUN([MAN_ARG_DEVICE], +[ +AC_ARG_WITH([device], +[AS_HELP_STRING([--with-device=DEVICE], [use nroff with the output device DEVICE])], + [if test "$withval" = "yes" || test "$withval" = "no" + then + AC_MSG_ERROR([--with-device requires an argument]) + else + nroff_device=" -T$withval" + fi]) +]) diff --git a/m4/man-arg-mandirs.m4 b/m4/man-arg-mandirs.m4 new file mode 100644 index 0000000..927dcc2 --- /dev/null +++ b/m4/man-arg-mandirs.m4 @@ -0,0 +1,32 @@ +# man-arg-mandirs.m4 serial 1 +dnl MAN_ARG_MANDIRS +dnl Add an --enable-mandirs option. + +AC_DEFUN([MAN_ARG_MANDIRS], +[ +# Work out which manual page hierarchy scheme might be in use. +AC_ARG_ENABLE([mandirs], +[AS_HELP_STRING([--enable-mandirs=OS], [select manual page hierarchy organization (GNU, HPUX, IRIX, Solaris, BSD)])], + [AC_MSG_NOTICE([Using $enableval hierarchy organization(s)]) + AC_DEFINE_UNQUOTED([MANDIR_LAYOUT], ["$enableval"], + [Define to the manual page hierarchy organization(s) in use.]) + MANDIR_LAYOUT="$enableval"], + [case $host in + *-gnu) mandirs=GNU;; + *-hpux*) mandirs=HPUX;; + *-irix*) mandirs=IRIX;; + *-solaris*) mandirs=Solaris;; + *-*bsd*) mandirs=BSD;; + *) mandirs=;; + esac + if test -n "$mandirs"; then + AC_MSG_NOTICE([Using $mandirs hierarchy organization]) + AC_DEFINE_UNQUOTED([MANDIR_LAYOUT], ["$mandirs"]) + MANDIR_LAYOUT="$mandirs" + else + AC_MSG_NOTICE([Allowing any hierarchy organization]) + AC_DEFINE([MANDIR_LAYOUT], [""]) + MANDIR_LAYOUT= + fi]) +AC_SUBST([MANDIR_LAYOUT]) +]) diff --git a/m4/man-arg-manual.m4 b/m4/man-arg-manual.m4 new file mode 100644 index 0000000..a9c1d37 --- /dev/null +++ b/m4/man-arg-manual.m4 @@ -0,0 +1,13 @@ +# man-arg-manual.m4 serial 1 +dnl MAN_ARG_MANUAL +dnl Add a --disable-manual option. +dnl This may be useful when cross-compiling, or to reduce the installation +dnl size. + +AC_DEFUN([MAN_ARG_MANUAL], +[ +AC_ARG_ENABLE([manual], +[AS_HELP_STRING([--disable-manual], [don't build or install the man-db manual])], + [enable_manual="$enableval"], [enable_manual=yes]) +AM_CONDITIONAL([BUILD_MANUAL], [test "$enable_manual" = yes]) +]) diff --git a/m4/man-arg-override-dir.m4 b/m4/man-arg-override-dir.m4 new file mode 100644 index 0000000..6a94ec3 --- /dev/null +++ b/m4/man-arg-override-dir.m4 @@ -0,0 +1,17 @@ +# man-arg-override-dir.m4 serial 1 +dnl MAN_ARG_OVERRIDE_DIR +dnl Add an --enable-override-dir option. + +AC_DEFUN([MAN_ARG_OVERRIDE_DIR], +[ +AC_ARG_WITH([override-dir], +[AS_HELP_STRING([--with-override-dir=OVERRIDE], [use OVERRIDE as relative override dir inside the man path - the first directory to be searched when looking for man pages])], + [if test "$withval" = "yes" || test "$withval" = "no" + then + AC_MSG_ERROR([--with-override-dir requires an argument]) + else + override_dir=$withval + fi], + [: ${override_dir=""}]) +AC_SUBST([override_dir]) +]) diff --git a/m4/man-arg-sections.m4 b/m4/man-arg-sections.m4 new file mode 100644 index 0000000..6d97e6e --- /dev/null +++ b/m4/man-arg-sections.m4 @@ -0,0 +1,17 @@ +# man-arg-sections.m4 serial 2 +dnl MAN_ARG_SECTIONS +dnl Add a --with-sections option. + +AC_DEFUN([MAN_ARG_SECTIONS], +[ +AC_ARG_WITH([sections], +[AS_HELP_STRING([--with-sections=SECTIONS], [use manual page sections SECTIONS @<:@1 n l 8 3 0 2 5 4 9 6 7@:>@])], + [if test "$withval" = "yes" || test "$withval" = "no" + then + AC_MSG_ERROR([--with-sections requires an argument]) + else + sections="$withval" + fi], + [: ${sections=1 n l 8 3 0 2 5 4 9 6 7}]) +AC_SUBST([sections])dnl +]) diff --git a/m4/man-arg-setuid.m4 b/m4/man-arg-setuid.m4 new file mode 100644 index 0000000..2190541 --- /dev/null +++ b/m4/man-arg-setuid.m4 @@ -0,0 +1,32 @@ +# man-arg-setuid.m4 serial 3 +dnl MAN_ARG_SETUID +dnl Add an --enable-setuid option. + +AC_DEFUN([MAN_ARG_SETUID], +[ +AC_ARG_ENABLE([setuid], +[AS_HELP_STRING([--enable-setuid], [install man setuid]) +AS_HELP_STRING([--disable-setuid], [don't install man setuid])], + [if test "$enableval" = "yes" + then + if test -z "$man_owner" + then + AC_MSG_ERROR([--enable-setuid is incompatible with --disable-cache-owner]) + fi + man_mode="6755" + AC_MSG_NOTICE([Man will be installed setuid $man_owner]) + elif test "$enableval" = "no" + then + man_mode="755" + AC_MSG_NOTICE([Man will not be installed setuid]) + else + AC_MSG_ERROR([--enable-setuid=$enableval is no longer valid; consider --enable-cache-owner=$enableval --enable-setuid instead]) + fi], + [if test -z "$man_owner" + then + man_mode="755" + else + man_mode="6755" + fi]) +AC_SUBST([man_mode]) +]) diff --git a/m4/man-arg-systemdsystemunitdir.m4 b/m4/man-arg-systemdsystemunitdir.m4 new file mode 100644 index 0000000..3321414 --- /dev/null +++ b/m4/man-arg-systemdsystemunitdir.m4 @@ -0,0 +1,24 @@ +# man-arg-systemdsystemunitdir.m4 serial 3 +dnl MAN_ARG_SYSTEMDSYSTEMUNITDIR +dnl Add a --with-systemdsystemunitdir option. + +AC_DEFUN([MAN_ARG_SYSTEMDSYSTEMUNITDIR], +[ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_ARG_WITH([systemdsystemunitdir], +[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files (disable with "no")])], + [], [dnl + # The default is not prefix-sensitive, since systemd's prefix is not + # necessarily the same as man-db's. + case $host_os in + linux*) + m4_pushdef([AC_ARG_VAR])dnl No need for precious variable handling. + PKG_CHECK_VAR([with_systemdsystemunitdir], [systemd], [systemdsystemunitdir], + [], [with_systemdsystemunitdir=/lib/systemd/system]) + m4_popdef([AC_ARG_VAR]) + ;; + *) with_systemdsystemunitdir=no ;; + esac]) +AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) +AM_CONDITIONAL([INSTALL_SYSTEMD_TIMER], [test "$with_systemdsystemunitdir" != "no"]) +]) diff --git a/m4/man-arg-systemdtmpfilesdir.m4 b/m4/man-arg-systemdtmpfilesdir.m4 new file mode 100644 index 0000000..ae7195f --- /dev/null +++ b/m4/man-arg-systemdtmpfilesdir.m4 @@ -0,0 +1,24 @@ +# man-arg-systemdtmpfilesdir.m4 serial 4 +dnl MAN_ARG_SYSTEMDTMPFILESDIR +dnl Add a --with-systemdtmpfilesdir option. + +AC_DEFUN([MAN_ARG_SYSTEMDTMPFILESDIR], +[ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_ARG_WITH([systemdtmpfilesdir], +[AS_HELP_STRING([--with-systemdtmpfilesdir=DIR], [Directory for systemd tmpfiles configuration (disable with "no")])], + [], [dnl + # The default is not prefix-sensitive, since systemd's prefix is not + # necessarily the same as man-db's. + case $host_os in + linux*) + m4_pushdef([AC_ARG_VAR])dnl No need for precious variable handling. + PKG_CHECK_VAR([with_systemdtmpfilesdir], [systemd], [tmpfilesdir], + [], [with_systemdtmpfilesdir=/usr/lib/tmpfiles.d]) + m4_popdef([AC_ARG_VAR]) + ;; + *) with_systemdtmpfilesdir=no ;; + esac]) +AC_SUBST([systemdtmpfilesdir], [$with_systemdtmpfilesdir]) +AM_CONDITIONAL([INSTALL_SYSTEMD_TMPFILES], [test "$with_systemdtmpfilesdir" != "no"]) +]) diff --git a/m4/man-arg-undoc.m4 b/m4/man-arg-undoc.m4 new file mode 100644 index 0000000..6c5e8a7 --- /dev/null +++ b/m4/man-arg-undoc.m4 @@ -0,0 +1,17 @@ +# man-arg-undoc.m4 serial 1 +dnl MAN_ARG_UNDOC +dnl Add an --enable-undoc option. + +AC_DEFUN([MAN_ARG_UNDOC], +[ +AC_ARG_ENABLE([undoc], +[AS_HELP_STRING([--enable-undoc=COMMAND], [suggest COMMAND for missing manual pages])], + [if test "$enableval" = "yes" || test "$enableval" = "no" + then + AC_MSG_ERROR([--enable-undoc requires an argument]) + else + AC_MSG_NOTICE([Suggesting '$enableval' for missing manual pages]) + AC_DEFINE_UNQUOTED([UNDOC_COMMAND], ["$enableval"], + [Define as the name of a command you want to suggest when a non-existent page is requested.]) + fi]) +]) diff --git a/m4/man-bdb.m4 b/m4/man-bdb.m4 new file mode 100644 index 0000000..5e237bc --- /dev/null +++ b/m4/man-bdb.m4 @@ -0,0 +1,52 @@ +# man-bdb.m4 serial 4 +dnl MAN_CHECK_BDB(WITH-DB, HEADERS, LIBS, [ACTION-IF-FOUND]) +dnl Helper to check Berkeley DB linkage when particular header files and +dnl libraries are included. ACTION-IF-FOUND may contain $head and $lib. +dnl Contributed by Duncan Simpson and hacked into a +dnl macro by Colin Watson. + +AC_DEFUN([MAN_CHECK_BDB], [dnl +man_bdb_requested=no +for trydb in $1 +do + if test "$db" = "$trydb" + then + man_bdb_requested=yes + fi +done +if test "$db" = no || test "$man_bdb_requested" = yes +then + for head in $2 + do + AC_CHECK_HEADERS([$head], [got=yes], [got=no]) + if test "$got" = "yes" + then + for lib in $3 + do + AS_VAR_PUSHDEF([man_tr_bdb], [man_cv_bdb_header_${head}_lib_${lib}])dnl + man_saved_LIBS="$LIBS" + LIBS="$LIBS -l$lib" + AC_CACHE_CHECK([for dbopen from <${head}> in -l${lib}], man_tr_bdb, + [AC_TRY_LINK([#include <$head>], [dbopen("foo", 0, 0, 0, (void *) 0)], + [AS_VAR_SET([man_tr_bdb], [yes])], + [AS_VAR_SET([man_tr_bdb], [no])]) + ]) + AS_VAR_IF([man_tr_bdb], [yes], + [$4 + AC_DEFINE_UNQUOTED([BDB_H], [<$head>], + [Define if you have, and want to use, Berkeley database header files.]) + AC_DEFINE_UNQUOTED([BTREE], [1], + [Define if you have, and want to use, the Berkeley database library.]) + AC_SUBST([DBTYPE], [btree]) + DBLIBS="-l$lib" + db=yes], + [db=no]) + LIBS="$man_saved_LIBS" + AS_VAR_POPDEF([man_tr_bdb])dnl + test "$db" = "yes" && break + done + fi + test "$db" = "yes" && break + done +fi[]dnl +])# MAN_CHECK_BDB diff --git a/m4/man-check-progs.m4 b/m4/man-check-progs.m4 new file mode 100644 index 0000000..633943c --- /dev/null +++ b/m4/man-check-progs.m4 @@ -0,0 +1,19 @@ +# man-check-progs.m4 serial 3 +dnl MAN_CHECK_PROGS(VARIABLE, WITH-ARG, HELP-STRING, PROGS-TO-CHECK-FOR) +dnl Look for a program to use as VARIABLE. If --with-VARIABLE is given, then +dnl set VARIABLE to the path provided there (WITH-ARG and HELP-STRING are +dnl used for --help output). Otherwise, set VARIABLE to the first of +dnl PROGS-TO-CHECK-FOR on the path; if none of those is found, leave +dnl VARIABLE unchanged. +dnl If the program was found, define HAVE_WITH-ARG. +AC_DEFUN([MAN_CHECK_PROGS], +[AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1=$2], [$3])], + [AS_IF([test "$withval" = yes || test "$withval" = no], + [AC_MSG_ERROR([--with-$1 requires an argument])], + [AC_MSG_CHECKING([for $1]) + AC_MSG_RESULT([$withval]) + $1="$withval"])], + [AC_CHECK_PROGS([$1], [$4])]) +if test -n "$$1"; then + AC_DEFINE([HAVE_$2], [1], [Define if you have $1.]) +fi]) # MAN_CHECK_PROGS diff --git a/m4/man-compress-lib.m4 b/m4/man-compress-lib.m4 new file mode 100644 index 0000000..eedaadc --- /dev/null +++ b/m4/man-compress-lib.m4 @@ -0,0 +1,13 @@ +# man-compress-lib.m4 serial 1 +dnl MAN_COMPRESS_LIB(LIBRARY, FUNCTION) +dnl Look for FUNCTION in LIBRARY. If it is available, define HAVE_LIBLIBRARY +dnl and add -lLIBRARY to LIBCOMPRESS. +AC_DEFUN([MAN_COMPRESS_LIB], +[AC_CHECK_LIB( + [$1], [$2], + [AC_DEFINE_UNQUOTED( + AS_TR_CPP([HAVE_LIB$1]), [1], + [Define to 1 if you have the `$1' library (-l$1).]) + LIBCOMPRESS="-l$1 $LIBCOMPRESS"]) + AC_SUBST([LIBCOMPRESS]) +]) # MAN_COMPRESS_LIB diff --git a/m4/man-gnu-nroff.m4 b/m4/man-gnu-nroff.m4 new file mode 100644 index 0000000..9aab841 --- /dev/null +++ b/m4/man-gnu-nroff.m4 @@ -0,0 +1,24 @@ +# man-gnu-nroff.m4 serial 3 +dnl +dnl Check to see if nroff is GNU nroff, take nroff path as arg. +dnl +AC_DEFUN([MAN_PROG_GNU_NROFF], +[AC_MSG_CHECKING([whether nroff is GNU nroff]) + +AC_CACHE_VAL([man_cv_prog_gnu_nroff], + [if test `$1 </dev/null </dev/null <, 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([MAN_LINGUAS], +[ + AC_REQUIRE([AM_NLS])dnl + if test "$USE_NLS" = yes; then + # The LINGUAS file contains the set of available languages. + man_all_linguas= + if test -n "$srcdir/man/LINGUAS"; then + man_all_linguas=`sed -e "/^#/d" -e "s/#.*//" "$srcdir/man/LINGUAS"` + fi + if test -n "$PO4A" && test -n "$srcdir/man/LINGUAS.po4a"; then + man_all_linguas_po4a=`sed -e "/^#/d" -e "s/#.*//" "$srcdir/man/LINGUAS.po4a"` + man_all_linguas="$man_all_linguas $man_all_linguas_po4a" + fi + man_inst_linguas= + for presentlang in $man_all_linguas; do + useit=no + if test -n "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$man_all_linguas" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + man_inst_linguas="$man_inst_linguas $presentlang" + fi + done + if test -n "$PO4A"; then + MAN_SUBDIRS="po4a $man_inst_linguas" + else + MAN_SUBDIRS="$man_inst_linguas" + fi + else + MAN_SUBDIRS= + fi + AC_SUBST([MAN_SUBDIRS]) +]) # MAN_LINGUAS diff --git a/m4/man-po4a.m4 b/m4/man-po4a.m4 new file mode 100644 index 0000000..68217a9 --- /dev/null +++ b/m4/man-po4a.m4 @@ -0,0 +1,9 @@ +# man-po4a.m4 serial 2 +dnl MAN_PO4A +dnl Detect the presence of po4a. + +AC_DEFUN([MAN_PO4A], +[AC_CHECK_PROGS([PO4A], [po4a]) + AC_SUBST([PO4A]) + AM_CONDITIONAL([PO4A], [test -n "$PO4A"]) +]) # MAN_PO4A diff --git a/m4/man-tar-sort-name.m4 b/m4/man-tar-sort-name.m4 new file mode 100644 index 0000000..00a3cab --- /dev/null +++ b/m4/man-tar-sort-name.m4 @@ -0,0 +1,21 @@ +# man-tar-sort-name.m4 serial 1 +dnl MAN_TAR_SORT_NAME +dnl Use the --sort=name option of GNU tar if it is available. +dnl Note that this only works with Automake's default tar-v7 option. + +AC_DEFUN([MAN_TAR_SORT_NAME], +[ +AC_BEFORE([AM_INIT_AUTOMAKE], [$0]) +AC_MSG_CHECKING([if tar --sort=name works]) +rm -rf conftest.dir +mkdir conftest.dir +echo GrepMe > conftest.dir/file +AM_RUN_LOG([${TAR-tar} chof - conftest.dir --sort=name >conftest.tar]) +if test -s conftest.tar; then + AC_MSG_RESULT([yes]) + am__tar="$am__tar --sort=name" +else + AC_MSG_RESULT([no]) +fi +rm -rf conftest.dir +]) diff --git a/m4/man-trans-subst.m4 b/m4/man-trans-subst.m4 new file mode 100644 index 0000000..6a073ac --- /dev/null +++ b/m4/man-trans-subst.m4 @@ -0,0 +1,12 @@ +# man-trans-subst.m4 serial 3 +dnl MAN_TRANS_SUBST(PROGRAM-NAME) +dnl Define and substitute a shell variable TRANS_PROG to the transformed +dnl version of PROGRAM-NAME, where PROG is PROGRAM-NAME converted to upper +dnl case. +dnl Also define and substitute an upper-case variant TRANS_PROG_UPPER. +AC_DEFUN([MAN_TRANS_SUBST], +[man_transformed=`echo "$1" | sed "$program_transform_name"` + man_transformed_upper=`echo "$man_transformed" | LC_ALL=C tr '[a-z]' '[A-Z]'` + AC_SUBST(AS_TR_CPP([TRANS_$1]), [$man_transformed]) + AC_SUBST(AS_TR_CPP([TRANS_$1_UPPER]), [$man_transformed_upper]) +]) # MAN_TRANS_SUBST -- cgit v1.2.3