diff options
-rwxr-xr-x | configure | 15 | ||||
-rw-r--r-- | make/configure.pm | 2 | ||||
-rw-r--r-- | make/utilities.pm | 2 |
3 files changed, 15 insertions, 4 deletions
@@ -98,6 +98,7 @@ GetOptions ( 'disable-ports' => \$opt_noports, 'disable-epoll' => \$opt_noepoll, 'disable-kqueue' => \$opt_nokqueue, + 'disable-rpath' => \$opt_disablerpath, 'enable-ipv6' => \$opt_ipv6, 'enable-remote-ipv6' => \$opt_ipv6links, 'disable-remote-ipv6' => \$opt_noipv6links, @@ -1010,7 +1011,7 @@ sub getosflags { $config{LDLIBS} = "-lstdc++"; $config{FLAGS} = "-fPIC -Wall -pedantic $config{OPTIMISATI}"; $config{DEVELOPER} = "-fPIC -Wall -pedantic -g"; - $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared"; + $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared" unless defined $opt_disablerpath; $config{MAKEPROG} = "make"; if ($config{OSNAME} =~ /darwin/i) { @@ -1555,7 +1556,8 @@ sub write_dynamic_makefile else { $libraryext = "so"; - $othercrap = " \$(CC) -pipe -I../include -Wl,--rpath -Wl,$config{LIBRARY_DIR} \$(FLAGS) $freebsd4libs -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) "; + $RPATH = "-Wl,--rpath -Wl,$config{LIBRARY_DIR}" unless defined $opt_disablerpath; + $othercrap = " \$(CC) -pipe -I../include $RPATH \$(FLAGS) $freebsd4libs -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) "; } foreach my $cpp (sort keys %filelist) @@ -1605,7 +1607,14 @@ EOM } else { - $libcrap = "-Wl,--rpath -Wl," . $config{LIBRARY_DIR} . " -shared"; + if (defined $opt_disablerpath) + { + $libcrap = " -shared"; + } + else + { + $libcrap = "-Wl,--rpath -Wl," . $config{LIBRARY_DIR} . " -shared"; + } } $deps = calcdeps("src/$cpp"); if (exists($extrasources{$cpp})) diff --git a/make/configure.pm b/make/configure.pm index 9e9503c16..d244a49d5 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -238,6 +238,8 @@ InspIRCd 1.0.x, are also allowed. --disable-interactive Sets no options intself, but will disable any interactive prompting. + --disable-rpath Disable runtime paths. DO NOT USE UNLESS + YOU KNOW WHAT YOU ARE DOING! --update Update makefiles and dependencies --modupdate Detect new modules and write makefiles --svnupdate {--rebuild} Update working copy via subversion diff --git a/make/utilities.pm b/make/utilities.pm index 792fd035b..c3909c1e4 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -71,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; |