@@ -19,9 +19,9 @@ PHP_ARG_WITH([openssl-legacy-provider],
1919
2020PHP_ARG_WITH([ openssl-argon2] ,
2121 [ whether to enable argon2 password hashing (requires OpenSSL >= 3.2)] ,
22- [ AS_HELP_STRING ( [ --with -openssl-argon2] ,
23- [ OPENSSL: Enable argon2 password hashing] ) ] ,
24- [ no ] ,
22+ [ AS_HELP_STRING ( [ --without -openssl-argon2] ,
23+ [ OPENSSL: Disable argon2 password hashing] ) ] ,
24+ [ yes ] ,
2525 [ no] )
2626
2727if test "$PHP_OPENSSL" != "no"; then
@@ -48,11 +48,13 @@ if test "$PHP_OPENSSL" != "no"; then
4848 [ Define to 1 to load the OpenSSL legacy algorithm provider in addition to
4949 the default provider.] ) ] )
5050
51- AS_VAR_IF ( [ PHP_OPENSSL_ARGON2] , [ no] ,, [
51+ dnl Implicit default is yes; only error if explicitly set and unavailable
52+ AS_IF ( [ test "$PHP_OPENSSL_ARGON2" != "no"] , [
5253 PHP_CHECK_LIBRARY([ crypto] , [ OSSL_set_max_threads] ,
5354 [ AC_DEFINE ( [ HAVE_OPENSSL_ARGON2] , [ 1] ,
5455 [ Define to 1 to enable OpenSSL argon2 password hashing.] ) ] ,
55- [ AC_MSG_ERROR ( [ argon2 hashing requires OpenSSL 3.2] ) ] ,
56+ [ AS_IF ( [ test "x$with_openssl_argon2" = "xyes"] ,
57+ [ AC_MSG_ERROR ( [ argon2 hashing requires OpenSSL 3.2] ) ] ) ] ,
5658 [ $OPENSSL_LIBS] )
5759 ] )
5860fi
0 commit comments