bug-oleo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Oleo 1.99.16 configure patch


From: Russ Allbery
Subject: Oleo 1.99.16 configure patch
Date: 05 Aug 2001 02:08:03 -0700
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

I ran into a variety of problems configuring and building Oleo on the
various systems that we support (AIX, Digital Unix, Solaris, Linux, IRIX,
and HP-UX), mostly due to ordering problems with libraries and incomplete
listings of the libraries that various other libraries are dependent on.
It looks like some parts of the build system were mostly only exercised on
Linux, whose linker knows how to pick up shared library dependencies that
aren't explicitly listed on the link line; this doesn't work on most other
Unix varients.

Here's the patch that got things working for me; it may be a bit brute
force.  It dumps all of the X libraries into LIBS, which gets things
working right in the Makefile.  It also adds checks for libpng and libz,
since libplot may have a dependency on both of them.

--- oleo-1.99.16/src/Makefile.am.orig   Sat Feb 10 00:27:04 2001
+++ oleo-1.99.16/src/Makefile.am        Tue Jul 17 09:53:39 2001
@@ -61,7 +61,7 @@
  ${SCIPLOT_SRC}
 
 if UseMotif
-MYLD = @link_motif@ @link_xmhtml@ @XBAE_LIBS@ @link_sciplot@ @XLT_LIBS@
+MYLD = ${X_LIBS} @link_motif@ @link_xmhtml@ @XBAE_LIBS@ @link_sciplot@ 
@XLT_LIBS@ ${X_PRE_LIBS} -lXt -lX11 ${X_EXTRA_LIBS}
 MYINC = @include_motif@ @XBAE_CFLAGS@ @include_xmhtml@ @include_sciplot@ 
@XLT_CFLAGS@
 MYCFL = ${X_CFLAGS}
 
@@ -79,12 +79,12 @@
 #
 # Allow non-Motif X version to get compiled.
 #
-MYLD=  ${X_LIBS}
+MYLD=
 MYINC=
 MYCFL= ${X_CFLAGS}
 endif
 
-oleo_LDADD = ${X_PRE_LIBS} ${MYLD} @INTLLIBS@ ../lib/liboleo.a 
../intl/libintl.a ${X_LIBS}
+oleo_LDADD = ${MYLD} @INTLLIBS@ ../lib/liboleo.a ../intl/libintl.a
 INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I../intl ${MYINC}
 CFLAGS = @CFLAGS@ -DLOCALEDIR=\"$(localedir)\" ${MYCFL} \
        -DBUILD_PREFIX='"'${BUILD_PREFIX}'"'
--- oleo-1.99.16/configure.in.orig      Sat Mar 10 06:32:29 2001
+++ oleo-1.99.16/configure.in   Tue Jul 17 10:07:59 2001
@@ -166,6 +166,7 @@
     dnl These should not happen if --without-motif has been used.
     dnl
     if test "$with_motif" = "yes"; then
+       AC_CHECK_LIB(Xpm, main, , , $X_LIBS $X_PRE_LIBS -lX11)
        AC_FIND_MOTIF
     fi
     if test "$with_motif" = "yes"; then
@@ -188,15 +189,13 @@
            CFLAGS="$MOTIF_CFLAGS $X_CFLAGS $CFLAGS"
            LIBS="$MOTIF_LIBS $X_LIBS $X_PRE_LIBS -lXt -lX11 $X_EXTRA_LIBS 
$LIBS"
        fi
-       AC_CHECK_LIB(Xpm, main)
     fi
     if test "$with_motif" = "no"; then
        dnl
        dnl Add link to X11
        dnl     This is only for the non-motif case.
        dnl
-       with_x=yes
-       AC_LINK_X
+       LIBS="$X_LIBS $X_PRE_LIBS -lXaw -lXt -lX11 -lXext -lXmu $X_EXTRA_LIBS 
$LIBS"
     fi
 fi dnl "$no_x" = "yes"
 
@@ -213,9 +212,11 @@
 dnl    the libplot from GNU plotutils sometimes requires linking the
 dnl    X and Motif libraries
 dnl
+AC_CHECK_LIB(png, main, LIBS="$LIBS -lpng")
+AC_CHECK_LIB(z, main, LIBS="$LIBS -lz")
 AC_CHECK_LIB(plot, pl_openpl_r,
        AC_DEFINE(HAVE_LIBPLOT)
-       LIBS="$LIBS -lplot")
+       LIBS="-lplot $LIBS")
 
 AC_CHECK_LIB(sciplot, sp_begin_plot)
 if test x$ac_cv_lib_sciplot_sp_begin_plot = xyes; then


-- 
Russ Allbery (address@hidden)             <http://www.eyrie.org/~eagle/>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]