Control: tag -1 patch Andreas Cadhalpun <andreas.cadhal...@googlemail.com> (2013-10-07): > The patch seems not to work anymore and the upstream bug is closed.
Hi, here is a somewhat nasty approach, but oh well. It appears the ACX_PTHREAD macro is busted, since according to config.log, only -lphtreads is tried, not -lpthread. Since I never saw -pthread in CFLAGS until now, I'm proposing the attached patch, which: 1. disables ACX_PTHREAD; 2. disables -Werror so that autoreconf -vfi works instead of failing due to some warning; 3. uses AC_CHECK_LIB(pthread, pthread_create) instead. (Of course one needs to run autoreconf -vfi at some point; dh_autoreconf might come in handy for that purpose.) The second patch tweaks 01pkgconfig.patch which was added to adjust the resulting .pc file. I only tested the following reverse dependency (build-time only): netcfg (call me biased). Mraw, KiBi.
From d2ecd65e62372be7c79c1b051cc6c43529cf1491 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois <k...@debian.org> Date: Tue, 8 Oct 2013 00:15:59 +0200 Subject: [PATCH 1/2] Use regular AC_CHECK_LIB()/@LIBS@ for phtread. The ACX_PTHREAD macro looks way too buggy since it only tries -lphtreads, so switch to something that should work across all Debian architectures. Also disable -Werror at the automake level to make it possible to autoreconf the package. --- check.pc.in | 4 ++-- configure.ac | 5 ++--- src/Makefile.am | 4 ++-- tests/Makefile.am | 3 +-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/check.pc.in b/check.pc.in index f23110e..891d327 100644 --- a/check.pc.in +++ b/check.pc.in @@ -9,5 +9,5 @@ URL: http://check.sourceforge.net Version: @VERSION@ Requires.private: @LIBSUBUNIT_PC@ Libs: -L${libdir} -lcheck -Libs.private: @GCOV_LIBS@ @PTHREAD_LIBS@ @LIBS@ -Cflags: -I${includedir} @PTHREAD_CFLAGS@ +Libs.private: @GCOV_LIBS@ @LIBS@ +Cflags: -I${includedir} diff --git a/configure.ac b/configure.ac index 1a40f05..3353c38 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_CONFIG_AUX_DIR([build-aux]) AC_USE_SYSTEM_EXTENSIONS # really severe build strictness -AM_INIT_AUTOMAKE([-Wall -Werror gnits 1.9.6]) +AM_INIT_AUTOMAKE([-Wall gnits 1.9.6]) # From patch 2803433, request system extensions to generate 64-bit safe code AC_USE_SYSTEM_EXTENSIONS @@ -192,8 +192,7 @@ HW_FUNC_VASPRINTF HW_FUNC_ASPRINTF # Checks for pthread implementation. -ACX_PTHREAD -CC="$PTHREAD_CC" +AC_CHECK_LIB(pthread, pthread_create) # Check for whether we can install checkmk (we have a usable awk) AC_ARG_VAR([AWK_PATH],[Awk interpreter command]) diff --git a/src/Makefile.am b/src/Makefile.am index b1e3f7d..9572e13 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,7 @@ include_HEADERS = check.h EXTRA_DIST = check.h.in -AM_CFLAGS = @GCOV_CFLAGS@ @PTHREAD_CFLAGS@ $(LIBSUBUNIT_CFLAGS) +AM_CFLAGS = @GCOV_CFLAGS@ $(LIBSUBUNIT_CFLAGS) CFILES =\ check.c \ @@ -39,7 +39,7 @@ $(EXPORT_SYM): check.h.in libcheck_la_DEPENDENCIES= $(EXPORT_SYM) libcheck_la_LDFLAGS = -no-undefined -export-symbols $(EXPORT_SYM) libcheck_la_SOURCES = $(CFILES) $(HFILES) -libcheck_la_LIBADD = @GCOV_LIBS@ @PTHREAD_LIBS@ $(LIBSUBUNIT_LIBS) $(top_builddir)/lib/libcompat.la +libcheck_la_LIBADD = @GCOV_LIBS@ @LIBS@ $(LIBSUBUNIT_LIBS) $(top_builddir)/lib/libcompat.la libcheckinternal_la_LDFLAGS = -no-undefined libcheckinternal_la_SOURCES = $(CFILES) $(HFILES) diff --git a/tests/Makefile.am b/tests/Makefile.am index 52b0c24..08f1eca 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -63,8 +63,7 @@ check_stress_SOURCES = check_stress.c check_stress_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la check_thread_stress_SOURCES = check_thread_stress.c -check_thread_stress_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la @PTHREAD_LIBS@ -check_thread_stress_CFLAGS = @PTHREAD_CFLAGS@ +check_thread_stress_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la @LIBS@ check_nofork_SOURCES = check_nofork.c check_nofork_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la -- 1.8.4.rc3
From d903657c9bc99070e7bf8064e0c8b880d36bf4a3 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois <k...@debian.org> Date: Tue, 8 Oct 2013 00:21:35 +0200 Subject: [PATCH 2/2] Update 01pkgconfig.patch accordingly. --- debian/patches/01pkgconfig.patch | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/debian/patches/01pkgconfig.patch b/debian/patches/01pkgconfig.patch index 1211350..d095fdf 100644 --- a/debian/patches/01pkgconfig.patch +++ b/debian/patches/01pkgconfig.patch @@ -1,12 +1,10 @@ --- a/check.pc.in +++ b/check.pc.in -@@ -8,6 +8,6 @@ +@@ -8,6 +8,5 @@ URL: http://check.sourceforge.net Version: @VERSION@ Requires.private: @LIBSUBUNIT_PC@ -Libs: -L${libdir} -lcheck --Libs.private: @GCOV_LIBS@ @PTHREAD_LIBS@ @LIBS@ --Cflags: -I${includedir} @PTHREAD_CFLAGS@ -+Libs: -L${libdir} -lcheck_pic @GCOV_LIBS@ @PTHREAD_LIBS@ @LIBS@ -+Libs.private: -+Cflags: -I${includedir} -pthread +-Libs.private: @GCOV_LIBS@ @LIBS@ ++Libs: -L${libdir} -lcheck_pic @GCOV_LIBS@ @LIBS@ + Cflags: -I${includedir} -- 1.8.4.rc3
signature.asc
Description: Digital signature