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}
12 test -z "$srcdir" && srcdir
=.
17 # The autoconf cache (version after 2.52) is not reliable yet.
18 rm -rf autom4te.cache vfs
/samba
/autom4te.cache
20 if test ! -d config
; then
21 mkdir config ||
exit 1
24 # Ensure that gettext is reasonably new.
25 gettext_ver
=`$GETTEXTIZE --version | sed -n '1s/\.//g;1s/.* //;1s/^\(...\)$/\100/;1s/^\(...\)\(.\)$/\10\2/;1p'`
26 if test $gettext_ver -lt 01038; then
27 echo "Don't use gettext older than 0.10.38" 2>&1
32 if test $gettext_ver -ge 01100; then
33 $GETTEXTIZE --copy --force --intl --no-changelog >tmpout ||
exit 1
34 if test -e Makefile.am~
; then
36 mv Makefile.am~ Makefile.am
38 if test -e configure.
in~
; then
40 mv configure.
in~ configure.
in
42 for i
in po
/Rules-quot po
/boldquot.
sed po
/en@boldquot.header \
43 po
/en@quot.header po
/insert-header.sin po
/quot.
sed \
44 po
/remove-potcdate.sin po
/Makefile.
in.
in
46 if diff -s $i $i~
>/dev
/null
2>&1 ; then
50 # Does we need po/Makevars.in and family for gettext 0.11 ?
51 if test ! -e po
/Makevars
; then
52 cat > po
/Makevars
<<\EOF
53 # Usually the message domain is the same as the package name.
56 # These two variables depend on the location of this directory.
58 top_builddir
= ..
/config
60 # These options get passed to xgettext.
61 XGETTEXT_OPTIONS
= --keyword=_
--keyword=N_
65 $GETTEXTIZE --copy --force >tmpout ||
exit 1
66 if test -e po
/ChangeLog~
; then
68 mv po
/ChangeLog~ po
/ChangeLog
73 if test -f `aclocal --print-ac-dir`/gettext.
m4; then
74 : # gettext macro files are available to aclocal.
76 # gettext macro files are not available.
77 # Find them and copy to a local directory.
78 # Ugly way to parse the instructions gettexize gives us.
79 m4files
="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`"
80 fromdir
=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'`
84 cp -f $fromdir/$i gettext.
m4
86 ACLOCAL_INCLUDES
="-I gettext.m4"
91 # Some old version of GNU build tools fail to set error codes.
92 # Check that they generate some of the files they should.
94 $ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS ||
exit 1
95 test -f aclocal.
m4 || \
96 { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; }
99 test -f config.h.
in || \
100 { echo "autoheader failed to generate config.h.in" 2>&1; exit 1; }
103 test -f configure || \
104 { echo "autoconf failed to generate configure" 2>&1; exit 1; }
106 # Workaround for Automake 1.5 to ensure that depcomp is distributed.
107 $AUTOMAKE -a src
/Makefile ||
exit 1
108 $AUTOMAKE -a ||
exit 1
109 test -f Makefile.
in || \
110 { echo "automake failed to generate Makefile.in" 2>&1; exit 1; }
112 cd vfs
/samba ||
exit 1
113 date -u >include
/stamp-h.
in
115 $AUTOHEADER ||
exit 1
116 test -f include
/config.h.
in || \
117 { echo "autoheader failed to generate vfs/samba/include/config.h.in" 2>&1; exit 1; }
120 test -f configure || \
121 { echo "autoconf failed to generate vfs/samba/configure" 2>&1; exit 1; }
124 $srcdir/configure
--cache-file=config.cache
--enable-maintainer-mode "$@"