X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=41539016711ecdd8c37103fa070e8049b43eaec1;hb=74d823b2a290896394106004cb58fcf009c53dac;hp=3b8b2ee1f98a55e8c4433df310ace6dc6a009733;hpb=41471dee973c34bffa59086440b5af40a02f2bb0;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index 3b8b2ee1f..415390167 100755 --- a/configure +++ b/configure @@ -248,26 +248,29 @@ Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos), fdmax: $c $config{CHANGE_COMPILER} = "n"; print "I have detected the following compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.$config{GCC34}\033[0m)\n"; -if ($config{GCCVER} < 3) { +while (($config{GCCVER} < 3) || ($config{GCCVER} eq "")) { print "\033[1;32mIMPORTANT!\033[0m A GCC 2.x compiler has been detected, and -should NOT be used. You should probably specify a newer compiler.\n"; -} -yesno(CHANGE_COMPILER,"Do you want to change the compiler?"); -if ($config{CHANGE_COMPILER} =~ /y/i) { - print "What command do you want to use to invoke your compiler?\n"; - print "[\033[1;32m$config{CC}\033[0m] -> "; - chomp($config{CC} = ); - if ($config{CC} eq "") { - $config{CC} = "g++"; - } - chomp($foo = `$config{CC} -dumpversion | cut -c 1`); - if ($foo ne "") { - chomp($config{GCCVER} = `$config{CC} -dumpversion | cut -c 1`); # we must redo these if we change - chomp($config{GCC34} = `$config{CC} -dumpversion | cut -c 3`); # the compiler path - print "Queried compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.$config{GCC34}\033[0m)\n"; - } - else { - print "\033[1;32mWARNING!\033[0m Could not execute the compiler you specified. You may want to try again.\n"; +should NOT be used. You should probably specify a newer compiler.\n\n"; + yesno(CHANGE_COMPILER,"Do you want to change the compiler?"); + if ($config{CHANGE_COMPILER} =~ /y/i) { + print "What command do you want to use to invoke your compiler?\n"; + print "[\033[1;32m$config{CC}\033[0m] -> "; + chomp($config{CC} = ); + if ($config{CC} eq "") { + $config{CC} = "g++"; + } + chomp($foo = `$config{CC} -dumpversion | cut -c 1`); + if ($foo ne "") { + chomp($config{GCCVER} = `$config{CC} -dumpversion | cut -c 1`); # we must redo these if we change + chomp($config{GCC34} = `$config{CC} -dumpversion | cut -c 3`); # the compiler path + print "Queried compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.$config{GCC34}\033[0m)\n"; + if ($config{GCCVER} < 3) { + print "\033[1;32mGCC 2.x WILL NOT WORK!\033[0m. Let's try that again, shall we?\n"; + } + } + else { + print "\033[1;32mWARNING!\033[0m Could not execute the compiler you specified. You may want to try again.\n"; + } } } @@ -623,9 +626,9 @@ if ($config{USE_GNUTLS} eq "y") { close(TMP); if ($failed) { print "Symlinking src/modules/m_ssl_gnutls.cpp from extra/\n"; - system("cd src/modules"); + chdir("src/modules"); system("ln -s extra/m_ssl_gnutls.cpp"); - system("cd ../.."); + chdir("../.."); } getmodules(); $failed = 0; @@ -657,9 +660,9 @@ if ($config{USE_GNUTLS} eq "y") { close(TMP); if ($failed) { print "Symlinking src/modules/m_ssl_openssl.cpp from extra/\n"; - system("cd src/modules"); + chdir("src/modules"); system("ln -s extra/m_ssl_openssl.cpp"); - system("cd ../.."); + chdir("../.."); } getmodules(); $failed = 0;