diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-05-14 18:59:00 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-05-17 17:22:55 +0300 |
commit | 95438e54b8128061b1b8751943e69a5af2e338f1 (patch) | |
tree | 61025ba6738aac8e5901a3bdb2e3ab6a6ba83092 /configure | |
parent | de1e483397bfe06b531adbdcd84c8d3d77d30a13 (diff) | |
download | mpv-95438e54b8128061b1b8751943e69a5af2e338f1.tar.bz2 mpv-95438e54b8128061b1b8751943e69a5af2e338f1.tar.xz |
configure: OSX: fix check for compiler-specific cflags
The configure script adds some compiler-specific flags for GCC on OSX.
This was done under a check for compiler binary name not being clang.
Move the test to after $cc_vendor has been determined and check
against that instead.
The previous test worked for clang if you explicitly specified
--cc=clang, but not if the default system "cc" command was used and
mapped to clang. Recent versions of Xcode changed the default compiler
(cc) to clang. This caused a lot of spam from clang, which complained
about the unknown flags when compiling with no explicit --cc option.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1339,9 +1339,6 @@ fi if darwin; then extra_cflags="-mdynamic-no-pic $extra_cflags" - if test "$(basename $_cc)" != "clang" ; then - extra_cflags="-falign-loops=16 -shared-libgcc $extra_cflags" - fi _timer=timer-darwin.c fi @@ -2303,6 +2300,10 @@ else warn_cflags=yes fi +if darwin && test "$cc_vendor" = "gnu" ; then + extra_cflags="-falign-loops=16 -shared-libgcc $extra_cflags" +fi + if test "$cc_vendor" = "gnu" ; then cflag_check -Wundef && WARNFLAGS="-Wundef $WARNFLAGS" # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because |