1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- AC_INIT([audiowmark], [0.4.2])
- AC_CONFIG_SRCDIR([src/audiowmark.cc])
- AC_CONFIG_AUX_DIR([build-aux])
- AC_CONFIG_MACRO_DIR([m4])
- AC_CONFIG_HEADER([config.h])
- AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CXX
- AC_PROG_LIBTOOL
- dnl
- dnl sndfile
- dnl
- AC_DEFUN([AC_SNDFILE_REQUIREMENTS],
- [
- PKG_CHECK_MODULES(SNDFILE, [sndfile])
- AC_SUBST(SNDFILE_CFLAGS)
- AC_SUBST(SNDFILE_LIBS)
- ])
- dnl
- dnl libmpg123
- dnl
- AC_DEFUN([AC_LIBMPG123_REQUIREMENTS],
- [
- PKG_CHECK_MODULES(LIBMPG123, [libmpg123])
- AC_SUBST(LIBMPG123_CFLAGS)
- AC_SUBST(LIBMPG123_LIBS)
- ])
- dnl
- dnl zita resampler
- dnl
- AC_DEFUN([AC_ZITA_REQUIREMENTS],
- [
- AC_CHECK_LIB(zita-resampler, _Z28zita_resampler_major_versionv,[],
- [
- AC_MSG_ERROR([You need to install libzita-resampler to build this package.])
- ]
- )
- ])
- dnl ffmpeg stuff
- AC_DEFUN([AC_FFMPEG_REQUIREMENTS],
- [
- PKG_CHECK_MODULES(FFMPEG, libavcodec libavformat libavutil libswresample)
- ])
- dnl FFTW3
- AC_DEFUN([AC_FFTW_CHECK],
- [
- dnl this used to be optional, but is currently required
- PKG_CHECK_MODULES(FFTW, [fftw3f])
- SPECTMORPH_HAVE_FFTW=1
- if test $SPECTMORPH_HAVE_FFTW -gt 0; then
- fftw_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $FFTW_CFLAGS"
- AC_MSG_CHECKING([whether FFTW is recent enough])
- AC_COMPILE_IFELSE([
- AC_LANG_SOURCE([
- #include "fftw3.h"
- int x = FFTW_WISDOM_ONLY;
- ])
- ],[
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- SPECTMORPH_HAVE_FFTW=0
- ])
- fi
- CFLAGS="$fftw_save_CFLAGS"
- AC_DEFINE_UNQUOTED(SPECTMORPH_HAVE_FFTW, $SPECTMORPH_HAVE_FFTW, [Whether libfftw3 is available])
- ])
- AC_SNDFILE_REQUIREMENTS
- AC_LIBMPG123_REQUIREMENTS
- AC_FFMPEG_REQUIREMENTS
- AC_ZITA_REQUIREMENTS
- AC_FFTW_CHECK
- AM_PATH_LIBGCRYPT
- # need c++14 mode
- AX_CXX_COMPILE_STDCXX_14(ext)
- # use -Wall
- AC_LANG_PUSH([C++])
- AX_CHECK_COMPILE_FLAG([-Wall], [CXXFLAGS="$CXXFLAGS -Wall"])
- AC_LANG_POP([C++])
- AC_CONFIG_FILES([Makefile src/Makefile])
- AC_OUTPUT
|