Compile examples

This commit is contained in:
Neel Goyal 2014-02-21 12:47:33 -05:00
parent 80703de636
commit 2f0bcd665b
4 changed files with 20 additions and 7 deletions

15
configure vendored
View File

@ -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"

View File

@ -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=""])

View File

@ -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

View File

@ -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