Re: [AD] build process overhaul

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



Peter Wang wrote:

On 2005-12-17, Jon Rafkind <workmin@xxxxxxxxxx> wrote:
Peter Wang wrote:
Thanks.  It starts now, but the X libraries are not being linked in:

Install file: "liballeg-4.3.0.so" as "lib/unix/liballeg-4.3.0.so"
gcc -o examples/ex12bit obj/examples/ex12bit.o -Llib/unix -lalleg-4.3.0
lib/unix/liballeg-4.3.0.so: undefined reference to `XFreePixmap'
lib/unix/liballeg-4.3.0.so: undefined reference to `XSetWMProtocols'
... etc ...
Can you post the output of the configuration stuff?

I should have checked :-P

The problem is that my X libraries are in /usr/X11R6/lib and, by
default, the compiler doesn't look in there.  If I add it to the
`LIBRARY_PATH' environment variable then the configuration works.
However, ALLEGRO_WITH_XWINDOWS is #defined even if the libraries
weren't found.

The old build system for allegro using aclocal just set ALLEGRO_WITH_XWINDOWS unless the user supplied --no-x or something so I did the same thing in scons. I added a check for X11/X.h and XOpenDisplay() to decide if ALLEGRO_WITH_XWINDOWS. I also check in /usr/X11R6/[include|lib].

Also, the maths library needs to be linked in.

I added a check for sin() in libm so -lm will be added to the link line.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/