From 6f27d610c2aed83f80bbd3ef19794322bf1f86e7 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 7 Nov 1999 23:16:29 +0000 Subject: [PATCH] * automake.in (SUFFIX_RULE_PATTERN): Add `0-9' as characters allowed in suffixes. Fixes PR 22. From Matthias Clasen. --- ChangeLog | 5 ++ THANKS | 1 + automake.in | 2 +- configure | 209 ++++++++++++++++++++++++++++++++++++---------------- 4 files changed, 154 insertions(+), 63 deletions(-) diff --git a/ChangeLog b/ChangeLog index e362d098..fa9d680d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-11-07 Tom Tromey + + * automake.in (SUFFIX_RULE_PATTERN): Add `0-9' as characters + allowed in suffixes. Fixes PR 22. From Matthias Clasen. + 1999-10-03 Alexandre Oliva * m4/lispdir.m4: -batch must come before -q. diff --git a/THANKS b/THANKS index 5b942010..14466019 100644 --- a/THANKS +++ b/THANKS @@ -72,6 +72,7 @@ Mark Galassi rosalia@nis.lanl.gov Markku Rossi mtr@ngs.fi Markus F.X.J. Oberhumer k3040e4@wildsau.idv-edu.uni-linz.ac.at Matt Leach mleach@cygnus.com +Matthias Clasen clasen@mathematik.uni-freiburg.de Matthew D. Langston langston@SLAC.Stanford.EDU Michael Brantley Michael-Brantley@deshaw.com Michel de Ruiter mdruiter@cs.vu.nl diff --git a/automake.in b/automake.in index c8b8bb88..60948613 100755 --- a/automake.in +++ b/automake.in @@ -39,7 +39,7 @@ $IGNORE_PATTERN = "^##([^#].*)?\$"; $WHITE_PATTERN = "^[ \t]*\$"; $COMMENT_PATTERN = "^#"; $RULE_PATTERN = "^([\$a-zA-Z_.][-.a-zA-Z0-9_(){}/\$]*) *:([^=].*|)\$"; -$SUFFIX_RULE_PATTERN = "^\\.([a-zA-Z]+)\\.([a-zA-Z]+)\$"; +$SUFFIX_RULE_PATTERN = "^\\.([a-zA-Z0-9]+)\\.([a-zA-Z0-9]+)\$"; $MACRO_PATTERN = "^([A-Za-z0-9_]+)[ \t]*([:+]?)=[ \t]*(.*)\$"; $BOGUS_MACRO_PATTERN = "^([^ \t]*)[ \t]*([:+]?)=[ \t]*(.*)\$"; $GNITS_VERSION_PATTERN = "[0-9]+\\.[0-9]+([a-z]|\\.[0-9]+)?"; diff --git a/configure b/configure index 8bf495b5..e9b6c2f5 100755 --- a/configure +++ b/configure @@ -1,8 +1,10 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.14.1 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Copyright (C) 1992, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -12,6 +14,7 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: + # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. @@ -52,6 +55,8 @@ MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 +# Sed expression to map a string onto a valid sh variable name +ac_tr_sh='sed -e y%*+%pp%;s%[^a-zA-Z0-9_]%_%g' ac_prev= for ac_option @@ -118,6 +123,19 @@ do esac eval "enable_${ac_feature}='$ac_optarg'" ;; + -env-* | --env-*) + ac_envvar=`echo $ac_option|sed -e 's/^-*env-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; } + fi + case "$ac_option" in + *=*) ;; + *) { echo "configure: error: $ac_envvar: missing value" 1>&2; exit 1; } ;; + esac + eval "${ac_envvar}='$ac_optarg'" + export $ac_envvar ;; + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) @@ -139,6 +157,7 @@ Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE + [--env-]VAR=VALUE set environment variable VAR to VALUE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages @@ -379,6 +398,15 @@ EOF -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; + *=*) + ac_envvar=`echo $ac_option|sed -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; } + fi + eval "${ac_envvar}='$ac_optarg'" + export $ac_envvar ;; + *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 @@ -393,9 +421,10 @@ EOF done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + { echo "configure: error: missing argument to --\`echo $ac_prev | sed 's/_/-/g'\`" 1>&2; exit 1; } fi + trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: @@ -469,9 +498,9 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "configure: error: cannot find sources in $ac_confdir or .." 1>&2; exit 1; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "configure: error: cannot find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` @@ -493,12 +522,13 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file fi + ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' @@ -508,6 +538,7 @@ cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -522,6 +553,9 @@ fi + + + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -535,11 +569,12 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + { echo "configure: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -552,10 +587,10 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:557: checking for a BSD compatible install" >&5 +echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6 +echo "configure:592: checking for a BSD compatible install" 1>&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if test "${ac_cv_path_install+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -573,6 +608,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -601,12 +640,13 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:610: checking whether build environment is sane" >&5 + +echo $ac_n "checking whether build environment is sane... $ac_c" 1>&6 +echo "configure:650: checking whether build environment is sane" 1>&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -643,6 +683,7 @@ Check your system clock" 1>&2; exit 1; } fi rm -f conftest* echo "$ac_t""yes" 1>&6 + if test "$program_transform_name" = s,x,x,; then program_transform_name= else @@ -654,18 +695,19 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:667: checking whether ${MAKE-make} sets \${MAKE}" >&5 + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}... $ac_c" 1>&6 +echo "configure:709: checking whether ${MAKE-make} sets \${MAKE}" 1>&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -709,8 +751,9 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` -echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:714: checking for working aclocal" >&5 + +echo $ac_n "checking for working aclocal... $ac_c" 1>&6 +echo "configure:757: 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. @@ -722,8 +765,9 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:727: checking for working autoconf" >&5 + +echo $ac_n "checking for working autoconf... $ac_c" 1>&6 +echo "configure:771: 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. @@ -735,8 +779,9 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:740: checking for working automake" >&5 + +echo $ac_n "checking for working automake... $ac_c" 1>&6 +echo "configure:785: 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. @@ -748,8 +793,9 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:753: checking for working autoheader" >&5 + +echo $ac_n "checking for working autoheader... $ac_c" 1>&6 +echo "configure:799: 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. @@ -761,8 +807,9 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:766: checking for working makeinfo" >&5 + +echo $ac_n "checking for working makeinfo... $ac_c" 1>&6 +echo "configure:813: 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. @@ -777,13 +824,15 @@ fi install_sh="$missing_dir/install-sh" test -f "$install_sh" || install_sh="$missing_dir/install.sh" + for ac_prog in gnutar gtar tar 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:786: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:835: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_AMTAR+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AMTAR"; then @@ -823,24 +872,25 @@ fi ACLOCAL="`pwd`/aclocal --acdir=m4" 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:830: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:880: checking for $ac_word" 1>&5 +if test "${ac_cv_path_PERL+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$PERL" in /*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; - ?:/*) + ?:/*) ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" - for ac_dir in $ac_dummy; do + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_PERL="$ac_dir/$ac_word" @@ -931,15 +981,29 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the cleanup section. Otherwise, +# look for a macro that doesn't take arguments. +cat > $conftest.defs <<\EOF +s%^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)%-D\1=\2%g +t cleanup +s%^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)%-D\1=\2%g +: cleanup s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g s%\$%$$%g EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT="`echo; echo .`" +DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f $conftest.defs # Without the "./", some shells look in PATH for config.status. @@ -959,7 +1023,28 @@ cat > $CONFIG_STATUS <> $CONFIG_STATUS < conftest.subs <<\\CEOF + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > \$conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g @@ -1041,18 +1127,18 @@ ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + sed "1,${ac_beg}d; ${ac_end}q" $conftest.subs > $conftest.s$ac_file else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file + sed "${ac_end}q" $conftest.subs > $conftest.s$ac_file fi - if test ! -s conftest.s$ac_file; then + if test ! -s $conftest.s$ac_file; then ac_more_lines=false - rm -f conftest.s$ac_file + rm -f $conftest.s$ac_file else if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" + ac_sed_cmds="sed -f $conftest.s$ac_file" else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + ac_sed_cmds="$ac_sed_cmds | sed -f $conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end @@ -1064,10 +1150,6 @@ if test -z "$ac_sed_cmds"; then fi EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". @@ -1115,15 +1197,18 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then *) ac_comsub= ;; esac +# Don't redirect the output to AC_FILE directly: use `mv' so that updating +# is atomic, and doesn't need trapping. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +" $ac_file_inputs | (eval "$ac_sed_cmds") > $conftest.out + mv $conftest.out $ac_file fi; done -rm -f conftest.s* +rm -f $conftest.s* EOF cat >> $CONFIG_STATUS <