configure.ac revision 3fb97780
1 2# Initialize Autoconf 3AC_PREREQ(2.60) 4AC_INIT([libSM], [1.2.4], 5 [https://gitlab.freedesktop.org/xorg/lib/libsm/-/issues], [libSM]) 6AC_CONFIG_SRCDIR([Makefile.am]) 7AC_CONFIG_HEADERS([config.h]) 8 9# Initialize Automake 10AM_INIT_AUTOMAKE([foreign dist-xz]) 11 12# Initialize libtool 13AC_PROG_LIBTOOL 14 15# Require xorg-macros minimum of 1.12 for DocBook external references 16m4_ifndef([XORG_MACROS_VERSION], 17 [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])]) 18XORG_MACROS_VERSION(1.12) 19XORG_DEFAULT_OPTIONS 20XORG_ENABLE_DOCS 21XORG_WITH_XMLTO(0.0.22) 22XORG_WITH_FOP 23XORG_WITH_XSLTPROC 24XORG_CHECK_SGML_DOCTOOLS(1.8) 25 26# Obtain compiler/linker options for dependencies 27PKG_CHECK_MODULES(SM, [ice >= 1.1.0] xproto xtrans) 28 29# Needed to check for TCP & IPv6 support and set flags appropriately 30XTRANS_CONNECTION_FLAGS 31 32AC_ARG_WITH(libuuid, AS_HELP_STRING([--with-libuuid], [Build with libuuid support for client IDs])) 33 34PKG_PROG_PKG_CONFIG() 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 and LIBUUID_CFLAGS and LIBUUID_LIBS not set]) 42 fi 43]) 44UUID_LIB_PRIVATE="" 45UUID_PC="" 46if test x"$HAVE_LIBUUID" = xyes ; then 47 PKG_CHECK_EXISTS(uuid, [UUID_PC="uuid"]) 48 if test x"$UUID_PC" = x ; then 49 UUID_LIB_PRIVATE="$LIBUUID_LIBS" 50 fi 51fi 52AC_SUBST([UUID_LIB_PRIVATE]) 53AC_SUBST([UUID_PC]) 54 55AM_CONDITIONAL(WITH_LIBUUID, test x"$HAVE_LIBUUID" = xyes) 56 57AC_CONFIG_FILES([Makefile 58 doc/Makefile 59 src/Makefile 60 sm.pc]) 61AC_OUTPUT 62