diff options
Diffstat (limited to 'config/general.m4')
-rw-r--r-- | config/general.m4 | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/config/general.m4 b/config/general.m4 index 8139f0ae3f6..45edfc4c0e0 100644 --- a/config/general.m4 +++ b/config/general.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/general.m4,v 1.6 2006/10/13 20:23:07 petere Exp $ +# $PostgreSQL: pgsql/config/general.m4,v 1.7 2006/10/30 22:15:04 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. @@ -16,9 +16,6 @@ m4_define([pgac_arg_to_variable], [$1[]_[]patsubst($2, -, _)]) -# This is the divert which we store all declared 'with' and 'enable' -# arguments for use with PGAC_CHECK_ARGS -m4_define([_m4_divert(PGAC_ARGS)], 5432) # PGAC_ARG(TYPE, NAME, HELP-STRING, # [ACTION-IF-YES], [ACTION-IF-NO], [ACTION-IF-ARG], @@ -31,7 +28,7 @@ m4_define([_m4_divert(PGAC_ARGS)], 5432) AC_DEFUN([PGAC_ARG], [ -m4_divert_text([PGAC_ARGS],[pgac_arg_to_variable([$1],[$2])) ;;]) +pgac_args="$pgac_args pgac_arg_to_variable([$1],[$2])" m4_case([$1], enable, [ @@ -72,25 +69,22 @@ AC_ARG_WITH([$2], [$3], [ ) ])# PGAC_ARG -# PGAC_CHECK_ARGS() -# ----------------- -# Checks if the user passed any --with/without/enable/disable arguments that -# 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 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 +# PGAC_ARG_CHECK() +# ---------------- +# Checks if the user passed any --with/without/enable/disable +# arguments that were not defined. Just prints out a warning message, +# so this should be called near the end, so the user will see it. + +AC_DEFUN([PGAC_ARG_CHECK], +[for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do + for pgac_arg in $pgac_args with_gnu_ld; do + if test "$pgac_var" = "$pgac_arg"; then + continue 2 + fi done -])# PGAC_CHECK_ARGS + pgac_txt=`echo $pgac_var | tr '_' '-'` + AC_MSG_WARN([option ignored: --$pgac_txt]) +done])# PGAC_ARG_CHECK # PGAC_ARG_BOOL(TYPE, NAME, DEFAULT, HELP-STRING, # [ACTION-IF-YES], [ACTION-IF-NO]) |