mirror of https://github.com/getdnsapi/getdns.git
Fix an issue builing extensions. Make sure to look for the headers as well as the libs
This commit is contained in:
parent
ba5c7beec4
commit
72bb33ca2e
|
@ -11250,14 +11250,37 @@ if test "x$ac_cv_header_event2_event_h" = xyes; then :
|
|||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_EVENT2_EVENT_H 1
|
||||
_ACEOF
|
||||
# event2/event.h found
|
||||
EXTENSION_LIBEVENT_EXT_LIBS="-l$ac_lib"
|
||||
CHECK_EVENT_PROG=check_getdns_event
|
||||
else
|
||||
# not found - look for event.h
|
||||
for ac_header in event.h
|
||||
do :
|
||||
ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
|
||||
"
|
||||
if test "x$ac_cv_header_event_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_EVENT_H 1
|
||||
_ACEOF
|
||||
# found
|
||||
EXTENSION_LIBEVENT_EXT_LIBS="-l$ac_lib"
|
||||
CHECK_EVENT_PROG=check_getdns_event
|
||||
else
|
||||
# not found - give up
|
||||
have_libevent=0
|
||||
EXTENSION_LIBEVENT_LIB=""
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
EXTENSION_LIBEVENT_EXT_LIBS="-l$ac_lib"
|
||||
CHECK_EVENT_PROG=check_getdns_event
|
||||
else
|
||||
# libs not found
|
||||
have_libevent=0
|
||||
EXTENSION_LIBEVENT_LIB=""
|
||||
fi
|
||||
|
@ -11326,6 +11349,14 @@ $as_echo "$ac_cv_search_uv_run" >&6; }
|
|||
ac_res=$ac_cv_search_uv_run
|
||||
if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
for ac_header in uv.h
|
||||
do :
|
||||
ac_fn_c_check_header_compile "$LINENO" "uv.h" "ac_cv_header_uv_h" "$ac_includes_default
|
||||
"
|
||||
if test "x$ac_cv_header_uv_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_UV_H 1
|
||||
_ACEOF
|
||||
EXTENSION_LIBUV_EXT_LIBS="-l$ac_lib"
|
||||
CHECK_UV_PROG=check_getdns_uv
|
||||
else
|
||||
|
@ -11333,6 +11364,13 @@ else
|
|||
EXTENSION_LIBUV_LIB=""
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
else
|
||||
have_libuv=0
|
||||
EXTENSION_LIBUV_LIB=""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -11397,8 +11435,23 @@ $as_echo "$ac_cv_search_ev_run" >&6; }
|
|||
ac_res=$ac_cv_search_ev_run
|
||||
if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
for ac_header in ev.h
|
||||
do :
|
||||
ac_fn_c_check_header_compile "$LINENO" "ev.h" "ac_cv_header_ev_h" "$ac_includes_default
|
||||
"
|
||||
if test "x$ac_cv_header_ev_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_EV_H 1
|
||||
_ACEOF
|
||||
EXTENSION_LIBEV_EXT_LIBS="-l$ac_lib"
|
||||
CHECK_EV_PROG=check_getdns_ev
|
||||
else
|
||||
have_libev=0
|
||||
EXTENSION_LIBUV_LIB=""
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
else
|
||||
have_libev=0
|
||||
EXTENSION_LIBEV_LIB=""
|
||||
|
|
22
configure.ac
22
configure.ac
|
@ -203,9 +203,21 @@ CHECK_EVENT_PROG=""
|
|||
AC_SEARCH_LIBS([event_loop],
|
||||
[event_core event],
|
||||
[AC_CHECK_FUNCS([event_base_new event_base_free])]
|
||||
[AC_CHECK_HEADERS([event2/event.h],,, [AC_INCLUDES_DEFAULT])]
|
||||
[AC_CHECK_HEADERS([event2/event.h],
|
||||
# event2/event.h found
|
||||
[EXTENSION_LIBEVENT_EXT_LIBS="-l$ac_lib"]
|
||||
[CHECK_EVENT_PROG=check_getdns_event],
|
||||
# not found - look for event.h
|
||||
[AC_CHECK_HEADERS([event.h],
|
||||
# found
|
||||
[EXTENSION_LIBEVENT_EXT_LIBS="-l$ac_lib"]
|
||||
[CHECK_EVENT_PROG=check_getdns_event],
|
||||
# not found - give up
|
||||
[have_libevent=0]
|
||||
[EXTENSION_LIBEVENT_LIB=""],
|
||||
[AC_INCLUDES_DEFAULT])]
|
||||
,[AC_INCLUDES_DEFAULT])],
|
||||
# libs not found
|
||||
[have_libevent=0]
|
||||
[EXTENSION_LIBEVENT_LIB=""])
|
||||
|
||||
|
@ -221,9 +233,13 @@ EXTENSION_LIBUV_EXT_LIBS=""
|
|||
CHECK_UV_PROG=""
|
||||
AC_SEARCH_LIBS([uv_run],
|
||||
[uv],
|
||||
[AC_CHECK_HEADERS([uv.h],
|
||||
[EXTENSION_LIBUV_EXT_LIBS="-l$ac_lib"]
|
||||
[CHECK_UV_PROG=check_getdns_uv],
|
||||
[have_libuv=0]
|
||||
[EXTENSION_LIBUV_LIB=""],
|
||||
[AC_INCLUDES_DEFAULT])],
|
||||
[have_libuv=0]
|
||||
[EXTENSION_LIBUV_LIB=""])
|
||||
|
||||
AC_SUBST(have_libuv)
|
||||
|
@ -238,9 +254,13 @@ EXTENSION_LIBEV_EXT_LIBS=""
|
|||
|
||||
AC_SEARCH_LIBS([ev_run],
|
||||
[ev],
|
||||
[AC_CHECK_HEADERS([ev.h],
|
||||
[EXTENSION_LIBEV_EXT_LIBS="-l$ac_lib"]
|
||||
[CHECK_EV_PROG=check_getdns_ev],
|
||||
[have_libev=0]
|
||||
[EXTENSION_LIBUV_LIB=""],
|
||||
[AC_INCLUDES_DEFAULT])],
|
||||
[have_libev=0]
|
||||
[EXTENSION_LIBEV_LIB=""])
|
||||
|
||||
AC_SUBST(have_libev)
|
||||
|
|
|
@ -12,6 +12,12 @@
|
|||
/* Define to 1 if you have the `event_base_new' function. */
|
||||
#undef HAVE_EVENT_BASE_NEW
|
||||
|
||||
/* Define to 1 if you have the <event.h> header file. */
|
||||
#undef HAVE_EVENT_H
|
||||
|
||||
/* Define to 1 if you have the <ev.h> header file. */
|
||||
#undef HAVE_EV_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
|
@ -51,6 +57,9 @@
|
|||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the <uv.h> header file. */
|
||||
#undef HAVE_UV_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
|
Loading…
Reference in New Issue