configure.ac revision e1db7cd1
11.1Spgoyettednl  Copyright 2005 Red Hat, Inc.
21.1Spgoyettednl 
31.1Spgoyettednl  Permission to use, copy, modify, distribute, and sell this software and its
41.1Spgoyettednl  documentation for any purpose is hereby granted without fee, provided that
51.1Spgoyettednl  the above copyright notice appear in all copies and that both that
61.1Spgoyettednl  copyright notice and this permission notice appear in supporting
71.1Spgoyettednl  documentation, and that the name of Red Hat not be used in
81.1Spgoyettednl  advertising or publicity pertaining to distribution of the software without
91.1Spgoyettednl  specific, written prior permission.  Red Hat makes no
101.1Spgoyettednl  representations about the suitability of this software for any purpose.  It
111.1Spgoyettednl  is provided "as is" without express or implied warranty.
121.1Spgoyettednl 
131.1Spgoyettednl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
141.1Spgoyettednl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
151.1Spgoyettednl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
161.1Spgoyettednl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
171.1Spgoyettednl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
181.1Spgoyettednl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
191.1Spgoyettednl  PERFORMANCE OF THIS SOFTWARE.
201.1Spgoyettednl
211.1Spgoyettednl Process this file with autoconf to create configure.
221.1Spgoyette
231.1Spgoyette# Initialize Autoconf
241.1SpgoyetteAC_PREREQ([2.60])
251.1SpgoyetteAC_INIT([xfs],
261.1Spgoyette        [1.2.2],
271.1Spgoyette        [https://gitlab.freedesktop.org/xorg/app/xfs/-/issues],
281.1Spgoyette        [xfs])
291.1Spgoyette# Set common system defines for POSIX extensions, such as _GNU_SOURCE
301.1Spgoyette# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
311.1SpgoyetteAC_USE_SYSTEM_EXTENSIONS
321.1SpgoyetteAC_CONFIG_HEADERS([config.h])
331.1SpgoyetteAC_CONFIG_MACRO_DIR([m4])
341.1Spgoyette
351.1Spgoyette# Initialize Automake
361.1SpgoyetteAM_INIT_AUTOMAKE([foreign dist-xz subdir-objects])
371.1Spgoyette
381.1Spgoyette# Require xorg-macros minimum of 1.10 for HAVE_STYLESHEETS in XORG_CHECK_SGML_DOCTOOLS
391.1Spgoyettem4_ifndef([XORG_MACROS_VERSION],
401.1Spgoyette	  [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
411.1SpgoyetteXORG_MACROS_VERSION(1.10)
421.1SpgoyetteXORG_DEFAULT_OPTIONS
431.1SpgoyetteXORG_ENABLE_DEVEL_DOCS
441.1SpgoyetteXORG_WITH_XMLTO(0.0.20)
451.1SpgoyetteXORG_WITH_FOP
461.1SpgoyetteXORG_CHECK_SGML_DOCTOOLS(1.5)
471.1SpgoyetteXORG_WITH_LINT
481.1Spgoyette
491.1Spgoyette# Checks for typedefs, structures, and compiler characteristics.
501.1SpgoyetteAC_SYS_LARGEFILE
511.1Spgoyette
521.1SpgoyetteAC_CHECK_HEADERS([stdint.h])
531.1Spgoyette
541.1SpgoyetteAC_ARG_WITH(default-config-file,
551.1Spgoyette	AS_HELP_STRING([--with-default-config-file=PATH],
561.1Spgoyette   [comma-separated list of paths to look for config file when not specified (default: ${sysconfdir}/X11/fs/config)]),
571.1Spgoyette	[CONFIG_FILE="$withval"], [CONFIG_FILE="${sysconfdir}/X11/fs/config"])
581.1Spgoyette
591.1SpgoyetteDEFAULT_CONFIG_FILE=`echo ${CONFIG_FILE} | sed 's/,/\\\\\\\\\\\",\\\\\\\\\\\"/'g`
601.1SpgoyetteAX_DEFINE_DIR([DEFAULT_CONFIG_FILE], DEFAULT_CONFIG_FILE,
611.1Spgoyette    [comma-separated list of strings for config file paths when not specified])
621.1Spgoyette
631.1Spgoyette# generate text for the man page
641.1Spgoyettecase $CONFIG_FILE in
651.1Spgoyette    *,*)
661.1Spgoyette	CONFIG_FILE_DESC="the first file found from the list:"
671.1Spgoyette	CONFIG_FILE_PATH=`echo ${CONFIG_FILE} | sed 's/,/\\\\\\\\fR, \\\\\\\\fI/g'`
681.1Spgoyette	;;
691.1Spgoyette    *)
701.1Spgoyette	CONFIG_FILE_DESC="the default file,"
711.1Spgoyette	CONFIG_FILE_PATH="${CONFIG_FILE}"
721.1Spgoyette	;;
731.1Spgoyetteesac
741.1SpgoyetteAC_SUBST([CONFIG_FILE_DESC])
751.1SpgoyetteAC_SUBST([CONFIG_FILE_PATH])
761.1Spgoyette
771.1Spgoyette# Require X.Org's font util macros 1.1 or later for XORG_FONTROOTDIR
781.1Spgoyettem4_ifndef([XORG_FONT_MACROS_VERSION],
791.1Spgoyette	  [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
801.1SpgoyetteXORG_FONT_MACROS_VERSION(1.1)
811.1Spgoyette
821.1SpgoyetteXORG_FONTROOTDIR
831.1SpgoyetteXORG_FONTSUBDIR(FONTMISCDIR, fontmiscdir, misc)
841.1SpgoyetteXORG_FONTSUBDIR(FONTOTFDIR, fontotfdir, OTF)
851.1SpgoyetteXORG_FONTSUBDIR(FONTTTFDIR, fontttfdir, TTF)
861.1SpgoyetteXORG_FONTSUBDIR(FONTTYPE1DIR, fonttype1dir, Type1)
871.1SpgoyetteXORG_FONTSUBDIR(FONT75DPIDIR, font75dpidir, 75dpi)
881.1SpgoyetteXORG_FONTSUBDIR(FONT100DPIDIR, font100dpidir, 100dpi)
891.1Spgoyette
901.1Spgoyette# Determine font path to put in config file
911.1Spgoyette# Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
921.1Spgoyette# otherwise uses standard subdirectories of FONTROOTDIR. When cross
931.1Spgoyette# compiling, assume default font path uses standard FONTROOTDIR directories.
941.1SpgoyetteDEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
951.1Spgoyetteif test "$cross_compiling" != yes; then
961.1Spgoyette	AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
971.1Spgoyette		[DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
981.1Spgoyette		[case $host_os in
991.1Spgoyette			darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
1001.1Spgoyette		esac])
1011.1Spgoyettefi
1021.1SpgoyetteAC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
1031.1Spgoyette				[ FONTPATH="$withval" ],
1041.1Spgoyette				[ FONTPATH="${DEFAULT_FONT_PATH}" ])
1051.1Spgoyette
1061.1SpgoyetteAC_MSG_CHECKING([for default font path])
1071.1SpgoyetteAC_MSG_RESULT([$FONTPATH])
1081.1Spgoyette
1091.1SpgoyetteAC_SUBST([FONTPATH])
1101.1Spgoyette
1111.1Spgoyette# Option to enable support for starting from inetd
1121.1SpgoyetteAC_ARG_ENABLE(inetd,
1131.1Spgoyette	AS_HELP_STRING([--enable-inetd],
1141.1Spgoyette	    [Support -inetd flag for starting from inetd (default: enabled)]),
1151.1Spgoyette	    [INETD=$enableval], [INETD=yes])
1161.1Spgoyetteif test "x$INETD" = xyes; then
1171.1Spgoyette        AC_DEFINE(XFS_INETD, 1, [Build support for starting from inetd])
1181.1Spgoyettefi
1191.1Spgoyette
1201.1Spgoyette# Option to enable support for logging to syslog
1211.1SpgoyetteAC_ARG_ENABLE(syslog,
1221.1Spgoyette	AS_HELP_STRING([--enable-syslog],
1231.1Spgoyette	    [Support option for logging via syslog (default: enabled)]),
1241.1Spgoyette	    [SYSLOG=$enableval], [SYSLOG=yes])
1251.1Spgoyetteif test "x$SYSLOG" = xyes; then
1261.1Spgoyette        AC_DEFINE(USE_SYSLOG, 1, [Build support for logging via syslog])
1271.1Spgoyettefi
1281.1Spgoyette
1291.1Spgoyette
1301.1Spgoyette# Checks for system functions / libraries
1311.1SpgoyetteAC_CHECK_FUNCS([daemon])
1321.1Spgoyette
133# Checks for pkg-config packages
134#  - xproto >= 7.0.25 required for _X_COLD in <X11/Xfuncproto.h>
135#  - xfont >= 2.0.1 for new server API
136PKG_CHECK_MODULES(XFS, xproto >= 7.0.25 xfont2 >= 2.0.1 xtrans)
137
138case "$host_os" in
139  cygwin*|mingw*)
140    CFLAGS="$CFLAGS -DFD_SETSIZE=256"
141    LDFLAGS="$LDFLAGS -Wl,--export-all" ;;
142esac
143
144# Transport selection macro from xtrans.m4
145XTRANS_CONNECTION_FLAGS
146
147AC_CONFIG_FILES([Makefile
148                 config/Makefile
149                 doc/Makefile
150                 man/Makefile])
151AC_OUTPUT
152