From 9a4067dac488d3896afceaf7c12f26ba7723307a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 13 Feb 2008 18:30:38 +0000 Subject: More fixes to configure stability with undefined values/closed filehandles git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8924 e03df62e-2008-0410-955e-edbf42e46eb7 --- make/configure.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'make') diff --git a/make/configure.pm b/make/configure.pm index 41a116df0..42ea206bd 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -87,7 +87,7 @@ sub getcompilerflags { sub getlinkerflags { my ($file) = @_; - open(FLAGS, $file); + open(FLAGS, $file) or return ""; while () { if ($_ =~ /^\/\* \$LinkerFlags: (.+) \*\/$/) { close(FLAGS); @@ -100,7 +100,7 @@ sub getlinkerflags { sub getdependencies { my ($file) = @_; - open(FLAGS, $file); + open(FLAGS, $file) or return ""; while () { if ($_ =~ /^\/\* \$ModDep: (.+) \*\/$/) { close(FLAGS); @@ -113,7 +113,7 @@ sub getdependencies { sub nopedantic { my ($file) = @_; - open(FLAGS, $file); + open(FLAGS, $file) or return ""; while () { if ($_ =~ /^\/\* \$NoPedantic \*\/$/) { close(FLAGS); @@ -128,7 +128,7 @@ sub getmodules { my $i = 0; print "Detecting modules "; - opendir(DIRHANDLE, "src/modules"); + opendir(DIRHANDLE, "src/modules") or die("WTF, missing src/modules!"); foreach my $name (sort readdir(DIRHANDLE)) { if ($name =~ /^m_(.+)\.cpp$/) -- cgit v1.2.3