Alexandre Julliard : configure: Add check for OpenGL ES libraries.
Alexandre Julliard
julliard at winehq.org
Thu Jun 22 16:50:52 CDT 2017
Module: wine
Branch: master
Commit: ad9fbf8e0aaeb56f50a0dcd8d6aa572796736af1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ad9fbf8e0aaeb56f50a0dcd8d6aa572796736af1
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jun 22 20:07:29 2017 +0200
configure: Add check for OpenGL ES libraries.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
configure | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 4 ++
include/config.h.in | 9 +++++
3 files changed, 121 insertions(+)
diff --git a/configure b/configure
index 02de880..c1e3c2a 100755
--- a/configure
+++ b/configure
@@ -6830,6 +6830,7 @@ for ac_header in \
CoreAudio/CoreAudio.h \
CoreServices/CoreServices.h \
DiskArbitration/DiskArbitration.h \
+ EGL/egl.h \
IOKit/IOKitLib.h \
IOKit/hid/IOHIDLib.h \
OpenAL/al.h \
@@ -8489,6 +8490,113 @@ fi
LIBWINE_LDFLAGS="-shared -Wl,-soname,libwine.so"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lEGL" >&5
+$as_echo_n "checking for -lEGL... " >&6; }
+if ${ac_cv_lib_soname_EGL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_soname_save_LIBS=$LIBS
+LIBS="-lEGL $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char eglGetProcAddress ();
+int
+main ()
+{
+return eglGetProcAddress ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ case "$LIBEXT" in
+ dll) ac_cv_lib_soname_EGL=`$ac_cv_path_LDD conftest.exe | grep "EGL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
+ dylib) ac_cv_lib_soname_EGL=`$OTOOL -L conftest$ac_exeext | grep "libEGL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libEGL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
+ *) ac_cv_lib_soname_EGL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libEGL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libEGL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
+ if ${ac_cv_lib_soname_EGL:+false} :; then :
+ ac_cv_lib_soname_EGL=`$LDD conftest$ac_exeext | grep "libEGL\\.$LIBEXT" | sed -e "s/^.*\(libEGL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
+fi ;;
+ esac
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_soname_save_LIBS
+fi
+if ${ac_cv_lib_soname_EGL:+false} :; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_EGL" >&5
+$as_echo "$ac_cv_lib_soname_EGL" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define SONAME_LIBEGL "$ac_cv_lib_soname_EGL"
+_ACEOF
+
+
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lGLESv2" >&5
+$as_echo_n "checking for -lGLESv2... " >&6; }
+if ${ac_cv_lib_soname_GLESv2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_soname_save_LIBS=$LIBS
+LIBS="-lGLESv2 $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char glFlush ();
+int
+main ()
+{
+return glFlush ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ case "$LIBEXT" in
+ dll) ac_cv_lib_soname_GLESv2=`$ac_cv_path_LDD conftest.exe | grep "GLESv2" | sed -e "s/dll.*/dll/"';2,$d'` ;;
+ dylib) ac_cv_lib_soname_GLESv2=`$OTOOL -L conftest$ac_exeext | grep "libGLESv2\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libGLESv2\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
+ *) ac_cv_lib_soname_GLESv2=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libGLESv2\\.$LIBEXT" | sed -e "s/^.*\\[\\(libGLESv2\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
+ if ${ac_cv_lib_soname_GLESv2:+false} :; then :
+ ac_cv_lib_soname_GLESv2=`$LDD conftest$ac_exeext | grep "libGLESv2\\.$LIBEXT" | sed -e "s/^.*\(libGLESv2\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
+fi ;;
+ esac
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_soname_save_LIBS
+fi
+if ${ac_cv_lib_soname_GLESv2:+false} :; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_GLESv2" >&5
+$as_echo "$ac_cv_lib_soname_GLESv2" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define SONAME_LIBGLESV2 "$ac_cv_lib_soname_GLESv2"
+_ACEOF
+
+
+fi
+
if test "x$exec_prefix" = xNONE
then
case $host_cpu in
diff --git a/configure.ac b/configure.ac
index 7ae29f7..687d546 100644
--- a/configure.ac
+++ b/configure.ac
@@ -394,6 +394,7 @@ AC_CHECK_HEADERS(\
CoreAudio/CoreAudio.h \
CoreServices/CoreServices.h \
DiskArbitration/DiskArbitration.h \
+ EGL/egl.h \
IOKit/IOKitLib.h \
IOKit/hid/IOHIDLib.h \
OpenAL/al.h \
@@ -869,6 +870,9 @@ case $host_os in
AC_SUBST(LIBWINE_INSTALL_LIB,"libwine.so")
AC_SUBST(LIBWINE_LDFLAGS,["-shared -Wl,-soname,libwine.so"])
+ WINE_CHECK_SONAME(EGL,eglGetProcAddress)
+ WINE_CHECK_SONAME(GLESv2,glFlush)
+
if test "x$exec_prefix" = xNONE
then
case $host_cpu in
diff --git a/include/config.h.in b/include/config.h.in
index 18cacd5..c287559 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -117,6 +117,9 @@
/* Define to 1 if you have the `dlopen' function. */
#undef HAVE_DLOPEN
+/* Define to 1 if you have the <EGL/egl.h> header file. */
+#undef HAVE_EGL_EGL_H
+
/* Define to 1 if you have the <elf.h> header file. */
#undef HAVE_ELF_H
@@ -1415,6 +1418,9 @@
/* Define to the soname of the libdbus-1 library. */
#undef SONAME_LIBDBUS_1
+/* Define to the soname of the libEGL library. */
+#undef SONAME_LIBEGL
+
/* Define to the soname of the libfontconfig library. */
#undef SONAME_LIBFONTCONFIG
@@ -1424,6 +1430,9 @@
/* Define to the soname of the libGL library. */
#undef SONAME_LIBGL
+/* Define to the soname of the libGLESv2 library. */
+#undef SONAME_LIBGLESV2
+
/* Define to the soname of the libGLU library. */
#undef SONAME_LIBGLU
More information about the wine-cvs
mailing list