2 # Run this to generate all the initial makefiles, etc.
4 # Make it possible to specify path in the environment
6 : ${AUTOHEADER=autoheader}
9 : ${GETTEXTIZE=gettextize}
10 : ${AUTOPOINT=autopoint}
13 test -z "$srcdir" && srcdir
=.
18 # The autoconf cache (version after 2.52) is not reliable yet.
19 rm -rf autom4te.cache vfs
/samba
/autom4te.cache
21 if test ! -d config
; then
22 mkdir config ||
exit 1
25 # Ensure that gettext is reasonably new.
26 gettext_ver
=`$GETTEXTIZE --version | sed -n '1s/\.//g;1s/.* //;1s/^\(...\)$/\100/;1s/^\(...\)\(.\)$/\10\2/;1p'`
27 if test $gettext_ver -lt 01038; then
28 echo "Don't use gettext older than 0.10.38" 2>&1
33 if test $gettext_ver -ge 01100; then
34 if test $gettext_ver -lt 01105; then
35 echo "Upgrage gettext to at least 0.11.5 or downgrade to 0.10.40" 2>&1
40 $GETTEXTIZE --copy --force ||
exit 1
41 if test -e po
/ChangeLog~
; then
43 mv po
/ChangeLog~ po
/ChangeLog
47 ACLOCAL_INCLUDES
="-I m4"
49 # Some old version of GNU build tools fail to set error codes.
50 # Check that they generate some of the files they should.
52 $ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS ||
exit 1
53 test -f aclocal.
m4 || \
54 { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; }
57 test -f config.h.
in || \
58 { echo "autoheader failed to generate config.h.in" 2>&1; exit 1; }
61 test -f configure || \
62 { echo "autoconf failed to generate configure" 2>&1; exit 1; }
64 # Workaround for Automake 1.5 to ensure that depcomp is distributed.
65 $AUTOMAKE -a src
/Makefile ||
exit 1
66 $AUTOMAKE -a ||
exit 1
67 test -f Makefile.
in || \
68 { echo "automake failed to generate Makefile.in" 2>&1; exit 1; }
70 cd vfs
/samba ||
exit 1
71 date -u >include
/stamp-h.
in
74 test -f include
/config.h.
in || \
75 { echo "autoheader failed to generate vfs/samba/include/config.h.in" 2>&1; exit 1; }
78 test -f configure || \
79 { echo "autoconf failed to generate vfs/samba/configure" 2>&1; exit 1; }
82 $srcdir/configure
--cache-file=config.cache
--enable-maintainer-mode "$@"