traviscross / mtr

Official repository for mtr, a network diagnostic tool
http://www.bitwizard.nl/mtr/
GNU General Public License v2.0
2.66k stars 339 forks source link

configure.ac: fix broken cap check #472

Closed the-eater closed 1 year ago

the-eater commented 1 year ago

Since 9eddfacd8e9b9c2f4ce6f7ef98814bff02b5a2b7 the binding to libcap and dropping of capabilities has been silently broken.

As the docs for AC_CHECK_LIB are written

If action-if-found is not specified, the default action prepends -llibrary to LIBS and defines ‘HAVE_LIBlibrary’ (in all capitals).

After said commit, action-if-found was specified, and thus HAVE_LIBCAP wasn't defined anymore, nor was -lcap added to the LIBS variable.

This PR fixes this by inverting the $have_cap definition