diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-03-10 23:30:34 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-03-10 23:30:34 +0000 |
commit | db2370a12f9ac78cedb448439969079b6dc568f3 (patch) | |
tree | ca2a3d8f10fb4cdc39735fac293fffa9397f2af0 /ares/acinclude.m4 | |
parent | d1d35ba85fe6f8a9e6a86d2a6c60109cf90edd6c (diff) |
Dominick Meglio added ares_parse_aaaa_reply.c and did various adjustments. The
first little steps towards IPv6 support!
Diffstat (limited to 'ares/acinclude.m4')
-rw-r--r-- | ares/acinclude.m4 | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ares/acinclude.m4 b/ares/acinclude.m4 index 32a35036c..31972aa36 100644 --- a/ares/acinclude.m4 +++ b/ares/acinclude.m4 @@ -99,3 +99,52 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS], ]) dnl end of AC_DEFUN() + +dnl This macro determines if the specified struct exists in the specified file +dnl Syntax: +dnl CARES_CHECK_STRUCT(headers, struct name, if found, [if not found]) + +AC_DEFUN([CARES_CHECK_STRUCT], [ + AC_MSG_CHECKING([for struct $2]) + AC_TRY_COMPILE([$1], + [ + struct $2 struct_instance; + ], ac_struct="yes", ac_found="no") + if test "$ac_struct" = "yes" ; then + AC_MSG_RESULT(yes) + $3 + else + AC_MSG_RESULT(no) + $4 + fi +]) + +dnl This macro determines if the specified constant exists in the specified file +dnl Syntax: +dnl CARES_CHECK_CONSTANT(headers, constant name, if found, [if not found]) + +AC_DEFUN([CARES_CHECK_CONSTANT], [ + AC_MSG_CHECKING([for $2]) + AC_TRY_RUN( + [ + $1 + + int main() + { + #ifdef $2 + return 0; + #else + return 1; + #endif + } + ], ac_constant="yes", ac_constant="no") + if test "$ac_constant" = "yes" ; then + AC_MSG_RESULT(yes) + $3 + else + AC_MSG_RESULT(no) + $4 + fi +]) + + |