mds/net-mail/zarafa/files/7.0.0.3.25734/fix-pthread.patch

54 lines
2.2 KiB
Diff
Raw Normal View History

diff -uNr zarafa-7.0.0.orig//autoconf/ltmain.sh zarafa-7.0.0/autoconf/ltmain.sh
--- zarafa-7.0.0.orig//autoconf/ltmain.sh 2011-03-22 06:51:06.000000000 +0100
+++ zarafa-7.0.0/autoconf/ltmain.sh 2011-03-22 06:52:20.000000000 +0100
@@ -1628,7 +1628,7 @@
elif test "X$arg" = "X-lc_r"; then
case $host in
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
+ # Do not include libc_r directly, use -lpthread flag.
continue
;;
esac
@@ -1647,7 +1647,7 @@
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ -mt|-mthreads|-kthread|-Kthread|-lpthread|-pthreads|--thread-safe|-threads)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
@@ -2150,7 +2150,7 @@
lib=
found=no
case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ -mt|-mthreads|-kthread|-Kthread|-lpthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
diff -uNr zarafa-7.0.0.orig//configure.ac zarafa-7.0.0/configure.ac
--- zarafa-7.0.0.orig//configure.ac 2011-03-22 06:51:05.000000000 +0100
+++ zarafa-7.0.0/configure.ac 2011-03-22 06:52:44.000000000 +0100
@@ -99,8 +99,8 @@
fi
# Everything uses pthread
-# check lib, but do not set in link list, but use -pthread instead (gnu c/c++ only?)
-AC_CHECK_LIB([pthread], [pthread_create], [ZCXXFLAGS="$ZCXXFLAGS -pthread"], AC_MSG_ERROR([required library libpthread missing or unusable]))
+# check lib, but do not set in link list, but use -lpthread instead (gnu c/c++ only?)
+AC_CHECK_LIB([pthread], [pthread_create], [ZCXXFLAGS="$ZCXXFLAGS -lpthread"], AC_MSG_ERROR([required library libpthread missing or unusable]))
#
# enable/disable options
@@ -392,7 +392,7 @@
CPPFLAGS="$CPPFLAGS -I$CLUCENE_INCLUDE_PREFIX"
fi
# force add pthread in lucene test
-CXXFLAGS="$CXXFLAGS -pthread"
+CXXFLAGS="$CXXFLAGS -lpthread"
if test -e "${CLUCENE_LIB_PREFIX}/libclucene.a"; then
AC_CHECK_LIB(clucene, [open],
[ CLUCENE_LIBS="${CLUCENE_LIB_PREFIX}/libclucene.a"