aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorJerome Lambourg <lambourg@adacore.com>2019-12-20 15:30:41 +0000
committerJerome Lambourg <lambourg@gcc.gnu.org>2019-12-20 15:30:41 +0000
commit84de780d46097681bffa1e9a166e1bdcb955ae37 (patch)
treec0cea977971377f5719fd56ff1b1c997f751fcd1 /libstdc++-v3/configure
parent33bd8e5e22182ed84a685fa27c8fc04585da5355 (diff)
downloadgcc-84de780d46097681bffa1e9a166e1bdcb955ae37.zip
gcc-84de780d46097681bffa1e9a166e1bdcb955ae37.tar.gz
gcc-84de780d46097681bffa1e9a166e1bdcb955ae37.tar.bz2
libstdc++: Test setrlimit with c++ in configure
* acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Test with AC_LANG_CPLUSPLUS. * configure: Regenerate. From-SVN: r279644
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure27
1 files changed, 20 insertions, 7 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 3c51166..f2d52fd 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -74233,11 +74233,18 @@ $as_echo "$ac_cv_x86_rdseed" >&6; }
# Do checks for resource limit functions.
+
+ 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
+
setrlimit_have_headers=yes
for ac_header in unistd.h sys/time.h sys/resource.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -74270,7 +74277,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
glibcxx_mresult=1
else
glibcxx_mresult=0
@@ -74302,7 +74309,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
glibcxx_mresult=1
else
glibcxx_mresult=0
@@ -74334,7 +74341,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
glibcxx_mresult=1
else
glibcxx_mresult=0
@@ -74366,7 +74373,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
glibcxx_mresult=1
else
glibcxx_mresult=0
@@ -74398,7 +74405,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
glibcxx_mresult=1
else
glibcxx_mresult=0
@@ -74434,7 +74441,7 @@ struct rlimit r;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
glibcxx_cv_setrlimit=yes
else
glibcxx_cv_setrlimit=no
@@ -74455,6 +74462,12 @@ $as_echo "#define _GLIBCXX_RES_LIMITS 1" >>confdefs.h
else
ac_res_limits=no
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
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res_limits" >&5
$as_echo "$ac_res_limits" >&6; }