From 75d72cb832f41c08b0f299e61ed6994b115cb7b7 Mon Sep 17 00:00:00 2001 From: om Date: Thu, 10 Aug 2006 15:04:10 +0000 Subject: Add a few tidbits for MinGW, check for C:\ style paths as well as just beginning with '/' when determining if a path is absolute (only check if OSTYPE = MINGW32) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4834 e03df62e-2008-0410-955e-edbf42e46eb7 --- configure | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/configure b/configure index f5f4d38c5..aa004f4f2 100755 --- a/configure +++ b/configure @@ -72,15 +72,22 @@ if ($config{GCCVER} eq "") { # Keep my dynamic module experiments here for later # concideration! -if ($config{OSNAME} =~ /CYGWIN/) { +if ($config{OSNAME} =~ /CYGWIN/) +{ $config{OSNAME} = "CYG-STATIC"; } - -if ((!$config{OSNAME}) || ($config{OSNAME} eq "")) { +elsif($config{OSNAME} =~ /^MINGW32/) +{ + $config{OSNAME} = "MINGW32"; +} +elsif ((!$config{OSNAME}) || ($config{OSNAME} eq "")) +{ chomp($config{OSNAME} = `/usr/bin/uname`); - if ((!$config{OSNAME}) || ($config{OSNAME} eq "")){ + + if((!$config{OSNAME}) || ($config{OSNAME} eq "")) + { $config{OSNAME} = "Unknown"; - } + } } if (!$config{MAX_CLIENT_T}) { @@ -830,17 +837,20 @@ sub dir_check { # Convert it to a full path.. $var = resolve_directory($ENV{HOME} . "/" . $1); } - if (substr($var,0,1) ne "/") + elsif ((($config{OSNAME} == "MINGW32") and ($var !~ /^[A-Z]{1}:\\.*/)) and (substr($var,0,1) ne "/")) { # Assume relative Path was given.. fill in the rest. $var = $this . "/$var"; } + $var = resolve_directory($var); if (! -e $var) { print "$var does not exist. Create it?\n[\033[1;32my\033[0m] "; chomp($tmp = ); if (($tmp eq "") || ($tmp =~ /^y/i)) { # Attempt to Create the Dir.. + + print("mkdir -p \"$var\" >> /dev/null 2>&1"); $chk = system("mkdir -p \"$var\" >> /dev/null 2>&1") / 256; if ($chk != 0) { print "Unable to create directory. ($var)\n\n"; @@ -944,6 +954,7 @@ sub getrevision { return "0"; } my $data = `svn info`; + if ($data eq "") { $no_svn = 1; $rev = "0"; -- cgit v1.2.3