summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2009-01-06 21:00:47 +0000
committerWerner Lemberg <wl@gnu.org>2009-01-06 21:00:47 +0000
commitc32637222f0eea3d1aec8063ec08241a07d47745 (patch)
tree68500cd37b64653c4b9ae50d675988e728c54098 /autogen.sh
parent5758688e87a6d1aa4595011b5324463051c6deeb (diff)
downloadfreetype2-c32637222f0eea3d1aec8063ec08241a07d47745.tar.gz
Don't rely on GNU sed.
* autogen.sh: Don't use GNUisms while calling sed. Problem reported by Sean McBride.
Diffstat (limited to 'autogen.sh')
-rw-r--r--autogen.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/autogen.sh b/autogen.sh
index 7e868826f..16c335fd5 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