michael@0: dnl We are not running in a real autoconf environment. So we're using real m4 michael@0: dnl here, not the crazier environment that autoconf provides. michael@0: michael@0: dnl Autoconf expects [] for quotes; give it to them michael@0: changequote([, ]) michael@0: michael@0: dnl AC_DEFUN is provided to use instead of define in autoconf. Provide it too. michael@0: define([AC_DEFUN], [define($1, [$2])]) michael@0: michael@0: dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, IF-TRUE[, IF-FALSE]) michael@0: dnl We have to ignore the help string due to how help works in autoconf... michael@0: AC_DEFUN([AC_ARG_ENABLE], michael@0: [#] Check whether --enable-[$1] or --disable-[$1] was given. michael@0: [if test "[${enable_]patsubst([$1], -, _)+set}" = set; then michael@0: enableval="[$enable_]patsubst([$1], -, _)" michael@0: $3 michael@0: ifelse([$4], , , [else michael@0: $4 michael@0: ])dnl michael@0: fi michael@0: ]) michael@0: michael@0: dnl AC_MSG_ERROR(error-description) michael@0: AC_DEFUN([AC_MSG_ERROR], [{ echo "configure: error: $1" 1>&2; exit 1; }]) michael@0: michael@0: AC_DEFUN([AC_MSG_WARN], [ echo "configure: warning: $1" 1>&2 ]) michael@0: michael@0: dnl Add the variable to the list of substitution variables michael@0: AC_DEFUN([AC_SUBST], michael@0: [ michael@0: _subconfigure_ac_subst_args="$_subconfigure_ac_subst_args $1" michael@0: ]) michael@0: michael@0: dnl Override for AC_DEFINE. michael@0: AC_DEFUN([AC_DEFINE], michael@0: [ michael@0: cat >>confdefs.h <<\EOF michael@0: [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) michael@0: EOF michael@0: cat >> confdefs.pytmp <<\EOF michael@0: (''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 ')) michael@0: EOF michael@0: ]) michael@0: michael@0: dnl AC_OUTPUT_SUBDIRS(subdirectory) michael@0: AC_DEFUN([AC_OUTPUT_SUBDIRS], [do_output_subdirs "$1"])