configure.ac revision 2265a131
1444c061aSmrgdnl 2444c061aSmrgdnl Copyright © 2003 Keith Packard, Noah Levitt 3444c061aSmrgdnl 4444c061aSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 5444c061aSmrgdnl documentation for any purpose is hereby granted without fee, provided that 6444c061aSmrgdnl the above copyright notice appear in all copies and that both that 7444c061aSmrgdnl copyright notice and this permission notice appear in supporting 8444c061aSmrgdnl documentation, and that the name of Keith Packard not be used in 9444c061aSmrgdnl advertising or publicity pertaining to distribution of the software without 10444c061aSmrgdnl specific, written prior permission. Keith Packard makes no 11444c061aSmrgdnl representations about the suitability of this software for any purpose. It 12444c061aSmrgdnl is provided "as is" without express or implied warranty. 13444c061aSmrgdnl 14444c061aSmrgdnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15444c061aSmrgdnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16444c061aSmrgdnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17444c061aSmrgdnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18444c061aSmrgdnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19444c061aSmrgdnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20444c061aSmrgdnl PERFORMANCE OF THIS SOFTWARE. 21444c061aSmrgdnl 22444c061aSmrgdnl Process this file with autoconf to create configure. 23444c061aSmrg 24444c061aSmrgAC_PREREQ([2.57]) 25444c061aSmrg 26444c061aSmrgdnl 27444c061aSmrgdnl 282265a131SmrgAC_INIT(libXt, 1.0.6, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXt) 29444c061aSmrgAM_INIT_AUTOMAKE([dist-bzip2]) 30444c061aSmrgAM_MAINTAINER_MODE 31444c061aSmrg 322265a131Smrg# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG 332265a131Smrgm4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) 342265a131SmrgXORG_MACROS_VERSION(1.2) 35444c061aSmrgAM_CONFIG_HEADER(config.h) 36444c061aSmrg 37444c061aSmrg# Check for progs 38444c061aSmrgAC_PROG_CC 39444c061aSmrgAC_PROG_LIBTOOL 402265a131SmrgAM_PROG_CC_C_O 412265a131SmrgXORG_CWARNFLAGS 422265a131Smrg 432265a131Smrgif test x"$CC_FOR_BUILD" = x; then 442265a131Smrg if test x"$cross_compiling" = xyes; then 452265a131Smrg AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) 462265a131Smrg else 472265a131Smrg CC_FOR_BUILD="$CC" 482265a131Smrg fi 492265a131Smrgfi 502265a131SmrgAC_SUBST([CC_FOR_BUILD]) 51444c061aSmrg 52444c061aSmrgPKG_CHECK_MODULES(XT, sm x11 xproto kbproto) 53444c061aSmrg 54444c061aSmrg# Needed for including Xalloca.h 55444c061aSmrgAC_CHECK_HEADER([alloca.h], AC_DEFINE(INCLUDE_ALLOCA_H, 1, [Define to 1 if Xalloca.h should include <alloca.h>])) 56444c061aSmrg 57444c061aSmrg# Map function checks to old Imake #defines 582265a131Smrgcase $host_os in 592265a131Smrg # darwin has poll() but can't be used to poll character devices 602265a131Smrg # darwin10 (SnowLeopard) should be tested as well once released 612265a131Smrg darwin7*) ;; darwin8*) ;; darwin9*) ;; 622265a131Smrg *) 632265a131Smrg AC_CHECK_FUNC(poll, AC_DEFINE(USE_POLL,1, 642265a131Smrg [Define to 1 if you have the "poll" function.])) 652265a131Smrg ;; 662265a131Smrgesac 67444c061aSmrgAC_CHECK_FUNC(snprintf, AC_DEFINE(USE_SNPRINTF,1, 682265a131Smrg [Define to 1 if you have the "snprintf" function.])) 692265a131Smrg 702265a131SmrgAC_HAVE_LIBRARY(ws2_32) 71444c061aSmrg 72444c061aSmrg# Options 73444c061aSmrgAC_ARG_ENABLE(xkb, AC_HELP_STRING([--disable-xkb], [Disable XKB support]), 74444c061aSmrg XKB="$enableval", XKB="yes") 75444c061aSmrgif test "x$XKB" = "xyes" ; then 76444c061aSmrg AC_DEFINE(XKB, 1, [Define to 1 to use XKB for keysym resolution.]) 77444c061aSmrgfi 78444c061aSmrg 79444c061aSmrgAC_ARG_ENABLE(install-makestrs, 80444c061aSmrg AC_HELP_STRING([--disable-install-makestrs], [Disable installing makestrs]), 81444c061aSmrg INSTALL_MAKESTRS="$enableval", 82444c061aSmrg INSTALL_MAKESTRS="yes") 83444c061aSmrgAM_CONDITIONAL([INSTALL_MAKESTRS], [test "x$INSTALL_MAKESTRS" = xyes]) 84444c061aSmrg 85444c061aSmrg# Replaces XFileSearchPathDefault from Imake configs 86444c061aSmrgXFILESEARCHPATHDEFAULT='$(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' 87444c061aSmrg 88444c061aSmrgAC_ARG_WITH(xfile-search-path, 89444c061aSmrg AC_HELP_STRING([--with-xfile-search-path=<path>], 90444c061aSmrg [Set path to search for app-defaults and other files]), 91444c061aSmrg [XFILESEARCHPATHDEFAULT="$withval"], []) 92444c061aSmrgAC_SUBST([XFILESEARCHPATHDEFAULT]) 93444c061aSmrg 94444c061aSmrgAC_ARG_WITH(appdefaultdir, 95444c061aSmrg AC_HELP_STRING([--with-appdefaultdir=<path>], 96444c061aSmrg [Set app-default directory (default: ${datadir}/X11/app-defaults)]), 97444c061aSmrg [appdefaultdir="$withval"], 98444c061aSmrg [appdefaultdir=${datadir}/X11/app-defaults]) 99444c061aSmrgAC_DEFINE_DIR([appdefaultdir], [appdefaultdir], [app default data directory]) 100444c061aSmrg 101444c061aSmrg# Replacement for Imake ToolkitStringsABIOptions, controls string tables 102444c061aSmrg# generated by util/string.list in StringDefs.h & Shell.h 103444c061aSmrgcase $host_os in 104444c061aSmrg solaris*) 1052265a131Smrg # Solaris uses -intelabi even on SPARC 1062265a131Smrg STRINGSABIOPTIONS="-intelabi -solarisabinames" 107444c061aSmrg ;; 108444c061aSmrg sco* | svr4*) 109444c061aSmrg case $host_cpu in 110444c061aSmrg i*86) STRINGSABIOPTIONS="-intelabi" ;; 111444c061aSmrg *) STRINGSABIOPTIONS="" ;; 112444c061aSmrg esac 113444c061aSmrg ;; 114444c061aSmrgesac 115444c061aSmrgAC_SUBST(STRINGSABIOPTIONS) 116444c061aSmrg 1172265a131Smrgcase $host_os in 1182265a131Smrg darwin*) 1192265a131Smrg OS_CFLAGS="-Wl,-flat_namespace" 1202265a131Smrg ;; 1212265a131Smrg *) 1222265a131Smrg OS_CFLAGS= 1232265a131Smrg ;; 1242265a131Smrgesac 1252265a131Smrg 1262265a131SmrgXT_CFLAGS="$CWARNFLAGS $XT_CFLAGS $OS_CFLAGS" 1272265a131Smrg 128444c061aSmrg# Man page processing requirements 129444c061aSmrgXORG_PROG_RAWCPP 130444c061aSmrgXORG_MANPAGE_SECTIONS 131444c061aSmrg 132444c061aSmrg# Check render configuration, strip extra digits from package version to 133444c061aSmrg# find the required protocol version 134444c061aSmrg 135444c061aSmrgXORG_CHECK_MALLOC_ZERO 136444c061aSmrgXORG_RELEASE_VERSION 1372265a131SmrgXORG_CHANGELOG 138444c061aSmrg 139444c061aSmrgAC_OUTPUT([Makefile 140444c061aSmrg src/Makefile 141444c061aSmrg util/Makefile 142444c061aSmrg include/Makefile 143444c061aSmrg man/Makefile 144444c061aSmrg xt.pc]) 145