summaryrefslogtreecommitdiff
path: root/lib/libXt/configure.ac
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-09-10 09:36:20 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-09-10 09:36:20 +0000
commit90835ae27aafb45d88761e9725f76d8f05d7fac3 (patch)
treecfd87fc8689063ebc6adcc4e23504795fb7a5ca0 /lib/libXt/configure.ac
parent68b5a21e22ea0d5d2f329d8e756448a3544a49d2 (diff)
Update to libXt 1.1.1
Diffstat (limited to 'lib/libXt/configure.ac')
-rw-r--r--lib/libXt/configure.ac122
1 files changed, 67 insertions, 55 deletions
diff --git a/lib/libXt/configure.ac b/lib/libXt/configure.ac
index ae3db02f9..96f0ccb17 100644
--- a/lib/libXt/configure.ac
+++ b/lib/libXt/configure.ac
@@ -1,48 +1,54 @@
-dnl
-dnl Copyright © 2003 Keith Packard, Noah Levitt
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation, and that the name of Keith Packard not be used in
-dnl advertising or publicity pertaining to distribution of the software without
-dnl specific, written prior permission. Keith Packard makes no
-dnl representations about the suitability of this software for any purpose. It
-dnl is provided "as is" without express or implied warranty.
-dnl
-dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-dnl PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Process this file with autoconf to create configure.
-
+#
+# Copyright © 2003 Keith Packard, Noah Levitt
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Keith Packard not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Keith Packard makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+#
+
+# Initialize Autoconf
AC_PREREQ([2.60])
-
-dnl
-dnl
-AC_INIT([libXt], [1.0.9],
+AC_INIT([libXt], [1.1.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXt])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
+
+# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
+# Initialize libtool
+AC_PROG_LIBTOOL
+
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
-AM_CONFIG_HEADER(config.h)
+XORG_CHECK_MALLOC_ZERO
-# Check for progs
-AC_PROG_CC
-AC_PROG_LIBTOOL
-AM_PROG_CC_C_O
+# Checks for header files.
+AC_CHECK_HEADER([alloca.h], AC_DEFINE(INCLUDE_ALLOCA_H, 1, [Define to 1 if Xalloca.h should include <alloca.h>]))
+
+# Obtain compiler/linker options for depedencies
+PKG_CHECK_MODULES(XT, sm ice x11 xproto kbproto)
+# Set-up variables to use build machine compiler when cross-compiling
if test x"$CC_FOR_BUILD" = x; then
if test x"$cross_compiling" = xyes; then
AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
@@ -56,27 +62,34 @@ AC_SUBST(CFLAGS_FOR_BUILD)
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
AC_SUBST(LDFLAGS_FOR_BUILD)
-PKG_CHECK_MODULES(XT, sm ice x11 xproto kbproto)
-
-# Needed for including Xalloca.h
-AC_CHECK_HEADER([alloca.h], AC_DEFINE(INCLUDE_ALLOCA_H, 1, [Define to 1 if Xalloca.h should include <alloca.h>]))
-
# Map function checks to old Imake #defines
case $host_os in
- # darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
- darwin*) ;;
+ # darwin through Snow Leopard has poll() but can't be used to poll character devices.
+ darwin@<:@789@:>@*|darwin10*) ;;
+ darwin*)
+ _ac_xorg_macosx_version_min=""
+ if echo $CPPFLAGS $CFLAGS | grep -q mmacosx-version-min ; then
+ _ac_xorg_macosx_version_min=`echo $CPPFLAGS $CFLAGS | sed 's/^.*-mmacosx-version-min=\(@<:@^ @:>@*\).*$/\1/'`
+ else
+ _ac_xorg_macosx_version_min=$MACOSX_DEPLOYMENT_TARGET
+ fi
+ case $_ac_xorg_macosx_version_min in
+ 10.@<:@0123456@:>@|10.@<:@0123456@:>@.*) ;;
+ *)
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
+ ;;
+ esac
+ unset _ac_xorg_macosx_version_min
+ ;;
*)
- AC_CHECK_FUNC(poll, AC_DEFINE(USE_POLL,1,
- [Define to 1 if you have the "poll" function.]))
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
;;
esac
-AC_CHECK_FUNC(snprintf, AC_DEFINE(USE_SNPRINTF,1,
- [Define to 1 if you have the "snprintf" function.]))
AC_HAVE_LIBRARY(ws2_32)
# Options
-AC_ARG_ENABLE(xkb, AC_HELP_STRING([--disable-xkb], [Disable XKB support]),
+AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Disable XKB support]),
XKB="$enableval", XKB="yes")
if test "x$XKB" = "xyes" ; then
AC_DEFINE(XKB, 1, [Define to 1 to use XKB for keysym resolution.])
@@ -86,13 +99,13 @@ fi
XFILESEARCHPATHDEFAULT='$(sysconfdir)/X11/%L/%T/%N%C%S:$(sysconfdir)/X11/%l/%T/%N%C%S:$(sysconfdir)/X11/%T/%N%C%S:$(sysconfdir)/X11/%L/%T/%N%S:$(sysconfdir)/X11/%l/%T/%N%S:$(sysconfdir)/X11/%T/%N%S:$(datadir)/X11/%L/%T/%N%C%S:$(datadir)/X11/%l/%T/%N%C%S:$(datadir)/X11/%T/%N%C%S:$(datadir)/X11/%L/%T/%N%S:$(datadir)/X11/%l/%T/%N%S:$(datadir)/X11/%T/%N%S:$(libdir)/X11/%L/%T/%N%C%S:$(libdir)/X11/%l/%T/%N%C%S:$(libdir)/X11/%T/%N%C%S:$(libdir)/X11/%L/%T/%N%S:$(libdir)/X11/%l/%T/%N%S:$(libdir)/X11/%T/%N%S'
AC_ARG_WITH(xfile-search-path,
- AC_HELP_STRING([--with-xfile-search-path=<path>],
+ AS_HELP_STRING([--with-xfile-search-path=<path>],
[Set path to search for app-defaults and other files]),
[XFILESEARCHPATHDEFAULT="$withval"], [])
AC_SUBST([XFILESEARCHPATHDEFAULT])
AC_ARG_WITH(appdefaultdir,
- AC_HELP_STRING([--with-appdefaultdir=<path>],
+ AS_HELP_STRING([--with-appdefaultdir=<path>],
[Set app-default directory (default: ${datadir}/X11/app-defaults)]),
[appdefaultdir="$withval"],
[appdefaultdir=${datadir}/X11/app-defaults])
@@ -125,12 +138,11 @@ esac
XT_CFLAGS="$XT_CFLAGS $OS_CFLAGS"
-XORG_CHECK_MALLOC_ZERO
-
-AC_OUTPUT([Makefile
- src/Makefile
- util/Makefile
- include/Makefile
- man/Makefile
- specs/Makefile
- xt.pc])
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ util/Makefile
+ include/Makefile
+ man/Makefile
+ specs/Makefile
+ xt.pc])
+AC_OUTPUT