diff options
author | Paul Eggert <[email protected]> | 2011-06-21 09:15:07 -0700 |
---|---|---|
committer | Paul Eggert <[email protected]> | 2011-06-21 09:15:07 -0700 |
commit | fa23e171f4d9390c1c4151355ec72f9ff6fc90ab (patch) | |
tree | 3545fbfe6da37d20d6cc37a4d2f1be884a868a6a /configure.in | |
parent | 9e9de01439b2c57e79505ba0668894c9addc3bf1 (diff) |
Use gnulib's alloca-opt module.
* .bzrignore: Add lib/alloca.h.
* Makefile.in (GNULIB_MODULES): Add alloca-opt.
* configure.in (AC_FUNC_ALLOCA): Remove almost all the alloca stuff,
as gnulib now does that for us. Put alloca check after gl_INIT.
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/alloca.in.h, m4/alloca.m4: New files, from gnulib.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/configure.in b/configure.in index 0135b9f1bf..e4d2e2e96c 100644 --- a/configure.in +++ b/configure.in @@ -990,7 +990,7 @@ AC_SYS_LARGEFILE ## If user specified a crt-dir, use that unconditionally. if test "X$CRT_DIR" = "X"; then - + case "$canonical" in x86_64-*-linux-gnu* | s390x-*-linux-gnu*) ## On x86-64 and s390x GNU/Linux distributions, the standard library @@ -2565,15 +2565,6 @@ if test $emacs_cv_netdb_declares_h_errno = yes; then AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) fi -AC_FUNC_ALLOCA - -dnl src/alloca.c has been removed. Could also check if $ALLOCA is set? -dnl FIXME is there an autoconf test that does the right thing, without -dnl needing to call A_M_E afterwards? -if test x"$ac_cv_func_alloca_works" != xyes; then - AC_MSG_ERROR( [a system implementation of alloca is required] ) -fi - # fmod, logb, and frexp are found in -lm on most systems. # On HPUX 9.01, -lm does not contain logb, so check for sqrt. AC_CHECK_LIB(m, sqrt) @@ -2687,6 +2678,14 @@ gl_ASSERT_NO_GNULIB_POSIXCHECK gl_ASSERT_NO_GNULIB_TESTS gl_INIT +# Check for alloca. +dnl src/alloca.c has been removed. Could also check if $ALLOCA is set? +dnl FIXME is there an autoconf test that does the right thing, without +dnl needing to call A_M_E afterwards? +if test x"$ac_cv_func_alloca_works" != xyes; then + AC_MSG_ERROR( [a system implementation of alloca is required] ) +fi + # UNIX98 PTYs. AC_CHECK_FUNCS(grantpt) @@ -3534,20 +3533,7 @@ AH_BOTTOM([ #include <string.h> #include <stdlib.h> - -#ifdef HAVE_ALLOCA_H -# include <alloca.h> -#elif defined __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#else -# include <stddef.h> -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -#endif +#include <alloca.h> #ifndef HAVE_STRCHR #define strchr(a, b) index (a, b) |