From b6681480afd85ed3914902a96b4d7bc4185e3391 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Wed, 3 Feb 2010 14:40:20 -0500 Subject: [PATCH] build: Abort configure if specified module library is not found. If the user specifies, say, --with-modlib=modplug, it is not right to use any other module library. We also avoid checking for unrequested module libraries. --- configure.ac | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 8844115..6dfc336 100644 --- a/configure.ac +++ b/configure.ac @@ -33,23 +33,16 @@ AC_ARG_WITH([modlib], [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) +no|none) use_modlib=none ;; modplug) - if test x$have_libmodplug = xyes; then - use_modlib=modplug - else - use_modlib=none - fi + CHECK_LIBMODPLUG([use_modlib=modplug], []) ;; auto) + CHECK_LIBMODPLUG([have_libmodplug=yes], [have_libmodplug=no]) + if test x$have_libmodplug = xyes; then use_modlib=modplug else @@ -60,6 +53,7 @@ auto) AC_MSG_ERROR([Invalid argument to --with-modlib: $with_modlib]) ;; esac +AC_MSG_CHECKING([which module library to use]) AC_MSG_RESULT([$use_modlib]) AM_CONDITIONAL([USE_LIBMODPLUG], [test x$use_modlib = xmodplug]) -- 2.43.0