jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

708 lines
21KB

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(jackd/jackd.c)
  3. AC_CONFIG_AUX_DIR(config)
  4. AC_CANONICAL_TARGET
  5. dnl ---
  6. dnl HOWTO: updating the JACK version number
  7. dnl
  8. dnl major version = ask on jackit-devel :)
  9. dnl minor version = incremented when any of the public or internal
  10. dnl interfaces are changed
  11. dnl micro version = incremented when implementation-only
  12. dnl changes are made
  13. dnl ---
  14. JACK_MAJOR_VERSION=0
  15. JACK_MINOR_VERSION=102
  16. JACK_MICRO_VERSION=4
  17. dnl ---
  18. dnl HOWTO: updating the jack protocol version
  19. dnl
  20. dnl increment the protocol version whenever a change is
  21. dnl made to the way libjack communicates with jackd
  22. dnl that would break applications linked with an older
  23. dnl version of libjack.
  24. dnl ---
  25. JACK_PROTOCOL_VERSION=15
  26. dnl ---
  27. dnl HOWTO: updating the libjack interface version
  28. dnl
  29. dnl current = incremented whenever the public libjack API is changed
  30. dnl revision = incremented when the libjack implementation is changed
  31. dnl age = current libjack is both source and binary compatible with
  32. dnl libjack interfaces current,current-1,...,current-age
  33. dnl
  34. dnl Note! see libtool documentation for detailed documentation
  35. dnl
  36. dnl Note Also! until we reach CURRENT>=1, the rules are somewhat
  37. dnl slacker than this, and closer to those for the JACK version
  38. dnl number.
  39. dnl ---
  40. JACK_API_CURRENT=0
  41. JACK_API_REVISION=23
  42. JACK_API_AGE=0
  43. AC_SUBST(JACK_MAJOR_VERSION)
  44. AC_SUBST(JACK_MINOR_VERSION)
  45. AC_SUBST(JACK_MICRO_VERSION)
  46. AC_SUBST(JACK_PROTOCOL_VERSION)
  47. AC_DEFINE_UNQUOTED(PROTOCOL_VERSION, "$JACK_PROTOCOL_VERSION", [Protocol version])
  48. AC_SUBST(JACK_API_MAJOR_VERSION)
  49. AC_SUBST(JACK_API_MINOR_VERSION)
  50. AC_SUBST(JACK_API_MICRO_VERSION)
  51. JACK_SO_VERSION=${JACK_API_CURRENT}:${JACK_API_REVISION}:${JACK_API_AGE}
  52. JACK_VERSION=$JACK_MAJOR_VERSION.$JACK_MINOR_VERSION.${JACK_MICRO_VERSION}${BETA}
  53. JACK_RELEASE=$JACK_MAJOR_VERSION-$JACK_MINOR_VERSION-${JACK_MICRO_VERSION}${BETA}
  54. AC_SUBST(JACK_SO_VERSION)
  55. AC_SUBST(JACK_VERSION)
  56. AC_SUBST(JACK_RELEASE)
  57. AM_INIT_AUTOMAKE(jack-audio-connection-kit,${JACK_VERSION})
  58. AM_MAINTAINER_MODE
  59. AM_CONFIG_HEADER(config.h)
  60. AC_ENABLE_STATIC(no)
  61. AC_ENABLE_SHARED(yes)
  62. AC_PROG_CC
  63. AC_PROG_CXX
  64. AC_PROG_LD
  65. AM_PROG_LIBTOOL
  66. AC_PROG_LN_S
  67. AC_C_BIGENDIAN
  68. AC_MSG_CHECKING([platform dependencies])
  69. case "${host_os}" in
  70. freebsd*)
  71. # current FreeBSD header files conflict with the OSS driver's
  72. # barrier code, this may be fixed in 5.3, stay tuned.
  73. USE_BARRIER="no"
  74. ;;
  75. darwin*)
  76. JACK_THREAD_STACK_TOUCH=10000 # need small realtime stack
  77. JACK_CPP_VARARGS_BROKEN=1
  78. JACK_DO_NOT_MLOCK=1
  79. JACK_USE_MACH_THREADS=1
  80. OS_LDFLAGS="-framework CoreAudio -framework CoreServices -framework AudioUnit"
  81. TRY_POSIX_SHM=yes # POSIX shm works better
  82. ;;
  83. esac
  84. AC_SUBST(OS_LDFLAGS)
  85. #
  86. # We need to establish suitable defaults for a 64-bit OS
  87. libnn=lib
  88. case "${host_os}" in
  89. linux*)
  90. case "${host_cpu}" in
  91. x86_64|mips64|ppc64|sparc64|s390x)
  92. libnn=lib64
  93. ;;
  94. esac
  95. ;;
  96. solaris*)
  97. ## libnn=lib/sparcv9 ## on 64-bit only, but that's compiler-specific
  98. ;;
  99. esac
  100. ## take care not to override the command-line setting
  101. if test "${libdir}" = '${exec_prefix}/lib'; then
  102. libdir='${exec_prefix}/'${libnn}
  103. fi
  104. # system-dependent config.h values
  105. test "x$JACK_THREAD_STACK_TOUCH" = "x" && JACK_THREAD_STACK_TOUCH=1000000
  106. AC_DEFINE_UNQUOTED(JACK_THREAD_STACK_TOUCH,
  107. [$JACK_THREAD_STACK_TOUCH],
  108. [Guaranteed size of realtime stack])
  109. if test "x$JACK_CPP_VARARGS_BROKEN" != "x"; then
  110. AC_DEFINE_UNQUOTED(JACK_CPP_VARARGS_BROKEN,
  111. [$JACK_CPP_VARARGS_BROKEN],
  112. [CPP has a broken varargs implementation])
  113. fi
  114. if test "x$JACK_USE_MACH_THREADS" != "x"; then
  115. AC_DEFINE_UNQUOTED(JACK_USE_MACH_THREADS,
  116. [$JACK_USE_MACH_THREADS],
  117. [Use MACH threads where possible])
  118. fi
  119. # Harsh? necessary ....
  120. CFLAGS=""
  121. # headers
  122. AC_CHECK_HEADERS(string.h strings.h)
  123. AC_CHECK_HEADERS(getopt.h, [], [
  124. for d in /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/ ; do
  125. AC_CHECK_HEADERS($d/getopt.h, [], [CFLAGS="$CFLAGS -I$d"])
  126. done])
  127. AC_CHECK_HEADER(/usr/include/nptl/pthread.h,
  128. [CFLAGS="$CFLAGS -I/usr/include/nptl"])
  129. # functions and libraries
  130. AC_CHECK_FUNC(getopt_long, [],
  131. AC_MSG_ERROR([*** JACK requires GNU getopt_long]))
  132. AC_CHECK_FUNC(gethostent, [], AC_CHECK_LIB(nsl, gethostent))
  133. AC_CHECK_FUNC(setsockopt, [], AC_CHECK_LIB(socket, setsockopt))
  134. AC_CHECK_FUNC(connect, [], AC_CHECK_LIB(inet, connect))
  135. AC_CHECK_FUNC(dlopen, [],
  136. AC_CHECK_LIB(dl, dlopen, [],
  137. AC_MSG_ERROR([*** JACK requires dynamic load support])))
  138. AC_CHECK_FUNC(pthread_create, [],
  139. AC_CHECK_LIB(pthread, pthread_create, [],
  140. AC_MSG_ERROR([*** JACK requires POSIX threads support])))
  141. AC_CHECK_FUNCS(on_exit atexit)
  142. AC_CHECK_FUNCS(posix_memalign)
  143. AC_CHECK_LIB(m, sin)
  144. AC_CHECK_FUNC(clock_gettime,
  145. [
  146. AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries")
  147. ],
  148. AC_CHECK_LIB(rt, clock_getttime,
  149. [
  150. AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries")
  151. ])
  152. )
  153. # should we use mlockall() on this platform?
  154. if test "x$JACK_DO_NOT_MLOCK" = "x"; then
  155. AC_CHECK_HEADER(sys/mman.h,
  156. [AC_CHECK_FUNC(mlockall,
  157. [AC_DEFINE(USE_MLOCK, 1, [Use POSIX memory locking])])])
  158. fi
  159. # look for system support for POSIX shm API
  160. AC_ARG_ENABLE(posix-shm,
  161. AC_HELP_STRING([--enable-posix-shm], [use POSIX shm API]),
  162. [TRY_POSIX_SHM=$enableval])
  163. if test "x$TRY_POSIX_SHM" = "xyes"
  164. then
  165. AC_CHECK_FUNC(shm_open, [],
  166. AC_CHECK_LIB(rt, shm_open, [], [TRY_POSIX_SHM=no]))
  167. fi
  168. AC_MSG_CHECKING([shared memory support])
  169. if test "x$TRY_POSIX_SHM" = "xyes"
  170. then
  171. AC_MSG_RESULT([POSIX shm_open().])
  172. AC_DEFINE(USE_POSIX_SHM,1,[Use POSIX shared memory interface])
  173. JACK_SHM_TYPE='"POSIX"'
  174. USE_POSIX_SHM="true"
  175. else
  176. AC_MSG_RESULT([System V shmget().])
  177. JACK_SHM_TYPE='"System V"'
  178. USE_POSIX_SHM="false"
  179. fi
  180. AC_DEFINE_UNQUOTED(JACK_SHM_TYPE, [$JACK_SHM_TYPE],
  181. [JACK shared memory type])
  182. AM_CONDITIONAL(USE_POSIX_SHM, $USE_POSIX_SHM)
  183. JACK_CORE_CFLAGS="-I\$(top_builddir)/config -I\$(top_srcdir) \
  184. -I\$(top_builddir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -g"
  185. JACK_OPT_CFLAGS="$JACK_CORE_CFLAGS -march=pentium2 -mcpu=pentium4 -O3 \
  186. -ffast-math -funroll-loops -fprefetch-loop-arrays"
  187. JACK_CFLAGS="$JACK_CORE_CFLAGS $CFLAGS"
  188. dnl
  189. dnl figure out how best to optimize
  190. dnl JOQ: this should be done via config/configure.hosts
  191. dnl
  192. dnl ----------------------------------------------------------------------
  193. if test "$target_cpu" = "powerpc"; then
  194. AC_DEFINE(POWERPC, 1, "Are we running a ppc CPU?")
  195. ############################
  196. # Check for Altivec assembly
  197. ############################
  198. AC_ARG_ENABLE(altivec,
  199. [ --enable-altivec enable Altivec support (default=auto)],,
  200. [ enable_altivec=yes ])
  201. if test "x$enable_altivec" = xyes; then
  202. AC_MSG_CHECKING(whether we can compile Altivec code)
  203. AC_COMPILE_IFELSE([asm ("vand %v0, %v0, %v0");],
  204. AC_DEFINE(USE_ALTIVEC, 1, [Define to 1 if Altivec assembly is available.])
  205. AC_DEFINE(HAVE_ALTIVEC_LINUX, 1, "Is there Altivec Support ?")
  206. ALTIVEC_OPT_FLAGS="-maltivec -mabi=altivec"
  207. AC_MSG_RESULT(yes)
  208. ,
  209. enable_altivec=no
  210. AC_MSG_RESULT(no)
  211. AC_MSG_WARN([The assembler does not support the Altivec command set.])
  212. )
  213. fi
  214. dnl -mcpu=7450 does not reliably work with gcc 3.*
  215. JACK_OPT_CFLAGS="-D_REENTRANT -O2 -mcpu=7400 $ALTIVEC_OPT_FLAGS_FLAGS -mhard-float -mpowerpc-gfxopt"
  216. elif echo $target_cpu | egrep '(i.86|x86_64)' >/dev/null; then
  217. dnl Check for MMX/SSE assembly
  218. if test -r /proc/cpuinfo ; then
  219. procflags=`grep '^flags' /proc/cpuinfo`
  220. if echo $procflags | grep -s mmx ; then
  221. cpu_supports_mmx=yes
  222. fi
  223. if echo $procflags | grep -s sse ; then
  224. cpu_supports_sse=yes
  225. fi
  226. fi
  227. AC_ARG_ENABLE(optimization-by-compiler,
  228. [ --enable-optimization-by-compiler use compiler (NOT processor) capabilities to determine optimization flags],,
  229. optimization_by_compiler=no
  230. )
  231. AC_ARG_ENABLE(optimization-by-cpu,
  232. [ --enable-optimization-by-cpu use processor capabilities to determine optimization flags],,
  233. optimization_by_cpu=yes
  234. )
  235. AC_ARG_ENABLE(mmx,
  236. [ --enable-mmx enable MMX support (default=auto)],,
  237. enable_mmx=yes)
  238. AC_ARG_ENABLE(sse,
  239. [ --enable-sse enable SSE support (default=auto)],,
  240. enable_sse=$enable_mmx)
  241. if test "x$enable_mmx" = xyes; then
  242. AC_MSG_CHECKING(whether we can compile MMX code)
  243. AC_COMPILE_IFELSE([asm ("movq 0, %mm0");],
  244. AC_DEFINE(USE_MMX, 1, [Define to 1 if MMX assembly is available.])
  245. AC_MSG_RESULT(yes)
  246. if test x$optimization_by_cpu = xyes ; then
  247. if test x$cpu_supports_mmx = xyes ; then
  248. MMX_FLAGS="-mmmx"
  249. fi
  250. else
  251. MMX_FLAGS="-mmmx"
  252. fi
  253. AC_MSG_RESULT(yes)
  254. ,
  255. enable_mmx=no
  256. AC_MSG_RESULT(no)
  257. AC_MSG_WARN([The assembler does not support the MMX command set.])
  258. )
  259. fi
  260. if test "x$enable_sse" = xyes; then
  261. AC_MSG_CHECKING(whether we can compile SSE code)
  262. AC_COMPILE_IFELSE([asm ("movntps %xmm0, 0");],
  263. AC_DEFINE(USE_SSE, 1,
  264. [Define to 1 if SSE assembly is available.])
  265. if test x$optimization_by_cpu = xyes ; then
  266. if test x$cpu_supports_sse = xyes ; then
  267. SSE_FLAGS="-msse -mfpmath=sse"
  268. fi
  269. else
  270. SSE_FLAGS="-msse -mfpmath=sse"
  271. fi
  272. AC_MSG_RESULT(yes)
  273. ,
  274. enable_sse=no
  275. AC_MSG_RESULT(no)
  276. AC_MSG_WARN(
  277. [The assembler does not support the SSE command set.]
  278. )
  279. )
  280. fi
  281. AC_DEFINE(x86, 1, "Nope it's intel")
  282. COMMON_X86_OPT_FLAGS="-DREENTRANT -O3 -fomit-frame-pointer -ffast-math -funroll-loops"
  283. if test "$target_cpu" = "i586"; then
  284. JACK_OPT_CFLAGS="-march=i586 "
  285. elif test "$target_cpu" = "i686"; then
  286. JACK_OPT_CFLAGS="-march=i686"
  287. elif test "$target_cpu" = "x86_64"; then
  288. JACK_OPT_CFLAGS="-march=k8"
  289. else
  290. :
  291. fi
  292. JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS $JACK_OPT_CFLAGS $MMX_FLAGS $SSE_FLAGS"
  293. fi
  294. AC_ARG_ENABLE(dynsimd,
  295. [ --enable-dynsimd enable dynamic SIMD selection (default=no)],,
  296. enable_dynsimd=no)
  297. if test "x$enable_dynsimd" = xyes; then
  298. AC_DEFINE(USE_DYNSIMD, 1, [Define to 1 to use dynamic SIMD selection.])
  299. fi
  300. AC_ARG_ENABLE(optimize,
  301. AC_HELP_STRING([--enable-optimize],
  302. [ask the compiler for its best optimizations]),
  303. [ if test x$enable_optimize != xno ; then
  304. JACK_CFLAGS="$JACK_CORE_CFLAGS $JACK_OPT_CFLAGS"
  305. AC_MSG_WARN([optimization in use.........................])
  306. else
  307. JACK_OPT_CFLAGS=""
  308. AC_MSG_WARN([no optimization.........................])
  309. fi
  310. ]
  311. )
  312. AC_SUBST(JACK_CFLAGS)
  313. dnl
  314. dnl use JACK_CFLAGS for jackd compilation
  315. dnl
  316. CFLAGS=$JACK_CFLAGS
  317. # allow buffer resizing unless --disable-resize specified
  318. buffer_resizing=yes
  319. AC_ARG_ENABLE(resize,
  320. AC_HELP_STRING([--enable-resize], [enable buffer resizing feature]),
  321. [
  322. if test x$enable_resize = xno ; then
  323. buffer_resizing=no
  324. fi
  325. if test x$buffer_resizing != xno; then
  326. AC_DEFINE(DO_BUFFER_RESIZE,,[Enable buffer resizing])
  327. fi
  328. ]
  329. )
  330. AC_ARG_ENABLE(ensure-mlock,
  331. AC_HELP_STRING([--enable-ensure-mlock],
  332. [fail if unable to lock memory]),
  333. [
  334. if test x$enable_ensure_mlock != xno ; then
  335. AC_DEFINE(ENSURE_MLOCK,,[Ensure that memory locking succeeds])
  336. fi
  337. ]
  338. )
  339. AC_ARG_ENABLE(debug,
  340. AC_HELP_STRING([--enable-debug],
  341. [enable debugging messages in jackd and libjack]),
  342. [
  343. if test x$enable_debug != xno ; then
  344. AC_DEFINE(DEBUG_ENABLED,,[Enable debugging messages])
  345. fi
  346. ]
  347. )
  348. AC_ARG_ENABLE(timestamps,
  349. AC_HELP_STRING([--enable-timestamps],
  350. [allow clients to use the JACK timestamp API]),
  351. [
  352. if test x$enable_timestamps != xno ; then
  353. AC_DEFINE(WITH_TIMESTAMPS,,[Enable JACK timestamp API])
  354. fi
  355. ]
  356. )
  357. AC_ARG_ENABLE(preemption-check,
  358. AC_HELP_STRING([--enable-preemption-check],
  359. [check for inappropriate realtime preemption]),
  360. [
  361. if test x$enable_preemption_check != xno ; then
  362. echo checking for realtime preemption bugs
  363. AC_DEFINE(DO_PREEMPTION_CHECKING,,
  364. [check realtime preemption])
  365. fi
  366. ])
  367. USE_CAPABILITIES=false
  368. AC_ARG_ENABLE(capabilities,
  369. [ --enable-capabilities use libcap to gain realtime scheduling priviledges],
  370. [ if test "x$enable_capabilities" != "xno" ; then
  371. AC_CHECK_LIB(cap, capgetp,
  372. [AC_CHECK_HEADER(sys/capability.h,
  373. [HAVE_CAPABILITIES=true],
  374. [AC_MSG_WARN([*** no kernel support for capabilities])
  375. HAVE_CAPABILITIES=false]
  376. )],
  377. [AC_MSG_WARN([*** no libcap present])
  378. HAVE_CAPABILITIES=false]
  379. )
  380. if test "x$HAVE_CAPABILITIES" = "xtrue"; then
  381. AC_CHECK_PROG(HAVE_CAPABILITIES, md5sum, true, false)
  382. fi
  383. if test "x$HAVE_CAPABILITIES" = "xfalse"; then
  384. AC_MSG_WARN([*** required program md5sum not found])
  385. fi
  386. if test "x$HAVE_CAPABILITIES" = "xfalse"; then
  387. AC_MSG_ERROR([*** Capabilities support not present. Run configure again without --enable-capabilities.])
  388. fi
  389. USE_CAPABILITIES=true
  390. AC_DEFINE(USE_CAPABILITIES,,[Enable POSIX 1.e capabilities support])
  391. fi
  392. ]
  393. )
  394. with_oldtrans=yes
  395. AC_ARG_ENABLE(oldtrans,
  396. [ --disable-oldtrans remove old transport interfaces],
  397. [ if test "x$enable_oldtrans" = "xno" ; then
  398. with_oldtrans=no
  399. fi
  400. ]
  401. )
  402. if test "x$with_oldtrans" != "xno" ; then
  403. AC_DEFINE(OLD_TRANSPORT,,[Include old transport interfaces])
  404. fi
  405. STRIPPED_JACKD=false
  406. AC_ARG_ENABLE(stripped-jackd,
  407. [ --enable-stripped-jackd strip jack before computing its md5 sum ],
  408. [ if test "x$USE_CAPABILITIES" != "xtrue" ; then
  409. AC_MSG_WARN([*** capabilities not enabled, stripped jackd has no effect])
  410. elif test "x$enable_stripped_jackd" != "xno"; then
  411. STRIPPED_JACKD=true
  412. fi
  413. ]
  414. )
  415. # plugins go in the addon dir.
  416. ADDON_DIR='${libdir}/jack'
  417. AC_SUBST(ADDON_DIR)
  418. AS_AC_EXPAND(ADDON_DIR_EXPANDED,${libdir}/jack)
  419. AC_DEFINE_UNQUOTED(ADDON_DIR,"$ADDON_DIR_EXPANDED",[Directory for plugins])
  420. AC_ARG_WITH(html-dir,
  421. [ --with-html-dir=PATH where to install the html documentation])
  422. if test "x$with_html_dir" = "x" ; then
  423. HTML_DIR='${pkgdatadir}'
  424. else
  425. HTML_DIR=$with_html_dir
  426. fi
  427. AC_SUBST(HTML_DIR)
  428. # allow specifying default tmpdir
  429. AC_ARG_WITH(default-tmpdir,
  430. [ --with-default-tmpdir=PATH where jackd and clients will put tmp files (/tmp)])
  431. if test "x$with_default_tmpdir" = "x" ; then
  432. DEFAULT_TMP_DIR=/tmp
  433. else
  434. DEFAULT_TMP_DIR=$with_default_tmpdir
  435. fi
  436. AC_SUBST(DEFAULT_TMP_DIR)
  437. AC_DEFINE_UNQUOTED(DEFAULT_TMP_DIR,"$DEFAULT_TMP_DIR",[Default tmp directory])
  438. # Check for barrier functions in the pthreads library. The default
  439. # option setting may be OS-dependent, otherwise it's "yes".
  440. test "x$USE_BARRIER" = "x" && USE_BARRIER="yes"
  441. AC_ARG_WITH(barrier,
  442. AC_HELP_STRING([--without-barrier],
  443. [avoid using pthread barrier functions]),
  444. [ USE_BARRIER=$withval ])
  445. if test "x$USE_BARRIER" = "xyes"; then
  446. AC_CHECK_LIB([pthread], [pthread_barrier_init],
  447. AC_DEFINE(USE_BARRIER, 1, [Use pthread barrier functions]))
  448. fi
  449. # Check which backend drivers can be built. The last one successfully
  450. # configured becomes the default JACK driver; so the order of
  451. # precedence is: alsa, oss, coreaudio, portaudio, dummy.
  452. JACK_DEFAULT_DRIVER=\"dummy\"
  453. AC_ARG_ENABLE(portaudio, [ --disable-portaudio ignore PortAudio driver ],
  454. TRY_PORTAUDIO=$enableval , TRY_PORTAUDIO=yes )
  455. HAVE_PA="false"
  456. if test "x$TRY_PORTAUDIO" = "xyes"
  457. then
  458. # check for portaudio V18
  459. AC_CHECK_LIB(portaudio, Pa_Initialize,
  460. [ AC_CHECK_HEADERS(portaudio.h,
  461. [ HAVE_PA="true"
  462. PA_LIBS=-lportaudio
  463. JACK_DEFAULT_DRIVER=\"portaudio\"
  464. ])
  465. ])
  466. AC_SUBST(PA_LIBS)
  467. fi
  468. AM_CONDITIONAL(HAVE_PA, $HAVE_PA)
  469. AC_ARG_ENABLE(coreaudio, [ --disable-coreaudio ignore CoreAudio driver ],
  470. TRY_COREAUDIO=$enableval , TRY_COREAUDIO=yes )
  471. HAVE_COREAUDIO="false"
  472. if test "x$TRY_COREAUDIO" = "xyes"
  473. then
  474. # check for coreaudio
  475. AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
  476. [ HAVE_COREAUDIO="true"
  477. JACK_DEFAULT_DRIVER=\"coreaudio\"
  478. ])
  479. fi
  480. AM_CONDITIONAL(HAVE_COREAUDIO, $HAVE_COREAUDIO)
  481. AC_ARG_ENABLE(oss, [ --disable-oss ignore OSS driver ],
  482. TRY_OSS=$enableval , TRY_OSS=yes )
  483. HAVE_OSS="false"
  484. if test "x$TRY_OSS" = "xyes"
  485. then
  486. # check for Open Sound System
  487. AC_CHECK_HEADER([sys/soundcard.h],
  488. [HAVE_OSS="true"
  489. JACK_DEFAULT_DRIVER=\"oss\"])
  490. fi
  491. AM_CONDITIONAL(HAVE_OSS, $HAVE_OSS)
  492. AC_ARG_ENABLE(freebob, [ --disable-freebob ignore FreeBob driver ],
  493. TRY_FREEBOB=$enableval , TRY_FREEBOB=yes )
  494. HAVE_FREEBOB="false"
  495. if test "x$TRY_FREEBOB" = "xyes"
  496. then
  497. # check for FreeBob libraries
  498. PKG_CHECK_MODULES(LIBFREEBOB, libfreebob >= 0.5.1,
  499. [HAVE_FREEBOB="true"
  500. JACK_DEFAULT_DRIVER=\"freebob\"
  501. ], AC_MSG_RESULT([no]))
  502. AC_SUBST([LIBFREEBOB_CFLAGS])
  503. AC_SUBST([LIBFREEBOB_LIBS])
  504. fi
  505. AM_CONDITIONAL(HAVE_FREEBOB,$HAVE_FREEBOB)
  506. AC_ARG_ENABLE(alsa, [ --disable-alsa ignore ALSA driver ],
  507. TRY_ALSA=$enableval , TRY_ALSA=yes )
  508. HAVE_ALSA="false"
  509. if test "x$TRY_ALSA" = "xyes"
  510. then
  511. # check for ALSA >= 1.0.0
  512. PKG_CHECK_MODULES(ALSA, alsa >= 1.0.0,
  513. [HAVE_ALSA="true"
  514. ALSA_LIBS=-lasound
  515. JACK_DEFAULT_DRIVER=\"alsa\"
  516. ], AC_MSG_RESULT([no]), [-lm]
  517. )
  518. AC_SUBST(ALSA_LIBS)
  519. fi
  520. AM_CONDITIONAL(HAVE_ALSA, $HAVE_ALSA)
  521. if test "$JACK_DEFAULT_DRIVER" = \"dummy\"; then
  522. AC_MSG_WARN([Only the dummy driver can be built])
  523. fi
  524. AC_DEFINE_UNQUOTED(JACK_DEFAULT_DRIVER,
  525. [$JACK_DEFAULT_DRIVER],
  526. [Default JACK driver])
  527. # some example-clients need libsndfile
  528. HAVE_SNDFILE=false
  529. PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0,[HAVE_SNDFILE=true], [true])
  530. if test x$HAVE_SNDFILE = xfalse; then
  531. AC_MSG_WARN([*** the jackrec example client will not be built])
  532. fi
  533. # On some systems, readline depends on termcap or ncurses. But, the
  534. # MacOSX linker complains bitterly if these libraries are explicitly
  535. # referenced.
  536. #
  537. # AC_CHECK_LIB() foolishly assumes that checking a library for an entry
  538. # point always returns the same result regardless of any dependent
  539. # libraries specified. The `unset ac_cv_lib_readline_readline' erases
  540. # the cached result to work around this problem.
  541. READLINE_DEPS=""
  542. HAVE_READLINE=true
  543. AC_CHECK_LIB(readline, readline, [:],
  544. [unset ac_cv_lib_readline_readline
  545. AC_CHECK_LIB(readline, readline, [READLINE_DEPS="-ltermcap"],
  546. [unset ac_cv_lib_readline_readline
  547. AC_CHECK_LIB(readline, readline,
  548. [READLINE_DEPS="-lncurses"], [HAVE_READLINE=false], "-lncurses")],
  549. "-ltermcap")])
  550. AC_CHECK_HEADER(readline/chardefs.h, [], [HAVE_READLINE=false])
  551. if test x$HAVE_READLINE = xfalse; then
  552. AC_MSG_WARN([*** the jack_transport example client will not be built])
  553. fi
  554. AC_SUBST(READLINE_DEPS)
  555. # you need doxygen to make dist.
  556. AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
  557. if test $HAVE_DOXYGEN = "false"; then
  558. AC_MSG_WARN([*** doxygen not found, docs will not be built])
  559. fi
  560. AM_CONDITIONAL(HAVE_SNDFILE, $HAVE_SNDFILE)
  561. AM_CONDITIONAL(HAVE_READLINE, $HAVE_READLINE)
  562. AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN)
  563. AM_CONDITIONAL(USE_CAPABILITIES, $USE_CAPABILITIES)
  564. AM_CONDITIONAL(STRIPPED_JACKD, $STRIPPED_JACKD)
  565. AC_OUTPUT(
  566. Makefile
  567. config/Makefile
  568. doc/Makefile
  569. doc/reference.doxygen
  570. drivers/Makefile
  571. drivers/alsa/Makefile
  572. drivers/dummy/Makefile
  573. drivers/oss/Makefile
  574. drivers/portaudio/Makefile
  575. drivers/coreaudio/Makefile
  576. drivers/freebob/Makefile
  577. example-clients/Makefile
  578. jack.pc
  579. jack.spec
  580. jack/Makefile
  581. jack/version.h
  582. jackd/Makefile
  583. jackd/jackd.1
  584. libjack/Makefile
  585. )
  586. dnl
  587. dnl Output summary message
  588. dnl
  589. echo
  590. echo $PACKAGE $VERSION :
  591. echo
  592. echo \| Build with ALSA support............................... : $HAVE_ALSA
  593. echo \| Build with FreeBob support............................ : $HAVE_FREEBOB
  594. echo \| Build with OSS support................................ : $HAVE_OSS
  595. echo \| Build with CoreAudio support.......................... : $HAVE_COREAUDIO
  596. echo \| Build with PortAudio support.......................... : $HAVE_PA
  597. echo \| Compiler optimization flags........................... : $JACK_OPT_CFLAGS
  598. echo \| Compiler full flags................................... : $CFLAGS
  599. echo \| Install dir for libjack + backends.................... : $libdir/jack
  600. echo \|
  601. echo \| Default driver backend................................ : $JACK_DEFAULT_DRIVER
  602. echo \| Shared memory interface............................... : $JACK_SHM_TYPE
  603. echo