~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
JACK/configure.in


  1 dnl Process this file with autoconf to produce a configure script.
  2 AC_INIT(jackd/jackd.c)
  3 
  4 AC_CONFIG_AUX_DIR(.)
  5 AC_CANONICAL_TARGET
  6 
  7 dnl ---
  8 dnl HOWTO: updating the JACK version number
  9 dnl
 10 dnl major version = ask on jackit-devel :)
 11 dnl minor version = incremented when any of the public or internal
 12 dnl                 interfaces are changed
 13 dnl micro version = incremented when implementation-only
 14 dnl                 changes are made
 15 dnl ---
 16 JACK_MAJOR_VERSION=0
 17 JACK_MINOR_VERSION=93
 18 JACK_MICRO_VERSION=8
 19 
 20 dnl ---
 21 dnl HOWTO: updating the jack protocal version
 22 dnl
 23 dnl increment the protocol version whenever a change is
 24 dnl made to the way libjack communicates with jackd
 25 dnl that would break applications linked with an older
 26 dnl version of libjack.
 27 dnl ---
 28 JACK_PROTOCOL_VERSION=12
 29 
 30 dnl ---
 31 dnl HOWTO: updating the libjack interface version
 32 dnl
 33 dnl current = incremented whenever the public libjack API is changed 
 34 dnl revision = incremented when the libjack implementation is changed
 35 dnl age = current libjack is both source and binary compatible with
 36 dnl       libjack interfaces current,current-1,...,current-age
 37 dnl
 38 dnl Note! see libtool documentation for detailed documentation
 39 dnl
 40 dnl Note Also! until we reach CURRENT>=1, the rules are somewhat
 41 dnl slacker than this, and closer to those for the JACK version
 42 dnl number.
 43 dnl ---
 44 JACK_API_CURRENT=0
 45 JACK_API_REVISION=23
 46 JACK_API_AGE=0
 47 
 48 AC_SUBST(JACK_MAJOR_VERSION)
 49 AC_SUBST(JACK_MINOR_VERSION)
 50 AC_SUBST(JACK_MICRO_VERSION)
 51 
 52 AC_SUBST(JACK_PROTOCOL_VERSION)
 53 
 54 AC_SUBST(JACK_API_MAJOR_VERSION)
 55 AC_SUBST(JACK_API_MINOR_VERSION)
 56 AC_SUBST(JACK_API_MICRO_VERSION)
 57 
 58 JACK_SO_VERSION=${JACK_API_CURRENT}:${JACK_API_REVISION}:${JACK_API_AGE}
 59 
 60 JACK_VERSION=$JACK_MAJOR_VERSION.$JACK_MINOR_VERSION.${JACK_MICRO_VERSION}${BETA}
 61 JACK_RELEASE=$JACK_MAJOR_VERSION-$JACK_MINOR_VERSION-${JACK_MICRO_VERSION}${BETA}
 62 
 63 AC_SUBST(JACK_SO_VERSION)
 64 AC_SUBST(JACK_VERSION)
 65 AC_SUBST(JACK_RELEASE)
 66 
 67 AM_INIT_AUTOMAKE(jack-audio-connection-kit,${JACK_VERSION})
 68 AM_MAINTAINER_MODE
 69 
 70 AM_CONFIG_HEADER(config.h)
 71 
 72 AC_ENABLE_STATIC(no)
 73 AC_ENABLE_SHARED(yes)
 74 
 75 AC_PROG_CC
 76 AC_PROG_CXX
 77 AC_PROG_LD
 78 AM_PROG_LIBTOOL
 79 AC_C_BIGENDIAN
 80 
 81 AC_CHECK_HEADERS(string.h strings.h)
 82 
 83 AC_CHECK_FUNC(getopt_long, , AC_MSG_ERROR([GNU getopt is required to build jack]))
 84 AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
 85 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
 86 AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect))
 87 AC_CHECK_FUNCS(on_exit atexit)
 88 
 89 dnl
 90 dnl look for system support for POSIX shm API
 91 dnl XXX this could probably be improved
 92 dnl
 93 
 94 AC_ARG_ENABLE(posix-shm, [  --enable-posix-shm      use POSIX shm API ],
 95                         TRY_POSIX_SHM=$enableval , TRY_POSIX_SHM=no ) 
 96 
 97 
 98 if test "x$TRY_POSIX_SHM" = "xyes"
 99 then
