1
0
Fork 0
Commit graph

56 commits

Author SHA1 Message Date
Patryk Obara
064108c9c4 Switch to using C++14 2020-05-11 01:18:21 +02:00
kcgen
a495aefe83 Add Haiku OS support to build system 2020-05-09 18:46:08 +02:00
Patryk Obara
3d694ca006 Add an option for libpng static linking
We need this option to make snapshot/nightly builds compatible with
older distros and runtimes (which might not provide libpng 1.6 by
default).  Examples are: Ubuntu 16.04 LTS (and derived distros, such as
LTS Mint) or e.g. Steam Runtime.
2020-04-16 15:54:30 +02:00
krcroft
abe95c195c Prevent env:OPUSFILE_LIBS from enabling Opus
In the current code, we assess the --disable-opus-cdda argument,
and if it's not present we run pkg-config to get the Opus CFLAGS
and LIBS.  If it finds them, it sets the OPUSFILE_CFLAGS and
OPUSFILE_LIBS variables.  We finally check for the presense of
one of these before actually enabling Opus.

However, if the user directly sets OPUSFILE_LIBS, then this final
check will become true regardless if the user passed --disable-opus-cdda
to configure.

The obvious fix is to move the final Opus check inside the
prior checks (for example, moving AM_CONDITIONAL(USE_OPUS) inside
AS_IF(..), however that results in the OPUS_USE conditional not
existing if the AS_IF test fails its check.

Therefore, we set a new variable HAVE_OPUS, if the pkg-config
check passes, and look for that instead of OPUSFILE_LIBS.
(Of course, the user could export HAVE_OPUS=yes in their
environment as well, but at that point they're deliberately
circumenting configure, in which case they can have at it!).
2020-03-10 06:41:02 +01:00
Anton Shepelev
d1be65b105 Add output type texturepp for pixel-perfect scaling
The new output type `texturepp' was added, which implements
pixel-perfect scaling using SDL's hardware-accelerated texture output.
In pixel-pefect mode, each original pixel is displayed as a rectangle m
by n pixels, so that m:n yields a reasonably good approximation of the
pixel aspect ratio (PAR) of the emulated graphical mode while using as
much screen space as possible. The balance between the precision of
aspect ratio and the utilisation of screen space is specified as the
`parweight' parameter to pp_getscale() and is currently hard-coded in
sdlmain.cpp.

This implementation emulatates pixel-perfect mode as a special case of
nearest-neighbor interpolation when the horisontal and vertical scaling
factors are integers.
2020-03-09 20:12:36 +01:00
Patryk Obara
a5ade1ba5c Add an option for disabling networking features
Pass --disable-network to disable modem and ipx features during
configuration step (and avoid linking SDL2_net without actually removing
it from the system).
2020-03-08 03:28:37 +01:00
Joshua Fern
f2029d71d8 Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
Patryk Obara
9fc21dc294 Allow GNU extensions for GCC to avoid MinGW bugs
Most MinGW versions work correctly with and without _POSIX_C_SOURCE
or XOPEN macros [1] and don't need any special handling, but some
installations refuse to work correctly.

To be more precise: *some* MinGW installations turn off POSIX support
after turning on -std=c++11 WITHOUT -ansi -Wpedantic, -pedantic-errors
and similar.  This behaviour is inconsistent between various Windows
versions and MinGW distributions and manifests itself only when using
GCC (Clang behaves correctly).

[1] https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
2020-03-01 21:13:19 +01:00
numberZero
a37664872c Use sh-compatible syntax in configure.ac 2020-03-01 19:12:56 +01:00
krcroft
ec8fcb4af2 Fix autoconf nuances with AM_CONDITIONAL 2020-01-27 10:46:21 +01:00
krcroft
f6060a5148 Allow Opus CDDA support to be optionally disabled
Adds a `--disable-opus-cdda` flag that explicitly disables support
for Ogg Opus CDDA tracks and in turn avoid the need for the Opus package
dependencies such as the opusfile, opus, and ogg libraries.

This feature does not alter the default operation of ./configure, which
is to enable Opus CDDA support and quit if the Opus dependency package,
opusfile, is not found.  The user can then choose to either a) install
the package or b) explicitly disable Opus support.

This commit also includes:

- fixes for a double-free in the MP3 close routine that
  was discovered during testing

- a message if a CD audio track cannot be added during CDROM
  mounting (such as attempting to use Opus tracks when the binary
  does not support them).

