-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure.ac
More file actions
87 lines (67 loc) · 2.27 KB
/
Copy pathconfigure.ac
File metadata and controls
87 lines (67 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
AC_PREREQ([2.68])
AC_INIT([bat],[m4_esyscmd_s(cat ./version)],[liam.r.girdwood (at) intel (dot) com])
AC_CONFIG_MACRO_DIR([m4])
# libtool versioning
BAT_MAJOR_VERSION=0
BAT_MINOR_VERSION=1
BAT_MICRO_VERSION=0
BAT_VERSION=$BAT_MAJOR_VERSION.$BAT_MINOR_VERSION.$BAT_MICRO_VERSION
AC_SUBST(BAT_MAJOR_VERSION)
AC_SUBST(BAT_MINOR_VERSION)
AC_SUBST(BAT_MICRO_VERSION)
AC_SUBST(BAT_VERSION)
LT_VERSION=$BAT_MICRO_VERSION
LT_RELEASE=$BAT_MAJOR_VERSION.$BAT_MINOR_VERSION
AC_SUBST(LT_VERSION)
AC_SUBST(LT_RELEASE)
VERSION=$BAT_VERSION
PACKAGE=BAT
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax])
# Specify a configuration file
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
dnl Initialize libtool
LT_PREREQ(2.2)
LT_INIT
dnl Initialize maintainer mode
AM_MAINTAINER_MODE([enable])
CFLAGS="-Wall"
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h pthread.h alsa/asoundlib.h tinyalsa/asoundlib.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
tinyalsa=true
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset], , [AC_MSG_ERROR([Error: need memset])])
AC_CHECK_LIB([fftw3], [fftw_malloc], , [AC_MSG_ERROR([Error: need FFTW3 library])])
AC_CHECK_LIB([m], [sqrt], , [AC_MSG_ERROR([Error: Need sqrt])])
AC_CHECK_LIB([pthread], [pthread_create], , [AC_MSG_ERROR([Error: need PTHREAD library])])
AC_CHECK_LIB([asound], [snd_pcm_open], , [AC_MSG_ERROR([Error: need ASOUND library])])
AC_CHECK_LIB([tinyalsa], [pcm_start], ,[tinyalsa=false;AC_MSG_WARN([Warning: option -t won't work - see README for how to install tinyalsa library])])
AM_CONDITIONAL([TINYALSA],[test x$tinyalsa = xtrue])
AM_COND_IF([TINYALSA],[AC_MSG_NOTICE([TINYALSA defined])],[AC_MSG_NOTICE([TINYALSA not defined])])
# Debug symbol support
AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[enable debug symbols])],
have_debug=$enableval, have_debug=no)
if test "$have_debug" = "yes"; then
AC_DEFINE(HAVE_DEBUG,1,[Define to enable debug symbols.])
CFLAGS+=" -g"
else
CFLAGS+=" -O3"
fi
AC_CONFIG_FILES([
Makefile
src/Makefile
m4/Makefile
])
AC_OUTPUT