Index: configure.in =================================================================== RCS file: /projects/cvsroot/pgsql/configure.in,v retrieving revision 1.460 diff -u -r1.460 configure.in --- configure.in 22 Apr 2006 00:29:41 -0000 1.460 +++ configure.in 4 May 2006 10:41:18 -0000 @@ -516,6 +516,12 @@ AC_SUBST(with_zlib) # +# Check user hasn't passed any strange args +# + +PGAC_CHECK_ARGS + +# # Elf # Index: config/general.m4 =================================================================== RCS file: /projects/cvsroot/pgsql/config/general.m4,v retrieving revision 1.3 diff -u -r1.3 general.m4 --- config/general.m4 29 Nov 2003 19:51:17 -0000 1.3 +++ config/general.m4 4 May 2006 10:41:18 -0000 @@ -16,6 +16,9 @@ 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], @@ -28,6 +31,7 @@ AC_DEFUN([PGAC_ARG], [ +m4_divert_text([PGAC_ARGS],[pgac_arg_to_variable([$1],[$2])) ;;]) m4_case([$1], enable, [ @@ -68,6 +72,24 @@ ) ])# PGAC_ARG +# PGAC_CHECK_ARGS() +# ----------------- +# Checks if the user passed any --with/without/enable/disable arguments that +# we don't recognise. This should be called shortly after the last PGAC_ARG* +# macro in configure.in + +AC_DEFUN([PGAC_CHECK_ARGS], +[ + for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do + case $var in + m4_undivert([PGAC_ARGS]) + *) + echo "*** Unknown feature: $var ***" + exit + ;; + esac + done +])# PGAC_CHECK_ARGS # PGAC_ARG_BOOL(TYPE, NAME, DEFAULT, HELP-STRING, # [ACTION-IF-YES], [ACTION-IF-NO])