- the --disable-opus-cdda flag in our config heavy workflow
2020-01-27 10:46:21 +01:00
krcroft
518c1428b7 Prevent autoconf leaking tokens into configure 2020-01-19 23:18:10 +01:00
Patryk Obara
e5465cd0d5 Remove Visual Studio references from autoconf 2020-01-13 01:42:20 +01:00
Patryk Obara
3b14417257 Move autoheader bits to configure.ac 2020-01-13 01:42:20 +01:00
Patryk Obara
a110153fff Bundle autoconf ax_cxx_* macros
Users, who try to compile keep tripping over it, despite documentation
in the INSTALL file.  Also, autoconf-archive might be hard to install
for users, who opted not to use MSYS2 and stick to MinGW only.

This commit bundles macros:

AX_CXX_COMPILE_STDCXX (version/serial 10)
AX_CXX_COMPILE_STDCXX_11 (version/serial 18)
2020-01-13 01:42:20 +01:00
Patryk Obara
f4609262bf Move nukedopl to libs
This way there's no need to reformat the nukedopl code to adhere to
DOSBox coding conventions.
2020-01-09 22:50:47 +01:00
Patryk Obara
670654fc7b Remove unnecessary check for XKBlib.h 2019-12-29 20:04:39 +01:00
krcroft
a16543d2ee Add -framework CoreFoundation, which CoreMIDI depends on 2019-12-27 07:41:12 +01:00
Patryk Obara
7a415e3b8d Remove last remains of DirectDraw renderer
SDL2 patch replaced it with output=texture renderer=direct3d
2019-12-26 03:23:19 +01:00
Patryk Obara
185c8af6f5 Update buildsystem to target SDL2
Replace sdl-config with sdl2-config, and add few smaller changes.
2019-12-26 03:23:19 +01:00
krcroft
12ee84cfd4 Fixed --enabled-debug on Windows MSYS2
This fixes the prior logic that relies on the (*)curses library
and header existing in compiler-derived default locations
such as /usr/include, and /usr/lib. However, if the package manager
happens to not install them there, then they will not be found
and the check will fail.

Four scenarios:
1. `./configure` or `./configure --enable-debug=no` produce:
    (no mention of debugger; configure continues)

2. `./configure --enable-debug=wrong` produces:
    configure: error: --enable-debug=wrong was requested but the value "wrong" is invalid
    (terminates with exit code 1)

3. `./configure --enable-debug` produces:

    config.h:
    defines C_DEBUG 1

    With only ncurses library installed:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... yes
    configure: debugger enabled using the ncurses library

    Makefile:
    CPPFLAGS = ... -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/local/ncurses ...
    LIBS = ...  -L/usr/local/ncurses -lncurses -ltinfo ...

    With only ncursesw installed:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... no
    checking for NCURSESW... yes
    configure: debugger enabled using the ncursesw library

    Makefile:
    CPPFLAGS = ... -I/opt/ncursesw ...
    LIBS = ... -L/opt/ncursesw -lncursesw ...

    With only pdcurses isntalled:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... no
    checking for NCURSESW... no
    checking for PDCURSES... yes
    configure: debugger enabled using the pdcurses library

    Makefile:
    CPPFLAGS = ... -I/usr/local/pdcurses ...
    LIBS = ...  -L/usr/local/pdcurses -lpdcurses -ltinfo ...

    Without any curses library installed:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... no
    checking for NCURSESW... no
    checking for PDCURSES... no
    configure: error: Package requirements were not met:
    <pkg-info prints info about missing package>
    (terminates with exit code 1)

4. `./configure --enable-debug=heavy` produces same as above, but:

    config.h:
    defines C_DEBUG 1
    defines C_HEAVY_DEBUG 1

    The configure message mentions heavy, for example:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... yes
    configure: debugger with heavy debugging enabled using the ncurses library
2019-12-14 17:51:11 +01:00
Patryk Obara
5f9ac5eeab Remove code ifdefed for OS/2
Cleanup before replacing SDL1.2 with SDL2.

OS/2 support was introduced in DOSBox in March 2006.  OS/2 reached EOL
in December 2006.

As of 2019, OS/2 is being continued by proprietary 32-bit only ArcaOS,
although there is no official SDL2 support, despite pledges from SDL2
maintainers.
2019-12-09 16:27:11 +01:00
Patryk Obara
03e94559e9 Rename directory with Visual Studio solution
Name 'visualc_net' invokes old names for Visual Studio
(Visual Studio .NET 2002 or 2003), which has no relation to content of
this subdirectory.

Also, by renaming this directory we mitigate chance, that during
merge-in from svn/trunk git will automatically inject some values from
from upstream, incompatible version of solution files. By sheer
luck this might happen without causing a conflict. Never happened so
far, but there's no point in risking it.
2019-12-09 07:22:15 +01:00
Patryk Obara
57d61085e2 Replace version with brand for .conf file suffix 2019-12-05 23:35:15 +01:00
Patryk Obara
f7fbdbf632 Move autoconfig-mandated files to docs/upstream
Autoconf enforces these files only for GNU projects. ATM these files are
out of date and might be misleading to the users.

