df3087a3a7ca1b63d74a771c1b0504bdecdc7ca2
19 if [ "$1" = "-h" -o
"$1" = "--help" ] ; then
22 Usage: configure [options]
23 Options: [defaults in brackets after descriptions]
25 --help print this message
27 echo " --prefix=PREFIX install in PREFIX [$prefix]"
28 echo " --cc=CC use C compiler CC [$cc]"
29 echo " --cpu=CPU force cpu to CPU [$cpu]"
30 echo " --disable-mmx disable mmx usage"
31 echo " --enable-gprof enable profiling with gprof [$gprof]"
37 --prefix
=*) prefix
=`echo $opt | cut -d '=' -f 2`
39 --cc
=*) cc
=`echo $opt | cut -d '=' -f 2`
41 --cpu
=*) cpu
=`echo $opt | cut -d '=' -f 2`
43 --disable-mmx
) mmx
="no"
45 --enable-gprof
) gprof
="yes"
50 echo "Install prefix $prefix"
53 echo "MMX enabled $mmx"
54 echo "gprof enabled $gprof"
56 echo "Creating config.mak and config.h"
58 echo "# Automatically generated by configure - do not modify" > config.mak
59 echo "/* Automatically generated by configure - do not modify */" > config.h
61 echo "prefix=$prefix" >> config.mak
62 echo "CC=$cc" >> config.mak
63 echo "AR=$ar" >> config.mak
64 echo "OPTFLAGS=-O2" >> config.mak
65 if [ "$cpu" = "x86" ] ; then
66 echo "TARGET_ARCH_X86=yes" >> config.mak
67 echo "#define ARCH_X86 1" >> config.h
69 if [ "$mmx" = "yes" ] ; then
70 echo "TARGET_MMX=yes" >> config.mak
71 echo "#define HAVE_MMX 1" >> config.h
73 if [ "$gprof" = "yes" ] ; then
74 echo "TARGET_GPROF=yes" >> config.mak
75 echo "#define HAVE_GPROF 1" >> config.h