use Config; use ExtUtils::MakeMaker qw(prompt WriteMakefile); use File::Path; require 5.8.0; my $choice; while (!$choice) { $reply = prompt( "\nWhat do you want to build?\n\n" . " 1) Interface to Ace socket server and local databases (pure Perl)\n" . " 2) The above plus XS optimizations (requires C compiler)\n" . " 3) The above plus RPC server interface (requires C compiler)\n\n" . "Enter your choice: ", "1"); if ($reply =~ /(\d+)/) { $choice = $1; die "invalid choice: $choice!" if $choice < 1 || $choice > 3; } } $choice ||= 1; # safe default my @extlib = (); push @extlib,'Freesubs' if $choice >= 2; push @extlib,'RPC' if $choice >= 3; print "\n"; setup_sitedefs() if prompt("Do you want to install Ace::Browser? ","n") =~ /[yY]/; my $headers = "./acelib/wh"; WriteMakefile( 'DISTNAME' => 'AcePerl', 'NAME' => 'Ace', 'VERSION_FROM' => 'Ace.pm', # finds $VERSION 'PMLIBDIRS' => ['GFF','Ace'], 'DIR' => \@extlib, 'DEFINE' => '', 'XSPROTOARG' => '-noprototypes', 'INC' => "-I$headers", PREREQ_PM => { 'Digest::MD5' => 2.0, 'Cache::Cache' => 1.03, }, 'dist' => {'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz', 'ZIP'=>'/usr/bin/zip','ZIPFLAGS'=>'-rl' }, PL_FILES => {'make_docs.PLS' => '.docs', 'util/install.PLS'=>'util/install.pl', 'util/ace.PLS'=>'util/ace.pl', }, EXE_FILES => ['util/ace.pl'], 'clean' => {'FILES' => 'acelib/lib* acelib/*.o acelib/rpcace*.[ch]'}, ); exit 0; sub setup_sitedefs { my ($conf_path,$cgi_path,$html_path); eval 'use Ace::Browser::LocalSiteDefs qw($SITE_DEFS $CGI_PATH $HTML_PATH)'; if ($SITE_DEFS) { print "\n"; print "You have installed Ace::Browser before, using old settings for defaults.\n"; $conf_path = $SITE_DEFS; $cgi_path = $CGI_PATH; $html_path = $HTML_PATH; } $conf_path ||= '/usr/local/apache/conf/ace'; $cgi_path ||= '/usr/local/apache/cgi-bin/ace'; $html_path ||= '/usr/local/apache/htdocs/ace'; get_path("site-specific configuration files",\$conf_path); get_path("acebrowser CGI scripts",\$cgi_path); get_path("acebrowser HTML files and images",\$html_path); open F,">Ace/Browser/LocalSiteDefs.pm" or die "Ace/Browser/LocalSiteDefs.pm: $!"; print F < =head1 AUTHOR Lincoln Stein Copyright (c) 1997-1998 Cold Spring Harbor Laboratory This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty. =cut END close F; eval <