summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-21 10:36:01 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-21 10:36:01 +0000
commitd651aeb61a34e047586806a3db434ac6390aad73 (patch)
treeb67832591f22c8eb76f1769c20478055e57258b4 /configure
parent86941a017cfbc9a6304c2ef597b6036b3a87493a (diff)
Changed $CompileFlags to seperate $CompileFlags and $LinkerFlags
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2595 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 19 insertions, 4 deletions
diff --git a/configure b/configure
index 21d8fb5c4..9cb4d7518 100755
--- a/configure
+++ b/configure
@@ -872,7 +872,8 @@ EOF
# Create a Modules List..
my $modules = "";
- my $flags = "";
+ my $cmflags = "";
+ my $liflags = "";
if ($config{OSNAME} =~ /CYGWIN/) {
open(MODLIST,">include/modlist.h");
print MODLIST <<HEADER;
@@ -892,7 +893,8 @@ HEADER
foreach $i (@modlist)
{
if ($i !~ /_static$/) {
- $flags = getcompilerflags("src/modules/m_".$i.".cpp");
+ $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
+ $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
if ($config{OSNAME} =~ /CYGWIN/) {
print FILEHANDLE <<EOCHEESE;
m_$i.o: m_$i\_static.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h
@@ -918,8 +920,8 @@ EOENT
else {
print FILEHANDLE <<EOCHEESE;
m_$i.so: m_$i.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/inspircd_io.h
- \$(CC) -pipe -I../../include \$(FLAGS) $flags -export-dynamic -c m_$i.cpp
- \$(CC) \$(FLAGS) -shared $flags -o m_$i.so m_$i.o
+ \$(CC) -pipe -I../../include \$(FLAGS) $cmflags -export-dynamic -c m_$i.cpp
+ \$(CC) \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o
\@-rm -f \$(MODPATH)/m_$i.so
cp m_$i.so \$(MODPATH)/
chmod 0700 \$(MODPATH)/m_$i.so
@@ -947,6 +949,19 @@ sub getcompilerflags {
return undef;
}
+sub getlinkerflags {
+ my ($file) = @_;
+ open(FLAGS, $file);
+ while (<FLAGS>) {
+ if ($_ =~ /^\/\* \$LinkerFlags: (.+) \*\/$/) {
+ close(FLAGS);
+ return $1;
+ }
+ }
+ close(FLAGS);
+ return undef;
+}
+
sub show_splash {
print "'\033[1;33m####\033[0m:'\033[1;33m##\033[0m::: \033[1;33m##\033[0m::'\033[1;33m######\033[0m::'\033[1;33m########\033[0m::'\033[1;33m####\033[0m:'\033[1;33m########\033[0m:::'\033[1;33m######\033[0m::'\033[1;33m########\033[0m::\n";
print ". \033[1;33m##\033[0m:: \033[1;33m###\033[0m:: \033[1;33m##\033[0m:'\033[1;33m##\033[0m... \033[1;33m##\033[0m: \033[1;33m##\033[0m.... \033[1;33m##\033[0m:. \033[1;33m##\033[0m:: \033[1;33m##\033[0m.... \033[1;33m##\033[0m:'\033[1;33m##\033[0m... \033[1;33m##\033[0m: \033[1;33m##\033[0m.... \033[1;33m##\033[0m:\n";