summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2006-05-08 07:10:29 +0000
committerWerner Lemberg <wl@gnu.org>2006-05-08 07:10:29 +0000
commit4df5b26fdfb659985fef6d482c1641b345243cbd (patch)
treef83d3c0fc6b626b40266f81133d6bfee21ee3c0d /autogen.sh
parent1639c7948231b4dcba4e00b6b9db1bbc3fb929e9 (diff)
downloadfreetype2-4df5b26fdfb659985fef6d482c1641b345243cbd.tar.gz
Put version information into the configure script. Reported by Paul
Watson <pwatson@redlinepy.com>. * builds/unix/configure.ac: Renamed to... * builds/unix/configure.raw: This which now serves (with appropriate modifications) as a template for configure.ac. * version.sed: New script. * autogen.sh: Generate configure.ac from configure.raw, using FREETYPE_MAJOR, FREETYPE_MINOR, and FREETYPE_PATCH from freetype.h.
Diffstat (limited to 'autogen.sh')
-rw-r--r--autogen.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index 5339101aa..2cc947179 100644
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005 by
+# Copyright 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -20,14 +20,26 @@ run ()
fi
}
-if test ! -f ./builds/unix/configure.ac; then
+if test ! -f ./builds/unix/configure.raw; then
echo "You must be in the same directory as \`autogen.sh'."
echo "Bootstrapping doesn't work if srcdir != builddir."
exit 1
fi
+# This sets freetype_major, freetype_minor, and freetype_patch.
+eval `sed -nf version.sed include/freetype/freetype.h`
+
+# We set freetype-patch to an empty value if it is zero.
+if test "$freetype_patch" = ".0"; then
+ freetype_patch=
+fi
+
cd builds/unix
+echo "generating \`configure.ac'"
+sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
+ < configure.raw > configure.ac
+
run aclocal -I . --force
run libtoolize --force --copy
run autoconf --force