childs -> children.
[AROS.git] / workbench / libs / freetype / autogen.sh
blob87f30a1caa73ac2665841a1817c3203db695e452
1 #!/bin/sh
3 # Copyright 2005, 2006, 2007, 2008 by
4 # David Turner, Robert Wilhelm, and Werner Lemberg.
6 # This file is part of the FreeType project, and may only be used, modified,
7 # and distributed under the terms of the FreeType project license,
8 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
9 # indicate that you have read the license and understand and accept it
10 # fully.
12 run ()
14 echo "running \`$*'"
15 eval $*
17 if test $? != 0 ; then
18 echo "error while running \`$*'"
19 exit 1
23 if test ! -f ./builds/unix/configure.raw; then
24 echo "You must be in the same directory as \`autogen.sh'."
25 echo "Bootstrapping doesn't work if srcdir != builddir."
26 exit 1
29 # This sets freetype_major, freetype_minor, and freetype_patch.
30 eval `sed -nf version.sed include/freetype/freetype.h`
32 # We set freetype-patch to an empty value if it is zero.
33 if test "$freetype_patch" = ".0"; then
34 freetype_patch=
37 cd builds/unix
39 echo "generating \`configure.ac'"
40 sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
41 < configure.raw > configure.ac
43 # On MacOS X, the GNU libtool is named `glibtool'.
44 HOSTOS=`uname`
45 LIBTOOLIZE=libtoolize
46 if test "$HOSTOS"x = Darwinx; then
47 LIBTOOLIZE=glibtoolize
50 run aclocal -I . --force
51 run $LIBTOOLIZE --force --copy --install
52 run autoconf --force
54 chmod +x mkinstalldirs
55 chmod +x install-sh
57 cd ../..
59 chmod +x ./configure
61 # EOF