24
# We do not want mmx by default
27
if [ "$1" = "-h" -o "$1" = "--help" ] ; then
30
Usage: configure [options]
31
Options: [defaults in brackets after descriptions]
33
--help print this message
35
echo " --prefix=PREFIX install in PREFIX [$prefix]"
36
echo " --cc=CC use C compiler CC [$cc]"
37
echo " --cpu=CPU force cpu to CPU [$cpu]"
38
echo " --disable-mmx disable mmx usage"
39
echo " --enable-gprof enable profiling with gprof [$gprof]"
40
echo " --disable-mp3lib disable mp3 lib compiling"
41
echo " --disable-grab disable audio/video grabbing code"
47
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
49
--cc=*) cc=`echo $opt | cut -d '=' -f 2`
51
--cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
53
--disable-mmx) mmx="no"
55
--enable-gprof) gprof="yes"
57
--disable-mp3lib) mp3lib="no"
59
--disable-grab) grab="no"
64
echo "Install prefix $prefix"
67
echo "MMX enabled $mmx"
68
echo "gprof enabled $gprof"
69
echo "grab enabled $grab"
71
echo "Creating config.mak and config.h"
73
echo "# Automatically generated by configure - do not modify" > config.mak
74
echo "/* Automatically generated by configure - do not modify */" > config.h
77
if test -z "$CFLAGS"; then
81
echo "prefix=$prefix" >> config.mak
82
echo "MAKE=make" >> config.mak
83
echo "CC=$cc" >> config.mak
84
echo "AR=$ar" >> config.mak
85
echo "OPTFLAGS=$CFLAGS" >> config.mak
86
if [ "$cpu" = "x86" ] ; then
87
echo "TARGET_ARCH_X86=yes" >> config.mak
88
echo "#define ARCH_X86 1" >> config.h
90
if [ "$cpu" = "armv4l" ]; then
91
echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
92
echo "#define ARCH_ARMV4L 1" >> config.h
94
if [ "$mmx" = "yes" ] ; then
95
echo "TARGET_MMX=yes" >> config.mak
96
echo "#define HAVE_MMX 1" >> config.h
98
if [ "$gprof" = "yes" ] ; then
99
echo "TARGET_GPROF=yes" >> config.mak
100
echo "#define HAVE_GPROF 1" >> config.h
103
# if you do not want to use encoders, disable that.
104
echo "#define CONFIG_ENCODERS 1" >> config.h
105
echo "CONFIG_ENCODERS=yes" >> config.mak
107
# if you do not want to use decoders, disable that.
108
echo "#define CONFIG_DECODERS 1" >> config.h
109
echo "CONFIG_DECODERS=yes" >> config.mak
111
# special AC3 and MPGLIB enabling stuff in case you already have it
112
# without libavcodec.
113
echo "#define CONFIG_AC3 1" >> config.h
114
echo "CONFIG_AC3=yes" >> config.mak
116
if [ "$mp3lib" = "yes" ] ; then
117
echo "#define CONFIG_MPGLIB 1" >> config.h
118
echo "CONFIG_MPGLIB=yes" >> config.mak
121
if [ "$grab" = "yes" ] ; then
122
echo "#define CONFIG_GRAB 1" >> config.h
123
echo "CONFIG_GRAB=yes" >> config.mak