X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/a5900574a2d9257695b70ec9a065e4638162e7d6..f8295b32a98df79caee16a25a1dcf3a7a678e409:/m4/libpng.m4 diff --git a/m4/libpng.m4 b/m4/libpng.m4 index 5adeb0f..da3bac9 100644 --- a/m4/libpng.m4 +++ b/m4/libpng.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2009 Nick Bowler +dnl Copyright (C) 2009-2010 Nick Bowler dnl Copying and distribution of this file, with or without modification, dnl are permitted in any medium without royalty provided the copyright dnl notice and this notice are preserved. This file is offered as-is, @@ -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],