diff --git a/configure b/configure index 6f34fdc0..70340379 100755 --- a/configure +++ b/configure @@ -734,10 +734,10 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -enable_fast_install enable_shared enable_static with_pic +enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock @@ -1369,10 +1369,10 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-rpath disable hardcoded rpath (default=enabled) @@ -2211,37 +2211,6 @@ GETDNS_COMPILATION_COMMENT="getdns 0.1.0 configured on $CURRENT_DATE for the Feb # LT_INIT -# Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=no -fi - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6800,6 +6769,35 @@ test -z "$pic_mode" && pic_mode=default + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + @@ -11258,6 +11256,17 @@ _ACEOF CHECK_EVENT_PROG=check_getdns_event else # not found - look for event.h + ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default" +if test "x$ac_cv_type_u_char" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_char unsigned char +_ACEOF + +fi + for ac_header in event.h do : ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default @@ -11267,6 +11276,7 @@ if test "x$ac_cv_header_event_h" = xyes; then : #define HAVE_EVENT_H 1 _ACEOF # found + have_libevent=1 EXTENSION_LIBEVENT_EXT_LIBS="$ac_cv_search_event_loop" CHECK_EVENT_PROG=check_getdns_event else @@ -12213,12 +12223,12 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -13110,9 +13120,6 @@ available_tags="" # ### BEGIN LIBTOOL CONFIG -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision @@ -13126,6 +13133,9 @@ build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + # Shell to use when invoking shell scripts. SHELL=$lt_SHELL diff --git a/configure.ac b/configure.ac index c63e7bdc..970ea5b7 100644 --- a/configure.ac +++ b/configure.ac @@ -209,8 +209,10 @@ AC_SEARCH_LIBS([event_loop], [EXTENSION_LIBEVENT_EXT_LIBS="$ac_cv_search_event_loop"] [CHECK_EVENT_PROG=check_getdns_event], # not found - look for event.h + [AC_CHECK_TYPE(u_char, unsigned char)] [AC_CHECK_HEADERS([event.h], # found + [have_libevent=1] [EXTENSION_LIBEVENT_EXT_LIBS="$ac_cv_search_event_loop"] [CHECK_EVENT_PROG=check_getdns_event], # not found - give up diff --git a/src/config.h.in b/src/config.h.in index f5db3978..c6fee80b 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -109,6 +109,9 @@ /* Define to `unsigned int' if does not define. */ #undef size_t +/* Define to `unsigned char' if does not define. */ +#undef u_char + /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t diff --git a/src/example/getdns_libevent.h b/src/example/getdns_libevent.h index 48ea402e..4c15fb0a 100644 --- a/src/example/getdns_libevent.h +++ b/src/example/getdns_libevent.h @@ -29,5 +29,8 @@ #ifdef HAVE_EVENT2_EVENT_H #include #else +# ifndef u_char +# define u_char unsigned char +# endif #include #endif diff --git a/src/extension/libevent.c b/src/extension/libevent.c index 133c259d..d0652f80 100644 --- a/src/extension/libevent.c +++ b/src/extension/libevent.c @@ -40,6 +40,9 @@ #ifdef HAVE_EVENT2_EVENT_H # include #else +# ifndef u_char +# define u_char unsigned char +# endif # include # define evutil_socket_t int # define event_free free diff --git a/src/test/check_getdns_libevent.h b/src/test/check_getdns_libevent.h index cc60e04d..62748284 100644 --- a/src/test/check_getdns_libevent.h +++ b/src/test/check_getdns_libevent.h @@ -27,5 +27,8 @@ #ifdef HAVE_EVENT2_EVENT_H #include #else +# ifndef u_char +# define u_char unsigned char +# endif #include #endif