summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-20 08:38:32 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-20 08:38:32 +0000
commit3e41a3c4063d1014118aafa8c609e2f5741bf2da (patch)
treed1d81473ac0df66d33973cb168258176e1ca34bf /gcc/configure.ac
parent94cd0238acdaea5ab220faaa3a6b7ecc0ec0c512 (diff)
downloadgcc-3e41a3c4063d1014118aafa8c609e2f5741bf2da.tar.gz
2011-10-19 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 180237 using svnmerge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@180238 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d19ca077b2e..d63acea68f5 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1094,6 +1094,8 @@ AM_LANGINFO_CODESET
# We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
+saved_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include"
gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd \
strsignal strstr strverscmp \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
@@ -1146,6 +1148,21 @@ gcc_AC_CHECK_DECLS(sigaltstack, , ,[
#include <signal.h>
])
+# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which hides the madvise()
+# prototype.
+AS_IF([test "$ENABLE_BUILD_WITH_CXX" = "yes"],
+ [AC_LANG_PUSH([C++])
+ gcc_AC_CHECK_DECLS(madvise, , ,[
+ #include "ansidecl.h"
+ #include "system.h"
+ ])
+ AC_LANG_POP([C++])],
+ [gcc_AC_CHECK_DECLS(madvise, , ,[
+ #include "ansidecl.h"
+ #include "system.h"
+ ])
+])
+
# More time-related stuff.
AC_CACHE_CHECK(for struct tms, ac_cv_struct_tms, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -1172,8 +1189,9 @@ if test $gcc_cv_type_clock_t = yes; then
[Define if <time.h> defines clock_t.])
fi
-# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
+# Restore CFLAGS, CXXFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
CFLAGS="$saved_CFLAGS"
+CXXFLAGS="$saved_CXXFLAGS"
gcc_AC_INITFINI_ARRAY