• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revision07cbb4ebc408aa7161f3fb174d9fc1ef3795379a (tree)
Time2022-11-28 18:58:28
Authorphabrics <phabrics@phab...>
Commiterphabrics

Log Message

Changes to get compilation working on Mingw64.

Change Summary

Incremental Difference

--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ dnl POSSIBILITY OF SUCH DAMAGE.
3434 dnl Checks that we are given a good source directory.
3535 AC_PREREQ([2.68])
3636 m4_include(version.m4)
37-AC_INIT([tme], [0.12rc8])
37+AC_INIT([tme], [0.12rc9])
3838 AC_CONFIG_SRCDIR([ic/m68k/m68k-impl.h])
3939 AC_CONFIG_MACRO_DIR([m4])
4040 AC_CANONICAL_TARGET
@@ -797,13 +797,14 @@ AM_PATH_GLIB_2_0([], [have_glib=$enable_glib], [])
797797 dnl Checks for display type support
798798 AM_PATH_GTK_3_0([], [have_gtk=$enable_gtk], [])
799799 AM_PATH_SDL2([], [have_sdl=$enable_sdl], [])
800+AM_CONDITIONAL([HAVE_SDL], [test "x${have_sdl}" = xyes])
800801 PKG_CHECK_MODULES([RFB], [libvncclient libvncserver], [have_rfb=$enable_rfb], [])
801802
802803 dnl Start the list of ethernet host support.
803804 AM_CONDITIONAL([USE_TAP_WINDOWS], [test "x${enable_openvpn}" = xyes && test "x${have_tap_header}" = x && test "x${WIN32}" != x])
804805
805-if test "x${enable_openvpn}" = xyes && test "x${have_tap_header}" = xyes || test "x${WIN32}" != x; then
806- have_openvpn=yes
806+if test "x${have_tap_header}" = xyes || test "x${WIN32}" != x; then
807+ have_openvpn=$enable_openvpn
807808 AC_DEFINE([OPENVPN_VERSION_RESOURCE], [PRODUCT_VERSION_RESOURCE], [Version in windows resource format])
808809 fi
809810 AM_CONDITIONAL([HAVE_OPENVPN], [test "x${have_openvpn}" = xyes])
@@ -828,19 +829,21 @@ found_BPFVERSION
828829
829830 for tme_host in $TME_HOST_TYPES; do
830831 if eval test "x\$have_${tme_host}" = xyes; then
831- TME_HOSTS="-dlopen \$(tme_host_${tme_host})/tme_host_${tme_host}.la ${TME_HOSTS}"
832- TME_HOSTS_DIRS="\$(tme_host_${tme_host}) ${TME_HOSTS_DIRS}"
832+ TME_HOST_CFLAGS="\$(${tme_host^^}_CFLAGS) ${TME_HOST_CFLAGS}"
833+ TME_HOST_LIBS="-dlopen \$(tme_host_${tme_host})/tme_host_${tme_host}.la ${TME_HOST_LIBS}"
834+ TME_HOST_DIRS="\$(tme_host_${tme_host}) ${TME_HOST_DIRS}"
833835 fi
834836 done
835837
836838 dnl Checks for host support.
837-AC_MSG_CHECKING([for host support types])
839+AC_MSG_CHECKING([for enabled host types])
838840
839841 dnl The list of ethernet host support is finished.
840-AC_SUBST(TME_HOSTS)
841-AC_SUBST(TME_HOSTS_DIRS)
842+AC_SUBST(TME_HOST_CFLAGS)
843+AC_SUBST(TME_HOST_LIBS)
844+AC_SUBST(TME_HOST_DIRS)
842845
843-AC_MSG_RESULT($TME_HOSTS)
846+AC_MSG_RESULT($TME_HOST_DIRS)
844847
845848 AC_SYS_POSIX_TERMIOS
846849
@@ -880,8 +883,7 @@ AC_MSG_CHECKING([for available threading models])
880883 # specify whether preemptive thread support should be enabled & with what thread models
881884
882885 AC_ARG_ENABLE(threads,
883-[ --enable-threads=THRs Enable preemptive thread support utilizing the given threading models (compiled-in order of usage by platform availability: 'pthreads (or posix)','glib'). Defaults to 'yes', any available. Turn off threads with 'no' or --disable-threads; this will use setjmp/longjmp.], [tme_thread_types=${enableval}],
884-[tme_thread_types=sjlj])
886+[ --enable-threads=THRs Enable preemptive thread support utilizing the given threading models (compiled-in order of usage by platform availability: 'pthreads (or posix)','glib'). Defaults to 'no'; this will use a singled thread with setjmp/longjmp or fibers on platforms that support them. Turn on threads with --enable-threads=<thr>; no value given is 'yes' which defaults to best threading model for platform.], [tme_thread_types=${enableval}], [enable_threads=no])
885887
886888 if test "x${enable_threads}" = xyes; then
887889 dnl Make brackets safe to use.
@@ -899,13 +901,28 @@ if test "x${enable_threads}" = xyes; then
899901
900902 dnl Make brackets the quote characters again.
901903 changequote([, ])dnl
904+ recode=no
902905 fi
903906
904907 if test "x${enable_threads}" = xno; then
908+ dnl Make brackets safe to use.
909+ changequote(<<, >>)dnl
910+
911+ dnl set the default threads based on platform
912+ case "${host_os}" in
913+ mingw* | msys* | cygwin*)
914+ recode=i686
915+ ;;
916+ *)
917+ recode=yes
918+ ;;
919+ esac
920+
921+ dnl Make brackets the quote characters again.
922+ changequote([, ])dnl
905923 tme_thread_types=sjlj
906924 fi
907925
908-recode=no
909926 for tme_thread_type in ${tme_thread_types}; do
910927 case "x${tme_thread_type}" in
911928 xpthreads| xposix) CPPFLAGS="${CPPFLAGS-} -DTME_THREADS_POSIX"
@@ -915,9 +932,6 @@ xglib) CPPFLAGS="${CPPFLAGS-} -DTME_THREADS_GLIB -DUSE_GLIB_TIME ${GLIB_CFLAGS
915932 # LDFLAGS="${LDFLAGS-} ${GLIB_LIBS}"
916933 ;;
917934 xsjlj) CPPFLAGS="${CPPFLAGS-} -DTME_THREADS_SJLJ"
918- if test "x${WIN32}" != "xyes";
919- then recode=yes
920- fi
921935 ;;
922936 esac
923937 done
@@ -950,16 +964,7 @@ changequote([, ])dnl
950964
951965 AC_ARG_ENABLE(recode,
952966 [ --enable-recode enable recode (dynamic binary translation) (default=if host supports)],
953-[ ], [enable_recode=${recode}])
954-if test "${recode_size_guest_max}" = 0; then
955- enable_recode=no
956- recode_size_guest_max=1
957-fi
958-if test "x${enable_recode}" = xno; then
959- recode_hosts=
960-else
961- recode_hosts="mmap x86"
962-fi
967+[ ], [enable_recode=$recode])
963968
964969 AC_MSG_CHECKING([for host recode support])
965970
@@ -968,20 +973,36 @@ changequote(<<, >>)dnl
968973
969974 # get the host maximum guest size:
970975 case "${host_cpu}" in
971- i[3456789]86)
976+i[3456789]86)
977+ recode_hosts="mmap x86"
972978 recode_size_guest_max_host=64
973979 ;;
974980 x86_64)
981+ recode_hosts="mmap x86"
975982 recode_size_guest_max_host=128
976983 ;;
977984 *)
978985 recode_hosts=
979- recode_size_guest_max_host= ;;
986+ recode_size_guest_max_host=1 ;;
980987 esac
981988
982989 dnl Make brackets the quote characters again.
983990 changequote([, ])dnl
984991
992+keep_recode=$enable_recode
993+
994+for tme_recode_type in ${enable_recode}; do
995+ if test "x${host_cpu}" = "x${tme_recode_type}"; then
996+ keep_recode=yes
997+ break
998+ fi
999+done
1000+
1001+if test "x${keep_recode}" != xyes; then
1002+ recode_hosts=
1003+ recode_size_guest_max=1
1004+fi
1005+
9851006 if test "x${recode_hosts}" = x; then
9861007 AC_MSG_RESULT([no])
9871008 if test "x${enable_recode}" = xrequired; then
--- a/tme/tme-plugins.txt
+++ b/tme/tme-plugins.txt
@@ -43,17 +43,10 @@ tme_machine_sun4_oclock tme_machine_sun4 oclock
4343 tme_machine_sun4_clock tme_machine_sun4 clock
4444 tme_machine_sun4_zs tme_machine_sun4 zs
4545 tme_host_gtk_display tme_host_gtk display
46-tme_host_gtk_display tme_host_gtk display
47-tme_host_rfb_display tme_host_rfb display
4846 tme_host_rfb_display tme_host_rfb display
4947 tme_host_sdl_display tme_host_sdl display
50-tme_host_sdl_display tme_host_sdl display
51-tme_host_tun_tap tme_host_tun tap
5248 tme_host_tun_tap tme_host_tun tap
5349 tme_host_bsd_bpf tme_host_bsd bpf
54-tme_host_bsd_bpf tme_host_bsd bpf
55-tme_host_openvpn_tun_tap tme_host_openvpn tun_tap
56-tme_host_openvpn_socket_link tme_host_openvpn socket_link
5750 tme_host_openvpn_socket_link tme_host_openvpn socket_link
5851 tme_host_openvpn_socket_server tme_host_openvpn_socket server
5952 tme_host_openvpn_tun_tap tme_host_openvpn tun_tap
--- a/tmesh/Makefile.am
+++ b/tmesh/Makefile.am
@@ -3,7 +3,7 @@
33
44 AUTOMAKE_OPTIONS = 1.4 gnu
55
6-AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I. -D_TME_IMPL
6+AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib -I. -D_TME_IMPL @TME_HOST_CFLAGS@
77
88 if HAVE_OPENVPN
99 AM_CPPFLAGS += -DTME_OPENVPN
@@ -19,8 +19,13 @@ libtmesh_la_SOURCES = \
1919 libtmesh_la_LIBADD = $(top_builddir)/libtme/libtme.la
2020
2121 bin_PROGRAMS = tmesh
22-tmesh_LDADD = libtmesh.la $(tme_preopen) @TME_HOSTS@
22+tmesh_LDADD = libtmesh.la $(tme_preopen) @TME_HOST_LIBS@
2323 tmesh_LDFLAGS = -dlpreopen force -dlopen self
24+if WIN32
25+if HAVE_SDL
26+tmesh_LDFLAGS += -mwindows
27+endif
28+endif
2429
2530 install-exec-hook:
2631 $(SETCAP) $(DESTDIR)$(bindir)/$(TGTPFX)tmesh$(EXEEXT)
@@ -28,4 +33,4 @@ install-exec-hook:
2833 include $(top_srcdir)/tme-hosts.txt
2934 include $(top_srcdir)/tme-preopen.txt
3035
31-SUBDIRS = @TME_HOSTS_DIRS@
36+SUBDIRS = @TME_HOST_DIRS@