2 # fontconfig/autogen.sh
4 # Copyright © 2000 Keith Packard
6 # Permission to use, copy, modify, distribute, and sell this software and its
7 # documentation for any purpose is hereby granted without fee, provided that
8 # the above copyright notice appear in all copies and that both that
9 # copyright notice and this permission notice appear in supporting
10 # documentation, and that the name of the author(s) not be used in
11 # advertising or publicity pertaining to distribution of the software without
12 # specific, written prior permission. The authors make no
13 # representations about the suitability of this software for any purpose. It
14 # is provided "as is" without express or implied warranty.
16 # THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 # EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 # PERFORMANCE OF THIS SOFTWARE.
24 # Run this to generate all the initial makefiles, etc.
29 test -z "$srcdir" && srcdir=.
33 AUTOGEN_SUBDIR_MODE="true"
42 FILE=fontconfig/fontconfig.h
43 ACLOCAL=${ACLOCAL-aclocal}
45 LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
46 AUTOMAKE=${AUTOMAKE-automake}
47 AUTOHEADER=${AUTOHEADER-autoheader}
48 AUTOCONF=${AUTOCONF-autoconf}
50 LIBTOOLIZE_FLAGS="--copy --force"
54 ($GPERF --version) < /dev/null > /dev/null 2>&1 || {
56 echo "You must have gperf installed to compile $PROJECT."
57 echo "Install the appropriate package for your distribution."
58 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
63 if $LIBTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then
64 libtool_version=`$LIBTOOLIZE --version | sed 's/^.* \([0-9][.][0-9.]*\)[^ ]*$/\1/'`
65 case $libtool_version in
66 1.4*|1.5*|1.6*|1.7*|2*)
71 if $have_libtool ; then : ; else
73 echo "You must have libtool 1.4 installed to compile $PROJECT."
74 echo "Install the appropriate package for your distribution,"
75 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
79 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
81 echo "You must have autoconf installed to compile $PROJECT."
82 echo "libtool the appropriate package for your distribution,"
83 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
89 if $AUTOMAKE --version < /dev/null > /dev/null 2>&1 ; then
90 automake_version=`$AUTOMAKE --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
91 case $automake_version in
103 if $have_automake ; then : ; else
105 echo "You must have automake 1.4-p1 installed to compile $PROJECT."
106 echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
107 echo "(or a newer version if it is available)"
111 if test "$DIE" -eq 1; then
115 test $TEST_TYPE $FILE || {
116 echo "You must run this script in the top-level $PROJECT directory"
120 if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
121 if test -z "$*"; then
122 echo "I am going to run ./configure with no arguments - if you wish "
123 echo "to pass any to it, please specify them on the $0 command line."
127 echo Running $ACLOCAL $ACLOCAL_FLAGS
128 $ACLOCAL $ACLOCAL_FLAGS
130 # optionally run autoheader
131 if $AUTOHEADER --version < /dev/null > /dev/null 2>&1; then
132 echo Running $AUTOHEADER
136 case $need_libtoolize in
138 echo Running $LIBTOOLIZE $LIBTOOLIZE_FLAGS
139 $LIBTOOLIZE $LIBTOOLIZE_FLAGS
143 echo Running $AUTOMAKE -a $am_opt
145 echo Running $AUTOCONF
149 if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
150 echo Running $srcdir/configure "$@"
151 $srcdir/configure "$@"
154 echo "Now type 'make' to compile $PROJECT."