summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmpeg3/configure
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libmpeg3/configure') (more/less context) (ignore whitespace changes)
-rwxr-xr-xcore/multimedia/opieplayer/libmpeg3/configure102
1 files changed, 102 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/libmpeg3/configure b/core/multimedia/opieplayer/libmpeg3/configure
new file mode 100755
index 0000000..e75af76
--- a/dev/null
+++ b/core/multimedia/opieplayer/libmpeg3/configure
@@ -0,0 +1,102 @@
1#!/bin/sh
2
3USE_MMX=1
4USE_CSS=1
5LESS_OPT=
6PLATFORM_CFLAGS="-malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486"
7DEBUG=
8OPTIMIZE=-O2
9OPTIMIZE_less=-O
10DEFINES=
11CC=gcc
12
13for ac_option
14do
15case "$ac_option" in
16 --fixed-point)
17 CC=g++
18 DEFINES="$DEFINES -DUSE_FIXED_POINT"
19 ;;
20
21 --lessopt)
22 LESS_OPT=1
23 ;;
24
25 --no-mmx)
26 USE_MMX=0
27 ;;
28
29 --no-css)
30 USE_CSS=0
31 ;;
32
33 --debug)
34 DEBUG=-g
35 ;;
36
37 --gcc-prefix=*)
38 CROSS=${ac_option#--gcc-prefix=}
39 PLATFORM_CFLAGS=""
40 ;;
41 -h | --help | -help)
42 cat << EOF
43Options:
44 --no-mmx Compile libmpeg3 with no MMX support.
45 --no-css Compile libmpeg3 with no CSS support.
46 --fixed-point Compile libmpeg3 to use integers instead of floats.
47 --debug Compile libmpeg3 with debug support.
48EOF
49 exit 0
50 ;;
51
52 *)
53 ;;
54esac
55done
56
57
58echo "Configuring libmpeg3"
59
60cat > global_config << EOF
61# DO NOT EDIT. EDIT ./configure INSTEAD AND RERUN IT.
62EOF
63
64
65if test -z "$CFLAGS"; then
66 CF="$DEFINES $DEBUG -funroll-loops -fomit-frame-pointer $PLATFORM_CFLAGS"
67 echo >> global_config "CFLAGS = $CF $OPTIMIZE"
68 if test -z "$LESS_OPT"; then
69 echo >> global_config "CFLAGS_lessopt = $CF $OPTIMIZE_less"
70 else
71 echo >> global_config "CFLAGS_lessopt = $CF $OPTIMIZE_less"
72 fi
73fi
74
75cat >> global_config << EOF
76CC = ${CROSS}$CC
77AR = ${CROSS}ar
78NASM = nasm
79EOF
80
81if [ ${USE_CSS} = 1 ]; then
82cat >> global_config << EOF
83CFLAGS += -DHAVE_CSS
84EOF
85fi
86
87if [ ${USE_MMX} = 1 ]; then
88cat >> global_config << EOF
89CFLAGS += -DHAVE_MMX
90MMXOBJS = \
91 video/mmxidct.o \
92 video/reconmmx.o
93MMXOBJS2 = \
94 mmxidct.o \
95 reconmmx.o
96EOF
97fi
98
99
100
101
102echo "done"