Skip to content
Configure 64.5 KiB
Newer Older
	    my @sequence = (
		"cc",
		"cflags",
		"debug-cflags",
		"nodebug-cflags",
		"unistd",
		"thread_cflag",
		"sys_id",
		"lflags",
		"debug-lflags",
		"nodebug-lflags",
		"bn_ops",
		"cpuid_obj",
		"bn_obj",
		"ec_obj",
		"des_obj",
		"aes_obj",
		"bf_obj",
		"md5_obj",
		"sha1_obj",
		"cast_obj",
		"rc4_obj",
		"rmd160_obj",
		"rc5_obj",
		"wp_obj",
		"cmll_obj",
		"modes_obj",
		"engines_obj",
		"perlasm_scheme",
		"dso_scheme",
		"shared_target",
		"shared_cflag",
		"shared_ldflag",
		"shared_extension",
		"ranlib",
		"arflags",
		"multilib",
		);
	    my $largest =
		length((sort { length($a) <=> length($b) } @sequence)[-1]);
	    print "    '$target' => {\n";
	    foreach (@sequence) {
		if ($table{$target}->{$_}) {
		    print "      '",$_,"'"," " x ($largest - length($_))," => '",$table{$target}->{$_},"',\n";
		}
	    }
	    print "    },\n";
	}

sub test_sanity
	{
	my $errorcnt = 0;

	print STDERR "=" x 70, "\n";
	print STDERR "=== SANITY TESTING!\n";
	print STDERR "=== No configuration will be done, all other arguments will be ignored!\n";
	print STDERR "=" x 70, "\n";

	foreach $target (sort keys %table)
		{
		my $pre_dso_scheme = "perlasm_scheme";
		my $dso_scheme = "dso_scheme";
		my $post_dso_scheme = "shared_target";

		if ($table{$target}->{$pre_dso_scheme} =~ /^(beos|dl|dlfcn|win32|vms)$/)
			print STDERR "SANITY ERROR: '$target' has the dso_scheme values\n";
			print STDERR "              in the previous field\n";
			}
		elsif ($table{$target}->{$post_dso_scheme} =~ /^(beos|dl|dlfcn|win32|vms)$/)
			print STDERR "SANITY ERROR: '$target' has the dso_scheme values\n";
			print STDERR "              in the following field\n";
			}
		elsif ($table{$target}->{$dso_scheme} !~ /^(beos|dl|dlfcn|win32|vms|)$/)
			print STDERR "SANITY ERROR: '$target' has the dso_scheme field = ",$table{$target}->{$dso_scheme},"\n";
			print STDERR "              valid values are 'beos', 'dl', 'dlfcn', 'win32' and 'vms'\n";
	print STDERR "No sanity errors detected!\n" if $errorcnt == 0;