mirror of
https://github.com/moparisthebest/curl
synced 2025-01-09 13:08:00 -05:00
Another AC_TRY_LINK conversion to AC_LINK_IFELSE.
Proper definition of HAVE_function if function is found deeper.
This commit is contained in:
parent
357389a905
commit
47724ef238
@ -792,23 +792,27 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS( bitncmp \
|
AC_CHECK_FUNCS([bitncmp \
|
||||||
gettimeofday \
|
gettimeofday \
|
||||||
if_indextoname,
|
if_indextoname
|
||||||
dnl if found
|
],[
|
||||||
[],
|
],[
|
||||||
dnl if not found, $ac_func is the name we check for
|
func="$ac_func"
|
||||||
func="$ac_func"
|
AC_MSG_CHECKING([deeper for $func])
|
||||||
AC_MSG_CHECKING([deeper for $func])
|
AC_LINK_IFELSE([
|
||||||
AC_TRY_LINK( [],
|
AC_LANG_PROGRAM([[
|
||||||
[ $func ();],
|
]],[[
|
||||||
AC_MSG_RESULT(yes!)
|
$func ();
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
eval "ac_cv_func_$func=yes"
|
eval "ac_cv_func_$func=yes"
|
||||||
def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
|
AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
|
||||||
AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
|
[Define to 1 if you have the $func function.])
|
||||||
AC_MSG_RESULT(but still no)
|
],[
|
||||||
)
|
AC_MSG_RESULT([but still no])
|
||||||
)
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl check for inet_pton
|
dnl check for inet_pton
|
||||||
|
Loading…
Reference in New Issue
Block a user