From 0c94779a6ebfc8369fc057e36fa02cd481748552 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 30 May 2005 23:26:01 +0000 Subject: Updated to allow users to specify their compiler by hand git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1573 e03df62e-2008-0410-955e-edbf42e46eb7 --- configure | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'configure') diff --git a/configure b/configure index fa3801ff0..71f72d697 100755 --- a/configure +++ b/configure @@ -186,6 +186,30 @@ dir, otherwise you won't have a config file! Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos), fdmax: $config{MAX_CLIENT_T}\n\n"; +$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"; + +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"; + } +} + +print "\n"; + # Directory Settings.. dir_check("are the configuration files", "CONFIG_DIR"); dir_check("are the modules to be compiled to", "MODULE_DIR"); -- cgit v1.2.3