⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure

📁 qemu虚拟机代码
💻
📖 第 1 页 / 共 2 页
字号:
#!/bin/sh## qemu configure script (c) 2003 Fabrice Bellard## set temporary file nameif test ! -z "$TMPDIR" ; then    TMPDIR1="${TMPDIR}"elif test ! -z "$TEMPDIR" ; then    TMPDIR1="${TEMPDIR}"else    TMPDIR1="/tmp"fiTMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c"TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o"TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}"TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S"# default parametersprefix=""interp_prefix="/usr/gnemul/qemu-%M"static="no"cross_prefix=""cc="gcc"host_cc="gcc"ar="ar"make="make"install="install"strip="strip"cpu=`uname -m`target_list=""case "$cpu" in  i386|i486|i586|i686|i86pc|BePC)    cpu="i386"  ;;  armv*b)    cpu="armv4b"  ;;  armv*l)    cpu="armv4l"  ;;  alpha)    cpu="alpha"  ;;  "Power Macintosh"|ppc|ppc64)    cpu="powerpc"  ;;  mips)    cpu="mips"  ;;  s390)    cpu="s390"  ;;  sparc|sun4[muv])    cpu="sparc"  ;;  sparc64)    cpu="sparc64"  ;;  ia64)    cpu="ia64"  ;;  m68k)    cpu="m68k"  ;;  x86_64|amd64)    cpu="x86_64"  ;;  *)    cpu="unknown"  ;;esacgprof="no"bigendian="no"mingw32="no"EXESUF=""gdbstub="yes"slirp="yes"adlib="no"oss="no"dsound="no"coreaudio="no"alsa="no"fmod="no"fmod_lib=""fmod_inc=""bsd="no"linux="no"kqemu="no"profiler="no"kernel_path=""cocoa="no"check_gfx="yes"check_gcc="yes"softmmu="yes"user="no"build_docs="no"# OS specifictargetos=`uname -s`case $targetos inCYGWIN*)mingw32="yes"CFLAGS="-O2 -mno-cygwin";;MINGW32*)mingw32="yes";;FreeBSD)bsd="yes"oss="yes"if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then    kqemu="yes"fi;;NetBSD)bsd="yes"oss="yes";;OpenBSD)bsd="yes"oss="yes";;Darwin)bsd="yes"darwin="yes";;SunOS)solaris="yes";;*)oss="yes"linux="yes"user="yes"if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then    kqemu="yes"fi;;esacif [ "$bsd" = "yes" ] ; then  if [ "$darwin" != "yes" ] ; then    make="gmake"  fifiif [ "$solaris" = "yes" ] ; then    make="gmake"    install="ginstall"    solarisrev=`uname -r | cut -f2 -d.`fi# find source pathsource_path=`dirname "$0"`if [ -z "$source_path" ]; then    source_path=`pwd`else    source_path=`cd "$source_path"; pwd`fiif test "$source_path" = `pwd` ; then    source_path_used="no"else    source_path_used="yes"fifor opt do  optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`  case "$opt" in  --help|-h) show_help=yes  ;;  --prefix=*) prefix="$optarg"  ;;  --interp-prefix=*) interp_prefix="$optarg"  ;;  --source-path=*) source_path="$optarg"  source_path_used="yes"  ;;  --cross-prefix=*) cross_prefix="$optarg"  ;;  --cc=*) cc="$optarg"  ;;  --host-cc=*) host_cc="$optarg"  ;;  --make=*) make="$optarg"  ;;  --install=*) install="$optarg"  ;;  --extra-cflags=*) CFLAGS="$optarg"  ;;  --extra-ldflags=*) LDFLAGS="$optarg"  ;;  --cpu=*) cpu="$optarg"  ;;  --target-list=*) target_list="$optarg"  ;;  --enable-gprof) gprof="yes"  ;;  --static) static="yes"  ;;  --disable-sdl) sdl="no"  ;;  --enable-coreaudio) coreaudio="yes"  ;;  --enable-alsa) alsa="yes"  ;;  --enable-dsound) dsound="yes"  ;;  --enable-fmod) fmod="yes"  ;;  --fmod-lib=*) fmod_lib="$optarg"  ;;  --fmod-inc=*) fmod_inc="$optarg"  ;;  --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"  ;;  --disable-slirp) slirp="no"  ;;  --enable-adlib) adlib="yes"  ;;  --disable-kqemu) kqemu="no"  ;;  --enable-profiler) profiler="yes"  ;;  --kernel-path=*) kernel_path="$optarg"  ;;  --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no"  ;;  --disable-gfx-check) check_gfx="no"  ;;  --disable-gcc-check) check_gcc="no"  ;;  --disable-system) softmmu="no"  ;;  --enable-system) softmmu="yes"  ;;  --disable-user) user="no"  ;;  --enable-user) user="yes"  ;;  esacdone# Checking for CFLAGSif test -z "$CFLAGS"; then    CFLAGS="-O2"fiif test x"$show_help" = x"yes" ; thencat << EOFUsage: configure [options]Options: [defaults in brackets after descriptions]EOFecho "Standard options:"echo "  --help                   print this message"echo "  --prefix=PREFIX          install in PREFIX [$prefix]"echo "  --interp-prefix=PREFIX   where to find shared libraries, etc."echo "                           use %M for cpu name [$interp_prefix]"echo "  --target-list=LIST       set target list [$target_list]"echo ""echo "kqemu kernel acceleration support:"echo "  --disable-kqemu          disable kqemu support"echo "  --kernel-path=PATH       set the kernel path (configure probes it)"echo ""echo "Advanced options (experts only):"echo "  --source-path=PATH       path of source code [$source_path]"echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"echo "  --cc=CC                  use C compiler CC [$cc]"echo "  --host-cc=CC             use C compiler CC [$host_cc] for dyngen etc."echo "  --make=MAKE              use specified make [$make]"echo "  --install=INSTALL        use specified install [$install]"echo "  --static                 enable static build [$static]"echo "  --enable-cocoa           enable COCOA (Mac OS X only)"echo "  --enable-mingw32         enable Win32 cross compilation with mingw32"echo "  --enable-adlib           enable Adlib emulation"echo "  --enable-coreaudio       enable Coreaudio audio driver"echo "  --enable-alsa            enable ALSA audio driver"echo "  --enable-fmod            enable FMOD audio driver"echo "  --enabled-dsound         enable DirectSound audio driver"echo "  --enable-system          enable all system emulation targets"echo "  --disable-system         disable all system emulation targets"echo "  --enable-user            enable all linux usermode emulation targets"echo "  --disable-user           disable all linux usermode emulation targets"echo "  --fmod-lib               path to FMOD library"echo "  --fmod-inc               path to FMOD includes"echo ""echo "NOTE: The object files are build at the place where configure is launched"exit 1ficc="${cross_prefix}${cc}"ar="${cross_prefix}${ar}"strip="${cross_prefix}${strip}"if [ ! -x "`which $cc`" ] ; then    echo "Compiler $cc could not be found"    exitfiif test "$mingw32" = "yes" ; then    linux="no"    EXESUF=".exe"    gdbstub="no"    oss="no"    if [ "$cpu" = "i386" ] ; then        kqemu="yes"    fifi## Solaris specific configure tool chain decisions#if test "$solaris" = "yes" ; then  #  # gcc for solaris 10/fcs in /usr/sfw/bin doesn't compile qemu correctly  # override the check with --disable-gcc-check  #   if test "$solarisrev" -eq 10 -a "$check_gcc" = "yes" ; then    solgcc=`which $cc`    if test "$solgcc" = "/usr/sfw/bin/gcc" ; then      echo "Solaris 10/FCS gcc in /usr/sfw/bin will not compiled qemu correctly."      echo "please get gcc-3.4.3 or later, from www.blastwave.org using pkg-get -i gcc3"      echo "or get the latest patch from SunSolve for gcc"      exit 1    fi  fi  solinst=`which $install 2> /dev/null | /usr/bin/grep -v "no $install in"`  if test -z "$solinst" ; then    echo "Solaris install program not found. Use --install=/usr/ucb/install or"    echo "install fileutils from www.blastwave.org using pkg-get -i fileutils"    echo "to get ginstall which is used by default (which lives in /opt/csw/bin)"    exit 1  fi  if test "$solinst" = "/usr/sbin/install" ; then    echo "Error: Solaris /usr/sbin/install is not an appropriate install program."    echo "try ginstall from the GNU fileutils available from www.blastwave.org"    echo "using pkg-get -i fileutils, or use --install=/usr/ucb/install"    exit 1  fi  sol_ar=`which ar 2> /dev/null | /usr/bin/grep -v "no ar in"`  if test -z "$sol_ar" ; then    echo "Error: No path includes ar"    if test -f /usr/ccs/bin/ar ; then      echo "Add /usr/ccs/bin to your path and rerun configure"    fi    exit 1  fifi if test -z "$target_list" ; then# these targets are portable    if [ "$softmmu" = "yes" ] ; then        target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu"    fi# the following are Linux specific    if [ "$user" = "yes" ] ; then        target_list="i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user $target_list"    fielse    target_list=`echo "$target_list" | sed -e 's/,/ /g'`fiif test -z "$target_list" ; then    echo "No targets enabled"    exit 1fiif test -z "$cross_prefix" ; then# ---# big/little endian testcat > $TMPC << EOF#include <inttypes.h>int main(int argc, char ** argv){        volatile uint32_t i=0x01234567;        return (*((uint8_t*)(&i))) == 0x67;}EOFif $cc -o $TMPE $TMPC 2>/dev/null ; then$TMPE && bigendian="yes"elseecho big/little test failedfielse# if cross compiling, cannot launch a program, so make a static guessif test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then    bigendian="yes"fifi# host long bits testhostlongbits="32"if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then    hostlongbits="64"fi# check gcc options supportcat > $TMPC <<EOFint main(void) {}EOFhave_gcc3_options="no"if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then   have_gcc3_options="yes"fi# Check for gcc4, error if pre-gcc4 if test "$check_gcc" = "yes" ; then    cat > $TMPC <<EOF#if __GNUC__ < 4#error gcc3#endifint main(){return 0;}EOF    if $cc -o $TMPO $TMPC 2>/dev/null ; then        echo "ERROR: \"$cc\" looks like gcc 4.x"        echo "QEMU is known to have problems when compiled with gcc 4.x"        echo "It is recommended that you use gcc 3.x to build QEMU"        echo "To use this compiler anyway, configure with --disable-gcc-check"        exit 1;    fifi########################################### SDL probesdl_too_old=noif test -z "$sdl" ; thensdl_config="sdl-config"sdl=no

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -