1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 15:54:57 +00:00
transmission/autogen.sh
Jordan Lee e2c7884c7e (trunk) #3939 "autogen.sh doesn't work correctly on systems where /bin/sh doesn't point to bash" -- fixed with patch from er13
This bug was introduced a couple of days ago in the fix to #3901 "Confusing error message when libtool is missing." The fix introduced a bashism, which should be avoided if we want to work with strict sh.
2011-01-23 16:12:58 +00:00

50 lines
1,015 B
Bash
Executable file

#!/bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd "$srcdir"
PROJECT=Transmission
GETTEXTIZE="glib-gettextize"
$GETTEXTIZE --version < /dev/null > /dev/null 2>&1
if test $? -ne 0; then
GETTEXTIZE=""
fi
LIBTOOLIZE=libtoolize
if libtoolize --help >/dev/null 2>&1
then
:
elif glibtoolize --help >/dev/null 2>&1
then
LIBTOOLIZE=glibtoolize
fi
export LIBTOOLIZE
./update-version-h.sh
autoreconf -fi || exit 1;
if test "$GETTEXTIZE"; then
echo "Creating aclocal.m4 ..."
test -r aclocal.m4 || touch aclocal.m4
echo "Running $GETTEXTIZE... Ignore non-fatal messages."
echo "no" | $GETTEXTIZE --force --copy
echo "Making aclocal.m4 writable ..."
test -r aclocal.m4 && chmod u+w aclocal.m4
echo "Running intltoolize..."
intltoolize --copy --force --automake
fi
cd "$ORIGDIR" || exit $?
if test -z "$AUTOGEN_SUBDIR_MODE"; then
echo Running $srcdir/configure "$@"
$srcdir/configure "$@"
echo
echo "Now type 'make' to compile $PROJECT."
fi