@@ -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.
@@ -15241,11 +15251,75 @@ fi
15241
15251
done
15242
15252
15243
15253
15244
- # We search for both crypt and crypt_r as one or the other may be defined
15245
- # This gets us our -lcrypt in LIBS when required on the target platform.
15246
- # Save/restore LIBS to avoid linking libpython with libcrypt.
15247
- LIBS_SAVE=$LIBS
15248
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15254
+
15255
+
15256
+
15257
+ pkg_failed=no
15258
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCRYPT" >&5
15259
+ $as_echo_n "checking for LIBCRYPT... " >&6; }
15260
+
15261
+ if test -n "$LIBCRYPT_CFLAGS"; then
15262
+ pkg_cv_LIBCRYPT_CFLAGS="$LIBCRYPT_CFLAGS"
15263
+ elif test -n "$PKG_CONFIG"; then
15264
+ if test -n "$PKG_CONFIG" && \
15265
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxcrypt >= 3.1.1\""; } >&5
15266
+ ($PKG_CONFIG --exists --print-errors "libxcrypt >= 3.1.1") 2>&5
15267
+ ac_status=$?
15268
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15269
+ test $ac_status = 0; }; then
15270
+ pkg_cv_LIBCRYPT_CFLAGS=`$PKG_CONFIG --cflags "libxcrypt >= 3.1.1" 2>/dev/null`
15271
+ test "x$?" != "x0" && pkg_failed=yes
15272
+ else
15273
+ pkg_failed=yes
15274
+ fi
15275
+ else
15276
+ pkg_failed=untried
15277
+ fi
15278
+ if test -n "$LIBCRYPT_LIBS"; then
15279
+ pkg_cv_LIBCRYPT_LIBS="$LIBCRYPT_LIBS"
15280
+ elif test -n "$PKG_CONFIG"; then
15281
+ if test -n "$PKG_CONFIG" && \
15282
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxcrypt >= 3.1.1\""; } >&5
15283
+ ($PKG_CONFIG --exists --print-errors "libxcrypt >= 3.1.1") 2>&5
15284
+ ac_status=$?
15285
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15286
+ test $ac_status = 0; }; then
15287
+ pkg_cv_LIBCRYPT_LIBS=`$PKG_CONFIG --libs "libxcrypt >= 3.1.1" 2>/dev/null`
15288
+ test "x$?" != "x0" && pkg_failed=yes
15289
+ else
15290
+ pkg_failed=yes
15291
+ fi
15292
+ else
15293
+ pkg_failed=untried
15294
+ fi
15295
+
15296
+
15297
+
15298
+ if test $pkg_failed = yes; then
15299
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15300
+ $as_echo "no" >&6; }
15301
+
15302
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
15303
+ _pkg_short_errors_supported=yes
15304
+ else
15305
+ _pkg_short_errors_supported=no
15306
+ fi
15307
+ if test $_pkg_short_errors_supported = yes; then
15308
+ LIBCRYPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxcrypt >= 3.1.1" 2>&1`
15309
+ else
15310
+ LIBCRYPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxcrypt >= 3.1.1" 2>&1`
15311
+ fi
15312
+ # Put the nasty error message in config.log where it belongs
15313
+ echo "$LIBCRYPT_PKG_ERRORS" >&5
15314
+
15315
+
15316
+ save_CFLAGS=$CFLAGS
15317
+ save_CPPFLAGS=$CPPFLAGS
15318
+ save_LDFLAGS=$LDFLAGS
15319
+ save_LIBS=$LIBS
15320
+
15321
+
15322
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15249
15323
$as_echo_n "checking for library containing crypt_r... " >&6; }
15250
15324
if ${ac_cv_search_crypt_r+:} false; then :
15251
15325
$as_echo_n "(cached) " >&6
@@ -15299,12 +15373,37 @@ ac_res=$ac_cv_search_crypt_r
15299
15373
if test "$ac_res" != no; then :
15300
15374
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15301
15375
15376
+ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
15377
+
15378
+ if test "$ac_cv_search_crypt_r" = "none required"; then
15379
+ LIBCRYPT_LIBS=
15380
+ else
15381
+ LIBCRYPT_LIBS="$ac_cv_search_crypt_r"
15382
+ fi
15383
+
15302
15384
fi
15303
15385
15304
- LIBS="$LIBS_SAVE"
15305
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
15306
- $as_echo_n "checking for library containing crypt... " >&6; }
15307
- if ${ac_cv_search_crypt+:} false; then :
15386
+
15387
+ CFLAGS=$save_CFLAGS
15388
+ CPPFLAGS=$save_CPPFLAGS
15389
+ LDFLAGS=$save_LDFLAGS
15390
+ LIBS=$save_LIBS
15391
+
15392
+
15393
+
15394
+ elif test $pkg_failed = untried; then
15395
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15396
+ $as_echo "no" >&6; }
15397
+
15398
+ save_CFLAGS=$CFLAGS
15399
+ save_CPPFLAGS=$CPPFLAGS
15400
+ save_LDFLAGS=$LDFLAGS
15401
+ save_LIBS=$LIBS
15402
+
15403
+
15404
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15405
+ $as_echo_n "checking for library containing crypt_r... " >&6; }
15406
+ if ${ac_cv_search_crypt_r+:} false; then :
15308
15407
$as_echo_n "(cached) " >&6
15309
15408
else
15310
15409
ac_func_search_save_LIBS=$LIBS
@@ -15317,11 +15416,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15317
15416
#ifdef __cplusplus
15318
15417
extern "C"
15319
15418
#endif
15320
- char crypt ();
15419
+ char crypt_r ();
15321
15420
int
15322
15421
main ()
15323
15422
{
15324
- return crypt ();
15423
+ return crypt_r ();
15325
15424
;
15326
15425
return 0;
15327
15426
}
@@ -15334,59 +15433,112 @@ for ac_lib in '' crypt; do
15334
15433
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15335
15434
fi
15336
15435
if ac_fn_c_try_link "$LINENO"; then :
15337
- ac_cv_search_crypt =$ac_res
15436
+ ac_cv_search_crypt_r =$ac_res
15338
15437
fi
15339
15438
rm -f core conftest.err conftest.$ac_objext \
15340
15439
conftest$ac_exeext
15341
- if ${ac_cv_search_crypt +:} false; then :
15440
+ if ${ac_cv_search_crypt_r +:} false; then :
15342
15441
break
15343
15442
fi
15344
15443
done
15345
- if ${ac_cv_search_crypt +:} false; then :
15444
+ if ${ac_cv_search_crypt_r +:} false; then :
15346
15445
15347
15446
else
15348
- ac_cv_search_crypt =no
15447
+ ac_cv_search_crypt_r =no
15349
15448
fi
15350
15449
rm conftest.$ac_ext
15351
15450
LIBS=$ac_func_search_save_LIBS
15352
15451
fi
15353
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt " >&5
15354
- $as_echo "$ac_cv_search_crypt " >&6; }
15355
- ac_res=$ac_cv_search_crypt
15452
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r " >&5
15453
+ $as_echo "$ac_cv_search_crypt_r " >&6; }
15454
+ ac_res=$ac_cv_search_crypt_r
15356
15455
if test "$ac_res" != no; then :
15357
15456
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15358
15457
15458
+ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
15459
+
15460
+ if test "$ac_cv_search_crypt_r" = "none required"; then
15461
+ LIBCRYPT_LIBS=
15462
+ else
15463
+ LIBCRYPT_LIBS="$ac_cv_search_crypt_r"
15464
+ fi
15465
+
15359
15466
fi
15360
15467
15361
15468
15362
- ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
15363
- if test "x$ac_cv_func_crypt_r" = xyes; then :
15364
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15469
+ CFLAGS=$save_CFLAGS
15470
+ CPPFLAGS=$save_CPPFLAGS
15471
+ LDFLAGS=$save_LDFLAGS
15472
+ LIBS=$save_LIBS
15473
+
15474
+
15475
+
15476
+ else
15477
+ LIBCRYPT_CFLAGS=$pkg_cv_LIBCRYPT_CFLAGS
15478
+ LIBCRYPT_LIBS=$pkg_cv_LIBCRYPT_LIBS
15479
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15480
+ $as_echo "yes" >&6; }
15481
+
15482
+ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
15483
+
15484
+
15485
+ fi
15486
+
15487
+ save_CFLAGS=$CFLAGS
15488
+ save_CPPFLAGS=$CPPFLAGS
15489
+ save_LDFLAGS=$LDFLAGS
15490
+ save_LIBS=$LIBS
15491
+
15492
+
15493
+ CPPFLAGS="$LIBCRYPT_CFLAGS $CFLAGS"
15494
+ LDFLAGS="$LIBCRYPT_LIBS $LDFLAGS"
15495
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt or crypt_r" >&5
15496
+ $as_echo_n "checking for crypt or crypt_r... " >&6; }
15497
+ if ${ac_cv_crypt_crypt+:} false; then :
15498
+ $as_echo_n "(cached) " >&6
15499
+ else
15500
+
15501
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365
15502
/* end confdefs.h. */
15366
15503
15367
- #include <crypt.h>
15504
+ #ifdef HAVE_CRYPT_H
15505
+ #include <crypt.h>
15506
+ #endif
15507
+ #include <unistd.h>
15368
15508
15369
15509
int
15370
15510
main ()
15371
15511
{
15372
15512
15373
- struct crypt_data d;
15374
- char *r = crypt_r("", "", &d);
15513
+ #ifdef HAVE_CRYPT_R
15514
+ void *x = crypt_r;
15515
+ #else
15516
+ void *x = crypt;
15517
+ #endif
15375
15518
15376
15519
;
15377
15520
return 0;
15378
15521
}
15379
- _ACEOF
15380
- if ac_fn_c_try_compile "$LINENO"; then :
15381
-
15382
- $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
15383
15522
15523
+ _ACEOF
15524
+ if ac_fn_c_try_link "$LINENO"; then :
15525
+ ac_cv_crypt_crypt=yes
15526
+ else
15527
+ ac_cv_crypt_crypt=no
15384
15528
fi
15385
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15529
+ rm -f core conftest.err conftest.$ac_objext \
15530
+ conftest$ac_exeext conftest.$ac_ext
15386
15531
15387
15532
fi
15533
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_crypt" >&5
15534
+ $as_echo "$ac_cv_crypt_crypt" >&6; }
15535
+
15536
+ CFLAGS=$save_CFLAGS
15537
+ CPPFLAGS=$save_CPPFLAGS
15538
+ LDFLAGS=$save_LDFLAGS
15539
+ LIBS=$save_LIBS
15540
+
15388
15541
15389
- LIBS=$LIBS_SAVE
15390
15542
15391
15543
for ac_func in clock_gettime
15392
15544
do :
@@ -21370,6 +21522,42 @@ $as_echo "$py_cv_module__blake2" >&6; }
21370
21522
21371
21523
21372
21524
21525
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _crypt" >&5
21526
+ $as_echo_n "checking for stdlib extension module _crypt... " >&6; }
21527
+ case $py_stdlib_not_available in #(
21528
+ *_crypt*) :
21529
+ py_cv_module__crypt=n/a ;; #(
21530
+ *) :
21531
+ if true; then :
21532
+ if test "$ac_cv_crypt_crypt" = yes; then :
21533
+ py_cv_module__crypt=yes
21534
+ else
21535
+ py_cv_module__crypt=missing
21536
+ fi
21537
+ else
21538
+ py_cv_module__crypt=disabled
21539
+ fi
21540
+ ;;
21541
+ esac
21542
+ as_fn_append MODULE_BLOCK "MODULE__CRYPT=$py_cv_module__crypt$as_nl"
21543
+ if test "x$py_cv_module__crypt" = xyes; then :
21544
+
21545
+ as_fn_append MODULE_BLOCK "MODULE__CRYPT_CFLAGS=$LIBCRYPT_CFLAGS$as_nl"
21546
+ as_fn_append MODULE_BLOCK "MODULE__CRYPT_LDFLAGS=$LIBCRYPT_LIBS$as_nl"
21547
+
21548
+ fi
21549
+ if test "$py_cv_module__crypt" = yes; then
21550
+ MODULE__CRYPT_TRUE=
21551
+ MODULE__CRYPT_FALSE='#'
21552
+ else
21553
+ MODULE__CRYPT_TRUE='#'
21554
+ MODULE__CRYPT_FALSE=
21555
+ fi
21556
+
21557
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__crypt" >&5
21558
+ $as_echo "$py_cv_module__crypt" >&6; }
21559
+
21560
+
21373
21561
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _decimal" >&5
21374
21562
$as_echo_n "checking for stdlib extension module _decimal... " >&6; }
21375
21563
case $py_stdlib_not_available in #(
@@ -22250,6 +22438,10 @@ if test -z "${MODULE__BLAKE2_TRUE}" && test -z "${MODULE__BLAKE2_FALSE}"; then
22250
22438
as_fn_error $? "conditional \"MODULE__BLAKE2\" was never defined.
22251
22439
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22252
22440
fi
22441
+ if test -z "${MODULE__CRYPT_TRUE}" && test -z "${MODULE__CRYPT_FALSE}"; then
22442
+ as_fn_error $? "conditional \"MODULE__CRYPT\" was never defined.
22443
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
22444
+ fi
22253
22445
if test -z "${MODULE__DECIMAL_TRUE}" && test -z "${MODULE__DECIMAL_FALSE}"; then
22254
22446
as_fn_error $? "conditional \"MODULE__DECIMAL\" was never defined.
22255
22447
Usually this means the macro was only invoked conditionally." "$LINENO" 5
0 commit comments