configure.ac revision e9554658
1e9554658Smrg 2e9554658Smrgdnl Copyright 2005 Red Hat, Inc. 3e9554658Smrgdnl 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. 13e9554658Smrgdnl 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 24e9554658SmrgAC_PREREQ([2.57]) 25e9554658SmrgAC_INIT(xclock,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xclock) 26e9554658SmrgAM_INIT_AUTOMAKE([dist-bzip2]) 27e9554658SmrgAM_MAINTAINER_MODE 28e9554658Smrg 29e9554658SmrgAM_CONFIG_HEADER(config.h) 30e9554658Smrg 31e9554658SmrgAC_PROG_CC 32e9554658SmrgAC_PROG_INSTALL 33e9554658Smrg 34e9554658SmrgAC_CHECK_FUNCS([strlcpy getpid]) 35e9554658Smrg 36e9554658SmrgAC_SEARCH_LIBS([iconv], [iconv], 37e9554658Smrg [AC_DEFINE(HAVE_ICONV, 1, [Define to 1 if iconv() is available.])]) 38e9554658Smrg 39e9554658Smrgdnl Required dependencies 40e9554658SmrgPKG_CHECK_MODULES(XCLOCK_X11, x11) 41e9554658SmrgXAW_CHECK_XPRINT_SUPPORT(XAW) 42e9554658SmrgXCLOCK_CFLAGS="$XCLOCK_X11_CFLAGS $XAW_CFLAGS" 43e9554658SmrgXCLOCK_LIBS="$XCLOCK_X11_LIBS $XAW_LIBS" 44e9554658Smrg 45e9554658Smrgdnl Optional dependencies 46e9554658SmrgAC_ARG_WITH(xft, AC_HELP_STRING([--with-xft],[Use Xft2 and Xrender for rendering (Default is YES)]),use_xft="$withval",use_xft="try") 47e9554658Smrgif test x$use_xft != xno ; then 48e9554658Smrg PKG_CHECK_MODULES(XFT, [xrender xft]) 49e9554658Smrg AC_SEARCH_LIBS(sqrt, [m]) 50e9554658Smrg XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XFT_CFLAGS" 51e9554658Smrg XCLOCK_LIBS="$XCLOCK_LIBS $XFT_LIBS" 52e9554658Smrg AC_DEFINE([XRENDER],1,[Define to use X Render Extension]) 53e9554658Smrg AC_DEFINE([XFREE86_FT2],1,[Define to use Xft2 library]) 54e9554658Smrgfi 55e9554658Smrg 56e9554658SmrgAC_ARG_WITH(xkb, AC_HELP_STRING([--with-xkb],[Use XKB to sound bells (Default is YES)]),use_xkb="$withval",use_xkb="try") 57e9554658Smrgif test x$use_xkb != xno ; then 58e9554658Smrg PKG_CHECK_MODULES(XKB, xkbfile) 59e9554658Smrg XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XKB_CFLAGS" 60e9554658Smrg XCLOCK_LIBS="$XCLOCK_LIBS $XKB_LIBS" 61e9554658Smrg AC_DEFINE([XKB],1,[Define to use XkbStdBell]) 62e9554658Smrgfi 63e9554658Smrg 64e9554658SmrgAC_SUBST(XCLOCK_CFLAGS) 65e9554658SmrgAC_SUBST(XCLOCK_LIBS) 66e9554658Smrg 67e9554658SmrgPKG_CHECK_MODULES(APPDEFS, xt) 68e9554658Smrgappdefaultdir=$(pkg-config --variable=appdefaultdir xt) 69e9554658SmrgAC_SUBST(appdefaultdir) 70e9554658Smrg 71e9554658SmrgXORG_MANPAGE_SECTIONS 72e9554658SmrgXORG_RELEASE_VERSION 73e9554658Smrg 74e9554658SmrgAC_OUTPUT([Makefile]) 75