1 dnl Process this file with autoconf to produce a configure script.
6 AC_INIT(SoX, 14.4.3git, sox-devel@lists.sourceforge.net)
8 AC_CONFIG_MACRO_DIR([m4])
10 dnl Find target architecture
14 AM_SILENT_RULES([yes])
16 dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
17 AC_CONFIG_HEADERS([src/soxconfig.h])
19 dnl Check we have the right srcdir
20 AC_CONFIG_SRCDIR(sox.1)
22 dnl Checks for programs.
28 AX_APPEND_LINK_FLAGS([-Wl,--as-needed])
30 dnl Increase version when binary compatibility with previous version is broken
32 AC_SUBST(SHLIB_VERSION)
35 AS_HELP_STRING([--without-libltdl],
36 [Don't try to use libltdl for external dynamic library support]),
37 with_libltdl=$withval, with_libltdl=default)
39 if test "$with_libltdl" = "default"; then
40 dnl Default to no libltdl support when building only static libraries
41 if test "$enable_shared" != "no"; then
48 using_libltdl=$with_libltdl
51 LT_INIT([dlopen win32-dll])
52 AC_SUBST(LIBTOOL_DEPS)
54 AC_ARG_WITH(dyn-default,AS_HELP_STRING([--with-dyn-default],[Default to loading optional formats dynamically]),opt_default=dyn,opt_default=yes)
56 AC_ARG_WITH(pkgconfigdir,
57 AS_HELP_STRING([--with-pkgconfigdir],
58 [location to install .pc files or "no" to disable (default=$(libdir)/pkgconfig)]))
60 m4_ifndef([PKG_PROG_PKG_CONFIG], with_pkgconfigdir="no")
63 if test "$with_pkgconfigdir" != "no"; then
64 if test "$with_pkgconfigdir" = ""; then
65 with_pkgconfigdir="\$(libdir)/pkgconfig"
70 AM_CONDITIONAL(HAVE_PKGCONFIG, test x$using_pkgconfig = xyes)
71 AC_SUBST(PKGCONFIGDIR, $with_pkgconfigdir)
76 using_win32_glob="yes"
79 if test "$using_win32_glob" = yes; then
80 AC_DEFINE([HAVE_WIN32_GLOB_H], 1, [Define to 1 to use win32 glob])
82 AM_CONDITIONAL(HAVE_WIN32_GLOB, test x$using_win32_glob = xyes)
85 AC_MSG_CHECKING([whether to make a debug build])
86 AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [make a debug build]))
87 AC_MSG_RESULT($enable_debug)
88 if test "$enable_debug" = "yes"; then
90 if test "$GCC" = "yes"; then
91 CFLAGS="$CFLAGS -ggdb"
98 AC_ARG_ENABLE([stack-protector],
99 [AS_HELP_STRING([--disable-stack-protector],
100 [Disable GCC's/libc's stack-smashing protection])],
101 [case "${enableval}" in
102 yes) enable_ssp=yes ;;
104 *) AC_MSG_ERROR([invalid value ${enableval} for --disable-stack-protector]) ;;
108 if test x"$enable_ssp" = x"yes" && test x"$GCC" != x"yes"; then
109 AC_MSG_NOTICE([Disabling stack-smashing protection because compiler is not GCC])
113 if test x"$enable_ssp" = x"yes"; then
114 # Check for broken ssp in libc: http://www.avahi.org/ticket/105
115 # libc's brokenness will get in the way regardless of whether -lssp is
116 # provided, but provide it anyway (otherwise non-libc ssp would wrongly
119 # Get -lssp if it exists
120 GCC_STACK_PROTECT_LIB
122 AC_MSG_CHECKING([whether stack-smashing protection is available])
123 ssp_old_cflags="$CFLAGS"
124 ssp_old_ldflags="$LDFLAGS"
125 CFLAGS="$CFLAGS -Werror -fstack-protector-all -fPIC"
126 LDFLAGS="$LDFLAGS -Wl,-z,defs"
127 cat confdefs.h > conftest.c
128 cat >>conftest.c <<_ACEOF
129 void test_broken_ssp(c)
132 char arr[[123]], *p; /* beware of possible double-braces if copying this */
133 for (p = arr; *c; ++p) {
141 if $CC -c $CFLAGS $CPPFLAGS -o conftest.o conftest.c >/dev/null 2>&1; then
143 AC_MSG_CHECKING([whether stack-smashing protection is buggy])
144 if $CC -o conftest.so $LDFLAGS -shared conftest.o $LIBS >/dev/null 2>&1; then
154 rm -f conftest.c conftest.o conftest.so
156 CFLAGS="$ssp_old_cflags"
157 LDFLAGS="$ssp_old_ldflags"
160 if test x"$enable_ssp" = x"yes"; then
161 # Do this the long way so we don't call GCC_STACK_PROTECT_LIB twice
164 # XXX: Update the enable_ssp value now for output later?
167 dnl Extra CFLAGS if we have gcc
168 if test "$GCC" = "yes"; then
169 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
171 dnl Define stricter policy on GNU/Linux, all symbols must be resolved
174 LDFLAGS="$LDFLAGS -Wl,-z,defs"
176 *os2* | *cygwin* | *mingw*)
177 APP_LDFLAGS="-no-undefined"
181 AC_SUBST(APP_LDFLAGS)
183 AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=distro], [Provide distribution name]))
184 if test "x$with_distro" != "x"; then
185 DISTRO="$with_distro"
187 AC_DEFINE(HAVE_DISTRO, 1, [1 if DISTRO is defined])
190 DISTRO="not specified!"
192 AM_CONDITIONAL(HAVE_DISTRO, test x$have_distro = xyes)
194 dnl Check for system dependent features.
198 dnl Checks for header files.
200 AC_CHECK_HEADERS(fcntl.h unistd.h byteswap.h sys/ioctl.h sys/stat.h sys/time.h sys/timeb.h sys/types.h sys/utsname.h termios.h glob.h fenv.h)
202 dnl Checks for library functions.
203 AC_CHECK_FUNCS(strcasecmp strdup popen vsnprintf gettimeofday mkstemp fmemopen sigaction)
205 dnl Check if math library is needed.
206 AC_SEARCH_LIBS([pow], [m])
207 AC_SEARCH_LIBS([lrint], [m])
208 AC_CHECK_FUNCS([lrint])
210 dnl Large File Support
214 dnl Allow libtool to be silenced
215 AC_MSG_CHECKING([whether libtool should be silenced])
216 AC_ARG_ENABLE(silent-libtool,
217 AS_HELP_STRING([--disable-silent-libtool], [Verbose libtool]),,enable_silent_libtool=yes)
218 AC_MSG_RESULT($enable_silent_libtool)
219 if test "$enable_silent_libtool" = "yes"; then
220 LIBTOOLFLAGS=--silent
222 AC_SUBST(LIBTOOLFLAGS)
224 dnl Check if ltdl should be enabled.
225 using_win32_ltdl="no"
226 if test "$using_libltdl" != "no"; then
229 AC_DEFINE([HAVE_WIN32_LTDL_H], 1, [Define to 1 to use internal win32 ltdl])
231 using_win32_ltdl="yes"
234 AC_CHECK_HEADERS(ltdl.h,
235 AC_CHECK_LIB(ltdl, lt_dlinit, LIBLTDL="$LIBLTDL -lltdl",
236 using_libltdl=no), using_libltdl=no)
240 if test "$using_libltdl" = yes; then
241 AC_DEFINE([HAVE_LIBLTDL], 1, [Define to 1 if you have libltdl])
243 AM_CONDITIONAL(HAVE_LIBLTDL, test x$using_libltdl = xyes -a x$using_win32_ltdl = xno)
244 AM_CONDITIONAL(HAVE_WIN32_LTDL, test x$using_win32_ltdl = xyes)
250 CFLAGS="$CFLAGS $OPENMP_CFLAGS"
253 dnl Check for magic library
255 AS_HELP_STRING([--without-magic],
256 [Don't try to use magic]))
258 if test "$with_magic" != "no"; then
260 AC_CHECK_HEADER(magic.h,
261 [AC_CHECK_LIB(magic, magic_open, MAGIC_LIBS="-lmagic",using_magic=no)],
263 if test "$with_magic" = "yes" -a "$using_magic" = "no"; then
264 AC_MSG_FAILURE([cannot find magic])
267 if test "$using_magic" = yes; then
268 AC_DEFINE(HAVE_MAGIC, 1, [Define to 1 if you have magic.])
270 AM_CONDITIONAL(HAVE_MAGIC, test x$using_magic = xyes)
275 dnl Check for png libraries
277 AS_HELP_STRING([--without-png],
278 [Don't try to use png]))
280 if test "$with_png" != "no"; then
281 AC_CHECK_HEADERS(png.h libpng/png.h,using_png=yes)
282 if test "$using_png" = "yes"; then
283 AC_CHECK_LIB(png, png_set_rows, PNG_LIBS="$PNG_LIBS -lpng -lz",
284 [AC_CHECK_LIB(png12, png_set_rows,
285 PNG_LIBS="$PNG_LIBS -lpng12 -lz",
286 using_png=no, -lz)], -lz)
288 if test "$with_png" = "yes" -a "$using_png" = "no"; then
289 AC_MSG_FAILURE([cannot find png])
292 if test "$using_png" = yes; then
293 AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have PNG.])
295 AM_CONDITIONAL(HAVE_PNG, test x$using_png = xyes)
302 AS_HELP_STRING([--without-ladspa], [Don't try to use LADSPA]))
304 if test "$with_ladspa" != "no" -a "$using_libltdl" = "yes"; then
306 AC_DEFINE(HAVE_LADSPA_H, 1, [1 if should enable LADSPA])
308 LADSPA_PATH=${libdir}/ladspa
309 AC_ARG_WITH(ladspa-path,
310 AS_HELP_STRING([--with-ladspa-path], [Default search path for LADSPA plugins]))
311 AC_SUBST(LADSPA_PATH)
315 dnl Check for MAD libraries
317 AS_HELP_STRING([--without-mad],
318 [Don't try to use MAD (MP3 Audio Decoder)]))
320 if test "$with_mad" != "no"; then
322 AC_CHECK_HEADERS(mad.h,, using_mad=no)
323 AC_MSG_CHECKING([whether to dlopen mad])
324 AC_ARG_ENABLE(dl_mad,
325 AS_HELP_STRING([--enable-dl-mad], [Dlopen mad instead of linking in.]),
326 enable_dl_mad=$enableval, enable_dl_mad=no)
327 AC_MSG_RESULT($enable_dl_mad)
328 if test "x$using_libltdl" = "xyes" -a "x$enable_dl_mad" = "xyes"; then
329 AC_DEFINE(DL_MAD, 1, [Define to dlopen() mad.])
332 AC_CHECK_LIB(mad, mad_stream_buffer, MP3_LIBS="$MP3_LIBS -lmad",using_mad=no)
333 if test "$with_mad" = "yes" -a "$using_mad" = "no"; then
334 AC_MSG_FAILURE([cannot find libmad])
341 dnl Check for id3tag libraries
343 AS_HELP_STRING([--without-id3tag],
344 [Don't try to use id3tag]))
346 if test "$with_id3tag" != "no"; then
348 AC_CHECK_HEADER(id3tag.h,
349 [AC_CHECK_LIB(id3tag, id3_file_open, MP3_LIBS="$MP3_LIBS -lid3tag -lz",using_id3tag=no, -lz)],
351 if test "$with_id3tag" = "yes" -a "$using_id3tag" = "no"; then
352 AC_MSG_FAILURE([cannot find id3tag])
355 if test "$using_id3tag" = yes; then
356 AC_DEFINE(HAVE_ID3TAG, 1, [Define to 1 if you have id3tag.])
358 AM_CONDITIONAL(HAVE_ID3TAG, test x$using_id3tag = xyes)
362 dnl Check for LAME library.
364 AS_HELP_STRING([--without-lame],
365 [Don't try to use LAME (LAME Ain't an MP3 Encoder)]))
367 if test "$with_lame" != "no"; then
369 AC_MSG_CHECKING([whether to dlopen lame])
370 AC_ARG_ENABLE(dl_lame,
371 AS_HELP_STRING([--enable-dl-lame], [Dlopen lame instead of linking in.]),
372 enable_dl_lame=$enableval, enable_dl_lame=no)
373 AC_MSG_RESULT($enable_dl_lame)
374 if test "x$using_libltdl" = "xyes" -a "x$enable_dl_lame" = "xyes"; then
375 AC_DEFINE(DL_LAME, 1, [Define to dlopen() lame.])
378 AC_CHECK_HEADERS(lame/lame.h,,
379 [AC_CHECK_HEADERS(lame.h, [], using_lame=no)])
380 AC_CHECK_LIB(mp3lame, lame_get_lametag_frame, MP3_LIBS="$MP3_LIBS -lmp3lame", using_lame=no)
381 AC_CHECK_LIB(mp3lame, id3tag_set_fieldvalue, using_lame=$using_lame)
382 if test "$ac_cv_lib_mp3lame_id3tag_set_fieldvalue" = yes; then
383 AC_DEFINE(HAVE_LAME_ID3TAG, 1, [Define to 1 if lame supports optional ID3 tags.])
385 if test "$with_lame" = "yes" -a "$using_lame" = "no"; then
386 AC_MSG_FAILURE([cannot find LAME])
393 dnl Check for Twolame library
395 AS_HELP_STRING([--without-twolame],
396 [Don't try to use Twolame (MP2 Audio Encoder)]))
398 if test "$with_twolame" != "no"; then
400 AC_CHECK_HEADERS(twolame.h,, using_twolame=no)
401 AC_MSG_CHECKING([whether to dlopen twolame])
402 AC_ARG_ENABLE(dl_twolame,
403 AS_HELP_STRING([--enable-dl-twolame], [Dlopen twolame instead of linking in.]),
404 enable_dl_twolame=$enableval, enable_dl_twolame=no)
405 AC_MSG_RESULT($enable_dl_twolame)
406 if test "x$using_libltdl" = "xyes" -a "x$enable_dl_twolame" = "xyes"; then
407 AC_DEFINE(DL_TWOLAME, 1, [Define to dlopen() libtwolame.])
409 enable_dl_twolame="no"
410 AC_CHECK_LIB(twolame, twolame_init, MP3_LIBS="$MP3_LIBS -ltwolame",using_twolame=no)
411 if test "$with_twolame" = "yes" -a "$using_twolame" = "no"; then
412 AC_MSG_FAILURE([cannot find libtwolame])
419 AC_CHECK_HEADERS(gsm/gsm.h, ,
420 [AC_CHECK_HEADERS(gsm.h, ,found_libgsm=no)])
421 AC_CHECK_LIB(gsm, gsm_create, GSM_LIBS="$GSM_LIBS -lgsm", found_libgsm=no)
427 AC_CHECK_HEADERS(lpc10.h, ,
428 [AC_CHECK_HEADERS(lpc10.h, ,found_liblpc10=no)])
429 AC_CHECK_LIB(lpc10, create_lpc10_encoder_state, LPC10_LIBS="$LPC10_LIBS -llpc10", found_liblpc10=no)
430 if test "$found_liblpc10" = yes; then
431 AC_DEFINE(EXTERNAL_LPC10, 1, [Define if you are using an external LPC10 library])
433 LIBLPC10_LIBADD=../lpc10/liblpc10.la
435 AM_CONDITIONAL(EXTERNAL_LPC10, test x$found_liblpc10 = xyes)
436 AC_SUBST(LIBLPC10_LIBADD)
440 # Check for Ogg Vorbis
441 AC_OPTIONAL_FORMAT(oggvorbis, OGG_VORBIS, [AC_CHECK_HEADER(vorbis/codec.h,
442 [AC_CHECK_LIB(ogg, ogg_packet_clear, OGG_VORBIS_LIBS="$OGG_VORBIS_LIBS -logg", using_oggvorbis=no)
443 AC_CHECK_LIB(vorbis, vorbis_analysis_headerout, OGG_VORBIS_LIBS="-lvorbis $OGG_VORBIS_LIBS", using_oggvorbis=no, $OGG_VORBIS_LIBS)
444 AC_CHECK_LIB(vorbisfile, ov_clear, OGG_VORBIS_LIBS="-lvorbisfile $OGG_VORBIS_LIBS", using_oggvorbis=no, $OGG_VORBIS_LIBS)
445 AC_CHECK_LIB(vorbisenc, vorbis_encode_init_vbr, OGG_VORBIS_LIBS="-lvorbisenc $OGG_VORBIS_LIBS", using_oggvorbis=no, $OGG_VORBIS_LIBS)],
446 using_oggvorbis=no)])
449 AC_OPTIONAL_FORMAT(opus, OPUS,
450 [PKG_CHECK_MODULES(OPUS, [opusfile], [], using_opus=no)],
454 dnl Check for FLAC library
455 AC_OPTIONAL_FORMAT(flac, FLAC,
456 [PKG_CHECK_MODULES([FLAC], [flac], [], [using_flac=no])])
459 dnl When enable_dl_amrbw, do not let add libraries to be linked in
460 dnl since they will be dlopen()'ed instead.
461 ac_sox_save_AMRWB_LIBS="$AMRWB_LIBS"
462 tmp_using_amrwb=$opt_default
463 AC_CHECK_HEADERS(opencore-amrwb/dec_if.h,
464 [AC_CHECK_LIB(opencore-amrwb, D_IF_init,
465 AMRWB_LIBS="$AMRWB_LIBS -lopencore-amrwb", tmp_using_amrwb=no)],
466 [AC_CHECK_HEADERS(amrwb/dec.h,
467 [AC_CHECK_LIB(amrwb, D_IF_init,
468 AMRWB_LIBS="$AMRWB_LIBS -lamrwb",tmp_using_amrwb=no)],
469 tmp_using_amrwb=no)])
470 AC_ARG_ENABLE(dl_amrwb,
471 AS_HELP_STRING([--enable-dl-amrwb],
472 [Dlopen amrbw instead of linking in.]),
473 enable_dl_amrwb=$enableval, enable_dl_amrwb=no)
474 if test "x$using_libltdl" = "xyes" -a "x$enable_dl_amrwb" = "xyes"; then
475 AC_DEFINE(DL_AMRWB, 1, [Define to dlopen() amrwb.])
476 dnl When enable_dl_amrwb, do not let SOX_PATH_AMRWB add libraries
477 dnl to be linked in (since they will be dlopen()'ed instead).
478 AMRWB_LIBS="$ac_sox_save_AMRWB_LIBS"
479 dnl Force to using regardless if headers or libraries were found.
484 AC_OPTIONAL_FORMAT(amrwb, AMRWB, [using_amrwb=$tmp_using_amrwb])
486 dnl When enable_dl_amrnb, do not let add libraries to be linked in
487 dnl since they will be dlopen()'ed instead.
488 ac_sox_save_AMRNB_LIBS="$AMRNB_LIBS"
489 tmp_using_amrnb=$opt_default
490 AC_CHECK_HEADERS(opencore-amrnb/interf_dec.h,
491 [AC_CHECK_LIB(opencore-amrnb, Decoder_Interface_init,
492 AMRNB_LIBS="$AMRNB_LIBS -lopencore-amrnb", tmp_using_amrnb=no)],
493 [AC_CHECK_HEADER(amrnb/sp_dec.h,
494 [AC_CHECK_LIB(amrnb, Decoder_Interface_init,
495 AMRNB_LIBS="$AMRNB_LIBS -lamrnb", tmp_using_amrnb=no)],
496 tmp_using_amrnb=no)])
497 AC_ARG_ENABLE(dl_amrnb,
498 AS_HELP_STRING([--enable-dl-amrnb],
499 [Dlopen amrnb instead of linking in.]),
500 enable_dl_amrnb=$enableval, enable_dl_amrnb=no)
501 if test "x$using_libltdl" = "xyes" -a "x$enable_dl_amrnb" = "xyes"; then
502 AC_DEFINE(DL_AMRNB, 1, [Define to dlopen() amrnb.])
503 dnl When enable_dl_amrnb, do not let SOX_PATH_AMRNB add libraries
504 dnl to be linked in (since they will be dlopen()'ed instead).
505 AMRNB_LIBS="$ac_sox_save_AMRNB_LIBS"
506 dnl Force to using regardless if headers or libraries were found.
511 AC_OPTIONAL_FORMAT(amrnb, AMRNB, [using_amrnb=$tmp_using_amrnb])
514 AC_OPTIONAL_FORMAT(wavpack, WAVPACK, [AC_CHECK_HEADER(wavpack/wavpack.h, [AC_CHECK_LIB(wavpack, WavpackGetSampleRate, WAVPACK_LIBS="$WAVPACK_LIBS -lwavpack",using_wavpack=no)], using_wavpack=no)])
518 AC_OPTIONAL_FORMAT(sndio, SNDIO, [AC_CHECK_HEADER(sndio.h, [AC_CHECK_LIB(sndio, sio_open, SNDIO_LIBS="$SNDIO_LIBS -lsndio",using_sndio=no)], using_sndio=no)])
522 AC_OPTIONAL_FORMAT(coreaudio, COREAUDIO, [AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [COREAUDIO_LIBS="$COREAUDIO_LIBS -Wl,-framework,CoreAudio"], using_coreaudio=no)])
526 AC_OPTIONAL_FORMAT(alsa, ALSA, [AC_CHECK_HEADER(alsa/asoundlib.h, [AC_CHECK_LIB(asound, snd_pcm_open, ALSA_LIBS="$ALSA_LIBS -lasound",using_alsa=no)], using_alsa=no)])
530 AC_OPTIONAL_FORMAT(ao, AO, [AC_CHECK_HEADER(ao/ao.h, [AC_CHECK_LIB(ao, ao_play, AO_LIBS="$AO_LIBS -lao",using_ao=no)], using_ao=no)])
534 AC_OPTIONAL_FORMAT(pulseaudio, PULSEAUDIO, [AC_CHECK_HEADER(pulse/simple.h, [AC_CHECK_LIB(pulse, pa_simple_new, PULSEAUDIO_LIBS="$PULSEAUDIO_LIBS -lpulse -lpulse-simple",using_pulseaudio=no,"-lpulse-simple")], using_pulseaudio=no)])
537 AC_OPTIONAL_FORMAT(waveaudio, WAVEAUDIO, [AC_CHECK_HEADER(mmsystem.h, [WAVEAUDIO_LIBS="$WAVEAUDIO_LIBS -lwinmm"], using_waveaudio=no, [[#include <windows.h>]])])
539 dnl When enable_dl_sndfile, do not let SOX_PATH_SNDFILE add libraries
540 dnl to be linked in (since they will be dlopen()'ed instead).
541 ac_sox_save_SNDFILE_LIBS="$SNDFILE_LIBS"
542 SOX_PATH_SNDFILE(tmp_using_sndfile=$opt_default, tmp_using_sndfile=no)
543 AC_ARG_ENABLE(dl_sndfile,
544 AS_HELP_STRING([--enable-dl-sndfile],
545 [Dlopen sndfile instead of linking in.]),
546 enable_dl_sndfile=$enableval, enable_dl_sndfile=no)
547 if test "x$tmp_using_sndfile" = "xyes"; then
548 if test "x$using_libltdl" = "xyes" -a "x$enable_dl_sndfile" = "xyes"; then
549 AC_DEFINE(DL_SNDFILE, 1, [Define to dlopen() sndfile.])
550 dnl When enable_dl_sndfile, do not let SOX_PATH_SNDFILE add libraries
551 dnl to be linked in (since they will be dlopen()'ed instead).
552 SNDFILE_LIBS="$ac_sox_save_SNDFILE_LIBS"
554 enable_dl_sndfile="no"
557 AC_OPTIONAL_FORMAT(sndfile, SNDFILE, [using_sndfile=$tmp_using_sndfile])
561 AC_OPTIONAL_FORMAT(oss, OSS, [AC_CHECK_HEADERS(sys/soundcard.h,, using_oss=no)])
565 AC_OPTIONAL_FORMAT(sunaudio, SUN_AUDIO, [AC_CHECK_HEADERS(sys/audioio.h,,
566 [AC_CHECK_HEADERS(sun/audioio.h,, using_sunaudio=no)])])
570 # MP2/MP3 format depends on libmad || LAME || twolame
571 AC_OPTIONAL_FORMAT(mp3, MP3, [
572 if test "$using_mad" != yes -a "$using_lame" != yes -a "$using_twolame" != yes; then
578 # GSM format depends on libgsm
579 AC_OPTIONAL_FORMAT(gsm, GSM, [using_gsm=$found_libgsm])
583 # LPC10 format depends on liblpc10
584 # No need to check; LPC10 is always found
585 AC_OPTIONAL_FORMAT(lpc10, LPC10)
589 dnl Check if we want to disable all symlinks
590 AC_MSG_CHECKING([whether to enable symlinks])
591 AC_ARG_ENABLE(symlinks,
592 AS_HELP_STRING([--disable-symlinks], [Don't make any symlinks to sox.]),,enable_symlinks=yes)
593 AC_MSG_RESULT($enable_symlinks)
595 enable_playrec_symlinks=no
596 if test "$enable_symlinks" = "yes"; then
599 -o "$using_alsa" = yes \
600 -o "$using_ao" = yes \
601 -o "$using_coreaudio" = yes \
602 -o "$using_oss" = yes \
603 -o "$using_pulseaudio" = yes \
604 -o "$using_sndio" = yes \
607 enable_playrec_symlinks=yes
611 AC_SUBST(PLAYRECLINKS)
613 AM_CONDITIONAL(STATIC_LIBSOX_ONLY, test "$enable_shared" = "no" -a "$enable_static" = "yes")
615 dnl Generate output files.
616 AC_CONFIG_FILES(Makefile src/Makefile lpc10/Makefile sox.pc)
619 if test "$using_lpc10" != "no"; then
620 if test "$found_liblpc10" = "yes"; then
621 lpc10_option="(external)"
623 lpc10_option="(in-tree)"
627 if test "$using_pkgconfig" = "no"; then
628 pkgconfig_option="disabled"
630 pkgconfig_option="$with_pkgconfigdir"
633 # Report configuration.
636 echo "Debugging build............$enable_debug"
637 echo "Distro name ...............$DISTRO"
638 echo "Dynamic loading support....$using_libltdl"
639 echo "Pkg-config location........$pkgconfig_option"
640 echo "Play and rec symlinks......$enable_playrec_symlinks"
641 echo "Symlinks enabled...........$enable_symlinks"
643 echo "OPTIONAL DEVICE DRIVERS"
644 echo "ao (Xiph)..................$using_ao"
645 echo "alsa (Linux)...............$using_alsa"
646 echo "coreaudio (Mac OS X).......$using_coreaudio"
647 echo "sndio (OpenBSD)............$using_sndio"
648 echo "oss........................$using_oss"
649 echo "pulseaudio.................$using_pulseaudio"
650 echo "sunaudio...................$using_sunaudio"
651 echo "waveaudio (MS-Windows).....$using_waveaudio"
653 echo "OPTIONAL FILE FORMATS"
654 echo "amrnb......................$using_amrnb"
655 if test "x$using_amrnb" = "xyes"; then
656 echo " dlopen amrnb..............$enable_dl_amrnb"
658 echo "amrwb......................$using_amrwb"
659 if test "x$using_amrwb" = "xyes"; then
660 echo " dlopen amrwb..............$enable_dl_amrwb"
662 echo "flac.......................$using_flac"
663 echo "gsm........................$using_gsm"
664 echo "lpc10......................$using_lpc10 $lpc10_option"
665 echo "mp2/mp3....................$using_mp3"
666 echo " id3tag....................$using_id3tag"
667 echo " lame......................$using_lame"
668 if test "x$using_lame" = "xyes"; then
669 if test "x$enable_dl_lame" != "xyes"; then
670 echo " lame id3tag...............$ac_cv_lib_mp3lame_id3tag_set_fieldvalue"
672 echo " dlopen lame...............$enable_dl_lame"
674 echo " mad.......................$using_mad"
675 if test "x$using_mad" = "xyes"; then
676 echo " dlopen mad................$enable_dl_mad"
678 echo " twolame...................$using_twolame"
679 if test "x$using_twolame" = "xyes"; then
680 echo " dlopen twolame............$enable_dl_twolame"
682 echo "oggvorbis..................$using_oggvorbis"
683 echo "opus.......................$using_opus"
684 echo "sndfile....................$using_sndfile"
685 if test "x$using_sndfile" = "xyes"; then
686 echo " dlopen sndfile............$enable_dl_sndfile"
688 echo "wavpack....................$using_wavpack"
691 echo "ladspa effects.............$using_ladspa"
692 echo "magic support..............$using_magic"
693 echo "png support................$using_png"
694 if test "x$OPENMP_CFLAGS" = "x"; then
695 echo "OpenMP support.............no"
697 echo "OpenMP support.............yes, $OPENMP_CFLAGS"
700 echo "Configure finished. Do 'make -s && make install' to compile and install SoX."