]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/utilities.pm
Fix this from an experiment I was playing with :p
[user/henk/code/inspircd.git] / make / utilities.pm
index 7a45ebb3e554ce4c7d31a91b19584c5777f65ace..792fd035b3d55d9c003db2033255b57a9ffb6cfd 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;
@@ -198,8 +213,11 @@ sub pkgconfig_check_version($$;$)
                        return 0;
                }
        }
+       # If we didnt find it, we  cant definitively say its too old.
+       # Return ok, and let pkgconflibs() or pkgconfincludes() pick up
+       # the missing library later on.
        print "\033[1;32mNo (not found)\033[0m\n";
-       return 0;
+       return 1;
 }
 
 sub pkgconfig_get_lib_dirs($$$;$)
@@ -303,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 ... ";
@@ -350,6 +372,7 @@ sub translate_functions($$)
                while ($line =~ /rpath\("(.+?)"\)/)
                {
                        my $replace = make_rpath($1,$module);
+                       $replace = "" if ($^O =~ /darwin/i);
                        $line =~ s/rpath\("(.+?)"\)/$replace/;
                }
        };