summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-02 18:02:47 +0000
committeraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-02 18:02:47 +0000
commit0808eb7a9dd3b339f5b37f0ee67c5253ccbc2956 (patch)
treea331c7b9318ac1c5a6fd9e95f2b402dcfbfc5263
parentfb5a23fadcdf947e354657d19b037bb22c3057e9 (diff)
Fix $config{HAS_OPENSSL} winding up undefined and crashing configure if openssl isn't found or otherwise spits garbage for version.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8789 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-xconfigure11
1 files changed, 7 insertions, 4 deletions
diff --git a/configure b/configure
index 09efb51f3..1b28e30a1 100755
--- a/configure
+++ b/configure
@@ -380,8 +380,11 @@ if (defined $opt_away)
$config{MAX_AWAY} = $opt_away;
}
-$config{HAS_OPENSSL} =~ /^([-[:digit:].]+)([a-z])?(\-[a-z][0-9])?$/;
-$config{HAS_OPENSSL} = $1;
+if ($config{HAS_OPENSSL} =~ /^([-[:digit:].]+)([a-z])?(\-[a-z][0-9])?$/) {
+ $config{HAS_OPENSSL} = $1;
+} else {
+ $config{HAS_OPENSSL} = "";
+}
if ($config{GCCVER} eq "") {
print $config{CC} . " was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n";
@@ -643,7 +646,7 @@ $config{HAS_EPOLL} = $has_epoll;
$config{HAS_KQUEUE} = $has_kqueue;
printf "Checking for libgnutls... ";
-if (($config{HAS_GNUTLS}) || ($config{HAS_GNUTLS} eq "y")) {
+if (defined($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS}) || ($config{HAS_GNUTLS} eq "y"))) {
print "yes\n";
$config{HAS_GNUTLS} = "y";
} else {
@@ -652,7 +655,7 @@ if (($config{HAS_GNUTLS}) || ($config{HAS_GNUTLS} eq "y")) {
}
printf "Checking for openssl... ";
-if (($config{HAS_OPENSSL}) || ($config{HAS_OPENSSL} eq "y")) {
+if (defined($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL}) || ($config{HAS_OPENSSL} eq "y"))) {
print "yes\n";
$config{HAS_OPENSSL} = "y";
} else {