Skip to content

Commit

Permalink
dev-util/ctags: fix autotools conditionals so pkg-config is always found
Browse files Browse the repository at this point in the history
Fixes bug #604656.
  • Loading branch information
radhermit committed Jan 11, 2017
1 parent 4f5a428 commit 63de994
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dev-util/ctags/files/ctags-20161028-automagic-deps.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Add options to control libxml2, jansson, and libyaml automagic deps.
- [have_libxml=yes
- AC_DEFINE(HAVE_LIBXML)],
- [have_libxml=no])
+if test "${enable_xml}" = "yes"; then
+AS_IF([test "${enable_xml}" = "yes"], [
+ PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.7.7],
+ [have_libxml=yes
+ AC_DEFINE(HAVE_LIBXML)],
+ [AC_MSG_ERROR([libxml2 not found])])
+fi
+])
AM_CONDITIONAL(HAVE_LIBXML, test "x$have_libxml" = xyes)

+AC_ARG_ENABLE([json],
Expand All @@ -36,12 +36,12 @@ Add options to control libxml2, jansson, and libyaml automagic deps.
- [have_jansson=yes
- AC_DEFINE(HAVE_JANSSON)],
- [have_jansson=no])
+if test "${enable_json}" = "yes"; then
+AS_IF([test "${enable_json}" = "yes"], [
+ PKG_CHECK_MODULES(JANSSON, jansson,
+ [have_jansson=yes
+ AC_DEFINE(HAVE_JANSSON)],
+ [AC_MSG_ERROR([jansson not found])])
+fi
+])
AM_CONDITIONAL(HAVE_JANSSON, test "x$have_jansson" = xyes)

+AC_ARG_ENABLE([yaml],
Expand All @@ -54,12 +54,12 @@ Add options to control libxml2, jansson, and libyaml automagic deps.
- [have_libyaml=yes
- AC_DEFINE(HAVE_LIBYAML)],
- [have_libyaml=no])
+if test "${enable_yaml}" = "yes"; then
+AS_IF([test "${enable_yaml}" = "yes"], [
+ PKG_CHECK_MODULES(LIBYAML, yaml-0.1,
+ [have_libyaml=yes
+ AC_DEFINE(HAVE_LIBYAML)],
+ [AC_MSG_ERROR([libyaml not found])])
+fi
+])
AM_CONDITIONAL(HAVE_LIBYAML, test "x$have_libyaml" = xyes)


0 comments on commit 63de994

Please sign in to comment.