Browse Source

Allow master projects to disable features.

When built as a subproject, we need the master to decide what features
to activate or not. This could lead to reduced dependences.

This patch also allows to build without imlib2.
legacy
Sam Hocevar 7 years ago
parent
commit
fcd72f408f
3 changed files with 10 additions and 6 deletions
  1. +7
    -5
      build/autotools/m4/lol-conf.m4
  2. +1
    -1
      build/autotools/m4/lol-subproject.m4
  3. +2
    -0
      configure.ac

+ 7
- 5
build/autotools/m4/lol-conf.m4 View File

@@ -135,11 +135,13 @@ AM_CONDITIONAL(LOL_USE_LIBPNG, test "${ac_cv_my_have_libpng}" != "no")

dnl Use Imlib2?
ac_cv_my_have_imlib2="no"
PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"], [:])
if test "${ac_cv_my_have_imlib2}" != "no"; then
AC_DEFINE(LOL_USE_IMLIB2, 1, Define to 1 to use Imlib2)
LOL_CFLAGS="${LOL_CFLAGS} ${IMLIB2_CFLAGS}"
LOL_LIBS="${LOL_LIBS} ${IMLIB2_LIBS}"
if test "${enable_imlib2}" != "no"; then
PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"], [:])
if test "${ac_cv_my_have_imlib2}" != "no"; then
AC_DEFINE(LOL_USE_IMLIB2, 1, Define to 1 to use Imlib2)
LOL_CFLAGS="${LOL_CFLAGS} ${IMLIB2_CFLAGS}"
LOL_LIBS="${LOL_LIBS} ${IMLIB2_LIBS}"
fi
fi
AM_CONDITIONAL(LOL_USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")



+ 1
- 1
build/autotools/m4/lol-subproject.m4 View File

@@ -20,7 +20,7 @@ dnl Build and configure Lol Engine before our repository
dnl Ensure $lol_srcdir and $lol_builddir are properly set
dnl

ac_configure_args="${ac_configure_args} --enable-subproject"
ac_configure_args="${ac_configure_args} --enable-subproject $1"
AC_CONFIG_SUBDIRS([lol])
AC_SUBST(lol_srcdir, '${top_srcdir}/lol')
AC_SUBST(lol_builddir, '${top_builddir}/lol')


+ 2
- 0
configure.ac View File

@@ -84,6 +84,8 @@ AC_ARG_ENABLE(ffmpeg,
[ --enable-ffmpeg build using FFmpeg (default autodetected)])
AC_ARG_ENABLE(sdl,
[ --enable-sdl build using SDL (default autodetected)])
AC_ARG_ENABLE(imlib2,
[ --enable-imlib2 build using Imlib2 (default autodetected)])

AC_ARG_ENABLE(test,
[ --enable-test build test suite (default yes)])


Loading…
Cancel
Save