configure.ac revision bbe1b32b
1dnl Copyright 2005 Red Hat, Inc. 2dnl 3dnl Permission to use, copy, modify, distribute, and sell this software and its 4dnl documentation for any purpose is hereby granted without fee, provided that 5dnl the above copyright notice appear in all copies and that both that 6dnl copyright notice and this permission notice appear in supporting 7dnl documentation, and that the name of Red Hat not be used in 8dnl advertising or publicity pertaining to distribution of the software without 9dnl specific, written prior permission. Red Hat makes no 10dnl representations about the suitability of this software for any purpose. It 11dnl is provided "as is" without express or implied warranty. 12dnl 13dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 14dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 15dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 16dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 17dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 18dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 19dnl PERFORMANCE OF THIS SOFTWARE. 20dnl 21dnl Process this file with autoconf to create configure. 22 23AC_PREREQ([2.57]) 24AC_INIT(xfs,[1.0.8], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xfs) 25AM_INIT_AUTOMAKE([dist-bzip2]) 26AM_MAINTAINER_MODE 27 28AM_CONFIG_HEADER(xfs-config.h) 29 30# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro 31m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 32XORG_MACROS_VERSION(1.1) 33 34AC_PROG_CC 35AC_PROG_INSTALL 36AC_CANONICAL_HOST 37 38case $host_os in 39 linux*|gnu*|*-gnu) 40 OS_CFLAGS="-D_XOPEN_SOURCE" 41 ;; 42 *) 43 OS_CFLAGS= 44 ;; 45esac 46 47AC_CHECK_HEADERS([stdint.h]) 48 49AC_ARG_WITH(default-config-file, 50 AS_HELP_STRING([--with-default-config-file=PATH], 51 [comma-separated list of paths to look for config file when not specified (default: ${sysconfdir}/X11/fs/config)]), 52 [CONFIG_FILE="$withval"], [CONFIG_FILE="${sysconfdir}/X11/fs/config"]) 53 54DEFAULT_CONFIG_FILE=`echo ${CONFIG_FILE} | sed 's/,/\\\\\\\\\\\",\\\\\\\\\\\"/'g` 55AC_DEFINE_DIR([DEFAULT_CONFIG_FILE], DEFAULT_CONFIG_FILE, 56 [comma-separated list of strings for config file paths when not specified]) 57 58# generate text for the man page 59case $CONFIG_FILE in 60 *,*) 61 CONFIG_FILE_DESC="the first file found from the list:" 62 CONFIG_FILE_PATH=`echo ${CONFIG_FILE} | sed 's/,/\\\\\\\\fR, \\\\\\\\fI/g'` 63 ;; 64 *) 65 CONFIG_FILE_DESC="the default file," 66 CONFIG_FILE_PATH="${CONFIG_FILE}" 67 ;; 68esac 69AC_SUBST([CONFIG_FILE_DESC]) 70AC_SUBST([CONFIG_FILE_PATH]) 71 72# Checks for pkg-config packages 73PKG_CHECK_MODULES(XFS, libfs xfont xtrans) 74XFS_CFLAGS="$XFS_CFLAGS $OS_CFLAGS" 75AC_SUBST(XFS_CFLAGS) 76AC_SUBST(XFS_LIBS) 77 78# Transport selection macro from xtrans.m4 79XTRANS_CONNECTION_FLAGS 80 81dnl Allow checking code with lint, sparse, etc. 82XORG_WITH_LINT 83 84XORG_MANPAGE_SECTIONS 85XORG_RELEASE_VERSION 86 87AC_OUTPUT([Makefile]) 88