I needed the following patch to get Xbae 4.9.1 to build on all platforms
we support (AIX, Digital Unix, Solaris, Linux, IRIX, and HP-UX) against a
shared version of Motif (2.0.2 in most cases).
Basically, it uses the X_CFLAGS variable when looking for X headers (which
may not be in the standard include path), adds Xpm to LIBS if it's found
since Motif may have a link dependency on Xpm, and then adds @LIBS@ to
libXbae_la_LIBADD in the Makefile.am so that -lXpm will be picked up
there.
--- xbae-4.9.1/src/Makefile.am.orig Mon May 21 12:31:05 2001
+++ xbae-4.9.1/src/Makefile.am Mon Jul 16 09:38:26 2001
@@ -18,7 +18,7 @@
# This doesn't work out yet:
# picks up wrong Motif lib, won't work with non-installed library, etc.
-libXbae_la_LIBADD = @MOTIF_LIBADD@ @X_LIBS@ -lXt ${X_PRE_LIBS} -lXext -lX11
${X_EXTRA_LIBS}
+libXbae_la_LIBADD = @MOTIF_LIBADD@ @LIBS@ @X_LIBS@ -lXt ${X_PRE_LIBS} -lXext -lX11
+${X_EXTRA_LIBS}
# doesn't work either since it may introduce a wrong linker path
#libXbae_la_LIBADD = @X_LIBS@ -lXt ${X_PRE_LIBS} -lXext -lX11 $(X_EXTRA_LIBS)
--- xbae-4.9.1/configure.in.orig Mon May 21 12:31:05 2001
+++ xbae-4.9.1/configure.in Mon Jul 16 09:35:07 2001
@@ -190,7 +190,10 @@
dnl
dnl Some checks about available headers/libraries
+ac_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_CHECK_HEADERS(xpm.h X11/xpm.h)
+CPPFLAGS="$ac_save_CPPFLAGS"
dnl whether to use debugging malloc library
LT_WITH_DMALLOC
@@ -200,11 +203,9 @@
dnl
if test "x$ac_cv_header_X11_xpm_h" = "xyes" -o "x$ac_cv_header_xpm_h" = "xyes"
then
- ac_save_LIBS="$LIBS"
- LIBS="$X_LIBS -lX11"
- AC_CHECK_LIB(Xpm, XpmLibraryVersion)
+ AC_CHECK_LIB(Xpm, XpmLibraryVersion, , ,
+ $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
AM_CONDITIONAL(HaveXpm, test x$ac_cv_lib_Xpm_XpmLibraryVersion = xyes)
- LIBS="$ac_save_LIBS"
else
AM_CONDITIONAL(HaveXpm, false)
fi
--
Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/>