Mercurial > sdl-ios-xcode
comparison configure.in @ 1700:21184e1d04c3 SDL-1.3
Merged dynamic X11 fix from SDL 1.2
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 23 Jun 2006 08:40:46 +0000 |
parents | 393092a3ebf6 |
children | 865ba39fc96d |
comparison
equal
deleted
inserted
replaced
1699:4ce6deb843c5 | 1700:21184e1d04c3 |
---|---|
811 ;; | 811 ;; |
812 esac | 812 esac |
813 AC_PATH_X | 813 AC_PATH_X |
814 AC_PATH_XTRA | 814 AC_PATH_XTRA |
815 if test x$have_x = xyes; then | 815 if test x$have_x = xyes; then |
816 # Only allow dynamically loaded X11 if the X11 function pointers | |
817 # will not end up in the global namespace, which causes problems | |
818 # with other libraries calling X11 functions. | |
819 x11_symbols_private=$have_gcc_fvisibility | |
820 | |
816 AC_ARG_ENABLE(x11-shared, | 821 AC_ARG_ENABLE(x11-shared, |
817 AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=yes]]]), | 822 AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]), |
818 , enable_x11_shared=yes) | 823 , enable_x11_shared=maybe) |
819 | 824 |
820 case "$host" in | 825 case "$host" in |
821 *-*-darwin*) # Latest Mac OS X actually ships with Xrandr/Xrender libs... | 826 *-*-darwin*) # Latest Mac OS X actually ships with Xrandr/Xrender libs... |
827 x11_symbols_private=yes | |
822 x11_lib='/usr/X11R6/lib/libX11.6.dylib' | 828 x11_lib='/usr/X11R6/lib/libX11.6.dylib' |
823 x11ext_lib='/usr/X11R6/lib/libXext.6.dylib' | 829 x11ext_lib='/usr/X11R6/lib/libXext.6.dylib' |
824 xrender_lib='/usr/X11R6/lib/libXrender.1.dylib' | 830 xrender_lib='/usr/X11R6/lib/libXrender.1.dylib' |
825 xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib' | 831 xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib' |
826 ;; | 832 ;; |
835 *) | 841 *) |
836 x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`] | 842 x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`] |
837 for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do | 843 for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do |
838 if test "x$x11_lib" = "x"; then | 844 if test "x$x11_lib" = "x"; then |
839 x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 845 x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
840 if test "x$x11_lib" = "x"; then | 846 if test "x$x11_lib" = "x"; then |
841 x11_lib=[`ls -- $path/libX11.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 847 x11_lib=[`ls -- $path/libX11.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
842 fi | 848 fi |
843 fi | 849 fi |
844 if test "x$x11ext_lib" = "x"; then | 850 if test "x$x11ext_lib" = "x"; then |
845 x11ext_lib=[`ls -- $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 851 x11ext_lib=[`ls -- $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
846 if test "x$x11ext_lib" = "x"; then | 852 if test "x$x11ext_lib" = "x"; then |
847 x11ext_lib=[`ls -- $path/libXext.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 853 x11ext_lib=[`ls -- $path/libXext.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
848 fi | 854 fi |
849 fi | 855 fi |
850 if test "x$xrender_lib" = "x"; then | 856 if test "x$xrender_lib" = "x"; then |
851 xrender_lib=[`ls -- $path/libXrender.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 857 xrender_lib=[`ls -- $path/libXrender.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
852 if test "x$xrender_lib" = "x"; then | 858 if test "x$xrender_lib" = "x"; then |
853 xrender_lib=[`ls -- $path/libXrender.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 859 xrender_lib=[`ls -- $path/libXrender.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
854 fi | 860 fi |
855 fi | 861 fi |
856 if test "x$xrandr_lib" = "x"; then | 862 if test "x$xrandr_lib" = "x"; then |
857 xrandr_lib=[`ls -- $path/libXrandr.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 863 xrandr_lib=[`ls -- $path/libXrandr.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
858 if test "x$xrandr_lib" = "x"; then | 864 if test "x$xrandr_lib" = "x"; then |
859 xrandr_lib=[`ls -- $path/libXrandr.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 865 xrandr_lib=[`ls -- $path/libXrandr.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
860 fi | 866 fi |
861 fi | 867 fi |
862 done | 868 done |
863 ;; | 869 ;; |
864 esac | 870 esac |
865 | 871 |
871 LDFLAGS="$LDFLAGS $X_LIBS" | 877 LDFLAGS="$LDFLAGS $X_LIBS" |
872 | 878 |
873 AC_DEFINE(SDL_VIDEO_DRIVER_X11) | 879 AC_DEFINE(SDL_VIDEO_DRIVER_X11) |
874 SOURCES="$SOURCES $srcdir/src/video/x11/*.c" | 880 SOURCES="$SOURCES $srcdir/src/video/x11/*.c" |
875 EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS" | 881 EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS" |
882 | |
883 if test x$enable_x11_shared = xmaybe; then | |
884 enable_x11_shared=$x11_symbols_private | |
885 fi | |
876 if test x$have_loadso != xyes && \ | 886 if test x$have_loadso != xyes && \ |
877 test x$enable_x11_shared = xyes; then | 887 test x$enable_x11_shared = xyes; then |
878 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading]) | 888 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading]) |
879 fi | 889 enable_x11_shared=no |
890 fi | |
891 if test x$x11_symbols_private != xyes && \ | |
892 test x$enable_x11_shared = xyes; then | |
893 AC_MSG_WARN([You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading]) | |
894 enable_x11_shared=no | |
895 fi | |
896 | |
880 if test x$have_loadso = xyes && \ | 897 if test x$have_loadso = xyes && \ |
881 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then | 898 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then |
882 echo "-- dynamic libX11 -> $x11_lib" | 899 echo "-- dynamic libX11 -> $x11_lib" |
883 echo "-- dynamic libX11ext -> $x11ext_lib" | 900 echo "-- dynamic libX11ext -> $x11ext_lib" |
884 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib") | 901 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib") |