mirror of
https://gitee.com/openharmony/third_party_alsa-lib
synced 2024-11-22 23:20:11 +00:00
Create asoundlib.h dynamically according to configure options
Create asoundlib.h dynamically according to configure options. This avoids the inclusion of unused API headers. Also don't install unused API headers.
This commit is contained in:
parent
7f0beceb7d
commit
582cc1f098
18
configure.in
18
configure.in
@ -535,3 +535,21 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile include/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)
|
||||
|
||||
dnl Create asoundlib.h dynamically according to configure options
|
||||
echo "Creating asoundlib.h..."
|
||||
cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
|
||||
test "$build_pcm" = "yes" && echo "#include <alsa/pcm.h>" >> include/asoundlib.h
|
||||
test "$build_rawmidi" = "yes" && echo "#include <alsa/rawmidi.h>" >> include/asoundlib.h
|
||||
test "$build_pcm" = "yes" && echo "#include <alsa/timer.h>" >> include/asoundlib.h
|
||||
test "$build_hwdep" = "yes" && echo "#include <alsa/hwdep.h>" >> include/asoundlib.h
|
||||
echo "#include <alsa/control.h>" >> include/asoundlib.h
|
||||
test "$build_mixer" = "yes" && echo "#include <alsa/mixer.h>" >> include/asoundlib.h
|
||||
test "$build_seq" = "yes" && echo "#include <alsa/seq_event.h>" >> include/asoundlib.h
|
||||
test "$build_seq" = "yes" && echo "#include <alsa/seq.h>" >> include/asoundlib.h
|
||||
test "$build_seq" = "yes" && echo "#include <alsa/seqmid.h>" >> include/asoundlib.h
|
||||
test "$build_seq" = "yes" && echo "#include <alsa/seq_midi_event.h>" >> include/asoundlib.h
|
||||
test "$build_instr" = "yes" && echo "#include <alsa/conv.h>" >> include/asoundlib.h
|
||||
test "$build_instr" = "yes" && echo "#include <alsa/instr.h>" >> include/asoundlib.h
|
||||
cat "$srcdir"/include/asoundlib-tail.h >> include/asoundlib.h
|
||||
|
||||
|
@ -5,16 +5,59 @@ alsaincludedir = ${includedir}/alsa
|
||||
|
||||
alsainclude_HEADERS = asoundlib.h asoundef.h \
|
||||
version.h global.h input.h output.h error.h \
|
||||
conf.h pcm.h pcm_old.h pcm_plugin.h rawmidi.h timer.h \
|
||||
hwdep.h control.h mixer.h mixer_abst.h \
|
||||
seq_event.h seq.h seqmid.h seq_midi_event.h \
|
||||
conv.h instr.h iatomic.h \
|
||||
alisp.h pcm_external.h pcm_ioplug.h pcm_extplug.h \
|
||||
pcm_rate.h control_external.h
|
||||
conf.h control.h iatomic.h
|
||||
|
||||
noinst_HEADERS = alsa sys.h search.h list.h aserver.h local.h alsa-symbols.h
|
||||
if BUILD_CTL_PLUGIN_EXT
|
||||
alsainclude_HEADERS += control_external.h
|
||||
endif
|
||||
|
||||
CLEANFILES = stamp-vh version.h alsa
|
||||
if BUILD_PCM
|
||||
alsainclude_HEADERS += pcm.h pcm_old.h timer.h
|
||||
if BUILD_PCM_PLUGIN
|
||||
alsainclude_HEADERS += pcm_plugin.h
|
||||
endif
|
||||
if BUILD_PCM_PLUGIN_RATE
|
||||
alsainclude_HEADERS += pcm_rate.h
|
||||
endif
|
||||
if BUILD_PCM_PLUGIN_EXTPLUG
|
||||
alsainclude_HEADERS += pcm_external.h pcm_extplug.h
|
||||
endif
|
||||
if BUILD_PCM_PLUGIN_IOPLUG
|
||||
if !BUILD_PCM_PLUGIN_EXTPLUG
|
||||
alsainclude_HEADERS += pcm_external.h
|
||||
endif
|
||||
alsainclude_HEADERS += pcm_ioplug.h
|
||||
endif
|
||||
endif
|
||||
|
||||
if BUILD_RAWMIDI
|
||||
alsainclude_HEADERS += rawmidi.h
|
||||
endif
|
||||
|
||||
if BUILD_HWDEP
|
||||
alsainclude_HEADERS += hwdep.h
|
||||
endif
|
||||
|
||||
if BUILD_MIXER
|
||||
alsainclude_HEADERS += mixer.h mixer_abst.h
|
||||
endif
|
||||
|
||||
if BUILD_SEQ
|
||||
alsainclude_HEADERS += seq_event.h seq.h seqmid.h seq_midi_event.h
|
||||
endif
|
||||
|
||||
if BUILD_INSTR
|
||||
alsainclude_HEADERS += conv.h instr.h
|
||||
endif
|
||||
|
||||
if BUILD_ALISP
|
||||
alsainclude_HEADERS += alisp.h
|
||||
endif
|
||||
|
||||
noinst_HEADERS = alsa sys.h search.h list.h aserver.h local.h alsa-symbols.h \
|
||||
asoundlib-head.h asoundlib-tail.h
|
||||
|
||||
CLEANFILES = stamp-vh version.h alsa asoundlib.h
|
||||
|
||||
alsa:
|
||||
ln -s $(top_srcdir)/include alsa
|
||||
|
@ -46,17 +46,3 @@
|
||||
#include <alsa/output.h>
|
||||
#include <alsa/error.h>
|
||||
#include <alsa/conf.h>
|
||||
#include <alsa/pcm.h>
|
||||
#include <alsa/rawmidi.h>
|
||||
#include <alsa/timer.h>
|
||||
#include <alsa/hwdep.h>
|
||||
#include <alsa/control.h>
|
||||
#include <alsa/mixer.h>
|
||||
#include <alsa/seq_event.h>
|
||||
#include <alsa/seq.h>
|
||||
#include <alsa/seqmid.h>
|
||||
#include <alsa/seq_midi_event.h>
|
||||
#include <alsa/conv.h>
|
||||
#include <alsa/instr.h>
|
||||
|
||||
#endif /* __ASOUNDLIB_H */
|
2
include/asoundlib-tail.h
Normal file
2
include/asoundlib-tail.h
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
#endif /* __ASOUNDLIB_H */
|
Loading…
Reference in New Issue
Block a user