configure.ac revision 444c061a
1444c061aSmrgdnl 
2444c061aSmrgdnl  $Id: configure.ac,v 1.1.1.1 2008/07/30 02:56:40 mrg Exp $
3444c061aSmrgdnl 
4444c061aSmrgdnl  Copyright © 2003 Keith Packard, Noah Levitt
5444c061aSmrgdnl 
6444c061aSmrgdnl  Permission to use, copy, modify, distribute, and sell this software and its
7444c061aSmrgdnl  documentation for any purpose is hereby granted without fee, provided that
8444c061aSmrgdnl  the above copyright notice appear in all copies and that both that
9444c061aSmrgdnl  copyright notice and this permission notice appear in supporting
10444c061aSmrgdnl  documentation, and that the name of Keith Packard not be used in
11444c061aSmrgdnl  advertising or publicity pertaining to distribution of the software without
12444c061aSmrgdnl  specific, written prior permission.  Keith Packard makes no
13444c061aSmrgdnl  representations about the suitability of this software for any purpose.  It
14444c061aSmrgdnl  is provided "as is" without express or implied warranty.
15444c061aSmrgdnl 
16444c061aSmrgdnl  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17444c061aSmrgdnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18444c061aSmrgdnl  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19444c061aSmrgdnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20444c061aSmrgdnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21444c061aSmrgdnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22444c061aSmrgdnl  PERFORMANCE OF THIS SOFTWARE.
23444c061aSmrgdnl
24444c061aSmrgdnl Process this file with autoconf to create configure.
25444c061aSmrg
26444c061aSmrgAC_PREREQ([2.57])
27444c061aSmrg
28444c061aSmrgdnl
29444c061aSmrgdnl
30444c061aSmrgAC_INIT(libXt, 1.0.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXt)
31444c061aSmrgAM_INIT_AUTOMAKE([dist-bzip2])
32444c061aSmrgAM_MAINTAINER_MODE
33444c061aSmrg
34444c061aSmrgAM_CONFIG_HEADER(config.h)
35444c061aSmrg
36444c061aSmrg# Check for progs
37444c061aSmrgAC_PROG_CC
38444c061aSmrgAC_PROG_LIBTOOL
39444c061aSmrg
40444c061aSmrgPKG_CHECK_MODULES(XT, sm x11 xproto kbproto)
41444c061aSmrg
42444c061aSmrg# Needed for including Xalloca.h
43444c061aSmrgAC_CHECK_HEADER([alloca.h], AC_DEFINE(INCLUDE_ALLOCA_H, 1, [Define to 1 if Xalloca.h should include <alloca.h>]))
44444c061aSmrg
45444c061aSmrg# Map function checks to old Imake #defines
46444c061aSmrgAC_CHECK_FUNC(poll, AC_DEFINE(USE_POLL,1,
47444c061aSmrg        [Define to 1 if you have the `poll' function.]))
48444c061aSmrgAC_CHECK_FUNC(snprintf, AC_DEFINE(USE_SNPRINTF,1,
49444c061aSmrg        [Define to 1 if you have the `snprintf' function.]))
50444c061aSmrg
51444c061aSmrg# Options
52444c061aSmrgAC_ARG_ENABLE(xkb, AC_HELP_STRING([--disable-xkb], [Disable XKB support]),
53444c061aSmrg	XKB="$enableval", XKB="yes")
54444c061aSmrgif test "x$XKB" = "xyes" ; then
55444c061aSmrg	AC_DEFINE(XKB, 1, [Define to 1 to use XKB for keysym resolution.])
56444c061aSmrgfi
57444c061aSmrg
58444c061aSmrgAC_ARG_ENABLE(install-makestrs,
59444c061aSmrg	AC_HELP_STRING([--disable-install-makestrs], [Disable installing makestrs]),
60444c061aSmrg	INSTALL_MAKESTRS="$enableval",
61444c061aSmrg	INSTALL_MAKESTRS="yes")
62444c061aSmrgAM_CONDITIONAL([INSTALL_MAKESTRS], [test "x$INSTALL_MAKESTRS" = xyes])
63444c061aSmrg
64444c061aSmrg# Replaces XFileSearchPathDefault from Imake configs
65444c061aSmrgXFILESEARCHPATHDEFAULT='$(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'
66444c061aSmrg
67444c061aSmrgAC_ARG_WITH(xfile-search-path,
68444c061aSmrg	AC_HELP_STRING([--with-xfile-search-path=<path>],
69444c061aSmrg		       [Set path to search for app-defaults and other files]),
70444c061aSmrg	[XFILESEARCHPATHDEFAULT="$withval"], [])
71444c061aSmrgAC_SUBST([XFILESEARCHPATHDEFAULT])
72444c061aSmrg
73444c061aSmrgAC_ARG_WITH(appdefaultdir,
74444c061aSmrg	AC_HELP_STRING([--with-appdefaultdir=<path>],
75444c061aSmrg		       [Set app-default directory (default: ${datadir}/X11/app-defaults)]),
76444c061aSmrg	[appdefaultdir="$withval"],
77444c061aSmrg	[appdefaultdir=${datadir}/X11/app-defaults])
78444c061aSmrgAC_DEFINE_DIR([appdefaultdir], [appdefaultdir], [app default data directory])
79444c061aSmrg
80444c061aSmrg# Replacement for Imake ToolkitStringsABIOptions, controls string tables
81444c061aSmrg# generated by util/string.list in StringDefs.h & Shell.h
82444c061aSmrgcase $host_os in
83444c061aSmrg	solaris*)
84444c061aSmrg		case $host_cpu in
85444c061aSmrg		    sparc*) STRINGSABIOPTIONS="-sparcabi -solarisabinames" ;;
86444c061aSmrg	   		 *) STRINGSABIOPTIONS="-intelabi -solarisabinames" ;;
87444c061aSmrg		esac
88444c061aSmrg		;;
89444c061aSmrg	sco* | svr4*)
90444c061aSmrg		case $host_cpu in
91444c061aSmrg		    i*86) STRINGSABIOPTIONS="-intelabi" ;;
92444c061aSmrg		       *) STRINGSABIOPTIONS="" ;;
93444c061aSmrg		esac
94444c061aSmrg		;;
95444c061aSmrgesac
96444c061aSmrgAC_SUBST(STRINGSABIOPTIONS)
97444c061aSmrg
98444c061aSmrg# Man page processing requirements
99444c061aSmrgXORG_PROG_RAWCPP
100444c061aSmrgXORG_MANPAGE_SECTIONS
101444c061aSmrg
102444c061aSmrg# Check render configuration, strip extra digits from package version to
103444c061aSmrg# find the required protocol version
104444c061aSmrg
105444c061aSmrgXORG_CHECK_MALLOC_ZERO
106444c061aSmrgXORG_RELEASE_VERSION
107444c061aSmrg
108444c061aSmrgAC_OUTPUT([Makefile
109444c061aSmrg	   src/Makefile
110444c061aSmrg	   util/Makefile
111444c061aSmrg	   include/Makefile
112444c061aSmrg	   man/Makefile
113444c061aSmrg           xt.pc])
114