Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions install-sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
43 changes: 12 additions & 31 deletions macros/png-check.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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= <path>|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"])
])