Merge branch 'master' of github.com:cyassl/cyassl
This commit is contained in:
commit
5c57df8227
@ -160,11 +160,10 @@ case ${host_os} in
|
||||
;;
|
||||
|
||||
darwin*)
|
||||
if test "$CC" = "clang"; then
|
||||
ax_pthread_flags="$ax_pthread_flags"
|
||||
else
|
||||
ax_pthread_flags="-pthread $ax_pthread_flags"
|
||||
fi
|
||||
AC_REQUIRE([WOLFSSL_DARWIN_USING_CLANG])
|
||||
AS_IF([test x"$wolfssl_darwin_clang" = x"yes"],
|
||||
[ax_pthread_flags="$ax_pthread_flags"],
|
||||
[ax_pthread_flags="-pthread $ax_pthread_flags"])
|
||||
;;
|
||||
esac
|
||||
|
||||
|
37
m4/wolfssl_darwin_clang.m4
Normal file
37
m4/wolfssl_darwin_clang.m4
Normal file
@ -0,0 +1,37 @@
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# WOLFSSL_DARWIN_USING_CLANG
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# With the advent of Apple Xcode v5.0, the old tool sets are missing from
|
||||
# the distribution. The provided "gcc" executable wrapper accepts the
|
||||
# "-pthread" flag, and passes it to the underlying "clang" which chokes
|
||||
# on it. This script checks the version of the gcc executable to see if
|
||||
# it reports it is really "clang".
|
||||
#
|
||||
# The value is placed in the wolfssl_darwin_clang variable.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2013 John Safranek <john@wolfssl.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 1
|
||||
|
||||
AC_DEFUN([WOLFSSL_DARWIN_USING_CLANG],
|
||||
[
|
||||
if test x"$CC" = xclang; then
|
||||
wolfssl_darwin_clang=yes
|
||||
elif test x"$CC" = x || test x"$CC" = xgcc; then
|
||||
if /usr/bin/gcc -v 2>&1 | grep 'clang' >/dev/null 2>&1; then
|
||||
wolfssl_darwin_clang=yes
|
||||
fi
|
||||
fi
|
||||
])
|
Loading…
Reference in New Issue
Block a user