build: out of src build directory fix.
[NetworkManager.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
6
7 olddir=`pwd`
8
9 REQUIRED_AUTOMAKE_VERSION=1.9
10 PKG_NAME=NetworkManager
11
12 (test -f $srcdir/configure.ac \
13   && test -f $srcdir/src/main.c) || {
14     echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
15     echo " top-level $PKG_NAME directory"
16     exit 1
17 }
18
19 cd $srcdir
20
21 # Fetch submodules if needed
22 echo "+ Setting up submodules"
23 git submodule init
24 git submodule update
25
26 gtkdocize || exit 1
27 autopoint --force
28 AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
29
30 cd $olddir
31 if test -z "$NOCONFIGURE"; then
32         $srcdir/configure --enable-maintainer-mode "$@"
33 fi