1 AC_CHECK_FUNCS(inet_ntoa,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_ntoa.o"])
3 AC_CACHE_CHECK([for broken inet_ntoa],libreplace_cv_REPLACE_INET_NTOA,[
8 #include <netinet/in.h>
9 #ifdef HAVE_ARPA_INET_H
10 #include <arpa/inet.h>
12 main() { struct in_addr ip; ip.s_addr = 0x12345678;
13 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
14 strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
16 libreplace_cv_REPLACE_INET_NTOA=yes,libreplace_cv_REPLACE_INET_NTOA=no,libreplace_cv_REPLACE_INET_NTOA=cross)])
17 if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
18 AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced])