configure.ac revision 7a3b38f7
1dnl 
2dnl  $Id: configure.ac,v 1.1.1.2 2009/11/08 09:43:02 mrg Exp $
3dnl 
4dnl  Copyright © 2003 Keith Packard, Noah Levitt
5dnl 
6dnl  Permission to use, copy, modify, distribute, and sell this software and its
7dnl  documentation for any purpose is hereby granted without fee, provided that
8dnl  the above copyright notice appear in all copies and that both that
9dnl  copyright notice and this permission notice appear in supporting
10dnl  documentation, and that the name of Keith Packard not be used in
11dnl  advertising or publicity pertaining to distribution of the software without
12dnl  specific, written prior permission.  Keith Packard makes no
13dnl  representations about the suitability of this software for any purpose.  It
14dnl  is provided "as is" without express or implied warranty.
15dnl 
16dnl  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18dnl  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22dnl  PERFORMANCE OF THIS SOFTWARE.
23dnl
24dnl Process this file with autoconf to create configure.
25
26AC_PREREQ([2.57])
27AC_INIT(libXdmcp, 1.0.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],libXdmcp)
28AM_INIT_AUTOMAKE([dist-bzip2])
29AM_MAINTAINER_MODE
30
31AM_CONFIG_HEADER(config.h)
32
33# Require xorg-macros: XORG_WITH_LINT, XORG_CWARNFLAGS, XORG_CHANGELOG
34m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
35XORG_MACROS_VERSION(1.3)
36
37AC_PROG_CC
38AC_PROG_INSTALL
39AC_PROG_LN_S
40AC_LIBTOOL_WIN32_DLL
41AM_PROG_LIBTOOL
42AC_PROG_MAKE_SET
43
44AC_CHECK_FUNCS([srand48 lrand48])
45
46AC_SEARCH_LIBS([recvfrom],[socket])
47
48PKG_CHECK_MODULES(XDMCP, xproto)
49XORG_DEFAULT_OPTIONS
50XDMCP_CFLAGS="$CWARNFLAGS $XDMCP_CFLAGS"
51AC_SUBST(XDMCP_CFLAGS)
52AC_SUBST(XDMCP_LIBS)
53
54if test -f ${srcdir}/Wraphelp.c; then
55	AC_DEFINE(HASXDMAUTH,1,[Has Wraphelp.c needed for XDM AUTH protocols])
56	HASXDMAUTH=yes
57else
58	HASXDMAUTH=no
59fi
60
61AM_CONDITIONAL(HASXDMAUTH,test x$HASXDMAUTH = xyes)
62
63dnl Allow checking code with lint, sparse, etc.
64XORG_WITH_LINT
65XORG_LINT_LIBRARY([Xdmcp])
66
67AC_OUTPUT([Makefile
68           xdmcp.pc])
69