2011-05-20 17:16:52 +02:00
|
|
|
AC_PREREQ([2.64])
|
2016-04-23 20:22:32 +02:00
|
|
|
AC_INIT([minimodem], [0.24], [kamal@whence.com])
|
2011-05-20 17:16:52 +02:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2015-12-22 19:01:22 +01:00
|
|
|
AC_CONFIG_SRCDIR([src/Makefile.in])
|
|
|
|
AM_INIT_AUTOMAKE
|
2011-05-20 17:16:52 +02:00
|
|
|
|
2016-02-19 22:04:17 +01:00
|
|
|
VERSION=AC_PACKAGE_VERSION
|
2015-12-22 19:01:22 +01:00
|
|
|
AC_SUBST(VERSION)
|
2011-05-20 17:16:52 +02:00
|
|
|
|
2015-12-22 19:01:22 +01:00
|
|
|
# Program Checks
|
2011-05-20 17:16:52 +02:00
|
|
|
AC_PROG_CC
|
|
|
|
|
2015-12-22 19:01:05 +01:00
|
|
|
# Library Checks
|
|
|
|
AC_SEARCH_LIBS([lroundf], [m])
|
2012-08-06 22:14:26 +02:00
|
|
|
|
2015-12-22 19:01:05 +01:00
|
|
|
deps_packages="fftw3f"
|
2012-08-06 22:14:26 +02:00
|
|
|
|
2012-08-08 23:26:39 +02:00
|
|
|
# ALSA
|
2015-12-22 19:01:05 +01:00
|
|
|
AC_ARG_WITH([alsa], [AS_HELP_STRING([--without-alsa],
|
|
|
|
[build without ALSA support])])
|
|
|
|
AS_IF([test "x$with_alsa" == "xno"], [
|
|
|
|
use_alsa=0
|
|
|
|
], [
|
|
|
|
use_alsa=1
|
|
|
|
deps_packages="$deps_packages alsa"
|
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED([USE_ALSA], [$use_alsa],
|
|
|
|
[Define to 1 to enable ALSA support])
|
2012-08-08 23:26:39 +02:00
|
|
|
|
2012-08-06 22:14:26 +02:00
|
|
|
# pulseaudio
|
2015-12-22 19:01:05 +01:00
|
|
|
AC_ARG_WITH([pulseaudio], AS_HELP_STRING([--without-pulseaudio],
|
|
|
|
[build without pulseaudio support]))
|
|
|
|
AS_IF([test "x$with_pulseaudio" == "xno"], [
|
2015-12-22 19:01:22 +01:00
|
|
|
use_pulseaudio=0
|
2015-12-22 19:01:05 +01:00
|
|
|
], [
|
2015-12-22 19:01:22 +01:00
|
|
|
use_pulseaudio=1
|
|
|
|
deps_packages="$deps_packages libpulse-simple"
|
2015-12-22 19:01:05 +01:00
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED([USE_PULSEAUDIO], [$use_pulseaudio],
|
|
|
|
[Define to 1 to enable pulseaudio support])
|
2012-08-06 22:14:26 +02:00
|
|
|
|
|
|
|
# sndfile
|
2015-12-22 19:01:05 +01:00
|
|
|
AC_ARG_WITH([sndfile], AS_HELP_STRING([--without-sndfile],
|
|
|
|
[build without sndfile support]))
|
|
|
|
AS_IF([test "x$with_sndfile" == "xno"], [
|
2015-12-22 19:01:22 +01:00
|
|
|
use_sndfile=0
|
2015-12-22 19:01:05 +01:00
|
|
|
], [
|
|
|
|
use_sndfile=1
|
2015-12-22 19:01:22 +01:00
|
|
|
deps_packages="$deps_packages sndfile"
|
2015-12-22 19:01:05 +01:00
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED([USE_SNDFILE], [$use_sndfile],
|
|
|
|
[Define to 1 to enable sndfile support])
|
2012-08-06 22:14:26 +02:00
|
|
|
|
2012-08-14 00:50:04 +02:00
|
|
|
# benchmarks
|
2015-12-22 19:01:05 +01:00
|
|
|
AC_ARG_WITH([benchmarks], AS_HELP_STRING([--disable-benchmarks],
|
|
|
|
[build without internal benchmarks]))
|
|
|
|
AS_IF([test "x$with_benchmarks" == "xno"], [
|
2015-12-22 19:01:22 +01:00
|
|
|
use_benchmarks=0
|
2015-12-22 19:01:05 +01:00
|
|
|
], [
|
2015-12-22 19:01:22 +01:00
|
|
|
use_benchmarks=1
|
2015-12-22 19:01:05 +01:00
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED([USE_BENCHMARKS], [$use_benchmarks],
|
|
|
|
[Define to 1 to enable internal benchmarks])
|
2012-08-19 22:16:13 +02:00
|
|
|
|
|
|
|
AC_MSG_RESULT([
|
2015-12-22 19:01:22 +01:00
|
|
|
option summary:
|
|
|
|
alsa $with_alsa ($use_alsa)
|
|
|
|
benchmarks $with_benchmarks ($use_benchmarks)
|
|
|
|
pulseaudio $with_pulseaudio ($use_pulseaudio)
|
|
|
|
sndfile $with_sndfile ($use_sndfile)
|
2012-08-19 22:16:13 +02:00
|
|
|
])
|
|
|
|
|
2011-05-20 17:16:52 +02:00
|
|
|
# Checks for libraries.
|
2015-12-22 19:01:22 +01:00
|
|
|
PKG_CHECK_MODULES(DEPS, [$deps_packages])
|
2011-05-20 17:16:52 +02:00
|
|
|
|
2014-11-09 19:34:00 +01:00
|
|
|
AC_SUBST([auto_find_tests], ['$(sort $(wildcard *.test))'])
|
|
|
|
|
2015-12-22 19:01:22 +01:00
|
|
|
AC_CONFIG_FILES([Makefile src/Makefile src/minimodem.1 tests/Makefile])
|
2011-05-20 17:16:52 +02:00
|
|
|
AC_OUTPUT
|