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