summaryrefslogtreecommitdiffstats
path: root/build/autoconf/subconfigure.m4
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /build/autoconf/subconfigure.m4
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'build/autoconf/subconfigure.m4')
-rw-r--r--build/autoconf/subconfigure.m446
1 files changed, 46 insertions, 0 deletions
diff --git a/build/autoconf/subconfigure.m4 b/build/autoconf/subconfigure.m4
new file mode 100644
index 000000000..8e95e014e
--- /dev/null
+++ b/build/autoconf/subconfigure.m4
@@ -0,0 +1,46 @@
+dnl We are not running in a real autoconf environment. So we're using real m4
+dnl here, not the crazier environment that autoconf provides.
+
+dnl Autoconf expects [] for quotes; give it to them
+changequote([, ])
+
+dnl AC_DEFUN is provided to use instead of define in autoconf. Provide it too.
+define([AC_DEFUN], [define($1, [$2])])
+
+dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, IF-TRUE[, IF-FALSE])
+dnl We have to ignore the help string due to how help works in autoconf...
+AC_DEFUN([MOZ_AC_ARG_ENABLE],
+[#] Check whether --enable-[$1] or --disable-[$1] was given.
+[if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
+ enableval="[$enable_]patsubst([$1], -, _)"
+ $3
+ifelse([$4], , , [else
+ $4
+])dnl
+fi
+])
+
+dnl AC_MSG_ERROR(error-description)
+AC_DEFUN([AC_MSG_ERROR], [{ echo "configure: error: $1" 1>&2; exit 1; }])
+
+AC_DEFUN([AC_MSG_WARN], [ echo "configure: warning: $1" 1>&2 ])
+
+dnl Add the variable to the list of substitution variables
+AC_DEFUN([AC_SUBST],
+[
+_subconfigure_ac_subst_args="$_subconfigure_ac_subst_args $1"
+])
+
+dnl Override for AC_DEFINE.
+AC_DEFUN([AC_DEFINE],
+[
+cat >>confdefs.h <<\EOF
+[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
+EOF
+cat >> confdefs.pytmp <<\EOF
+ (''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 '))
+EOF
+])
+
+dnl AC_OUTPUT_SUBDIRS(subdirectory)
+AC_DEFUN([AC_OUTPUT_SUBDIRS], [do_output_subdirs "$1"])