X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=a13f59c8135372c9a246135c0b989e4ff5ca4353;hb=e7310ca2f66d2e267efc62deca53a8b534bdd0eb;hp=99aed83961fde53fd1230031631f406cb5aa45a0;hpb=aaff4676438299c3bb2de08f85d626b69d99fc8d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index 99aed8396..a13f59c81 100755 --- a/configure +++ b/configure @@ -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, @@ -352,7 +353,7 @@ getmodules(); sub clean { - system("rm -rf .config.cache"); + unlink(".config.cache"); } sub update @@ -368,7 +369,7 @@ sub update exit 0; } else { # We've Loaded the cache file and all our variables.. - print "Updating Files..\n"; + print "Updating files...\n"; getosflags(); if ($opt_disable_debug == 1) { @@ -405,7 +406,7 @@ sub modupdate exit 0; } else { # We've Loaded the cache file and all our variables.. - print "Updating Files..\n"; + print "Updating files...\n"; getosflags(); $has_epoll = $config{HAS_EPOLL}; $has_ports = $config{HAS_PORTS}; @@ -593,7 +594,7 @@ $config{HAS_EPOLL} = $has_epoll; $config{HAS_KQUEUE} = $has_kqueue; printf "Checking for libgnutls... "; -if (($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS} >= 1.2) || ($config{HAS_GNUTLS} eq "y"))) { +if (($config{HAS_GNUTLS}) || ($config{HAS_GNUTLS} eq "y")) { print "yes\n"; $config{HAS_GNUTLS} = "y"; } else { @@ -602,7 +603,7 @@ if (($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS} >= 1.2) || ($config{HAS_GNUTL } printf "Checking for openssl... "; -if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPENSSL} eq "y"))) { +if (($config{HAS_OPENSSL}) || ($config{HAS_OPENSSL} eq "y")) { print "yes\n"; $config{HAS_OPENSSL} = "y"; } else { @@ -1009,8 +1010,8 @@ sub getosflags { $config{LDLIBS} = "-lstdc++"; $config{FLAGS} = "-fPIC -Wall -pedantic $config{OPTIMISATI}"; - $config{DEVELOPER} = "-fPIC -Wall -std=c99 -pedantic -g"; - $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared"; + $config{DEVELOPER} = "-fPIC -Wall -pedantic -g"; + $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared" unless defined $opt_disablerpath; $config{MAKEPROG} = "make"; if ($config{OSNAME} =~ /darwin/i) { @@ -1475,12 +1476,12 @@ sub write_dynamic_makefile if ($name =~ /\.cpp$/) { open (CPP, "<$dir/$name") or die("Can't open $dir/$name to scan it! oh bugger"); + print "."; while (chomp($line = )) - { + { if ($line =~ /\/\* \$Core: (\w+) \*\//i) { $filelist{$name} = $1; - print "."; } elsif ($line =~ /\/\* \$ExtraDeps: (.*?) \*\//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}))