configure.ac revision 6c321187
16c321187Smrg
26c321187Smrg#                                               -*- Autoconf -*-
36c321187Smrg# Process this file with autoconf to produce a configure script.
46c321187Smrg
56c321187SmrgAC_PREREQ(2.57)
66c321187Smrg
76c321187SmrgAC_INIT([libXmu],
86c321187Smrg        1.0.4,
96c321187Smrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
106c321187Smrg        libXmu)
116c321187Smrg
126c321187SmrgAC_CONFIG_SRCDIR([Makefile.am])
136c321187SmrgAC_CONFIG_AUX_DIR(.)
146c321187SmrgAM_INIT_AUTOMAKE([dist-bzip2])
156c321187Smrg
166c321187SmrgAM_MAINTAINER_MODE
176c321187Smrg
186c321187SmrgAM_CONFIG_HEADER([config.h])
196c321187Smrg
206c321187Smrg# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro
216c321187Smrgm4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
226c321187SmrgXORG_MACROS_VERSION(1.1)
236c321187Smrg
246c321187Smrg
256c321187Smrg# Checks for programs.
266c321187SmrgAC_PROG_LIBTOOL
276c321187SmrgAC_PROG_CC
286c321187Smrg
296c321187Smrg# Checks for pkg-config packages
306c321187SmrgPKG_CHECK_MODULES(XMU, xt xext xextproto)
316c321187SmrgAC_SUBST(XMU_CFLAGS)
326c321187SmrgAC_SUBST(XMU_LIBS)
336c321187Smrg
346c321187SmrgPKG_CHECK_MODULES(XMUU, x11)
356c321187SmrgAC_SUBST(XMUU_CFLAGS)
366c321187SmrgAC_SUBST(XMUU_LIBS)
376c321187Smrg
386c321187Smrg# CvtStdSel.c needs to know which network transports to build hostname
396c321187Smrg# conversion routines for
406c321187SmrgXTRANS_CONNECTION_FLAGS
416c321187Smrg
426c321187Smrg#
436c321187Smrg# Assume that we have sprintf. If a system shows up
446c321187Smrg# that doesn't, we will deal with it at that point.
456c321187Smrg#
466c321187Smrg# The way to deal with it is:
476c321187Smrg#
486c321187Smrg#  1. Add a test for sprintf it here in configure.ac
496c321187Smrg#     that sets or unsets HAS_SNPRINTF as appropriate
506c321187Smrg#
516c321187Smrg#  2. add a copy of xc/lib/misc/snprintf.c
526c321187Smrg#
536c321187Smrg# The source file in question is Lower.c
546c321187Smrg#
556c321187Smrg
566c321187SmrgAC_DEFINE(HAS_SNPRINTF, [], [Whether we have snprintf()])
576c321187SmrgAC_SUBST(HAS_SNPRINTF)
586c321187Smrg
596c321187Smrgdnl Allow checking code with lint, sparse, etc.
606c321187SmrgXORG_WITH_LINT
616c321187SmrgXORG_LINT_LIBRARY([Xmu])
626c321187SmrgLINTLIBUU=`echo $LINTLIB | sed s/Xmu/Xmuu/`
636c321187SmrgAC_SUBST(LINTLIBUU)
646c321187Smrg
656c321187Smrgif test "x$GCC" = "xyes"; then
666c321187Smrg        GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \
676c321187Smrg        -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
686c321187Smrg        XMU_CFLAGS="$GCC_WARNINGS $XMU_CFLAGS"
696c321187Smrgfi
706c321187Smrg
716c321187SmrgXORG_RELEASE_VERSION
726c321187Smrg
736c321187SmrgAC_OUTPUT([Makefile
746c321187Smrg           include/Makefile
756c321187Smrg	   src/Makefile
766c321187Smrg	   xmu.pc
776c321187Smrg           xmuu.pc])
78