configure.ac revision e19dfac4
1dnl 2dnl $Id: configure.ac,v 1.1.1.2 2009/11/08 09:42:42 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(libXau, 1.0.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],libXau) 28AM_INIT_AUTOMAKE([dist-bzip2]) 29AM_MAINTAINER_MODE 30 31AM_CONFIG_HEADER(config.h) 32 33# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG, XORG_WITH_LINT 34m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) 35XORG_MACROS_VERSION(1.2) 36 37AC_PROG_CC 38AC_PROG_INSTALL 39AC_PROG_LN_S 40AC_LIBTOOL_WIN32_DLL 41AM_PROG_LIBTOOL 42AC_PROG_MAKE_SET 43XORG_CWARNFLAGS 44 45PKG_CHECK_MODULES(XAU, xproto) 46XAU_CFLAGS="$CWARNFLAGS $XAU_CFLAGS" 47AC_SUBST(XAU_CFLAGS) 48AC_SUBST(XAU_LIBS) 49 50AC_ARG_ENABLE(xthreads, 51 AC_HELP_STRING([--disable-xthreads], 52 [Disable libXau support for Multithreading]), 53 [xthreads=$enableval],[xthreads=yes]) 54 55if test "x$xthreads" = "xyes" ; then 56 AC_DEFINE(XTHREADS,1,[Whether libXau is compiled with thread support]) 57 AC_CHECK_LIB(c, gethostbyname_r, [mtsafe=yes]) 58 if test "x$mtsafe" = "x" ; then 59 AC_CHECK_LIB(nsl, gethostbyname_r, [mtsafe=yes]) 60 fi 61 if test "x$mtsafe" = "xyes" ; then 62 AC_DEFINE(XUSE_MTSAFE_API, 1, 63 [Whether libXau needs to use MT safe API's]) 64 fi 65 66dnl XXX incomplete, please fill this in 67 case $host_os in 68 solaris*) 69 XTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ;; 70 esac 71 XAU_CFLAGS="$XAU_CFLAGS $XTHREAD_CFLAGS" 72fi 73 74dnl Allow checking code with lint, sparse, etc. 75XORG_WITH_LINT 76XORG_LINT_LIBRARY([Xau]) 77LINT_FLAGS="${LINT_FLAGS} ${XAU_CFLAGS}" 78 79XORG_MANPAGE_SECTIONS 80XORG_RELEASE_VERSION 81XORG_CHANGELOG 82 83AC_OUTPUT([Makefile 84 xau.pc]) 85