summaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure308
1 files changed, 279 insertions, 29 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 77a4abfbadf..3be252e5c85 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -707,7 +707,6 @@ BASIC_FILE_H
CSTDIO_H
SECTION_FLAGS
WERROR
-glibcxx_thread_h
glibcxx_PCHFLAGS
GLIBCXX_BUILD_PCH_FALSE
GLIBCXX_BUILD_PCH_TRUE
@@ -741,6 +740,7 @@ AR
AS
LN_S
toplevel_srcdir
+toplevel_builddir
glibcxx_srcdir
glibcxx_builddir
ac_ct_CXX
@@ -4870,11 +4870,13 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
\\/$* | ?:\\/*) glibcxx_srcdir=${srcdir} ;;
*) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
esac
+ toplevel_builddir=${glibcxx_builddir}/..
toplevel_srcdir=${glibcxx_srcdir}/..
+
# We use these options to decide which functions to include. They are
# set from the top level.
@@ -11485,7 +11487,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11488 "configure"
+#line 11490 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11591,7 +11593,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11594 "configure"
+#line 11596 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14949,7 +14951,7 @@ fi
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 14952 "configure"
+#line 14954 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -15077,23 +15079,6 @@ $as_echo_n "checking for thread model used by GCC... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5
$as_echo "$target_thread_file" >&6; }
- if test $target_thread_file != single; then
-
-$as_echo "#define HAVE_GTHR_DEFAULT 1" >>confdefs.h
-
- fi
-
- glibcxx_thread_h=gthr-$target_thread_file.h
-
- gthread_file=${toplevel_srcdir}/gcc/${glibcxx_thread_h}
- if grep __GTHREADS $gthread_file >/dev/null 2>&1 ; then
- enable_thread=yes
- else
- enable_thread=no
- fi
-
-
-
ac_ext=cpp
@@ -15317,7 +15302,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15320 "configure"
+#line 15305 "configure"
int main()
{
typedef bool atomic_type;
@@ -15354,7 +15339,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15357 "configure"
+#line 15342 "configure"
int main()
{
typedef short atomic_type;
@@ -15391,7 +15376,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15394 "configure"
+#line 15379 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -15429,7 +15414,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15432 "configure"
+#line 15417 "configure"
int main()
{
typedef long long atomic_type;
@@ -15505,7 +15490,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15508 "configure"
+#line 15493 "configure"
int main()
{
_Decimal32 d1;
@@ -15547,7 +15532,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15550 "configure"
+#line 15535 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -15581,7 +15566,7 @@ $as_echo "$enable_int128" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15584 "configure"
+#line 15569 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -19120,6 +19105,20 @@ fi
done
+ # Check for the existence of the <stdalign.h> header.
+ for ac_header in stdalign.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "stdalign.h" "ac_cv_header_stdalign_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdalign_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDALIGN_H 1
+_ACEOF
+
+fi
+
+done
+
+
CXXFLAGS="$ac_save_CXXFLAGS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -19821,7 +19820,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -fno-exceptions -I${toplevel_srcdir}/gcc"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions \
+ -I${toplevel_srcdir}/libgcc -I${toplevel_builddir}/libgcc"
target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
case $target_thread_file in
@@ -20132,6 +20132,256 @@ 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
+
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SC_NPROC_ONLN" >&5
+$as_echo_n "checking for _SC_NPROC_ONLN... " >&6; }
+ if test "${glibcxx_cv_SC_NPROC_ONLN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+int n = sysconf(_SC_NPROC_ONLN);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_SC_NPROC_ONLN=yes
+else
+ glibcxx_cv_SC_NPROC_ONLN=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+int n = sysconf(_SC_NPROC_ONLN);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_SC_NPROC_ONLN=yes
+else
+ glibcxx_cv_SC_NPROC_ONLN=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ if test $glibcxx_cv_SC_NPROC_ONLN = yes; then
+
+$as_echo "#define _GLIBCXX_USE_SC_NPROC_ONLN 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_SC_NPROC_ONLN" >&5
+$as_echo "$glibcxx_cv_SC_NPROC_ONLN" >&6; }
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ 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
+
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthreads_num_processors_np" >&5
+$as_echo_n "checking for pthreads_num_processors_np... " >&6; }
+ if test "${glibcxx_cv_PTHREADS_NUM_PROCESSORS_NP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+int n = pthread_num_processors_np();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_PTHREADS_NUM_PROCESSORS_NP=yes
+else
+ glibcxx_cv_PTHREADS_NUM_PROCESSORS_NP=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+int n = pthread_num_processors_np();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_PTHREADS_NUM_PROCESSORS_NP=yes
+else
+ glibcxx_cv_PTHREADS_NUM_PROCESSORS_NP=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ if test $glibcxx_cv_PTHREADS_NUM_PROCESSORS_NP = yes; then
+
+$as_echo "#define _GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_PTHREADS_NUM_PROCESSORS_NP" >&5
+$as_echo "$glibcxx_cv_PTHREADS_NUM_PROCESSORS_NP" >&6; }
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ 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
+
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hw.ncpu sysctl" >&5
+$as_echo_n "checking for hw.ncpu sysctl... " >&6; }
+ if test "${glibcxx_cv_SYSCTL_HW_NCPU+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stddef.h>
+ #include <sys/sysctl.h>
+
+int
+main ()
+{
+
+ int count;
+ size_t size = sizeof(count);
+ int mib[] = { CTL_HW, HW_NCPU };
+ sysctl(mib, 2, &count, &size, NULL, 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_SYSCTL_HW_NCPU=yes
+else
+ glibcxx_cv_SYSCTL_HW_NCPU=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stddef.h>
+ #include <sys/sysctl.h>
+
+int
+main ()
+{
+
+ int count;
+ size_t size = sizeof(count);
+ int mib[] = { CTL_HW, HW_NCPU };
+ sysctl(mib, 2, &count, &size, NULL, 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_SYSCTL_HW_NCPU=yes
+else
+ glibcxx_cv_SYSCTL_HW_NCPU=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ if test $glibcxx_cv_SYSCTL_HW_NCPU = yes; then
+
+$as_echo "#define _GLIBCXX_USE_SYSCTL_HW_NCPU 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_SYSCTL_HW_NCPU" >&5
+$as_echo "$glibcxx_cv_SYSCTL_HW_NCPU" >&6; }
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ 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
+
+
+
# Check for available headers.
for ac_header in endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
locale.h machine/endian.h machine/param.h nan.h stdint.h stdlib.h string.h \