ref: 9d0d017571ee90f29e1c8a051ca79d5d92bdd656
parent: 1b54416708f1fa59434574c85c5bfecf8d309b9d
author: robs <robs>
date: Mon Sep 3 17:16:23 EDT 2007
build fixes
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,9 @@
AC_CHECK_LIB(ao, ao_play, AO_LIBS="$AO_LIBS -lao", enable_libao=no),
enable_libao=no)
fi
+if test "$enable_libao" = yes; then
+ AC_DEFINE(HAVE_LIBAO, 1, [Define to 1 if you have libao.])
+fi
AM_CONDITIONAL(HAVE_LIBAO, test x$enable_libao = xyes)
AC_SUBST(AO_LIBS)
@@ -212,6 +215,9 @@
AC_CHECK_LIB(vorbisfile, ov_clear, OGG_LIBS="$OGG_LIBS -lvorbisfile", with_ogg_vorbis=no)
AC_CHECK_LIB(vorbisenc, vorbis_encode_init_vbr, OGG_LIBS="$OGG_LIBS -lvorbisenc", with_ogg_vorbis=no)],
with_ogg_vorbis=no)
+if test "$with_ogg_vorbis" = yes; then
+ AC_DEFINE(HAVE_OGG_VORBIS, 1, [Define to 1 if you have Ogg Vorbis.])
+fi
AM_CONDITIONAL(HAVE_OGG_VORBIS, test x$with_ogg_vorbis = xyes)
AC_SUBST(OGG_LIBS)
@@ -220,6 +226,7 @@
AC_HELP_STRING([--without-flac],
[Don't try to use FLAC]),
[with_flac=$withval])
+using_flac=no
if test "$with_flac" != "no"; then
using_flac=yes
AC_CHECK_HEADER(FLAC/all.h,
@@ -229,6 +236,9 @@
AC_MSG_FAILURE([cannot find FLAC])
fi
fi
+if test "$using_flac" = yes; then
+ AC_DEFINE(HAVE_FLAC, 1, [Define to 1 if you have FLAC.])
+fi
AM_CONDITIONAL(HAVE_FLAC, test x$using_flac = xyes)
AC_SUBST(FLAC_LIBS)
@@ -239,6 +249,9 @@
AC_CHECK_LIB(avutil, av_rescale_q, FFMPEG_LIBS="$FFMPEG_LIBS -lavutil", with_ffmpeg=no)
AC_CHECK_LIB(avcodec, avcodec_encode_audio, FFMPEG_LIBS="$FFMPEG_LIBS -lavcodec", with_ffmpeg=no)],
with_ffmpeg=no)
+if test "$with_ffmpeg" = yes; then
+ AC_DEFINE(HAVE_FFMPEG, 1, [Define to 1 if you have ffmpeg.])
+fi
AM_CONDITIONAL(HAVE_FFMPEG, test x$with_ffmpeg = xyes)
AC_SUBST(FFMPEG_LIBS)
@@ -247,6 +260,7 @@
AC_HELP_STRING([--without-mad],
[Don't try to use MAD (MP3 Audio Decoder)]),
[with_mad=$withval])
+using_mad=no
if test "$with_mad" != "no"; then
using_mad=yes
AC_CHECK_HEADERS(mad.h,
@@ -262,6 +276,7 @@
AC_HELP_STRING([--without-lame],
[Don't try to use LAME (LAME Ain't an MP3 Encoder)]),
[with_lame=$withval])
+using_lame=no
if test "$with_lame" != "no"; then
using_lame=yes
AC_CHECK_HEADERS(lame/lame.h,,
@@ -281,6 +296,7 @@
AC_HELP_STRING([--without-amr-wb],
[Don't try to use amr-wb]),
[with_amr_wb=$withval])
+using_amr_wb=no
if test "$with_amr_wb" != "no"; then
using_amr_wb=yes
AC_CHECK_HEADER(amrwb/dec.h,
@@ -290,6 +306,9 @@
AC_MSG_FAILURE([cannot find amr-wb])
fi
fi
+if test "$using_amr_wb" = yes; then
+ AC_DEFINE(HAVE_AMR_WB, 1, [Define to 1 if you have AMR-WB.])
+fi
AM_CONDITIONAL(HAVE_AMR_WB, test x$using_amr_wb = xyes)
AC_SUBST(AMR_WB_LIBS)
@@ -298,6 +317,7 @@
AC_HELP_STRING([--without-amr-nb],
[Don't try to use amr-nb]),
[with_amr_nb=$withval])
+using_amr_nb=no
if test "$with_amr_nb" != "no"; then
using_amr_nb=yes
AC_CHECK_HEADER(amrnb/sp_dec.h,
@@ -307,6 +327,9 @@
AC_MSG_FAILURE([cannot find amr-nb])
fi
fi
+if test "$using_amr_nb" = yes; then
+ AC_DEFINE(HAVE_AMR_NB, 1, [Define to 1 if you have AMR-NB.])
+fi
AM_CONDITIONAL(HAVE_AMR_NB, test x$using_amr_nb = xyes)
AC_SUBST(AMR_NB_LIBS)
@@ -315,6 +338,7 @@
AC_HELP_STRING([--without-samplerate],
[Don't try to use libsamplerate (aka Secret Rabbit Code)]),
[with_samplerate=$withval])
+using_samplerate=no
if test "$with_samplerate" != "no"; then
using_samplerate=yes
SOX_PATH_SAMPLERATE(, using_samplerate=no)
@@ -328,7 +352,8 @@
dnl Test for LADSPA
AC_ARG_WITH(ladspa,
AC_HELP_STRING([--without-ladspa], [Don't try to use LADSPA]), [with_ladspa=$withval])
-if test "$with_ladspa" != "no"; then
+using_ladspa=no
+if test "$with_ladspa" != "no" -a "$using_libltdl" = "yes"; then
using_ladspa=yes
AC_CHECK_HEADERS(ladspa.h,, using_ladspa=no)
if test "$with_ladspa" = "yes" -a "$using_ladspa" = "no"; then
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -55,10 +55,10 @@
optional(NEED_LIBM math.h m pow "")
optional(EXTERNAL_GSM gsm/gsm.h gsm gsm_create "")
optional(HAVE_ALSA alsa/asoundlib.h asound snd_pcm_open alsa)
-optional(HAVE_LIBAMRNB amrnb/sp_dec.h amrnb Decoder_Interface_init amr-nb)
-optional(HAVE_LIBAMRWB amrwb/dec.h amrwb D_IF_init amr-wb)
+optional(HAVE_AMRNB amrnb/sp_dec.h amrnb Decoder_Interface_init amr-nb)
+optional(HAVE_AMRWB amrwb/dec.h amrwb D_IF_init amr-wb)
optional(HAVE_LIBAO ao/ao.h ao ao_play ao)
-optional(HAVE_LIBFLAC FLAC/all.h FLAC FLAC__stream_encoder_new flac)
+optional(HAVE_FLAC FLAC/all.h FLAC FLAC__stream_encoder_new flac)
optional(HAVE_MAD_H mad.h mad mad_stream_buffer mp3)
optional(HAVE_LAME_LAME_H lame/lame.h mp3lame lame_init mp3)
if (NOT HAVE_LAME_LAME_H)
@@ -75,8 +75,8 @@
if (NOT HAVE_SYS_SOUNDCARD_H)
optional(HAVE_MACHINE_SOUNDCARD_H machine/soundcard.h ossaudio _oss_ioctl oss)
endif (NOT HAVE_SYS_SOUNDCARD_H)
-optional3(HAVE_LIBVORBIS vorbis/codec.h vorbis vorbis_analysis_headerout vorbisfile ov_clear vorbisenc vorbis_encode_init_vbr vorbis)
-optional3(HAVE_LIBAVPLUGIN ffmpeg/avformat.h avformat av_open_input_file avutil av_rescale_q avcodec avcodec_encode_audio ffmpeg)
+optional3(HAVE_OGG_VORBIS vorbis/codec.h vorbis vorbis_analysis_headerout vorbisfile ov_clear vorbisenc vorbis_encode_init_vbr vorbis)
+optional3(HAVE_FFMPEG ffmpeg/avformat.h avformat av_open_input_file avutil av_rescale_q avcodec avcodec_encode_audio ffmpeg)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}config.h)
--- a/src/formats.h
+++ b/src/formats.h
@@ -44,19 +44,19 @@
#if defined HAVE_ALSA
FORMAT(alsa)
#endif
-#if defined HAVE_LIBAMRNB
+#if defined HAVE_AMRNB
FORMAT(amr_nb)
#endif
-#if defined HAVE_LIBAMRWB
+#if defined HAVE_AMRWB
FORMAT(amr_wb)
#endif
#if defined HAVE_LIBAO
FORMAT(ao)
#endif
-#if defined HAVE_LIBAVPLUGIN
+#if defined HAVE_FFMPEG
FORMAT(ffmpeg)
#endif
-#if defined HAVE_LIBFLAC
+#if defined HAVE_FLAC
FORMAT(flac)
#endif
#if defined(HAVE_MAD_H) || defined(HAVE_LAME_LAME_H)
@@ -71,6 +71,6 @@
#if defined(HAVE_SYS_AUDIOIO_H) || defined(HAVE_SUN_AUDIOIO_H)
FORMAT(sunau)
#endif
-#if defined HAVE_LIBVORBIS
+#if defined HAVE_OGG_VORBIS
FORMAT(vorbis)
#endif
--- a/src/soxconfig.h.cmake
+++ b/src/soxconfig.h.cmake
@@ -9,12 +9,12 @@
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine HAVE_IO_H 1
#cmakedefine HAVE_LAME_LAME_H 1
-#cmakedefine HAVE_LIBAMRNB 1
-#cmakedefine HAVE_LIBAMRWB 1
+#cmakedefine HAVE_AMRNB 1
+#cmakedefine HAVE_AMRWB 1
#cmakedefine HAVE_LIBAO 1
-#cmakedefine HAVE_LIBAVPLUGIN 1
-#cmakedefine HAVE_LIBFLAC 1
-#cmakedefine HAVE_LIBVORBIS 1
+#cmakedefine HAVE_FFMPEG 1
+#cmakedefine HAVE_FLAC 1
+#cmakedefine HAVE_OGG_VORBIS 1
#cmakedefine HAVE_LTDL_H 1
#cmakedefine HAVE_MACHINE_SOUNDCARD_H 1
#cmakedefine HAVE_MAD_H 1