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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT(src/control/control.c)
dnl *************************************************
dnl current:revision:age
dnl change (without API) = c:r+1:a
dnl change API = c+1:0:a
dnl add API = c+1:0:a+1
dnl remove API = c+1:0:0
dnl *************************************************
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(alsa-lib, 1.0.10rc3)
eval LIBTOOL_VERSION_INFO="2:0:0"
dnl *************************************************
AM_CONDITIONAL(INSTALL_M4, test -n "${ACLOCAL}")
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
dnl try to gues cross-compiler if not set
if test "x$target" != "x$host" -a -z "`echo $CC | grep -e '-gcc'`";
then
AC_MSG_CHECKING(for cross-compiler)
which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
which ${target_cpu}-${target_os}-gcc >/dev/null 2>&1 \
&& CC=${target_cpu}-${target-os}-gcc
which ${target_cpu}-${target_vendor}-${target_os}-gcc >/dev/null 2>&1 \
&& CC=${target_cpu}-${target_vendor}-${target_os}-gcc
AC_MSG_RESULT($CC)
fi
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_DISABLE_STATIC
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
dnl Checks for header files.
AC_HEADER_STDC
AM_CONFIG_HEADER(include/config.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNC([hsearch_r], [HAVE_HSEARCH_R=yes])
AM_CONDITIONAL(ALSA_HSEARCH_R, [test "x$HAVE_HSEARCH_R" != xyes])
SAVE_LIBRARY_VERSION
AC_SUBST(LIBTOOL_VERSION_INFO)
test "x$prefix" = xNONE && prefix=$ac_default_prefix
eval dir="$datadir"
case "$dir" in
/*) ;;
*) dir="$PWD/$dir"
esac
AC_DEFINE_UNQUOTED(DATADIR, "$dir", [directory containing ALSA configuration database])
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
eval dir="$libdir"
case "$dir" in
/*) ;;
*) dir="$PWD/$dir"
esac
AC_DEFINE_UNQUOTED(PKGLIBDIR, "$dir/$PACKAGE", [directory containing ALSA add-on modules])
dnl Check for versioned symbols
AC_MSG_CHECKING(for versioned symbols)
AC_ARG_WITH(versioned,
[ --with-versioned=yes,no shared library will (not) be compiled with versioned symbols],
versioned="$withval", versioned="yes")
if test "$versioned" = "yes"; then
# it seems that GNU ld versions since 2.10 are not broken
xres=`grep '^VERSION=' $ac_aux_dir/libtool | cut -d = -f 2`
major=`echo $xres | cut -d . -f 1`
minor=`echo $xres | cut -d . -f 2`
pass=0
if test $major -eq 1 -a $minor -gt 3; then
pass=1
else
if test $major -gt 1; then
pass=1
fi
fi
if test $pass -eq 1; then
AC_DEFINE(VERSIONED_SYMBOLS,,[compiled with versioned symbols])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(broken libtool - use libtool v1.4+; no versions)
fi
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(VERSIONED_SYMBOLS, test x$versioned = xyes)
dnl Check for debug...
AC_MSG_CHECKING(for debug)
AC_ARG_WITH(debug,
[ --with-debug=yes,no library will (not) be compiled with asserts],
debug="$withval", debug="yes")
if test "$debug" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_DEFINE(NDEBUG,,[No assert debug])
AC_MSG_RESULT(no)
fi
dnl Temporary directory
AC_MSG_CHECKING(for tmpdir)
AC_ARG_WITH(tmpdir,
[ --with-tmpdir=directory directory to put tmp socket files (/tmp)],
tmpdir="$withval", tmpdir="/tmp")
AC_MSG_RESULT($tmpdir)
AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [directory to put tmp socket files])
dnl Check for softfloat...
AC_MSG_CHECKING(for softfloat)
AC_ARG_WITH(softfloat,
[ --with-softfloat do you have floating point unit on this machine? (optional)],
[ AC_DEFINE(HAVE_SOFT_FLOAT, "1", [Avoid calculation in float])
softfloat=yes ],)
if test "$softloat" = "yes" ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl Check for architecture
AC_MSG_CHECKING(for architecture)
case "$target" in
i?86*)
AC_MSG_RESULT(x86)
;;
x86_64*)
AC_MSG_RESULT(x86)
;;
alpha*)
AC_MSG_RESULT(alpha)
;;
powerpc*|ppc*)
AC_MSG_RESULT(ppc)
CPPFLAGS="$CPPFLAGS -D__ppc__"
;;
ia64*)
AC_MSG_RESULT(ia64)
CPPFLAGS="$CPPFLAGS -D__ia64__"
;;
mips*)
AC_MSG_RESULT(mips)
CPPFLAGS="$CPPFLAGS -D__mips__"
;;
arm*)
AC_MSG_RESULT(arm)
CPPFLAGS="$CPPFLAGS -D__arm__"
;;
*)
AC_MSG_RESULT($host_cpu)
echo "No atomic operations supported.."
;;
esac
dnl Check for resmgr support...
AC_MSG_CHECKING(for resmgr support)
AC_ARG_ENABLE(resmgr,
[ --enable-resmgr support resmgr (optional)],
resmgr="$enableval", resmgr="no")
AC_MSG_RESULT($resmgr)
if test "$resmgr" = "yes"; then
AC_CHECK_LIB(resmgr, rsm_open_device,,
AC_ERROR([Cannot find libresmgr]))
AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
fi
dnl Check for aload* support...
AC_MSG_CHECKING(for aload* support)
AC_ARG_ENABLE(aload,
[ --disable-aload disable reading /dev/aload*],
aload="$enableval", aload="yes")
AC_MSG_RESULT($aload)
if test "$aload" = "yes"; then
AC_DEFINE(SUPPORT_ALOAD, "1", [Support /dev/aload* access for auto-loading])
fi
dnl Make a symlink for inclusion of alsa/xxx.h
if test ! -L include/alsa ; then
echo "Making a symlink include/alsa"
rm -f include/alsa
ln -sf . include/alsa
fi
AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile include/Makefile
include/sound/Makefile src/Makefile \
src/control/Makefile src/mixer/Makefile \
src/pcm/Makefile src/pcm/scopes/Makefile \
src/rawmidi/Makefile src/timer/Makefile \
src/hwdep/Makefile src/seq/Makefile src/instr/Makefile \
src/compat/Makefile src/alisp/Makefile src/conf/Makefile \
src/conf/cards/Makefile \
src/conf/pcm/Makefile \
modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
alsalisp/Makefile aserver/Makefile test/Makefile utils/Makefile \
utils/alsa-lib.spec utils/alsa.pc)
|