Codebase list alsa-lib / 178fe66
utils/alsa.m4: conditionally enable libdl in AM_PATH_ALSA m4 macro The AM_PATH_ALSA macro in utils/alsa.m4 unconditionally uses -ldl. This breaks compilation of alsa-utils (and probably other packages using this macro) for targets that do not support dynamic loading. This patch updates the macro to check if dlopen is available, and use that result to conditionally add -ldl to the list of libraries. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Thomas De Schampheleire authored 5 years ago Takashi Iwai committed 5 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4343 fi
4444 AC_MSG_RESULT($ALSA_CFLAGS)
4545
46 AC_CHECK_LIB(c, dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
47
4648 dnl add any special lib dirs
4749 AC_MSG_CHECKING(for ALSA LDFLAGS)
4850 if test "$alsa_prefix" != "" ; then
5153 fi
5254
5355 dnl add the alsa library
54 ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
56 ALSA_LIBS="$ALSA_LIBS -lasound -lm $LIBDL -lpthread"
5557 LIBS="$ALSA_LIBS $LIBS"
5658 AC_MSG_RESULT($ALSA_LIBS)
5759