[vlc-commits] commit: configure: Properly set gcc -arch flag depending what host we are targeting. ( Pierre d'Herbemont )
git version control
git at videolan.org
Thu Mar 4 18:51:00 CET 2010
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Thu Mar 4 18:44:55 2010 +0100| [ca4339c7110426face49fba0ebf633aa1b39cb84] | committer: Pierre d'Herbemont
configure: Properly set gcc -arch flag depending what host we are targeting.
Now you just need to properly set --host to build for the arch you want (ppc, i386, x86_64).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca4339c7110426face49fba0ebf633aa1b39cb84
---
configure.ac | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8a060ab..6344b7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,11 +201,30 @@ case "${host_os}" in
esac
;;
darwin*)
+
+ dnl Force gcc "-arch" flag
+ ARCH_flag=""
+ case "${host}" in
+ i386*)
+ ARCH_flag="-arch i386"
+ ;;
+ ppc64*)
+ ARCH_flag="-arch ppc64"
+ ;;
+ ppc*)
+ ARCH_flag="-arch ppc"
+ ;;
+ x86_64*)
+ ARCH_flag="-arch x86_64"
+ ;;
+ esac
+
SYS=darwin
- CFLAGS_save="${CFLAGS_save} -D_INTL_REDIRECT_MACROS"; CFLAGS="${CFLAGS_save}"
- CXXFLAGS_save="${CXXFLAGS_save} -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}"
- OBJCFLAGS_save="${OBJCFLAGS_save} -D_INTL_REDIRECT_MACROS -std=gnu99"; OBJCFLAGS="${OBJCFLAGS_save}"
- LDFLAGS_save="${LDFLAGS_save} -Wl,-headerpad_max_install_names"; LDFLAGS="${LDFLAGS_save}"
+ CFLAGS_save="${CFLAGS_save} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"; CFLAGS="${CFLAGS_save}"
+ CXXFLAGS_save="${CXXFLAGS_save} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"; CXXFLAGS="${CXXFLAGS_save}"
+ CPPFLAGS_save="${CPPFLAGS_save} ${ARCH_flag}"; CPPFLAGS="${CPPFLAGS_save}"
+ OBJCFLAGS_save="${OBJCFLAGS_save} -D_INTL_REDIRECT_MACROS -std=gnu99 ${ARCH_flag}"; OBJCFLAGS="${OBJCFLAGS_save}"
+ LDFLAGS_save="${LDFLAGS_save} -Wl,-headerpad_max_install_names ${ARCH_flag}"; LDFLAGS="${LDFLAGS_save}"
VLC_ADD_LDFLAGS([mkv mp4 motion], [-Wl,-framework,IOKit,-framework,CoreFoundation])
VLC_ADD_LDFLAGS([libvlc vlc],[-Wl,-undefined,dynamic_lookup])
VLC_ADD_LDFLAGS([avcodec avformat access_avio swscale postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
More information about the vlc-commits
mailing list