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([bitmap], [1.0.9],
27	[https://gitlab.freedesktop.org/xorg/app/bitmap/issues], [bitmap])
28AC_CONFIG_SRCDIR([Makefile.am])
29AC_CONFIG_HEADERS([config.h])
30
31# Initialize Automake
32AM_INIT_AUTOMAKE([foreign dist-bzip2])
33
34# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
35m4_ifndef([XORG_MACROS_VERSION],
36          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
37XORG_MACROS_VERSION(1.8)
38XORG_DEFAULT_OPTIONS
39
40AM_PROG_CC_C_O
41
42AC_CHECK_FUNCS([mkstemp])
43
44# Math libraries & functions
45# - some compilers use builtin inlines for floor when optimizing
46# - lrint() is a C99 addition not found on some older systems
47# - must do the libm check first so that the lrint check will have it in $LIBS
48save_LIBS="$LIBS"
49AC_SEARCH_LIBS([floor], [m])
50AC_SEARCH_LIBS([lrint], [m])
51AC_CHECK_FUNCS([lrint])
52MATH_LIBS="$LIBS"
53LIBS="$save_LIBS"
54AC_SUBST([MATH_LIBS])
55
56# Obtain compiler/linker options from dependencies
57PKG_CHECK_MODULES(BMTOA, [x11 xmu xproto >= 7.0.17])
58PKG_CHECK_MODULES(ATOBM, [xproto >= 7.0.25])
59PKG_CHECK_MODULES(BITMAP, xbitmaps xaw7 xmu)
60
61PKG_CHECK_MODULES(APPDEFS, xt)
62xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
63AC_ARG_WITH(appdefaultdir,
64	AS_HELP_STRING([--with-appdefaultdir=<pathname>],
65	  [specify directory for app-defaults files (default is autodetected)]),
66	[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
67AC_SUBST(appdefaultdir)
68
69AC_CONFIG_FILES([Makefile
70           man/Makefile])
71AC_OUTPUT
72