diff --git a/configure b/configure index 16d9cf9e..81a05911 100755 --- a/configure +++ b/configure @@ -11082,7 +11082,7 @@ $as_echo "$as_me: WARNING: Doxygen not found, continuing without" >&2;} fi # Checks for header files. -for ac_header in inttypes.h netinet/in.h stdint.h stdlib.h string.h event2/event.h +for ac_header in inttypes.h netinet/in.h stdint.h stdlib.h string.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default @@ -11236,6 +11236,19 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then : _ACEOF fi +done + + for ac_header in event2/event.h +do : + ac_fn_c_check_header_compile "$LINENO" "event2/event.h" "ac_cv_header_event2_event_h" "$ac_includes_default +" +if test "x$ac_cv_header_event2_event_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EVENT2_EVENT_H 1 +_ACEOF + +fi + done EXTENSION_LIBEVENT_EXT_LIBS="-l$ac_lib" diff --git a/configure.ac b/configure.ac index b15a63cc..21d73b34 100644 --- a/configure.ac +++ b/configure.ac @@ -181,7 +181,7 @@ if test -z "$DOXYGEN"; fi # Checks for header files. -AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h event2/event.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h],,, [AC_INCLUDES_DEFAULT]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T @@ -202,6 +202,7 @@ EXTENSION_LIBEVENT_EXT_LIBS="" 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])] [EXTENSION_LIBEVENT_EXT_LIBS="-l$ac_lib"], [have_libevent=0] [EXTENSION_LIBEVENT_LIB=""]) diff --git a/src/Makefile.in b/src/Makefile.in index 3309d71b..39bd6d96 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -69,8 +69,7 @@ EXTENSION_LIBEV_EXT_LIBS=@EXTENSION_LIBEV_EXT_LIBS@ GETDNS_OBJ=sync.lo context.lo list.lo dict.lo convert.lo general.lo \ hostname.lo service.lo request-internal.lo util-internal.lo \ - getdns_error.lo rr-dict.lo dnssec.lo const-info.lo \ - $(EXTENSION_LIBEV_OBJ) + getdns_error.lo rr-dict.lo dnssec.lo const-info.lo .SUFFIXES: .c .o .a .lo .h diff --git a/src/example/Makefile.in b/src/example/Makefile.in index e353467d..f29e1de6 100644 --- a/src/example/Makefile.in +++ b/src/example/Makefile.in @@ -3,7 +3,7 @@ # # Copyright (c) 2013, Versign, Inc., NLNet Labs # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright @@ -14,7 +14,7 @@ # * Neither the name of the nor the # names of its contributors may be used to endorse or promote products # derived from this software without specific prior written permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -42,7 +42,7 @@ VPATH = @srcdir@ CC=@CC@ CFLAGS=@CFLAGS@ -Wall -I$(srcdir)/ -I$(srcdir)/../ -I/usr/local/include -std=c99 LDFLAGS=@LDFLAGS@ -L. -L.. -L$(srcdir)/../ -L/usr/local/lib -LDLIBS=-lgetdns @LIBS@ +LDLIBS=-lgetdns -lgetdns_ext_event @LIBS@ PROGRAMS=example-all-functions example-simple-answers example-tree example-synchronous example-reverse .SUFFIXES: .c .o .a .lo .h