comparison configure.in @ 1659:14717b52abc0 SDL-1.3

Merge trunk-1.3-3
author Sam Lantinga <slouken@libsdl.org>
date Wed, 17 May 2006 08:18:28 +0000
parents e49147870aac
children 281d3f4870e5
comparison
equal deleted inserted replaced
1658:e49147870aac 1659:14717b52abc0
72 esac 72 esac
73 BUILD_CFLAGS="$CFLAGS $CPPFLAGS" 73 BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
74 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS" 74 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
75 BUILD_LDFLAGS="$LDFLAGS" 75 BUILD_LDFLAGS="$LDFLAGS"
76 EXTRA_LDFLAGS="$BASE_LDFLAGS" 76 EXTRA_LDFLAGS="$BASE_LDFLAGS"
77 for path in /usr/local; do 77 # I can't remember why I added this. I'm sure it'll come to me...
78 if test -d $path/include; then 78 #for path in /usr/local; do
79 EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include" 79 # if test -d $path/include; then
80 fi 80 # EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
81 if test -d $path/lib; then 81 # fi
82 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib" 82 # if test -d $path/lib; then
83 fi 83 # EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
84 done 84 # fi
85 #done
85 SDL_CFLAGS="$BASE_CFLAGS" 86 SDL_CFLAGS="$BASE_CFLAGS"
86 SDL_LIBS="-lSDL $BASE_LDFLAGS" 87 SDL_LIBS="-lSDL $BASE_LDFLAGS"
87 CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" 88 CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
88 CFLAGS="$CFLAGS $EXTRA_CFLAGS" 89 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
89 LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" 90 LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
713 714
714 visibility_CFLAGS="-fvisibility=hidden" 715 visibility_CFLAGS="-fvisibility=hidden"
715 save_CFLAGS="$CFLAGS" 716 save_CFLAGS="$CFLAGS"
716 CFLAGS="$save_CFLAGS $visibility_CFLAGS" 717 CFLAGS="$save_CFLAGS $visibility_CFLAGS"
717 AC_TRY_COMPILE([ 718 AC_TRY_COMPILE([
718 int placeholder = 1; 719 #if !defined(__GNUC__) || __GNUC__ < 4
720 #error SDL only uses visibility attributes in GCC 4 or newer
721 #endif
719 ],[ 722 ],[
720 ],[ 723 ],[
721 have_gcc_fvisibility=yes 724 have_gcc_fvisibility=yes
722 ]) 725 ])
723 AC_MSG_RESULT($have_gcc_fvisibility) 726 AC_MSG_RESULT($have_gcc_fvisibility)
784 { 787 {
785 AC_ARG_ENABLE(video-x11, 788 AC_ARG_ENABLE(video-x11,
786 AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]), 789 AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
787 , enable_video_x11=yes) 790 , enable_video_x11=yes)
788 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then 791 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
792 case "$host" in
793 *-*-darwin*)
794 # This isn't necessary for X11, but fixes GLX detection
795 if test "x$x_includes" = xNONE && test "x$x_libraries" = xNONE; then
796 x_includes="/usr/X11R6/include"
797 x_libraries="/usr/X11R6/lib"
798 fi
799 ;;
800 esac
789 AC_PATH_X 801 AC_PATH_X
790 AC_PATH_XTRA 802 AC_PATH_XTRA
791 if test x$have_x = xyes; then 803 if test x$have_x = xyes; then
792 AC_ARG_ENABLE(x11-shared, 804 AC_ARG_ENABLE(x11-shared,
793 AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=yes]]]), 805 AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=yes]]]),
811 *) 823 *)
812 x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`] 824 x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`]
813 for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do 825 for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do
814 if test "x$x11_lib" = "x"; then 826 if test "x$x11_lib" = "x"; then
815 x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] 827 x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
828 if test "x$x11_lib" = "x"; then
829 x11_lib=[`ls -- $path/libX11.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
830 fi
816 fi 831 fi
817 if test "x$x11ext_lib" = "x"; then 832 if test "x$x11ext_lib" = "x"; then
818 x11ext_lib=[`ls -- $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] 833 x11ext_lib=[`ls -- $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
834 if test "x$x11ext_lib" = "x"; then
835 x11ext_lib=[`ls -- $path/libXext.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
836 fi
819 fi 837 fi
820 if test "x$xrender_lib" = "x"; then 838 if test "x$xrender_lib" = "x"; then
821 xrender_lib=[`ls -- $path/libXrender.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] 839 xrender_lib=[`ls -- $path/libXrender.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
840 if test "x$xrender_lib" = "x"; then
841 xrender_lib=[`ls -- $path/libXrender.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
842 fi
822 fi 843 fi
823 if test "x$xrandr_lib" = "x"; then 844 if test "x$xrandr_lib" = "x"; then
824 xrandr_lib=[`ls -- $path/libXrandr.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] 845 xrandr_lib=[`ls -- $path/libXrandr.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
846 if test "x$xrandr_lib" = "x"; then
847 xrandr_lib=[`ls -- $path/libXrandr.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
848 fi
825 fi 849 fi
826 done 850 done
827 ;; 851 ;;
828 esac 852 esac
829 853
830 X_CFLAGS="$X_CFLAGS -DXTHREADS" 854 X_CFLAGS="$X_CFLAGS -DXTHREADS"
831 if test x$ac_cv_func_shmat != xyes; then 855 if test x$ac_cv_func_shmat != xyes; then
832 X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY" 856 X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
833 fi 857 fi
858 CFLAGS="$CFLAGS $X_CFLAGS"
859 LDFLAGS="$LDFLAGS $X_LIBS"
834 860
835 AC_DEFINE(SDL_VIDEO_DRIVER_X11) 861 AC_DEFINE(SDL_VIDEO_DRIVER_X11)
836 SOURCES="$SOURCES $srcdir/src/video/x11/*.c" 862 SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
837 EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS" 863 EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
838 if test x$have_loadso != xyes && \ 864 if test x$have_loadso != xyes && \
923 definitely_enable_video_x11_xrandr=yes 949 definitely_enable_video_x11_xrandr=yes
924 fi 950 fi
925 fi 951 fi
926 fi 952 fi
927 fi 953 fi
928
929 if test x$definitely_enable_video_x11_xrandr = xyes; then 954 if test x$definitely_enable_video_x11_xrandr = xyes; then
930 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR) 955 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
956 fi
957 AC_ARG_ENABLE(video-x11-dpms,
958 AC_HELP_STRING([--enable-video-x11-dpms], [enable X11 DPMS extension [[default=yes]]]),
959 , enable_video_x11_dpms=yes)
960 if test x$enable_video_x11_dpms = xyes; then
961 AC_CHECK_HEADER(X11/extensions/dpms.h,
962 have_dpms_h_hdr=yes,
963 have_dpms_h_hdr=no,
964 [#include <X11/Xlib.h>
965 ])
966 if test x$have_dpms_h_hdr = xyes; then
967 AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS)
968 fi
931 fi 969 fi
932 fi 970 fi
933 fi 971 fi
934 } 972 }
935 973
1195 #include <sys/consio.h> 1233 #include <sys/consio.h>
1196 #include <sys/kbio.h> 1234 #include <sys/kbio.h>
1197 #include <vgl.h> 1235 #include <vgl.h>
1198 ],[ 1236 ],[
1199 VGLBitmap bitmap; 1237 VGLBitmap bitmap;
1238 bitmap.Type = VIDBUF32;
1239 bitmap.PixelBytes = 4;
1200 exit(bitmap.Bitmap); 1240 exit(bitmap.Bitmap);
1201 ],[ 1241 ],[
1202 video_vgl=yes 1242 video_vgl=yes
1203 ]) 1243 ])
1204 AC_MSG_RESULT($video_vgl) 1244 AC_MSG_RESULT($video_vgl)
1357 AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes) 1397 AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
1358 if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then 1398 if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
1359 video_gem=yes 1399 video_gem=yes
1360 AC_DEFINE(SDL_VIDEO_DRIVER_GEM) 1400 AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
1361 SOURCES="$SOURCES $srcdir/src/video/gem/*.c" 1401 SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
1362 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgem" 1402 SDL_LIBS="$SDL_LIBS -lgem"
1363 have_video=yes 1403 have_video=yes
1364 fi 1404 fi
1365 fi 1405 fi
1366 } 1406 }
1367 1407
1492 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags` 1532 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
1493 OSMESA_LIBS=`$OSMESA_CONFIG --libs` 1533 OSMESA_LIBS=`$OSMESA_CONFIG --libs`
1494 fi 1534 fi
1495 AC_DEFINE(SDL_VIDEO_OPENGL) 1535 AC_DEFINE(SDL_VIDEO_OPENGL)
1496 AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA) 1536 AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
1497 EXTRA_CFLAGS="$EXTRA_CFLAGS $OSMESA_CFLAGS" 1537 SDL_CFLAGS="$SDL_CFLAGS $OSMESA_CFLAGS"
1498 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $OSMESA_LIBS" 1538 SDL_LIBS="$SDL_LIBS $OSMESA_LIBS"
1499 1539
1500 AC_ARG_ENABLE(osmesa-shared, 1540 AC_ARG_ENABLE(osmesa-shared,
1501 AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [[default=yes]]]), 1541 AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [[default=yes]]]),
1502 , enable_osmesa_shared=yes) 1542 , enable_osmesa_shared=yes)
1503 if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then 1543 if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
1595 dnl This is used on Linux for glibc binary compatibility (Doh!) 1635 dnl This is used on Linux for glibc binary compatibility (Doh!)
1596 AC_ARG_ENABLE(pthread-sem, 1636 AC_ARG_ENABLE(pthread-sem,
1597 AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]), 1637 AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
1598 , enable_pthread_sem=yes) 1638 , enable_pthread_sem=yes)
1599 case "$host" in 1639 case "$host" in
1600 *-*-linux*) 1640 *-*-linux*|*-*-uclinux*)
1601 pthread_cflags="-D_REENTRANT" 1641 pthread_cflags="-D_REENTRANT"
1602 pthread_lib="-lpthread" 1642 pthread_lib="-lpthread"
1603 ;; 1643 ;;
1604 *-*-bsdi*) 1644 *-*-bsdi*)
1605 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" 1645 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
1863 AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes) 1903 AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
1864 AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem) 1904 AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
1865 if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then 1905 if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
1866 AC_DEFINE(SDL_LOADSO_LDG) 1906 AC_DEFINE(SDL_LOADSO_LDG)
1867 SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c" 1907 SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
1868 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lldg -lgem" 1908 SDL_LIBS="$SDL_LIBS -lldg -lgem"
1869 have_loadso=yes 1909 have_loadso=yes
1870 fi 1910 fi
1871 fi 1911 fi
1872 } 1912 }
1873 1913
2046 AC_DEFINE(SDL_TIMER_UNIX) 2086 AC_DEFINE(SDL_TIMER_UNIX)
2047 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c" 2087 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
2048 have_timers=yes 2088 have_timers=yes
2049 fi 2089 fi
2050 ;; 2090 ;;
2051 *-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*) 2091 *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*)
2052 case "$host" in 2092 case "$host" in
2053 *-*-linux*) ARCH=linux ;; 2093 *-*-linux*) ARCH=linux ;;
2094 *-*-uclinux*) ARCH=linux ;;
2054 *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;; 2095 *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
2055 *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;; 2096 *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
2056 *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;; 2097 *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
2057 *-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants 2098 *-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants
2058 *-*-bsdi*) ARCH=bsdi ;; 2099 *-*-bsdi*) ARCH=bsdi ;;
2568 SDL_LIBS="$SDL_LIBS -Wl,-framework,Cocoa" 2609 SDL_LIBS="$SDL_LIBS -Wl,-framework,Cocoa"
2569 fi 2610 fi
2570 if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then 2611 if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
2571 SDL_LIBS="$SDL_LIBS -Wl,-framework,Carbon" 2612 SDL_LIBS="$SDL_LIBS -Wl,-framework,Carbon"
2572 fi 2613 fi
2573 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
2574 SDL_LIBS="$SDL_LIBS -Wl,-framework,OpenGL"
2575 fi
2576 # Evil hack to allow static linking on Mac OS X 2614 # Evil hack to allow static linking on Mac OS X
2577 SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a $EXTRA_LDFLAGS" 2615 SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a $EXTRA_LDFLAGS"
2578 ;; 2616 ;;
2579 *) 2617 *)
2580 SDL_STATIC_LIBS="$SDL_LIBS" 2618 SDL_STATIC_LIBS="$SDL_LIBS"