Skip to content

Commit

Permalink
Makefile now confirms location of Apache and PostgreSQL to allow for …
Browse files Browse the repository at this point in the history
…systems with multiple versions of each available.
  • Loading branch information
samtregar committed Jul 23, 2002
1 parent 16e28e1 commit 8092c46
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 10 deletions.
55 changes: 45 additions & 10 deletions inst/required.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ =head1 NAME
=head1 VERSION
$Revision: 1.6 $
$Revision: 1.7 $
=head1 DATE
$Date: 2002-07-06 23:18:50 $
$Date: 2002-07-23 20:16:35 $
=head1 DESCRIPTION
Expand Down Expand Up @@ -111,10 +111,25 @@ sub find_pg {
last;
}
}
return soft_fail("Failed to find pg_config. Looked in:",
map { "\n\t$_" } @paths) unless $REQ{PG_CONFIG};
print "Found pg_config at $REQ{PG_CONFIG}.\n";


# confirm or deny
if ($REQ{PG_CONFIG}) {
print "Found PostgreSQL's pg_config at '$REQ{PG_CONFIG}'.\n";
unless (ask_yesno("Is this correct? [yes] ", 1)) {
ask_confirm("Enter path to pg_config", \$REQ{PG_CONFIG});
}
} else {
print "Failed to find pg_config.\n";
if (ask_yesno("Do you want to provide a path to pg_config? [no] ",
0)) {
$REQ{PG_CONFIG} = 'NONE';
ask_confirm("Enter path to pg_config", \$REQ{PG_CONFIG});
} else {
return soft_fail("Failed to find pg_config. Looked in:",
map { "\n\t$_" } @paths);
}
}

# check version
my $version = `$REQ{PG_CONFIG} --version`;
return soft_fail("Failed to find PostgreSQL version with ",
Expand Down Expand Up @@ -158,10 +173,30 @@ sub find_apache {
}
}
}
return soft_fail("Failed to find Apache executable. Looked for ",
join(', ', @exe),
" in:",
map { "\n\t$_" } @paths) unless $REQ{APACHE_EXE};

# confirm or deny
if ($REQ{APACHE_EXE}) {
print "Found Apache server binary at '$REQ{APACHE_EXE}'.\n";
unless (ask_yesno("Is this correct? [yes] ", 1)) {
ask_confirm("Enter path to Apache server binary",
\$REQ{APACHE_EXE});
}
} else {
print "Failed to find Apache server binary.\n";
if (ask_yesno("Do you want to provide a path to the Apache server " .
"binary? [no] ",
0)) {
$REQ{APACHE_EXE} = 'NONE';
ask_confirm("Enter path to Apache server binary",
\$REQ{APACHE_EXE});
} else {
return soft_fail("Failed to find Apache executable. Looked for ",
join(', ', @exe),
" in:",
map { "\n\t$_" } @paths);
}
}

print "Found Apache executable at $REQ{APACHE_EXE}.\n";


Expand Down
5 changes: 5 additions & 0 deletions lib/Bric/Changes.pod
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ rather than name. [David]
Vastly improved the speed at which categories can be imported via SOAP.
[David]

=item *

Makefile now confirms location of Apache and PostgreSQL to allow for
systems with multiple versions of each available. [Sam]

=back

=head2 Bug Fixes
Expand Down

0 comments on commit 8092c46

Please sign in to comment.