[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FOO_LIBS
From: |
Harlan Stenn |
Subject: |
Re: FOO_LIBS |
Date: |
Tue, 01 Oct 2013 08:16:08 +0000 |
Gavin Smith writes:
> I don't understand why you can't put all the libraries in LIBS. You said
>
>> Originally I let configure put all of the libraries in the LIBS
>> variable, but I got a lot of pushback from folks with embedded
>> systems and similar targets where the extra libraries were taking up
>> too much space.
>
> Determing whether libraries are added to LIBS using --with flags would
> fix this problem, as they could disable unwanted libraries.
I need the libraries for some executables, not all.
But perhaps you know something about my project that I don't. If that's
the case, please tell me more.
In the meantime, I noticed Bob uses things like:
LIB_MATH=''
AC_CHECK_LIB(m,sqrt,LIB_MATH="-lm",,)
LIBS="$LIB_MATH $LIBS"
AC_SUBST(LIB_MATH)
in the configure.ac, so I'm inclined to write a macro that I can use
like this:
LIB_MATH=''
AC_SUBST([LIB_MATH])
...
FOO_SEARCH_LIB([LIB_MATH], [sqrt], [m], [AIF], [AINF], [OL])
and FOO_SEARCH_LIB would expand to something like:
AC_SEARCH_LIBS([sqrt], [m], [case "$ac_cv_search_sqrt" in
'none required') ;;
'no') ;;
*) LIB_MATH="$ac_cv_search_sqrt $LIB_MATH" ;;
esac
[AIF]],
[AINF],
[OL])
and I bet I blew some of the quoting...
H
- Re: FOO_LIBS, Gavin Smith, 2013/10/01
- Re: FOO_LIBS,
Harlan Stenn <=