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