mirror of https://github.com/getdnsapi/getdns.git
Make libev work on Fedora too
This commit is contained in:
parent
719868f623
commit
45ac1bc7ae
|
@ -5642,7 +5642,7 @@ ia64-*-hpux*)
|
|||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
|
@ -5660,7 +5660,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_i386"
|
||||
;;
|
||||
ppc64-*linux*|powerpc64-*linux*)
|
||||
powerpc64le-*linux*)
|
||||
LD="${LD-ld} -m elf32lppclinux"
|
||||
;;
|
||||
powerpc64-*linux*)
|
||||
LD="${LD-ld} -m elf32ppclinux"
|
||||
;;
|
||||
s390x-*linux*)
|
||||
|
@ -5679,7 +5682,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
ppc*-*linux*|powerpc*-*linux*)
|
||||
powerpcle-*linux*)
|
||||
LD="${LD-ld} -m elf64lppc"
|
||||
;;
|
||||
powerpc-*linux*)
|
||||
LD="${LD-ld} -m elf64ppc"
|
||||
;;
|
||||
s390*-*linux*|s390*-*tpf*)
|
||||
|
@ -7134,10 +7140,6 @@ _lt_linker_boilerplate=`cat conftest.err`
|
|||
$RM -r conftest*
|
||||
|
||||
|
||||
## CAVEAT EMPTOR:
|
||||
## There is no encapsulation within the following macros, do not change
|
||||
## the running order or otherwise move them around unless you know exactly
|
||||
## what you are doing...
|
||||
if test -n "$compiler"; then
|
||||
|
||||
lt_prog_compiler_no_builtin_flag=
|
||||
|
@ -10681,98 +10683,6 @@ CC="$lt_save_CC"
|
|||
# Only expand once:
|
||||
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_RANLIB+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$RANLIB"; then
|
||||
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
RANLIB=$ac_cv_prog_RANLIB
|
||||
if test -n "$RANLIB"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
|
||||
$as_echo "$RANLIB" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_RANLIB"; then
|
||||
ac_ct_RANLIB=$RANLIB
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ac_ct_RANLIB"; then
|
||||
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_RANLIB="ranlib"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
|
||||
if test -n "$ac_ct_RANLIB"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
|
||||
$as_echo "$ac_ct_RANLIB" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_RANLIB" = x; then
|
||||
RANLIB=":"
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
RANLIB=$ac_ct_RANLIB
|
||||
fi
|
||||
else
|
||||
RANLIB="$ac_cv_prog_RANLIB"
|
||||
fi
|
||||
|
||||
# Find a good install program. We prefer a C program (faster),
|
||||
# so one script is as good as another. But avoid the broken or
|
||||
# incompatible versions:
|
||||
|
@ -11624,6 +11534,17 @@ do :
|
|||
if test "x$ac_cv_header_ev_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_EV_H 1
|
||||
_ACEOF
|
||||
have_libev=1
|
||||
EXTENSION_LIBEV_EXT_LIBS="$ac_cv_search_ev_run"
|
||||
else
|
||||
for ac_header in libev/ev.h
|
||||
do :
|
||||
ac_fn_c_check_header_compile "$LINENO" "libev/ev.h" "ac_cv_header_libev_ev_h" "$ac_includes_default
|
||||
"
|
||||
if test "x$ac_cv_header_libev_ev_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBEV_EV_H 1
|
||||
_ACEOF
|
||||
have_libev=1
|
||||
EXTENSION_LIBEV_EXT_LIBS="$ac_cv_search_ev_run"
|
||||
|
@ -11634,6 +11555,12 @@ fi
|
|||
|
||||
done
|
||||
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
else
|
||||
as_fn_error $? "libev missing, try without libev" "$LINENO" 5
|
||||
|
||||
|
|
|
@ -306,11 +306,17 @@ AS_IF([test x_$withval = x_no],
|
|||
[AC_SEARCH_LIBS([ev_run],
|
||||
[ev],
|
||||
[AC_CHECK_HEADERS([ev.h],
|
||||
[have_libev=1]
|
||||
[EXTENSION_LIBEV_EXT_LIBS="$ac_cv_search_ev_run"],
|
||||
[AC_CHECK_HEADERS([libev/ev.h],
|
||||
[have_libev=1]
|
||||
[EXTENSION_LIBEV_EXT_LIBS="$ac_cv_search_ev_run"],
|
||||
[AC_MSG_ERROR([ev.h missing, try without libev])]
|
||||
[have_libev=0],
|
||||
[AC_INCLUDES_DEFAULT])],
|
||||
[AC_INCLUDES_DEFAULT])
|
||||
],
|
||||
[AC_INCLUDES_DEFAULT])
|
||||
],
|
||||
[AC_MSG_ERROR([libev missing, try without libev])]
|
||||
)],
|
||||
[have_libev=1]
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <libev/ev.h> header file. */
|
||||
#undef HAVE_LIBEV_EV_H
|
||||
|
||||
/* Define to 1 if you have the `idn' library (-lidn). */
|
||||
#undef HAVE_LIBIDN
|
||||
|
||||
|
|
|
@ -35,8 +35,14 @@
|
|||
|
||||
#include <sys/time.h>
|
||||
#include <stdio.h>
|
||||
#include <ev.h>
|
||||
#include "getdns/getdns_ext_libev.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_LIBEV_EV_H
|
||||
#include <libev/ev.h>
|
||||
#else
|
||||
#include <ev.h>
|
||||
#endif
|
||||
|
||||
#define RETURN_IF_NULL(ptr, code) if(ptr == NULL) return code;
|
||||
|
||||
|
|
|
@ -36,7 +36,11 @@
|
|||
#include "check_getdns_eventloop.h"
|
||||
|
||||
#include "getdns/getdns_ext_libev.h"
|
||||
#ifdef HAVE_LIBEV_EV_H
|
||||
#include <libev/ev.h>
|
||||
#else
|
||||
#include <ev.h>
|
||||
#endif
|
||||
#include <check.h>
|
||||
#include "check_getdns_common.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue