configure.ac revision 6c321187
1 2# -*- Autoconf -*- 3# Process this file with autoconf to produce a configure script. 4 5AC_PREREQ(2.57) 6 7AC_INIT([libXmu], 8 1.0.4, 9 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], 10 libXmu) 11 12AC_CONFIG_SRCDIR([Makefile.am]) 13AC_CONFIG_AUX_DIR(.) 14AM_INIT_AUTOMAKE([dist-bzip2]) 15 16AM_MAINTAINER_MODE 17 18AM_CONFIG_HEADER([config.h]) 19 20# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro 21m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 22XORG_MACROS_VERSION(1.1) 23 24 25# Checks for programs. 26AC_PROG_LIBTOOL 27AC_PROG_CC 28 29# Checks for pkg-config packages 30PKG_CHECK_MODULES(XMU, xt xext xextproto) 31AC_SUBST(XMU_CFLAGS) 32AC_SUBST(XMU_LIBS) 33 34PKG_CHECK_MODULES(XMUU, x11) 35AC_SUBST(XMUU_CFLAGS) 36AC_SUBST(XMUU_LIBS) 37 38# CvtStdSel.c needs to know which network transports to build hostname 39# conversion routines for 40XTRANS_CONNECTION_FLAGS 41 42# 43# Assume that we have sprintf. If a system shows up 44# that doesn't, we will deal with it at that point. 45# 46# The way to deal with it is: 47# 48# 1. Add a test for sprintf it here in configure.ac 49# that sets or unsets HAS_SNPRINTF as appropriate 50# 51# 2. add a copy of xc/lib/misc/snprintf.c 52# 53# The source file in question is Lower.c 54# 55 56AC_DEFINE(HAS_SNPRINTF, [], [Whether we have snprintf()]) 57AC_SUBST(HAS_SNPRINTF) 58 59dnl Allow checking code with lint, sparse, etc. 60XORG_WITH_LINT 61XORG_LINT_LIBRARY([Xmu]) 62LINTLIBUU=`echo $LINTLIB | sed s/Xmu/Xmuu/` 63AC_SUBST(LINTLIBUU) 64 65if test "x$GCC" = "xyes"; then 66 GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \ 67 -Wmissing-prototypes -Wmissing-declarations -Wnested-externs" 68 XMU_CFLAGS="$GCC_WARNINGS $XMU_CFLAGS" 69fi 70 71XORG_RELEASE_VERSION 72 73AC_OUTPUT([Makefile 74 include/Makefile 75 src/Makefile 76 xmu.pc 77 xmuu.pc]) 78