summaryrefslogtreecommitdiff
path: root/lib/xcb-util-wm/autogen.sh
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2014-04-14 19:31:52 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2014-04-14 19:31:52 +0000
commitf2086eb24fd0eb50ceef22b775b76948843c9c45 (patch)
treec056f9efcd11802f78211aa6149afb3774c33650 /lib/xcb-util-wm/autogen.sh
parent54f254104a946e5d2ac3468a0d942e7793adfa88 (diff)
Import xcb-util-wm 0.4.1
Diffstat (limited to 'lib/xcb-util-wm/autogen.sh')
-rw-r--r--lib/xcb-util-wm/autogen.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/xcb-util-wm/autogen.sh b/lib/xcb-util-wm/autogen.sh
new file mode 100644
index 000000000..afe529980
--- /dev/null
+++ b/lib/xcb-util-wm/autogen.sh
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+# If this is a git checkout, verify that the submodules are initialized,
+# otherwise autotools will just fail with an unhelpful error message.
+if [ -d ".git" ] && [ -r ".gitmodules" ]
+then
+ # If git is not in PATH, this will not return 0, thus not keeping us
+ # from building. Since the message is worthless when git is not
+ # installed, this is what we want.
+ if git submodule status 2>/dev/null | grep -q '^-'
+ then
+ echo "You have uninitialized git submodules." >&2
+ echo "Please run: git submodule update --init" >&2
+ exit 1
+ fi
+fi
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"