Merge lp:~brianaker/gearmand/pthread into lp:gearmand

Proposed by Brian Aker
Status: Merged
Merged at revision: 872
Proposed branch: lp:~brianaker/gearmand/pthread
Merge into: lp:gearmand
Diff against target: 55 lines (+16/-12)
1 file modified
m4/ax_pthread.m4 (+16/-12)
To merge this branch: bzr merge lp:~brianaker/gearmand/pthread
Reviewer Review Type Date Requested Status
Tangent Trunk Pending
Review via email: mp+185676@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'm4/ax_pthread.m4'
2--- m4/ax_pthread.m4 2012-11-04 04:42:01 +0000
3+++ m4/ax_pthread.m4 2013-09-15 16:34:28 +0000
4@@ -82,7 +82,7 @@
5 # modified version of the Autoconf Macro, you may extend this special
6 # exception to the GPL to apply to your modified version as well.
7
8-#serial 19
9+#serial 20
10
11 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
12 AC_DEFUN([AX_PTHREAD], [
13@@ -159,10 +159,6 @@
14 ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
15 ;;
16
17- darwin12*)
18- ax_pthread_flags="$ax_pthread_flags"
19- ;;
20-
21 darwin*)
22 ax_pthread_flags="-pthread $ax_pthread_flags"
23 ;;
24@@ -287,16 +283,24 @@
25 LIBS="$save_LIBS"
26 CFLAGS="$save_CFLAGS"
27
28- # More AIX lossage: must compile with xlc_r or cc_r
29- if test x"$GCC" != xyes; then
30- AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
31- else
32- PTHREAD_CC=$CC
33+ # More AIX lossage: compile with *_r variant
34+ if test "x$GCC" != xyes; then
35+ case $host_os in
36+ aix*)
37+ AS_CASE(["x/$CC"],
38+ [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
39+ [#handle absolute path differently from PATH based program lookup
40+ AS_CASE(["x$CC"],
41+ [x/*],
42+ [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
43+ [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
44+ ;;
45+ esac
46 fi
47-else
48- PTHREAD_CC="$CC"
49 fi
50
51+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
52+
53 AC_SUBST(PTHREAD_LIBS)
54 AC_SUBST(PTHREAD_CFLAGS)
55 AC_SUBST(PTHREAD_CC)

Subscribers

People subscribed via source and target branches

to all changes: