1 2dnl Copyright 2005 Red Hat, Inc. 3dnl 4dnl Permission to use, copy, modify, distribute, and sell this software and its 5dnl documentation for any purpose is hereby granted without fee, provided that 6dnl the above copyright notice appear in all copies and that both that 7dnl copyright notice and this permission notice appear in supporting 8dnl documentation, and that the name of Red Hat not be used in 9dnl advertising or publicity pertaining to distribution of the software without 10dnl specific, written prior permission. Red Hat makes no 11dnl representations about the suitability of this software for any purpose. It 12dnl is provided "as is" without express or implied warranty. 13dnl 14dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20dnl PERFORMANCE OF THIS SOFTWARE. 21dnl 22dnl Process this file with autoconf to create configure. 23 24# Initialize Autoconf 25AC_PREREQ([2.60]) 26AC_INIT([xditview], 27 [1.0.7], 28 [https://gitlab.freedesktop.org/xorg/app/xditview/-/issues], 29 [xditview]) 30AC_CONFIG_SRCDIR([Makefile.am]) 31AC_CONFIG_HEADERS([config.h]) 32 33# Initialize Automake 34AM_INIT_AUTOMAKE([foreign dist-xz]) 35 36# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 37m4_ifndef([XORG_MACROS_VERSION], 38 [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 39XORG_MACROS_VERSION(1.8) 40XORG_DEFAULT_OPTIONS 41 42# Checks for typedefs, structures, and compiler characteristics. 43AC_SYS_LARGEFILE 44 45# Checks for library functions. 46AC_CHECK_FUNC([mkstemp], 47 AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the "mkstemp" function.])) 48 49# Checks for pkg-config packages 50PKG_CHECK_MODULES(XDITVIEW, xaw7 xmu xt x11) 51 52PKG_CHECK_MODULES(APPDEFS, xt) 53xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt` 54AC_ARG_WITH(appdefaultdir, 55 AS_HELP_STRING([--with-appdefaultdir=<pathname>], 56 [specify directory for app-defaults files (default is autodetected)]), 57 [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) 58AC_SUBST(appdefaultdir) 59 60# Check whether to use Xft to draw text 61AC_ARG_WITH(xft, 62 AS_HELP_STRING([--with-xft], 63 [Use Xft to draw text (default is YES if installed)]), 64 [USE_XFT="$withval"], 65 PKG_CHECK_EXISTS([xft xrender fontconfig], 66 [USE_XFT="yes"], [USE_XFT="no"])) 67 68if test "x$USE_XFT" = "xyes" ; then 69 PKG_CHECK_MODULES(XFT, [xft xrender fontconfig]) 70 AC_DEFINE([USE_XFT], 1, 71 [Define to 1 to use Xft for text rendering]) 72fi 73 74 75AC_CONFIG_FILES([ 76 Makefile 77 man/Makefile]) 78AC_OUTPUT 79 80echo "" 81echo "$PACKAGE_STRING will be built with the following settings:" 82echo " XFT: "$USE_XFT 83