diff options
author | unknown <brian@avenger.(none)> | 2004-12-04 11:00:33 -0800 |
---|---|---|
committer | unknown <brian@avenger.(none)> | 2004-12-04 11:00:33 -0800 |
commit | 623c733895dd490fce64ec864713279570ea37f3 (patch) | |
tree | c28536d2037e8f874d88dc7cf3a9d13e2c6c98f1 /config/ac-macros/alloca.m4 | |
parent | 107ef617ac91856996a0989ccb6367f317e74872 (diff) | |
download | mariadb-git-623c733895dd490fce64ec864713279570ea37f3.tar.gz |
Fixing problem with case insitive file systems.
Would you believe that I wrote all of this on a Mac? I just happen to be not using HFS for the partition I did this work on. Oops :)
config/ac-macros/alloca.m4:
mvdir
config/ac-macros/character_sets.m4:
mvdir
config/ac-macros/check_cpu.m4:
mvdir
config/ac-macros/compiler_flag.m4:
mvdir
config/ac-macros/ha_archive.m4:
mvdir
config/ac-macros/ha_berkeley.m4:
mvdir
config/ac-macros/ha_example.m4:
mvdir
config/ac-macros/ha_innodb.m4:
mvdir
config/ac-macros/ha_isam.m4:
mvdir
config/ac-macros/ha_ndbcluster.m4:
mvdir
config/ac-macros/ha_tina.m4:
mvdir
config/ac-macros/large_file.m4:
mvdir
config/ac-macros/misc.m4:
mvdir
config/ac-macros/mysqlfs.m4:
mvdir
config/ac-macros/openssl.m4:
mvdir
config/ac-macros/readline.m4:
mvdir
config/ac-macros/sanity.m4:
mvdir
config/ac-macros/zlib.m4:
mvdir
configure.in:
Fix silly little problem with case insensitive filesystems.
Funny thing is that I wrote all this on a Mac, but I don't use HFS on that partition so I never noticed that it would be an issue.
Oops :)
Diffstat (limited to 'config/ac-macros/alloca.m4')
-rw-r--r-- | config/ac-macros/alloca.m4 | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/config/ac-macros/alloca.m4 b/config/ac-macros/alloca.m4 new file mode 100644 index 00000000000..8c730dd671f --- /dev/null +++ b/config/ac-macros/alloca.m4 @@ -0,0 +1,68 @@ +AC_DEFUN([MYSQL_FUNC_ALLOCA], +[ +# Since we have heard that alloca fails on IRIX never define it on a +# SGI machine +if test ! "$host_vendor" = "sgi" +then + AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally. + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h, + [AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));], + ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)]) + if test "$ac_cv_header_alloca_h" = "yes" + then + AC_DEFINE(HAVE_ALLOCA, 1) + fi + + AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, + [AC_TRY_LINK([ + #ifdef __GNUC__ + # define alloca __builtin_alloca + #else + # if HAVE_ALLOCA_H + # include <alloca.h> + # else + # ifdef _AIX + #pragma alloca + # else + # ifndef alloca /* predefined by HP cc +Olibcalls */ + char *alloca (); + # endif + # endif + # endif + #endif + ], [char *p = (char *) alloca(1);], + ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)]) + if test "$ac_cv_func_alloca_works" = "yes"; then + AC_DEFINE([HAVE_ALLOCA], [1], [If we have a working alloca() implementation]) + fi + + if test "$ac_cv_func_alloca_works" = "no"; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.o + AC_DEFINE(C_ALLOCA, 1) + + AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray, + [AC_EGREP_CPP(webecray, + [#if defined(CRAY) && ! defined(CRAY2) + webecray + #else + wenotbecray + #endif + ], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) + if test "$ac_cv_os_cray" = "yes"; then + for ac_func in _getb67 GETB67 getb67; do + AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func) + break]) + done + fi + fi + AC_SUBST(ALLOCA)dnl +else + AC_MSG_RESULT("Skipped alloca tests") +fi +]) |