aboutsummaryrefslogtreecommitdiff
path: root/ares/acinclude.m4
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-03-11 08:06:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-03-11 08:06:57 +0000
commit0ae8b51230863c0b135c4fcd2ec70a4cba150897 (patch)
treee35934332485f528eee8c70a3fd0c9dde524aae5 /ares/acinclude.m4
parent547c136b4f91c2efe38cf612d333eae8c3e2b2b7 (diff)
Replace AC_TRY_RUN() with AC_EGREP_CPP() when checking for constants to
work fine with cross-compiled builds.
Diffstat (limited to 'ares/acinclude.m4')
-rw-r--r--ares/acinclude.m420
1 files changed, 9 insertions, 11 deletions
diff --git a/ares/acinclude.m4 b/ares/acinclude.m4
index 31972aa36..2d4aa918f 100644
--- a/ares/acinclude.m4
+++ b/ares/acinclude.m4
@@ -125,19 +125,17 @@ 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(
- [
+ AC_EGREP_CPP(VARIABLEWASDEFINED,
+ [
$1
- int main()
- {
- #ifdef $2
- return 0;
- #else
- return 1;
- #endif
- }
- ], ac_constant="yes", ac_constant="no")
+ #ifdef $2
+ VARIABLEWASDEFINED
+ #else
+ NJET
+ #endif
+ ], ac_constant="yes", ac_constant="no"
+ )
if test "$ac_constant" = "yes" ; then
AC_MSG_RESULT(yes)
$3