dnl Check if the C compiler is really a C++ compiler. dnl CF_PROG_CC_CPLUSPLUS AC_DEFUN([CF_PROG_CC_CPLUSPLUS], [AC_CACHE_CHECK(if the C compiler (${CC} ${CFLAGS} ${LDFLAGS}) is really a C++ compiler, cf_cv_cc_cplusplus, [AC_REQUIRE([AC_PROG_CC])dnl AC_TRY_COMPILE(, [ int class; ], cf_cv_cc_cplusplus=no, cf_cv_cc_cplusplus=yes)]) if test ${cf_cv_cc_cplusplus} = yes; then AC_MSG_ERROR([Compiler is C++, giving up. Set CC to a C compiler]) fi])dnl dnl Determine the order the compiler pushes parameters on the stack. AC_DEFUN([CF_STACK_ORDER], [AC_CACHE_CHECK([order of parameters pushed on stack], [ac_cv_c_stack_order], [AC_RUN_IFELSE([AC_LANG_SOURCE( [int find_stack_order (param1,param2) int param1; int param2; { return (¶m1 > ¶m2) ? 1 : -1; } int main () { exit (find_stack_order (1, 2) == STACK_DIRECTION); }])], [ac_cv_c_stack_order=1], [ac_cv_c_stack_order=-1], [ac_cv_c_stack_order=0])])dnl AH_VERBATIM([STACK_ORDER], [/* STACK_ORDER > 0 => right parameter is last on stack STACK_ORDER < 0 => left parameter is last on stack */ @%:@undef STACK_ORDER])dnl AC_DEFINE_UNQUOTED(STACK_ORDER, $ac_cv_c_stack_order)dnl ])dnl dnl The rest of this is dnl Copied from ncurses. dnl CF_GCC_WARNINGS AC_DEFUN([CF_GCC_WARNINGS], [if test -n "${GCC}" then changequote(,)dnl cat > conftest.${ac_ext} <