]> git.draconx.ca Git - upkg.git/commitdiff
build: Abort configure if specified module library is not found.
authorNick Bowler <nbowler@draconx.ca>
Wed, 3 Feb 2010 19:40:20 +0000 (14:40 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 3 Feb 2010 19:40:20 +0000 (14:40 -0500)
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

index 88441157f3797a3cef6e5d29b4584c97d4142a52..6dfc336ef3ef53da6358affed1b66a640446bb55 100644 (file)
@@ -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])