configure.ac revision 3c15da26
1
2# Initialize Autoconf
3AC_PREREQ(2.60)
4AC_INIT([libSM], [1.2.1],
5        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libSM])
6AC_CONFIG_SRCDIR([Makefile.am])
7AC_CONFIG_HEADERS([config.h])
8
9# Initialize Automake
10AM_INIT_AUTOMAKE([foreign dist-bzip2])
11AM_MAINTAINER_MODE
12
13# Initialize libtool
14AC_PROG_LIBTOOL
15
16# Require xorg-macros minimum of 1.12 for DocBook external references
17m4_ifndef([XORG_MACROS_VERSION],
18          [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
19XORG_MACROS_VERSION(1.12)
20XORG_DEFAULT_OPTIONS
21XORG_ENABLE_DOCS
22XORG_WITH_XMLTO(0.0.22)
23XORG_WITH_FOP
24XORG_WITH_XSLTPROC
25XORG_CHECK_SGML_DOCTOOLS(1.8)
26
27# Obtain compiler/linker options for depedencies
28PKG_CHECK_MODULES(SM, [ice >= 1.0.5] xproto xtrans)
29
30# Needed to check for TCP & IPv6 support and set flags appropriately
31XTRANS_CONNECTION_FLAGS
32
33AC_ARG_WITH(libuuid, AS_HELP_STRING([--with-libuuid], [Build with libuuid support for client IDs]))
34
35AC_CHECK_FUNCS([uuid_create], [], [
36    if test x"$with_libuuid" != xno && test x"$have_system_uuid" != xyes; then
37        PKG_CHECK_MODULES(LIBUUID, uuid, [HAVE_LIBUUID=yes], [HAVE_LIBUUID=no])
38    fi
39    if test x"$with_libuuid" = xyes && test x"$HAVE_LIBUUID" = xno; then
40        AC_MSG_ERROR([requested libuuid support but uuid.pc not found])
41    fi
42])
43
44AM_CONDITIONAL(WITH_LIBUUID, test x"$HAVE_LIBUUID" = xyes)
45
46AC_CONFIG_FILES([Makefile
47		doc/Makefile
48		src/Makefile
49		sm.pc])
50AC_OUTPUT
51