From ca268e8d3dcabffd2d2ae5c8fc0fdc8212586663 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 7 Nov 1999 23:19:04 +0000 Subject: [PATCH] * automake.in (PATH_PATTERN): Added `-' as allowable character. Fixes PR automake/20. From Matthew D. Langston. --- ChangeLog | 3 +++ Makefile.in | 5 +++-- aclocal.m4 | 3 +++ automake.in | 2 +- configure | 55 +++++++++++++++++++++++++++++++++++++++++++++-------- 5 files changed, 57 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa9d680d..20eb59e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1999-11-07 Tom Tromey + * automake.in (PATH_PATTERN): Added `-' as allowable character. + Fixes PR automake/20. From Matthew D. Langston. + * automake.in (SUFFIX_RULE_PATTERN): Add `0-9' as characters allowed in suffixes. Fixes PR 22. From Matthias Clasen. diff --git a/Makefile.in b/Makefile.in index c559e9ea..2fe76a98 100644 --- a/Makefile.in +++ b/Makefile.in @@ -59,6 +59,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : AMTAR = @AMTAR@ AMTARFLAGS = @AMTARFLAGS@ +AWK = @AWK@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PERL = @PERL@ @@ -411,7 +412,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - awk ' { files[$$0] = 1; } \ + $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -f$$here/ID $$unique $(LISP) @@ -428,7 +429,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - awk ' { files[$$0] = 1; } \ + $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) diff --git a/aclocal.m4 b/aclocal.m4 index 8bf315a0..891da2c2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -52,6 +52,9 @@ dnl This is sad, since we only need this for "dist". However, dnl there's no other good way to do it. We prefer GNU tar if dnl we can find it. If we can't find a tar, it doesn't really matter. AC_CHECK_PROGS(AMTAR, gnutar gtar tar) +dnl We need awk for the "check" target. The system "awk" is bad on +dnl some platforms. +AC_REQUIRE([AC_PROG_AWK]) AMTARFLAGS= if test -n "$AMTAR"; then if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then diff --git a/automake.in b/automake.in index 60948613..988cc531 100755 --- a/automake.in +++ b/automake.in @@ -46,7 +46,7 @@ $GNITS_VERSION_PATTERN = "[0-9]+\\.[0-9]+([a-z]|\\.[0-9]+)?"; $IF_PATTERN = "^if[ \t]+\([A-Za-z][A-Za-z0-9_]*\)[ \t]*\(#.*\)?\$"; $ELSE_PATTERN = "^else[ \t]*\(#.*\)?\$"; $ENDIF_PATTERN = "^endif[ \t]*\(#.*\)?\$"; -$PATH_PATTERN='(\\w|/|\\.)+'; +$PATH_PATTERN='(\\w|[/.-])+'; # This will pass through anything not of the prescribed form. $INCLUDE_PATTERN = "^include[ \t]+((\\\$\\\(top_srcdir\\\)/${PATH_PATTERN})|(\\\$\\\(srcdir\\\)/${PATH_PATTERN})|([^/\\\$]${PATH_PATTERN}))[ \t]*(#.*)?\$"; diff --git a/configure b/configure index e9b6c2f5..94e0faed 100755 --- a/configure +++ b/configure @@ -704,8 +704,45 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," + +for ac_prog in mawk gawk nawk awk +do + +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:715: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}... $ac_c" 1>&6 -echo "configure:709: checking whether ${MAKE-make} sets \${MAKE}" 1>&5 +echo "configure:746: checking whether ${MAKE-make} sets \${MAKE}" 1>&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -753,7 +790,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal... $ac_c" 1>&6 -echo "configure:757: checking for working aclocal" 1>&5 +echo "configure:794: checking for working aclocal" 1>&5 # 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. @@ -767,7 +804,7 @@ fi echo $ac_n "checking for working autoconf... $ac_c" 1>&6 -echo "configure:771: checking for working autoconf" 1>&5 +echo "configure:808: checking for working autoconf" 1>&5 # 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. @@ -781,7 +818,7 @@ fi echo $ac_n "checking for working automake... $ac_c" 1>&6 -echo "configure:785: checking for working automake" 1>&5 +echo "configure:822: checking for working automake" 1>&5 # 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. @@ -795,7 +832,7 @@ fi echo $ac_n "checking for working autoheader... $ac_c" 1>&6 -echo "configure:799: checking for working autoheader" 1>&5 +echo "configure:836: checking for working autoheader" 1>&5 # 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. @@ -809,7 +846,7 @@ fi echo $ac_n "checking for working makeinfo... $ac_c" 1>&6 -echo "configure:813: checking for working makeinfo" 1>&5 +echo "configure:850: checking for working makeinfo" 1>&5 # 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. @@ -831,7 +868,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:835: checking for $ac_word" 1>&5 +echo "configure:872: checking for $ac_word" 1>&5 if test "${ac_cv_prog_AMTAR+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -860,6 +897,7 @@ fi test -n "$AMTAR" && break done + AMTARFLAGS= if test -n "$AMTAR"; then if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then @@ -876,7 +914,7 @@ AUTOMAKE="`pwd`/automake --amdir=." # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:880: checking for $ac_word" 1>&5 +echo "configure:918: checking for $ac_word" 1>&5 if test "${ac_cv_path_PERL+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1108,6 +1146,7 @@ s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@install_sh@%$install_sh%g s%@AMTAR@%$AMTAR%g +s%@AWK@%$AWK%g s%@AMTARFLAGS@%$AMTARFLAGS%g s%@SET_MAKE@%$SET_MAKE%g s%@PERL@%$PERL%g -- 2.43.5