Configure.sh 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. # Construct the vlc_build_dir
  14. mkdir -p $VLC_BUILD_DIR
  15. cd $VLC_BUILD_DIR
  16. # Construct 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 $args" # Disable old gui/macosx
  21. args="--disable-macosx-vlc-app $args" # Don't build old vlc.app
  22. args="--with-macosx-version-min=10.6 $args"
  23. # optional modules
  24. args="--enable-merge-ffmpeg $args"
  25. args="--enable-faad $args"
  26. args="--enable-flac $args"
  27. args="--enable-theora $args"
  28. args="--enable-shout $args"
  29. args="--enable-twolame $args"
  30. args="--enable-realrtsp $args"
  31. args="--enable-libass $args"
  32. args="--enable-macosx-audio $args"
  33. args="--enable-macosx-dialog-provider $args"
  34. args="--enable-macosx-eyetv $args"
  35. args="--enable-macosx-qtkit $args"
  36. args="--enable-macosx-vout $args"
  37. # disabled stuff
  38. args="--disable-growl $args"
  39. args="--disable-caca $args"
  40. args="--disable-ncurses $args"
  41. args="--disable-httpd $args"
  42. args="--disable-vlm $args"
  43. args="--disable-skins2 $args"
  44. args="--disable-glx $args"
  45. args="--disable-xvideo $args"
  46. args="--disable-xcb $args"
  47. args="--disable-sdl $args"
  48. args="--disable-sdl-image $args"
  49. args="--disable-samplerate $args"
  50. if test "x$SDKROOT" != "x"
  51. then
  52. args="--with-macosx-sdk=$SDKROOT $args"
  53. fi
  54. # Debug Flags
  55. if test "$CONFIGURATION" = "Debug"; then
  56. args="--enable-debug $args"
  57. fi
  58. # 64 bits switches
  59. for arch in $ARCHS; do
  60. this_args="$args"
  61. # where to install
  62. this_args="--prefix=${VLC_BUILD_DIR}/$arch/vlc_install_dir $this_args"
  63. input="$VLC_SRC_DIR/configure"
  64. output="$arch/Makefile"
  65. if test -e ${output} && test ${output} -nt ${input}; then
  66. echo "No need to re-run configure for $arch"
  67. continue;
  68. fi
  69. # Construct the vlc_build_dir/$arch
  70. mkdir -p $arch
  71. cd $arch
  72. if test $arch = "x86_64"; then
  73. export CFLAGS="-m64 -arch x86_64"
  74. export CXXFLAGS="-m64 -arch x86_64"
  75. export OBJCFLAGS="-m64 -arch x86_64"
  76. export CPPFLAGS="-m64 -arch x86_64"
  77. this_args="--build=x86_64-apple-darwin10 --with-contrib=$VLC_SRC_DIR/contrib/x86_64-apple-darwin10 $this_args"
  78. export PATH=$VLC_SRC_DIR/extras/tools/build/bin:$VLC_SRC_DIR/contrib/x86_64-apple-darwin10/bin:$PATH
  79. export PKG_CONFIG_PATH=$VLC_SRC_DIR/contrib/x86_64-apple-darwin10/lib/pkgconfig
  80. fi
  81. if test $arch = "i386"; then
  82. export CFLAGS="-m32 -arch i386"
  83. export CXXFLAGS="-m32 -arch i386"
  84. export OBJCFLAGS="-m32 -arch i386"
  85. export CPPFLAGS="-m32 -arch i386"
  86. this_args="--build=i686-apple-darwin9 --with-contrib=$VLC_SRC_DIR/contrib/i686-apple-darwin9 $this_args"
  87. fi
  88. if test $arch = "ppc"; then
  89. export CFLAGS="-m32 -arch ppc"
  90. export CXXFLAGS="-m32 -arch ppc"
  91. export OBJCFLAGS="-m32 -arch ppc"
  92. export CPPFLAGS="-m32 -arch ppc"
  93. this_args="--build=powerpc-apple-darwin9 --with-contrib=$VLC_SRC_DIR/contrib/powerpc-apple-darwin9 $this_args"
  94. fi
  95. echo "Running [$arch] configure $this_args"
  96. $VLC_SRC_DIR/configure $this_args
  97. err=$?
  98. if test $err != 0; then
  99. exit $err
  100. fi
  101. cd ..
  102. done