Commit 3bbd5a19 by Paolo Bonzini Committed by Paolo Bonzini

acinclude.m4 (gcc_AC_CHECK_PROG_VER): Remove.

gcc:
2007-06-14  Paolo Bonzini  <bonzini@gnu.org>

        * acinclude.m4 (gcc_AC_CHECK_PROG_VER): Remove.
        * aclocal.m4: Regenerate.
        * configure.ac: Use ACX_PROG_CC_WARNING_OPTS,
        ACX_PROG_CC_WARNINGS_ARE_ERRORS,
        ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_CHECK_PROG_VER.
	* configure: Regenerate.
        * Makefile.in (LOOSE_WARN): Subst loose_warn.

        * Makefile.in (quickstrap): Build libgcc too.

libiberty:
2007-06-14  Paolo Bonzini  <bonzini@gnu.org>

        * aclocal.m4: Include config/warnings.m4.
        * configure.ac: Use ACX_PROG_CC_WARNING_OPTS.
	* configure: Regenerate.

config:
2007-06-14  Paolo Bonzini  <bonzini@gnu.org>

        * acx.m4 (ACX_CHECK_PROG_VER): Remove duplicate lines.

From-SVN: r125700
parent ab28cc38
2007-06-14 Paolo Bonzini <bonzini@gnu.org>
* acx.m4 (ACX_CHECK_PROG_VER): Remove duplicate lines.
2007-06-04 Olivier Hainque <hainque@adacore.com> 2007-06-04 Olivier Hainque <hainque@adacore.com>
* mh-ppc-aix: Add default ADAFLAGS to BOOT_ADAFLAGS. * mh-ppc-aix: Add default ADAFLAGS to BOOT_ADAFLAGS.
......
...@@ -540,10 +540,6 @@ AC_DEFUN([ACX_CHECK_PROG_VER],[ ...@@ -540,10 +540,6 @@ AC_DEFUN([ACX_CHECK_PROG_VER],[
$5) gcc_cv_prog_$2_modern=yes;; $5) gcc_cv_prog_$2_modern=yes;;
*) gcc_cv_prog_$2_modern=no;; *) gcc_cv_prog_$2_modern=no;;
esac] esac]
if test $gcc_cv_prog_$2_modern = no; then
$1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2"
fi
]) ])
else else
gcc_cv_prog_$2_modern=no gcc_cv_prog_$2_modern=no
......
2007-06-14 Paolo Bonzini <bonzini@gnu.org> 2007-06-14 Paolo Bonzini <bonzini@gnu.org>
* acinclude.m4 (gcc_AC_CHECK_PROG_VER): Remove.
* aclocal.m4: Regenerate.
* configure.ac: Use ACX_PROG_CC_WARNING_OPTS,
ACX_PROG_CC_WARNINGS_ARE_ERRORS,
ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_CHECK_PROG_VER.
* configure: Regenerate.
* Makefile.in (LOOSE_WARN): Subst loose_warn.
* Makefile.in (quickstrap): Build libgcc too.
2007-06-14 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Add --enable-checking=df. Explicitly mention that * configure.ac: Add --enable-checking=df. Explicitly mention that
the variables are initialized as for "release". the variables are initialized as for "release".
* df-core.c: Use it. * df-core.c: Use it.
......
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
# "all.cross" to build a cross compiler. # "all.cross" to build a cross compiler.
all: @ALL@ all: @ALL@
# Provide quickstrap as a target that people can type into the gcc directory,
# and that fails if you're not into it.
quickstrap: all
# Depend on this to specify a phony target portably. # Depend on this to specify a phony target portably.
force: force:
...@@ -83,22 +79,27 @@ abs_docdir = @abs_srcdir@/doc ...@@ -83,22 +79,27 @@ abs_docdir = @abs_srcdir@/doc
# Top build directory for this package, relative to here. # Top build directory for this package, relative to here.
top_builddir = . top_builddir = .
# objdir is set by configure. # objdir is set by configure.
# It's normally the absolute path to the current directory. # It's normally the absolute path to the current directory.
objdir = @objdir@ objdir = @objdir@
host_subdir=@host_subdir@ host_subdir=@host_subdir@
build_subdir=@build_subdir@ build_subdir=@build_subdir@
target_subdir=@target_subdir@
build_libsubdir=@build_libsubdir@ build_libsubdir=@build_libsubdir@
# Top build directory for the "Cygnus tree", relative to $(top_builddir).
ifeq ($(host_subdir),.) ifeq ($(host_subdir),.)
build_objdir := ../$(build_subdir) toplevel_builddir := ..
build_libobjdir := ../$(build_libsubdir)
else else
build_objdir := ../../$(build_subdir) toplevel_builddir := ../..
build_libobjdir := ../../$(build_libsubdir)
endif endif
build_objdir := $(toplevel_builddir)/$(build_subdir)
build_libobjdir := $(toplevel_builddir)/$(build_libsubdir)
target_objdir := $(toplevel_builddir)/$(target_subdir)
# -------- # --------
# Defined vpaths # Defined vpaths
# -------- # --------
...@@ -166,7 +167,7 @@ coverageexts = .{gcda,gcno} ...@@ -166,7 +167,7 @@ coverageexts = .{gcda,gcno}
# apply to the back end and the C front end, which may be compiled # apply to the back end and the C front end, which may be compiled
# with other compilers. # with other compilers.
# CXX_COMPAT_WARN are C++ source compatibility warnings. # CXX_COMPAT_WARN are C++ source compatibility warnings.
LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes LOOSE_WARN = @loose_warn@
STRICT_WARN = @strict_warn@ STRICT_WARN = @strict_warn@
CXX_COMPAT_WARN = @cxx_compat_warn@ CXX_COMPAT_WARN = @cxx_compat_warn@
...@@ -1424,6 +1425,11 @@ config.status: $(srcdir)/configure $(srcdir)/config.gcc ...@@ -1424,6 +1425,11 @@ config.status: $(srcdir)/configure $(srcdir)/config.gcc
# UNSORTED # UNSORTED
# -------- # --------
# Provide quickstrap as a target that people can type into the gcc directory,
# and that fails if you're not into it.
quickstrap: all
cd $(toplevel_builddir) && $(MAKE) all-target-libgcc
all.internal: start.encap rest.encap doc all.internal: start.encap rest.encap doc
# This is what to compile if making a cross-compiler. # This is what to compile if making a cross-compiler.
all.cross: native gcc-cross$(exeext) cpp$(exeext) specs \ all.cross: native gcc-cross$(exeext) cpp$(exeext) specs \
......
...@@ -295,34 +295,6 @@ if test $gcc_cv_func_mmap_anon = yes; then ...@@ -295,34 +295,6 @@ if test $gcc_cv_func_mmap_anon = yes; then
fi fi
]) ])
dnl Locate a program and check that its version is acceptable.
dnl AC_PROG_CHECK_VER(var, name, version-switch,
dnl version-extract-regexp, version-glob)
AC_DEFUN([gcc_AC_CHECK_PROG_VER],
[AC_REQUIRE([gcc_AC_BUILD_EXEEXT])
AC_CHECK_PROG([$1], [$2], [$2])
if test -n "[$]$1"; then
# Found it, now check the version.
AC_CACHE_CHECK(for modern $2, gcc_cv_prog_$2_modern,
[changequote(<<,>>)dnl
ac_prog_version=`<<$>>$1 $3 2>&1 |
sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'`
changequote([,])dnl
echo "configure:__oline__: version of $2 is $ac_prog_version" >&AS_MESSAGE_LOG_FD
changequote(<<,>>)dnl
case $ac_prog_version in
'') gcc_cv_prog_$2_modern=no;;
<<$5>>)
gcc_cv_prog_$2_modern=yes;;
*) gcc_cv_prog_$2_modern=no;;
esac
changequote([,])dnl
])
else
gcc_cv_prog_$2_modern=no
fi
])
dnl Determine if enumerated bitfields are unsigned. ISO C says they can dnl Determine if enumerated bitfields are unsigned. ISO C says they can
dnl be either signed or unsigned. dnl be either signed or unsigned.
dnl dnl
......
...@@ -101,4 +101,5 @@ m4_include([../config/lib-ld.m4]) ...@@ -101,4 +101,5 @@ m4_include([../config/lib-ld.m4])
m4_include([../config/lib-link.m4]) m4_include([../config/lib-link.m4])
m4_include([../config/lib-prefix.m4]) m4_include([../config/lib-prefix.m4])
m4_include([../config/progtest.m4]) m4_include([../config/progtest.m4])
m4_include([../config/warnings.m4])
m4_include([acinclude.m4]) m4_include([acinclude.m4])
...@@ -309,7 +309,7 @@ ac_includes_default="\ ...@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict_warn cxx_compat_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ac_subst_files='language_hooks' ac_subst_files='language_hooks'
# Initialize some variables set by options. # Initialize some variables set by options.
...@@ -862,7 +862,7 @@ Optional Features: ...@@ -862,7 +862,7 @@ Optional Features:
put copies of generated files in source dir put copies of generated files in source dir
intended for creating source tarballs for users intended for creating source tarballs for users
without texinfo bison or flex. without texinfo bison or flex.
--enable-werror-always enable -Werror always --enable-werror-always enable -Werror despite compiler version
--enable-checking=LIST --enable-checking=LIST
enable expensive run-time checks. With LIST, enable expensive run-time checks. With LIST,
enable only specific categories of checks. enable only specific categories of checks.
...@@ -6106,13 +6106,18 @@ fi ...@@ -6106,13 +6106,18 @@ fi
# * overlong strings # * overlong strings
# So, we only use -pedantic if we can disable those warnings. # So, we only use -pedantic if we can disable those warnings.
echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 loose_warn=
echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 save_CFLAGS="$CFLAGS"
if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes; do
as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
if eval "test \"\${$as_acx_Woption+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
save_CFLAGS="$CFLAGS" CFLAGS="$option"
CFLAGS="-Wno-long-long"
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
...@@ -6120,6 +6125,13 @@ cat confdefs.h >>conftest.$ac_ext ...@@ -6120,6 +6125,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF _ACEOF
rm -f conftest.$ac_objext rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
...@@ -6143,27 +6155,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -6143,27 +6155,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_prog_cc_w_no_long_long=yes eval "$as_acx_Woption=yes"
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_w_no_long_long=no eval "$as_acx_Woption=no"
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
if test `eval echo '${'$as_acx_Woption'}'` = yes; then
loose_warn="$loose_warn${loose_warn:+ }$option"
fi
echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 done
echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 CFLAGS="$save_CFLAGS"
if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
cxx_compat_warn=
save_CFLAGS="$CFLAGS"
for option in -Wc++-compat; do
as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
if eval "test \"\${$as_acx_Woption+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
save_CFLAGS="$CFLAGS" CFLAGS="$option"
CFLAGS="-Wno-variadic-macros"
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
...@@ -6171,6 +6192,13 @@ cat confdefs.h >>conftest.$ac_ext ...@@ -6171,6 +6192,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF _ACEOF
rm -f conftest.$ac_objext rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
...@@ -6194,27 +6222,37 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -6194,27 +6222,37 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_prog_cc_w_no_variadic_macros=yes eval "$as_acx_Woption=yes"
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_w_no_variadic_macros=no eval "$as_acx_Woption=no"
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
if test `eval echo '${'$as_acx_Woption'}'` = yes; then
cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option"
fi
done
CFLAGS="$save_CFLAGS"
echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5 strict_warn=
echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6 save_CFLAGS="$CFLAGS"
if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then for option in -Wold-style-definition \
-Wmissing-format-attribute; do
as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
if eval "test \"\${$as_acx_Woption+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
save_CFLAGS="$CFLAGS" CFLAGS="$option"
CFLAGS="-Wno-overlength-strings"
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
...@@ -6222,6 +6260,13 @@ cat confdefs.h >>conftest.$ac_ext ...@@ -6222,6 +6260,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF _ACEOF
rm -f conftest.$ac_objext rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
...@@ -6245,42 +6290,50 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -6245,42 +6290,50 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_prog_cc_w_no_overlength_strings=yes eval "$as_acx_Woption=yes"
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_w_no_overlength_strings=no eval "$as_acx_Woption=no"
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5 echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6 echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
if test `eval echo '${'$as_acx_Woption'}'` = yes; then
strict_warn= strict_warn="$strict_warn${strict_warn:+ }$option"
if test $ac_cv_prog_cc_w_no_long_long = yes \
&& test $ac_cv_prog_cc_w_no_variadic_macros = yes \
&& test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
strict_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
fi fi
# Add -Wold-style-definition if it's accepted done
echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 CFLAGS="$save_CFLAGS"
echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then if test "$GCC" = yes; then
echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
-Wno-overlength-strings" >&5
echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
-Wno-overlength-strings... $ECHO_C" >&6
if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="-Wold-style-definition" CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \
cat >conftest.$ac_ext <<_ACEOF -Wno-overlength-strings"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF _ACEOF
rm -f conftest.$ac_objext rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
...@@ -6304,151 +6357,44 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -6304,151 +6357,44 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_prog_cc_w_old_style_definition=yes acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_w_old_style_definition=no acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS" CFLAGS="$save_CFLAGS"
fi fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5
echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6
if test $ac_cv_prog_cc_w_old_style_definition = yes ; then if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then
strict_warn="${strict_warn} -Wold-style-definition" strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \
-Wno-overlength-strings"
fi fi
# Add -Wmissing-format-attribute if it's accepted
echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="-Wmissing-format-attribute"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_w_missing_format_attribute=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_w_missing_format_attribute=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
strict_warn="${strict_warn} -Wmissing-format-attribute"
fi
# Enable -Werror, period. # Check whether --enable-werror-always or --disable-werror-always was given.
# Check whether --enable-werror_always or --disable-werror_always was given.
if test "${enable_werror_always+set}" = set; then if test "${enable_werror_always+set}" = set; then
enableval="$enable_werror_always" enableval="$enable_werror_always"
else else
enable_werror_always=no enable_werror_always=no
fi; fi;
if test x${enable_werror_always} = xyes ; then if test $enable_werror_always = yes; then
strict_warn="${strict_warn} -Werror" strict_warn="$strict_warn${strict_warn:+ }-Werror"
fi
# Get C++ compatibility warning flag, if supported.
echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="-Wc++-compat"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_w_cxx_compat=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_w_cxx_compat=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
cxx_compat_warn="-Wc++-compat"
fi
# If the native compiler is GCC, we can enable warnings even in stage1. # The above macros do nothing if the compiler is not GCC. However, the
# That's useful for people building cross-compilers, or just running a # Makefile has more goo to add other flags, so this variabl is used to
# quick `make'. # enables warnings only for GCC.
warn_cflags= warn_cflags=
if test "x$GCC" = "xyes"; then if test "x$GCC" = "xyes"; then
warn_cflags='$(GCC_WARN_CFLAGS)' warn_cflags='$(GCC_WARN_CFLAGS)'
...@@ -6527,6 +6473,7 @@ _ACEOF ...@@ -6527,6 +6473,7 @@ _ACEOF
nocommon_flag=-fno-common nocommon_flag=-fno-common
fi fi
if test x$ac_df_checking != x ; then if test x$ac_df_checking != x ; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
...@@ -6534,7 +6481,6 @@ cat >>confdefs.h <<\_ACEOF ...@@ -6534,7 +6481,6 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF _ACEOF
fi fi
if test x$ac_assert_checking != x ; then if test x$ac_assert_checking != x ; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
...@@ -7622,14 +7568,10 @@ echo "${ECHO_T}no" >&6 ...@@ -7622,14 +7568,10 @@ echo "${ECHO_T}no" >&6
fi fi
MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
# See if makeinfo has been installed and is modern enough # See if makeinfo has been installed and is modern enough
# that we can use it. # that we can use it.
ac_executable_extensions="$build_exeext" # Extract the first word of "makeinfo", so it can be a program name with args.
# Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2 set dummy makeinfo; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5 echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
...@@ -7664,32 +7606,33 @@ else ...@@ -7664,32 +7606,33 @@ else
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi fi
if test -n "$MAKEINFO"; then if test -n "$MAKEINFO"; then
# Found it, now check the version. # Found it, now check the version.
echo "$as_me:$LINENO: checking for modern makeinfo" >&5 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
ac_prog_version=`$MAKEINFO --version 2>&1 | ac_prog_version=`eval $MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
echo "configure:7676: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;; '') gcc_cv_prog_makeinfo_modern=no;;
4.[4-9]*) 4.[4-9]*) gcc_cv_prog_makeinfo_modern=yes;;
gcc_cv_prog_makeinfo_modern=yes;;
*) gcc_cv_prog_makeinfo_modern=no;; *) gcc_cv_prog_makeinfo_modern=no;;
esac esac
fi fi
echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
else else
gcc_cv_prog_makeinfo_modern=no gcc_cv_prog_makeinfo_modern=no
fi fi
if test $gcc_cv_prog_makeinfo_modern = no; then
MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
fi
if test $gcc_cv_prog_makeinfo_modern = no; then if test $gcc_cv_prog_makeinfo_modern = no; then
MAKEINFO="$MISSING makeinfo"
{ echo "$as_me:$LINENO: WARNING: { echo "$as_me:$LINENO: WARNING:
*** Makeinfo is missing or too old. *** Makeinfo is missing or too old.
*** Info documentation will not be built." >&5 *** Info documentation will not be built." >&5
...@@ -7716,6 +7659,8 @@ echo "${ECHO_T}no" >&6 ...@@ -7716,6 +7659,8 @@ echo "${ECHO_T}no" >&6
fi fi
MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
# How about lex? # How about lex?
for ac_prog in flex for ac_prog in flex
do do
...@@ -17671,8 +17616,9 @@ s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t ...@@ -17671,8 +17616,9 @@ s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
s,@CPP@,$CPP,;t t s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t s,@EGREP@,$EGREP,;t t
s,@strict_warn@,$strict_warn,;t t s,@loose_warn@,$loose_warn,;t t
s,@cxx_compat_warn@,$cxx_compat_warn,;t t s,@cxx_compat_warn@,$cxx_compat_warn,;t t
s,@strict_warn@,$strict_warn,;t t
s,@warn_cflags@,$warn_cflags,;t t s,@warn_cflags@,$warn_cflags,;t t
s,@nocommon_flag@,$nocommon_flag,;t t s,@nocommon_flag@,$nocommon_flag,;t t
s,@TREEBROWSER@,$TREEBROWSER,;t t s,@TREEBROWSER@,$TREEBROWSER,;t t
......
...@@ -319,105 +319,18 @@ AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)]) ...@@ -319,105 +319,18 @@ AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)])
# * overlong strings # * overlong strings
# So, we only use -pedantic if we can disable those warnings. # So, we only use -pedantic if we can disable those warnings.
AC_CACHE_CHECK( ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
[whether ${CC} accepts -Wno-long-long], -Wmissing-prototypes], [loose_warn])
[ac_cv_prog_cc_w_no_long_long], ACX_PROG_CC_WARNING_OPTS([-Wc++-compat], [cxx_compat_warn])
[save_CFLAGS="$CFLAGS" ACX_PROG_CC_WARNING_OPTS([-Wold-style-definition \
CFLAGS="-Wno-long-long" -Wmissing-format-attribute], [strict_warn])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long -Wno-variadic-macros \
[ac_cv_prog_cc_w_no_long_long=yes], -Wno-overlength-strings], [strict_warn])
[ac_cv_prog_cc_w_no_long_long=no]) ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual], [strict_warn])
CFLAGS="$save_CFLAGS"
]) # The above macros do nothing if the compiler is not GCC. However, the
# Makefile has more goo to add other flags, so this variabl is used to
AC_CACHE_CHECK( # enables warnings only for GCC.
[whether ${CC} accepts -Wno-variadic-macros],
[ac_cv_prog_cc_w_no_variadic_macros],
[save_CFLAGS="$CFLAGS"
CFLAGS="-Wno-variadic-macros"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
[ac_cv_prog_cc_w_no_variadic_macros=yes],
[ac_cv_prog_cc_w_no_variadic_macros=no])
CFLAGS="$save_CFLAGS"
])
AC_CACHE_CHECK(
[whether ${CC} accepts -Wno-overlength-strings],
[ac_cv_prog_cc_w_no_overlength_strings],
[save_CFLAGS="$CFLAGS"
CFLAGS="-Wno-overlength-strings"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
[ac_cv_prog_cc_w_no_overlength_strings=yes],
[ac_cv_prog_cc_w_no_overlength_strings=no])
CFLAGS="$save_CFLAGS"
])
strict_warn=
if test $ac_cv_prog_cc_w_no_long_long = yes \
&& test $ac_cv_prog_cc_w_no_variadic_macros = yes \
&& test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
strict_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
fi
# Add -Wold-style-definition if it's accepted
AC_CACHE_CHECK(
[whether ${CC} accepts -Wold-style-definition],
[ac_cv_prog_cc_w_old_style_definition],
[save_CFLAGS="$CFLAGS"
CFLAGS="-Wold-style-definition"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
[ac_cv_prog_cc_w_old_style_definition=yes],
[ac_cv_prog_cc_w_old_style_definition=no])
CFLAGS="$save_CFLAGS"
])
if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
strict_warn="${strict_warn} -Wold-style-definition"
fi
# Add -Wmissing-format-attribute if it's accepted
AC_CACHE_CHECK(
[whether ${CC} accepts -Wmissing-format-attribute],
[ac_cv_prog_cc_w_missing_format_attribute],
[save_CFLAGS="$CFLAGS"
CFLAGS="-Wmissing-format-attribute"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
[ac_cv_prog_cc_w_missing_format_attribute=yes],
[ac_cv_prog_cc_w_missing_format_attribute=no])
CFLAGS="$save_CFLAGS"
])
if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
strict_warn="${strict_warn} -Wmissing-format-attribute"
fi
# Enable -Werror, period.
AC_ARG_ENABLE(werror_always,
[ --enable-werror-always enable -Werror always], [],
[enable_werror_always=no])
if test x${enable_werror_always} = xyes ; then
strict_warn="${strict_warn} -Werror"
fi
AC_SUBST(strict_warn)
# Get C++ compatibility warning flag, if supported.
AC_CACHE_CHECK(
[whether ${CC} accepts -Wc++-compat],
[ac_cv_prog_cc_w_cxx_compat],
[save_CFLAGS="$CFLAGS"
CFLAGS="-Wc++-compat"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
[ac_cv_prog_cc_w_cxx_compat=yes],
[ac_cv_prog_cc_w_cxx_compat=no])
CFLAGS="$save_CFLAGS"
])
if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
cxx_compat_warn="-Wc++-compat"
fi
AC_SUBST(cxx_compat_warn)
# If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a
# quick `make'.
warn_cflags= warn_cflags=
if test "x$GCC" = "xyes"; then if test "x$GCC" = "xyes"; then
warn_cflags='$(GCC_WARN_CFLAGS)' warn_cflags='$(GCC_WARN_CFLAGS)'
...@@ -888,15 +801,12 @@ gcc_AC_PROG_CMP_IGNORE_INITIAL ...@@ -888,15 +801,12 @@ gcc_AC_PROG_CMP_IGNORE_INITIAL
# See if we have the mktemp command. # See if we have the mktemp command.
AC_CHECK_PROG(have_mktemp_command, mktemp, yes, no) AC_CHECK_PROG(have_mktemp_command, mktemp, yes, no)
MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
# See if makeinfo has been installed and is modern enough # See if makeinfo has been installed and is modern enough
# that we can use it. # that we can use it.
gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, ACX_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
[GNU texinfo.* \([0-9][0-9.]*\)], [GNU texinfo.* \([0-9][0-9.]*\)],
[4.[4-9]*]) [4.[4-9]*])
if test $gcc_cv_prog_makeinfo_modern = no; then if test $gcc_cv_prog_makeinfo_modern = no; then
MAKEINFO="$MISSING makeinfo"
AC_MSG_WARN([ AC_MSG_WARN([
*** Makeinfo is missing or too old. *** Makeinfo is missing or too old.
*** Info documentation will not be built.]) *** Info documentation will not be built.])
...@@ -917,6 +827,8 @@ else ...@@ -917,6 +827,8 @@ else
fi fi
AC_SUBST(GENERATED_MANPAGES) AC_SUBST(GENERATED_MANPAGES)
MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
# How about lex? # How about lex?
dnl Don't use AC_PROG_LEX; we insist on flex. dnl Don't use AC_PROG_LEX; we insist on flex.
dnl LEXLIB is not useful in gcc. dnl LEXLIB is not useful in gcc.
......
2007-06-14 Paolo Bonzini <bonzini@gnu.org>
* aclocal.m4: Include config/warnings.m4.
* configure.ac: Use ACX_PROG_CC_WARNING_OPTS.
* configure: Regenerate.
2007-06-07 Geoffrey Keating <geoffk@apple.com> 2007-06-07 Geoffrey Keating <geoffk@apple.com>
* configure.ac: Non-default multilibs can be cross compilations. * configure.ac: Non-default multilibs can be cross compilations.
......
sinclude(../config/acx.m4) sinclude(../config/acx.m4)
sinclude(../config/no-executables.m4) sinclude(../config/no-executables.m4)
sinclude(../config/warnings.m4)
dnl See whether strncmp reads past the end of its string parameters. dnl See whether strncmp reads past the end of its string parameters.
dnl On some versions of SunOS4 at least, strncmp reads a word at a time dnl On some versions of SunOS4 at least, strncmp reads a word at a time
......
...@@ -2953,15 +2953,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ...@@ -2953,15 +2953,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_c_preproc_warn_flag=yes ac_c_preproc_warn_flag=yes
# Warn C++ incompatibilities if supported.
echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5 ac_libiberty_warn_cflags=
echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6 save_CFLAGS="$CFLAGS"
if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then for option in -W -Wall -pedantic -Wwrite-strings -Wc++-compat \
-Wstrict-prototypes; do
as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
if eval "test \"\${$as_acx_Woption+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
save_CFLAGS="$CFLAGS" CFLAGS="$option"
CFLAGS="-Wc++-compat"
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
...@@ -2969,6 +2973,13 @@ cat confdefs.h >>conftest.$ac_ext ...@@ -2969,6 +2973,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF _ACEOF
rm -f conftest.$ac_objext rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
...@@ -2992,28 +3003,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -2992,28 +3003,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_prog_cc_w_cxx_compat=yes eval "$as_acx_Woption=yes"
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_w_cxx_compat=no eval "$as_acx_Woption=no"
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
if test x$GCC = xyes; then
ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
fi fi
if test $ac_cv_prog_cc_w_cxx_compat = yes ; then echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat" echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
if test `eval echo '${'$as_acx_Woption'}'` = yes; then
ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$option"
fi fi
done
CFLAGS="$save_CFLAGS"
if test "x$CC" != xcc; then if test "x$CC" != xcc; then
echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
......
...@@ -132,26 +132,8 @@ GCC_NO_EXECUTABLES ...@@ -132,26 +132,8 @@ GCC_NO_EXECUTABLES
AC_PROG_CC AC_PROG_CC
AC_PROG_CPP_WERROR AC_PROG_CPP_WERROR
# Warn C++ incompatibilities if supported. ACX_PROG_CC_WARNING_OPTS([-W -Wall -pedantic -Wwrite-strings -Wc++-compat \
AC_CACHE_CHECK( -Wstrict-prototypes], [ac_libiberty_warn_cflags])
[whether ${CC} accepts -Wc++-compat],
[ac_cv_prog_cc_w_cxx_compat],
[save_CFLAGS="$CFLAGS"
CFLAGS="-Wc++-compat"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
[ac_cv_prog_cc_w_cxx_compat=yes],
[ac_cv_prog_cc_w_cxx_compat=no])
CFLAGS="$save_CFLAGS"
])
if test x$GCC = xyes; then
ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
fi
if test $ac_cv_prog_cc_w_cxx_compat = yes ; then
ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat"
fi
AC_SUBST(ac_libiberty_warn_cflags)
AC_PROG_CC_C_O AC_PROG_CC_C_O
# autoconf is lame and doesn't give us any substitution variable for this. # autoconf is lame and doesn't give us any substitution variable for this.
......
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