build: MBIM support is auto
Use it if found, don't use it if not found. Can be explicitly requested with --with-mbim.
This commit is contained in:
+25
-14
@@ -171,21 +171,32 @@ case $with_tests in
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl MBIM support (enabled by default)
|
||||
dnl MBIM support (auto by default)
|
||||
dnl
|
||||
AC_ARG_WITH(mbim, AS_HELP_STRING([--without-mbim], [Build without MBIM support]), [], [with_mbim=yes])
|
||||
AM_CONDITIONAL(WITH_MBIM, test "x$with_mbim" = "xyes")
|
||||
case $with_mbim in
|
||||
yes)
|
||||
PKG_CHECK_MODULES(MBIM, mbim-glib)
|
||||
AC_DEFINE(WITH_MBIM, 1, [Define if you want MBIM support])
|
||||
AC_SUBST(MBIM_CFLAGS)
|
||||
AC_SUBST(MBIM_LIBS)
|
||||
;;
|
||||
*)
|
||||
with_mbim=no
|
||||
;;
|
||||
esac
|
||||
AC_ARG_WITH(mbim, AS_HELP_STRING([--without-mbim], [Build without MBIM support]), [], [with_mbim=auto])
|
||||
if (test "${with_mbim}" != "no"); then
|
||||
PKG_CHECK_MODULES(MBIM,
|
||||
[mbim-glib],
|
||||
[have_libmbim_glib=yes],
|
||||
[have_libmbim_glib=no])
|
||||
AC_SUBST(MBIM_CFLAGS)
|
||||
AC_SUBST(MBIM_LIBS)
|
||||
|
||||
if (test "${have_libmbim_glib}" = "no"); then
|
||||
if (test "${with_mbim}" = "yes"); then
|
||||
AC_MSG_ERROR([Couldn't find libmbim-glib])
|
||||
else
|
||||
with_mbim="no"
|
||||
fi
|
||||
else
|
||||
with_mbim="yes"
|
||||
fi
|
||||
fi
|
||||
|
||||
if (test "${with_mbim}" = "yes"); then
|
||||
AC_DEFINE(WITH_MBIM, 1, [Define if you want MBIM support])
|
||||
fi
|
||||
AM_CONDITIONAL(WITH_MBIM, test "${with_mbim}" = "yes")
|
||||
|
||||
dnl
|
||||
dnl QMI support (enabled by default)
|
||||
|
||||
Reference in New Issue
Block a user