configure.ac revision 8b22bf3f
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 24AC_PREREQ([2.57]) 25AC_INIT(xrdb,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xrdb) 26AM_INIT_AUTOMAKE([dist-bzip2]) 27AM_MAINTAINER_MODE 28 29AM_CONFIG_HEADER(config.h) 30 31AC_PROG_CC 32AC_PROG_INSTALL 33 34AC_CHECK_FUNC([mkstemp], 35 AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the `mkstemp' function.])) 36 37# Find MAXHOSTNAMELEN definition 38# Common hidey holes: 39# BSD & Linux - <sys/param.h> 40# Solaris - <netdb.h> 41 42AC_CHECK_DECL([MAXHOSTNAMELEN],[FOUND_MAXHOSTNAMELEN=yes]) 43 44if test x$FOUND_MAXHOSTNAMELEN != xyes ; then 45 AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN]) 46 47 FOUND_MAXHOSTNAMELEN='not found' 48 49 AC_COMPILE_IFELSE( 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])]) 55 56 AC_COMPILE_IFELSE( 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])]) 62 63 AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN]) 64fi 65 66# xrdb needs to know where to find cpp at runtime - previously set as CppCmd 67# in Imake config files for each OS 68AC_ARG_WITH([cpp], 69 AC_HELP_STRING([--with-cpp=path], 70 [path to cpp command for xrdb to use at runtime]), 71 [AC_MSG_CHECKING(for cpp) 72 CPP_PATH=$withval 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])]) 76AC_DEFINE_UNQUOTED([CPP], "$CPP_PATH", [Path to CPP program]) 77 78# Checks for pkg-config packages 79PKG_CHECK_MODULES(XRDB, xmuu x11) 80AC_SUBST(XRDB_CFLAGS) 81AC_SUBST(XRDB_LIBS) 82 83XORG_MANPAGE_SECTIONS 84XORG_RELEASE_VERSION 85 86AC_OUTPUT([Makefile]) 87