Skip to content

Commit 17eea87

Browse files
committed
Replace obsolete macro AC_TRY_COMPILE with AC_COMPILE_IFELSE
Autoconf made several macros obsolete in several versions behind including the AC_TRY_COMPILE which should be replaced with current AC_COMPILE_IFELSE instead.
1 parent f5f84c5 commit 17eea87

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

Diff for: config.m4

+4-14
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,13 @@ if test "$PHP_MEMCACHED" != "no"; then
260260
dnl # Always check if libmemcached was built with SASL support,
261261
dnl # because it will require sasl.h even if not used here.
262262
AC_CACHE_CHECK([for libmemcached sasl.h requirement], ac_cv_memc_sasl_support, [
263-
AC_TRY_COMPILE(
264-
[ #include <libmemcached/memcached.h> ],
265-
[
263+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libmemcached/memcached.h>]], [[
266264
#if LIBMEMCACHED_WITH_SASL_SUPPORT
267265
/* yes */
268266
#else
269267
# error "no sasl support"
270268
#endif
271-
],
272-
[ ac_cv_memc_sasl_support="yes" ],
273-
[ ac_cv_memc_sasl_support="no" ]
274-
)
269+
]])],[ac_cv_memc_sasl_support="yes"],[ac_cv_memc_sasl_support="no"])
275270
])
276271

277272
if test "$ac_cv_memc_sasl_support" = "yes"; then
@@ -360,14 +355,9 @@ if test "$PHP_MEMCACHED" != "no"; then
360355
AC_MSG_RESULT([enabled])
361356

362357
AC_CACHE_CHECK([whether libmemcachedprotocol is usable], ac_cv_have_libmemcachedprotocol, [
363-
AC_TRY_COMPILE(
364-
[ #include <libmemcachedprotocol-0.0/handler.h> ],
365-
[ memcached_binary_protocol_callback_st s_test_impl;
358+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libmemcachedprotocol-0.0/handler.h>]], [[memcached_binary_protocol_callback_st s_test_impl;
366359
s_test_impl.interface.v1.delete_object = 0;
367-
],
368-
[ ac_cv_have_libmemcachedprotocol="yes" ],
369-
[ ac_cv_have_libmemcachedprotocol="no" ]
370-
)
360+
]])],[ac_cv_have_libmemcachedprotocol="yes"],[ac_cv_have_libmemcachedprotocol="no"])
371361
])
372362

373363
if test "$ac_cv_have_libmemcachedprotocol" != "yes"; then

0 commit comments

Comments
 (0)