 -    fi
 -fi
 -if [ "$avis_input" = "yes" ] ; then
--    CFLAGS="$CFLAGS -DAVIS_INPUT"
+-    echo "#define AVIS_INPUT" >> config.h
 -    LDFLAGS="$LDFLAGS -lvfw32"
 -fi
 -

 echo "  --enable-avis-input      enables avisynth input (win32 only)"
 echo "  --enable-mp4-output      enables mp4 output (using gpac)"
 echo "  --enable-vfw             compiles the VfW frontend"
@@ -58,47 +59,138 @@
 
 EXE=""
 

   mips|mipsel)
     ARCH="MIPS"
     ;;
@@ -180,134 +273,6 @@

 CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"

-# parse options
-
-for opt do
