Dan Espen writes:
> "A.W.Payne" <ukrpayn_at_prl.research.philips.com> writes:
> >
> > I did, but someone had overwritten it with an old version which was xpm
> > format 2, when they installed some other program. Having now put back an
> > xpm format 3 xpm.h in my include directory it's compiled OK. You were
> > spot on Paul, thanks very much for the help.
>
> We are still left with user unfriendly output discovered too late.
>
> I notice that we check for the file "xpm.h" during configure, but
> never try to #include it.
>
> I'm still not totally up to speed on autoconf, but wouldn't it make
> more sense to change the xpm sensing logic to use the header and
> actually include an "XpmImage *" in the little sample program that
> configure uses?
Here is a snippet from the configure.in file from a recent XEmacs (21.0)
release. I'm no expert in autoconf, but I hope this helps.
- Brian
dnl Autodetect Xpm
xpm_problem=""
if test -z "$with_xpm"; then
AC_MSG_CHECKING(for Xpm - no older than 3.4f)
xe_check_libs=-lXpm
AC_TRY_RUN([#include <X11/xpm.h>
int main(int c, char **v) {
return c == 1 ? 0 :
XpmIncludeVersion != XpmLibraryVersion() ? 1 :
XpmIncludeVersion < 30406 ? 2 : 0 ;}],
[./conftest dummy_arg; xpm_status=$?;
if test "$xpm_status" = "0"; then
with_xpm=yes;
else
with_xpm=no;
if test "$xpm_status" = "1"; then
xpm_problem="Xpm library version and header file version don't match!"
elif test "$xpm_status" = "2"; then
xpm_problem="Xpm library version is too old!"
else
xpm_problem="Internal xpm detection logic error!"
fi
echo "
*** WARNING *** $xpm_problem
I'm not touching that with a 10-foot pole!
If you really want to use the installed version of Xpm, rerun
configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
fi],
[with_xpm=no])
xe_check_libs=
AC_MSG_RESULT($with_xpm)
fi
if test "$with_xpm" = "yes"; then
AC_DEFINE(HAVE_XPM)
XE_PREPEND(-lXpm, libs_x)
AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
xe_check_libs=-lXpm
AC_TRY_LINK(, [XpmCreatePixmapFromData()],
[xpm_for_msw=no],
[xpm_for_msw=yes])
xe_check_libs=
AC_MSG_RESULT($xpm_for_msw)
if test "$xpm_for_msw" = "yes"; then
AC_DEFINE(FOR_MSW)
fi
fi
--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Dec 16 1998 - 13:20:27 GMT