Search code examples
perlbuildconfigurelibcrypto

Force Perl's Configure to disable crypto support even if it's available on the host system


From https://github.com/Perl/perl5/blob/65f7068/Configure#L12110 I'm gathering that it's d_crypt and d_crypt_r that further control if Perl detected libcrypt on the host system.

However, I didn't find how to force it to set them to undef via Configure command-line flags or via environment variables.

Should I just append #undef d_crypt/#undef d_drypt_r to the Config.h it generates? Is there a more proper way to instruct Perl to configure/build without libcrypt support?


Solution

  • It turned out that I need to add a switch -Dlibs="-lpthread -lnsl -ldl -lm -lutil -lc" to the ./Configure invocation. Originally, libs is set to -lpthread -lcrypto -lnsl -ldl -lm -lutil -lc, so I had to remove crypto from here.

    Setting -Aclear:d_crypt / -Aclear:d_crypt_r made no difference :(