As long as we'll not place files with the same names in this repo, git
will automatically update moved files when new commits from SVN will be
merged in.

For releases, it would probably be the best to write our own NEWS.md
file and generate CHANGES.md file out of git log.
2019-12-05 23:35:15 +01:00
krcroft
8a5a539f9a Cleanup printf types and explicitly state unused vars 2019-12-03 05:12:28 +01:00
krcroft
eaeb001b17 Play into subsequent track(s) if playback length exceeds the the current track
Issue reported by Dagar and Pr3tty F1y, and confirmed as a bug by ripsaw8080.
Thank you!

This fixes the GoG release of Betrayal at Krondor which (either due to CD mastering
issues or a faulty rip), requests playback of a given track at the tail end
of the prior track.

In debugging and performing this fix, many debug messages were improved as well
as making some small small code adjustments, such as using iterators to point to
individual tracks (track->attribute) instead of using the tracks array
(tracks[track -1].attribute).
2019-11-24 17:34:54 +01:00
Patryk Obara
56a41dd789 Merge branch 'svn/trunk' r4288 2019-11-14 12:31:20 +01:00
Peter Veenstra
b0d42ff52a update configure -h output for dynamic x64
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4287
2019-11-12 17:55:51 +00:00
Patryk Obara
a22acca119 Explicitly use C++11 for compilation
Otherwise compilation fails on GCC 5.4 in Steam Runtime environment.

As of 2019, all up-to-date compilers support C++11, most of them
use C++14 as default standard, but C++14 is not fully supported by
autoconf in Ubuntu 16.04 LTS.

Full C++11 support was introduced in GCC 4.8.1 and Clang 3.3.
2019-11-12 17:13:01 +01:00
Patryk Obara
34112dd2da Merge branch 'svn/trunk' r4282 2019-11-12 08:56:37 +01:00
krcroft
9892c1722a Remove SpeexDSP from the auto-tools configuraiton 2019-11-12 08:17:09 +01:00
Peter Veenstra
8f3474ecfd Make it possible to compile without CoreMIDI and CoreAudio on Mac OS X using a non-Apple compiler. Give some feedback to user in this case. (modified version of patch by krcroft with input from jmarsh, Dominus and Qbix)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4281
2019-11-10 14:50:11 +00:00
krcroft
dfc9b2db31 Add the audio handling changes to build system and documentation 2019-11-06 05:47:03 +01:00
Patryk Obara
08925b24a4 Merge branch 'svn/trunk' 2019-09-30 22:21:21 +02:00
Peter Veenstra
fe177b4136 Add 64-bit support to dynamic_x86 core from vogons topic 67673. Thanks jmarsh!
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4260
2019-09-30 18:30:11 +00:00
Patryk Obara
398c02cc01 Use "git" to identify builds from master branch
This avoids confusion when testing/comparing multiple builds.
2019-09-16 18:58:15 +02:00
Peter Veenstra
747190b04e Add check for realpath
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4230
2019-06-13 17:53:10 +00:00
Peter Veenstra
bfd322cff7 Make it possible to compile without png support.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4163
2018-09-21 08:53:03 +00:00
Peter Veenstra
b83172cc61 prefer ncurses above curses (on some systems, these are still different packages)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4139
2018-08-23 15:52:27 +00:00
Peter Veenstra
66fdd8f1de add a bit of hack to make building a 32 bit binary for Apple a bit easier
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4138
2018-08-21 11:57:32 +00:00
Peter Veenstra
e20cc10750 Add 64-bit ARM (ARMv8, little endian) by M-HT. Thanks M-HT!
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4117
2018-06-13 09:24:01 +00:00
Peter Veenstra
2f982daf92 Add some basic arm detection to configure for the raspberry and chromebook users
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4086
2018-03-22 15:05:31 +00:00
Peter Veenstra
618950d13a Enable core inlining by default on configure/make build system
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4078
2018-02-16 08:57:21 +00:00
Sjoerd van der Berg
55603e3aa3 Merge the mamesound branch into trunk
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4075
2018-02-07 12:17:02 +00:00
Peter Veenstra
85b0c547ef Fix output of configure when --disable-opengl is used
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4067
2017-12-13 15:50:55 +00:00
Peter Veenstra
7391ee7c25 Fix some issues with the detection of the configure option
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4057
2017-10-10 14:03:42 +00:00
Peter Veenstra
ee8d976ebc Move dddraw detection to a configure option. Requested by DosFreak.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4056
2017-10-10 13:51:13 +00:00
Sjoerd van der Berg
06b5f723b0 Update automake files for mame files
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/branches/mamesound@4035
2017-08-24 13:01:15 +00:00
Peter Veenstra
79419f1f53 Bring OS2 port up to date. Thanks Jochen
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3923
2015-07-08 12:01:33 +00:00