summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2020-04-20 20:56:28 -0700
committerThomas Groman <tgroman@nuegia.net>2020-04-20 20:56:28 -0700
commit508d270a4d78d491bbe1c67c309c404f547da58a (patch)
treed16e2a906501dcda7b4d268579896f03e125f553 /configure.in
parentf9cab004186edb425a9b88ad649726605080a17c (diff)
downloadwebbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.tar
webbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.tar.gz
webbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.tar.lz
webbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.tar.xz
webbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.zip
added Comm Build System
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..a2acd90
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,38 @@
+dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
+dnl vi: set tabstop=4 shiftwidth=4 expandtab:
+dnl This Source Code Form is subject to the terms of the Mozilla Public
+dnl License, v. 2.0. If a copy of the MPL was not distributed with this
+dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
+dnl
+dnl This is a not-really-autoconf script (which is to say, it's a shell script
+dnl that is piped through m4 first) that executes the mozilla-central python
+dnl configure, first doing a little bit of processing to handle mozconfig and
+dnl the --with-external-source-dir rules.
+dnl ========================================================
+divert(0)dnl
+#!/bin/sh
+SRCDIR=$(dirname $0)
+TOPSRCDIR="$SRCDIR"
+MOZILLA_SRCDIR="${SRCDIR}/platform"
+export OLD_CONFIGURE="${MOZILLA_SRCDIR}"/old-configure
+
+# Ensure the comm-* values are used.
+export MOZ_SOURCE_CHANGESET=$(hg -R "$TOPSRCDIR" parent --template="{node}" 2>/dev/null)
+export MOZ_SOURCE_REPO=$(hg -R "$TOPSRCDIR" showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/https:/")
+
+# If MOZCONFIG isn't set, use the .mozconfig from the current directory. This
+# overrides the lookup in mozilla-central's configure, which looks in the wrong
+# directory for this file.
+if test -z "$MOZCONFIG" -a -f "$SRCDIR"/.mozconfig; then
+ export MOZCONFIG="$SRCDIR"/.mozconfig
+elif test -z "$MOZCONFIG" -a -f "$SRCDIR"/mozconfig; then
+ export MOZCONFIG="$SRCDIR"/mozconfig
+fi
+
+# Execute the mozilla configure script in the current directory, adding the
+# parameter we need to run comm-central. Since the configure script is really
+# just a wrapper around invoking a python variant, execute the underlying python
+# directly. We use a copy of the underlying configure script to get paths
+# correct.
+set -- "$@" --with-external-source-dir="$TOPSRCDIR"
+which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"