20 if [ "$1" = "-h" -o "$1" = "--help" ] ; then
23 Usage: configure [options]
24 Options: [defaults in brackets after descriptions]
26 --help print this message
28 echo " --prefix=PREFIX install in PREFIX [$prefix]"
29 echo " --cc=CC use C compiler CC [$cc]"
30 echo " --cpu=CPU force cpu to CPU [$cpu]"
31 echo " --disable-mmx disable mmx usage"
32 echo " --enable-gprof enable profiling with gprof [$gprof]"
33 echo " --disable-mp3lib disable mp3 lib compiling"
39 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
41 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
43 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
45 --disable-mmx) mmx="no"
47 --enable-gprof) gprof="yes"
49 --disable-mp3lib) mp3lib="no"
54 echo "Install prefix $prefix"
57 echo "MMX enabled $mmx"
58 echo "gprof enabled $gprof"
60 echo "Creating config.mak and config.h"
62 echo "# Automatically generated by configure - do not modify" > config.mak
63 echo "/* Automatically generated by configure - do not modify */" > config.h
66 if test -z "$CFLAGS"; then
70 echo "prefix=$prefix" >> config.mak
71 echo "MAKE=make" >> config.mak
72 echo "CC=$cc" >> config.mak
73 echo "AR=$ar" >> config.mak
74 echo "OPTFLAGS=$CFLAGS" >> config.mak
75 if [ "$cpu" = "x86" ] ; then
76 echo "TARGET_ARCH_X86=yes" >> config.mak
77 echo "#define ARCH_X86 1" >> config.h
79 if [ "$mmx" = "yes" ] ; then
80 echo "TARGET_MMX=yes" >> config.mak
81 echo "#define HAVE_MMX 1" >> config.h
83 if [ "$gprof" = "yes" ] ; then
84 echo "TARGET_GPROF=yes" >> config.mak
85 echo "#define HAVE_GPROF 1" >> config.h
88 # if you do not want to use encoders, disable that.
89 echo "#define CONFIG_ENCODERS 1" >> config.h
90 echo "CONFIG_ENCODERS=yes" >> config.mak
92 # if you do not want to use decoders, disable that.
93 echo "#define CONFIG_DECODERS 1" >> config.h
94 echo "CONFIG_DECODERS=yes" >> config.mak
96 # special AC3 and MPGLIB enabling stuff in case you already have it
98 echo "#define CONFIG_AC3 1" >> config.h
99 echo "CONFIG_AC3=yes" >> config.mak
101 if [ "$mp3lib" = "yes" ] ; then
102 echo "#define CONFIG_MPGLIB 1" >> config.h
103 echo "CONFIG_MPGLIB=yes" >> config.mak