1PHP_ARG_WITH([sodium], 2 [for sodium support], 3 [AS_HELP_STRING([--with-sodium], 4 [Include sodium support])]) 5 6if test "$PHP_SODIUM" != "no"; then 7 PKG_CHECK_MODULES([LIBSODIUM], [libsodium >= 1.0.8]) 8 9 PHP_EVAL_INCLINE($LIBSODIUM_CFLAGS) 10 PHP_EVAL_LIBLINE($LIBSODIUM_LIBS, SODIUM_SHARED_LIBADD) 11 12 AC_DEFINE(HAVE_LIBSODIUMLIB, 1, [ ]) 13 14 dnl Add -Wno-type-limits as this may arise on 32bits platforms 15 SODIUM_COMPILER_FLAGS="$LIBSODIUM_CFLAGS -Wno-type-limits" 16 PHP_NEW_EXTENSION(sodium, libsodium.c sodium_pwhash.c, $ext_shared, , $SODIUM_COMPILER_FLAGS) 17 PHP_SUBST(SODIUM_SHARED_LIBADD) 18fi 19