Index: tools/abimathview/plugin.m4 =================================================================== RCS file: /cvsroot/abiword-plugins/tools/abimathview/plugin.m4,v retrieving revision 1.1 diff -u -5 -r1.1 plugin.m4 --- tools/abimathview/plugin.m4 24 Jan 2005 16:32:18 -0000 1.1 +++ tools/abimathview/plugin.m4 26 Jan 2005 14:51:44 -0000 @@ -1,18 +1,45 @@ dnl= ########################################################################## dnl= # abiword-plugins: autogen.sh header dnl= # this file is executed as a shell script dnl= dnl= # 1. abi_plugin_macro is the name of the main macro defined here: -dnl= abi_plugin_macro="" +dnl= abi_plugin_macro="ABIPGN_ABIMATHVIEW" dnl= dnl= # 2. abi_plugin_files is the list of files that configure must generate: dnl= abi_plugin_files="GNUmakefile xp/GNUmakefile" dnl= dnl= # 3. abi_plugin_desc is a short description of the plugin -dnl= abi_plugin_desc="Interface with GtkMathView to render MathML" -dnl= -dnl= # 4. abi_plugin_enable - whether plugin should be enabled by default -dnl= abi_plugin_enable="no" -dnl= +dnl= abi_plugin_desc="Enables AbiWord to embed some maths." +dnl= +dnl= # 4. abi_plugin_enable - whether plugin should be enabled by default +dnl= abi_plugin_enable="yes" +dnl= dnl= return dnl= ########################################################################## + +AC_DEFUN([ABIPGN_ABIMATHVIEW],[ + +# Checks for GtkMathView. + +MATH_VIEW_REQUIRED_VERSION = 0.6.5 + +PKG_CHECK_MODULES(MATHVIEW, [mathview-libxml2 >= 0.6.5],[ + ABI_PLUGIN_REPORT([abimathview: okay]) +],[ ABI_PLUGIN_REPORT([abimathview: error gtlmathview >= 0.6.5 required]) + abi_plugin_disable=yes +]) + +AC_LANG(C++) + +AC_CHECK_HEADER(hash_map,[MATHVIEW_CFLAGS="-DHAVE_HASH_MAP $MATHVIEW_CFLAGS"],[ +AC_CHECK_HEADER(ext/hash_map,[MATHVIEW_CFLAGS="-DHAVE_EXT_HASH_MAP $MATHVIEW_CFLAGS"], +[ ABI_PLUGIN_REPORT([abimathview: error hash_map header not found]) +abi_plugin_disable=yes]) +]) + +AC_LANG(C) + +echo $MATHVIEW_CFLAGS +AC_SUBST(MATHVIEW_CFLAGS) +AC_SUBST(MATHVIEW_LIBS) +]) Index: tools/abimathview/xp/AbiMathView.cpp =================================================================== RCS file: /cvsroot/abiword-plugins/tools/abimathview/xp/AbiMathView.cpp,v retrieving revision 1.1 diff -u -5 -r1.1 AbiMathView.cpp --- tools/abimathview/xp/AbiMathView.cpp 24 Jan 2005 16:32:19 -0000 1.1 +++ tools/abimathview/xp/AbiMathView.cpp 26 Jan 2005 14:51:44 -0000 @@ -46,10 +46,12 @@ #include "pd_Document.h" #include "pp_Property.h" #include "pp_AttrProp.h" #include "ut_mbtowc.h" #include "xad_Document.h" +#include "xap_Module.h" +#include "ap_App.h" GR_MathManager::GR_MathManager(GR_Graphics* pG) : GR_EmbedManager(pG), m_CurrentUID(-1), m_pLogger(NULL), @@ -83,11 +85,11 @@ SmartPtr logger = Logger::create(); m_pLogger = logger; logger->setLogLevel(LOG_INFO); SmartPtr mathGraphicDevice = GR_Abi_MathGraphicDevice::create(getGraphics()); m_pMathGraphicDevice = mathGraphicDevice; - m_pAbiContext = new GR_RenderingContext(getGraphics()); + m_pAbiContext = new GR_Abi_RenderingContext(getGraphics()); SmartPtr dictionary = MathMLOperatorDictionary::create(); m_pOperatorDictionary = dictionary; libxml2_MathView::loadOperatorDictionary(logger, dictionary, libxml2_MathView::getDefaultOperatorDictionaryPath()); } Index: tools/abimathview/xp/GNUmakefile.am =================================================================== RCS file: /cvsroot/abiword-plugins/tools/abimathview/xp/GNUmakefile.am,v retrieving revision 1.1 diff -u -5 -r1.1 GNUmakefile.am --- tools/abimathview/xp/GNUmakefile.am 24 Jan 2005 16:32:19 -0000 1.1 +++ tools/abimathview/xp/GNUmakefile.am 26 Jan 2005 14:51:45 -0000 @@ -18,11 +18,11 @@ plugindir = @ABI_PLUGIN_DIR@ NULL = -include $(top_srcdir)/includes.mk +## include $(top_srcdir)/includes.mk INCLUDES = $(AF_INCLUDES) $(ICONV_INCLUDES) $(WP_INCLUDES) $(OTHER_INCLUDES) $(MATHVIEW_CFLAGS) $(TEXT_INCLUDES) noinst_LIBRARIES = libMath_xp.a @@ -43,11 +43,11 @@ gr_Abi_DefaultShaper.h \ gr_Abi_StandardSymbolsShaper.h \ gr_Abi_InkArea.h \ gr_Abi_MathGraphicDevice.h \ gr_Abi_RenderingContext.h \ - AbiMAthView.h \ + AbiMathView.h \ $(NULL) CPPFLAGS = @ABI_CPPFLAGS@ @CPPFLAGS@ @PLATFORM_CPPFLAGS@ LDFLAGS = @LDFLAGS@ @PLATFORM_LDFLAGS@