Commit a1b95317 authored by Loren Merritt's avatar Loren Merritt
Browse files

Configure tweaks. Allow avis-input in mingw. Turn off debug by default.


git-svn-id: svn://svn.videolan.org/x264/trunk@198 df754926-b1dd-0310-bc7b-ec298dee348c
parent 35d85ca6
......@@ -7,19 +7,21 @@ echo ""
echo "available options:"
echo ""
echo " --help print this message"
echo " --enable-avis-input enables avisynth input (cygwin only)"
echo " --enable-avis-input enables avisynth input (win32 only)"
echo " --enable-mp4-output enables mp4 output (using gpac)"
echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS"
echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS"
echo " --enable-debug adds -g, doesn't strip"
echo ""
exit 1
fi
avis_input="off"
mp4_output="off"
avis_input="no"
mp4_output="no"
debug="no"
CC="gcc"
CFLAGS="-g -Wall -I. -O4 -funroll-loops -D__X264__"
CFLAGS="-Wall -I. -O4 -funroll-loops -D__X264__"
LDFLAGS=""
AS="nasm"
......@@ -50,8 +52,8 @@ case "$UNAMES" in
LDFLAGS="$LDFLAGS -mno-cygwin"
ASFLAGS="-f win32 -DPREFIX"
;;
MINGW32*)
SYS="MINGW32"
MINGW*)
SYS="MINGW"
ASFLAGS="-f win32 -DPREFIX"
;;
*)
......@@ -91,10 +93,10 @@ CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
for opt do
case "$opt" in
--enable-avis-input)
if [ $SYS = CYGWIN ]; then
if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
CFLAGS="$CFLAGS -DAVIS_INPUT"
LDFLAGS="$LDFLAGS -lvfw32"
avis_input="on"
avis_input="yes"
fi
;;
--enable-mp4-output)
......@@ -103,18 +105,26 @@ for opt do
if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
LDFLAGS="$LDFLAGS -lwinmm"
fi
mp4_output="on"
mp4_output="yes"
;;
--extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
;;
--extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
;;
--enable-debug)
CFLAGS="$CFLAGS -g"
debug="yes"
;;
*)
echo "Unknown option $opt, ignored"
;;
esac
done
if [ "$debug" != "yes" ]; then
CFLAGS="$CFLAGS -s"
fi
rm -f config.mak
cat > config.mak << EOF
ARCH=$ARCH
......@@ -130,6 +140,7 @@ echo "Platform: $ARCH"
echo "System: $SYS"
echo "avis input: $avis_input"
echo "mp4 output: $mp4_output"
echo "debug: $debug"
echo
echo "You can run 'make' now."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment