The problem is, you are trying to pass general LDFLAGS and general CFLAGS in on X only includes and libs. Instead of using --x-includes and --x-libraries, do the following:

./configure LDFLAGS="-L/usr/local/lib -L/usr/X11R6/lib" CFLAGS="-I/usr/local/lib -I/usr/X11R6/include" --prefix=/opt

configure will only apply the --x- flags to the X checks none of the others.

David

David Thompson wrote:


 The problem is, configure is not picking up the location of -lGL. If you
 look in your config.log and search for GL, then you should see what kind
 of error is there. The X stuff is looked up first then the GL stuff and
 then Motif. I'm betting that the standard X lookups from AutoConf don't
 store the LDFLAGS for further processed commands as we do with Motif. If
 that's the case, we can just move the Motif checks before the OpenGL
 checks.

 The reason it works when you set the LDFLAGS is that then configure can
 find the link library libGL.a or libGL.so.

Alright. I'm coming to some conclusions here.

I assume I do not need to specify /usr/X11R6/include and /usr/X11R6/lib
to the configure script; these directories will or should be used and searched
by default, right?

However, lots of my additional packages are in /usr/local/[include,lib],
which is not searched by default (f.ex. ImageMagick, Tiff packages are there).

So I configure with:

$ ./configure --prefix=/opt \
        --x-includes=/usr/local/include \
        --x-libraries=/usr/local/lib

The full config.log (gzipped) is attached to this email.

A few peculiar lines from this config.log:

Around line 1903
----------------

configure:24292: checking for XpSetImageResolution in -lXp
configure:24323: gcc -o conftest -g -O2 -I/usr/local/include
-I/usr/X11R6/include -I/usr/local/include -I/usr/X11R6/include conftest.c -lXp
 -L/usr/X11R6/lib -lm -L/usr/local/lib  >&5
configure:24326: $? = 0
configure:24329: test -s conftest
configure:24332: $? = 0
configure:24344: result: yes

Notice the "-I/usr/X11R6/include" and "-L/usr/X11R6/lib" here!!!



Around line 1700
----------------

configure:23951: checking for glXGetConfig in -lGL
configure:23982: gcc -o conftest -g -O2 -I/usr/local/include
-I/usr/local/include  conftest.c -lGL  -lm -L/usr/local/lib  >&5
/usr/libexec/elf/ld: cannot find -lGL


Notice: the X11R6 include/lib have disappeared!



There's something fishy here, isn't it?

If you suggest a fix (e.g. swap Motif and OpenGL checks), send me
a patch and I'll test it first.

Regards,
Rob.

--
.............................................................................
David L. Thompson                   Visualization and Imagery Solutions, Inc.
mailto:[EMAIL PROTECTED]    5515 Skyway Drive, Missoula, MT 59804
                                    Phone : (406)756-7472

Reply via email to