| 1 | dnl |
|---|
| 2 | dnl $Id: configure.ac,v 1.1.1.1 2008/05/04 15:53:35 emasson Exp $ |
|---|
| 3 | dnl |
|---|
| 4 | dnl Copyright © 2003 Keith Packard, Noah Levitt |
|---|
| 5 | dnl |
|---|
| 6 | dnl Permission to use, copy, modify, distribute, and sell this software and its |
|---|
| 7 | dnl documentation for any purpose is hereby granted without fee, provided that |
|---|
| 8 | dnl the above copyright notice appear in all copies and that both that |
|---|
| 9 | dnl copyright notice and this permission notice appear in supporting |
|---|
| 10 | dnl documentation, and that the name of Keith Packard not be used in |
|---|
| 11 | dnl advertising or publicity pertaining to distribution of the software without |
|---|
| 12 | dnl specific, written prior permission. Keith Packard makes no |
|---|
| 13 | dnl representations about the suitability of this software for any purpose. It |
|---|
| 14 | dnl is provided "as is" without express or implied warranty. |
|---|
| 15 | dnl |
|---|
| 16 | dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
|---|
| 17 | dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
|---|
| 18 | dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
|---|
| 19 | dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
|---|
| 20 | dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
|---|
| 21 | dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|---|
| 22 | dnl PERFORMANCE OF THIS SOFTWARE. |
|---|
| 23 | dnl |
|---|
| 24 | dnl Process this file with autoconf to create configure. |
|---|
| 25 | |
|---|
| 26 | AC_PREREQ([2.57]) |
|---|
| 27 | |
|---|
| 28 | dnl |
|---|
| 29 | dnl |
|---|
| 30 | AC_INIT(libXt, 1.0.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXt) |
|---|
| 31 | AM_INIT_AUTOMAKE([dist-bzip2]) |
|---|
| 32 | AM_MAINTAINER_MODE |
|---|
| 33 | |
|---|
| 34 | AM_CONFIG_HEADER(config.h) |
|---|
| 35 | |
|---|
| 36 | # Check for progs |
|---|
| 37 | AC_PROG_CC |
|---|
| 38 | AC_PROG_LIBTOOL |
|---|
| 39 | |
|---|
| 40 | PKG_CHECK_MODULES(XT, sm x11 xproto kbproto) |
|---|
| 41 | |
|---|
| 42 | # Needed for including Xalloca.h |
|---|
| 43 | AC_CHECK_HEADER([alloca.h], AC_DEFINE(INCLUDE_ALLOCA_H, 1, [Define to 1 if Xalloca.h should include <alloca.h>])) |
|---|
| 44 | |
|---|
| 45 | # Map function checks to old Imake #defines |
|---|
| 46 | AC_CHECK_FUNC(poll, AC_DEFINE(USE_POLL,1, |
|---|
| 47 | [Define to 1 if you have the `poll' function.])) |
|---|
| 48 | AC_CHECK_FUNC(snprintf, AC_DEFINE(USE_SNPRINTF,1, |
|---|
| 49 | [Define to 1 if you have the `snprintf' function.])) |
|---|
| 50 | |
|---|
| 51 | # Options |
|---|
| 52 | AC_ARG_ENABLE(xkb, AC_HELP_STRING([--disable-xkb], [Disable XKB support]), |
|---|
| 53 | XKB="$enableval", XKB="yes") |
|---|
| 54 | if test "x$XKB" = "xyes" ; then |
|---|
| 55 | AC_DEFINE(XKB, 1, [Define to 1 to use XKB for keysym resolution.]) |
|---|
| 56 | fi |
|---|
| 57 | |
|---|
| 58 | AC_ARG_ENABLE(install-makestrs, |
|---|
| 59 | AC_HELP_STRING([--disable-install-makestrs], [Disable installing makestrs]), |
|---|
| 60 | INSTALL_MAKESTRS="$enableval", |
|---|
| 61 | INSTALL_MAKESTRS="yes") |
|---|
| 62 | AM_CONDITIONAL([INSTALL_MAKESTRS], [test "x$INSTALL_MAKESTRS" = xyes]) |
|---|
| 63 | |
|---|
| 64 | # Replaces XFileSearchPathDefault from Imake configs |
|---|
| 65 | XFILESEARCHPATHDEFAULT='$(sysconfdir)/X11/%L/%T/%N%C%S:$(sysconfdir)/X11/%l/%T/%N%C%S:$(sysconfdir)/X11/%T/%N%C%S:$(sysconfdir)/X11/%L/%T/%N%S:$(sysconfdir)/X11/%l/%T/%N%S:$(sysconfdir)/X11/%T/%N%S:$(datadir)/X11/%L/%T/%N%C%S:$(datadir)/X11/%l/%T/%N%C%S:$(datadir)/X11/%T/%N%C%S:$(datadir)/X11/%L/%T/%N%S:$(datadir)/X11/%l/%T/%N%S:$(datadir)/X11/%T/%N%S:$(libdir)/X11/%L/%T/%N%C%S:$(libdir)/X11/%l/%T/%N%C%S:$(libdir)/X11/%T/%N%C%S:$(libdir)/X11/%L/%T/%N%S:$(libdir)/X11/%l/%T/%N%S:$(libdir)/X11/%T/%N%S' |
|---|
| 66 | |
|---|
| 67 | AC_ARG_WITH(xfile-search-path, |
|---|
| 68 | AC_HELP_STRING([--with-xfile-search-path=<path>], |
|---|
| 69 | [Set path to search for app-defaults and other files]), |
|---|
| 70 | [XFILESEARCHPATHDEFAULT="$withval"], []) |
|---|
| 71 | AC_SUBST([XFILESEARCHPATHDEFAULT]) |
|---|
| 72 | |
|---|
| 73 | AC_ARG_WITH(appdefaultdir, |
|---|
| 74 | AC_HELP_STRING([--with-appdefaultdir=<path>], |
|---|
| 75 | [Set app-default directory (default: ${datadir}/X11/app-defaults)]), |
|---|
| 76 | [appdefaultdir="$withval"], |
|---|
| 77 | [appdefaultdir=${datadir}/X11/app-defaults]) |
|---|
| 78 | AC_DEFINE_DIR([appdefaultdir], [appdefaultdir], [app default data directory]) |
|---|
| 79 | |
|---|
| 80 | # Replacement for Imake ToolkitStringsABIOptions, controls string tables |
|---|
| 81 | # generated by util/string.list in StringDefs.h & Shell.h |
|---|
| 82 | case $host_os in |
|---|
| 83 | solaris*) |
|---|
| 84 | case $host_cpu in |
|---|
| 85 | sparc*) STRINGSABIOPTIONS="-sparcabi -solarisabinames" ;; |
|---|
| 86 | *) STRINGSABIOPTIONS="-intelabi -solarisabinames" ;; |
|---|
| 87 | esac |
|---|
| 88 | ;; |
|---|
| 89 | sco* | svr4*) |
|---|
| 90 | case $host_cpu in |
|---|
| 91 | i*86) STRINGSABIOPTIONS="-intelabi" ;; |
|---|
| 92 | *) STRINGSABIOPTIONS="" ;; |
|---|
| 93 | esac |
|---|
| 94 | ;; |
|---|
| 95 | esac |
|---|
| 96 | AC_SUBST(STRINGSABIOPTIONS) |
|---|
| 97 | |
|---|
| 98 | # Man page processing requirements |
|---|
| 99 | XORG_PROG_RAWCPP |
|---|
| 100 | XORG_MANPAGE_SECTIONS |
|---|
| 101 | |
|---|
| 102 | # Check render configuration, strip extra digits from package version to |
|---|
| 103 | # find the required protocol version |
|---|
| 104 | |
|---|
| 105 | XORG_CHECK_MALLOC_ZERO |
|---|
| 106 | XORG_RELEASE_VERSION |
|---|
| 107 | |
|---|
| 108 | AC_OUTPUT([Makefile |
|---|
| 109 | src/Makefile |
|---|
| 110 | util/Makefile |
|---|
| 111 | include/Makefile |
|---|
| 112 | man/Makefile |
|---|
| 113 | xt.pc]) |
|---|