summaryrefslogtreecommitdiff
blob: 95ed1d40469e4e8198620774a4dc3f408b6a80e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
simply trying a compile to see if a func exists is not enough

check to see if the dlvsym func exists in the dl library instead

--- configure.in
+++ configure.in
@@ -313,18 +313,8 @@ CheckALSA()
                 CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib) $ALSA_CFLAGS"
                 AC_SUBST(alsa_lib)
 
-                AC_MSG_CHECKING(for dlvsym)
                 use_dlvsym=no
-                AC_TRY_COMPILE([
-                  #include <stdio.h>
-                  #define __USE_GNU
-                  #include <dlfcn.h>
-                ],[
-                  dlvsym(NULL,"","");
-                ],[
-                use_dlvsym=yes
-                ])
-                AC_MSG_RESULT($use_dlvsym);
+                AC_CHECK_LIB(dl, dlvsym, [use_dlvsym=yes])
                 if test x$use_dlvsym = xyes; then
                     CFLAGS="$CFLAGS -DUSE_DLVSYM"
                 fi