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="ABIPGN_ABIGOFFICE" dnl= dnl= # 2. abi_plugin_files is the list of files that configure must generate: dnl= abi_plugin_files="GNUmakefile unix/GNUmakefile" dnl= dnl= # 3. abi_plugin_desc is a short description of the plugin dnl= abi_plugin_desc="Enables AbiWord to embed Gnome Office Charts and Components." 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_ABIGOFFICE],[ # Checks for GOffice LIBGOffice_REQUIRED_VERSION=0.4.0 PKG_CHECK_MODULES(GOFFICE, [libgoffice-0.4 >= $LIBGOffice_REQUIRED_VERSION],[ dnl check if goffice has gnome support saved_cflags=$CFLAGS CFLAGS=$GOFFICE_CFLAGS AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifndef GOFFICE_WITH_GNOME #error no gnome support present #endif ]])], [ AC_LANG(C++) AC_CHECK_HEADER(hash_map, [ GOFFICE_CFLAGS="-DHAVE_HASH_MAP $GOFFICE_CFLAGS" ABI_PLUGIN_REPORT([abigoffice: okay]) ],[ AC_CHECK_HEADER(ext/hash_map,[ GOFFICE_CFLAGS="-DHAVE_EXT_HASH_MAP $GOFFICE_CFLAGS" ABI_PLUGIN_REPORT([abigoffice: okay]) ], [ ABI_PLUGIN_REPORT([abigoffice: error hash_map header not found]) abi_plugin_disable=yes]) ]) AC_LANG(C) ], [ABI_PLUGIN_REPORT([abigoffice: you need a libgoffice version with gnome support]) abi_plugin_disable=yes ]) CFLAGS=$saved_cflags ],[ ABI_PLUGIN_REPORT([abigoffice: error libgoffice >= $LIBGOffice_REQUIRED_VERSION required]) abi_plugin_disable=yes ]) AC_SUBST(GOFFICE_CFLAGS) AC_SUBST(GOFFICE_LIBS) ])