mirror of
https://gitee.com/openharmony/third_party_alsa-lib
synced 2025-02-17 07:11:00 +00: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
26
configure.ac
26
configure.ac
@ -402,20 +402,34 @@ AC_ARG_ENABLE(old-symbols,
|
||||
[keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
|
||||
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,
|
||||
AS_HELP_STRING([--disable-python], [disable the python components]),
|
||||
[build_python="$enableval"], [build_python="yes"])
|
||||
PYTHON_LIBS=""
|
||||
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,
|
||||
AS_HELP_STRING([--with-pythonlibs=ldflags],
|
||||
[specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
|
||||
pythonlibs="$withval", pythonlibs=`python-config --libs`)
|
||||
pythonlibs="$withval", pythonlibs=$pythonlibs0)
|
||||
AC_ARG_WITH(pythonincludes,
|
||||
AS_HELP_STRING([--with-pythonincludes=Cflags],
|
||||
[specify python C header files (-I/usr/include/python)]),
|
||||
pythonincludes="$withval", pythonincludes=`python-config --includes`)
|
||||
pythonincludes="$withval", pythonincludes=$pythoninc0)
|
||||
if test -z "$pythonlibs"; then
|
||||
echo "Unable to determine python libraries! Probably python-config is not"
|
||||
echo "available on this system. Please, use --with-pythonlibs and"
|
||||
@ -426,6 +440,9 @@ if test "$build_python" = "yes"; then
|
||||
PYTHON_INCLUDES="$pythonincludes"
|
||||
fi
|
||||
fi
|
||||
if test "$build_python" != "yes"; then
|
||||
build_mixer_pymodules=
|
||||
fi
|
||||
AC_SUBST(PYTHON_LIBS)
|
||||
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_TOPOLOGY], [test x$build_topology = 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
|
||||
AC_DEFINE([BUILD_MIXER], "1", [Build mixer component])
|
||||
|
28
gitcompile
28
gitcompile
@ -3,9 +3,24 @@
|
||||
set -e
|
||||
|
||||
bit32=
|
||||
if [ $# -ne 0 -a "$1" == "32" ]; then
|
||||
bit32=yes
|
||||
echo "Forced 32-bit library build..."
|
||||
modules=
|
||||
if [ $# -ne 0 ]; then
|
||||
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
|
||||
if [ $# -ne 0 -a -z "$bit32" ]; then
|
||||
args="$@"
|
||||
@ -30,7 +45,12 @@ else
|
||||
args="$args --with-plugindir=$libdir2/alsa-lib"
|
||||
args="$args --with-pkgconfdir=$libdir2/pkgconfig"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$modules" = "yes" ]; then
|
||||
args="$args --enable-mixer-modules"
|
||||
args="$args --enable-mixer-pymodules"
|
||||
fi
|
||||
|
||||
touch ltconfig
|
||||
libtoolize --force --copy --automake
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
|
@ -1,4 +1,3 @@
|
||||
if BUILD_PYTHON
|
||||
alsaplugindir = @ALSA_PLUGIN_DIR@
|
||||
pkglibdir = $(alsaplugindir)/smixer
|
||||
|
||||
@ -6,11 +5,17 @@ AM_CFLAGS = -g -O2 -W -Wall
|
||||
|
||||
AM_CPPFLAGS=-I$(top_srcdir)/include
|
||||
|
||||
pkglib_LTLIBRARIES = smixer-sbase.la \
|
||||
smixer-ac97.la \
|
||||
smixer-hda.la
|
||||
pkglib_LTLIBRARIES =
|
||||
|
||||
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
|
||||
endif
|
||||
|
||||
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_CFLAGS = $(PYTHON_INCLUDES)
|
||||
smixer_python_la_LIBADD = ../../../src/libasound.la $(PYTHON_LIBS)
|
||||
endif
|
||||
|
@ -12,7 +12,7 @@ if BUILD_ALISP
|
||||
cfg_files += sndo-mixer.alisp
|
||||
endif
|
||||
if BUILD_MODULES
|
||||
if BUILD_PYTHON
|
||||
if BUILD_MIXER_MODULES
|
||||
cfg_files += smixer.conf
|
||||
endif
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user