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