File: autogen.sh

package info (click to toggle)
xcb-util 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 1,724 kB
  • sloc: sh: 11,292; ansic: 782; makefile: 36
file content (29 lines) | stat: -rwxr-xr-x 749 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /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 $?

if test -z "$NOCONFIGURE"; then
    $srcdir/configure "$@"
fi