[Pkg-privacy-commits] [irssi-plugin-otr] 149/267: Fix: build system improvement

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:26:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository irssi-plugin-otr.

commit 9e195c61edf220b14bd6371dee355784ccde839f
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Mon Nov 26 17:37:10 2012 -0500

    Fix: build system improvement
    
    Check for some core irssi headers.
    
    Also remove a useless otr lib search.
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 configure.ac    | 29 ++++++++++++++++++++++++++---
 src/Makefile.am |  1 +
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 09cde72..ac8ed0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,9 +16,11 @@ AC_CHECK_LIB([pthread], [pthread_create], [],
 	[AC_MSG_ERROR([Cannot find libpthread. Use [LDFLAGS]=-Ldir to specify its location.])]
 )
 
-AC_SEARCH_LIBS([otrl_init], [otr], [],
-	[AC_MSG_ERROR([Cannot find libotr. Use [LDFLAGS]=-Ldir to specify its location.])]
-)
+AC_ARG_WITH([irssi-headers],
+	AS_HELP_STRING([--with-irssi-headers],
+	[Directory containing the Irssi header files]),
+	[IRSSI_HEADER_DIR="$withval"],
+	[IRSSI_HEADER_DIR="\"\""])
 
 # Check for Glib. It needs to be installed anyway or this macro will not be defined.
 AM_PATH_GLIB_2_0([2.22.0], [],
@@ -37,6 +39,27 @@ LIBS="$LIBS $GMODULE_LIBS"
 PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Werror=format-security"
 AC_SUBST(PACKAGE_CFLAGS)
 
+# Checking only a few Irssi headers is enough to tell that everything is
+# available. This is broken I know but tell that to the irssi guys to NOT use
+# cluster fu*** of headers and local inclusion system wide...
+CPPFLAGS="$CPPFLAGS $PACKAGE_CFLAGS -I$IRSSI_HEADER_DIR"
+AC_CHECK_HEADERS([\
+				irssi/src/common.h \
+				irssi/src/core/commands.h \
+				irssi/src/core/modules.h \
+				irssi/src/core/servers.h \
+				irssi/src/core/signals.h \
+				irssi/src/core/levels.h \
+				irssi/src/core/queries.h \
+				irssi/src/core/settings.h \
+				], [], [AC_MSG_ERROR([Irssi Header files are needed])],
+[
+#include <irssi/irssi-config.h>
+#ifdef HAVE_IRSSI_SRC_COMMON_H
+#include <irssi/src/common.h>
+#endif
+])
+
 LT_INIT
 
 CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing -fstack-protector-all -D_FORTIFY_SOURCE=2 -O1 -Wl,-z,relro,-z,now -fPIE -pie"
diff --git a/src/Makefile.am b/src/Makefile.am
index cc17f4c..4d7875e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,3 +18,4 @@ lib_LTLIBRARIES = libotr.la
 libotr_la_SOURCES = key.c key.h cmd.c cmd.h otr.c otr-ops.c \
 					utils.h utils.c otr.h module.c irssi_otr.h \
 					otr-formats.c otr-formats.h
+libotr_la_LDFLAGS = -module -avoid-version

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git



More information about the Pkg-privacy-commits mailing list