--- Makefile.PL.orig	Fri May  2 14:24:41 1997
+++ Makefile.PL	Sun May  4 20:31:33 1997
@@ -18,14 +18,10 @@
 # Check if knwon config
 #
 
-eval 'use Apache::MyConfig' ;
-
-if ($@ eq '') { 
-    $APACHE_SRC_DEFAULT = $Apache::MyConfig::Setup{Apache_Src} ; 
-}
-else {
-    $APACHE_SRC_DEFAULT = '../apache_x.x/src' ;
-}
+opendir( WRKDIR, "$ENV{PORTSDIR}/www/apache/work" ) || die( "Can't open $ENV{PORTSDIR}/www/apache/work: $!\n" );
+( $srcdir ) = grep( /^apache/, readdir( WRKDIR ) );
+closedir( WRKDIR );
+$APACHE_SRC_DEFAULT = "$ENV{PORTSDIR}/www/apache/work/" . $srcdir . "/src";
 
 my $PWD = cwd;
 
@@ -132,7 +128,7 @@
     print "Enter `q' to stop search\n";
     while(1) {
        print "Please tell me where I can find your apache src\n" ; 
-       $src_dir = _prompt "", $APACHE_SRC_DEFAULT;
+       $src_dir = $APACHE_SRC_DEFAULT;
        last if $src_dir eq "q";
 	if(-d $src_dir) {
 	    push(@adirs, $src_dir);
@@ -150,6 +146,7 @@
     $httpd_h = "$adir/httpd.h";
 
     if (-e $httpd_h) {
+	$APACHE_SRC = $APACHE_SRC_DEFAULT;
 	unless($APACHE_SRC) {
 	    $ans = _prompt "Configure mod_perl with $adir ?", "y";
 	    next unless $ans =~ /^y$/i;
@@ -158,7 +155,8 @@
 	$IsBenSSL = -e "$adir/apache_ssl.c";
 	last unless(-e $conf || -e "$conf.tmpl"); #building from 'make offsite-tar' 
 	unless ($NO_HTTPD) {
-	    $ans = _prompt "Shall I build httpd in $adir for you?", "y";
+	    #$ans = _prompt "Shall I build httpd in $adir for you?", "y";
+	    $ans = "y";
 	    ++$NO_HTTPD unless $ans =~ /^y$/i;
 	}
 	last if $NO_HTTPD;
@@ -199,7 +197,7 @@
 		system $^X, "-pi", "-e",  
 		q{next unless /EXTRA_CFLAGS\s*=/;}.
  	        q{next if /mod_perl/; chomp; }.
-		qq{\$_ .= q: -DSERVER_SUBVERSION=\\"mod_perl/$VERSION\\"\n:;},
+		qq{\$_ .= q: \n-DSERVER_SUBVERSION=\\"mod_perl/$VERSION\\" \\\n:;},
 			$conf;
 	    }
 
