]> granicus.if.org Git - libx264/commitdiff
Allow compilation with non-Apple GCC on OS X
authorAlexander Strange <astrange@ithinksw.com>
Sun, 15 Nov 2009 06:16:18 +0000 (22:16 -0800)
committerFiona Glaser <fiona@x264.com>
Sun, 15 Nov 2009 21:15:13 +0000 (13:15 -0800)
configure

index 5502021d24f966e50d369a4ca78825dc9292bb24..6326166a11b020c246a5dd42fba9e184d3c092fe 100755 (executable)
--- 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