@@ -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
@@ -304,12 +299,11 @@ if test "$PHP_MEMCACHED" != "no"; then
304299 LIBS="$LIBS $PHP_LIBMEMCACHED_LIBS"
305300
306301 AC_CACHE_CHECK ( [ whether memcached_exist is defined] , ac_cv_have_memcached_exist , [
307- AC_TRY_LINK (
308- [ #include <libmemcached/memcached.h> ] ,
309- [ memcached_exist (NULL, NULL, 0); ] ,
310- [ ac_cv_have_memcached_exist="yes" ] ,
311- [ ac_cv_have_memcached_exist="no" ]
312- )
302+ AC_LINK_IFELSE (
303+ [ AC_LANG_PROGRAM ( [ [ #include <libmemcached/memcached.h>] ] ,
304+ [ [ memcached_exist (NULL, NULL, 0);] ] ) ] ,
305+ [ ac_cv_have_memcached_exist="yes"] ,
306+ [ ac_cv_have_memcached_exist="no"] )
313307 ] )
314308
315309 CFLAGS="$ORIG_CFLAGS"
@@ -323,12 +317,11 @@ if test "$PHP_MEMCACHED" != "no"; then
323317 fi
324318
325319 AC_CACHE_CHECK ( [ whether memcached_set_encoding_key is defined] , ac_cv_have_memcached_set_encoding_key , [
326- AC_TRY_LINK (
327- [ #include <libmemcached/memcached.h> ] ,
328- [ memcached_set_encoding_key (NULL, NULL, 0); ] ,
329- [ ac_cv_have_memcached_set_encoding_key="yes" ] ,
330- [ ac_cv_have_memcached_set_encoding_key="no" ]
331- )
320+ AC_LINK_IFELSE (
321+ [ AC_LANG_PROGRAM ( [ [ #include <libmemcached/memcached.h>] ] ,
322+ [ [ memcached_set_encoding_key (NULL, NULL, 0);] ] ) ] ,
323+ [ ac_cv_have_memcached_set_encoding_key="yes"] ,
324+ [ ac_cv_have_memcached_set_encoding_key="no"] )
332325 ] )
333326
334327 CFLAGS="$ORIG_CFLAGS"
@@ -360,14 +353,9 @@ if test "$PHP_MEMCACHED" != "no"; then
360353 AC_MSG_RESULT ( [ enabled] )
361354
362355 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;
356+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <libmemcachedprotocol-0.0/handler.h>] ] , [ [ memcached_binary_protocol_callback_st s_test_impl;
366357 s_test_impl.interface.v1.delete_object = 0;
367- ] ,
368- [ ac_cv_have_libmemcachedprotocol="yes" ] ,
369- [ ac_cv_have_libmemcachedprotocol="no" ]
370- )
358+ ] ] ) ] ,[ ac_cv_have_libmemcachedprotocol="yes"] ,[ ac_cv_have_libmemcachedprotocol="no"] )
371359 ] )
372360
373361 if test "$ac_cv_have_libmemcachedprotocol" != "yes"; then
0 commit comments