Skip to content
Configure 47.5 KiB
Newer Older
	    &dofile("apps/der_chop",$perl,'^#!/', '#!%s');
	    &dofile("apps/CA.pl",$perl,'^#!/', '#!%s');
	} else {
	    # No path for Perl known ...
	    &dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
	    &dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
	    &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
Configured for $target.

print <<\EOF if (!$no_threads && !$threads);

The library could not be configured for supporting multi-threaded
applications as the compiler options required on this system are not known.
See file INSTALL for details if you need multi-threading.
	print STDERR "\npick os/compiler from:\n";
	foreach $i (sort keys %table)
		$k += length($i) + 1;
		if ($k > 78)
			{
			print STDERR "\n";
			$k=length($i);
			}
		print STDERR $i . " ";
		}
	foreach $i (sort keys %table)
		{
		next if $i !~ /^debug/;
		$k += length($i) + 1;
		if ($k > 78)
			{
			print STDERR "\n";
			$k=length($i);
			}
		print STDERR $i . " ";
	print STDERR "\n\nNOTE: If in doubt, on Unix-ish systems use './config'.\n";
sub which
	{
	my($name)=@_;
	my $path;
	foreach $path (split /:/, $ENV{PATH})
		{
		if (-f "$path/$name" and -x _)
			return "$path/$name" unless ($name eq "perl" and
			 system("$path/$name -e " . '\'exit($]<5.0);\''));
sub dofile
	{
	my $f; my $p; my %m; my @a; my $k; my $ff;
	($f,$p,%m)=@_;

	open(IN,"<$f.in") || open(IN,"<$f") || die "unable to open $f:$!\n";
	@a=<IN>;
	close(IN);
	foreach $k (keys %m)
		{
		grep(/$k/ && ($_=sprintf($m{$k}."\n",$p)),@a);
		}
Bodo Möller's avatar
Bodo Möller committed
	open(OUT,">$f.new") || die "unable to open $f.new:$!\n";
Bodo Möller's avatar
Bodo Möller committed
	rename($f,"$f.bak") || die "unable to rename $f\n" if -e $f;
	rename("$f.new",$f) || die "unable to rename $f.new\n";

sub print_table_entry
	{
	my $target = shift;

	(my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,
	my $bn_obj,my $des_obj,my $bf_obj,
	my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
	my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag)=
	split(/\s*:\s*/,$table{$target} . ":" x 22 , -1);
			
	print <<EOF

*** $target
\$cc           = $cc
\$cflags       = $cflags
\$thread_cflag = $thread_cflag
\$lflags       = $lflags
\$bn_ops       = $bn_ops
\$bn_obj       = $bn_obj
\$des_obj      = $des_obj
\$bf_obj       = $bf_obj
\$md5_obj      = $md5_obj
\$sha1_obj     = $sha1_obj
\$cast_obj     = $cast_obj
\$rc4_obj      = $rc4_obj
\$rmd160_obj   = $rmd160_obj
\$rc5_obj      = $rc5_obj
\$shared_target= $shared_target
\$shared_cflag = $shared_cflag