X-Git-Url: http://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/ca8ee16cfde42ea27d40f8e45fa6d96dc24cd5d9..d82c61e8b0ff6b7660ec0288c50e6f3e6547ed4a:/configure.ac diff --git a/configure.ac b/configure.ac index 468147b..808965b 100644 --- a/configure.ac +++ b/configure.ac @@ -29,8 +29,46 @@ if test x$with_gobject = xyes; then AM_PATH_GLIB_2_0(, [have_gobject=yes], [have_gobject=no], [gobject]) fi -AM_CONDITIONAL([BUILD_UPKG], [test x$have_gobject = xyes]) +AC_ARG_WITH([modlib], + [AS_HELP_STRING([--with-modlib], + [specify which module decoding library to use - one of modplug, none or auto. [default=auto]] + )], + [with_modlib=$withval], + [with_modlib=auto]) + +CHECK_LIBMODPLUG([have_libmodplug=yes], [have_libmodplug=no]) +AC_MSG_CHECKING([which module library to use]) +case $with_modlib in +none) + use_modlib=none +;; +no) + use_modlib=none +;; +modplug) + if test x$have_libmodplug = xyes; then + use_modlib=modplug + else + use_modlib=none + fi +;; +auto) + if test x$have_libmodplug = xyes; then + use_modlib=modplug + else + use_modlib=none + fi +;; +*) + AC_MSG_ERROR([Invalid argument to --with-modlib: $with_modlib]) +;; +esac +AC_MSG_RESULT([$use_modlib]) +AM_CONDITIONAL([USE_LIBMODPLUG], [test x$use_modlib = xmodplug]) +AM_CONDITIONAL([USE_DUMMYMOD], [test x$use_modlib = xnone]) + +AM_CONDITIONAL([BUILD_UPKG], [test x$have_gobject = xyes]) AC_CONFIG_FILES([ Makefile