AC_MSG_ERROR(could not find ares.h)
fi
- PHP_ADD_LIBRARY(rt, ARES_SHARED_LIBADD)
+ dnl ##########
+ dnl newer versions of libcares need -lrt
+ dnl ##########
+ PHP_ADD_LIBRARY(rt, 1, ARES_SHARED_LIBADD)
+
PHP_ARES_LIB=
PHP_CHECK_LIBRARY(cares, ares_init, [
PHP_ARES_LIB=cares
+ echo $LDFLAGS
], [
+ echo $LDFLAGS
PHP_CHECK_LIBRARY(ares, ares_init, [
PHP_ARES_LIB=ares
], [
PHP_ARES_LIB=unknown
], [
- -L$PHP_ARES_DIR/$PHP_LIBDIR
+ -lrt -L$PHP_ARES_DIR/$PHP_LIBDIR
]
)
], [
- -L$PHP_ARES_DIR/$PHP_LIBDIR
+ -lrt -L$PHP_ARES_DIR/$PHP_LIBDIR
]
)
AC_MSG_CHECKING(for libares/libcares)
PHP_CHECK_LIBRARY($PHP_ARES_LIB, ares_cancel,
[AC_DEFINE([HAVE_ARES_CANCEL], [1], [ ])], [ ],
- [-L$PHP_ARES_DIR/$PHP_LIBDIR]
+ [-lrt -L$PHP_ARES_DIR/$PHP_LIBDIR]
)
PHP_CHECK_LIBRARY($PHP_ARES_LIB, ares_getnameinfo,
[AC_DEFINE([HAVE_ARES_GETNAMEINFO], [1], [ ])], [ ],
- [-L$PHP_ARES_DIR/$PHP_LIBDIR]
+ [-lrt -L$PHP_ARES_DIR/$PHP_LIBDIR]
)
PHP_CHECK_LIBRARY($PHP_ARES_LIB, ares_getsock,
[AC_DEFINE([HAVE_ARES_GETSOCK], [1], [ ])], [ ],
- [-L$PHP_ARES_DIR/$PHP_LIBDIR]
+ [-lrt -L$PHP_ARES_DIR/$PHP_LIBDIR]
)
PHP_CHECK_LIBRARY($PHP_ARES_LIB, ares_version,
[AC_DEFINE([HAVE_ARES_VERSION], [1], [ ])], [ ],
- [-L$PHP_ARES_DIR/$PHP_LIBDIR]
+ [-lrt -L$PHP_ARES_DIR/$PHP_LIBDIR]
)
-
- dnl check new c-ares API
-
+ dnl ##########
+ dnl check new c-ares callback API
+ dnl ##########
save_LIBS=$LIBS
save_CFLAGS=$CFLAGS
- LIBS="-L $PHP_ARES_DIR/$PHP_LIBDIR -l $PHP_ARES_LIB"
- CFLAGS="-I$PHP_ARES_DIR/include -pedantic-errors"
+ LDFLIBS="-L$PHP_ARES_DIR/$PHP_LIBDIR -l$PHP_ARES_LIB -lrt"
+ CFLAGS="-I$PHP_ARES_DIR/include -Werror"
AC_MSG_CHECKING(for new c-ares callback API)
AC_TRY_COMPILE(