configure check for libelf always defines HAVE_LIBELF
Submitted by Fabian Groffen
Link to original bug (#675743)
Description
Created attachment 213733 glib-2.32.2-solaris-libelf.patch
The configure check for libelf unintentionally always defines LIBELF when no pkg-config entry for libelf is available, such as when using the host-provided libelf on Solaris or FreeBSD. As a result, even though the configure checks properly detected the found libelf is not sufficient, the code still tries to use it, with compilation errors as result. The trivial patch attached avoids the default action of AC_SEARCH_LIB to define HAVE_LIBELF.
Patch 213733, "glib-2.32.2-solaris-libelf.patch":
glib-2.32.2-solaris-libelf.patch
Version: 2.32.x