Blame configure.ac

Packit Service f89583
#
Packit Service f89583
#  Copyright © 2003 Keith Packard, Noah Levitt
Packit Service f89583
#
Packit Service f89583
#  Permission to use, copy, modify, distribute, and sell this software and its
Packit Service f89583
#  documentation for any purpose is hereby granted without fee, provided that
Packit Service f89583
#  the above copyright notice appear in all copies and that both that
Packit Service f89583
#  copyright notice and this permission notice appear in supporting
Packit Service f89583
#  documentation, and that the name of Keith Packard not be used in
Packit Service f89583
#  advertising or publicity pertaining to distribution of the software without
Packit Service f89583
#  specific, written prior permission.  Keith Packard makes no
Packit Service f89583
#  representations about the suitability of this software for any purpose.  It
Packit Service f89583
#  is provided "as is" without express or implied warranty.
Packit Service f89583
#
Packit Service f89583
#  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
Packit Service f89583
#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
Packit Service f89583
#  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
Packit Service f89583
#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
Packit Service f89583
#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
Packit Service f89583
#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
Packit Service f89583
#  PERFORMANCE OF THIS SOFTWARE.
Packit Service f89583
#
Packit Service f89583
Packit Service f89583
# Initialize Autoconf
Packit Service f89583
AC_PREREQ([2.60])
Packit Service f89583
AC_INIT([libXau], [1.0.9],
Packit Service f89583
	[https://gitlab.freedesktop.org/xorg/lib/libXau/issues], [libXau])
Packit Service f89583
AC_CONFIG_SRCDIR([Makefile.am])
Packit Service f89583
AC_CONFIG_HEADERS([config.h])
Packit Service f89583
AC_USE_SYSTEM_EXTENSIONS
Packit Service f89583
Packit Service f89583
# Initialize Automake
Packit Service f89583
AM_INIT_AUTOMAKE([foreign dist-bzip2])
Packit Service f89583
Packit Service f89583
# Initialize libtool
Packit Service f89583
AC_LIBTOOL_WIN32_DLL
Packit Service f89583
AC_PROG_LIBTOOL
Packit Service f89583
Packit Service f89583
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
Packit Service f89583
m4_ifndef([XORG_MACROS_VERSION],
Packit Service f89583
          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
Packit Service f89583
XORG_MACROS_VERSION(1.8)
Packit Service f89583
XORG_DEFAULT_OPTIONS
Packit Service f89583
Packit Service f89583
# Checks for programs.
Packit Service f89583
AC_PROG_LN_S
Packit Service f89583
Packit Service f89583
# Checks for library functions.
Packit Service f89583
AC_CHECK_FUNCS([pathconf])
Packit Service f89583
Packit Service f89583
# Obtain compiler/linker options for depedencies
Packit Service f89583
PKG_CHECK_MODULES(XAU, xproto)
Packit Service f89583
Packit Service f89583
AC_ARG_ENABLE(xthreads,
Packit Service f89583
              AS_HELP_STRING([--disable-xthreads],
Packit Service f89583
                [Disable libXau support for Multithreading]),
Packit Service f89583
              [xthreads=$enableval],[xthreads=yes])
Packit Service f89583
Packit Service f89583
if test "x$xthreads" = "xyes" ; then
Packit Service f89583
    AC_DEFINE(XTHREADS,1,[Whether libXau is compiled with thread support])
Packit Service f89583
    AC_CHECK_LIB(c, gethostbyname_r, [mtsafe=yes])
Packit Service f89583
    if test "x$mtsafe" = "x" ; then
Packit Service f89583
	AC_CHECK_LIB(nsl, gethostbyname_r, [mtsafe=yes])
Packit Service f89583
    fi
Packit Service f89583
    if test "x$mtsafe" = "xyes" ; then
Packit Service f89583
	AC_DEFINE(XUSE_MTSAFE_API, 1,
Packit Service f89583
		  [Whether libXau needs to use MT safe API's])
Packit Service f89583
    fi
Packit Service f89583
Packit Service f89583
# XXX incomplete, please fill this in
Packit Service f89583
    case $host_os in
Packit Service f89583
    solaris*)
Packit Service f89583
	XTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ;;
Packit Service f89583
    esac
Packit Service f89583
    XAU_CFLAGS="$XAU_CFLAGS $XTHREAD_CFLAGS"
Packit Service f89583
fi
Packit Service f89583
Packit Service f89583
# Allow checking code with lint, sparse, etc.
Packit Service f89583
XORG_WITH_LINT
Packit Service f89583
XORG_LINT_LIBRARY([Xau])
Packit Service f89583
LINT_FLAGS="${LINT_FLAGS} ${XAU_CFLAGS}"
Packit Service f89583
Packit Service f89583
AC_CONFIG_FILES([Makefile
Packit Service f89583
		man/Makefile
Packit Service f89583
		xau.pc])
Packit Service f89583
AC_OUTPUT