configure and configure.h

Mehul Sanghvi (
Thu, 10 Sep 1998 14:52:51 -0400 (EDT)


     I am working with AfterStep 1.5beta3.  I had posted a sometime last week
about configure.h having some blank #define lines in it at line 20 and line
21.  Another thing was that even if you specified --with-xpm=yes and gave the
pathsd to the XPM include and library,  you always ended up with #define NOXPM
in configure.h at line 19.  I finally got around to looking into this.

   At first I thought it was sed (since I know that the HPUX one is broken and
that was the platform i was building under).  Got GNU sed, but got same
result.  Then I took a look at the autoconf/ file.  And thats
where the problem was.  There was no value given for IF-NOT-FOUND part of the
AC_CHECK_LIB macro (for both SHAPE and JPEG).  So I fixed that to define a
NOSHAPE and a NOJPEG symbol.  

   The other problem was with XPM.  I dont know much about m4,  but since
autoconf comes with the AC_CHECK_LIB macro, I just used that instead of the
VT_FIND_LIBXPM macro defined in aclocal.m4.  Using the AC_CHECK_LIB macro I am
getting better results.  Is there something that I am overloking due to which
VT_FIND_LIBXPM was being used rather then AC_CHECK_LIB ?  I am pretty new to
autoconf so I might not be aware of something due to which I might not be
seeing the need for VT_FIND_LIBXPM.  Here's what I am using currently:

   AC_CHECK_LIB(Xpm, XpmLibraryVersion, 
     [XPM_LIBS="-lXpm" HAVEXPM="XPM"], 

The above is giving me the right defination in the configure.h file.
Could one of the developers please let me know why using AC_CHECK_LIB for XPM
is a bad idea or what I am overlooking in using AC_CHECK_LIB that would cause

    Another library to check for should be libXmu as that is not always
present on all systems.  AIX is notorious for not supplying this library.
Another thing is the use of -Wall and -O6.  -Wall is not supported by non-gcc
compilers (as far as I know).  I'll see if this can be tested and then set.

Mehul N. Sanghvi <> <>