Skip to content

Commit 51730eb

Browse files
author
wilx
committed
configure.in: Sync with PRODUCTION_1_0_x. Use AX_CXXFLAGS_WARN_ALL only when $enable_warnings = yes.
Check the value of --enable-threads argument. configure: Regenerate.
1 parent e55cdc4 commit 51730eb

File tree

2 files changed

+111
-94
lines changed

2 files changed

+111
-94
lines changed

configure

Lines changed: 103 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -15964,97 +15964,6 @@ if test "$ac_res" != no; then
1596415964
fi
1596515965

1596615966

15967-
{ $as_echo "$as_me:$LINENO: checking CXXFLAGS for maximum warnings" >&5
15968-
$as_echo_n "checking CXXFLAGS for maximum warnings... " >&6; }
15969-
if test "${ac_cv_cxxflags_warn_all+set}" = set; then
15970-
$as_echo_n "(cached) " >&6
15971-
else
15972-
ac_cv_cxxflags_warn_all="no, unknown"
15973-
15974-
ac_ext=cpp
15975-
ac_cpp='$CXXCPP $CPPFLAGS'
15976-
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15977-
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15978-
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15979-
15980-
ac_save_CXXFLAGS="$CXXFLAGS"
15981-
for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" #
15982-
do CXXFLAGS="$ac_save_CXXFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
15983-
cat >conftest.$ac_ext <<_ACEOF
15984-
/* confdefs.h. */
15985-
_ACEOF
15986-
cat confdefs.h >>conftest.$ac_ext
15987-
cat >>conftest.$ac_ext <<_ACEOF
15988-
/* end confdefs.h. */
15989-
15990-
int
15991-
main ()
15992-
{
15993-
return 0;
15994-
;
15995-
return 0;
15996-
}
15997-
_ACEOF
15998-
rm -f conftest.$ac_objext
15999-
if { (ac_try="$ac_compile"
16000-
case "(($ac_try" in
16001-
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16002-
*) ac_try_echo=$ac_try;;
16003-
esac
16004-
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16005-
$as_echo "$ac_try_echo") >&5
16006-
(eval "$ac_compile") 2>conftest.er1
16007-
ac_status=$?
16008-
grep -v '^ *+' conftest.er1 >conftest.err
16009-
rm -f conftest.er1
16010-
cat conftest.err >&5
16011-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16012-
(exit $ac_status); } && {
16013-
test -z "$ac_cxx_werror_flag" ||
16014-
test ! -s conftest.err
16015-
} && test -s conftest.$ac_objext; then
16016-
ac_cv_cxxflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
16017-
else
16018-
$as_echo "$as_me: failed program was:" >&5
16019-
sed 's/^/| /' conftest.$ac_ext >&5
16020-
16021-
16022-
fi
16023-
16024-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16025-
done
16026-
CXXFLAGS="$ac_save_CXXFLAGS"
16027-
ac_ext=cpp
16028-
ac_cpp='$CXXCPP $CPPFLAGS'
16029-
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16030-
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16031-
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16032-
16033-
16034-
fi
16035-
{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxxflags_warn_all" >&5
16036-
$as_echo "$ac_cv_cxxflags_warn_all" >&6; }
16037-
case ".$ac_cv_cxxflags_warn_all" in
16038-
.ok|.ok,*) ;;
16039-
.|.no|.no,*)
16040-
;;
16041-
*)
16042-
if echo " $CXXFLAGS " | grep " $ac_cv_cxxflags_warn_all " 2>&1 >/dev/null
16043-
then { ($as_echo "$as_me:$LINENO: : CXXFLAGS does contain \$ac_cv_cxxflags_warn_all") >&5
16044-
(: CXXFLAGS does contain $ac_cv_cxxflags_warn_all) 2>&5
16045-
ac_status=$?
16046-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16047-
(exit $ac_status); }
16048-
else { ($as_echo "$as_me:$LINENO: : CXXFLAGS=\"\$CXXFLAGS \$ac_cv_cxxflags_warn_all\"") >&5
16049-
(: CXXFLAGS="$CXXFLAGS $ac_cv_cxxflags_warn_all") 2>&5
16050-
ac_status=$?
16051-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052-
(exit $ac_status); }
16053-
CXXFLAGS="$CXXFLAGS $ac_cv_cxxflags_warn_all"
16054-
fi
16055-
;;
16056-
esac
16057-
1605815967

1605915968

1606015969
{ $as_echo "$as_me:$LINENO: checking the C++ compiler vendor" >&5
@@ -16300,6 +16209,101 @@ $as_echo "$ac_cv_cxx_compiler_vendor" >&6; }
1630016209

1630116210

1630216211

