configure.ac revision 688b3aec
1e9554658Smrg 2e9554658Smrgdnl Copyright 2005 Red Hat, Inc. 3c2b339b4Smrgdnl 4e9554658Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 5e9554658Smrgdnl documentation for any purpose is hereby granted without fee, provided that 6e9554658Smrgdnl the above copyright notice appear in all copies and that both that 7e9554658Smrgdnl copyright notice and this permission notice appear in supporting 8e9554658Smrgdnl documentation, and that the name of Red Hat not be used in 9e9554658Smrgdnl advertising or publicity pertaining to distribution of the software without 10e9554658Smrgdnl specific, written prior permission. Red Hat makes no 11e9554658Smrgdnl representations about the suitability of this software for any purpose. It 12e9554658Smrgdnl is provided "as is" without express or implied warranty. 13c2b339b4Smrgdnl 14e9554658Smrgdnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15e9554658Smrgdnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16e9554658Smrgdnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17e9554658Smrgdnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18e9554658Smrgdnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19e9554658Smrgdnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20e9554658Smrgdnl PERFORMANCE OF THIS SOFTWARE. 21e9554658Smrgdnl 22e9554658Smrgdnl Process this file with autoconf to create configure. 23e9554658Smrg 24688b3aecSmrg# Initialize Autoconf 258903d43aSmrgAC_PREREQ([2.60]) 268903d43aSmrgAC_INIT([xclock], 27688b3aecSmrg [1.0.8], 28688b3aecSmrg [https://gitlab.freedesktop.org/xorg/app/xclock/issues], 298903d43aSmrg [xclock]) 30688b3aecSmrgAC_CONFIG_SRCDIR([Makefile.am]) 31688b3aecSmrgAC_CONFIG_HEADERS([config.h]) 32688b3aecSmrg 33688b3aecSmrg# Initialize Automake 348903d43aSmrgAM_INIT_AUTOMAKE([foreign dist-bzip2]) 35e9554658Smrg 368903d43aSmrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 378903d43aSmrgm4_ifndef([XORG_MACROS_VERSION], 388903d43aSmrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 398903d43aSmrgXORG_MACROS_VERSION(1.8) 408903d43aSmrgXORG_DEFAULT_OPTIONS 41c2b339b4Smrg 42688b3aecSmrgAC_CHECK_FUNCS([strlcpy getpid nl_langinfo]) 43e9554658Smrg 44309c398aSmrgAM_ICONV 45e9554658Smrg 46e9554658Smrgdnl Required dependencies 475dd5f640SmrgPKG_CHECK_MODULES(XCLOCK, [xaw7 xmu x11 xproto >= 7.0.17]) 48309c398aSmrgXCLOCK_LIBS="$XCLOCK_LIBS $LIBICONV" 49e9554658Smrg 50e9554658Smrgdnl Optional dependencies 51309c398aSmrgAC_ARG_WITH(xft, AS_HELP_STRING([--with-xft],[Use Xft2 and Xrender for rendering (Default is YES)]),use_xft="$withval",use_xft="try") 52e9554658Smrgif test x$use_xft != xno ; then 53e9554658Smrg PKG_CHECK_MODULES(XFT, [xrender xft]) 54e9554658Smrg AC_SEARCH_LIBS(sqrt, [m]) 55e9554658Smrg XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XFT_CFLAGS" 56e9554658Smrg XCLOCK_LIBS="$XCLOCK_LIBS $XFT_LIBS" 57e9554658Smrg AC_DEFINE([XRENDER],1,[Define to use X Render Extension]) 58e9554658Smrg AC_DEFINE([XFREE86_FT2],1,[Define to use Xft2 library]) 59c2b339b4Smrgfi 60e9554658Smrg 61309c398aSmrgAC_ARG_WITH(xkb, AS_HELP_STRING([--with-xkb],[Use XKB to sound bells (Default is YES)]),use_xkb="$withval",use_xkb="try") 62e9554658Smrgif test x$use_xkb != xno ; then 63e9554658Smrg PKG_CHECK_MODULES(XKB, xkbfile) 64e9554658Smrg XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XKB_CFLAGS" 65e9554658Smrg XCLOCK_LIBS="$XCLOCK_LIBS $XKB_LIBS" 66e9554658Smrg AC_DEFINE([XKB],1,[Define to use XkbStdBell]) 67e9554658Smrgfi 68e9554658Smrg 69e9554658Smrg 70e9554658SmrgPKG_CHECK_MODULES(APPDEFS, xt) 718903d43aSmrgxt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt` 72c2b339b4SmrgAC_ARG_WITH(appdefaultdir, 73309c398aSmrg AS_HELP_STRING([--with-appdefaultdir=<pathname>], 74c2b339b4Smrg [specify directory for app-defaults files (default is autodetected)]), 75c2b339b4Smrg [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) 76e9554658SmrgAC_SUBST(appdefaultdir) 77e9554658Smrg 78309c398aSmrgAC_CONFIG_FILES([ 79309c398aSmrg Makefile 80309c398aSmrg man/Makefile]) 81309c398aSmrgAC_OUTPUT 82