problem with configure and --with-pngdriver

David Starks-Browning starksb at ebi.ac.uk
Thu Feb 15 11:33:55 UTC 2001


Greetings,

I've just built EMBOSS-1.9.1 on SGI IRIX with gcc and would like to
report a problem I had.

We have PNG (and other supporting) libraries installed in /sw/arch.  I
invoke configure with the following environment variables set:

	CPPFLAGS = -I/sw/arch/include
	LDFLAGS = -L/sw/arch/lib

Then any attempt by configure to find png-related features should
succeed, without specifying --with-pngdrivers=/sw/arch.

Unfortunately, this fails on SGI IRIX, because of the following logic
in configure:

> # Check whether --with-pngdriver or --without-pngdriver was given.
> if test "${with_pngdriver+set}" = set; then
>   withval="$with_pngdriver"
>   if test "$withval" != no ; then
>     echo "$ac_t""yes" 1>&6
>     ALT_HOME="$withval"
>   else
>     echo "$ac_t""no" 1>&6
>   fi
> else
>   echo "$ac_t""yes" 1>&6
>   ALT_HOME=/usr/local
>   if test ! -f "${ALT_HOME}/include/zlib.h"
>   then
> 	  ALT_HOME=/usr
>   fi
> fi

(I reformated this for readability.)  With this logic (and some
additional code that follows it), if with-pngdriver is not set, and
zlib.h is not found in /usr/local/include, then "-L/usr/lib" is added
to the compile command when testing for png components.

I think this is a mistake.  I can't think of why one would explicitly
add -L/usr/lib (or *any* system library path, for that matter) to the
compile command line.  The compiler should handle that path search
automatically.

On IRIX, for example, this over-rides the compiler's effort to use
appropriate system library paths, and forces ld to use o32-ABI
libraries.  On any modern SGI system, or with gcc, this is likely to
fail, because all the other objects are likely to be n32 or n64.

I do not have much experience with autoconf, but I am willing to
attempt a rewrite of the CHECK_PNGDRIVER in aclocal.m4 if that would
be useful to others.  Ian wrote this originally, but I understand he's
busy with other things now.  (Is that correct?)

Thanks for your help.

David

 -------------------------------------------------------------------
  David Starks-Browning                  | starksb at ebi.ac.uk
  EMBL Outstation --                     |
  The European Bioinformatics Institute  |
  Wellcome Trust Genome Campus           | tel: +44 (1223) 494 616
  Hinxton, Cambridge, CB10 1SD, UK       | fax: +44 (1223) 494 468
 -------------------------------------------------------------------






More information about the EMBOSS mailing list