Fix dlvsym() detection in the configure script.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 08 Sep 2005 06:43:51 +0000
changeset 1136d16c010d5d98
parent 1135 cf6133247d34
child 1137 0f9d463bf09c
Fix dlvsym() detection in the configure script.

--ryan.


From: Mike Frysinger <vapier@gentoo.org>
To: sdl@libsdl.org
Subject: Re: [SDL] sdl, sdl-mixer not compiling with uclibc
Date: Wed, 7 Sep 2005 19:17:49 -0400

in this case actually, the error is in libsdl

the configure check for dlvsym presence is pretty pointless, it currently
always detects it

AC_TRY_COMPILE([
#include <stdio.h>
#define __USE_GNU
#include <dlfcn.h>
],[
dlvsym(NULL,"","");
],[
use_dlvsym=yes
])

since it's merely compiling, the warning about dlvsym being implicitly
declared doesnt trigger a failure

find attached a patch to fix this
-mike
configure.in
     1.1 --- a/configure.in	Thu Sep 08 06:34:28 2005 +0000
     1.2 +++ b/configure.in	Thu Sep 08 06:43:51 2005 +0000
     1.3 @@ -313,18 +313,8 @@
     1.4                  CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib) $ALSA_CFLAGS"
     1.5                  AC_SUBST(alsa_lib)
     1.6  
     1.7 -                AC_MSG_CHECKING(for dlvsym)
     1.8                  use_dlvsym=no
     1.9 -                AC_TRY_COMPILE([
    1.10 -                  #include <stdio.h>
    1.11 -                  #define __USE_GNU
    1.12 -                  #include <dlfcn.h>
    1.13 -                ],[
    1.14 -                  dlvsym(NULL,"","");
    1.15 -                ],[
    1.16 -                use_dlvsym=yes
    1.17 -                ])
    1.18 -                AC_MSG_RESULT($use_dlvsym);
    1.19 +                AC_CHECK_LIB(dl, dlvsym, [use_dlvsym=yes])
    1.20                  if test x$use_dlvsym = xyes; then
    1.21                      CFLAGS="$CFLAGS -DUSE_DLVSYM"
    1.22                  fi