diff --git a/configure b/configure index 7a052ff5b..944513d7d 100755 --- a/configure +++ b/configure @@ -54,6 +54,7 @@ GetOptions ( 'module-dir=s' => \$opt_module_dir, 'binary-dir=s' => \$opt_binary_dir, 'library-dir=s' => \$opt_library_dir, + 'disable-rpath=i' => \$opt_disable_rpath, 'disable-debuginfo' => sub { $opt_disable_debug = 1 }, 'help' => sub { showhelp(); }, 'modupdate' => sub { modupdate(); }, @@ -94,6 +95,7 @@ my $non_interactive = ( (defined $opt_noepoll) || (defined $opt_noports) || (defined $opt_maxbuf) || + (defined $opt_disable_rpath) || (defined $opt_use_gnutls) ); my $interactive = !$non_interactive; @@ -964,7 +966,14 @@ sub getosflags { $config{LDLIBS} = "-lstdc++"; $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}"; $config{DEVELOPER} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated -g"; - $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared"; + if (defined $opt_disable_rpath) + { + $SHARED = "-shared"; + } + else + { + $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared"; + } $config{MAKEPROG} = "make"; if ($config{OSNAME} =~ /darwin/i) { @@ -1789,100 +1798,109 @@ EOM } else { + if ($opt_disable_rpath) + { + $RPATH = ""; + } + else + { + $RPATH = "-Wl,--rpath -Wl,$config{LIBRARY_DIR}"; + } + print FH <