mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
configure.ac: build extra mixer modules conditionally
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
c051036e17
commit
fab28ba1b1
4 changed files with 56 additions and 14 deletions
26
configure.ac
26
configure.ac
|
|
@ -402,20 +402,34 @@ AC_ARG_ENABLE(old-symbols,
|
||||||
[keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
|
[keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
|
||||||
AM_CONDITIONAL([KEEP_OLD_SYMBOLS], [test x$keep_old_symbols = xyes])
|
AM_CONDITIONAL([KEEP_OLD_SYMBOLS], [test x$keep_old_symbols = xyes])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(mixer-modules,
|
||||||
|
AS_HELP_STRING([--enable-mixer-modules], [enable the additional mixer modules (experimental)]),
|
||||||
|
[build_mixer_modules="$enableval"], [build_mixer_modules="no"])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(mixer-pymods,
|
||||||
|
AS_HELP_STRING([--enable-mixer-pymods], [enable the mixer python modules (experimental)]),
|
||||||
|
[build_mixer_pymodules="$enableval"], [build_mixer_pymodules="no"])
|
||||||
|
|
||||||
AC_ARG_ENABLE(python,
|
AC_ARG_ENABLE(python,
|
||||||
AS_HELP_STRING([--disable-python], [disable the python components]),
|
AS_HELP_STRING([--disable-python], [disable the python components]),
|
||||||
[build_python="$enableval"], [build_python="yes"])
|
[build_python="$enableval"], [build_python="yes"])
|
||||||
PYTHON_LIBS=""
|
PYTHON_LIBS=""
|
||||||
PYTHON_INCLUDES=""
|
PYTHON_INCLUDES=""
|
||||||
if test "$build_python" = "yes"; then
|
if test "$build_python" = "yes" -a "$build_mixer_pymodules" = "yes"; then
|
||||||
|
pythonlibs0=$(python3-config --libs)
|
||||||
|
pythoninc0=$(python3-config --includes)
|
||||||
|
if test -z "$pythonlibs0"; then
|
||||||
|
pythonlibs0=$(python-config --libs)
|
||||||
|
pythoninc0=$(python-config --includes)
|
||||||
|
fi
|
||||||
AC_ARG_WITH(pythonlibs,
|
AC_ARG_WITH(pythonlibs,
|
||||||
AS_HELP_STRING([--with-pythonlibs=ldflags],
|
AS_HELP_STRING([--with-pythonlibs=ldflags],
|
||||||
[specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
|
[specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
|
||||||
pythonlibs="$withval", pythonlibs=`python-config --libs`)
|
pythonlibs="$withval", pythonlibs=$pythonlibs0)
|
||||||
AC_ARG_WITH(pythonincludes,
|
AC_ARG_WITH(pythonincludes,
|
||||||
AS_HELP_STRING([--with-pythonincludes=Cflags],
|
AS_HELP_STRING([--with-pythonincludes=Cflags],
|
||||||
[specify python C header files (-I/usr/include/python)]),
|
[specify python C header files (-I/usr/include/python)]),
|
||||||
pythonincludes="$withval", pythonincludes=`python-config --includes`)
|
pythonincludes="$withval", pythonincludes=$pythoninc0)
|
||||||
if test -z "$pythonlibs"; then
|
if test -z "$pythonlibs"; then
|
||||||
echo "Unable to determine python libraries! Probably python-config is not"
|
echo "Unable to determine python libraries! Probably python-config is not"
|
||||||
echo "available on this system. Please, use --with-pythonlibs and"
|
echo "available on this system. Please, use --with-pythonlibs and"
|
||||||
|
|
@ -426,6 +440,9 @@ if test "$build_python" = "yes"; then
|
||||||
PYTHON_INCLUDES="$pythonincludes"
|
PYTHON_INCLUDES="$pythonincludes"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if test "$build_python" != "yes"; then
|
||||||
|
build_mixer_pymodules=
|
||||||
|
fi
|
||||||
AC_SUBST(PYTHON_LIBS)
|
AC_SUBST(PYTHON_LIBS)
|
||||||
AC_SUBST(PYTHON_INCLUDES)
|
AC_SUBST(PYTHON_INCLUDES)
|
||||||
|
|
||||||
|
|
@ -437,7 +454,8 @@ AM_CONDITIONAL([BUILD_SEQ], [test x$build_seq = xyes])
|
||||||
AM_CONDITIONAL([BUILD_UCM], [test x$build_ucm = xyes])
|
AM_CONDITIONAL([BUILD_UCM], [test x$build_ucm = xyes])
|
||||||
AM_CONDITIONAL([BUILD_TOPOLOGY], [test x$build_topology = xyes])
|
AM_CONDITIONAL([BUILD_TOPOLOGY], [test x$build_topology = xyes])
|
||||||
AM_CONDITIONAL([BUILD_ALISP], [test x$build_alisp = xyes])
|
AM_CONDITIONAL([BUILD_ALISP], [test x$build_alisp = xyes])
|
||||||
AM_CONDITIONAL([BUILD_PYTHON], [test x$build_python = xyes])
|
AM_CONDITIONAL([BUILD_MIXER_MODULES], [test x$build_mixer_modules = xyes])
|
||||||
|
AM_CONDITIONAL([BUILD_MIXER_PYMODULES], [test x$build_mixer_pymodules = xyes])
|
||||||
|
|
||||||
if test "$build_mixer" = "yes"; then
|
if test "$build_mixer" = "yes"; then
|
||||||
AC_DEFINE([BUILD_MIXER], "1", [Build mixer component])
|
AC_DEFINE([BUILD_MIXER], "1", [Build mixer component])
|
||||||
|
|
|
||||||
28
gitcompile
28
gitcompile
|
|
@ -3,9 +3,24 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
bit32=
|
bit32=
|
||||||
if [ $# -ne 0 -a "$1" == "32" ]; then
|
modules=
|
||||||
bit32=yes
|
if [ $# -ne 0 ]; then
|
||||||
echo "Forced 32-bit library build..."
|
endloop=
|
||||||
|
while [ -z "$endloop" ]; do
|
||||||
|
case "$1" in
|
||||||
|
32)
|
||||||
|
bits32=yes
|
||||||
|
echo "Forced 32-bit library build..."
|
||||||
|
shift ;;
|
||||||
|
modules)
|
||||||
|
modules=yes
|
||||||
|
echo "Forced mixer modules build..."
|
||||||
|
shift ;;
|
||||||
|
*)
|
||||||
|
endloop=yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
if [ $# -ne 0 -a -z "$bit32" ]; then
|
if [ $# -ne 0 -a -z "$bit32" ]; then
|
||||||
args="$@"
|
args="$@"
|
||||||
|
|
@ -30,7 +45,12 @@ else
|
||||||
args="$args --with-plugindir=$libdir2/alsa-lib"
|
args="$args --with-plugindir=$libdir2/alsa-lib"
|
||||||
args="$args --with-pkgconfdir=$libdir2/pkgconfig"
|
args="$args --with-pkgconfdir=$libdir2/pkgconfig"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$modules" = "yes" ]; then
|
||||||
|
args="$args --enable-mixer-modules"
|
||||||
|
args="$args --enable-mixer-pymodules"
|
||||||
|
fi
|
||||||
|
|
||||||
touch ltconfig
|
touch ltconfig
|
||||||
libtoolize --force --copy --automake
|
libtoolize --force --copy --automake
|
||||||
aclocal $ACLOCAL_FLAGS
|
aclocal $ACLOCAL_FLAGS
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
if BUILD_PYTHON
|
|
||||||
alsaplugindir = @ALSA_PLUGIN_DIR@
|
alsaplugindir = @ALSA_PLUGIN_DIR@
|
||||||
pkglibdir = $(alsaplugindir)/smixer
|
pkglibdir = $(alsaplugindir)/smixer
|
||||||
|
|
||||||
|
|
@ -6,11 +5,17 @@ AM_CFLAGS = -g -O2 -W -Wall
|
||||||
|
|
||||||
AM_CPPFLAGS=-I$(top_srcdir)/include
|
AM_CPPFLAGS=-I$(top_srcdir)/include
|
||||||
|
|
||||||
pkglib_LTLIBRARIES = smixer-sbase.la \
|
pkglib_LTLIBRARIES =
|
||||||
smixer-ac97.la \
|
|
||||||
smixer-hda.la
|
|
||||||
|
|
||||||
|
if BUILD_MIXER_MODULES
|
||||||
|
pkglib_LTLIBRARIES += smixer-sbase.la \
|
||||||
|
smixer-ac97.la \
|
||||||
|
smixer-hda.la
|
||||||
|
endif
|
||||||
|
|
||||||
|
if BUILD_MIXER_PYMODULES
|
||||||
pkglib_LTLIBRARIES += smixer-python.la
|
pkglib_LTLIBRARIES += smixer-python.la
|
||||||
|
endif
|
||||||
|
|
||||||
noinst_HEADERS = sbase.h
|
noinst_HEADERS = sbase.h
|
||||||
|
|
||||||
|
|
@ -30,4 +35,3 @@ smixer_python_la_SOURCES = python.c
|
||||||
smixer_python_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
|
smixer_python_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
|
||||||
smixer_python_la_CFLAGS = $(PYTHON_INCLUDES)
|
smixer_python_la_CFLAGS = $(PYTHON_INCLUDES)
|
||||||
smixer_python_la_LIBADD = ../../../src/libasound.la $(PYTHON_LIBS)
|
smixer_python_la_LIBADD = ../../../src/libasound.la $(PYTHON_LIBS)
|
||||||
endif
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ if BUILD_ALISP
|
||||||
cfg_files += sndo-mixer.alisp
|
cfg_files += sndo-mixer.alisp
|
||||||
endif
|
endif
|
||||||
if BUILD_MODULES
|
if BUILD_MODULES
|
||||||
if BUILD_PYTHON
|
if BUILD_MIXER_MODULES
|
||||||
cfg_files += smixer.conf
|
cfg_files += smixer.conf
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue