diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:16:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:16:24 +0000 |
commit | 9221dca64f0c8b5de72727491e41cf63e902eaab (patch) | |
tree | d8cbbf520eb4b5c656a54b2e36947008dcb751ad /m4 | |
parent | Initial commit. (diff) | |
download | man-db-9221dca64f0c8b5de72727491e41cf63e902eaab.tar.xz man-db-9221dca64f0c8b5de72727491e41cf63e902eaab.zip |
Adding upstream version 2.8.5.upstream/2.8.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/man-arg-automatic-create.m4 | 13 | ||||
-rw-r--r-- | m4/man-arg-automatic-update.m4 | 14 | ||||
-rw-r--r-- | m4/man-arg-cache-owner.m4 | 31 | ||||
-rw-r--r-- | m4/man-arg-cats.m4 | 14 | ||||
-rw-r--r-- | m4/man-arg-config-file.m4 | 21 | ||||
-rw-r--r-- | m4/man-arg-db.m4 | 16 | ||||
-rw-r--r-- | m4/man-arg-device.m4 | 15 | ||||
-rw-r--r-- | m4/man-arg-mandirs.m4 | 32 | ||||
-rw-r--r-- | m4/man-arg-override-dir.m4 | 17 | ||||
-rw-r--r-- | m4/man-arg-sections.m4 | 17 | ||||
-rw-r--r-- | m4/man-arg-setuid.m4 | 32 | ||||
-rw-r--r-- | m4/man-arg-systemdsystemunitdir.m4 | 18 | ||||
-rw-r--r-- | m4/man-arg-systemdtmpfilesdir.m4 | 18 | ||||
-rw-r--r-- | m4/man-arg-undoc.m4 | 17 | ||||
-rw-r--r-- | m4/man-bdb.m4 | 52 | ||||
-rw-r--r-- | m4/man-check-progs.m4 | 19 | ||||
-rw-r--r-- | m4/man-compress-lib.m4 | 13 | ||||
-rw-r--r-- | m4/man-gnu-nroff.m4 | 24 | ||||
-rw-r--r-- | m4/man-heirloom-nroff.m4 | 33 | ||||
-rw-r--r-- | m4/man-libseccomp.m4 | 18 | ||||
-rw-r--r-- | m4/man-linguas.m4 | 72 | ||||
-rw-r--r-- | m4/man-po4a.m4 | 9 | ||||
-rw-r--r-- | m4/man-tar-sort-name.m4 | 21 | ||||
-rw-r--r-- | m4/man-trans-subst.m4 | 11 |
24 files changed, 547 insertions, 0 deletions
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-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..3901964 --- /dev/null +++ b/m4/man-arg-systemdsystemunitdir.m4 @@ -0,0 +1,18 @@ +# man-arg-systemdsystemunitdir.m4 serial 2 +dnl MAN_ARG_SYSTEMDSYSTEMUNITDIR +dnl Add a --with-systemdsystemunitdir option. + +AC_DEFUN([MAN_ARG_SYSTEMDSYSTEMUNITDIR], +[ +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. + 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])]) +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..6254d4b --- /dev/null +++ b/m4/man-arg-systemdtmpfilesdir.m4 @@ -0,0 +1,18 @@ +# man-arg-systemdtmpfilesdir.m4 serial 3 +dnl MAN_ARG_SYSTEMDTMPFILESDIR +dnl Add a --with-systemdtmpfilesdir option. + +AC_DEFUN([MAN_ARG_SYSTEMDTMPFILESDIR], +[ +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. + 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])]) +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 <dps@io.stargate.co.uk> 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..2b9fa77 --- /dev/null +++ b/m4/man-gnu-nroff.m4 @@ -0,0 +1,24 @@ +# man-gnu-nroff.m4 serial 2 +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 <<EOF | tr -d '\n' +\\n(.g +EOF +` -eq 1 + then + man_cv_prog_gnu_nroff=yes + else + man_cv_prog_gnu_nroff=no + fi]) + +if test "$man_cv_prog_gnu_nroff" = "yes" +then + AC_DEFINE([GNU_NROFF], [1], [Define if nroff is GNU nroff.]) +fi +AC_MSG_RESULT([$man_cv_prog_gnu_nroff]) +]) diff --git a/m4/man-heirloom-nroff.m4 b/m4/man-heirloom-nroff.m4 new file mode 100644 index 0000000..85144e7 --- /dev/null +++ b/m4/man-heirloom-nroff.m4 @@ -0,0 +1,33 @@ +# man-heirloom-nroff.m4 serial 1 +dnl MAN_PROG_HEIRLOOM_NROFF(PROGRAM-NAME) +dnl Check whether the given nroff program is from the Heirloom Documentation +dnl Tools. We do this by testing the .X number register; it should be +dnl non-zero, and should change to a different value if the -mg option is +dnl used to enable groff compatibility. +AC_DEFUN([MAN_PROG_HEIRLOOM_NROFF], +[AC_MSG_CHECKING([whether nroff is Heirloom nroff]) + +AC_CACHE_VAL([man_cv_prog_heirloom_nroff], + [man_heirloom_ext_plain=`$1 2>/dev/null <<EOF | tr -d '\n' +\\n(.X +EOF +` + man_heirloom_ext_mg=`$1 -mg 2>/dev/null <<EOF | tr -d '\n' +\\n(.X +EOF +` + if test "x$man_heirloom_ext_plain" != 0 && \ + test "x$man_heirloom_ext_mg" != 0 && \ + test "x$man_heirloom_ext_plain" != "x$man_heirloom_extflag_mg" + then + man_cv_prog_heirloom_nroff=yes + else + man_cv_prog_heirloom_nroff=no + fi]) + +if test "$man_cv_prog_heirloom_nroff" = "yes" +then + AC_DEFINE([HEIRLOOM_NROFF], [1], [Define if nroff is Heirloom nroff.]) +fi +AC_MSG_RESULT([$man_cv_prog_heirloom_nroff]) +]) diff --git a/m4/man-libseccomp.m4 b/m4/man-libseccomp.m4 new file mode 100644 index 0000000..c90e3aa --- /dev/null +++ b/m4/man-libseccomp.m4 @@ -0,0 +1,18 @@ +# man-libseccomp.m4 serial 2 +dnl MAN_LIBSECCOMP +dnl Add a --without-libseccomp option; check for the libseccomp library. +AC_DEFUN([MAN_LIBSECCOMP], + [AC_ARG_WITH([libseccomp], + [AS_HELP_STRING([--without-libseccomp], + [do not confine subprocesses using seccomp])], + [], + [with_libseccomp=check]) + if test "x$with_libseccomp" != "xno"; then + PKG_CHECK_MODULES([libseccomp], [libseccomp], + [AC_DEFINE([HAVE_LIBSECCOMP], [1], + [Define to 1 if you have the `libseccomp' library.])], + [if test "x$with_libseccomp" = "xyes"; then + AC_MSG_ERROR([--with-libseccomp given but cannot find libseccomp]) + fi]) + fi +]) # MAN_LIBSECCOMP diff --git a/m4/man-linguas.m4 b/m4/man-linguas.m4 new file mode 100644 index 0000000..973afff --- /dev/null +++ b/m4/man-linguas.m4 @@ -0,0 +1,72 @@ +# man-linguas.m4 serial 2 +dnl MAN_LINGUAS +dnl Compute the set of localised manual pages to install, taking the LINGUAS +dnl environment variable into account if set. + +dnl Draws somewhat on po.m4: + +dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. +dnl Bruno Haible <haible@clisp.cons.org>, 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..90ef050 --- /dev/null +++ b/m4/man-trans-subst.m4 @@ -0,0 +1,11 @@ +# man-trans-subst.m4 serial 2 +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"` + AC_SUBST(AS_TR_CPP([TRANS_$1]), [$man_transformed]) + AC_SUBST(AS_TR_CPP([TRANS_$1_UPPER]), [AS_TR_CPP([$man_transformed])]) +]) # MAN_TRANS_SUBST |