[CF-Devel] Bugs in crossfire/configure.in and crossfire/crossedit/{,Cnv/}Makefile.in

Klaus Elsbernd elsbernd at dfki.uni-kl.de
Sat Mar 17 05:04:05 CST 2001


Hello

Peter Mardahl <
     
     peterm at tesla.EECS.Berkeley.EDU
     
     >:
>
     
      I think Klaus needs a character client:  a client which displays floor
     
     >
     
      as . walls as #, monsters as a-z A-Z, the player as @, food as %,
     
     >
     
      money as $, gems as *, and so on! 
     
     

I suggest two changes in the configure.in of crossfire and Makefile.in for
crossedit and Cnv.
(latest crossfire version on Sun Solaris[78] with cc/gcc)

crossfire/configure.in:
It's an old bug, which I corrected manually in the last years.
I installed the libXpm and libpng in a non standard directory. So I have
to specify CPPFLAGS and LDFLAGS on the commandline in the environment for
configure.
When the configure script tries to test for xpm and png, the LDFLAGS won't
be provided to the linker. This is due the odd handling of LDFLAGS which is
saved in OLD_LD_FLAGS. The flags were restored after checking for png and xpm.
I moved this restauration before those tests. This won't harm, because the
tests of standard X11 libraries are already done.

Another bug arises, when when the configure script tries to test for png.
It fails, because the math-library is needed, which is tested
later in the script. crossfire-client had the same problem and moved the
test for the math-library in front of the png-test of confiugre.in; so do
the same in crossfire:
The following diff resolves these bugs.
*** /tmp/crossfire/configure.in Thu Feb 15 10:07:03 2001
--- configure.in        Sat Mar 17 11:31:43 2001
***************
*** 111,123 ****
  
  AC_CHECK_LIB(Xaw, main, AC_DEFINE(HAVE_LIBXAW) X11LIBS="-lXaw $X11LIBS", , 
$X11LIBS)
  
  AC_CHECK_LIB(Xpm, main,  AC_DEFINE(HAVE_LIBXPM) X11LIBS="$X11LIBS -lXpm", , 
-lX11 )
  
  AC_CHECK_LIB(png, main,  AC_DEFINE(HAVE_LIBPNG) X11LIBS="$X11LIBS -lpng", , 
-lX11 )
  
- LDFLAGS="$OLD_LD_FLAGS"
- X11LIBS="$X_LIBS $X11LIBS"
- 
  dnl Misc libraries.
  AC_CHECK_LIB(crypt, main)
  AC_CHECK_LIB(des, des_crypt)
--- 111,125 ----
  
  AC_CHECK_LIB(Xaw, main, AC_DEFINE(HAVE_LIBXAW) X11LIBS="-lXaw $X11LIBS", , 
$X11LIBS)
  
+ LDFLAGS="$OLD_LD_FLAGS"
+ X11LIBS="$X_LIBS $X11LIBS"
+ 
  AC_CHECK_LIB(Xpm, main,  AC_DEFINE(HAVE_LIBXPM) X11LIBS="$X11LIBS -lXpm", , 
-lX11 )
  
+ AC_CHECK_LIB(m, main)
+ 
  AC_CHECK_LIB(png, main,  AC_DEFINE(HAVE_LIBPNG) X11LIBS="$X11LIBS -lpng", , 
-lX11 )
  
  dnl Misc libraries.
  AC_CHECK_LIB(crypt, main)
  AC_CHECK_LIB(des, des_crypt)
***************
*** 124,131 ****
  
  AC_CHECK_LIB(dmalloc, main)
  
- AC_CHECK_LIB(m, main)
- 
  dnl Checks for header files.
  AC_HEADER_DIRENT
  AC_HEADER_STDC
--- 126,131 ----


crossfire/crossedit/Makefile.in
For additionally libraries, like libXpm, I use to set the needed libraries
in CPPFLAGS and LDFLAGS for configure to find those libraries.
Even crossfire/configure.in tests for xpm, the include directory and the
library won't be included in the Makefile of crossedit.
The problem will be resolved by:
change in crossedit/Makefile.in from
*** crossfire/crossedit/Makefile.in     Tue Dec  5 05:56:36 2000
--- /tools/games/src/crossfire/crossedit/Makefile.in    Sun Mar 11 19:10:29 
2001
***************
*** 69,75 ****
  
  X11LIBS= @X_LIBS@ @X_EXTRA_LIBS@ @X11LIBS@
  
! LIBS = @LIBS@ $(X11LIBS)
  
  INCLUDES= 
     
     -I at x_includes
     
     @/ $(EXTRA_INCLUDES) -I../include -I. -Iinclude \
        -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/include \
--- 69,75 ----
  
  X11LIBS= @X_LIBS@ @X_EXTRA_LIBS@ @X11LIBS@
  
! LIBS = @LIBS@ @LDFLAGS@ $(EXTRA_LIBS) $(X11LIBS)
  
  INCLUDES= 
     
     -I at x_includes
     
     @/ $(EXTRA_INCLUDES) -I../include -I. -Iinclude \
        -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/include \

same for Cnv
*** crossfire/crossedit/Cnv/Makefile.in Sat Nov 25 23:09:28 2000
--- /tools/games/src/crossfire/crossedit/Cnv/Makefile.in        Sun Mar 11 
19:12:51 2001
***************
*** 13,19 ****
  INCLUDES= 
     
     -I at x_includes
     
     @ $(EXTRA_INCLUDES) -I../include -I. -I../../include
  
  X11LIBS =     @X11LIBS@
! LIBS = @LIBS@ $(X11LIBS)
  
  DEPEND = @DEPEND@
  
--- 13,19 ----
  INCLUDES= 
     
     -I at x_includes
     
     @ $(EXTRA_INCLUDES) -I../include -I. -I../../include
  
  X11LIBS =     @X11LIBS@
! LIBS = @LIBS@ @LDFLAGS@ $(X11LIBS)
  
  DEPEND = @DEPEND@

Bis dann
Klaus


-- 
"Sure, vi is user friendly.
 It's just particular about who it makes friends with." ;-) 
                                      _________________________
Klaus Elsbernd; System Administrator, BOFH        | 
     
     elsbernd at dfki.uni-kl.de
     
     
Deutsches Forschungsz. für Künstliche Intelligenz | DFKI GmbH, Geb. 57/285
67657 Kaiserslautern; Germany                     | Tel: (+49) 0631/205-3486



    
    


More information about the crossfire mailing list