100 
101         AC_MSG_CHECKING([POSIX shm support (compile time) ])
102         df | grep -s /dev/shm >/dev/null 2>&1
103         if test $? = 0 ; then
104                 AC_DEFINE(USE_POSIX_SHM,1,[Use POSIX shared memory interface])
105                 AC_MSG_RESULT([found.
106                                 JACK will use shm_open() and friends.])
107 
108         else
109                 AC_MSG_RESULT([not found. 
110                         JACK will use System V shm API (shmget() and friends])
111         fi
112 else
113         echo  '   JACK will use System V shm API (shmget() and friends)'
114 
115 fi
116 
117 JACK_CORE_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall"
118 
119 JACK_CFLAGS="$JACK_CORE_CFLAGS -g"
120 JACK_OPT_CFLAGS="$JACK_CORE_CFLAGS -O3 -march=$target_cpu -fomit-frame-pointer -ffast-math -fstrength-reduce -funroll-loops -fmove-all-movables"
121 
122 AC_ARG_ENABLE(optimize,
123               [  --enable-optimize       ask the compiler for its best optimizations],
124               [ if test "x$enable_optimize" != "xno" ; then JACK_CFLAGS="$JACK_OPT_CFLAGS" ; fi ])
125 
126 AC_SUBST(JACK_CFLAGS)
127 
128 dnl
129 dnl use JACK_CFLAGS for jackd compilation
130 dnl 
131 
132 CFLAGS=$JACK_CFLAGS
133 
134 AC_ARG_ENABLE(resize,
135               [  --enable-resize         enable buffer resizing],
136               [ if test "x$enable_resize" != "xno" ; then
137                     AC_DEFINE(DO_BUFFER_RESIZE,,[Enable buffer resizing])
138                 fi
139               ]
140 )
141 
142 ensure_mlock=yes
143 
144 AC_ARG_ENABLE(ensure-mlock,
145               [  --disable-ensure-mlock  allow memory locking errors],
146               [ if test "x$enable_ensure_mlock" = "xno" ; then
147                     ensure_mlock=no;
148                 fi
149               ]
150 )
151 if test "x$ensure_mlock" = "xyes"; then
152     AC_DEFINE(ENSURE_MLOCK,,[Ensure that memory locking succeeds])
153 fi
154 
155 AC_ARG_ENABLE(debug,
156               [  --enable-debug          enable debugging messages in jackd and libjack],
157               [ if test "x$enable_debug" != "xno" ; then
158                     AC_DEFINE(DEBUG_ENABLED,,[Enable debugging messages])
159                 fi
160               ]
161 )
162 
163 USE_CAPABILITIES=false
164 
165 AC_ARG_ENABLE(capabilities,
166               [  --enable-capabilities   use libcap to gain realtime scheduling priviledges],
167               [ if test "x$enable_capabilities" != "xno" ; then
168                     AC_CHECK_LIB(cap, capgetp,
169                                  [AC_CHECK_HEADER(sys/capability.h,
170                                                   [HAVE_CAPABILITIES=true],
171                                                   [AC_MSG_WARN([*** no kernel support for capabilities])
172                                                    HAVE_CAPABILITIES=false]
173                                   )],
174                                  [AC_MSG_WARN([*** no libcap present])
175                                   HAVE_CAPABILITIES=false]
176                     )
177                     if test "x$HAVE_CAPABILITIES" = "xtrue"; then
178                         AC_CHECK_PROG(HAVE_CAPABILITIES, md5sum, true, false)
179                     fi
180                     if test "x$HAVE_CAPABILITIES" = "xfalse"; then
181                         AC_MSG_WARN([*** required program md5sum not found])
182                     fi
183                     if test "x$HAVE_CAPABILITIES" = "xfalse"; then
184                         AC_MSG_ERROR([*** Capabilities support not present. Run configure again without --enable-capabilities.])
185                     fi
186                     USE_CAPABILITIES=true
187                     AC_DEFINE(USE_CAPABILITIES,,[Enable POSIX 1.e capabilities support])
188                 fi
189               ]
190 )
191 
192 with_oldtrans=yes
193 AC_ARG_ENABLE(oldtrans,
194               [  --disable-oldtrans      remove old transport interfaces],
195               [ if test "x$enable_oldtrans" = "xno" ; then
196                     with_oldtrans=no
197                 fi ])
198 if test "x$with_oldtrans" != "xno" ; then
199         AC_DEFINE(OLD_TRANSPORT,,[Include old transport interfaces])
200 fi
201 
202 STRIPPED_JACKD=false
203 AC_ARG_ENABLE(stripped-jackd,
204               [  --enable-stripped-jackd strip jack before computing its md5 sum ],
205               [ if test "x$USE_CAPABILITIES" != "xtrue" ; then
206                     AC_MSG_WARN([*** capabilities not enabled, stripped jackd has no effect])
207                 elif test "x$enable_stripped_jackd" != "xno"; then
208                     STRIPPED_JACKD=true
209                 fi
210               ]
211 )
212 
213 AC_ARG_ENABLE(timestamps,
214               [  --enable-timestamps      allow clients to use the JACK timestamp API ],
215               [ if test "x$enable_debug" != "xno" ; then
216                     AC_DEFINE(WITH_TIMESTAMPS,,[Enable JACK timestamp API])
217                 fi
218               ]
219 )
220 
221 # plugins go in the addon dir.
222 
223 AS_AC_EXPAND(ADDON_DIR,${libdir}/jack)
224 AC_SUBST(ADDON_DIR)
225 AC_DEFINE_UNQUOTED(ADDON_DIR,"$ADDON_DIR",[Directory for plugins])
226 
227 AC_ARG_WITH(html-dir,
228             [  --with-html-dir=PATH    where to install the html documentation])
229 
230 if test "x$with_html_dir" = "x" ; then
231     HTML_DIR='${pkgdatadir}'
232 else
233     HTML_DIR=$with_html_dir
234 fi
235 
236 AC_SUBST(HTML_DIR)
237 
238 
239 # allow specifying default tmpdir
240 AC_ARG_WITH(default-tmpdir,
241             [  --with-default-tmpdir=PATH    where jackd and clients will put tmp files (/tmp)])
242 
243 if test "x$with_default_tmpdir" = "x" ; then
244         DEFAULT_TMP_DIR=/tmp
245 else
246         DEFAULT_TMP_DIR=$with_default_tmpdir
247 fi
248 
249 AC_SUBST(DEFAULT_TMP_DIR)
250 AC_DEFINE_UNQUOTED(DEFAULT_TMP_DIR,"$DEFAULT_TMP_DIR",[Default tmp directory])
251 
252 
253 jack_have_driver="no"
254 
255 # jack depends on alsa 0.9. some example apps depend on libsndfile.
256 AC_CHECK_LIB(asound,snd_pcm_drop,
257              [
258                HAVE_ALSA="true"
259                ALSA_LIBS=-lasound
260                jack_have_driver="yes"
261              ],
262              [ 
263                HAVE_ALSA="false"
264                AC_MSG_WARN([ALSA 0.9 support not found])
265              ],
266              [-lm]
267 )
268 AC_SUBST(ALSA_LIBS)
269 AM_CONDITIONAL(ALSA, test x$HAVE_ALSA = xtrue)
270 
271 
272 AC_ARG_ENABLE(portaudio, [  --disable-portaudio     ignore PortAudio driver ],
273                         TRY_PORTAUDIO=$enableval , TRY_PORTAUDIO=yes ) 
274 
275 
276 HAVE_PA="false"
277 if test "x$TRY_PORTAUDIO" = "xyes"
278 then
279         # check for portaudio V18
280         AC_CHECK_LIB(portaudio, Pa_Initialize,
281              [HAVE_PA="true"
282               PA_LIBS=-lportaudio
283               jack_have_driver="yes"
284              ], [], [-lm -lpthread]
285         )
286         AC_SUBST(PA_LIBS)
287 fi
288 AM_CONDITIONAL(PORTAUDIO, test x$HAVE_PA = xtrue)
289 
290 jack_enable_iec61883="no"
291 AC_ARG_ENABLE(iec61883,
292 [  --enable-iec61883       enable the iec61883 driver],[
293   case "$enableval" in
294     "yes")
295       jack_enable_iec61883="yes"
296       ;;
297     "no")
298       ;;
299     *)
300       AC_MSG_ERROR([must use --enable-iec61883(=yes/no) or --disable-iec61883])
301       ;;
302   esac
303 ])
304 
305 if test x$jack_enable_iec61883 != xno; then
306   AC_CHECK_LIB(raw1394, raw1394_loop_iterate,
307                [
308                  AC_CHECK_HEADER(libraw1394/raw1394.h,
309                                  [
310                                    HAVE_RAW1394="true"
311                                    RAW1394_LIBS=-lraw1394
312                                    jack_have_driver="yes";
313                                  ],
314                                  HAVE_RAW1394="false"
315                  )
316                ],
317   )
318 else
319   HAVE_RAW1394="false"
320 fi
321 
322 AC_SUBST(RAW1394_LIBS)
323 AM_CONDITIONAL(IEC61883, test x$HAVE_RAW1394 = xtrue)
324 
325 if test x$jack_have_driver = xno; then
326   AC_ERROR([No drivers can be built])
327 fi
328 
329 
330 HAVE_SNDFILE=false
331 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0,[HAVE_SNDFILE=true], [true])
332 if test x$HAVE_SNDFILE = xfalse; then
333              AC_MSG_WARN([*** the jackrec example client will not be built])
334 fi
335 
336 # on some systems, readline depends on termcap or ncurses, respectively
337 READLINE_DEPS=""
338 AC_CHECK_LIB(termcap, tgetent, [READLINE_DEPS="$READLINE_DEPS -ltermcap"])
339 AC_CHECK_LIB(ncurses, tgetent, [READLINE_DEPS="$READLINE_DEPS -lncurses"])
340 AC_CHECK_LIB(readline, readline,
341              [HAVE_READLINE=true], [HAVE_READLINE=false], [$READLINE_DEPS]
342 )
343 if test x$HAVE_READLINE = xfalse; then
344         AC_MSG_WARN([*** the jack_transport example client will not be built])
345 fi
346 AC_SUBST(READLINE_DEPS)
347 
348 # you need doxygen to make dist.
349 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
350 if test $HAVE_DOXYGEN = "false"; then
351              AC_MSG_WARN([*** doxygen not found, docs will not be built])
352 fi
353 
354 AM_CONDITIONAL(HAVE_SNDFILE, $HAVE_SNDFILE)
355 AM_CONDITIONAL(HAVE_READLINE, $HAVE_READLINE)
356 AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN)
357 AM_CONDITIONAL(USE_CAPABILITIES, $USE_CAPABILITIES)
358 AM_CONDITIONAL(STRIPPED_JACKD, $STRIPPED_JACKD)
359 AM_CONDITIONAL(HAVE_ALSA, $HAVE_ALSA)
360 AM_CONDITIONAL(HAVE_PA, $HAVE_PA)
361 
362 AC_OUTPUT(
363 Makefile
364 jack.pc
365 jack.spec
366 jack/Makefile
367 jack/version.h
368 jackd/Makefile
369 jackd/jackd.1
370 libjack/Makefile
371 drivers/Makefile
372 drivers/alsa/Makefile
373 drivers/dummy/Makefile
374 drivers/portaudio/Makefile
375 drivers/iec61883/Makefile
376 example-clients/Makefile
377 doc/Makefile
378 doc/reference.doxygen
379 )

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.