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

Commit3828086

Browse files
committed
Emit warnings for unknown configure options.
Martijn van Oosterhout
1 parent4d06e86 commit3828086

File tree

3 files changed

+108
-2
lines changed

3 files changed

+108
-2
lines changed

‎config/general.m4

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/config/general.m4,v 1.3 2003/11/29 19:51:17 pgsql Exp $
1+
# $PostgreSQL: pgsql/config/general.m4,v 1.4 2006/05/30 13:52:25 momjian 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.
@@ -16,6 +16,9 @@
1616
m4_define([pgac_arg_to_variable],
1717
[$1[]_[]patsubst($2, -, _)])
1818

19+
# This is the divert which we store all declared 'with' and 'enable'
20+
# arguments for use with PGAC_CHECK_ARGS
21+
m4_define([_m4_divert(PGAC_ARGS)],5432)
1922

2023
# PGAC_ARG(TYPE, NAME, HELP-STRING,
2124
# [ACTION-IF-YES], [ACTION-IF-NO], [ACTION-IF-ARG],
@@ -28,6 +31,7 @@ m4_define([pgac_arg_to_variable],
2831

2932
AC_DEFUN([PGAC_ARG],
3033
[
34+
m4_divert_text([PGAC_ARGS],[pgac_arg_to_variable([$1],[$2])) ;;])
3135
m4_case([$1],
3236
3337
enable,[
@@ -68,6 +72,25 @@ AC_ARG_WITH([$2], [$3], [
6872
)
6973
])# PGAC_ARG
7074

75+
# PGAC_CHECK_ARGS()
76+
# -----------------
77+
# Checks if the user passed any --with/without/enable/disable arguments that
78+
# we don't recognise. Just prints out a warning message, so this should be
79+
# called near the end, so the user will see it.
80+
81+
AC_DEFUN([PGAC_CHECK_ARGS],
82+
[
83+
for var 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
92+
done
93+
])# PGAC_CHECK_ARGS
7194

7295
# PGAC_ARG_BOOL(TYPE, NAME, DEFAULT, HELP-STRING,
7396
# [ACTION-IF-YES], [ACTION-IF-NO])

‎configure

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,7 @@ echo $ECHO_N "checking which template to use... $ECHO_C" >&6
14601460

14611461

14621462

1463+
14631464
# Check whether --with-template or --without-template was given.
14641465
if test "${with_template+set}" = set; then
14651466
withval="$with_template"
@@ -1577,6 +1578,7 @@ tas_file=dummy.s
15771578

15781579

15791580

1581+
15801582
# Check whether --with-docdir or --without-docdir was given.
15811583
if test "${with_docdir+set}" = set; then
15821584
withval="$with_docdir"
@@ -1608,6 +1610,7 @@ fi;
16081610

16091611

16101612

1613+
16111614
# Check whether --with-includes or --without-includes was given.
16121615
if test "${with_includes+set}" = set; then
16131616
withval="$with_includes"
@@ -1638,6 +1641,7 @@ fi;
16381641

16391642

16401643

1644+
16411645
# Check whether --with-libraries or --without-libraries was given.
16421646
if test "${with_libraries+set}" = set; then
16431647
withval="$with_libraries"
@@ -1664,6 +1668,7 @@ fi;
16641668

16651669

16661670

1671+
16671672
# Check whether --with-libs or --without-libs was given.
16681673
if test "${with_libs+set}" = set; then
16691674
withval="$with_libs"
@@ -1695,6 +1700,7 @@ echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time su
16951700
echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
16961701

16971702

1703+
16981704
# Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
16991705
if test "${enable_integer_datetimes+set}" = set; then
17001706
enableval="$enable_integer_datetimes"
@@ -1733,6 +1739,7 @@ echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
17331739
echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
17341740

17351741

1742+
17361743
# Check whether --enable-nls or --disable-nls was given.
17371744
if test "${enable_nls+set}" = set; then
17381745
enableval="$enable_nls"
@@ -1776,6 +1783,7 @@ echo $ECHO_N "checking for default port number... $ECHO_C" >&6
17761783

17771784

17781785

1786+
17791787
# Check whether --with-pgport or --without-pgport was given.
17801788
if test "${with_pgport+set}" = set; then
17811789
withval="$with_pgport"
@@ -1820,6 +1828,7 @@ _ACEOF
18201828
#
18211829

18221830

1831+
18231832
# Check whether --enable-shared or --disable-shared was given.
18241833
if test "${enable_shared+set}" = set; then
18251834
enableval="$enable_shared"
@@ -1850,6 +1859,7 @@ fi;
18501859
#
18511860

18521861

1862+
18531863
# Check whether --enable-rpath or --disable-rpath was given.
18541864
if test "${enable_rpath+set}" = set; then
18551865
enableval="$enable_rpath"
@@ -1880,6 +1890,7 @@ fi;
18801890
#
18811891

18821892

1893+
18831894
# Check whether --enable-spinlocks or --disable-spinlocks was given.
18841895
if test "${enable_spinlocks+set}" = set; then
18851896
enableval="$enable_spinlocks"
@@ -1909,6 +1920,7 @@ fi;
19091920
#
19101921

19111922

1923+
19121924
# Check whether --enable-debug or --disable-debug was given.
19131925
if test "${enable_debug+set}" = set; then
19141926
enableval="$enable_debug"
@@ -1944,6 +1956,7 @@ fi;
19441956

19451957

19461958

1959+
19471960
# Check whether --with-CC or --without-CC was given.
19481961
if test "${with_CC+set}" = set; then
19491962
withval="$with_CC"
@@ -3438,6 +3451,7 @@ fi
34383451
#
34393452

34403453

3454+
34413455
# Check whether --enable-depend or --disable-depend was given.
34423456
if test "${enable_depend+set}" = set; then
34433457
enableval="$enable_depend"
@@ -3469,6 +3483,7 @@ fi;
34693483
#
34703484

34713485

3486+
34723487
# Check whether --enable-cassert or --disable-cassert was given.
34733488
if test "${enable_cassert+set}" = set; then
34743489
enableval="$enable_cassert"
@@ -3539,6 +3554,7 @@ echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
35393554
echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
35403555

35413556

3557+
35423558
# Check whether --enable-thread-safety or --disable-thread-safety was given.
35433559
if test "${enable_thread_safety+set}" = set; then
35443560
enableval="$enable_thread_safety"
@@ -3564,6 +3580,7 @@ fi;
35643580

35653581

35663582

3583+
35673584
# Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
35683585
if test "${enable_thread_safety_force+set}" = set; then
35693586
enableval="$enable_thread_safety_force"
@@ -3608,6 +3625,7 @@ echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
36083625

36093626

36103627

3628+
36113629
# Check whether --with-tcl or --without-tcl was given.
36123630
if test "${with_tcl+set}" = set; then
36133631
withval="$with_tcl"
@@ -3641,6 +3659,7 @@ echo "${ECHO_T}$with_tcl" >&6
36413659

36423660

36433661

3662+
36443663
# Check whether --with-tclconfig or --without-tclconfig was given.
36453664
if test "${with_tclconfig+set}" = set; then
36463665
withval="$with_tclconfig"
@@ -3672,6 +3691,7 @@ echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
36723691

36733692

36743693

3694+
36753695
# Check whether --with-perl or --without-perl was given.
36763696
if test "${with_perl+set}" = set; then
36773697
withval="$with_perl"
@@ -3707,6 +3727,7 @@ echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
37073727

37083728

37093729

3730+
37103731
# Check whether --with-python or --without-python was given.
37113732
if test "${with_python+set}" = set; then
37123733
withval="$with_python"
@@ -3742,6 +3763,7 @@ echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
37423763

37433764

37443765

3766+
37453767
# Check whether --with-krb5 or --without-krb5 was given.
37463768
if test "${with_krb5+set}" = set; then
37473769
withval="$with_krb5"
@@ -3786,6 +3808,7 @@ echo "${ECHO_T}$with_krb5" >&6
37863808

37873809

37883810

3811+
37893812
# Check whether --with-krb-srvnam or --without-krb-srvnam was given.
37903813
if test "${with_krb_srvnam+set}" = set; then
37913814
withval="$with_krb_srvnam"
@@ -3825,6 +3848,7 @@ echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
38253848

38263849

38273850

3851+
38283852
# Check whether --with-pam or --without-pam was given.
38293853
if test "${with_pam+set}" = set; then
38303854
withval="$with_pam"
@@ -3865,6 +3889,7 @@ echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
38653889

38663890

38673891

3892+
38683893
# Check whether --with-ldap or --without-ldap was given.
38693894
if test "${with_ldap+set}" = set; then
38703895
withval="$with_ldap"
@@ -3905,6 +3930,7 @@ echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
39053930

39063931

39073932

3933+
39083934
# Check whether --with-bonjour or --without-bonjour was given.
39093935
if test "${with_bonjour+set}" = set; then
39103936
withval="$with_bonjour"
@@ -3945,6 +3971,7 @@ echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
39453971

39463972

39473973

3974+
39483975
# Check whether --with-openssl or --without-openssl was given.
39493976
if test "${with_openssl+set}" = set; then
39503977
withval="$with_openssl"
@@ -3983,6 +4010,7 @@ echo "${ECHO_T}$with_openssl" >&6
39834010

39844011

39854012

4013+
39864014
# Check whether --with-libedit-preferred or --without-libedit-preferred was given.
39874015
if test "${with_libedit_preferred+set}" = set; then
39884016
withval="$with_libedit_preferred"
@@ -4014,6 +4042,7 @@ fi;
40144042

40154043

40164044

4045+
40174046
# Check whether --with-readline or --without-readline was given.
40184047
if test "${with_readline+set}" = set; then
40194048
withval="$with_readline"
@@ -4055,6 +4084,7 @@ fi
40554084

40564085

40574086

4087+
40584088
# Check whether --with-zlib or --without-zlib was given.
40594089
if test "${with_zlib+set}" = set; then
40604090
withval="$with_zlib"
@@ -22759,6 +22789,53 @@ fi
2275922789
ac_config_headers="$ac_config_headers src/include/pg_config.h"
2276022790

2276122791

22792+
#
22793+
# Warn about unknown options
22794+
#
22795+
22796+
22797+
for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do
22798+
case $var in
22799+
with_template) ;;
22800+
with_docdir) ;;
22801+
with_includes) ;;
22802+
with_libraries) ;;
22803+
with_libs) ;;
22804+
enable_integer_datetimes) ;;
22805+
enable_nls) ;;
22806+
with_pgport) ;;
22807+
enable_shared) ;;
22808+
enable_rpath) ;;
22809+
enable_spinlocks) ;;
22810+
enable_debug) ;;
22811+
with_CC) ;;
22812+
enable_depend) ;;
22813+
enable_cassert) ;;
22814+
enable_thread_safety) ;;
22815+
enable_thread_safety_force) ;;
22816+
with_tcl) ;;
22817+
with_tclconfig) ;;
22818+
with_perl) ;;
22819+
with_python) ;;
22820+
with_krb5) ;;
22821+
with_krb_srvnam) ;;
22822+
with_pam) ;;
22823+
with_ldap) ;;
22824+
with_bonjour) ;;
22825+
with_openssl) ;;
22826+
with_libedit_preferred) ;;
22827+
with_readline) ;;
22828+
with_zlib) ;;
22829+
22830+
with_gnu_ld) ;;
22831+
*)
22832+
echo -n "*** Option ignored: "
22833+
echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g'
22834+
;;
22835+
esac
22836+
done
22837+
22838+
2276222839
cat >confcache <<\_ACEOF
2276322840
# This file is a shell script that caches the results of configure
2276422841
# tests run on this system so they can be shared between configure

‎configure.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.464 2006/04/29 20:47:29 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.465 2006/05/30 13:52:24 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1426,5 +1426,11 @@ AC_CONFIG_HEADERS([src/include/pg_config.h],
14261426
echo >src/include/stamp-h
14271427
])
14281428

1429+
#
1430+
# Warn about unknown options
1431+
#
1432+
1433+
PGAC_CHECK_ARGS
1434+
14291435
AC_OUTPUT
14301436

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp