1dnl We are not running in a real autoconf environment. So we're using real m4 2dnl here, not the crazier environment that autoconf provides. 3 4dnl Autoconf expects [] for quotes; give it to them 5changequote([, ]) 6 7dnl AC_DEFUN is provided to use instead of define in autoconf. Provide it too. 8define([AC_DEFUN], [define($1, [$2])]) 9 10dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, IF-TRUE[, IF-FALSE]) 11dnl We have to ignore the help string due to how help works in autoconf... 12AC_DEFUN([MOZ_AC_ARG_ENABLE], 13[#] Check whether --enable-[$1] or --disable-[$1] was given. 14[if test "[${enable_]patsubst([$1], -, _)+set}" = set; then 15 enableval="[$enable_]patsubst([$1], -, _)" 16 $3 17ifelse([$4], , , [else 18 $4 19])dnl 20fi 21]) 22 23dnl AC_MSG_ERROR(error-description) 24AC_DEFUN([AC_MSG_ERROR], [{ echo "configure: error: $1" 1>&2; exit 1; }]) 25 26AC_DEFUN([AC_MSG_WARN], [ echo "configure: warning: $1" 1>&2 ]) 27 28dnl Add the variable to the list of substitution variables 29AC_DEFUN([AC_SUBST], 30[ 31_subconfigure_ac_subst_args="$_subconfigure_ac_subst_args $1" 32]) 33 34dnl Override for AC_DEFINE. 35AC_DEFUN([AC_DEFINE], 36[ 37cat >>confdefs.h <<\EOF 38[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) 39EOF 40cat >> confdefs.pytmp <<\EOF 41 (''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 ')) 42EOF 43]) 44 45dnl AC_OUTPUT_SUBDIRS(subdirectory) 46AC_DEFUN([AC_OUTPUT_SUBDIRS], [do_output_subdirs "$1"]) 47