1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
mathview_pkgs='mathview-frontend-libxml2 >= 0.7.5'
mathview_deps="no"
# test hashmap availablity
HASHMAP_CFLAGS=""
AC_LANG(C++)
AC_CHECK_HEADER(hash_map,
[
HASHMAP_CFLAGS="-DHAVE_HASH_MAP"
], [
AC_CHECK_HEADER(ext/hash_map,
[
HASHMAP_CFLAGS="-DHAVE_EXT_HASH_MAP"
], [
AC_MSG_WARN([mathview plugin: dependencies not satisfied - missing 'hash_map' or 'ext/hash_map' header])
])
])
AC_LANG(C)
if test "$HASHMAP_CFLAGS" != ""; then
if test "$enable_mathview" != ""; then
PKG_CHECK_EXISTS([ $mathview_pkgs ],
[
mathview_deps="yes"
], [
test "$enable_mathview" = "auto" && AC_MSG_WARN([mathview plugin: dependencies not satisfied - $mathview_pkgs])
])
fi
if test "$enable_mathview" = "yes" || \
test "$mathview_deps" = "yes"; then
if test "$enable_mathview_builtin" = "yes"; then
AC_MSG_ERROR([mathview plugin: static linking not supported])
fi
PKG_CHECK_MODULES(MATHVIEW,[ $mathview_pkgs ])
test "$enable_mathview" = "auto" && PLUGINS="$PLUGINS mathview"
MATHVIEW_CFLAGS="$MATHVIEW_CFLAGS $HASHMAP_CFLAGS "'${PLUGIN_CFLAGS}'
MATHVIEW_LIBS="$MATHVIEW_LIBS "'${PLUGIN_LIBS}'
fi
fi
# need to unconditionally test, for `make distcheck'
AM_PROG_LEX
AC_PROG_YACC
AC_SUBST([MATHVIEW_CFLAGS])
AC_SUBST([MATHVIEW_LIBS])
|