1 2dnl Copyright 2005 Red Hat, Inc. 3dnl 4dnl Permission to use, copy, modify, distribute, and sell this software and its 5dnl documentation for any purpose is hereby granted without fee, provided that 6dnl the above copyright notice appear in all copies and that both that 7dnl copyright notice and this permission notice appear in supporting 8dnl documentation, and that the name of Red Hat not be used in 9dnl advertising or publicity pertaining to distribution of the software without 10dnl specific, written prior permission. Red Hat makes no 11dnl representations about the suitability of this software for any purpose. It 12dnl is provided "as is" without express or implied warranty. 13dnl 14dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20dnl PERFORMANCE OF THIS SOFTWARE. 21dnl 22dnl Process this file with autoconf to create configure. 23 24# Initialize Autoconf 25AC_PREREQ([2.60]) 26AC_INIT([xload], [1.2.0], 27 [https://gitlab.freedesktop.org/xorg/app/xload/-/issues], [xload]) 28AC_CONFIG_MACRO_DIR([m4]) 29AC_CONFIG_SRCDIR([Makefile.am]) 30AC_CONFIG_HEADERS([config.h]) 31AC_USE_SYSTEM_EXTENSIONS 32 33# Initialize Automake 34AM_INIT_AUTOMAKE([foreign dist-xz]) 35 36# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 37m4_ifndef([XORG_MACROS_VERSION], 38 [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 39XORG_MACROS_VERSION(1.8) 40XORG_DEFAULT_OPTIONS 41 42# Checks for typedefs, structures, and compiler characteristics. 43AC_SYS_LARGEFILE 44 45# Checks for library functions. 46AC_CHECK_FUNCS([asprintf]) 47 48# Internationalization & localization support 49AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"]) 50AC_MSG_CHECKING([where to install localized messages]) 51AC_ARG_WITH([localedir], AS_HELP_STRING([--with-localedir=<path>], 52 [Path to install message files in (default: datadir/locale)]), 53 [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale]) 54AX_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages]) 55if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then 56 AC_MSG_RESULT([nowhere]) 57 USE_GETTEXT="no" 58else 59 AC_MSG_RESULT([$LOCALEDIR]) 60fi 61 62if test "x$USE_GETTEXT" = "xyes" ; then 63 AC_DEFINE([USE_GETTEXT], 1, 64 [Define to 1 if you want to use the gettext() function.]) 65fi 66AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes") 67 68 69### How to check load average on various OS'es: 70 71# getloadavg: 4.3BSD-Reno & later, glibc 2.2 & later, Solaris 7 & later 72# BSD & GNU libc use <stdlib.h>, Solaris requires <sys/loadavg.h> 73AC_CHECK_FUNCS([getloadavg], [AC_CHECK_HEADERS([sys/loadavg.h])]) 74 75AC_CHECK_HEADERS([paths.h protocols/rwhod.h]) 76 77# Checks for pkg-config packages 78PKG_CHECK_MODULES(XLOAD, xaw7 xmu xt x11 [xproto >= 7.0.17]) 79 80PKG_CHECK_MODULES(APPDEFS, xt) 81xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt` 82AC_ARG_WITH(appdefaultdir, 83 AS_HELP_STRING([--with-appdefaultdir=<pathname>], 84 [specify directory for app-defaults files (default is autodetected)]), 85 [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) 86AC_SUBST(appdefaultdir) 87 88 89AC_CONFIG_FILES([ 90 Makefile 91 man/Makefile]) 92AC_OUTPUT 93