configure.ac revision 1e42c052
13da7aff1Smrgdnl Copyright 2005 Red Hat, Inc. 23a99fc18Smrgdnl 33da7aff1Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 43da7aff1Smrgdnl documentation for any purpose is hereby granted without fee, provided that 53da7aff1Smrgdnl the above copyright notice appear in all copies and that both that 63da7aff1Smrgdnl copyright notice and this permission notice appear in supporting 73da7aff1Smrgdnl documentation, and that the name of Red Hat not be used in 83da7aff1Smrgdnl advertising or publicity pertaining to distribution of the software without 93da7aff1Smrgdnl specific, written prior permission. Red Hat makes no 103da7aff1Smrgdnl representations about the suitability of this software for any purpose. It 113da7aff1Smrgdnl is provided "as is" without express or implied warranty. 123a99fc18Smrgdnl 133da7aff1Smrgdnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 143da7aff1Smrgdnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 153da7aff1Smrgdnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 163da7aff1Smrgdnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 173da7aff1Smrgdnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 183da7aff1Smrgdnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 193da7aff1Smrgdnl PERFORMANCE OF THIS SOFTWARE. 203da7aff1Smrgdnl 213da7aff1Smrgdnl Process this file with autoconf to create configure. 223da7aff1Smrg 233e999d35Smrg# Initialize Autoconf 24f9d592e5SmrgAC_PREREQ([2.60]) 251e42c052SmrgAC_INIT([xlogo], [1.0.7], 263a99fc18Smrg [https://gitlab.freedesktop.org/xorg/app/xlogo/-/issues], [xlogo]) 273e999d35SmrgAC_CONFIG_SRCDIR([Makefile.am]) 283e999d35SmrgAC_CONFIG_HEADERS([config.h]) 293e999d35Smrg 303e999d35Smrg# Initialize Automake 313a99fc18SmrgAM_INIT_AUTOMAKE([foreign dist-xz]) 323da7aff1Smrg 33f9d592e5Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 34e531b1a7Smrgm4_ifndef([XORG_MACROS_VERSION], 35f9d592e5Smrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 36f9d592e5SmrgXORG_MACROS_VERSION(1.8) 37e531b1a7SmrgXORG_DEFAULT_OPTIONS 38e531b1a7Smrg 391e42c052Smrg# Checks for library functions. 401e42c052SmrgAC_CHECK_FUNCS([strlcat strlcpy]) 411e42c052Smrg 42f9d592e5Smrg# Base set of required pkg-config packages 431e42c052SmrgXLOGO_DEPS="sm xaw7 xmu xt >= 1.0 xext x11 xproto >= 7.0.22" 443da7aff1Smrg 453a99fc18Smrg# Ensure pkg-config is initialized, since first call to macros is conditional 463a99fc18SmrgPKG_PROG_PKG_CONFIG 473da7aff1Smrg 483a99fc18Smrg# Use render & xft2 to draw logo? 493a99fc18SmrgAC_MSG_CHECKING([whether to use render & xft2 to draw logo]) 503a99fc18SmrgAC_ARG_WITH(render, 513a99fc18Smrg AS_HELP_STRING([--with-render], [Use Xrender & Xft2 to draw logo]), 523da7aff1Smrg USE_RENDER="$withval", USE_RENDER="try") 533da7aff1Smrg 543da7aff1Smrgif test "x$USE_RENDER" = "xtry" ; then 553da7aff1Smrg PKG_CHECK_EXISTS([xrender xft], USE_RENDER="yes", USE_RENDER="no") 563da7aff1Smrgfi 573a99fc18SmrgAC_MSG_RESULT([$USE_RENDER]) 583da7aff1Smrg 593da7aff1Smrgif test "x$USE_RENDER" = "xyes" ; then 60f9d592e5Smrg XLOGO_DEPS="xft xrender $XLOGO_DEPS" 613da7aff1Smrg 623da7aff1Smrg AC_DEFINE(XRENDER, 1, [Define to 1 to use Xrender & Xft2 to draw logo]) 633da7aff1Smrgfi 643fe82118SmrgAM_CONDITIONAL([USE_RENDER], [test "x$USE_RENDER" = "xyes"]) 653da7aff1Smrg 663a99fc18Smrg# Use XKB to ring the bell? 673a99fc18SmrgAC_MSG_CHECKING([whether to use XkbStdBell]) 683a99fc18SmrgAC_ARG_WITH(xkb, 693a99fc18Smrg AS_HELP_STRING([--with-xkb], [Use XKB to sound bells]), 703a99fc18Smrg USE_XKB="$withval", USE_XKB="try") 713a99fc18Smrg 723a99fc18Smrgif test "x$USE_XKB" = "xtry" ; then 733a99fc18Smrg PKG_CHECK_EXISTS([xkbfile], USE_XKB="yes", USE_XKB="no") 743a99fc18Smrgfi 753a99fc18SmrgAC_MSG_RESULT([$USE_XKB]) 763a99fc18Smrg 773a99fc18Smrgif test "x$USE_XKB" = "xyes" ; then 783a99fc18Smrg XLOGO_DEPS="xkbfile $XLOGO_DEPS" 793a99fc18Smrg 803a99fc18Smrg AC_DEFINE(XKB, 1, [Define to 1 to use XkbStdBell]) 813a99fc18Smrgfi 823a99fc18Smrg 83f9d592e5SmrgPKG_CHECK_MODULES(XLOGO, $XLOGO_DEPS) 843da7aff1Smrg 853da7aff1SmrgPKG_CHECK_MODULES(APPDEFS, xt) 86f9d592e5Smrgxt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt` 87e531b1a7SmrgAC_ARG_WITH(appdefaultdir, 883fe82118Smrg AS_HELP_STRING([--with-appdefaultdir=<pathname>], 89e531b1a7Smrg [specify directory for app-defaults files (default is autodetected)]), 90e531b1a7Smrg [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) 913da7aff1SmrgAC_SUBST(appdefaultdir) 923da7aff1Smrg 933fe82118SmrgAC_CONFIG_FILES([ 943fe82118Smrg Makefile 953fe82118Smrg man/Makefile]) 963fe82118SmrgAC_OUTPUT 97