2007-08-01 00:52:20 +02:00
dnl Copyright © 2003-2007 Keith Packard, Daniel Stone
2005-07-01 22:29:53 +02:00
dnl
2007-08-01 00:52:20 +02:00
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
dnl to deal in the Software without restriction, including without limitation
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
dnl and/or sell copies of the Software, and to permit persons to whom the
dnl Software is furnished to do so, subject to the following conditions:
2005-07-01 22:29:53 +02:00
dnl
2007-08-01 00:52:20 +02:00
dnl The above copyright notice and this permission notice (including the next
dnl paragraph) shall be included in all copies or substantial portions of the
dnl Software.
2005-07-01 22:29:53 +02:00
dnl
2007-08-01 00:52:20 +02:00
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
dnl DEALINGS IN THE SOFTWARE.
dnl
dnl Authors: Keith Packard <keithp@keithp.com>
dnl Daniel Stone <daniel@fooishbar.org>
dnl an unwitting cast of miscellaneous others
2005-07-01 22:29:53 +02:00
dnl
dnl Process this file with autoconf to create configure.
2011-12-04 03:23:51 +01:00
AC_PREREQ(2.60)
2013-04-24 19:11:03 +02:00
AC_INIT([xorg-server], 1.14.99.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
RELEASE_DATE="2013-04-24"
RELEASE_NAME="Sweet Tea"
2005-07-01 22:29:53 +02:00
AC_CONFIG_SRCDIR([Makefile.am])
2009-10-28 19:09:11 +01:00
AM_INIT_AUTOMAKE([foreign dist-bzip2])
2005-08-21 21:15:11 +02:00
2011-05-03 04:47:44 +02:00
# Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
2009-10-27 20:07:26 +01:00
m4_ifndef([XORG_MACROS_VERSION],
2011-05-03 04:47:44 +02:00
[m4_fatal([must install xorg-macros 1.14 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.14)
2009-10-27 20:07:26 +01:00
XORG_DEFAULT_OPTIONS
2010-04-06 01:12:22 +02:00
XORG_WITH_DOXYGEN(1.6.1)
2011-06-17 02:11:52 +02:00
XORG_CHECK_SGML_DOCTOOLS(1.8)
2011-03-18 00:26:35 +01:00
XORG_ENABLE_DOCS
XORG_ENABLE_DEVEL_DOCS
XORG_WITH_XMLTO(0.0.20)
XORG_WITH_FOP
2011-05-14 19:30:18 +02:00
XORG_WITH_XSLTPROC
2011-03-18 00:26:36 +01:00
XORG_ENABLE_UNIT_TESTS
2011-10-25 09:12:48 +02:00
XORG_LD_WRAP([optional])
2008-12-07 21:52:23 +01:00
2009-10-16 05:40:02 +02:00
m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install fontutil 1.1 or later before running autoconf/autogen])])
XORG_FONT_MACROS_VERSION(1.1)
2005-07-01 22:29:53 +02:00
dnl this gets generated by autoheader, and thus contains all the defines. we
dnl don't ever actually use it, internally.
AC_CONFIG_HEADERS(include/do-not-use-config.h)
dnl xorg-server.h is an external header, designed to be included by loadable
dnl drivers.
AC_CONFIG_HEADERS(include/xorg-server.h)
dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just
dnl dix/).
2009-01-31 01:17:58 +01:00
AC_CONFIG_HEADERS(include/dix-config.h)
2005-07-05 00:18:40 +02:00
dnl xorg-config.h covers the Xorg DDX.
AC_CONFIG_HEADERS(include/xorg-config.h)
2005-07-14 05:32:09 +02:00
dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs.
AC_CONFIG_HEADERS(include/xkb-config.h)
2008-04-20 17:35:42 +02:00
dnl xwin-config.h covers the XWin DDX.
AC_CONFIG_HEADERS(include/xwin-config.h)
2005-12-27 09:31:37 +01:00
dnl kdrive-config.h covers the kdrive DDX
AC_CONFIG_HEADERS(include/kdrive-config.h)
2009-04-08 23:17:39 +02:00
dnl version-config.h covers the version numbers so they can be bumped without
dnl forcing an entire recompile.x
AC_CONFIG_HEADERS(include/version-config.h)
2005-08-21 21:15:11 +02:00
2005-07-01 22:29:53 +02:00
AM_PROG_AS
AC_PROG_LN_S
AC_LIBTOOL_WIN32_DLL
2005-11-30 00:34:30 +01:00
AC_DISABLE_STATIC
2005-07-01 22:29:53 +02:00
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
2005-07-05 00:18:40 +02:00
AC_PROG_LEX
AC_PROG_YACC
2006-10-27 18:26:30 +02:00
AC_SYS_LARGEFILE
2005-09-24 04:40:51 +02:00
XORG_PROG_RAWCPP
2005-07-01 22:29:53 +02:00
2009-10-03 01:51:24 +02:00
# Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow
# easier overrides at build time.
XSERVER_CFLAGS='$(CWARNFLAGS)'
2010-10-30 23:55:06 +02:00
dnl Explicitly add -fno-strict-aliasing since this option should disappear
dnl from util-macros CWARNFLAGS
if test "x$GCC" = xyes ; then
XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing"
fi
2006-11-03 21:54:43 +01:00
dnl Check for dtrace program (needed to build Xserver dtrace probes)
2007-12-08 02:28:37 +01:00
dnl Also checks for <sys/sdt.h>, since some Linux distros have an
dnl ISDN trace program named dtrace
2006-11-03 21:54:43 +01:00
AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH],
[Enable dtrace probes (default: enabled if dtrace found)]),
[WDTRACE=$withval], [WDTRACE=auto])
if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin])
if test "x$DTRACE" = "xnot_found" ; then
if test "x$WDTRACE" = "xyes" ; then
AC_MSG_FAILURE([dtrace requested but not found])
fi
WDTRACE="no"
2007-12-08 02:28:37 +01:00
else
AC_CHECK_HEADER(sys/sdt.h, [HAS_SDT_H="yes"], [HAS_SDT_H="no"])
if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then
WDTRACE="no"
fi
2006-11-03 21:54:43 +01:00
fi
fi
if test "x$WDTRACE" != "xno" ; then
AC_DEFINE(XSERVER_DTRACE, 1,
[Define to 1 if the DTrace Xserver provider probes should be built in.])
2009-10-06 01:52:19 +02:00
# Solaris/OpenSolaris require dtrace -G to build dtrace probe information into
# object files, and require linking with those as relocatable objects, not .a
# archives. MacOS X handles all this in the normal compiler toolchain, and on
# some releases (like Tiger), will error out on dtrace -G. For now, other
# platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux
# ports appear to, based on my web searches, but have not yet been tested).
case $host_os in
darwin*) SPECIAL_DTRACE_OBJECTS=no ;;
*) SPECIAL_DTRACE_OBJECTS=yes ;;
esac
2006-11-03 21:54:43 +01:00
fi
AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"])
2009-10-06 01:52:19 +02:00
AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"])
2007-08-16 01:44:49 +02:00
2005-07-01 22:29:53 +02:00
AC_HEADER_DIRENT
AC_HEADER_STDC
2010-06-08 05:39:53 +02:00
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h fnmatch.h sys/utsname.h])
2005-07-01 22:29:53 +02:00
2005-08-21 21:15:11 +02:00
dnl Checks for typedefs, structures, and compiler characteristics.
2005-07-01 22:29:53 +02:00
AC_C_CONST
2012-08-28 19:06:51 +02:00
AC_C_TYPEOF
2005-08-21 21:15:11 +02:00
AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"])
AC_CHECK_SIZEOF([unsigned long])
if test "$ac_cv_sizeof_unsigned_long" = 8; then
AC_DEFINE(_XSERVER64, 1, [Define to 1 if unsigned long is 64 bits.])
fi
2005-08-06 21:14:24 +02:00
2005-07-01 22:29:53 +02:00
AC_TYPE_PID_T
2007-01-04 00:44:55 +01:00
# Checks for headers/macros for byte swapping
# Known variants:
# <byteswap.h> bswap_16, bswap_32, bswap_64 (glibc)
# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD)
# <sys/endian.h> bswap16, bswap32, bswap64 (other BSD's)
# and a fallback to local macros if none of the above are found
# if <byteswap.h> is found, assume it's the correct version
AC_CHECK_HEADERS([byteswap.h])
# if <sys/endian.h> is found, have to check which version
AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"])
if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then
AC_MSG_CHECKING([for __swap16 variant of <sys/endian.h> byteswapping macros])
AC_LINK_IFELSE([AC_LANG_PROGRAM([
2008-07-14 22:20:41 +02:00
#include <sys/types.h>
2007-01-04 00:44:55 +01:00
#include <sys/endian.h>
], [
int a = 1, b;
b = __swap16(a);
])
], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no'])
AC_MSG_RESULT([$SYS_ENDIAN__SWAP])
2007-05-24 20:00:04 +02:00
AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros])
2007-01-04 00:44:55 +01:00
AC_LINK_IFELSE([AC_LANG_PROGRAM([
2008-07-14 22:20:41 +02:00
#include <sys/types.h>
2007-01-04 00:44:55 +01:00
#include <sys/endian.h>
], [
int a = 1, b;
2007-05-24 20:00:04 +02:00
b = bswap16(a);
2007-01-04 00:44:55 +01:00
])
], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no'])
AC_MSG_RESULT([$SYS_ENDIAN_BSWAP])
if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
USE_SYS_ENDIAN_H=yes
2007-05-24 20:00:04 +02:00
BSWAP=bswap
2007-01-04 00:44:55 +01:00
else
if test "$SYS_ENDIAN__SWAP" = "yes" ; then
USE_SYS_ENDIAN_H=yes
BSWAP=__swap
else
USE_SYS_ENDIAN_H=no
fi
fi
if test "$USE_SYS_ENDIAN_H" = "yes" ; then
AC_DEFINE([USE_SYS_ENDIAN_H], 1,
[Define to use byteswap macros from <sys/endian.h>])
AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16,
[Define to 16-bit byteswap macro])
AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32,
[Define to 32-bit byteswap macro])
AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64,
[Define to 64-bit byteswap macro])
fi
fi
2007-11-21 03:27:12 +01:00
dnl Check to see if dlopen is in default libraries (like Solaris, which
dnl has it in libc), or if libdl is needed to get it.
2007-08-31 21:24:07 +02:00
AC_CHECK_FUNC([dlopen], [],
AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
2009-10-29 19:46:22 +01:00
AC_SUBST(DLOPEN_LIBS)
2007-08-31 21:24:07 +02:00
2005-08-21 21:15:11 +02:00
dnl Checks for library functions.
2011-12-16 19:36:51 +01:00
AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \
2011-12-01 07:20:09 +01:00
getdtablesize getifaddrs getpeereid getpeerucred getzoneid \
2013-08-02 20:07:36 +02:00
mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
2011-12-01 07:20:09 +01:00
AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup])
dnl Find the math libary, then check for cbrt function in it.
2005-07-01 22:29:53 +02:00
AC_CHECK_LIB(m, sqrt)
2011-12-01 07:20:09 +01:00
AC_CHECK_FUNCS([cbrt])
2005-07-01 22:29:53 +02:00
AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
2005-08-21 21:15:11 +02:00
dnl AGPGART headers
2009-04-28 05:23:53 +02:00
AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
2005-10-16 05:02:53 +02:00
AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
2005-07-01 22:29:53 +02:00
2005-08-21 21:15:11 +02:00
dnl APM header
2006-05-09 20:04:29 +02:00
AC_CHECK_HEADERS([linux/apm_bios.h], LNXAPM=yes)
AM_CONDITIONAL(LNXAPM, [test "x$LNXAPM" = xyes])
2005-07-01 22:29:53 +02:00
2005-08-21 21:15:11 +02:00
dnl fbdev header
2005-07-14 00:54:02 +02:00
AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes)
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(FBDEVHW, [test "x$FBDEV" = xyes])
2005-07-01 22:29:53 +02:00
2005-08-21 21:15:11 +02:00
dnl MTRR header
2006-04-01 23:20:31 +02:00
AC_CHECK_HEADERS([asm/mtrr.h], ac_cv_asm_mtrr_h=yes)
if test "x$ac_cv_asm_mtrr_h" = xyes; then
HAVE_MTRR=yes
fi
2005-07-01 22:29:53 +02:00
2005-09-13 20:37:35 +02:00
dnl BSD MTRR header
AC_CHECK_HEADERS([sys/memrange.h], ac_cv_memrange_h=yes)
2005-10-16 05:02:53 +02:00
if test "x$ac_cv_memrange_h" = xyes; then
2006-04-01 23:20:31 +02:00
HAVE_MTRR=yes
fi
if test "x$HAVE_MTRR" = xyes; then
AC_DEFINE(HAS_MTRR_SUPPORT, 1, [MTRR support available])
2005-09-13 20:37:35 +02:00
fi
dnl A NetBSD MTRR header
2006-04-01 23:20:31 +02:00
AC_CHECK_HEADERS([machine/mtrr.h], ac_cv_machine_mtrr_h=yes)
if test "x$ac_cv_machine_mtrr_h" = xyes; then
2005-09-13 20:37:35 +02:00
AC_DEFINE(HAS_MTRR_BUILTIN, 1, [Define to 1 if NetBSD built-in MTRR
support is available])
fi
dnl FreeBSD kldload support (sys/linker.h)
2005-12-30 13:05:47 +01:00
AC_CHECK_HEADERS([sys/linker.h],
2005-09-13 20:37:35 +02:00
[ac_cv_sys_linker_h=yes],
2005-12-30 13:05:47 +01:00
[ac_cv_sys_linker_h=no],
[#include <sys/param.h>])
2005-10-16 05:02:53 +02:00
AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes])
2005-09-13 20:37:35 +02:00
2005-07-01 22:29:53 +02:00
AC_CACHE_CHECK([for SYSV IPC],
ac_cv_sysv_ipc,
2005-10-05 02:55:08 +02:00
[AC_TRY_LINK([
2008-05-19 06:12:04 +02:00
#include <sys/types.h>
#include <sys/ipc.h>
2005-07-01 22:29:53 +02:00
#include <sys/shm.h>
2011-11-04 19:30:43 +01:00
#include <sys/stat.h>
2005-12-30 13:05:47 +01:00
],[
2006-12-02 01:42:37 +01:00
{
2005-07-01 22:29:53 +02:00
int id;
2011-11-04 19:30:43 +01:00
id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR);
2005-07-01 22:29:53 +02:00
if (id < 0) return -1;
return shmctl(id, IPC_RMID, 0);
}],
[ac_cv_sysv_ipc=yes],
[ac_cv_sysv_ipc=no])])
2005-08-21 21:15:11 +02:00
if test "x$ac_cv_sysv_ipc" = xyes; then
AC_DEFINE(HAVE_SYSV_IPC, 1, [Define to 1 if SYSV IPC is available])
2005-07-01 22:29:53 +02:00
fi
2006-03-15 22:25:38 +01:00
dnl OpenBSD /dev/xf86 aperture driver
if test -c /dev/xf86 ; then
AC_DEFINE(HAS_APERTURE_DRV, 1, [System has /dev/xf86 aperture driver])
fi
2008-05-19 05:15:30 +02:00
dnl BSD APM support
AC_CHECK_HEADER([machine/apmvar.h],[
AC_CHECK_HEADER([sys/event.h],
ac_cv_BSD_KQUEUE_APM=yes,
ac_cv_BSD_APM=yes)])
AM_CONDITIONAL(BSD_APM, [test "x$ac_cv_BSD_APM" = xyes])
AM_CONDITIONAL(BSD_KQUEUE_APM, [test "x$ac_cv_BSD_KQUEUE_APM" = xyes])
2005-10-03 08:31:48 +02:00
dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c)
AC_CHECK_HEADER([execinfo.h],[
AC_CHECK_LIB(c, backtrace, [
AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support])
2006-08-12 18:25:06 +02:00
AC_DEFINE(HAVE_EXECINFO_H, 1, [Have execinfo.h])
2005-10-03 17:37:57 +02:00
])]
2005-10-03 08:31:48 +02:00
)
2013-02-21 00:02:44 +01:00
PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
if test "x$HAVE_LIBUNWIND" = xyes; then
AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
fi
AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes])
2005-08-21 21:15:11 +02:00
dnl ---------------------------------------------------------------------------
dnl Bus options and CPU capabilities. Replaces logic in
dnl hw/xfree86/os-support/bus/Makefile.am, among others.
dnl ---------------------------------------------------------------------------
2005-08-03 01:57:52 +02:00
DEFAULT_INT10="x86emu"
2005-08-21 21:15:11 +02:00
dnl Override defaults as needed for specific platforms:
2005-08-03 01:57:52 +02:00
2005-07-01 22:29:53 +02:00
case $host_cpu in
2005-09-13 20:37:35 +02:00
alpha*)
ALPHA_VIDEO=yes
case $host_os in
2007-10-10 00:25:16 +02:00
*freebsd*) SYS_LIBS=-lio ;;
2005-09-13 20:37:35 +02:00
*netbsd*) AC_DEFINE(USE_ALPHA_PIO, 1, [NetBSD PIO alpha IO]) ;;
esac
2007-12-28 22:59:53 +01:00
GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
2005-09-13 20:37:35 +02:00
;;
arm*)
ARM_VIDEO=yes
2005-07-01 22:29:53 +02:00
;;
i*86)
2005-09-13 20:37:35 +02:00
I386_VIDEO=yes
2005-07-14 00:54:02 +02:00
case $host_os in
2005-12-01 06:04:07 +01:00
*freebsd*) AC_DEFINE(USE_DEV_IO) ;;
2008-04-07 13:09:04 +02:00
*dragonfly*) AC_DEFINE(USE_DEV_IO) ;;
2006-05-25 00:43:13 +02:00
*netbsd*) AC_DEFINE(USE_I386_IOPL)
SYS_LIBS=-li386
;;
2006-03-05 17:35:08 +01:00
*openbsd*) AC_DEFINE(USE_I386_IOPL)
SYS_LIBS=-li386
;;
2005-07-14 00:54:02 +02:00
esac
2005-07-01 22:29:53 +02:00
;;
2005-09-13 20:37:35 +02:00
powerpc*)
PPC_VIDEO=yes
case $host_os in
*freebsd*) DEFAULT_INT10=stub ;;
esac
;;
sparc*)
SPARC64_VIDEO=yes
BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c"
2007-12-28 22:59:53 +01:00
GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
2005-09-13 20:37:35 +02:00
;;
x86_64*|amd64*)
I386_VIDEO=yes
case $host_os in
*freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;;
2008-04-07 13:09:04 +02:00
*dragonfly*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;;
2006-05-25 00:43:13 +02:00
*netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl])
SYS_LIBS=-lx86_64
;;
2006-03-05 17:35:08 +01:00
*openbsd*) AC_DEFINE(USE_AMD64_IOPL, 1, [BSD AMD64 iopl])
SYS_LIBS=-lamd64
;;
2005-09-13 20:37:35 +02:00
esac
2007-12-28 22:59:53 +01:00
GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
;;
ia64*)
GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
;;
s390*)
GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
2005-09-13 20:37:35 +02:00
;;
esac
2007-12-28 22:59:53 +01:00
AC_SUBST(GLX_ARCH_DEFINES)
2005-09-13 20:37:35 +02:00
dnl BSD *_video.c selection
2005-10-16 05:02:53 +02:00
AM_CONDITIONAL(ALPHA_VIDEO, [test "x$ALPHA_VIDEO" = xyes])
AM_CONDITIONAL(ARM_VIDEO, [test "x$ARM_VIDEO" = xyes])
AM_CONDITIONAL(I386_VIDEO, [test "x$I386_VIDEO" = xyes])
AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes])
AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes])
2005-09-13 20:37:35 +02:00
2005-09-13 22:59:05 +02:00
DRI=no
2009-09-16 06:13:48 +02:00
USE_SIGIO_BY_DEFAULT="yes"
2005-09-13 20:37:35 +02:00
dnl it would be nice to autodetect these *CONS_SUPPORTs
case $host_os in
2008-04-07 13:09:04 +02:00
*freebsd* | *dragonfly*)
2006-06-03 12:48:37 +02:00
case $host_os in
kfreebsd*-gnu) ;;
*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;;
esac
2005-09-13 20:37:35 +02:00
AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console])
AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console])
AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console])
2005-09-13 22:59:05 +02:00
DRI=yes
2005-09-13 20:37:35 +02:00
;;
*netbsd*)
AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console])
2006-11-14 23:37:18 +01:00
AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console])
2005-09-13 20:37:35 +02:00
AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console])
2005-09-13 22:59:05 +02:00
DRI=yes
2005-09-13 20:37:35 +02:00
;;
*openbsd*)
AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
2006-02-24 18:01:57 +01:00
AC_DEFINE(PCVT_SUPPORT, 1, [System has PC console])
2005-09-13 20:37:35 +02:00
AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console])
2005-08-03 01:57:52 +02:00
;;
2005-09-13 22:59:05 +02:00
*linux*)
DRI=yes
;;
2007-01-09 02:36:07 +01:00
*solaris*)
PKG_CHECK_EXISTS(libdrm, DRI=yes, DRI=no)
2009-09-16 06:13:48 +02:00
# Disable use of SIGIO by default until some system bugs are
# fixed - see Sun/OpenSolaris bug id 6879897
USE_SIGIO_BY_DEFAULT="no"
2007-01-09 02:36:07 +01:00
;;
2008-05-07 01:07:33 +02:00
darwin*)
AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
;;
2012-10-15 06:38:20 +02:00
cygwin*|mingw*)
2010-02-01 18:12:57 +01:00
CFLAGS="$CFLAGS -DFD_SETSIZE=256"
;;
2005-07-01 22:29:53 +02:00
esac
2007-09-05 21:34:29 +02:00
dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the
dnl major number
PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1`
2009-02-18 08:25:14 +01:00
PVS=`echo $PACKAGE_VERSION | cut -d . -f 4 | cut -d - -f 1`
2007-09-05 21:34:29 +02:00
if test "x$PVS" = "x"; then
PVS="0"
fi
VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)"
VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}"
VENDOR_NAME="The X.Org Foundation"
VENDOR_NAME_SHORT="X.Org"
VENDOR_WEB="http://wiki.x.org"
2005-07-01 22:29:53 +02:00
2005-08-02 00:13:20 +02:00
m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
2005-08-21 21:15:11 +02:00
dnl Build options.
2005-10-17 19:11:12 +02:00
AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],
2009-10-03 01:51:24 +02:00
[Obsolete - use --enable-strict-compilation instead]),
AC_MSG_ERROR([--enable-werror has been replaced by --enable-strict-compilation]))
2005-10-17 19:11:12 +02:00
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
[Enable debugging (default: disabled)]),
[DEBUGGING=$enableval], [DEBUGGING=no])
2009-11-12 14:27:34 +01:00
AC_ARG_ENABLE(use-sigio-by-default, AS_HELP_STRING([--enable-use-sigio-by-default]
2009-09-16 06:13:48 +02:00
[Enable SIGIO input handlers by default (default: $USE_SIGIO_BY_DEFAULT)]),
[USE_SIGIO_BY_DEFAULT=$enableval], [])
2005-08-21 21:15:11 +02:00
AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]),
2005-07-01 22:29:53 +02:00
[INT10="$withval"],
[INT10="$DEFAULT_INT10"])
2007-01-25 03:54:38 +01:00
AC_ARG_WITH(vendor-name, AS_HELP_STRING([--with-vendor-name=VENDOR],
2005-10-17 19:11:12 +02:00
[Vendor string reported by the server]),
2007-09-05 21:34:29 +02:00
[ VENDOR_NAME="$withval" ], [])
2007-01-25 03:54:38 +01:00
AC_ARG_WITH(vendor-name-short, AS_HELP_STRING([--with-vendor-name-short=VENDOR],
2005-11-03 18:08:06 +01:00
[Short version of vendor string reported by the server]),
2007-09-05 21:34:29 +02:00
[ VENDOR_NAME_SHORT="$withval" ], [])
2005-10-17 19:11:12 +02:00
AC_ARG_WITH(vendor-web, AS_HELP_STRING([--with-vendor-web=URL],
[Vendor web address reported by the server]),
2007-09-05 21:34:29 +02:00
[ VENDOR_WEB="$withval" ], [])
2005-09-15 07:06:54 +02:00
AC_ARG_WITH(module-dir, AS_HELP_STRING([--with-module-dir=DIR],
2005-10-17 19:11:12 +02:00
[Directory where modules are installed (default: $libdir/xorg/modules)]),
2005-07-01 22:29:53 +02:00
[ moduledir="$withval" ],
2005-08-21 21:15:11 +02:00
[ moduledir="${libdir}/xorg/modules" ])
2005-10-17 19:11:12 +02:00
AC_ARG_WITH(log-dir, AS_HELP_STRING([--with-log-dir=DIR],
[Directory where log files are kept (default: $localstatedir/log)]),
2005-09-15 07:06:54 +02:00
[ logdir="$withval" ],
[ logdir="$localstatedir/log" ])
2005-10-17 19:11:12 +02:00
AC_ARG_WITH(builder-addr, AS_HELP_STRING([--with-builder-addr=ADDRESS],
[Builder address (default: xorg@lists.freedesktop.org)]),
2005-07-01 22:29:53 +02:00
[ BUILDERADDR="$withval" ],
[ BUILDERADDR="xorg@lists.freedesktop.org" ])
2007-05-02 17:20:48 +02:00
AC_ARG_WITH(os-name, AS_HELP_STRING([--with-os-name=OSNAME], [Name of OS (default: output of "uname -srm")]),
2005-07-12 03:20:36 +02:00
[ OSNAME="$withval" ],
2007-05-02 17:20:48 +02:00
[ OSNAME=`uname -srm` ])
2005-10-17 19:11:12 +02:00
AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]),
2005-07-12 03:20:36 +02:00
[ OSVENDOR="$withval" ],
[ OSVENDOR="" ])
2007-02-12 23:22:39 +01:00
AC_ARG_WITH(builderstring, AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]),
[ BUILDERSTRING="$withval" ]
[ ])
2009-10-16 05:40:02 +02:00
dnl Determine font path
XORG_FONTROOTDIR
XORG_FONTSUBDIR(FONTMISCDIR, fontmiscdir, misc)
XORG_FONTSUBDIR(FONTOTFDIR, fontotfdir, OTF)
XORG_FONTSUBDIR(FONTTTFDIR, fontttfdir, TTF)
XORG_FONTSUBDIR(FONTTYPE1DIR, fonttype1dir, Type1)
XORG_FONTSUBDIR(FONT75DPIDIR, font75dpidir, 75dpi)
XORG_FONTSUBDIR(FONT100DPIDIR, font100dpidir, 100dpi)
dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
2010-01-14 07:42:16 +01:00
dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross
dnl compiling, assume default font path uses standard FONTROOTDIR directories.
DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
if test "$cross_compiling" != yes; then
AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
[DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
[case $host_os in
darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
esac])
fi
2005-10-17 19:11:12 +02:00
AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
2005-08-21 08:56:19 +02:00
[ FONTPATH="$withval" ],
2005-10-15 00:19:51 +02:00
[ FONTPATH="${DEFAULT_FONT_PATH}" ])
2009-09-16 06:13:48 +02:00
2010-01-14 07:42:16 +01:00
AC_MSG_CHECKING([for default font path])
AC_MSG_RESULT([$FONTPATH])
2005-10-17 19:11:12 +02:00
AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
2005-08-21 21:15:11 +02:00
[ XKBPATH="$withval" ],
[ XKBPATH="${datadir}/X11/xkb" ])
2005-10-17 19:11:12 +02:00
AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
2005-09-21 20:14:32 +02:00
[ XKBOUTPUT="$withval" ],
2005-11-21 00:01:02 +01:00
[ XKBOUTPUT="compiled" ])
2009-01-10 13:36:16 +01:00
AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
[Keyboard ruleset (default: base/evdev)]),
2009-01-21 01:50:43 +01:00
[ XKB_DFLT_RULES="$withval" ],
[ XKB_DFLT_RULES="" ])
2009-01-10 13:36:16 +01:00
AC_ARG_WITH(default-xkb-model, AS_HELP_STRING([--with-default-xkb-model=MODEL],
2009-12-18 03:24:40 +01:00
[Keyboard model (default: pc105)]),
2009-01-21 01:50:43 +01:00
[ XKB_DFLT_MODEL="$withval" ],
2009-12-18 03:24:40 +01:00
[ XKB_DFLT_MODEL="pc105" ])
2009-01-10 13:36:16 +01:00
AC_ARG_WITH(default-xkb-layout, AS_HELP_STRING([--with-default-xkb-layout=LAYOUT],
[Keyboard layout (default: us)]),
2009-01-21 01:50:43 +01:00
[ XKB_DFLT_LAYOUT="$withval" ],
[ XKB_DFLT_LAYOUT="us" ])
2009-01-10 13:36:16 +01:00
AC_ARG_WITH(default-xkb-variant, AS_HELP_STRING([--with-default-xkb-variant=VARIANT],
[Keyboard variant (default: (none))]),
2009-01-21 01:50:43 +01:00
[ XKB_DFLT_VARIANT="$withval" ],
[ XKB_DFLT_VARIANT="" ])
2009-01-10 13:36:16 +01:00
AC_ARG_WITH(default-xkb-options, AS_HELP_STRING([--with-default-xkb-options=OPTIONS],
[Keyboard layout options (default: (none))]),
2009-01-21 01:50:43 +01:00
[ XKB_DFLT_OPTIONS="$withval" ],
[ XKB_DFLT_OPTIONS="" ])
2007-11-26 21:24:15 +01:00
AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH],
[Directory where ancillary server config files are installed (default: ${libdir}/xorg)]),
2007-05-29 03:53:02 +02:00
[ SERVERCONFIG="$withval" ],
2007-11-26 21:24:15 +01:00
[ SERVERCONFIG="${libdir}/xorg" ])
2007-11-22 04:51:14 +01:00
AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: /Applications/Utilities)]),
2007-12-14 00:56:31 +01:00
[ APPLE_APPLICATIONS_DIR="${withval}" ],
2007-11-22 04:51:14 +01:00
[ APPLE_APPLICATIONS_DIR="/Applications/Utilities" ])
2007-12-14 00:56:31 +01:00
AC_SUBST([APPLE_APPLICATIONS_DIR])
2008-12-09 06:00:11 +01:00
AC_ARG_WITH(apple-application-name,AS_HELP_STRING([--with-apple-application-name=NAME], [Name for the .app (default: X11)]),
[ APPLE_APPLICATION_NAME="${withval}" ],
[ APPLE_APPLICATION_NAME="X11" ])
AC_SUBST([APPLE_APPLICATION_NAME])
2011-04-25 06:35:04 +02:00
AC_ARG_WITH(launchd-id-prefix, AS_HELP_STRING([--with-launchd-id-prefix=PATH], [Deprecated: Use --with-bundle-id-prefix.]),
[ BUNDLE_ID_PREFIX="${withval}" ],
[ BUNDLE_ID_PREFIX="org.x" ])
AC_ARG_WITH(bundle-id-prefix, AS_HELP_STRING([--with-bundle-id-prefix=PATH], [Prefix to use for bundle identifiers (default: org.x)]),
2011-05-12 02:27:52 +02:00
[ BUNDLE_ID_PREFIX="${withval}" ])
2011-04-25 06:35:04 +02:00
AC_SUBST([BUNDLE_ID_PREFIX])
AC_DEFINE_UNQUOTED(BUNDLE_ID_PREFIX, "$BUNDLE_ID_PREFIX", [Prefix to use for bundle identifiers])
2009-07-19 00:51:29 +02:00
AC_ARG_ENABLE(sparkle,AS_HELP_STRING([--enable-sparkle], [Enable updating of X11.app using the Sparkle Framework (default: disabled)]),
[ XQUARTZ_SPARKLE="${enableval}" ],
[ XQUARTZ_SPARKLE="no" ])
AC_SUBST([XQUARTZ_SPARKLE])
2005-11-23 08:14:46 +01:00
AC_ARG_ENABLE(install-libxf86config,
AS_HELP_STRING([--enable-install-libxf86config],
[Install libxf86config (default: disabled)]),
[INSTALL_LIBXF86CONFIG=$enableval],
[INSTALL_LIBXF86CONFIG=no])
2008-11-28 05:01:57 +01:00
AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]),
[SYMBOL_VISIBILITY=$enableval],
[SYMBOL_VISIBILITY=auto])
2005-08-21 21:15:11 +02:00
2007-04-05 18:14:31 +02:00
dnl GLX build options
AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerated indirect GLX (default: enabled)]),
[AIGLX=$enableval],
[AIGLX=yes])
2011-04-24 06:24:27 +02:00
XORG_TLS
2010-12-22 22:39:48 +01:00
AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: auto)]),
2011-03-23 03:01:48 +01:00
[GLX_USE_TLS=$enableval
if test "x$GLX_USE_TLS" = "xyes" && test "${ac_cv_tls}" = "none" ; then
AC_MSG_ERROR([GLX with TLS support requested, but the compiler does not support it.])
fi],
2010-12-22 22:39:48 +01:00
[GLX_USE_TLS=no
if test "${ac_cv_tls}" != "none" ; then
GLX_USE_TLS=yes
fi])
AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
2011-04-06 17:23:45 +02:00
AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-khronos-spec-dir=PATH], [Path to Khronos OpenGL registry database files (default: auto)]),
[KHRONOS_SPEC_DIR="${withval}"],
[KHRONOS_SPEC_DIR=auto])
2007-04-05 18:14:31 +02:00
2005-08-21 21:15:11 +02:00
dnl Extensions.
2007-10-11 20:17:17 +02:00
AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes])
2008-04-29 00:42:02 +02:00
AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes])
2011-11-04 19:30:43 +01:00
AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: auto)]), [MITSHM=$enableval], [MITSHM=auto])
2005-10-17 19:11:12 +02:00
AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes])
2010-04-09 04:55:45 +02:00
AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes])
2005-10-17 19:11:12 +02:00
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
2005-12-01 23:06:49 +01:00
AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
2006-08-10 19:28:06 +02:00
AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
2005-10-17 19:11:12 +02:00
AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes])
AC_ARG_ENABLE(xdmcp, AS_HELP_STRING([--disable-xdmcp], [Build XDMCP extension (default: auto)]), [XDMCP=$enableval], [XDMCP=auto])
AC_ARG_ENABLE(xdm-auth-1, AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto])
AC_ARG_ENABLE(glx, AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes])
AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval])
2008-08-11 22:59:17 +02:00
AC_ARG_ENABLE(dri2, AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: auto)]), [DRI2=$enableval], [DRI2=auto])
2005-10-17 19:11:12 +02:00
AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
2006-08-10 19:28:06 +02:00
AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto])
2007-04-05 18:14:31 +02:00
AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
2010-04-26 18:39:19 +02:00
AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--enable-xselinux], [Build SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no])
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--enable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no])
2006-08-29 23:07:15 +02:00
AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
2005-11-02 16:56:40 +01:00
AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
2010-04-26 18:39:19 +02:00
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--enable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no])
2006-07-11 01:37:53 +02:00
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
2010-03-24 02:08:55 +01:00
AC_ARG_ENABLE(config-udev, AS_HELP_STRING([--enable-config-udev], [Build udev support (default: auto)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=auto])
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
AC_ARG_ENABLE(config-udev-kms, AS_HELP_STRING([--enable-config-udev-kms], [Build udev kms support (default: auto)]), [CONFIG_UDEV_KMS=$enableval], [CONFIG_UDEV_KMS=auto])
2007-08-01 19:08:31 +02:00
AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no])
2007-08-01 00:10:50 +02:00
AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
2011-09-18 12:46:52 +02:00
AC_ARG_ENABLE(config-wscons, AS_HELP_STRING([--enable-config-wscons], [Build wscons config support (default: auto)]), [CONFIG_WSCONS=$enableval], [CONFIG_WSCONS=auto])
2006-09-22 05:58:32 +02:00
AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
2009-07-10 14:38:51 +02:00
AC_ARG_ENABLE(vgahw, AS_HELP_STRING([--enable-vgahw], [Build Xorg with vga access (default: enabled)]), [VGAHW=$enableval], [VGAHW=yes])
2009-07-10 14:54:07 +02:00
AC_ARG_ENABLE(vbe, AS_HELP_STRING([--enable-vbe], [Build Xorg with VBE module (default: enabled)]), [VBE=$enableval], [VBE=yes])
2009-07-10 15:09:08 +02:00
AC_ARG_ENABLE(int10-module, AS_HELP_STRING([--enable-int10-module], [Build Xorg with int10 module (default: enabled)]), [INT10MODULE=$enableval], [INT10MODULE=yes])
2010-02-24 22:17:42 +01:00
AC_ARG_ENABLE(windowswm, AS_HELP_STRING([--enable-windowswm], [Build XWin with WindowsWM extension (default: no)]), [WINDOWSWM=$enableval], [WINDOWSWM=no])
2010-01-22 17:34:36 +01:00
AC_ARG_ENABLE(libdrm, AS_HELP_STRING([--enable-libdrm], [Build Xorg with libdrm support (default: enabled)]), [DRM=$enableval],[DRM=yes])
2010-12-22 15:51:09 +01:00
AC_ARG_ENABLE(clientids, AS_HELP_STRING([--disable-clientids], [Build Xorg with client ID tracking (default: enabled)]), [CLIENTIDS=$enableval], [CLIENTIDS=yes])
2010-06-01 12:05:47 +02:00
AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes])
2005-08-21 21:15:11 +02:00
dnl DDXes.
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
2009-09-14 00:00:42 +02:00
AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: auto)]), [DMX=$enableval], [DMX=auto])
2005-08-21 21:15:11 +02:00
AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
2009-09-24 12:57:02 +02:00
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
2007-11-22 04:51:14 +01:00
AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
2009-06-02 19:49:09 +02:00
AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no])
2008-04-20 17:35:42 +02:00
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
2006-04-01 23:02:40 +02:00
dnl kdrive and its subsystems
2005-12-27 09:31:37 +01:00
AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
2005-12-28 02:01:06 +01:00
AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
2006-07-19 22:51:04 +02:00
AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto])
AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto])
2010-01-04 09:07:04 +01:00
dnl kdrive options
2010-01-16 19:45:32 +01:00
AC_ARG_ENABLE(kdrive-kbd, AS_HELP_STRING([--enable-kdrive-kbd], [Build kbd driver for kdrive (default: auto)]), [KDRIVE_KBD=$enableval], [KDRIVE_KBD=auto])
AC_ARG_ENABLE(kdrive-mouse, AC_HELP_STRING([--enable-kdrive-mouse], [Build mouse driver for kdrive (default: auto)]), [KDRIVE_MOUSE=$enableval], [KDRIVE_MOUSE=auto])
AC_ARG_ENABLE(kdrive-evdev, AC_HELP_STRING([--enable-kdrive-evdev], [Build evdev driver for kdrive (default: auto)]), [KDRIVE_EVDEV=$enableval], [KDRIVE_EVDEV=auto])
2006-04-01 23:02:40 +02:00
2005-08-21 21:15:11 +02:00
2005-09-20 17:50:31 +02:00
dnl chown/chmod to be setuid root as part of build
dnl Replaces InstallXserverSetUID in imake
AC_ARG_ENABLE(install-setuid,
AS_HELP_STRING([--enable-install-setuid],
[Install Xorg server as owned by root with setuid bit (default: auto)]),
[SETUID=$enableval], [SETUID=auto])
2005-09-27 16:09:31 +02:00
AC_MSG_CHECKING([to see if we can install the Xorg server as root])
2005-09-20 17:50:31 +02:00
if test "x$SETUID" = "xauto" ; then
case $host_os in
2010-03-22 18:47:52 +01:00
cygwin*) SETUID="no" ;;
2011-11-04 19:26:14 +01:00
mingw*) SETUID="no" ;;
2005-09-20 17:50:31 +02:00
darwin*) SETUID="no" ;;
*)
case $host_cpu in
sparc) SETUID="no" ;;
*) SETUID="yes" ;;
esac
esac
2005-09-27 16:09:31 +02:00
if test "x$SETUID" = xyes; then
touch testfile
chown root testfile > /dev/null 2>&1 || SETUID="no"
rm -f testfile
fi
2005-09-20 17:50:31 +02:00
fi
2005-09-27 16:09:31 +02:00
AC_MSG_RESULT([$SETUID])
2005-09-20 17:50:31 +02:00
AM_CONDITIONAL(INSTALL_SETUID, [test "x$SETUID" = "xyes"])
2005-09-03 05:27:55 +02:00
dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
2006-07-19 23:01:20 +02:00
dnl was not expanded, since xorg-server with no transport types is rather useless.
2005-09-03 05:27:55 +02:00
dnl
dnl If you're seeing an error here, be sure you installed the lib/xtrans module
dnl first and if it's not in the default location, that you set the ACLOCAL
dnl environment variable to find it, such as:
dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
2009-10-06 16:08:42 +02:00
m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$])
2005-09-03 05:27:55 +02:00
# Transport selection macro from xtrans.m4
XTRANS_CONNECTION_FLAGS
2005-07-01 22:29:53 +02:00
2005-09-03 05:27:55 +02:00
# Secure RPC detection macro from xtrans.m4
XTRANS_SECURE_RPC_FLAGS
2007-08-18 00:29:16 +02:00
AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes])
2005-07-12 03:20:36 +02:00
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86])
AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu])
AM_CONDITIONAL(INT10_STUB, [test "x$INT10" = xstub])
2005-07-14 05:32:09 +02:00
2005-11-23 08:14:46 +01:00
dnl Handle installing libxf86config
AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes])
2010-03-24 06:08:23 +01:00
dnl DDX Detection... Yes, it's ugly to have it here... but we need to
dnl handle this early on so that we don't require unsupported extensions
2008-04-29 00:42:02 +02:00
case $host_os in
2012-01-03 01:14:32 +01:00
cygwin* | mingw*)
2012-03-29 09:06:36 +02:00
CONFIG_DBUS_API=no
CONFIG_HAL=no
CONFIG_UDEV=no
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
CONFIG_UDEV_KMS=no
2010-03-24 06:08:23 +01:00
DGA=no
DRI2=no
2012-03-29 09:06:36 +02:00
INT10MODULE=no
PCI=no
VGAHW=no
VBE=no
XF86UTILS=no
2010-03-24 06:08:23 +01:00
XF86VIDMODE=no
XSELINUX=no
XV=no
2012-03-29 09:06:36 +02:00
SYMBOL_VISIBILITY=no
2010-03-24 06:08:23 +01:00
;;
2008-04-29 00:42:02 +02:00
darwin*)
2011-09-14 17:37:38 +02:00
PCI=no
INT10MODULE=no
VGAHW=no
VBE=no
DRM=no
2009-01-10 10:39:08 +01:00
DRI2=no
2008-04-29 00:42:02 +02:00
if test x$XQUARTZ = xauto; then
AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -framework Carbon"
2011-10-03 20:23:16 +02:00
AC_LINK_IFELSE([AC_LANG_SOURCE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}])],
2011-04-22 00:51:32 +02:00
[xorg_cv_Carbon_framework=yes],
[xorg_cv_Carbon_framework=no])
LDFLAGS=$save_LDFLAGS])
2008-04-29 00:42:02 +02:00
if test "X$xorg_cv_Carbon_framework" = Xyes; then
XQUARTZ=yes
else
XQUARTZ=no
fi
fi
2011-04-22 00:51:32 +02:00
AC_CHECK_FUNC(dispatch_async,
AC_DEFINE([HAVE_LIBDISPATCH], 1, [Define to 1 if you have the libdispatch (GCD) available]),
[])
2008-04-29 00:42:02 +02:00
if test "x$XQUARTZ" = xyes ; then
XQUARTZ=yes
XVFB=no
XNEST=no
COMPOSITE=no
DGA=no
DPMSExtension=no
XF86VIDMODE=no
fi
;;
2009-10-03 05:44:19 +02:00
*) XQUARTZ=no ;;
2008-04-29 00:42:02 +02:00
esac
2005-08-21 21:15:11 +02:00
dnl ---------------------------------------------------------------------------
dnl Extension section
dnl ---------------------------------------------------------------------------
XEXT_INC='-I$(top_srcdir)/Xext'
XEXT_LIB='$(top_builddir)/Xext/libXext.la'
2005-07-05 00:18:40 +02:00
2009-09-15 07:05:27 +02:00
dnl Optional modules
VIDEOPROTO="videoproto"
COMPOSITEPROTO="compositeproto >= 0.4"
RECORDPROTO="recordproto >= 1.13.99.1"
SCRNSAVERPROTO="scrnsaverproto >= 1.1"
2011-04-07 11:53:51 +02:00
RESOURCEPROTO="resourceproto >= 1.2.0"
2009-09-15 07:05:27 +02:00
DRIPROTO="xf86driproto >= 2.1.0"
2012-07-07 11:20:58 +02:00
DRI2PROTO="dri2proto >= 2.8"
2009-09-15 07:05:27 +02:00
XINERAMAPROTO="xineramaproto"
BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
DGAPROTO="xf86dgaproto >= 2.0.99.1"
2012-07-14 16:07:51 +02:00
GLPROTO="glproto >= 1.4.16"
2009-09-16 02:58:52 +02:00
DMXPROTO="dmxproto >= 2.2.99.1"
2009-09-15 07:05:27 +02:00
VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
WINDOWSWMPROTO="windowswmproto"
APPLEWMPROTO="applewmproto >= 1.4"
2011-12-14 01:31:23 +01:00
dnl Required modules
XPROTO="xproto >= 7.0.22"
2012-07-05 22:11:16 +02:00
RANDRPROTO="randrproto >= 1.4.0"
2011-12-14 01:31:23 +01:00
RENDERPROTO="renderproto >= 0.11"
XEXTPROTO="xextproto >= 7.1.99"
2013-03-12 17:37:43 +01:00
INPUTPROTO="inputproto >= 2.3"
2011-12-14 01:31:23 +01:00
KBPROTO="kbproto >= 1.0.3"
FONTSPROTO="fontsproto"
FIXESPROTO="fixesproto >= 5.0"
DAMAGEPROTO="damageproto >= 1.1"
XCMISCPROTO="xcmiscproto >= 1.2.0"
BIGREQSPROTO="bigreqsproto >= 1.1.0"
XTRANS="xtrans >= 1.2.2"
2009-09-23 13:49:11 +02:00
dnl List of libraries that require a specific version
LIBAPPLEWM="applewm >= 1.4"
2009-10-05 02:44:43 +02:00
LIBDMX="dmx >= 1.0.99.1"
2010-01-27 18:10:41 +01:00
LIBDRI="dri >= 7.8.0"
2009-09-23 13:49:11 +02:00
LIBDRM="libdrm >= 2.3.0"
LIBGL="gl >= 7.1.0"
2009-09-22 12:34:54 +02:00
LIBXEXT="xext >= 1.0.99.4"
2010-06-23 14:18:03 +02:00
LIBXFONT="xfont >= 1.4.2"
2009-09-23 13:49:11 +02:00
LIBXI="xi >= 1.2.99.1"
2009-10-05 02:44:43 +02:00
LIBXTST="xtst >= 1.0.99.2"
2011-05-10 23:34:23 +02:00
LIBPCIACCESS="pciaccess >= 0.12.901"
2009-09-27 14:45:47 +02:00
LIBUDEV="libudev >= 143"
2010-02-26 02:41:38 +01:00
LIBSELINUX="libselinux >= 2.0.86"
2010-06-10 06:31:48 +02:00
LIBDBUS="dbus-1 >= 1.0"
2012-05-30 11:19:08 +02:00
LIBPIXMAN="pixman-1 >= 0.27.2"
2010-06-04 04:28:43 +02:00
dnl Pixman is always required, but we separate it out so we can link
dnl specific modules against it
PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN)
2010-06-23 14:18:03 +02:00
REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau"
2011-09-14 20:45:18 +02:00
dnl Core modules for most extensions, et al.
2011-12-14 01:31:23 +01:00
SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN"
2011-09-14 20:45:18 +02:00
# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
AC_SUBST(SDK_REQUIRED_MODULES)
2011-12-14 01:31:23 +01:00
REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES"
2009-09-27 14:45:47 +02:00
if test "x$CONFIG_UDEV" = xyes &&
{ test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then
AC_MSG_ERROR([Hotplugging through both libudev and dbus/hal not allowed])
fi
PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
if test "x$CONFIG_UDEV" = xauto; then
CONFIG_UDEV="$HAVE_LIBUDEV"
fi
AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes])
if test "x$CONFIG_UDEV" = xyes; then
CONFIG_DBUS_API=no
CONFIG_HAL=no
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
if test "x$CONFIG_UDEV_KMS" = xauto; then
CONFIG_UDEV_KMS="$HAVE_LIBUDEV"
fi
2009-09-27 14:45:47 +02:00
if ! test "x$HAVE_LIBUDEV" = xyes; then
AC_MSG_ERROR([udev configuration API requested, but libudev is not installed])
fi
AC_DEFINE(CONFIG_UDEV, 1, [Use libudev for input hotplug])
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
if test "x$CONFIG_UDEV_KMS" = xyes; then
AC_DEFINE(CONFIG_UDEV_KMS, 1, [Use libudev for kms enumeration])
fi
2011-09-27 19:04:06 +02:00
SAVE_LIBS=$LIBS
SAVE_CFLAGS=$CFLAGS
CFLAGS=$UDEV_CFLAGS
LIBS=$UDEV_LIBS
AC_CHECK_FUNCS([udev_monitor_filter_add_match_tag])
AC_CHECK_FUNCS([udev_enumerate_add_match_tag])
LIBS=$SAVE_LIBS
CFLAGS=$SAVE_CFLAGS
2009-09-27 14:45:47 +02:00
fi
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
AM_CONDITIONAL(CONFIG_UDEV_KMS, [test "x$CONFIG_UDEV_KMS" = xyes])
2009-09-22 12:34:54 +02:00
2007-07-08 13:28:58 +02:00
dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config
dnl API.
2010-06-10 06:31:48 +02:00
PKG_CHECK_MODULES(DBUS, $LIBDBUS, [HAVE_DBUS=yes], [HAVE_DBUS=no])
2007-07-08 13:28:58 +02:00
if test "x$HAVE_DBUS" = xyes; then
AC_DEFINE(HAVE_DBUS, 1, [Have D-Bus support])
2006-07-19 16:05:12 +02:00
fi
2007-07-08 13:28:58 +02:00
AM_CONDITIONAL(HAVE_DBUS, [test "x$HAVE_DBUS" = xyes])
if test "x$CONFIG_DBUS_API" = xauto; then
CONFIG_DBUS_API="$HAVE_DBUS"
fi
if test "x$CONFIG_DBUS_API" = xyes; then
if ! test "x$HAVE_DBUS" = xyes; then
AC_MSG_ERROR([D-Bus configuration API requested, but D-Bus is not installed.])
fi
AC_DEFINE(CONFIG_DBUS_API, 1, [Use the D-Bus input configuration API])
2008-07-02 18:52:58 +02:00
CONFIG_NEED_DBUS="yes"
2006-07-19 16:05:12 +02:00
fi
2007-07-08 13:28:58 +02:00
AM_CONDITIONAL(CONFIG_DBUS_API, [test "x$CONFIG_DBUS_API" = xyes])
2007-08-01 00:10:50 +02:00
PKG_CHECK_MODULES(HAL, hal, [HAVE_HAL=yes], [HAVE_HAL=no])
if test "x$CONFIG_HAL" = xauto; then
CONFIG_HAL="$HAVE_HAL"
fi
if test "x$CONFIG_HAL" = xyes; then
if ! test "x$HAVE_HAL" = xyes; then
AC_MSG_ERROR([HAL hotplug API requested, but HAL is not installed.])
fi
AC_DEFINE(CONFIG_HAL, 1, [Use the HAL hotplug API])
2008-07-02 18:52:58 +02:00
CONFIG_NEED_DBUS="yes"
2007-08-01 00:10:50 +02:00
fi
AM_CONDITIONAL(CONFIG_HAL, [test "x$CONFIG_HAL" = xyes])
2008-07-02 18:52:58 +02:00
if test "x$CONFIG_NEED_DBUS" = xyes; then
AC_DEFINE(CONFIG_NEED_DBUS, 1, [Use D-Bus for input hotplug])
2006-07-19 16:05:12 +02:00
fi
2008-07-02 18:52:58 +02:00
AM_CONDITIONAL(CONFIG_NEED_DBUS, [test "x$CONFIG_NEED_DBUS" = xyes])
2006-07-19 16:05:12 +02:00
2011-09-18 12:46:52 +02:00
if test "x$CONFIG_WSCONS" = xauto; then
case $host_os in
*openbsd*)
CONFIG_WSCONS=yes;
;;
*)
CONFIG_WSCONS=no;
;;
esac
fi
AM_CONDITIONAL(CONFIG_WSCONS, [test "x$CONFIG_WSCONS" = xyes])
if test "x$CONFIG_WSCONS" = xyes; then
AC_DEFINE(CONFIG_WSCONS, 1, [Use wscons for input auto configuration])
fi
2009-09-16 06:13:48 +02:00
if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then
USE_SIGIO_BY_DEFAULT_VALUE=TRUE
else
USE_SIGIO_BY_DEFAULT_VALUE=FALSE
fi
AC_DEFINE_UNQUOTED([USE_SIGIO_BY_DEFAULT], [$USE_SIGIO_BY_DEFAULT_VALUE],
[Use SIGIO handlers for input device events by default])
2008-04-04 19:01:40 +02:00
AC_MSG_CHECKING([for glibc...])
2011-10-03 20:23:16 +02:00
AC_PREPROC_IFELSE([AC_LANG_SOURCE([
2008-04-04 19:01:40 +02:00
#include <features.h>
#ifndef __GLIBC__
#error
#endif
2011-10-03 20:23:16 +02:00
])], glibc=yes, glibc=no)
2008-04-04 19:01:40 +02:00
AC_MSG_RESULT([$glibc])
2007-08-31 21:24:07 +02:00
AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
[AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt],
[have_clock_gettime=no])])
AC_MSG_CHECKING([for a useful monotonic clock ...])
if ! test "x$have_clock_gettime" = xno; then
if ! test "x$have_clock_gettime" = xyes; then
CLOCK_LIBS="$have_clock_gettime"
else
CLOCK_LIBS=""
fi
LIBS_SAVE="$LIBS"
LIBS="$CLOCK_LIBS"
2008-04-04 19:01:40 +02:00
CPPFLAGS_SAVE="$CPPFLAGS"
if test x"$glibc" = xyes; then
2008-04-08 12:00:38 +02:00
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
2008-04-04 19:01:40 +02:00
fi
2007-08-31 21:24:07 +02:00
2011-10-03 20:23:16 +02:00
AC_RUN_IFELSE([AC_LANG_SOURCE([
2007-08-31 21:24:07 +02:00
#include <time.h>
int main(int argc, char *argv[[]]) {
struct timespec tp;
if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
return 0;
else
return 1;
}
2011-10-03 20:23:16 +02:00
])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
2007-08-31 21:24:07 +02:00
[MONOTONIC_CLOCK="cross compiling"])
LIBS="$LIBS_SAVE"
2008-04-04 19:01:40 +02:00
CPPFLAGS="$CPPFLAGS_SAVE"
2007-08-31 21:24:07 +02:00
else
MONOTONIC_CLOCK=no
fi
AC_MSG_RESULT([$MONOTONIC_CLOCK])
if test "x$MONOTONIC_CLOCK" = xyes; then
AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()])
LIBS="$LIBS $CLOCK_LIBS"
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(XV, [test "x$XV" = xyes])
if test "x$XV" = xyes; then
AC_DEFINE(XV, 1, [Support Xv extension])
2005-12-01 23:06:49 +01:00
AC_DEFINE(XvExtension, 1, [Build Xv extension])
2009-09-15 07:05:27 +02:00
REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO"
2010-06-21 02:37:26 +02:00
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO"
2006-02-16 22:35:32 +01:00
else
XVMC=no
fi
AM_CONDITIONAL(XVMC, [test "x$XVMC" = xyes])
if test "x$XVMC" = xyes; then
AC_DEFINE(XvMCExtension, 1, [Build XvMC extension])
2005-07-05 00:18:40 +02:00
fi
2007-10-11 20:17:17 +02:00
AM_CONDITIONAL(XREGISTRY, [test "x$XREGISTRY" = xyes])
if test "x$XREGISTRY" = xyes; then
AC_DEFINE(XREGISTRY, 1, [Build registry module])
fi
2005-10-05 23:38:40 +02:00
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes])
if test "x$COMPOSITE" = xyes; then
AC_DEFINE(COMPOSITE, 1, [Support Composite Extension])
2009-09-15 07:05:27 +02:00
REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO"
2005-08-21 21:15:11 +02:00
COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la'
COMPOSITE_INC='-I$(top_srcdir)/composite'
2005-07-01 22:29:53 +02:00
fi
2011-11-04 19:30:43 +01:00
if test "x$MITSHM" = xauto; then
MITSHM="$ac_cv_sysv_ipc"
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes])
if test "x$MITSHM" = xyes; then
AC_DEFINE(MITSHM, 1, [Support MIT-SHM extension])
AC_DEFINE(HAS_SHM, 1, [Support SHM])
2005-07-01 22:29:53 +02:00
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes])
if test "x$RECORD" = xyes; then
AC_DEFINE(XRECORD, 1, [Support Record extension])
2009-09-15 07:05:27 +02:00
REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO"
2005-08-21 21:15:11 +02:00
RECORD_LIB='$(top_builddir)/record/librecord.la'
2005-07-01 22:29:53 +02:00
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes])
if test "x$SCREENSAVER" = xyes; then
AC_DEFINE(SCREENSAVER, 1, [Support MIT-SCREEN-SAVER extension])
2009-09-15 07:05:27 +02:00
REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO"
2005-07-01 22:29:53 +02:00
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(RES, [test "x$RES" = xyes])
2005-10-21 20:23:33 +02:00
if test "x$RES" = xyes; then
2005-08-21 21:15:11 +02:00
AC_DEFINE(RES, 1, [Support X resource extension])
2009-09-15 07:05:27 +02:00
REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO"
2005-07-01 22:29:53 +02:00
fi
2005-08-21 21:15:11 +02:00
2010-12-22 15:51:09 +01:00
# The XRes extension may support client ID tracking only if it has
# been specifically enabled. Client ID tracking is implicitly not
# supported if XRes extension is disabled.
AC_MSG_CHECKING([whether to track client ids])
if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then
AC_DEFINE(CLIENTIDS, 1, [Support client ID tracking])
else
CLIENTIDS=no
fi
2012-01-02 14:23:59 +01:00
if test "x$CLIENTIDS" = xyes; then
case $host_os in
openbsd*)
SYS_LIBS="$SYS_LIBS -lkvm"
;;
esac
fi
2010-12-22 15:51:09 +01:00
AC_MSG_RESULT([$CLIENTIDS])
AM_CONDITIONAL(CLIENTIDS, [test "x$CLIENTIDS" = xyes])
2008-05-22 01:14:55 +02:00
if test "x$GLX" = xyes; then
2005-11-19 08:15:50 +01:00
PKG_CHECK_MODULES([XLIB], [x11])
2009-09-23 13:49:11 +02:00
PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL)
2005-11-19 08:15:50 +01:00
AC_SUBST(XLIB_CFLAGS)
2005-08-21 21:15:11 +02:00
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
2008-05-21 19:33:36 +02:00
GLX_LIBS='$(top_builddir)/glx/libglx.la'
2009-10-29 19:46:22 +01:00
GLX_SYS_LIBS="$GLX_SYS_LIBS"
2005-07-16 18:30:40 +02:00
else
GLX=no
2005-07-01 22:29:53 +02:00
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(GLX, test "x$GLX" = xyes)
2005-07-01 22:29:53 +02:00
2010-04-16 22:55:01 +02:00
if test "x$GLX" = xno; then
AIGLX=no
fi
if test "x$AIGLX" = xyes -a \( "x$DRI" = xyes -o "x$DRI2" = xyes \); then
2006-03-12 01:11:34 +01:00
AC_DEFINE(AIGLX, 1, [Build AIGLX loader])
fi
2010-04-16 22:55:01 +02:00
AM_CONDITIONAL(AIGLX_DRI_LOADER, { test "x$DRI" = xyes || test "x$DRI2" = xyes; } && test "x$AIGLX" = xyes)
2006-03-12 01:11:34 +01:00
2011-01-31 23:25:10 +01:00
if test "x$GLX_USE_TLS" = xyes ; then
2006-03-28 04:57:07 +02:00
GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
2007-08-31 21:24:07 +02:00
GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread"
2006-03-28 04:57:07 +02:00
fi
AC_SUBST([GLX_DEFINES])
2012-03-29 09:13:27 +02:00
AC_SUBST([GLX_SYS_LIBS])
2006-03-28 04:57:07 +02:00
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(DRI, test "x$DRI" = xyes)
if test "x$DRI" = xyes; then
AC_DEFINE(XF86DRI, 1, [Build DRI extension])
2012-07-10 03:03:15 +02:00
REQUIRED_MODULES="$REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI"
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI"
2005-07-01 22:29:53 +02:00
fi
2009-09-15 07:05:27 +02:00
PKG_CHECK_MODULES([DRI2PROTO], $DRI2PROTO,
2008-08-11 22:59:17 +02:00
[HAVE_DRI2PROTO=yes], [HAVE_DRI2PROTO=no])
case "$DRI2,$HAVE_DRI2PROTO" in
yes,no)
AC_MSG_ERROR([DRI2 requested, but dri2proto not found.])
;;
yes,yes | auto,yes)
AC_DEFINE(DRI2, 1, [Build DRI2 extension])
DRI2=yes
2010-06-21 02:37:26 +02:00
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO"
2008-08-11 22:59:17 +02:00
;;
esac
2009-04-15 19:06:19 +02:00
AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
2008-02-04 17:58:24 +01:00
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
2010-01-22 17:34:36 +01:00
if test "x$DRM" = xyes; then
AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support])
PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
fi
2008-11-15 13:27:42 +01:00
fi
2008-12-03 17:22:38 +01:00
if test "x$DRI2" = xyes; then
save_CFLAGS=$CFLAGS
2009-07-29 00:02:37 +02:00
CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS"
2008-12-03 17:22:38 +01:00
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
#ifndef __DRI_DRI2
#error DRI2 extension not available.
#endif]])],
[HAVE_DRI2EXTENSION=yes],
[HAVE_DRI2EXTENSION=no])
CFLAGS=$save_CFLAGS
if test "x$HAVE_DRI2EXTENSION" = xyes; then
AC_DEFINE(DRI2_AIGLX, 1, [Build DRI2 AIGLX loader])
DRI2_AIGLX=yes
else
AC_MSG_NOTICE([DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h.])
DRI2_AIGLX=no
fi
fi
2009-04-15 19:06:19 +02:00
AM_CONDITIONAL(DRI2_AIGLX, test "x$DRI2_AIGLX" = xyes)
2008-12-03 17:22:38 +01:00
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
if test "x$XINERAMA" = xyes; then
AC_DEFINE(XINERAMA, 1, [Support Xinerama extension])
AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama])
2009-09-15 07:05:27 +02:00
REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO"
2010-06-21 02:37:26 +02:00
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO"
2005-07-01 22:29:53 +02:00
fi
2005-08-21 21:15:11 +02:00
2006-06-21 04:01:34 +02:00
AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])
if test "x$XACE" = xyes; then
AC_DEFINE(XACE, 1, [Build X-ACE extension])
fi
2006-09-08 21:15:19 +02:00
AM_CONDITIONAL(XSELINUX, [test "x$XSELINUX" = xyes])
if test "x$XSELINUX" = xyes; then
if test "x$XACE" != xyes; then
AC_MSG_ERROR([cannot build SELinux extension without X-ACE])
fi
AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers]))
2006-10-27 02:20:57 +02:00
AC_CHECK_LIB(audit, audit_open, [], AC_MSG_ERROR([SELinux extension requires audit system library]))
2010-02-26 02:41:38 +01:00
PKG_CHECK_MODULES([SELINUX], $LIBSELINUX)
2009-10-22 01:28:26 +02:00
SELINUX_LIBS="$SELINUX_LIBS -laudit"
2006-09-08 21:15:19 +02:00
AC_DEFINE(XSELINUX, 1, [Build SELinux extension])
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes])
if test "x$XCSECURITY" = xyes; then
2006-06-21 04:01:34 +02:00
if test "x$XACE" != xyes; then
AC_MSG_ERROR([cannot build Security extension without X-ACE])
fi
2005-08-21 21:15:11 +02:00
AC_DEFINE(XCSECURITY, 1, [Build Security extension])
2005-07-01 22:29:53 +02:00
fi
2005-08-21 21:15:11 +02:00
2005-11-02 16:56:40 +01:00
AM_CONDITIONAL(DBE, [test "x$DBE" = xyes])
if test "x$DBE" = xyes; then
AC_DEFINE(DBE, 1, [Support DBE extension])
DBE_LIB='$(top_builddir)/dbe/libdbe.la'
2012-07-10 03:03:01 +02:00
DBE_INC='-I$(top_srcdir)/dbe'
2005-11-02 16:56:40 +01:00
fi
2006-02-16 08:17:31 +01:00
AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes])
if test "x$XF86BIGFONT" = xyes; then
AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension])
2009-09-15 07:05:27 +02:00
REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO"
2006-02-16 08:17:31 +01:00
fi
AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes])
if test "x$DPMSExtension" = xyes; then
AC_DEFINE(DPMSExtension, 1, [Support DPMS extension])
fi
2005-08-21 21:15:11 +02:00
AC_DEFINE(RENDER, 1, [Support RENDER extension])
RENDER_LIB='$(top_builddir)/render/librender.la'
RENDER_INC='-I$(top_srcdir)/render'
AC_DEFINE(RANDR, 1, [Support RANDR extension])
RANDR_LIB='$(top_builddir)/randr/librandr.la'
RANDR_INC='-I$(top_srcdir)/randr'
AC_DEFINE(XFIXES,1,[Support XFixes extension])
FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la'
FIXES_INC='-I$(top_srcdir)/xfixes'
AC_DEFINE(DAMAGE,1,[Support Damage extension])
DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la'
DAMAGE_INC='-I$(top_srcdir)/damageext'
MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la'
MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage'
2008-04-25 09:19:35 +02:00
# XINPUT extension is integral part of the server
2010-03-22 00:20:49 +01:00
AC_DEFINE(XINPUT, 1, [Support X Input extension])
2006-07-19 23:00:23 +02:00
XI_LIB='$(top_builddir)/Xi/libXi.la'
XI_INC='-I$(top_srcdir)/Xi'
2005-08-21 21:15:11 +02:00
2006-09-22 05:58:32 +02:00
AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes)
2009-07-10 14:38:51 +02:00
AM_CONDITIONAL(VGAHW, test "x$VGAHW" = xyes)
2009-07-10 14:54:07 +02:00
AM_CONDITIONAL(VBE, test "x$VBE" = xyes)
2009-07-10 15:09:08 +02:00
AM_CONDITIONAL(INT10MODULE, test "x$INT10MODULE" = xyes)
2006-09-22 05:58:32 +02:00
2005-08-21 21:15:11 +02:00
AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
2009-01-10 13:36:16 +01:00
AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data])
2009-10-21 09:46:55 +02:00
AC_ARG_WITH(xkb-bin-directory,
AS_HELP_STRING([--with-xkb-bin-directory=DIR], [Directory containing xkbcomp program]),
[XKB_BIN_DIRECTORY="$withval"],
[XKB_BIN_DIRECTORY="$bindir"])
AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir])
2009-01-10 13:36:16 +01:00
dnl Make sure XKM_OUTPUT_DIR is an absolute path
XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
2009-10-21 09:46:55 +02:00
if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then
2009-01-10 13:36:16 +01:00
XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
fi
dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
dnl XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused
2010-03-23 10:47:27 +01:00
XKBOUTPUT=`echo $XKBOUTPUT/ | $SED 's|/*$|/|'`
XKB_COMPILED_DIR=`echo $XKBOUTPUT | $SED 's|/*$||'`
2009-01-10 13:36:16 +01:00
AC_DEFINE_DIR(XKM_OUTPUT_DIR, XKBOUTPUT, [Path to XKB output dir])
AC_SUBST(XKB_COMPILED_DIR)
if test "x$XKB_DFLT_RULES" = x; then
case $host_os in
linux*)
dnl doesn't take AutoAddDevices into account, but whatever.
2011-07-26 20:40:38 +02:00
XKB_DFLT_RULES="evdev"
2009-01-10 13:36:16 +01:00
;;
*)
XKB_DFLT_RULES="base"
;;
esac
fi
AC_DEFINE_UNQUOTED(XKB_DFLT_RULES, ["$XKB_DFLT_RULES"], [Default XKB ruleset])
AC_DEFINE_UNQUOTED(XKB_DFLT_MODEL, ["$XKB_DFLT_MODEL"], [Default XKB model])
AC_DEFINE_UNQUOTED(XKB_DFLT_LAYOUT, ["$XKB_DFLT_LAYOUT"], [Default XKB layout])
AC_DEFINE_UNQUOTED(XKB_DFLT_VARIANT, ["$XKB_DFLT_VARIANT"], [Default XKB variant])
AC_DEFINE_UNQUOTED(XKB_DFLT_OPTIONS, ["$XKB_DFLT_OPTIONS"], [Default XKB options])
2011-06-11 19:41:48 +02:00
AC_SUBST([XKB_DFLT_RULES])
AC_SUBST([XKB_DFLT_MODEL])
AC_SUBST([XKB_DFLT_LAYOUT])
AC_SUBST([XKB_DFLT_VARIANT])
AC_SUBST([XKB_DFLT_OPTIONS])
2009-01-10 13:36:16 +01:00
2005-08-21 21:15:11 +02:00
XKB_LIB='$(top_builddir)/xkb/libxkb.la'
XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
2009-01-10 13:36:16 +01:00
REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
2005-07-01 22:29:53 +02:00
2005-08-21 21:15:11 +02:00
PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"])
if test "x$have_libxdmcp" = xyes; then
AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS])
fi
if test "x$XDMCP" = xauto; then
if test "x$have_libxdmcp" = xyes; then
2005-07-01 22:29:53 +02:00
XDMCP=yes
else
XDMCP=no
fi
fi
2005-08-21 21:15:11 +02:00
if test "x$XDMAUTH" = xauto; then
if test "x$have_libxdmcp" = xyes && test "x$have_xdmcpwrap" = xyes; then
2005-07-01 22:29:53 +02:00
XDMAUTH=yes
else
XDMAUTH=no
fi
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(XDMCP, [test "x$XDMCP" = xyes])
if test "x$XDMCP" = xyes; then
AC_DEFINE(XDMCP, 1, [Support XDM Control Protocol])
2005-11-29 17:39:33 +01:00
REQUIRED_LIBS="$REQUIRED_LIBS xdmcp"
2005-10-05 17:33:40 +02:00
XDMCP_MODULES="xdmcp"
2005-07-01 22:29:53 +02:00
fi
2005-08-21 21:15:11 +02:00
AM_CONDITIONAL(XDMAUTH, [test "x$XDMAUTH" = xyes])
if test "x$XDMAUTH" = xyes; then
2005-07-01 22:29:53 +02:00
AC_DEFINE(HASXDMAUTH,1,[Support XDM-AUTH*-1])
2005-08-21 21:15:11 +02:00
if ! test "x$XDMCP" = xyes; then
2005-11-29 17:39:33 +01:00
REQUIRED_LIBS="$REQUIRED_LIBS xdmcp"
2005-10-05 17:33:40 +02:00
XDMCP_MODULES="xdmcp"
2005-07-01 22:29:53 +02:00
fi
fi
2005-09-01 16:56:35 +02:00
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
2007-11-26 21:24:15 +01:00
AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path])
2009-10-16 05:40:02 +02:00
AC_DEFINE_DIR(BASE_FONT_PATH, FONTROOTDIR, [Default base font path])
2010-09-25 16:05:10 +02:00
dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`
AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default DRI driver path])
2007-09-05 21:34:29 +02:00
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name])
AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name])
2005-11-08 23:47:57 +01:00
AC_DEFINE_UNQUOTED(XORG_DATE, ["$RELEASE_DATE"], [Vendor release])
2005-11-03 18:08:06 +01:00
AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version])
2005-07-01 22:29:53 +02:00
AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address])
2007-05-02 17:20:48 +02:00
if test -z "$OSNAME"; then
OSNAME="UNKNOWN"
fi
2005-07-12 03:20:36 +02:00
AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name])
AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor])
2007-02-12 23:22:39 +01:00
AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string])
2007-09-05 21:34:29 +02:00
AC_SUBST([VENDOR_NAME_SHORT])
2009-04-08 23:17:39 +02:00
AC_DEFINE_UNQUOTED(VENDOR_NAME, ["$VENDOR_NAME"], [Vendor name])
AC_DEFINE_UNQUOTED(VENDOR_NAME_SHORT, ["$VENDOR_NAME_SHORT"], [Vendor name])
AC_DEFINE_UNQUOTED(VENDOR_RELEASE, [$VENDOR_RELEASE], [Vendor release])
AC_DEFINE_UNQUOTED(VENDOR_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version])
2005-07-01 22:29:53 +02:00
2006-02-15 22:09:14 +01:00
AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrapper])
2005-07-01 22:29:53 +02:00
2006-07-19 22:51:04 +02:00
if test "x$DEBUGGING" = xyes; then
AC_DEFINE(DEBUG, 1, [Enable debugging code])
fi
AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes])
2005-08-21 21:15:11 +02:00
AC_DEFINE(XTEST, 1, [Support XTest extension])
AC_DEFINE(XSYNC, 1, [Support XSync extension])
AC_DEFINE(XCMISC, 1, [Support XCMisc extension])
AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
2009-10-06 01:52:19 +02:00
if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
2006-11-03 21:54:43 +01:00
DIX_LIB='$(top_builddir)/dix/dix.O'
2013-02-21 00:02:44 +01:00
OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
2006-11-03 21:54:43 +01:00
else
DIX_LIB='$(top_builddir)/dix/libdix.la'
OS_LIB='$(top_builddir)/os/libos.la'
fi
2009-09-16 04:17:48 +02:00
AC_SUBST([DIX_LIB])
AC_SUBST([OS_LIB])
2009-04-22 05:26:40 +02:00
MAIN_LIB='$(top_builddir)/dix/libmain.la'
AC_SUBST([MAIN_LIB])
2005-07-01 22:29:53 +02:00
MI_LIB='$(top_builddir)/mi/libmi.la'
MI_EXT_LIB='$(top_builddir)/mi/libmiext.la'
MI_INC='-I$(top_srcdir)/mi'
2005-07-12 03:20:36 +02:00
FB_LIB='$(top_builddir)/fb/libfb.la'
2005-07-01 22:29:53 +02:00
FB_INC='-I$(top_srcdir)/fb'
2005-08-21 21:15:11 +02:00
MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow'
MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la'
2010-06-29 00:39:04 +02:00
MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync'
MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la'
2005-07-03 14:17:04 +02:00
CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
2005-07-01 22:29:53 +02:00
2009-10-14 23:30:55 +02:00
# SHA1 hashing
AC_ARG_WITH([sha1],
2012-10-30 04:37:37 +01:00
[AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
2009-10-14 23:30:55 +02:00
[choose SHA1 implementation])])
2009-11-02 11:11:24 +01:00
AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
with_sha1=libc
fi
if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then
AC_MSG_ERROR([libc requested but not found])
fi
if test "x$with_sha1" = xlibc; then
AC_DEFINE([HAVE_SHA1_IN_LIBC], [1],
[Use libc SHA1 functions])
SHA1_LIBS=""
fi
2009-11-06 03:13:07 +01:00
AC_CHECK_FUNC([CC_SHA1_Init], [HAVE_SHA1_IN_COMMONCRYPTO=yes])
if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then
with_sha1=CommonCrypto
fi
if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then
AC_MSG_ERROR([CommonCrypto requested but not found])
fi
if test "x$with_sha1" = xCommonCrypto; then
AC_DEFINE([HAVE_SHA1_IN_COMMONCRYPTO], [1],
[Use CommonCrypto SHA1 functions])
SHA1_LIBS=""
fi
2012-04-26 08:49:06 +02:00
dnl stdcall functions cannot be tested with AC_CHECK_LIB
AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include <windows.h>])
if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then
with_sha1=CryptoAPI
fi
if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then
AC_MSG_ERROR([CryptoAPI requested but not found])
fi
if test "x$with_sha1" = xCryptoAPI; then
AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1],
[Use CryptoAPI SHA1 functions])
SHA1_LIBS=""
fi
2009-10-14 23:30:55 +02:00
AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes])
if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
with_sha1=libmd
2008-09-23 18:22:07 +02:00
fi
2009-10-14 23:30:55 +02:00
if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then
AC_MSG_ERROR([libmd requested but not found])
fi
if test "x$with_sha1" = xlibmd; then
AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1],
[Use libmd SHA1 functions])
SHA1_LIBS=-lmd
fi
2010-06-04 15:27:28 +02:00
PKG_CHECK_MODULES([LIBSHA1], [libsha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no])
2009-10-28 20:54:00 +01:00
if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then
with_sha1=libsha1
fi
2010-04-14 20:18:28 +02:00
if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then
AC_MSG_ERROR([libsha1 requested but not found])
fi
2009-10-28 20:54:00 +01:00
if test "x$with_sha1" = xlibsha1; then
AC_DEFINE([HAVE_SHA1_IN_LIBSHA1], [1],
[Use libsha1 for SHA1])
SHA1_LIBS=-lsha1
fi
2012-10-30 04:37:37 +01:00
AC_CHECK_LIB([nettle], [nettle_sha1_init], [HAVE_LIBNETTLE=yes])
if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then
with_sha1=libnettle
fi
if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then
AC_MSG_ERROR([libnettle requested but not found])
fi
if test "x$with_sha1" = xlibnettle; then
AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1],
[Use libnettle SHA1 functions])
SHA1_LIBS=-lnettle
fi
2010-04-13 20:32:51 +02:00
AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes])
if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then
with_sha1=libgcrypt
fi
2010-04-14 20:18:28 +02:00
if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then
AC_MSG_ERROR([libgcrypt requested but not found])
fi
2010-04-13 20:32:51 +02:00
if test "x$with_sha1" = xlibgcrypt; then
AC_DEFINE([HAVE_SHA1_IN_LIBGCRYPT], [1],
[Use libgcrypt SHA1 functions])
SHA1_LIBS=-lgcrypt
fi
2009-10-14 23:30:55 +02:00
# We don't need all of the OpenSSL libraries, just libcrypto
AC_CHECK_LIB([crypto], [SHA1_Init], [HAVE_LIBCRYPTO=yes])
PKG_CHECK_MODULES([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes],
[HAVE_OPENSSL_PKC=no])
if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then
if test "x$with_sha1" = x; then
with_sha1=libcrypto
fi
else
if test "x$with_sha1" = xlibcrypto; then
AC_MSG_ERROR([OpenSSL libcrypto requested but not found])
fi
fi
if test "x$with_sha1" = xlibcrypto; then
if test "x$HAVE_LIBCRYPTO" = xyes; then
SHA1_LIBS=-lcrypto
else
SHA1_LIBS="$OPENSSL_LIBS"
SHA1_CFLAGS="$OPENSSL_CFLAGS"
fi
fi
2009-11-06 03:28:28 +01:00
AC_MSG_CHECKING([for SHA1 implementation])
2009-10-14 23:30:55 +02:00
if test "x$with_sha1" = x; then
AC_MSG_ERROR([No suitable SHA1 implementation found])
2008-09-23 18:22:07 +02:00
fi
2009-11-06 03:28:28 +01:00
AC_MSG_RESULT([$with_sha1])
2009-10-14 23:20:44 +02:00
AC_SUBST(SHA1_LIBS)
AC_SUBST(SHA1_CFLAGS)
2008-09-23 18:22:07 +02:00
2008-07-16 01:54:41 +02:00
PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS])
PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
2007-08-31 21:24:07 +02:00
# Autotools has some unfortunate issues with library handling. In order to
# get a server to rebuild when a dependency in the tree is changed, it must
# be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be
2008-05-07 02:06:34 +02:00
# listed there, or some versions of autotools will break (especially if a -L
2007-08-31 21:24:07 +02:00
# is required to find the library). So, we keep two sets of libraries
# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which
# will go into the _DEPENDENCIES and _LDADD of the server, and
# NAMESPACE_SYS_LIBS which will go into only the _LDADD. The
# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in
# NAMESPACE_SYS_LIBS.
#
# XSERVER_LIBS is the set of in-tree libraries which all servers require.
# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers
# require.
#
2009-10-14 23:20:44 +02:00
XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
2010-05-16 21:29:02 +02:00
XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB"
2010-03-08 22:33:37 +01:00
XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
2007-08-31 21:24:07 +02:00
AC_SUBST([XSERVER_LIBS])
AC_SUBST([XSERVER_SYS_LIBS])
2005-07-29 23:55:57 +02:00
2008-03-02 19:27:53 +01:00
UTILS_SYS_LIBS="${SYS_LIBS}"
AC_SUBST([UTILS_SYS_LIBS])
2006-10-08 15:32:15 +02:00
# The Xorg binary needs to export symbols so that they can be used from modules
2010-02-24 09:56:59 +01:00
# Some platforms require extra flags to do this. libtool should set the
# necessary flags for each platform when -export-dynamic is passed to it.
LD_EXPORT_SYMBOLS_FLAG="-export-dynamic"
2012-03-29 09:13:27 +02:00
LD_NO_UNDEFINED_FLAG=
2012-03-29 09:26:41 +02:00
XORG_DRIVER_LIBS=
case "$host_os" in
cygwin*)
LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-all,--out-implib,lib\$@.a"
LD_NO_UNDEFINED_FLAG="-no-undefined -Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a"
XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined"
CYGWIN=yes
;;
2012-05-12 19:11:33 +02:00
solaris*)
# We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT
# that we can link against for testing if the system linker is new
# enough to support -z parent=<program> for verifying loadable modules
# are only calling functions defined in either the loading program or
# the libraries they're linked with.
AC_LINK_IFELSE(
[AC_LANG_SOURCE([int main(int argc, char **argv) { return 0; }])],
[mv conftest$EXEEXT conftest.parent
XORG_CHECK_LINKER_FLAGS([-Wl,-z,parent=conftest.parent -G],
[LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg"
# Not set yet, since this gets exported in xorg-server.pc to all the drivers,
# and they're not all fixed to build correctly with it yet.
# XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg"
],[],
[AC_LANG_SOURCE([extern int main(int argc, char **argv);
int call_main(void) { return main(0, NULL); }])])
rm -f conftest.parent
])
;;
2012-03-29 09:26:41 +02:00
esac
2006-10-08 15:32:15 +02:00
AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
2012-03-29 09:13:27 +02:00
AC_SUBST([LD_NO_UNDEFINED_FLAG])
2012-03-29 09:26:41 +02:00
AC_SUBST([XORG_DRIVER_LIBS])
AM_CONDITIONAL([CYGWIN], [test x"$CYGWIN" = xyes])
2012-03-29 09:13:27 +02:00
AM_CONDITIONAL([NO_UNDEFINED], [test x"$LD_NO_UNDEFINED_FLAG" != x])
2006-10-08 15:32:15 +02:00
2005-08-21 21:15:11 +02:00
dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so
dnl we need to replicate that here until those can all be fixed
2005-07-29 23:55:57 +02:00
AC_MSG_CHECKING([if SVR4 needs to be defined])
AC_EGREP_CPP([I_AM_SVR4],[
#if defined(SVR4) || defined(__svr4__) || defined(__SVR4)
I_AM_SVR4
#endif
],[
AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4])
AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]))
2012-07-10 03:03:01 +02:00
XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $DBE_INC"
2005-08-21 21:15:11 +02:00
dnl ---------------------------------------------------------------------------
dnl DDX section.
dnl ---------------------------------------------------------------------------
dnl Xvfb DDX
AC_MSG_CHECKING([whether to build Xvfb DDX])
AC_MSG_RESULT([$XVFB])
AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
if test "x$XVFB" = xyes; then
2010-06-29 00:39:04 +02:00
XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
2008-05-19 07:35:05 +02:00
XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
2005-08-21 21:15:11 +02:00
AC_SUBST([XVFB_LIBS])
2007-08-31 21:24:07 +02:00
AC_SUBST([XVFB_SYS_LIBS])
2005-08-21 21:15:11 +02:00
fi
dnl Xnest DDX
2010-06-23 14:18:04 +02:00
PKG_CHECK_MODULES(XNESTMODULES, [$LIBXEXT x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no])
2008-07-31 19:46:06 +02:00
AC_MSG_CHECKING([whether to build Xnest DDX])
2005-08-21 21:15:11 +02:00
if test "x$XNEST" = xauto; then
2005-08-23 10:59:30 +02:00
XNEST="$have_xnest"
2005-08-21 21:15:11 +02:00
fi
AC_MSG_RESULT([$XNEST])
AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes])
if test "x$XNEST" = xyes; then
2009-10-02 01:34:24 +02:00
if test "x$have_xnest" = xno; then
AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.])
fi
2010-12-22 15:38:54 +01:00
XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
2008-05-19 07:35:05 +02:00
XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
2005-08-21 21:15:11 +02:00
AC_SUBST([XNEST_LIBS])
2007-08-31 21:24:07 +02:00
AC_SUBST([XNEST_SYS_LIBS])
2005-08-21 21:15:11 +02:00
fi
dnl Xorg DDX
AC_MSG_CHECKING([whether to build Xorg DDX])
if test "x$XORG" = xauto; then
XORG="yes"
case $host_os in
cygwin*) XORG="no" ;;
2012-01-03 01:14:32 +01:00
mingw*) XORG="no" ;;
2007-09-06 00:51:11 +02:00
darwin*) XORG="no" ;;
2005-08-21 21:15:11 +02:00
esac
fi
AC_MSG_RESULT([$XORG])
2008-06-12 22:00:50 +02:00
if test "x$XORG" = xyes; then
2005-08-21 21:15:11 +02:00
XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
2012-07-26 01:54:08 +02:00
XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
2005-09-13 20:37:35 +02:00
2008-11-28 05:01:57 +01:00
dnl ==================================================================
dnl symbol visibility
symbol_visibility=
have_visibility=disabled
if test x$SYMBOL_VISIBILITY != xno; then
AC_MSG_CHECKING(for symbol visibility support)
if test x$GCC = xyes; then
VISIBILITY_CFLAGS="-fvisibility=hidden"
else
if test x$SUNCC = xyes; then
VISIBILITY_CFLAGS="-xldscope=hidden"
else
have_visibility=no
fi
fi
if test x$have_visibility != xno; then
save_CFLAGS="$CFLAGS"
2011-12-01 22:24:12 +01:00
proto_inc=`$PKG_CONFIG --cflags xproto`
CFLAGS="$CFLAGS $VISIBILITY_CFLAGS $proto_inc"
2008-11-28 05:01:57 +01:00
AC_TRY_COMPILE(
[#include <X11/Xfuncproto.h>
extern _X_HIDDEN int hidden_int;
extern _X_EXPORT int public_int;
extern _X_HIDDEN int hidden_int_func(void);
extern _X_EXPORT int public_int_func(void);],
[],
have_visibility=yes,
have_visibility=no)
CFLAGS=$save_CFLAGS
fi
AC_MSG_RESULT([$have_visibility])
if test x$have_visibility != xno; then
symbol_visibility=$VISIBILITY_CFLAGS
XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS"
2008-12-02 05:50:45 +01:00
XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS"
2008-11-28 05:01:57 +01:00
fi
fi
dnl added to xorg-server.pc
AC_SUBST([symbol_visibility])
dnl ===================================================================
2010-05-31 18:27:07 +02:00
dnl ===================================================================
dnl ================= beginning of PCI configuration ==================
dnl ===================================================================
xorg_bus_bsdpci=no
xorg_bus_sparc=no
2010-06-01 12:05:47 +02:00
AC_MSG_CHECKING([whether to build Xorg PCI functions])
if test "x$PCI" = xyes; then
2009-09-23 13:49:11 +02:00
PKG_CHECK_MODULES([PCIACCESS], $LIBPCIACCESS)
2011-09-14 20:45:18 +02:00
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS"
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $LIBDRM_LIBS"
2012-07-10 03:03:15 +02:00
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS"
2006-06-07 23:09:02 +02:00
2010-05-31 18:27:07 +02:00
AC_DEFINE(XSERVER_LIBPCIACCESS, 1, [Use libpciaccess for all pci manipulation])
AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path])
case $host_os in
gnu* | freebsd* | kfreebsd*-gnu | netbsd* | openbsd* | solaris* | dragonfly*)
xorg_bus_bsdpci="yes"
;;
esac
case $host_cpu in
sparc*)
xorg_bus_sparc="yes"
;;
esac
2010-06-01 12:05:47 +02:00
fi
AC_MSG_RESULT([$PCI])
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
if test "x$CONFIG_UDEV_KMS" = xyes; then
AC_DEFINE(XSERVER_PLATFORM_BUS, 1, [X server supports platform device enumeration])
fi
AC_MSG_RESULT([$XSERVER_PLATFORM_BUS])
2010-05-31 18:27:07 +02:00
dnl ===================================================================
dnl ==================== end of PCI configuration =====================
dnl ===================================================================
2005-08-21 21:15:11 +02:00
case $host_os in
linux*)
2006-05-09 20:04:29 +02:00
if test "x$LNXAPM" = xyes; then
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
fi
2005-08-21 21:15:11 +02:00
XORG_OS_SUBDIR="linux"
2006-05-14 18:22:24 +02:00
linux_acpi="no"
2005-08-21 21:15:11 +02:00
case $host_cpu in
2005-09-20 00:44:49 +02:00
alpha*)
linux_alpha=yes
;;
2011-01-07 22:57:15 +01:00
i*86|amd64*|x86_64*|ia64*)
2006-05-14 18:22:24 +02:00
linux_acpi="yes"
2006-05-09 20:04:29 +02:00
;;
2005-08-21 21:15:11 +02:00
*)
;;
esac
2005-08-02 02:41:07 +02:00
;;
2008-04-07 13:09:04 +02:00
freebsd* | kfreebsd*-gnu | dragonfly*)
2005-08-21 21:15:11 +02:00
XORG_OS_SUBDIR="bsd"
2005-08-21 08:56:19 +02:00
;;
2005-08-21 21:15:11 +02:00
netbsd*)
XORG_OS_SUBDIR="bsd"
2005-08-02 02:41:07 +02:00
;;
2005-08-21 21:15:11 +02:00
openbsd*)
2008-05-19 05:15:30 +02:00
if test "x$ac_cv_BSD_APM" = xyes \
-o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
fi
2005-08-21 21:15:11 +02:00
XORG_OS_SUBDIR="bsd"
2005-08-04 04:39:56 +02:00
;;
2005-08-21 21:15:11 +02:00
solaris*)
XORG_OS_SUBDIR="solaris"
2009-11-05 20:42:34 +01:00
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
2008-08-22 19:14:11 +02:00
AC_CHECK_HEADERS([sys/kd.h])
2009-08-04 08:21:39 +02:00
AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no])
2009-08-04 06:38:51 +02:00
# Check for minimum supported release
2005-08-21 21:15:11 +02:00
AC_MSG_CHECKING([Solaris version])
2010-03-23 10:47:27 +01:00
OS_MINOR=`echo ${host_os}|$SED -e 's/^.*solaris2\.//' -e s'/\..*$//'`
2005-08-21 21:15:11 +02:00
if test "${OS_MINOR}" -ge 7 ; then
AC_MSG_RESULT(Solaris ${OS_MINOR})
2005-08-04 04:39:56 +02:00
else
2010-03-23 10:47:27 +01:00
AC_MSG_RESULT(Solaris `echo ${host_os}|$SED -e 's/^.*solaris//`)
2005-08-04 04:39:56 +02:00
fi
2009-08-04 06:38:51 +02:00
if test "${OS_MINOR}" -lt 8 ; then
AC_MSG_ERROR([This release no longer supports Solaris versions older than Solaris 8.])
2005-08-21 21:15:11 +02:00
fi
if test "x$SUNCC" = "xyes"; then
solaris_asm_inline="yes"
fi
AC_CHECK_DECL([_LP64], [SOLARIS_64="yes"], [SOLARIS_64="no"])
case $host_cpu in
sparc*)
SOLARIS_INOUT_ARCH="sparcv8plus"
;;
i*86)
if test x$SOLARIS_64 = xyes ; then
SOLARIS_INOUT_ARCH="amd64"
else
SOLARIS_INOUT_ARCH="ia32"
fi
;;
*)
AC_MSG_ERROR([Unsupported Solaris platform. Only SPARC & x86 \
are supported on Solaris in this release. If you are \
interested in porting Xorg to your platform, please email \
xorg@lists.freedesktop.org.]) ;;
esac
AC_SUBST([SOLARIS_INOUT_ARCH])
if test x$solaris_asm_inline = xyes ; then
2006-05-02 03:37:25 +02:00
SOLARIS_ASM_CFLAGS='$(top_srcdir)/hw/xfree86/os-support/solaris/solaris-$(SOLARIS_INOUT_ARCH).il'
XORG_CFLAGS="${XORG_CFLAGS} "'$(SOLARIS_ASM_CFLAGS)'
2005-08-04 04:39:56 +02:00
fi
2006-05-23 18:17:09 +02:00
AC_SUBST([SOLARIS_ASM_CFLAGS])
2005-08-04 04:39:56 +02:00
;;
2006-08-12 18:41:59 +02:00
gnu*)
XORG_OS_SUBDIR="hurd"
;;
2005-07-14 00:54:02 +02:00
*)
2011-09-13 22:38:45 +02:00
XORG_OS_SUBDIR="stub"
AC_MSG_NOTICE([m4_text_wrap(m4_join([ ],
2010-05-10 22:44:30 +02:00
[Your OS is unknown. Xorg currently only supports Linux,],
[Free/Open/Net/DragonFlyBSD, Solaris/OpenSolaris, & GNU Hurd.],
[If you are interested in porting Xorg to your platform,],
[please email xorg@lists.freedesktop.org.]))])
2005-08-21 21:15:11 +02:00
;;
2005-07-14 00:54:02 +02:00
esac
2005-12-01 06:04:07 +01:00
case $host_cpu in
2009-12-18 03:24:37 +01:00
i*86)
;;
2005-12-01 06:04:07 +01:00
esac
2007-02-18 23:09:51 +01:00
if test "x$DGA" = xauto; then
2009-09-15 07:05:27 +02:00
PKG_CHECK_MODULES(DGA, $DGAPROTO, [DGA=yes], [DGA=no])
2007-02-18 23:09:51 +01:00
fi
if test "x$DGA" = xyes; then
2009-09-15 07:05:27 +02:00
XORG_MODULES="$XORG_MODULES $DGAPROTO"
PKG_CHECK_MODULES(DGA, $DGAPROTO)
2007-02-18 23:09:51 +01:00
AC_DEFINE(DGA, 1, [Support DGA extension])
AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
fi
if test "x$XF86VIDMODE" = xauto; then
2009-09-15 07:05:27 +02:00
PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO, [XF86VIDMODE=yes], [XF86VIDMODE=no])
2007-02-18 23:09:51 +01:00
fi
if test "x$XF86VIDMODE" = xyes; then
2009-09-15 07:05:27 +02:00
XORG_MODULES="$XORG_MODULES $VIDMODEPROTO"
PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO)
2007-02-18 23:09:51 +01:00
AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension])
fi
if test -n "$XORG_MODULES"; then
PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES])
XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS"
2007-08-31 21:24:07 +02:00
XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
2007-02-18 23:09:51 +01:00
fi
2005-08-21 21:15:11 +02:00
AC_SUBST([XORG_LIBS])
2007-08-31 21:24:07 +02:00
AC_SUBST([XORG_SYS_LIBS])
2005-08-21 21:15:11 +02:00
AC_SUBST([XORG_INCS])
AC_SUBST([XORG_OS_SUBDIR])
AC_SUBST([XORG_CFLAGS])
dnl these only go in xorg-config.h
2005-09-24 04:40:51 +02:00
XF86CONFIGFILE="xorg.conf"
2009-12-21 09:04:16 +01:00
XF86CONFIGDIR="xorg.conf.d"
2010-04-02 08:44:24 +02:00
AC_SUBST(XF86CONFIGDIR)
2005-09-24 04:40:51 +02:00
CONFIGFILE="$sysconfdir/$XF86CONFIGFILE"
2005-09-15 07:06:54 +02:00
LOGPREFIX="$logdir/Xorg."
2005-08-21 21:15:11 +02:00
AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
2005-11-03 18:08:06 +01:00
AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
2005-08-21 21:15:11 +02:00
AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
2005-09-24 04:40:51 +02:00
AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file])
2005-12-09 04:57:41 +01:00
AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file])
2009-12-21 09:04:16 +01:00
AC_DEFINE_DIR(__XCONFIGDIR__, XF86CONFIGDIR, [Name of configuration directory])
2005-08-21 21:15:11 +02:00
AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path])
2006-11-22 23:46:51 +01:00
AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path])
2005-08-21 21:15:11 +02:00
AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location])
AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
2009-07-10 14:38:51 +02:00
if test "x$VGAHW" = xyes; then
AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module])
fi
2005-08-21 21:15:11 +02:00
driverdir="$moduledir/drivers"
AC_SUBST([moduledir])
AC_SUBST([driverdir])
sdkdir="$includedir/xorg"
extdir="$includedir/X11/extensions"
2010-04-03 19:08:25 +02:00
sysconfigdir="$datadir/X11/$XF86CONFIGDIR"
2005-08-21 21:15:11 +02:00
AC_SUBST([sdkdir])
AC_SUBST([extdir])
2010-04-03 19:08:25 +02:00
AC_SUBST([sysconfigdir])
2005-09-15 07:06:54 +02:00
AC_SUBST([logdir])
2007-11-05 23:17:25 +01:00
# stuff the ABI versions into the pc file too
extract_abi() {
grep ^.define.*${1}_VERSION ${srcdir}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }'
}
abi_ansic=`extract_abi ANSIC`
abi_videodrv=`extract_abi VIDEODRV`
abi_xinput=`extract_abi XINPUT`
abi_extension=`extract_abi EXTENSION`
2008-04-10 21:36:19 +02:00
AC_SUBST([abi_ansic])
AC_SUBST([abi_videodrv])
AC_SUBST([abi_xinput])
AC_SUBST([abi_extension])
2005-08-21 21:15:11 +02:00
fi
AM_CONDITIONAL([XORG], [test "x$XORG" = xyes])
2010-06-01 12:05:47 +02:00
AM_CONDITIONAL([XORG_BUS_PCI], [test "x$PCI" = xyes])
2007-08-28 19:08:38 +02:00
AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes])
2005-08-21 10:43:46 +02:00
AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes])
2005-09-20 00:44:49 +02:00
AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes])
2006-05-14 18:22:24 +02:00
AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes])
2005-08-04 04:39:56 +02:00
AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes])
2009-08-04 08:21:39 +02:00
AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes])
2007-10-28 14:46:26 +01:00
AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes])
xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.
At startup the list of drm/kms devices is probed and this info is
used to load drivers.
A new driver probing method is introduced that passes the udev
device info to the driver for probing.
The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.
The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.
This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.
v2: rename to platform bus, now with 100% less udev specific,
this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.
also add MATCH_PCI_DEVICES macro.
This version is mainly to address concerns raised by ajax.
v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.
v4: add free list, fix struct whitespace.
ajax this address most of your issues?
v5: drop probe ifdef, fix logic issue
v6: some overhaul after more testing.
Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
match against bus id if one exists, or primary device.
RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.
v6.1: add missing noop platform function
v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.
v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.
v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.
v10: address most of Keith's concerns.
v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-08 15:26:47 +02:00
AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes])
2008-04-20 17:35:42 +02:00
dnl XWin DDX
AC_MSG_CHECKING([whether to build XWin DDX])
if test "x$XWIN" = xauto; then
case $host_os in
cygwin*) XWIN="yes" ;;
mingw*) XWIN="yes" ;;
*) XWIN="no" ;;
esac
fi
AC_MSG_RESULT([$XWIN])
if test "x$XWIN" = xyes; then
2010-02-01 18:11:54 +01:00
AC_DEFINE_DIR(SYSCONFDIR, sysconfdir, [Location of system.XWinrc])
2010-02-01 18:11:51 +01:00
AC_DEFINE_DIR(DEFAULT_LOGDIR, logdir, [Default log location])
2008-12-17 20:18:38 +01:00
AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
2010-02-02 17:21:44 +01:00
AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
2008-11-02 19:27:09 +01:00
AC_CHECK_TOOL(WINDRES, windres)
2010-02-24 22:17:42 +01:00
2010-06-23 14:18:04 +02:00
PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau])
2010-02-24 22:17:42 +01:00
if test "x$WINDOWSWM" = xauto; then
PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no])
fi
if test "x$WINDOWSWM" = xyes ; then
PKG_CHECK_MODULES(WINDOWSWM, $WINDOWSWMPROTO)
XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS $WINDOWSWM_CFLAGS"
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
fi
2008-04-20 17:35:42 +02:00
case $host_os in
cygwin*)
XWIN_SERVER_NAME=XWin
AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages])
;;
mingw*)
XWIN_SERVER_NAME=Xming
AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location])
AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets])
2012-10-15 06:38:20 +02:00
XWIN_SYS_LIBS="-lpthread -lws2_32"
2008-04-20 17:35:42 +02:00
;;
esac
2012-06-21 21:01:49 +02:00
2010-12-08 19:54:30 +01:00
XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
2012-06-21 21:01:49 +02:00
XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS $GLX_SYS_LIBS"
2009-10-15 08:53:41 +02:00
AC_SUBST(XWIN_LIBS)
2008-04-20 17:35:42 +02:00
AC_SUBST(XWIN_SERVER_NAME)
AC_SUBST(XWIN_SYS_LIBS)
if test "x$DEBUGGING" = xyes; then
AC_DEFINE(CYGDEBUG, 1, [Simple debug messages])
AC_DEFINE(CYGWINDOWING_DEBUG, 1, [Debug messages for window handling])
AC_DEFINE(CYGMULTIWINDOW_DEBUG, 1, [Debug window manager])
fi
AC_DEFINE(DDXOSVERRORF, 1, [Use OsVendorVErrorF])
AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ])
2011-04-06 17:23:45 +02:00
dnl XWin with AIGLX requires OpenGL spec files in order to generate wrapper code for native GL functions
if [test "x$XWIN" = xyes && test "x$AIGLX" = xyes] ; then
2013-06-18 19:03:05 +02:00
AC_CHECK_PROG(PYTHON, python, python)
if test -z "$PYTHON"; then
AC_MSG_ERROR([python not found])
fi
2011-04-06 17:23:45 +02:00
if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then
PKG_CHECK_MODULES([KHRONOS_OPENGL_REGISTRY], [khronos-opengl-registry])
KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir`
fi
AC_SUBST(KHRONOS_SPEC_DIR)
fi
2008-04-20 17:35:42 +02:00
fi
AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes])
2009-05-20 22:32:54 +02:00
AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes])
2008-04-20 17:35:42 +02:00
AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes])
2010-04-16 22:55:01 +02:00
AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$AIGLX" = xyes])
2009-10-13 15:48:17 +02:00
AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes])
2008-04-20 17:35:42 +02:00
AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])
2007-02-17 11:23:11 +01:00
dnl Darwin / OS X DDX
2007-11-22 04:51:14 +01:00
if test "x$XQUARTZ" = xyes; then
2008-04-09 02:02:56 +02:00
AC_DEFINE(XQUARTZ,1,[Have Quartz])
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
2007-11-22 04:51:14 +01:00
2012-09-03 16:19:43 +02:00
XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB"
2011-06-25 20:29:53 +02:00
AC_SUBST([XQUARTZ_LIBS])
2008-04-23 19:22:34 +02:00
2007-12-08 08:26:11 +01:00
AC_CHECK_LIB([Xplugin],[xp_init],[:])
2008-04-23 19:22:34 +02:00
2011-02-28 00:49:10 +01:00
CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA"
2008-10-03 20:11:37 +02:00
2009-09-23 13:49:11 +02:00
PKG_CHECK_MODULES(XPBPROXY, $APPLEWMPROTO $LIBAPPLEWM xfixes x11)
2008-10-03 20:09:26 +02:00
2009-07-19 00:51:29 +02:00
if test "x$XQUARTZ_SPARKLE" = xyes ; then
AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.])
fi
2008-11-16 04:52:34 +01:00
if test "x$STANDALONE_XPBPROXY" = xyes ; then
AC_DEFINE(STANDALONE_XPBPROXY,1,[Build a standalone xpbproxy])
2008-10-03 20:09:26 +02:00
fi
2007-09-06 14:34:14 +02:00
fi
2007-11-22 04:51:14 +01:00
2007-09-06 14:34:14 +02:00
# Support for objc in autotools is minimal and not documented.
2007-02-17 11:23:11 +01:00
OBJC='$(CC)'
OBJCLD='$(CCLD)'
OBJCLINK='$(LINK)'
OBJCFLAGS='$(CFLAGS)'
AC_SUBST([OBJC])
AC_SUBST([OBJCCLD])
AC_SUBST([OBJCLINK])
AC_SUBST([OBJCFLAGS])
# internal, undocumented automake func follows :(
_AM_DEPENDENCIES([OBJC])
2007-09-06 14:34:14 +02:00
AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
2009-07-19 00:51:29 +02:00
AM_CONDITIONAL(XQUARTZ_SPARKLE, [test "x$XQUARTZ_SPARKLE" != "xno"])
2008-11-16 04:52:34 +01:00
AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes])
2007-09-19 06:40:32 +02:00
2008-03-01 14:57:57 +01:00
dnl DMX DDX
2009-11-29 03:32:47 +01:00
PKG_CHECK_MODULES(
[DMXMODULES],
2013-07-06 07:35:32 +02:00
[xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES],
2009-11-29 03:32:47 +01:00
[PKG_CHECK_MODULES(
[XDMXCONFIG_DEP],
[xaw7 xmu xt xpm x11],
[have_dmx=yes],
[have_dmx=no])],
[have_dmx=no])
2008-07-31 19:46:06 +02:00
AC_MSG_CHECKING([whether to build Xdmx DDX])
2007-12-17 04:45:15 +01:00
if test "x$DMX" = xauto; then
2008-03-01 14:57:57 +01:00
DMX="$have_dmx"
case $host_os in
cygwin*) DMX="no" ;;
2012-01-03 01:14:32 +01:00
mingw*) DMX="no" ;;
2008-03-01 14:57:57 +01:00
darwin*) DMX="no" ;;
esac
2007-12-17 04:45:15 +01:00
fi
2007-12-15 23:00:19 +01:00
AC_MSG_RESULT([$DMX])
AM_CONDITIONAL(DMX, [test "x$DMX" = xyes])
2007-12-17 04:45:15 +01:00
if test "x$DMX" = xyes; then
2008-03-01 14:57:57 +01:00
if test "x$have_dmx" = xno; then
AC_MSG_ERROR([Xdmx build explicitly requested, but required
modules not found.])
fi
2008-06-25 15:52:36 +02:00
DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
2008-03-01 14:57:57 +01:00
XDMX_CFLAGS="$DMXMODULES_CFLAGS"
2010-06-29 00:39:04 +02:00
XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
2008-03-01 14:57:57 +01:00
XDMX_SYS_LIBS="$DMXMODULES_LIBS"
AC_SUBST([XDMX_CFLAGS])
AC_SUBST([XDMX_LIBS])
AC_SUBST([XDMX_SYS_LIBS])
2007-12-17 04:45:15 +01:00
dnl USB sources in DMX require <linux/input.h>
2008-03-01 14:57:57 +01:00
AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes",
DMX_BUILD_USB="no")
2007-12-17 04:45:15 +01:00
dnl Linux sources in DMX require <linux/keyboard.h>
2008-03-01 14:57:57 +01:00
AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes",
DMX_BUILD_LNX="no")
AC_SUBST(XDMXCONFIG_DEP_CFLAGS)
AC_SUBST(XDMXCONFIG_DEP_LIBS)
2009-10-05 02:44:43 +02:00
PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [$LIBDMX $LIBXEXT x11])
2008-03-01 14:57:57 +01:00
AC_SUBST(DMXEXAMPLES_DEP_LIBS)
2009-10-05 02:44:43 +02:00
PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [$LIBDMX xmu $LIBXEXT x11])
2008-03-01 14:57:57 +01:00
AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS)
2009-10-05 02:44:43 +02:00
PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [$LIBDMX $LIBXI $LIBXEXT x11])
2008-03-01 14:57:57 +01:00
AC_SUBST(DMXXIEXAMPLES_DEP_LIBS)
2009-10-05 02:44:43 +02:00
PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [$LIBXTST $LIBXEXT x11])
2008-03-01 14:57:57 +01:00
AC_SUBST(XTSTEXAMPLES_DEP_LIBS)
2009-09-22 12:34:54 +02:00
PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres $LIBXEXT x11])
2008-03-01 14:57:57 +01:00
AC_SUBST(XRESEXAMPLES_DEP_LIBS)
2009-09-22 12:34:54 +02:00
PKG_CHECK_MODULES([X11EXAMPLES_DEP], [$LIBXEXT x11])
2008-03-01 14:57:57 +01:00
AC_SUBST(X11EXAMPLES_DEP_LIBS)
2009-10-16 02:01:13 +02:00
2007-12-17 04:45:15 +01:00
fi
AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes])
AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes])
2005-12-27 09:31:37 +01:00
dnl kdrive DDX
2007-07-05 07:28:14 +02:00
XEPHYR_LIBS=
2005-12-28 02:01:06 +01:00
XEPHYR_INCS=
2005-12-27 09:31:37 +01:00
AM_CONDITIONAL(KDRIVE, [test x$KDRIVE = xyes])
2010-01-04 09:07:04 +01:00
2005-12-27 09:31:37 +01:00
if test "$KDRIVE" = yes; then
AC_DEFINE(KDRIVESERVER,1,[Build Kdrive X server])
AC_DEFINE(KDRIVEDDXACTIONS,,[Build kdrive ddx])
2005-12-28 11:02:54 +01:00
2005-12-27 09:31:37 +01:00
AC_CHECK_HEADERS([linux/fb.h])
2006-07-19 22:51:04 +02:00
if test "$ac_cv_header_linux_fb_h" = yes && test "x$XFBDEV" = xauto; then
XFBDEV=yes
fi
if test "x$XFBDEV" = xyes; then
KDRIVEFBDEVLIB=yes
2005-12-28 11:02:54 +01:00
AC_DEFINE(KDRIVEFBDEV, 1, [Build fbdev-based kdrive server])
2005-12-27 09:31:37 +01:00
fi
2009-09-21 06:52:31 +02:00
PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
2009-09-23 04:32:44 +02:00
if test "x$HAVE_TSLIB" = xno; then
2010-10-14 15:49:50 +02:00
AC_CHECK_LIB(ts, ts_open, [
HAVE_TSLIB="yes"
TSLIB_LIBS="-lts"
])
2009-09-23 04:32:44 +02:00
fi
if test "xTSLIB" = xauto; then
2009-09-21 06:52:31 +02:00
TSLIB="$HAVE_TSLIB"
2006-07-19 22:51:04 +02:00
fi
if test "x$TSLIB" = xyes; then
if ! test "x$HAVE_TSLIB" = xyes; then
2009-09-21 06:52:31 +02:00
AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/])
else
AC_DEFINE(TSLIB, 1, [Have tslib support])
2006-07-19 22:51:04 +02:00
fi
fi
2010-01-04 09:07:04 +01:00
if test "x$KDRIVE_KBD" = xyes; then
AC_DEFINE(KDRIVE_KBD, 1, [Enable KDrive kbd driver])
fi
if test "x$KDRIVE_EVDEV" = xyes; then
AC_DEFINE(KDRIVE_EVDEV, 1, [Enable KDrive evdev driver])
fi
if test "x$KDRIVE_MOUSE" = xyes; then
AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
fi
2010-06-25 15:20:57 +02:00
XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms"
2008-03-01 14:57:57 +01:00
if test "x$XV" = xyes; then
2010-06-20 12:13:26 +02:00
XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv"
2008-03-01 14:57:57 +01:00
fi
2008-04-23 16:45:54 +02:00
if test "x$DRI" = xyes && test "x$GLX" = xyes; then
2010-06-25 15:20:57 +02:00
XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS libdrm xcb-glx xcb-xf86dri > 1.6"
2008-04-23 16:45:54 +02:00
fi
2006-07-19 22:51:04 +02:00
if test "x$XEPHYR" = xauto; then
2011-12-17 21:25:26 +01:00
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [XEPHYR="yes"], [XEPHYR="no"])
elif test "x$XEPHYR" = xyes ; then
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS)
2010-06-24 19:45:11 +02:00
fi
2006-08-10 19:29:57 +02:00
2006-07-19 22:51:04 +02:00
# Xephyr needs nanosleep() which is in librt on Solaris
AC_CHECK_FUNC([nanosleep], [],
AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt"))
2007-07-05 07:28:14 +02:00
2005-12-27 09:31:37 +01:00
# damage shadow extension glx (NOTYET) fb mi
KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
2010-06-29 00:39:04 +02:00
KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC"
2005-12-27 09:31:37 +01:00
KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
2005-12-28 02:01:06 +01:00
KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
2005-12-27 09:31:37 +01:00
2008-03-01 14:57:57 +01:00
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
2005-12-27 09:31:37 +01:00
2010-06-29 00:39:04 +02:00
KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
2009-01-27 06:13:28 +01:00
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
2006-11-04 18:05:02 +01:00
case $host_os in
*linux*)
2009-01-27 06:13:28 +01:00
KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la'
2006-11-04 18:05:02 +01:00
KDRIVELINUX=yes
2010-01-16 19:45:32 +01:00
if test "x$KDRIVE_EVDEV" = xauto; then
KDRIVE_EVDEV=yes
fi
if test "x$KDRIVE_KBD" = xauto; then
KDRIVE_KBD=yes
fi
if test "x$KDRIVE_MOUSE" = xauto; then
KDRIVE_MOUSE=yes
fi
;;
*)
if test "x$KDRIVE_EVDEV" = xauto; then
KDRIVE_EVDEV=no
fi
if test "x$KDRIVE_KBD" = xauto; then
KDRIVE_KBD=no
fi
if test "x$KDRIVE_MOUSE" = xauto; then
KDRIVE_MOUSE=no
fi
2006-11-04 18:05:02 +01:00
;;
esac
2009-01-27 06:13:28 +01:00
KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la'
2010-05-16 21:29:02 +02:00
KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB"
2007-09-05 17:46:49 +02:00
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
2010-11-24 00:11:11 +01:00
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB"
2010-10-14 15:49:51 +02:00
KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS $TSLIB_LIBS"
2006-07-19 22:51:04 +02:00
AC_SUBST([XEPHYR_LIBS])
AC_SUBST([XEPHYR_INCS])
fi
AC_SUBST([KDRIVE_INCS])
AC_SUBST([KDRIVE_PURE_INCS])
AC_SUBST([KDRIVE_CFLAGS])
AC_SUBST([KDRIVE_PURE_LIBS])
2007-06-27 21:24:42 +02:00
AC_SUBST([KDRIVE_LOCAL_LIBS])
2006-07-19 22:51:04 +02:00
AC_SUBST([KDRIVE_LIBS])
2006-11-04 18:05:02 +01:00
AM_CONDITIONAL(KDRIVELINUX, [test "x$KDRIVELINUX" = xyes])
2010-01-16 19:45:32 +01:00
AM_CONDITIONAL(KDRIVE_EVDEV, [test "x$KDRIVE_EVDEV" = xyes])
AM_CONDITIONAL(KDRIVE_KBD, [test "x$KDRIVE_KBD" = xyes])
AM_CONDITIONAL(KDRIVE_MOUSE, [test "x$KDRIVE_MOUSE" = xyes])
2006-08-29 23:07:15 +02:00
AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes])
2006-07-19 22:51:04 +02:00
AM_CONDITIONAL(KDRIVEFBDEV, [test "x$XFBDEV" = xyes])
2006-08-10 19:29:57 +02:00
AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes])
2006-07-19 22:51:04 +02:00
AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes])
AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes])
2005-12-28 02:01:06 +01:00
2005-07-01 22:29:53 +02:00
dnl and the rest of these are generic, so they're in config.h
2008-07-17 21:37:31 +02:00
dnl
dnl though, thanks to the passing of some significant amount of time, the
dnl above is probably a complete fallacy, and you should not rely on it.
dnl but this is still actually better than imake, honest. -daniels
2005-08-21 21:15:11 +02:00
2007-01-10 22:10:43 +01:00
AC_TRY_COMPILE([
#include <features.h>
#ifndef __GLIBC__
#error not glibc
#endif
], [], [AC_DEFINE(_GNU_SOURCE, 1,
[ Enable GNU and other extensions to the C environment for glibc])])
2005-07-01 22:29:53 +02:00
AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
2010-05-18 05:27:10 +02:00
AC_SUBST([RELEASE_DATE])
2010-01-09 01:04:25 +01:00
BUILD_DATE="`date +'%Y%m%d'`"
2005-07-01 22:29:53 +02:00
AC_SUBST([BUILD_DATE])
2010-01-09 01:04:25 +01:00
BUILD_TIME="`date +'1%H%M%S'`"
2007-06-04 08:03:44 +02:00
AC_SUBST([BUILD_TIME])
2005-07-01 22:29:53 +02:00
2006-09-18 21:11:18 +02:00
DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
2005-07-02 20:59:44 +02:00
AC_SUBST([DIX_CFLAGS])
2008-04-10 21:36:19 +02:00
AC_SUBST([libdir])
AC_SUBST([exec_prefix])
AC_SUBST([prefix])
2005-07-01 22:29:53 +02:00
2011-06-28 18:33:25 +02:00
AC_CONFIG_COMMANDS([sdksyms], [touch hw/xfree86/sdksyms.dep])
2011-02-15 15:03:28 +01:00
2013-02-01 00:06:20 +01:00
if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then
AC_WARN([
***********************************************
Neither HAL nor udev backend will be enabled.
Input device hotplugging will not be available!
***********************************************])
fi
2005-07-01 22:29:53 +02:00
AC_OUTPUT([
Makefile
2008-05-21 19:33:36 +02:00
glx/Makefile
2005-07-01 22:29:53 +02:00
include/Makefile
composite/Makefile
damageext/Makefile
2005-07-13 23:41:02 +02:00
dbe/Makefile
2005-07-01 22:29:53 +02:00
dix/Makefile
2005-09-30 04:37:57 +02:00
doc/Makefile
2011-05-14 19:30:18 +02:00
doc/dtrace/Makefile
2011-04-29 03:16:13 +02:00
man/Makefile
2005-07-01 22:29:53 +02:00
fb/Makefile
record/Makefile
2006-07-19 16:05:12 +02:00
config/Makefile
2005-07-01 22:29:53 +02:00
mi/Makefile
miext/Makefile
2010-06-29 00:39:04 +02:00
miext/sync/Makefile
2005-07-01 22:29:53 +02:00
miext/damage/Makefile
miext/shadow/Makefile
2005-10-15 22:44:44 +02:00
miext/rootless/Makefile
2005-07-01 22:29:53 +02:00
os/Makefile
randr/Makefile
render/Makefile
xkb/Makefile
Xext/Makefile
Xi/Makefile
xfixes/Makefile
2006-02-16 01:14:11 +01:00
exa/Makefile
2005-07-01 22:29:53 +02:00
hw/Makefile
hw/xfree86/Makefile
hw/xfree86/common/Makefile
hw/xfree86/common/xf86Build.h
hw/xfree86/ddc/Makefile
hw/xfree86/dixmods/Makefile
2005-09-27 16:09:31 +02:00
hw/xfree86/doc/Makefile
2005-07-14 02:28:47 +02:00
hw/xfree86/dri/Makefile
2008-02-04 17:58:24 +01:00
hw/xfree86/dri2/Makefile
2005-08-07 01:34:09 +02:00
hw/xfree86/exa/Makefile
2011-01-10 02:28:27 +01:00
hw/xfree86/exa/man/Makefile
2005-07-01 22:29:53 +02:00
hw/xfree86/fbdevhw/Makefile
2011-01-10 02:28:26 +01:00
hw/xfree86/fbdevhw/man/Makefile
2005-07-01 22:29:53 +02:00
hw/xfree86/i2c/Makefile
hw/xfree86/int10/Makefile
hw/xfree86/loader/Makefile
2011-03-12 13:29:34 +01:00
hw/xfree86/man/Makefile
2007-02-16 05:36:20 +01:00
hw/xfree86/modes/Makefile
2005-07-01 22:29:53 +02:00
hw/xfree86/os-support/Makefile
2005-09-13 20:37:35 +02:00
hw/xfree86/os-support/bsd/Makefile
2005-07-01 22:29:53 +02:00
hw/xfree86/os-support/bus/Makefile
2006-08-12 18:41:59 +02:00
hw/xfree86/os-support/hurd/Makefile
2005-07-01 22:29:53 +02:00
hw/xfree86/os-support/misc/Makefile
hw/xfree86/os-support/linux/Makefile
2005-07-14 03:00:39 +02:00
hw/xfree86/os-support/solaris/Makefile
2011-09-13 22:38:45 +02:00
hw/xfree86/os-support/stub/Makefile
2005-07-01 22:29:53 +02:00
hw/xfree86/parser/Makefile
hw/xfree86/ramdac/Makefile
hw/xfree86/shadowfb/Makefile
hw/xfree86/vbe/Makefile
hw/xfree86/vgahw/Makefile
2005-07-12 16:50:10 +02:00
hw/xfree86/x86emu/Makefile
2005-09-24 04:40:51 +02:00
hw/xfree86/utils/Makefile
2011-01-10 02:27:53 +01:00
hw/xfree86/utils/man/Makefile
2005-12-28 16:22:21 +01:00
hw/xfree86/utils/cvt/Makefile
2005-10-04 02:43:16 +02:00
hw/xfree86/utils/gtf/Makefile
2005-07-12 03:20:36 +02:00
hw/dmx/config/Makefile
2011-01-10 02:28:28 +01:00
hw/dmx/config/man/Makefile
2005-09-27 16:09:31 +02:00
hw/dmx/doc/Makefile
2011-04-29 03:16:10 +02:00
hw/dmx/doxygen/doxygen.conf
hw/dmx/doxygen/Makefile
2005-10-06 04:35:22 +02:00
hw/dmx/examples/Makefile
2005-07-01 22:29:53 +02:00
hw/dmx/input/Makefile
hw/dmx/glxProxy/Makefile
hw/dmx/Makefile
2011-01-10 02:28:28 +01:00
hw/dmx/man/Makefile
2005-07-12 03:20:36 +02:00
hw/vfb/Makefile
2011-01-10 02:27:51 +01:00
hw/vfb/man/Makefile
2005-07-14 05:32:09 +02:00
hw/xnest/Makefile
2011-01-10 02:27:49 +01:00
hw/xnest/man/Makefile
2008-04-20 17:35:42 +02:00
hw/xwin/Makefile
2009-11-07 20:28:18 +01:00
hw/xwin/glx/Makefile
2011-01-10 02:27:50 +01:00
hw/xwin/man/Makefile
2007-12-06 04:43:49 +01:00
hw/xquartz/Makefile
2008-11-22 22:57:45 +01:00
hw/xquartz/GL/Makefile
2007-12-06 04:43:49 +01:00
hw/xquartz/bundle/Makefile
2011-01-10 02:28:31 +01:00
hw/xquartz/man/Makefile
2008-05-09 04:46:03 +02:00
hw/xquartz/mach-startup/Makefile
2008-09-03 18:23:06 +02:00
hw/xquartz/pbproxy/Makefile
2007-12-06 04:43:49 +01:00
hw/xquartz/xpr/Makefile
2005-12-27 09:31:37 +01:00
hw/kdrive/Makefile
hw/kdrive/ephyr/Makefile
2011-01-10 02:27:52 +01:00
hw/kdrive/ephyr/man/Makefile
2005-12-27 09:31:37 +01:00
hw/kdrive/fake/Makefile
hw/kdrive/fbdev/Makefile
hw/kdrive/linux/Makefile
hw/kdrive/src/Makefile
2009-04-15 09:21:08 +02:00
test/Makefile
2009-06-12 03:30:53 +02:00
test/xi2/Makefile
2011-05-14 19:30:19 +02:00
xserver.ent
2005-07-01 22:29:53 +02:00
xorg-server.pc
])