aboutsummaryrefslogtreecommitdiff
path: root/contrib/libstdc++/acinclude.m4
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2003-02-10 05:47:54 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2003-02-10 05:47:54 +0000
commit61e268fb5fe80d065abc291868bc5286fe3a7632 (patch)
tree548333fba089bbaa9f6f60f38860213a7f7ccf69 /contrib/libstdc++/acinclude.m4
parent7b74929d749aa5688fd0814a9880872323e02cde (diff)
downloadsrc-61e268fb5fe80d065abc291868bc5286fe3a7632.tar.gz
src-61e268fb5fe80d065abc291868bc5286fe3a7632.zip
Gcc 3.2.2-release C++ support bits.
Notes
Notes: svn path=/vendor/gcc/dist/; revision=110614
Diffstat (limited to 'contrib/libstdc++/acinclude.m4')
-rw-r--r--contrib/libstdc++/acinclude.m457
1 files changed, 54 insertions, 3 deletions
diff --git a/contrib/libstdc++/acinclude.m4 b/contrib/libstdc++/acinclude.m4
index a8bfebdc4721..639327819395 100644
--- a/contrib/libstdc++/acinclude.m4
+++ b/contrib/libstdc++/acinclude.m4
@@ -594,6 +594,33 @@ AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3, [
fi
])
+dnl
+dnl Check to see if the (unistd function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a function with ONE parameter
+dnl
+dnl GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1
+AC_DEFUN(GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1, [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcpp_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <unistd.h>],
+ [ $1(0);],
+ [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+ if test x$glibcpp_cv_func_$1_use = x"yes"; then
+ AC_CHECK_FUNCS($1)
+ fi
+])
dnl
dnl Because the builtins are picky picky picky about the arguments they take,
@@ -707,7 +734,7 @@ AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
dnl
-dnl Check to see what the underlying c library
+dnl Check to see what the underlying c library is like
dnl These checks need to do two things:
dnl 1) make sure the name is declared when using the c++ compiler
dnl 2) make sure the name has "C" linkage
@@ -730,6 +757,25 @@ AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
CXXFLAGS="$ac_save_CXXFLAGS"
])
+dnl
+dnl Check to see what the underlying c library is like
+dnl These checks need to do two things:
+dnl 1) make sure the name is declared when using the c++ compiler
+dnl 2) make sure the name has "C" linkage
+dnl This might seem like overkill but experience has shown that it's not...
+dnl
+dnl Define HAVE_ISATTY if "isatty" is declared and links
+dnl
+dnl GLIBCPP_CHECK_UNISTD_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_UNISTD_SUPPORT, [
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
+
+ GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1(isatty)
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+])
dnl
dnl Check to see what the underlying c library or math library is like.
@@ -1185,6 +1231,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/generic/messages_members.cc
CMONEY_CC=config/locale/generic/monetary_members.cc
CNUMERIC_CC=config/locale/generic/numeric_members.cc
+ CTIME_H=config/locale/generic/time_members.h
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@@ -1219,6 +1266,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/gnu/messages_members.cc
CMONEY_CC=config/locale/gnu/monetary_members.cc
CNUMERIC_CC=config/locale/gnu/numeric_members.cc
+ CTIME_H=config/locale/gnu/time_members.h
CTIME_CC=config/locale/gnu/time_members.cc
CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
;;
@@ -1235,6 +1283,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
CMONEY_CC=config/locale/generic/monetary_members.cc
CNUMERIC_CC=config/locale/generic/numeric_members.cc
+ CTIME_H=config/locale/generic/time_members.h
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@@ -1256,6 +1305,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
AC_SUBST(CLOCALE_H)
AC_SUBST(CCODECVT_H)
AC_SUBST(CMESSAGES_H)
+ AC_SUBST(CTIME_H)
AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
AC_LINK_FILES($CCODECVT_CC, src/codecvt_members.cc)
AC_LINK_FILES($CCOLLATE_CC, src/collate_members.cc)
@@ -1885,11 +1935,12 @@ if test x"$glibcpp_toolexecdir" = x"no"; then
if test -n "$with_cross_host" &&
test x"$with_cross_host" != x"no"; then
glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/lib$(MULTISUBDIR)'
+ glibcpp_toolexeclibdir='$(toolexecdir)/lib'
else
glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)'
+ glibcpp_toolexeclibdir='$(libdir)'
fi
+ glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/`$CC -print-multi-os-directory`
fi
AC_MSG_CHECKING([for install location])