Changeset 17912 in vbox
- Timestamp:
- Mar 16, 2009 10:48:01 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44474
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r17826 r17912 355 355 VBOX_WITH_CROGL = 1 356 356 endif 357 # Enable OpenGL service358 VBOX_WITH_OGL = 1359 357 # Enable shared folders 360 358 VBOX_WITH_SHARED_FOLDERS = 1 -
trunk/configure
r17551 r17912 4 4 5 5 # 6 # Copyright (C) 2006-200 7Sun Microsystems, Inc.6 # Copyright (C) 2006-2009 Sun Microsystems, Inc. 7 7 # 8 8 # This file is part of VirtualBox Open Source Edition (OSE), as … … 68 68 WITH_DBUS=1 69 69 WITH_KMODS=1 70 WITH_OPENGL=1 70 71 WITH_HARDENING=1 71 72 CC="gcc" … … 92 93 INCX11="/usr/local/include" 93 94 LIBXCURSOR="-lXcursor" 95 LIBXMU="-lXmu" 96 MESA="-lGL" 94 97 INCZ="" 95 98 LIBZ="-lz" … … 216 219 217 220 # Compile a test 221 # $1 compile flags/libs 222 # $2 library name 223 # $3 package name 224 # $4 if this argument is 'nofatal', don't abort 218 225 test_compile() 219 226 { … … 1131 1138 1132 1139 # 1140 # Check for the X libraries (Xext, X11) 1141 # 1142 check_x() 1143 { 1144 test_header "X libraries" 1145 cat > $ODIR.tmp_src.cc << EOF 1146 #include <cstdio> 1147 #include <X11/Xlib.h> 1148 extern "C" int main(void) 1149 { 1150 Display *dpy; 1151 int scrn_num; 1152 Screen *scrn; 1153 Window win; 1154 1155 dpy = XOpenDisplay(NULL); 1156 scrn_num = DefaultScreen(dpy); 1157 scrn = ScreenOfDisplay(dpy, scrn_num); 1158 win = XCreateWindow(dpy, RootWindowOfScreen(scrn), 0, 0, 100, 100, 1159 0, 16, InputOutput, CopyFromParent, 0, NULL); 1160 XDestroyWindow(dpy, win); 1161 } 1162 EOF 1163 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"` 1164 if test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs; then 1165 log_success "found" 1166 fi 1167 } 1168 1169 1170 # 1133 1171 # Check for the Xcursor library, needed by VBoxSDL and VBoxBFE 1134 1172 # … … 1156 1194 1157 1195 # 1158 # Check for the X libraries (Xext, X11) 1159 # 1160 check_x() 1161 { 1162 test_header "X libraries" 1196 # Check for the Xmu library, needed by OpenGL 1197 # 1198 check_xmu() 1199 { 1200 test_header Xmu 1201 cat > $ODIR.tmp_src.cc << EOF 1202 #include <cstdio> 1203 #include <X11/Xatom.h> 1204 #include <X11/Xlib.h> 1205 #include <X11/Xutil.h> 1206 #include <X11/Xmu/StdCmap.h> 1207 extern "C" int main(void) 1208 { 1209 Display *dpy; 1210 int scrn_num; 1211 Screen *scrn; 1212 1213 dpy = XOpenDisplay(NULL); 1214 scrn_num = DefaultScreen(dpy); 1215 scrn = ScreenOfDisplay(dpy, scrn_num); 1216 Status status = XmuLookupStandardColormap(dpy, RootWindowOfScreen(scrn), 0, 1217 24, XA_RGB_DEFAULT_MAP, False, True); 1218 printf("Status = %x\n", status); 1219 return 0; 1220 } 1221 EOF 1222 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"` 1223 if test_compile "$LIBX11 $LIBXMU $I_INCX11" Xmu Xmu; then 1224 log_success "found" 1225 cnf_append "VBOX_XMU_LIBS" "`strip_l "$LIBXMU"`" 1226 fi 1227 } 1228 1229 1230 # 1231 # Check for Mesa, needed by OpenGL 1232 # 1233 check_mesa() 1234 { 1235 test_header "Mesa / GLU" 1163 1236 cat > $ODIR.tmp_src.cc << EOF 1164 1237 #include <cstdio> 1165 1238 #include <X11/Xlib.h> 1239 #include <GL/glx.h> 1240 #include <GL/glu.h> 1166 1241 extern "C" int main(void) 1167 1242 { 1168 1243 Display *dpy; 1169 int scrn_num; 1170 Screen *scrn; 1171 Window win; 1172 1173 dpy = XOpenDisplay(NULL); 1174 scrn_num = DefaultScreen(dpy); 1175 scrn = ScreenOfDisplay(dpy, scrn_num); 1176 win = XCreateWindow(dpy, RootWindowOfScreen(scrn), 0, 0, 100, 100, 1177 0, 16, InputOutput, CopyFromParent, 0, NULL); 1178 XDestroyWindow(dpy, win); 1244 int major, minor; 1245 1246 dpy = XOpenDisplay(NULL); 1247 if (glXQueryVersion(dpy, &major, &minor)) 1248 { 1249 printf("found version %u.%u, OK.\n", major, minor); 1250 } 1251 return 0; 1179 1252 } 1180 1253 EOF 1181 1254 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"` 1182 if test_compile "$LIBX11 $ I_INCX11" Xlibs Xlibs; then1183 log_success "found"1255 if test_compile "$LIBX11 $MESA $I_INCX11" Mesa Mesa; then 1256 test_execute 1184 1257 fi 1185 1258 } … … 1737 1810 --disable-kmods don't build Linux kernel modules (host and guest) 1738 1811 --disable-hardening don't be strict about /dev/vboxdrv access 1812 --disable-opengl disable OpenGL support 1739 1813 --enable-webservice enable the webservice stuff 1740 1814 --build-libxml2 build libxml2 from sources … … 1840 1914 WITH_KMODS=0 1841 1915 ;; 1916 --disable-opengl) 1917 WITH_OPENGL=0 1918 ;; 1842 1919 --disable-hardening) 1843 1920 WITH_HARDENING=0 … … 1866 1943 WITH_SDL_TTF=0 1867 1944 WITH_X11=0 1945 WITH_OPENGL=0 1868 1946 WITH_QT4=0 1869 1947 ;; … … 1989 2067 fi 1990 2068 2069 if [ $WITH_OPENGL -eq 0 ]; then 2070 cnf_append "VBOX_WITH_CROGL" "" 2071 fi 2072 1991 2073 if [ "$OS" = "darwin" ]; then 1992 2074 # On Darwin we want to build against Qt4 only. WITH_QT4 is enabled by … … 2030 2112 [ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf 2031 2113 [ $WITH_X11 -eq 1 ] && check_x 2032 # TODO check for Xmu (X11/Xmu/StdCmap.h) 2033 # TODO check for mesa-common-dev (GL/glx.h) 2034 # TODO check for libglu1-mesa-dev (GL/glu.h) 2035 # TODO check for xcomposite-dev (X11/extensions/Xcomposite.h) 2036 # TODO check for libxdamange-dev (X11/extensions/Xdamage.h) 2114 # TODO check for xcomposite-dev (X11/extensions/Xcomposite.h, additions only) 2115 # TODO check for libxdamange-dev (X11/extensions/Xdamage.h, additions only) 2037 2116 [ $WITH_X11 -eq 1 ] && check_xcursor 2117 [ $WITH_OPENGL -eq 1 ] && check_xmu 2118 [ $WITH_OPENGL -eq 1 ] && check_mesa 2038 2119 [ $WITH_QT4 -eq 1 ] && check_qt4 2039 2120 [ $WITH_PYTHON -eq 1 -a "$OS" != "darwin" ] && check_python
Note:
See TracChangeset
for help on using the changeset viewer.