3 AC_INIT([kmscon], [0.0])
4 AC_SUBST(PACKAGE_URL, [https://github.com/dvdhrm/kmscon])
5 AC_CONFIG_SRCDIR([src/main.c])
6 AC_CONFIG_AUX_DIR([build-aux])
7 AC_CONFIG_MACRO_DIR([m4])
8 AC_CONFIG_HEADER(config.h)
10 AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-bzip2 no-dist-gzip tar-pax -Wall -Werror])
11 AM_SILENT_RULES([yes])
13 # Don't add a default "-g -O2" if CFLAGS wasn't specified
16 AC_USE_SYSTEM_EXTENSIONS
24 PKG_CHECK_MODULES([DRM], [libdrm])
28 PKG_CHECK_MODULES([EGL], [egl])
32 PKG_CHECK_MODULES([GBM], [gbm])
36 PKG_CHECK_MODULES([OPENGL], [gl])
37 AC_SUBST(OPENGL_CFLAGS)
40 PKG_CHECK_MODULES([CAIRO], [cairo])
41 AC_SUBST(CAIRO_CFLAGS)
44 PKG_CHECK_MODULES([PANGO], [pango pangocairo])
45 AC_SUBST(PANGO_CFLAGS)
48 PKG_CHECK_MODULES([UDEV], [libudev])
52 AC_MSG_CHECKING([whether to build with debugging on])
53 AC_ARG_ENABLE([debug],
54 [AS_HELP_STRING([--enable-debug], [whether to build with debugging on)])],
56 [debug=no; AC_DEFINE([NDEBUG], [1], [No Debug])])
57 AM_CONDITIONAL([DEBUG], [test x$debug = xyes])
58 AC_MSG_RESULT([$debug])
60 AC_CONFIG_FILES([Makefile])