Alien-cares
view release on metacpan or search on metacpan
libcares/m4/cares-compilers.m4 view on Meta::CPAN
echo " " >&6
])
CFLAGS="$tmp_save_CFLAGS"
fi
if test "$supports_symbol_hiding" = "yes"; then
AC_MSG_RESULT([yes])
symbol_hiding_CFLAGS="$tmp_CFLAGS"
symbol_hiding_EXTERN="$tmp_EXTERN"
else
AC_MSG_RESULT([no])
fi
])
dnl CARES_CHECK_COMPILER_PROTOTYPE_MISMATCH
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
dnl compilation phase without generating any object
dnl code file, when the source code tries to redefine
dnl a prototype which does not match previous one.
AC_DEFUN([CARES_CHECK_COMPILER_PROTOTYPE_MISMATCH], [
AC_REQUIRE([CARES_CHECK_COMPILER_HALT_ON_ERROR])dnl
AC_MSG_CHECKING([if compiler halts on function prototype mismatch])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
# include <stdlib.h>
int rand(int n);
int rand(int n)
{
if(n)
return ++n;
else
return n;
}
]],[[
int i[2];
int j = rand(i[0]);
if(j)
return j;
]])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([compiler does not halt on function prototype mismatch.])
],[
AC_MSG_RESULT([yes])
])
])
dnl CARES_VAR_MATCH (VARNAME, VALUE)
dnl -------------------------------------------------
dnl Verifies if shell variable VARNAME contains VALUE.
dnl Contents of variable VARNAME and VALUE are handled
dnl as whitespace separated lists of words. If at least
dnl one word of VALUE is present in VARNAME the match
dnl is considered positive, otherwise false.
AC_DEFUN([CARES_VAR_MATCH], [
ac_var_match_word="no"
for word1 in $[$1]; do
for word2 in [$2]; do
if test "$word1" = "$word2"; then
ac_var_match_word="yes"
fi
done
done
])
dnl CARES_VAR_MATCH_IFELSE (VARNAME, VALUE,
dnl [ACTION-IF-MATCH], [ACTION-IF-NOT-MATCH])
dnl -------------------------------------------------
dnl This performs a CURL_VAR_MATCH check and executes
dnl first branch if the match is positive, otherwise
dnl the second branch is executed.
AC_DEFUN([CARES_VAR_MATCH_IFELSE], [
CARES_VAR_MATCH([$1],[$2])
if test "$ac_var_match_word" = "yes"; then
ifelse($3,,:,[$3])
ifelse($4,,,[else
$4])
fi
])
dnl CARES_VAR_STRIP (VARNAME, VALUE)
dnl -------------------------------------------------
dnl Contents of variable VARNAME and VALUE are handled
dnl as whitespace separated lists of words. Each word
dnl from VALUE is removed from VARNAME when present.
AC_DEFUN([CARES_VAR_STRIP], [
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
ac_var_stripped=""
for word1 in $[$1]; do
ac_var_strip_word="no"
for word2 in [$2]; do
if test "$word1" = "$word2"; then
ac_var_strip_word="yes"
fi
done
if test "$ac_var_strip_word" = "no"; then
ac_var_stripped="$ac_var_stripped $word1"
fi
done
dnl squeeze whitespace out of result
[$1]="$ac_var_stripped"
squeeze [$1]
])
( run in 1.479 second using v1.01-cache-2.11-cpan-39bf76dae61 )