From: Nick Bowler Date: Sun, 31 Jan 2010 21:52:05 +0000 (-0500) Subject: build: Don't use a semicolon after sed's 't' command. X-Git-Url: http://git.draconx.ca/gitweb/upkg.git/commitdiff_plain/0d572b509281eb39bd418cb7a87ecfd9e101cb8a build: Don't use a semicolon after sed's 't' command. 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. --- diff --git a/m4/glib.m4 b/m4/glib.m4 index 9d90f6f..a3253ff 100644 --- a/m4/glib.m4 +++ b/m4/glib.m4 @@ -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],