16212+
if test "x$enable_warnings" = "xyes"; then
16213+
{ $as_echo "$as_me:$LINENO: checking CXXFLAGS for maximum warnings" >&5
16214+
$as_echo_n "checking CXXFLAGS for maximum warnings... " >&6; }
16215+
if test "${ac_cv_cxxflags_warn_all+set}" = set; then
16216+
$as_echo_n "(cached) " >&6
16217+
else
16218+
ac_cv_cxxflags_warn_all="no, unknown"
16219+
16220+
ac_ext=cpp
16221+
ac_cpp='$CXXCPP $CPPFLAGS'
16222+
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16223+
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16224+
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16225+
16226+
ac_save_CXXFLAGS="$CXXFLAGS"
16227+
for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" #
16228+
do CXXFLAGS="$ac_save_CXXFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
16229+
cat >conftest.$ac_ext <<_ACEOF
16230+
/* confdefs.h. */
16231+
_ACEOF
16232+
cat confdefs.h >>conftest.$ac_ext
16233+
cat >>conftest.$ac_ext <<_ACEOF
16234+
/* end confdefs.h. */
16235+
16236+
int
16237+
main ()
16238+
{
16239+
return 0;
16240+
;
16241+
return 0;
16242+
}
16243+
_ACEOF
16244+
rm -f conftest.$ac_objext
16245+
if { (ac_try="$ac_compile"
16246+
case "(($ac_try" in
16247+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16248+
*) ac_try_echo=$ac_try;;
16249+
esac
16250+
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16251+
$as_echo "$ac_try_echo") >&5
16252+
(eval "$ac_compile") 2>conftest.er1
16253+
ac_status=$?
16254+
grep -v '^ *+' conftest.er1 >conftest.err
16255+
rm -f conftest.er1
16256+
cat conftest.err >&5
16257+
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258+
(exit $ac_status); } && {
16259+
test -z "$ac_cxx_werror_flag" ||
16260+
test ! -s conftest.err
16261+
} && test -s conftest.$ac_objext; then
16262+
ac_cv_cxxflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
16263+
else
16264+
$as_echo "$as_me: failed program was:" >&5
16265+
sed 's/^/| /' conftest.$ac_ext >&5
16266+
16267+
16268+
fi
16269+
16270+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16271+
done
16272+
CXXFLAGS="$ac_save_CXXFLAGS"
16273+
ac_ext=cpp
16274+
ac_cpp='$CXXCPP $CPPFLAGS'
16275+
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16276+
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16277+
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16278+
16279+
16280+
fi
16281+
{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxxflags_warn_all" >&5
16282+
$as_echo "$ac_cv_cxxflags_warn_all" >&6; }
16283+
case ".$ac_cv_cxxflags_warn_all" in
16284+
.ok|.ok,*) ;;
16285+
.|.no|.no,*)
16286+
;;
16287+
*)
16288+
if echo " $CXXFLAGS " | grep " $ac_cv_cxxflags_warn_all " 2>&1 >/dev/null
16289+
then { ($as_echo "$as_me:$LINENO: : CXXFLAGS does contain \$ac_cv_cxxflags_warn_all") >&5
16290+
(: CXXFLAGS does contain $ac_cv_cxxflags_warn_all) 2>&5
16291+
ac_status=$?
16292+
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293+
(exit $ac_status); }
16294+
else { ($as_echo "$as_me:$LINENO: : CXXFLAGS=\"\$CXXFLAGS \$ac_cv_cxxflags_warn_all\"") >&5
16295+
(: CXXFLAGS="$CXXFLAGS $ac_cv_cxxflags_warn_all") 2>&5
16296+
ac_status=$?
16297+
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16298+
(exit $ac_status); }
16299+
CXXFLAGS="$CXXFLAGS $ac_cv_cxxflags_warn_all"
16300+
fi
16301+
;;
16302+
esac
16303+
16304+
fi
16305+
16306+
1630316307
case $ac_cxx_compiler_vendor in
1630416308
gnu) if test "x$enable_warnings" = "xyes"; then
1630516309
{ $as_echo "$as_me:$LINENO: checking CXXFLAGS for gcc -Wextra" >&5
@@ -21568,7 +21572,14 @@ _ACEOF
2156821572

2156921573
# Check whether --enable-threads was given.
2157021574
if test "${enable_threads+set}" = set; then
21571-
enableval=$enable_threads;
21575+
enableval=$enable_threads; case "${enableval}" in
21576+
yes) : ;;
21577+
no) : ;;
21578+
*) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-threads" >&5
21579+
$as_echo "$as_me: error: bad value ${enableval} for --enable-threads" >&2;}
21580+
{ (exit 1); exit 1; }; } ;;
21581+
esac
21582+
2157221583
else
2157321584
enable_threads=yes
2157421585
fi

configure.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dnl This version of log4cplus requires the follwing autotools versions:
33
dnl autoconf-2.62
44
dnl automake-1.10.1
55
dnl libtool-2.2.6
6+
67
AC_INIT([log4cplus],[1.1.0])
78
AC_CANONICAL_TARGET
89
AC_CONFIG_SRCDIR([src/logger.cxx])
@@ -92,9 +93,11 @@ LT_INIT([win32-dll])
9293
dnl Checks for programs.
9394
AC_SEARCH_LIBS([strerror], [cposix])
9495

95-
AX_CXXFLAGS_WARN_ALL
9696
AC_CXX_COMPILER_VENDOR([ac_cxx_compiler_vendor])
9797

98+
AS_IF([test "x$enable_warnings" = "xyes"],
99+
[AX_CXXFLAGS_WARN_ALL])
100+
98101
AS_CASE([$ac_cxx_compiler_vendor],
99102
[gnu],
100103
[AS_IF([test "x$enable_warnings" = "xyes"],
@@ -266,7 +269,10 @@ AH_TEMPLATE([LOG4CPLUS_USE_PTHREADS])
266269
AC_ARG_ENABLE([threads],
267270
[AS_HELP_STRING([--enable-threads=yes/no],
268271
[Use this option to create a singled-threaded version of this library])],
269-
[],
272+
[AS_CASE(["${enableval}"],
273+
[yes], [],
274+
[no], [],
275+
[AC_MSG_ERROR([bad value ${enableval} for --enable-threads])])],
270276
[enable_threads=yes])
271277

272278
AS_IF([test "x$enable_threads" = "xyes"],

0 commit comments

Comments
 (0)