Don't build utils if inb and friends aren't available

This commit is contained in:
Alan Coopersmith
2005-10-06 23:08:00 +00:00
parent ad3f384d6d
commit 7acccac366
2 changed files with 15 additions and 0 deletions

View File

@@ -54,6 +54,19 @@ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for header files.
AC_HEADER_STDC
# Checks for functions (often defined as inlines in compiler.h)
AC_MSG_CHECKING([for inb])
AC_LINK_IFELSE(AC_LANG_SOURCE([
#include "util/AsmMacros.h"
int main() {
int x = inb(0);
return x;
}
]), [HAVE_INB=yes], [HAVE_INB=no])
AC_MSG_RESULT([$HAVE_INB])
AM_CONDITIONAL(BUILD_UTILS, [test x$HAVE_INB = xyes])
AC_SUBST([XORG_CFLAGS])
AC_SUBST([moduledir])

View File

@@ -1,5 +1,7 @@
# these are not even built in the monolith, so don't install them
if BUILD_UTILS
noinst_PROGRAMS = dRegs mRegs modClock memClock
endif
dRegs_SOURCES = dRegs.c AsmMacros.h
mRegs_SOURCES = mRegs.c AsmMacros.h