Description: Fix handling of libpthread
Author: NIIBE Yutaka <gniibe@fsij.org>
Index: qrencode-3.3.0/configure.ac
===================================================================
--- qrencode-3.3.0.orig/configure.ac 2012-04-02 02:36:10.318718543 +0000
+++ qrencode-3.3.0/configure.ac 2012-04-02 02:37:07.822718976 +0000
@@ -42,7 +42,7 @@
[], [enable_thread_safety=yes])
if test x$enable_thread_safety = xyes; then
- AC_CHECK_LIB([pthread], [pthread_mutex_init])
+ AC_CHECK_LIB([pthread], [pthread_mutex_init], [AC_SUBST([LIBPTHREAD], [-lpthread])])
fi
AM_CONDITIONAL([HAVE_LIBPTHREAD], [test "x$ac_cv_lib_pthread_pthread_mutex_init" = "xyes" ])
Index: qrencode-3.3.0/libqrencode.pc.in
===================================================================
--- qrencode-3.3.0.orig/libqrencode.pc.in 2012-04-02 02:36:10.318718543 +0000
+++ qrencode-3.3.0/libqrencode.pc.in 2012-04-02 02:37:07.822718976 +0000
@@ -6,5 +6,6 @@
Name: libqrencode
Description: A QR Code encoding library
Version: @VERSION@
-Libs: -L${libdir} -lqrencode @LIBS@
+Libs: -L${libdir} -lqrencode
+Libs.private: @LIBPTHREAD@
Cflags: -I${includedir}
Index: qrencode-3.3.0/tests/Makefile.am
===================================================================
--- qrencode-3.3.0.orig/tests/Makefile.am 2012-01-23 06:18:00.000000000 +0000
+++ qrencode-3.3.0/tests/Makefile.am 2012-04-02 02:37:07.822718976 +0000
@@ -55,7 +55,7 @@
prof_qrencode_LDADD = ../libqrencode.la
pthread_qrencode_SOURCES = pthread_qrencode.c
-pthread_qrencode_LDADD = ../libqrencode.la
+pthread_qrencode_LDADD = ../libqrencode.la -lpthread
create_frame_pattern_SOURCES = create_frame_pattern.c
create_frame_pattern_CFLAGS = $(png_CFLAGS)