configure.ac revision 00084f2c
127702724Smrgdnl 227702724Smrgdnl Copyright © 2003 Keith Packard, Noah Levitt 327702724Smrgdnl 427702724Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 527702724Smrgdnl documentation for any purpose is hereby granted without fee, provided that 627702724Smrgdnl the above copyright notice appear in all copies and that both that 727702724Smrgdnl copyright notice and this permission notice appear in supporting 827702724Smrgdnl documentation, and that the name of Keith Packard not be used in 927702724Smrgdnl advertising or publicity pertaining to distribution of the software without 1027702724Smrgdnl specific, written prior permission. Keith Packard makes no 1127702724Smrgdnl representations about the suitability of this software for any purpose. It 1227702724Smrgdnl is provided "as is" without express or implied warranty. 1327702724Smrgdnl 1427702724Smrgdnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 1527702724Smrgdnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 1627702724Smrgdnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 1727702724Smrgdnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 1827702724Smrgdnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 1927702724Smrgdnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2027702724Smrgdnl PERFORMANCE OF THIS SOFTWARE. 2127702724Smrgdnl 2227702724Smrgdnl Process this file with autoconf to create configure. 2327702724Smrg 2400084f2cSmrgAC_PREREQ([2.60]) 2500084f2cSmrgAC_INIT(libXau, 1.0.6, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],libXau) 2600084f2cSmrgAM_INIT_AUTOMAKE([foreign dist-bzip2]) 2727702724SmrgAM_MAINTAINER_MODE 2827702724Smrg 2927702724SmrgAM_CONFIG_HEADER(config.h) 3027702724Smrg 3100084f2cSmrg# Require xorg-macros: XORG_DEFAULT_OPTIONS 3200084f2cSmrgm4_ifndef([XORG_MACROS_VERSION], 3300084f2cSmrg [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])]) 3400084f2cSmrgXORG_MACROS_VERSION(1.4) 3500084f2cSmrgXORG_DEFAULT_OPTIONS 3627702724Smrg 3727702724SmrgAC_PROG_CC 3827702724SmrgAC_PROG_INSTALL 3927702724SmrgAC_PROG_LN_S 4027702724SmrgAC_LIBTOOL_WIN32_DLL 4127702724SmrgAM_PROG_LIBTOOL 4227702724SmrgAC_PROG_MAKE_SET 4300084f2cSmrgAC_PROG_SED 4427702724Smrg 4527702724SmrgPKG_CHECK_MODULES(XAU, xproto) 4627702724Smrg 4727702724SmrgAC_ARG_ENABLE(xthreads, 4827702724Smrg AC_HELP_STRING([--disable-xthreads], 4927702724Smrg [Disable libXau support for Multithreading]), 5027702724Smrg [xthreads=$enableval],[xthreads=yes]) 5127702724Smrg 5227702724Smrgif test "x$xthreads" = "xyes" ; then 5327702724Smrg AC_DEFINE(XTHREADS,1,[Whether libXau is compiled with thread support]) 54e19dfac4Smrg AC_CHECK_LIB(c, gethostbyname_r, [mtsafe=yes]) 55e19dfac4Smrg if test "x$mtsafe" = "x" ; then 56e19dfac4Smrg AC_CHECK_LIB(nsl, gethostbyname_r, [mtsafe=yes]) 57e19dfac4Smrg fi 58e19dfac4Smrg if test "x$mtsafe" = "xyes" ; then 59e19dfac4Smrg AC_DEFINE(XUSE_MTSAFE_API, 1, 60e19dfac4Smrg [Whether libXau needs to use MT safe API's]) 61e19dfac4Smrg fi 6227702724Smrg 6327702724Smrgdnl XXX incomplete, please fill this in 6427702724Smrg case $host_os in 6527702724Smrg solaris*) 6627702724Smrg XTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ;; 6727702724Smrg esac 6827702724Smrg XAU_CFLAGS="$XAU_CFLAGS $XTHREAD_CFLAGS" 6927702724Smrgfi 7027702724Smrg 7127702724Smrgdnl Allow checking code with lint, sparse, etc. 7227702724SmrgXORG_WITH_LINT 7327702724SmrgXORG_LINT_LIBRARY([Xau]) 7427702724SmrgLINT_FLAGS="${LINT_FLAGS} ${XAU_CFLAGS}" 7527702724Smrg 7627702724Smrg 7727702724SmrgAC_OUTPUT([Makefile 7827702724Smrg xau.pc]) 79