1998-11-23 01:04:09 +03:00
|
|
|
#! /bin/sh
|
|
|
|
# Run this to generate all the initial makefiles, etc.
|
|
|
|
|
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}
|
|
|
|
: ${GETTEXTIZE=gettextize}
|
|
|
|
|
1998-03-23 10:12:13 +03:00
|
|
|
srcdir=`dirname $0`
|
|
|
|
test -z "$srcdir" && srcdir=.
|
|
|
|
|
|
|
|
(
|
|
|
|
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.
|
|
|
|
rm -rf autom4te.cache vfs/samba/autom4te.cache
|
2001-09-12 23:18:38 +04:00
|
|
|
|
2001-07-31 22:05:26 +04:00
|
|
|
# Ensure that gettext is reasonably new.
|
2002-04-12 15:02:48 +04:00
|
|
|
gettext_ver=`$GETTEXTIZE --version | sed -n '1s/\.//g;1s/.* //;1s/^\(...\)$/\100/;1s/^\(...\)\(.\)$/\10\2/;1p'`
|
2002-04-09 17:16:39 +04:00
|
|
|
if test $gettext_ver -lt 01038; then
|
|
|
|
echo "Don't use gettext older than 0.10.38" 2>&1
|
|
|
|
exit 1
|
|
|
|
fi
|
2001-07-31 22:05:26 +04:00
|
|
|
|
2002-04-09 17:16:39 +04:00
|
|
|
if test $gettext_ver -ge 01100; then
|
|
|
|
GETTEXTIZE_ARGS='--intl --no-changelog'
|
|
|
|
fi
|
2001-07-31 22:05:26 +04:00
|
|
|
|
|
|
|
rm -rf intl
|
2002-04-09 17:16:39 +04:00
|
|
|
$GETTEXTIZE $GETTEXTIZE_ARGS --copy --force >tmpout || exit 1
|
|
|
|
|
|
|
|
if test -e po/ChangeLog~; then
|
|
|
|
rm -f po/ChangeLog
|
|
|
|
mv po/ChangeLog~ po/ChangeLog
|
|
|
|
fi
|
2001-07-31 22:05:26 +04:00
|
|
|
|
2001-09-12 23:18:38 +04:00
|
|
|
if test ! -d config; then
|
|
|
|
mkdir config || exit 1
|
|
|
|
fi
|
|
|
|
|
2002-01-28 19:22:04 +03:00
|
|
|
rm -f aclocal.m4
|
2002-01-21 10:41:47 +03:00
|
|
|
if test -f `aclocal --print-ac-dir`/gettext.m4; then
|
2002-01-28 19:22:04 +03:00
|
|
|
: # gettext macro files are available to aclocal.
|
2002-01-21 10:41:47 +03:00
|
|
|
else
|
|
|
|
# gettext macro files are not available.
|
|
|
|
# Find them and copy to a local directory.
|
|
|
|
# Ugly way to parse the instructions gettexize gives us.
|
|
|
|
m4files="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`"
|
|
|
|
fromdir=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'`
|
|
|
|
rm tmpout
|
|
|
|
rm -rf gettext.m4
|
|
|
|
mkdir gettext.m4
|
|
|
|
for i in $m4files; do
|
|
|
|
cp -f $fromdir/$i gettext.m4
|
|
|
|
done
|
2002-01-28 19:22:04 +03:00
|
|
|
ACLOCAL_INCLUDES="-I gettext.m4"
|
2002-01-21 10:41:47 +03:00
|
|
|
fi
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
$ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS || exit 1
|
|
|
|
test -f aclocal.m4 || \
|
|
|
|
{ echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; }
|
|
|
|
|
2001-07-31 22:05:26 +04:00
|
|
|
$AUTOHEADER || exit 1
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f config.h.in || \
|
|
|
|
{ echo "autoheader failed to generate config.h.in" 2>&1; exit 1; }
|
|
|
|
|
2001-07-31 22:05:26 +04:00
|
|
|
$AUTOCONF || exit 1
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f configure || \
|
|
|
|
{ echo "autoconf failed to generate configure" 2>&1; exit 1; }
|
2001-09-13 00:45:46 +04:00
|
|
|
|
|
|
|
# Workaround for Automake 1.5 to ensure that depcomp is distributed.
|
|
|
|
$AUTOMAKE -a src/Makefile || exit 1
|
2001-07-31 22:05:26 +04:00
|
|
|
$AUTOMAKE -a || exit 1
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f Makefile.in || \
|
|
|
|
{ echo "automake failed to generate Makefile.in" 2>&1; exit 1; }
|
2001-04-06 22:01:31 +04:00
|
|
|
|
2000-08-18 08:16:25 +04:00
|
|
|
cd vfs/samba || exit 1
|
2001-02-08 03:01:21 +03:00
|
|
|
date -u >include/stamp-h.in
|
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 include/config.h.in || \
|
|
|
|
{ echo "autoheader failed to generate vfs/samba/include/config.h.in" 2>&1; exit 1; }
|
|
|
|
|
2001-07-31 22:05:26 +04:00
|
|
|
$AUTOCONF || exit 1
|
2002-01-28 19:22:04 +03:00
|
|
|
test -f configure || \
|
|
|
|
{ echo "autoconf failed to generate vfs/samba/configure" 2>&1; exit 1; }
|
2000-08-18 08:16:25 +04:00
|
|
|
) || exit 1
|
1998-03-23 10:12:13 +03:00
|
|
|
|
2000-08-24 18:13:00 +04:00
|
|
|
$srcdir/configure --cache-file=config.cache --enable-maintainer-mode "$@"
|