]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/utilities.pm
Snomask stacking: not yet working (crashes), and not quite finished
[user/henk/code/inspircd.git] / make / utilities.pm
index 532c09096a54df7318eec915e25fdf87e669fecd..c3909c1e4019d1e1b0cc8e4def3225918d35026c 100644 (file)
@@ -1,4 +1,19 @@
+#       +------------------------------------+
+#       | Inspire Internet Relay Chat Daemon |
+#       +------------------------------------+
+#
+#  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+# See: http://www.inspircd.org/wiki/index.php/Credits
+#
+# This program is free but copyrighted software; see
+#      the file COPYING for details.
+#
+# ---------------------------------------------------
+
 package make::utilities;
+
+require 5.8.0;
+
 use Exporter 'import';
 use POSIX;
 use Getopt::Long;
@@ -56,7 +71,7 @@ sub make_rpath($;$)
                        print "Adding extra library path to \033[1;32m$module\033[0m ... \033[1;32m$libpath\033[0m\n";
                        $already_added{$libpath} = 1;
                }
-               $output .= "-Wl,--rpath -Wl,$libpath -L$libpath ";
+               $output .= "-Wl,--rpath -Wl,$libpath -L$libpath " unless defined $main::opt_disablerpath;
                $data =~ s/-L(\S+)//;
        }
        return $output;
@@ -306,6 +321,10 @@ sub translate_functions($$)
                        chomp($replace);
                        $line =~ s/exec\("(.+?)"\)/$replace/;
                }
+               while ($line =~ /execruntime\("(.+?)"\)/)
+               {
+                       $line =~ s/execruntime\("(.+?)"\)/`\1`/;
+               }
                while ($line =~ /eval\("(.+?)"\)/)
                {
                        print "Evaluating perl code for module \033[1;32m$module\033[0m ... ";
@@ -353,6 +372,7 @@ sub translate_functions($$)
                while ($line =~ /rpath\("(.+?)"\)/)
                {
                        my $replace = make_rpath($1,$module);
+                       $replace = "" if ($^O =~ /darwin/i);
                        $line =~ s/rpath\("(.+?)"\)/$replace/;
                }
        };