1492e1cfeSmrg
2492e1cfeSmrgdnl  Copyright 2005 Red Hat, Inc.
33538fbe3Smrgdnl
4492e1cfeSmrgdnl  Permission to use, copy, modify, distribute, and sell this software and its
5492e1cfeSmrgdnl  documentation for any purpose is hereby granted without fee, provided that
6492e1cfeSmrgdnl  the above copyright notice appear in all copies and that both that
7492e1cfeSmrgdnl  copyright notice and this permission notice appear in supporting
8492e1cfeSmrgdnl  documentation, and that the name of Red Hat not be used in
9492e1cfeSmrgdnl  advertising or publicity pertaining to distribution of the software without
10492e1cfeSmrgdnl  specific, written prior permission.  Red Hat makes no
11492e1cfeSmrgdnl  representations about the suitability of this software for any purpose.  It
12492e1cfeSmrgdnl  is provided "as is" without express or implied warranty.
133538fbe3Smrgdnl
14492e1cfeSmrgdnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15492e1cfeSmrgdnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16492e1cfeSmrgdnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17492e1cfeSmrgdnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18492e1cfeSmrgdnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19492e1cfeSmrgdnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20492e1cfeSmrgdnl  PERFORMANCE OF THIS SOFTWARE.
21492e1cfeSmrgdnl
22492e1cfeSmrgdnl Process this file with autoconf to create configure.
23492e1cfeSmrg
241afad795Smrg# Initialize Autoconf
259e0146f7SmrgAC_PREREQ([2.60])
2631e5d586SmrgAC_INIT([xfd], [1.1.4],
2731e5d586Smrg	[https://gitlab.freedesktop.org/xorg/app/xfd/-/issues], [xfd])
281afad795SmrgAC_CONFIG_SRCDIR([Makefile.am])
291afad795SmrgAC_CONFIG_HEADERS([config.h])
301afad795Smrg
311afad795Smrg# Initialize Automake
3231e5d586SmrgAM_INIT_AUTOMAKE([foreign dist-xz])
33492e1cfeSmrg
349e0146f7Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
359e0146f7Smrgm4_ifndef([XORG_MACROS_VERSION],
369e0146f7Smrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
379e0146f7SmrgXORG_MACROS_VERSION(1.8)
389e0146f7SmrgXORG_DEFAULT_OPTIONS
39492e1cfeSmrg
409e0146f7Smrg# Internationalization & localization support
419e0146f7SmrgAC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"])
429e0146f7SmrgAC_MSG_CHECKING([where to install localized messages])
439e0146f7SmrgAC_ARG_WITH([localedir], AS_HELP_STRING([--with-localedir=<path>],
449e0146f7Smrg        [Path to install message files in (default: datadir/locale)]),
459e0146f7Smrg        [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale])
463538fbe3SmrgAC_SUBST([LOCALEDIR])
479e0146f7Smrgif test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
489e0146f7Smrg        AC_MSG_RESULT([nowhere])
499e0146f7Smrg        USE_GETTEXT="no"
509e0146f7Smrgelse
519e0146f7Smrg        AC_MSG_RESULT([$LOCALEDIR])
529e0146f7Smrgfi
53492e1cfeSmrg
549e0146f7Smrgif test "x$USE_GETTEXT" = "xyes" ; then
559e0146f7Smrg        AC_DEFINE([USE_GETTEXT], 1,
569e0146f7Smrg                  [Define to 1 if you want to use the gettext() function.])
579e0146f7Smrgfi
589e0146f7SmrgAM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes")
59492e1cfeSmrg
60b78bb896Smrg# Optional dependencies
61b78bb896SmrgAC_ARG_WITH(xkb,
62b78bb896Smrg        AS_HELP_STRING([--without-xkb],
63b78bb896Smrg                [Disable use of XKB to sound bells (Default is with-xkb)]),
64b78bb896Smrg        use_xkb="$withval", use_xkb="yes")
65b78bb896Smrgif test x$use_xkb != xno ; then
66b78bb896Smrg        XKBMODULE="xkbfile"
67b78bb896Smrg        AC_DEFINE([XKB],1,[Define to use XkbStdBell])
68b78bb896Smrgfi
69b78bb896Smrg
709e0146f7Smrg# Checks for pkg-config packages
7131e5d586SmrgPKG_CHECK_MODULES(XFD, [xaw7 fontconfig xft xrender xmu xproto >= 7.0.25 ${XKBMODULE}])
72492e1cfeSmrg
73492e1cfeSmrgPKG_CHECK_MODULES(APPDEFS, xt)
749e0146f7Smrgxt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
759e0146f7SmrgAC_ARG_WITH(appdefaultdir,
763538fbe3Smrg	AS_HELP_STRING([--with-appdefaultdir=<pathname>],
779e0146f7Smrg	  [specify directory for app-defaults files (default is autodetected)]),
789e0146f7Smrg	[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
79492e1cfeSmrgAC_SUBST(appdefaultdir)
80492e1cfeSmrg
81492e1cfeSmrg
823538fbe3SmrgAC_CONFIG_FILES([
833538fbe3Smrg	Makefile
843538fbe3Smrg	man/Makefile])
853538fbe3SmrgAC_OUTPUT
86