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

📄 configure.in

📁 SFC游戏模拟器 snes9x 1.43 的原代码
💻 IN
📖 第 1 页 / 共 2 页
字号:
AC_REVISION("$Id: configure.in,v 1.33 2004/03/20 20:01:43 anomie Exp $")AC_INIT(snes9x.h)dnl AC_CANONICAL_SYSTEMdnl Some compatibility with Autoconf 2.50+. Not complete.dnl newer Autoconf calls substr m4_substrifdef([substr], ,[m4_copy([m4_substr],[substr])])dnl Autoconf 2.53+ hides their version numbers in m4_PACKAGE_VERSION.ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])AC_PROG_CCAC_PROG_CXXAC_LANG_CPLUSPLUSdnl echo $cross_compiling#FIXME: Warn about glide, opengl and aido mutually exclusivity.#FIXME: Make svgalib build part of this and clean up the Makefile	AC_DEFUN([AC_SYS_COMPILER_FLAG],[  AC_MSG_CHECKING($1)  AC_CACHE_VAL(snes9x_cv_option_$2,  [    OLD_CXXFLAGS="[$]CXXFLAGS"    CXXFLAGS="[$]OLD_CXXFLAGS $1"    old_ac_link="[$]ac_link"    ac_link="[$]old_ac_link 2>conftezt.out.2"    AC_TRY_RUN([      int foo;      int main(int argc, char **argv)      {        /* The following code triggs gcc:s generation of aline opcodes,	 * which some versions of as does not support.	 */	if (argc > 0) argc = 0;	return argc;      }    ],snes9x_cv_option_$2=yes,      snes9x_cv_option_$2=no, [      AC_TRY_LINK([], [], snes9x_cv_option_$2=yes, snes9x_cv_option_$2=no)    ])    CXXFLAGS="[$]OLD_CXXFLAGS"    ac_link="[$]old_ac_link"    if grep -i 'unrecognized option' <conftezt.out.2 >/dev/null; then      snes9x_cv_option_$2=no    elif grep -i 'unknown option' <conftezt.out.2 >/dev/null; then      # cc/HPUX says the following regarding -q64:      #      # cc: warning 422: Unknown option "6" ignored.      # cc: warning 422: Unknown option "4" ignored.      snes9x_cv_option_$2=no    elif grep -i 'optimizer bugs' <conftezt.out.2 >/dev/null; then      # gcc/FreeBSD-4.6/alpha says the following regarding -O2:      #      # cc1: warning:       # ***      # ***     The -O2 flag TRIGGERS KNOWN OPTIMIZER BUGS ON THIS PLATFORM      # ***      snes9x_cv_option_$2=no    elif grep -i 'not found' <conftezt.out.2 >/dev/null; then      # cc/AIX says the following regarding +O3:      #      # cc: 1501-228 input file +O3 not found      snes9x_cv_option_$2=no    elif grep -i 'ignored' <conftezt.out.2 >/dev/null; then      # gcc/AIX says the following regarding -fpic:      #      # cc1: warning: -fpic ignored (all code is position independent)      snes9x_cv_option_$2=no    else :; fi#    rm conftezt.out.2  ])  if test x"[$]snes9x_cv_option_$2" = "xyes" ; then    $3="[$]$3 $1"    case "$3" in      OPTIMIZE)        CXXFLAGS="[$]CXXFLAGS $1"      ;;    esac    AC_MSG_RESULT(yes)    $5  else    AC_MSG_RESULT(no)    $4  fi])AC_DEFUN(AC_MY_CHECK_TYPE,[AC_MSG_CHECKING([for $1])AC_CACHE_VAL(ac_cv_type_$1,[AC_TRY_COMPILE([#include <sys/types.h>#if STDC_HEADERS#include <stdlib.h>#include <stddef.h>#endif$3],[$1 tmp;],ac_cv_type_$1=yes,ac_cv_type_$1=no)])if test $ac_cv_type_$1 = no; then  AC_DEFINE($1,$2)  AC_MSG_RESULT(no)else  AC_MSG_RESULT(yes)fi])AC_MY_CHECK_TYPE(size_t,unsigned long)AC_DEFUN([AC_ADD_XFLAGS],[	CFLAGS="$CFLAGS $X_INCLUDES"	CPPFLAGS="$CPPFLAGS $X_INCLUDES"	LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"])dnl dnl SNES9X_FEATURE_CLEAR()dnl SNES9X_FEATURE(feature,text)dnldefine(SNES9X_FEATURE_CLEAR,[  rm snes9x_*.feature 2>/dev/null])define(SNES9X_FEATURE_RAW,[  cat >snes9x_[$1].feature <<EOF[$2]EOF])define([PAD_FEATURE],[substr([$1][................................],0,20) ])define(SNES9X_FEATURE_3,[  cat >snes9x_[$1].feature <<EOFPAD_FEATURE([$2])[$3]EOF])define(SNES9X_FEATURE,[  SNES9X_FEATURE_3(translit([[$1]],[. ()],[____]),[$1],[$2])])define(SNES9X_FEATURE_WITHOUT,[  SNES9X_FEATURE([$1],[no (forced without)])])define(SNES9X_FEATURE_NODEP,[  SNES9X_FEATURE([$1],[no (dependencies failed)])])define(SNES9X_FEATURE_OK,[  SNES9X_FEATURE([$1],[yes])])dnl *****************************dnl *** Execution begins here ***dnl *****************************dnl We want an absolute path to the source-dir.case "$srcdir" in    /*)    ;;    *)	oldsrcdir="$srcdir"	srcdir="`cd \"$srcdir\";pwd`"	AC_MSG_WARN([Converted $oldsrcdir to $srcdir,If this does not work, please use an absolute path to the configure script. ])    ;;esacdnl Test what compiler flags we should useAC_ARG_WITH(debug,    [  --with(out)-debug       Leave debug information in the final binary (default: without)],[],[with_debug=no])OPTIMIZE="${OPTFLAGS-}"RTTIFLAG=""if test yes = "$with_debug" ; then  AC_SYS_COMPILER_FLAG(-g, debuginfo, OPTIMIZE)fiAC_ARG_WITH(mcpu,     [  --with-mcpu             Use the specified value for the -mcpu flag (default: auto)],[],[with_mcpu=auto])dnl AC_ARG_WITH(march,    [  --with-march         Use the specified value for the -march flag (default: none, but see --with-mcpu)],[],[with_march=no])if test "${with_march+set}" != set; then  with_march=nofiif test no = "$with_march" ; then  if test auto = "$with_mcpu" ; then    AC_SYS_COMPILER_FLAG(-mcpu=ultrasparc, ultrasparc, OPTIMIZE, [      AC_SYS_COMPILER_FLAG(-mcpu=supersparc, supersparc, OPTIMIZE)    ])  elif test no != "$with_mcpu" ; then    AC_SYS_COMPILER_FLAG(-mcpu=$with_mcpu, custom_mcpu, OPTIMIZE, [AC_MSG_ERROR([Please specify a working value for --with-mcpu, or use --with-mcpu=auto])])    unset snes9x_cv_option_custom_mcpu  fielse  if test auto != "$with_mcpu" ; then    AC_MSG_WARN([--with(out)-mcpu ignored because --with-march specified])  fi  AC_MSG_WARN([You specified --with-march. I hope you know what you're doing, since])  AC_MSG_WARN([*** MISUSING THIS OPTION WILL CAUSE SNES9X TO CRASH! ***])  AC_SYS_COMPILER_FLAG(-march=$with_march, custom_march, OPTIMIZE, [AC_MSG_ERROR([Please specify a working value for --with-march, or use --without-march])])  unset snes9x_cv_option_custom_marchfiAC_SYS_COMPILER_FLAG(-O2, o2, OPTIMIZE, [  AC_SYS_COMPILER_FLAG(-O1, o1, OPTIMIZE)])AC_SYS_COMPILER_FLAG(-fomit-frame-pointer, omit_frame_pointer, OPTIMIZE)AC_SYS_COMPILER_FLAG(-fno-exceptions, no_exceptions, OPTIMIZE)AC_SYS_COMPILER_FLAG(-Wall, Wall, OPTIMIZE)AC_SYS_COMPILER_FLAG(-W, W, OPTIMIZE)AC_SYS_COMPILER_FLAG(-pedantic, pedantic, OPTIMIZE)dnl FIXME: Most of these should be fixed, but several are part of the API.AC_SYS_COMPILER_FLAG(-Wno-unused-parameter, Wno_unused_parameter, OPTIMIZE)AC_SYS_COMPILER_FLAG(-pipe, pipe, OPTIMIZE)AC_SYS_COMPILER_FLAG(-fno-rtti, no_rtti, RTTIFLAG)dnl AC_ARG_WITH(extra_opt,[  --with(out)-extra-opt     Use extra optimization flags (default: none)],[],[with_extra_opt=no])if test "${with_extra_opt+set}" != set; then  with_extra_opt=nofiif test no != "$with_extra_opt" ; then  AC_MSG_WARN([You specified --with-extra-opt. I hope you know what you're doing, since])  AC_MSG_WARN([*** MISUSING THIS OPTION WILL CAUSE SNES9X TO CRASH! ***])  AC_SYS_COMPILER_FLAG($with_extra_opt, custom_opt, OPTIMIZE, [AC_MSG_ERROR([Please specify a working value for --with-extra-opt, or use --without-extra-opt])])  unset snes9x_cv_option_custom_optfiZSNESFX='#ZSNESFX=1'ZSNESC4='#ZSNESC4=1'ASMCPU='#ASMCPU=1'ASMKREED='#ASMKREED=1'SDD1_DECOMP='#SDD1_DECOMP=1'JMA='#JMA=1'SPC700ASM='#SPC700ASM=1'I386SPC=''CPUINC=''DREAMCAST='#DREAMCAST=1'SYSDEFINES=''SYSLIBS=''NASM='not_found'dnl Display outputAC_ARG_WITH(glide,    [  --with(out)-glide       Use 3Dfx glide for output (default: without)],[],[with_glide=no])AC_ARG_WITH(opengl,   [  --with(out)-opengl      Use OpenGL for output (default: without)],[],[with_opengl=no])AC_ARG_WITH(aido,     [  --with(out)-aido        Use a shared memory area for output (default: without)],[],[with_aido=no])GLIDE='#GLIDE=1'AIDO='#AIDO=1'OPENGL='#OPENGL=1'snes9x_info_display=X11if test yes = "$with_glide" ; then  GLIDE='GLIDE=1'  snes9x_info_display=Glideelse  if test yes = "$with_opengl" ; then    OPENGL='OPENGL=1'    snes9x_info_display="OpenGL on X11"  else    if test yes = "$with_aido" ; then      AIDO='AIDO=1'      snes9x_info_display="X11 and AIDO"    fi  fifiAC_MSG_CHECKING(if the CPU is IA32)AC_CACHE_VAL(snes9x_cv_i386_cpu, [  AC_TRY_COMPILE([#if (defined (__i386__) || defined (__i486__) ||\     defined (__i586__) || defined (__WIN32__) || defined (__DJGPP))/* */#else#error Not i386.#endif  ], [], snes9x_cv_i386_cpu=yes, snes9x_cv_i386_cpu=no)])AC_MSG_RESULT($snes9x_cv_i386_cpu)AC_MSG_CHECKING(if the OS is Linux)AC_CACHE_VAL(snes9x_cv_linux_os, [  AC_TRY_COMPILE([#ifdef __linux/* */#else#error Not Linux.#endif  ], [], snes9x_cv_linux_os=yes, snes9x_cv_linux_os=no)])AC_MSG_RESULT($snes9x_cv_linux_os)AC_MSG_CHECKING(if the OS is HP-UX)AC_CACHE_VAL(snes9x_cv_hpux_os, [  AC_TRY_COMPILE([#ifdef __hpux/* */#else#error Not Hpux.#endif  ], [], snes9x_cv_hpux_os=yes, snes9x_cv_hpux_os=no)])AC_MSG_RESULT($snes9x_cv_hpux_os)AC_MSG_CHECKING(if the OS is MS Windows)AC_CACHE_VAL(snes9x_cv_win32_os, [  AC_TRY_COMPILE([#if defined (__WIN32__)/* */#else#error Not win32.#endif  ], [], snes9x_cv_win32_os=yes, snes9x_cv_win32_os=no)])AC_MSG_RESULT($snes9x_cv_win32_os)dnl Enable assembler optimizations if CPU is x86AC_ARG_WITH(assembler,[  --with(out)-assembler   Use assembler cores if available (default: with)],[],[with_assembler=yes])if test yes = "$with_assembler"; then  dnl Set assembler to !nasm on Windows  if test yes = "$snes9x_cv_win32_os"; then    NASM='rntcl'    SNES9X_FEATURE([using asm cores],[no (using rntcl)])  else    AC_PATH_PROG(prog_nasm, nasm, no)    if test "x$ac_cv_path_prog_nasm" = "xno"; then      if test yes = "$snes9x_cv_i386_cpu"; then        AC_MSG_WARN([No nasm found. Will build without assembler optimizations.])        SNES9X_FEATURE([using asm cores],[no (nasm not found)])      fi    else      if test yes = "$snes9x_cv_i386_cpu"; then        NASM="$ac_cv_path_prog_nasm"      fi    fi  fifiif test $NASM != "not_found"; then  ZSNESFX='ZSNESFX=1'  ZSNESC4='ZSNESC4=1'  ASMCPU='ASMCPU=1'  ASMKREED='ASMKREED=1'#  SPC700ASM='SPC700ASM=1'  I386SPC='i386/SPC.O'  CPUINC='-Ii386'  SNES9X_FEATURE([using asm cores],[yes])else  SYSDEFINES="$SYSDEFINES"' -DNOASM'  if test yes != "$with_assembler"; then    SNES9X_FEATURE_WITHOUT([using asm cores])  else if test yes != "$snes9x_cv_i386_cpu"; then    SNES9X_FEATURE([using asm cores],[no (not available for your CPU)])  fi; fifidnl Enable joystick support on LinuxAC_ARG_WITH(joystick, [  --with(out)-joystick    Enable joystick support if available (default: with)],[],[with_joystick=yes])if test yes = "$snes9x_cv_linux_os" -a yes = "$with_joystick"; then   JOYDEFINES=' -DJOYSTICK_SUPPORT'else   with_joystick="no"fidnl Enable debuggerAC_ARG_WITH(debugger, [  --with(out)-debugger    Enable debugger (default: without)],[],[with_debugger=no])if test yes = "$with_debugger"; then   SYSDEFINES="$SYSDEFINES"' -DDEBUGGER'fidnl Enable Dreamcast build (FIXME: Make this a more normal cross compile.)AC_ARG_WITH(dreamcast,[  --with(out)-dreamcast   Build for Dreamcast (default: without)],[],[with_dreamcast=no])if test yes = "$with_dreamcast"; then   DREAMCAST='DREAMCAST=1'   CPUINC='-Ish'fidnl Enable SDD1 decompression if requestedAC_ARG_WITH(sdd1-decomp,[  --with(out)-sdd1-decomp Use SDD1 decompression (default: with)],[],[with_sdd1_decomp=yes])if test yes = "$with_sdd1_decomp"; then   SDD1_DECOMP='SDD1_DECOMP=1'fidnl Enable debuggerAC_ARG_WITH(jmadecomp, [  --with(out)-jma    Enable JMA archive decompression (default: without)],[],[with_jmadecomp=no])if test yes = "$with_jmadecomp"; then   JMA='JMA=1'fidnl Enable maxcount hackAC_ARG_WITH(maxcount, [  --with(out)-maxcount    Enable maxcount debugger (default: without)],[],[with_maxcount=no])if test yes = "$with_maxcount"; then   SYSDEFINES="$SYSDEFINES"' -DDEBUG_MAXCOUNT'fidnl Enable maxcount hackdnl FIXME: There is a third case (OLD) that is missed with this.AC_ARG_WITH(newblend, [  --with(out)-newblend    New colour blender (default: without)],[],[with_newblend=no])if test yes = "$with_newblend"; then   SYSDEFINES="$SYSDEFINES"' -DNEW_COLOUR_BLENDING'else

⌨️ 快捷键说明

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