Configure.sh 2.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#
# Configure script
#
#   used by VLCKit.xcodeproj

if test "x$SYMROOT" = "x"; then
    echo " This script is bound to be launched by VLCKit.xcodeproj, not you"
    exit 1
fi

if test "$ACTION" = "clean"; then
12
    rm -Rf $VLC_BUILD_DIR
13 14 15
    exit 0
fi

16
# Construct the vlc_build_dir
17 18
mkdir -p $VLC_BUILD_DIR
cd $VLC_BUILD_DIR
19

20
# Construct the argument list
21
echo "Building for $ARCHS with sdk=\"$SDKROOT\" in $VLC_BUILD_DIR"
22 23 24 25 26 27 28

args="--disable-nls $args"

# Mac OS X related options
args="--disable-macosx $args" # Disable old gui/macosx
args="--disable-macosx-vlc-app $args" # Don't build old vlc.app

29
args="--with-macosx-version-min=10.7 $args"
30 31

# optional modules
32
args="--enable-merge-ffmpeg $args"
33 34 35 36 37 38 39
args="--enable-faad $args"
args="--enable-flac $args"
args="--enable-theora $args"
args="--enable-shout $args"
args="--enable-twolame $args"
args="--enable-realrtsp $args"
args="--enable-libass $args"
40 41
args="--enable-macosx-dialog-provider $args"
args="--enable-macosx-eyetv $args"
42 43
args="--disable-macosx-qtkit $args"
args="--disable-quicktime $args"
44 45

# disabled stuff
46
args="--disable-growl $args"
47
args="--disable-caca $args"
48 49 50 51 52 53 54 55
args="--disable-ncurses $args"
args="--disable-httpd $args"
args="--disable-vlm $args"
args="--disable-skins2 $args"
args="--disable-xvideo $args"
args="--disable-xcb $args"
args="--disable-sdl $args"
args="--disable-sdl-image $args"
56
args="--disable-samplerate $args"
57 58 59

if test "x$SDKROOT" != "x"
then
60
    args="--with-macosx-sdk=$SDKROOT $args"
61 62 63 64
fi

# Debug Flags
if test "$CONFIGURATION" = "Debug"; then
65 66 67
    optim="-g"
else
    optim=""
68 69 70
fi

# 64 bits switches
71
for arch in $ARCHS; do
72 73 74
    this_args="$args"

    # where to install
75
    this_args="--prefix=${VLC_BUILD_DIR}/$arch/vlc_install_dir $this_args"
76

77
    input="$VLC_SRC_DIR/configure"
78 79
    output="$arch/Makefile"
    if test -e ${output} && test ${output} -nt ${input}; then
80
        echo "No need to re-run configure for $arch"
81 82 83
        continue;
    fi

84
    # Construct the vlc_build_dir/$arch
85 86 87
    mkdir -p $arch
    cd $arch

88 89
    export PATH="$VLC_SRC_DIR/extras/tools/build/bin:$VLC_SRC_DIR/contrib/$arch-apple-darwin11/bin:$PATH"

90
    if test $arch = "x86_64"; then
91 92 93 94
        export CFLAGS="-m64 -arch x86_64 $optim"
        export CXXFLAGS="-m64 -arch x86_64 $optim"
        export OBJCFLAGS="-m64 -arch x86_64 $optim"
        export CPPFLAGS="-m64 -arch x86_64 $optim"
95 96
        this_args="--build=x86_64-apple-darwin11 --with-contrib=$VLC_SRC_DIR/contrib/x86_64-apple-darwin11 $this_args"
        export PKG_CONFIG_PATH=$VLC_SRC_DIR/contrib/x86_64-apple-darwin11/lib/pkgconfig
97
    fi
98
    echo "Running [$arch] configure $this_args"
99

100
    $VLC_SRC_DIR/configure $this_args
101 102 103
    err=$?
    if test $err != 0; then
        exit $err
104 105 106
    fi
    cd ..
done