Configure.sh 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #
  2. # Configure script
  3. #
  4. # used by VLCKit.xcodeproj
  5. if test "x$SYMROOT" = "x"; then
  6. echo " This script is bound to be launched by VLCKit.xcodeproj, not you"
  7. exit 1
  8. fi
  9. if test "$ACTION" = "clean"; then
  10. rm -Rf $VLC_BUILD_DIR
  11. exit 0
  12. fi
  13. # Contruct the vlc_build_dir
  14. mkdir -p $VLC_BUILD_DIR
  15. cd $VLC_BUILD_DIR
  16. # Contruct the argument list
  17. echo "Building for $ARCHS with sdk=\"$SDKROOT\" in $VLC_BUILD_DIR"
  18. args="--disable-nls $args"
  19. # Mac OS X related options
  20. args="--disable-macosx-defaults $args"
  21. args="--disable-macosx $args" # Disable old gui/macosx
  22. args="--disable-macosx-vlc-app $args" # Don't build old vlc.app
  23. args="--with-macosx-version-min=10.6 $args"
  24. # optional modules
  25. args="--enable-faad $args"
  26. args="--enable-flac $args"
  27. args="--enable-theora $args"
  28. args="--enable-shout $args"
  29. args="--enable-caca $args"
  30. args="--enable-vcdx $args"
  31. args="--enable-twolame $args"
  32. args="--enable-realrtsp $args"
  33. args="--enable-libass $args"
  34. # disabled stuff
  35. args="--disable-ncurses $args"
  36. args="--disable-httpd $args"
  37. args="--disable-vlm $args"
  38. args="--disable-skins2 $args"
  39. args="--disable-glx $args"
  40. args="--disable-xvideo $args"
  41. args="--disable-xcb $args"
  42. args="--disable-sdl $args"
  43. args="--disable-sdl-image $args"
  44. args="--disable-visual $args"
  45. if test "x$SDKROOT" != "x"
  46. then
  47. args="--with-macosx-sdk=$SDKROOT $args"
  48. fi
  49. # Debug Flags
  50. if test "$CONFIGURATION" = "Debug"; then
  51. args="--enable-debug $args"
  52. fi
  53. top_srcdir="$VLC_SRC_DIR"
  54. # 64 bits switches
  55. for arch in $ARCHS; do
  56. this_args="$args"
  57. # where to install
  58. this_args="--prefix=${VLC_BUILD_DIR}/$arch/vlc_install_dir $this_args"
  59. input="$top_srcdir/configure"
  60. output="$arch/Makefile"
  61. echo `pwd`"/${output}"
  62. if test -e ${output} && test ${output} -nt ${input}; then
  63. echo "No need to re-run configure for $arch"
  64. continue;
  65. fi
  66. # Contruct the vlc_build_dir/$arch
  67. mkdir -p $arch
  68. cd $arch
  69. echo "Running [$arch] configure $this_args"
  70. if test $arch = "x86_64"; then
  71. export CFLAGS="-m64 -arch x86_64"
  72. export CXXFLAGS="-m64 -arch x86_64"
  73. export OBJCFLAGS="-m64 -arch x86_64"
  74. export CPPFLAGS="-m64 -arch x86_64"
  75. this_args="--with-contrib=${VLC_SRC_DIR}/extras/contrib/hosts/x86_64-apple-darwin10 $this_args"
  76. $top_srcdir/configure --build=x86_64-apple-darwin10 $this_args
  77. fi
  78. if test $arch = "i386"; then
  79. export CFLAGS="-m32 -arch i686"
  80. export CXXFLAGS="-m32 -arch i686"
  81. export OBJCFLAGS="-m32 -arch i686"
  82. export CPPFLAGS="-m32 -arch i686"
  83. this_args="--with-contrib=${VLC_SRC_DIR}/extras/contrib/hosts/i386-apple-darwin10 $this_args"
  84. $top_srcdir/configure --build=i686-apple-darwin10 $this_args
  85. fi
  86. if test $arch = "ppc"; then
  87. export CFLAGS="-m32 -arch ppc"
  88. export CXXFLAGS="-m32 -arch ppc"
  89. export OBJCFLAGS="-m32 -arch ppc"
  90. export CPPFLAGS="-m32 -arch ppc"
  91. this_args="--with-contrib=${VLC_SRC_DIR}/extras/contrib/hosts/powerpc-apple-darwin9 $this_args"
  92. $top_srcdir/configure --build=powerpc-apple-darwin9 $this_args
  93. fi
  94. cd ..
  95. done