diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c index 9c58ef1..136f0d0 100644 --- a/GL/glx/indirect_dispatch_swap.c +++ b/GL/glx/indirect_dispatch_swap.c @@ -28,7 +28,7 @@ #include #include #include -#ifdef __linux__ +#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) #include #elif defined(__OpenBSD__) #include diff --git a/GL/glx/indirect_reqsize.c b/GL/glx/indirect_reqsize.c index 3906bd1..d3e2bc5 100644 --- a/GL/glx/indirect_reqsize.c +++ b/GL/glx/indirect_reqsize.c @@ -31,7 +31,7 @@ #include "indirect_size.h" #include "indirect_reqsize.h" -#if defined(linux) +#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) # include # define SWAP_32(v) do { (v) = bswap_32(v); } while(0) #else diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c index 93f1484..09b7ab8 100644 --- a/GL/glx/indirect_util.c +++ b/GL/glx/indirect_util.c @@ -28,7 +28,7 @@ #include #include #include -#ifdef __linux__ +#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) #include #elif defined(__OpenBSD__) #include diff --git a/configure.ac b/configure.ac index f1a1e2f..c0deb38 100644 --- a/configure.ac +++ b/configure.ac @@ -1528,7 +1528,12 @@ if test "$KDRIVE" = yes; then # $MIEXT_SHADOW_LIB $XPSTUBS_LIB" KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' - KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + case $host_os in + *linux*) + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + KDRIVELINUX=yes + ;; + esac KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB $TSLIB_LIBS" @@ -1546,6 +1551,7 @@ AC_SUBST(KDRIVE_PURE_INCS) AC_SUBST(KDRIVE_CFLAGS) AC_SUBST(KDRIVE_PURE_LIBS) AC_SUBST(KDRIVE_LIBS) +AM_CONDITIONAL(KDRIVELINUX, [test "x$KDRIVELINUX" = xyes]) AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes]) AM_CONDITIONAL(H3600_TS, false) AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes]) diff --git a/hw/kdrive/Makefile.am b/hw/kdrive/Makefile.am index c8832eb..cf2b9e7 100644 --- a/hw/kdrive/Makefile.am +++ b/hw/kdrive/Makefile.am @@ -15,9 +15,13 @@ if XEPHYR XEPHYR_SUBDIRS = ephyr endif +if KDRIVELINUX +LINUX_SUBDIRS = linux +endif + SUBDIRS = \ src \ - linux \ + $(LINUX_SUBDIRS) \ $(XSDL_SUBDIRS) \ $(FBDEV_SUBDIRS) \ $(VESA_SUBDIRS) \