configure.ac 3.1 KB
Newer Older
1
2

dnl  Copyright 2005 Red Hat, Inc.
Alan Coopersmith's avatar
Alan Coopersmith committed
3
dnl
4
5
6
7
8
9
10
11
12
dnl  Permission to use, copy, modify, distribute, and sell this software and its
dnl  documentation for any purpose is hereby granted without fee, provided that
dnl  the above copyright notice appear in all copies and that both that
dnl  copyright notice and this permission notice appear in supporting
dnl  documentation, and that the name of Red Hat not be used in
dnl  advertising or publicity pertaining to distribution of the software without
dnl  specific, written prior permission.  Red Hat makes no
dnl  representations about the suitability of this software for any purpose.  It
dnl  is provided "as is" without express or implied warranty.
Alan Coopersmith's avatar
Alan Coopersmith committed
13
dnl
14
15
16
17
18
19
20
21
22
23
dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dnl  PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.

24
# Initialize Autoconf
25
AC_PREREQ([2.60])
Alan Coopersmith's avatar
Alan Coopersmith committed
26
AC_INIT([xclock],
Alan Coopersmith's avatar
Alan Coopersmith committed
27
	[1.0.9],
28
	[https://gitlab.freedesktop.org/xorg/app/xclock/issues],
Alan Coopersmith's avatar
Alan Coopersmith committed
29
	[xclock])
30
31
32
33
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])

# Initialize Automake
34
AM_INIT_AUTOMAKE([foreign dist-xz])
35

36
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
37
m4_ifndef([XORG_MACROS_VERSION],
38
39
          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
40
XORG_DEFAULT_OPTIONS
41

42
AC_CHECK_FUNCS([strlcpy getpid nl_langinfo])
43

Yaakov Selkowitz's avatar
Yaakov Selkowitz committed
44
AM_ICONV
45

46
dnl Required dependencies
47
PKG_CHECK_MODULES(XCLOCK, [xaw7 xmu x11 xproto >= 7.0.17])
Yaakov Selkowitz's avatar
Yaakov Selkowitz committed
48
XCLOCK_LIBS="$XCLOCK_LIBS $LIBICONV"
49
50

dnl Optional dependencies
51
AC_ARG_WITH(xft, AS_HELP_STRING([--with-xft],[Use Xft2 and Xrender for rendering (Default is YES)]),use_xft="$withval",use_xft="try")
52
53
if test x$use_xft != xno ; then
	PKG_CHECK_MODULES(XFT, [xrender xft])
Alan Coopersmith's avatar
Alan Coopersmith committed
54
	# Solaris 11 has sqrt in libc but needs libm for sincos
55
	AC_SEARCH_LIBS(sqrt, [m])
Alan Coopersmith's avatar
Alan Coopersmith committed
56
	AC_SEARCH_LIBS(sincos, [m])
57
58
	XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XFT_CFLAGS"
	XCLOCK_LIBS="$XCLOCK_LIBS $XFT_LIBS"
59
60
	AC_DEFINE([XRENDER],1,[Define to use X Render Extension])
	AC_DEFINE([XFREE86_FT2],1,[Define to use Xft2 library])
Alan Coopersmith's avatar
Alan Coopersmith committed
61
fi
62

63
AC_ARG_WITH(xkb, AS_HELP_STRING([--with-xkb],[Use XKB to sound bells (Default is YES)]),use_xkb="$withval",use_xkb="try")
64
65
if test x$use_xkb != xno ; then
	PKG_CHECK_MODULES(XKB, xkbfile)
66
67
	XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XKB_CFLAGS"
	XCLOCK_LIBS="$XCLOCK_LIBS $XKB_LIBS"
68
69
70
	AC_DEFINE([XKB],1,[Define to use XkbStdBell])
fi

71

72
PKG_CHECK_MODULES(APPDEFS, xt)
73
xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
74
AC_ARG_WITH(appdefaultdir,
75
	AS_HELP_STRING([--with-appdefaultdir=<pathname>],
76
77
	  [specify directory for app-defaults files (default is autodetected)]),
	[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
78
79
AC_SUBST(appdefaultdir)

80
81
82
83
AC_CONFIG_FILES([
	Makefile
	man/Makefile])
AC_OUTPUT