Discussion:
AC_SEARCH_LIBS without LIBS
NightStrike
2014-05-16 15:47:31 UTC
Permalink
AC_SEARCH_LIBS replaced AC_CHECK_LIBS. The latter had an
action-if-found path that did not unilaterally set $LIBS if you
provided a custom action. The former always changes $LIBS, even in
the case of custom actions if found.

This is an issue if you need to check for the existence of a library,
but only use it in a subset of all of your things being compiled.

Is this considered a bug in AC_SEARCH_LIBS, or is there a workaround
I'm missing?
Peter Johansson
2014-05-16 16:33:09 UTC
Permalink
Post by NightStrike
This is an issue if you need to check for the existence of a library,
but only use it in a subset of all of your things being compiled.
Is this considered a bug in AC_SEARCH_LIBS, or is there a workaround
I'm missing?
Occasionally I've used the pattern

save_LIBS=$LIBS
AC_SEARCH_LIBS([...
LIBS=$save_LIBS

Cheers,
Peter
Russ Allbery
2014-05-16 18:27:18 UTC
Permalink
Post by Peter Johansson
Post by NightStrike
This is an issue if you need to check for the existence of a library,
but only use it in a subset of all of your things being compiled.
Is this considered a bug in AC_SEARCH_LIBS, or is there a workaround
I'm missing?
Occasionally I've used the pattern
save_LIBS=$LIBS
AC_SEARCH_LIBS([...
LIBS=$save_LIBS
Likewise. I do this a lot.
--
Russ Allbery (***@eyrie.org) <http://www.eyrie.org/~eagle/>
Loading...