filename | configure.in |
changeset | 1239:be3121267597 |
prev | 1235:8da2f3dad9c0 |
next | 1245:01e0020adf88 |
author | nkeynes |
date | Tue Feb 28 18:22:52 2012 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Add a GL-only video driver for android usage (since the Java code is responsible for creating the context) |
file | annotate | diff | log | raw |
1.1 --- a/configure.in Fri Feb 24 21:11:58 2012 +10001.2 +++ b/configure.in Tue Feb 28 18:22:52 2012 +10001.3 @@ -9,6 +9,8 @@1.4 AC_CANONICAL_HOST1.6 m4_include([m4/ccforbuild.m4])1.7 +m4_include([m4/android.m4])1.8 +LX_ANDROID_BUILD1.10 AC_ISC_POSIX1.11 AC_PROG_CC1.12 @@ -81,6 +83,13 @@1.13 dnl ------------ Check if we're building on Darwin --------------1.15 dnl For starters, do we have a working objective-c compiler?1.16 +if test "$ANDROID_BUILD" = "yes"; then1.17 + with_gtk=no;1.18 + EXTRA_OUTPUT_FILES="src/android/build.properties"1.19 + LIBS="-lGLESv2 $LIBS"1.20 + AC_DEFINE(HAVE_GLES2, 1, [Using GLESv2])1.21 + with_sdl=no1.22 +else1.23 AC_HAVE_OBJC([1.24 AC_CHECK_HEADER([Cocoa/Cocoa.h], [1.25 HAVE_COCOA='yes'1.26 @@ -102,6 +111,7 @@1.27 AC_CHECK_OBJCFLAG([-msse2])1.28 AC_CHECK_OBJCFLAG([-mfpmath=sse])1.29 ])1.30 +fi1.32 AM_CONDITIONAL(GUI_COCOA, [test "$HAVE_COCOA" = 'yes' -a "$with_gtk" = "no"])1.33 if test "x$HAVE_COCOA" = 'xyes' -a "x$with_gtk" = "xno"; then1.34 @@ -185,10 +195,10 @@1.35 AC_SUBST(PLUGINLDFLAGS)1.36 AC_SUBST(LXDREAMLDFLAGS)1.37 fi1.38 -if test "x$have_dlopen" = "xyes"; then1.39 +if test "x$have_dlopen" = "xyes" -a "x$ANDROID_BUILD" != "xyes"; then1.40 AC_DEFINE(BUILD_PLUGINS, [1], [Enable dynamic plugin support])1.41 fi1.42 -AM_CONDITIONAL(BUILD_PLUGINS, [test "x$have_dlopen" = "xyes"])1.43 +AM_CONDITIONAL(BUILD_PLUGINS, [test "x$have_dlopen" = "xyes" -a "x$ANDROID_BUILD" != "xyes"])1.45 AC_CHECK_FASTCALL([1.46 AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions])1.47 @@ -247,7 +257,7 @@1.48 PKG_CHECK_MODULES(LIBISOFS, [libisofs-1] )1.49 dnl AC_CHECK_HEADER([libisofs/libisofs.h], [1.50 dnl AC_CHECK_LIB(isofs, [iso_data_source_new_from_file], [1.51 - dnl LIBS="$LIBS -lisofs"1.52 + dnl LIBS="-lisofs $LIBS"1.53 dnl ], [ AC_MSG_FAILURE( ["Libisofs library not found, but is required"]) ])],1.54 dnl [ AC_MSG_FAILURE( ["Libisofs headers not found, but is required"]) ])1.56 @@ -263,9 +273,9 @@1.57 VIDEO_DRIVERS="$VIDEO_DRIVERS osmesa"1.58 AC_DEFINE([HAVE_OSMESA],1,[Building with the OSMesa video driver]) ], [1.60 -dnl Otherwise we want a real GL library (unless we're on darwin, in which case it's already1.61 +dnl Otherwise we want a real GL library (unless we're on darwin or android, in which case it's already1.62 dnl taken care of above).1.63 - if test "x$APPLE_BUILD" != 'xyes'; then1.64 + if test "x$APPLE_BUILD" != 'xyes' -a "x$ANDROID_BUILD" != 'xyes'; then1.65 PKG_CHECK_MODULES(LIBGL, [gl] )1.66 dnl AC_CHECK_LIB(GL, glVertex3f, [], [1.67 dnl AC_MSG_FAILURE( ["The OpenGL library (libGL.so) could not be found, but is required."])])1.68 @@ -310,8 +320,6 @@1.69 AC_CHECK_FUNC(glDrawBuffer, [ AC_DEFINE([HAVE_OPENGL_DRAW_BUFFER],1,[Have glDrawBuffer function])], [])1.70 AC_CHECK_FUNC(glTexEnvi, [ AC_DEFINE([HAVE_OPENGL_FIXEDFUNC],1,[Have OpenGL fixed-functionality]) ], [])dnl glTexEnvi is a pretty fair proxy for this.1.72 -1.73 -1.74 dnl ------------------- SH4 translator target -------------------1.76 if test "x$enable_translator" != "xno"; then1.77 @@ -383,7 +391,8 @@1.80 dnl Check for native cdrom support. There can be only one.1.81 -AC_CHECK_HEADER([linux/cdrom.h], [1.82 +if test "$ANDROID_BUILD" != "yes"; then1.83 + AC_CHECK_HEADER([linux/cdrom.h], [1.84 CDROM_DRIVER=linux1.85 dnl Some kernel versions have non-c99 compliant headers - check here1.86 AC_MSG_CHECKING([C99 compliant kernel headers])1.87 @@ -393,10 +402,11 @@1.88 AC_MSG_RESULT([No])1.89 STDCFLAG="-std=gnu99"])1.90 CFLAGS="$old_CFLAGS"1.91 -], [true])1.92 -AC_CHECK_HEADER([IOKit/IOKitLib.h], [1.93 - CDROM_DRIVER=osx1.94 - LIBS="$LIBS -framework IOKit"],[true])1.95 + ], [true])1.96 + AC_CHECK_HEADER([IOKit/IOKitLib.h], [1.97 + CDROM_DRIVER=osx1.98 + LIBS="$LIBS -framework IOKit"],[true])1.99 +fi1.100 AM_CONDITIONAL(CDROM_LINUX, [test "x$CDROM_DRIVER" = "xlinux"])1.101 AM_CONDITIONAL(CDROM_OSX, [test "x$CDROM_DRIVER" = "xosx"])1.102 AM_CONDITIONAL(CDROM_NONE, [test "x$CDROM_DRIVER" = "x"])
.