Fix autogen with new versions of automake
[lxde/lxtask.git] / autogen.sh
CommitLineData
580e78c2 1#! /bin/sh
580e78c2
HJYP
2AC_VERSION=
3
910ae56d 4AUTOMAKE=${AUTOMAKE:-automake}
5AM_INSTALLED_VERSION=$($AUTOMAKE --version | sed -e '2,$ d' -e 's/.* \([0-9]*\.[0-9]*\).*/\1/')
6
3824bf37
JL
7# FIXME: we need a better way for version check later.
8case "$AM_INSTALLED_VERSION" in
9 1.1[1-9])
10 ;;
11 *)
910ae56d 12 echo
3824bf37 13 echo "You must have automake >= 1.11 installed."
910ae56d 14 echo "Install the appropriate package for your distribution,"
15 echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
16 exit 1
3824bf37
JL
17 ;;
18esac
910ae56d 19
580e78c2
HJYP
20
21if [ "x${ACLOCAL_DIR}" != "x" ]; then
3824bf37
JL
22 ACLOCAL_ARG=-I ${ACLOCAL_DIR}
23fi
24
25if gtkdocize --copy; then
26 echo "Files needed by gtk-doc are generated."
27else
28 echo "You need gtk-doc to build this package."
29 echo "http://www.gtk.org/gtk-doc/"
30 exit 1
580e78c2
HJYP
31fi
32
3824bf37
JL
33echo
34echo "If you are going to 'make dist', please add configure option --enable-gtk-doc."
35echo "Otherwise, API documents for libfm won't be correctly built by gtk-doc."
36echo
37
38set -x
39
580e78c2 40${ACLOCAL:-aclocal$AM_VERSION} ${ACLOCAL_ARG}
910ae56d 41${AUTOHEADER:-autoheader$AC_VERSION} --force
42AUTOMAKE=$AUTOMAKE libtoolize -c --automake --force
43AUTOMAKE=$AUTOMAKE intltoolize -c --automake --force
44$AUTOMAKE --add-missing --copy --include-deps
580e78c2
HJYP
45${AUTOCONF:-autoconf$AC_VERSION}
46
580e78c2 47rm -rf autom4te.cache