summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac39
-rw-r--r--libdrm/Makefile.am6
2 files changed, 29 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 2852962e..9832caff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,11 @@ AC_ARG_ENABLE(udev, AS_HELP_STRING([--enable-udev],
[Enable support for using udev instead of mknod (default: disabled)]),
[UDEV=$enableval], [UDEV=no])
+AC_ARG_ENABLE(intel,
+ AS_HELP_STRING([--disable-intel],
+ [Enable support for intel's KMS API (default: enabled)]),
+ [INTEL=$enableval], [INTEL=yes])
+
AC_ARG_ENABLE(nouveau-experimental-api,
AS_HELP_STRING([--enable-nouveau-experimental-api],
[Enable support for nouveau's experimental API (default: disabled)]),
@@ -146,21 +151,25 @@ if test "x$HAVE_LIBUDEV" = xyes; then
fi
AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
-# Check for atomic intrinsics
-AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives,
-[
- drm_cv_atomic_primitives="none"
-
- AC_TRY_LINK([
-int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }
-int atomic_cmpxchg(int i, int j, int k) { return __sync_val_compare_and_swap (&i, j, k); }
-], [],
- drm_cv_atomic_primitives="Intel"
- )
-])
-if test "x$drm_cv_atomic_primitives" = xIntel; then
- AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1,
- [Enable if your compiler supports the Intel __sync_* atomic primitives])
+AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes])
+
+if test "x$INTEL" = xyes; then
+ # Check for atomic intrinsics
+ AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives,
+ [
+ drm_cv_atomic_primitives="none"
+
+ AC_TRY_LINK([
+ int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }
+ int atomic_cmpxchg(int i, int j, int k) { return __sync_val_compare_and_swap (&i, j, k); }
+ ], [],
+ drm_cv_atomic_primitives="Intel"
+ )
+ ])
+ if test "x$drm_cv_atomic_primitives" = xIntel; then
+ AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1,
+ [Enable if your compiler supports the Intel __sync_* atomic primitives])
+ fi
fi
AC_SUBST(WARN_CFLAGS)
diff --git a/libdrm/Makefile.am b/libdrm/Makefile.am
index 0c07220f..d13bead7 100644
--- a/libdrm/Makefile.am
+++ b/libdrm/Makefile.am
@@ -18,6 +18,10 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+if HAVE_INTEL
+INTEL_SUBDIR = intel
+endif
+
if HAVE_NOUVEAU
NOUVEAU_SUBDIR = nouveau
endif
@@ -26,7 +30,7 @@ if HAVE_RADEON
RADEON_SUBDIR = radeon
endif
-SUBDIRS = . intel $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR)
+SUBDIRS = . $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR)
libdrm_la_LTLIBRARIES = libdrm.la
libdrm_ladir = $(libdir)