From 8e5dab1ef3ac3ab307c2d35fb0c54bbb7814272e Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 20 Sep 2013 10:34:29 -0700 Subject: [PATCH] clang can't use pthread(s) flag --- autogen.sh | 2 +- m4/ax_pthread.m4 | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index b492bd9e9..1a41d8942 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,7 +5,7 @@ # Git hooks should come before autoreconf. if test -d .git; then - if ! test -d .git; then + if ! test -d .git/hooks; then mkdir .git/hooks fi ln -s -f ../../pre-commit.sh .git/hooks/pre-commit diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 index 6d400ed4e..d09a1cd68 100644 --- a/m4/ax_pthread.m4 +++ b/m4/ax_pthread.m4 @@ -160,7 +160,11 @@ case ${host_os} in ;; darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" + if test "$CC" = "clang"; then + ax_pthread_flags="$ax_pthread_flags" + else + ax_pthread_flags="-pthread $ax_pthread_flags" + fi ;; esac