[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lib-link.m4: AC_LIB_LINKFLAGS_BODY: --without-libFOO-prefix?
From: |
Simon Josefsson |
Subject: |
Re: lib-link.m4: AC_LIB_LINKFLAGS_BODY: --without-libFOO-prefix? |
Date: |
Sat, 27 Aug 2005 15:03:05 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> Simon Josefsson wrote:
>> What is the point of this configure parameter?
>>
>> I understand that --with-libFOO-prefix is used to set the prefix that
>> make the macro search in $prefix/include and $prefix/lib to find
>> libFOO.
>>
>> Specifically, what is the difference between not supplying
>> --without-libFOO-prefix and supplying it?
>
> By default, the AC_LIB_LINKFLAGS_BODY macro will search in $prefix/include
> and $prefix/lib, where $prefix is given through the --prefix option.
> This is needed for the quite frequent use of people that build many
> GNU packages into the same $prefix directory.
>
> By specifying --without-libFOO-prefix you disable this search directory,
> so that the search will only consider /usr/include and /usr/lib (and
> possibly others that the compiler uses, through CPPFLAGS etc.).
Aha! I see. That seems like a good idea.
>> Further, does this macro handle 64-bit libraries in $prefix/lib64?
>
> No. Excellent point. I need to work on that. Is there a standard convention
> that would tell me whether to look in lib or lib64? Seems to be OS dependent,
> CPU dependent (seen on x86_64 and sparc64 but not on alpha), and compiler
> mode dependent (whether sizeof(long) == 8 or == 4), no?
Yes, probably.
FWIW, Libtool's AC_LIBTOOL_SYS_DYNAMIC_LINKER define $libsuff. I have
no idea whether this result in good behavior or not.
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in # libtool.m4 will add one of these switches to LD
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
libsuff= shlibsuff= libmagic=32-bit;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
libsuff=32 shlibsuff=N32 libmagic=N32;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
libsuff=64 shlibsuff=64 libmagic=64-bit;;
*) libsuff= shlibsuff= libmagic=never-match;;
esac
;;
esac
Then you can use $libsuff in your configure.ac or lib-link.m4 macro,
e.g.:
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi"
Thanks,
Simon