Don't rely on GNU sed. * autogen.sh: Don't use GNUisms while calling sed. Problem reported by Sean McBride.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
diff --git a/ChangeLog b/ChangeLog
index 42eb522..8de8fd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-01-06 Werner Lemberg <wl@gnu.org>
+ * autogen.sh: Don't use GNUisms while calling sed. Problem reported
+ by Sean McBride.
+
+2009-01-06 Werner Lemberg <wl@gnu.org>
+
* src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
and FT_PIXEL_MODE_LCD_V. Problem reported by Chi Nguyen
<chint@necsv.com>.
diff --git a/autogen.sh b/autogen.sh
index 7e86882..16c335f 100644
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005, 2006, 2007, 2008 by
+# Copyright 2005, 2006, 2007, 2008, 2009 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -22,21 +22,21 @@ run ()
get_major_version ()
{
- echo $1 | sed -e 's/\([0-9]\+\)\..*/\1/g'
+ echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/g'
}
get_minor_version ()
{
- echo $1 | sed -e 's/[0-9]\+\.\([0-9]\+\).*/\1/g'
+ echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'
}
get_patch_version ()
{
# tricky: some version numbers don't include a patch
# separated with a point, but something like 1.4-p6
- patch=`echo $1 | sed -e 's/[0-9]\+\.[0-9]\+\.\([0-9]\+\).*/\1/g'`
+ patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'`
if test "$patch" = "$1"; then
- patch=`echo $1 | sed -e 's/[0-9]\+\.[0-9]\+\-p\([0-9]\+\).*/\1/g'`
+ patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\-p\([0-9][0-9]*\).*/\1/g'`
# if there isn't any patch number, default to 0
if test "$patch" = "$1"; then
patch=0
@@ -110,9 +110,9 @@ check_tool_version ()
}
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
+ echo "You must be in the same directory as \`autogen.sh'."
+ echo "Bootstrapping doesn't work if srcdir != builddir."
+ exit 1
fi
# On MacOS X, the GNU libtool is named `glibtool'.
@@ -146,7 +146,7 @@ cd builds/unix
echo "generating \`configure.ac'"
sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
- < configure.raw > configure.ac
+ < configure.raw > configure.ac
run aclocal -I . --force
run $LIBTOOLIZE --force --copy --install