summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2009-11-10 20:25:44 +0200
committerTiago Vignatti <tiago.vignatti@nokia.com>2009-11-10 20:25:44 +0200
commitfd3b986d2e819293f6288a243259f2fdc831b394 (patch)
tree599cda485a59875c81cd2e06e8afb038634048d2
parenta40e38a271fdf8909ff12f8fed41df606009ef88 (diff)
select backend depending the OS
Well, we should select it depending the platform. But meh... based on OS is how X server is doing so far. Sigh. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r--configure.ac19
-rw-r--r--src/Makefile.am4
2 files changed, 16 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 317e188..dd507a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,6 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
AC_INIT([libx86], 0.0.1, [not yet], libx86)
-#AC_CONFIG_SRCDIR([x86.pc.in])
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
@@ -34,19 +33,29 @@ AC_PROG_CC
AC_PROG_LIBTOOL
-AC_ARG_ENABLE(x86emu, AS_HELP_STRING([--enable-x86emu], [Build with x86emu (default: disabled)]), [X86EMU=$enableval], [X86EMU=no])
+dnl OS capabilities.
+BACKEND=x86emu
+case $host_os in
+ *linux*) BACKEND=vm86 ;;
+esac
+
+dnl Build options.
+AC_ARG_ENABLE(x86emu, AS_HELP_STRING([--enable-x86emu], [Build with x86emu as
+backend (default: disabled)]), [X86EMU=$enableval], [X86EMU=no])
AM_CONDITIONAL(X86EMU, [test "x$X86EMU" = xyes])
if test "x$X86EMU" = xyes; then
- AC_DEFINE(X86EMU, 1, [Build with x86emu])
+ BACKEND=x86emu
+ AC_DEFINE(X86EMU, 1, [Build with x86emu as backend])
AC_SUBST(X86EMU)
fi
+
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Build with debug message (default: disabled)]), [DEBUG=$enableval], [DEBUG=no])
AM_CONDITIONAL(DEBUG, [test "x$DEBUG" = xyes])
if test "x$DEBUG" = xyes; then
- AC_DEFINE(DEBUG, 1, [Build stub functions])
+ AC_DEFINE(DEBUG, 1, [Build with debug])
AC_SUBST(DEBUG)
fi
@@ -62,7 +71,7 @@ echo ""
echo " Package: ${PACKAGE_NAME} ${PACKAGE_VERSION}"
echo ""
echo " Configuration"
-echo " x86emu support......: ${X86EMU}"
+echo " Backend:............: ${BACKEND}"
echo " DEBUG...............: ${DEBUG}"
echo " CFLAGS..............: ${CFLAGS}"
echo ""
diff --git a/src/Makefile.am b/src/Makefile.am
index 3f7adbc..86f71da 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,8 @@
-SUBDIRS = x86emu
-
lib_LTLIBRARIES = libx86.la
if X86EMU
+SUBDIRS = x86emu
+
libx86_la_SOURCES = x86-common.c thunk.c
libx86_la_LIBADD = x86emu/libx86emu.la
else