Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite1fdd22

Browse files
committed
Make unknown-option-warning code more portable. echo -n is not portable,
and neither is "|" or "\|" in basic regular expressions.
1 parentd63ddfb commite1fdd22

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

‎config/general.m4

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/config/general.m4,v 1.5 2006/08/11 18:51:50 alvherre Exp $
1+
# $PostgreSQL: pgsql/config/general.m4,v 1.6 2006/10/13 20:23:07 petere Exp $
22

33
# This file defines new macros to process configure command line
44
# arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE.
@@ -75,20 +75,20 @@ AC_ARG_WITH([$2], [$3], [
7575
# PGAC_CHECK_ARGS()
7676
# -----------------
7777
# Checks if the user passed any --with/without/enable/disable arguments that
78-
# we don'trecognise. Just prints out a warning message, so this should be
78+
# we don'trecognize. Just prints out a warning message, so this should be
7979
# called near the end, so the user will see it.
8080

8181
AC_DEFUN([PGAC_CHECK_ARGS],
8282
[
83-
forvar in `set |sed-ne '/^\(with_\|enable\_\)/s/=.*//p'`; do
84-
case $var in
85-
m4_undivert([PGAC_ARGS])
86-
with_gnu_ld) ;;
87-
*)
88-
echo-n "*** Option ignored: "
89-
echo $var | sed -e 's/\([^=]*\)/--\1/;s/_/-/g'
90-
;;
91-
esac
83+
forpgac_var in `set |sed's/=.*//' | $EGREP 'with_|enable_'`; do
84+
case $pgac_var in
85+
m4_undivert([PGAC_ARGS])
86+
with_gnu_ld) ;;
87+
*)
88+
pgac_txt=`echo$pgac_var | tr '_' '-'`
89+
AC_MSG_WARN([option ignored: --$pgac_txt])
90+
;;
91+
esac
9292
done
9393
])# PGAC_CHECK_ARGS
9494

‎configure

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22980,9 +22980,9 @@ fi
2298022980
#
2298122981

2298222982

22983-
forvar in `set |sed-ne '/^\(with_\|enable\_\)/s/=.*//p'`; do
22984-
case $var in
22985-
with_template) ;;
22983+
forpgac_var in `set |sed's/=.*//' | $EGREP 'with_|enable_'`; do
22984+
case $pgac_var in
22985+
with_template) ;;
2298622986
with_docdir) ;;
2298722987
with_includes) ;;
2298822988
with_libraries) ;;
@@ -23014,12 +23014,13 @@ with_readline) ;;
2301423014
with_libedit_preferred) ;;
2301523015
with_zlib) ;;
2301623016

23017-
with_gnu_ld) ;;
23018-
*)
23019-
echo -n "*** Option ignored: "
23020-
echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g'
23021-
;;
23022-
esac
23017+
with_gnu_ld) ;;
23018+
*)
23019+
pgac_txt=`echo $pgac_var | tr '_' '-'`
23020+
{ echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
23021+
echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
23022+
;;
23023+
esac
2302323024
done
2302423025

2302523026

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp