configure changes for OpenBSD Index: configure.ac --- configure.ac.orig +++ configure.ac @@ -261,11 +261,16 @@ DEFAULT_INT10="x86emu" dnl Override defaults as needed for specific platforms: case $host_cpu in + aarch64*) + ARM64_VIDEO=yes + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; alpha*) ALPHA_VIDEO=yes case $host_os in *freebsd*) SYS_LIBS=-lio ;; *netbsd*) AC_DEFINE(USE_ALPHA_PIO, 1, [NetBSD PIO alpha IO]) ;; + *openbsd*) SYS_LIBS=-lalpha ;; esac GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" ;; @@ -292,6 +297,19 @@ case $host_cpu in *freebsd*) DEFAULT_INT10=stub ;; esac ;; + riscv64*) + RISCV64_VIDEO=yes + BSD_ARCH_SOURCES="riscv64_video.c ioperm_noop.c" + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + m88k) + LUNA88K_VIDEO=yes + BSD_ARCH_SOURCES="luna88k_video.c ioperm_noop.c" + ;; + mips*) + SGI_VIDEO=yes + BSD_ARCH_SOURCES="sgi_video.c ioperm_noop.c" + ;; sparc*) SPARC64_VIDEO=yes BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" @@ -317,14 +335,25 @@ case $host_cpu in s390*) GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; + hppa*) + case $host_os in + *openbsd*) HPPA_VIDEO=yes + ;; + esac + ;; esac AC_SUBST(GLX_ARCH_DEFINES) dnl BSD *_video.c selection AM_CONDITIONAL(ALPHA_VIDEO, [test "x$ALPHA_VIDEO" = xyes]) AM_CONDITIONAL(ARM_VIDEO, [test "x$ARM_VIDEO" = xyes]) +AM_CONDITIONAL(ARM64_VIDEO, [test "x$ARM64_VIDEO" = xyes]) +AM_CONDITIONAL(HPPA_VIDEO, [test "x$HPPA_VIDEO" = xyes]) AM_CONDITIONAL(I386_VIDEO, [test "x$I386_VIDEO" = xyes]) +AM_CONDITIONAL(LUNA88K_VIDEO, [test "x$LUNA88K_VIDEO" = xyes]) AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) +AM_CONDITIONAL(RISCV64_VIDEO, [test "x$RISCV64_VIDEO" = xyes]) +AM_CONDITIONAL(SGI_VIDEO, [test "x$SGI_VIDEO" = xyes]) AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) DRI=no @@ -349,8 +378,11 @@ case $host_os in ;; *openbsd*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) - AC_DEFINE(PCVT_SUPPORT, 1, [System has PC console]) AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) + # Disable use of SIGIO by default; it breaks multi-card + # configurations. We don't want to run thousands of lines of + # potentially signal-unsafe code for no particular benefit. + USE_SIGIO_BY_DEFAULT="no" ;; *linux*) DRI=yes @@ -536,6 +568,16 @@ AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-k [KHRONOS_SPEC_DIR="${withval}"], [KHRONOS_SPEC_DIR=auto]) +dnl Privsep +AC_ARG_ENABLE(privsep, + AC_HELP_STRING([--enable-privsep], + [Build support for X server privilege separation (default is NO)]), + [ENABLE_PRIVSEP="$enableval"], [ENABLE_PRIVSEP="no"]) +if test x$ENABLE_PRIVSEP = xyes ; then + AC_DEFINE(X_PRIVSEP, 1, [Use X server privilege separation]) +fi +AM_CONDITIONAL(X_PRIVSEP, [test x$ENABLE_PRIVSEP = xyes]) + dnl Extensions. AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: auto)]), [MITSHM=$enableval], [MITSHM=auto]) @@ -562,6 +604,7 @@ AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--enable AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) AC_ARG_ENABLE(config-udev, AS_HELP_STRING([--enable-config-udev], [Build udev support (default: auto)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=auto]) 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]) +AC_ARG_ENABLE(config-kevent-kms, AS_HELP_STRING([--enable-config-kevent-kms], [Build kevent kms support (default: auto)]), [CONFIG_KEVENT_KMS=$enableval], [CONFIG_KEVENT_KMS=auto]) AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto]) AC_ARG_ENABLE(config-wscons, AS_HELP_STRING([--enable-config-wscons], [Build wscons config support (default: auto)]), [CONFIG_WSCONS=$enableval], [CONFIG_WSCONS=auto]) AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes]) @@ -838,6 +881,10 @@ if test "x$WITH_SYSTEMD_DAEMON" = "xyes" -o "x$WITH_SY fi AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test "x$HAVE_SYSTEMD_DAEMON" = "xyes"]) +if test "x$CONFIG_KEVENT_KMS" != xno; then + AC_CHECK_FUNC([kevent], [AC_DEFINE(CONFIG_KEVENT_KMS, 1, [Use kevent for kms enumeration])]) +fi + if test "x$CONFIG_UDEV" = xyes && test "x$CONFIG_HAL" = xyes; then AC_MSG_ERROR([Hotplugging through both libudev and hal not allowed]) fi @@ -1259,6 +1306,15 @@ if test "x$PRESENT" = xyes; then PRESENT_LIB='$(top_builddir)/present/libpresent.la' fi +# link Xorg with pthreads for llvm-pipe driver on OpenBSD +if test "x$DRI2" = xyes; then + case $host_os in + openbsd*) + XORG_SYS_LIBS="-lpthread" + ;; + esac +fi + AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) if test "x$XINERAMA" = xyes; then AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) @@ -1654,6 +1710,18 @@ AC_SUBST([UTILS_SYS_LIBS]) # 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" +case $host_os in + openbsd*) + case $host_cpu in + m88k) + LD_EXPORT_SYMBOLS_FLAGS="" + ;; + *) + LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" + ;; + esac + ;; +esac LD_NO_UNDEFINED_FLAG= XORG_DRIVER_LIBS= case "$host_os" in @@ -1828,7 +1896,14 @@ if test "x$XORG" = xyes; then esac case $host_cpu in sparc*) - xorg_bus_sparc="yes" + case $host_os in + openbsd*) + xorg_bus_sparc="no" + ;; + *) + xorg_bus_sparc="yes" + ;; + esac ;; esac else