[x264-devel] commit: Allow compilation with non-Apple GCC on OS X (Alexander Strange )

git version control git at videolan.org
Mon Nov 16 01:32:17 CET 2009


x264 | branch: master | Alexander Strange <astrange at ithinksw.com> | Sat Nov 14 22:16:18 2009 -0800| [4f0a545fa7528b4820141ac6d0b8bbe2e643d905] | committer: Jason Garrett-Glaser 

Allow compilation with non-Apple GCC on OS X

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=4f0a545fa7528b4820141ac6d0b8bbe2e643d905
---

 configure |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 5502021..6326166 100755
--- a/configure
+++ b/configure
@@ -180,7 +180,7 @@ case $host_os in
     CFLAGS="$CFLAGS -falign-loops=16"
     LDFLAGS="$LDFLAGS -lm"
     if [ "$pic" = "no" ]; then
-        CFLAGS="$CFLAGS -mdynamic-no-pic"
+        cc_check "" -mdynamic-no-pic && CFLAGS="$CFLAGS -mdynamic-no-pic"
     fi
     ;;
   freebsd*)
@@ -255,8 +255,10 @@ case $host_cpu in
     AS="yasm"
     if [ "$SYS" = MACOSX ];then
       ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
-      CFLAGS="$CFLAGS -arch x86_64"
-      LDFLAGS="$LDFLAGS -arch x86_64"
+      if cc_check '' "-arch x86_64"; then
+        CFLAGS="$CFLAGS -arch x86_64"
+        LDFLAGS="$LDFLAGS -arch x86_64"
+      fi
     elif [ "$SYS" = MINGW ]; then
       ASFLAGS="$ASFLAGS -f win32 -m amd64 -DPREFIX"
     else



More information about the x264-devel mailing list