Branch: Tag:

1999-01-07

1999-01-07 13:41:51 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

bugfix for STACK_DIRECTION

Rev: src/configure.in:1.259

1: - AC_REVISION("$Id: configure.in,v 1.258 1999/01/01 01:03:29 hubbe Exp $") + AC_REVISION("$Id: configure.in,v 1.259 1999/01/07 13:41:51 hubbe Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
199:   AC_ARG_WITH(oob, [ --with-oob enable out-of-band data handling],[AC_DEFINE(WITH_OOB)],[])   AC_ARG_WITH(thread-trace,[ --with-trace-threads enable individual tracing of threads],[AC_DEFINE(TRACE_THREADS)],[])   AC_ARG_WITH(compiler-trace,[ --with-compiler-trace enable tracing of the compiler],[AC_DEFINE(YYDEBUG)],[]) + AC_ARG_WITH(compiler-trace,[ --with-security enable internal pike security system],[AC_DEFINE(PIKE_SECURITY)],[])      if test "x$with_poll" = "xyes"; then    AC_DEFINE(HAVE_AND_USE_POLL)
1517:   OLD_LIBOBJS="${LIBOBJS}"      ######################################################################## - dnl AC_MSG_CHECKING(stack direction) - dnl AC_CACHE_VAL(pike_cv_hardware_stack_direction, - dnl [ - dnl AC_TRY_RUN([ - dnl static int find_stack_direction(void *foo) - dnl { - dnl if(!foo) { - dnl return find_stack_direction((void *)&foo); - dnl } - dnl if (((void *)&foo) > foo) { - dnl return 1; - dnl } else { - dnl return -1; - dnl } - dnl } - dnl - dnl int main() { exit( find_stack_direction(0) + 1); } - dnl ],pike_cv_hardware_stack_direction=down,pike_cv_hardware_stack_direction=up) - dnl ]) - dnl - dnl AC_MSG_RESULT($pike_cv_hardware_stack_direction) - dnl if test "x$pike_cv_hardware_stack_direction" = "xup" ; then - dnl AC_DEFINE(STACK_DIRECTION, 1) - dnl else - dnl AC_DEFINE(STACK_DIRECTION, -1) - dnl fi - dnl + AC_MSG_CHECKING(stack direction) + AC_CACHE_VAL(pike_cv_hardware_stack_direction, + [ + AC_TRY_RUN([ + static int find_stack_direction(void *foo) + { +  if(!foo) { +  return find_stack_direction((void *)&foo); +  } +  if (((void *)&foo) > foo) { +  return 1; +  } else { +  return -1; +  } + } +  + int main() { exit( find_stack_direction(0) + 1); } + ],pike_cv_hardware_stack_direction=down,pike_cv_hardware_stack_direction=up) + ]) +  + AC_MSG_RESULT($pike_cv_hardware_stack_direction) +  + if grep STACK_DIRECTION confdefs.h >/dev/null 2>&1; then +  : + else +  if test "x$pike_cv_hardware_stack_direction" = "xup" ; then +  AC_DEFINE(STACK_DIRECTION, 1) +  else +  AC_DEFINE(STACK_DIRECTION, -1) +  fi + fi +    ########################################################################      AC_MSG_CHECKING(byteorder)