133c89af1Smrg
233c89af1Smrgdnl  Copyright 2005 Red Hat, Inc.
3ad47b356Smrgdnl
433c89af1Smrgdnl  Permission to use, copy, modify, distribute, and sell this software and its
533c89af1Smrgdnl  documentation for any purpose is hereby granted without fee, provided that
633c89af1Smrgdnl  the above copyright notice appear in all copies and that both that
733c89af1Smrgdnl  copyright notice and this permission notice appear in supporting
833c89af1Smrgdnl  documentation, and that the name of Red Hat not be used in
933c89af1Smrgdnl  advertising or publicity pertaining to distribution of the software without
1033c89af1Smrgdnl  specific, written prior permission.  Red Hat makes no
1133c89af1Smrgdnl  representations about the suitability of this software for any purpose.  It
1233c89af1Smrgdnl  is provided "as is" without express or implied warranty.
13ad47b356Smrgdnl
1433c89af1Smrgdnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
1533c89af1Smrgdnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
1633c89af1Smrgdnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
1733c89af1Smrgdnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
1833c89af1Smrgdnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
1933c89af1Smrgdnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2033c89af1Smrgdnl  PERFORMANCE OF THIS SOFTWARE.
2133c89af1Smrgdnl
2233c89af1Smrgdnl Process this file with autoconf to create configure.
2333c89af1Smrg
24ad47b356Smrg# Initialize Autoconf
2516d8e44fSmrgAC_PREREQ([2.60])
2638d718bdSmrgAC_INIT([editres], [1.0.9],
2738d718bdSmrg        [https://gitlab.freedesktop.org/xorg/app/editres/-/issues], [editres])
28ad47b356SmrgAC_CONFIG_SRCDIR([Makefile.am])
29ad47b356SmrgAC_CONFIG_HEADERS([config.h])
30ad47b356Smrg
31ad47b356Smrg# Initialize Automake
32352bf44eSmrgAM_INIT_AUTOMAKE([foreign dist-xz])
3333c89af1Smrg
3416d8e44fSmrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
3516d8e44fSmrgm4_ifndef([XORG_MACROS_VERSION],
3616d8e44fSmrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
3716d8e44fSmrgXORG_MACROS_VERSION(1.8)
3816d8e44fSmrgXORG_DEFAULT_OPTIONS
39278eca22Smrg
4038d718bdSmrg# Optional dependencies
4138d718bdSmrgAC_ARG_WITH(xkb,
4238d718bdSmrg        AS_HELP_STRING([--without-xkb],
4338d718bdSmrg                [Disable use of XKB to sound bells (Default is with-xkb)]),
4438d718bdSmrg        use_xkb="$withval", use_xkb="yes")
4538d718bdSmrgif test x$use_xkb != xno ; then
4638d718bdSmrg        XKBMODULE="xkbfile"
4738d718bdSmrg        AC_DEFINE([XKB], 1, [Define to use XkbStdBell (libxkbfile)])
4838d718bdSmrgfi
4938d718bdSmrg
50352bf44eSmrg# Obtain compiler/linker options from dependencies
5138d718bdSmrgPKG_CHECK_MODULES(EDITRES, [xaw7 x11 xt >= 1.0.99.1 xmu xproto >= 7.0.17 ${XKBMODULE}])
5233c89af1Smrg
5333c89af1SmrgPKG_CHECK_MODULES(APPDEFS, xt)
5416d8e44fSmrgxt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
55278eca22SmrgAC_ARG_WITH(appdefaultdir,
56988795beSmrg	AS_HELP_STRING([--with-appdefaultdir=<pathname>],
57278eca22Smrg	  [specify directory for app-defaults files (default is autodetected)]),
58278eca22Smrg	[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
5933c89af1SmrgAC_SUBST(appdefaultdir)
6033c89af1Smrg
61988795beSmrgAC_CONFIG_FILES([
62988795beSmrg	Makefile
63988795beSmrg	man/Makefile])
64988795beSmrgAC_OUTPUT
65