in case using SDL1

fix merge error of configure.ac
This commit is contained in:
kanjitalk755 2018-06-18 18:42:19 +09:00
parent 1393625c15
commit 7f8ddaeacf
8 changed files with 75 additions and 31 deletions

View File

@ -101,6 +101,7 @@
757A2BF01F5AF9D6003EDB01 /* user_strings_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */; };
75CBCF751F5DB3AD00830063 /* video_sdl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */; };
75CBCF771F5DB65E00830063 /* video_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75CBCF761F5DB65E00830063 /* video_sdl.cpp */; };
E40CEEC620D7910E00BCB88D /* SDLMain.m in Sources */ = {isa = PBXBuildFile; fileRef = E40CEEC520D7910E00BCB88D /* SDLMain.m */; };
E413D92120D260BC00E437D8 /* tftp.c in Sources */ = {isa = PBXBuildFile; fileRef = E413D8F820D260B900E437D8 /* tftp.c */; };
E413D92220D260BC00E437D8 /* mbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = E413D8F920D260B900E437D8 /* mbuf.c */; };
E413D92320D260BC00E437D8 /* ip_icmp.c in Sources */ = {isa = PBXBuildFile; fileRef = E413D8FB20D260B900E437D8 /* ip_icmp.c */; };
@ -357,6 +358,8 @@
757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_strings_unix.cpp; sourceTree = "<group>"; };
75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl2.cpp; sourceTree = "<group>"; };
75CBCF761F5DB65E00830063 /* video_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl.cpp; sourceTree = "<group>"; };
E40CEEC420D7910D00BCB88D /* SDLMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMain.h; sourceTree = "<group>"; };
E40CEEC520D7910E00BCB88D /* SDLMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLMain.m; sourceTree = "<group>"; };
E413D8F820D260B900E437D8 /* tftp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tftp.c; sourceTree = "<group>"; };
E413D8F920D260B900E437D8 /* mbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mbuf.c; sourceTree = "<group>"; };
E413D8FA20D260B900E437D8 /* tftp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tftp.h; sourceTree = "<group>"; };
@ -624,12 +627,14 @@
7539E0711F23B25A006B2DF2 /* SDL */ = {
isa = PBXGroup;
children = (
752F27021F242F51001032B4 /* xpram_sdl.cpp */,
752F27001F242BAF001032B4 /* prefs_sdl.cpp */,
7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */,
7539E0731F23B25A006B2DF2 /* keycodes */,
752F27001F242BAF001032B4 /* prefs_sdl.cpp */,
E40CEEC420D7910D00BCB88D /* SDLMain.h */,
E40CEEC520D7910E00BCB88D /* SDLMain.m */,
75CBCF761F5DB65E00830063 /* video_sdl.cpp */,
75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */,
752F27021F242F51001032B4 /* xpram_sdl.cpp */,
);
name = SDL;
path = ../SDL;
@ -1041,6 +1046,7 @@
E413D93320D260BC00E437D8 /* cksum.c in Sources */,
E413D92920D260BC00E437D8 /* udp.c in Sources */,
7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */,
E40CEEC620D7910E00BCB88D /* SDLMain.m in Sources */,
753253351F53688D0024025B /* readcpu.cpp in Sources */,
7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */,
753252EE1F535DD10024025B /* defs68k.c in Sources */,
@ -1403,7 +1409,7 @@
GCC_DYNAMIC_NO_PIC = YES;
GCC_ENABLE_PASCAL_STRINGS = NO;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_OPTIMIZATION_LEVEL = fast;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_USE_STANDARD_INCLUDE_SEARCHING = YES;
GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;

View File

@ -35,6 +35,8 @@ void NSAutoReleasePool_wrap(void (*fn)(void))
[pool release];
}
#if SDL_VERSION_ATLEAST(2,0,0)
void disable_SDL2_macosx_menu_bar_keyboard_shortcuts() {
for (NSMenuItem * menu_item in [NSApp mainMenu].itemArray) {
if (menu_item.hasSubmenu) {
@ -53,7 +55,6 @@ void disable_SDL2_macosx_menu_bar_keyboard_shortcuts() {
}
}
#if SDL_VERSION_ATLEAST(2,0,0)
bool is_fullscreen_osx(SDL_Window * window)
{
if (!window) {

View File

@ -88,7 +88,7 @@ static int display_type = DISPLAY_WINDOW; // See enum above
#endif
// Constants
#ifdef WIN32
#if defined(WIN32) || __MACOSX__
const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes";
#else
const char KEYCODE_FILE_NAME[] = DATADIR "/keycodes";

17
BasiliskII/src/Unix/configure.ac Executable file → Normal file
View File

@ -225,11 +225,11 @@ dnl We use mon if possible.
MONSRCS=
if [[ "x$WANT_MON" = "xyes" ]]; then
AC_MSG_CHECKING(for mon)
mon_srcdir=../../../mon/src
mon_srcdir=../../../cxmon/src
if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
AC_MSG_RESULT(yes)
AC_DEFINE(ENABLE_MON, 1, [Define if using "mon".])
MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/mon_lowmem.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c $mon_srcdir/disass/mips-dis.c $mon_srcdir/disass/mips-opc.c $mon_srcdir/disass/mips16-opc.c"
MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/mon_lowmem.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c"
CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
AC_CHECK_LIB(ncurses, tgetent, ,
[AC_CHECK_LIB(termcap, tgetent, ,
@ -353,8 +353,8 @@ else
SDL_SUPPORT="none"
fi
dnl We need X11, if not using SDL.
if [[ "x$WANT_SDL_VIDEO" = "xno" ]]; then
dnl We need X11, if not using SDL or Mac GUI.
if [[ "x$WANT_SDL_VIDEO" = "xno" -a "x$WANT_MACOSX_GUI" = "xno" ]]; then
AC_PATH_XTRA
if [[ "x$no_x" = "xyes" ]]; then
AC_MSG_ERROR([You need X11 to run Basilisk II.])
@ -369,10 +369,12 @@ AS_IF([test "x$with_bincue" = "xyes" ], [have_bincue=yes], [have_bincue=no])
AS_IF([test "x$have_bincue" = "xyes" ], [
if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then
DEFINES="$DEFINES -DBINCUE"
AC_SUBST(USE_BINCUE, yes)
else
AC_MSG_ERROR([You need SDL Audio to use BINCUE support.])
AC_SUBST(USE_BINCUE, no)
fi
])
], [AC_SUBST(USE_BINCUE, no)])
dnl LIBVHD
AS_IF([test "x$with_libvhd" = "xyes" ], [have_libvhd=yes], [have_libvhd=no])
@ -934,6 +936,9 @@ dnl Check that the host supports TUN/TAP devices
AC_CACHE_CHECK([whether TUN/TAP is supported],
ac_cv_tun_tap_support, [
AC_TRY_COMPILE([
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if defined(HAVE_LINUX_IF_H) && defined(HAVE_LINUX_IF_TUN_H)
#include <linux/if.h>
#include <linux/if_tun.h>
@ -1326,7 +1331,7 @@ AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, "$ac_cv_have_sigcontext_hack",
dnl Resolve and set the proper sigsegv_recovery method...
if [[ "x$ac_cv_have_win32_exceptions" = "xyes" ]]; then
if [[ "x$ac_cv_have_mach_exceptions" = "xyes" ]]; then
sigsegv_recovery=mach
elif [[ "x$ac_cv_have_win32_exceptions" = "xyes" ]]; then
sigsegv_recovery=win32

View File

@ -535,7 +535,7 @@ int main(int argc, char **argv)
}
atexit(SDL_Quit);
#if __MACOSX__
#if __MACOSX__ && SDL_VERSION_ATLEAST(2,0,0)
// On Mac OS X hosts, SDL2 will create its own menu bar. This is mostly OK,
// except that it will also install keyboard shortcuts, such as Command + Q,
// which can interfere with keyboard shortcuts in the guest OS.

View File

@ -1311,7 +1311,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_CW_ASM_SYNTAX = NO;
@ -1368,7 +1368,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = NO;
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;

64
SheepShaver/src/Unix/configure.ac Executable file → Normal file
View File

@ -46,7 +46,7 @@ AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [d
esac],
[WANT_GTK="gtk2 gtk"])
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes], [DYNGEN_CC=$withval])
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes or 'precompiled'], [DYNGEN_CC=$withval])
AC_ARG_WITH(bincue,
AS_HELP_STRING([--with-bincue], [Allow cdrom image files in bin/cue mode]))
@ -695,10 +695,12 @@ AS_IF([test "x$with_bincue" = "xyes" ], [have_bincue=yes], [have_bincue=no])
AS_IF([test "x$have_bincue" = "xyes" ], [
if [[ "xOSX_CORE_AUDIO" = "xno" -a "x$WANT_SDL_AUDIO"="xno" ]]; then
AC_MSG_ERROR([You need SDL or OSX Core Audio to use BINCUE support.])
AC_SUBST(USE_BINCUE, no)
else
CPPFLAGS="$CPPFLAGS -DBINCUE $OSX_CORE_AUDIO"
AC_SUBST(USE_BINCUE, yes)
fi
])
], [AC_SUBST(USE_BINCUE, no)])
dnl LIBVHD
AS_IF([test "x$with_libvhd" = "xyes" ], [have_libvhd=yes], [have_libvhd=no])
@ -1467,6 +1469,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 3)
[AC_MSG_RESULT(yes); HAVE_GCC30=yes],
[AC_MSG_RESULT(no)])
dnl Check for GCC 4.0 or higher.
HAVE_GCC40=no
AC_MSG_CHECKING(for GCC 4.0 or higher)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 4)
# error gcc < 4
typedef syntax error;
#endif
]])],
[AC_MSG_RESULT(yes); HAVE_GCC40=yes],
[AC_MSG_RESULT(no)])
dnl Check for ICC.
AC_MSG_CHECKING(for ICC)
HAVE_ICC=no
@ -1539,6 +1552,7 @@ if [[ "x$EMULATED_PPC" = "xyes" ]]; then
dnl Enable JIT compiler, if possible
if [[ "x$WANT_JIT" = "xyes" ]]; then
ac_cv_use_dyngen_precompiled=no
AC_CACHE_CHECK([whether dyngen can be used],
ac_cv_use_dyngen, [
case $host_cpu:$ac_cv_object_format in
@ -1569,20 +1583,30 @@ if [[ "x$EMULATED_PPC" = "xyes" ]]; then
esac
dnl Check for a suitable synthetic opcodes compiler (icc is faking itself as gcc 3.2.2)
if [[ -z "$DYNGEN_CC" ]]; then
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_GCC40" = "xno" -a "x$HAVE_ICC" = "xno" ]]; then
DYNGEN_CC=$CXX
else
for p in /usr/bin /usr/local/bin /usr/freeware/bin; do
gxx="$p/g++"
if [[ -x "$gxx" ]]; then
DYNGEN_CC="$gxx"
fi
done
elif command -v g++ >/dev/null; then
vers=`g++ -dumpversion`
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
if [[ $(version $vers) -ge $(version "2.7.0") ]] && [[ $(version $vers) -lt $(version "4.0.0") ]]; then
DYNGEN_CC="$gxx"
fi
fi
fi
if [[ -z "$DYNGEN_CC" ]]; then
ac_cv_use_dyngen=no
if [[ -z "$DYNGEN_CC" -o "x$DYNGEN_CC" = "xprecompiled" ]]; then
case $host_cpu in
i?86)
ac_cv_use_dyngen_precompiled=yes
;;
x86_64)
ac_cv_use_dyngen_precompiled=yes
;;
*)
ac_cv_use_dyngen=no
;;
esac
fi
if [[ "x$ac_cv_use_dyngen_precompiled" = "xyes" ]]; then DYNGEN_CC=precompiled; fi
])
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
case $host_cpu in
@ -1599,10 +1623,17 @@ if [[ "x$EMULATED_PPC" = "xyes" ]]; then
;;
esac
have_dyngen_gcc3=no
case "x`$DYNGEN_CC -dumpversion`" in
x[12].*) ;;
x*) have_dyngen_gcc3=yes ;;
esac
if [[ "$DYNGEN_CC" != "precompiled" ]]; then
case "x`$DYNGEN_CC -dumpversion`" in
x[12].*) ;;
x*) have_dyngen_gcc3=yes ;;
esac
else
case "x`$CXX -dumpversion`" in
x[12].*) ;;
x*) have_dyngen_gcc3=yes ;;
esac
fi
if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-align-functions"
else
@ -1686,6 +1717,7 @@ AC_TRANSLATE_DEFINE(HAVE_LINKER_SCRIPT, "$ac_cv_linker_script_works",
dnl Generate Makefile.
AC_SUBST(PERL)
AC_SUBST(USE_DYNGEN, [$ac_cv_use_dyngen])
AC_SUBST(USE_DYNGEN_PRECOMPILED, [$ac_cv_use_dyngen_precompiled])
AC_SUBST(DYNGENSRCS)
AC_SUBST(DYNGEN_CC)
AC_SUBST(DYNGEN_CFLAGS)

View File

@ -832,7 +832,7 @@ int main(int argc, char **argv)
// Read preferences
PrefsInit(vmdir, argc, argv);
#if __MACOSX__
#if __MACOSX__ && SDL_VERSION_ATLEAST(2,0,0)
// On Mac OS X hosts, SDL2 will create its own menu bar. This is mostly OK,
// except that it will also install keyboard shortcuts, such as Command + Q,
// which can interfere with keyboard shortcuts in the guest OS.