X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=a13f59c8135372c9a246135c0b989e4ff5ca4353;hb=f059ceea21e2d8e421080e8a9f7dce7dbaa69da8;hp=889667f0301623e836979f6754b5184d6a77ba69;hpb=a9d2342f6af5d9e1fb2a6e42d71493300c0c39f9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index 889667f03..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) { @@ -1514,6 +1515,7 @@ sub write_dynamic_makefile { if (!exists($existing_install_list{$1})) { + $existing_install_list{$1} = 1; $idir = (split(' ',$1))[1]; $ifile = (split(' ',$1))[0]; $install_list = $install_list . " -install -m \$(INSTMODE) $1\n"; @@ -1525,9 +1527,10 @@ sub write_dynamic_makefile { if (!exists($existing_install_list{$1})) { + $existing_install_list{$1} = 1; $idir = (split(' ',$1))[1]; $ifile = (split(' ',$1))[0]; - $install_list = $install_list . " -cp $1\n" if (!exists($existing_install_list{$1})); + $install_list = $install_list . " -cp $1\n"; $ifile =~ s/.*\///g; $uninstall_list = $uninstall_list . " -rm $idir/$ifile\n"; } @@ -1553,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) @@ -1603,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}))