Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
srcdir="$(dirname "$0")"
test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.9
PKG_NAME=NetworkManager-pptp

(test -f $srcdir/configure.ac \
&& test -f $srcdir/auth-dialog/main.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
{ test -f "$srcdir/configure.ac" \
&& test -f "$srcdir/auth-dialog/main.c"; } || {
echo "**Error**: Directory ${srcdir} does not look like the top-level ${PKG_NAME} directory"
exit 1
}

(cd $srcdir;
autoreconf --install --symlink &&
intltoolize --force &&
autoreconf &&
./configure --enable-maintainer-mode $@
)
for test_tool in autoreconf intltoolize
do
[ -x "$(command -v "$test_tool")" ] || {
echo "${test_tool} was not found!"
exit 1
}
done

if cd "$srcdir"; then
autoreconf --install --symlink
intltoolize --force
autoreconf
# Run ./configure if NOCONFIGURE environmental variable is not defined (is empty)
[ -z "$NOCONFIGURE" ] && ./configure --enable-maintainer-mode "$@"
fi