Subject: Xpm detection

From: Dan Espen <[email-masked]>
Date: Tue, 05 Jan 1999 15:16:05 -0500

Up until now, I have been running "configure" like this:

./configure \
  --bindir=/opt/public/src/fvwm/2.1.7 \
  --libexecdir=/opt/public/src/ \
  --enable-extras \
  --prefix=/opt/public \
  --x-libraries=/usr/openwin/lib:/opt/public/lib\
  --with-xpm-includes=/opt/public/include --with-xpm-library=/opt/public/lib

With the latest download, the second Xpm detection fails:

configure:2969: checking for Xpm 3.4f or better
configure:2986: gcc -o conftest -g  -I/opt/public/include  conftest.c  -L/opt/public/lib -lXpm  -L/usr/openwin/lib:/opt/public/lib -R/usr/openwin/lib:/opt/public/lib  -lX11 -lsocket  -lnsl 1>&5
In file included from configure:2979:
/opt/public/include/X11/xpm.h:76: X11/Xlib.h: No such file or directory
/opt/public/include/X11/xpm.h:77: X11/Xutil.h: No such file or directory
configure: failed program was:
#line 2978 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
   int main(int c, char **v) {
   return c == 1 ? 0 :
     XpmIncludeVersion != XpmLibraryVersion() ? 1 :
     XpmIncludeVersion < 30406 ? 2 : 0 ;}

The problem being, it is not using /usr/openwin/include for the
compile.

It looks to me like the content of $LIBS is being wiped between the
2 different XPM tests.  (But I'm still "configure-challenged".)

--
Dan Espen                                Phone: (732) 699-5570
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Paul D. Smith)
Date: 05 Jan 1999 15:35:14 -0500

Ho hum.

Not LIBS, but CPPFLAGS (I think).  You're missing -I options not -L.

The problem is that the X macros in configure don't seem to add to the
default CPPFLAGS and LIBS and LDFLAGS as you go, like other macros which
find libraries, etc. do, but instead put those into separate variables.
So it seems like you always have to reset them before running checks
that require X.

I don't really understand why they're kept separately, but there you go.
I caught the problem of not having the libraries on your link line, but
not the one with missing -I options.

Thx.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Steve Robbins <[email-masked]>
Date: Tue, 5 Jan 1999 19:13:59 -0500 (EST)

> I don't really understand why they're kept separately, but there you go.

Perhaps for the case that you're building X and non-X programs in the same
package?  You can link the former with $(LIBS) $(X_LIBS) and the latter
with just $(LIBS).

Not only that, but you have to do weird things like:

	$(X_LIBS) $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS)
                                ^^^^^^^^^^^^
and you may need different things here for different X programs ...

--
Steve Robbins                              <[email-masked]>

There's a little bit of Elvis in everybody.
Except Michael J. Fox -- he's the anti-Elvis.