diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | m4/include-exclude-prog.m4 | 12 |
3 files changed, 21 insertions, 6 deletions
@@ -1,3 +1,14 @@ +2007-07-12 Jim Meyering <jim@meyering.net> + + Clean up include-exclude-prog.m4. + * m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN. + (gl_REMOVE_PROG): Likewise. + Add omitted "\>" in sed regexp. + Remove any leading or trailing spaces. + (gl_ADD_PROG): Remove any leading space. + * configure.ac: Instead, derive $MAN from $optional_bin_progs. + Append $(EXEEXT) to *all* names, not just the first one. + 2007-07-11 Jim Meyering <jim@meyering.net> If there's a GPL vN copyright comment, require that N == 3. diff --git a/configure.ac b/configure.ac index 07e14847e..69236c964 100644 --- a/configure.ac +++ b/configure.ac @@ -284,6 +284,8 @@ case " $optional_bin_progs " in *) INSTALL_SU=no ;; esac +MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'` + # Change ginstall.1 to "install.h" in $MAN. MAN=`echo "$MAN"|sed 's/\<ginstall\.1\>/install.1/'` @@ -292,7 +294,7 @@ MAN=`echo "$MAN"|sed 's/\<ginstall\.1\>/install.1/'` # representing '['. MAN=`echo "$MAN"|sed 's/\@<:@\.1//'` -OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /;s/ $//'` +OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'` AC_SUBST(OPTIONAL_BIN_PROGS) NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default AC_SUBST(NO_INSTALL_PROGS_DEFAULT) diff --git a/m4/include-exclude-prog.m4 b/m4/include-exclude-prog.m4 index c48c70b67..387386dfe 100644 --- a/m4/include-exclude-prog.m4 +++ b/m4/include-exclude-prog.m4 @@ -1,4 +1,4 @@ -#serial 1 +#serial 2 dnl Copyright (C) 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, @@ -9,15 +9,17 @@ dnl From Jim Meyering. # Usage: gl_ADD_PROG([prog_list_var_name], [prog_name]) AC_DEFUN([gl_ADD_PROG], [{ - $1="$$1 $2" - MAN="$MAN $2.1" + if test -z "$$1"; then + $1=$2 + else + $1="$$1 $2" + fi }]) # Usage: gl_REMOVE_PROG([prog_list_var_name], [prog_name]) AC_DEFUN([gl_REMOVE_PROG], [{ - $1=`echo "$$1"|sed 's/\<'"$1"'//;s/ */ /g'` - MAN=`echo "$MAN"|sed 's/\<'"$1"'\.1//'` + $1=`echo "$$1"|sed 's/\<'"$1"'\>//;s/ */ /g;s/^ *//;s/ *$//'` }]) # Given the name of a variable containing a space-separated list of |