mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
Use a guard to prevent dependency on pkg-config when it is not available
I picked the methodology off of https://github.com/curl/curl/issues/972. The benefit here is that if someone does not have pkg-config (we know this is unlikely anyways), their configuration script just won't end up with the checks. This provides a patch similar to the one requested in issue #120.
This commit is contained in:
parent
59df9a4a3f
commit
960a785e10
1 changed files with 8 additions and 4 deletions
|
@ -45,8 +45,10 @@ AC_ARG_ENABLE([log-debug],
|
||||||
# Mandatory dependencies
|
# Mandatory dependencies
|
||||||
#
|
#
|
||||||
|
|
||||||
|
m4_ifdef([PKG_CHECK_MODULES], [
|
||||||
PKG_CHECK_MODULES([DEPS], [libudev libsystemd > 219])
|
PKG_CHECK_MODULES([DEPS], [libudev libsystemd > 219])
|
||||||
PKG_CHECK_MODULES([GLIB], [glib-2.0])
|
PKG_CHECK_MODULES([GLIB], [glib-2.0])
|
||||||
|
])
|
||||||
|
|
||||||
AC_CHECK_HEADERS(readline/readline.h,, AC_MSG_ERROR(GNU readline not found))
|
AC_CHECK_HEADERS(readline/readline.h,, AC_MSG_ERROR(GNU readline not found))
|
||||||
|
|
||||||
|
@ -55,8 +57,10 @@ AC_CHECK_HEADERS(readline/readline.h,, AC_MSG_ERROR(GNU readline not found))
|
||||||
# all tests.
|
# all tests.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
m4_ifdef([PKG_CHECK_MODULES], [
|
||||||
PKG_CHECK_MODULES([CHECK], [check],
|
PKG_CHECK_MODULES([CHECK], [check],
|
||||||
[have_check=yes], [have_check=no])
|
[have_check=yes], [have_check=no])
|
||||||
|
])
|
||||||
AM_CONDITIONAL([BUILD_HAVE_CHECK], [test "x$have_check" = "xyes"])
|
AM_CONDITIONAL([BUILD_HAVE_CHECK], [test "x$have_check" = "xyes"])
|
||||||
|
|
||||||
if test "x$have_check" = "xyes"
|
if test "x$have_check" = "xyes"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue