[vlc-commits] [Git][videolan/vlc][master] 2 commits: sndio: missing library check

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sun Jan 23 15:48:21 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
0c482e07 by Rémi Denis-Courmont at 2022-01-23T14:19:40+02:00
sndio: missing library check

Traditionally the presence of the header file was not considered
sufficient, though this was somewhat forgotten with the prevalence of
pkg-config.

However most libraries have portable headers, while the shared library
is platform-dependent. It is common for the header to be present while
the library is absent with "multilib" installations (i.e. Linux
installation with multiple architectures).

- - - - -
4ab41404 by Rémi Denis-Courmont at 2022-01-23T14:19:41+02:00
opengl: missing library check

Traditionally the presence of the header file was not considered
sufficient, though this was somewhat forgotten with the prevalence of
pkg-config.

However most libraries have portable headers, while the shared library
is platform-dependent. It is common for the header to be present while
the library is absent with "multilib" installations (i.e. Linux
installation with multiple architectures).

- - - - -


1 changed file:

- configure.ac


Changes:

=====================================
configure.ac
=====================================
@@ -3169,7 +3169,6 @@ have_gl="no"
 PKG_CHECK_MODULES([GL], [gl], [
   have_gl="yes"
 ], [
-  AC_MSG_CHECKING([for OpenGL])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #ifdef _WIN32
 # include <GL/glew.h>
@@ -3179,13 +3178,17 @@ PKG_CHECK_MODULES([GL], [gl], [
     [int t0 = GL_TEXTURE0;]])
   ], [
     GL_CFLAGS=""
-    have_gl="yes"
     AS_IF([test "${SYS}" != "mingw32"], [
-      GL_LIBS="-lGL"
+      AC_CHECK_LIB([GL], [glTexture2D], [
+        have_gl="yes"
+        GL_LIBS="-lGL"
+      ])
     ], [
+      have_gl="yes"
       GL_LIBS="-lopengl32"
     ])
   ])
+  AC_MSG_CHECKING([for OpenGL])
   AC_MSG_RESULT([${have_gl}])
 ])
 AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
@@ -3718,7 +3721,9 @@ AC_ARG_ENABLE([sndio],
 have_sndio="no"
 AS_IF([test "$enable_sndio" != "no"], [
   AC_CHECK_HEADER([sndio.h], [
-    have_sndio="yes"
+    AC_CHECK_LIB([sndio], [sio_open], [
+      have_sndio="yes"
+    ])
   ])
 ])
 AM_CONDITIONAL([HAVE_SNDIO], [test "${have_sndio}" = "yes"])



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d7b89a1681e37c756d2ad4ab7107d9d1f8fe154e...4ab41404cb85684125d73977cadebf83bbc246f5

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d7b89a1681e37c756d2ad4ab7107d9d1f8fe154e...4ab41404cb85684125d73977cadebf83bbc246f5
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list