autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Library path with AC_CHECK_LIB


From: Bill Moseley
Subject: Re: Library path with AC_CHECK_LIB
Date: Sat, 7 Jun 2003 12:54:31 -0700
User-agent: Mutt/1.5.4i

On Sat, Jun 07, 2003 at 12:25:14PM -0400, Assar Westerlund wrote:
> address@hidden writes:
> > I looked and didn't find anything telling.  All I see is this:
> > 
> > configure:11703: checking for gzread in -lz
> > configure:11734: gcc -o conftest -g -O2  -Imaybe/include  -Lmaybe/lib 
> > conftest.c -lz  -lm  >&5
> > configure:11737: $? = 0
> > configure:11740: test -s conftest
> > configure:11743: $? = 0
> > 
> > so I'm not really clear what "maybe/include" is in that output.
> 
> I think that comes from the following piece of code.  I assume that
> you initialize withval to maybe at the beginning of your configure.in
> so it gets set to that if no option was given.

Ah, of course.  That's ugly.  I copied that libz test from someplace.  
It's probably better to use LDFLAGS and CPPFLAGS instead of passing a 
directory in.

Can you recommend a better or more common template for optionally
including a library? 

> Can you show us the compile line where it fails to find libz at build
> time?

Sure, sorry for the long lines.  This is on Solaris 2.6.
gcc version 2.95.1 19990816 (release)

/bin/ksh ../libtool --mode=link gcc  -g -O2    -o libswish-e.la -rpath 
/data/_g/lii/m/local/lib -version-info 2:0:0 -lz  search.lo swish2.lo 
swish_words.lo  proplimit.lo rank.lo db_read.lo result_sort.lo hash.lo  
compress.lo db_native.lo ramdisk.lo check.lo error.lo list.lo  mem.lo 
swstring.lo docprop.lo metanames.lo headers.lo  swish_qsort.lo date_time.lo 
double_metaphone.lo stemmer.lo  soundex.lo  replace/libreplace.la -lm
rm -fr .libs/libswish-e.la .libs/libswish-e.* .libs/libswish-e.*
/usr/ccs/bin/ld -G -h libswish-e.so.2 -o .libs/libswish-e.so.2.0.0  search.lo 
swish2.lo swish_words.lo proplimit.lo rank.lo db_read.lo result_sort.lo hash.lo 
compress.lo db_native.lo ramdisk.lo check.lo error.lo list.lo mem.lo 
swstring.lo docprop.lo metanames.lo headers.lo swish_qsort.lo date_time.lo 
double_metaphone.lo stemmer.lo soundex.lo -z allextract 
replace/.libs/libreplace.al -z defaultextract  -lz -lm -lc 
ld: fatal: library -lz: not found
ld: fatal: File processing errors. No output written to 
.libs/libswish-e.so.2.0.0
*** Error code 1

Thanks for the help!

-- 
Bill Moseley
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]