summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-25 18:55:50 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-25 18:55:50 +0000
commitd51f9df5c0ec917e0f223133782d942f152d9aca (patch)
treef7b1338de3cbbd3f9e54b309a8c66dccfd6dfdef
parent830178084ad66af4314af888eb661ec1a3920fcc (diff)
fix build on MacOSX (patch from Sjoerd Simmons, closes #51)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1277 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r--common/acx_pthread.m419
1 files changed, 12 insertions, 7 deletions
diff --git a/common/acx_pthread.m4 b/common/acx_pthread.m4
index 75f6a80..dcf6332 100644
--- a/common/acx_pthread.m4
+++ b/common/acx_pthread.m4
@@ -43,7 +43,7 @@ dnl We are also grateful for the helpful feedback of numerous users.
dnl
dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
-dnl @version 2005-06-15
+dnl @version 2006-05-29
dnl @license GPLWithACException
dnl
dnl Checks for GCC shared/pthread inconsistency based on work by
@@ -219,19 +219,24 @@ if test "x$acx_pthread_ok" = xyes; then
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
-
- # More AIX lossage: must compile with cc_r
- AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+ # More AIX lossage: must compile with xlc_r or cc_r
+ if test x"$GCC" != xyes; then
+ AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
+ else
+ PTHREAD_CC=$CC
+ fi
# The next part tries to detect GCC inconsistency with -shared on some
# architectures and systems. The problem is that in certain
# configurations, when -shared is specified, GCC "forgets" to
# internally use various flags which are still necessary.
- # First, check whether caller wants us to skip -shared checks
- # this is useful
AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies])
- if test x"$GCC" != xyes; then
+ check_inconsistencies=yes
+ case "${host_cpu}-${host_os}" in
+ *-darwin*) check_inconsistencies=no ;;
+ esac
+ if test x"$GCC" != xyes -o "x$check_inconsistencies" != xyes ; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])