configure.ac revision ce6676db
1bbe1b32bSmrgdnl Copyright 2005 Red Hat, Inc. 2bbe1b32bSmrgdnl 3bbe1b32bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 4bbe1b32bSmrgdnl documentation for any purpose is hereby granted without fee, provided that 5bbe1b32bSmrgdnl the above copyright notice appear in all copies and that both that 6bbe1b32bSmrgdnl copyright notice and this permission notice appear in supporting 7bbe1b32bSmrgdnl documentation, and that the name of Red Hat not be used in 8bbe1b32bSmrgdnl advertising or publicity pertaining to distribution of the software without 9bbe1b32bSmrgdnl specific, written prior permission. Red Hat makes no 10bbe1b32bSmrgdnl representations about the suitability of this software for any purpose. It 11bbe1b32bSmrgdnl is provided "as is" without express or implied warranty. 12bbe1b32bSmrgdnl 13bbe1b32bSmrgdnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 14bbe1b32bSmrgdnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 15bbe1b32bSmrgdnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 16bbe1b32bSmrgdnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 17bbe1b32bSmrgdnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 18bbe1b32bSmrgdnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 19bbe1b32bSmrgdnl PERFORMANCE OF THIS SOFTWARE. 20bbe1b32bSmrgdnl 21bbe1b32bSmrgdnl Process this file with autoconf to create configure. 22bbe1b32bSmrg 23ce6676dbSmrgAC_PREREQ([2.60]) 24ce6676dbSmrgAC_INIT(xfs,[1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xfs) 25bbe1b32bSmrgAM_INIT_AUTOMAKE([dist-bzip2]) 26bbe1b32bSmrgAM_MAINTAINER_MODE 27bbe1b32bSmrg 28ce6676dbSmrg# xfs already have a header called config.h 29bbe1b32bSmrgAM_CONFIG_HEADER(xfs-config.h) 30bbe1b32bSmrg 31ce6676dbSmrg# Require xorg-macros version >= 1.2.0 for XORG_CWARNFLAGS & XORG_CHANGELOG 32ce6676dbSmrgm4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) 33ce6676dbSmrgXORG_MACROS_VERSION(1.2) 34ce6676dbSmrg 35ce6676dbSmrg# Set common system defines for POSIX extensions, such as _GNU_SOURCE 36ce6676dbSmrg# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL) 37ce6676dbSmrg# to avoid autoconf errors. 38ce6676dbSmrgAC_USE_SYSTEM_EXTENSIONS 39bbe1b32bSmrg 40bbe1b32bSmrgAC_PROG_CC 41ce6676dbSmrgXORG_PROG_RAWCPP 42ce6676dbSmrgXORG_CWARNFLAGS 43bbe1b32bSmrgAC_PROG_INSTALL 44bbe1b32bSmrgAC_CANONICAL_HOST 45bbe1b32bSmrg 46ce6676dbSmrg# xmlto is used to convert doc/design.xml from DocBook to PDF/HTML 47ce6676dbSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 48ce6676dbSmrgAC_PATH_PROG([XMLTO], [xmlto]) 49ce6676dbSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"]) 50bbe1b32bSmrg 51bbe1b32bSmrgAC_CHECK_HEADERS([stdint.h]) 52bbe1b32bSmrg 53bbe1b32bSmrgAC_ARG_WITH(default-config-file, 54bbe1b32bSmrg AS_HELP_STRING([--with-default-config-file=PATH], 55bbe1b32bSmrg [comma-separated list of paths to look for config file when not specified (default: ${sysconfdir}/X11/fs/config)]), 56bbe1b32bSmrg [CONFIG_FILE="$withval"], [CONFIG_FILE="${sysconfdir}/X11/fs/config"]) 57bbe1b32bSmrg 58bbe1b32bSmrgDEFAULT_CONFIG_FILE=`echo ${CONFIG_FILE} | sed 's/,/\\\\\\\\\\\",\\\\\\\\\\\"/'g` 59bbe1b32bSmrgAC_DEFINE_DIR([DEFAULT_CONFIG_FILE], DEFAULT_CONFIG_FILE, 60bbe1b32bSmrg [comma-separated list of strings for config file paths when not specified]) 61bbe1b32bSmrg 62bbe1b32bSmrg# generate text for the man page 63bbe1b32bSmrgcase $CONFIG_FILE in 64bbe1b32bSmrg *,*) 65ce6676dbSmrg CONFIG_FILE_DESC="the first file found from the list:" 66bbe1b32bSmrg CONFIG_FILE_PATH=`echo ${CONFIG_FILE} | sed 's/,/\\\\\\\\fR, \\\\\\\\fI/g'` 67bbe1b32bSmrg ;; 68bbe1b32bSmrg *) 69bbe1b32bSmrg CONFIG_FILE_DESC="the default file," 70bbe1b32bSmrg CONFIG_FILE_PATH="${CONFIG_FILE}" 71bbe1b32bSmrg ;; 72bbe1b32bSmrgesac 73bbe1b32bSmrgAC_SUBST([CONFIG_FILE_DESC]) 74bbe1b32bSmrgAC_SUBST([CONFIG_FILE_PATH]) 75bbe1b32bSmrg 76ce6676dbSmrg# Determine font path to put in config file 77ce6676dbSmrg# Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d, 78ce6676dbSmrg# otherwise uses default path copied from xserver configure.ac 79ce6676dbSmrgAC_CHECK_FILE([${sysconfdir}/X11/fontpath.d], 80ce6676dbSmrg [DEFAULT_FONT_PATH='catalogue:$(sysconfdir)/X11/fontpath.d'], 81ce6676dbSmrg [ 82ce6676dbSmrg DEFAULT_FONT_PATH='$(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/OTF/,$(FONTDIR)/Type1/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/' 83ce6676dbSmrg case $host_os in 84ce6676dbSmrg darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; 85ce6676dbSmrg esac 86ce6676dbSmrg]) 87ce6676dbSmrg 88ce6676dbSmrgAC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font path entries]), 89ce6676dbSmrg [ FONTPATH="$withval" ], 90ce6676dbSmrg [ FONTPATH="${DEFAULT_FONT_PATH}" ]) 91ce6676dbSmrgAC_SUBST([FONTPATH]) 92ce6676dbSmrg 93ce6676dbSmrg# Option to enable support for building developer internals docs 94ce6676dbSmrgAC_ARG_ENABLE(devel-docs, 95ce6676dbSmrg AS_HELP_STRING([--enable-devel-docs], 96ce6676dbSmrg [Build internals documentation for developers (default: enabled)]), 97ce6676dbSmrg [DEVEL_DOCS=$enableval], [DEVEL_DOCS=yes]) 98ce6676dbSmrgAM_CONDITIONAL([MAKE_DEVEL_DOCS], [test "x$DEVEL_DOCS" = "xyes"]) 99ce6676dbSmrg 100ce6676dbSmrg# Option to enable support for starting from inetd 101ce6676dbSmrgAC_ARG_ENABLE(inetd, 102ce6676dbSmrg AS_HELP_STRING([--enable-inetd], 103ce6676dbSmrg [Support -inetd flag for starting from inetd (default: enabled)]), 104ce6676dbSmrg [INETD=$enableval], [INETD=yes]) 105ce6676dbSmrgif test "x$INETD" = xyes; then 106ce6676dbSmrg AC_DEFINE(XFS_INETD, 1, [Build support for starting from inetd]) 107ce6676dbSmrgfi 108ce6676dbSmrg 109ce6676dbSmrg# Option to enable support for logging to syslog 110ce6676dbSmrgAC_ARG_ENABLE(syslog, 111ce6676dbSmrg AS_HELP_STRING([--enable-syslog], 112ce6676dbSmrg [Support option for logging via syslog (default: enabled)]), 113ce6676dbSmrg [SYSLOG=$enableval], [SYSLOG=yes]) 114ce6676dbSmrgif test "x$SYSLOG" = xyes; then 115ce6676dbSmrg AC_DEFINE(USE_SYSLOG, 1, [Build support for logging via syslog]) 116ce6676dbSmrgfi 117ce6676dbSmrg 118ce6676dbSmrg 119ce6676dbSmrg# Checks for system functions / libraries 120ce6676dbSmrgAC_CHECK_FUNCS([daemon]) 121ce6676dbSmrg 122bbe1b32bSmrg# Checks for pkg-config packages 123bbe1b32bSmrgPKG_CHECK_MODULES(XFS, libfs xfont xtrans) 124bbe1b32bSmrgAC_SUBST(XFS_CFLAGS) 125bbe1b32bSmrgAC_SUBST(XFS_LIBS) 126bbe1b32bSmrg 127bbe1b32bSmrg# Transport selection macro from xtrans.m4 128bbe1b32bSmrgXTRANS_CONNECTION_FLAGS 129bbe1b32bSmrg 130bbe1b32bSmrgdnl Allow checking code with lint, sparse, etc. 131bbe1b32bSmrgXORG_WITH_LINT 132bbe1b32bSmrg 133bbe1b32bSmrgXORG_MANPAGE_SECTIONS 134bbe1b32bSmrgXORG_RELEASE_VERSION 135ce6676dbSmrgXORG_CHANGELOG 136bbe1b32bSmrg 137bbe1b32bSmrgAC_OUTPUT([Makefile]) 138