summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m448
1 files changed, 36 insertions, 12 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 4ef9b9e..7950a5a 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -636,8 +636,12 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [
#--------------------------------------------------------------------
# SC_CONFIG_MANPAGES
#
-# Decide whether to use symlinks for linking the manpages and
-# whether to compress the manpages after installation.
+# Decide whether to use symlinks for linking the manpages,
+# whether to compress the manpages after installation, and
+# whether to add a package name suffix to the installed
+# manpages to avoidfile name clashes.
+# If compression is enabled also find out what file name suffix
+# the given compression program is using.
#
# Arguments:
# none
@@ -647,32 +651,52 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [
# Adds the following arguments to configure:
# --enable-man-symlinks
# --enable-man-compression=PROG
+# --enable-man-suffix[=STRING]
#
# Defines the following variable:
#
-# MKLINKS_FLAGS - The apropriate flags for mkLinks
-# according to the user's selection.
+# MAN_FLAGS - The apropriate flags for installManPage
+# according to the user's selection.
#
#--------------------------------------------------------------------
AC_DEFUN(SC_CONFIG_MANPAGES, [
AC_MSG_CHECKING([whether to use symlinks for manpages])
AC_ARG_ENABLE(man-symlinks,
- [ --enable-man-symlinks use symlinks for the manpages],
- test "$enableval" != "no" && MKLINKS_FLAGS="$MKLINKS_FLAGS --symlinks",
+ AS_HELP_STRING([--enable-man-symlinks],
+ [use symlinks for the manpages]),
+ test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks",
enableval="no")
AC_MSG_RESULT([$enableval])
- AC_MSG_CHECKING([compression for manpages])
+ AC_MSG_CHECKING([whether to compress the manpages])
AC_ARG_ENABLE(man-compression,
- [ --enable-man-compression=PROG
- compress the manpages with PROG],
- test "$enableval" = "yes" && echo && AC_MSG_ERROR([missing argument to --enable-man-compression])
- test "$enableval" != "no" && MKLINKS_FLAGS="$MKLINKS_FLAGS --compress $enableval",
+ AS_HELP_STRING([--enable-man-compression=PROG],
+ [compress the manpages with PROG]),
+ test "$enableval" = "yes" && AC_MSG_ERROR([missing argument to --enable-man-compression])
+ test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --compress $enableval",
+ enableval="no")
+ AC_MSG_RESULT([$enableval])
+ if test "$enableval" != "no"; then
+ AC_MSG_CHECKING([for compressed file suffix])
+ touch TeST
+ $enableval TeST
+ Z=`ls TeST* | sed 's/^....//'`
+ rm -f TeST*
+ MAN_FLAGS="$MAN_FLAGS --extension $Z"
+ AC_MSG_RESULT([$Z])
+ fi
+
+ AC_MSG_CHECKING([whether to add a package name suffix for the manpages])
+ AC_ARG_ENABLE(man-suffix,
+ AS_HELP_STRING([--enable-man-suffix=STRING],
+ [use STRING as a suffix to manpage file names (default: AC_PACKAGE_NAME)]),
+ test "$enableval" = "yes" && enableval="AC_PACKAGE_NAME"
+ test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --suffix $enableval",
enableval="no")
AC_MSG_RESULT([$enableval])
- AC_SUBST(MKLINKS_FLAGS)
+ AC_SUBST(MAN_FLAGS)
])
#--------------------------------------------------------------------