diff options
author | Peter Eisentraut | 2006-10-13 20:23:07 +0000 |
---|---|---|
committer | Peter Eisentraut | 2006-10-13 20:23:07 +0000 |
commit | e1fdd2263f8dadd9dad1c2462c3b8c7972b3ff56 (patch) | |
tree | 6c70ad42bfd47ce79e1fb78b5967fe91e5f4e3ff | |
parent | d63ddfb872300c1830315eaea2fbbc8e5d4dadae (diff) |
Make unknown-option-warning code more portable. echo -n is not portable,
and neither is "|" or "\|" in basic regular expressions.
-rw-r--r-- | config/general.m4 | 22 | ||||
-rwxr-xr-x | configure | 19 |
2 files changed, 21 insertions, 20 deletions
diff --git a/config/general.m4 b/config/general.m4 index 62d97e120e..8139f0ae3f 100644 --- a/config/general.m4 +++ b/config/general.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/general.m4,v 1.5 2006/08/11 18:51:50 alvherre Exp $ +# $PostgreSQL: pgsql/config/general.m4,v 1.6 2006/10/13 20:23:07 petere Exp $ # This file defines new macros to process configure command line # arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE. @@ -75,20 +75,20 @@ AC_ARG_WITH([$2], [$3], [ # PGAC_CHECK_ARGS() # ----------------- # Checks if the user passed any --with/without/enable/disable arguments that -# we don't recognise. Just prints out a warning message, so this should be +# we don't recognize. Just prints out a warning message, so this should be # called near the end, so the user will see it. AC_DEFUN([PGAC_CHECK_ARGS], [ - for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do - case $var in - m4_undivert([PGAC_ARGS]) - with_gnu_ld) ;; - *) - echo -n "*** Option ignored: " - echo $var | sed -e 's/\([^=]*\)/--\1/;s/_/-/g' - ;; - esac + for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do + case $pgac_var in + m4_undivert([PGAC_ARGS]) + with_gnu_ld) ;; + *) + pgac_txt=`echo $pgac_var | tr '_' '-'` + AC_MSG_WARN([option ignored: --$pgac_txt]) + ;; + esac done ])# PGAC_CHECK_ARGS @@ -22980,9 +22980,9 @@ fi # - for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do - case $var in - with_template) ;; + for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do + case $pgac_var in + with_template) ;; with_docdir) ;; with_includes) ;; with_libraries) ;; @@ -23014,12 +23014,13 @@ with_readline) ;; with_libedit_preferred) ;; with_zlib) ;; - with_gnu_ld) ;; - *) - echo -n "*** Option ignored: " - echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g' - ;; - esac + with_gnu_ld) ;; + *) + pgac_txt=`echo $pgac_var | tr '_' '-'` + { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5 +echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;} + ;; + esac done |