intel: Add a configure option to *disable* building libdrm-intel

In conjunction with the atomic operation patch, it may be more
convenient for some people to disable building libdrm-intel and its
dependencies upon the atomic intrinsics then it is for them to use a
supported compiler.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
main
Chris Wilson 2009-10-03 22:56:04 +01:00
parent 61bddf8504
commit ab3300c581
2 changed files with 28 additions and 15 deletions

View File

@ -43,6 +43,11 @@ AC_ARG_ENABLE(udev, AS_HELP_STRING([--enable-udev],
[Enable support for using udev instead of mknod (default: disabled)]), [Enable support for using udev instead of mknod (default: disabled)]),
[UDEV=$enableval], [UDEV=no]) [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, AC_ARG_ENABLE(nouveau-experimental-api,
AS_HELP_STRING([--enable-nouveau-experimental-api], AS_HELP_STRING([--enable-nouveau-experimental-api],
[Enable support for nouveau's experimental API (default: disabled)]), [Enable support for nouveau's experimental API (default: disabled)]),
@ -146,6 +151,9 @@ if test "x$HAVE_LIBUDEV" = xyes; then
fi fi
AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes]) AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes])
if test "x$INTEL" = xyes; then
# Check for atomic intrinsics # Check for atomic intrinsics
AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives, AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives,
[ [
@ -162,6 +170,7 @@ if test "x$drm_cv_atomic_primitives" = xIntel; then
AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1, AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1,
[Enable if your compiler supports the Intel __sync_* atomic primitives]) [Enable if your compiler supports the Intel __sync_* atomic primitives])
fi fi
fi
AC_SUBST(WARN_CFLAGS) AC_SUBST(WARN_CFLAGS)
AC_OUTPUT([ AC_OUTPUT([

View File

@ -18,6 +18,10 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # 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. # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if HAVE_INTEL
INTEL_SUBDIR = intel
endif
if HAVE_NOUVEAU if HAVE_NOUVEAU
NOUVEAU_SUBDIR = nouveau NOUVEAU_SUBDIR = nouveau
endif endif
@ -26,7 +30,7 @@ if HAVE_RADEON
RADEON_SUBDIR = radeon RADEON_SUBDIR = radeon
endif endif
SUBDIRS = . intel $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) SUBDIRS = . $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR)
libdrm_la_LTLIBRARIES = libdrm.la libdrm_la_LTLIBRARIES = libdrm.la
libdrm_ladir = $(libdir) libdrm_ladir = $(libdir)