]> git.wh0rd.org - fontconfig.git/blame - autogen.sh
Handle pattern elements moving during multiple edits
[fontconfig.git] / autogen.sh
CommitLineData
20fa60c9
KP
1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3
4srcdir=`dirname $0`
5test -z "$srcdir" && srcdir=.
6
7ORIGDIR=`pwd`
8cd $srcdir
9PROJECT=Fontconfig
10TEST_TYPE=-f
11FILE=fontconfig/fontconfig.h
12
13DIE=0
14
15have_libtool=false
16if libtool --version < /dev/null > /dev/null 2>&1 ; then
3fbd50e4 17 libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
20fa60c9
KP
18 case $libtool_version in
19 1.4*|1.5*)
20 have_libtool=true
21 ;;
22 esac
23fi
24if $have_libtool ; then : ; else
25 echo
26 echo "You must have libtool 1.4 installed to compile $PROJECT."
27 echo "Install the appropriate package for your distribution,"
28 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
29 DIE=1
30fi
31
32(autoconf --version) < /dev/null > /dev/null 2>&1 || {
33 echo
34 echo "You must have autoconf installed to compile $PROJECT."
35 echo "libtool the appropriate package for your distribution,"
36 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
37 DIE=1
38}
39
40have_automake=false
41if automake --version < /dev/null > /dev/null 2>&1 ; then
42 automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
43 case $automake_version in
44 1.2*|1.3*|1.4)
45 ;;
46 *)
47 have_automake=true
48 ;;
49 esac
50fi
51if $have_automake ; then : ; else
52 echo
53 echo "You must have automake 1.4-p1 installed to compile $PROJECT."
54 echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
55 echo "(or a newer version if it is available)"
56 DIE=1
57fi
58
59if test "$DIE" -eq 1; then
60 exit 1
61fi
62
63test $TEST_TYPE $FILE || {
64 echo "You must run this script in the top-level $PROJECT directory"
65 exit 1
66}
67
68if test -z "$AUTOGEN_SUBDIR_MODE"; then
69 if test -z "$*"; then
70 echo "I am going to run ./configure with no arguments - if you wish "
71 echo "to pass any to it, please specify them on the $0 command line."
72 fi
73fi
74
75aclocal $ACLOCAL_FLAGS
76
77# optionally run autoheader
78(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
79
80automake -a $am_opt
81autoconf
82cd $ORIGDIR
83
84if test -z "$AUTOGEN_SUBDIR_MODE"; then
85 $srcdir/configure --enable-maintainer-mode "$@"
86
87 echo
88 echo "Now type 'make' to compile $PROJECT."
89fi