-fvisibility=hidden is no longer a requirement for dynamic X11.
We don't clash with Xlib symbols anymore.main
parent
131a072503
commit
825a68983a
|
@ -331,15 +331,8 @@ macro(CheckX11)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${X11_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_X11 1)
|
||||
|
||||
if(HAVE_GCC_FVISIBILITY)
|
||||
set(X11_SYMBOLS_PRIVATE TRUE)
|
||||
else()
|
||||
set(X11_SYMBOLS_PRIVATE FALSE)
|
||||
endif(HAVE_GCC_FVISIBILITY)
|
||||
|
||||
if(APPLE)
|
||||
set(X11_SHARED OFF)
|
||||
set(X11_SYMBOLS_PRIVATE TRUE)
|
||||
endif(APPLE)
|
||||
|
||||
check_function_exists("shmat" HAVE_SHMAT)
|
||||
|
@ -358,10 +351,6 @@ macro(CheckX11)
|
|||
if(NOT HAVE_DLOPEN)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic X11 loading")
|
||||
set(HAVE_X11_SHARED FALSE)
|
||||
if(X11_SYMBOLS_PRIVATE)
|
||||
message_warn("You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading")
|
||||
set(HAVE_X11_SHARED TRUE)
|
||||
endif(X11_SYMBOLS_PRIVATE)
|
||||
else(NOT HAVE_DLOPEN)
|
||||
set(HAVE_X11_SHARED TRUE)
|
||||
endif()
|
||||
|
|
14
configure.in
14
configure.in
|
@ -1140,18 +1140,12 @@ AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
|
|||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
if test x$have_x = xyes; then
|
||||
# Only allow dynamically loaded X11 if the X11 function pointers
|
||||
# will not end up in the global namespace, which causes problems
|
||||
# with other libraries calling X11 functions.
|
||||
x11_symbols_private=$have_gcc_fvisibility
|
||||
|
||||
AC_ARG_ENABLE(x11-shared,
|
||||
AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
|
||||
, enable_x11_shared=maybe)
|
||||
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
x11_symbols_private=yes
|
||||
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
|
||||
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
|
||||
xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
|
||||
|
@ -1212,19 +1206,13 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
|
|||
SDL_CFLAGS="$SDL_CFLAGS $X_CFLAGS"
|
||||
|
||||
if test x$enable_x11_shared = xmaybe; then
|
||||
enable_x11_shared=$x11_symbols_private
|
||||
enable_x11_shared=yes
|
||||
fi
|
||||
if test x$have_loadso != xyes && \
|
||||
test x$enable_x11_shared = xyes; then
|
||||
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
|
||||
enable_x11_shared=no
|
||||
fi
|
||||
if test x$x11_symbols_private != xyes && \
|
||||
test x$enable_x11_shared = xyes; then
|
||||
AC_MSG_WARN([You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading])
|
||||
enable_x11_shared=no
|
||||
fi
|
||||
|
||||
if test x$have_loadso = xyes && \
|
||||
test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
|
||||
echo "-- dynamic libX11 -> $x11_lib"
|
||||
|
|
Loading…
Reference in New Issue