]> git.wh0rd.org - fontconfig.git/blame - autogen.sh
Switch to FreeType 2.1.7 style includes. Bug #150.
[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
993ffcdd
KP
12ACLOCAL=${ACLOCAL-aclocal}
13LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
14AUTOMAKE=${AUTOMAKE-automake}
15AUTOHEADER=${AUTOHEADER-autoheader}
16AUTOCONF=${AUTOCONF-autoconf}
17LIBTOOLIZE_FLAGS="--copy --force"
20fa60c9
KP
18
19DIE=0
20
21have_libtool=false
993ffcdd
KP
22if $LIBTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then
23 libtool_version=`$LIBTOOLIZE --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
20fa60c9 24 case $libtool_version in
993ffcdd 25 1.4*|1.5*|1.6*|1.7*|2*)
20fa60c9
KP
26 have_libtool=true
27 ;;
28 esac
29fi
30if $have_libtool ; then : ; else
31 echo
32 echo "You must have libtool 1.4 installed to compile $PROJECT."
33 echo "Install the appropriate package for your distribution,"
34 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
35 DIE=1
36fi
37
993ffcdd 38($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
20fa60c9
KP
39 echo
40 echo "You must have autoconf installed to compile $PROJECT."
41 echo "libtool the appropriate package for your distribution,"
42 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
43 DIE=1
44}
45
46have_automake=false
993ffcdd
KP
47need_libtoolize=true
48if $AUTOMAKE --version < /dev/null > /dev/null 2>&1 ; then
49 automake_version=`$AUTOMAKE --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
20fa60c9
KP
50 case $automake_version in
51 1.2*|1.3*|1.4)
52 ;;
993ffcdd
KP
53 1.4*)
54 have_automake=true
55 need_libtoolize=false
56 ;;
20fa60c9
KP
57 *)
58 have_automake=true
59 ;;
60 esac
61fi
62if $have_automake ; then : ; else
63 echo
64 echo "You must have automake 1.4-p1 installed to compile $PROJECT."
65 echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
66 echo "(or a newer version if it is available)"
67 DIE=1
68fi
69
70if test "$DIE" -eq 1; then
71 exit 1
72fi
73
74test $TEST_TYPE $FILE || {
75 echo "You must run this script in the top-level $PROJECT directory"
76 exit 1
77}
78
79if test -z "$AUTOGEN_SUBDIR_MODE"; then
80 if test -z "$*"; then
81 echo "I am going to run ./configure with no arguments - if you wish "
82 echo "to pass any to it, please specify them on the $0 command line."
83 fi
84fi
85
993ffcdd
KP
86echo Running $ACLOCAL $ACLOCAL_FLAGS
87$ACLOCAL $ACLOCAL_FLAGS
20fa60c9
KP
88
89# optionally run autoheader
993ffcdd
KP
90if $AUTOHEADER --version < /dev/null > /dev/null 2>&1; then
91 echo Running $AUTOHEADER
92 $AUTOHEADER
93fi
94
95case $need_libtoolize in
96 true)
97 echo Running $LIBTOOLIZE $LIBTOOLIZE_FLAGS
98 $LIBTOOLIZE $LIBTOOLIZE_FLAGS
99 ;;
100esac
20fa60c9 101
993ffcdd
KP
102echo Running $AUTOMAKE -a $am_opt
103$AUTOMAKE -a $am_opt
104echo Running $AUTOCONF
105$AUTOCONF
20fa60c9
KP
106cd $ORIGDIR
107
108if test -z "$AUTOGEN_SUBDIR_MODE"; then
993ffcdd 109 echo Running $srcdir/configure
20fa60c9
KP
110 $srcdir/configure --enable-maintainer-mode "$@"
111
112 echo
113 echo "Now type 'make' to compile $PROJECT."
114fi