alloca.m4 978 B

1234567891011121314151617181920212223242526272829303132333435
  1. # alloca.m4 serial 3 (gettext-0.16)
  2. dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. AC_DEFUN([gl_FUNC_ALLOCA],
  7. [
  8. dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
  9. AC_REQUIRE([AC_PROG_CPP])
  10. AC_REQUIRE([AC_PROG_EGREP])
  11. AC_REQUIRE([AC_FUNC_ALLOCA])
  12. if test $ac_cv_func_alloca_works = no; then
  13. gl_PREREQ_ALLOCA
  14. fi
  15. # Define an additional variable used in the Makefile substitution.
  16. AC_EGREP_CPP([Need own alloca], [
  17. #if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H
  18. Need own alloca
  19. #endif
  20. ],
  21. ALLOCA_H=alloca.h,
  22. ALLOCA_H=)
  23. AC_SUBST([ALLOCA_H])
  24. ])
  25. # Prerequisites of lib/alloca.c.
  26. # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
  27. AC_DEFUN([gl_PREREQ_ALLOCA], [
  28. AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
  29. :
  30. ])