logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git

0001-autotools-Lazily-change-libGL-to-libOpenGL.patch (16480B)


  1. From 6eac68a48b8aacbc2025397df0d9f40ac8ff79a4 Mon Sep 17 00:00:00 2001
  2. From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
  3. Date: Tue, 9 Mar 2021 06:37:22 +0100
  4. Subject: [PATCH] autotools: Lazily change libGL to libOpenGL
  5. Correct way would be to check for libGL first and then try libOpenGL.
  6. ---
  7. configure | 98 +++++++++++++++++------------------
  8. configure.ac | 10 ++--
  9. dlls/winewayland.drv/opengl.c | 4 +-
  10. dlls/winex11.drv/opengl.c | 6 +--
  11. include/config.h.in | 6 +--
  12. 5 files changed, 62 insertions(+), 62 deletions(-)
  13. diff --git a/configure b/configure
  14. index 8648f515f7d..b4fd183e728 100755
  15. --- a/configure
  16. +++ b/configure
  17. @@ -7000,7 +7000,7 @@ else
  18. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  19. since some C++ compilers masquerading as C compilers
  20. incorrectly reject 9223372036854775807. */
  21. -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
  22. +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  23. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  24. && LARGE_OFF_T % 2147483647 == 1)
  25. ? 1 : -1];
  26. @@ -7046,7 +7046,7 @@ else
  27. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  28. since some C++ compilers masquerading as C compilers
  29. incorrectly reject 9223372036854775807. */
  30. -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
  31. +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  32. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  33. && LARGE_OFF_T % 2147483647 == 1)
  34. ? 1 : -1];
  35. @@ -7070,7 +7070,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  36. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  37. since some C++ compilers masquerading as C compilers
  38. incorrectly reject 9223372036854775807. */
  39. -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
  40. +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  41. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  42. && LARGE_OFF_T % 2147483647 == 1)
  43. ? 1 : -1];
  44. @@ -7115,7 +7115,7 @@ else
  45. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  46. since some C++ compilers masquerading as C compilers
  47. incorrectly reject 9223372036854775807. */
  48. -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
  49. +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  50. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  51. && LARGE_OFF_T % 2147483647 == 1)
  52. ? 1 : -1];
  53. @@ -7139,7 +7139,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  54. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  55. since some C++ compilers masquerading as C compilers
  56. incorrectly reject 9223372036854775807. */
  57. -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
  58. +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  59. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  60. && LARGE_OFF_T % 2147483647 == 1)
  61. ? 1 : -1];
  62. @@ -12549,13 +12549,13 @@ fi
  63. opengl_msg=""
  64. if test "x$with_opengl" != "xno"
  65. then
  66. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lGL" >&5
  67. -$as_echo_n "checking for -lGL... " >&6; }
  68. -if ${ac_cv_lib_soname_GL+:} false; then :
  69. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lOpenGL" >&5
  70. +$as_echo_n "checking for -lOpenGL... " >&6; }
  71. +if ${ac_cv_lib_soname_OpenGL+:} false; then :
  72. $as_echo_n "(cached) " >&6
  73. else
  74. ac_check_soname_save_LIBS=$LIBS
  75. -LIBS="-lGL $X_LIBS -lm $X_EXTRA_LIBS $LIBS"
  76. +LIBS="-lOpenGL $X_LIBS -lm $X_EXTRA_LIBS $LIBS"
  77. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  78. /* end confdefs.h. */
  79. @@ -12576,30 +12576,30 @@ return glXCreateContext ();
  80. _ACEOF
  81. if ac_fn_c_try_link "$LINENO"; then :
  82. case "$LIBEXT" in
  83. - dll) ac_cv_lib_soname_GL=`$ac_cv_path_LDD conftest.exe | grep "GL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
  84. - dylib) ac_cv_lib_soname_GL=`$OTOOL -L conftest$ac_exeext | grep "libGL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libGL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
  85. - *) ac_cv_lib_soname_GL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libGL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libGL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
  86. - if ${ac_cv_lib_soname_GL:+false} :; then :
  87. - ac_cv_lib_soname_GL=`$LDD conftest$ac_exeext | grep "libGL\\.$LIBEXT" | sed -e "s/^.*\(libGL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
  88. + dll) ac_cv_lib_soname_OpenGL=`$ac_cv_path_LDD conftest.exe | grep "OpenGL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
  89. + dylib) ac_cv_lib_soname_OpenGL=`$OTOOL -L conftest$ac_exeext | grep "libOpenGL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libOpenGL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
  90. + *) ac_cv_lib_soname_OpenGL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libOpenGL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libOpenGL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
  91. + if ${ac_cv_lib_soname_OpenGL:+false} :; then :
  92. + ac_cv_lib_soname_OpenGL=`$LDD conftest$ac_exeext | grep "libOpenGL\\.$LIBEXT" | sed -e "s/^.*\(libOpenGL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
  93. fi ;;
  94. esac
  95. else
  96. - ac_cv_lib_soname_GL=
  97. + ac_cv_lib_soname_OpenGL=
  98. fi
  99. rm -f core conftest.err conftest.$ac_objext \
  100. conftest$ac_exeext conftest.$ac_ext
  101. LIBS=$ac_check_soname_save_LIBS
  102. fi
  103. -if ${ac_cv_lib_soname_GL:+false} :; then :
  104. +if ${ac_cv_lib_soname_OpenGL:+false} :; then :
  105. { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
  106. $as_echo "not found" >&6; }
  107. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lGL" >&5
  108. -$as_echo_n "checking for -lGL... " >&6; }
  109. -if ${ac_cv_lib_soname_GL+:} false; then :
  110. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lOpenGL" >&5
  111. +$as_echo_n "checking for -lOpenGL... " >&6; }
  112. +if ${ac_cv_lib_soname_OpenGL+:} false; then :
  113. $as_echo_n "(cached) " >&6
  114. else
  115. ac_check_soname_save_LIBS=$LIBS
  116. -LIBS="-lGL $X_LIBS -lm $X_EXTRA_LIBS -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib $LIBS"
  117. +LIBS="-lOpenGL $X_LIBS -lm $X_EXTRA_LIBS -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib $LIBS"
  118. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  119. /* end confdefs.h. */
  120. @@ -12620,21 +12620,21 @@ return glXCreateContext ();
  121. _ACEOF
  122. if ac_fn_c_try_link "$LINENO"; then :
  123. case "$LIBEXT" in
  124. - dll) ac_cv_lib_soname_GL=`$ac_cv_path_LDD conftest.exe | grep "GL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
  125. - dylib) ac_cv_lib_soname_GL=`$OTOOL -L conftest$ac_exeext | grep "libGL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libGL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
  126. - *) ac_cv_lib_soname_GL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libGL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libGL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
  127. - if ${ac_cv_lib_soname_GL:+false} :; then :
  128. - ac_cv_lib_soname_GL=`$LDD conftest$ac_exeext | grep "libGL\\.$LIBEXT" | sed -e "s/^.*\(libGL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
  129. + dll) ac_cv_lib_soname_OpenGL=`$ac_cv_path_LDD conftest.exe | grep "OpenGL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
  130. + dylib) ac_cv_lib_soname_OpenGL=`$OTOOL -L conftest$ac_exeext | grep "libOpenGL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libOpenGL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
  131. + *) ac_cv_lib_soname_OpenGL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libOpenGL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libOpenGL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
  132. + if ${ac_cv_lib_soname_OpenGL:+false} :; then :
  133. + ac_cv_lib_soname_OpenGL=`$LDD conftest$ac_exeext | grep "libOpenGL\\.$LIBEXT" | sed -e "s/^.*\(libOpenGL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
  134. fi ;;
  135. esac
  136. else
  137. - ac_cv_lib_soname_GL=
  138. + ac_cv_lib_soname_OpenGL=
  139. fi
  140. rm -f core conftest.err conftest.$ac_objext \
  141. conftest$ac_exeext conftest.$ac_ext
  142. LIBS=$ac_check_soname_save_LIBS
  143. fi
  144. -if ${ac_cv_lib_soname_GL:+false} :; then :
  145. +if ${ac_cv_lib_soname_OpenGL:+false} :; then :
  146. { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
  147. $as_echo "not found" >&6; }
  148. if test -f /usr/X11R6/lib/libGL.a
  149. @@ -12645,24 +12645,24 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
  150. opengl_msg="No OpenGL library found on this system."
  151. fi
  152. else
  153. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_GL" >&5
  154. -$as_echo "$ac_cv_lib_soname_GL" >&6; }
  155. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_OpenGL" >&5
  156. +$as_echo "$ac_cv_lib_soname_OpenGL" >&6; }
  157. cat >>confdefs.h <<_ACEOF
  158. -#define SONAME_LIBGL "$ac_cv_lib_soname_GL"
  159. +#define SONAME_LIBOPENGL "$ac_cv_lib_soname_OpenGL"
  160. _ACEOF
  161. - OPENGL_LIBS="-Xlinker -dylib_file -Xlinker /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -lGL"
  162. + OPENGL_LIBS="-Xlinker -dylib_file -Xlinker /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -lOpenGL"
  163. fi
  164. else
  165. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_GL" >&5
  166. -$as_echo "$ac_cv_lib_soname_GL" >&6; }
  167. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_OpenGL" >&5
  168. +$as_echo "$ac_cv_lib_soname_OpenGL" >&6; }
  169. cat >>confdefs.h <<_ACEOF
  170. -#define SONAME_LIBGL "$ac_cv_lib_soname_GL"
  171. +#define SONAME_LIBOPENGL "$ac_cv_lib_soname_OpenGL"
  172. _ACEOF
  173. - OPENGL_LIBS="-lGL"
  174. + OPENGL_LIBS="-lOpenGL"
  175. fi
  176. if test "x$with_osmesa" != "xno"
  177. then
  178. @@ -12871,13 +12871,13 @@ _ACEOF
  179. fi
  180. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lGL" >&5
  181. -$as_echo_n "checking for -lGL... " >&6; }
  182. -if ${ac_cv_lib_soname_GL+:} false; then :
  183. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lOpenGL" >&5
  184. +$as_echo_n "checking for -lOpenGL... " >&6; }
  185. +if ${ac_cv_lib_soname_OpenGL+:} false; then :
  186. $as_echo_n "(cached) " >&6
  187. else
  188. ac_check_soname_save_LIBS=$LIBS
  189. -LIBS="-lGL $LIBS"
  190. +LIBS="-lOpenGL $LIBS"
  191. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  192. /* end confdefs.h. */
  193. @@ -12898,30 +12898,30 @@ return glFlush ();
  194. _ACEOF
  195. if ac_fn_c_try_link "$LINENO"; then :
  196. case "$LIBEXT" in
  197. - dll) ac_cv_lib_soname_GL=`$ac_cv_path_LDD conftest.exe | grep "GL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
  198. - dylib) ac_cv_lib_soname_GL=`$OTOOL -L conftest$ac_exeext | grep "libGL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libGL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
  199. - *) ac_cv_lib_soname_GL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libGL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libGL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
  200. - if ${ac_cv_lib_soname_GL:+false} :; then :
  201. - ac_cv_lib_soname_GL=`$LDD conftest$ac_exeext | grep "libGL\\.$LIBEXT" | sed -e "s/^.*\(libGL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
  202. + dll) ac_cv_lib_soname_OpenGL=`$ac_cv_path_LDD conftest.exe | grep "OpenGL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
  203. + dylib) ac_cv_lib_soname_OpenGL=`$OTOOL -L conftest$ac_exeext | grep "libOpenGL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libOpenGL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
  204. + *) ac_cv_lib_soname_OpenGL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libOpenGL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libOpenGL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
  205. + if ${ac_cv_lib_soname_OpenGL:+false} :; then :
  206. + ac_cv_lib_soname_OpenGL=`$LDD conftest$ac_exeext | grep "libOpenGL\\.$LIBEXT" | sed -e "s/^.*\(libOpenGL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
  207. fi ;;
  208. esac
  209. else
  210. - ac_cv_lib_soname_GL=
  211. + ac_cv_lib_soname_OpenGL=
  212. fi
  213. rm -f core conftest.err conftest.$ac_objext \
  214. conftest$ac_exeext conftest.$ac_ext
  215. LIBS=$ac_check_soname_save_LIBS
  216. fi
  217. -if ${ac_cv_lib_soname_GL:+false} :; then :
  218. +if ${ac_cv_lib_soname_OpenGL:+false} :; then :
  219. { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
  220. $as_echo "not found" >&6; }
  221. else
  222. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_GL" >&5
  223. -$as_echo "$ac_cv_lib_soname_GL" >&6; }
  224. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_OpenGL" >&5
  225. +$as_echo "$ac_cv_lib_soname_OpenGL" >&6; }
  226. cat >>confdefs.h <<_ACEOF
  227. -#define SONAME_LIBGL "$ac_cv_lib_soname_GL"
  228. +#define SONAME_LIBOPENGL "$ac_cv_lib_soname_OpenGL"
  229. _ACEOF
  230. diff --git a/configure.ac b/configure.ac
  231. index 29d48b6062e..5590dd6846f 100644
  232. --- a/configure.ac
  233. +++ b/configure.ac
  234. @@ -1275,10 +1275,10 @@ then
  235. opengl_msg=""
  236. if test "x$with_opengl" != "xno"
  237. then
  238. - WINE_CHECK_SONAME(GL,glXCreateContext,
  239. - [OPENGL_LIBS="-lGL"],
  240. - [WINE_CHECK_SONAME(GL,glXCreateContext,
  241. - [OPENGL_LIBS="-Xlinker -dylib_file -Xlinker /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -lGL"],
  242. + WINE_CHECK_SONAME(OpenGL,glXCreateContext,
  243. + [OPENGL_LIBS="-lOpenGL"],
  244. + [WINE_CHECK_SONAME(OpenGL,glXCreateContext,
  245. + [OPENGL_LIBS="-Xlinker -dylib_file -Xlinker /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -lOpenGL"],
  246. [if test -f /usr/X11R6/lib/libGL.a
  247. then
  248. opengl_msg="/usr/X11R6/lib/libGL.a is present on your system.
  249. @@ -1323,7 +1323,7 @@ then
  250. WINE_PACKAGE_FLAGS(WAYLAND_CLIENT,[wayland-client])
  251. WINE_PACKAGE_FLAGS(WAYLAND_EGL,[wayland-egl])
  252. WINE_CHECK_SONAME(EGL,eglGetProcAddress)
  253. - WINE_CHECK_SONAME(GL,glFlush)
  254. + WINE_CHECK_SONAME(OpenGL,glFlush)
  255. WINE_CHECK_SONAME(GLESv2,glFlush)
  256. fi
  257. WINE_NOTICE_WITH(wayland, [test -z "$WAYLAND_CLIENT_LIBS"],
  258. diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c
  259. index 0504a4ad96b..22f114edcf7 100644
  260. --- a/dlls/winewayland.drv/opengl.c
  261. +++ b/dlls/winewayland.drv/opengl.c
  262. @@ -1106,9 +1106,9 @@ static BOOL egl_init(void)
  263. ERR("failed to load %s: %s\n", SONAME_LIBEGL, dlerror());
  264. return FALSE;
  265. }
  266. - if (!(opengl_handle = dlopen(SONAME_LIBGL, RTLD_NOW|RTLD_GLOBAL)))
  267. + if (!(opengl_handle = dlopen(SONAME_LIBOPENGL, RTLD_NOW|RTLD_GLOBAL)))
  268. {
  269. - WARN("failed to load %s: %s, trying GLESv2\n", SONAME_LIBGL, dlerror());
  270. + WARN("failed to load %s: %s, trying GLESv2\n", SONAME_LIBOPENGL, dlerror());
  271. if (!(opengl_handle = dlopen(SONAME_LIBGLESV2, RTLD_NOW|RTLD_GLOBAL)))
  272. {
  273. ERR("failed to load %s: %s\n", SONAME_LIBGLESV2, dlerror());
  274. diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
  275. index c44c587bf14..4f4f60438e6 100644
  276. --- a/dlls/winex11.drv/opengl.c
  277. +++ b/dlls/winex11.drv/opengl.c
  278. @@ -43,7 +43,7 @@
  279. #include "wine/heap.h"
  280. #include "wine/debug.h"
  281. -#ifdef SONAME_LIBGL
  282. +#ifdef SONAME_LIBOPENGL
  283. WINE_DEFAULT_DEBUG_CHANNEL(wgl);
  284. WINE_DECLARE_DEBUG_CHANNEL(winediag);
  285. @@ -550,7 +550,7 @@ static BOOL WINAPI init_opengl( INIT_ONCE *once, void *param, void **context )
  286. /* No need to load any other libraries as according to the ABI, libGL should be self-sufficient
  287. and include all dependencies */
  288. - opengl_handle = dlopen( SONAME_LIBGL, RTLD_NOW | RTLD_GLOBAL );
  289. + opengl_handle = dlopen( SONAME_LIBOPENGL, RTLD_NOW | RTLD_GLOBAL );
  290. if (opengl_handle == NULL)
  291. {
  292. ERR( "Failed to load libGL: %s\n", dlerror() );
  293. @@ -3420,4 +3420,4 @@ void destroy_gl_drawable( HWND hwnd )
  294. {
  295. }
  296. -#endif /* defined(SONAME_LIBGL) */
  297. +#endif /* defined(SONAME_LIBOPENGL) */
  298. diff --git a/include/config.h.in b/include/config.h.in
  299. index 8b2441a548b..5f45fd42cb9 100644
  300. --- a/include/config.h.in
  301. +++ b/include/config.h.in
  302. @@ -1247,9 +1247,6 @@
  303. /* Define to the soname of the libfreetype library. */
  304. #undef SONAME_LIBFREETYPE
  305. -/* Define to the soname of the libGL library. */
  306. -#undef SONAME_LIBGL
  307. -
  308. /* Define to the soname of the libGLESv2 library. */
  309. #undef SONAME_LIBGLESV2
  310. @@ -1286,6 +1283,9 @@
  311. /* Define to the soname of the libopenal library. */
  312. #undef SONAME_LIBOPENAL
  313. +/* Define to the soname of the libOpenGL library. */
  314. +#undef SONAME_LIBOPENGL
  315. +
  316. /* Define to the soname of the libOSMesa library. */
  317. #undef SONAME_LIBOSMESA
  318. --
  319. 2.26.2