diff options
| author | Gary Scavone <gary@music.mcgill.ca> | 2007-08-07 14:52:05 +0000 |
|---|---|---|
| committer | Stephen Sinclair <sinclair@music.mcgill.ca> | 2013-10-11 01:19:40 +0200 |
| commit | b0080e69d64ce69e21c8ce1b22b1bb7f888f1e58 (patch) | |
| tree | b51ebcd31a5280b4f4e9e45484f07d9b35723743 /configure.ac | |
| parent | 0fbcd74a04713a4725d2f346a493121b623d60ab (diff) | |
Check in of new version 4.0.0 distribution (GS).
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 58 |
1 files changed, 48 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 83723fd..7141656 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(RtAudio, 3.0, gary@ccrma.stanford.edu, rtaudio) +AC_INIT(RtAudio, 4.0, gary@music.mcgill.ca, rtaudio) AC_CONFIG_SRCDIR(RtAudio.cpp) -AC_CONFIG_FILES(tests/Makefile) +AC_CONFIG_FILES([rtaudio-config Makefile tests/Makefile]) # Fill GXX with something before test. AC_SUBST( GXX, ["no"] ) @@ -9,10 +9,17 @@ AC_SUBST( GXX, ["no"] ) # Checks for programs. AC_PROG_CC AC_PROG_CXX(g++ CC c++ cxx) +AC_PROG_RANLIB +AC_PATH_PROG(AR, ar, no) +if [[ $AR = "no" ]] ; then + AC_MSG_ERROR("Could not find ar - needed to create a library"); +fi # Checks for libraries. AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!)) + + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(sys/ioctl.h unistd.h) @@ -27,6 +34,9 @@ AC_ARG_ENABLE(debug, [AC_SUBST( debug, [-D__RTAUDIO_DEBUG__] ) AC_SUBST( cflags, [-g] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)], [AC_SUBST( debug, [] ) AC_SUBST( cflags, [-O2] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)]) +# Checks for functions +AC_CHECK_FUNC(gettimeofday, [cflags=$cflags" -DHAVE_GETTIMEOFDAY"], ) + # Check compiler and use -Wall if gnu. if [test $GXX = "yes" ;] then AC_SUBST( warn, [-Wall] ) @@ -36,15 +46,22 @@ fi AC_CANONICAL_HOST AC_MSG_CHECKING(for audio API) case $host in + *-*-netbsd*) + AC_SUBST( sound_api, [-D__LINUX_OSS__] ) + AC_MSG_RESULT(using OSS) + AC_SUBST( audio_apis, [-D__LINUX_OSS__] ) + cflags=$cflags" -lossaudio" + ;; + *-*-linux*) AC_SUBST( sound_api, [_NO_API_] ) - AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (linux only)], [AC_SUBST( sound_api, [-D__LINUX_JACK__] ) AC_MSG_RESULT(using JACK)], ) - if [test $sound_api = -D__LINUX_JACK__;] then + AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (mac and linux only)], [AC_SUBST( sound_api, [-D__UNIX_JACK__] ) AC_MSG_RESULT(using JACK)], ) + if [test $sound_api = -D__UNIX_JACK__;] then TEMP_LIBS=$LIBS AC_CHECK_LIB(jack, jack_client_new, , AC_MSG_ERROR(JACK support requires the jack library!)) AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(Jack support also requires the asound library!)) LIBS="`pkg-config --cflags --libs jack` $TEMP_LIBS -lasound" - audio_apis="-D__LINUX_JACK__" + audio_apis="-D__UNIX_JACK__" fi # Look for Alsa flag @@ -75,11 +92,30 @@ case $host in ;; *-apple*) - # Check for CoreAudio framework - AC_CHECK_HEADER(CoreAudio/CoreAudio.h, - [AC_SUBST( audio_apis, [-D__MACOSX_CORE__] )], - [AC_MSG_ERROR(CoreAudio header files not found!)] ) - AC_SUBST( frameworks, ["-framework CoreAudio"] ) + AC_SUBST( sound_api, [_NO_API_] ) + AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (unix only)], [AC_SUBST( sound_api, [-D__UNIX_JACK__] ) AC_MSG_RESULT(using JACK)], ) + if [test $sound_api = -D__UNIX_JACK__;] then + AC_CHECK_LIB(jack, jack_client_new, , AC_MSG_ERROR(JACK support requires the jack library!)) + audio_apis="-D__UNIX_JACK__" + fi + + # Look for Core flag + AC_ARG_WITH(core, [ --with-core = choose CoreAudio API support (mac only)], [AC_SUBST( sound_api, [-D__MACOSX_CORE__] ) AC_MSG_RESULT(using CoreAudio)], ) + if test $sound_api = -D__MACOSX_CORE__; then + AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [], [AC_MSG_ERROR(CoreAudio header files not found!)] ) + AC_SUBST( frameworks, ["-framework CoreAudio -framework CoreFoundation"] ) + audio_apis="-D__MACOSX_CORE__ $audio_apis" + fi + + # If no audio api flags specified, use CoreAudio + if [test $sound_api = _NO_API_;] then + AC_SUBST( sound_api, [-D__MACOSX_CORE__] ) + AC_MSG_RESULT(using CoreAudio) + AC_CHECK_HEADER(CoreAudio/CoreAudio.h, + [AC_SUBST( audio_apis, [-D__MACOSX_CORE__] )], + [AC_MSG_ERROR(CoreAudio header files not found!)] ) + AC_SUBST( frameworks, ["-framework CoreAudio -framework CoreFoundation"] ) + fi ;; *) @@ -92,3 +128,5 @@ esac AC_PROG_GCC_TRADITIONAL AC_OUTPUT + +chmod oug+x rtaudio-config |
