From afb48300573cf465af31715460c78987ace9b9cf Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 23 Sep 2012 11:14:20 +0200 Subject: [PATCH 1/3] Fix configure with -Werror=unused-variable Signed-off-by: Uli Schlachter --- configure.ac | 4 ++++ m4/ax_pthread.m4 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 43a41c56..bfb95f07 100644 --- a/configure.ac +++ b/configure.ac @@ -224,6 +224,7 @@ if test "x$TDNS" != "xno"; then #include ]], [[ int x = AI_ADDRCONFIG; + (void) x; ]]) ], [ AC_MSG_RESULT([yes]) @@ -280,6 +281,9 @@ if test "x$SSL" != "xno"; then SSL_CTX* ctx = SSL_CTX_new(TLSv1_method()); SSL* ssl = SSL_new(ctx); DH* dh = DH_new(); + DH_free(dh); + SSL_free(ssl); + SSL_CTX_free(ctx); ]]) ], [ AC_MSG_RESULT([yes]) diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 index 2a0447af..5ffcb4b1 100644 --- a/m4/ax_pthread.m4 +++ b/m4/ax_pthread.m4 @@ -274,7 +274,7 @@ if test "x$ax_pthread_ok" = xyes; then AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], ax_cv_PTHREAD_PRIO_INHERIT, [ AC_LINK_IFELSE([ - AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT;]])], + AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT; (void) i;]])], [ax_cv_PTHREAD_PRIO_INHERIT=yes], [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) From 9c14a8603ca9459e5ffa254bb4e22c0ee6050145 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 23 Sep 2012 11:18:53 +0200 Subject: [PATCH 2/3] Fix modperl re-building Make was always rebuilding modperl/ZNC.so because the Makefile was actually describing a file modperl/ZNC."so". Fix this by getting rid of the unnecessary pair of quotes. Signed-off-by: Uli Schlachter --- modules/modperl/Makefile.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/modperl/Makefile.inc b/modules/modperl/Makefile.inc index 2b08c198..f76d8d4e 100644 --- a/modules/modperl/Makefile.inc +++ b/modules/modperl/Makefile.inc @@ -15,10 +15,10 @@ modperlLDFLAGS := $(PERL_LD) modperlCXXFLAGS += -I. ifeq "$(ISCYGWIN)" "1" -PERLCEXT_EXT := "dll" -PERLDEPONMOD := "modperl.so" +PERLCEXT_EXT := dll +PERLDEPONMOD := modperl.so else -PERLCEXT_EXT := "so" +PERLCEXT_EXT := so PERLDEPONMOD := endif From 84ec49780e8ab1e1b26d381e97ddb2323e504ccc Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 23 Sep 2012 12:03:22 +0200 Subject: [PATCH 3/3] Get rid of the modpythin jobhack This exists to fix a problem where the python swig API was generated multiple times in parallel with "make -j3". This problems turns out to be due to the multiple target rule that this commit removes. Such a rule doesn't mean "this commands generate multiple files at once" but means "you can use this command for each of these targets". Fix this by including Makefile.gen instead of calling it in its own make process. That way we don't need this "meta rule" which just calls another Makefile but can use the "real" rules immediately. Signed-off-by: Uli Schlachter --- Makefile.in | 10 ++-------- modules/modpython/Makefile.inc | 4 +--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Makefile.in b/Makefile.in index dfa4dbfc..ec4b8a8e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -58,12 +58,6 @@ E=@\# C= endif -ifeq "@PYTHON@" "" -JOBHACK= -else -JOBHACK=-j1 -endif - .PHONY: all man modules clean distclean install version_extra_recompile .SECONDARY: @@ -92,7 +86,7 @@ man: @$(MAKE) -C man $(C) modules: $(LIBZNC) - @$(MAKE) -C modules $(C) $(JOBHACK) + @$(MAKE) -C modules $(C) clean: rm -rf $(CLEAN) @@ -131,7 +125,7 @@ install: znc $(LIBZNC) $(INSTALL_DATA) $(srcdir)/include/znc/*.h $(DESTDIR)$(includedir)/znc $(INSTALL_DATA) include/znc/zncconfig.h $(DESTDIR)$(includedir)/znc $(INSTALL_DATA) znc.pc $(DESTDIR)$(PKGCONFIGDIR) - @$(MAKE) -C modules $(JOBHACK) install DESTDIR=$(DESTDIR); + @$(MAKE) -C modules install DESTDIR=$(DESTDIR); if test -n "$(LIBZNC)"; then \ test -d $(DESTDIR)$(LIBZNCDIR) || $(INSTALL) -d $(DESTDIR)$(LIBZNCDIR) || exit 1 ; \ $(INSTALL_PROGRAM) $(LIBZNC) $(DESTDIR)$(LIBZNCDIR) || exit 1 ; \ diff --git a/modules/modpython/Makefile.inc b/modules/modpython/Makefile.inc index 1e4bde2d..c8fdb11c 100644 --- a/modules/modpython/Makefile.inc +++ b/modules/modpython/Makefile.inc @@ -57,9 +57,7 @@ modpython/_znc_core.$(PYCEXT_EXT): modpython/_znc_core.o Makefile modpython.so $(Q)$(CXX) $(MODFLAGS) $(LDFLAGS) $(MODLINK) -o $@ $< $(PY_LDFLAGS) $(PYDEPONMOD) ifneq "$(SWIG)" "" -modpython/znc_core.py modpython/_znc_core.cpp modpython/functions.cpp modpython/swigpyrun.h: modpython/codegen.pl modpython/functions.in Makefile - @mkdir -p modpython .depend - $(Q)$(MAKE) -f $(srcdir)/modpython/Makefile.gen $(C) SWIG="$(SWIG)" srcdir="$(srcdir)" PERL="$(PERL)" VERBOSE="$(VERBOSE)" SED="$(SED)" +include $(srcdir)/modpython/Makefile.gen endif modpython.o: modpython/functions.cpp