aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2001-07-22 14:18:56 +0000
committerFabrice Bellard <fabrice@bellard.org>2001-07-22 14:18:56 +0000
commitde6d9b6404bfd1c589799142da5a95428f146edd (patch)
tree75ae0cbb74bdfafb6f1a40922db111a103db3bcf /configure
parent1b58d58ddaf8a8c766a0353885ff504babed0453 (diff)
downloadffmpeg-de6d9b6404bfd1c589799142da5a95428f146edd.tar.gz
Initial revision
Originally committed as revision 5 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure75
1 files changed, 75 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 0000000000..f22c837398
--- /dev/null
+++ b/configure
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+# default parameters
+prefix="/usr/local"
+cc="gcc"
+ar="ar"
+cpu=`uname -m`
+case "$cpu" in
+ i386|i486|i586|i686)
+ cpu="x86"
+ mmx="yes"
+ ;;
+ *)
+ mmx="no"
+ ;;
+esac
+gprof="no"
+
+if [ "$1" = "-h" -o "$1" = "--help" ] ; then
+cat << EOF
+
+Usage: configure [options]
+Options: [defaults in brackets after descriptions]
+
+ --help print this message
+EOF
+echo " --prefix=PREFIX install in PREFIX [$prefix]"
+echo " --cc=CC use C compiler CC [$cc]"
+echo " --cpu=CPU force cpu to CPU [$cpu]"
+echo " --disable-mmx disable mmx usage"
+echo " --enable-gprof enable profiling with gprof [$gprof]"
+exit 1
+fi
+
+for opt do
+ case "$opt" in
+ --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
+ ;;
+ --cc=*) cc=`echo $opt | cut -d '=' -f 2`
+ ;;
+ --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
+ ;;
+ --disable-mmx) mmx="no"
+ ;;
+ --enable-gprof) gprof="yes"
+ ;;
+ esac
+done
+
+echo "Install prefix $prefix"
+echo "C compiler $cc"
+echo "CPU $cpu"
+echo "MMX enabled $mmx"
+echo "gprof enabled $gprof"
+
+echo "Creating config.mk and config.h"
+
+echo "# Automatically generated by configure - do not modify" > config.mk
+echo "/* Automatically generated by configure - do not modify */" > config.h
+
+echo "PREFIX=$prefix" >> config.mk
+echo "CC=$cc" >> config.mk
+echo "AR=$ar" >> config.mk
+if [ "$cpu" = "x86" ] ; then
+ echo "CONFIG_CPU_X86=y" >> config.mk
+ echo "#define CONFIG_CPU_X86 1" >> config.h
+fi
+if [ "$mmx" = "yes" ] ; then
+ echo "CONFIG_MMX=y" >> config.mk
+ echo "#define CONFIG_MMX 1" >> config.h
+fi
+if [ "$gprof" = "yes" ] ; then
+ echo "CONFIG_GPROF=y" >> config.mk
+ echo "#define CONFIG_GPROF 1" >> config.h
+fi