X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=configure.ac;h=a8024a97343bde259dfcc2b60297b1dc199a5d70;hb=f02971f747ab2e643e2bc6bd962a068329b0f402;hp=29d0f81de97334ee293854543cf21e7ea8d23699;hpb=5a7149421291b47d76eafaf94e37402266542fda;p=gacela.git diff --git a/configure.ac b/configure.ac index 29d0f81..a8024a9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,37 +1,25 @@ -AC_INIT([gacela], [0.5], [jsf@jsancho.org]) +AC_INIT([gacela],[0.5],[jsf@jsancho.org]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +LT_INIT AC_PROG_CC -GUILE_FLAGS -AC_CHECK_LIB(SDL, - main, - LIBS="$LIBS -lSDL", - AC_MSG_ERROR([*** SDL library not found!]) -) -AC_CHECK_LIB(SDL_image, - main, - LIBS="$LIBS -lSDL_image", - AC_MSG_ERROR([*** SDL_image library not found!]) -) -AC_CHECK_LIB(SDL_mixer, - main, - LIBS="$LIBS -lSDL_mixer", - AC_MSG_ERROR([*** SDL_mixer library not found!]) -) -AC_CHECK_LIB(GL, - main, - LIBS="$LIBS -lGL", - AC_MSG_ERROR([*** GL library not found!]) -) -AC_CHECK_LIB(GLU, - main, - LIBS="$LIBS -lGLU", - AC_MSG_ERROR([*** GLU library not found!]) +LT_INIT +PKG_CHECK_MODULES([GUILE], [guile-2.0]) + +AC_DEFUN([GACELA_DEPS], + for lib in $1 ; do + AC_CHECK_LIB(${lib}, main, [$2="${$2} -l${lib}"], AC_MSG_ERROR([*** ${lib} library not found!])) + done + [AC_SUBST([$2])] ) -AC_CONFIG_SRCDIR([src/gacela_SDL.h]) +GACELA_DEPS(SDL SDL_image SDL_gfx SDL_mixer, SDL_LIBS) +GACELA_DEPS(GL GLU, GL_LIBS) +GACELA_DEPS(ftgl, FTGL_LIBS) + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_SRCDIR([src/sdl.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ Makefile src/Makefile ]) AC_OUTPUT -