forked from nxp-imx/imx-alsa-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
97 lines (83 loc) · 2.38 KB
/
configure.in
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
AC_PREREQ(2.59)
AC_INIT(asrc/rate_asrcrate.c)
AM_INIT_AUTOMAKE(imx-alsa-plugins, 1.0.26)
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_PROG_INSTALL
AC_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_HEADER_STDC
CC_NOUNDEFINED
PKG_CHECK_MODULES(ALSA, alsa >= 1.0.11)
AC_CHECK_LIB(asound, snd_pcm_ioplug_create,,
AC_ERROR([*** libasound has no external plugin SDK]), -ldl)
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
dnl ALSA plugin directory
AC_ARG_WITH(plugindir,
AS_HELP_STRING([--with-plugindir=dir],
[path where ALSA plugin files are stored]),
plugindir="$withval", plugindir="")
if test -z "$plugindir"; then
eval dir="$libdir"
case "$dir" in
/*) ;;
*) dir="$dir"
esac
plugindir="$dir/alsa-lib"
fi
AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "$plugindir", [directory containing ALSA add-on modules])
ALSA_PLUGIN_DIR="$plugindir"
AC_SUBST(ALSA_PLUGIN_DIR)
dnl ALSA data directory
AC_ARG_WITH(alsadatadir,
AS_HELP_STRING([--with-alsadatadir=dir],
[path where ALSA data files are stored]),
alsadatadir="$withval", alsadatadir="")
if test -z "$alsadatadir"; then
eval dir="$datadir"
case "$dir" in
/*) ;;
*) dir="$dir"
esac
alsadatadir="$dir/alsa"
fi
AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA data files])
ALSA_DATA_DIR="$alsadatadir"
AC_SUBST(ALSA_DATA_DIR)
AC_CHECK_HEADERS([linux/mxc_asrc.h], [HAVE_ASRC_HEAD=yes], [HAVE_ASRC_HEAD=no])
if test "x$HAVE_ASRC_HEAD" = "xno"; then
asrchead=`find /usr/src/ -name mxc_asrc.h | grep "/linux/mxc_asrc.h" | head -n 1 | sed -e 's,/linux/mxc_asrc.h,,'`
if test "x$asrchead" != "x"; then
ASRC_CFLAGS=-I$asrchead
fi
fi
AC_SUBST(ASRC_CFLAGS)
SAVE_PLUGINS_VERSION
AC_DEFUN([CHECK_CODEC_ENABLE],
[
AC_ARG_ENABLE($1,
[AS_HELP_STRING([--enable-[$1]], [$2])],
[use_[$1]=$enableval],
[use_[$1]="no"])
if test "$use_[$1]" = "yes"; then
AM_CONDITIONAL(FSL_USE_[$3], true)
echo -e "\nEnable [$3] option"
else
AM_CONDITIONAL(FSL_USE_[$3], false)
fi
])
CHECK_CODEC_ENABLE([swpdm], [enable swpdm], [SWPDM])
AC_OUTPUT([
Makefile
asrc/Makefile
swpdm/Makefile
doc/Makefile
])
dnl Show the build conditions
echo
echo "Plugin directory: $ALSA_PLUGIN_DIR"
echo "ALSA_CFLAGS: $ALSA_CFLAGS"
echo "ALSA_LIBS: $ALSA_LIBS"