~brianaker/libmemcached/gear-clean

« back to all changes in this revision

Viewing changes to m4/ax_pthread.m4

  • Committer: Continuous Integration
  • Date: 2013-10-11 10:57:29 UTC
  • mfrom: (1169.1.3 key-cleanup)
  • Revision ID: ci@tangent.org-20131011105729-icge7t4g8wr4g380
Merge lp:~brianaker/libmemcached/key-cleanup/ Build: jenkins-Libmemcached-369

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
#   modified version of the Autoconf Macro, you may extend this special
83
83
#   exception to the GPL to apply to your modified version as well.
84
84
 
85
 
#serial 19
 
85
#serial 20
86
86
 
87
87
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
88
88
AC_DEFUN([AX_PTHREAD], [
159
159
        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
160
160
        ;;
161
161
 
162
 
        darwin12*)
163
 
        ax_pthread_flags="$ax_pthread_flags"
164
 
        ;;
165
 
 
166
162
        darwin*)
167
163
        ax_pthread_flags="-pthread $ax_pthread_flags"
168
164
        ;;
287
283
        LIBS="$save_LIBS"
288
284
        CFLAGS="$save_CFLAGS"
289
285
 
290
 
        # More AIX lossage: must compile with xlc_r or cc_r
291
 
        if test x"$GCC" != xyes; then
292
 
          AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
293
 
        else
294
 
          PTHREAD_CC=$CC
 
286
        # More AIX lossage: compile with *_r variant
 
287
        if test "x$GCC" != xyes; then
 
288
            case $host_os in
 
289
                aix*)
 
290
                AS_CASE(["x/$CC"],
 
291
                  [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
 
292
                  [#handle absolute path differently from PATH based program lookup
 
293
                   AS_CASE(["x$CC"],
 
294
                     [x/*],
 
295
                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
 
296
                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
 
297
                ;;
 
298
            esac
295
299
        fi
296
 
else
297
 
        PTHREAD_CC="$CC"
298
300
fi
299
301
 
 
302
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
 
303
 
300
304
AC_SUBST(PTHREAD_LIBS)
301
305
AC_SUBST(PTHREAD_CFLAGS)
302
306
AC_SUBST(PTHREAD_CC)