* AUTHORS: Updated.
[midnight-commander.git] / autogen.sh
blob3e6f4411a7f1ad9287af44c0c73ebe10cf1c0a57
1 #! /bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 # Make it possible to specify path in the environment
5 : ${AUTOCONF=autoconf}
6 : ${AUTOHEADER=autoheader}
7 : ${AUTOMAKE=automake}
8 : ${ACLOCAL=aclocal}
9 : ${GETTEXTIZE=gettextize}
11 srcdir=`dirname $0`
12 test -z "$srcdir" && srcdir=.
15 cd $srcdir
17 : ${CVS=cvs}
18 test -d macros || $CVS co -d macros gnome-common/macros || exit 1
20 # Ensure that gettext is reasonably new.
21 gettext_ver=`$GETTEXTIZE --version | sed -n '1s/^.* //p'`
23 case $gettext_ver in
24 0.10.3[89]) ;;
25 *) echo "Don't use gettext other than versions 0.10.38 and 0.10.39"
26 exit 1;;
27 esac
29 rm -rf intl
30 $GETTEXTIZE --copy --force >tmpout || exit 1
31 rm -f po/ChangeLog
32 mv po/ChangeLog~ po/ChangeLog
34 # Ugly way to parse the instructions gettexize gives us.
35 m4files="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`"
36 fromdir=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'`
37 rm tmpout
38 rm -rf gettext.m4
39 mkdir gettext.m4
40 for i in $m4files; do
41 cp -f $fromdir/$i gettext.m4
42 done
44 $ACLOCAL -I macros -I gettext.m4 $ACLOCAL_FLAGS || exit 1
45 $AUTOHEADER || exit 1
46 $AUTOCONF || exit 1
47 $AUTOMAKE -a || exit 1
49 cd vfs/samba || exit 1
50 date -u >include/stamp-h.in
51 $AUTOHEADER || exit 1
52 $AUTOCONF || exit 1
53 ) || exit 1
55 $srcdir/configure --cache-file=config.cache --enable-maintainer-mode "$@"