aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--configure.ac64
1 files changed, 36 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index c3d76ff2f..93952589a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,8 +13,8 @@ AC_SUBST(MAD_SUBDIR)
AC_SUBST(MAD_LIB)
AC_SUBST(ID3_SUBDIR)
AC_SUBST(ID3_LIB)
-AC_SUBST(MP4FF_SUBDIR)
AC_SUBST(MP4FF_LIB)
+AC_SUBST(MP4FF_SUBDIR)
AC_SUBST(MPD_LIBS)
AC_SUBST(MPD_CFLAGS)
@@ -22,10 +22,11 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
+AM_CONFIG_HEADER(config.h)
+
MPD_CFLAGS="-Wall"
MPD_LIBS=""
-AC_ARG_ENABLE(iconv,[ --disable-iconv disable iconv support],,enable_iconv=yes)
AC_ARG_ENABLE(ipv6,[ --disable-ipv6 disable IPv6 support],,enable_ipv6=yes)
AC_ARG_ENABLE(ogg,[ --disable-ogg disable ogg support],,enable_ogg=yes)
AC_ARG_ENABLE(flac,[ --disable-flac disable flac support],,enable_flac=yes)
@@ -44,9 +45,9 @@ AC_ARG_WITH(mad,[ --with-mad=PFX Prefix where libmad is installed (optional)]
AC_ARG_WITH(mad-libraries,[ --with-mad-libraries=DIR Directory where libmad library is installed (optional)], mad_libraries="$withval", mad_libraries="")
AC_ARG_WITH(mad-includes,[ --with-mad-includes=DIR Directory where mad header files are installed (optional)], mad_includes="$withval", mad_includes="")
-AC_ARG_WITH(faad2,[ --with-faad2=PFX Prefix where faad2 is installed], faad_prefix="$withval", faad_prefix="")
-AC_ARG_WITH(faad2-libraries,[ --with-faad-libraries=DIR Directory where faad2 library is installed (optional)], faad_libraries="$withval", faad_libraries="")
-AC_ARG_WITH(faad2-includes,[ --with-faad-includes=DIR Directory where faad2 header files are installed (optional)], faad_includes="$withval", faad_includes="")
+AC_ARG_WITH(faad,[ --with-faad=PFX Prefix where faad2 is installed], faad_prefix="$withval", faad_prefix="")
+AC_ARG_WITH(faad-libraries,[ --with-faad-libraries=DIR Directory where faad2 library is installed (optional)], faad_libraries="$withval", faad_libraries="")
+AC_ARG_WITH(faad-includes,[ --with-faad-includes=DIR Directory where faad2 header files are installed (optional)], faad_includes="$withval", faad_includes="")
AC_C_BIGENDIAN
@@ -55,20 +56,17 @@ AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
+AC_CHECK_FUNCS(strsep)
+
AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",)
AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",)
AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",)
-AC_CHECK_HEADER(langinfo.h,MPD_CFLAGS="$MPD_CFLAGS -DHAVE_LANGINFO",)
-AC_CHECK_HEADER(locale.h,MPD_CFLAGS="$MPD_CFLAGS -DHAVE_LOCALE",)
-
-if test x$enable_iconv = xyes; then
- AC_CHECK_HEADER(iconv.h,MPD_CFLAGS="$MPD_CFLAGS -DHAVE_ICONV",enable_iconv=no)
- if test x$enable_iconv = xyes; then
- AC_CHECK_LIB(iconv,iconv,MPD_LIBS="$MPD_LIBS -liconv",)
- fi
-fi
+AM_ICONV
+MPD_LIBS="$MPD_LIBS $LIBICONV"
+AM_LANGINFO_CODESET
+AM_LC_MESSAGES
if test x$enable_ipv6 = xyes; then
AC_MSG_CHECKING(for ipv6)
@@ -83,14 +81,14 @@ AP_maGiC_VALUE
#endif
#endif
],
- MPD_CFLAGS="$MPD_CFLAGS -DHAVE_IPV6"
+ AC_DEFINE(HAVE_IPV6, 1, [Define if IPv6 support present])
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
)
fi
XIPH_PATH_AO(MPD_LIBS="$MPD_LIBS $AO_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AO_CFLAGS",AC_MSG_ERROR(Must have libao installed!!!))
-AC_CHECK_HEADER(sys/soundcard.h,,[MPD_CFLAGS="$MPD_CFLAGS -DNO_OSS_MIXER";AC_MSG_WARN(Soundcard headers not found -- disabling mixer)])
+AC_CHECK_HEADER(sys/soundcard.h,,[AC_MSG_WARN(Soundcard headers not found -- disabling mixer);AC_DEFINE(NO_OSS_MIXER,1,[Define to disable OSS mixer support])])
AC_MSG_CHECKING(for alsa)
AC_EGREP_CPP([AP_maGiC_VALUE],
@@ -102,7 +100,7 @@ AP_maGiC_VALUE
#endif
#endif
],
-MPD_CFLAGS="$MPD_CFLAGS -DHAVE_ALSA"
+AC_DEFINE(HAVE_ALSA,1,[Define if alsa support is present])
MPD_LIBS="$MPD_LIBS -lasound"
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
@@ -146,12 +144,12 @@ if test x$enable_id3 = xyes; then
LIBS=$oldlibs
fi
if test x$use_mpd_id3tag = xyes; then
- MPD_CFLAGS="$MPD_CFLAGS -DUSE_MPD_ID3TAG"
+ AC_DEFINE(USE_MPD_ID3TAG,1,[Define to use mpd libid3tag])
ID3_LIB="libid3tag/libid3tag.la"
ID3_SUBDIR="libid3tag"
AC_CONFIG_SUBDIRS(src/libid3tag)
fi
- MPD_CFLAGS="$MPD_CFLAGS -DHAVE_ID3TAG"
+ AC_DEFINE(HAVE_ID3TAG,1,[Define to use id3tag])
fi
MAD_SUBDIR=""
@@ -189,12 +187,12 @@ if test x$enable_mp3 = xyes; then
LIBS=$oldlibs
fi
if test x$use_mpd_mad = xyes; then
- MPD_CFLAGS="$MPD_CFLAGS -DUSE_MPD_MAD"
+ AC_DEFINE(USE_MPD_MAD,1,[Define to use mpd libmad])
MAD_LIB="libmad/libmad.la"
MAD_SUBDIR="libmad"
AC_CONFIG_SUBDIRS(src/libmad)
fi
- MPD_CFLAGS="$MPD_CFLAGS -DHAVE_MAD"
+ AC_DEFINE(HAVE_MAD,1,[Define to use libmad])
fi
MP4FF_SUBDIR=""
@@ -208,7 +206,7 @@ if test x$enable_aac = xyes; then
FAAD_LIBS="-L$libdir"
fi
- FAAD_LIBS="$FAAD_LIBS -lfaad -lmp4v2"
+ FAAD_LIBS="$FAAD_LIBS -lfaad -lmp4v2 -lstdc++"
if test "x$faad_includes" != "x" ; then
FAAD_CFLAGS="-I$faad_includes"
@@ -220,11 +218,14 @@ if test x$enable_aac = xyes; then
oldcflags=$CFLAGS
oldlibs=$LIBS
- CFLAGS="$CFLAGS $MPD_CFLAGS $FAAD_CFLAGS"
+ CFLAGS="$CFLAGS $MPD_CFLAGS $FAAD_CFLAGS -I."
LIBS="$LIBS $MPD_LIBS $FAAD_LIBS"
AC_CHECK_HEADER(faad.h,,enable_aac=no)
if test x$enable_aac = xyes; then
- AC_CHECK_HEADER(mp4.h,,[enable_aac=no;AC_MSG_WARN(You need mp4v2 installed for AAC/MP4 decoding)])
+ AC_CHECK_HEADER(mp4.h,,[enable_aac=no;AC_MSG_WARN(
+ You need mp4v2 installed for AAC/MP4 decoding.
+ If mp4.h is present, be sure that mpeg4ip.h does not
+ include systems.h)])
fi
if test x$enable_aac = xyes; then
AC_CHECK_LIB(mp4v2, MP4Create,,[enable_aac=no;AC_MSG_WARN(You need mp4v2 installed for AAC/MP4 decoding)])
@@ -233,7 +234,10 @@ if test x$enable_aac = xyes; then
AC_CHECK_LIB(mp4v2, MP4MetadataDelete,,[enable_aac=no;AC_MSG_WARN(You need mp4v2 installed for AAC/MP4 decoding)])
fi
if test x$enable_aac = xyes; then
- AC_CHECK_LIB(faad, faacDecDecode,[MPD_LIBS="$MPD_LIBS $FAAD_LIBS";MPD_CFLAGS="$MPD_CFLAGS $FAAD_CFLAGS -DHAVE_FAAD";MP4FF_SUBDIR="mp4ff";MP4FF_LIB="mp4ff/libmp4ff.la"],enable_aac=no)
+ AC_CHECK_LIB(faad, faacDecDecode,[MPD_LIBS="$MPD_LIBS $FAAD_LIBS";MPD_CFLAGS="$MPD_CFLAGS $FAAD_CFLAGS";MP4FF_SUBDIR="mp4ff";MP4FF_LIB="mp4ff/libmp4ff.la"],enable_aac=no)
+ fi
+ if test x$enable_aac = xyes; then
+ AC_DEFINE(HAVE_FAAD,1,[Define to use FAAD2 for AAC decoding])
fi
CFLAGS=$oldcflags
LIBS=$oldlibs
@@ -299,7 +303,7 @@ dnl
fi
if test x$enable_ogg = xyes; then
- MPD_CFLAGS="$MPD_CFLAGS -DHAVE_OGG"
+ AC_DEFINE(HAVE_OGG,1,[Define for ogg vorbis support])
fi
if test x$enable_flac = xyes; then
@@ -325,14 +329,18 @@ fi
if test x$enable_flac = xyes; then
- MPD_CFLAGS="$MPD_CFLAGS -DHAVE_FLAC"
+ AC_DEFINE(HAVE_FLAC,1,[Define for FLAC support])
fi
if test x$enable_audiofile = xyes; then
- AM_PATH_AUDIOFILE(0.1.7, MPD_LIBS="$MPD_LIBS -laudiofile" MPD_CFLAGS="$MPD_CFLAGS -DHAVE_AUDIOFILE",
+ AM_PATH_AUDIOFILE(0.1.7, MPD_LIBS="$MPD_LIBS $AUDIOFILE_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AUDIOFILE_CFLAGS",
[enable_audiofile=no;AC_MSG_WARN(You need audiofile -- disabling audiofile support)])
fi
+if test x$enable_audiofile = xyes; then
+ AC_DEFINE(HAVE_AUDIOFILE,1,[Define for audiofile support])
+fi
+
AC_OUTPUT(src/mp4ff/Makefile doc/Makefile src/Makefile Makefile )
echo ""