-dnl Copyright © 2009-2012, 2015 Nick Bowler
+dnl Copyright © 2009-2012, 2015, 2019 Nick Bowler
dnl
dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
dnl This is free software: you are free to do what the fuck you want to.
[with_modlib=$withval],
[with_modlib=auto])
-case $with_modlib in
-no|none)
- use_modlib=none
-;;
-modplug)
- DX_CHECK_LIBMODPLUG([use_modlib=modplug], [])
-;;
-auto)
- DX_CHECK_LIBMODPLUG([have_libmodplug=yes], [have_libmodplug=no])
+use_modlib=none
+AS_CASE([$with_modlib],
+ [no|none], [:],
+ [modplug], [DX_LIB_LIBMODPLUG([use_modlib=modplug])],
+ [auto], [DX_LIB_LIBMODPLUG([use_modlib=modplug], [:])],
+ [AC_MSG_ERROR([Invalid argument to --with-modlib: $with_modlib])])
- 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_CHECKING([which module library to use])
AC_MSG_RESULT([$use_modlib])