2
dnl Copyright 2005 Red Hat, Inc.
4
dnl Permission to use, copy, modify, distribute, and sell this software and its
5
dnl documentation for any purpose is hereby granted without fee, provided that
6
dnl the above copyright notice appear in all copies and that both that
7
dnl copyright notice and this permission notice appear in supporting
8
dnl documentation, and that the name of Red Hat not be used in
9
dnl advertising or publicity pertaining to distribution of the software without
10
dnl specific, written prior permission. Red Hat makes no
11
dnl representations about the suitability of this software for any purpose. It
12
dnl is provided "as is" without express or implied warranty.
14
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17
dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18
dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19
dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
dnl PERFORMANCE OF THIS SOFTWARE.
22
dnl Process this file with autoconf to create configure.
25
AC_INIT(xrdb,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xrdb)
26
AM_INIT_AUTOMAKE([dist-bzip2])
29
AM_CONFIG_HEADER(config.h)
34
AC_CHECK_FUNC([mkstemp],
35
AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the `mkstemp' function.]))
37
# Find MAXHOSTNAMELEN definition
39
# BSD & Linux - <sys/param.h>
42
AC_CHECK_DECL([MAXHOSTNAMELEN],[FOUND_MAXHOSTNAMELEN=yes])
44
if test x$FOUND_MAXHOSTNAMELEN != xyes ; then
45
AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN])
47
FOUND_MAXHOSTNAMELEN='not found'
50
AC_LANG_PROGRAM([#include <sys/param.h>],
51
[int h = MAXHOSTNAMELEN;]),
52
[FOUND_MAXHOSTNAMELEN='sys/param.h'
53
AC_DEFINE(NEED_SYS_PARAM_H,1,
54
[Define to 1 if you need <sys/param.h> to define MAXHOSTNAMELEN])])
57
AC_LANG_PROGRAM([#include <netdb.h>],
58
[int h = MAXHOSTNAMELEN;]),
59
[FOUND_MAXHOSTNAMELEN='netdb.h'
60
AC_DEFINE(NEED_NETDB_H,1,
61
[Define to 1 if you need <netdb.h> to define MAXHOSTNAMELEN])])
63
AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN])
66
# xrdb needs to know where to find cpp at runtime - previously set as CppCmd
67
# in Imake config files for each OS
69
AC_HELP_STRING([--with-cpp=path],
70
[path to cpp command for xrdb to use at runtime]),
71
[AC_MSG_CHECKING(for cpp)
73
AC_MSG_RESULT($CPP_PATH)],
74
[AC_PATH_PROG([CPP_PATH],[cpp], [cpp],
75
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])])
76
AC_DEFINE_UNQUOTED([CPP], "$CPP_PATH", [Path to CPP program])
78
# Checks for pkg-config packages
79
PKG_CHECK_MODULES(XRDB, xmuu x11)