1 # alloca.m4 serial 4 (gettext-0.18.2)
2 dnl Copyright (C) 2002-2003, 2006, 2011, 2015 Free Software Foundation,
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_FUNC_ALLOCA],
10 dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
11 AC_REQUIRE([AC_PROG_CPP])
12 AC_REQUIRE([AC_PROG_EGREP])
14 AC_REQUIRE([AC_FUNC_ALLOCA])
15 if test $ac_cv_func_alloca_works = no; then
19 # Define an additional variable used in the Makefile substitution.
21 AC_EGREP_CPP([Need own alloca], [
22 #if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H
29 AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
32 # Prerequisites of lib/alloca.c.
33 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
34 AC_DEFUN([gl_PREREQ_ALLOCA], [
35 AC_CHECK_HEADERS_ONCE(stdlib.h string.h)