1998-11-23 01:04:09 +03:00
|
|
|
#! /bin/sh
|
|
|
|
# Run this to generate all the initial makefiles, etc.
|
|
|
|
|
2002-09-26 01:53:38 +04:00
|
|
|
# Don't ignore errors.
|
|
|
|
set -e
|
|
|
|
|
2001-07-31 22:05:26 +04:00
|
|
|
# Make it possible to specify path in the environment
|
|
|
|
: ${AUTOCONF=autoconf}
|
|
|
|
: ${AUTOHEADER=autoheader}
|
|
|
|
: ${AUTOMAKE=automake}
|
|
|
|
: ${ACLOCAL=aclocal}
|
2002-09-14 02:33:44 +04:00
|
|
|
: ${AUTOPOINT=autopoint}
|
2009-04-25 12:09:47 +04:00
|
|
|
: ${LIBTOOLIZE=libtoolize}
|
2004-01-27 00:40:30 +03:00
|
|
|
: ${XGETTEXT=xgettext}
|
2001-07-31 22:05:26 +04:00
|
|
|
|
1998-03-23 10:12:13 +03:00
|
|
|
srcdir=`dirname $0`
|
|
|
|
test -z "$srcdir" && srcdir=.
|
|
|
|
|
2009-04-30 21:46:01 +04:00
|
|
|
|
1998-03-23 10:12:13 +03:00
|
|
|
(
|
2002-09-26 01:53:38 +04:00
|
|
|
# Some shells don't propagate "set -e" to subshells.
|
|
|
|
set -e
|
|
|
|
|
2003-12-03 01:53:07 +03:00
|
|
|
cd "$srcdir"
|
2001-04-06 22:01:31 +04:00
|
|
|
|
2001-09-30 23:51:23 +04:00
|
|
|
# The autoconf cache (version after 2.52) is not reliable yet.
|
2011-02-15 16:44:17 +03:00
|
|
|
rm -rf autom4te.cache src/vfs/smbfs/helpers/autom4te.cache
|
2001-09-12 23:18:38 +04:00
|
|
|
|
2002-05-14 21:00:22 +04:00
|
|
|
if test ! -d config; then
|
2002-09-26 01:53:38 +04:00
|
|
|
mkdir config
|
2002-05-14 21:00:22 +04:00
|
|
|
fi
|
|
|
|
|
2005-09-29 02:10:52 +04:00
|
|
|
# Recreate intl directory.
|
2002-05-14 18:16:47 +04:00
|
|
|
rm -rf intl
|
2005-09-29 01:58:52 +04:00
|
|
|
$AUTOPOINT --force || exit 1
|
2001-07-31 22:05:26 +04:00
|
|
|
|
2004-01-27 00:40:30 +03:00
|
|
|
# Generate po/POTFILES.in
|
2005-10-04 19:22:35 +04:00
|
|
|
$XGETTEXT --keyword=_ --keyword=N_ --keyword=Q_ --output=- \
|
2005-07-27 23:39:58 +04:00
|
|
|
`find . -name '*.[ch]'` | sed -ne '/^#:/{s/#://;s/:[0-9]*/\
|
2004-08-02 16:37:22 +04:00
|
|
|
/g;s/ //g;p;}' | \
|
2011-05-25 17:59:27 +04:00
|
|
|
grep -v '^$' | sort | uniq >po/POTFILES.in
|
2004-01-27 00:40:30 +03:00
|
|
|
|
2009-04-25 12:09:47 +04:00
|
|
|
$LIBTOOLIZE
|
|
|
|
|
2002-09-17 20:13:25 +04:00
|
|
|
ACLOCAL_INCLUDES="-I m4"
|
2002-07-28 10:39:48 +04:00
|
|
|
|
2002-01-28 19:22:04 +03:00
|
|
|
# Some old version of GNU build tools fail to set error codes.
|
|
|
|
# Check that they generate some of the files they should.
|
|
|
|
|
2002-09-26 01:53:38 +04:00
|
|
|
$ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f aclocal.m4 || \
|
2005-05-20 18:29:24 +04:00
|
|
|
{ echo "aclocal failed to generate aclocal.m4" >&2; exit 1; }
|
2002-01-28 19:22:04 +03:00
|
|
|
|
2001-07-31 22:05:26 +04:00
|
|
|
$AUTOHEADER || exit 1
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f config.h.in || \
|
2005-05-20 18:29:24 +04:00
|
|
|
{ echo "autoheader failed to generate config.h.in" >&2; exit 1; }
|
2002-01-28 19:22:04 +03:00
|
|
|
|
2001-07-31 22:05:26 +04:00
|
|
|
$AUTOCONF || exit 1
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f configure || \
|
2005-05-20 18:29:24 +04:00
|
|
|
{ echo "autoconf failed to generate configure" >&2; exit 1; }
|
2001-09-13 00:45:46 +04:00
|
|
|
|
|
|
|
# Workaround for Automake 1.5 to ensure that depcomp is distributed.
|
2004-12-30 09:33:18 +03:00
|
|
|
if test "`$AUTOMAKE --version|awk '{print $NF;exit}'`" = '1.5' ; then
|
|
|
|
$AUTOMAKE -a src/Makefile
|
|
|
|
fi
|
2002-09-26 01:53:38 +04:00
|
|
|
$AUTOMAKE -a
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f Makefile.in || \
|
2005-05-20 18:29:24 +04:00
|
|
|
{ echo "automake failed to generate Makefile.in" >&2; exit 1; }
|
2001-04-06 22:01:31 +04:00
|
|
|
|
2011-02-15 16:44:17 +03:00
|
|
|
cd src/vfs/smbfs/helpers
|
2001-02-08 03:01:21 +03:00
|
|
|
date -u >include/stamp-h.in
|
2002-01-28 19:22:04 +03:00
|
|
|
|
2002-09-26 01:53:38 +04:00
|
|
|
$AUTOHEADER
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f include/config.h.in || \
|
2011-02-15 16:44:17 +03:00
|
|
|
{ echo "autoheader failed to generate src/vfs/smbfs/helpers/include/config.h.in" >&2; exit 1; }
|
2002-01-28 19:22:04 +03:00
|
|
|
|
2002-09-26 01:53:38 +04:00
|
|
|
$AUTOCONF
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f configure || \
|
2011-02-15 16:44:17 +03:00
|
|
|
{ echo "autoconf failed to generate src/vfs/smbfs/helpers/configure" >&2; exit 1; }
|
2000-08-18 08:16:25 +04:00
|
|
|
) || exit 1
|
1998-03-23 10:12:13 +03:00
|
|
|
|
2013-04-09 15:51:24 +04:00
|
|
|
$srcdir/maint/utils/version.sh "$srcdir"
|
2009-06-16 21:40:24 +04:00
|
|
|
|
2002-11-29 09:39:41 +03:00
|
|
|
if test -x $srcdir/configure.mc; then
|
|
|
|
$srcdir/configure.mc "$@"
|
|
|
|
fi
|