"Fossies" - the Fresh Open Source Software Archive

Member "wayland-1.18.0/configure.ac" (11 Feb 2020, 7004 Bytes) of package /linux/misc/wayland-1.18.0.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 1.17.0_vs_1.18.0.

    1 AC_PREREQ([2.64])
    2 
    3 m4_define([wayland_major_version],  [1])
    4 m4_define([wayland_minor_version], [18])
    5 m4_define([wayland_micro_version], [0])
    6 m4_define([wayland_version],
    7           [wayland_major_version.wayland_minor_version.wayland_micro_version])
    8 
    9 AC_INIT([wayland],
   10         [wayland_version],
   11 	[https://gitlab.freedesktop.org/wayland/wayland/issues/],
   12         [wayland],
   13         [https://wayland.freedesktop.org/])
   14 
   15 AC_SUBST([WAYLAND_VERSION_MAJOR], [wayland_major_version])
   16 AC_SUBST([WAYLAND_VERSION_MINOR], [wayland_minor_version])
   17 AC_SUBST([WAYLAND_VERSION_MICRO], [wayland_micro_version])
   18 AC_SUBST([WAYLAND_VERSION], [wayland_version])
   19 
   20 AC_CONFIG_HEADERS([config.h])
   21 AC_CONFIG_MACRO_DIR([m4])
   22 
   23 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz subdir-objects])
   24 
   25 AM_SILENT_RULES([yes])
   26 
   27 # Check for programs
   28 AC_PROG_CC
   29 AC_PROG_CXX
   30 AC_PROG_GREP
   31 AM_PROG_AS
   32 AC_PROG_NM
   33 
   34 # check if we have C++ compiler. This is hacky workaround,
   35 # for a reason why it is this way see
   36 # http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html
   37 have_cpp_compiler=yes
   38 
   39 if ! which "$CXX" &>/dev/null; then
   40 	have_cpp_compiler=no
   41 fi
   42 
   43 AM_CONDITIONAL(ENABLE_CPP_TEST, test "x$have_cpp_compiler" = "xyes")
   44 
   45 # Initialize libtool
   46 LT_PREREQ([2.2])
   47 LT_INIT([disable-static])
   48 
   49 PKG_PROG_PKG_CONFIG()
   50 
   51 AC_ARG_ENABLE([fatal-warnings],
   52 	      AC_HELP_STRING([--enable-fatal-warnings],
   53 			     [Build with -Werror]),
   54 	      [enable_fatal_warnings=$enableval],
   55 	      [enable_fatal_warnings=no])
   56 AS_IF([test x"$enable_fatal_warnings" != "xno"], [
   57       WERROR_CFLAGS="-Werror"
   58 ])
   59 
   60 if test "x$GCC" = "xyes"; then
   61 	GCC_CFLAGS="$WERROR_CFLAGS -Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
   62 fi
   63 AC_SUBST(GCC_CFLAGS)
   64 
   65 AC_CHECK_HEADERS([sys/prctl.h])
   66 AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate prctl memfd_create strndup])
   67 
   68 # *BSD don't have libdl, but they have its functions in libc
   69 WESTON_SEARCH_LIBS([DL], [dl], [dlsym])
   70 
   71 # OpenBSD doesn't have librt, but it has its functions in libc
   72 WESTON_SEARCH_LIBS([RT], [rt], [clock_gettime])
   73 
   74 AC_ARG_ENABLE([libraries],
   75 	      [AC_HELP_STRING([--disable-libraries],
   76 			      [Disable compilation of wayland libraries])],
   77 	      [],
   78 	      [enable_libraries=yes])
   79 
   80 AC_ARG_WITH([host-scanner],
   81               [AC_HELP_STRING([--with-host-scanner],
   82                               [Use installed wayland-scanner from host PATH during build])],
   83               [],
   84               [with_host_scanner=no])
   85 
   86 AC_ARG_ENABLE([documentation],
   87 	      [AC_HELP_STRING([--disable-documentation],
   88 		              [Disable building the documentation])],
   89 	      [],
   90 	      [enable_documentation=yes])
   91 
   92 AC_ARG_ENABLE([dtd-validation],
   93 	      [AC_HELP_STRING([--disable-dtd-validation],
   94 			      [Disable DTD validation of the protocol])],
   95 	      [],
   96 	      [enable_dtd_validation=yes])
   97 
   98 AM_CONDITIONAL(USE_HOST_SCANNER, test "x$with_host_scanner" = xyes)
   99 
  100 AM_CONDITIONAL(ENABLE_LIBRARIES, test "x$enable_libraries" = xyes)
  101 
  102 AC_ARG_WITH(icondir, [  --with-icondir=<dir>    Look for cursor icons here],
  103 		     [  ICONDIR=$withval],
  104 		     [  ICONDIR=${datadir}/icons])
  105 AC_SUBST([ICONDIR])
  106 
  107 if test "x$enable_libraries" = "xyes"; then
  108 	PKG_CHECK_MODULES(FFI, [libffi])
  109 	AC_CHECK_DECL(SFD_CLOEXEC,[],
  110 		      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland libraries")],
  111 		      [[#include <sys/signalfd.h>]])
  112 	AC_CHECK_DECL(TFD_CLOEXEC,[],
  113 		      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland libraries")],
  114 		      [[#include <sys/timerfd.h>]])
  115 	AC_CHECK_DECL(CLOCK_MONOTONIC,[],
  116 		      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland libraries")],
  117 		      [[#include <time.h>]])
  118 fi
  119 
  120 PKG_CHECK_MODULES(EXPAT, [expat])
  121 
  122 AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"])
  123 if test "x$enable_dtd_validation" = "xyes"; then
  124 	PKG_CHECK_MODULES(LIBXML, [libxml-2.0])
  125 	AC_DEFINE(HAVE_LIBXML, 1, [libxml-2.0 is available])
  126 	AC_CONFIG_LINKS([src/wayland.dtd.embed:protocol/wayland.dtd])
  127 fi
  128 
  129 AC_PATH_PROG(XSLTPROC, xsltproc)
  130 AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
  131 
  132 
  133 AM_CONDITIONAL(BUILD_DOCS, [test x$enable_documentation = xyes])
  134 if test "x$enable_documentation" = "xyes"; then
  135 	AC_PATH_PROG(DOXYGEN, doxygen)
  136 
  137 	if test "x$DOXYGEN" = "x"; then
  138 		AC_MSG_ERROR([Documentation build requested but doxygen not found. Install doxygen or disable the documentation using --disable-documentation])
  139 	fi
  140 
  141 	AC_MSG_CHECKING([for compatible doxygen version])
  142 	doxygen_version=`$DOXYGEN --version`
  143 	AS_VERSION_COMPARE([$doxygen_version], [1.6.0],
  144 	                   [AC_MSG_RESULT([no])
  145 	                    AC_MSG_ERROR([Doxygen $doxygen_version too old. Doxygen 1.6+ required for documentation build. Install required doxygen version or disable the documentation using --disable-documentation])],
  146 	                   [AC_MSG_RESULT([yes])],
  147 	                   [AC_MSG_RESULT([yes])])
  148 
  149 	AC_PATH_PROG(XMLTO, xmlto)
  150 
  151 	if test "x$XMLTO" = "x"; then
  152 		AC_MSG_ERROR([Documentation build requested but xmlto not found. Install xmlto or disable the documentation using --disable-documentation])
  153 	fi
  154 
  155 	AC_PATH_PROG(DOT, dot)
  156 	if test "x$DOT" = "x"; then
  157 		AC_MSG_ERROR([Documentation build requested but graphviz's dot not found. Install graphviz or disable the documentation using --disable-documentation])
  158 	fi
  159 	AC_MSG_CHECKING([for compatible dot version])
  160 	dot_version=`$DOT -V 2>&1|$GREP -o ['[0-9]*\.[0-9]*\.[0-9]*']`
  161 	AS_VERSION_COMPARE([$dot_version], [2.26.0],
  162 	                   [AC_MSG_RESULT([no])
  163 	                    AC_MSG_ERROR([Graphviz dot $dot_version too old. Graphviz 2.26+ required for documentation build. Install required graphviz version or disable the documentation using --disable-documentation])],
  164 	                   [AC_MSG_RESULT([yes])],
  165 	                   [AC_MSG_RESULT([yes])])
  166 
  167 	AC_MSG_CHECKING([for docbook stylesheets])
  168 	DOCS_STYLESHEET=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
  169 	AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
  170 				    AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$DOCS_STYLESHEET" > /dev/null 2>&1`],
  171 					  [HAVE_DOCS_STYLESHEET=yes]))
  172 	if test "x$HAVE_DOCS_STYLESHEET" != "xyes"; then
  173 		AC_MSG_RESULT([no])
  174 		AC_MSG_ERROR([Documentation build requested but docbook-xsl stylesheets are not found. Install the docbook-xsl package or disable the documentation using --disable-documentation])
  175 	fi
  176 
  177 	AC_MSG_RESULT([yes])
  178 	AC_SUBST(DOCS_STYLESHEET)
  179 
  180 	AC_CONFIG_FILES([
  181 	doc/doxygen/wayland.doxygen
  182 	])
  183 
  184 fi
  185 AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])
  186 
  187 AC_CONFIG_FILES([Makefile
  188 		 cursor/wayland-cursor.pc
  189 		 cursor/wayland-cursor-uninstalled.pc
  190 		 doc/Makefile
  191 		 doc/publican/Makefile
  192 		 doc/doxygen/Makefile
  193 		 doc/man/Makefile
  194 		 egl/wayland-egl.pc
  195 		 egl/wayland-egl-backend.pc
  196 		 src/wayland-server-uninstalled.pc
  197 		 src/wayland-client-uninstalled.pc
  198 		 src/wayland-scanner-uninstalled.pc
  199 		 src/wayland-server.pc
  200 		 src/wayland-client.pc
  201 		 src/wayland-scanner.pc
  202 		 src/wayland-version.h])
  203 AC_OUTPUT