From xemacs-m  Wed Jun 11 09:12:55 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id JAA16696
	for <xemacs-beta@xemacs.org>; Wed, 11 Jun 1997 09:12:53 -0500 (CDT)
Received: from Eng.Sun.COM ([129.146.1.25]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id HAA25072; Wed, 11 Jun 1997 07:32:28 -0700
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id HAA19803; Wed, 11 Jun 1997 07:11:15 -0700
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id HAA19724; Wed, 11 Jun 1997 07:11:13 -0700
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id HAA16663; Wed, 11 Jun 1997 07:11:13 -0700
Date: Wed, 11 Jun 1997 07:11:13 -0700
Message-Id: <199706111411.HAA16663@xemacs.eng.sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: tor@spacetec.no (Tor Arntsen)
Cc: XEmacs Beta Test <xemacs-beta@xemacs.org>
Subject: Re: xpm version configure test
In-Reply-To: <199706111341.PAA11499@pallas.spacetec.no>
References: <mrb@Eng.Sun.COM>
	<199706111341.PAA11499@pallas.spacetec.no>
X-Mailer: VM 6.32 under 20.3 "Zagreb" XEmacs Lucid (beta5)
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "Tor" == Tor Arntsen <tor@spacetec.no> writes:

Tor> On Jun 11, 14:04, Martin Buchholz wrote:

Tor> The problem with at least IRIX 6.2 is that there *is* no xpm.h file..!
Tor> But there *are* libXpm.so files:
>> versions long|grep -i xpm
Tor> l     0     0 ViewKit_eoe.sw.base     usr/lib/libXpm.so
Tor> f 59536   199 ViewKit_eoe.sw.base     usr/lib/libXpm.so.1
Tor> l     0     0 ViewKit_eoe.sw32.base   usr/lib32/libXpm.so
Tor> f  5299   233 ViewKit_eoe.sw32.base   usr/lib32/libXpm.so.1
Tor> l     0     0 ViewKit_eoe.sw64.base   usr/lib64/libXpm.so
Tor> f 34725   263 ViewKit_eoe.sw64.base   usr/lib64/libXpm.so.1

Tor> So to compile --with-xpm you need to install your own Xpm.  The test above
Tor> will then pass, but if you don't make sure that you link with your installed 
Tor> (e.g. /usr/local/lib) libXpm then it fails.  The symptom is that the toolbar 
Tor> is without the icons.

OK. Here's another new test, that checks that the header file and the
library agree on the version number, AND that it's at least 3.4f:


dnl Autodetect Xpm
AC_MSG_CHECKING(for Xpm)
xe_check_libs=-lXpm
test -z "$with_xpm" && { AC_TRY_RUN([#include <X11/xpm.h>
int main(int argc, char *argv[]) { 
return (XpmIncludeVersion != XpmLibraryVersion()) ||
        XpmIncludeVersion < 30406; 
}], with_xpm=yes, with_xpm=no)
}
xe_check_libs=
AC_MSG_RESULT($with_xpm)
if test "$with_xpm" = "yes"; then
  AC_DEFINE(HAVE_XPM)
  XE_PREPEND(-lXpm, libs_x)
fi

Martin

