diff options
author | cristy <urban-warrior@git.imagemagick.org> | 2013-02-18 17:46:50 +0000 |
---|---|---|
committer | cristy <urban-warrior@git.imagemagick.org> | 2013-02-18 17:46:50 +0000 |
commit | 2ec87cc1e6933031aad7d2b86bfac53a68fd3c83 (patch) | |
tree | f4489ed236e9269aae0afc219d257c9eaa549790 /m4/ax_pthread.m4 | |
parent | 547fe7f9643f727eb223fc29708d73831b058fbf (diff) | |
download | ImageMagick-2ec87cc1e6933031aad7d2b86bfac53a68fd3c83.tar.gz |
Diffstat (limited to 'm4/ax_pthread.m4')
-rw-r--r-- | m4/ax_pthread.m4 | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 index 23a307d61..d90de34d1 100644 --- a/m4/ax_pthread.m4 +++ b/m4/ax_pthread.m4 @@ -82,7 +82,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 16 +#serial 18 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ @@ -123,7 +123,7 @@ fi # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt lpthread pthread-config" +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: @@ -145,8 +145,8 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) -case "${host_cpu}-${host_os}" in - *solaris*) +case ${host_os} in + solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based @@ -159,7 +159,7 @@ case "${host_cpu}-${host_os}" in ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" ;; - *-darwin*) + darwin*) ax_pthread_flags="-pthread $ax_pthread_flags" ;; esac @@ -254,9 +254,16 @@ if test "x$ax_pthread_ok" = xyes; then AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then |