dnl Process this file with autoconf to produce a configure script. AC_INIT(jackd/jackd.c) AC_CONFIG_AUX_DIR(.) AC_CANONICAL_TARGET dnl --- dnl HOWTO: updating the JACK version number dnl dnl major version = ask on jackit-devel :) dnl minor version = incremented when any of the public or internal dnl interfaces are changed dnl micro version = incremented when implementation-only dnl changes are made dnl --- JACK_MAJOR_VERSION=0 JACK_MINOR_VERSION=89 JACK_MICRO_VERSION=3 dnl --- dnl HOWTO: updating the jack protocal version dnl dnl increment the protocol version whenever a change is dnl made to the way libjack communicates with jackd dnl that would break applications linked with an older dnl version of libjack. dnl --- JACK_PROTOCOL_VERSION=11 dnl --- dnl HOWTO: updating the libjack interface version dnl dnl current = incremented whenever the public libjack API is changed dnl revision = incremented when the libjack implementation is changed dnl age = current libjack is both source and binary compatible with dnl libjack interfaces current,current-1,...,current-age dnl dnl Note! see libtool documentation for detailed documentation dnl dnl Note Also! until we reach CURRENT>=1, the rules are somewhat dnl slacker than this, and closer to those for the JACK version dnl number. dnl --- JACK_API_CURRENT=0 JACK_API_REVISION=23 JACK_API_AGE=0 AC_SUBST(JACK_MAJOR_VERSION) AC_SUBST(JACK_MINOR_VERSION) AC_SUBST(JACK_MICRO_VERSION) AC_SUBST(JACK_PROTOCOL_VERSION) AC_SUBST(JACK_API_MAJOR_VERSION) AC_SUBST(JACK_API_MINOR_VERSION) AC_SUBST(JACK_API_MICRO_VERSION) JACK_SO_VERSION=${JACK_API_CURRENT}:${JACK_API_REVISION}:${JACK_API_AGE} JACK_VERSION=$JACK_MAJOR_VERSION.$JACK_MINOR_VERSION.${JACK_MICRO_VERSION}${BETA} JACK_RELEASE=$JACK_MAJOR_VERSION-$JACK_MINOR_VERSION-${JACK_MICRO_VERSION}${BETA} AC_SUBST(JACK_SO_VERSION) AC_SUBST(JACK_VERSION) AC_SUBST(JACK_RELEASE) AM_INIT_AUTOMAKE(jack-audio-connection-kit,${JACK_VERSION}) AM_MAINTAINER_MODE AM_CONFIG_HEADER(config.h) AC_ENABLE_STATIC(no) AC_ENABLE_SHARED(yes) AC_PROG_CC AC_PROG_CXX AC_PROG_LD AM_PROG_LIBTOOL AC_C_BIGENDIAN AC_CHECK_HEADERS(string.h strings.h) AC_CHECK_FUNC(getopt_long, , AC_MSG_ERROR([GNU getopt is required to build jack])) AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect)) AC_CHECK_FUNCS(on_exit atexit) dnl dnl look for system support for POSIX shm API dnl XXX this could probably be improved dnl AC_ARG_ENABLE(posix-shm, [ --enable-posix-shm use POSIX shm API ], TRY_POSIX_SHM=$enableval , TRY_POSIX_SHM=no ) if test "x$TRY_POSIX_SHM" = "xyes" then AC_MSG_CHECKING([POSIX shm support (compile time) ]) df | grep -s /dev/shm >/dev/null 2>&1 if test $? = 0 ; then AC_DEFINE(USE_POSIX_SHM,1,[Use POSIX shared memory interface]) AC_MSG_RESULT([found. JACK will use shm_open() and friends.]) else AC_MSG_RESULT([not found. JACK will use System V shm API (shmget() and friends]) fi else echo ' JACK will use System V shm API (shmget() and friends)' fi JACK_CORE_CFLAGS="-I\$(top_srcdir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall" JACK_CFLAGS="$JACK_CORE_CFLAGS -g" JACK_OPT_CFLAGS="$JACK_CORE_CFLAGS -O3 -march=$target_cpu -fomit-frame-pointer -ffast-math -fstrength-reduce -funroll-loops -fmove-all-movables" AC_ARG_ENABLE(optimize, [ --enable-optimize ask the compiler for its best optimizations], [ if test "x$enable_optimize" != "xno" ; then JACK_CFLAGS="$JACK_OPT_CFLAGS" ; fi ]) AC_SUBST(JACK_CFLAGS) dnl dnl use JACK_CFLAGS for jackd compilation dnl CFLAGS=$JACK_CFLAGS AC_ARG_ENABLE(debug, [ --enable-debug enable debugging messages in jackd and libjack], [ if test "x$enable_debug" != "xno" ; then AC_DEFINE(DEBUG_ENABLED,,[Enable debugging messages]) fi ] ) USE_CAPABILITIES=false AC_ARG_ENABLE(capabilities, [ --enable-capabilities use libcap to gain realtime scheduling priviledges], [ if test "x$enable_capabilities" != "xno" ; then AC_CHECK_LIB(cap, capgetp, [AC_CHECK_HEADER(sys/capability.h, [HAVE_CAPABILITIES=true], [AC_MSG_WARN([*** no kernel support for capabilities]) HAVE_CAPABILITIES=false] )], [AC_MSG_WARN([*** no libcap present]) HAVE_CAPABILITIES=false] ) if test "x$HAVE_CAPABILITIES" = "xtrue"; then AC_CHECK_PROG(HAVE_CAPABILITIES, md5sum, true, false) fi if test "x$HAVE_CAPABILITIES" = "xfalse"; then AC_MSG_WARN([*** required program md5sum not found]) fi if test "x$HAVE_CAPABILITIES" = "xfalse"; then AC_MSG_ERROR([*** Capabilities support not present. Run configure again without --enable-capabilities.]) fi USE_CAPABILITIES=true AC_DEFINE(USE_CAPABILITIES,,[Enable POSIX 1.e capabilities support]) fi ] ) with_oldtrans=yes AC_ARG_ENABLE(oldtrans, [ --disable-oldtrans remove old transport interfaces], [ if test "x$enable_oldtrans" = "xno" ; then with_oldtrans=no fi ]) if test "x$with_oldtrans" != "xno" ; then AC_DEFINE(OLD_TRANSPORT,,[Include old transport interfaces]) fi STRIPPED_JACKD=false AC_ARG_ENABLE(stripped-jackd, [ --enable-stripped-jackd strip jack before computing its md5 sum ], [ if test "x$USE_CAPABILITIES" != "xtrue" ; then AC_MSG_WARN([*** capabilities not enabled, stripped jackd has no effect]) elif test "x$enable_stripped_jackd" != "xno"; then STRIPPED_JACKD=true fi ] ) AC_ARG_ENABLE(timestamps, [ --enable-timestamps allow clients to use the JACK timestamp API ], [ if test "x$enable_debug" != "xno" ; then AC_DEFINE(WITH_TIMESTAMPS,,[Enable JACK timestamp API]) fi ] ) # plugins go in the addon dir. AS_AC_EXPAND(ADDON_DIR,${libdir}/jack) AC_SUBST(ADDON_DIR) AC_DEFINE_UNQUOTED(ADDON_DIR,"$ADDON_DIR",[Directory for plugins]) AC_ARG_WITH(html-dir, [ --with-html-dir=PATH where to install the html documentation]) if test "x$with_html_dir" = "x" ; then HTML_DIR='${pkgdatadir}' else HTML_DIR=$with_html_dir fi AC_SUBST(HTML_DIR) # allow specifying default tmpdir AC_ARG_WITH(default-tmpdir, [ --with-default-tmpdir=PATH where jackd and clients will put tmp files (/tmp)]) if test "x$with_default_tmpdir" = "x" ; then DEFAULT_TMP_DIR=/tmp else DEFAULT_TMP_DIR=$with_default_tmpdir fi AC_SUBST(DEFAULT_TMP_DIR) AC_DEFINE_UNQUOTED(DEFAULT_TMP_DIR,"$DEFAULT_TMP_DIR",[Default tmp directory]) # jack depends on alsa 0.9. some example apps depend on libsndfile. AC_CHECK_LIB(asound,snd_pcm_drop, [ HAVE_ALSA="true" ALSA_LIBS=-lasound ], [ HAVE_ALSA="false" AC_MSG_WARN([ALSA 0.9 support not found]) ], [-lm] ) AC_SUBST(ALSA_LIBS) AC_ARG_ENABLE(portaudio, [ --disable-portaudio Ignore PortAudio driver ], TRY_PORTAUDIO=$enableval , TRY_PORTAUDIO=yes ) HAVE_PA="false" if test "x$TRY_PORTAUDIO" = "xyes" then # check for portaudio V18 AC_CHECK_LIB(portaudio, Pa_Initialize, [HAVE_PA="true" PA_LIBS=-lportaudio], [], [-lm -lpthread] ) AC_SUBST(PA_LIBS) fi if test "x$HAVE_ALSA" != "xtrue" && test "x$HAVE_PA" != "xtrue"; then AC_MSG_ERROR( [*** Neither PortAudio nor ALSA audio available, aborting...]) fi HAVE_SNDFILE=false PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0,[HAVE_SNDFILE=true], [true]) if test x$HAVE_SNDFILE = xfalse; then AC_MSG_WARN([*** the jackrec example client will not be built]) fi # on some systems, readline depends on termcap or ncurses, respectively READLINE_DEPS="" AC_CHECK_LIB(termcap, tgetent, [READLINE_DEPS="$READLINE_DEPS -ltermcap"]) AC_CHECK_LIB(ncurses, tgetent, [READLINE_DEPS="$READLINE_DEPS -lncurses"]) AC_CHECK_LIB(readline, readline, [HAVE_READLINE=true], [HAVE_READLINE=false], [$READLINE_DEPS] ) if test x$HAVE_READLINE = xfalse; then AC_MSG_WARN([*** the jack_transport example client will not be built]) fi AC_SUBST(READLINE_DEPS) # you need doxygen to make dist. AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false) if test $HAVE_DOXYGEN = "false"; then AC_MSG_WARN([*** doxygen not found, docs will not be built]) fi AM_CONDITIONAL(HAVE_SNDFILE, $HAVE_SNDFILE) AM_CONDITIONAL(HAVE_READLINE, $HAVE_READLINE) AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN) AM_CONDITIONAL(USE_CAPABILITIES, $USE_CAPABILITIES) AM_CONDITIONAL(STRIPPED_JACKD, $STRIPPED_JACKD) AM_CONDITIONAL(HAVE_ALSA, $HAVE_ALSA) AM_CONDITIONAL(HAVE_PA, $HAVE_PA) AC_OUTPUT( Makefile jack.pc jack.spec jack/Makefile jack/version.h jackd/Makefile jackd/jackd.1 libjack/Makefile drivers/Makefile drivers/alsa/Makefile drivers/dummy/Makefile drivers/portaudio/Makefile example-clients/Makefile doc/Makefile doc/reference.doxygen )