Prepare config.h for dynrec cpu core.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2863
This commit is contained in:
parent
a9843a9297
commit
fb1ef3c95d
2 changed files with 51 additions and 17 deletions
60
configure.in
60
configure.in
|
@ -20,7 +20,7 @@ AC_PROG_INSTALL
|
|||
AC_PROG_RANLIB
|
||||
|
||||
dnl Some needed libaries for OS2
|
||||
dnl perharps join this with the other host depended checks. move them upwards
|
||||
dnl perharps join this with the other target depended checks. move them upwards
|
||||
if test x$target = xi386-pc-os2-emx ; then
|
||||
CXXFLAGS="$CXXFLAGS -Zmt"
|
||||
LDFLAGS="$LDFLAGS -Zomf -Zmt"
|
||||
|
@ -182,29 +182,35 @@ AC_ARG_ENABLE(core-inline,AC_HELP_STRING([--enable-core-inline],[Enable inlined
|
|||
|
||||
|
||||
dnl The target cpu checks for dynamic cores
|
||||
AH_TEMPLATE(C_HOSTCPU,[The type of cpu this host has])
|
||||
AH_TEMPLATE(C_TARGETCPU,[The type of cpu this target has])
|
||||
AC_MSG_CHECKING(for target cpu type)
|
||||
case "$target_cpu" in
|
||||
x86_64 | amd64)
|
||||
AC_DEFINE(C_TARGETCPU,X86_64)
|
||||
AC_MSG_RESULT(x86-64 bit compatible)
|
||||
c_targetcpu="x86_64"
|
||||
c_unalignedmemory=yes
|
||||
;;
|
||||
i?86)
|
||||
AC_DEFINE(C_HOSTCPU,X86)
|
||||
AC_DEFINE(C_TARGETCPU,X86)
|
||||
AC_MSG_RESULT(x86 compatible)
|
||||
c_hostcpu="x86"
|
||||
c_targetcpu="x86"
|
||||
c_unalignedmemory=yes
|
||||
;;
|
||||
powerpc*)
|
||||
AC_DEFINE(C_HOSTCPU,POWERPC)
|
||||
AC_DEFINE(C_TARGETCPU,POWERPC)
|
||||
AC_MSG_RESULT(Power PC)
|
||||
c_hostcpu="powerpc"
|
||||
c_targetcpu="powerpc"
|
||||
c_unalignedmemory=yes
|
||||
;;
|
||||
m68k*)
|
||||
AC_DEFINE(C_HOSTCPU,M68K)
|
||||
AC_DEFINE(C_TARGETCPU,M68K)
|
||||
AC_MSG_RESULT(Motorola 68000)
|
||||
c_hostcpu="m68k"
|
||||
c_targetcpu="m68k"
|
||||
c_unalignedmemory=yes
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(C_HOSTCPU,UNKOWN)
|
||||
AC_DEFINE(C_TARGETCPU,UNKNOWN)
|
||||
AC_MSG_RESULT(unknown)
|
||||
c_unalignedmemory=no
|
||||
;;
|
||||
|
@ -216,7 +222,7 @@ AC_MSG_CHECKING(whether x86 dynamic cpu core will be enabled)
|
|||
if test x$enable_dynamic_x86 = xno ; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
if test x$c_hostcpu = xx86 ; then
|
||||
if test x$c_targetcpu = xx86 ; then
|
||||
AC_DEFINE(C_DYNAMIC_X86,1)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
|
@ -224,6 +230,30 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
AH_TEMPLATE(C_DYNREC,[Define to 1 to use recompiling cpu core. Can not be used together with the dynamic-x86 core])
|
||||
AC_ARG_ENABLE(dynrec,AC_HELP_STRING([--disable-dynrec],[Disable recompiling cpu core]),,enable_dynrec=yes)
|
||||
AC_MSG_CHECKING(whether recompiling cpu core will be enabled)
|
||||
if test x$enable_dynrec = xno ; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
dnl x86 only enable it if dynamic-x86 is disabled.
|
||||
if test x$c_targetcpu = xx86 ; then
|
||||
if test x$enable_dynamic_x86 = xno ; then
|
||||
AC_DEFINE(C_DYNREC,1)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT([no, using dynamic-x86])
|
||||
fi
|
||||
else
|
||||
if test x$c_targetcpu = xx86_64 ; then
|
||||
AC_DEFINE(C_DYNREC,1)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AH_TEMPLATE(C_FPU,[Define to 1 to enable floating point emulation])
|
||||
AC_ARG_ENABLE(fpu,AC_HELP_STRING([--disable-fpu],[Disable fpu support]),,enable_fpu=yes)
|
||||
AC_MSG_CHECKING(whether fpu emulation will be enabled)
|
||||
|
@ -241,7 +271,7 @@ if test x$enable_fpu_x86 = xno ; then
|
|||
AC_MSG_RESULT(no)
|
||||
else
|
||||
if test x$enable_fpu = xyes; then
|
||||
if test x$c_hostcpu = xx86 ; then
|
||||
if test x$c_targetcpu = xx86 ; then
|
||||
AC_DEFINE(C_FPU_X86,1)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
|
@ -296,6 +326,9 @@ else
|
|||
fi
|
||||
|
||||
AH_TEMPLATE(C_OPENGL,[Define to 1 to use opengl display output support])
|
||||
AC_CHECK_LIB(GL, main, have_gl_lib=yes, have_gl_lib=no , )
|
||||
AC_CHECK_LIB(opengl32, main, have_opengl32_lib=yes,have_opengl32_lib=no , )
|
||||
AC_CHECK_HEADER(GL/gl.h, have_gl_h=yes , have_gl_h=no , )
|
||||
AC_ARG_ENABLE(opengl,AC_HELP_STRING([--disable-opengl],[Disable opengl support]),,enable_opengl=yes)
|
||||
AC_MSG_CHECKING(whether opengl display output will be enabled)
|
||||
if test x$enable_opengl = xyes; then
|
||||
|
@ -306,9 +339,6 @@ case "$target" in
|
|||
AC_DEFINE(C_OPENGL,1)
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(GL, main, have_gl_lib=yes, have_gl_lib=no , )
|
||||
AC_CHECK_LIB(opengl32, main, have_opengl32_lib=yes,have_opengl32_lib=no , )
|
||||
AC_CHECK_HEADER(GL/gl.h, have_gl_h=yes , have_gl_h=no , )
|
||||
if test x$have_gl_h = xyes -a x$have_gl_lib = xyes ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
LIBS="$LIBS -lGL"
|
||||
|
@ -356,7 +386,7 @@ int main(int argc,char * argv[]) {
|
|||
],AC_MSG_RESULT(yes);AC_DEFINE(C_SET_PRIORITY,1),AC_MSG_RESULT(no))
|
||||
|
||||
|
||||
dnl Some host detection and actions for them
|
||||
dnl Some target detection and actions for them
|
||||
case "$target" in
|
||||
*-*-cygwin* | *-*-mingw32*)
|
||||
LIBS="$LIBS -lwinmm"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
|
||||
/* Define to 1 to enable internal debugger, requires libcurses */
|
||||
#define C_DEBUG 1
|
||||
#define C_DEBUG 0
|
||||
|
||||
/* Define to 1 to enable screenshots, requires libpng */
|
||||
#define C_SSHOT 1
|
||||
|
@ -22,11 +22,15 @@
|
|||
#define C_HEAVY_DEBUG 0
|
||||
|
||||
/* The type of cpu this host has */
|
||||
#define C_HOSTCPU X86
|
||||
#define C_TARGETCPU X86
|
||||
//#define C_TARGETCPU X86_64
|
||||
|
||||
/* Define to 1 to use x86 dynamic cpu core */
|
||||
#define C_DYNAMIC_X86 1
|
||||
|
||||
/* Define to 1 to use recompiling cpu core. Can not be used together with the dynamic-x86 core */
|
||||
#define C_DYNREC 0
|
||||
|
||||
/* Enable memory function inlining in */
|
||||
#define C_CORE_INLINE 0
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue