@@ -656,6 +656,8 @@ MODULE_NIS_FALSE
656
656
MODULE_NIS_TRUE
657
657
MODULE__DECIMAL_FALSE
658
658
MODULE__DECIMAL_TRUE
659
+ MODULE__CRYPT_FALSE
660
+ MODULE__CRYPT_TRUE
659
661
MODULE__BLAKE2_FALSE
660
662
MODULE__BLAKE2_TRUE
661
663
MODULE__SHA3_FALSE
@@ -784,6 +786,8 @@ HAVE_GETHOSTBYNAME_R
784
786
HAVE_GETHOSTBYNAME_R_3_ARG
785
787
HAVE_GETHOSTBYNAME_R_5_ARG
786
788
HAVE_GETHOSTBYNAME_R_6_ARG
789
+ LIBCRYPT_LIBS
790
+ LIBCRYPT_CFLAGS
787
791
LIBOBJS
788
792
LIBLZMA_LIBS
789
793
LIBLZMA_CFLAGS
@@ -1041,7 +1045,9 @@ ZLIB_LIBS
1041
1045
BZIP2_CFLAGS
1042
1046
BZIP2_LIBS
1043
1047
LIBLZMA_CFLAGS
1044
- LIBLZMA_LIBS'
1048
+ LIBLZMA_LIBS
1049
+ LIBCRYPT_CFLAGS
1050
+ LIBCRYPT_LIBS'
1045
1051
1046
1052
1047
1053
# Initialize some variables set by options.
@@ -1831,6 +1837,10 @@ Some influential environment variables:
1831
1837
C compiler flags for LIBLZMA, overriding pkg-config
1832
1838
LIBLZMA_LIBS
1833
1839
linker flags for LIBLZMA, overriding pkg-config
1840
+ LIBCRYPT_CFLAGS
1841
+ C compiler flags for LIBCRYPT, overriding pkg-config
1842
+ LIBCRYPT_LIBS
1843
+ linker flags for LIBCRYPT, overriding pkg-config
1834
1844
1835
1845
Use these variables to override the choices made by `configure' or to help
1836
1846
it to find libraries and programs with nonstandard names/locations.
@@ -15251,11 +15261,75 @@ fi
15251
15261
done
15252
15262
15253
15263
15254
- # We search for both crypt and crypt_r as one or the other may be defined
15255
- # This gets us our -lcrypt in LIBS when required on the target platform.
15256
- # Save/restore LIBS to avoid linking libpython with libcrypt.
15257
- LIBS_SAVE=$LIBS
15258
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15264
+
15265
+
15266
+
15267
+ pkg_failed=no
15268
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCRYPT" >&5
15269
+ $as_echo_n "checking for LIBCRYPT... " >&6; }
15270
+
15271
+ if test -n "$LIBCRYPT_CFLAGS"; then
15272
+ pkg_cv_LIBCRYPT_CFLAGS="$LIBCRYPT_CFLAGS"
15273
+ elif test -n "$PKG_CONFIG"; then
15274
+ if test -n "$PKG_CONFIG" && \
15275
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxcrypt >= 3.1.1\""; } >&5
15276
+ ($PKG_CONFIG --exists --print-errors "libxcrypt >= 3.1.1") 2>&5
15277
+ ac_status=$?
15278
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15279
+ test $ac_status = 0; }; then
15280
+ pkg_cv_LIBCRYPT_CFLAGS=`$PKG_CONFIG --cflags "libxcrypt >= 3.1.1" 2>/dev/null`
15281
+ test "x$?" != "x0" && pkg_failed=yes
15282
+ else
15283
+ pkg_failed=yes
15284
+ fi
15285
+ else
15286
+ pkg_failed=untried
15287
+ fi
15288
+ if test -n "$LIBCRYPT_LIBS"; then
15289
+ pkg_cv_LIBCRYPT_LIBS="$LIBCRYPT_LIBS"
15290
+ elif test -n "$PKG_CONFIG"; then
15291
+ if test -n "$PKG_CONFIG" && \
15292
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxcrypt >= 3.1.1\""; } >&5
15293
+ ($PKG_CONFIG --exists --print-errors "libxcrypt >= 3.1.1") 2>&5
15294
+ ac_status=$?
15295
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15296
+ test $ac_status = 0; }; then
15297
+ pkg_cv_LIBCRYPT_LIBS=`$PKG_CONFIG --libs "libxcrypt >= 3.1.1" 2>/dev/null`
15298
+ test "x$?" != "x0" && pkg_failed=yes
15299
+ else
15300
+ pkg_failed=yes
15301
+ fi
15302
+ else
15303
+ pkg_failed=untried
15304
+ fi
15305
+
15306
+
15307
+
15308
+ if test $pkg_failed = yes; then
15309
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15310
+ $as_echo "no" >&6; }
15311
+
15312
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
15313
+ _pkg_short_errors_supported=yes
15314
+ else
15315
+ _pkg_short_errors_supported=no
15316
+ fi
15317
+ if test $_pkg_short_errors_supported = yes; then
15318
+ LIBCRYPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxcrypt >= 3.1.1" 2>&1`
15319
+ else
15320
+ LIBCRYPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxcrypt >= 3.1.1" 2>&1`
15321
+ fi
15322
+ # Put the nasty error message in config.log where it belongs
15323
+ echo "$LIBCRYPT_PKG_ERRORS" >&5
15324
+
15325
+
15326
+ save_CFLAGS=$CFLAGS
15327
+ save_CPPFLAGS=$CPPFLAGS
15328
+ save_LDFLAGS=$LDFLAGS
15329
+ save_LIBS=$LIBS
15330
+
15331
+
15332
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15259
15333
$as_echo_n "checking for library containing crypt_r... " >&6; }
15260
15334
if ${ac_cv_search_crypt_r+:} false; then :
15261
15335
$as_echo_n "(cached) " >&6
@@ -15309,12 +15383,37 @@ ac_res=$ac_cv_search_crypt_r
15309
15383
if test "$ac_res" != no; then :
15310
15384
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15311
15385
15386
+ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
15387
+
15388
+ if test "$ac_cv_search_crypt_r" = "none required"; then
15389
+ LIBCRYPT_LIBS=
15390
+ else
15391
+ LIBCRYPT_LIBS="$ac_cv_search_crypt_r"
15392
+ fi
15393
+
15312
15394
fi
15313
15395
15314
- LIBS="$LIBS_SAVE"
15315
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
15316
- $as_echo_n "checking for library containing crypt... " >&6; }
15317
- if ${ac_cv_search_crypt+:} false; then :
15396
+
15397
+ CFLAGS=$save_CFLAGS
15398
+ CPPFLAGS=$save_CPPFLAGS
15399
+ LDFLAGS=$save_LDFLAGS
15400
+ LIBS=$save_LIBS
15401
+
15402
+
15403
+
15404
+ elif test $pkg_failed = untried; then
15405
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15406
+ $as_echo "no" >&6; }
15407
+
15408
+ save_CFLAGS=$CFLAGS
15409
+ save_CPPFLAGS=$CPPFLAGS
15410
+ save_LDFLAGS=$LDFLAGS
15411
+ save_LIBS=$LIBS
15412
+
15413
+
15414
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15415
+ $as_echo_n "checking for library containing crypt_r... " >&6; }
15416
+ if ${ac_cv_search_crypt_r+:} false; then :
15318
15417
$as_echo_n "(cached) " >&6
15319
15418
else
15320
15419
ac_func_search_save_LIBS=$LIBS
@@ -15327,11 +15426,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15327
15426
#ifdef __cplusplus
15328
15427
extern "C"
15329
15428
#endif
15330
- char crypt ();
15429
+ char crypt_r ();
15331
15430
int
15332
15431
main ()
15333
15432
{
15334
- return crypt ();
15433
+ return crypt_r ();
15335
15434
;
15336
15435
return 0;
15337
15436
}
@@ -15344,59 +15443,112 @@ for ac_lib in '' crypt; do
15344
15443
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15345
15444
fi
15346
15445
if ac_fn_c_try_link "$LINENO"; then :
15347
- ac_cv_search_crypt =$ac_res
15446
+ ac_cv_search_crypt_r =$ac_res
15348
15447
fi
15349
15448
rm -f core conftest.err conftest.$ac_objext \
15350
15449
conftest$ac_exeext
15351
- if ${ac_cv_search_crypt +:} false; then :
15450
+ if ${ac_cv_search_crypt_r +:} false; then :
15352
15451
break
15353
15452
fi
15354
15453
done
15355
- if ${ac_cv_search_crypt +:} false; then :
15454
+ if ${ac_cv_search_crypt_r +:} false; then :
15356
15455
15357
15456
else
15358
- ac_cv_search_crypt =no
15457
+ ac_cv_search_crypt_r =no
15359
15458
fi
15360
15459
rm conftest.$ac_ext
15361
15460
LIBS=$ac_func_search_save_LIBS
15362
15461
fi
15363
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt " >&5
15364
- $as_echo "$ac_cv_search_crypt " >&6; }
15365
- ac_res=$ac_cv_search_crypt
15462
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r " >&5
15463
+ $as_echo "$ac_cv_search_crypt_r " >&6; }
15464
+ ac_res=$ac_cv_search_crypt_r
15366
15465
if test "$ac_res" != no; then :
15367
15466
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15368
15467
15468
+ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
15469
+
15470
+ if test "$ac_cv_search_crypt_r" = "none required"; then
15471
+ LIBCRYPT_LIBS=
15472
+ else
15473
+ LIBCRYPT_LIBS="$ac_cv_search_crypt_r"
15474
+ fi
15475
+
15369
15476
fi
15370
15477
15371
15478
15372
- ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
15373
- if test "x$ac_cv_func_crypt_r" = xyes; then :
15374
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15479
+ CFLAGS=$save_CFLAGS
15480
+ CPPFLAGS=$save_CPPFLAGS
15481
+ LDFLAGS=$save_LDFLAGS
15482
+ LIBS=$save_LIBS
15483
+
15484
+
15485
+
15486
+ else
15487
+ LIBCRYPT_CFLAGS=$pkg_cv_LIBCRYPT_CFLAGS
15488
+ LIBCRYPT_LIBS=$pkg_cv_LIBCRYPT_LIBS
15489
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15490
+ $as_echo "yes" >&6; }
15491
+
15492
+ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
15493
+
15494
+
15495
+ fi
15496
+
15497
+ save_CFLAGS=$CFLAGS
15498
+ save_CPPFLAGS=$CPPFLAGS
15499
+ save_LDFLAGS=$LDFLAGS
15500
+ save_LIBS=$LIBS
15501
+
15502
+
15503
+ CPPFLAGS="$LIBCRYPT_CFLAGS $CFLAGS"
15504
+ LDFLAGS="$LIBCRYPT_LIBS $LDFLAGS"
15505
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt or crypt_r" >&5
15506
+ $as_echo_n "checking for crypt or crypt_r... " >&6; }
15507
+ if ${ac_cv_crypt_crypt+:} false; then :
15508
+ $as_echo_n "(cached) " >&6
15509
+ else
15510
+
15511
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15375
15512
/* end confdefs.h. */
15376
15513
15377
- #include <crypt.h>
15514
+ #ifdef HAVE_CRYPT_H
15515
+ #include <crypt.h>
15516
+ #endif
15517
+ #include <unistd.h>
15378
15518
15379
15519
int
15380
15520
main ()
15381
15521
{
15382
15522
15383
- struct crypt_data d;
15384
- char *r = crypt_r("", "", &d);
15523
+ #ifdef HAVE_CRYPT_R
15524
+ void *x = crypt_r;
15525
+ #else
15526
+ void *x = crypt;
15527
+ #endif
15385
15528
15386
15529
;
15387
15530
return 0;
15388
15531
}
15389
- _ACEOF
15390
- if ac_fn_c_try_compile "$LINENO"; then :
15391
-
15392
- $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
15393
15532
15533
+ _ACEOF
15534
+ if ac_fn_c_try_link "$LINENO"; then :
15535
+ ac_cv_crypt_crypt=yes
15536
+ else
15537
+ ac_cv_crypt_crypt=no
15394
15538
fi
15395
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15539
+ rm -f core conftest.err conftest.$ac_objext \
15540
+ conftest$ac_exeext conftest.$ac_ext
15396
15541
15397
15542
fi
15543
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_crypt" >&5
15544
+ $as_echo "$ac_cv_crypt_crypt" >&6; }
15545
+
15546
+ CFLAGS=$save_CFLAGS
15547
+ CPPFLAGS=$save_CPPFLAGS
15548
+ LDFLAGS=$save_LDFLAGS
15549
+ LIBS=$save_LIBS
15550
+
15398
15551
15399
- LIBS=$LIBS_SAVE
15400
15552
15401
15553
for ac_func in clock_gettime
15402
15554
do :
@@ -21381,6 +21533,42 @@ $as_echo "$py_cv_module__blake2" >&6; }
21381
21533
21382
21534
21383
21535
21536
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _crypt" >&5
21537
+ $as_echo_n "checking for stdlib extension module _crypt... " >&6; }
21538
+ case $py_stdlib_not_available in #(
21539
+ *_crypt*) :
21540
+ py_cv_module__crypt=n/a ;; #(
21541
+ *) :
21542
+ if true; then :
21543
+ if test "$ac_cv_crypt_crypt" = yes; then :
21544
+ py_cv_module__crypt=yes
21545
+ else
21546
+ py_cv_module__crypt=missing
21547
+ fi
21548
+ else
21549
+ py_cv_module__crypt=disabled
21550
+ fi
21551
+ ;;
21552
+ esac
21553
+ as_fn_append MODULE_BLOCK "MODULE__CRYPT=$py_cv_module__crypt$as_nl"
21554
+ if test "x$py_cv_module__crypt" = xyes; then :
21555
+
21556
+ as_fn_append MODULE_BLOCK "MODULE__CRYPT_CFLAGS=$LIBCRYPT_CFLAGS$as_nl"
21557
+ as_fn_append MODULE_BLOCK "MODULE__CRYPT_LDFLAGS=$LIBCRYPT_LIBS$as_nl"
21558
+
21559
+ fi
21560
+ if test "$py_cv_module__crypt" = yes; then
21561
+ MODULE__CRYPT_TRUE=
21562
+ MODULE__CRYPT_FALSE='#'
21563
+ else
21564
+ MODULE__CRYPT_TRUE='#'
21565
+ MODULE__CRYPT_FALSE=
21566
+ fi
21567
+
21568
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__crypt" >&5
21569
+ $as_echo "$py_cv_module__crypt" >&6; }
21570
+
21571
+
21384
21572
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _decimal" >&5
21385
21573
$as_echo_n "checking for stdlib extension module _decimal... " >&6; }
21386
21574
case $py_stdlib_not_available in #(
@@ -22261,6 +22449,10 @@ if test -z "${MODULE__BLAKE2_TRUE}" && test -z "${MODULE__BLAKE2_FALSE}"; then
22261
22449
as_fn_error $? "conditional \"MODULE__BLAKE2\" was never defined.
22262
22450
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22263
22451
fi
22452
+ if test -z "${MODULE__CRYPT_TRUE}" && test -z "${MODULE__CRYPT_FALSE}"; then
22453
+ as_fn_error $? "conditional \"MODULE__CRYPT\" was never defined.
22454
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
22455
+ fi
22264
22456
if test -z "${MODULE__DECIMAL_TRUE}" && test -z "${MODULE__DECIMAL_FALSE}"; then
22265
22457
as_fn_error $? "conditional \"MODULE__DECIMAL\" was never defined.
22266
22458
Usually this means the macro was only invoked conditionally." "$LINENO" 5
0 commit comments