[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help2man ... (Re: man2html problem)
From: |
Akim Demaille |
Subject: |
Re: help2man ... (Re: man2html problem) |
Date: |
13 Jun 2001 18:29:30 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Copyleft) |
>>>>> "Akim" == Akim Demaille <address@hidden> writes:
Akim> [Extending missing as opposed to playing with `help2man
Akim> --version`.]
You're gonna laugh Alexander...
The including `missing' had already help2man support, and Autoconf's
configure.in was already ready to have it work properly. The only
thing that was missing was a newer missing.m4. So I think the issue
is solved now.
I'm applying this:
Index: ChangeLog
from Akim Demaille <address@hidden>
* m4/missing.m4, config/missing: Updated to Automake 1.4g's.
Suggested by Alexander Mai.
Index: configure.in
===================================================================
RCS file: /cvs/autoconf/configure.in,v
retrieving revision 1.49
diff -u -u -r1.49 configure.in
--- configure.in 2001/06/02 12:30:14 1.49
+++ configure.in 2001/06/13 16:23:37
@@ -25,7 +25,7 @@
AC_PROG_AWK
# Generating man pages.
-AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
+AM_MISSING_PROG(HELP2MAN, help2man)
# We use a path for perl so the #! line in autoscan will work.
AC_PATH_PROG(PERL, perl, no)
Index: config/missing
===================================================================
RCS file: /cvs/autoconf/config/missing,v
retrieving revision 1.1
diff -u -u -r1.1 missing
--- config/missing 2001/05/22 14:43:50 1.1
+++ config/missing 2001/06/13 16:23:37
@@ -25,6 +25,12 @@
run=:
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
@@ -77,7 +83,7 @@
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acinclude.m4' or \`configure.in'. You might want
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
@@ -86,7 +92,7 @@
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`configure.in'. You might want to install the
+ you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
@@ -95,10 +101,10 @@
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acconfig.h' or \`configure.in'. You might want
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p'
${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
@@ -114,7 +120,7 @@
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
Index: m4/missing.m4
===================================================================
RCS file: /cvs/autoconf/m4/missing.m4,v
retrieving revision 1.3
diff -u -u -r1.3 missing.m4
--- m4/missing.m4 2000/11/11 07:05:02 1.3
+++ m4/missing.m4 2001/06/13 16:23:38
@@ -1,18 +1,73 @@
## --------------------------------------------------------- ##
## Fake the existence of programs that GNU maintainers use. ##
## --------------------------------------------------------- ##
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING([for working $2])
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT([found])
+
+# serial 2
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_INSTALL_SH
+# ---------------------
+# Like AM_MISSING_PROG, but only looks for install-sh.
+AC_DEFUN([AM_MISSING_INSTALL_SH],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+if test -z "$install_sh"; then
+ for install_sh in "$ac_aux_dir/install-sh" \
+ "$ac_aux_dir/install.sh" \
+ "${am_missing_run}${ac_auxdir}/install-sh";
+ do
+ test -f "$install_sh" && break
+ done
+ # FIXME: an evil hack: we remove the SHELL invocation from
+ # install_sh because automake adds it back in. Sigh.
+ install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
+fi
+AC_SUBST(install_sh)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[test x"${MISSING+set}" = xset ||
+ MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
else
- $1="$SHELL $3/missing $2"
- AC_MSG_RESULT([missing])
+ am_missing_run=
+ am_backtick='`'
+ AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
fi
-AC_SUBST($1)])
+])
+
+# AM_AUX_DIR_EXPAND
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to ${srcdir}/foo. In other projects, it is set to `.'.
+# Of course, Automake must honor this variable whenever it call a tool
+# from the auxiliary directory. The problem is that $srcdir (hence
+# $ac_aux_dir) can be either an absolute path or a path relative to
+# $top_srcdir or absolute, this depends on how configure is run. This
+# is pretty anoying since it makes $ac_aux_dir quite unusable in
+# subdirectories: on the top source directory, any form will work
+# fine, but in subdirectories relative pat needs to be adapted.
+# - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is
+# relative, but fail if $srcdir is absolute
+# - conversly, calling $ax_aux_dir/missing would fail if $srcdir is
+# absolute, and success on relative paths.
+#
+# Consequently, we define and use $am_aux_dir, the "always absolute"
+# version of $ac_aux_dir.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+])