configure.ac revision c2b339b4
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 24e9554658SmrgAC_PREREQ([2.57]) 25c2b339b4SmrgAC_INIT(xclock,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xclock) 26e9554658SmrgAM_INIT_AUTOMAKE([dist-bzip2]) 27e9554658SmrgAM_MAINTAINER_MODE 28e9554658Smrg 29c2b339b4Smrg# Require xorg-macros: XORG_DEFAULT_OPTIONS 30c2b339b4Smrgm4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])]) 31c2b339b4SmrgXORG_MACROS_VERSION(1.3) 32c2b339b4Smrg 33e9554658SmrgAM_CONFIG_HEADER(config.h) 34e9554658Smrg 35e9554658SmrgAC_PROG_CC 36e9554658SmrgAC_PROG_INSTALL 37e9554658Smrg 38c2b339b4SmrgXORG_DEFAULT_OPTIONS 39c2b339b4Smrg 40e9554658SmrgAC_CHECK_FUNCS([strlcpy getpid]) 41e9554658Smrg 42c2b339b4SmrgAC_SEARCH_LIBS([iconv], [iconv], 43e9554658Smrg [AC_DEFINE(HAVE_ICONV, 1, [Define to 1 if iconv() is available.])]) 44e9554658Smrg 45e9554658Smrgdnl Required dependencies 46e9554658SmrgPKG_CHECK_MODULES(XCLOCK_X11, x11) 47c2b339b4SmrgPKG_CHECK_MODULES(XAW, xaw7) 48e9554658SmrgXCLOCK_CFLAGS="$XCLOCK_X11_CFLAGS $XAW_CFLAGS" 49e9554658SmrgXCLOCK_LIBS="$XCLOCK_X11_LIBS $XAW_LIBS" 50e9554658Smrg 51e9554658Smrgdnl Optional dependencies 52e9554658SmrgAC_ARG_WITH(xft, AC_HELP_STRING([--with-xft],[Use Xft2 and Xrender for rendering (Default is YES)]),use_xft="$withval",use_xft="try") 53e9554658Smrgif test x$use_xft != xno ; then 54e9554658Smrg PKG_CHECK_MODULES(XFT, [xrender xft]) 55e9554658Smrg AC_SEARCH_LIBS(sqrt, [m]) 56e9554658Smrg XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XFT_CFLAGS" 57e9554658Smrg XCLOCK_LIBS="$XCLOCK_LIBS $XFT_LIBS" 58e9554658Smrg AC_DEFINE([XRENDER],1,[Define to use X Render Extension]) 59e9554658Smrg AC_DEFINE([XFREE86_FT2],1,[Define to use Xft2 library]) 60c2b339b4Smrgfi 61e9554658Smrg 62e9554658SmrgAC_ARG_WITH(xkb, AC_HELP_STRING([--with-xkb],[Use XKB to sound bells (Default is YES)]),use_xkb="$withval",use_xkb="try") 63e9554658Smrgif test x$use_xkb != xno ; then 64e9554658Smrg PKG_CHECK_MODULES(XKB, xkbfile) 65e9554658Smrg XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XKB_CFLAGS" 66e9554658Smrg XCLOCK_LIBS="$XCLOCK_LIBS $XKB_LIBS" 67e9554658Smrg AC_DEFINE([XKB],1,[Define to use XkbStdBell]) 68e9554658Smrgfi 69e9554658Smrg 70e9554658SmrgAC_SUBST(XCLOCK_CFLAGS) 71e9554658SmrgAC_SUBST(XCLOCK_LIBS) 72e9554658Smrg 73e9554658SmrgPKG_CHECK_MODULES(APPDEFS, xt) 74c2b339b4Smrgxt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt) 75c2b339b4SmrgAC_ARG_WITH(appdefaultdir, 76c2b339b4Smrg AC_HELP_STRING([--with-appdefaultdir=<pathname>], 77c2b339b4Smrg [specify directory for app-defaults files (default is autodetected)]), 78c2b339b4Smrg [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) 79e9554658SmrgAC_SUBST(appdefaultdir) 80e9554658Smrg 81e9554658SmrgAC_OUTPUT([Makefile]) 82