Mercurial > sdl-ios-xcode
comparison configure.in @ 1168:045f186426e1
Dynamically load X11 libraries like we currently do for alsa, esd, etc.
This allows you to run an SDL program on a system without Xlib, since it'll
just report the x11 target unavailable at runtime.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 05 Nov 2005 19:53:37 +0000 |
parents | 2651158f59b8 |
children | bb1a52a8d3d6 |
comparison
equal
deleted
inserted
replaced
1167:435c2e481299 | 1168:045f186426e1 |
---|---|
607 , enable_video_x11=yes) | 607 , enable_video_x11=yes) |
608 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then | 608 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then |
609 AC_PATH_X | 609 AC_PATH_X |
610 AC_PATH_XTRA | 610 AC_PATH_XTRA |
611 if test x$have_x = xyes; then | 611 if test x$have_x = xyes; then |
612 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video" | 612 AC_ARG_ENABLE(x11-shared, |
613 [ --enable-x11-shared dynamically load X11 support [default=yes]], | |
614 , enable_x11_shared=yes) | |
615 | |
616 dnl !!! FIXME: make this work? | |
617 dnl x11_lib_spec=`echo $X11_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libX11.so.*/'` | |
618 dnl x11_lib=`ls $x11_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` | |
619 dnl echo "-- $x11_lib_spec -> $x11_lib" | |
620 dnl x11ext_lib_spec=`echo $X11EXT_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libXext.so.*/'` | |
621 dnl x11ext_lib=`ls $x11ext_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` | |
622 dnl echo "-- $x11ext_lib_spec -> $x11ext_lib" | |
623 | |
624 x11_lib_spec='/usr/X11R6/lib/libX11.so.*' | |
625 x11_lib='libX11.so.6' | |
626 echo "-- $x11_lib_spec -> $x11_lib" | |
627 x11ext_lib_spec='/usr/X11R6/lib/libXext.so.*' | |
628 x11_lib='libXext.so.6' | |
629 echo "-- $x11ext_lib_spec -> $x11_lib" | |
630 | |
631 if test x$use_dlopen != xyes && \ | |
632 test x$enable_x11_shared = xyes; then | |
633 AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option]) | |
634 fi | |
635 | |
636 if test x$use_dlopen = xyes && \ | |
637 test x$enable_x11_shared = xyes && test x$x11_lib != x; then | |
638 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -DX11_DYNAMIC=\$(x11_lib) -DX11EXT_DYNAMIC=\$(x11ext_lib) -I$srcdir/include -I$srcdir/src/video" | |
639 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS" | |
640 AC_SUBST(x11_lib) | |
641 AC_SUBST(x11ext_lib) | |
642 else | |
643 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video" | |
644 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext" | |
645 fi | |
646 | |
613 if test x$ac_cv_func_shmat != xyes; then | 647 if test x$ac_cv_func_shmat != xyes; then |
614 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY" | 648 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY" |
615 fi | 649 fi |
616 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext" | 650 |
617 VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11" | 651 VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11" |
618 VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la" | 652 VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la" |
619 | 653 |
620 AC_ARG_ENABLE(video-x11-vm, | 654 AC_ARG_ENABLE(video-x11-vm, |
621 [ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]], | 655 [ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]], |