Merge pull request #14 from MaddTheSane/MacSupp

Mac support changes
This commit is contained in:
sarah-walker-pcem 2021-05-25 20:37:56 +01:00 • committed by GitHub
commit 5da96ac8d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 4658 additions and 1975 deletions

View file

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.16.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -133,7 +133,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets) $(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input, # Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is # and print each of them once, without duplicates. Input order is
@ -196,6 +196,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best GZIP_ENV = --best
DIST_TARGETS = dist-gzip DIST_TARGETS = dist-gzip
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@ -342,8 +344,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \ echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \ $(SHELL) ./config.status;; \
*) \ *) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac; esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@ -461,7 +463,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES) distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir) $(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)" test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@ -526,7 +531,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)" || chmod -R a+r "$(distdir)"
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
@ -541,6 +546,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-zstd: distdir
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
$(am__post_remove_distdir)
dist-tarZ: distdir dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \ @echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2 "legacy program 'compress' is deprecated." >&2
@ -552,7 +561,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \ @echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2 "deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-zip: distdir dist-zip: distdir
@ -570,7 +579,7 @@ dist dist-all:
distcheck: dist distcheck: dist
case '$(DIST_ARCHIVES)' in \ case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \ *.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \ *.tar.lz*) \
@ -580,9 +589,11 @@ distcheck: dist
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \ *.zip*) \
unzip $(distdir).zip ;;\ unzip $(distdir).zip ;;\
*.tar.zst*) \
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac esac
chmod -R a-w $(distdir) chmod -R a-w $(distdir)
chmod u+w $(distdir) chmod u+w $(distdir)
@ -598,7 +609,7 @@ distcheck: dist
$(DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
@ -759,7 +770,7 @@ uninstall-am:
am--refresh check check-am clean clean-cscope clean-generic \ am--refresh check check-am clean clean-cscope clean-generic \
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
distcheck distclean distclean-generic distclean-tags \ dist-zstd distcheck distclean distclean-generic distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \ distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \ html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \ install-data-am install-dvi install-dvi-am install-exec \

324
aclocal.m4 vendored
View file

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.15 -*- Autoconf -*- # generated automatically by aclocal 1.16.3 -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Copyright (C) 1996-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -14,15 +14,15 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
dnl serial 11 (pkg-config-0.29) # serial 12 (pkg-config-0.29.2)
dnl
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl dnl
@ -63,7 +63,7 @@ dnl
dnl See the "Since" comment for each macro you use to see what version dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require. dnl of the macros you require.
m4_defun([PKG_PREREQ], m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29]) [m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ ])dnl PKG_PREREQ
@ -164,7 +164,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no pkg_failed=no
AC_MSG_CHECKING([for $1]) AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@ -174,11 +174,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.]) See the pkg-config man page for more details.])
if test $pkg_failed = yes; then if test $pkg_failed = yes; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED _PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
@ -195,7 +195,7 @@ installed software in a non-standard prefix.
_PKG_TEXT])[]dnl _PKG_TEXT])[]dnl
]) ])
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE( m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it [The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full is in your PATH or set the PKG_CONFIG environment variable to the full
@ -372,7 +372,7 @@ AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
done done
fi fi
if test -d $sdl_framework; then if test x"$sdl_framework" != x && test -d "$sdl_framework"; then
AC_MSG_RESULT($sdl_framework) AC_MSG_RESULT($sdl_framework)
sdl_framework_dir=`dirname $sdl_framework` sdl_framework_dir=`dirname $sdl_framework`
SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include" SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
@ -675,7 +675,8 @@ AC_DEFUN([_WX_PRIVATE_CHECK_VERSION],
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS
dnl [, WX-OPTIONAL-LIBS]]]]])
dnl dnl
dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC
dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME
@ -692,6 +693,10 @@ dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config
dnl invocation command in present. It can be used to fine-tune lookup of dnl invocation command in present. It can be used to fine-tune lookup of
dnl best wxWidgets build available. dnl best wxWidgets build available.
dnl dnl
dnl Optional WX-OPTIONAL-LIBS argument contains comma- or space-separated list
dnl of wxWidgets libraries to link against if they are available.
dnl WX-OPTIONAL-LIBS is supported on version 2.9.0 and later.
dnl
dnl Example use: dnl Example use:
dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]
dnl [--unicode --debug]) dnl [--unicode --debug])
@ -743,8 +748,8 @@ AC_DEFUN([WX_CONFIG_CHECK],
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)])
fi fi
dnl don't add the libraries ($4) to this variable as this would result in dnl don't add the libraries (4th argument) to this variable as this would
dnl an error when it's used with --version below dnl result in an error when it's used with --version below
WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5" WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5"
WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
@ -768,14 +773,20 @@ AC_DEFUN([WX_CONFIG_CHECK],
if test -n "$wx_ver_ok"; then if test -n "$wx_ver_ok"; then
AC_MSG_RESULT(yes (version $WX_VERSION)) AC_MSG_RESULT(yes (version $WX_VERSION))
WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4`
wx_optional_libs=""
_WX_PRIVATE_CHECK_VERSION(2,9,0)
if test -n "$wx_ver_ok" -a -n "$6"; then
wx_optional_libs="--optional-libs $6"
fi
WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4 $wx_optional_libs`
dnl is this even still appropriate? --static is a real option now dnl is this even still appropriate? --static is a real option now
dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is
dnl what the user actually wants, making this redundant at best. dnl what the user actually wants, making this redundant at best.
dnl For now keep it in case anyone actually used it in the past. dnl For now keep it in case anyone actually used it in the past.
AC_MSG_CHECKING([for wxWidgets static library]) AC_MSG_CHECKING([for wxWidgets static library])
WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null` WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 $wx_optional_libs 2>/dev/null`
if test "x$WX_LIBS_STATIC" = "x"; then if test "x$WX_LIBS_STATIC" = "x"; then
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
else else
@ -1052,7 +1063,7 @@ AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO],
$2=0 $2=0
elif test "$enableval" = "auto" ; then elif test "$enableval" = "auto" ; then
AC_MSG_RESULT([will be automatically detected]) AC_MSG_RESULT([will be automatically detected])
$2="auto" $2=""
else else
AC_MSG_ERROR([ AC_MSG_ERROR([
Unrecognized option value (allowed values: yes, no, auto) Unrecognized option value (allowed values: yes, no, auto)
@ -1078,7 +1089,7 @@ AC_DEFUN([WX_ARG_WITH_YESNOAUTO],
$2=0 $2=0
elif test "$withval" = "auto" ; then elif test "$withval" = "auto" ; then
AC_MSG_RESULT([will be automatically detected]) AC_MSG_RESULT([will be automatically detected])
$2="auto" $2=""
else else
AC_MSG_ERROR([ AC_MSG_ERROR([
Unrecognized option value (allowed values: yes, auto) Unrecognized option value (allowed values: yes, auto)
@ -1130,17 +1141,17 @@ AC_DEFUN([WX_STANDARD_OPTIONS],
AC_MSG_CHECKING([for the --with-toolkit option]) AC_MSG_CHECKING([for the --with-toolkit option])
if test "$withval" = "auto" ; then if test "$withval" = "auto" ; then
AC_MSG_RESULT([will be automatically detected]) AC_MSG_RESULT([will be automatically detected])
TOOLKIT="auto" TOOLKIT=""
else else
TOOLKIT="$withval" TOOLKIT="$withval"
dnl PORT must be one of the allowed values dnl PORT must be one of the allowed values
if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \ if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a "$TOOLKIT" != "gtk3" -a \
"$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \ "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \
"$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \ "$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \
"$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then "$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11" -a "$TOOLKIT" != "base"; then
AC_MSG_ERROR([ AC_MSG_ERROR([
Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11) Unrecognized option value (allowed values: auto, gtk1, gtk2, gtk3, msw, motif, osx_carbon, osx_cocoa, dfb, x11, base)
]) ])
fi fi
@ -1204,7 +1215,7 @@ AC_DEFUN([WX_STANDARD_OPTIONS],
AC_MSG_CHECKING([for the --with-wxversion option]) AC_MSG_CHECKING([for the --with-wxversion option])
if test "$withval" = "auto" ; then if test "$withval" = "auto" ; then
AC_MSG_RESULT([will be automatically detected]) AC_MSG_RESULT([will be automatically detected])
WX_RELEASE="auto" WX_RELEASE=""
else else
wx_requested_major_version=`echo $withval | \ wx_requested_major_version=`echo $withval | \
@ -1239,7 +1250,7 @@ dnl ---------------------------------------------------------------------------
dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
dnl dnl
dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values
dnl which are different from "auto". dnl which were specified.
dnl Thus this macro needs to be called only once all options have been set. dnl Thus this macro needs to be called only once all options have been set.
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS], AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
@ -1263,11 +1274,11 @@ AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no " WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no "
fi fi
if test "$TOOLKIT" != "auto" ; then if test -n "$TOOLKIT" ; then
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT " WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT "
fi fi
if test "$WX_RELEASE" != "auto" ; then if test -n "$WX_RELEASE" ; then
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE " WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE "
fi fi
@ -1281,16 +1292,16 @@ AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG])
dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl dnl
dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets dnl Sets WX_$RESULTVAR to the value of $RESULTVAR if it's defined. Otherwise,
dnl additional CPP flags and put the result of the search in WX_$RESULTVAR dnl auto-detect the value by checking for the presence of STRING in
dnl also adding the "yes" or "no" message result to MSG. dnl $WX_SELECTEDCONFIG (which is supposed to be set by caller) and set
dnl WX_$RESULTVAR to either 0 or 1, also outputting "yes" or "no" after MSG.
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR], AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],
[ [
if test "$$1" = "auto" ; then if test -z "$$1" ; then
dnl The user does not have particular preferences for this option; dnl The user does not have particular preferences for this option;
dnl so we will detect the wxWidgets relative build setting and use it dnl so we will detect the wxWidgets relative build setting and use it
@ -1305,11 +1316,9 @@ AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],
if test "$WX_$1" != "0"; then if test "$WX_$1" != "0"; then
WX_$1=1 WX_$1=1
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
ifelse([$4], , :, [$4])
else else
WX_$1=0 WX_$1=0
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
ifelse([$5], , :, [$5])
fi fi
else else
@ -1356,19 +1365,16 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG" echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG"
fi fi
dnl we could test directly for WX_SHARED with a line like: dnl we could test directly for WX_SHARED with a line like:
dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared], dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared],
dnl [if wxWidgets was built in SHARED mode]) dnl [if wxWidgets was built in SHARED mode])
dnl but wx-config --selected-config DOES NOT outputs the 'shared' dnl but wx-config --selected-config DOES NOT outputs the 'shared'
dnl word when wx was built in shared mode; it rather outputs the dnl word when wx was built in shared mode; it rather outputs the
dnl 'static' word when built in static mode. dnl 'static' word when built in static mode.
if test $WX_SHARED = "1"; then if test "$WX_SHARED" = "1"; then
STATIC=0 STATIC=0
elif test $WX_SHARED = "0"; then elif test "$WX_SHARED" = "0"; then
STATIC=1 STATIC=1
elif test $WX_SHARED = "auto"; then
STATIC="auto"
fi fi
dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables
@ -1391,7 +1397,7 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
AC_SUBST(WX_SHARED) AC_SUBST(WX_SHARED)
dnl detect the WX_PORT to use dnl detect the WX_PORT to use
if test "$TOOLKIT" = "auto" ; then if test -z "$TOOLKIT" ; then
dnl The user does not have particular preferences for this option; dnl The user does not have particular preferences for this option;
dnl so we will detect the wxWidgets relative build setting and use it dnl so we will detect the wxWidgets relative build setting and use it
@ -1399,22 +1405,26 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*") WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*")
WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*")
WX_GTKPORT3=$(expr "$WX_SELECTEDCONFIG" : ".*gtk3.*")
WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*")
WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*")
WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*") WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*")
WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*") WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*")
WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*") WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*")
WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*") WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*")
WX_BASEPORT=$(expr "$WX_SELECTEDCONFIG" : ".*base.*")
WX_PORT="unknown" WX_PORT="unknown"
if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi
if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi
if test "$WX_GTKPORT3" != "0"; then WX_PORT="gtk3"; fi
if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi
if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi
if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi
if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi
if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi
if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi
if test "$WX_BASEPORT" != "0"; then WX_PORT="base"; fi
dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac
dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above) dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above)
@ -1432,14 +1442,8 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
AC_MSG_RESULT([$WX_PORT]) AC_MSG_RESULT([$WX_PORT])
else else
dnl Use the setting given by the user dnl Use the setting given by the user
if test -z "$TOOLKIT" ; then WX_PORT=$TOOLKIT
WX_PORT=$TOOLKIT
else
dnl try with PORT
WX_PORT=$PORT
fi
fi fi
AC_SUBST(WX_PORT) AC_SUBST(WX_PORT)
@ -1470,35 +1474,29 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
]) ])
fi fi
dnl now we can finally update the DEBUG,UNICODE,SHARED options dnl now we can finally update the options to their final values if they
dnl to their final values if they were set to 'auto' dnl were not already set
if test "$DEBUG" = "auto"; then if test -z "$UNICODE" ; then
DEBUG=$WX_DEBUG
fi
if test "$UNICODE" = "auto"; then
UNICODE=$WX_UNICODE UNICODE=$WX_UNICODE
fi fi
if test "$SHARED" = "auto"; then if test -z "$SHARED" ; then
SHARED=$WX_SHARED SHARED=$WX_SHARED
fi fi
if test "$TOOLKIT" = "auto"; then if test -z "$TOOLKIT" ; then
TOOLKIT=$WX_PORT TOOLKIT=$WX_PORT
fi fi
dnl in case the user needs a BUILD=debug/release var... dnl respect the DEBUG variable adding the optimize/debug flags and also
if test "$DEBUG" = "1"; then dnl define a BUILD variable in case the user wants to use it
BUILD="debug" dnl
elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then
BUILD="release"
fi
dnl respect the DEBUG variable adding the optimize/debug flags
dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we
dnl don't need to set them, too dnl don't need to set them, too
if test "$DEBUG" = "1"; then if test "$DEBUG" = "1"; then
BUILD="debug"
CXXFLAGS="$CXXFLAGS -g -O0" CXXFLAGS="$CXXFLAGS -g -O0"
CFLAGS="$CFLAGS -g -O0" CFLAGS="$CFLAGS -g -O0"
else elif test "$DEBUG" = "0"; then
BUILD="release"
CXXFLAGS="$CXXFLAGS -O2" CXXFLAGS="$CXXFLAGS -O2"
CFLAGS="$CFLAGS -O2" CFLAGS="$CFLAGS -O2"
fi fi
@ -1591,7 +1589,7 @@ AC_DEFUN([AM_PATH_WXCONFIG], [
]) ])
AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])]) AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])])
# Copyright (C) 2002-2014 Free Software Foundation, Inc. # Copyright (C) 2002-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1603,10 +1601,10 @@ AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])])
# generated from the m4 files accompanying Automake X.Y. # generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.) # (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION], AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15' [am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro. dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.15], [], m4_if([$1], [1.16.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
]) ])
@ -1622,14 +1620,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.15])dnl [AM_AUTOMAKE_VERSION([1.16.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*- # AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1681,7 +1679,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*- # AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc. # Copyright (C) 1997-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1712,7 +1710,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]]) Usually this means the macro was only invoked conditionally.]])
fi])]) fi])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1903,13 +1901,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*- # Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# _AM_OUTPUT_DEPENDENCY_COMMANDS # _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------ # ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@ -1917,49 +1914,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Older Autoconf quotes --file arguments for eval, but not when files # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval # are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting. # if we detect the quoting.
case $CONFIG_FILES in # TODO: see whether this extra hack can be removed once we start
*\'*) eval set x "$CONFIG_FILES" ;; # requiring Autoconf 2.70 or later.
*) set x $CONFIG_FILES ;; AS_CASE([$CONFIG_FILES],
esac [*\'*], [eval set x "$CONFIG_FILES"],
[*], [set x $CONFIG_FILES])
shift shift
for mf # Used to flag and report bootstrapping failures.
am_rc=0
for am_mf
do do
# Strip MF so we end up with the name of the file. # Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'` am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not. # Check whether this is an Automake generated Makefile which includes
# We used to match only the files named 'Makefile.in', but # dependency-tracking related rules and includes.
# some people rename them; so instead we look at the file content. # Grep'ing the whole file directly is not great: AIX grep has a line
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000. # limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
dirpart=`AS_DIRNAME("$mf")` || continue
else am_dirpart=`AS_DIRNAME(["$am_mf"])`
continue am_filepart=`AS_BASENAME(["$am_mf"])`
fi AM_RUN_LOG([cd "$am_dirpart" \
# Extract the definition of DEPDIR, am__include, and am__quote && sed -e '/# am--include-marker/d' "$am_filepart" \
# from the Makefile without running 'make'. | $MAKE -f - am--depfiles]) || am_rc=$?
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
AS_UNSET([am_dirpart])
AS_UNSET([am_filepart])
AS_UNSET([am_mf])
AS_UNSET([am_rc])
rm -f conftest-deps.mk
} }
])# _AM_OUTPUT_DEPENDENCY_COMMANDS ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@ -1968,18 +1959,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# ----------------------------- # -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE. # This macro should only be invoked once -- use via AC_REQUIRE.
# #
# This code is only required when automatic dependency tracking # This code is only required when automatic dependency tracking is enabled.
# is enabled. FIXME. This creates each '.P' file that we will # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
# need in order to bootstrap the dependency handling code. # order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles], [AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
])
# Do all the work for Automake. -*- Autoconf -*- # Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Copyright (C) 1996-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2066,8 +2056,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x # For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see: # dies out for good. For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)']) AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The # We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms. # system "awk" is bad on some platforms.
@ -2134,7 +2124,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue. Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>. that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@ -2176,7 +2166,7 @@ for _am_header in $config_headers :; do
done done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2197,7 +2187,7 @@ if test x"${install_sh+set}" != xset; then
fi fi
AC_SUBST([install_sh])]) AC_SUBST([install_sh])])
# Copyright (C) 2003-2014 Free Software Foundation, Inc. # Copyright (C) 2003-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2218,7 +2208,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*- # Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2226,49 +2216,42 @@ AC_SUBST([am__leading_dot])])
# AM_MAKE_INCLUDE() # AM_MAKE_INCLUDE()
# ----------------- # -----------------
# Check to see how make treats includes. # Check whether make has an 'include' directive that can support all
# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE], AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make} [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
cat > confinc << 'END' cat > confinc.mk << 'END'
am__doit: am__doit:
@echo this is the am__doit target @echo this is the am__doit target >confinc.out
.PHONY: am__doit .PHONY: am__doit
END END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#" am__include="#"
am__quote= am__quote=
_am_result=none # BSD make does it like this.
# First try GNU make style include. echo '.include "confinc.mk" # ignored' > confmf.BSD
echo "include confinc" > confmf # Other make implementations (GNU, Solaris 10, AIX) do it like this.
# Ignore all kinds of additional output from 'make'. echo 'include confinc.mk # ignored' > confmf.GNU
case `$am_make -s -f confmf 2> /dev/null` in #( _am_result=no
*the\ am__doit\ target*) for s in GNU BSD; do
am__include=include AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
am__quote= AS_CASE([$?:`cat confinc.out 2>/dev/null`],
_am_result=GNU ['0:this is the am__doit target'],
;; [AS_CASE([$s],
esac [BSD], [am__include='.include' am__quote='"'],
# Now try BSD make style include. [am__include='include' am__quote=''])])
if test "$am__include" = "#"; then if test "$am__include" != "#"; then
echo '.include "confinc"' > confmf _am_result="yes ($s style)"
case `$am_make -s -f confmf 2> /dev/null` in #( break
*the\ am__doit\ target*) fi
am__include=.include done
am__quote="\"" rm -f confinc.* confmf.*
_am_result=BSD AC_MSG_RESULT([${_am_result}])
;; AC_SUBST([am__include])])
esac AC_SUBST([am__quote])])
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc. # Copyright (C) 1997-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2289,12 +2272,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then if test x"${MISSING+set}" != xset; then
case $am_aux_dir in MISSING="\${SHELL} '$am_aux_dir/missing'"
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi fi
# Use eval to expand $SHELL # Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then if eval "$MISSING --is-lightweight"; then
@ -2307,7 +2285,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*- # Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2336,7 +2314,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION], AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2383,7 +2361,7 @@ AC_LANG_POP([C])])
# For backward compatibility. # For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2402,7 +2380,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*- # Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Copyright (C) 1996-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2483,7 +2461,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file rm -f conftest.file
]) ])
# Copyright (C) 2009-2014 Free Software Foundation, Inc. # Copyright (C) 2009-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2543,7 +2521,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
]) ])
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2571,7 +2549,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2014 Free Software Foundation, Inc. # Copyright (C) 2006-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -2590,7 +2568,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*- # Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2014 Free Software Foundation, Inc. # Copyright (C) 2004-2020 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

