Commit 38280861 authored by Bruce Momjian's avatar Bruce Momjian

Emit warnings for unknown configure options.

Martijn van Oosterhout
parent 4d06e86d
# $PostgreSQL: pgsql/config/general.m4,v 1.3 2003/11/29 19:51:17 pgsql Exp $ # $PostgreSQL: pgsql/config/general.m4,v 1.4 2006/05/30 13:52:25 momjian Exp $
# This file defines new macros to process configure command line # This file defines new macros to process configure command line
# arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE. # arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE.
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
m4_define([pgac_arg_to_variable], m4_define([pgac_arg_to_variable],
[$1[]_[]patsubst($2, -, _)]) [$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, # PGAC_ARG(TYPE, NAME, HELP-STRING,
# [ACTION-IF-YES], [ACTION-IF-NO], [ACTION-IF-ARG], # [ACTION-IF-YES], [ACTION-IF-NO], [ACTION-IF-ARG],
...@@ -28,6 +31,7 @@ m4_define([pgac_arg_to_variable], ...@@ -28,6 +31,7 @@ m4_define([pgac_arg_to_variable],
AC_DEFUN([PGAC_ARG], AC_DEFUN([PGAC_ARG],
[ [
m4_divert_text([PGAC_ARGS],[pgac_arg_to_variable([$1],[$2])) ;;])
m4_case([$1], m4_case([$1],
enable, [ enable, [
...@@ -68,6 +72,25 @@ AC_ARG_WITH([$2], [$3], [ ...@@ -68,6 +72,25 @@ AC_ARG_WITH([$2], [$3], [
) )
])# PGAC_ARG ])# 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, # PGAC_ARG_BOOL(TYPE, NAME, DEFAULT, HELP-STRING,
# [ACTION-IF-YES], [ACTION-IF-NO]) # [ACTION-IF-YES], [ACTION-IF-NO])
......
...@@ -1460,6 +1460,7 @@ echo $ECHO_N "checking which template to use... $ECHO_C" >&6 ...@@ -1460,6 +1460,7 @@ echo $ECHO_N "checking which template to use... $ECHO_C" >&6
# Check whether --with-template or --without-template was given. # Check whether --with-template or --without-template was given.
if test "${with_template+set}" = set; then if test "${with_template+set}" = set; then
withval="$with_template" withval="$with_template"
...@@ -1577,6 +1578,7 @@ tas_file=dummy.s ...@@ -1577,6 +1578,7 @@ tas_file=dummy.s
# Check whether --with-docdir or --without-docdir was given. # Check whether --with-docdir or --without-docdir was given.
if test "${with_docdir+set}" = set; then if test "${with_docdir+set}" = set; then
withval="$with_docdir" withval="$with_docdir"
...@@ -1608,6 +1610,7 @@ fi; ...@@ -1608,6 +1610,7 @@ fi;
# Check whether --with-includes or --without-includes was given. # Check whether --with-includes or --without-includes was given.
if test "${with_includes+set}" = set; then if test "${with_includes+set}" = set; then
withval="$with_includes" withval="$with_includes"
...@@ -1638,6 +1641,7 @@ fi; ...@@ -1638,6 +1641,7 @@ fi;
# Check whether --with-libraries or --without-libraries was given. # Check whether --with-libraries or --without-libraries was given.
if test "${with_libraries+set}" = set; then if test "${with_libraries+set}" = set; then
withval="$with_libraries" withval="$with_libraries"
...@@ -1664,6 +1668,7 @@ fi; ...@@ -1664,6 +1668,7 @@ fi;
# Check whether --with-libs or --without-libs was given. # Check whether --with-libs or --without-libs was given.
if test "${with_libs+set}" = set; then if test "${with_libs+set}" = set; then
withval="$with_libs" withval="$with_libs"
...@@ -1695,6 +1700,7 @@ echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time su ...@@ -1695,6 +1700,7 @@ echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time su
echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
# Check whether --enable-integer-datetimes or --disable-integer-datetimes was given. # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
if test "${enable_integer_datetimes+set}" = set; then if test "${enable_integer_datetimes+set}" = set; then
enableval="$enable_integer_datetimes" enableval="$enable_integer_datetimes"
...@@ -1733,6 +1739,7 @@ echo "$as_me:$LINENO: checking whether NLS is wanted" >&5 ...@@ -1733,6 +1739,7 @@ echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
# Check whether --enable-nls or --disable-nls was given. # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then if test "${enable_nls+set}" = set; then
enableval="$enable_nls" enableval="$enable_nls"
...@@ -1776,6 +1783,7 @@ echo $ECHO_N "checking for default port number... $ECHO_C" >&6 ...@@ -1776,6 +1783,7 @@ echo $ECHO_N "checking for default port number... $ECHO_C" >&6
# Check whether --with-pgport or --without-pgport was given. # Check whether --with-pgport or --without-pgport was given.
if test "${with_pgport+set}" = set; then if test "${with_pgport+set}" = set; then
withval="$with_pgport" withval="$with_pgport"
...@@ -1820,6 +1828,7 @@ _ACEOF ...@@ -1820,6 +1828,7 @@ _ACEOF
# #
# Check whether --enable-shared or --disable-shared was given. # Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then if test "${enable_shared+set}" = set; then
enableval="$enable_shared" enableval="$enable_shared"
...@@ -1850,6 +1859,7 @@ fi; ...@@ -1850,6 +1859,7 @@ fi;
# #
# Check whether --enable-rpath or --disable-rpath was given. # Check whether --enable-rpath or --disable-rpath was given.
if test "${enable_rpath+set}" = set; then if test "${enable_rpath+set}" = set; then
enableval="$enable_rpath" enableval="$enable_rpath"
...@@ -1880,6 +1890,7 @@ fi; ...@@ -1880,6 +1890,7 @@ fi;
# #
# Check whether --enable-spinlocks or --disable-spinlocks was given. # Check whether --enable-spinlocks or --disable-spinlocks was given.
if test "${enable_spinlocks+set}" = set; then if test "${enable_spinlocks+set}" = set; then
enableval="$enable_spinlocks" enableval="$enable_spinlocks"
...@@ -1909,6 +1920,7 @@ fi; ...@@ -1909,6 +1920,7 @@ fi;
# #
# Check whether --enable-debug or --disable-debug was given. # Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then if test "${enable_debug+set}" = set; then
enableval="$enable_debug" enableval="$enable_debug"
...@@ -1944,6 +1956,7 @@ fi; ...@@ -1944,6 +1956,7 @@ fi;
# Check whether --with-CC or --without-CC was given. # Check whether --with-CC or --without-CC was given.
if test "${with_CC+set}" = set; then if test "${with_CC+set}" = set; then
withval="$with_CC" withval="$with_CC"
...@@ -3438,6 +3451,7 @@ fi ...@@ -3438,6 +3451,7 @@ fi
# #
# Check whether --enable-depend or --disable-depend was given. # Check whether --enable-depend or --disable-depend was given.
if test "${enable_depend+set}" = set; then if test "${enable_depend+set}" = set; then
enableval="$enable_depend" enableval="$enable_depend"
...@@ -3469,6 +3483,7 @@ fi; ...@@ -3469,6 +3483,7 @@ fi;
# #
# Check whether --enable-cassert or --disable-cassert was given. # Check whether --enable-cassert or --disable-cassert was given.
if test "${enable_cassert+set}" = set; then if test "${enable_cassert+set}" = set; then
enableval="$enable_cassert" enableval="$enable_cassert"
...@@ -3539,6 +3554,7 @@ echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5 ...@@ -3539,6 +3554,7 @@ echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
# Check whether --enable-thread-safety or --disable-thread-safety was given. # Check whether --enable-thread-safety or --disable-thread-safety was given.
if test "${enable_thread_safety+set}" = set; then if test "${enable_thread_safety+set}" = set; then
enableval="$enable_thread_safety" enableval="$enable_thread_safety"
...@@ -3564,6 +3580,7 @@ fi; ...@@ -3564,6 +3580,7 @@ fi;
# Check whether --enable-thread-safety-force or --disable-thread-safety-force was given. # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
if test "${enable_thread_safety_force+set}" = set; then if test "${enable_thread_safety_force+set}" = set; then
enableval="$enable_thread_safety_force" enableval="$enable_thread_safety_force"
...@@ -3608,6 +3625,7 @@ echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6 ...@@ -3608,6 +3625,7 @@ echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
# Check whether --with-tcl or --without-tcl was given. # Check whether --with-tcl or --without-tcl was given.
if test "${with_tcl+set}" = set; then if test "${with_tcl+set}" = set; then
withval="$with_tcl" withval="$with_tcl"
...@@ -3641,6 +3659,7 @@ echo "${ECHO_T}$with_tcl" >&6 ...@@ -3641,6 +3659,7 @@ echo "${ECHO_T}$with_tcl" >&6
# Check whether --with-tclconfig or --without-tclconfig was given. # Check whether --with-tclconfig or --without-tclconfig was given.
if test "${with_tclconfig+set}" = set; then if test "${with_tclconfig+set}" = set; then
withval="$with_tclconfig" withval="$with_tclconfig"
...@@ -3672,6 +3691,7 @@ echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6 ...@@ -3672,6 +3691,7 @@ echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
# Check whether --with-perl or --without-perl was given. # Check whether --with-perl or --without-perl was given.
if test "${with_perl+set}" = set; then if test "${with_perl+set}" = set; then
withval="$with_perl" withval="$with_perl"
...@@ -3707,6 +3727,7 @@ echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6 ...@@ -3707,6 +3727,7 @@ echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
# Check whether --with-python or --without-python was given. # Check whether --with-python or --without-python was given.
if test "${with_python+set}" = set; then if test "${with_python+set}" = set; then
withval="$with_python" withval="$with_python"
...@@ -3742,6 +3763,7 @@ echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6 ...@@ -3742,6 +3763,7 @@ echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
# Check whether --with-krb5 or --without-krb5 was given. # Check whether --with-krb5 or --without-krb5 was given.
if test "${with_krb5+set}" = set; then if test "${with_krb5+set}" = set; then
withval="$with_krb5" withval="$with_krb5"
...@@ -3786,6 +3808,7 @@ echo "${ECHO_T}$with_krb5" >&6 ...@@ -3786,6 +3808,7 @@ echo "${ECHO_T}$with_krb5" >&6
# Check whether --with-krb-srvnam or --without-krb-srvnam was given. # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
if test "${with_krb_srvnam+set}" = set; then if test "${with_krb_srvnam+set}" = set; then
withval="$with_krb_srvnam" withval="$with_krb_srvnam"
...@@ -3825,6 +3848,7 @@ echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6 ...@@ -3825,6 +3848,7 @@ echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
# Check whether --with-pam or --without-pam was given. # Check whether --with-pam or --without-pam was given.
if test "${with_pam+set}" = set; then if test "${with_pam+set}" = set; then
withval="$with_pam" withval="$with_pam"
...@@ -3865,6 +3889,7 @@ echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6 ...@@ -3865,6 +3889,7 @@ echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
# Check whether --with-ldap or --without-ldap was given. # Check whether --with-ldap or --without-ldap was given.
if test "${with_ldap+set}" = set; then if test "${with_ldap+set}" = set; then
withval="$with_ldap" withval="$with_ldap"
...@@ -3905,6 +3930,7 @@ echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6 ...@@ -3905,6 +3930,7 @@ echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
# Check whether --with-bonjour or --without-bonjour was given. # Check whether --with-bonjour or --without-bonjour was given.
if test "${with_bonjour+set}" = set; then if test "${with_bonjour+set}" = set; then
withval="$with_bonjour" withval="$with_bonjour"
...@@ -3945,6 +3971,7 @@ echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6 ...@@ -3945,6 +3971,7 @@ echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
# Check whether --with-openssl or --without-openssl was given. # Check whether --with-openssl or --without-openssl was given.
if test "${with_openssl+set}" = set; then if test "${with_openssl+set}" = set; then
withval="$with_openssl" withval="$with_openssl"
...@@ -3983,6 +4010,7 @@ echo "${ECHO_T}$with_openssl" >&6 ...@@ -3983,6 +4010,7 @@ echo "${ECHO_T}$with_openssl" >&6
# Check whether --with-libedit-preferred or --without-libedit-preferred was given. # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
if test "${with_libedit_preferred+set}" = set; then if test "${with_libedit_preferred+set}" = set; then
withval="$with_libedit_preferred" withval="$with_libedit_preferred"
...@@ -4014,6 +4042,7 @@ fi; ...@@ -4014,6 +4042,7 @@ fi;
# Check whether --with-readline or --without-readline was given. # Check whether --with-readline or --without-readline was given.
if test "${with_readline+set}" = set; then if test "${with_readline+set}" = set; then
withval="$with_readline" withval="$with_readline"
...@@ -4055,6 +4084,7 @@ fi ...@@ -4055,6 +4084,7 @@ fi
# Check whether --with-zlib or --without-zlib was given. # Check whether --with-zlib or --without-zlib was given.
if test "${with_zlib+set}" = set; then if test "${with_zlib+set}" = set; then
withval="$with_zlib" withval="$with_zlib"
...@@ -22759,6 +22789,53 @@ fi ...@@ -22759,6 +22789,53 @@ fi
ac_config_headers="$ac_config_headers src/include/pg_config.h" ac_config_headers="$ac_config_headers src/include/pg_config.h"
#
# Warn about unknown options
#
for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do
case $var in
with_template) ;;
with_docdir) ;;
with_includes) ;;
with_libraries) ;;
with_libs) ;;
enable_integer_datetimes) ;;
enable_nls) ;;
with_pgport) ;;
enable_shared) ;;
enable_rpath) ;;
enable_spinlocks) ;;
enable_debug) ;;
with_CC) ;;
enable_depend) ;;
enable_cassert) ;;
enable_thread_safety) ;;
enable_thread_safety_force) ;;
with_tcl) ;;
with_tclconfig) ;;
with_perl) ;;
with_python) ;;
with_krb5) ;;
with_krb_srvnam) ;;
with_pam) ;;
with_ldap) ;;
with_bonjour) ;;
with_openssl) ;;
with_libedit_preferred) ;;
with_readline) ;;
with_zlib) ;;
with_gnu_ld) ;;
*)
echo -n "*** Option ignored: "
echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g'
;;
esac
done
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure # tests run on this system so they can be shared between configure
......
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.464 2006/04/29 20:47:29 tgl Exp $ dnl $PostgreSQL: pgsql/configure.in,v 1.465 2006/05/30 13:52:24 momjian Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
...@@ -1426,5 +1426,11 @@ AC_CONFIG_HEADERS([src/include/pg_config.h], ...@@ -1426,5 +1426,11 @@ AC_CONFIG_HEADERS([src/include/pg_config.h],
echo >src/include/stamp-h echo >src/include/stamp-h
]) ])
#
# Warn about unknown options
#
PGAC_CHECK_ARGS
AC_OUTPUT AC_OUTPUT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment