diff --git a/install-sh b/install-sh index 6781b98..a5897de 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -515,6 +515,5 @@ done # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" +# time-stamp-end: "$" # End: diff --git a/macros/png-check.m4 b/macros/png-check.m4 index f428ea5..fae7634 100644 --- a/macros/png-check.m4 +++ b/macros/png-check.m4 @@ -6,36 +6,17 @@ dnl Test for the libpng and define PNG_CFLAGS, PNG_LIBS, and HAVE_LIBPNG AC_DEFUN([LB_CHECK_PNG], [ -PNG_LIBS= -PNG_CFLAGS= +# This is because the first PKG_CHECK_MODULES call is inside a conditional. +PKG_PROG_PKG_CONFIG -AC_ARG_WITH(png,[ - --with-png= |yes Enable use of PNG library. -],[ -if test "$withval" = yes ; then - AC_CHECK_LIB([png], [png_create_write_struct_2], [ - AC_DEFINE(HAVE_LIBPNG,1,Enable use of libpng) - PNG_LIBS="-lpng" - ]) -elif test "$withval" != no ; then - BACKUP_LIBS=$LIBS - LIBS=$withval/lib - AC_CHECK_LIB([png], [png_create_write_struct_2],[ - AC_DEFINE(HAVE_LIBPNG,1,Enable use of libpng) - PNG_CFLAGS="-I$withval/include -lpng" - PNG_LIBS="-L$withval/lib -lpng" - ],[ - AC_MSG_WARN([Could not find libpng in path $withval, disabling]) - ]) - LIBS=$BACKUP_LIBS -fi -],[ - AC_CHECK_LIB([png], [png_create_write_struct_2], [ - AC_DEFINE(HAVE_LIBPNG,1,Enable use of libpng) - PNG_LIBS="-lpng" - ],[AC_MSG_RESULT(not found)]) -]) - -AC_SUBST(PNG_CFLAGS) -AC_SUBST(PNG_LIBS) +AC_ARG_WITH([png], + [AS_HELP_STRING([--with-png], + [support handling png files @<:@default=check@:>@])], + [], + [with_png=check]) +AS_CASE(["$with_png"], + [yes], [PKG_CHECK_MODULES([PNG], [libpng], [HAVE_LIBPNG=1])], + [no], [], + [PKG_CHECK_MODULES([PNG], [libpng], [HAVE_LIBPNG=1], [HAVE_LIBPNG=0])]) +AM_CONDITIONAL([USE_LIBPNG], [test "$with_png" != no -a "$HAVE_LIBPNG" == "1"]) ])