summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-01 19:29:05 +0000
committerYang Tse <yangsita@gmail.com>2008-08-01 19:29:05 +0000
commit10ebec6364dfda1168630ed58815d8716f497ce8 (patch)
tree7fdfb7465f42c71386ede6886a1af098644d74d6 /configure.ac
parente09327a51a99e4e124a3f4929a173820ec777eeb (diff)
downloadc-ares-10ebec6364dfda1168630ed58815d8716f497ce8.tar.gz
c-ares-10ebec6364dfda1168630ed58815d8716f497ce8.tar.bz2
c-ares-10ebec6364dfda1168630ed58815d8716f497ce8.zip
Another AC_TRY_LINK conversion to AC_LINK_IFELSE.
Proper definition of HAVE_function if function is found deeper.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac38
1 files changed, 21 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 84ee735..53cbe6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -792,23 +792,27 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
)
-AC_CHECK_FUNCS( bitncmp \
- gettimeofday \
- if_indextoname,
-dnl if found
-[],
-dnl if not found, $ac_func is the name we check for
-func="$ac_func"
-AC_MSG_CHECKING([deeper for $func])
-AC_TRY_LINK( [],
- [ $func ();],
- AC_MSG_RESULT(yes!)
- eval "ac_cv_func_$func=yes"
- def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
- AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
- AC_MSG_RESULT(but still no)
- )
-)
+AC_CHECK_FUNCS([bitncmp \
+ gettimeofday \
+ if_indextoname
+],[
+],[
+ func="$ac_func"
+ AC_MSG_CHECKING([deeper for $func])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+ ]],[[
+ $func ();
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ eval "ac_cv_func_$func=yes"
+ AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
+ [Define to 1 if you have the $func function.])
+ ],[
+ AC_MSG_RESULT([but still no])
+ ])
+])
dnl check for inet_pton