diff -r ec507c1f1df7 -r cdf68044adaf configure.ac --- a/configure.ac Mon Oct 05 15:21:46 2015 +0200 +++ b/configure.ac Sat Nov 07 22:04:17 2015 +0100 @@ -2,13 +2,13 @@ AC_INIT(thermferm/thermferm.c) AM_CONFIG_HEADER(config.h) -SUBDIRS="dht11 rc433 thermferm" +SUBDIRS="dht11 rc433 thermferm brewco brewpanel" AC_SUBST(SUBDIRS) dnl General settings dnl After changeing the version number, run autoconf! PACKAGE="mbsePi-apps" -VERSION="0.4.3" +VERSION="0.5.0" COPYRIGHT="Copyright (C) 2014-2015 Michiel Broek, All Rights Reserved" CYEARS="2014-2015" AC_SUBST(PACKAGE) @@ -81,12 +81,51 @@ AC_MSG_ERROR(libuuid not found) fi +# Check for SDL +AC_MSG_CHECKING(SDL library) +pkg-config --exists sdl +if test "$?" = "0"; then + AC_MSG_RESULT(yes) +else + AC_MSG_ERROR(no) +fi +AC_MSG_CHECKING(sdl library v1.2.0 or newer) +pkg-config --atleast-version=1.2.0 sdl +if test "$?" = "0"; then + AC_MSG_RESULT(found) +else + AC_MSG_ERROR(not found) +fi +SDL_CFLAGS="$(pkg-config --cflags sdl)" +SDL_LIBS="$(pkg-config --libs sdl)" +AC_CHECK_HEADERS(SDL/SDL.h) + +# Check for SDL_ttf +AC_MSG_CHECKING(SDL_ttf library) +pkg-config --exists SDL_ttf +if test "$?" = "0"; then + AC_MSG_RESULT(yes) +else + AC_MSG_ERROR(no) +fi +AC_MSG_CHECKING(sdl library v2.0.0 or newer) +pkg-config --atleast-version=2.0.0 SDL_ttf +if test "$?" = "0"; then + AC_MSG_RESULT(found) +else + AC_MSG_ERROR(not found) +fi +# Override flags +SDL_CFLAGS="$(pkg-config --cflags SDL_ttf)" +SDL_LIBS="$(pkg-config --libs SDL_ttf)" + dnl Checks for header files. AC_HEADER_STDC +AC_SUBST(SDL_CFLAGS) +AC_SUBST(SDL_LIBS) -AC_SUBST(CXXFLAGS) AC_OUTPUT( Makefile.global