summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-04-26 10:29:58 -0700
committerunknown <jimw@mysql.com>2005-04-26 10:29:58 -0700
commit5b09d7a8904d31a38b70c9f5f9e3b152cee0759a (patch)
treeb15082302f9b8ea3fb470d3e4eaf477e3585f4dd /config
parenta8ad921caa4e2013eb3199071f9fefe02655392e (diff)
parent950af93c5c48df444d987bc547037712219f4435 (diff)
downloadmariadb-git-5b09d7a8904d31a38b70c9f5f9e3b152cee0759a.tar.gz
Merge mysql.com:/home/jimw/my/mysql-5.0-build
into mysql.com:/home/jimw/my/mysql-5.0-clean BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003: Auto merged configure.in: Auto merged
Diffstat (limited to 'config')
-rw-r--r--config/ac-macros/misc.m435
1 files changed, 32 insertions, 3 deletions
diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4
index 186a069ac61..201702e5379 100644
--- a/config/ac-macros/misc.m4
+++ b/config/ac-macros/misc.m4
@@ -34,10 +34,10 @@ undefine([AC_CV_NAME])dnl
AC_DEFUN([MYSQL_TYPE_ACCEPT],
[ac_save_CXXFLAGS="$CXXFLAGS"
AC_CACHE_CHECK([base type of last arg to accept], mysql_cv_btype_last_arg_accept,
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
if test "$ac_cv_prog_gxx" = "yes"
then
+ # Add -Werror, remove -fbranch-probabilities (Bug #268)
CXXFLAGS=`echo $CXXFLAGS -Werror | sed 's/-fbranch-probabilities//'`
fi
mysql_cv_btype_last_arg_accept=none
@@ -64,7 +64,7 @@ fi
if test "$mysql_cv_btype_last_arg_accept" = "none"; then
mysql_cv_btype_last_arg_accept=int
fi)
-AC_LANG_RESTORE
+AC_LANG_POP(C++)
AC_DEFINE_UNQUOTED([SOCKET_SIZE_TYPE], [$mysql_cv_btype_last_arg_accept],
[The base type of the last arg to accept])
CXXFLAGS="$ac_save_CXXFLAGS"
@@ -90,6 +90,35 @@ then
fi
])
+#---START: Figure out whether to use 'struct rlimit' or 'struct rlimit64'
+AC_DEFUN([MYSQL_TYPE_STRUCT_RLIMIT],
+[ac_save_CXXFLAGS="$CXXFLAGS"
+AC_CACHE_CHECK([struct type to use with setrlimit], mysql_cv_btype_struct_rlimit,
+AC_LANG_PUSH(C++)
+if test "$ac_cv_prog_gxx" = "yes"
+then
+ # Add -Werror, remove -fbranch-probabilities (Bug #268)
+ CXXFLAGS=`echo $CXXFLAGS -Werror | sed 's/-fbranch-probabilities//'`
+fi
+mysql_cv_btype_struct_rlimit=none
+[AC_TRY_COMPILE([#if defined(inline)
+#undef inline
+#endif
+#include <stdlib.h>
+#include <sys/resource.h>
+],
+[struct rlimit64 rl; setrlimit(RLIMIT_CORE, &rl);],
+mysql_cv_btype_struct_rlimit="struct rlimit64")]
+if test "$mysql_cv_btype_struct_rlimit" = "none"; then
+mysql_cv_btype_struct_rlimit="struct rlimit"
+fi)
+AC_LANG_POP(C++)
+AC_DEFINE_UNQUOTED([STRUCT_RLIMIT], [$mysql_cv_btype_struct_rlimit],
+ [The struct rlimit type to use with setrlimit])
+CXXFLAGS="$ac_save_CXXFLAGS"
+])
+#---END:
+
AC_DEFUN([MYSQL_TIMESPEC_TS],
[AC_CACHE_CHECK([if struct timespec has a ts_sec member], mysql_cv_timespec_ts,
[AC_TRY_COMPILE([#include <pthread.h>