2 # Run this to generate all the initial makefiles, etc.
7 # Make it possible to specify path in the environment
9 : ${AUTOHEADER=autoheader}
10 : ${AUTOMAKE=automake}
12 : ${GETTEXTIZE=gettextize}
13 : ${AUTOPOINT=autopoint}
16 test -z "$srcdir" && srcdir
=.
19 # Some shells don't propagate "set -e" to subshells.
24 # The autoconf cache (version after 2.52) is not reliable yet.
25 rm -rf autom4te.cache vfs
/samba
/autom4te.cache
27 if test ! -d config
; then
31 # Ensure that gettext is reasonably new.
32 gettext_ver
=`$GETTEXTIZE --version | \
33 sed '2,$d; # remove all but the first line
34 s/.* //; # take text after the last space
35 s/-.*//; # strip "-pre" or "-rc" at the end
36 s/\([^.]\+\)/0\1/g; # prepend 0 to every token
37 s/0\([^.][^.]\)/\1/g; # trim 0 from long lokens
38 s/\.//g; # remove dots
41 if test $gettext_ver -lt 01038; then
42 echo "Don't use gettext older than 0.10.38" 2>&1
47 if test $gettext_ver -ge 01100; then
48 if test $gettext_ver -lt 01105; then
49 echo "Upgrade gettext to at least 0.11.5 or downgrade to 0.10.40" 2>&1
54 $GETTEXTIZE --copy --force ||
exit 1
55 if test -e po
/ChangeLog~
; then
57 mv po
/ChangeLog~ po
/ChangeLog
61 ACLOCAL_INCLUDES
="-I m4"
63 # Some old version of GNU build tools fail to set error codes.
64 # Check that they generate some of the files they should.
66 $ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS
67 test -f aclocal.
m4 || \
68 { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; }
71 test -f config.h.
in || \
72 { echo "autoheader failed to generate config.h.in" 2>&1; exit 1; }
75 test -f configure || \
76 { echo "autoconf failed to generate configure" 2>&1; exit 1; }
78 # Workaround for Automake 1.5 to ensure that depcomp is distributed.
79 $AUTOMAKE -a src
/Makefile
81 test -f Makefile.
in || \
82 { echo "automake failed to generate Makefile.in" 2>&1; exit 1; }
85 date -u >include
/stamp-h.
in
88 test -f include
/config.h.
in || \
89 { echo "autoheader failed to generate vfs/samba/include/config.h.in" 2>&1; exit 1; }
92 test -f configure || \
93 { echo "autoconf failed to generate vfs/samba/configure" 2>&1; exit 1; }
96 if test -x $srcdir/configure.mc
; then
97 $srcdir/configure.mc
"$@"
99 $srcdir/configure
--cache-file=config.cache
--enable-maintainer-mode "$@"