aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2016-09-13 12:57:37 +0200
committertoni <matzeton@googlemail.com>2016-09-13 12:57:37 +0200
commit89a273417d5d134e410bdb86fec1012f20969d66 (patch)
tree50b7b67ff6b5f7d9cb9c0fef795602670905ac0a /configure
parent5b5939a58fcf80a17f13d190145474d2e9b9db6e (diff)
travis compatible libresolv check
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure56
1 files changed, 23 insertions, 33 deletions
diff --git a/configure b/configure
index c27bef7..bfe648e 100755
--- a/configure
+++ b/configure
@@ -6450,12 +6450,13 @@ if test "x$ac_cv_header_resolv_h" = xyes; then :
#define HAVE_RESOLV_H 1
_ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __res_init" >&5
-$as_echo_n "checking for library containing __res_init... " >&6; }
-if ${ac_cv_search___res_init+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_init in -lresolv" >&5
+$as_echo_n "checking for __res_init in -lresolv... " >&6; }
+if ${ac_cv_lib_resolv___res_init+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6474,35 +6475,27 @@ return __res_init ();
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search___res_init=$ac_res
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_resolv___res_init=yes
+else
+ ac_cv_lib_resolv___res_init=no
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search___res_init+:} false; then :
- break
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-done
-if ${ac_cv_search___res_init+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_init" >&5
+$as_echo "$ac_cv_lib_resolv___res_init" >&6; }
+if test "x$ac_cv_lib_resolv___res_init" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRESOLV 1
+_ACEOF
+
+ LIBS="-lresolv $LIBS"
else
- ac_cv_search___res_init=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+ as_fn_error $? "__res_init not found int resolv" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___res_init" >&5
-$as_echo "$ac_cv_search___res_init" >&6; }
-ac_res=$ac_cv_search___res_init
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working resolve" >&5
$as_echo_n "checking for working resolve... " >&6; }
@@ -6522,14 +6515,14 @@ res_init();
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<_ACEOF
#define HAVE_RESOLVE 1
_ACEOF
- if true; then
+ if true; then
RESOLVE_TRUE=
RESOLVE_FALSE='#'
else
@@ -6540,12 +6533,9 @@ fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
-
-fi
-
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext