aboutsummaryrefslogtreecommitdiffstats
path: root/configdata.pm.in
diff options
context:
space:
mode:
authorPaul Louvel <[email protected]>2026-01-23 14:22:55 +0100
committerTomas Mraz <[email protected]>2026-03-13 16:52:12 +0100
commit8c547ec7e14e2bd988e599ff47578397d5aa6183 (patch)
treec4203d23e6bdb8e682bca1d10af516edccc0a520 /configdata.pm.in
parentAdded all the disabled algos/protocols into the output of list -disabled (diff)
downloadopenssl-8c547ec7e14e2bd988e599ff47578397d5aa6183.tar.gz
openssl-8c547ec7e14e2bd988e599ff47578397d5aa6183.zip
feat: Disabled features are generated during configure automatically
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Paul Dale <[email protected]> MergeDate: Fri Mar 13 15:50:43 2026 (Merged from https://github.com/openssl/openssl/pull/30212)
Diffstat (limited to 'configdata.pm.in')
-rw-r--r--configdata.pm.in105
1 files changed, 63 insertions, 42 deletions
diff --git a/configdata.pm.in b/configdata.pm.in
index fea6004d6c9..a21fe686d96 100644
--- a/configdata.pm.in
+++ b/configdata.pm.in
@@ -151,55 +151,75 @@ _____
or die "Trying to rename $buildfile.new to $buildfile: $!";
print 'Created ',$buildfile,"\n";
+ my $create_configuration = sub {
+ my ($configuration_file, $configuration_file_in) = @_;
+
+ open CONFIGURATION, ">${configuration_file}.new"
+ or die "Trying to create ${configuration_file_in}.new: $!";
+ $tmpl = OpenSSL::Template->new(TYPE => 'FILE',
+ SOURCE => $configuration_file_in);
+ $tmpl->fill_in(FILENAME => $_,
+ OUTPUT => \*CONFIGURATION,
+ HASH => \%gendata,
+ PREPEND => $prepend,
+ # To ensure that global variables and functions
+ # defined in one template stick around for the
+ # next, making them combinable
+ PACKAGE => 'OpenSSL::safe')
+ or die $OpenSSL::Template::ERROR;
+ close CONFIGURATION;
+ };
+
+ my $update_configuration = sub {
+ # When using stat() on Windows, we can get it to perform better by
+ # avoid some data. This doesn't affect the mtime field, so we're not
+ # losing anything...
+ ${^WIN32_SLOPPY_STAT} = 1;
+
+ my ($configuration_file, $configuration_file_in) = @_;
+ my $update_configuration_file = 0;
+
+ if (-f $configuration_file) {
+ my $configuration_file_mtime = (stat($configuration_file))[9];
+ my $configuration_file_in_mtime = (stat($configuration_file_in))[9];
+
+ # If configuration.h.in was updated after the last configuration.h,
+ # or if configuration.h.new differs configuration.h, we update
+ # configuration.h
+ if ($configuration_file_mtime < $configuration_file_in_mtime
+ || compare_text("${configuration_file}.new", $configuration_file) != 0) {
+ $update_configuration_file = 1;
+ } else {
+ # If nothing has changed, let's just drop the new one and
+ # pretend like nothing happened
+ unlink "${configuration_file}.new"
+ }
+ } else {
+ $update_configuration_file = 1;
+ }
+
+ if ($update_configuration_file) {
+ rename("${configuration_file}.new", $configuration_file)
+ or die "Trying to rename ${configuration_file}.new to $configuration_file: $!";
+ print 'Created ',$configuration_file,"\n";
+ }
+ };
+
my $configuration_h =
catfile('include', 'openssl', 'configuration.h');
my $configuration_h_in =
catfile($config{sourcedir}, 'include', 'openssl', 'configuration.h.in');
- open CONFIGURATION_H, ">${configuration_h}.new"
- or die "Trying to create ${configuration_h}.new: $!";
- $tmpl = OpenSSL::Template->new(TYPE => 'FILE',
- SOURCE => $configuration_h_in);
- $tmpl->fill_in(FILENAME => $_,
- OUTPUT => \*CONFIGURATION_H,
- HASH => \%gendata,
- PREPEND => $prepend,
- # To ensure that global variables and functions
- # defined in one template stick around for the
- # next, making them combinable
- PACKAGE => 'OpenSSL::safe')
- or die $OpenSSL::Template::ERROR;
- close CONFIGURATION_H;
- # When using stat() on Windows, we can get it to perform better by
- # avoid some data. This doesn't affect the mtime field, so we're not
- # losing anything...
- ${^WIN32_SLOPPY_STAT} = 1;
+ my $apps_configuration_h =
+ catfile('apps', 'include', 'configuration.h');
+ my $apps_configuration_h_in =
+ catfile($config{sourcedir}, 'apps', 'include', 'configuration.h.in');
- my $update_configuration_h = 0;
- if (-f $configuration_h) {
- my $configuration_h_mtime = (stat($configuration_h))[9];
- my $configuration_h_in_mtime = (stat($configuration_h_in))[9];
+ $create_configuration->($configuration_h, $configuration_h_in);
+ $update_configuration->($configuration_h, $configuration_h_in);
- # If configuration.h.in was updated after the last configuration.h,
- # or if configuration.h.new differs configuration.h, we update
- # configuration.h
- if ($configuration_h_mtime < $configuration_h_in_mtime
- || compare_text("${configuration_h}.new", $configuration_h) != 0) {
- $update_configuration_h = 1;
- } else {
- # If nothing has changed, let's just drop the new one and
- # pretend like nothing happened
- unlink "${configuration_h}.new"
- }
- } else {
- $update_configuration_h = 1;
- }
-
- if ($update_configuration_h) {
- rename("${configuration_h}.new", $configuration_h)
- or die "Trying to rename ${configuration_h}.new to $configuration_h: $!";
- print 'Created ',$configuration_h,"\n";
- }
+ $create_configuration->($apps_configuration_h, $apps_configuration_h_in);
+ $update_configuration->($apps_configuration_h, $apps_configuration_h_in);
exit(0);
}
@@ -485,3 +505,4 @@ Verbose output.
=cut
EOF
+#define PRINT_ENABLED(type)