📄 configure.in
字号:
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-opcode=file");; *) if test -f "${srcdir}/${enableval}"; then sim_opcode="${enableval}" elif test -f "${srcdir}/dc-${enableval}"; then sim_opcode="dc-${enableval}" else AC_MSG_ERROR("File $enableval is not an opcode rules file"); sim_opcode="dc-complex" fi;;esacif test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then echo "Setting opcode flags = $sim_opcode" 6>&1fi],[sim_opcode="dc-complex"if test x"$silent" != x"yes"; then echo "Setting opcode flags = $sim_opcode"fi])dnlAC_ARG_ENABLE(sim-packages,[ --enable-sim-packages=list Specify the packages to be included in the build.],[packages=disklabelcase "${enableval}" in yes) ;; no) AC_MSG_ERROR("List of packages must be specified for --enable-sim-packages"); packages="";; ,*) packages="${packages}${enableval}";; *,) packages="${enableval}${packages}";; *) packages="${enableval}"'';;esacsim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'`sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'`if test x"$silent" != x"yes" && test x"$packages" != x""; then echo "Setting packages to $sim_pk_src, $sim_pk_obj"fi],[packages=disklabelsim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'`sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'`if test x"$silent" != x"yes"; then echo "Setting packages to $sim_pk_src, $sim_pk_obj"fi])dnlAC_ARG_ENABLE(sim-regparm,[ --enable-sim-regparm=nr-parm Pass parameters in registers instead of on the stack - x86/GCC specific.],[case "${enableval}" in 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";; no) sim_regparm="" ;; yes) sim_regparm="-DWITH_REGPARM=3";; *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-regparm"); sim_regparm="";;esacif test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then echo "Setting regparm flags = $sim_regparm" 6>&1fi],[sim_regparm=""])dnlAC_ARG_ENABLE(sim-reserved-bits,[ --enable-sim-reserved-bits Specify whether to check reserved bits in instruction.],[case "${enableval}" in yes) sim_reserved="-DWITH_RESERVED_BITS=1";; no) sim_reserved="-DWITH_RESERVED_BITS=0";; *) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); sim_reserved="";;esacif test x"$silent" != x"yes" && test x"$sim_reserved" != x""; then echo "Setting reserved flags = $sim_reserved" 6>&1fi],[sim_reserved=""])dnlAC_ARG_ENABLE(sim-smp,[ --enable-sim-smp=n Specify number of processors to configure for.],[case "${enableval}" in yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";; no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";; *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";;esacif test x"$silent" != x"yes" && test x"$sim_smp" != x""; then echo "Setting smp flags = $sim_smp" 6>&1fi],[sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5"if test x"$silent" != x"yes"; then echo "Setting smp flags = $sim_smp" 6>&1fi])dnlAC_ARG_ENABLE(sim-stdcall,[ --enable-sim-stdcall=type Use an alternative function call/return mechanism - x86/GCC specific.],[case "${enableval}" in no) sim_stdcall="" ;; std*) sim_stdcall="-DWITH_STDCALL=1";; yes) sim_stdcall="-DWITH_STDCALL=1";; *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-stdcall"); sim_stdcall="";;esacif test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then echo "Setting function call flags = $sim_stdcall" 6>&1fi],[sim_stdcall=""])dnlAC_ARG_ENABLE(sim-stdio,[ --enable-sim-stdio Specify whether to use stdio for console input/output.],[case "${enableval}" in yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-stdio"); sim_stdio="";;esacif test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then echo "Setting stdio flags = $sim_stdio" 6>&1fi],[sim_stdio=""])dnlAC_ARG_ENABLE(sim-switch,[ --enable-sim-switch Use a switch instead of a table for instruction call.],[case "${enableval}" in yes) sim_switch="-s";; no) sim_switch="";; *) AC_MSG_ERROR("--enable-sim-switch does not take a value"); sim_switch="";;esacif test x"$silent" != x"yes" && test x"$sim_switch" != x""; then echo "Setting switch flags = $sim_switch" 6>&1fi],[sim_switch="";if test x"$silent" != x"yes"; then echo "Setting switch flags = $sim_switch" 6>&1fi])dnlAC_ARG_ENABLE(sim-timebase,[ --enable-sim-timebase Specify whether the PPC timebase is supported.],[case "${enableval}" in yes) sim_timebase="-DWITH_TIME_BASE=1";; no) sim_timebase="-DWITH_TIME_BASE=0";; *) AC_MSG_ERROR("--enable-sim-timebase does not take a value"); sim_timebase="";;esacif test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then echo "Setting timebase flags = $sim_timebase" 6>&1fi],[sim_timebase=""])dnlAC_ARG_ENABLE(sim-trace,[ --enable-sim-trace Specify whether tracing is supported.],[case "${enableval}" in yes) sim_trace="-DWITH_TRACE=1";; no) sim_trace="-DWITH_TRACE=0";; *) AC_MSG_ERROR("--enable-sim-trace does not take a value"); sim_trace="";;esacif test x"$silent" != x"yes" && test x"$sim_trace" != x""; then echo "Setting trace flags = $sim_trace" 6>&1fi],[sim_trace=""])dnlAC_ARG_ENABLE(sim-warnings,[ --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o],[case "${enableval}" in yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";; no) sim_warnings="-w";; *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;esacif test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then echo "Setting warning flags = $sim_warnings" 6>&1fi],[sim_warnings=""])dnlAC_ARG_ENABLE(sim-xor-endian,[ --enable-sim-xor-endian=n Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).],[case "${enableval}" in yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";; no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";; *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;esacif test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then echo "Setting xor-endian flag = $sim_xor_endian" 6>&1fi],[sim_xor_endian=""])dnlAC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)AC_CANONICAL_SYSTEMAC_ARG_PROGRAM. ${srcdir}/../../bfd/configure.hostAC_CONFIG_HEADER(config.h:config.in)AC_STRUCT_ST_BLKSIZEAC_STRUCT_ST_BLOCKSAC_STRUCT_ST_RDEVAC_STRUCT_TIMEZONEAC_TYPE_GETGROUPSAC_TYPE_MODE_TAC_TYPE_OFF_TAC_TYPE_PID_TAC_TYPE_SIGNALAC_TYPE_SIZE_TAC_TYPE_UID_TAC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h)AC_HEADER_DIRENTdnl Figure out what type of termio/termios support there issim_termio=""AC_MSG_CHECKING(for struct termios)AC_CACHE_VAL(ac_cv_termios_struct,[AC_TRY_COMPILE([#include <sys/types.h>#include <sys/termios.h>],[static struct termios x; x.c_iflag = 0; x.c_oflag = 0; x.c_cflag = 0; x.c_lflag = 0; x.c_cc[NCCS] = 0;],ac_cv_termios_struct=yes, ac_cv_termios_struct=no)])AC_MSG_RESULT($ac_cv_termios_struct)if test $ac_cv_termios_struct = yes; then sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE"fiif test "$ac_cv_termios_struct" = "yes"; then AC_MSG_CHECKING(for c_line field in struct termios) AC_CACHE_VAL(ac_cv_termios_cline, [AC_TRY_COMPILE([#include <sys/types.h>#include <sys/termios.h>],[static struct termios x; x.c_line = 0;], ac_cv_termios_cline=yes, ac_cv_termios_cline=no)]) AC_MSG_RESULT($ac_cv_termios_cline) if test $ac_cv_termios_cline = yes; then sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE" fielse ac_cv_termios_cline=nofiif test "$ac_cv_termios_struct" != "yes"; then AC_MSG_CHECKING(for struct termio) AC_CACHE_VAL(ac_cv_termio_struct, [AC_TRY_COMPILE([#include <sys/types.h>#include <sys/termio.h>],[static struct termio x; x.c_iflag = 0; x.c_oflag = 0; x.c_cflag = 0; x.c_lflag = 0; x.c_cc[NCC] = 0;],ac_cv_termio_struct=yes, ac_cv_termio_struct=no)]) AC_MSG_RESULT($ac_cv_termio_struct) if test $ac_cv_termio_struct = yes; then sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE" fielse ac_cv_termio_struct=nofiif test "$ac_cv_termio_struct" = "yes"; then AC_MSG_CHECKING(for c_line field in struct termio) AC_CACHE_VAL(ac_cv_termio_cline, [AC_TRY_COMPILE([#include <sys/types.h>#include <sys/termio.h>],[static struct termio x; x.c_line = 0;], ac_cv_termio_cline=yes, ac_cv_termio_cline=no)]) AC_MSG_RESULT($ac_cv_termio_cline) if test $ac_cv_termio_cline = yes; then sim_termio="$sim_termio -DHAVE_TERMIO_CLINE" fielse ac_cv_termio_cline=nofidnl Check for struct statfsAC_MSG_CHECKING(for struct statfs)AC_CACHE_VAL(ac_cv_struct_statfs,[AC_TRY_COMPILE([#include <sys/types.h>#ifdef HAVE_SYS_PARAM_H#include <sys/param.h>#endif#ifdef HAVE_SYS_MOUNT_H#include <sys/mount.h>#endif#ifdef HAVE_SYS_VFS_H#include <sys/vfs.h>#endif#ifdef HAVE_SYS_STATFS_H#include <sys/statfs.h>#endif],[static struct statfs s;],ac_cv_struct_statfs=yes, ac_cv_struct_statfs=no)])AC_MSG_RESULT($ac_cv_struct_statfs)if test $ac_cv_struct_statfs = yes; then AC_DEFINE(HAVE_STRUCT_STATFS, 1, [Define if struct statfs is defined in <sys/mount.h>])fidnl Figure out if /dev/zero exists or notsim_devzero=""AC_MSG_CHECKING(for /dev/zero)AC_CACHE_VAL(ac_cv_devzero,[AC_TRY_RUN([#include <fcntl.h>main () { char buf[2048]; int i; int fd = open ("/dev/zero", O_RDONLY); if (fd < 0) return 1; for (i = 0; i < sizeof (buf); i++) buf[i] = 1; if (read (fd, buf, sizeof (buf)) != sizeof (buf)) return 1; for (i = 0; i < sizeof (buf); i++) if (buf[i]) return 1; return 0;}],[ac_cv_devzero=yes],[ac_cv_devzero=no],[ac_cv_devzero=no])])AC_MSG_RESULT($ac_cv_devzero)if test $ac_cv_devzero = yes; then sim_devzero="-DHAVE_DEVZERO"else sim_devzero=""fidnl Figure out if we are in the new Cygnus tree with a common directory or notAC_MSG_CHECKING(for common simulator directory)if test -f "${srcdir}/../common/callback.c"; then AC_MSG_RESULT(yes) sim_callback="callback.o targ-map.o" sim_targ_vals="targ-vals.h targ-map.c targ-vals.def"else AC_MSG_RESULT(no) sim_callback="" sim_targ_vals=""fiAC_MSG_CHECKING(for common simulator directory fpu implementation)if test -f "${srcdir}/../common/sim-fpu.c"; then AC_MSG_RESULT(yes) sim_fpu_cflags="-DHAVE_COMMON_FPU -I../common -I${srcdir}/../common" sim_fpu="sim-fpu.o"else AC_MSG_RESULT(no) sim_fpu_cflags= sim_fpu=fidnl Check for exe extensionAC_EXEEXTAC_SUBST(CC_FOR_BUILD)AC_SUBST(CFLAGS)AC_SUBST(HDEFINES)AR=${AR-ar}AC_SUBST(AR)AC_PROG_RANLIBAC_SUBST(sim_cflags)AC_SUBST(sim_warnings)AC_SUBST(sim_line_nr)AC_SUBST(sim_config)AC_SUBST(sim_opcode)AC_SUBST(sim_switch)AC_SUBST(sim_dup)AC_SUBST(sim_decode_mechanism)AC_SUBST(sim_jump)AC_SUBST(sim_filter)AC_SUBST(sim_icache)AC_SUBST(sim_hw_src)AC_SUBST(sim_hw_obj)AC_SUBST(sim_pk_src)AC_SUBST(sim_pk_obj)AC_SUBST(sim_inline)AC_SUBST(sim_bswap)AC_SUBST(sim_endian)AC_SUBST(sim_regparm)AC_SUBST(sim_stdcall)AC_SUBST(sim_xor_endian)AC_SUBST(sim_hostendian)AC_SUBST(sim_smp)AC_SUBST(sim_igen_smp)AC_SUBST(sim_bitsize)AC_SUBST(sim_hostbitsize)AC_SUBST(sim_env)AC_SUBST(sim_timebase)AC_SUBST(sim_alignment)AC_SUBST(sim_float)AC_SUBST(sim_trace)AC_SUBST(sim_assert)AC_SUBST(sim_reserved)AC_SUBST(sim_monitor)AC_SUBST(sim_model)AC_SUBST(sim_default_model)AC_SUBST(sim_model_issue)AC_SUBST(sim_stdio)AC_SUBST(sim_termio)AC_SUBST(sim_devzero)AC_SUBST(sim_callback)AC_SUBST(sim_targ_vals)AC_SUBST(sim_fpu_cflags)AC_SUBST(sim_fpu)AC_OUTPUT(Makefile,[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -