configure.ac revision 3a99fc18
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]) 253a99fc18SmrgAC_INIT([xlogo], [1.0.6], 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 39f9d592e5Smrg# Base set of required pkg-config packages 403fe82118SmrgXLOGO_DEPS="sm xaw7 xmu xt >= 1.0 xext x11" 413da7aff1Smrg 423a99fc18Smrg# Ensure pkg-config is initialized, since first call to macros is conditional 433a99fc18SmrgPKG_PROG_PKG_CONFIG 443da7aff1Smrg 453a99fc18Smrg# Use render & xft2 to draw logo? 463a99fc18SmrgAC_MSG_CHECKING([whether to use render & xft2 to draw logo]) 473a99fc18SmrgAC_ARG_WITH(render, 483a99fc18Smrg AS_HELP_STRING([--with-render], [Use Xrender & Xft2 to draw logo]), 493da7aff1Smrg USE_RENDER="$withval", USE_RENDER="try") 503da7aff1Smrg 513da7aff1Smrgif test "x$USE_RENDER" = "xtry" ; then 523da7aff1Smrg PKG_CHECK_EXISTS([xrender xft], USE_RENDER="yes", USE_RENDER="no") 533da7aff1Smrgfi 543a99fc18SmrgAC_MSG_RESULT([$USE_RENDER]) 553da7aff1Smrg 563da7aff1Smrgif test "x$USE_RENDER" = "xyes" ; then 57f9d592e5Smrg XLOGO_DEPS="xft xrender $XLOGO_DEPS" 583da7aff1Smrg 593da7aff1Smrg AC_DEFINE(XRENDER, 1, [Define to 1 to use Xrender & Xft2 to draw logo]) 603da7aff1Smrgfi 613fe82118SmrgAM_CONDITIONAL([USE_RENDER], [test "x$USE_RENDER" = "xyes"]) 623da7aff1Smrg 633a99fc18Smrg# Use XKB to ring the bell? 643a99fc18SmrgAC_MSG_CHECKING([whether to use XkbStdBell]) 653a99fc18SmrgAC_ARG_WITH(xkb, 663a99fc18Smrg AS_HELP_STRING([--with-xkb], [Use XKB to sound bells]), 673a99fc18Smrg USE_XKB="$withval", USE_XKB="try") 683a99fc18Smrg 693a99fc18Smrgif test "x$USE_XKB" = "xtry" ; then 703a99fc18Smrg PKG_CHECK_EXISTS([xkbfile], USE_XKB="yes", USE_XKB="no") 713a99fc18Smrgfi 723a99fc18SmrgAC_MSG_RESULT([$USE_XKB]) 733a99fc18Smrg 743a99fc18Smrgif test "x$USE_XKB" = "xyes" ; then 753a99fc18Smrg XLOGO_DEPS="xkbfile $XLOGO_DEPS" 763a99fc18Smrg 773a99fc18Smrg AC_DEFINE(XKB, 1, [Define to 1 to use XkbStdBell]) 783a99fc18Smrgfi 793a99fc18Smrg 80f9d592e5SmrgPKG_CHECK_MODULES(XLOGO, $XLOGO_DEPS) 813da7aff1Smrg 823da7aff1SmrgPKG_CHECK_MODULES(APPDEFS, xt) 83f9d592e5Smrgxt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt` 84e531b1a7SmrgAC_ARG_WITH(appdefaultdir, 853fe82118Smrg AS_HELP_STRING([--with-appdefaultdir=<pathname>], 86e531b1a7Smrg [specify directory for app-defaults files (default is autodetected)]), 87e531b1a7Smrg [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) 883da7aff1SmrgAC_SUBST(appdefaultdir) 893da7aff1Smrg 903fe82118SmrgAC_CONFIG_FILES([ 913fe82118Smrg Makefile 923fe82118Smrg man/Makefile]) 933fe82118SmrgAC_OUTPUT 94