kmscon/configure.ac
Ran Benita 6d451a2015 build: use gnu autotools
This commit adds basic autoconf + automake files to build the project.
It also adds a main.c stub in order to simulate the main binary.

The configure script uses pkg-config to find the libraries. The usual
stuff should work. The only additional option right now is:
        ./configure --enable-debug [To enable debugging symbols]
The Makefile should also support the standard stuff:
        make [To build the kmscon binary]
        make check [To build the test_* binaries]
        make dist [To create a tarball]
        make clean
        make install
        etc.

To start from a clean tree (e.g. git clean -dfx), do something like the
following:
        ./autogen.sh
        ./configure --enable-debug CFLAGS=-O0
        make

It all should work well enough for now.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-01 16:21:37 +01:00

50 lines
1.2 KiB
Plaintext

AC_PREREQ(2.68)
AC_INIT([kmscon], [0.0])
AC_SUBST(PACKAGE_URL, [https://github.com/dvdhrm/kmscon])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-bzip2 no-dist-gzip tar-pax -Wall -Werror])
AM_SILENT_RULES([yes])
LT_PREREQ(2.2)
LT_INIT
AC_PROG_CC
AM_PROG_CC_C_O
PKG_CHECK_MODULES([EGL], [egl])
AC_SUBST(EGL_CFLAGS)
AC_SUBST(EGL_LIBS)
PKG_CHECK_MODULES([GBM], [gbm])
AC_SUBST(GBM_CFLAGS)
AC_SUBST(GBM_LIBS)
PKG_CHECK_MODULES([OPENGL], [gl])
AC_SUBST(OPENGL_CFLAGS)
AC_SUBST(OPENGL_LIBS)
PKG_CHECK_MODULES([CAIRO], [cairo])
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(CAIRI_LIBS)
PKG_CHECK_MODULES([PANGO], [pango pangocairo])
AC_SUBST(PANGO_CFLAGS)
AC_SUBST(PANGO_LIBS)
AC_MSG_CHECKING([whether to build with debugging on])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[whether to build with debugging on)])],
[debug="$enableval"; AC_DEFINE([DEBUG], [0], [Debug])],
[debug=no])
AM_CONDITIONAL([DEBUG], [test x$debug = xyes])
AC_MSG_RESULT([$debug])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT