From: <man...@us...> - 2014-09-07 08:55:13
|
Revision: 4250 http://sourceforge.net/p/modplug/code/4250 Author: manxorist Date: 2014-09-07 08:55:03 +0000 (Sun, 07 Sep 2014) Log Message: ----------- [New] build: Add autotools-based build system for libopenmpt. [Ref] test: Support 'srcdir' environment variable (required by autotools support). [Ref] test: Support separate directories for the test data and test temporary files (required by autotools support). [Ref] test: Remove temporary files after running the tests (required by autotools support). [Ref] openmpt123: Add separate --man-version and --man-help command line options that output a format suitable for generating the man page. [New] build: Add build/auto/dist.sh script that builds all distribution archives with a single invocation. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/README.md trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/libopenmpt/Doxyfile trunk/OpenMPT/libopenmpt/dox/dependencies.md trunk/OpenMPT/libopenmpt/dox/quickstart.md trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/openmpt123/openmpt123_config.hpp trunk/OpenMPT/test/test.cpp trunk/OpenMPT/test/test.h Added Paths: ----------- trunk/OpenMPT/build/auto/dist.sh trunk/OpenMPT/build/autotools/ trunk/OpenMPT/build/autotools/Makefile.am trunk/OpenMPT/build/autotools/autoconfiscate.sh trunk/OpenMPT/build/autotools/ax_cxx_compile_stdcxx_11.m4 trunk/OpenMPT/build/autotools/configure.ac trunk/OpenMPT/libopenmpt/libopenmpt.pc.in Property Changed: ---------------- trunk/OpenMPT/ Index: trunk/OpenMPT =================================================================== --- trunk/OpenMPT 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT 2014-09-07 08:55:03 UTC (rev 4250) Property changes on: trunk/OpenMPT ___________________________________________________________________ Modified: svn:auto-props ## -10,6 +10,9 ## *.h = svn:mime-type=text/x-chdr;svn:eol-style=native *.rc = svn:mime-type=text/x-rc;svn:eol-style=CRLF +*.ac = svn:mime-type=text/x-autoconf;svn:eol-style=native +*.am = svn:mime-type=text/x-automake;svn:eol-style=native +*.in = svn:mime-type=text/x-autotools;svn:eol-style=native *.vcproj = svn:mime-type=text/x-ms-vcproj;svn:eol-style=CRLF *.vcxproj = svn:mime-type=text/x-ms-vcproj;svn:eol-style=CRLF Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/Makefile 2014-09-07 08:55:03 UTC (rev 4250) @@ -526,11 +526,13 @@ DIST_OUTPUTS += bin/dist-tar.tar DIST_OUTPUTS += bin/dist-zip.tar DIST_OUTPUTS += bin/dist-doc.tar +DIST_OUTPUTS += bin/dist-autotools.tar DIST_OUTPUTDIRS += bin/dist DIST_OUTPUTDIRS += bin/dist-doc DIST_OUTPUTDIRS += bin/dist-tar DIST_OUTPUTDIRS += bin/dist-zip +DIST_OUTPUTDIRS += bin/dist-autotools @@ -776,7 +778,7 @@ bin/openmpt123.1: bin/openmpt123$(EXESUFFIX) $(INFO) [HELP2MAN] $@ - $(SILENT)help2man --no-discard-stderr --no-info $< > $@ + $(SILENT)help2man --no-discard-stderr --no-info --version-option=--man-version --help-option=--man-help $< > $@ openmpt123/openmpt123.o: openmpt123/openmpt123.cpp $(INFO) [CXX] $< Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/README.md 2014-09-07 08:55:03 UTC (rev 4250) @@ -53,6 +53,15 @@ ### libopenmpt and openmpt123 + - Autotools + + Grab a `libopenmpt-VERSION-autotools.tar.gz` tarball. + + ./configure + make + make check + sudo make install + - Visual Studio 2010 (express version should work, but this is not tested): - The libopenmpt solution is in `libopenmpt/libopenmpt.sln`. Added: trunk/OpenMPT/build/auto/dist.sh =================================================================== --- trunk/OpenMPT/build/auto/dist.sh (rev 0) +++ trunk/OpenMPT/build/auto/dist.sh 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set -e + +# +# Dist script for libopenmpt. +# +# This is meant to be run by the libopenmpt maintainers. +# +# WARNING: The script expects the be run from the root of an OpenMPT svn +# checkout. The invests no effort in verifying this precondition. +# + +# We want ccache +export PATH="/usr/lib/ccache:$PATH" + +# Clean dist +make clean-dist + +# Check the build +make clean +make +make check +make clean + +# Build Unix-like tarball, Windows zipfile and docs tarball +make dist + +# Clean +make clean + +# Build autoconfiscated tarball +./build/autotools/autoconfiscate.sh + Property changes on: trunk/OpenMPT/build/auto/dist.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/x-sh \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/build/autotools/Makefile.am =================================================================== --- trunk/OpenMPT/build/autotools/Makefile.am (rev 0) +++ trunk/OpenMPT/build/autotools/Makefile.am 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,476 @@ +ACLOCAL_AMFLAGS = -I m4 --install +EXTRA_DIST = +EXTRA_DIST += m4/emptydir +EXTRA_DIST += libopenmpt/libopenmpt.pc.in +EXTRA_DIST += LICENSE +EXTRA_DIST += README.md +EXTRA_DIST += Doxyfile.in +EXTRA_DIST += libopenmpt/dox/changelog.md +EXTRA_DIST += libopenmpt/dox/dependencies.md +EXTRA_DIST += libopenmpt/dox/index.dox +EXTRA_DIST += libopenmpt/dox/quickstart.md +EXTRA_DIST += libopenmpt/dox/tests.md +EXTRA_DIST += libopenmpt/dox/todo.md +EXTRA_DIST += test/test.xm +EXTRA_DIST += test/test.s3m +EXTRA_DIST += test/test.mptm +EXTRA_DIST += man/openmpt123.1 +MOSTLYCLEANFILES = + +dist_doc_DATA = +dist_doc_DATA += LICENSE +dist_doc_DATA += README.md +dist_doc_DATA += TODO +dist_doc_DATA += libopenmpt/examples/libopenmpt_example_cxx.cpp +dist_doc_DATA += libopenmpt/examples/libopenmpt_example_c_mem.c +dist_doc_DATA += libopenmpt/examples/libopenmpt_example_c.c +dist_doc_DATA += libopenmpt/examples/libopenmpt_example_c_stdout.c + +bin_PROGRAMS = +check_PROGRAMS = +TESTS = libopenmpttest + +check_PROGRAMS += libopenmpt_example_c_stdout +if HAVE_PORTAUDIO +check_PROGRAMS += libopenmpt_example_c +check_PROGRAMS += libopenmpt_example_c_mem +check_PROGRAMS += libopenmpt_example_cxx +endif + +libopenmpt_example_c_stdout_SOURCES = libopenmpt/examples/libopenmpt_example_c_stdout.c +if HAVE_PORTAUDIO +libopenmpt_example_c_SOURCES = libopenmpt/examples/libopenmpt_example_c.c +libopenmpt_example_c_mem_SOURCES = libopenmpt/examples/libopenmpt_example_c_mem.c +libopenmpt_example_cxx_SOURCES = libopenmpt/examples/libopenmpt_example_cxx.cpp +endif + +libopenmpt_example_c_stdout_CPPFLAGS = +if HAVE_PORTAUDIO +libopenmpt_example_c_CPPFLAGS = $(PORTAUDIO_CFLAGS) +libopenmpt_example_c_mem_CPPFLAGS = $(PORTAUDIO_CFLAGS) +libopenmpt_example_cxx_CPPFLAGS = $(PORTAUDIO_CFLAGS) +endif + +libopenmpt_example_c_stdout_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) +if HAVE_PORTAUDIO +libopenmpt_example_c_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) +libopenmpt_example_c_mem_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) +libopenmpt_example_cxx_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) +endif + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libopenmpt/libopenmpt.pc + +lib_LTLIBRARIES = libopenmpt.la +libopenmpt_la_LDFLAGS = -version-info 0:6:0 +nobase_include_HEADERS = libopenmpt/libopenmpt.h libopenmpt/libopenmpt.hpp libopenmpt/libopenmpt_version.h libopenmpt/libopenmpt_config.h libopenmpt/libopenmpt_stream_callbacks_fd.h libopenmpt/libopenmpt_stream_callbacks_file.h +libopenmpt_la_CPPFLAGS = -DLIBOPENMPT_BUILD -I$(srcdir)/build/svn_version -I$(srcdir)/ -I$(srcdir)/common $(ZLIB_CFLAGS) +libopenmpt_la_CXXFLAGS = $(ZLIB_CFLAGS) +libopenmpt_la_CFLAGS = $(ZLIB_CFLAGS) +libopenmpt_la_LIBADD = $(ZLIB_LIBS) +libopenmpt_la_SOURCES = +libopenmpt_la_SOURCES += build/svn_version/svn_version.h +libopenmpt_la_SOURCES += common/AudioCriticalSection.cpp +libopenmpt_la_SOURCES += common/AudioCriticalSection.h +libopenmpt_la_SOURCES += common/BuildSettings.h +libopenmpt_la_SOURCES += common/CompilerDetect.h +libopenmpt_la_SOURCES += common/Endianness.h +libopenmpt_la_SOURCES += common/FlagSet.h +libopenmpt_la_SOURCES += common/Logging.cpp +libopenmpt_la_SOURCES += common/Logging.h +libopenmpt_la_SOURCES += common/misc_util.cpp +libopenmpt_la_SOURCES += common/misc_util.h +libopenmpt_la_SOURCES += common/mptFstream.h +libopenmpt_la_SOURCES += common/mptPathString.cpp +libopenmpt_la_SOURCES += common/mptPathString.h +libopenmpt_la_SOURCES += common/mptString.cpp +libopenmpt_la_SOURCES += common/mptString.h +libopenmpt_la_SOURCES += common/mutex.h +libopenmpt_la_SOURCES += common/Profiler.cpp +libopenmpt_la_SOURCES += common/Profiler.h +libopenmpt_la_SOURCES += common/serialization_utils.cpp +libopenmpt_la_SOURCES += common/serialization_utils.h +libopenmpt_la_SOURCES += common/stdafx.cpp +libopenmpt_la_SOURCES += common/stdafx.h +libopenmpt_la_SOURCES += common/StringFixer.h +libopenmpt_la_SOURCES += common/thread.h +libopenmpt_la_SOURCES += common/typedefs.cpp +libopenmpt_la_SOURCES += common/typedefs.h +libopenmpt_la_SOURCES += common/version.cpp +libopenmpt_la_SOURCES += common/version.h +libopenmpt_la_SOURCES += common/versionNumber.h +libopenmpt_la_SOURCES += soundlib/AudioReadTarget.h +libopenmpt_la_SOURCES += soundlib/ChunkReader.h +libopenmpt_la_SOURCES += soundlib/Dither.cpp +libopenmpt_la_SOURCES += soundlib/Dither.h +libopenmpt_la_SOURCES += soundlib/Dlsbank.cpp +libopenmpt_la_SOURCES += soundlib/Dlsbank.h +libopenmpt_la_SOURCES += soundlib/Fastmix.cpp +libopenmpt_la_SOURCES += soundlib/FileReader.h +libopenmpt_la_SOURCES += soundlib/FloatMixer.h +libopenmpt_la_SOURCES += soundlib/IntMixer.h +libopenmpt_la_SOURCES += soundlib/ITCompression.cpp +libopenmpt_la_SOURCES += soundlib/ITCompression.h +libopenmpt_la_SOURCES += soundlib/ITTools.cpp +libopenmpt_la_SOURCES += soundlib/ITTools.h +libopenmpt_la_SOURCES += soundlib/Load_669.cpp +libopenmpt_la_SOURCES += soundlib/Load_amf.cpp +libopenmpt_la_SOURCES += soundlib/Load_ams.cpp +libopenmpt_la_SOURCES += soundlib/Load_dbm.cpp +libopenmpt_la_SOURCES += soundlib/Load_digi.cpp +libopenmpt_la_SOURCES += soundlib/Load_dmf.cpp +libopenmpt_la_SOURCES += soundlib/Load_dsm.cpp +libopenmpt_la_SOURCES += soundlib/Loaders.h +libopenmpt_la_SOURCES += soundlib/Load_far.cpp +libopenmpt_la_SOURCES += soundlib/Load_gdm.cpp +libopenmpt_la_SOURCES += soundlib/Load_imf.cpp +libopenmpt_la_SOURCES += soundlib/Load_it.cpp +libopenmpt_la_SOURCES += soundlib/Load_itp.cpp +libopenmpt_la_SOURCES += soundlib/load_j2b.cpp +libopenmpt_la_SOURCES += soundlib/Load_mdl.cpp +libopenmpt_la_SOURCES += soundlib/Load_med.cpp +libopenmpt_la_SOURCES += soundlib/Load_mid.cpp +libopenmpt_la_SOURCES += soundlib/Load_mo3.cpp +libopenmpt_la_SOURCES += soundlib/Load_mod.cpp +libopenmpt_la_SOURCES += soundlib/Load_mt2.cpp +libopenmpt_la_SOURCES += soundlib/Load_mtm.cpp +libopenmpt_la_SOURCES += soundlib/Load_okt.cpp +libopenmpt_la_SOURCES += soundlib/Load_psm.cpp +libopenmpt_la_SOURCES += soundlib/Load_ptm.cpp +libopenmpt_la_SOURCES += soundlib/Load_s3m.cpp +libopenmpt_la_SOURCES += soundlib/Load_stm.cpp +libopenmpt_la_SOURCES += soundlib/Load_ult.cpp +libopenmpt_la_SOURCES += soundlib/Load_umx.cpp +libopenmpt_la_SOURCES += soundlib/Load_wav.cpp +libopenmpt_la_SOURCES += soundlib/Load_xm.cpp +libopenmpt_la_SOURCES += soundlib/Message.cpp +libopenmpt_la_SOURCES += soundlib/Message.h +libopenmpt_la_SOURCES += soundlib/MIDIEvents.cpp +libopenmpt_la_SOURCES += soundlib/MIDIEvents.h +libopenmpt_la_SOURCES += soundlib/MIDIMacros.cpp +libopenmpt_la_SOURCES += soundlib/MIDIMacros.h +libopenmpt_la_SOURCES += soundlib/Mixer.h +libopenmpt_la_SOURCES += soundlib/MixerInterface.h +libopenmpt_la_SOURCES += soundlib/MixerLoops.cpp +libopenmpt_la_SOURCES += soundlib/MixerLoops.h +libopenmpt_la_SOURCES += soundlib/MixerSettings.cpp +libopenmpt_la_SOURCES += soundlib/MixerSettings.h +libopenmpt_la_SOURCES += soundlib/Mmcmp.cpp +libopenmpt_la_SOURCES += soundlib/ModChannel.cpp +libopenmpt_la_SOURCES += soundlib/ModChannel.h +libopenmpt_la_SOURCES += soundlib/modcommand.cpp +libopenmpt_la_SOURCES += soundlib/modcommand.h +libopenmpt_la_SOURCES += soundlib/ModInstrument.cpp +libopenmpt_la_SOURCES += soundlib/ModInstrument.h +libopenmpt_la_SOURCES += soundlib/ModSample.cpp +libopenmpt_la_SOURCES += soundlib/ModSample.h +libopenmpt_la_SOURCES += soundlib/ModSequence.cpp +libopenmpt_la_SOURCES += soundlib/ModSequence.h +libopenmpt_la_SOURCES += soundlib/modsmp_ctrl.cpp +libopenmpt_la_SOURCES += soundlib/modsmp_ctrl.h +libopenmpt_la_SOURCES += soundlib/mod_specifications.cpp +libopenmpt_la_SOURCES += soundlib/mod_specifications.h +libopenmpt_la_SOURCES += soundlib/patternContainer.cpp +libopenmpt_la_SOURCES += soundlib/patternContainer.h +libopenmpt_la_SOURCES += soundlib/pattern.cpp +libopenmpt_la_SOURCES += soundlib/pattern.h +libopenmpt_la_SOURCES += soundlib/Resampler.h +libopenmpt_la_SOURCES += soundlib/RowVisitor.cpp +libopenmpt_la_SOURCES += soundlib/RowVisitor.h +libopenmpt_la_SOURCES += soundlib/S3MTools.cpp +libopenmpt_la_SOURCES += soundlib/S3MTools.h +libopenmpt_la_SOURCES += soundlib/SampleFormatConverters.h +libopenmpt_la_SOURCES += soundlib/SampleFormat.h +libopenmpt_la_SOURCES += soundlib/SampleFormats.cpp +libopenmpt_la_SOURCES += soundlib/SampleIO.cpp +libopenmpt_la_SOURCES += soundlib/SampleIO.h +libopenmpt_la_SOURCES += soundlib/Snd_defs.h +libopenmpt_la_SOURCES += soundlib/Sndfile.cpp +libopenmpt_la_SOURCES += soundlib/Sndfile.h +libopenmpt_la_SOURCES += soundlib/Snd_flt.cpp +libopenmpt_la_SOURCES += soundlib/Snd_fx.cpp +libopenmpt_la_SOURCES += soundlib/Sndmix.cpp +libopenmpt_la_SOURCES += soundlib/SoundFilePlayConfig.cpp +libopenmpt_la_SOURCES += soundlib/SoundFilePlayConfig.h +libopenmpt_la_SOURCES += soundlib/Tables.cpp +libopenmpt_la_SOURCES += soundlib/Tables.h +libopenmpt_la_SOURCES += soundlib/Tagging.cpp +libopenmpt_la_SOURCES += soundlib/Tagging.h +libopenmpt_la_SOURCES += soundlib/tuningbase.cpp +libopenmpt_la_SOURCES += soundlib/tuningbase.h +libopenmpt_la_SOURCES += soundlib/tuningCollection.cpp +libopenmpt_la_SOURCES += soundlib/tuningcollection.h +libopenmpt_la_SOURCES += soundlib/tuning.cpp +libopenmpt_la_SOURCES += soundlib/tuning.h +libopenmpt_la_SOURCES += soundlib/Wav.h +libopenmpt_la_SOURCES += soundlib/WAVTools.cpp +libopenmpt_la_SOURCES += soundlib/WAVTools.h +libopenmpt_la_SOURCES += soundlib/WindowedFIR.cpp +libopenmpt_la_SOURCES += soundlib/WindowedFIR.h +libopenmpt_la_SOURCES += soundlib/XMTools.cpp +libopenmpt_la_SOURCES += soundlib/XMTools.h +libopenmpt_la_SOURCES += soundlib/plugins/PlugInterface.h +libopenmpt_la_SOURCES += soundlib/Tunings/built-inTunings.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_c.cpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_cxx.cpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_ext.cpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_impl.cpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_config.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_ext.hpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt.hpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_impl.hpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_internal.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_stream_callbacks_fd.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_stream_callbacks_file.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_version.h + +check_PROGRAMS += libopenmpttest +libopenmpttest_CPPFLAGS = -DLIBOPENMPT_BUILD -DLIBOPENMPT_BUILD_TEST -I$(srcdir)/build/svn_version -I$(srcdir)/ -I$(srcdir)/common $(ZLIB_CFLAGS) +libopenmpttest_CXXFLAGS = $(ZLIB_CFLAGS) +libopenmpttest_CFLAGS = $(ZLIB_CFLAGS) +libopenmpttest_LDADD = $(ZLIB_LIBS) +libopenmpttest_SOURCES = +libopenmpttest_SOURCES += libopenmpt/libopenmpt_test.cpp +libopenmpttest_SOURCES += test/test.cpp +libopenmpttest_SOURCES += test/test.h +libopenmpttest_SOURCES += test/TestTools.h +libopenmpttest_SOURCES += test/TestToolsLib.cpp +libopenmpttest_SOURCES += test/TestToolsLib.h +libopenmpttest_SOURCES += test/TestToolsTracker.h +libopenmpttest_SOURCES += build/svn_version/svn_version.h +libopenmpttest_SOURCES += common/AudioCriticalSection.cpp +libopenmpttest_SOURCES += common/AudioCriticalSection.h +libopenmpttest_SOURCES += common/BuildSettings.h +libopenmpttest_SOURCES += common/CompilerDetect.h +libopenmpttest_SOURCES += common/Endianness.h +libopenmpttest_SOURCES += common/FlagSet.h +libopenmpttest_SOURCES += common/Logging.cpp +libopenmpttest_SOURCES += common/Logging.h +libopenmpttest_SOURCES += common/misc_util.cpp +libopenmpttest_SOURCES += common/misc_util.h +libopenmpttest_SOURCES += common/mptFstream.h +libopenmpttest_SOURCES += common/mptPathString.cpp +libopenmpttest_SOURCES += common/mptPathString.h +libopenmpttest_SOURCES += common/mptString.cpp +libopenmpttest_SOURCES += common/mptString.h +libopenmpttest_SOURCES += common/mutex.h +libopenmpttest_SOURCES += common/Profiler.cpp +libopenmpttest_SOURCES += common/Profiler.h +libopenmpttest_SOURCES += common/serialization_utils.cpp +libopenmpttest_SOURCES += common/serialization_utils.h +libopenmpttest_SOURCES += common/stdafx.cpp +libopenmpttest_SOURCES += common/stdafx.h +libopenmpttest_SOURCES += common/StringFixer.h +libopenmpttest_SOURCES += common/thread.h +libopenmpttest_SOURCES += common/typedefs.cpp +libopenmpttest_SOURCES += common/typedefs.h +libopenmpttest_SOURCES += common/version.cpp +libopenmpttest_SOURCES += common/version.h +libopenmpttest_SOURCES += common/versionNumber.h +libopenmpttest_SOURCES += soundlib/AudioReadTarget.h +libopenmpttest_SOURCES += soundlib/ChunkReader.h +libopenmpttest_SOURCES += soundlib/Dither.cpp +libopenmpttest_SOURCES += soundlib/Dither.h +libopenmpttest_SOURCES += soundlib/Dlsbank.cpp +libopenmpttest_SOURCES += soundlib/Dlsbank.h +libopenmpttest_SOURCES += soundlib/Fastmix.cpp +libopenmpttest_SOURCES += soundlib/FileReader.h +libopenmpttest_SOURCES += soundlib/FloatMixer.h +libopenmpttest_SOURCES += soundlib/IntMixer.h +libopenmpttest_SOURCES += soundlib/ITCompression.cpp +libopenmpttest_SOURCES += soundlib/ITCompression.h +libopenmpttest_SOURCES += soundlib/ITTools.cpp +libopenmpttest_SOURCES += soundlib/ITTools.h +libopenmpttest_SOURCES += soundlib/Load_669.cpp +libopenmpttest_SOURCES += soundlib/Load_amf.cpp +libopenmpttest_SOURCES += soundlib/Load_ams.cpp +libopenmpttest_SOURCES += soundlib/Load_dbm.cpp +libopenmpttest_SOURCES += soundlib/Load_digi.cpp +libopenmpttest_SOURCES += soundlib/Load_dmf.cpp +libopenmpttest_SOURCES += soundlib/Load_dsm.cpp +libopenmpttest_SOURCES += soundlib/Loaders.h +libopenmpttest_SOURCES += soundlib/Load_far.cpp +libopenmpttest_SOURCES += soundlib/Load_gdm.cpp +libopenmpttest_SOURCES += soundlib/Load_imf.cpp +libopenmpttest_SOURCES += soundlib/Load_it.cpp +libopenmpttest_SOURCES += soundlib/Load_itp.cpp +libopenmpttest_SOURCES += soundlib/load_j2b.cpp +libopenmpttest_SOURCES += soundlib/Load_mdl.cpp +libopenmpttest_SOURCES += soundlib/Load_med.cpp +libopenmpttest_SOURCES += soundlib/Load_mid.cpp +libopenmpttest_SOURCES += soundlib/Load_mo3.cpp +libopenmpttest_SOURCES += soundlib/Load_mod.cpp +libopenmpttest_SOURCES += soundlib/Load_mt2.cpp +libopenmpttest_SOURCES += soundlib/Load_mtm.cpp +libopenmpttest_SOURCES += soundlib/Load_okt.cpp +libopenmpttest_SOURCES += soundlib/Load_psm.cpp +libopenmpttest_SOURCES += soundlib/Load_ptm.cpp +libopenmpttest_SOURCES += soundlib/Load_s3m.cpp +libopenmpttest_SOURCES += soundlib/Load_stm.cpp +libopenmpttest_SOURCES += soundlib/Load_ult.cpp +libopenmpttest_SOURCES += soundlib/Load_umx.cpp +libopenmpttest_SOURCES += soundlib/Load_wav.cpp +libopenmpttest_SOURCES += soundlib/Load_xm.cpp +libopenmpttest_SOURCES += soundlib/Message.cpp +libopenmpttest_SOURCES += soundlib/Message.h +libopenmpttest_SOURCES += soundlib/MIDIEvents.cpp +libopenmpttest_SOURCES += soundlib/MIDIEvents.h +libopenmpttest_SOURCES += soundlib/MIDIMacros.cpp +libopenmpttest_SOURCES += soundlib/MIDIMacros.h +libopenmpttest_SOURCES += soundlib/Mixer.h +libopenmpttest_SOURCES += soundlib/MixerInterface.h +libopenmpttest_SOURCES += soundlib/MixerLoops.cpp +libopenmpttest_SOURCES += soundlib/MixerLoops.h +libopenmpttest_SOURCES += soundlib/MixerSettings.cpp +libopenmpttest_SOURCES += soundlib/MixerSettings.h +libopenmpttest_SOURCES += soundlib/Mmcmp.cpp +libopenmpttest_SOURCES += soundlib/ModChannel.cpp +libopenmpttest_SOURCES += soundlib/ModChannel.h +libopenmpttest_SOURCES += soundlib/modcommand.cpp +libopenmpttest_SOURCES += soundlib/modcommand.h +libopenmpttest_SOURCES += soundlib/ModInstrument.cpp +libopenmpttest_SOURCES += soundlib/ModInstrument.h +libopenmpttest_SOURCES += soundlib/ModSample.cpp +libopenmpttest_SOURCES += soundlib/ModSample.h +libopenmpttest_SOURCES += soundlib/ModSequence.cpp +libopenmpttest_SOURCES += soundlib/ModSequence.h +libopenmpttest_SOURCES += soundlib/modsmp_ctrl.cpp +libopenmpttest_SOURCES += soundlib/modsmp_ctrl.h +libopenmpttest_SOURCES += soundlib/mod_specifications.cpp +libopenmpttest_SOURCES += soundlib/mod_specifications.h +libopenmpttest_SOURCES += soundlib/patternContainer.cpp +libopenmpttest_SOURCES += soundlib/patternContainer.h +libopenmpttest_SOURCES += soundlib/pattern.cpp +libopenmpttest_SOURCES += soundlib/pattern.h +libopenmpttest_SOURCES += soundlib/Resampler.h +libopenmpttest_SOURCES += soundlib/RowVisitor.cpp +libopenmpttest_SOURCES += soundlib/RowVisitor.h +libopenmpttest_SOURCES += soundlib/S3MTools.cpp +libopenmpttest_SOURCES += soundlib/S3MTools.h +libopenmpttest_SOURCES += soundlib/SampleFormatConverters.h +libopenmpttest_SOURCES += soundlib/SampleFormat.h +libopenmpttest_SOURCES += soundlib/SampleFormats.cpp +libopenmpttest_SOURCES += soundlib/SampleIO.cpp +libopenmpttest_SOURCES += soundlib/SampleIO.h +libopenmpttest_SOURCES += soundlib/Snd_defs.h +libopenmpttest_SOURCES += soundlib/Sndfile.cpp +libopenmpttest_SOURCES += soundlib/Sndfile.h +libopenmpttest_SOURCES += soundlib/Snd_flt.cpp +libopenmpttest_SOURCES += soundlib/Snd_fx.cpp +libopenmpttest_SOURCES += soundlib/Sndmix.cpp +libopenmpttest_SOURCES += soundlib/SoundFilePlayConfig.cpp +libopenmpttest_SOURCES += soundlib/SoundFilePlayConfig.h +libopenmpttest_SOURCES += soundlib/Tables.cpp +libopenmpttest_SOURCES += soundlib/Tables.h +libopenmpttest_SOURCES += soundlib/Tagging.cpp +libopenmpttest_SOURCES += soundlib/Tagging.h +libopenmpttest_SOURCES += soundlib/tuningbase.cpp +libopenmpttest_SOURCES += soundlib/tuningbase.h +libopenmpttest_SOURCES += soundlib/tuningCollection.cpp +libopenmpttest_SOURCES += soundlib/tuningcollection.h +libopenmpttest_SOURCES += soundlib/tuning.cpp +libopenmpttest_SOURCES += soundlib/tuning.h +libopenmpttest_SOURCES += soundlib/Wav.h +libopenmpttest_SOURCES += soundlib/WAVTools.cpp +libopenmpttest_SOURCES += soundlib/WAVTools.h +libopenmpttest_SOURCES += soundlib/WindowedFIR.cpp +libopenmpttest_SOURCES += soundlib/WindowedFIR.h +libopenmpttest_SOURCES += soundlib/XMTools.cpp +libopenmpttest_SOURCES += soundlib/XMTools.h +libopenmpttest_SOURCES += soundlib/plugins/PlugInterface.h +libopenmpttest_SOURCES += soundlib/Tunings/built-inTunings.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_c.cpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_cxx.cpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_ext.cpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_impl.cpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_config.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_ext.hpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt.hpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_impl.hpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_internal.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_stream_callbacks_fd.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_stream_callbacks_file.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_version.h + +bin_PROGRAMS += openmpt123 +openmpt123_CPPFLAGS = -I$(srcdir)/src/openmpt123 $(PORTAUDIO_CFLAGS) $(SDL_CFLAGS) $(SNDFILE_CFLAGS) $(FLAC_CFLAGS) +openmpt123_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) $(SDL_LIBS) $(SNDFILE_LIBS) $(FLAC_LIBS) +openmpt123_SOURCES = +openmpt123_SOURCES += src/openmpt123/openmpt123_config.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123.cpp +openmpt123_SOURCES += src/openmpt123/openmpt123_flac.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_mmio.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_portaudio.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_raw.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_sdl.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_sndfile.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_stdout.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_waveout.hpp +#bin_PROGRAMS += openmpt123 +#openmpt123_CPPFLAGS = -I$(srcdir)/src/openmpt123 $(PORTAUDIO_CFLAGS) $(SDL_CFLAGS) $(SNDFILE_CFLAGS) $(FLAC_CFLAGS) +#openmpt123_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) $(SDL_LIBS) $(SNDFILE_LIBS) $(FLAC_LIBS) +#openmpt123_SOURCES = +#openmpt123_SOURCES += openmpt123/openmpt123_config.hpp +#openmpt123_SOURCES += openmpt123/openmpt123.cpp +#openmpt123_SOURCES += openmpt123/openmpt123_flac.hpp +#openmpt123_SOURCES += openmpt123/openmpt123.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_mmio.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_portaudio.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_raw.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_sdl.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_sndfile.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_stdout.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_waveout.hpp + +man1_MANS = man/openmpt123.1 + +#$(man3_MANS): doxygen-doc +MOSTLYCLEANFILES += $(DX_CLEANFILES) + +if DX_COND_doc + +all-local: @DX_DOCDIR@/@PACKAGE@.tag + +install-data-local: + $(INSTALL) -d $(DESTDIR)$(docdir)/html/search + ( cd @DX_DOCDIR@ && \ + for f in `find html -type f \! -name "installdox"`; do \ + $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ + done ) + +clean-local: + $(RM) -r html + $(RM) -r man + $(RM) @DX_DOCDIR@/@PACKAGE@.tag + +uninstall-local: + $(RM) -r $(DESTDIR)$(docdir)/html + +if DX_COND_html +DX_CLEAN_HTML = @DX_DOCDIR@/html +endif DX_COND_html + +if DX_COND_man +DX_CLEAN_MAN = @DX_DOCDIR@/man +endif DX_COND_man + +.PHONY: doxygen-run doxygen-doc + +.INTERMEDIATE: doxygen-run + +doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag + +doxygen-doc: doxygen-run + +@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) + rm -rf @DX_DOCDIR@ + $(DX_ENV) $(DX_DOXYGEN) $(DX_CONFIG) + touch $@ + +DX_CLEANFILES = @DX_DOCDIR@/@PACKAGE@.tag -r $(DX_CLEAN_HTML) $(DX_CLEAN_MAN) + +endif DX_COND_doc + Property changes on: trunk/OpenMPT/build/autotools/Makefile.am ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-makefile \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/build/autotools/autoconfiscate.sh =================================================================== --- trunk/OpenMPT/build/autotools/autoconfiscate.sh (rev 0) +++ trunk/OpenMPT/build/autotools/autoconfiscate.sh 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,96 @@ +#!/usr/bin/env bash +set -e + +# +# This script autoconficates the libopenmpt source tree and builds an +# autotools-based release tarball. +# +# WARNING: The script expects the be run from the root of an OpenMPT svn +# checkout. The invests no effort in verifying this precondition. +# + +echo "Cleaning local buid ..." +make clean + +echo "Cleaning dist-autotools.tar ..." +rm -rf bin/dist-autotools.tar || true + +echo "Cleaning tmp directory ..." +if [ -e bin/dist-autotools ]; then + chmod -R u+rw bin/dist-autotools || true +fi +rm -rf bin/dist-autotools || true + +echo "Making tmp directory ..." +mkdir bin/dist-autotools + +echo "Exporting svn ..." +svn export ./LICENSE bin/dist-autotools/LICENSE +svn export ./README.md bin/dist-autotools/README.md +svn export ./TODO bin/dist-autotools/TODO +svn export ./common bin/dist-autotools/common +svn export ./soundlib bin/dist-autotools/soundlib +svn export ./test bin/dist-autotools/test +svn export ./libopenmpt bin/dist-autotools/libopenmpt +mkdir bin/dist-autotools/src +svn export ./openmpt123 bin/dist-autotools/src/openmpt123 +#svn export ./openmpt123 bin/dist-autotools/openmpt123 +mkdir bin/dist-autotools/build +mkdir bin/dist-autotools/build/svn_version +svn export ./build/svn_version/svn_version.h bin/dist-autotools/build/svn_version/svn_version.h +mkdir bin/dist-autotools/m4 +touch bin/dist-autotools/m4/emptydir +svn export ./build/autotools/configure.ac bin/dist-autotools/configure.ac +svn export ./build/autotools/Makefile.am bin/dist-autotools/Makefile.am +svn export ./build/autotools/ax_cxx_compile_stdcxx_11.m4 bin/dist-autotools/m4/ax_cxx_compile_stdcxx_11.m4 + +echo "Querying svn version ..." +BUILD_SVNVERSION="$(svnversion -n . | tr ':' '-' )" + +echo "Building man pages ..." +make bin/openmpt123.1 + +echo "Copying man pages ..." +mkdir bin/dist-autotools/man +cp bin/openmpt123.1 bin/dist-autotools/man/openmpt123.1 + +echo "Cleaning local buid ..." +make clean + +echo "Changing to autotools package directory ..." +OLDDIR="$(pwd)" +cd bin/dist-autotools/ + +echo "Setting version in configure.ac ..." +cat configure.ac | sed "s/!!MPT_SVNVERSION!!/${BUILD_SVNVERSION}/g" > configure.ac.tmp && mv configure.ac.tmp configure.ac +cat configure.ac | sed "s/!!MPT_PACKAGE!!/true/g" > configure.ac.tmp && mv configure.ac.tmp configure.ac + +echo "Generating 'Doxyfile.in' ..." +( cat libopenmpt/Doxyfile | grep -v '^PROJECT_NUMBER' | sed 's/INPUT += /INPUT += @top_srcdir@\//g' > Doxyfile.in ) && ( echo "PROJECT_NUMBER = @PACKAGE_VERSION@" >> Doxyfile.in ) && rm libopenmpt/Doxyfile +echo "OUTPUT_DIRECTORY = doxygen-doc" >> Doxyfile.in + +echo "Running 'autoreconf -i' ..." +autoreconf -i + +echo "Running './configure' ..." +./configure + +echo "Running 'make dist' ..." +make dist + +echo "Running 'make distcheck' ..." +make distcheck + +echo "Running 'make' ..." +make + +echo "Running 'make check' ..." +make check + +echo "Building dist-autotools.tar ..." +cd "$OLDDIR" +cd bin/dist-autotools +tar cvf dist-autotools.tar *.tar.gz +cd ../.. +mv bin/dist-autotools/dist-autotools.tar bin/ + Property changes on: trunk/OpenMPT/build/autotools/autoconfiscate.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/x-sh \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/build/autotools/ax_cxx_compile_stdcxx_11.m4 =================================================================== --- trunk/OpenMPT/build/autotools/ax_cxx_compile_stdcxx_11.m4 (rev 0) +++ trunk/OpenMPT/build/autotools/ax_cxx_compile_stdcxx_11.m4 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,142 @@ +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html +# ============================================================================ +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the C++11 +# standard; if necessary, add switches to CXXFLAGS to enable support. +# +# The first argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The second argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline C++11 support is required and that the macro +# should error out if no mode with that support is found. If specified +# 'optional', then configuration proceeds regardless, after defining +# HAVE_CXX11 if and only if a supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik <bk...@re...> +# Copyright (c) 2012 Zack Weinberg <za...@pa...> +# Copyright (c) 2013 Roy Stogner <roy...@ic...> +# Copyright (c) 2014 Alexey Sokolov <so...@go...> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 4 + +m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ + template <typename T> + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + struct Base { + virtual void f() {} + }; + struct Child : public Base { + virtual void f() override {} + }; + + typedef check<check<bool>> right_angle_brackets; + + int a; + decltype(a) b; + + typedef check<int> check_type; + check_type c; + check_type&& cr = static_cast<check_type&&>(c); + + auto d = a; + auto l = [](){}; +]]) + +AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl + m4_if([$1], [], [], + [$1], [ext], [], + [$1], [noext], [], + [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl + m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], + [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], + [$2], [optional], [ax_cxx_compile_cxx11_required=false], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++11 features by default, + ax_cv_cxx_compile_cxx11, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [ax_cv_cxx_compile_cxx11=yes], + [ax_cv_cxx_compile_cxx11=no])]) + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + m4_if([$1], [noext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=gnu++11 -std=gnu++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + ac_success=yes + break + fi + done + fi]) + + m4_if([$1], [ext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=c++11 -std=c++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + ac_success=yes + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx11_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) + fi + else + if test x$ac_success = xno; then + HAVE_CXX11=0 + AC_MSG_NOTICE([No compiler with C++11 support was found]) + else + HAVE_CXX11=1 + AC_DEFINE(HAVE_CXX11,1, + [define if the compiler supports basic C++11 syntax]) + fi + + AC_SUBST(HAVE_CXX11) + fi +]) Added: trunk/OpenMPT/build/autotools/configure.ac =================================================================== --- trunk/OpenMPT/build/autotools/configure.ac (rev 0) +++ trunk/OpenMPT/build/autotools/configure.ac 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,90 @@ +AC_INIT([libopenmpt], [0.2.!!MPT_SVNVERSION!!-autotools], [http://bugs.openmpt.org/], [libopenmpt], [http://lib.openmpt.org/]) +AC_PREREQ([2.68]) + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_FILES([Makefile libopenmpt/libopenmpt.pc Doxyfile]) + +AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign subdir-objects]) + +AM_PROG_AR + +LT_INIT + +AC_SYS_LARGEFILE + +PKG_PROG_PKG_CONFIG([0.24]) +AC_PROG_CC +#AM_PROG_CC_C_O +AC_PROG_CXX +AC_PROG_INSTALL + +AC_DEFINE([MPT_SVNVERSION], ["!!MPT_SVNVERSION!!"], [svn version]) +AC_DEFINE([MPT_PACKAGE], [!!MPT_PACKAGE!!], [is package]) + +# Required libopenmpt dependency: zlib +PKG_CHECK_MODULES([ZLIB], [zlib], AC_DEFINE([MPT_WITH_ZLIB], [], [with libz])) + +# Optional openmpt123 dependency: PortAudio, try SDL if PortAudio is unavailable +PKG_CHECK_MODULES([PORTAUDIO], [portaudio-2.0], + [ + have_portaudio=1 + AC_DEFINE([MPT_WITH_PORTAUDIO], [], [with libportaudio]) + ], + [ + have_portaudio=0 + PKG_CHECK_MODULES([SDL], [sdl], + [AC_DEFINE([MPT_WITH_SDL], [], [with libsdl])], + [AC_MSG_WARN([Neither PORTAUDIO nor SDL is available. openmpt123 will be built without realtime audio output.])] + ) + ] +) +AM_CONDITIONAL([HAVE_PORTAUDIO], [test x$have_portaudio = x1]) + +# Optional openmpt123 dependency: libsndfile +PKG_CHECK_MODULES([SNDFILE], [sndfile], [AC_DEFINE([MPT_WITH_SNDFILE], [], [with libsndfile])], [AC_MSG_NOTICE([SNDFILE not found])]) + +# Optional openmpt123 dependency: libFLAC +PKG_CHECK_MODULES([FLAC], [flac], [AC_DEFINE([MPT_WITH_FLAC], [], [with libflac])], [AC_MSG_NOTICE([FLAC not found])]) + +# We want a modern C compiler +AC_PROG_CC_STDC +#AC_PROG_CC_C99 +#AC_LANG_PUSH([C]) +#AX_CHECK_COMPILE_FLAG([-std=c++0x], [CFLAGS="$CFLAGS -std=c99"]) +#AC_LANG_POP([C]) + +# We need basic C++11 support (implementing C++03TR2 features in namespace std::) +AX_CXX_COMPILE_STDCXX_11([noext],[optional]) +AC_LANG_PUSH([C++]) +# Even if AX_CXX_COMPILE_STDCXX_11 fails, std=c++0x on older GCC and Clang compilers enables enough of C++11 for libopenmpt to build. +AS_IF([test "x$HAVE_CXX11" = x0], [AX_CHECK_COMPILE_FLAG([-std=c++0x], [CXXFLAGS="$CXXFLAGS -std=c++0x"])]) +AC_LANG_POP([C++]) + +AC_LANG_PUSH([C]) +AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CFLAGS="$CFLAGS -fvisibility=hidden"]) +AX_CFLAGS_WARN_ALL +AC_LANG_POP([C]) + +AC_LANG_PUSH([C++]) +AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CXXFLAGS="$CXXFLAGS -fvisibility=hidden"]) +AX_CXXFLAGS_WARN_ALL +AC_LANG_POP([C++]) + +DX_DOXYGEN_FEATURE(ON) +DX_DOT_FEATURE(OFF) +DX_HTML_FEATURE(ON) +DX_MAN_FEATURE(ON) + +DX_CHM_FEATURE(OFF) +DX_CHI_FEATURE(OFF) +DX_RTF_FEATURE(OFF) +DX_XML_FEATURE(OFF) +DX_PDF_FEATURE(OFF) +DX_PS_FEATURE(OFF) + +DX_INIT_DOXYGEN([libopenmpt], [Doxyfile], [doxygen-doc]) + +AC_OUTPUT + Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/common/BuildSettings.h 2014-09-07 08:55:03 UTC (rev 4250) @@ -147,6 +147,11 @@ #elif defined(LIBOPENMPT_BUILD) +#if defined(HAVE_CONFIG_H) +// wrapper for autoconf macros +#include "config.h" +#endif // HAVE_CONFIG_H + #if defined(LIBOPENMPT_BUILD_TEST) #define ENABLE_TESTS #else Modified: trunk/OpenMPT/libopenmpt/Doxyfile =================================================================== --- trunk/OpenMPT/libopenmpt/Doxyfile 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/libopenmpt/Doxyfile 2014-09-07 08:55:03 UTC (rev 4250) @@ -733,21 +733,20 @@ # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = \ - libopenmpt/dox/index.dox \ - libopenmpt/dox/quickstart.md \ - README.md \ - libopenmpt/dox/dependencies.md \ - libopenmpt/dox/tests.md \ - libopenmpt/dox/changelog.md \ - libopenmpt/dox/todo.md \ - libopenmpt/libopenmpt.hpp \ - libopenmpt/libopenmpt.h \ - libopenmpt/libopenmpt_stream_callbacks_fd.h \ - libopenmpt/libopenmpt_stream_callbacks_file.h \ - libopenmpt/libopenmpt_config.h \ - libopenmpt/libopenmpt_version.h \ - +INPUT = +INPUT += libopenmpt/dox/index.dox +INPUT += libopenmpt/dox/quickstart.md +INPUT += README.md +INPUT += libopenmpt/dox/dependencies.md +INPUT += libopenmpt/dox/tests.md +INPUT += libopenmpt/dox/changelog.md +INPUT += libopenmpt/dox/todo.md +INPUT += libopenmpt/libopenmpt.hpp +INPUT += libopenmpt/libopenmpt.h +INPUT += libopenmpt/libopenmpt_stream_callbacks_fd.h +INPUT += libopenmpt/libopenmpt_stream_callbacks_file.h +INPUT += libopenmpt/libopenmpt_config.h +INPUT += libopenmpt/libopenmpt_version.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -1022,7 +1021,7 @@ # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = +HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). Modified: trunk/OpenMPT/libopenmpt/dox/dependencies.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/dependencies.md 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/libopenmpt/dox/dependencies.md 2014-09-07 08:55:03 UTC (rev 4250) @@ -23,6 +23,10 @@ * Building on Unix-like systems requires: * **GNU make** * **pkg-config** + * The Autotools-based build system requires: + * **pkg-config 0.24** or higher + * **zlib** + * **doxygen** ### openmpt123 Modified: trunk/OpenMPT/libopenmpt/dox/quickstart.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/quickstart.md 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/libopenmpt/dox/quickstart.md 2014-09-07 08:55:03 UTC (rev 4250) @@ -3,6 +3,38 @@ =========== +### Autotools-based + + 1. Grab a `libopenmpt-autotools.VERSION.tar.gz` tarball. + 2. Get dependencies: + - **gcc >= 4.4** or **clang >= 3.0** + - **pkg-config >= 0.24** + - **zlib** + - **doxygen >= 1.8** + 3. *Optional*: + - **portaudio-v19** + - **libSDL == 1.2.x** + - **libFLAC** + - **libsndfile** + 4. Run: + + ./configure + make + make check + sudo make install + +### Windows + + 1. Get dependencies: + - **Microsoft Visual Studio 2010** + 2. *Optionally* get dependencies: + - **Winamp SDK** + - **XMPlay SDK** + 3. Checkout `http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/` . + 4. Open `openmpt123\openmpt123.sln` or `libopenmpt\libopenmpt.sln` in *Microsoft Visual Studio 2010*. + 5. Select appropriate configuration and build. Binaries are generated in `bin\` + 6. Drag a module onto `openmpt123.exe` or copy the player plugin DLLs (`in_openmpt.dll`, `xmp-openmpt.dll` or `foo_openmpt.dll`) and `libopenmpt_settings.dll` into the respective player directory. + ### Unix-like 1. Get dependencies: @@ -29,15 +61,3 @@ sudo make install-doc # installs into /usr/local by default openmpt123 $SOMEMODULE -### Windows - - 1. Get dependencies: - - **Microsoft Visual Studio 2010** - 2. *Optionally* get dependencies: - - **Winamp SDK** - - **XMPlay SDK** - 3. Checkout `http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/` . - 4. Open `openmpt123\openmpt123.sln` or `libopenmpt\libopenmpt.sln` in *Microsoft Visual Studio 2010*. - 5. Select appropriate configuration and build. Binaries are generated in `bin\` - 6. Drag a module onto `openmpt123.exe` or copy the player plugin DLLs (`in_openmpt.dll`, `xmp-openmpt.dll` or `foo_openmpt.dll`) and `libopenmpt_settings.dll` into the respective player directory. - Added: trunk/OpenMPT/libopenmpt/libopenmpt.pc.in =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.pc.in (rev 0) +++ trunk/OpenMPT/libopenmpt/libopenmpt.pc.in 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,12 @@ + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: libopenmpt +Description: Tracker module player based on OpenMPT +Version: @VERSION@ +Libs: -L${libdir} -lopenmpt +Libs.private: zlib +Cflags: -I${includedir} Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp 2014-09-07 08:55:03 UTC (rev 4250) @@ -18,6 +18,7 @@ #include <locale> #include <clocale> +#include <cstdlib> using namespace OpenMPT; @@ -28,20 +29,29 @@ // mingw64 does only default to special C linkage for "main", but not for "wmain". extern "C" #endif -int wmain( int /*wargc*/, wchar_t * /*wargv*/ [] ) { +int wmain( int /*argc*/ , wchar_t * /*argv*/ [] ) { #else -int main( int /*argc*/, char * /*argv*/ [] ) { +int main( int /*argc*/ , char * /*argv*/ [] ) { #endif try { + + // prefix for test suite + std::string pathprefix = std::string(); + + // set path prefix for test files (if provided) + std::string env_srcdir = std::getenv( "srcdir" ) ? std::getenv( "srcdir" ) : std::string(); + if ( !env_srcdir.empty() ) { + pathprefix = env_srcdir; + } // run test with "C" / classic() locale - Test::DoTests(); + Test::DoTests( pathprefix ); // try setting the C locale to the user locale setlocale( LC_ALL, "" ); // run all tests again with a set C locale - Test::DoTests(); + Test::DoTests( pathprefix ); // try to set the C and C++ locales to the user locale try { @@ -52,7 +62,7 @@ } // and now, run all tests once again - Test::DoTests(); + Test::DoTests( pathprefix ); } catch ( const std::exception & e ) { std::cerr << "TEST ERROR: exception: " << ( e.what() ? e.what() : "" ) << std::endl; Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2014-09-07 08:55:03 UTC (rev 4250) @@ -106,6 +106,14 @@ show_credits_exception() throw() { } }; +struct show_man_version_exception : public std::exception { + show_man_version_exception() throw() { } +}; + +struct show_man_help_exception : public std::exception { + show_man_help_exception() throw() { } +}; + struct show_short_version_number_exception : public std::exception { show_short_version_number_exception() throw() { } }; @@ -359,6 +367,10 @@ log << std::endl; } +static void show_man_version( textout & log ) { + log << "openmpt123" << " v" << OPENMPT123_VERSION_STRING << ", " << "Copyright (c) 2013-2014 OpenMPT developers <http://openmpt.org/>" << std::endl; +} + static void show_short_version( textout & log ) { log << OPENMPT123_VERSION_STRING << " / " << openmpt::string::get( openmpt::string::library_version ) << " / " << openmpt::string::get( openmpt::string::core_version ) << std::endl; log.writeout(); @@ -404,8 +416,10 @@ return str.str(); } -static void show_help( textout & log, bool longhelp = false, const std::string & message = std::string() ) { - show_info( log, false ); +static void show_help( textout & log, bool with_info = true, bool longhelp = false, const std::string & message = std::string() ) { + if ( with_info ) { + show_info( log, false ); + } { log << "Usage: openmpt123 [options] [--] file1 [file2] ..." << std::endl; log << std::endl; @@ -1434,6 +1448,10 @@ flags.quiet = true; } else if ( arg == "-v" || arg == "--verbose" ) { flags.verbose = true; + } else if ( arg == "--man-version" ) { + throw show_man_version_exception(); + } else if ( arg == "--man-help" ) { + throw show_man_help_exception(); } else if ( arg == "--version" ) { throw show_version_number_exception(); } else if ( arg == "--short-version" ) { @@ -1661,8 +1679,14 @@ } catch ( args_error_exception & ) { show_help( std_out ); return 1; + } catch ( show_man_help_exception & e ) { + show_help( std_out, false, true ); + return 0; + } catch ( show_man_version_exception & e ) { + show_man_version( std_out ); + return 0; } catch ( show_help_exception & e ) { - show_help( std_out, e.longhelp, e.message ); + show_help( std_out, true, e.longhelp, e.message ); if ( flags.verbose ) { show_credits( std_out ); } Modified: trunk/OpenMPT/openmpt123/openmpt123_config.hpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_config.hpp 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/openmpt123/openmpt123_config.hpp 2014-09-07 08:55:03 UTC (rev 4250) @@ -10,6 +10,11 @@ #ifndef OPENMPT123_CONFIG_HPP #define OPENMPT123_CONFIG_HPP +#if defined(HAVE_CONFIG_H) +// wrapper for autoconf macros +#include "config.h" +#endif // HAVE_CONFIG_H + #if defined(_WIN32) #ifndef WIN32 #define WIN32 Modified: trunk/OpenMPT/test/test.cpp =================================================================== --- trunk/OpenMPT/test/test.cpp 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/test/test.cpp 2014-09-07 08:55:03 UTC (rev 4250) @@ -74,10 +74,31 @@ +static mpt::PathString *PathPrefix = nullptr; -void DoTests() -//------------ + + +static mpt::PathString GetPathPrefix() +//------------------------------------ { + if((*PathPrefix).empty()) + { + return MPT_PATHSTRING(""); + } + return *PathPrefix + MPT_PATHSTRING("/"); +} + + +void DoTests(std::string pathprefix) +//---------------------------------- +{ + + #if MPT_OS_WINDOWS + PathPrefix = new mpt::PathString(mpt::PathString::FromLocale(pathprefix)); + #else + PathPrefix = new mpt::PathString(mpt::PathString::FromNative(pathprefix)); + #endif + DO_TEST(TestVersion); DO_TEST(TestTypes); DO_TEST(TestMisc); @@ -91,9 +112,30 @@ DO_TEST(TestPCnoteSerialization); DO_TEST(TestLoadSaveFile); + delete PathPrefix; + PathPrefix = nullptr; } +void RemoveFile(const mpt::PathString &filename) +//---------------------------------------------- +{ + #if MPT_OS_WINDOWS + for(int retry=0; retry<10; retry++) + { + if(DeleteFileW(filename.AsNative().c_str()) != FALSE) + { + break; + } + // wait for windows virus scanners + Sleep(10); + } + #else + remove(filename.AsNative().c_str()); + #endif +} + + // Test if functions related to program version data work static noinline void TestVersion() //-------------------------------- @@ -1350,6 +1392,11 @@ return theFile; } +static mpt::PathString GetTempFilenameBase() +{ + return GetTestFilenameBase(); +} + typedef CModDoc *TSoundFileContainer; static CSoundFile &GetrSoundFile(TSoundFileContainer &sndFile) @@ -1398,9 +1445,14 @@ static mpt::PathString GetTestFilenameBase() { - return MPT_PATHSTRING("./test/test."); + return Test::GetPathPrefix() + MPT_PATHSTRING("./test/test."); } +static mpt::PathString GetTempFilenameBase() +{ + return MPT_PATHSTRING("./test."); +} + typedef std::shared_ptr<CSoundFile> TSoundFileContainer; static CSoundFile &GetrSoundFile(TSoundFileContainer &sndFile) @@ -1453,11 +1505,12 @@ { return; } - mpt::PathString filenameBase = GetTestFilenameBase(); + mpt::PathString filenameBaseSrc = GetTestFilenameBase(); + mpt::PathString filenameBase = GetTempFilenameBase(); // Test MPTM file loading { - TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBase + MPT_PATHSTRING("mptm")); + TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBaseSrc + MPT_PATHSTRING("mptm")); TestLoadMPTMFile(GetrSoundFile(sndFileContainer)); @@ -1477,12 +1530,14 @@ TestLoadMPTMFile(GetrSoundFile(sndFileContainer)); DestroySoundFileContainer(sndFileContainer); + + RemoveFile(filenameBase + MPT_PATHSTRING("saved.mptm")); } #endif // Test XM file loading { - TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBase + MPT_PATHSTRING("xm")); + TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBaseSrc + MPT_PATHSTRING("xm")); TestLoadXMFile(GetrSoundFile(sndFileContainer)); @@ -1510,12 +1565,14 @@ TestLoadXMFile(GetrSoundFile(sndFileContainer)); DestroySoundFileContainer(sndFileContainer); + + RemoveFile(filenameBase + MPT_PATHSTRING("saved.xm")); } #endif // Test S3M file loading { - TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBase + MPT_PATHSTRING("s3m")); + TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBaseSrc + MPT_PATHSTRING("s3m")); TestLoadS3MFile(GetrSoundFile(sndFileContainer), false); @@ -1535,6 +1592,8 @@ TestLoadS3MFile(GetrSoundFile(sndFileContainer), true); DestroySoundFileContainer(sndFileContainer); + + RemoveFile(filenameBase + MPT_PATHSTRING("saved.s3m")); } #endif } @@ -1543,7 +1602,7 @@ static void RunITCompressionTest(const std::vector<int8> &sampleData, ChannelFlags smpFormat, bool it215, int testcount) //---------------------------------------------------------------------------------------------------------------------- { - mpt::PathString filename = GetTestFilenameBase() + MPT_PATHSTRING("itcomp") + mpt::PathString::FromWide(StringifyW(testcount)) + MPT_PATHSTRING(".raw"); + mpt::PathString filename = GetTempFilenameBase() + MPT_PATHSTRING("itcomp") + mpt::PathString::FromWide(StringifyW(testcount)) + MPT_PATHSTRING(".raw"); ModSample smp; smp.uFlags = smpFormat; @@ -1571,19 +1630,7 @@ VERIFY_EQUAL_NONCONT(memcmp(&sampleData[0], &sampleDataNew[0], sampleData.size()), 0); fclose(f); } - #if MPT_OS_WINDOWS - for(int retry=0; retry<10; retry++) - { - if(DeleteFileW(filename.AsNative().c_str()) != FALSE) - { - break; - } - // wait for windows virus scanners - Sleep(10); - } - #else - remove(filename.AsNative().c_str()); - #endif + RemoveFile(filename); } Modified: trunk/OpenMPT/test/test.h =================================================================== --- trunk/OpenMPT/test/test.h 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/test/test.h 2014-09-07 08:55:03 UTC (rev 4250) @@ -15,7 +15,7 @@ namespace Test { -void DoTests(); +void DoTests(std::string prefix = std::string()); } // namespace Test This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |