1 2gda_pkgs='libgda >= 1.2.0 libgnomedb >= 1.2.0' 3gda_deps="no" 4 5if test "$enable_gda" != ""; then 6 7PKG_CHECK_EXISTS([ $gda_pkgs ], 8[ 9 AC_MSG_CHECKING([for gtk toolkit]) 10 if test "$TOOLKIT" = "gtk"; then 11 AC_MSG_RESULT([yes]) 12 gda_deps="yes" 13 else 14 AC_MSG_RESULT([no]) 15 if test "$enable_gda" = "auto"; then 16 AC_MSG_WARN([gda plugin: only supported with gtk]) 17 else 18 AC_MSG_ERROR([gda plugin: only supported with gtk]) 19 fi 20 fi 21], [ 22 test "$enable_gda" = "auto" && AC_MSG_WARN([gda plugin: dependencies not satisfied - $gda_pkgs]) 23]) 24 25fi 26 27if test "$enable_gda" = "yes" || \ 28 test "$gda_deps" = "yes"; then 29 30if test "$enable_gda_builtin" = "yes"; then 31AC_MSG_ERROR([gda plugin: static linking not supported]) 32fi 33 34PKG_CHECK_MODULES(GDA,[ $gda_pkgs ]) 35 36test "$enable_gda" = "auto" && PLUGINS="$PLUGINS gda" 37 38GDA_CFLAGS="$GDA_CFLAGS "'${PLUGIN_CFLAGS}' 39GDA_LIBS="$GDA_LIBS "'${PLUGIN_LIBS}' 40 41fi 42 43AC_SUBST([GDA_CFLAGS]) 44AC_SUBST([GDA_LIBS]) 45 46 47goffice_req= 48for ver in 0.10 ; do 49 if test "x$goffice_req" = x; then 50 if pkg-config --exists libgoffice-$ver; then 51 goffice_req=libgoffice-$ver 52 fi 53 fi 54done 55if test "x$goffice_req" = x; then 56 goffice_req=libgoffice-0.10 57fi 58 59goffice_pkgs="$goffice_req >= 0.10.2" 60goffice_deps="no" 61 62if test "$enable_goffice" != ""; then 63 64PKG_CHECK_EXISTS([ $goffice_pkgs ], 65[ 66 AC_MSG_CHECKING([for gtk toolkit]) 67 if test "$TOOLKIT" = "gtk"; then 68 AC_MSG_RESULT([yes]) 69 goffice_deps="yes" 70 else 71 AC_MSG_RESULT([no]) 72 if test "$enable_goffice" = "auto"; then 73 AC_MSG_WARN([goffice plugin: only supported with gtk]) 74 else 75 AC_MSG_ERROR([goffice plugin: only supported with gtk]) 76 fi 77 fi 78], [ 79 test "$enable_goffice" = "auto" && AC_MSG_WARN([goffice plugin: dependencies not satisfied - $goffice_pkgs]) 80]) 81 82fi 83 84if test "$enable_goffice" = "yes" || \ 85 test "$goffice_deps" = "yes"; then 86 87if test "$enable_goffice_builtin" = "yes"; then 88AC_MSG_ERROR([goffice plugin: static linking not supported]) 89fi 90 91PKG_CHECK_MODULES(GOFFICE,[ $goffice_pkgs ]) 92 93test "$enable_goffice" = "auto" && PLUGINS="$PLUGINS goffice" 94 95GOFFICE_CFLAGS="$GOFFICE_CFLAGS "'${PLUGIN_CFLAGS}' 96GOFFICE_LIBS="$GOFFICE_LIBS "'${PLUGIN_LIBS}' 97 98fi 99 100AC_SUBST([GOFFICE_CFLAGS]) 101AC_SUBST([GOFFICE_LIBS]) 102 103 104ISCII_CFLAGS= 105ISCII_LIBS= 106 107if test "$enable_iscii" != ""; then 108 109test "$enable_iscii" = "auto" && PLUGINS="$PLUGINS iscii" 110 111ISCII_CFLAGS="$ISCII_CFLAGS "'${PLUGIN_CFLAGS}' 112ISCII_LIBS="$ISCII_LIBS "'${PLUGIN_LIBS}' 113 114if test "$enable_iscii_builtin" = "yes"; then 115 ISCII_CFLAGS="$ISCII_CFLAGS -DABI_PLUGIN_BUILTIN" 116fi 117 118fi 119 120AC_SUBST([ISCII_CFLAGS]) 121AC_SUBST([ISCII_LIBS]) 122 123 124GDICT_CFLAGS= 125GDICT_LIBS= 126gdict_deps="no" 127 128if test "$enable_gdict" != ""; then 129 130AC_MSG_CHECKING([for unix/gtk platform]) 131if test "$TOOLKIT" = "gtk"; then 132 AC_MSG_RESULT([yes]) 133 gdict_deps="yes" 134else 135 AC_MSG_RESULT([no]) 136 if test "$enable_gdict" = "auto"; then 137 AC_MSG_WARN([gdict plugin: only supported on UNIX/gtk platforms]) 138 else 139 AC_MSG_ERROR([gdict plugin: only supported on UNIX/gtk platforms]) 140 fi 141fi 142 143fi 144 145if test "$enable_gdict" = "yes" || \ 146 test "$gdict_deps" = "yes"; then 147 148AC_TYPE_PID_T 149 150test "$enable_gdict" = "auto" && PLUGINS="$PLUGINS gdict" 151 152GDICT_CFLAGS="$GDICT_CFLAGS "'${PLUGIN_CFLAGS} -DUSE_FORK_AND_EXEC_METHOD=1' 153GDICT_LIBS='${PLUGIN_LIBS}' 154 155if test "$enable_gdict_builtin" != ""; then 156 GDICT_CFLAGS="$GDICT_CFLAGS -DABI_PLUGIN_BUILTIN" 157fi 158 159fi 160 161AC_SUBST([GDICT_CFLAGS]) 162AC_SUBST([GDICT_LIBS]) 163 164 165GOOGLE_CFLAGS= 166GOOGLE_LIBS= 167 168if test "$enable_google" != ""; then 169 170test "$enable_google" = "auto" && PLUGINS="$PLUGINS google" 171 172GOOGLE_CFLAGS="$GOOGLE_CFLAGS "'${PLUGIN_CFLAGS}' 173GOOGLE_LIBS="$GOOGLE_LIBS "'${PLUGIN_LIBS}' 174 175if test "$enable_google_builtin" = "yes"; then 176 GOOGLE_CFLAGS="$GOOGLE_CFLAGS -DABI_PLUGIN_BUILTIN" 177fi 178 179fi 180 181AC_SUBST([GOOGLE_CFLAGS]) 182AC_SUBST([GOOGLE_LIBS]) 183 184 185openwriter_pkgs="$gsf_req" 186openwriter_deps="no" 187 188if test "$enable_openwriter" != ""; then 189 190PKG_CHECK_EXISTS([ $openwriter_pkgs ], 191[ 192 openwriter_deps="yes" 193], [ 194 test "$enable_openwriter" = "auto" && AC_MSG_WARN([openwriter plugin: dependencies not satisfied - $openwriter_pkgs]) 195]) 196 197fi 198 199if test "$enable_openwriter" = "yes" || \ 200 test "$openwriter_deps" = "yes"; then 201 202PKG_CHECK_MODULES(OPENWRITER,[ $openwriter_pkgs ]) 203 204test "$enable_openwriter" = "auto" && PLUGINS="$PLUGINS openwriter" 205 206OPENWRITER_CFLAGS="$OPENWRITER_CFLAGS "'${PLUGIN_CFLAGS}' 207OPENWRITER_LIBS="$OPENWRITER_LIBS "'${PLUGIN_LIBS}' 208 209if test "$enable_openwriter_builtin" = "yes"; then 210 OPENWRITER_CFLAGS="$OPENWRITER_CFLAGS -DABI_PLUGIN_BUILTIN" 211fi 212 213fi 214 215AC_SUBST([OPENWRITER_CFLAGS]) 216AC_SUBST([OPENWRITER_LIBS]) 217 218 219applix_pkgs="$gsf_req" 220applix_deps="no" 221 222if test "$enable_applix" != ""; then 223 224PKG_CHECK_EXISTS([ $applix_pkgs ], 225[ 226 applix_deps="yes" 227], [ 228 test "$enable_applix" = "auto" && AC_MSG_WARN([applix plugin: dependencies not satisfied - $applix_pkgs]) 229]) 230 231fi 232 233if test "$enable_applix" = "yes" || \ 234 test "$applix_deps" = "yes"; then 235 236PKG_CHECK_MODULES(APPLIX,[ $applix_pkgs ]) 237 238test "$enable_applix" = "auto" && PLUGINS="$PLUGINS applix" 239 240APPLIX_CFLAGS="$APPLIX_CFLAGS "'${PLUGIN_CFLAGS}' 241APPLIX_LIBS="$APPLIX_LIBS "'${PLUGIN_LIBS}' 242 243if test "$enable_applix_builtin" = "yes"; then 244 APPLIX_CFLAGS="$APPLIX_CFLAGS -DABI_PLUGIN_BUILTIN" 245fi 246 247fi 248 249AC_SUBST([APPLIX_CFLAGS]) 250AC_SUBST([APPLIX_LIBS]) 251 252 253# 254# Optional packages 255# 256 257AC_ARG_WITH([inter7eps], 258 [AS_HELP_STRING([--with-inter7eps], [MHT plugin: support multipart html using the inter7 EPS library])], 259[ 260 mht_cv_inter7eps="$withval" 261],[ 262 mht_cv_inter7eps="auto" 263]) 264 265AC_ARG_WITH([libtidy], 266 [AS_HELP_STRING([--with-libtidy], [MHT plugin: clean up HTML before importing using libtidy])], 267[ 268 mht_cv_libtidy="$withval" 269],[ 270 mht_cv_libtidy="auto" 271]) 272 273# gsf pulls in libxml, so we are ok 274mht_pkgs="$gsf_req" 275mht_deps="no" 276 277if test "$enable_mht" != ""; then 278 279PKG_CHECK_EXISTS([ $mht_pkgs ], 280[ 281 mht_deps="yes" 282], [ 283 test "$enable_mht" = "auto" && AC_MSG_WARN([mht plugin: dependencies not satisfied - $mht_pkgs]) 284]) 285 286fi 287 288if test "$enable_mht" = "yes" || \ 289 test "$mht_deps" = "yes"; then 290 291test "$enable_mht" = "auto" && PLUGINS="$PLUGINS mht" 292 293if test "$enable_mht_builtin" = "yes"; then 294AC_MSG_ERROR([mht plugin: static linking not supported]) 295fi 296 297# 298# Tests 299# 300 301AC_CHECK_HEADERS([eps/eps.h], 302[ 303 inter7eps_found="yes" 304], [ 305 inter7eps_found="no" 306]) 307 308AC_CHECK_HEADERS([tidy/tidy.h], 309[ 310 libtidy_found="yes" 311], [ 312 libtidy_found="no" 313]) 314 315# 316# Settings 317# 318 319if test "$mht_cv_inter7eps" = "yes" && 320 test "$inter7eps_found" = "no"; then 321 AC_MSG_ERROR([MHT plugin: error - inter7 EPS headers not found]) 322elif test "$mht_cv_inter7eps" = "auto"; then 323 mht_cv_inter7eps="$inter7eps_found" 324fi 325if test "$mht_cv_inter7eps" = "yes"; then 326 MHT_OPT_LIBS="$MHT_OPT_LIBS -leps" 327fi 328 329if test "$mht_cv_libtidy" = "yes" && 330 test "$libtidy_found" = "no"; then 331 AC_MSG_ERROR([MHT plugin: error - libtidy headers not found]) 332elif test "$mht_cv_libtidy" = "auto"; then 333 mht_cv_libtidy="$libtidy_found" 334fi 335if test "$mht_cv_libtidy" = "yes"; then 336 MHT_OPT_LIBS="$MHT_OPT_LIBS -ltidy" 337fi 338 339PKG_CHECK_MODULES(MHT,[ $mht_pkgs ]) 340 341MHT_CFLAGS="$MHT_CFLAGS "'${PLUGIN_CFLAGS}' 342MHT_LIBS="$MHT_LIBS $MHT_OPT_LIBS "'${PLUGIN_LIBS}' 343 344fi 345 346AC_SUBST([MHT_CFLAGS]) 347AC_SUBST([MHT_LIBS]) 348 349# TODO we depend on libxml2 anyways, so get rid of alternatives 350AM_CONDITIONAL([ABI_XHTML_XML2], test /bin/true) 351AM_CONDITIONAL([ABI_XHTML_MHT], test "$mht_cv_inter7eps" = "yes") 352AM_CONDITIONAL([ABI_XHTML_TIDY], test "$mht_cv_libtidy" = "yes") 353 354 355HRTEXT_CFLAGS= 356HRTEXT_LIBS= 357 358if test "$enable_hrtext" != ""; then 359 360test "$enable_hrtext" = "auto" && PLUGINS="$PLUGINS hrtext" 361 362HRTEXT_CFLAGS="$HRTEXT_CFLAGS "'${PLUGIN_CFLAGS}' 363HRTEXT_LIBS="$HRTEXT_LIBS "'${PLUGIN_LIBS}' 364 365if test "$enable_hrtext_builtin" = "yes"; then 366 HRTEXT_CFLAGS="$HRTEXT_CFLAGS -DABI_PLUGIN_BUILTIN" 367fi 368 369fi 370 371AC_SUBST([HRTEXT_CFLAGS]) 372AC_SUBST([HRTEXT_LIBS]) 373 374 375clarisworks_pkgs="$gsf_req" 376clarisworks_deps="no" 377 378if test "$enable_clarisworks" != ""; then 379 380PKG_CHECK_EXISTS([ $clarisworks_pkgs ], 381[ 382 clarisworks_deps="yes" 383], [ 384 test "$enable_clarisworks" = "auto" && AC_MSG_WARN([clarisworks plugin: dependencies not satisfied - $clarisworks_pkgs]) 385]) 386 387fi 388 389if test "$enable_clarisworks" = "yes" || \ 390 test "$clarisworks_deps" = "yes"; then 391 392PKG_CHECK_MODULES(CLARISWORKS,[ $clarisworks_pkgs ]) 393 394test "$enable_clarisworks" = "auto" && PLUGINS="$PLUGINS clarisworks" 395 396CLARISWORKS_CFLAGS="$CLARISWORKS_CFLAGS "'${PLUGIN_CFLAGS}' 397CLARISWORKS_LIBS="$CLARISWORKS_LIBS "'${PLUGIN_LIBS}' 398 399if test "$enable_clarisworks_builtin" = "yes"; then 400 CLARISWORKS_CFLAGS="$CLARISWORKS_CFLAGS -DABI_PLUGIN_BUILTIN" 401fi 402 403fi 404 405AC_SUBST([CLARISWORKS_CFLAGS]) 406AC_SUBST([CLARISWORKS_LIBS]) 407 408 409openxml_pkgs="libgsf-1 >= 1.14.4" 410openxml_deps="no" 411 412if test "$enable_openxml" != ""; then 413 414PKG_CHECK_EXISTS([ $openxml_pkgs ], 415[ 416 openxml_deps="yes" 417 ], [ 418 test "$enable_openxml" = "auto" && AC_MSG_WARN([openxml plugin: dependencies not satisfied - $openxml_pkgs]) 419]) 420 421AC_SUBST(ABIWORD_OMMLXSLTDIR, "${ABIWORD_DATADIR}/omml_xslt") 422 423fi 424 425if test "$enable_openxml" = "yes" || \ 426 test "$openxml_deps" = "yes"; then 427 428PKG_CHECK_MODULES(OPENXML,[ $openxml_pkgs ]) 429 430test "$enable_openxml" = "auto" && PLUGINS="$PLUGINS openxml" 431 432OPENXML_CFLAGS="$OPENXML_CFLAGS "'${PLUGIN_CFLAGS}' 433OPENXML_LIBS="$OPENXML_LIBS "'${PLUGIN_LIBS}' 434 435if test "$enable_openxml_builtin" = "yes"; then 436 OPENXML_CFLAGS="$OPENXML_CFLAGS -DABI_PLUGIN_BUILTIN" 437fi 438 439fi 440 441AC_SUBST([OPENXML_CFLAGS]) 442AC_SUBST([OPENXML_LIBS]) 443 444 445t602_pkgs="$gsf_req" 446t602_deps="no" 447 448if test "$enable_t602" != ""; then 449 450PKG_CHECK_EXISTS([ $t602_pkgs ], 451[ 452 t602_deps="yes" 453], [ 454 test "$enable_t602" = "auto" && AC_MSG_WARN([t602 plugin: dependencies not satisfied - $t602_pkgs]) 455]) 456 457fi 458 459if test "$enable_t602" = "yes" || \ 460 test "$t602_deps" = "yes"; then 461 462PKG_CHECK_MODULES(T602,[ $t602_pkgs ]) 463 464test "$enable_t602" = "auto" && PLUGINS="$PLUGINS t602" 465 466T602_CFLAGS="$T602_CFLAGS "'${PLUGIN_CFLAGS}' 467T602_LIBS="$T602_LIBS "'${PLUGIN_LIBS}' 468 469if test "$enable_t602_builtin" = "yes"; then 470 T602_CFLAGS="$T602_CFLAGS -DABI_PLUGIN_BUILTIN" 471fi 472 473fi 474 475AC_SUBST([T602_CFLAGS]) 476AC_SUBST([T602_LIBS]) 477 478 479LATEX_CFLAGS= 480LATEX_LIBS= 481 482# use libxslt if detected 483libxslt_req='libxslt' 484PKG_CHECK_EXISTS([ $libxslt_req ], 485[ 486 abi_cv_libxslt="yes" 487], [ 488 abi_cv_libxslt="no" 489]) 490AM_CONDITIONAL([HAVE_LIBXSLT], test "$abi_cv_libxslt" = "yes") 491 492if test "$enable_latex" != ""; then 493 494test "$enable_latex" = "auto" && PLUGINS="$PLUGINS latex" 495 496if test "$abi_cv_libxslt" = "yes"; then 497 PKG_CHECK_MODULES(LIBXSLT,[$libxslt_req]) 498 LATEX_CFLAGS="$LATEX_CFLAGS "'${LIBXSLT_CFLAGS}'" -DHAVE_LIBXSLT" 499 LATEX_LIBS="$LATEX_LIBS "'${LIBXSLT_LIBS}' 500 AC_SUBST(ABIWORD_XSLTMLDIR, "${ABIWORD_DATADIR}/xsltml") 501 PKG_CHECK_MODULES(LIBGSF, libgsf-1) 502 LATEX_CFLAGS="$LATEX_CFLAGS "'${LIBGSF_CFLAGS}' 503 LATEX_LIBS="$LATEX_LIBS "'${LIBGSF_LIBS}' 504fi 505 506LATEX_CFLAGS="$LATEX_CFLAGS "'${PLUGIN_CFLAGS}' 507LATEX_LIBS="$LATEX_LIBS "'${PLUGIN_LIBS}' 508 509if test "$enable_latex_builtin" = "yes"; then 510 LATEX_CFLAGS="$LATEX_CFLAGS -DABI_PLUGIN_BUILTIN" 511fi 512 513fi 514 515AC_SUBST([LATEX_CFLAGS]) 516AC_SUBST([LATEX_LIBS]) 517 518 519grammar_pkgs='link-grammar >= 4.2.1' 520grammar_deps="no" 521 522dnl make sure we enable grammar only if spell is enabled. At least in auto mode. 523if test "$enable_grammar" != "" && test "$abi_cv_spell" = "yes"; then 524 525PKG_CHECK_EXISTS([ $grammar_pkgs ], 526[ 527 grammar_deps="yes" 528], [ 529 test "$enable_grammar" = "auto" && AC_MSG_WARN([grammar plugin: dependencies not satisfied - $grammar_pkgs]) 530]) 531 532fi 533 534if test "$enable_grammar" = "yes" || \ 535 test "$grammar_deps" = "yes"; then 536 537if test "$enable_grammar_builtin" = "yes"; then 538AC_MSG_ERROR([grammar plugin: static linking not supported]) 539fi 540 541PKG_CHECK_MODULES(GRAMMAR,[ $grammar_pkgs ]) 542PKG_CHECK_EXISTS([ link-grammar >= 5.1.0 ], 543[ 544 AC_DEFINE([HAVE_LINK_GRAMMAR_51],[1],["have link-grammar 5.1.0 or later"]) 545]) 546 547test "$enable_grammar" = "auto" && PLUGINS="$PLUGINS grammar" 548 549GRAMMAR_CFLAGS="$GRAMMAR_CFLAGS "'${PLUGIN_CFLAGS}' 550GRAMMAR_LIBS="$GRAMMAR_LIBS "'${PLUGIN_LIBS}' 551 552fi 553 554AC_SUBST([GRAMMAR_CFLAGS]) 555AC_SUBST([GRAMMAR_LIBS]) 556 557 558EML_CFLAGS= 559EML_LIBS= 560 561if test "$enable_eml" != ""; then 562 563test "$enable_eml" = "auto" && PLUGINS="$PLUGINS eml" 564 565EML_CFLAGS="$EML_CFLAGS "'${PLUGIN_CFLAGS}' 566EML_LIBS="$EML_LIBS "'${PLUGIN_LIBS}' 567 568if test "$enable_eml_builtin" = "yes"; then 569 EML_CFLAGS="$EML_CFLAGS -DABI_PLUGIN_BUILTIN" 570fi 571 572fi 573 574AC_SUBST([EML_CFLAGS]) 575AC_SUBST([EML_LIBS]) 576 577 578epub_pkgs="libgsf-1 >= 1.14.4" 579epub_deps="no" 580 581if test "$enable_epub" != ""; then 582 583PKG_CHECK_EXISTS([ $epub_pkgs ], 584[ 585 epub_deps="yes" 586 ], [ 587 test "$enable_epub" = "auto" && AC_MSG_WARN([epub plugin: dependencies not satisfied - $epub_pkgs]) 588]) 589 590fi 591 592if test "$enable_epub" = "yes" || \ 593 test "$epub_deps" = "yes"; then 594 595PKG_CHECK_MODULES(EPUB,[ $epub_pkgs ]) 596 597test "$enable_epub" = "auto" && PLUGINS="$PLUGINS epub" 598 599EPUB_CFLAGS="$EPUB_CFLAGS "'${PLUGIN_CFLAGS}' 600EPUB_LIBS="$EPUB_LIBS "'${PLUGIN_LIBS}' 601 602if test "$enable_epub_builtin" = "yes"; then 603 EPUB_CFLAGS="$EPUB_CFLAGS -DABI_PLUGIN_BUILTIN" 604fi 605 606fi 607 608AC_SUBST([EPUB_CFLAGS]) 609AC_SUBST([EPUB_LIBS]) 610 611 612#opendocument_pkgs="$gsf_req redland >= 1.0.10 rasqal >= 0.9.17" 613 614opendocument_pkgs="$gsf_req" 615opendocument_optional_pkgs="redland >= 1.0.10 rasqal >= 0.9.17" 616opendocument_deps="no" 617 618if test "$enable_opendocument" != ""; then 619 620PKG_CHECK_EXISTS([ $opendocument_pkgs ], 621[ 622 opendocument_deps="yes" 623], [ 624 test "$enable_opendocument" = "auto" && AC_MSG_WARN([opendocument plugin: dependencies not satisfied - $opendocument_pkgs]) 625]) 626 627PKG_CHECK_EXISTS([ $opendocument_optional_pkgs ], 628[ opendocument_pkgs="$opendocument_pkgs $opendocument_optional_pkgs" ]) 629 630fi 631 632if test "$enable_opendocument" = "yes" || \ 633 test "$opendocument_deps" = "yes"; then 634 635PKG_CHECK_MODULES(OPENDOCUMENT,[ $opendocument_pkgs ]) 636 637test "$enable_opendocument" = "auto" && PLUGINS="$PLUGINS opendocument" 638 639OPENDOCUMENT_CFLAGS="$OPENDOCUMENT_CFLAGS "'${PLUGIN_CFLAGS}' 640OPENDOCUMENT_LIBS="$OPENDOCUMENT_LIBS "'${PLUGIN_LIBS} -lz' 641 642if test "$enable_opendocument_builtin" = "yes"; then 643 OPENDOCUMENT_CFLAGS="$OPENDOCUMENT_CFLAGS -DABI_PLUGIN_BUILTIN" 644fi 645 646fi 647 648AC_SUBST([OPENDOCUMENT_CFLAGS]) 649AC_SUBST([OPENDOCUMENT_LIBS]) 650 651 652rsvg_pkgs="librsvg-2.0 >= 2.0 glib-2.0" 653rsvg_deps="no" 654 655if test "$TOOLKIT" = "gtk"; then 656 657 if test "$enable_rsvg" = "auto"; then 658 AC_MSG_WARN([rsvg plugin: not needed with gtk]) 659 fi 660 enable_rsvg="" 661fi 662 663if test "$enable_rsvg" != ""; then 664 665PKG_CHECK_EXISTS([ $rsvg_pkgs ], 666[ 667 rsvg_deps="yes" 668], [ 669 test "$enable_rsvg" = "auto" && AC_MSG_WARN([rsvg plugin: dependencies not satisfied - $rsvg_pkgs]) 670]) 671 672fi 673 674if test "$enable_rsvg" = "yes" || \ 675 test "$rsvg_deps" = "yes"; then 676 677if test "$enable_rsvg_builtin" = "yes"; then 678AC_MSG_ERROR([rsvg plugin: static linking not supported]) 679fi 680 681PKG_CHECK_MODULES(RSVG,[ $rsvg_pkgs ]) 682 683test "$enable_rsvg" = "auto" && PLUGINS="$PLUGINS rsvg" 684 685RSVG_CFLAGS="$RSVG_CFLAGS "'${PLUGIN_CFLAGS}' 686RSVG_LIBS="$RSVG_LIBS "'${PLUGIN_LIBS}' 687 688fi 689 690AC_SUBST([RSVG_CFLAGS]) 691AC_SUBST([RSVG_LIBS]) 692 693 694wpg_pkgs="$gsf_req libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0" 695wpg_deps="no" 696 697if test "$enable_wpg" != ""; then 698 699PKG_CHECK_EXISTS([ $wpg_pkgs ], 700[ 701 wpg_deps="yes" 702], [ 703 test "$enable_wpg" = "auto" && AC_MSG_WARN([wpg plugin: dependencies not satisfied - $wpg_pkgs]) 704]) 705 706fi 707 708if test "$enable_wpg" = "yes" || \ 709 test "$wpg_deps" = "yes"; then 710 711if test "$enable_wpg_builtin" = "yes"; then 712AC_MSG_ERROR([wpg plugin: static linking not supported]) 713fi 714 715PKG_CHECK_MODULES(WPG, [ $wpg_pkgs ]) 716 717test "$enable_wpg" = "auto" && PLUGINS="$PLUGINS wpg" 718 719WPG_CFLAGS="$WPG_CFLAGS "'${PLUGIN_CFLAGS}' 720WPG_LIBS="$WPG_LIBS "'${PLUGIN_LIBS}' 721 722fi 723 724AC_SUBST([WPG_CFLAGS]) 725AC_SUBST([WPG_LIBS]) 726 727 728BMP_CFLAGS= 729BMP_LIBS= 730bmp_deps="no" 731 732if test "$enable_bmp" != ""; then 733 734 bmp_deps="yes" 735 736fi 737 738if test "$enable_bmp" = "yes" || \ 739 test "$bmp_deps" = "yes"; then 740 741# TODO check for libpng, well abiword links to it anyways 742 743BMP_CFLAGS="$BMP_CFLAGS $PNG_CFLAGS "'${PLUGIN_CFLAGS}' 744BMP_LIBS="$BMP_LIBS $PNG_LIBS "'${PLUGIN_LIBS}' 745 746if test "$enable_bmp_builtin" = "yes"; then 747 BMP_CFLAGS="$BMP_CFLAGS -DABI_PLUGIN_BUILTIN" 748fi 749 750test "$enable_bmp" = "auto" && PLUGINS="$PLUGINS bmp" 751 752fi 753 754AC_SUBST([BMP_CFLAGS]) 755AC_SUBST([BMP_LIBS]) 756 757 758pdb_pkgs="$gsf_req" 759pdb_deps="no" 760 761if test "$enable_pdb" != ""; then 762 763PKG_CHECK_EXISTS([ $pdb_pkgs ], 764[ 765 pdb_deps="yes" 766], [ 767 test "$enable_pdb" = "auto" && AC_MSG_WARN([pdb plugin: dependencies not satisfied - $pdb_pkgs]) 768]) 769 770fi 771 772if test "$enable_pdb" = "yes" || \ 773 test "$pdb_deps" = "yes"; then 774 775PKG_CHECK_MODULES(PDB,[ $pdb_pkgs ]) 776 777test "$enable_pdb" = "auto" && PLUGINS="$PLUGINS pdb" 778 779PDB_CFLAGS="$PDB_CFLAGS "'${PLUGIN_CFLAGS}' 780PDB_LIBS="$PDB_LIBS "'${PLUGIN_LIBS}' 781 782if test "$enable_pdb_builtin" = "yes"; then 783 PDB_CFLAGS="$PDB_CFLAGS -DABI_PLUGIN_BUILTIN" 784fi 785 786fi 787 788AC_SUBST([PDB_CFLAGS]) 789AC_SUBST([PDB_LIBS]) 790 791 792collab_req="libgsf-1 >= 1.12 libxml-2.0 >= 2.4.0" 793collab_telepathy_req="dbus-glib-1 >= 0.70 telepathy-glib >= 0.14.5" 794if test "$TOOLKIT_IS_GTK2" = "yes"; then 795collab_xmpp_req="loudmouth-1.0 >= 1.3.2 gtk+-2.0" 796else 797collab_xmpp_req="loudmouth-1.0 >= 1.3.2 gtk+-3.0" 798fi 799collab_sugar_req="dbus-glib-1 >= 0.70" 800collab_service_req="libsoup-2.4 gnutls" 801collab_pkgs="$collab_req" # accumulate required packages 802 803AC_ARG_ENABLE([collab-backend-fake], 804 [AS_HELP_STRING([--enable-collab-backend-fake], [Fake backend for debugging purposes only (default: off)])], 805[ 806 enable_collab_backend_fake=$enableval 807], [ 808 enable_collab_backend_fake="no" 809]) 810AC_MSG_CHECKING([for collab fake backend]) 811AC_MSG_RESULT([$enable_collab_backend_fake]) 812 813 814AC_ARG_ENABLE([collab-backend-telepathy], 815 [AS_HELP_STRING([--enable-collab-backend-telepathy], [Telepathy backend (default: auto)])], 816[ 817 enable_collab_backend_telepathy=$enableval 818], [ 819 PKG_CHECK_EXISTS([ $collab_telepathy_req ], 820 [ 821 enable_collab_backend_telepathy="yes" 822 ], [ 823 enable_collab_backend_telepathy="no" 824 ]) 825]) 826test "$enable_collab_backend_telepathy" = "yes" && collab_pkgs="$collab_pkgs $collab_telepathy_req" 827AC_MSG_CHECKING([for collab telepathy backend]) 828AC_MSG_RESULT([$enable_collab_backend_telepathy]) 829 830AC_ARG_ENABLE([collab-backend-xmpp], 831 [AS_HELP_STRING([--enable-collab-backend-xmpp], [Jabber backend (default: auto)])], 832[ 833 enable_collab_backend_xmpp=$enableval 834], [ 835 PKG_CHECK_EXISTS([ $collab_xmpp_req ], 836 [ 837 enable_collab_backend_xmpp="yes" 838 ], [ 839 enable_collab_backend_xmpp="no" 840 ]) 841]) 842test "$enable_collab_backend_xmpp" = "yes" && collab_pkgs="$collab_pkgs $collab_xmpp_req" 843AC_MSG_CHECKING([for collab xmpp backend]) 844AC_MSG_RESULT([$enable_collab_backend_xmpp]) 845 846AC_ARG_ENABLE([collab-backend-tcp], 847 [AS_HELP_STRING([--enable-collab-backend-tcp], [TCP backend (default: auto)])], 848[ 849 enable_collab_backend_tcp=$enableval 850 if test "$enable_collab_backend_tcp" != "no"; then 851 AC_LANG_PUSH(C++) 852 AC_CHECK_HEADERS([asio.hpp], [], 853 [ 854 AC_MSG_ERROR([collab plugin: asio is required for the collab plugin TCP backend, see http://think-async.com/]) 855 ]) 856 AC_LANG_POP 857 fi 858], [ 859 AC_LANG_PUSH(C++) 860 AC_CHECK_HEADERS([asio.hpp], 861 [ 862 enable_collab_backend_tcp="yes" 863 ]) 864 AC_LANG_POP 865]) 866AC_MSG_CHECKING([for collab tcp backend]) 867AC_MSG_RESULT([$enable_collab_backend_tcp]) 868 869AC_ARG_ENABLE([collab-backend-sugar], 870 [AS_HELP_STRING([--enable-collab-backend-sugar], [Sugar/OLPC backend (default: auto)])], 871[ 872 enable_collab_backend_sugar=$enableval 873], [ 874 PKG_CHECK_EXISTS([ $collab_sugar_req ], 875 [ 876 enable_collab_backend_sugar="yes" 877 ], [ 878 enable_collab_backend_sugar="no" 879 ]) 880]) 881test "$enable_collab_backend_sugar" = "yes" && collab_pkgs="$collab_pkgs $collab_sugar_req" 882AC_MSG_CHECKING([for collab sugar backend]) 883AC_MSG_RESULT([$enable_collab_backend_sugar]) 884 885AC_ARG_ENABLE([collab-backend-service], 886 [AS_HELP_STRING([--enable-collab-backend-service], [abicollab.net backend (default: auto)])], 887[ 888 enable_collab_backend_service=$enableval 889 if test "$enable_collab_backend_service" != "no"; then 890 AC_LANG_PUSH(C++) 891 AC_CHECK_HEADERS([asio.hpp], [], 892 [ 893 AC_MSG_ERROR([collab plugin: asio is required for the the abicollab.net backend, see http://think-async.com/]) 894 ]) 895 AC_LANG_POP 896 fi 897], [ 898 AC_LANG_PUSH(C++) 899 AC_CHECK_HEADERS([asio.hpp], 900 [ 901 enable_collab_backend_service="yes" 902 ]) 903 AC_LANG_POP 904]) 905test "$enable_collab_backend_service" = "yes" && collab_pkgs="$collab_pkgs $collab_service_req" 906AC_MSG_CHECKING([for collab service backend]) 907AC_MSG_RESULT([$enable_collab_backend_service]) 908 909AC_ARG_ENABLE([collab-backend-sip], 910 [AS_HELP_STRING([--enable-collab-backend-sip], [Experimental SIP backend (default: off)])], 911[ 912 enable_collab_backend_sipsimple=$enableval 913], [ 914 enable_collab_backend_sipsimple="no" 915]) 916AC_MSG_CHECKING([for collab sip backend]) 917AC_MSG_RESULT([$enable_collab_backend_sipsimple]) 918 919AC_ARG_ENABLE([collab-record-always], 920 [AS_HELP_STRING([--enable-collab-record-always], [Always record AbiCollab sessions (default: off)])], 921[ 922 enable_collab_record_always=$enableval 923], [ 924 enable_collab_record_always="no" 925]) 926AC_MSG_CHECKING([for collab always recording backend]) 927AC_MSG_RESULT([$enable_collab_record_always]) 928 929collab_deps="no" 930 931if test "$enable_collab" != ""; then 932 933PKG_CHECK_EXISTS([ $collab_pkgs ], 934[ 935 collab_deps="yes" 936]) 937 938fi 939 940if test "$enable_collab" = "yes" || \ 941 test "$collab_deps" = "yes"; then 942 943if test "$enable_collab_builtin" = "yes"; then 944AC_MSG_ERROR([collab plugin: static linking not supported]) 945fi 946 947PKG_CHECK_MODULES(COLLAB,[ $collab_pkgs ]) 948 949if test "$enable_collab_backend_fake" = "yes"; then 950 COLLAB_CFLAGS="$COLLAB_CFLAGS -DABICOLLAB_HANDLER_FAKE" 951 COLLAB_RCFLAGS="$COLLAB_RCFLAGS -DABICOLLAB_HANDLER_FAKE" 952fi 953if test "$enable_collab_backend_telepathy" = "yes"; then 954 COLLAB_CFLAGS="$COLLAB_CFLAGS -DABICOLLAB_HANDLER_TELEPATHY" 955 COLLAB_RCFLAGS="$COLLAB_RCFLAGS -DABICOLLAB_HANDLER_TELEPATHY" 956fi 957if test "$enable_collab_backend_xmpp" = "yes"; then 958 COLLAB_CFLAGS="$COLLAB_CFLAGS -DABICOLLAB_HANDLER_XMPP" 959 COLLAB_RCFLAGS="$COLLAB_RCFLAGS -DABICOLLAB_HANDLER_XMPP" 960fi 961if test "$enable_collab_backend_tcp" = "yes"; then 962 COLLAB_CFLAGS="$COLLAB_CFLAGS -DABICOLLAB_HANDLER_TCP" 963 COLLAB_RCFLAGS="$COLLAB_RCFLAGS -DABICOLLAB_HANDLER_TCP" 964fi 965if test "$enable_collab_backend_sugar" = "yes"; then 966 COLLAB_CFLAGS="$COLLAB_CFLAGS -DABICOLLAB_HANDLER_SUGAR" 967 COLLAB_RCFLAGS="$COLLAB_RCFLAGS -DABICOLLAB_HANDLER_SUGAR" 968fi 969if test "$enable_collab_backend_service" = "yes"; then 970 COLLAB_CFLAGS="$COLLAB_CFLAGS -DABICOLLAB_HANDLER_SERVICE -DSOUP24 -DASIO_ENABLE_BOOST" 971 COLLAB_RCFLAGS="$COLLAB_RCFLAGS -DABICOLLAB_HANDLER_SERVICE" 972fi 973if test "$enable_collab_backend_sipsimple" = "yes"; then 974 COLLAB_CFLAGS="$COLLAB_CFLAGS -DABICOLLAB_HANDLER_SIPSIMPLE" 975 COLLAB_RCFLAGS="$COLLAB_RCFLAGS -DABICOLLAB_HANDLER_SIPSIMPLE" 976fi 977if test "$enable_collab_record_always" = "yes"; then 978 COLLAB_CFLAGS="$COLLAB_CFLAGS -DABICOLLAB_RECORD_ALWAYS" 979 COLLAB_RCFLAGS="$COLLAB_RCFLAGS -DABICOLLAB_RECORD_ALWAYS" 980fi 981 982if test "$enable_collab_backend_tcp" = "yes" || \ 983 test "$enable_collab_backend_service" = "yes"; then 984 COLLAB_LIBS="$COLLAB_LIBS -lgcrypt" 985 if test "$TOOLKIT" != "win"; then 986 COLLAB_LIBS="$COLLAB_LIBS -lpthread" 987 fi 988fi 989 990 991test "$enable_collab" = "auto" && PLUGINS="$PLUGINS collab" 992 993COLLAB_CFLAGS="$COLLAB_CFLAGS "'${PLUGIN_CFLAGS}' 994COLLAB_LIBS="$COLLAB_LIBS "'${PLUGIN_LIBS}' 995 996fi # plugin conditional 997 998AM_CONDITIONAL([COLLAB_BACKEND_FAKE], [test "$enable_collab_backend_fake" = "yes"]) 999AM_CONDITIONAL([COLLAB_BACKEND_TELEPATHY], [test "$enable_collab_backend_telepathy" = "yes"]) 1000AM_CONDITIONAL([COLLAB_BACKEND_XMPP], [test "$enable_collab_backend_xmpp" = "yes"]) 1001AM_CONDITIONAL([COLLAB_BACKEND_TCP], [test "$enable_collab_backend_tcp" = "yes"]) 1002AM_CONDITIONAL([COLLAB_BACKEND_SUGAR], [test "$enable_collab_backend_sugar" = "yes"]) 1003AM_CONDITIONAL([COLLAB_BACKEND_SERVICE], [test "$enable_collab_backend_service" = "yes"]) 1004AM_CONDITIONAL([COLLAB_BACKEND_SIPSIMPLE], [test "$enable_collab_backend_sipsimple" = "yes"]) 1005AM_CONDITIONAL([COLLAB_RECORD_ALWAYS], [test "$enable_collab_record_always" = "yes"]) 1006 1007AC_SUBST([COLLAB_CFLAGS]) 1008AC_SUBST([COLLAB_RCFLAGS]) 1009AC_SUBST([COLLAB_LIBS]) 1010 1011 1012pdf_pkgs="$gsf_req" 1013pdf_deps="no" 1014 1015PDF_CFLAGS= 1016PDF_LIBS= 1017 1018if test "$enable_pdf" != ""; then 1019 1020PKG_CHECK_EXISTS([ $pdf_pkgs ], 1021[ 1022 pdf_deps="yes" 1023], [ 1024 test "$enable_pdf" = "auto" && AC_MSG_WARN([pdf plugin: dependencies not satisfied - $pdf_pkgs]) 1025]) 1026 1027fi 1028 1029if test "$enable_pdf" = "yes" || \ 1030 test "$pdf_deps" = "yes"; then 1031 1032PKG_CHECK_MODULES(PDF,[ $pdf_pkgs ]) 1033 1034test "$enable_pdf" = "auto" && PLUGINS="$PLUGINS pdf" 1035 1036PDF_CFLAGS="$PDF_CFLAGS "'${PLUGIN_CFLAGS}' 1037PDF_LIBS="$PDF_LIBS "'${PLUGIN_LIBS}' 1038 1039if test "$enable_pdf_builtin" = "yes"; then 1040 PDF_CFLAGS="$PDF_CFLAGS -DABI_PLUGIN_BUILTIN" 1041fi 1042 1043fi 1044 1045AC_SUBST([PDF_CFLAGS]) 1046AC_SUBST([PDF_LIBS]) 1047 1048 1049WIKIPEDIA_CFLAGS= 1050WIKIPEDIA_LIBS= 1051 1052if test "$enable_wikipedia" != ""; then 1053 1054test "$enable_wikipedia" = "auto" && PLUGINS="$PLUGINS wikipedia" 1055 1056WIKIPEDIA_CFLAGS="$WIKIPEDIA_CFLAGS "'${PLUGIN_CFLAGS}' 1057WIKIPEDIA_LIBS="$WIKIPEDIA_LIBS "'${PLUGIN_LIBS}' 1058 1059if test "$enable_wikipedia_builtin" = "yes"; then 1060 WIKIPEDIA_CFLAGS="$WIKIPEDIA_CFLAGS -DABI_PLUGIN_BUILTIN" 1061fi 1062 1063fi 1064 1065AC_SUBST([WIKIPEDIA_CFLAGS]) 1066AC_SUBST([WIKIPEDIA_LIBS]) 1067 1068 1069garble_pkgs="libgsf-1 >= 1.12 libxml-2.0 >= 2.4.0" 1070garble_deps="no" 1071 1072if test "$enable_garble" != ""; then 1073 1074PKG_CHECK_EXISTS([ $garble_pkgs ], 1075[ 1076 garble_deps="yes" 1077], [ 1078 test "$enable_garble" = "auto" && AC_MSG_WARN([garble plugin: dependencies not satisfied - $garble_pkgs]) 1079]) 1080 1081fi 1082 1083if test "$enable_garble" = "yes" || \ 1084 test "$garble_deps" = "yes"; then 1085 1086AC_HEADER_TIME 1087 1088PKG_CHECK_MODULES(GARBLE,[ $garble_pkgs ]) 1089 1090test "$enable_garble" = "auto" && PLUGINS="$PLUGINS garble" 1091 1092GARBLE_CFLAGS="$GARBLE_CFLAGS $PNG_CFLAGS "'${PLUGIN_CFLAGS}' 1093GARBLE_LIBS="$GARBLE_LIBS $PNG_LIBS "'${PLUGIN_LIBS}' 1094 1095if test "$enable_garble_builtin" = "yes"; then 1096 GARBLE_CFLAGS="$GARBLE_CFLAGS -DABI_PLUGIN_BUILTIN" 1097fi 1098 1099fi 1100 1101AC_SUBST([GARBLE_CFLAGS]) 1102AC_SUBST([GARBLE_LIBS]) 1103 1104 1105mathview_pkgs='mathview-frontend-libxml2 >= 0.7.5' 1106mathview_deps="no" 1107 1108# test hashmap availablity 1109HASHMAP_CFLAGS="" 1110AC_LANG(C++) 1111AC_CHECK_HEADER(hash_map, 1112[ 1113 HASHMAP_CFLAGS="-DHAVE_HASH_MAP" 1114], [ 1115 AC_CHECK_HEADER(ext/hash_map, 1116 [ 1117 HASHMAP_CFLAGS="-DHAVE_EXT_HASH_MAP" 1118 ], [ 1119 AC_MSG_WARN([mathview plugin: dependencies not satisfied - missing 'hash_map' or 'ext/hash_map' header]) 1120 ]) 1121]) 1122AC_LANG(C) 1123 1124if test "$HASHMAP_CFLAGS" != ""; then 1125 1126if test "$enable_mathview" != ""; then 1127 1128PKG_CHECK_EXISTS([ $mathview_pkgs ], 1129[ 1130 mathview_deps="yes" 1131], [ 1132 test "$enable_mathview" = "auto" && AC_MSG_WARN([mathview plugin: dependencies not satisfied - $mathview_pkgs]) 1133]) 1134 1135fi 1136 1137if test "$enable_mathview" = "yes" || \ 1138 test "$mathview_deps" = "yes"; then 1139 1140if test "$enable_mathview_builtin" = "yes"; then 1141AC_MSG_ERROR([mathview plugin: static linking not supported]) 1142fi 1143 1144PKG_CHECK_MODULES(MATHVIEW,[ $mathview_pkgs ]) 1145 1146test "$enable_mathview" = "auto" && PLUGINS="$PLUGINS mathview" 1147 1148MATHVIEW_CFLAGS="$MATHVIEW_CFLAGS $HASHMAP_CFLAGS "'${PLUGIN_CFLAGS}' 1149MATHVIEW_LIBS="$MATHVIEW_LIBS "'${PLUGIN_LIBS}' 1150 1151fi 1152 1153fi 1154 1155# need to unconditionally test, for `make distcheck' 1156AM_PROG_LEX 1157AC_PROG_YACC 1158 1159AC_SUBST([MATHVIEW_CFLAGS]) 1160AC_SUBST([MATHVIEW_LIBS]) 1161 1162command_deps="no" 1163 1164if test "$enable_command" != ""; then 1165 if test "$TOOLKIT" != "gtk"; then 1166 command_deps="no" 1167 AC_MSG_WARN([command plugin: only supported on UNIX/gtk platforms]) 1168 else 1169 # stolen from the original plugin.m4 in abiword-plugins 1170 AC_CHECK_HEADER(readline/readline.h,[ 1171 AC_CHECK_HEADER(readline/history.h,[ 1172 AC_CHECK_LIB(readline,readline,[ 1173 command_deps="yes" 1174 ],[ AC_CHECK_LIB(readline,rl_initialize,[ 1175 command_deps="yes" 1176 1177 ],,) 1178 ],) 1179 ]) 1180 ]) 1181 fi 1182fi 1183 1184if test "$enable_command" = "yes" || \ 1185 test "$command_deps" = "yes"; then 1186 1187if test "$enable_command_builtin" = "yes"; then 1188AC_MSG_ERROR([command plugin: static linking not supported]) 1189fi 1190 1191AC_MSG_CHECKING([command plugin: for readline and friends]) 1192if test "$command_deps" != "yes"; then 1193 AC_MSG_ERROR([no]) 1194else 1195 AC_MSG_RESULT([yes]) 1196 COMMAND_LIBS="-lreadline -lhistory $COMMAND_LIBS" 1197fi 1198 1199test "$enable_command" = "auto" && PLUGINS="$PLUGINS command" 1200 1201COMMAND_CFLAGS="$COMMAND_CFLAGS "'${PLUGIN_CFLAGS}' 1202COMMAND_LIBS="$COMMAND_LIBS "'${PLUGIN_LIBS}' 1203 1204fi 1205 1206AC_SUBST([COMMAND_CFLAGS]) 1207AC_SUBST([COMMAND_LIBS]) 1208 1209 1210AC_ARG_WITH([psiconv-config], 1211 [AS_HELP_STRING([--with-psiconv-config=DIR], [use psiconv-config in DIR])], 1212[ 1213 AC_PATH_PROG(psiconvconfig, psiconv-config, , "$withval") 1214], [ 1215 AC_PATH_PROG(psiconvconfig, psiconv-config) 1216]) 1217 1218# The required psiconv version, as reported by psiconv-config 1219psiconv_major_req=0 1220psiconv_minor_req=9 1221psiconv_micro_req=4 1222psion_deps="no" 1223 1224if test "$enable_psion" != ""; then 1225 1226 if test "$psiconvconfig" = ""; then 1227 if test "$enable_psion" = "yes"; then 1228 AC_MSG_ERROR([psiconv plugin: program psiconv-config not found in path]) 1229 else 1230 AC_MSG_WARN([psiconv plugin: program psiconv-config not found in path]) 1231 fi 1232 else 1233 IFS_old="$IFS" 1234 IFS='.' 1235 set -- `$psiconvconfig --version` 1236 psiconv_major_found="${1}" 1237 psiconv_minor_found="${2}" 1238 psiconv_micro_found="${3}" 1239 IFS="$IFS_old" 1240 if test "$psiconv_major_found" -gt "$psiconv_major_req"; then 1241 psion_deps="yes" 1242 elif test "$psiconv_major_found" -eq "$psiconv_major_req" && 1243 test "$psiconv_minor_found" -gt "$psiconv_minor_req"; then 1244 psion_deps="yes" 1245 elif test "$psiconv_major_found" -eq "$psiconv_major_req" && 1246 test "$psiconv_minor_found" -eq "$psiconv_minor_req" && 1247 test "$psiconv_micro_found" -ge "$psiconv_micro_req"; then 1248 psion_deps="yes" 1249 fi 1250 fi 1251fi 1252 1253if test "$enable_psion" = "yes" || \ 1254 test "$psion_deps" = "yes"; then 1255 1256if test "$enable_psion_builtin" = "yes"; then 1257AC_MSG_ERROR([psion plugin: static linking not supported]) 1258fi 1259 1260AC_MSG_CHECKING([for psiconv >= ${psiconv_major_req}.${psiconv_minor_req}.${psiconv_micro_req}]) 1261if test "$psion_deps" = "yes"; then 1262 AC_MSG_RESULT([version ${psiconv_major_found}.${psiconv_minor_found}.${psiconv_micro_found} (ok)]) 1263 PSION_CFLAGS=`$psiconvconfig --cflags` 1264 PSION_LIBS=`$psiconvconfig --libs` 1265else 1266 AC_MSG_ERROR([version ${psiconv_major_found}.${psiconv_minor_found}.${psiconv_micro_found} (too old!)]) 1267fi 1268 1269test "$enable_psion" = "auto" && PLUGINS="$PLUGINS psion" 1270 1271PSION_CFLAGS="$PSION_CFLAGS $PNG_CFLAGS "'${PLUGIN_CFLAGS}' 1272PSION_LIBS="$PSION_LIBS $PNG_LIBS -lgsf-1 "'${PLUGIN_LIBS}' 1273 1274fi 1275 1276AC_SUBST([PSION_CFLAGS]) 1277AC_SUBST([PSION_LIBS]) 1278 1279 1280GIMP_CFLAGS= 1281GIMP_LIBS= 1282 1283if test "$enable_gimp" != ""; then 1284 1285test "$enable_gimp" = "auto" && PLUGINS="$PLUGINS gimp" 1286 1287GIMP_CFLAGS="$GIMP_CFLAGS "'${PLUGIN_CFLAGS}' 1288GIMP_LIBS="$GIMP_LIBS "'${PLUGIN_LIBS}' 1289 1290if test "$enable_gimp_builtin" = "yes"; then 1291 GIMP_CFLAGS="$GIMP_CFLAGS -DABI_PLUGIN_BUILTIN" 1292fi 1293 1294fi 1295 1296AC_SUBST([GIMP_CFLAGS]) 1297AC_SUBST([GIMP_LIBS]) 1298 1299 1300aiksaurus_pkgs="aiksaurus-1.0" 1301aiksaurus_gtk_pkgs="aiksaurusgtk3-1.0" 1302aiksaurus_deps="no" 1303 1304if test "$enable_aiksaurus" != ""; then 1305 1306PKG_CHECK_EXISTS([ $aiksaurus_pkgs ], 1307[ 1308 aiksaurus_deps="yes" 1309], [ 1310 test "$enable_aiksaurus" = "auto" && AC_MSG_WARN([aiksaurus plugin: dependencies not satisfied - $aiksaurus_pkgs]) 1311]) 1312 1313fi 1314 1315if test "$enable_aiksaurus" = "yes" || \ 1316 test "$aiksaurus_deps" = "yes"; then 1317 1318use_builtin_aiksaurus_gtk="no" 1319if test "$TOOLKIT" = "gtk"; then 1320PKG_CHECK_EXISTS([ $aiksaurus_gtk_pkgs ], 1321[ 1322 aiksaurus_pkgs="$aiksaurus_pkgs $aiksaurus_gtk_pkgs" 1323], [use_builtin_aiksaurus_gtk="yes"]) 1324fi 1325 1326if test "$enable_aiksaurus_builtin" = "yes"; then 1327AC_MSG_ERROR([aiksaurus plugin: static linking not supported]) 1328fi 1329 1330PKG_CHECK_MODULES(AIKSAURUS,[ $aiksaurus_pkgs ]) 1331 1332 1333test "$enable_aiksaurus" = "auto" && PLUGINS="$PLUGINS aiksaurus" 1334 1335AIKSAURUS_CFLAGS="$AIKSAURUS_CFLAGS "'${PLUGIN_CFLAGS}' 1336AIKSAURUS_LIBS="$AIKSAURUS_LIBS "'${PLUGIN_LIBS}' 1337 1338fi 1339 1340AM_CONDITIONAL([WITH_BUILTIN_AIKSAURUS_GTK],[ test "x$use_builtin_aiksaurus_gtk" = "xyes" ]) 1341 1342AC_SUBST([AIKSAURUS_CFLAGS]) 1343AC_SUBST([AIKSAURUS_LIBS]) 1344 1345 1346URLDICT_CFLAGS= 1347URLDICT_LIBS= 1348 1349if test "$enable_urldict" != ""; then 1350 1351test "$enable_urldict" = "auto" && PLUGINS="$PLUGINS urldict" 1352 1353URLDICT_CFLAGS="$URLDICT_CFLAGS "'${PLUGIN_CFLAGS}' 1354URLDICT_LIBS="$URLDICT_LIBS "'${PLUGIN_LIBS}' 1355 1356if test "$enable_urldict_builtin" = "yes"; then 1357 URLDICT_CFLAGS="$URLDICT_CFLAGS -DABI_PLUGIN_BUILTIN" 1358fi 1359 1360fi 1361 1362AC_SUBST([URLDICT_CFLAGS]) 1363AC_SUBST([URLDICT_LIBS]) 1364 1365 1366wml_pkgs="$gsf_req" 1367wml_deps="no" 1368 1369if test "$enable_wml" != ""; then 1370 1371PKG_CHECK_EXISTS([ $wml_pkgs ], 1372[ 1373 wml_deps="yes" 1374], [ 1375 test "$enable_wml" = "auto" && AC_MSG_WARN([wml plugin: dependencies not satisfied - $wml_pkgs]) 1376]) 1377 1378fi 1379 1380if test "$enable_wml" = "yes" || \ 1381 test "$wml_deps" = "yes"; then 1382 1383PKG_CHECK_MODULES(WML,[ $wml_pkgs ]) 1384 1385test "$enable_wml" = "auto" && PLUGINS="$PLUGINS wml" 1386 1387WML_CFLAGS="$WML_CFLAGS "'${PLUGIN_CFLAGS}' 1388WML_LIBS="$WML_LIBS "'${PLUGIN_LIBS}' 1389 1390if test "$enable_wml_builtin" = "yes"; then 1391 WML_CFLAGS="$WML_CFLAGS -DABI_PLUGIN_BUILTIN" 1392fi 1393 1394fi 1395 1396AC_SUBST([WML_CFLAGS]) 1397AC_SUBST([WML_LIBS]) 1398 1399 1400AC_ARG_WITH([libwmf-config], 1401 [AS_HELP_STRING([--with-libwmf-config=DIR], [use libwmf-config in DIR])], 1402[ 1403 AC_PATH_PROG(libwmfconfig, libwmf-config, , "$withval") 1404], [ 1405 AC_PATH_PROG(libwmfconfig, libwmf-config) 1406]) 1407 1408# The required libwmf version, as reported by libwmf-config 1409libwmf_major_req=0 1410libwmf_minor_req=2 1411libwmf_micro_req=8 1412wmf_deps="no" 1413 1414if test "$enable_wmf" != ""; then 1415 1416 if test "$libwmfconfig" = ""; then 1417 if test "$enable_wmf" = "yes"; then 1418 AC_MSG_ERROR([wmf plugin: program libwmf-config not found in path]) 1419 else 1420 AC_MSG_WARN([wmf plugin: program libwmf-config not found in path]) 1421 fi 1422 else 1423 IFS_old="$IFS" 1424 IFS='.' 1425 set -- `$libwmfconfig --version` 1426 libwmf_major_found="${1}" 1427 libwmf_minor_found="${2}" 1428 libwmf_micro_found="${3}" 1429 IFS="$IFS_old" 1430 if test "$libwmf_major_found" -gt "$libwmf_major_req"; then 1431 wmf_deps="yes" 1432 elif test "$libwmf_major_found" -eq "$libwmf_major_req" && 1433 test "$libwmf_minor_found" -gt "$libwmf_minor_req"; then 1434 wmf_deps="yes" 1435 elif test "$libwmf_major_found" -eq "$libwmf_major_req" && 1436 test "$libwmf_minor_found" -eq "$libwmf_minor_req" && 1437 test "$libwmf_micro_found" -ge "$libwmf_micro_req"; then 1438 wmf_deps="yes" 1439 fi 1440 fi 1441fi 1442 1443if test "$enable_wmf" = "yes" || \ 1444 test "$wmf_deps" = "yes"; then 1445 1446if test "$enable_wmf_builtin" = "yes"; then 1447AC_MSG_ERROR([wmf plugin: static linking not supported]) 1448fi 1449 1450AC_MSG_CHECKING([for libwmf >= ${libwmf_major_req}.${libwmf_minor_req}.${libwmf_micro_req}]) 1451if test "$wmf_deps" = "yes"; then 1452 AC_MSG_RESULT([version ${libwmf_major_found}.${libwmf_minor_found}.${libwmf_micro_found} (ok)]) 1453 WMF_CFLAGS=`$libwmfconfig --cflags` 1454 WMF_LIBS=`$libwmfconfig --libs` 1455else 1456 AC_MSG_ERROR([version ${libwmf_major_found}.${libwmf_minor_found}.${libwmf_micro_found} (too old!)]) 1457fi 1458 1459test "$enable_wmf" = "auto" && PLUGINS="$PLUGINS wmf" 1460 1461WMF_CFLAGS="$WMF_CFLAGS "'${PLUGIN_CFLAGS}' 1462WMF_LIBS="$WMF_LIBS "'${PLUGIN_LIBS}' 1463 1464fi 1465 1466AC_SUBST([WMF_CFLAGS]) 1467AC_SUBST([WMF_LIBS]) 1468 1469 1470sdw_pkgs="$gsf_req" 1471sdw_deps="no" 1472 1473if test "$enable_sdw" != ""; then 1474 1475PKG_CHECK_EXISTS([ $sdw_pkgs ], 1476[ 1477 sdw_deps="yes" 1478], [ 1479 test "$enable_sdw" = "auto" && AC_MSG_WARN([sdw plugin: dependencies not satisfied - $sdw_pkgs]) 1480]) 1481 1482fi 1483 1484if test "$enable_sdw" = "yes" || \ 1485 test "$sdw_deps" = "yes"; then 1486 1487PKG_CHECK_MODULES(SDW,[ $sdw_pkgs ]) 1488 1489test "$enable_sdw" = "auto" && PLUGINS="$PLUGINS sdw" 1490 1491SDW_CFLAGS="$SDW_CFLAGS "'${PLUGIN_CFLAGS}' 1492SDW_LIBS="$SDW_LIBS "'${PLUGIN_LIBS}' 1493 1494if test "$enable_sdw_builtin" = "yes"; then 1495 SDW_CFLAGS="$SDW_CFLAGS -DABI_PLUGIN_BUILTIN" 1496fi 1497 1498fi 1499 1500AC_SUBST([SDW_CFLAGS]) 1501AC_SUBST([SDW_LIBS]) 1502 1503 1504mswrite_pkgs="$gsf_req" 1505mswrite_deps="no" 1506 1507if test "$enable_mswrite" != ""; then 1508 1509PKG_CHECK_EXISTS([ $mswrite_pkgs ], 1510[ 1511 mswrite_deps="yes" 1512], [ 1513 test "$enable_mswrite" = "auto" && AC_MSG_WARN([mswrite plugin: dependencies not satisfied - $mswrite_pkgs]) 1514]) 1515 1516fi 1517 1518if test "$enable_mswrite" = "yes" || \ 1519 test "$mswrite_deps" = "yes"; then 1520 1521PKG_CHECK_MODULES(MSWRITE,[ $mswrite_pkgs ]) 1522 1523test "$enable_mswrite" = "auto" && PLUGINS="$PLUGINS mswrite" 1524 1525MSWRITE_CFLAGS="$MSWRITE_CFLAGS "'${PLUGIN_CFLAGS}' 1526MSWRITE_LIBS="$MSWRITE_LIBS "'${PLUGIN_LIBS}' 1527 1528if test "$enable_mswrite_builtin" = "yes"; then 1529 MSWRITE_CFLAGS="$MSWRITE_CFLAGS -DABI_PLUGIN_BUILTIN" 1530fi 1531 1532fi 1533 1534AC_SUBST([MSWRITE_CFLAGS]) 1535AC_SUBST([MSWRITE_LIBS]) 1536 1537 1538loadbindings_pkgs="$gsf_req" 1539loadbindings_deps="no" 1540 1541if test "$enable_loadbindings" != ""; then 1542 1543PKG_CHECK_EXISTS([ $loadbindings_pkgs ], 1544[ 1545 loadbindings_deps="yes" 1546], [ 1547 test "$enable_loadbindings" = "auto" && AC_MSG_WARN([loadbindings plugin: dependencies not satisfied - $loadbindings_pkgs]) 1548]) 1549 1550fi 1551 1552if test "$enable_loadbindings" = "yes" || \ 1553 test "$loadbindings_deps" = "yes"; then 1554 1555PKG_CHECK_MODULES(LOADBINDINGS,[ $loadbindings_pkgs ]) 1556 1557test "$enable_loadbindings" = "auto" && PLUGINS="$PLUGINS loadbindings" 1558 1559LOADBINDINGS_CFLAGS="$LOADBINDINGS_CFLAGS "'${PLUGIN_CFLAGS}' 1560LOADBINDINGS_LIBS="$LOADBINDINGS_LIBS "'${PLUGIN_LIBS}' 1561 1562if test "$enable_loadbindings_builtin" = "yes"; then 1563 LOADBINDINGS_CFLAGS="$LOADBINDINGS_CFLAGS -DABI_PLUGIN_BUILTIN" 1564fi 1565 1566fi 1567 1568AC_SUBST([LOADBINDINGS_CFLAGS]) 1569AC_SUBST([LOADBINDINGS_LIBS]) 1570 1571 1572ots_pkgs="libots-1 >= 0.5.0" 1573ots_deps="no" 1574 1575if test "$enable_ots" != ""; then 1576 1577PKG_CHECK_EXISTS([ $ots_pkgs ], 1578[ 1579 ots_deps="yes" 1580], [ 1581 test "$enable_ots" = "auto" && AC_MSG_WARN([ots plugin: dependencies not satisfied - $ots_pkgs]) 1582]) 1583 1584fi 1585 1586if test "$enable_ots" = "yes" || \ 1587 test "$ots_deps" = "yes"; then 1588 1589test "$enable_ots" = "auto" && PLUGINS="$PLUGINS ots" 1590 1591if test "$enable_ots_builtin" = "yes"; then 1592AC_MSG_ERROR([ots plugin: static linking not supported]) 1593fi 1594 1595PKG_CHECK_MODULES(OTS,[ $ots_pkgs ]) 1596 1597OTS_CFLAGS="$OTS_CFLAGS "'${PLUGIN_CFLAGS}' 1598OTS_LIBS="$OTS_LIBS "'${PLUGIN_LIBS}' 1599 1600fi 1601 1602AC_SUBST([OTS_CFLAGS]) 1603AC_SUBST([OTS_LIBS]) 1604 1605 1606PRESENTATION_CFLAGS= 1607PRESENTATION_LIBS= 1608 1609if test "$enable_presentation" != ""; then 1610 1611test "$enable_presentation" = "auto" && PLUGINS="$PLUGINS presentation" 1612 1613PRESENTATION_CFLAGS="$PRESENTATION_CFLAGS "'${PLUGIN_CFLAGS}' 1614PRESENTATION_LIBS="$PRESENTATION_LIBS "'${PLUGIN_LIBS}' 1615 1616if test "$enable_presentation_builtin" = "yes"; then 1617 PRESENTATION_CFLAGS="$PRESENTATION_CFLAGS -DABI_PLUGIN_BUILTIN" 1618fi 1619 1620fi 1621 1622AC_SUBST([PRESENTATION_CFLAGS]) 1623AC_SUBST([PRESENTATION_LIBS]) 1624 1625 1626PAINT_CFLAGS= 1627PAINT_LIBS= 1628 1629if test "$enable_paint" != ""; then 1630 1631test "$enable_paint" = "auto" && PLUGINS="$PLUGINS paint" 1632 1633# TODO check for libpng 1634if test "$TOOLKIT" = "win"; then 1635 PAINT_LIBS="-lgdi32 $PNG_LIBS" 1636 PAINT_CFLAGS="$PAINT_CFLAGS $PNG_CFLAGS" 1637fi 1638 1639PAINT_CFLAGS="$PAINT_CFLAGS "'${PLUGIN_CFLAGS}' 1640PAINT_LIBS="$PAINT_LIBS "'${PLUGIN_LIBS}' 1641 1642if test "$enable_paint_builtin" = "yes"; then 1643 PAINT_CFLAGS="$PAINT_CFLAGS -DABI_PLUGIN_BUILTIN" 1644fi 1645 1646fi 1647 1648AC_SUBST([PAINT_CFLAGS]) 1649AC_SUBST([PAINT_LIBS]) 1650 1651 1652hancom_pkgs="$gsf_req" 1653hancom_deps="no" 1654 1655if test "$enable_hancom" != ""; then 1656 1657PKG_CHECK_EXISTS([ $hancom_pkgs ], 1658[ 1659 hancom_deps="yes" 1660], [ 1661 test "$enable_hancom" = "auto" && AC_MSG_WARN([hancom plugin: dependencies not satisfied - $hancom_pkgs]) 1662]) 1663 1664fi 1665 1666if test "$enable_hancom" = "yes" || \ 1667 test "$hancom_deps" = "yes"; then 1668 1669PKG_CHECK_MODULES(HANCOM,[ $hancom_pkgs ]) 1670 1671test "$enable_hancom" = "auto" && PLUGINS="$PLUGINS hancom" 1672 1673HANCOM_CFLAGS="$HANCOM_CFLAGS "'${PLUGIN_CFLAGS}' 1674HANCOM_LIBS="$HANCOM_LIBS "'${PLUGIN_LIBS}' 1675 1676if test "$enable_hancom_builtin" = "yes"; then 1677 HANCOM_CFLAGS="$HANCOM_CFLAGS -DABI_PLUGIN_BUILTIN" 1678fi 1679 1680fi 1681 1682AC_SUBST([HANCOM_CFLAGS]) 1683AC_SUBST([HANCOM_LIBS]) 1684 1685 1686PASSEPARTOUT_CFLAGS= 1687PASSEPARTOUT_LIBS= 1688 1689if test "$enable_passepartout" != ""; then 1690 1691test "$enable_passepartout" = "auto" && PLUGINS="$PLUGINS passepartout" 1692 1693PASSEPARTOUT_CFLAGS="$PASSEPARTOUT_CFLAGS "'${PLUGIN_CFLAGS}' 1694PASSEPARTOUT_LIBS="$PASSEPARTOUT_LIBS "'${PLUGIN_LIBS}' 1695 1696if test "$enable_passepartout_builtin" = "yes"; then 1697 PASSEPARTOUT_CFLAGS="$PASSEPARTOUT_CFLAGS -DABI_PLUGIN_BUILTIN" 1698fi 1699 1700fi 1701 1702AC_SUBST([PASSEPARTOUT_CFLAGS]) 1703AC_SUBST([PASSEPARTOUT_LIBS]) 1704 1705 1706xslfo_pkgs="$gsf_req" 1707xslfo_deps="no" 1708 1709if test "$enable_xslfo" != ""; then 1710 1711PKG_CHECK_EXISTS([ $xslfo_pkgs ], 1712[ 1713 xslfo_deps="yes" 1714], [ 1715 test "$enable_xslfo" = "auto" && AC_MSG_WARN([xslfo plugin: dependencies not satisfied - $xslfo_pkgs]) 1716]) 1717 1718fi 1719 1720if test "$enable_xslfo" = "yes" || \ 1721 test "$xslfo_deps" = "yes"; then 1722 1723PKG_CHECK_MODULES(XSLFO,[ $xslfo_pkgs ]) 1724 1725test "$enable_xslfo" = "auto" && PLUGINS="$PLUGINS xslfo" 1726 1727XSLFO_CFLAGS="$XSLFO_CFLAGS "'${PLUGIN_CFLAGS}' 1728XSLFO_LIBS="$XSLFO_LIBS "'${PLUGIN_LIBS}' 1729 1730if test "$enable_xslfo_builtin" = "yes"; then 1731 XSLFO_CFLAGS="$XSLFO_CFLAGS -DABI_PLUGIN_BUILTIN" 1732fi 1733 1734fi 1735 1736AC_SUBST([XSLFO_CFLAGS]) 1737AC_SUBST([XSLFO_LIBS]) 1738 1739 1740MIF_CFLAGS= 1741MIF_LIBS= 1742 1743if test "$enable_mif" != ""; then 1744 1745test "$enable_mif" = "auto" && PLUGINS="$PLUGINS mif" 1746 1747MIF_CFLAGS="$MIF_CFLAGS "'${PLUGIN_CFLAGS}' 1748MIF_LIBS="$MIF_LIBS "'${PLUGIN_LIBS}' 1749 1750if test "$enable_mif_builtin" = "yes"; then 1751 MIF_CFLAGS="$MIF_CFLAGS -DABI_PLUGIN_BUILTIN" 1752fi 1753 1754fi 1755 1756AC_SUBST([MIF_CFLAGS]) 1757AC_SUBST([MIF_LIBS]) 1758 1759 1760S5_CFLAGS= 1761S5_LIBS= 1762 1763if test "$enable_s5" != ""; then 1764 1765test "$enable_s5" = "auto" && PLUGINS="$PLUGINS s5" 1766 1767S5_CFLAGS="$S5_CFLAGS "'${PLUGIN_CFLAGS}' 1768S5_LIBS="$S5_LIBS "'${PLUGIN_LIBS}' 1769 1770if test "$enable_s5_builtin" = "yes"; then 1771 S5_CFLAGS="$S5_CFLAGS -DABI_PLUGIN_BUILTIN" 1772fi 1773 1774fi 1775 1776AC_SUBST([S5_CFLAGS]) 1777AC_SUBST([S5_LIBS]) 1778 1779 1780FREETRANSLATION_CFLAGS= 1781FREETRANSLATION_LIBS= 1782 1783if test "$enable_freetranslation" != ""; then 1784 1785test "$enable_freetranslation" = "auto" && PLUGINS="$PLUGINS freetranslation" 1786 1787FREETRANSLATION_CFLAGS="$FREETRANSLATION_CFLAGS "'${PLUGIN_CFLAGS}' 1788FREETRANSLATION_LIBS="$FREETRANSLATION_LIBS "'${PLUGIN_LIBS}' 1789 1790if test "$enable_freetranslation_builtin" = "yes"; then 1791 FREETRANSLATION_CFLAGS="$FREETRANSLATION_CFLAGS -DABI_PLUGIN_BUILTIN" 1792fi 1793 1794fi 1795 1796AC_SUBST([FREETRANSLATION_CFLAGS]) 1797AC_SUBST([FREETRANSLATION_LIBS]) 1798 1799 1800wordperfect_pkgs="libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0 $gsf_req" 1801wordperfect_wps_pkgs='libwps-0.2 >= 0.1.0' 1802wordperfect_deps="no" 1803 1804WORDPERFECT_CFLAGS= 1805WORDPERFECT_LIBS= 1806WPS_DEFINE= 1807 1808if test "$enable_wordperfect" != ""; then 1809 1810PKG_CHECK_EXISTS([ $wordperfect_pkgs ], 1811[ 1812 wordperfect_deps="yes" 1813], [ 1814 test "$enable_wordperfect" = "auto" && AC_MSG_WARN([wordperfect plugin: dependencies not satisfied - $wordperfect_pkgs]) 1815]) 1816 1817fi 1818 1819if test "$enable_wordperfect" = "yes" || \ 1820 test "$wordperfect_deps" = "yes"; then 1821 1822if test "$enable_wordperfect_builtin" = "yes"; then 1823AC_MSG_ERROR([wordperfect plugin: static linking not supported]) 1824fi 1825 1826wp_deps_pkgs="$wordperfect_pkgs" 1827 1828PKG_CHECK_EXISTS([ $wordperfect_wps_pkgs ], 1829[ 1830 wp_deps_pkgs="$wp_deps_pkgs $wordperfect_wps_pkgs" 1831 WPS_DEFINE=" -DHAVE_LIBWPS" 1832]) 1833 1834PKG_CHECK_MODULES(WORDPERFECT,[ $wp_deps_pkgs ]) 1835 1836test "$enable_wordperfect" = "auto" && PLUGINS="$PLUGINS wordperfect" 1837 1838WORDPERFECT_CFLAGS="$WORDPERFECT_CFLAGS "'${PLUGIN_CFLAGS}'"$WPS_DEFINE" 1839WORDPERFECT_LIBS="$WORDPERFECT_LIBS "'${PLUGIN_LIBS}' 1840 1841fi 1842 1843AC_SUBST([WORDPERFECT_CFLAGS]) 1844AC_SUBST([WORDPERFECT_LIBS]) 1845 1846 1847docbook_pkgs="$gsf_req" 1848docbook_deps="no" 1849 1850if test "$enable_docbook" != ""; then 1851 1852PKG_CHECK_EXISTS([ $docbook_pkgs ], 1853[ 1854 docbook_deps="yes" 1855], [ 1856 test "$enable_docbook" = "auto" && AC_MSG_WARN([docbook plugin: dependencies not satisfied - $docbook_pkgs]) 1857]) 1858 1859fi 1860 1861if test "$enable_docbook" = "yes" || \ 1862 test "$docbook_deps" = "yes"; then 1863 1864AC_HEADER_TIME 1865 1866PKG_CHECK_MODULES(DOCBOOK,[ $docbook_pkgs ]) 1867 1868test "$enable_docbook" = "auto" && PLUGINS="$PLUGINS docbook" 1869 1870DOCBOOK_CFLAGS="$DOCBOOK_CFLAGS "'${PLUGIN_CFLAGS}' 1871DOCBOOK_LIBS="$DOCBOOK_LIBS "'${PLUGIN_LIBS}' 1872 1873if test "$enable_docbook_builtin" = "yes"; then 1874 DOCBOOK_CFLAGS="$DOCBOOK_CFLAGS -DABI_PLUGIN_BUILTIN" 1875fi 1876 1877fi 1878 1879AC_SUBST([DOCBOOK_CFLAGS]) 1880AC_SUBST([DOCBOOK_LIBS]) 1881 1882 1883OPML_CFLAGS= 1884OPML_LIBS= 1885 1886if test "$enable_opml" != ""; then 1887 1888test "$enable_opml" = "auto" && PLUGINS="$PLUGINS opml" 1889 1890OPML_CFLAGS="$OPML_CFLAGS "'${PLUGIN_CFLAGS}' 1891OPML_LIBS="$OPML_LIBS "'${PLUGIN_LIBS}' 1892 1893if test "$enable_opml_builtin" = "yes"; then 1894 OPML_CFLAGS="$OPML_CFLAGS -DABI_PLUGIN_BUILTIN" 1895fi 1896 1897fi 1898 1899AC_SUBST([OPML_CFLAGS]) 1900AC_SUBST([OPML_LIBS]) 1901 1902 1903BABELFISH_CFLAGS= 1904BABELFISH_LIBS= 1905 1906if test "$enable_babelfish" != ""; then 1907 1908test "$enable_babelfish" = "auto" && PLUGINS="$PLUGINS babelfish" 1909 1910BABELFISH_CFLAGS="$BABELFISH_CFLAGS "'${PLUGIN_CFLAGS}' 1911BABELFISH_LIBS="$BABELFISH_LIBS "'${PLUGIN_LIBS}' 1912 1913if test "$enable_babelfish_builtin" = "yes"; then 1914 BABELFISH_CFLAGS="$BABELFISH_CFLAGS -DABI_PLUGIN_BUILTIN" 1915fi 1916 1917fi 1918 1919AC_SUBST([BABELFISH_CFLAGS]) 1920AC_SUBST([BABELFISH_LIBS]) 1921 1922 1923kword_pkgs="$gsf_req" 1924kword_deps="no" 1925 1926if test "$enable_kword" != ""; then 1927 1928PKG_CHECK_EXISTS([ $kword_pkgs ], 1929[ 1930 kword_deps="yes" 1931], [ 1932 test "$enable_kword" = "auto" && AC_MSG_WARN([kword plugin: dependencies not satisfied - $kword_pkgs]) 1933]) 1934 1935fi 1936 1937if test "$enable_kword" = "yes" || \ 1938 test "$kword_deps" = "yes"; then 1939 1940PKG_CHECK_MODULES(KWORD,[ $kword_pkgs ]) 1941 1942test "$enable_kword" = "auto" && PLUGINS="$PLUGINS kword" 1943 1944KWORD_CFLAGS="$KWORD_CFLAGS "'${PLUGIN_CFLAGS}' 1945KWORD_LIBS="$KWORD_LIBS "'${PLUGIN_LIBS}' 1946 1947if test "$enable_kword_builtin" != ""; then 1948 KWORD_CFLAGS="$KWORD_CFLAGS -DABI_PLUGIN_BUILTIN" 1949fi 1950 1951fi 1952 1953AC_SUBST([KWORD_CFLAGS]) 1954AC_SUBST([KWORD_LIBS]) 1955 1956