configure.ac revision 27702724
127702724Smrgdnl 227702724Smrgdnl $Id: configure.ac,v 1.1.1.1 2008/07/30 02:44:43 mrg Exp $ 327702724Smrgdnl 427702724Smrgdnl Copyright © 2003 Keith Packard, Noah Levitt 527702724Smrgdnl 627702724Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 727702724Smrgdnl documentation for any purpose is hereby granted without fee, provided that 827702724Smrgdnl the above copyright notice appear in all copies and that both that 927702724Smrgdnl copyright notice and this permission notice appear in supporting 1027702724Smrgdnl documentation, and that the name of Keith Packard not be used in 1127702724Smrgdnl advertising or publicity pertaining to distribution of the software without 1227702724Smrgdnl specific, written prior permission. Keith Packard makes no 1327702724Smrgdnl representations about the suitability of this software for any purpose. It 1427702724Smrgdnl is provided "as is" without express or implied warranty. 1527702724Smrgdnl 1627702724Smrgdnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 1727702724Smrgdnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 1827702724Smrgdnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 1927702724Smrgdnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 2027702724Smrgdnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 2127702724Smrgdnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2227702724Smrgdnl PERFORMANCE OF THIS SOFTWARE. 2327702724Smrgdnl 2427702724Smrgdnl Process this file with autoconf to create configure. 2527702724Smrg 2627702724SmrgAC_PREREQ([2.57]) 2727702724SmrgAC_INIT(libXau, 1.0.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],libXau) 2827702724SmrgAM_INIT_AUTOMAKE([dist-bzip2]) 2927702724SmrgAM_MAINTAINER_MODE 3027702724Smrg 3127702724SmrgAM_CONFIG_HEADER(config.h) 3227702724Smrg 3327702724Smrg# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro 3427702724Smrgm4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 3527702724SmrgXORG_MACROS_VERSION(1.1) 3627702724Smrg 3727702724SmrgAC_PROG_CC 3827702724SmrgAC_PROG_INSTALL 3927702724SmrgAC_PROG_LN_S 4027702724SmrgAC_LIBTOOL_WIN32_DLL 4127702724SmrgAM_PROG_LIBTOOL 4227702724SmrgAC_PROG_MAKE_SET 4327702724Smrg 4427702724SmrgPKG_CHECK_MODULES(XAU, xproto) 4527702724SmrgAC_SUBST(XAU_CFLAGS) 4627702724SmrgAC_SUBST(XAU_LIBS) 4727702724Smrg 4827702724Smrgkerberos=false 4927702724SmrgAM_CONDITIONAL(KERBEROS, test x$kerberos = xtrue) 5027702724Smrg 5127702724SmrgAC_ARG_ENABLE(xthreads, 5227702724Smrg AC_HELP_STRING([--disable-xthreads], 5327702724Smrg [Disable libXau support for Multithreading]), 5427702724Smrg [xthreads=$enableval],[xthreads=yes]) 5527702724Smrg 5627702724Smrgif test "x$xthreads" = "xyes" ; then 5727702724Smrg AC_DEFINE(XTHREADS,1,[Whether libXau is compiled with thread support]) 5827702724Smrg AC_CHECK_LIB(c, gethostbyname_r, AC_DEFINE(XUSE_MTSAFE_API,1, 5927702724Smrg [Whether libXau needs to use MT safe API's])) 6027702724Smrg 6127702724Smrgdnl XXX incomplete, please fill this in 6227702724Smrg case $host_os in 6327702724Smrg solaris*) 6427702724Smrg XTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ;; 6527702724Smrg esac 6627702724Smrg XAU_CFLAGS="$XAU_CFLAGS $XTHREAD_CFLAGS" 6727702724Smrgfi 6827702724Smrg 6927702724Smrgdnl Allow checking code with lint, sparse, etc. 7027702724SmrgXORG_WITH_LINT 7127702724SmrgXORG_LINT_LIBRARY([Xau]) 7227702724SmrgLINT_FLAGS="${LINT_FLAGS} ${XAU_CFLAGS}" 7327702724Smrg 7427702724Smrgif test "x$GCC" = "xyes"; then 7527702724Smrg GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \ 7627702724Smrg -Wmissing-prototypes -Wmissing-declarations \ 7727702724Smrg -Wnested-externs -fno-strict-aliasing" 7827702724Smrg XAU_CFLAGS="$GCC_WARNINGS $XAU_CFLAGS" 7927702724Smrgfi 8027702724Smrg 8127702724SmrgXORG_MANPAGE_SECTIONS 8227702724SmrgXORG_RELEASE_VERSION 8327702724Smrg 8427702724SmrgAC_OUTPUT([Makefile 8527702724Smrg xau.pc]) 86