From 298bb41d24f304bdc9c46c29cfe0f6c06d4b44de Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 4 Feb 2010 00:07:20 -0500 Subject: [PATCH] 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. --- m4/libpng.m4 | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/m4/libpng.m4 b/m4/libpng.m4 index 5adeb0f..a7e9477 100644 --- a/m4/libpng.m4 +++ b/m4/libpng.m4 @@ -6,17 +6,22 @@ dnl without any warranty. dnl _LIBPNG_TRY_VERSION(min-version) AC_DEFUN([_LIBPNG_TRY_VERSION], [dnl -sedhead='s/@<:@0-9@:>@@<:@0-9@:>@*/<<<&>>>/' -sedtail='s/.*<<<\(.*\)>>>.*/\1/;t;s/.*/0/' -png_min_major=`printf '%s' '$1' | sed -e "$sedhead"1 -e "$sedtail"` -png_min_minor=`printf '%s' '$1' | sed -e "$sedhead"2 -e "$sedtail"` -png_min_release=`printf '%s' '$1' | sed -e "$sedhead"3 -e "$sedtail"` -png_min_build=`printf '%s' '$1' | sed -e "$sedhead"4 -e "$sedtail"` +shead='s/@<:@0-9@:>@@<:@0-9@:>@*/<<<&>>>/' +sbody='s/.*<<<\(.*\)>>>.*/\1/;t' +stail='s/.*/0/' +png_min_major=`printf '%s' '$1' | sed -e "$shead"1 -e "$sbody" -e "$stail"` +png_min_minor=`printf '%s' '$1' | sed -e "$shead"2 -e "$sbody" -e "$stail"` +png_min_release=`printf '%s' '$1' | sed -e "$shead"3 -e "$sbody" -e "$stail"` +png_min_build=`printf '%s' '$1' | sed -e "$shead"4 -e "$sbody" -e "$stail"` png_min_status=`printf '%s' '$1' | sed ' - t; s/.*alpha.*/PNG_LIBPNG_BUILD_ALPHA/ - t; s/.*beta.*/PNG_LIBPNG_BUILD_BETA/ - t; s/.*rc.*/PNG_LIBPNG_BUILD_RC/ - t; s/.*/PNG_LIBPNG_BUILD_STABLE/ + t + s/.*alpha.*/PNG_LIBPNG_BUILD_ALPHA/ + t + s/.*beta.*/PNG_LIBPNG_BUILD_BETA/ + t + s/.*rc.*/PNG_LIBPNG_BUILD_RC/ + t + s/.*/PNG_LIBPNG_BUILD_STABLE/ '` AC_CACHE_CHECK([for libpng version at least $1], -- 2.43.2