Here's a weaker version of the previous patch. Rather than aborting, it
simply prints a warning about any unrecognised options, just before the
end:

checking thread safety of required library functions... yes
*** Option ignored: --enable-depends
configure: creating ./config.status
...etc...

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.
Index: configure
Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pgsql/configure.in,v
retrieving revision 1.464
diff -c -r1.464 configure.in
*** configure.in        29 Apr 2006 20:47:29 -0000      1.464
--- configure.in        14 May 2006 19:34:11 -0000
***************
*** 1426,1430 ****
--- 1426,1436 ----
  echo >src/include/stamp-h
  ])
  
+ #
+ # Warn about unknown options
+ #
+ 
+ PGAC_CHECK_ARGS
+ 
  AC_OUTPUT
  
Index: config/general.m4
===================================================================
RCS file: /projects/cvsroot/pgsql/config/general.m4,v
retrieving revision 1.3
diff -c -r1.3 general.m4
*** config/general.m4   29 Nov 2003 19:51:17 -0000      1.3
--- config/general.m4   14 May 2006 19:34:11 -0000
***************
*** 16,21 ****
--- 16,24 ----
  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,33 ****
--- 31,37 ----
  
  AC_DEFUN([PGAC_ARG],
  [
+ m4_divert_text([PGAC_ARGS],[pgac_arg_to_variable([$1],[$2])) ;;])
  m4_case([$1],
  
  enable, [
***************
*** 68,73 ****
--- 72,96 ----
  )
  ])# PGAC_ARG
  
+ # 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
+ # 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
+   done
+ ])# PGAC_CHECK_ARGS
  
  # PGAC_ARG_BOOL(TYPE, NAME, DEFAULT, HELP-STRING, 
  #               [ACTION-IF-YES], [ACTION-IF-NO])

Attachment: signature.asc
Description: Digital signature

Reply via email to