diff options
| author | Stephen Sinclair <radarsat1@gmail.com> | 2016-02-12 11:05:34 -0300 |
|---|---|---|
| committer | Stephen Sinclair <radarsat1@gmail.com> | 2016-02-12 12:13:20 -0300 |
| commit | fbcd1910a3ea72ec6dc50d50c3f7848e6861abc4 (patch) | |
| tree | 1ecdfec46e197fe1f44944842a70653960241290 /configure.ac | |
| parent | 0f60381cb4ed79bb40979c106ee1515df85c4873 (diff) | |
Port the build system to automake.
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 71 |
1 files changed, 58 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index a6b1a6c..cf1309c 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,35 @@ AC_INIT(RtAudio, 4.1, gary@music.mcgill.ca, rtaudio) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(RtAudio.cpp) -AC_CONFIG_FILES([rtaudio-config rtaudio.pc Makefile tests/Makefile doc/doxygen/Doxyfile]) +AC_CONFIG_FILES([rtaudio-config rtaudio.pc Makefile tests/Makefile doc/Makefile doc/doxygen/Doxyfile]) +AM_INIT_AUTOMAKE([1.14 -Wall -Werror foreign subdir-objects]) + +# libtool version: current:revision:age +# +# If the library source code has changed at all since the last update, then +# increment revision (`c:r:a' becomes `c:r+1:a'). +# +# If any interfaces have been added, removed, or changed since the last update, +# increment current, and set revision to 0. +# +# If any interfaces have been added since the last public release, then +# increment age. +# +# If any interfaces have been removed since the last public release, then set +# age to 0. +m4_define([lt_current], 5) +m4_define([lt_revision], 0) +m4_define([lt_age], 0) + +m4_define([lt_version_info], [lt_current:lt_revision:lt_age]) +m4_define([lt_current_minus_age], [m4_eval(lt_current - lt_age)]) + +SO_VERSION=lt_version_info +AC_SUBST(SO_VERSION) + +# Enable some nice automake features if they are available +m4_ifdef([AM_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # Fill GXX with something before test. AC_SUBST( GXX, ["no"] ) @@ -23,12 +51,16 @@ $4]) # Checks for programs. AC_PROG_CXX(g++ CC c++ cxx) -AC_PROG_RANLIB +AM_PROG_AR AC_PATH_PROG(AR, ar, no) if [[ $AR = "no" ]] ; then AC_MSG_ERROR("Could not find ar - needed to create a library"); fi +# Initialize libtool +LT_INIT([win32-dll]) +AC_CONFIG_MACRO_DIR([m4]) + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(sys/ioctl.h unistd.h) @@ -64,19 +96,32 @@ fi CXXFLAGS="$CXXFLAGS $cxxflag" -AC_CANONICAL_HOST - -AC_SUBST( sharedlib, ["librtaudio.so"] ) -AC_SUBST( sharedname, ["librtaudio.so.\$(RELEASE)"] ) -AC_SUBST( libflags, ["-shared -Wl,-soname,\$(SHARED).\$(MAJOR) -o \$(SHARED).\$(RELEASE)"] ) -case $host in - *-apple*) - AC_SUBST( sharedlib, ["librtaudio.dylib"] ) - AC_SUBST( sharedname, ["librtaudio.\$(RELEASE).dylib"] ) - AC_SUBST( libflags, ["-dynamiclib -o librtaudio.\$(RELEASE).dylib"] ) -esac +# Checks for doxygen +AC_CHECK_PROG( DOXYGEN, [doxygen], [doxygen] ) +AM_CONDITIONAL( MAKE_DOC, [test "x${DOXYGEN}" != x] ) + +# Copy doc files to build dir if necessary +AC_CONFIG_LINKS( [doc/release.txt:doc/release.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/footer.html:doc/doxygen/footer.html] ) +AC_CONFIG_LINKS( [doc/doxygen/error.txt:doc/doxygen/error.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/tutorial.txt:doc/doxygen/tutorial.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/compiling.txt:doc/doxygen/compiling.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/acknowledge.txt:doc/doxygen/acknowledge.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/license.txt:doc/doxygen/license.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/header.html:doc/doxygen/header.html] ) +AC_CONFIG_LINKS( [doc/doxygen/duplex.txt:doc/doxygen/duplex.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/settings.txt:doc/doxygen/settings.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/probe.txt:doc/doxygen/probe.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/playback.txt:doc/doxygen/playback.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/multi.txt:doc/doxygen/multi.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/recording.txt:doc/doxygen/recording.txt] ) +AC_CONFIG_LINKS( [doc/doxygen/apinotes.txt:doc/doxygen/apinotes.txt] ) +AC_CONFIG_LINKS( [doc/images/mcgill.gif:doc/images/mcgill.gif] ) +AC_CONFIG_LINKS( [doc/images/ccrma.gif:doc/images/ccrma.gif] ) # Checks for package options and external software +AC_CANONICAL_HOST + AC_SUBST( api, [""] ) AC_SUBST( req, [""] ) AC_MSG_CHECKING(for audio API) |
