Hi,
On Wed, Jun 28, 2000 at 02:13:34AM +0200, Assar Westerlund wrote:
> "Grosch, Scott" <[EMAIL PROTECTED]> writes:
> > Where do I send questions about autoconf? Is there a mailing list or
> > newsgroup somewhere?
>
> This is the place.
>
> > 1) How do I add -I, -L and -R flags to the compile and link lines
> > when searching for libs? For example, I have AFS installed but
> > those libraries are in /usr/afsws/lib....not a normal search path
>
> Do you mean in your configure.in? Set LIBS. See also Preset Output Variables
> in the autoconf manual.
To clarify:
-I use CPPFLAGS (be careful not to override user supplied one)
-L,-R use LDFLAGS (be careful not to override user supplied one)
The LIBS variable is used to list additional libraries to use during
linking, such as "-lfoo -lbar." Use CFLAGS for compiler flags
(e.g. -g, -O2, etc).
> But this is not the autoconf-way of doing things. The autoconf-way is
> to check for characteristics rather than system types. So, you could
> check for the particular function you need. Say, check if you have
> `gethostbyname'. If you don't have it check if you have it in libnsl.
>
> AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname)).
Here's a more compact form:
AC_SEARCH_LIBS(gethostbyname, nsl [,action-if-stuff, ,])
-Ossama
--
Ossama Othman <[EMAIL PROTECTED]>
Distributed Object Computing Laboratory, Univ. of California at Irvine
1024D/F7A394A8 - 84ED AA0B 1203 99E4 1068 70E6 5EB7 5E71 F7A3 94A8