summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-20 20:53:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-20 20:53:24 +0000
commit2a0f1441efe2cc7a8387e68f474741d9c48572ba (patch)
tree5f22b3cb549ec902701ed670873df9042c403545
parentcf7c73ec7f8a398f87aac91b5534c0ec8f03e915 (diff)
Improve this a lot
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7783 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-xconfigure33
1 files changed, 23 insertions, 10 deletions
diff --git a/configure b/configure
index 3074c8e28..90bfcd0b5 100755
--- a/configure
+++ b/configure
@@ -549,6 +549,28 @@ if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPE
$config{HAS_OPENSSL} = "n";
}
+printf "Checking if you are running an ancient, unsupported OS... ";
+if ($config{OSNAME} =~ /FreeBSD/i)
+{
+ $version = `uname -r`;
+ if ($version =~ /^4\./)
+ {
+ # ICKY ICKY ICK, FREEBSD 4.x! GET AN UPGRADE!
+ $config{CRAQ} = "-L/usr/local/lib -lgnugetopt -DHAVE_DECL_GETOPT=1";
+ print "yes\n";
+ }
+ else
+ {
+ $config{CRAQ} = " ";
+ print "no ($version)\n";
+ }
+}
+else
+{
+ $config{CRAQ} = " ";
+ print "no ($config{OSNAME})\n";
+}
+
################################################################################
# BEGIN INTERACTIVE PART #
################################################################################
@@ -1312,16 +1334,7 @@ sub write_dynamic_makefile {
$se = "socketengine_ports";
}
- if ($config{OSNAME} =~ /freebsd/i)
- {
- print "Ick, you are running FreeBSD 4.x. Enabling workaround. Get an upgrade.\n";
- $version = `uname -r`;
- if ($version =~ /^4\./)
- {
- # ICKY ICKY ICK, FREEBSD 4.x! GET AN UPGRADE!
- $freebsd4libs = "-L/usr/local/lib -lgnugetopt -DHAVE_DECL_GETOPT=1";
- }
- }
+ $freebsd4libs = $config{CRAQ};
open(FH,">src/Makefile") or die("Could not write src/Makefile");
print FH <<EOM;