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