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