X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=21e283ef85fe2336fd2a862f4ef0b4088a984094;hb=3765c691250be52032943c152c2f4fe524686ae8;hp=2948e0b40a67461de3ce24c143732267c0bc089c;hpb=d697fa15cea6d175b423887ce56e6f2bb09d00e9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index 2948e0b40..21e283ef8 100755 --- a/configure +++ b/configure @@ -483,14 +483,96 @@ sub svnupdate open(FH,"<.svn/entries") or $fail = 1; if ($fail) { print "This is not an SVN copy of InspIRCd.\n"; - exit; + exit 1; } else { close(FH); } - system("svn update"); - system("perl configure -update"); + open my $fd, "-|", "svn update"; + my $configurechanged = 0; # Needs ./configure -update + my $coredirchanged = 0; # Needs ./configure -update + my $moduledirchanged = 0; # Needs ./configure -modupdate + my $rootincchanged = 0; + my @conflicted = (); + while (defined(my $line = <$fd>)) + { + my ($action, $file); + print $line; + $line =~ m/^([ADUCG])\s+(.*)$/ or next; + ($action, $file) = ($1, $2); + if ($action eq "C") + { + push @conflicted, $file; + if ($file eq "configure") + { + $configurechanged = 1; + } + elsif ($file =~ m#^src/modules#) + { + $moduledirchanged = 1; + } + elsif ($file =~ m#^src/#) + { + $coredirchanged = 1; + } + elsif ($file =~ m/^\..*\.inc$/) + { + $rootincchanged = 1; + } + } + elsif ($action eq "U" || $action eq "G") + { + if ($file eq "configure") + { + $configurechanged = 1; + } + elsif ($file =~ m/^\..*\.inc$/) + { + $rootincchanged = 1; + } + } + elsif ($action eq "A" || $action eq "D") + { + if ($file =~ m#^src/modules#) + { + $moduledirchanged = 1; + } + elsif ($file =~ m#^src/#) + { + $coredirchanged = 1; + } + } + } + unless (close $fd) # close() waits for exit and returns false if the command failed + { + if ($! == 0) + { + print STDERR "Problem updating from SVN, please check above for errors\n"; + } + else + { + print STDERR "Failed to run SVN: $!\n"; + } + exit 1; + } + if (scalar(@conflicted) > 0) + { + print STDERR "\e[0;33;1mERROR:\e[0m You have local modifications which conflicted with the updates from SVN\n"; + printf STDERR "Configure is not able to complete the update. Please resolve these conflicts, then run ./configure -%supdate", (($coredirchanged || $configurechanged) ? "" : "mod"); + } + if ($configurechanged || $coredirchanged) + { + system("perl configure -update"); + } + elsif ($moduledirchanged || $rootincchanged) + { + system("perl configure -modupdate"); + } + else + { + print "No need to update Makefiles.\n"; + } if (defined $opt_rebuild) { system("make install"); } @@ -938,10 +1020,10 @@ makecache(); print "\n\n"; print "To build your server with these settings, please type '\e[1;32m$config{MAKEPROG}\e[0m' now.\n"; if (($config{USE_GNUTLS} eq "y") || ($config{USE_OPENSSL} eq "y")) { - print "Please remember that to enable \e[1;32mSSL support\e[0m you must\n"; - print "load the required modules in your config. This configure process\n"; - print "has just prepared these modules to be compiled for you, and has not\n"; - print "configured them to be compiled into the core of the ircd.\n"; + print "Please note: for \e[1;32mSSL support\e[0m you will need to load required\n"; + print "modules in your config. This configure script has added those modules to the\n"; + print "build process. For more info please refer to:\n"; + print "\e[1;32mhttp://www.inspircd.org/wiki/Installation_From_Tarball\e[0m\n"; } print "*** \e[1;32mRemember to edit your configuration files!!!\e[0m ***\n\n\n"; if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) { @@ -1153,6 +1235,7 @@ sub writefiles { #define OPTIMISATION $config{OPTIMITEMP} #define LIBRARYDIR "$config{LIBRARY_DIR}" #define SYSTEM "$incos" + EOF print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n"; @@ -1199,7 +1282,7 @@ print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n"; print FILEHANDLE "#define USE_SELECT\n"; $se = "socketengine_select"; } - print FILEHANDLE "\n#endif\n"; + print FILEHANDLE "\n#include \"threadengines/threadengine_pthread.h\"\n\n#endif\n"; close(FILEHANDLE); } @@ -1593,7 +1676,6 @@ sub write_dynamic_makefile my $all = "all: "; my $all_libsonly = ""; - my $libraryext = ""; my $othercrap = ""; my $RPATH = ""; @@ -1714,17 +1796,10 @@ ITEM foreach my $cmd (@cmdlist) { print FH <