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 >tmpout ||
exit 1
41 if test -e po
/ChangeLog~
; then
43 mv po
/ChangeLog~ po
/ChangeLog
48 if test -f `aclocal --print-ac-dir`/gettext.
m4; then
49 : # gettext macro files are available to aclocal.
51 # gettext macro files are not available.
52 # Find them and copy to a local directory.
53 # Ugly way to parse the instructions gettexize gives us.
54 m4files
="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`"
55 fromdir
=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'`
59 cp -f $fromdir/$i gettext.
m4
61 ACLOCAL_INCLUDES
="-I gettext.m4"
66 # Some old version of GNU build tools fail to set error codes.
67 # Check that they generate some of the files they should.
69 $ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS ||
exit 1
70 test -f aclocal.
m4 || \
71 { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; }
74 test -f config.h.
in || \
75 { echo "autoheader failed to generate config.h.in" 2>&1; exit 1; }
78 test -f configure || \
79 { echo "autoconf failed to generate configure" 2>&1; exit 1; }
81 # Workaround for Automake 1.5 to ensure that depcomp is distributed.
82 $AUTOMAKE -a src
/Makefile ||
exit 1
83 $AUTOMAKE -a ||
exit 1
84 test -f Makefile.
in || \
85 { echo "automake failed to generate Makefile.in" 2>&1; exit 1; }
87 cd vfs
/samba ||
exit 1
88 date -u >include
/stamp-h.
in
91 test -f include
/config.h.
in || \
92 { echo "autoheader failed to generate vfs/samba/include/config.h.in" 2>&1; exit 1; }
95 test -f configure || \
96 { echo "autoconf failed to generate vfs/samba/configure" 2>&1; exit 1; }
99 $srcdir/configure
--cache-file=config.cache
--enable-maintainer-mode "$@"