+# Licensed under the OpenSSL license (the "License"). You may not use
+# this file except in compliance with the License. You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+use strict;
+use warnings;
+use lib ".";
+use configdata;
+use File::Spec::Functions;
+
+my $versionfile = catfile( $config{sourcedir}, "include/openssl/opensslv.h" );
+
+my ( $ver, $v1, $v2, $v3, $v4, $beta, $version );
+
+open FD, $versionfile or die "Couldn't open include/openssl/opensslv.h: $!\n";
+while (<FD>) {