* PATCH to run autoconf tests with C++ compiler
@ 2015-05-22 7:45 Jason Merrill
2015-05-25 21:05 ` Alexandre Oliva
2015-05-27 10:02 ` Andreas Schwab
0 siblings, 2 replies; 6+ messages in thread
From: Jason Merrill @ 2015-05-22 7:45 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches List
[-- Attachment #1: Type: text/plain, Size: 466 bytes --]
My earlier patch to compile stage 1 with -std=c++98 ran into trouble on
FreeBSD, where that flag suppresses declaration of C99 library functions
like strtoull. I was surprised that configure was seeing the
declaration, but discovered that this was because configure was using
the C compiler rather than the C++ compiler. This patch changes GCC
configury to always use C++, and to use the normal AC_CHECK_DECLS for
overloaded functions.
OK for trunk?
Jason
[-- Attachment #2: conf-cxx.patch --]
[-- Type: text/x-patch, Size: 66053 bytes --]
commit fc47dba7c20126a51d28c34ac31be8c31ebd1ef5
Author: Jason Merrill <jason@redhat.com>
Date: Thu May 21 14:05:35 2015 -0400
* configure.ac: Use C++ for all tests. Use AC_CHECK_DECLS for
strstr and basename.
* configure: Regenerate.
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 810725c..5f9ed92 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -285,6 +285,9 @@ AC_PROG_CC
AC_PROG_CXX
ACX_PROG_GNAT([-I"$srcdir"/ada])
+# Do configure tests with the C++ compiler, since that's what we build with.
+AC_LANG(C++)
+
# Remove the -O2: for historical reasons, unless bootstrapping we prefer
# optimizations to be activated explicitly by the toplevel.
case "$CC" in
@@ -321,7 +324,6 @@ if test x"$ac_cv_c_uint64_t" = x"no" -o x"$ac_cv_c_int64_t" = x"no"; then
fi
# check what underlying integer type int64_t uses
-AC_LANG_PUSH(C++)
AC_CACHE_CHECK(for int64_t underlying type, ac_cv_int64_t_type, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_STDINT_H
@@ -344,7 +346,6 @@ template <>
struct X<long long> { typedef long long t; };
]], [[X<int64_t>::t x;]])],[],[AC_MSG_ERROR([error verifying int64_t uses long long])])
fi
-AC_LANG_POP(C++)
@@ -1050,19 +1051,14 @@ m4_pushdef([AC_MSG_ERROR], m4_defn([AC_MSG_WARN]))[]dnl
AC_PROG_CXXCPP
m4_popdef([AC_MSG_ERROR])[]dnl
-AC_LANG_PUSH(C++)
-
AC_CHECK_HEADERS(unordered_map)
AC_CHECK_HEADERS(tr1/unordered_map)
AC_CHECK_HEADERS(ext/hash_map)
-AC_LANG_POP(C++)
-
# --------
# Dependency checking.
# --------
-AC_LANG_PUSH(C++)
ZW_CREATE_DEPDIR
AC_CONFIG_COMMANDS([gccdepdir],[
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs build/$DEPDIR
@@ -1072,7 +1068,6 @@ AC_CONFIG_COMMANDS([gccdepdir],[
done], [subdirs="$subdirs" ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
ZW_PROG_COMPILER_DEPENDENCIES([CXX])
-AC_LANG_POP(C++)
# --------
# UNSORTED
@@ -1192,11 +1187,7 @@ case "${host}" in
esac
AC_FUNC_FORK
-# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different
-# iconv() prototype.
-AC_LANG_PUSH([C++])
AM_ICONV
-AC_LANG_POP([C++])
# Until we have in-tree GNU iconv:
LIBICONV_DEP=
@@ -1211,11 +1202,22 @@ saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
saved_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
+
+# gcc_AC_CHECK_DECLS doesn't support overloaded functions, so use the
+# normal autoconf function for these. But force definition of
+# HAVE_DECL_BASENAME like gcc_AC_CHECK_DECLS does, to suppress the bizarre
+# basename handling in libiberty.h.
+AC_CHECK_DECLS([basename(const char*), strstr(const char*,const char*)], , ,[
+#undef HAVE_DECL_BASENAME
+#define HAVE_DECL_BASENAME 1
+#include "ansidecl.h"
+#include "system.h"])
+
gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd \
- stpcpy strnlen strsignal strstr strverscmp \
+ madvise stpcpy strnlen strsignal strverscmp \
strtol strtoul strtoll strtoull \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
- free basename getopt clock getpagesize ffs gcc_UNLOCKED_FUNCS, , ,[
+ free getopt clock getpagesize ffs gcc_UNLOCKED_FUNCS, , ,[
#include "ansidecl.h"
#include "system.h"])
@@ -1264,15 +1266,6 @@ gcc_AC_CHECK_DECLS(sigaltstack, , ,[
#include <signal.h>
])
-# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which hides the madvise()
-# prototype.
-AC_LANG_PUSH([C++])
-gcc_AC_CHECK_DECLS(madvise, , ,[
- #include "ansidecl.h"
- #include "system.h"
-])
-AC_LANG_POP([C++])
-
# More time-related stuff.
AC_CACHE_CHECK(for struct tms, ac_cv_struct_tms, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
diff --git a/gcc/configure b/gcc/configure
index b99eb6d..6d808be 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -740,7 +740,6 @@ COLLECT2_LIBS
CXXDEPMODE
DEPDIR
am__leading_dot
-CXXCPP
doc_build_sys
AR
NM
@@ -792,9 +791,10 @@ c_strict_warn
strict_warn
c_loose_warn
loose_warn
+CPP
EGREP
GREP
-CPP
+CXXCPP
PICFLAG_FOR_TARGET
GNATMAKE
GNATBIND
@@ -950,8 +950,8 @@ CPPFLAGS
CXX
CXXFLAGS
CCC
-CPP
CXXCPP
+CPP
GMPLIBS
GMPINC
ISLLIBS
@@ -1734,8 +1734,8 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
- CPP C preprocessor
CXXCPP C++ preprocessor
+ CPP C preprocessor
GMPLIBS How to link GMP
GMPINC How to find GMP include files
ISLLIBS How to link ISL
@@ -1897,10 +1897,10 @@ fi
} # ac_fn_cxx_try_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
+ac_fn_cxx_try_cpp ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_cpp conftest.$ac_ext"
@@ -1919,7 +1919,7 @@ $as_echo "$ac_try_echo"; } >&5
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
}; then :
ac_retval=0
@@ -1932,14 +1932,14 @@ fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
return $ac_retval
-} # ac_fn_c_try_cpp
+} # ac_fn_cxx_try_cpp
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
-ac_fn_c_check_header_mongrel ()
+ac_fn_cxx_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
@@ -1960,7 +1960,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
$4
#include <$2>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_header_compiler=yes
else
ac_header_compiler=no
@@ -1976,7 +1976,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <$2>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_cxx_try_cpp "$LINENO"; then :
ac_header_preproc=yes
else
ac_header_preproc=no
@@ -1986,7 +1986,7 @@ rm -f conftest.err conftest.$ac_ext
$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
yes:no: )
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
@@ -2019,13 +2019,13 @@ $as_echo "$ac_res" >&6; }
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-} # ac_fn_c_check_header_mongrel
+} # ac_fn_cxx_check_header_mongrel
-# ac_fn_c_try_run LINENO
-# ----------------------
+# ac_fn_cxx_try_run LINENO
+# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
-ac_fn_c_try_run ()
+ac_fn_cxx_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
@@ -2061,13 +2061,13 @@ fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
return $ac_retval
-} # ac_fn_c_try_run
+} # ac_fn_cxx_try_run
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
+# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
+ac_fn_cxx_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
@@ -2080,7 +2080,7 @@ else
$4
#include <$2>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
@@ -2092,14 +2092,51 @@ eval ac_res=\$$3
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-} # ac_fn_c_check_header_compile
+} # ac_fn_cxx_check_header_compile
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
+# ----------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
# INCLUDES, setting VAR accordingly. Returns whether the value could be
# computed
-ac_fn_c_compute_int ()
+ac_fn_cxx_compute_int ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if test "$cross_compiling" = yes; then
@@ -2117,7 +2154,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_lo=0 ac_mid=0
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2133,7 +2170,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_hi=$ac_mid; break
else
as_fn_arith $ac_mid + 1 && ac_lo=$as_val
@@ -2159,7 +2196,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_hi=-1 ac_mid=-1
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2175,7 +2212,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_lo=$ac_mid; break
else
as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
@@ -2209,7 +2246,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_hi=$ac_mid
else
as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
@@ -2257,7 +2294,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else
ac_retval=1
@@ -2270,13 +2307,13 @@ rm -f conftest.val
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
return $ac_retval
-} # ac_fn_c_compute_int
+} # ac_fn_cxx_compute_int
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
+# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES
+# ---------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
-ac_fn_c_check_type ()
+ac_fn_cxx_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
@@ -2297,7 +2334,7 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
@@ -2310,7 +2347,7 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
else
eval "$3=yes"
@@ -2324,7 +2361,7 @@ eval ac_res=\$$3
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-} # ac_fn_c_check_type
+} # ac_fn_cxx_check_type
# ac_fn_c_find_intX_t LINENO BITS VAR
# -----------------------------------
@@ -2354,7 +2391,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
@@ -2369,7 +2406,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
else
case $ac_type in #(
@@ -2397,10 +2434,10 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_find_intX_t
-# ac_fn_c_try_link LINENO
-# -----------------------
+# ac_fn_cxx_try_link LINENO
+# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
+ac_fn_cxx_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
@@ -2420,7 +2457,7 @@ $as_echo "$ac_try_echo"; } >&5
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
+ test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
@@ -2441,7 +2478,7 @@ fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
return $ac_retval
-} # ac_fn_c_try_link
+} # ac_fn_cxx_try_link
# ac_fn_c_find_uintX_t LINENO BITS VAR
# ------------------------------------
@@ -2471,7 +2508,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
case $ac_type in #(
uint$2_t) :
eval "$3=yes" ;; #(
@@ -2495,72 +2532,6 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_find_uintX_t
-# ac_fn_c_check_header_preproc LINENO HEADER VAR
-# ----------------------------------------------
-# Tests whether HEADER is present, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_preproc ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f conftest.err conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_preproc
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
-
-} # ac_fn_cxx_try_cpp
-
# ac_fn_cxx_check_header_preproc LINENO HEADER VAR
# ------------------------------------------------
# Tests whether HEADER is present, setting the cache variable VAR accordingly.
@@ -2590,6 +2561,193 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_cxx_check_header_preproc
+# ac_fn_cxx_check_func LINENO FUNC VAR
+# ------------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_cxx_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_func
+
+# ac_fn_cxx_check_decl LINENO SYMBOL VAR
+# --------------------------------------
+# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+ac_fn_cxx_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_decl
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_preproc LINENO HEADER VAR
+# ----------------------------------------------
+# Tests whether HEADER is present, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_preproc ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_preproc
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2656,52 +2814,6 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_func
-
-# ac_fn_cxx_try_link LINENO
-# -------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
-
-} # ac_fn_cxx_try_link
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -4777,6 +4889,14 @@ else
fi
+# Do configure tests with the C++ compiler, since that's what we build with.
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
# Remove the -O2: for historical reasons, unless bootstrapping we prefer
# optimizations to be activated explicitly by the toplevel.
case "$CC" in
@@ -4876,26 +4996,22 @@ esac
# -------------------------
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
do
ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
+for ac_cxx_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
@@ -4912,7 +5028,7 @@ do
#endif
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_cxx_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
@@ -4926,7 +5042,7 @@ rm -f conftest.err conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_cxx_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
@@ -4944,17 +5060,17 @@ if $ac_preproc_ok; then :
fi
done
- ac_cv_prog_CPP=$CPP
+ ac_cv_prog_CXXCPP=$CXXCPP
fi
- CPP=$ac_cv_prog_CPP
+ CXXCPP=$ac_cv_prog_CXXCPP
else
- ac_cv_prog_CPP=$CPP
+ ac_cv_prog_CXXCPP=$CXXCPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
+for ac_cxx_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
@@ -4971,7 +5087,7 @@ do
#endif
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_cxx_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
@@ -4985,7 +5101,7 @@ rm -f conftest.err conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_cxx_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
@@ -5003,15 +5119,15 @@ if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
+as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." "$LINENO" 5; }
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
@@ -5164,7 +5280,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
ac_cv_header_stdc=no
@@ -5237,7 +5353,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
else
ac_cv_header_stdc=no
@@ -5261,7 +5377,7 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
eval as_val=\$$as_ac_Header
if test "x$as_val" = x""yes; then :
@@ -5275,7 +5391,7 @@ done
- ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+ ac_fn_cxx_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
if test "x$ac_cv_header_minix_config_h" = x""yes; then :
MINIX=yes
else
@@ -5314,7 +5430,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_safe_to_define___extensions__=yes
else
ac_cv_safe_to_define___extensions__=no
@@ -5466,11 +5582,11 @@ as_fn_error "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." "$LINENO" 5; }
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
@@ -5488,7 +5604,7 @@ $ac_kw foo_t foo () {return 0; }
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_c_inline=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5552,12 +5668,12 @@ main ()
return 0;
}
_ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_cxx_try_compile "$LINENO"; then :
break
fi
rm -f core conftest.err conftest.$ac_objext
CC="$CC -n32"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_sys_largefile_CC=' -n32'; break
fi
rm -f core conftest.err conftest.$ac_objext
@@ -5598,7 +5714,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_sys_file_offset_bits=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5622,7 +5738,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_sys_file_offset_bits=64; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5667,7 +5783,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_sys_large_files=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5691,7 +5807,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_sys_large_files=1; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5724,7 +5840,7 @@ $as_echo_n "checking size of void *... " >&6; }
if test "${ac_cv_sizeof_void_p+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
else
if test "$ac_cv_type_void_p" = yes; then
@@ -5758,7 +5874,7 @@ $as_echo_n "checking size of short... " >&6; }
if test "${ac_cv_sizeof_short+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
else
if test "$ac_cv_type_short" = yes; then
@@ -5792,7 +5908,7 @@ $as_echo_n "checking size of int... " >&6; }
if test "${ac_cv_sizeof_int+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
else
if test "$ac_cv_type_int" = yes; then
@@ -5826,7 +5942,7 @@ $as_echo_n "checking size of long... " >&6; }
if test "${ac_cv_sizeof_long+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
else
if test "$ac_cv_type_long" = yes; then
@@ -5851,7 +5967,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
+ac_fn_cxx_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
if test "x$ac_cv_type_long_long" = x""yes; then :
cat >>confdefs.h <<_ACEOF
@@ -5867,7 +5983,7 @@ $as_echo_n "checking size of long long... " >&6; }
if test "${ac_cv_sizeof_long_long+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
else
if test "$ac_cv_type_long_long" = yes; then
@@ -5976,7 +6092,7 @@ main ()
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
if test "$cross_compiling" = yes; then :
ac_cv_type_long_long_int=yes
else
@@ -6006,7 +6122,7 @@ long long int n = 1;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
ac_cv_type_long_long_int=yes
else
ac_cv_type_long_long_int=no
@@ -6031,7 +6147,7 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
- ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
+ ac_fn_cxx_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
if test "x$ac_cv_type_intmax_t" = x""yes; then :
$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
@@ -6049,7 +6165,7 @@ fi
- ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+ ac_fn_cxx_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
if test "x$ac_cv_type_intptr_t" = x""yes; then :
$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
@@ -6069,7 +6185,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
cat >>confdefs.h <<_ACEOF
#define intptr_t $ac_type
@@ -6175,7 +6291,7 @@ main ()
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_type_unsigned_long_long_int=yes
else
ac_cv_type_unsigned_long_long_int=no
@@ -6193,7 +6309,7 @@ $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
- ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
+ ac_fn_cxx_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
if test "x$ac_cv_type_uintmax_t" = x""yes; then :
$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
@@ -6211,7 +6327,7 @@ fi
- ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+ ac_fn_cxx_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
if test "x$ac_cv_type_uintptr_t" = x""yes; then :
$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
@@ -6232,7 +6348,7 @@ test_array [0] = 0
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
cat >>confdefs.h <<_ACEOF
#define uintptr_t $ac_type
@@ -6263,13 +6379,6 @@ if test x"$ac_cv_c_uint64_t" = x"no" -o x"$ac_cv_c_int64_t" = x"no"; then
fi
# check what underlying integer type int64_t uses
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t underlying type" >&5
$as_echo_n "checking for int64_t underlying type... " >&6; }
if test "${ac_cv_int64_t_type+set}" = set; then :
@@ -6333,12 +6442,6 @@ else
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
@@ -6396,7 +6499,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6441,7 +6544,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6486,7 +6589,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6530,7 +6633,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6575,7 +6678,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6613,7 +6716,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
acx_cv_prog_cc_pedantic__Wlong_long__Wvariadic_macros__Woverlength_strings=yes
else
acx_cv_prog_cc_pedantic__Wlong_long__Wvariadic_macros__Woverlength_strings=no
@@ -6683,7 +6786,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6839,7 +6942,7 @@ fi
valgrind_path_defines=
valgrind_command=
-ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default"
+ac_fn_cxx_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default"
if test "x$ac_cv_header_valgrind_h" = x""yes; then :
have_valgrind_h=yes
else
@@ -6859,7 +6962,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#error VALGRIND_DISCARD not defined
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_cxx_try_cpp "$LINENO"; then :
gcc_cv_header_valgrind_memcheck_h=yes
else
gcc_cv_header_valgrind_memcheck_h=no
@@ -6876,7 +6979,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#error VALGRIND_DISCARD not defined
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_cxx_try_cpp "$LINENO"; then :
gcc_cv_header_memcheck_h=yes
else
gcc_cv_header_memcheck_h=no
@@ -8202,7 +8305,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
ac_cv_header_stdc=no
@@ -8275,7 +8378,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
else
ac_cv_header_stdc=no
@@ -8314,7 +8417,7 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_time=yes
else
ac_cv_header_time=no
@@ -8346,7 +8449,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
gcc_cv_header_string=yes
else
gcc_cv_header_string=no
@@ -8387,7 +8490,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_sys_wait_h=yes
else
ac_cv_header_sys_wait_h=no
@@ -8468,7 +8571,7 @@ for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
+ac_fn_cxx_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
eval as_val=\$$as_ac_Header
if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
@@ -8480,14 +8583,14 @@ done
# Check for thread headers.
-ac_fn_c_check_header_preproc "$LINENO" "thread.h" "ac_cv_header_thread_h"
+ac_fn_cxx_check_header_preproc "$LINENO" "thread.h" "ac_cv_header_thread_h"
if test "x$ac_cv_header_thread_h" = x""yes; then :
have_thread_h=yes
else
have_thread_h=
fi
-ac_fn_c_check_header_preproc "$LINENO" "pthread.h" "ac_cv_header_pthread_h"
+ac_fn_cxx_check_header_preproc "$LINENO" "pthread.h" "ac_cv_header_pthread_h"
if test "x$ac_cv_header_pthread_h" = x""yes; then :
have_pthread_h=yes
else
@@ -8545,7 +8648,7 @@ switch(0) {
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
gcc_cv_c_nbby=$i; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -8581,7 +8684,7 @@ else
typedef int dummy;
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
# Check for potential -arch flags. It is not universal unless
# there are at least two -arch flags with different values.
@@ -8626,7 +8729,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
# It does; now see whether it defined to BIG_ENDIAN or not.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8644,7 +8747,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_c_bigendian=yes
else
ac_cv_c_bigendian=no
@@ -8670,7 +8773,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
# It does; now see whether it defined to _BIG_ENDIAN or not.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8687,7 +8790,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_c_bigendian=yes
else
ac_cv_c_bigendian=no
@@ -8726,7 +8829,7 @@ return use_ascii (foo) == use_ebcdic (foo);
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
ac_cv_c_bigendian=yes
fi
@@ -8761,7 +8864,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
ac_cv_c_bigendian=no
else
ac_cv_c_bigendian=yes
@@ -8924,13 +9027,6 @@ $as_echo "$as_me: WARNING: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&2;}; }
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8938,7 +9034,6 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
for ac_header in unordered_map
do :
ac_fn_cxx_check_header_preproc "$LINENO" "unordered_map" "ac_cv_header_unordered_map"
@@ -8973,23 +9068,10 @@ fi
done
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
# --------
# Dependency checking.
# --------
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
@@ -9103,12 +9185,6 @@ else CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
# --------
# UNSORTED
@@ -9146,7 +9222,7 @@ return ldopen ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
gcc_cv_collect2_libs="$libs"; break
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -9198,7 +9274,7 @@ for ac_lib in '' exc; do
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_exc_resume=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -9261,7 +9337,7 @@ for ac_lib in '' kstat; do
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_kstat_open=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -9325,7 +9401,7 @@ for ac_lib in '' m; do
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_ldexp=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -9378,7 +9454,7 @@ choke me
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
gcc_cv_header_inttypes_h=yes
else
gcc_cv_header_inttypes_h=no
@@ -9402,7 +9478,7 @@ for ac_func in times clock kill getrlimit setrlimit atoll atoq \
clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked madvise
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
@@ -9431,7 +9507,7 @@ int main()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
gcc_cv_func_mbstowcs_works=yes
else
gcc_cv_func_mbstowcs_works=no
@@ -9450,7 +9526,7 @@ $as_echo "#define HAVE_WORKING_MBSTOWCS 1" >>confdefs.h
fi
fi
-ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
if test "x$ac_cv_type_ssize_t" = x""yes; then :
else
@@ -9461,7 +9537,7 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
+ac_fn_cxx_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
if test "x$ac_cv_type_caddr_t" = x""yes; then :
else
@@ -9474,14 +9550,14 @@ fi
-ac_fn_c_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h"
+ac_fn_cxx_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h"
if test "x$ac_cv_header_sys_mman_h" = x""yes; then :
gcc_header_sys_mman_h=yes
else
gcc_header_sys_mman_h=no
fi
-ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+ac_fn_cxx_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
if test "x$ac_cv_func_mmap" = x""yes; then :
gcc_func_mmap=yes
else
@@ -9562,7 +9638,7 @@ int n = MAP_ANONYMOUS;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
gcc_cv_decl_map_anon=yes
else
gcc_cv_decl_map_anon=no
@@ -9622,7 +9698,7 @@ case "${host}" in
ac_cv_func_vfork_works=yes
;;
esac
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
if test "x$ac_cv_type_pid_t" = x""yes; then :
else
@@ -9635,7 +9711,7 @@ fi
for ac_header in vfork.h
do :
- ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h"
+ ac_fn_cxx_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h"
if test "x$ac_cv_header_vfork_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_VFORK_H 1
@@ -9647,7 +9723,7 @@ done
for ac_func in fork vfork
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
@@ -9680,7 +9756,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
ac_cv_func_fork_works=yes
else
ac_cv_func_fork_works=no
@@ -9811,7 +9887,7 @@ main ()
}
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
ac_cv_func_vfork_works=yes
else
ac_cv_func_vfork_works=no
@@ -9847,14 +9923,6 @@ $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fi
-# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different
-# iconv() prototype.
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
if test "X$prefix" = "XNONE"; then
acl_final_prefix="$ac_default_prefix"
@@ -10551,12 +10619,6 @@ _ACEOF
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
# Until we have in-tree GNU iconv:
LIBICONV_DEP=
@@ -10579,7 +10641,7 @@ return LC_MESSAGES
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
am_cv_val_LC_MESSAGES=yes
else
am_cv_val_LC_MESSAGES=no
@@ -10613,7 +10675,7 @@ char* cs = nl_langinfo(CODESET);
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
am_cv_langinfo_codeset=yes
else
am_cv_langinfo_codeset=no
@@ -10636,11 +10698,48 @@ saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
saved_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
+
+# gcc_AC_CHECK_DECLS doesn't support overloaded functions, so use the
+# normal autoconf function for these. But force definition of
+# HAVE_DECL_BASENAME like gcc_AC_CHECK_DECLS does, to suppress the bizarre
+# basename handling in libiberty.h.
+ac_fn_cxx_check_decl "$LINENO" "basename(const char*)" "ac_cv_have_decl_basename_const_charp_" "
+#undef HAVE_DECL_BASENAME
+#define HAVE_DECL_BASENAME 1
+#include \"ansidecl.h\"
+#include \"system.h\"
+"
+if test "x$ac_cv_have_decl_basename_const_charp_" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME $ac_have_decl
+_ACEOF
+ac_fn_cxx_check_decl "$LINENO" "strstr(const char*,const char*)" "ac_cv_have_decl_strstr_const_charp_const_charp_" "
+#undef HAVE_DECL_BASENAME
+#define HAVE_DECL_BASENAME 1
+#include \"ansidecl.h\"
+#include \"system.h\"
+"
+if test "x$ac_cv_have_decl_strstr_const_charp_const_charp_" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR $ac_have_decl
+_ACEOF
+
+
for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
- stpcpy strnlen strsignal strstr strverscmp \
+ madvise stpcpy strnlen strsignal strverscmp \
strtol strtoul strtoll strtoull \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
- free basename getopt clock getpagesize ffs clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
+ free getopt clock getpagesize ffs clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
do
ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
@@ -10666,7 +10765,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "gcc_cv_have_decl_$ac_func=yes"
else
eval "gcc_cv_have_decl_$ac_func=no"
@@ -10721,7 +10820,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "gcc_cv_have_decl_$ac_func=yes"
else
eval "gcc_cv_have_decl_$ac_func=no"
@@ -10763,7 +10862,7 @@ rlim_t l = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
else
@@ -10808,7 +10907,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "gcc_cv_have_decl_$ac_func=yes"
else
eval "gcc_cv_have_decl_$ac_func=no"
@@ -10863,7 +10962,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
eval "gcc_cv_have_decl_$ac_func=yes"
else
eval "gcc_cv_have_decl_$ac_func=no"
@@ -10916,66 +11015,6 @@ char *(*pfn) = (char *(*)) $ac_func ;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "gcc_cv_have_decl_$ac_func=yes"
-else
- eval "gcc_cv_have_decl_$ac_func=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF
-#define $ac_tr_decl 1
-_ACEOF
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF
-#define $ac_tr_decl 0
-_ACEOF
-
-fi
-
-done
-
-
-# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which hides the madvise()
-# prototype.
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-for ac_func in madvise
-do
- ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5
-$as_echo_n "checking whether $ac_func is declared... " >&6; }
-if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#undef $ac_tr_decl
-#define $ac_tr_decl 1
-
- #include "ansidecl.h"
- #include "system.h"
-
-
-int
-main ()
-{
-#ifndef $ac_func
-char *(*pfn) = (char *(*)) $ac_func ;
-#endif
- ;
- return 0;
-}
-_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -11000,12 +11039,6 @@ fi
done
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
# More time-related stuff.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tms" >&5
@@ -11031,7 +11064,7 @@ struct tms tms;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_struct_tms=yes
else
ac_cv_struct_tms=no
@@ -11068,7 +11101,7 @@ clock_t x;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
gcc_cv_type_clock_t=yes
else
gcc_cv_type_clock_t=no
@@ -11108,7 +11141,7 @@ return fcntl (1, F_SETLKW, &fl);
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_f_setlkw=yes
else
ac_cv_f_setlkw=no
@@ -11154,7 +11187,7 @@ mkdir ("foo", 0);
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
gcc_cv_mkdir_takes_one_arg=no
else
gcc_cv_mkdir_takes_one_arg=yes
@@ -11383,7 +11416,7 @@ else
int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
gcc_cv_mcontext_underscores=no
else
gcc_cv_mcontext_underscores=yes
@@ -11448,7 +11481,7 @@ if test x$enable___cxa_atexit = xyes || \
use_cxa_atexit=yes
;;
*)
- ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit"
+ ac_fn_cxx_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit"
if test "x$ac_cv_func___cxa_atexit" = x""yes; then :
use_cxa_atexit=yes
else
@@ -11761,7 +11794,7 @@ for ac_lib in '' advapi32; do
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_RegOpenKeyExA=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -13852,6 +13885,7 @@ fi
+
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
@@ -14673,6 +14707,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
;;
esac
+
for ac_header in dlfcn.h
do :
ac_fn_c_check_header_preproc "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h"
@@ -18162,7 +18197,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18165 "configure"
+#line 18200 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18268,7 +18303,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18271 "configure"
+#line 18306 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18477,11 +18512,11 @@ $as_echo "$enable_static" >&6; }
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
CC="$lt_save_CC"
@@ -18615,11 +18650,11 @@ as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." "$LINENO" 5; }
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
else
_lt_caught_CXX_error=yes
@@ -21495,11 +21530,11 @@ fi
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
fi # test "$_lt_caught_CXX_error" != yes
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@@ -22630,7 +22665,7 @@ int foo (void) { x = 0; }
int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
gcc_cv_initfini_array=yes
else
gcc_cv_initfini_array=no
@@ -22709,7 +22744,7 @@ EOF
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_cxx_try_cpp "$LINENO"; then :
else
gcc_cv_initfini_array=no
@@ -24721,7 +24756,7 @@ fi
# etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we
# are configuring for a version of Cygwin that exports the wrappers.
if test x$host = x$target && test x$host_cpu = xi686; then
- ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj"
+ ac_fn_cxx_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj"
if test "x$ac_cv_func___wrap__Znaj" = x""yes; then :
gcc_ac_cygwin_dll_wrappers=yes
else
@@ -27443,7 +27478,7 @@ for clearcap_map in sol2-clearcapv2.map sol2-clearcap.map; do
/* end confdefs.h. */
int main(void) {return 0;}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
gcc_cv_ld_clearcap=yes; break
else
gcc_cv_ld_clearcap=no
@@ -27778,7 +27813,7 @@ fi
# All supported versions of musl provide it as well
gcc_cv_libc_provides_ssp=yes;;
*-*-darwin* | *-*-freebsd*)
- ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
+ ac_fn_cxx_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
if test "x$ac_cv_func___stack_chk_fail" = x""yes; then :
gcc_cv_libc_provides_ssp=yes
else
@@ -28269,7 +28304,7 @@ isl_schedule_constraints_compute_schedule (NULL);
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_has_isl_schedule_constraints_compute_schedule=yes
else
ac_has_isl_schedule_constraints_compute_schedule=no
@@ -28386,7 +28421,7 @@ for ac_lib in '' dl; do
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_dlopen=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -28443,7 +28478,7 @@ return X == 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; have_pic_shared=yes
else
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH to run autoconf tests with C++ compiler
2015-05-22 7:45 PATCH to run autoconf tests with C++ compiler Jason Merrill
@ 2015-05-25 21:05 ` Alexandre Oliva
2015-05-26 7:07 ` Alexandre Oliva
2015-05-27 10:02 ` Andreas Schwab
1 sibling, 1 reply; 6+ messages in thread
From: Alexandre Oliva @ 2015-05-25 21:05 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches List
On May 22, 2015, Jason Merrill <jason@redhat.com> wrote:
> * configure.ac: Use C++ for all tests. Use AC_CHECK_DECLS for
> strstr and basename.
> * configure: Regenerate.
This is ok, thanks.
I have one concern about scenarios in which config.cache is shared by
all builds for the host, but in which stage1 and stage2 compilers might
(and arguably should) get different results because of stage1's
-std=c++98, but with a shared config.cache, they won't. config.cache is
disabled by default, but I have it enabled and shared, so I might catch
any fallout from this change, so I'll keep my eyes open. It's not like
we couldn't have run into this before, due to differences between the
system C compiler and stage1, so... /me crosses fingers ;-)
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH to run autoconf tests with C++ compiler
2015-05-25 21:05 ` Alexandre Oliva
@ 2015-05-26 7:07 ` Alexandre Oliva
0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2015-05-26 7:07 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches List
On May 25, 2015, Alexandre Oliva <aoliva@redhat.com> wrote:
> I have one concern about scenarios in which config.cache is shared by
> all builds for the host, but in which stage1 and stage2 compilers might
> (and arguably should) get different results because of stage1's
> -std=c++98, but with a shared config.cache, they won't.
Nevermind, we don't share config.cache between host builds any more.
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH to run autoconf tests with C++ compiler
2015-05-22 7:45 PATCH to run autoconf tests with C++ compiler Jason Merrill
2015-05-25 21:05 ` Alexandre Oliva
@ 2015-05-27 10:02 ` Andreas Schwab
2015-05-27 13:32 ` Richard Biener
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2015-05-27 10:02 UTC (permalink / raw)
To: Jason Merrill; +Cc: Alexandre Oliva, gcc-patches List
This breaks all checks for supported compiler options:
configure:6382: checking whether gcc supports -Wnarrowing
configure:6399: gcc -c -Wnarrowing conftest.c >&5
cc1: error: unrecognized command line option "-Wnarrowing"
configure:6399: $? = 1
configure:6485: checking whether gcc supports -Wnarrowing
configure:6502: g++ -std=c++98 -c -g conftest.cpp >&5
configure:6502: $? = 0
configure:6511: result: yes
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH to run autoconf tests with C++ compiler
2015-05-27 10:02 ` Andreas Schwab
@ 2015-05-27 13:32 ` Richard Biener
2015-05-27 16:20 ` Jason Merrill
0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2015-05-27 13:32 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Jason Merrill, Alexandre Oliva, gcc-patches List
On Wed, May 27, 2015 at 10:49 AM, Andreas Schwab <schwab@suse.de> wrote:
> This breaks all checks for supported compiler options:
>
> configure:6382: checking whether gcc supports -Wnarrowing
> configure:6399: gcc -c -Wnarrowing conftest.c >&5
> cc1: error: unrecognized command line option "-Wnarrowing"
> configure:6399: $? = 1
>
> configure:6485: checking whether gcc supports -Wnarrowing
> configure:6502: g++ -std=c++98 -c -g conftest.cpp >&5
> configure:6502: $? = 0
> configure:6511: result: yes
And thus causes PR66304, bootstrap failure with host gcc 4.3 (at least).
Richard.
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH to run autoconf tests with C++ compiler
2015-05-27 13:32 ` Richard Biener
@ 2015-05-27 16:20 ` Jason Merrill
0 siblings, 0 replies; 6+ messages in thread
From: Jason Merrill @ 2015-05-27 16:20 UTC (permalink / raw)
To: Richard Biener, Andreas Schwab; +Cc: Alexandre Oliva, gcc-patches List
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
On 05/27/2015 08:54 AM, Richard Biener wrote:
> On Wed, May 27, 2015 at 10:49 AM, Andreas Schwab <schwab@suse.de> wrote:
>> This breaks all checks for supported compiler options:
>>
>> configure:6382: checking whether gcc supports -Wnarrowing
>> configure:6399: gcc -c -Wnarrowing conftest.c >&5
>> cc1: error: unrecognized command line option "-Wnarrowing"
>> configure:6399: $? = 1
>>
>> configure:6485: checking whether gcc supports -Wnarrowing
>> configure:6502: g++ -std=c++98 -c -g conftest.cpp >&5
>> configure:6502: $? = 0
>> configure:6511: result: yes
>
> And thus causes PR66304, bootstrap failure with host gcc 4.3 (at least).
Fixed thus:
[-- Attachment #2: 66304.patch --]
[-- Type: text/x-patch, Size: 18878 bytes --]
commit 0af5fc110196c2e9421f65c48ac09391bce031e3
Author: Jason Merrill <jason@redhat.com>
Date: Wed May 27 09:49:06 2015 -0400
PR bootstrap/66304
config/
* warnings.m4 (ACX_PROG_CXX_WARNING_OPTS)
(ACX_PROG_CXX_WARNINGS_ARE_ERRORS)
(ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New.
(ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC)
(ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context.
gcc/
* configure.ac: Use ACX_PROG_CXX_WARNING_OPTS,
ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC, and
ACX_PROG_CXX_WARNINGS_ARE_ERRORS.
* configure: Regenerate.
diff --git a/config/warnings.m4 b/config/warnings.m4
index b64b594..b5a149a 100644
--- a/config/warnings.m4
+++ b/config/warnings.m4
@@ -23,6 +23,7 @@
# compiler accepts.
AC_DEFUN([ACX_PROG_CC_WARNING_OPTS],
[AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_CFLAGS])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -48,6 +49,7 @@ for real_option in $1; do
done
CFLAGS="$save_CFLAGS"
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNING_OPTS
# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
@@ -55,6 +57,7 @@ m4_popdef([acx_Var])dnl
# and accepts all of those options simultaneously, otherwise to nothing.
AC_DEFUN([ACX_PROG_CC_WARNING_ALMOST_PEDANTIC],
[AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -77,6 +80,7 @@ AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
AS_VAR_POPDEF([acx_Pedantic])dnl
m4_popdef([acx_Woptions])dnl
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC
# ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
@@ -88,6 +92,7 @@ m4_popdef([acx_Var])dnl
# appeared on the configure command line.
AC_DEFUN([ACX_PROG_CC_WARNINGS_ARE_ERRORS],
[AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -114,4 +119,109 @@ AS_IF([test $enable_werror_always = yes],
[acx_Var="$acx_Var${acx_Var:+ }-Werror"])
AS_VAR_POPDEF([acx_GCCvers])])
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNINGS_ARE_ERRORS
+
+# ACX_PROG_CXX_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS)
+# Sets @VARIABLE@ to the subset of the given options which the
+# compiler accepts.
+AC_DEFUN([ACX_PROG_CXX_WARNING_OPTS],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_CXXFLAGS])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+save_CXXFLAGS="$CXXFLAGS"
+for real_option in $1; do
+ # Do the check with the no- prefix removed since gcc silently
+ # accepts any -Wno-* option on purpose
+ case $real_option in
+ -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
+ *) option=$real_option ;;
+ esac
+ AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option])
+ AC_CACHE_CHECK([whether $CXX supports $option], acx_Woption,
+ [CXXFLAGS="$option"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_VAR_SET(acx_Woption, yes)],
+ [AS_VAR_SET(acx_Woption, no)])
+ ])
+ AS_IF([test AS_VAR_GET(acx_Woption) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }$real_option"])
+ AS_VAR_POPDEF([acx_Woption])dnl
+done
+CXXFLAGS="$save_CXXFLAGS"
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNING_OPTS
+
+# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
+# Append to VARIABLE "-pedantic" + the argument, if the compiler is G++
+# and accepts all of those options simultaneously, otherwise to nothing.
+AC_DEFUN([ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+# Do the check with the no- prefix removed from the warning options
+# since gcc silently accepts any -Wno-* option on purpose
+m4_pushdef([acx_Woptions], [m4_bpatsubst([$1], [-Wno-], [-W])])dnl
+AS_VAR_PUSHDEF([acx_Pedantic], [acx_cv_prog_cc_pedantic_]acx_Woptions)dnl
+AS_IF([test "$GXX" = yes],
+[AC_CACHE_CHECK([whether $CXX supports -pedantic ]acx_Woptions, acx_Pedantic,
+[save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="-pedantic acx_Woptions"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_VAR_SET(acx_Pedantic, yes)],
+ [AS_VAR_SET(acx_Pedantic, no)])
+CXXFLAGS="$save_CXXFLAGS"])
+AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }-pedantic $1"])
+])
+AS_VAR_POPDEF([acx_Pedantic])dnl
+m4_popdef([acx_Woptions])dnl
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC
+
+# ACX_PROG_CXX_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
+# sets @VARIABLE@ to "-Werror" if the compiler is G++ >=x.y.z, or if
+# --enable-werror-always was given on the command line, otherwise
+# to nothing.
+# If the argument is the word "manual" instead of a version number,
+# then @VARIABLE@ will be set to -Werror only if --enable-werror-always
+# appeared on the configure command line.
+AC_DEFUN([ACX_PROG_CXX_WARNINGS_ARE_ERRORS],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+AC_ARG_ENABLE(werror-always,
+ AS_HELP_STRING([--enable-werror-always],
+ [enable -Werror despite compiler version]),
+[], [enable_werror_always=no])
+AS_IF([test $enable_werror_always = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+ m4_if($1, [manual],,
+ [AS_VAR_PUSHDEF([acx_GXXvers], [acx_cv_prog_cxx_gxx_$1_or_newer])dnl
+ AC_CACHE_CHECK([whether $CXX is G++ >=$1], acx_GXXvers,
+ [set fnord `echo $1 | tr '.' ' '`
+ shift
+ AC_PREPROC_IFELSE(
+[#if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ \
+ < [$]1 * 10000 + [$]2 * 100 + [$]3
+#error insufficient
+#endif],
+ [AS_VAR_SET(acx_GXXvers, yes)],
+ [AS_VAR_SET(acx_GXXvers, no)])])
+ AS_IF([test AS_VAR_GET(acx_GXXvers) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+ AS_VAR_POPDEF([acx_GXXvers])])
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNINGS_ARE_ERRORS
diff --git a/gcc/configure b/gcc/configure
index a62f232..f08c17f 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -6471,8 +6471,14 @@ if test $enable_build_format_warnings = no; then :
else
wf_opt=
fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
loose_warn=
-save_CFLAGS="$CFLAGS"
+save_CXXFLAGS="$CXXFLAGS"
for real_option in -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual $wf_opt; do
# Do the check with the no- prefix removed since gcc silently
# accepts any -Wno-* option on purpose
@@ -6482,12 +6488,12 @@ for real_option in -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual $wf_opt;
esac
as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
-$as_echo_n "checking whether $CC supports $option... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports $option" >&5
+$as_echo_n "checking whether $CXX supports $option... " >&6; }
if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
- CFLAGS="$option"
+ CXXFLAGS="$option"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6514,7 +6520,20 @@ $as_echo "$ac_res" >&6; }
loose_warn="$loose_warn${loose_warn:+ }$real_option"
fi
done
-CFLAGS="$save_CFLAGS"
+CXXFLAGS="$save_CXXFLAGS"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
c_loose_warn=
save_CFLAGS="$CFLAGS"
@@ -6544,7 +6563,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6560,9 +6579,21 @@ $as_echo "$ac_res" >&6; }
fi
done
CFLAGS="$save_CFLAGS"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
strict_warn=
-save_CFLAGS="$CFLAGS"
+save_CXXFLAGS="$CXXFLAGS"
for real_option in -Wmissing-format-attribute; do
# Do the check with the no- prefix removed since gcc silently
# accepts any -Wno-* option on purpose
@@ -6572,12 +6603,12 @@ for real_option in -Wmissing-format-attribute; do
esac
as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
-$as_echo_n "checking whether $CC supports $option... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports $option" >&5
+$as_echo_n "checking whether $CXX supports $option... " >&6; }
if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
- CFLAGS="$option"
+ CXXFLAGS="$option"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6604,9 +6635,21 @@ $as_echo "$ac_res" >&6; }
strict_warn="$strict_warn${strict_warn:+ }$real_option"
fi
done
-CFLAGS="$save_CFLAGS"
+CXXFLAGS="$save_CXXFLAGS"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-save_CFLAGS="$CFLAGS"
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+save_CXXFLAGS="$CXXFLAGS"
for real_option in -Woverloaded-virtual; do
# Do the check with the no- prefix removed since gcc silently
# accepts any -Wno-* option on purpose
@@ -6616,12 +6659,12 @@ for real_option in -Woverloaded-virtual; do
esac
as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
-$as_echo_n "checking whether $CC supports $option... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports $option" >&5
+$as_echo_n "checking whether $CXX supports $option... " >&6; }
if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
- CFLAGS="$option"
+ CXXFLAGS="$option"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6648,7 +6691,19 @@ $as_echo "$ac_res" >&6; }
strict_warn="$strict_warn${strict_warn:+ }$real_option"
fi
done
-CFLAGS="$save_CFLAGS"
+CXXFLAGS="$save_CXXFLAGS"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
c_strict_warn=
save_CFLAGS="$CFLAGS"
@@ -6678,7 +6733,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6694,17 +6749,29 @@ $as_echo "$ac_res" >&6; }
fi
done
CFLAGS="$save_CFLAGS"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Do the check with the no- prefix removed from the warning options
# since gcc silently accepts any -Wno-* option on purpose
-if test "$GCC" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wlong-long -Wvariadic-macros -Woverlength-strings" >&5
-$as_echo_n "checking whether $CC supports -pedantic -Wlong-long -Wvariadic-macros -Woverlength-strings... " >&6; }
+if test "$GXX" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -pedantic -Wlong-long -Wvariadic-macros -Woverlength-strings" >&5
+$as_echo_n "checking whether $CXX supports -pedantic -Wlong-long -Wvariadic-macros -Woverlength-strings... " >&6; }
if test "${acx_cv_prog_cc_pedantic__Wlong_long__Wvariadic_macros__Woverlength_strings+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- save_CFLAGS="$CFLAGS"
-CFLAGS="-pedantic -Wlong-long -Wvariadic-macros -Woverlength-strings"
+ save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="-pedantic -Wlong-long -Wvariadic-macros -Woverlength-strings"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6722,7 +6789,7 @@ else
acx_cv_prog_cc_pedantic__Wlong_long__Wvariadic_macros__Woverlength_strings=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CFLAGS="$save_CFLAGS"
+CXXFLAGS="$save_CXXFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wlong_long__Wvariadic_macros__Woverlength_strings" >&5
$as_echo "$acx_cv_prog_cc_pedantic__Wlong_long__Wvariadic_macros__Woverlength_strings" >&6; }
@@ -6731,6 +6798,18 @@ if test $acx_cv_prog_cc_pedantic__Wlong_long__Wvariadic_macros__Woverlength_stri
fi
fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Check whether --enable-werror-always was given.
if test "${enable_werror_always+set}" = set; then :
@@ -6743,6 +6822,12 @@ if test $enable_werror_always = yes; then :
strict_warn="$strict_warn${strict_warn:+ }-Werror"
fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
# The above macros do nothing if the compiler is not GCC. However, the
@@ -6758,6 +6843,12 @@ fi
# Disable exceptions and RTTI if building with g++
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
noexception_flags=
save_CFLAGS="$CFLAGS"
for real_option in -fno-exceptions -fno-rtti -fasynchronous-unwind-tables; do
@@ -6786,7 +6877,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
@@ -6802,6 +6893,12 @@ $as_echo "$ac_res" >&6; }
fi
done
CFLAGS="$save_CFLAGS"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
# Enable expensive internal checks
@@ -13885,7 +13982,6 @@ fi
-
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
@@ -18197,7 +18293,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18200 "configure"
+#line 18296 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18303,7 +18399,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18306 "configure"
+#line 18402 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 71b5f4f..c76d06d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -368,21 +368,21 @@ AC_ARG_ENABLE(build-format-warnings,
[],[enable_build_format_warnings=yes])
AS_IF([test $enable_build_format_warnings = no],
[wf_opt=-Wno-format],[wf_opt=])
-ACX_PROG_CC_WARNING_OPTS(
+ACX_PROG_CXX_WARNING_OPTS(
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual $wf_opt])), [loose_warn])
ACX_PROG_CC_WARNING_OPTS(
m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes])),
[c_loose_warn])
-ACX_PROG_CC_WARNING_OPTS(
+ACX_PROG_CXX_WARNING_OPTS(
m4_quote(m4_do([-Wmissing-format-attribute])), [strict_warn])
-ACX_PROG_CC_WARNING_OPTS(
+ACX_PROG_CXX_WARNING_OPTS(
m4_quote(m4_do([-Woverloaded-virtual])), [strict_warn])
ACX_PROG_CC_WARNING_OPTS(
m4_quote(m4_do([-Wold-style-definition -Wc++-compat])), [c_strict_warn])
-ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(
+ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(
m4_quote(m4_do([-Wno-long-long -Wno-variadic-macros ],
[-Wno-overlength-strings])), [strict_warn])
-ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual], [strict_warn])
+ACX_PROG_CXX_WARNINGS_ARE_ERRORS([manual], [strict_warn])
# The above macros do nothing if the compiler is not GCC. However, the
# Makefile has more goo to add other flags, so these variables are used
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-27 16:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22 7:45 PATCH to run autoconf tests with C++ compiler Jason Merrill
2015-05-25 21:05 ` Alexandre Oliva
2015-05-26 7:07 ` Alexandre Oliva
2015-05-27 10:02 ` Andreas Schwab
2015-05-27 13:32 ` Richard Biener
2015-05-27 16:20 ` Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).