summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-12-04 17:40:37 +0200
committerunknown <monty@mashka.mysql.fi>2002-12-04 17:40:37 +0200
commited4c940f994cfd32fb30851d6941b43294c664be (patch)
tree038dab8a878b89d5186ea38af4cb8f716653acbe /acinclude.m4
parent871d021a10bf9fecebbc17fc4b42956700e209ed (diff)
parentac1c76393089748de23151b88b4ca11d02c3cf0b (diff)
downloadmariadb-git-ed4c940f994cfd32fb30851d6941b43294c664be.tar.gz
Merge with 3.23
(Fixed problem with autoconf 2.53 on Solaris) BUILD/compile-solaris-sparc-purify: Merge with 3.23 BUILD/compile-solaris-sparc: Merge with 3.23 acinclude.m4: Merge with 3.23
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m436
1 files changed, 34 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 99f6f26bab6..fda4f4bf7d5 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -520,7 +520,8 @@ fi
AC_DEFUN(MYSQL_STACK_DIRECTION,
[AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
- [AC_TRY_RUN([find_stack_direction ()
+ [AC_TRY_RUN([#include <stdlib.h>
+ int find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
@@ -532,7 +533,7 @@ AC_DEFUN(MYSQL_STACK_DIRECTION,
else
return (&dummy > addr) ? 1 : -1;
}
- main ()
+ int main ()
{
exit (find_stack_direction() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
@@ -1323,5 +1324,36 @@ AC_DEFUN(MYSQL_SYS_LARGEFILE,
fi
])
+
+# Local version of _AC_PROG_CXX_EXIT_DECLARATION that does not
+# include #stdlib.h as this breaks things on Solaris
+# (Conflicts with pthreads and big file handling)
+
+m4_define([_AC_PROG_CXX_EXIT_DECLARATION],
+[for ac_declaration in \
+ ''\
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <stdlib.h>
+$ac_declaration],
+ [exit (42);])],
+ [],
+ [continue])
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration],
+ [exit (42);])],
+ [break])
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+])# _AC_PROG_CXX_EXIT_DECLARATION
+
dnl ---------------------------------------------------------------------------