Skip to content
Snippets Groups Projects
configure 27.6 KiB
Newer Older
  • Learn to ignore specific revisions
  • fi
    
    if test "$dlfcn" = "yes" ; then
      echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
    fi
    
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
    if test "$audio_oss" = "yes" ; then
      echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
      echo "CONFIG_AUDIO_OSS=yes" >> config.mak
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
    fi
    
    
    if test "$audio_beos" = "yes" ; then
      echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
      echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
    fi
    
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
    if test "$network" = "yes" ; then
      echo "#define CONFIG_NETWORK 1" >> $TMPH
      echo "CONFIG_NETWORK=yes" >> config.mak
    
    if test "$zlib" = "yes" ; then
      echo "#define CONFIG_ZLIB 1" >> $TMPH
      echo "CONFIG_ZLIB=yes" >> config.mak
    fi
    
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
    if test "$mp3lame" = "yes" ; then
    
      echo "#define CONFIG_MP3LAME 1" >> $TMPH
    
      echo "CONFIG_MP3LAME=yes" >> config.mak
    fi
    
    
    if test "$vorbis" = "yes" ; then
      echo "#define CONFIG_VORBIS 1" >> $TMPH
      echo "CONFIG_VORBIS=yes" >> config.mak
    fi
    
    
    if test "$faad" = "yes" ; then
      echo "#define CONFIG_FAAD 1" >> $TMPH
      echo "CONFIG_FAAD=yes" >> config.mak
    fi
    
    if test "$faadbin" = "yes" ; then
      echo "#define CONFIG_FAADBIN 1" >> $TMPH
    
      echo "CONFIG_FAADBIN=yes" >> config.mak
    
    if test "$mingw32" = "yes" ; then
      echo "#define CONFIG_WIN32 1" >> $TMPH
      echo "CONFIG_WIN32=yes" >> config.mak
    
      echo "#define __MINGW32__ 1" >> $TMPH
    
    if test "$cygwin" = "yes" ; then
      # setup correct exesuffix
      echo "CONFIG_WIN32=yes" >> config.mak
    fi
    
    
    if test "$os2" = "yes" ; then
      echo "#define CONFIG_OS2 1" >> $TMPH
      echo "CONFIG_OS2=yes" >> config.mak
    fi
    
    
    if test "$TARGET_OS" = "SunOS" ; then
      echo "#define CONFIG_SUNOS 1" >> $TMPH
    fi
    
    
    if test "$darwin" = "yes"; then
      echo "#define CONFIG_DARWIN 1"  >> $TMPH
      echo "CONFIG_DARWIN=yes" >> config.mak
    fi
    
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
    if test "$_malloc_h" = "yes" ; then
    
      echo "#define HAVE_MALLOC_H 1" >> $TMPH
    
    Nick Kurshev's avatar
    Nick Kurshev committed
    else
    
      echo "#undef  HAVE_MALLOC_H" >> $TMPH
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
    if test "$_memalign" = "yes" ; then
    
      echo "#define HAVE_MEMALIGN 1" >> $TMPH
    else
      echo "#undef  HAVE_MEMALIGN" >> $TMPH
    fi
    
    
    if test "$netserver" = "yes" ; then
      echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
      echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
    fi
    
    
    if test "$need_inet_aton" = "yes" ; then
      echo "NEED_INET_ATON=yes" >> config.mak
    fi
    
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
    if test "$simpleidct" = "yes" ; then
    
      echo "#define SIMPLE_IDCT 1" >> $TMPH
    fi
    
    
    if test "$ffserver" = "yes" ; then
      echo "#define CONFIG_FFSERVER 1" >> $TMPH
      echo "CONFIG_FFSERVER=yes" >> config.mak
    fi
    
    
    if test "$ffplay" = "yes" ; then
      echo "CONFIG_FFPLAY=yes" >> config.mak
    fi
    
    
    if test "$risky" = "yes" ; then
      echo "#define CONFIG_RISKY 1" >> $TMPH
      echo "CONFIG_RISKY=yes" >> config.mak
    fi
    
    
    echo "#define restrict $_restrict" >> $TMPH
    
    
    # build tree in object directory if source path is different from current one
    if test "$source_path_used" = "yes" ; then
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
        DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
    
              libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
        FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
    
        for dir in $DIRS ; do
                mkdir -p $dir
        done
        for f in $FILES ; do
            ln -sf $source_path/$f $f
        done
    fi
    echo "SRC_PATH=$source_path" >> config.mak
    
    
    if test "$amr_nb" = "yes" ; then
      echo "#define AMR_NB 1" >> $TMPH
      echo "AMR_NB=yes" >> config.mak
      echo
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
    if test "$amr_nb_fixed" = "yes" ; then
      echo "AMR_NB_FIXED=yes" >> config.mak
      echo "#define AMR_NB_FIXED 1" >> $TMPH
      echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
      echo "REL-5 version 5.1.0 from "
    
      echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
      echo "and extracted src to libavcodec/amr"
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
      echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
      echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
      echo
    else
      echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
      echo "REL-5 V5.1.0 from "
      echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
      echo "and extracted the source to libavcodec/amr_float"
    
    diff $TMPH config.h >/dev/null 2>&1
    
    if test $? -ne 0 ; then
    	mv -f $TMPH config.h
    
    Nick Kurshev's avatar
    Nick Kurshev committed
    else
    
    	echo "config.h is unchanged"
    
    rm -f $TMPO $TMPC $TMPE $TMPS $TMPH