]> git.alsa-project.org Git - alsa-lib.git/commitdiff
src/Versions.in: Add guards for opt. alisp symbols
authorNicholas Vinson <nvinson234@gmail.com>
Mon, 1 Jan 2024 21:10:47 +0000 (16:10 -0500)
committerJaroslav Kysela <perex@perex.cz>
Wed, 24 Jan 2024 17:11:52 +0000 (18:11 +0100)
Add guards for optional alisp symbols. This ensures that the Versions
file does not contain undefined symbols when building alisp support is
disabled.

Fixes Gentoo bugs 914511 (https://bugs.gentoo.org/914511),
    914643 (https://bugs.gentoo.org/914643),
    and 919417 (https://bugs.gentoo.org/919417).

Fixes bug #305
Fixes alsa_lisp symbol error reported in bug #356

Closes: https://github.com/alsa-project/alsa-lib/pull/376
Fixes: https://github.com/alsa-project/alsa-lib/issues/305
Link: https://github.com/alsa-project/alsa-lib/issues/356
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
configure.ac
src/Makefile.am
src/Versions.in.in [moved from src/Versions.in with 99% similarity]

index 9db527c3db51c504e65656a4ce7ca7f2d3ea5fcc..024e70b03201c06dabda38f6790afdcd6b385b41 100644 (file)
@@ -749,7 +749,7 @@ fi
 
 AC_CONFIG_FILES(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
                include/Makefile include/sound/Makefile include/sound/uapi/Makefile \
-               src/Versions src/Makefile \
+               src/Versions.in src/Makefile \
                src/control/Makefile src/mixer/Makefile \
                src/pcm/Makefile src/pcm/scopes/Makefile \
                src/rawmidi/Makefile src/timer/Makefile \
index df46dbc4ea6482030b2a1228ba38a3e4819bbaa1..b4a0d5d9b70ab6d743793aa9c91de364946c62e6 100644 (file)
@@ -1,10 +1,11 @@
-EXTRA_DIST=Versions
 COMPATNUM=@LIBTOOL_VERSION_INFO@
 
 if VERSIONED_SYMBOLS
 VSYMS = -Wl,--version-script=Versions
+BUILT_SOURCES = $(top_builddir)/src/Versions
 else
 VSYMS =
+BUILT_SOURCES =
 endif
 
 if SYMBOLIC_FUNCTIONS
@@ -13,6 +14,8 @@ else
 SYMFUNCS =
 endif
 
+VERSION_CPPFLAGS =
+
 lib_LTLIBRARIES = libasound.la
 libasound_la_SOURCES = conf.c confeval.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c shmarea.c userfile.c names.c
 
@@ -43,6 +46,9 @@ SUBDIRS += ucm
 libasound_la_LIBADD += ucm/libucm.la
 endif
 if BUILD_ALISP
+if VERSIONED_SYMBOLS
+VERSION_CPPFLAGS += -DHAVE_ALISP_SYMS
+endif
 SUBDIRS += alisp
 libasound_la_LIBADD += alisp/libalisp.la
 endif
@@ -51,6 +57,9 @@ libasound_la_LIBADD += @ALSA_DEPLIBS@
 
 libasound_la_LDFLAGS = -version-info $(COMPATNUM) $(VSYMS) $(SYMFUNCS) $(LDFLAGS_NOUNDEFINED)
 
+$(top_builddir)/src/Versions: $(top_builddir)/src/Versions.in
+       $(COMPILE) -E $(VERSION_CPPFLAGS) -x assembler-with-cpp -o $@ $<
+
 control/libcontrol.la:
        $(MAKE) -C control libcontrol.la
 
similarity index 99%
rename from src/Versions.in
rename to src/Versions.in.in
index c53a99fa7ab05260ef2c73e7ef16d40f474c5446..041eff085be200e43031b6a11be2ef8b754ea4ed 100644 (file)
@@ -118,15 +118,19 @@ ALSA_0.9.3 {
 } ALSA_0.9.0;
 
 ALSA_0.9.5 {
+#ifdef HAVE_ALISP_SYMS
   global:
 
     @SYMBOL_PREFIX@alsa_lisp;
+#endif
 } ALSA_0.9.3;
 
 ALSA_0.9.7 {
+#ifdef HAVE_ALISP_SYMS
   global:
 
     @SYMBOL_PREFIX@alsa_lisp_*;
+#endif
 } ALSA_0.9.5;
 
 ALSA_1.1.6 {