From xemacs-m  Thu Dec  5 22:31:23 1996
Received: from venus.Sun.COM (venus.Sun.COM [192.9.25.5]) by xemacs.cs.uiuc.edu (8.8.3/8.8.3) with SMTP id WAA08502 for <xemacs-beta@xemacs.org>; Thu, 5 Dec 1996 22:31:22 -0600 (CST)
Received: from Eng.Sun.COM ([129.146.1.25]) by venus.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id UAA15281; Thu, 5 Dec 1996 20:30:17 -0800
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id UAA14122; Thu, 5 Dec 1996 20:30:14 -0800
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id UAA19148; Thu, 5 Dec 1996 20:30:13 -0800
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id UAA03314; Thu, 5 Dec 1996 20:30:12 -0800
Date: Thu, 5 Dec 1996 20:30:12 -0800
Message-Id: <199612060430.UAA03314@xemacs.eng.sun.com>
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: wmperry@aventail.com
Cc: Steven L Baur <steve@miranova.com>, xemacs-beta@xemacs.org
Subject: Re: b30 success
In-Reply-To: <199612060343.TAA00478@wmperry.in.aventail.com>
References: <199612052210.RAA20759@nvwls.cc.purdue.edu>
	<m2ral4plfg.fsf@altair.xemacs.org>
	<199612060343.TAA00478@wmperry.in.aventail.com>
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>
Mime-Version: 1.0 (generated by tm-edit 7.94)
Content-Type: text/plain; charset=US-ASCII

>>>>> "Bill" == William M Perry <wmperry@aventail.com> writes:

Bill>   Does PNG autodetection work for ANYONE?  There was a problem where it
Bill> wouldn't autodetect because of some library dependencies (-lz, etc).

PNG autodetection works for me too, but then you'd expect that.

I stared at the autodetection code for a while, but couldn't see
any logic error - maybe another /bin/sh vs bash issue?

Can YOU spot the bug in the code below?

dnl ### autodetect PNG
if test "${window_system}" = "none" ; then
  if test -z "${with_png}" ; then
    with_png=no
  elif test "${with_png}" != "no" ; then
    echo "PNG support cannot be specified without a window system."
    exit 1
  fi
fi
test -z "${with_png}" && { AC_HEADER_CHECK(png.h, , with_png="no") }
test -z "${with_png}" && { AC_HAVE_LIBRARY(-lpng, , with_png="no") }
test -z "${with_png}" && { AC_HAVE_LIBRARY(-lz,  with_png="yes") }
test -z "${with_png}" && { AC_HAVE_LIBRARY(-lgz, with_png="gnuz", with_png="no") }
case "${with_png}" in
  yes  ) AC_DEFINE(HAVE_PNG) ;;
  gnuz ) AC_DEFINE(HAVE_PNG) AC_DEFINE(HAVE_PNG_GNUZ) ;;
esac

