]> git.draconx.ca Git - upkg.git/commitdiff
build: Don't use a semicolon after sed's 't' command.
authorNick Bowler <nbowler@draconx.ca>
Sun, 31 Jan 2010 21:52:05 +0000 (16:52 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 31 Jan 2010 21:52:05 +0000 (16:52 -0500)
Some (namely, FreeBSD's) sed implementations fail when a semicolon is
used after a 't' command.  This behaviour appears to be acceptable
according to POSIX, so appease these implementations by passing extra
-e options to sed.

m4/glib.m4

index 9d90f6f301f79a8c4609eae4e9ff88237b6e8994..a3253ff63f36166a76cfb31882b36a49e7d90f9a 100644 (file)
@@ -6,11 +6,12 @@ dnl without any warranty.
 
 dnl _GLIB_TRY_VERSION(min-version)
 AC_DEFUN([_GLIB_TRY_VERSION], [dnl
-sedhead='s/@<:@0-9@:>@@<:@0-9@:>@*/<<<&>>>/'
-sedtail='s/.*<<<\(.*\)>>>.*/\1/;t;s/.*/0/'
-glib_min_major=`printf   '%s' '$1' | sed -e "$sedhead"1 -e "$sedtail"`
-glib_min_minor=`printf   '%s' '$1' | sed -e "$sedhead"2 -e "$sedtail"`
-glib_min_release=`printf '%s' '$1' | sed -e "$sedhead"3 -e "$sedtail"`
+shead='s/@<:@0-9@:>@@<:@0-9@:>@*/<<<&>>>/'
+sbody='s/.*<<<\(.*\)>>>.*/\1/;t'
+stail='s/.*/0/'
+glib_min_major=`printf   '%s' '$1' | sed -e "$shead"1 -e "$sbody" -e "$stail"`
+glib_min_minor=`printf   '%s' '$1' | sed -e "$shead"2 -e "$sbody" -e "$stail"`
+glib_min_release=`printf '%s' '$1' | sed -e "$shead"3 -e "$sbody" -e "$stail"`
 
 AC_CACHE_CHECK([for glib version at least $1],
        [glib_cv_sufficient_ver],