1
# Copyright (C) 2010 Brian Aker
3
# This file is free software
4
# gives unlimited permission to copy and/or distribute it,
5
# with or without modifications, as long as this notice is preserved.
7
AC_DEFUN([DRIZZLE_STACK_DIRECTION],[
8
AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
14
/* Prevent compiler optimization by HP's compiler, see bug#42213 */
15
#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
19
int find_stack_direction ()
21
static char *addr = 0;
26
return find_stack_direction ();
29
return (&dummy > addr) ? 1 : -1;
33
exit (find_stack_direction() < 0);
36
[ac_cv_c_stack_direction=1],
37
[ac_cv_c_stack_direction=-1],
38
[ac_cv_c_stack_direction=]
41
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)