3657
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -140,6 +140,7 @@ case "$host" in
LIBS="$LIBS -framework OpenGL" LIBS="$LIBS -framework OpenGL"
LIBS="$LIBS -framework OpenAL" LIBS="$LIBS -framework OpenAL"
build_macosx="yes" build_macosx="yes"
CFLAGS="$CFLAGS -DHAVE_UNISTD_H"
;; ;;
*-*-cygwin* | *-*-mingw32*) *-*-cygwin* | *-*-mingw32*)
AC_CHECK_LIB([opengl32], [main], [], \ AC_CHECK_LIB([opengl32], [main], [], \
@ -183,6 +184,7 @@ case "$host" in
;; ;;
esac esac
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $WX_LIBS $SDL_LIBS" LIBS="$LIBS $WX_LIBS $SDL_LIBS"
AM_CONDITIONAL(OS_LINUX, [test "$build_linux" = "yes"]) AM_CONDITIONAL(OS_LINUX, [test "$build_linux" = "yes"])

View file

@ -1,6 +1,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#if defined(__APPLE__) && defined(__aarch64__)
#include <pthread.h>
#endif
#include "ibm.h" #include "ibm.h"
#include "x86.h" #include "x86.h"
#include "x86_ops.h" #include "x86_ops.h"
@ -410,6 +413,9 @@ static inline void exec_recompiler(void)
cpu_new_blocks++; cpu_new_blocks++;
#if defined(__APPLE__) && defined(__aarch64__)
pthread_jit_write_protect_np(0);
#endif
codegen_block_start_recompile(block); codegen_block_start_recompile(block);
codegen_in_recompile = 1; codegen_in_recompile = 1;
@ -481,6 +487,9 @@ static inline void exec_recompiler(void)
codegen_reset(); codegen_reset();
codegen_in_recompile = 0; codegen_in_recompile = 0;
#if defined(__APPLE__) && defined(__aarch64__)
pthread_jit_write_protect_np(1);
#endif
} }
else if (!cpu_state.abrt) else if (!cpu_state.abrt)
{ {

View file

@ -137,7 +137,7 @@ pcem_LDADD += wx.res
endif endif
if !HAS_OFF64T if !HAS_OFF64T
#pcem_CFLAGS += -Doff64_t=off_t -Dfopen64=fopen -Dfseeko64=fseek -Dftello64=ftell pcem_CFLAGS += -Doff64_t=off_t -Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello
endif endif
if RELEASE_BUILD if RELEASE_BUILD

File diff suppressed because it is too large Load diff

View file

@ -30,6 +30,10 @@ void codegen_allocator_init()
#if defined WIN32 || defined _WIN32 || defined _WIN32 #if defined WIN32 || defined _WIN32 || defined _WIN32
mem_block_alloc = VirtualAlloc(NULL, MEM_BLOCK_NR * MEM_BLOCK_SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE); mem_block_alloc = VirtualAlloc(NULL, MEM_BLOCK_NR * MEM_BLOCK_SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
/* TODO: check deployment target: older Intel-based versions of macOS don't play
nice with MAP_JIT. */
#elif defined(__APPLE__) && defined(MAP_JIT)
mem_block_alloc = mmap(0, MEM_BLOCK_NR * MEM_BLOCK_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE|MAP_JIT, 0, 0);
#else #else
mem_block_alloc = mmap(0, MEM_BLOCK_NR * MEM_BLOCK_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE, 0, 0); mem_block_alloc = mmap(0, MEM_BLOCK_NR * MEM_BLOCK_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE, 0, 0);
#endif #endif

View file

@ -1,6 +1,13 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef __APPLE__
#include <string.h>
#include <dispatch/dispatch.h>
#ifdef __aarch64__
#include <pthread.h>
#endif
#endif
#include "ibm.h" #include "ibm.h"
#include "device.h" #include "device.h"
@ -307,7 +314,13 @@ void initpc(int argc, char *argv[])
loadbios(); loadbios();
mem_add_bios(); mem_add_bios();
#if defined(__APPLE__) && defined(__aarch64__)
pthread_jit_write_protect_np(0);
#endif
codegen_init(); codegen_init();
#if defined(__APPLE__) && defined(__aarch64__)
pthread_jit_write_protect_np(1);
#endif
timer_reset(); timer_reset();
sound_reset(); sound_reset();
@ -510,6 +523,14 @@ int serial_fifo_read, serial_fifo_write;
int emu_fps = 0; int emu_fps = 0;
#ifdef __APPLE__
static void _set_window_title(void *s)
{
set_window_title((const char *)s);
free(s);
}
#endif
void runpc() void runpc()
{ {
char s[200]; char s[200];
@ -585,7 +606,12 @@ void runpc()
{ {
win_title_update=0; win_title_update=0;
sprintf(s, "PCem v17 - %i%% - %s - %s - %s", fps, model_getname(), models[model].cpu[cpu_manufacturer].cpus[cpu].name, (!mousecapture) ? "Click to capture mouse" : ((mouse_get_type(mouse_type) & MOUSE_TYPE_3BUTTON) ? "Press CTRL-END to release mouse" : "Press CTRL-END or middle button to release mouse")); sprintf(s, "PCem v17 - %i%% - %s - %s - %s", fps, model_getname(), models[model].cpu[cpu_manufacturer].cpus[cpu].name, (!mousecapture) ? "Click to capture mouse" : ((mouse_get_type(mouse_type) & MOUSE_TYPE_3BUTTON) ? "Press CTRL-END to release mouse" : "Press CTRL-END or middle button to release mouse"));
#ifdef __APPLE__
// Needed due to modifying the UI on the non-main thread is a big no-no.
dispatch_async_f(dispatch_get_main_queue(), strdup(s), _set_window_title);
#else
set_window_title(s); set_window_title(s);
#endif
} }
done++; done++;
} }

View file

@ -80,6 +80,10 @@ typedef char *SLIRPcaddr_t;
# include <stdint.h> # include <stdint.h>
#endif #endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifndef _MSC_VER #ifndef _MSC_VER
#include <sys/time.h> #include <sys/time.h>
#else #else

View file

@ -769,6 +769,12 @@ int gl3_init(SDL_Window* window, sdl_render_driver requested_render_driver, SDL_
strcpy(current_render_driver_name, requested_render_driver.name); strcpy(current_render_driver_name, requested_render_driver.name);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
#ifdef __APPLE__
// without an explicit request for the core profile 3.0 macOS falls back to default ancient 2.1
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
#endif
context = SDL_GL_CreateContext(window); context = SDL_GL_CreateContext(window);
@ -1637,12 +1643,21 @@ int gl3_renderer_available(struct sdl_render_driver* driver)
if (available < 0) if (available < 0)
{ {
available = 0; available = 0;
// GL SetAttribute should be done *before* window creation for the attributes to apply on
// context creation (seems to depend on OpenGL impl. but it souldn't hurt other platforms
// to do it here (earlier than before)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
#ifdef __APPLE__
// without an explicit request for the core profile 3.0 macOS falls back to default ancient 2.1
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
#endif
SDL_Window* window = SDL_CreateWindow("GL3 test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1, 1, SDL_WINDOW_HIDDEN | SDL_WINDOW_OPENGL); SDL_Window* window = SDL_CreateWindow("GL3 test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1, 1, SDL_WINDOW_HIDDEN | SDL_WINDOW_OPENGL);
if (window) if (window)
{ {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
SDL_GLContext context = SDL_GL_CreateContext(window); SDL_GLContext context = SDL_GL_CreateContext(window);
if (context) if (context)
{ {

View file

@ -50,6 +50,8 @@
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#undef pause #undef pause
#include <sys/types.h>
#include <sys/stat.h>
#endif #endif
extern void creatediscimage_open(void *hwnd); extern void creatediscimage_open(void *hwnd);
@ -241,6 +243,20 @@ void get_pcem_path(char *s, int size)
#ifdef __linux #ifdef __linux
wx_get_home_directory(s); wx_get_home_directory(s);
strcat(s, ".pcem/"); strcat(s, ".pcem/");
#elif defined(__APPLE__)
/*TODO: Use CoreFoundation functions to get proper directory, in case
the Application Support directory is different (I.E., with signing)*/
wx_get_home_directory(s);
strcat(s, "Library/Application Support/PCem/");
struct stat st = {0};
// create ~/Library/Application Support/PCem/
// if it doesn't exist
if (stat(s, &st) == -1)
{
mkdir(s, 0700);
}
#else #else
char* path = SDL_GetBasePath(); char* path = SDL_GetBasePath();
strcpy(s, path); strcpy(s, path);

View file

@ -1,6 +1,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#ifdef __APPLE__
#include <sys/time.h>
#endif
#include "thread.h" #include "thread.h"
#if defined WIN32 || defined _WIN32 || defined _WIN32 #if defined WIN32 || defined _WIN32 || defined _WIN32
#include <windows.h> #include <windows.h>