Mercurial > sdl-ios-xcode
comparison configure.in @ 1588:e20dcef5647c
Improved DirectFB install detection
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 22 Mar 2006 09:18:10 +0000 |
parents | 0fd72308659e |
children | 34cca785be57 |
comparison
equal
deleted
inserted
replaced
1587:7fd9fc1f2be5 | 1588:e20dcef5647c |
---|---|
1010 | 1010 |
1011 dnl Find DirectFB | 1011 dnl Find DirectFB |
1012 CheckDirectFB() | 1012 CheckDirectFB() |
1013 { | 1013 { |
1014 AC_ARG_ENABLE(video-directfb, | 1014 AC_ARG_ENABLE(video-directfb, |
1015 AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [default=no]]), | 1015 AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [default=yes]]), |
1016 , enable_video_directfb=no) | 1016 , enable_video_directfb=yes) |
1017 if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then | 1017 if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then |
1018 video_directfb=no | 1018 video_directfb=no |
1019 | 1019 |
1020 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | 1020 DIRECTFB_REQUIRED_VERSION=0.9.15 |
1021 if test x$PKG_CONFIG = xno ; then | 1021 |
1022 AC_MSG_WARN([*** pkg-config is required to build the DirectFB video driver.]) | 1022 AC_PATH_PROG(DIRECTFBCONFIG, directfb-config) |
1023 if test x$DIRECTFBCONFIG = x -o x$DIRECTFBCONFIG = x'"$DIRECTFBCONFIG"'; then | |
1024 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | |
1025 if test x$PKG_CONFIG != xno ; then | |
1026 AC_MSG_WARN([*** directfb-config or pkg-config are required to detect the DirectFB video driver.]) | |
1027 else | |
1028 AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support) | |
1029 | |
1030 if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then | |
1031 AC_MSG_ERROR([*** pkg-config too old; version 0.7 or better required.]) | |
1032 fi | |
1033 | |
1034 if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then | |
1035 DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb` | |
1036 DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb` | |
1037 video_directfb=yes | |
1038 fi | |
1039 AC_MSG_RESULT($video_directfb) | |
1040 fi | |
1023 else | 1041 else |
1024 AC_MSG_CHECKING(for DirectFB support) | 1042 AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support) |
1025 | 1043 set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'` |
1026 if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then | 1044 NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` |
1027 AC_MSG_ERROR([*** pkg-config too old; version 0.7 or better required.]) | 1045 set -- `directfb-config --version | sed 's/\./ /g'` |
1028 fi | 1046 HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` |
1029 | 1047 if test $HAVE_VERSION -ge $NEED_VERSION; then |
1030 DIRECTFB_REQUIRED_VERSION=0.9.15 | 1048 DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags` |
1031 | 1049 DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs` |
1032 if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then | |
1033 DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb` | |
1034 DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb` | |
1035 video_directfb=yes | 1050 video_directfb=yes |
1036 fi | 1051 fi |
1037 fi | 1052 AC_MSG_RESULT($video_directfb) |
1038 | 1053 fi |
1039 AC_MSG_RESULT($video_directfb) | 1054 |
1040 if test x$video_directfb = xyes; then | 1055 if test x$video_directfb = xyes; then |
1041 AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB) | 1056 AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB) |
1042 SOURCES="$SOURCES $srcdir/src/video/directfb/*.c" | 1057 SOURCES="$SOURCES $srcdir/src/video/directfb/*.c" |
1043 EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS" | 1058 EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS" |
1044 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS" | 1059 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS" |
1100 | 1115 |
1101 dnl Find the SVGAlib includes and libraries | 1116 dnl Find the SVGAlib includes and libraries |
1102 CheckSVGA() | 1117 CheckSVGA() |
1103 { | 1118 { |
1104 AC_ARG_ENABLE(video-svga, | 1119 AC_ARG_ENABLE(video-svga, |
1105 AC_HELP_STRING([--enable-video-svga], [use SVGAlib video driver [default=no]]), | 1120 AC_HELP_STRING([--enable-video-svga], [use SVGAlib video driver [default=yes]]), |
1106 , enable_video_svga=yes) | 1121 , enable_video_svga=yes) |
1107 if test x$enable_video = xyes -a x$enable_video_svga = xyes; then | 1122 if test x$enable_video = xyes -a x$enable_video_svga = xyes; then |
1108 AC_MSG_CHECKING(for SVGAlib (1.4.0+) support) | 1123 AC_MSG_CHECKING(for SVGAlib (1.4.0+) support) |
1109 video_svga=no | 1124 video_svga=no |
1110 AC_TRY_COMPILE([ | 1125 AC_TRY_COMPILE([ |
1130 | 1145 |
1131 dnl Find the VGL includes and libraries | 1146 dnl Find the VGL includes and libraries |
1132 CheckVGL() | 1147 CheckVGL() |
1133 { | 1148 { |
1134 AC_ARG_ENABLE(video-vgl, | 1149 AC_ARG_ENABLE(video-vgl, |
1135 AC_HELP_STRING([--enable-video-vgl], [use VGL video driver [default=no]]), | 1150 AC_HELP_STRING([--enable-video-vgl], [use VGL video driver [default=yes]]), |
1136 , enable_video_vgl=no) | 1151 , enable_video_vgl=yes) |
1137 if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then | 1152 if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then |
1138 AC_MSG_CHECKING(for libVGL support) | 1153 AC_MSG_CHECKING(for libVGL support) |
1139 video_vgl=no | 1154 video_vgl=no |
1140 AC_TRY_COMPILE([ | 1155 AC_TRY_COMPILE([ |
1141 #include <sys/fbio.h> | 1156 #include <sys/fbio.h> |