1 dnl -*- Mode: Autoconf; tab-width: 8; indent-tabs-mode: nil -*-
2 dnl configure.in serves as input for the GNU autoconf package
3 dnl in order to create a configure script.
5 AC_INIT([LibreOffice],[3.5],[],[],[http://documentfoundation.org/])
8 ###############################################################################
9 # Extensions switches --enable/--disable
10 ###############################################################################
11 # By default these should be enabled unless having extra dependencies.
12 # If there is extra dependency over configure options then the enable should
13 # be automagic based on wether the requiring feature is enabled or not.
14 # All this options change anything only with --enable-extension-integration.
15 AC_ARG_ENABLE(extension-integration,
16 AS_HELP_STRING([--disable-extension-integration],
17 [Disable integration of the builded extensions to the installer of the
18 product. Use this switch to disable the integration.])
21 AC_ARG_ENABLE(ext-barcode,
22 AS_HELP_STRING([--enable-ext-barcode],
23 [Enable the Barcode extension.])
26 AC_ARG_ENABLE(ext-diagram,
27 AS_HELP_STRING([--enable-ext-diagram],
28 [Enable the SmART Gallery (Diagram) extension.])
31 AC_ARG_ENABLE(ext-google-docs,
32 AS_HELP_STRING([--enable-ext-google-docs],
33 [Enable the Google Documents extension.])
36 AC_ARG_ENABLE(ext-hunart,
37 AS_HELP_STRING([--enable-ext-hunart],
38 [Enable the Hungarian Cross-reference Toolbar extension.])
41 AC_ARG_ENABLE(ext-languagetool,
42 AS_HELP_STRING([--enable-ext-languagetool],
43 [Enable the LanguageTool extension.])
46 AC_ARG_ENABLE(ext-lightproof,
47 AS_HELP_STRING([--enable-ext-lightproof],
48 [Enable the Lightproof extension. The enable switch can contain only
49 the desired languages: --enable-lightproof="en hu ru"]),
50 [enable_ext_lightproof="$enableval"],
51 [enable_ext_lightproof=no]
54 AC_ARG_ENABLE(ext-mysql-connector,
55 AS_HELP_STRING([--enable-ext-mysql-connector],
56 [Enable the build of the MySQL Connector extension.])
59 AC_ARG_ENABLE(ext-nlpsolver,
60 AS_HELP_STRING([--enable-ext-nlpsolver],
61 [Enable the NLPSolver extension.])
64 AC_ARG_ENABLE(ext-ct2n,
65 AS_HELP_STRING([--enable-ext-ct2n],
66 [Enable the ConvertTextToNumber extension.])
69 AC_ARG_ENABLE(ext-numbertext,
70 AS_HELP_STRING([--enable-ext-numbertext],
71 [Enable the Numbertext extension.])
74 AC_ARG_ENABLE(ext-oooblogger,
75 AS_HELP_STRING([--enable-ext-oooblogger],
76 [Enable the OOo Blogger extension.])
79 AC_ARG_ENABLE(ext-pdfimport,
80 AS_HELP_STRING([--disable-ext-pdfimport],
81 [Disable the PDF Import extension.])
84 AC_ARG_ENABLE(ext-presenter-console,
85 AS_HELP_STRING([--disable-ext-presenter-console],
86 [Disable the Presenter Console extension.])
89 AC_ARG_ENABLE(ext-presenter-minimizer,
90 AS_HELP_STRING([--disable-ext-presenter-minimizer],
91 [Disable the Presentation Minimizer extension.])
94 AC_ARG_ENABLE(ext-report-builder,
95 AS_HELP_STRING([--disable-ext-report-builder],
96 [Disable the Report Builder extension.])
99 AC_ARG_ENABLE(ext-scripting-beanshell,
100 AS_HELP_STRING([--enable-ext-scripting-beanshell],
101 [Enable support for scripts in BeanShell.])
104 AC_ARG_ENABLE(ext-scripting-javascript,
105 AS_HELP_STRING([--enable-ext-scripting-javascript],
106 [Enable support for scripts in JavaScript.])
109 AC_ARG_ENABLE(ext-typo,
110 AS_HELP_STRING([--enable-ext-typo],
111 [Enable the Typography Toolbar extension.])
114 AC_ARG_ENABLE(ext-validator,
115 AS_HELP_STRING([--enable-ext-validator],
116 [Enable the Validator extension.])
119 AC_ARG_ENABLE(ext-watch-window,
120 AS_HELP_STRING([--enable-ext-watch-window],
121 [Enable the Watch Window extension to Calc.])
124 AC_ARG_ENABLE(ext-wiki-publisher,
125 AS_HELP_STRING([--enable-ext-wiki-publisher],
126 [Enable the Wiki Publisher extension.])
128 ###############################################################################
130 dnl ---------- *** ----------
132 AC_ARG_ENABLE(mergelibs,
133 AS_HELP_STRING([--enable-mergelibs],
134 [Enables linking of big merged library used for better performance.])
137 AC_ARG_ENABLE(graphite,
138 AS_HELP_STRING([--enable-graphite],
139 [Enables the compilation of Graphite smart font rendering.])
143 AS_HELP_STRING([--disable-ldap],
144 [Disables the use of LDAP backend via Netscape/Mozilla or OpenLDAP LDAP SDK])
147 AC_ARG_ENABLE(fetch-external,
148 AS_HELP_STRING([--disable-fetch-external],
149 [Disables fetching external tarballs from web sources.])
152 AC_ARG_ENABLE(lockdown,
153 AS_HELP_STRING([--disable-lockdown],
154 [Disables the gconf integration work in LibreOffice.]),
158 AS_HELP_STRING([--disable-vba],
159 [Disables the vba compatibility feature.])
163 AS_HELP_STRING([--enable-pch],
164 [EXPERIMENTAL: Enables precompiled header support for C++.])
167 AC_ARG_ENABLE(mozilla,
168 AS_HELP_STRING([--disable-mozilla],
169 [LibreOffice usually includes a strangely hacked up Mozilla binary for your
170 platform, to build without this version, use this option.])
174 AS_HELP_STRING([--enable-epm],
175 [LibreOffice includes self-packaging code, that requires epm, however epm is
176 useless for large scale package building.])
179 AC_ARG_ENABLE(activex_component,
180 AS_HELP_STRING([--disable-activex-component],
181 [Remove support for ActiveX embedding of LibreOffice.])
185 AS_HELP_STRING([--disable-odk],
186 [LibreOffice includes an ODK, office development kit which some packagers may
187 wish to build without.])
190 AC_ARG_ENABLE(mathmldtd,
191 AS_HELP_STRING([--disable-mathmldtd],
192 [Disable mathmldtd (useful for distributions that want to avoid
196 AC_ARG_ENABLE(evolution2,
197 AS_HELP_STRING([--enable-evolution2],
198 [Allows the built-in evolution 2 addressbook connectivity build to be
202 AC_ARG_ENABLE(directx,
203 AS_HELP_STRING([--disable-directx],
204 [Remove DirectX implementation for the new XCanvas interface.
205 The DirectX support requires more stuff installed on Windows to
206 compile. (DirectX SDK, GDI+ libs)])
209 AC_ARG_ENABLE(activex,
210 AS_HELP_STRING([--disable-activex],
211 [Disable the use of ActiveX for a Windows build.
212 This switch is mandatory when using VC++ 2008 Express.])
216 AS_HELP_STRING([--disable-atl],
217 [Disable the use of ATL for a Windows build.])
219 This switch is mandatory when using VC++ 2008 Express.
223 AC_ARG_ENABLE(symbols,
224 AS_HELP_STRING([--enable-symbols],
225 [Include debugging symbols in output. WARNING - a complete build needs
226 8 Gb of space and takes much longer (enables -g compiler flag).])
228 Enabling symbols disables the stripping of the solver
229 (--disable-strip-solver).
233 AC_ARG_ENABLE(strip-solver,
234 AS_HELP_STRING([--disable-strip-solver],
235 [Disable the stripping of the solver. By default the solver is stripped
236 unless a build with debugging symbols (--enable-symbols) is requested.])
238 This switch allows to override this setting.
242 AC_ARG_ENABLE(werror,
243 AS_HELP_STRING([--enable-werror],
244 [Turn warnings to errors. (Has no effect in modules where the treating
245 of warnings as errors is disabled explicitly.)]),
249 AS_HELP_STRING([--enable-debug],
250 [Include debugging symbols from --enable-symbols plus extra debugging
251 code. Extra large build! (enables -g compiler flag and dmake debug=true)
252 If you need even more verbose output, build a module with
253 "build -- debug=true dbglevel=2".]))
255 AC_ARG_ENABLE(dbgutil,
256 AS_HELP_STRING([--enable-dbgutil],
257 [Include additional debugging utilities, such as assertions, object
258 counting, etc. Larger build. Independent from --enable-debug]))
260 AC_ARG_ENABLE(linkoo,
261 AS_HELP_STRING([--disable-linkoo],
262 [Disable linkoo for the smoketest installation.]))
265 AS_HELP_STRING([--enable-lto],
266 [Enable link-time optimization. Suitable for product builds.
267 Building takes longer but libraries are optimized for speed.
268 (possible only with gcc-4.5 or later,
269 better to use gcc-4.6 and 'gold' as linker)]))
271 AC_ARG_ENABLE(crashdump,
272 AS_HELP_STRING([--enable-crashdump],
273 [Enable the crashdump feature.]))
275 AC_ARG_ENABLE(python,
276 AS_HELP_STRING([--enable-python=<no/auto/system/internal>],
277 [Enables or disables Python support at run-time and build-time.
278 Also specifies what Python to use. 'auto' is the
279 default. Note that Python can be disabled with
280 --disable-python or --enable-python=no only if no
281 translations are required.]))
284 AS_HELP_STRING([--disable-gtk],
285 [Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available.]),
289 AS_HELP_STRING([--disable-gtk3],
290 [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
293 AC_ARG_ENABLE(systray,
294 AS_HELP_STRING([--disable-systray],
295 [Determines whether to build the systray quickstarter.]),
298 AC_ARG_ENABLE(split-app-modules,
299 AS_HELP_STRING([--enable-split-app-modules],
300 [Split file lists for app modules, e.g. base, calc.
301 Has effect only with make distro-pack-install]),
304 AC_ARG_ENABLE(split-opt-features,
305 AS_HELP_STRING([--enable-split-opt-features],
306 [Split file lists for some optional features, .e.g. pyuno, testtool.
307 Has effect only with make distro-pack-install]),
310 AC_ARG_ENABLE(cairo-canvas,
311 [ --disable-cairo-canvas Determines whether to build the Cairo canvas on
312 platforms where Cairo is available.
313 ],,enable_cairo_canvas=yes)
315 AC_ARG_ENABLE(librsvg,
316 AS_HELP_STRING([--enable-librsvg=<no/auto/system/internal>],
317 [Enables or disables use of librsvg to render SVG at run-time.
318 Also specificed what librsvg to use. 'auto' is the default.]))
320 AC_ARG_ENABLE(opengl,
321 AS_HELP_STRING([--disable-opengl],
322 [Determines whether to build the OpenGL 3D slide transitions component.]),
326 AS_HELP_STRING([--enable-dbus],
327 [Determines whether to enable presentation mode screensaver control
328 under GNOME via DBUS.]),
332 AS_HELP_STRING([--disable-gconf],
333 [Determines whether to use the GConf support.]),
336 AC_ARG_ENABLE(gnome-vfs,
337 AS_HELP_STRING([--disable-gnome-vfs],
338 [Determines whether to use the Gnome Virtual Filing System on platforms
339 where that VFS is available.]),
340 ,enable_gnome_vfs=yes)
343 AS_HELP_STRING([--enable-gio],
344 [Determines whether to use the GIO support.]),
347 AC_ARG_ENABLE(static-gtk,
348 AS_HELP_STRING([--enable-static-gtk],
349 [Modules that are linked against GTK+ libraries use the static libraries
350 instead of the dynamic ones. (Enables -Bstatic linker flag for GTK+ libraries.)]),
353 AC_ARG_ENABLE(layout,
354 AS_HELP_STRING([--enable-layout],
355 [Enable the compilation and use of layout dialogs.]),
358 AC_ARG_ENABLE(build-mozilla,
359 AS_HELP_STRING([--disable-build-mozilla],
360 [Use this option if you do not want to build the Mozilla components from
361 the Mozilla source code but take precompiled zips.]),
364 AC_ARG_ENABLE(nss-module,
365 AS_HELP_STRING([--disable-nss-module],
366 [Whether to use provided NSS module.]),
367 ,enable_nss_module=yes)
370 AS_HELP_STRING([--enable-kde],
371 [Determines whether to use Qt3/KDE3 vclplug on platforms where Qt3 and
372 KDE3 are available.]),
376 AS_HELP_STRING([--disable-kdeab],
377 [Disable the KDE3 address book support.]),
379 if test "$enable_kde" = "yes"; then
385 AS_HELP_STRING([--enable-kde4],
386 [Determines whether to use Qt4/KDE4 vclplug on platforms where Qt4 and
387 KDE4 are available. May be used with --enable-kde if you want to support
388 both KDE3 and KDE4.]),
391 AC_ARG_ENABLE(unix-qstart-libpng,
392 AS_HELP_STRING([--disable-unix-qstart-libpng],
393 [On UNIX systems, we have a faster splash app, that can use libpng to
394 render its splash, if we can safely link to the system libpng then
395 enabling this is a good idea (ie. for Linux Distro packaging).]),
396 ,enable_unix_libpng=yes)
398 AC_ARG_ENABLE(binfilter,
399 AS_HELP_STRING([--enable-binfilter],
400 [Enable legacy binary file formats filters build.]),
405 AS_HELP_STRING([--enable-ugly],
406 [Enables ugly pieces of functionality.]),
411 AS_HELP_STRING([--disable-rpath],
412 [Disable the use of relative paths in shared libraries.]),
415 AC_ARG_ENABLE(xrender-link,
416 AS_HELP_STRING([--enable-xrender-link],
417 [Link with libXrender instead of dynamically open it.]),
421 AS_HELP_STRING([--disable-randr],
422 [Disable RandR support in the vcl project.]),
425 AC_ARG_ENABLE(randr-link,
426 AS_HELP_STRING([--disable-randr-link],
427 [Disable linking with libXrandr, instead dynamically open it at runtime.]),
428 ,enable_randr_link=yes)
430 AC_ARG_ENABLE(gstreamer,
431 AS_HELP_STRING([--disable-gstreamer],
432 [Disable building the gstreamer avmedia backend.]),
433 ,enable_gstreamer=yes)
436 AS_HELP_STRING([--disable-neon],
437 [Disable neon and the compilation of webdav binding.]),
440 AC_ARG_ENABLE(build-unowinreg,
441 AS_HELP_STRING([--enable-build-unowinreg],
442 [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
443 compiler is needed on Linux.])
445 Usage: --enable-build-unowinreg
449 AC_ARG_ENABLE(verbose,
450 AS_HELP_STRING([--enable-verbose],
451 [Increase build verbosity.])[
452 --disable-verbose Decrease build verbosity.],
455 AC_ARG_ENABLE(dependency-tracking,
456 AS_HELP_STRING([--enable-dependency-tracking],
457 [Do not reject slow dependency extractors.])[
458 --disable-dependency-tracking
459 Disables generation of dependency information.
460 Speed up one-time builds.],
463 AC_ARG_ENABLE(icecream,
464 AS_HELP_STRING([--enable-icecream],
465 [Use the 'icecream' distributed compiling tool to speedup the compilation.
466 It defaults to /opt/icecream for the location of the icecream gcc/g++
467 wrappers, you can override that using --with-gcc-home=/the/path switch.]),
470 AC_ARG_ENABLE(zenity,
471 AS_HELP_STRING([--disable-zenity],
472 [Do not display a build icon in the notification area (on unix) during build.]),
475 AC_ARG_ENABLE(ccache,
476 AS_HELP_STRING([--disable-ccache],
477 [Do not try to use ccache automatically.
478 By default, we will try to detect if ccache is available; in that case if
479 CC/CXX are not yet set, and --enable-icecream is not given, we
480 attempt to use ccache. --disable-ccache disables ccache completely.
484 AC_ARG_ENABLE(cl-x64,
485 AS_HELP_STRING([--enable-cl-x64],
486 [Build a 64-bit LibreOffice using the Microsoft C/C++ x64 compiler.]),
489 AC_ARG_ENABLE(extra-gallery,
490 AS_HELP_STRING([--enable-extra-gallery],
491 [Add extra gallery content.]),
494 AC_ARG_ENABLE(extra-template,
495 AS_HELP_STRING([--enable-extra-template],
496 [Add extra template content.]),
499 AC_ARG_ENABLE(extra-sample,
500 AS_HELP_STRING([--enable-extra-sample],
501 [Add extra sample content.]),
504 AC_ARG_ENABLE(extra-font,
505 AS_HELP_STRING([--enable-extra-font],
506 [Add extra font content.]),
509 AC_ARG_ENABLE(lomenubar,
510 AS_HELP_STRING([--enable-lomenubar],
511 [Enable global menu support.]),
514 AC_ARG_ENABLE(online-update,
515 AS_HELP_STRING([--enable-online-update],
516 [Enable the online update service that will check for new versions of
517 LibreOffice. By default, it is on on Windows and Mac, and off on Linux.]),
520 AC_ARG_ENABLE(release-build,
521 AS_HELP_STRING([--enable-release-build],
522 [Enable release build.
523 See http://wiki.documentfoundation.org/DevBuild]),
526 dnl ===================================================================
527 dnl Optional Packages (--with/without-)
528 dnl ===================================================================
529 AC_ARG_WITH(gnu-patch,
530 AS_HELP_STRING([--with-gnu-patch],
531 [Specify location of GNU patch on Solaris or FreeBSD.]),
535 AS_HELP_STRING([--with-gnu-cp],
536 [Specify location of GNU cp on Solaris or FreeBSD.]),
539 AC_ARG_WITH(system-graphite,
540 AS_HELP_STRING([--with-system-graphite],
541 [Use graphite library already installed on system.]),
544 AC_ARG_WITH(external-tar,
545 AS_HELP_STRING([--with-external-tar=<TARFILE PATH>],
546 [Specify path to tarfiles manually.]),
547 TARFILE_LOCATION=$withval ,
550 AC_ARG_WITH(linked-git,
551 AS_HELP_STRING([--with-linked-git=<OTHER_CLONE_DIR>],
552 [Specify another checkout's clonedir to re-use. This makes use of
553 git-new-workdir, and saves a lot of diskspace when having multiple
554 trees side-by-side.]),
555 GIT_LINK_SRC=$withval ,
558 AC_ARG_WITH(openldap,
559 AS_HELP_STRING([--with-openldap],
560 [Enables the use of the OpenLDAP LDAP SDK instead of the Netscape/Mozilla one.]),
563 AC_ARG_WITH(vba-package-format,
564 AS_HELP_STRING([--with-vba-package-format],
565 [Specify package format for vba compatibility api. Specifying "builtin"
566 means the api component and associated type library are part of the
567 installation set. Specifying "extn" creates an uno extension that is
568 part of the installation set (located in the program directory) that
569 MUST be optionly registered using either the unopkg executeable or the
570 extension manager gui.])
572 Note: "builtin" is the default, "extn" can cause
575 Usage: --with-vba-package-format="builtin" or
576 --with-vba-package-format="extn"
581 AS_HELP_STRING([--with-theme="theme1 theme2..."],
582 [Choose which themes to include. By default those themes with an '*' are included.
583 Possible choices: *default, *crystal, *hicontrast, *oxygen, *tango, classic, industrial.]),
586 AC_ARG_WITH(helppack-integration,
588 --without-helppack-integration It will not integrate the helppacks to the installer
590 Please use this switch to use the online help or separate help packages.],
594 AS_HELP_STRING([--without-fonts],
595 [LibreOffice includes some third-party fonts to provide a reliable basis for
596 help content, templates, samples, etc. When these fonts are already
597 known to be available on the system then you should use this option.]),
601 AS_HELP_STRING([--without-ppds],
602 [Removes Postscript Printer definition files from LibreOffice
603 installation set, for people building for specific distributions where
604 PPDs are known to be already available (every recent distro with CUPS backend).]),
608 AS_HELP_STRING([--without-afms],
609 [Removes bitmap font files from LibreOffice installation set, for people
610 building for specific distributions where AFM files or TrueType Fonts
611 are known to be available.]),
614 AC_ARG_WITH(agfa-monotype-fonts,
615 AS_HELP_STRING([--with-agfa-monotype-fonts],
616 [This switch should only be enabled for those who have the right
617 to use or distribute the proprietary Agfa Monotype
622 AS_HELP_STRING([--with-epm],
623 [Decides which epm to use. Default is to use the one from the system if
624 one is built. When either this is not there or you say =internal epm
628 AC_ARG_WITH(package-format,
629 AS_HELP_STRING([--with-package-format],
630 [Specify package format(s) for LibreOffice installsets. Default is the
631 "normal" one of the OS/Distribution. Possible values: aix, bsd, deb,
632 inst, tardist, osx, pkg, rpm, setld, native, portable, archive, dmg,
633 installed, msi. Example: --with-package-format="deb dmg"]),
636 AC_ARG_WITH(system-stdlibs,
637 AS_HELP_STRING([--with-system-stdlibs],
638 [Use libstdc++/libgcc_s already on system.]),
641 AC_ARG_WITH(system-cairo,
642 AS_HELP_STRING([--with-system-cairo],
643 [Use Cairo libraries already on system.]),
646 AC_ARG_WITH(mozilla-version,
647 AS_HELP_STRING([--with-mozilla-version],
648 [Choose which version of Mozilla to use while building Mozilla.
649 (default=1.7.5) Note that not all versions are supported.]),
652 AC_ARG_WITH(mozilla-toolkit,
653 AS_HELP_STRING([--with-mozilla-toolkit],
654 [Choose which GUI toolkit to use while building Mozilla components. (default=gtk2)]),
657 AC_ARG_WITH(myspell-dicts,
658 AS_HELP_STRING([--without-myspell-dicts],
659 [Removes myspell dictionaries from LibreOffice installation set, for
660 people building for specific distributions where the myspell dictionaries
661 are installed from other sources.]),
664 AC_ARG_WITH(system-dicts,
665 AS_HELP_STRING([--with-system-dicts],
666 [Use dictionaries from system paths- Specify them via
667 --with-{dict,hyph,thes}-path=/path if you want to override the default ones.]),
670 AC_ARG_WITH(external-dict-dir,
671 AS_HELP_STRING([--with-external-dict-dir],
672 [Specify external dictionary dir.]),
675 AC_ARG_WITH(external-hyph-dir,
676 AS_HELP_STRING([--with-external-hyph-dir],
677 [Specify external hyphenation pattern dir.]),
680 AC_ARG_WITH(external-thes-dir,
681 AS_HELP_STRING([--with-external-thes-dir],
682 [Specify external thesaurus dir.]),
685 AC_ARG_WITH(system-libs,
686 AS_HELP_STRING([--with-system-libs],
687 [Use libraries already on system -- enables all --with-system-* flags except
688 mozilla, libvisio, libexttextcat and translate-toolkit.]),
691 AC_ARG_WITH(system-headers,
692 AS_HELP_STRING([--with-system-headers],
693 [Use headers already on system -- enables all --with-system-* flags for
694 external packages whose headers are the only entities used i.e.
695 boost/vigra/odbc/sane/xrender-header(s).]),
698 AC_ARG_WITH(system-jars,
699 AS_HELP_STRING([--without-system-jars],
700 [When building with --with-system-libs, also the needed jars are expected
701 on the system. Use this to disable that (except for the db case where
702 --with-system-db *has to* imply using the db.jar from there, too).]),
705 AC_ARG_WITH(system-zlib,
706 AS_HELP_STRING([--with-system-zlib],
707 [Use zlib already on system.]),
710 AC_ARG_WITH(system-openssl,
711 AS_HELP_STRING([--with-system-openssl],
712 [Use OpenSSL already on system.]),
715 AC_ARG_WITH(system-jpeg,
716 AS_HELP_STRING([--with-system-jpeg],
717 [Use jpeg already on system.]),
720 AC_ARG_WITH(system-expat,
721 AS_HELP_STRING([--with-system-expat],
722 [Use expat already on system.]),
725 AC_ARG_WITH(system-libcmis,
726 AS_HELP_STRING([--with-system-libcmis],
727 [Use libcmis already on system.]),
730 AC_ARG_WITH(system-libvisio,
731 AS_HELP_STRING([--with-system-libvisio],
732 [Use libvisio already on system.]),
735 AC_ARG_WITH(system-libwpd,
736 AS_HELP_STRING([--with-system-libwpd],
737 [Use libwpd already on system.]),
740 AC_ARG_WITH(system-libwps,
741 AS_HELP_STRING([--with-system-libwps],
742 [Use libwps already on system.]),
745 AC_ARG_WITH(system-libwpg,
746 AS_HELP_STRING([--with-system-libwpg],
747 [Use libwpg already on system.]),
750 AC_ARG_WITH(system-libxml,
751 AS_HELP_STRING([--with-system-libxml],
752 [Use libxml already on system.]),
755 AC_ARG_WITH(system-translate-toolkit,
756 AS_HELP_STRING([--with-system-translate-toolkit],
757 [Use translate-toolkit already on system.]))
759 AC_ARG_WITH(system-icu,
760 AS_HELP_STRING([--with-system-icu],
761 [Use icu already on system.]))
763 AC_ARG_WITH(system-poppler,
764 AS_HELP_STRING([--with-system-poppler],
765 [Use system poppler. (only needed for pdfimport extension)]))
767 AC_ARG_WITH(system-db,
768 AS_HELP_STRING([--with-system-db],
769 [Use Berkeley db already on system.]))
771 AC_ARG_WITH(system-lucene,
772 AS_HELP_STRING([--with-system-lucene],
773 [Use Lucene already on system.]))
775 AC_ARG_WITH(system-apache-commons,
776 AS_HELP_STRING([--with-system-apache-commons],
777 [Use Apache commons libraries already on system.]))
779 AC_ARG_WITH(lucene-core-jar,
780 AS_HELP_STRING([--with-lucene-core-jar=JARFILE],
781 [Specify path to jarfile manually.]),
782 LUCENE_CORE_JAR=$withval)
784 AC_ARG_WITH(lucene-analyzers-jar,
785 AS_HELP_STRING([--with-lucene-analyzers-jar=JARFILE],
786 [Specify path to jarfile manually.]),
787 LUCENE_ANALYZERS_JAR=$withval ,)
789 AC_ARG_WITH(system-mysql,
790 AS_HELP_STRING([--with-system-mysql],
791 [Use MySQL libraries already on system, for building the MySQL Connector/LibreOffice
792 extension. Requires MYSQLCONFIG to point to the mysql_config executable.]))
794 AC_ARG_WITH(libmysql-path,
795 AS_HELP_STRING([--with-libmysql-path],
796 [Use Connector/C (libmysql) installation for building the MySQL
797 Connector/LibreOffice extension.])
799 Usage: --with-libmysql-path=<absolute path to
800 your Connector/C installation>
804 AC_ARG_WITH(system-mysql-cppconn,
805 AS_HELP_STRING([--with-system-mysql-cppconn],
806 [Use MySQL C++ Connector libraries already on system.]))
808 AC_ARG_WITH(system-hsqldb,
809 AS_HELP_STRING([--with-system-hsqldb],
810 [Use hsqldb already on system.]))
812 AC_ARG_WITH(hsqldb-jar,
813 AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
814 [Specify path to jarfile manually.]),
817 AC_ARG_WITH(system-beanshell,
818 AS_HELP_STRING([--with-system-beanshell],
819 [Use beanshell already on system.]))
821 AC_ARG_WITH(beanshell-jar,
822 AS_HELP_STRING([--with-beanshell-jar=JARFILE],
823 [Specify path to jarfile manually.]),
826 AC_ARG_WITH(commons-codec-jar,
827 AS_HELP_STRING([--with-commons-codec-jar=JARFILE],
828 [Specify path to jarfile manually.]),
829 COMMONS_CODEC_JAR=$withval)
831 AC_ARG_WITH(commons-lang-jar,
832 AS_HELP_STRING([--with-commons-lang-jar=JARFILE],
833 [Specify path to jarfile manually.]),
834 COMMONS_LANG_JAR=$withval)
836 AC_ARG_WITH(commons-httpclient-jar,
837 AS_HELP_STRING([--with-commons-httpclient-jar=JARFILE],
838 [Specify path to jarfile manually.]),
839 COMMONS_HTTPCLIENT_JAR=$withval)
841 AC_ARG_WITH(commons-logging-jar,
842 AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
843 [Specify path to jarfile manually.]),
844 COMMONS_LOGGING_JAR=$withval)
846 AC_ARG_WITH(servlet-api-jar,
847 AS_HELP_STRING([--with-servlet-api-jar=JARFILE],
848 [Specify path to jarfile manually.]),
849 SERVLETAPI_JAR=$withval)
851 AC_ARG_WITH(system-jfreereport,
852 AS_HELP_STRING([--with-system-jfreereport],
853 [Use JFreeReport already on system.]))
856 AS_HELP_STRING([--with-sac-jar=JARFILE],
857 [Specify path to jarfile manually.]),
860 AC_ARG_WITH(libxml-jar,
861 AS_HELP_STRING([--with-libxml-jar=JARFILE],
862 [Specify path to jarfile manually.]),
865 AC_ARG_WITH(flute-jar,
866 AS_HELP_STRING([--with-flute-jar=JARFILE],
867 [Specify path to jarfile manually.]),
870 AC_ARG_WITH(jfreereport-jar,
871 AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
872 [Specify path to jarfile manually.]),
873 JFREEREPORT_JAR=$withval)
875 AC_ARG_WITH(liblayout-jar,
876 AS_HELP_STRING([--with-liblayout-jar=JARFILE],
877 [Specify path to jarfile manually.]),
878 LIBLAYOUT_JAR=$withval)
880 AC_ARG_WITH(libloader-jar,
881 AS_HELP_STRING([--with-libloader-jar=JARFILE],
882 [Specify path to jarfile manually.]),
883 LIBLOADER_JAR=$withval)
885 AC_ARG_WITH(libloader-jar,
886 AS_HELP_STRING([--with-libloader-jar=JARFILE],
887 [Specify path to jarfile manually.]),
888 LIBLOADER_JAR=$withval)
890 AC_ARG_WITH(libformula-jar,
891 AS_HELP_STRING([--with-libformula-jar=JARFILE],
892 [Specify path to jarfile manually.]),
893 LIBFORMULA_JAR=$withval)
895 AC_ARG_WITH(librepository-jar,
896 AS_HELP_STRING([--with-librepository-jar=JARFILE],
897 [Specify path to jarfile manually.]),
898 LIBREPOSITORY_JAR=$withval)
900 AC_ARG_WITH(libfonts-jar,
901 AS_HELP_STRING([--with-libfonts-jar=JARFILE],
902 [Specify path to jarfile manually.]),
903 LIBFONTS_JAR=$withval)
905 AC_ARG_WITH(libserializer-jar,
906 AS_HELP_STRING([--with-libserializer-jar=JARFILE],
907 [Specify path to jarfile manually.]),
908 LIBSERIALIZER_JAR=$withval)
910 AC_ARG_WITH(libbase-jar,
911 AS_HELP_STRING([--with-libbase-jar=JARFILE],
912 [Specify path to jarfile manually.]),
913 LIBBASE_JAR=$withval)
915 AC_ARG_WITH(system-saxon,
916 AS_HELP_STRING([--with-system-saxon],
917 [Use saxon already on system.]))
919 AC_ARG_WITH(saxon-jar,
920 AS_HELP_STRING([--with-saxon-jar=JARFILE],
921 [Specify path to jarfile manually.]),
924 AC_ARG_WITH(system-libxslt,
925 AS_HELP_STRING([--with-system-libxslt],
926 [Use libxslt already on system.]))
928 AC_ARG_WITH(system-odbc,
929 AS_HELP_STRING([--with-system-odbc],
930 [Use the odbc headers already on system.]))
932 AC_ARG_WITH(system-sane,
933 AS_HELP_STRING([--with-system-sane],
934 [Use sane.h already on system.]))
936 AC_ARG_WITH(system-xrender-headers,
937 AS_HELP_STRING([--with-system-xrender-headers],
938 [Use XRender headers already on system.]))
940 AC_ARG_WITH(system-mesa-headers,
941 AS_HELP_STRING([--with-system-mesa-headers],
942 [Use Mesa headers already on system.]))
944 AC_ARG_WITH(system-curl,
945 AS_HELP_STRING([--with-system-curl],
946 [Use curl already on system.]))
948 AC_ARG_WITH(system-boost,
949 AS_HELP_STRING([--with-system-boost],
950 [Use boost already on system.]))
952 AC_ARG_WITH(system-mdds,
953 AS_HELP_STRING([--with-system-mdds],
954 [Use mdds already on system.]))
956 AC_ARG_WITH(system-vigra,
957 AS_HELP_STRING([--with-system-vigra],
958 [Use vigra already on system.]))
960 AC_ARG_WITH(system-neon,
961 AS_HELP_STRING([--with-system-neon],
962 [Use neon already on system.]))
964 AC_ARG_WITH(system-hunspell,
965 AS_HELP_STRING([--with-system-hunspell],
966 [Use libhunspell already on system.]))
968 AC_ARG_WITH(system-mythes,
969 AS_HELP_STRING([--with-system-mythes],
970 [Use mythes already on system.]))
972 AC_ARG_WITH(system-altlinuxhyph,
973 AS_HELP_STRING([--with-system-altlinuxhyph],
974 [Use ALTLinuxhyph already on system.]))
976 AC_ARG_WITH(system-lpsolve,
977 AS_HELP_STRING([--with-system-lpsolve],
978 [Use lpsolve already on system.]))
980 AC_ARG_WITH(system-libexttextcat,
981 AS_HELP_STRING([--with-system-libexttextcat],
982 [Use libexttextcat already on system.]))
984 AC_ARG_WITH(system-cppunit,
985 AS_HELP_STRING([--with-system-cppunit],
986 [Use cppunit already on system.]))
988 AC_ARG_WITH(system-redland,
989 AS_HELP_STRING([--with-system-redland],
990 [Use redland library already on system.]))
992 AC_ARG_WITH(system-mozilla,
993 AS_HELP_STRING([--with-system-mozilla],
994 [Use Mozilla already on system. Note that some components cannot be built
995 against a contemporary Mozilla. The flavour used can be specified by
996 --with-system-mozilla=<flavour>. Supported are: libxul (default),
997 xulrunner, firefox, seamonkey, mozilla.]),
998 WITH_SYSTEM_MOZILLA=$withval ,
999 WITH_SYSTEM_MOZILLA=no)
1001 AC_ARG_WITH(system-gettext,
1002 AS_HELP_STRING([--with-system-gettext],
1003 [Use gettext runtime library already on system.]))
1005 AC_ARG_WITH(system-libpng,
1006 AS_HELP_STRING([--with-system-libpng],
1007 [Use libpng already on system.]))
1009 AC_ARG_WITH(linker-hash-style,
1010 AS_HELP_STRING([--with-linker-hash-style],
1011 [Use linker with --hash-style=<style> when linking shared objects.
1012 Possible values: "sysv", "gnu", "both". The default value is "gnu"
1013 if supported on the build system, and "sysv" otherwise.]))
1015 AC_ARG_WITH(stlport,
1016 AS_HELP_STRING([--with-stlport],
1017 [Build the STLPort library for compatibility with old extensions for
1018 architectures where STLPort used to be used.]),
1019 with_stlport=$withval ,
1022 AC_ARG_WITH(jdk-home,
1023 AS_HELP_STRING([--with-jdk-home],
1024 [If you have installed JDK 1.3 or later on your system please supply the
1025 path here. Note that this is not the location of the java command but the
1026 location of the entire distribution.])
1028 Usage: --with-jdk-home=<absolute path to JDK home>
1032 AC_ARG_WITH(gxx_include_path,
1033 AS_HELP_STRING([--with-gxx-include-path],
1034 [If you want to override the autodetected g++ include path.])
1036 Usage: --with-gxx-include-path=<absolute path to
1042 AS_HELP_STRING([--with-help],
1043 [Enable the build of help.
1045 To build without help, use --without-help.]))
1048 AS_HELP_STRING([--with-java],
1049 [Specify the name of the Java interpreter command. Typically "java"
1050 which is the default.
1052 To build without support for Java components, applets, accessibility
1053 or the XML filters written in Java, use --without-java or --with-java=no.])
1055 Usage: --with-java==<java command>
1058 [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
1062 AC_ARG_WITH(java_target_version,
1063 AS_HELP_STRING([--with-java-target-version],
1064 [Generate class files that will work on JVMs with the specified version.
1065 For example, use --with-java-target-version=1.4 to make sure that the
1066 application will work with JVM 1.4 even when compiled with JDK 1.5.])
1068 This option is ignored when you compile with gcj/gij.
1070 Usage: --with-java-target-version=<jvm version>
1074 AC_ARG_WITH(jvm-path,
1075 AS_HELP_STRING([--with-jvm-path],
1076 [Use a specific JVM search path at runtime.])
1078 Usage: --with-jvm-path=<absolute path to parent of jvm home>
1080 e. g.: --with-jvm-path=/usr/lib/
1081 to find JRE/JDK in /usr/lib/jvm/
1085 AC_ARG_WITH(ant-home,
1086 AS_HELP_STRING([--with-ant-home],
1087 [If you have installed Jakarta Ant on your system, please supply the path here.
1088 Note that this is not the location of the Ant binary but the location
1089 of the entire distribution.])
1091 Usage: --with-ant-home=<absolute path to Ant home>
1096 AS_HELP_STRING([--with-junit],
1097 [Specifies the JUnit 4 jar file to use for JUnit-based tests.
1098 --without-junit disables those tests. Not relevant in the --without-java case.])
1100 Usage: --with-junit=<absolute path to JUnit 4 jar>
1104 AC_ARG_WITH(perl-home,
1105 AS_HELP_STRING([--with-perl-home],
1106 [If you have installed Perl 5 Distribution, on your system, please
1107 supply the path here. Note that this is not the location of the Perl
1108 binary but the location of the entire distribution.])
1110 Usage: --with-perl-home=<abs. path to Perl 5 home>
1114 AC_ARG_WITH(cl-home,
1115 AS_HELP_STRING([--with-cl-home],
1116 [For Windows NT users, please supply the path for the Microsoft C/C++
1117 compiler. Note that this is not the location of the compiler binary but
1118 the location of the entire distribution.])
1120 Usage: --with-cl-home=<absolute path to Microsoft
1121 C/C++ compiler home>
1125 AC_ARG_WITH(mspdb-path,
1126 AS_HELP_STRING([--with-mspdb-path],
1127 [For Microsoft C/C++ compiler users, please supply the path pointing to
1128 the mspdb80.dll (if using Visual Studio 2008) or mspdb100.dll (if using
1129 Visual Studio 2010).])
1131 Usage: --with-mspdb-path=<path to
1132 mspdb80.dll/mspdb100.dll>
1136 AC_ARG_WITH(midl-path,
1137 AS_HELP_STRING([--with-midl-path],
1138 [For Microsoft compiler users, please supply the path pointing to the midl.exe.])
1140 Usage: --with-midl-path=<abs. path to midl.exe>
1144 AC_ARG_WITH(csc-path,
1145 AS_HELP_STRING([--with-csc-path],
1146 [For Windows builds, please supply the path pointing to the csc.exe.
1147 Usually found automatically when building on Windows.])
1149 Usage: --with-csc-path=<abs. path to csc.exe>
1153 AC_ARG_WITH(nsis-path,
1154 AS_HELP_STRING([--with-nsis-path],
1155 [For Windows builds, please supply the directory where makensis
1156 is located. If makensis is found in PATH or this option is
1157 properly supplied a self-contained executable installer for
1158 LibreOffice will be created.])
1160 Usage: --with-nsis-path=<path to directory containing makensis>
1164 AC_ARG_WITH(dotnet-framework-home,
1165 AS_HELP_STRING([--with-dotnet-framework-home],
1166 [For Microsoft compiler users, please supply the path pointing to
1167 lib/mscoree.lib, usually something like:
1168 "/cygdrive/c/Program Files/Windows SDKs/Windows/v7.0"])
1170 Note that in most cases it will be automatically
1173 Usage: --with-dotnet-framework-home=<absolute path to .NET
1178 AC_ARG_WITH(windows-sdk-home,
1179 AS_HELP_STRING([--with-windows-sdk-home],
1180 [For Windows builds, please supply the path to the Windows SDK.
1181 Usually found automatically when building on Windows.])
1183 Usage: --with-windows-sdk-home=<absolute path to Windows SDK>
1187 AC_ARG_WITH(directx-home,
1188 AS_HELP_STRING([--with-directx-home],
1189 [For Windows users, please supply the path to the Microsoft DirectX SDK.])
1191 Usage: --with-directx-home=<absolute path to
1192 Microsoft DirectX SDK>
1196 AC_ARG_WITH(mozilla-build,
1197 AS_HELP_STRING([--with-mozilla-build],
1198 [For Windows users, please supply the path to the Mozilla build tools.])
1200 Usage: --with-mozilla-build=<absolute path to
1201 Mozilla build tools>
1203 At the moment of this writing, an installer for the
1204 mozilla build tools can be obtained from http://ftp.
1205 mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
1207 MOZILLABUILD=$withval ,
1210 AC_ARG_WITH(local-solver,
1211 AS_HELP_STRING([--with-local-solver],
1212 [If you have solver in a location other than ./solver, please supply the path here.])
1214 Usage: --with-local-solver=<abs. path to solver>
1219 AS_HELP_STRING([--with-lang],
1220 [Use this option to build LibreOffice with additional language support.
1221 English (US) is always included by default.
1222 Separate multiple languages with space.
1223 For all languages, use --with-lang=ALL.])
1225 Usage: --with-lang="es sw tu cs sk"
1229 dnl ===================================================================
1231 dnl ===================================================================
1233 AC_ARG_WITH(intro-bitmap,
1234 [ --with-intro-bitmap Prefer the specified intro bitmap over the
1237 Usage: --with-intro-bitmap=/path/my_ooo_intro.png
1240 AC_ARG_WITH(intro-progressbar-color,
1241 [ --with-intro-progressbar-color Set color of progress bar on intro screen.
1242 Comma separated RGB values in decimal format.
1244 Usage: --with-intro-progressbar-color=126,170,23
1247 AC_ARG_WITH(intro-progressbar-size,
1248 [ --with-intro-progressbar-size Set size of progress bar on intro screen.
1249 Comma separated values in decimal format.
1251 Usage: --with-intro-progressbar-size=319,10
1254 AC_ARG_WITH(intro-progressbar-position,
1255 [ --with-intro-progressbar-position Set position of progress bar on intro screen.
1256 Comma separated values in decimal format.
1258 Usage: --with-intro-progressbar-position=164,225
1261 AC_ARG_WITH(intro-progressbar-frame-color,
1262 [ --with-intro-progressbar-frame-color Set color of progress bar frame on intro screen.
1263 Comma separated RGB values in decimal format.
1265 Usage: --with-intro-progressbar-frame-color=207,208,211
1268 AC_ARG_WITH(about-bitmap,
1269 [ --with-about-bitmap Similarly to --with-intro-bitmap, this allows
1270 specification of bitmap for the About box.
1272 Usage: --with-about-bitmap=/path/my_ooo_about.png
1275 AC_ARG_WITH(startcenter-left-bitmap,
1276 [ --with-startcenter-left-bitmap Similarly to --with-intro-bitmap, this allows
1277 specification of bitmap for the Start center.
1279 Usage: --with-startcenter-left-bitmap=/path/my_backing_left.png
1282 AC_ARG_WITH(startcenter-right-bitmap,
1283 [ --with-startcenter-right-bitmap Similarly to --with-intro-bitmap, this allows
1284 specification of bitmap for the Start center.
1286 Usage: --with-startcenter-right-bitmap=/path/my_backing_right.png
1289 AC_ARG_WITH(startcenter-rtl-left-bitmap,
1290 [ --with-startcenter-rtl-left-bitmap Similarly to --with-intro-bitmap, this allows
1291 specification of bitmap for the Start center.
1293 Usage: --with-startcenter-rtl-left-bitmap=/path/my_backing_rtl_left.png
1296 AC_ARG_WITH(startcenter-rtl-right-bitmap,
1297 [ --with-startcenter-rtl-right-bitmap Similarly to --with-intro-bitmap, this allows
1298 specification of bitmap for the Start center.
1300 Usage: --with-startcenter-rtl-right-bitmap=/path/my_backing_rtl_right.png
1303 AC_ARG_WITH(startcenter-space-bitmap,
1304 [ --with-startcenter-space-bitmap Similarly to --with-intro-bitmap, this allows
1305 specification of bitmap for the Start center.
1307 Usage: --with-startcenter-space-bitmap=/path/my_backing_space.png
1311 AS_HELP_STRING([--with-vendor],
1312 [Set vendor of the build.])
1314 Usage: --with-vendor="John the Builder"
1318 AC_ARG_WITH(unix-wrapper,
1319 AS_HELP_STRING([--with-unix-wrapper],
1320 [Redefines the name of the UNIX wrapper that will be used in the desktop
1321 files and in the desktop-integration RPMs.])
1323 Usage: --with-unix-wrapper=ooffice
1327 AC_ARG_WITH(compat-oowrappers,
1328 AS_HELP_STRING([--with-compat-oowrappers],
1329 [Install oo* wrappers in parallel with
1330 lo* ones to keep backward compatibility.
1331 Has effect only with make distro-pack-install]),
1334 AC_ARG_WITH(asm-home,
1335 AS_HELP_STRING([--with-asm-home],
1336 [For Windows, please supply the path for the ml.exe or ml64.exe assembler.])
1338 Usage: --with-asm-home=<path to assembler directory>
1342 AC_ARG_WITH(os-version,
1343 AS_HELP_STRING([--with-os-version],
1344 [For FreeBSD users, use this option option to override the detected OSVERSION.])
1346 Usage: --with-os-version=<OSVERSION>
1350 AC_ARG_WITH(mingw-cross-compiler,
1351 AS_HELP_STRING([--with-mingw-cross-compiler],
1352 [Specify the MinGW cross-compiler to use.])
1354 Usage: --with-mingw-cross-compiler=<mingw32-g++ command>
1356 When building on the ODK on Unix and building unowinreg.dll,
1357 specify the MinGW C++ cross-compiler.
1361 AC_ARG_WITH(build-version,
1362 AS_HELP_STRING([--with-build-version],
1363 [Allows the builder to add a custom version tag that will appear in the
1364 Help/About box for QA purposes.])
1366 Usage: --with-build-version="Built by Jim"
1368 with_build_version=$withval ,
1372 AS_HELP_STRING([--with-alloc],
1373 [Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
1374 Note that on FreeBSD/NetBSD system==jemalloc]),
1377 AC_ARG_WITH(sun-templates,
1378 AS_HELP_STRING([--with-sun-templates],
1379 [Integrate Sun template packages.]),
1382 AC_ARG_WITH(num-cpus,
1383 AS_HELP_STRING([--with-num-cpus],
1384 [Number of build processes/cpus to use (number of projects that will build at the same time).
1385 Multi-process/multi-cpu builds can save a lot of time on multi-cpu machines.
1386 Defaults to the number of CPUs on the machine.]),
1389 AC_ARG_WITH(max-jobs,
1390 AS_HELP_STRING([--with-max-jobs],
1391 [Maximum number of jobs per one CPU that will be issued at the same time by dmake.
1392 The real number of the jobs is affected by the --with-num-cpus too, it can get up to CPUS*max_jobs.
1393 Defaults to 1, unless you configure --enable-icecream - then to 10.]),
1396 dnl ===================================================================
1397 dnl MacOSX build and runtime environment options
1398 dnl ===================================================================
1400 AC_ARG_WITH(macosx-sdk,
1401 AS_HELP_STRING([--with-macosx-sdk],
1402 [Use a specific SDK for building.])
1404 Usage: --with-macosx-sdk=<version>
1406 e. g.: --with-macosx-sdk=10.4
1408 there are 3 options to controle the MacOSX build:
1409 --with-macosx-sdk (refered as 'sdl' below)
1410 --with-macosx-version-min-required (refered as 'min' below)
1411 --with-macosx-version-max-allowed (refered as 'max' below)
1413 the connection between these value and the default they take is as follow:
1414 ( ? means not specified on the command line, constraint: x <= y <= z)
1416 ==========================================
1417 command line || config result
1418 ==========================================
1419 min | max | sdk || min | max | sdk |
1420 ? | ? | ? || 10.4 | 10.4 | 10.4 |
1421 ? | ? | 10.x || 10.4 | 10.4 | 10.x |
1422 ? | 10.x | ? || 10.4 | 10.x | 10.x |
1423 ? | 10.x | 10.y || 10.4 | 10.x | 10.y |
1424 10.x | ? | ? || 10.x | 10.x | 10.x |
1425 10.x | ? | 10.y || 10.x | 10.x | 10.y |
1426 10.x | 10.y | ? || 10.x | 10.y | 10.y |
1427 10.x | 10.y | 10.z || 10.x | 10.y | 10.z |
1430 see: http://developer.apple.com/library/mac/#technotes/tn2064/_index.html
1431 for a detailled technical explanation of these variables
1433 Note: MACOSX_DEPLOYMENT_TARGET will be set to the value of 'min'.
1438 AC_ARG_WITH(macosx-version-min-required,
1439 AS_HELP_STRING([--with-macosx-version-min-required],
1440 [set the minimum OS version needed to run the built LibreOffice])
1442 Usage: --with-macosx-version-min-required=<version>
1444 e. g.: --with-macos-version-min-required=10.4
1445 see --with-macosx-sdk for more info
1449 AC_ARG_WITH(macosx-version-max-allowed,
1450 AS_HELP_STRING([--with-macosx-version-max-allowed],
1451 [set the maximum allowed OS version the LibreOffice compilation can use APIs from])
1453 Usage: --with-macosx-version-max-allowed=<version>
1455 e. g.: --with-macos-version-max-allowed=10.6
1456 see --with-macosx-sdk for more info
1464 MINGW_EXTERNAL_DLLS=""
1466 if test -n "$SOLARENV" ; then
1467 AC_MSG_ERROR([You have sourced Env.Host.sh in this shell. This may lead to trouble, please run in a fresh (login) shell.])
1470 echo "********************************************************************"
1472 echo "* Running ${PACKAGE_NAME} build configuration."
1474 echo "********************************************************************"
1477 dnl ===================================================================
1478 dnl checks build and host OSes
1479 dnl ===================================================================
1482 if test "$cross_compiling" = "yes"; then
1486 BUILD_TYPE="$BUILD_TYPE NATIVE"
1488 AC_SUBST(CROSS_COMPILING)
1490 if test "$build_os" = "cygwin"; then
1491 EXEEXT_FOR_BUILD=.exe
1495 AC_SUBST(EXEEXT_FOR_BUILD)
1497 dnl ===================================================================
1498 dnl check for required programs (grep, awk, sed, bash)
1499 dnl ===================================================================
1500 cat /dev/null > warn
1502 if test "z$EUID" = "z0" -a "z`uname -o 2>/dev/null`" = "zCygwin"; then
1503 AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account])
1511 AC_PATH_PROG( AWK, $AWK)
1512 if test -z "$AWK"; then
1513 AC_MSG_ERROR([install awk to run this script])
1516 AC_PATH_PROGS(SED, sed )
1517 if test -z "$SED"; then
1518 AC_MSG_ERROR([install sed to run this script])
1521 AC_PATH_PROG(BASH, bash)
1522 if test -z "$BASH"; then
1523 AC_MSG_ERROR([bash not found in \$PATH])
1527 AC_MSG_CHECKING([for GNU or BSD tar])
1528 for a in $GNUTAR gtar gnutar tar; do
1529 $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
1530 if test $? -eq 0; then
1535 AC_MSG_RESULT($GNUTAR)
1536 if test -z "$GNUTAR"; then
1537 AC_MSG_ERROR([not found. install GNU or BSD tar.])
1541 dnl ===================================================================
1542 dnl The following is a list of supported systems.
1543 dnl Sequential to keep the logic very simple
1544 dnl These values may be checked and reset later.
1545 dnl ===================================================================
1546 #defaults unless the os test overrides this:
1560 AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
1561 if test -z "$GNUTAR"; then
1562 AC_MSG_ERROR([gtar (GNU tar) not found but needed. Install it (Sun Freeware package).])
1566 dnl ===========================================================
1567 dnl Check whether we're using Solaris 6,7,8 - SPARC or Intel.
1568 dnl ===========================================================
1569 AC_MSG_CHECKING([the Solaris operating system release])
1570 _os_release=`echo $host_os | $SED -e s/solaris2\.//`
1571 if test "$_os_release" -lt "6"; then
1572 AC_MSG_ERROR([use Solaris >= 6 to build LibreOffice])
1574 AC_MSG_RESULT([ok ($_os_release)])
1577 dnl Check whether we're using a SPARC or i386 processor
1578 AC_MSG_CHECKING([the processor type])
1579 if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then
1580 AC_MSG_RESULT([ok ($host_cpu)])
1582 AC_MSG_ERROR([only SPARC and i386 processors are supported])
1586 linux-gnu*|k*bsd*-gnu*)
1592 test_unix_quickstarter=yes
1601 cygwin*|interix*|mingw32*)
1603 # When building on Windows normally with MSVC under Cygwin,
1604 # configure thinks that the host platform (the platform the
1605 # built code will run on) is Cygwin, even if it obviously is
1606 # Windows, which in Autoconf terminology is called
1607 # "mingw32". (Which is misleading as MinGW is the name of the
1608 # tool-chain, not an operating system.)
1610 # Somewhat confusing, yes. But this configure script doesn't
1611 # look at $host etc that much, it mostly uses its own $_os
1612 # variable, set here in this case statement.
1614 # When cross-compiling to Windows from Unix, the host platform
1615 # is "mingw32" (because in that case it is the MinGW
1616 # tool-chain that is used).
1624 # If the host OS matches "mingw32*", that means we are using the
1625 # MinGW cross-compiler, because we don't see the point in building
1626 # LibreOffice using MinGW on Windows. If you want to build on
1627 # Windows, use MSVC. If you want to use MinGW, surely you want to
1628 # cross-compile (from Linux or some other Unix).
1633 if test -z "$CC" ; then
1634 CC="$host_cpu-$host_vendor-$host_os-gcc"
1636 if test -z "$CXX" ; then
1637 CXX="$host_cpu-$host_vendor-$host_os-g++"
1643 darwin*) # Mac OS X or iOS
1648 if test "$host_cpu" = "arm"; then
1664 AC_MSG_CHECKING([the FreeBSD operating system release])
1665 if test -n "$with_os_version"; then
1666 OSVERSION="$with_os_version"
1668 OSVERSION=`/sbin/sysctl -n kern.osreldate`
1670 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
1671 AC_MSG_CHECKING([which thread library to use])
1672 if test "$OSVERSION" -lt "500016"; then
1673 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1674 PTHREAD_LIBS="-pthread"
1675 elif test "$OSVERSION" -lt "502102"; then
1676 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1677 PTHREAD_LIBS="-lc_r"
1680 PTHREAD_LIBS="-pthread"
1682 AC_MSG_RESULT([$PTHREAD_LIBS])
1692 PTHREAD_LIBS="-pthread -lpthread"
1699 PTHREAD_LIBS=-pthread
1707 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1708 PTHREAD_LIBS="-pthread"
1718 PTHREAD_LIBS="-pthread"
1731 test_unix_quickstarter=no
1736 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
1740 if test "$_os" = "AIX"; then
1741 AC_PATH_PROG(GAWK, gawk)
1742 if test -z "$GAWK"; then
1743 AC_MSG_ERROR([gawk not found in \$PATH])
1747 AC_SUBST(WITH_MINGW)
1749 AC_SUBST(PTHREAD_CFLAGS)
1750 AC_SUBST(PTHREAD_LIBS)
1752 dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
1753 dnl desktop OSes from "mobile" ones.
1755 dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
1756 dnl In other words, that when building for an OS that is not a
1757 dnl "desktop" one but a "mobile" one, we are always cross-compiling.
1759 dnl Note the direction of the implication; there is no assumption that
1760 dnl cross-compiling would imply a non-desktop OS.
1762 if test $_os != iOS -a $_os != Android; then
1763 BUILD_TYPE="$BUILD_TYPE DESKTOP"
1766 dnl ===================================================================
1767 dnl Extra check for Windows. Cygwin builds need gcc to build dmake
1768 dnl although MSVC is used to build other build-time tools and
1769 dnl LibreOffice itself.
1770 dnl ===================================================================
1771 if test "$build_os" = "cygwin" ; then
1772 AC_MSG_CHECKING([for Cygwin gcc/g++])
1773 if which gcc > /dev/null && which g++ > /dev/null ; then
1774 AC_MSG_RESULT([found])
1776 AC_MSG_ERROR([Cygwin gcc and g++ are needed, please install them.])
1782 dnl ===================================================================
1783 dnl Checks if ccache is available
1784 dnl ===================================================================
1785 if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \) ; then
1786 if test -z "$CC" ; then
1787 if test -z "$CXX" ; then
1788 AC_PATH_PROG([CCACHE],[ccache],[not found])
1789 if test "$CCACHE" = "not found" ; then
1793 # need to check for ccache version: otherwise prevents
1794 # caching of the results (like "-x objective-c++" for Mac)
1795 if test $_os = Darwin -o $_os = iOS; then
1796 # check ccache version
1797 AC_MSG_CHECKING([whether version of ccache is suitable])
1798 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
1799 CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1800 if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
1801 AC_MSG_RESULT([yes])
1804 AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. ccache will not be used.])
1810 AC_MSG_NOTICE([Automatic ccache detection ingored: CXX is pre-defined])
1814 AC_MSG_NOTICE([Automatic ccache detection ingored: CC is pre-defined])
1821 if test "$CCACHE" != "" ; then
1822 ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
1823 ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
1824 if test "$ccache_size" = "" ; then
1825 ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
1826 if test "$ccache_size" = "" ; then
1829 # we could not determine the size or it was less than 1GB -> disable auto-ccache
1830 if test $ccache_size -lt 1024 ; then
1832 AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-producive: Disabling auto-ccache detection])
1833 echo "ccache's cache size is less than 1GB using it is counter-producive: auto-ccache detection disabled" >> warn
1835 # warn that ccache may be too small for debug build
1836 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build])
1837 echo "ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build" >> warn
1840 if test $ccache_size -lt 5 ; then
1841 #warn that ccache may be too small for debug build
1842 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build])
1843 echo "ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build" >> warn
1848 dnl ===================================================================
1849 dnl Checks for C compiler,
1850 dnl The check for the C++ compiler is later on.
1851 dnl ===================================================================
1853 AC_MSG_CHECKING([gcc home])
1854 if test -z "$with_gcc_home"; then
1855 if test "$enable_icecream" = "yes" ; then
1856 GCC_HOME="/opt/icecream"
1858 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1859 GCC_HOME_SET="false"
1862 GCC_HOME="$with_gcc_home"
1864 AC_MSG_RESULT($GCC_HOME)
1867 if test "$GCC_HOME_SET" = "true" ; then
1868 if test -z "$CC"; then
1869 CC="$GCC_HOME/bin/gcc"
1871 if test -z "$CXX"; then
1872 CXX="$GCC_HOME/bin/g++"
1876 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1877 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
1881 COMPATH=`dirname "$CC"`
1882 if test "$COMPATH" = "." ; then
1883 AC_PATH_PROGS(COMPATH, $CC)
1884 dnl double square bracket to get single because of M4 quote...
1885 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1887 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
1892 dnl ===================================================================
1893 dnl Test MacOSX sdk and version requirement
1894 dnl ===================================================================
1895 if test "$_os" = "Darwin" ; then
1897 if test "$with_macosx_version_min_required" = "" ; then
1898 with_macosx_version_min_required="10.4"
1901 if test "$with_macosx_version_max_allowed" = "" ; then
1902 with_macosx_version_max_allowed="$with_macosx_version_min_required"
1905 if test "$with_macosx_sdk" = "" ; then
1906 with_macosx_sdk="$with_macosx_version_max_allowed"
1909 case "$with_macosx_sdk" in
1912 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.4u.sdk"
1913 if test ! -d "$MACOSX_SDK_PATH"; then
1914 MACOSX_SDK_PATH="/Developer-old/SDKs/MacOSX10.4u.sdk"
1916 macosx_sdk_value="1040"
1919 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.5.sdk"
1920 if test ! -d "$MACOSX_SDK_PATH"; then
1921 MACOSX_SDK_PATH="/Developer-old/SDKs/MacOSX10.5.sdk"
1923 macosx_sdk_value="1050"
1924 AC_MSG_WARN([Building with a SDK > 10.4 is experimental])
1925 echo "Building with a SDK > 10.4 is experimental" >> warn
1928 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.6.sdk"
1929 macosx_sdk_value="1060"
1930 AC_MSG_WARN([Building with a SDK > 10.4 is experimental])
1931 echo "Building with a SDK > 10.4 is experimental" >> warn
1934 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.7.sdk"
1935 macosx_sdk_value="1070"
1936 AC_MSG_WARN([Building with SDK 10.7 is known to fail in vcl])
1937 echo "Building with SDK 10.7 is known to fail in vcl" >> warn
1940 AC_MSG_ERROR([$with_macosx_sdk is not a supported SDK value, supported value are 10.4, 10.5, 10.6 and 10.7])
1943 AC_MSG_CHECKING([the presence of the SDK $with_macosx_sdk])
1944 if test -d "$MACOSX_SDK_PATH" ; then
1945 AC_MSG_RESULT([$MACOSX_SDK_PATH ok])
1947 AC_MSG_ERROR([$MACOSX_SDK_PATH not found])
1949 MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
1951 case "$with_macosx_version_min_required" in
1954 MAC_OS_X_VERSION_MIN_REQUIRED="1040"
1957 MAC_OS_X_VERSION_MIN_REQUIRED="1050"
1958 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
1959 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
1960 if [ -z $save_CC ] ; then
1966 MAC_OS_X_VERSION_MIN_REQUIRED="1060"
1967 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
1968 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
1969 if [ -z "$save_CC" ] ; then
1975 MAC_OS_X_VERSION_MIN_REQUIRED="1070"
1976 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
1977 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
1978 if [ -z "$save_CC" ] ; then
1984 AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported value are 10.4, 10.5, 10.6 and 10.7])
1988 case "$with_macosx_version_max_allowed" in
1991 MAC_OS_X_VERSION_MAX_ALLOWED="1040"
1994 MAC_OS_X_VERSION_MAX_ALLOWED="1050"
1997 MAC_OS_X_VERSION_MAX_ALLOWED="1060"
2000 MAC_OS_X_VERSION_MAX_ALLOWED="1070"
2003 AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported value are 10.4, 10.5, 10.6 and 10.7])
2007 AC_MSG_CHECKING([that macosx-verion-min-required is coherent with macosx-version-max-allowed])
2008 if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED ; then
2009 AC_MSG_ERROR([the version minimumn required must be inferior or equal to the version maximum allowed])
2014 AC_MSG_CHECKING([that macosx-verion-max-allowed is coherent macos-with-sdk])
2015 if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $macosx_sdk_value ; then
2016 AC_MSG_ERROR([the version maximum allowed cannot be greater thatn the sdk level])
2020 AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED])
2021 AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED])
2023 AC_SUBST(MACOSX_SDK_PATH)
2024 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
2025 AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
2026 AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED)
2028 dnl ===================================================================
2029 dnl Test the gcc version, 3 is OK
2030 dnl ===================================================================
2031 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) -a "$GCC" = "yes"; then
2032 AC_MSG_CHECKING([the GNU C compiler version])
2033 _gcc_version=`$CC -dumpversion`
2034 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
2035 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2037 if test "$_os" = "Darwin" -a "$with_macosx_sdk" = "10.4" -a "$GCCVER" -ge "040100" ; then
2038 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
2039 export CC="$GCC_HOME/bin/gcc-4.0"
2040 # export CC to have it available in set_soenv -> config.guess
2041 GCCVER2=`$CC -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2042 if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
2046 if test "$GCCVER" -ge "040100" ; then
2047 AC_MSG_ERROR([You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly])
2049 AC_MSG_RESULT([implicitly using CC=$CC])
2052 AC_MSG_RESULT([checked (gcc $_gcc_version)])
2058 # prefix C with ccache if needed
2060 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" ; then
2061 if test "$CCACHE" != "" ; then
2062 AC_MSG_CHECKING([whether $CC is already ccached])
2067 CFLAGS="$CFLAGS --ccache-skip -O2"
2068 dnl an empty program will do, we're checking the compiler flags
2069 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
2070 [use_ccache=yes], [use_ccache=no])
2071 if test $use_ccache = yes ; then
2072 AC_MSG_RESULT([yes])
2083 HAVE_LD_BSYMBOLIC_FUNCTIONS=
2084 if test "$GCC" = "yes"; then
2085 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
2086 bsymbolic_functions_ldflags_save=$LDFLAGS
2087 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
2088 AC_LINK_IFELSE([AC_LANG_PROGRAM([
2091 printf ("hello world\n");
2092 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
2093 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
2094 AC_MSG_RESULT( found )
2096 AC_MSG_RESULT( not found )
2098 LDFLAGS=$bsymbolic_functions_ldflags_save
2100 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
2102 dnl ===================================================================
2103 dnl Set up a different compiler to produce tools to run on the build
2104 dnl machine when doing cross-compilation
2105 dnl ===================================================================
2107 m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
2108 if test "$cross_compiling" = "yes"; then
2109 AC_MSG_CHECKING([for BUILD platform configuration])
2111 rm -rf CONF-FOR-BUILD Env.Build.sh
2112 mkdir CONF-FOR-BUILD
2122 solenv/inc/langlist.mk \
2123 solenv/inc/postset.mk \
2124 desktop/scripts/soffice.sh.in \
2125 | (cd CONF-FOR-BUILD && tar xf -)
2127 unset COM GUI GUIBASE OS CPU CPUNAME
2128 unset CC CXX SYSBASE CFLAGS
2129 unset PYTHON_CFLAGS PYTHON_LIBS
2130 unset AR NM OBJDUMP PKG_CONFIG RANLIB STRIP
2131 test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
2132 test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
2133 test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
2136 test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
2137 test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
2138 test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
2141 --disable-build-mozilla \
2143 --with-num-cpus="$with_num_cpus" \
2144 --with-max-jobs="$with_max_jobs" \
2146 2>&1 | sed -e 's/^/ /'
2147 test -f ./Env.Host.sh 2>/dev/null || exit
2148 cp Env.Host.sh ../Env.Build.sh
2150 for V in COM GUI GUIBASE OS CPU CPUNAME CC CXX GXX_INCLUDE_PATH MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH \
2153 VV=`eval "echo $VV"`
2154 if test -n "$VV"; then
2155 line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
2156 echo "$line" >>build-config
2160 for V in OUTDIR PATH SOLARINC SOLARLIB WORKDIR; do
2162 VV=`eval "echo $VV"`
2163 VV=`echo $VV | sed -e 's,/CONF-FOR-BUILD,,g'`
2164 if test -n "$VV"; then
2165 line="${V}_FOR_BUILD='$VV'"
2166 echo "$line" >>build-config
2170 test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
2171 test -f Env.Build.sh || AC_MSG_ERROR([A file called Env.Build.sh was supposed to have been copied here, but it isn't found])
2172 perl -pi -e 's,/CONF-FOR-BUILD,,g' Env.Build.sh
2173 eval `cat CONF-FOR-BUILD/build-config`
2174 AC_MSG_RESULT([checking for BUILD platform configuration... done])
2175 rm -rf CONF-FOR-BUILD
2178 CXX_FOR_BUILD="$CXX"
2180 AC_SUBST(COM_FOR_BUILD)
2181 AC_SUBST(GUI_FOR_BUILD)
2182 AC_SUBST(GUIBASE_FOR_BUILD)
2183 AC_SUBST(OS_FOR_BUILD)
2184 AC_SUBST(CPU_FOR_BUILD)
2185 AC_SUBST(CPUNAME_FOR_BUILD)
2186 AC_SUBST(CC_FOR_BUILD)
2187 AC_SUBST(CXX_FOR_BUILD)
2188 AC_SUBST(GXX_INCLUDE_PATH_FOR_BUILD)
2189 AC_SUBST(INPATH_FOR_BUILD)
2190 AC_SUBST(OUTPATH_FOR_BUILD)
2191 AC_SUBST(MACOSX_DEPLOYMENT_TARGET_FOR_BUILD)
2192 AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
2194 AC_SUBST(OUTDIR_FOR_BUILD)
2195 AC_SUBST(PATH_FOR_BUILD)
2196 AC_SUBST(SOLARINC_FOR_BUILD)
2197 AC_SUBST(SOLARLIB_FOR_BUILD)
2198 AC_SUBST(WORKDIR_FOR_BUILD)
2200 UPD="`echo AC_PACKAGE_VERSION | sed "s/\.//"`0"
2201 SOURCEVERSION="OOO$UPD"
2203 AC_SUBST(SOURCEVERSION)
2205 dnl ===================================================================
2206 dnl Set the ENABLE_CRASHDUMP variable.
2207 dnl ===================================================================
2208 AC_MSG_CHECKING([whether to enable crashdump feature])
2209 if test "$enable_crashdump" = "yes"; then
2210 ENABLE_CRASHDUMP="TRUE"
2211 BUILD_TYPE="$BUILD_TYPE CRASHREP"
2212 AC_MSG_RESULT([yes])
2217 AC_SUBST(ENABLE_CRASHDUMP)
2220 dnl ===================================================================
2221 dnl Windows specific tests and stuff
2222 dnl ===================================================================
2223 if test "$_os" = "WINNT"; then
2225 dnl Include twain scanners
2226 BUILD_TYPE="$BUILD_TYPE TWAIN"
2228 dnl Set the CL_X64 variable if we are building a 64-bit LibreOffice.
2229 AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
2230 if test "z$enable_cl_x64" = "z" -o "$enable_cl_x64" = "no"; then
2235 AC_MSG_RESULT([yes])
2239 AC_MSG_CHECKING([whether to use DirectX])
2240 if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
2241 ENABLE_DIRECTX="TRUE"
2242 AC_MSG_RESULT([yes])
2247 AC_SUBST(ENABLE_DIRECTX)
2249 AC_MSG_CHECKING([whether to use ActiveX])
2250 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
2252 AC_MSG_RESULT([yes])
2254 DISABLE_ACTIVEX="TRUE"
2257 AC_SUBST(DISABLE_ACTIVEX)
2259 AC_MSG_CHECKING([whether to use ATL])
2260 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE"; then
2262 AC_MSG_RESULT([yes])
2263 elif test "$enable_atl" = ""; then
2264 if test "$WITH_MINGW" = "yes"; then
2269 AC_MSG_RESULT([yes])
2275 AC_SUBST(DISABLE_ATL)
2278 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
2279 dnl ===================================================================
2280 AC_MSG_CHECKING([whether to turn warnings to errors])
2281 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
2282 ENABLE_WERROR="TRUE"
2283 AC_MSG_RESULT([yes])
2285 ENABLE_WERROR="FALSE"
2288 AC_SUBST(ENABLE_WERROR)
2290 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
2291 dnl ===================================================================
2292 AC_MSG_CHECKING([whether to do a debug build])
2293 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
2295 enable_symbols="yes"
2296 AC_MSG_RESULT([yes])
2298 ENABLE_DEBUG="FALSE"
2301 AC_SUBST(ENABLE_DEBUG)
2303 dnl Set the ENABLE_DBGUTIL variable
2304 dnl ===================================================================
2305 AC_MSG_CHECKING([whether to build with additional debug utilities])
2306 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
2309 AC_MSG_RESULT([yes])
2310 # cppunit and graphite expose STL in public headers
2311 if test "$with_system_cppunit" = "yes"; then
2312 AC_MSG_ERROR([--with-system-cppunit conflicts with DBG_UTIL build])
2314 with_system_cppunit=no
2316 if test "$with_system_graphite" = "yes"; then
2317 AC_MSG_ERROR([--with-system-graphite conflicts with DBG_UTIL build])
2319 with_system_graphite=no
2321 if test "$with_system_mysql_cppconn" = "yes"; then
2322 AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with DBG_UTIL build])
2324 with_system_mysql_cppconn=no
2326 if test $_os = WINNT -a \
2327 \( "$enable_mozilla" != no -o \
2328 "$enable_build_mozilla" != no \); then
2329 # We can't build against the Mozilla stuff if using _DEBUG, will get linking errors
2330 # See connectivity/drivers/mozab
2331 AC_MSG_WARN([Also disabling Mozilla stuff then])
2333 enable_build_mozilla=no
2338 AC_MSG_RESULT([no, full product build])
2343 dnl Determine whether to use linkoo for the smoketest installation
2344 dnl ===================================================================
2345 AC_MSG_CHECKING([whether to use linkoo for the smoketest installation])
2346 if test "$enable_linkoo" = "no"; then
2347 DISABLE_LINKOO="TRUE"
2351 AC_MSG_RESULT([yes])
2353 AC_SUBST(DISABLE_LINKOO)
2355 # Set the ENABLE_LTO variable
2356 # ===================================================================
2357 AC_MSG_CHECKING([whether to use link-time optimization])
2358 if test -n "$enable_lto" -a "$enable_lto" != "no"; then
2360 AC_MSG_RESULT([yes])
2365 AC_SUBST(ENABLE_LTO)
2367 dnl whether to include symbols into final build.
2368 dnl ===================================================================
2369 AC_MSG_CHECKING([whether to include symbols])
2370 if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
2371 ENABLE_SYMBOLS="TRUE"
2372 AC_MSG_RESULT([yes])
2377 AC_SUBST(ENABLE_SYMBOLS)
2379 dnl Determine if the solver is to be stripped or not.
2380 dnl ===================================================================
2381 AC_MSG_CHECKING([whether to strip the solver or not.])
2382 if test "z$enable_strip_solver" = "zno"; then
2383 DISABLE_STRIP="TRUE"
2386 if test -n "$ENABLE_SYMBOLS"; then
2387 DISABLE_STRIP="TRUE"
2391 AC_MSG_RESULT([yes])
2394 AC_SUBST(DISABLE_STRIP)
2396 dnl check for cups support
2397 dnl ===================================================================
2398 if test "$test_cups" = "yes"; then
2399 AC_MSG_CHECKING([whether cups support is present])
2400 AC_CHECK_LIB(cups, cupsPrintFiles)
2401 AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
2402 if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then
2403 AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups???-devel.])
2408 # check for fontconfig support
2409 AC_MSG_CHECKING([whether we need fontconfig])
2410 if test "z$test_fontconfig" = "zyes"; then
2411 ENABLE_FONTCONFIG="TRUE"
2412 AC_MSG_RESULT([yes])
2413 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0])
2415 ENABLE_FONTCONFIG=""
2418 AC_SUBST(ENABLE_FONTCONFIG)
2419 AC_SUBST(FONTCONFIG_CFLAGS)
2420 AC_SUBST(FONTCONFIG_LIBS)
2422 dnl whether to find & fetch external tarballs?
2423 dnl ===================================================================
2424 if test -z "$TARFILE_LOCATION"; then
2425 TARFILE_LOCATION="DEFAULT"
2427 AC_SUBST(TARFILE_LOCATION)
2429 if test "z$enable_fetch_external" != "zno" ; then
2430 DO_FETCH_TARBALLS="YES"
2432 AC_SUBST(DO_FETCH_TARBALLS)
2436 dnl ===================================================================
2437 AC_SUBST(GIT_LINK_SRC)
2439 dnl Disable legacy binary file formats filters
2440 dnl ===================================================================
2441 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
2442 if test "$enable_binfilter" = "no"; then
2446 WITH_BINFILTER="YES"
2447 BUILD_TYPE="$BUILD_TYPE BINFILTER"
2448 GIT_REPO_NAMES="$GIT_REPO_NAMES binfilter"
2449 AC_MSG_RESULT([yes])
2451 AC_SUBST(WITH_BINFILTER)
2453 AC_MSG_CHECKING([whether to build help])
2454 if test "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
2455 AC_MSG_RESULT([yes])
2456 BUILD_TYPE="$BUILD_TYPE HELP"
2457 SCPDEFS="$SCPDEFS -DWITH_HELP"
2458 GIT_REPO_NAMES="$GIT_REPO_NAMES help"
2463 dnl Enable ugly pieces of code we're better off without
2464 dnl ===================================================================
2465 if test "$enable_ugly" = "yes"; then
2466 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
2467 SCPDEFS="$SCPDEFS -DWITH_UGLY"
2472 AC_SUBST(ENABLE_UGLY)
2474 dnl ===================================================================
2475 dnl Disable rpath in shared libraries?
2476 dnl ===================================================================
2477 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
2478 if test "$enable_rpath" = "no"; then
2483 AC_MSG_RESULT([$ENABLE_RPATH])
2484 AC_SUBST(ENABLE_RPATH)
2486 dnl Test whether to include MySpell dictionaries
2487 dnl ===================================================================
2488 AC_MSG_CHECKING([whether to include MySpell dictionaries])
2489 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
2490 AC_MSG_RESULT([yes])
2491 WITH_MYSPELL_DICTS=YES
2492 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
2493 GIT_REPO_NAMES="$GIT_REPO_NAMES dictionaries"
2496 WITH_MYSPELL_DICTS=NO
2498 AC_SUBST(WITH_MYSPELL_DICTS)
2500 AC_MSG_CHECKING([whether to use dicts from external paths])
2501 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
2502 AC_MSG_RESULT([yes])
2504 AC_MSG_CHECKING([for spelling dictionary directory])
2505 if test -n "$with_external_dict_dir"; then
2506 DICT_SYSTEM_DIR=file://$with_external_dict_dir
2508 DICT_SYSTEM_DIR=file:///usr/share/hunspell
2510 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
2511 AC_MSG_CHECKING([for hyphenation patterns directory])
2512 if test -n "$with_external_hyph_dir"; then
2513 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
2515 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
2517 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
2518 AC_MSG_CHECKING([for thesaurus directory])
2519 if test -n "$with_external_thes_dir"; then
2520 THES_SYSTEM_DIR=file://$with_external_thes_dir
2522 THES_SYSTEM_DIR=file:///usr/share/mythes
2524 AC_MSG_RESULT([$THES_SYSTEM_DIR])
2529 AC_SUBST(SYSTEM_DICTS)
2530 AC_SUBST(DICT_SYSTEM_DIR)
2531 AC_SUBST(HYPH_SYSTEM_DIR)
2532 AC_SUBST(THES_SYSTEM_DIR)
2534 dnl ===================================================================
2535 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
2536 dnl ===================================================================
2537 AC_MSG_CHECKING([whether to enable pch feature])
2538 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
2539 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
2541 AC_MSG_RESULT([yes])
2542 dnl There is no PCH support in GCC versions prior to this
2543 elif test "$GCC" = "yes"; then
2545 AC_MSG_RESULT([yes])
2548 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
2554 AC_SUBST(ENABLE_PCH)
2556 dnl ===================================================================
2557 dnl Search all the common names for GNU make
2558 dnl ===================================================================
2559 AC_MSG_CHECKING([for GNU make])
2561 # try to use our own make if it is available and GNUMAKE was not already defined
2562 if test -z "$GNUMAKE"; then
2563 if test -x "/opt/lo/bin/make"; then
2564 GNUMAKE="/opt/lo/bin/make"
2568 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
2569 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
2570 if test $? -eq 0; then
2575 AC_MSG_RESULT($GNUMAKE)
2576 if test -z "$GNUMAKE"; then
2577 AC_MSG_ERROR([not found. install GNU make.])
2580 AC_MSG_CHECKING([the GNU make version])
2581 _make_version=`$GNUMAKE --version | grep GNU | grep -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2582 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2583 if test "$_make_longver" -ge "038200" ; then
2584 AC_MSG_RESULT([$GNUMAKE $_make_version])
2586 elif test "$_make_longver" -ge "038100" ; then
2587 AC_MSG_RESULT([$GNUMAKE $_make_version])
2588 AC_MSG_CHECKING([for GNU make bug 20033])
2589 TESTGMAKEBUG20033=`mktemp -d`
2590 cat > $TESTGMAKEBUG20033/Makefile << EOF
2591 A := \$(wildcard *.a)
2595 @echo survived bug20033. #dont kill these tabs, you will break the Makefile!!!!
2599 @touch 1.a 2.a 3.a 4.a 5.a 6.a
2612 \$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | sha1sum))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\
2613 \$(call d1,\$(CHECKSUM)),\
2614 \$(call d2,\$(CHECKSUM)))
2616 if test -z "`(cd $TESTGMAKEBUG20033 && $GNUMAKE setup && $GNUMAKE -j)|grep survived`"; then
2617 no_parallelism_make="YES"
2618 AC_MSG_RESULT([yes, disable parallelism])
2620 AC_MSG_RESULT([no, keep parallelism enabled])
2622 rm -rf $TESTGMAKEBUG20033
2624 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
2628 _make_ver_check=`$GNUMAKE --version | grep LibreOffice`;
2631 if test "z$_make_ver_check" = "z"; then
2634 AC_SUBST(STALE_MAKE)
2636 dnl ===================================================================
2637 dnl Test the Solaris compiler version
2638 dnl ===================================================================
2639 if test "$_os" = "SunOS"; then
2640 if test "$CC" = "cc"; then
2641 AC_PATH_PROGS(_cc, cc)
2642 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
2643 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
2644 dnl cc -V outputs to standard error!!!!
2645 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'`
2646 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
2647 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
2648 if test "$_sunstudio_major" != "5"; then
2649 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2651 _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'`
2652 if test "$_sunstudio_minor" = "false"; then
2653 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2655 dnl compiler will do
2656 AC_MSG_RESULT([checked])
2662 HAVE_LD_HASH_STYLE=FALSE
2663 WITH_LINKER_HASH_STYLE=
2664 AC_MSG_CHECKING( for --hash-style gcc linker support )
2665 if test "$GCC" = "yes" ; then
2666 if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes" ; then
2667 hash_styles="gnu sysv"
2668 elif test "$with_linker_hash_style" = "no" ; then
2671 hash_styles="$with_linker_hash_style"
2674 for hash_style in $hash_styles ; do
2675 test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
2676 hash_style_ldflags_save=$LDFLAGS
2677 LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
2679 AC_LINK_IFELSE([AC_LANG_PROGRAM(
2685 [ if ./conftest$EXEEXT; then
2686 HAVE_LD_HASH_STYLE=TRUE
2687 WITH_LINKER_HASH_STYLE=$hash_style
2689 [HAVE_LD_HASH_STYLE=FALSE])
2690 LDFLAGS=$hash_style_ldflags_save
2693 if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
2694 AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
2698 LDFLAGS=$hash_style_ldflags_save
2702 AC_SUBST(HAVE_LD_HASH_STYLE)
2703 AC_SUBST(WITH_LINKER_HASH_STYLE)
2705 dnl ===================================================================
2706 dnl Check whether there's a Perl version available.
2707 dnl ===================================================================
2708 if test -z "$with_perl_home"; then
2709 AC_PATH_PROG(PERL, perl)
2711 test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
2712 _perl_path="$with_perl_home/bin/perl"
2713 if test -x "$_perl_path"; then
2716 AC_MSG_ERROR([$_perl_path not found])
2720 dnl ===================================================================
2721 dnl Testing for Perl version 5 or greater.
2722 dnl $] is the Perl version variable, it is returned as an integer
2723 dnl ===================================================================
2724 if test "$PERL"; then
2725 AC_MSG_CHECKING([the Perl version])
2726 ${PERL} -e "exit($]);"
2728 if test "$_perl_version" -lt 5; then
2729 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
2731 AC_MSG_RESULT([checked (perl $_perl_version)])
2733 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
2737 dnl ===================================================================
2738 dnl Testing for required Perl modules
2739 dnl ===================================================================
2741 AC_MSG_CHECKING([for required Perl modules])
2742 if `$PERL -e 'use Archive::Zip; use Cwd;'`; then
2743 AC_MSG_RESULT([all modules found])
2745 AC_MSG_ERROR([Failed to find some modules])
2748 dnl ===================================================================
2749 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
2750 dnl ===================================================================
2751 SHOWINCLUDES_PREFIX=
2752 if test "$_os" = "WINNT"; then
2753 if test "$WITH_MINGW" != "yes"; then
2754 AC_MSG_CHECKING([for a friendly Microsoft C/C++ compiler installation path])
2755 if test -z "$with_cl_home"; then
2756 vctest=`./oowintool --msvc-productdir`;
2757 if test "$CL_X64" = ""; then
2758 if test -x "$vctest/bin/cl.exe"; then
2759 with_cl_home=$vctest;
2762 if test -x "$vctest/bin/amd64/cl.exe"; then
2763 with_cl_home=$vctest;
2767 with_cl_home=`cygpath -u "$with_cl_home"`
2769 with_cl_home=`cygpath -d "$with_cl_home"`
2770 with_cl_home=`cygpath -u "$with_cl_home"`
2771 AC_MSG_RESULT([$with_cl_home])
2773 dnl ===========================================================
2774 dnl Check for mspdb80.dll/mspdb100.dll
2775 dnl ===========================================================
2776 dnl MSVS 2008/10 Compiler
2777 if test -n "$with_mspdb_path";then
2778 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
2780 if test -e "$with_mspdb_path/mspdb80.dll" -o -e "$with_mspdb_path/mspdb100.dll"; then
2781 MSPDB_PATH="$with_mspdb_path"
2784 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
2785 MSPDB_PATH="$with_cl_home/../Common7/IDE"
2787 dnl Windows SDK 6.0 case
2788 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
2789 MSPDB_PATH="$with_cl_home/bin"
2792 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb100.dll"; then
2793 MSPDB_PATH="$with_cl_home/../Common7/IDE"
2796 if test -z "$MSPDB_PATH";then
2797 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
2798 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
2799 AC_PATH_PROG(MSPDB_PATH, mspdb100.dll)
2800 MSPDB_PATH=`dirname "$MSPDB_PATH"`
2803 if test -z "$MSPDB_PATH"; then
2804 AC_MSG_ERROR([You need a mspdb80.dllor mspdb100.dll, make sure it is in the path or use --with-mspdb-path])
2806 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
2807 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
2808 dnl The path needs to be added before cl is called
2809 PATH="$MSPDB_PATH:$PATH"
2811 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
2812 if test -z "$CC"; then
2813 if test "$CL_X64" = ""; then
2814 if test -x "$with_cl_home/bin/cl.exe"; then
2815 CC="$with_cl_home/bin/cl.exe"
2818 if test -x "$with_cl_home/bin/amd64/cl.exe"; then
2819 CC="$with_cl_home/bin/amd64/cl.exe"
2822 if test -z "$CC"; then
2823 AC_PATH_PROG(CC, cl.exe)
2825 # This gives us a posix path with 8.3 filename restrictions
2826 CC=`cygpath -d "$CC"`
2827 CC=`cygpath -u "$CC"`
2830 if test -n "$CC"; then
2831 # Remove /cl.exe from CC case insensitive
2832 AC_MSG_RESULT([found ($CC)])
2833 if test "$CL_X64" = ""; then
2834 COMPATH=`echo $CC | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
2836 if test -n "$with_cl_home"; then
2837 COMPATH=`echo $with_cl_home`
2840 export INCLUDE=`cygpath -d "$COMPATH/Include"`
2841 dnl Check which Microsoft C/C++ compiler is found
2842 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
2843 # The following finds Microsoft, matches nn.nn.nnnn then pulls numbers out.
2844 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
2845 x = match( \\\$0, /..\\...\\...../ )
2846 CCversion = substr( \\\$0, RSTART, RLENGTH)
2847 tokencount = split (CCversion,vertoken,\".\")
2848 for ( i = 1 ; i <= tokencount ; i++ ) {
2849 printf (\"%04d\",vertoken[[i]] )
2852 if test "$CCNUMVER" -ge "001600000000"; then
2855 elif test "$CCNUMVER" -ge "001500000000"; then
2859 AC_MSG_ERROR([Compiler too old. Use Microsoft Visual Studio 2008 or 2010.])
2861 AC_MSG_RESULT([found compiler version $CCNUMVER (MSVS $MSVSVER).])
2863 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
2866 dnl We need to guess the prefix of the -showIncludes output, it can be
2868 AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
2869 echo "#include <stdlib.h>" > conftest.c
2870 SHOWINCLUDES_PREFIX=`$CC -c -showIncludes conftest.c 2>/dev/null | \
2871 grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
2872 rm -f conftest.c conftest.obj
2873 if test -z "$SHOWINCLUDES_PREFIX" ; then
2874 AC_MSG_ERROR([cannot determine the -showIncludes prefix])
2876 AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
2879 # Check for 64-bit (cross-)compiler to use to build the 64-bit
2880 # version of the Explorer extension (and maybe other small
2881 # bits, too) needed when installing a 32-bit LibreOffice on a
2882 # 64-bit OS. The 64-bit Explorer extension is a feature that
2883 # has been present since long in OOo. Don't confuse it with
2884 # building LibreOffice itself as 64-bit code, which is
2885 # unfished work and highly experimental.
2892 AC_MSG_CHECKING([for a x64 compiler and libraries for 64bit ActiveX component])
2893 if test "$CL_X64" = "" -a -f "$with_cl_home/atlmfc/lib/amd64/atls.lib"; then
2894 # Prefer native x64 compiler to cross-compiler, in case we are running
2895 # the build on a 64-bit OS.
2896 if "$with_cl_home/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
2898 CC_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
2899 CXX_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
2900 LINK_X64_BINARY="$with_cl_home/bin/amd64/link.exe"
2901 LIBMGR_X64_BINARY="$with_cl_home/bin/amd64/lib.exe"
2902 elif "$with_cl_home/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
2904 CC_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
2905 CXX_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
2906 LINK_X64_BINARY="$with_cl_home/bin/x86_amd64/link.exe"
2907 LIBMGR_X64_BINARY="$with_cl_home/bin/x86_amd64/lib.exe"
2910 if test "$BUILD_X64" = TRUE; then
2911 AC_MSG_RESULT([found])
2913 AC_MSG_RESULT([not found])
2914 AC_MSG_WARN([Installation set will not contain the 64-bit Explorer extension])
2918 # These are passed to the environment through set_soenv.in as usual, and then
2919 # used in set_wntx64.mk
2920 AC_SUBST(CC_X64_BINARY)
2921 AC_SUBST(CXX_X64_BINARY)
2922 AC_SUBST(LINK_X64_BINARY)
2923 AC_SUBST(LIBMGR_X64_BINARY)
2926 AC_MSG_CHECKING([the compiler is MinGW])
2927 MACHINE_PREFIX=`$CC -dumpmachine`
2928 if echo $MACHINE_PREFIX | grep -q mingw32; then
2929 AC_MSG_RESULT([yes])
2931 AC_MSG_ERROR([Compiler is not MinGW.])
2936 AC_SUBST(MSPDB_PATH)
2937 AC_SUBST(SHOWINCLUDES_PREFIX)
2939 dnl ===================================================================
2940 dnl Check for pkg-config
2941 dnl ===================================================================
2942 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
2946 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
2948 # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
2949 # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
2950 # explicitly. Or put /path/to/compiler in PATH yourself.
2952 AC_CHECK_TOOL(AR,ar)
2953 AC_CHECK_TOOL(NM,nm)
2954 AC_CHECK_TOOL(OBJDUMP,objdump)
2955 AC_CHECK_TOOL(RANLIB,ranlib)
2956 AC_CHECK_TOOL(STRIP,strip)
2957 if test "$_os" = "WINNT"; then
2958 AC_CHECK_TOOL(DLLTOOL,dlltool)
2959 AC_CHECK_TOOL(WINDRES,windres)
2966 AC_SUBST(PKG_CONFIG)
2971 dnl ===================================================================
2972 dnl pkg-config checks on Mac OS X
2973 dnl ===================================================================
2975 if test $_os = Darwin; then
2976 AC_MSG_CHECKING([for bogus pkg-config])
2977 if test -n "$PKG_CONFIG"; then
2978 if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | grep -q Mono.framework; then
2979 AC_MSG_RESULT([yes, from Mono])
2981 AC_MSG_RESULT([yes, from unknown origin])
2983 AC_MSG_WARN([This might have unexpected consequences, please consider hiding $PKG_CONFIG])
2984 echo "Having a $PKG_CONFIG might have unexpected consequences, please consider hiding it" >>warn
2990 dnl ===================================================================
2991 dnl .NET needs special treatment
2992 dnl (does the above comment really mean .NET, or is it misusing
2993 dnl that to mean Visual Studio .NET 2003 ? And does this also
2994 dnl in fact apply equally to what we actually support, i.e.
2995 dnl Visual Studio 2008 and 2010?)
2996 dnl ===================================================================
2997 if test "$build_os" = "cygwin"; then
2999 AC_PATH_PROG(MIDL_PATH, midl.exe)
3000 if test -n "$MIDL_PATH";then
3001 MIDL_PATH=`dirname "$MIDL_PATH"`
3003 if test -n "$with_midl_path";then
3004 with_midl_path=`cygpath -u "$with_midl_path"`
3006 if test -x "$with_midl_path/midl.exe"; then
3007 MIDL_PATH="$with_midl_path"
3009 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
3010 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
3012 if test -z "$MIDL_PATH" ; then
3013 vstest=`./oowintool --msvs-productdir`;
3014 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
3015 MIDL_PATH="$vstest/Common7/Tools/Bin"
3018 if test -z "$MIDL_PATH" ; then
3019 winsdktest=`./oowintool --windows-sdk-home`
3020 if test -x "$winsdktest/Bin/midl.exe" ; then
3021 MIDL_PATH="$winsdktest/Bin"
3024 if test ! -x "$MIDL_PATH/midl.exe"; then
3025 AC_MSG_ERROR([midl.exe not found. Make sure it's in PATH or use --with-midl-path])
3027 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3028 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
3029 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
3032 AC_PATH_PROG(CSC_PATH, csc.exe)
3033 if test -n "$CSC_PATH";then
3034 CSC_PATH=`dirname "$CSC_PATH"`
3036 if test -n "$with_csc_path";then
3037 with_csc_path=`cygpath -u "$with_csc_path"`
3039 if test -x "$with_csc_path/csc.exe"; then
3040 CSC_PATH="$with_csc_path"
3042 csctest=`./oowintool --csc-compilerdir`;
3043 if test -x "$csctest/csc.exe"; then
3047 if test ! -x "$CSC_PATH/csc.exe"; then
3048 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
3050 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3051 CSC_PATH=`cygpath -d "$CSC_PATH"`
3052 CSC_PATH=`cygpath -u "$CSC_PATH"`
3054 dnl Check mscoree.lib / .NET Framework dir
3055 AC_MSG_CHECKING(.NET Framework)
3056 if test -n "$with_dotnet_framework_home"; then
3057 with_dotnet_framework_home=`cygpath -u "$with_dotnet_framework_home"`
3059 if test -f "$with_dotnet_framework_home/lib/mscoree.lib"; then
3060 DOTNET_FRAMEWORK_HOME="$with_dotnet_framework_home"
3062 if test -z "$DOTNET_FRAMEWORK_HOME" ; then
3063 frametest=`./oowintool --dotnetsdk-dir`
3064 if test -f "$frametest/lib/mscoree.lib"; then
3065 DOTNET_FRAMEWORK_HOME="$frametest"
3067 frametest=`./oowintool --windows-sdk-home`
3068 if test -f "$frametest/lib/mscoree.lib"; then
3069 DOTNET_FRAMEWORK_HOME="$frametest"
3073 if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib"; then
3074 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-dotnet-framework-home])
3076 AC_MSG_RESULT(found)
3077 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3078 DOTNET_FRAMEWORK_HOME=`cygpath -d "$DOTNET_FRAMEWORK_HOME"`
3079 DOTNET_FRAMEWORK_HOME=`cygpath -u "$DOTNET_FRAMEWORK_HOME"`
3082 AC_SUBST(DOTNET_FRAMEWORK_HOME)
3085 dnl ===================================================================
3086 dnl Check if stdc headers are available excluding MSVC.
3087 dnl ===================================================================
3088 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3092 dnl ===================================================================
3093 dnl Testing for C++ compiler and version...
3094 dnl ===================================================================
3096 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3099 if test -n "$CC" -a -z "$CXX"; then
3104 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
3105 if test "$GXX" = "yes"; then
3106 AC_MSG_CHECKING([the GNU C++ compiler version])
3108 _gpp_version=`$CXX -dumpversion`
3109 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
3111 if test "$_os" = "Darwin" -a "$with_macosx_sdk" = "10.4" -a "$_gpp_majmin" -ge "401" ; then
3112 if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
3113 export CXX="$GCC_HOME/bin/g++-4.0"
3114 _gpp_majmin_2=`$CXX -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
3115 if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
3116 _gpp_majmin=$_gpp_majmin_2
3119 if test "$_gpp_majmin" -ge "401" ; then
3120 AC_MSG_ERROR([You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly])
3122 AC_MSG_RESULT([implicitly using CXX=$CXX])
3125 AC_MSG_RESULT([checked (g++ $_gpp_version)])
3128 if test "$_gpp_majmin" = "304"; then
3129 AC_MSG_CHECKING([whether $CXX has the enum bug])
3130 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3131 extern "C" void abort (void);
3132 extern "C" void exit (int status);
3134 enum E { E0, E1, E2, E3, E4, E5 };
3136 void test (enum E e)
3138 if (e == E2 || e == E3 || e == E1)
3149 ]])],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents LibreOffice from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])],[AC_MSG_RESULT([no])],[])
3154 # prefx CXX with ccache if needed
3156 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3157 if test "$CCACHE" != "" ; then
3158 AC_MSG_CHECKING([whether $CXX is already ccached])
3160 save_CXXFLAGS=$CXXFLAGS
3161 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
3162 dnl an empty program will do, we're checking the compiler flags
3163 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
3164 [use_ccache=yes], [use_ccache=no])
3165 if test $use_ccache = yes ; then
3166 AC_MSG_RESULT([yes])
3171 CXXFLAGS=$save_CXXFLAGS
3176 dnl ===================================================================
3177 dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
3178 dnl ===================================================================
3180 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3183 dnl Check whether there's a C pre-processor.
3184 dnl ===================================================================
3185 dnl When using SunStudio compiler, there is a bug with the cc
3186 dnl preprocessor, so use CC preprocessor as the cc preprocessor
3187 dnl See Issuezilla #445.
3188 dnl ===================================================================
3189 if test "$_os" = "SunOS"; then
3197 dnl ===================================================================
3198 dnl Find integral type sizes and alignments
3199 dnl ===================================================================
3201 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3203 AC_CHECK_SIZEOF(long)
3204 AC_CHECK_SIZEOF(short)
3205 AC_CHECK_SIZEOF(int)
3206 AC_CHECK_SIZEOF(long long)
3207 AC_CHECK_SIZEOF(double)
3208 AC_CHECK_SIZEOF(void*)
3210 SIZEOF_SHORT=$ac_cv_sizeof_short
3211 SIZEOF_INT=$ac_cv_sizeof_int
3212 SIZEOF_LONG=$ac_cv_sizeof_long
3213 SIZEOF_LONGLONG=$ac_cv_sizeof_long_long
3214 SIZEOF_DOUBLE=$ac_cv_sizeof_double
3215 SIZEOF_POINTER=$ac_cv_sizeof_voidp
3217 dnl Allow build without AC_CHECK_ALIGNOF, grrr
3218 m4_pattern_allow([AC_CHECK_ALIGNOF])
3219 m4_ifdef([AC_CHECK_ALIGNOF],
3222 dnl We know that the ALIGNOF_ variables are used only when cross-compiling
3223 dnl in sal/typesconfig/makefile.mk...
3224 if test "$cross_compiling" = "yes"; then
3225 AC_MSG_ERROR([When cross-compiling you must use a recent Autoconf with [AC_][CHECK_ALIGNOF]])
3227 m4_define([AC_CHECK_ALIGNOF],
3229 AC_MSG_WARN([Cannot determine alignment of $1])
3230 AS_TR_SH([ac_cv_alignof_$3])=unknown
3234 AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
3235 AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
3236 AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
3237 AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
3239 ALIGNOF_SHORT=$ac_cv_alignof_short
3240 ALIGNOF_INT=$ac_cv_alignof_int
3241 ALIGNOF_LONG=$ac_cv_alignof_long
3242 ALIGNOF_DOUBLE=$ac_cv_alignof_double
3245 WORDS_BIGENDIAN=$ac_cv_c_bigendian
3247 dnl Check for large file support
3249 if test -n "$ac_cv_sys_file_offset_bits"; then
3250 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
3252 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
3253 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
3261 if test "$CL_X64" = ""; then
3273 AC_SUBST(WORDS_BIGENDIAN)
3274 AC_SUBST(LFS_CFLAGS)
3276 AC_SUBST(SIZEOF_SHORT)
3277 AC_SUBST(SIZEOF_INT)
3278 AC_SUBST(SIZEOF_LONG)
3279 AC_SUBST(SIZEOF_LONGLONG)
3280 AC_SUBST(SIZEOF_DOUBLE)
3281 AC_SUBST(SIZEOF_POINTER)
3282 AC_SUBST(ALIGNOF_SHORT)
3283 AC_SUBST(ALIGNOF_INT)
3284 AC_SUBST(ALIGNOF_LONG)
3285 AC_SUBST(ALIGNOF_DOUBLE)
3287 dnl ===================================================================
3288 dnl Check if valgrind.h is available
3289 dnl ===================================================================
3290 if test "$cross_compiling" != "yes" -a "$enable_dbgutil" != "no" -a \
3291 -z "$VALGRIND_CFLAGS"; then
3292 dnl Test $prefix (currently only testing for /usr and /usr/local)
3293 dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind
3294 prev_cppflags=$CPPFLAGS
3295 CPPFLAGS="-I/usr/include/valgrind"
3296 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h])
3297 if test -z "$VALGRIND_CFLAGS"; then
3298 CPPFLAGS="-I/usr/local/include/valgrind"
3299 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [])
3301 if test -n "$VALGRIND_CFLAGS"; then
3302 CPPFLAGS=$VALGRIND_CFLAGS
3303 AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""])
3305 CPPFLAGS=$prev_cppflags
3307 AC_SUBST([VALGRIND_CFLAGS])
3309 dnl ===================================================================
3310 dnl Set the gcc/gxx include directories
3311 dnl ===================================================================
3312 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
3313 # often contains an i386 which is expanded as a macro.
3314 if test "$GXX" = "yes"; then
3315 AC_MSG_CHECKING([for g++ include path])
3316 if test -z "$with_gxx_include_path"; then
3317 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
3318 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
3319 with_gxx_include_path="/usr/include"
3321 if echo $with_gxx_include_path | grep -q linux; then
3322 # workaround for Mandriva - issue 100049
3323 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
3326 dnl This is the original code...
3327 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
3328 if test -z "$with_gxx_include_path"; then
3329 with_gxx_include_path="NO_GXX_INCLUDE"
3330 AC_MSG_RESULT([none])
3332 AC_MSG_RESULT([$with_gxx_include_path])
3335 with_gxx_include_path="NO_GXX_INCLUDE"
3337 GXX_INCLUDE_PATH="$with_gxx_include_path"
3338 AC_SUBST(GXX_INCLUDE_PATH)
3340 dnl ===================================================================
3341 dnl Set the MinGW include directories
3342 dnl ===================================================================
3343 if test "$WITH_MINGW" = "yes"; then
3344 AC_MSG_CHECKING([for MinGW include path])
3345 cat >conftest.$ac_ext <<_ACEOF
3347 #include <bits/c++config.h>
3349 _mingw_lib_include_path=`$CXX -E -xc++ conftest.$ac_ext | $SED -n -e '/.*1*"\(.*\)\/stddef.h".*/s//\1/p' -e '/.*1*"\(.*\)\/bits\/c++config.h".*/s//\1/p' | sort -u | xargs echo`
3351 if test -z "$_mingw_lib_include_path"; then
3352 _mingw_lib_include_path="NO_LIB_INCLUDE"
3353 AC_MSG_RESULT([no MinGW include path])
3355 AC_MSG_RESULT([$_mingw_lib_include_path])
3357 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
3358 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
3360 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
3361 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
3365 AC_MSG_CHECKING([for dynamic libgcc])
3366 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3368 using namespace std;
3369 ]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[
3370 MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's@.*DLL Name: @@'`
3371 if test -n "$MINGW_GCCDLL"; then
3372 MINGW_SHARED_GCCLIB=YES
3373 AC_MSG_RESULT([ $MINGW_GCCDLL])
3375 MINGW_SHARED_GCCLIB=NO
3378 ],[ AC_MSG_RESULT([no])
3382 AC_MSG_CHECKING([for dynamic libstdc++])
3383 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3385 using namespace std;
3386 ]], [[ cout << "Hello there." << endl; ]])],[
3387 MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's@.*DLL Name: @@'`
3388 if test -n "$MINGW_GXXDLL"; then
3389 mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
3390 mingw_gxxdll_root=${mingw_gxxdll_root#lib}
3391 MINGW_SHARED_LIBSTDCPP=-l$mingw_gxxdll_root
3392 MINGW_SHARED_GXXLIB=YES
3393 AC_MSG_RESULT([$MINGW_GXXDLL])
3395 MINGW_SHARED_GXXLIB=NO
3398 ],[ AC_MSG_RESULT([no])
3404 AC_SUBST(MINGW_CLIB_DIR)
3405 AC_SUBST(MINGW_SHARED_GCCLIB)
3406 AC_SUBST(MINGW_SHARED_GXXLIB)
3407 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
3408 AC_SUBST(MINGW_GCCDLL)
3409 AC_SUBST(MINGW_GXXDLL)
3412 dnl ===================================================================
3413 dnl Extra checking for the SunOS compiler
3414 dnl ===================================================================
3415 if test "$_os" = "SunOS"; then
3416 dnl SunStudio C++ compiler packaged with SunStudio C compiler
3417 if test "$CC" = "cc"; then
3418 AC_MSG_CHECKING([SunStudio C++ Compiler])
3419 if test "$CXX" != "CC"; then
3420 AC_MSG_WARN([SunStudio C++ was not found])
3421 echo "SunStudio C++ was not found" >> warn
3423 AC_MSG_RESULT([checked])
3428 dnl *************************************************************
3429 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
3430 dnl *************************************************************
3431 if test "$WITH_MINGW" = "yes"; then
3432 AC_MSG_CHECKING([exception type])
3434 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
3436 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
3438 ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
3440 AC_MSG_RESULT($exceptions_type)
3444 EXCEPTIONS="$exceptions_type"
3445 AC_SUBST(EXCEPTIONS)
3447 dnl ===================================================================
3448 dnl Checks for what the default STL should be
3449 dnl ===================================================================
3450 AC_MSG_CHECKING([Whether building STLPort library makes sense])
3452 if test "$_os" = "Linux"; then
3468 elif test "$_os" = "SunOS"; then
3470 elif test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
3472 elif test "$_os" = "FreeBSD"; then
3475 if test "$BUILD_STLPORT" = "yes" ; then
3476 AC_MSG_RESULT([yes])
3481 AC_MSG_CHECKING([Whether STLPort library will be actually built])
3482 if test "$with_stlport" = "auto" -o "$BUILD_STLPORT" = "no"; then
3483 with_stlport=$BUILD_STLPORT
3485 if test "$with_stlport" = "yes" ; then
3486 AC_MSG_RESULT([yes])
3488 SCPDEFS="$SCPDEFS -DWITH_STLPORT"
3489 BUILD_TYPE="$BUILD_TYPE STLPORT"
3495 AC_SUBST(WITH_STLPORT)
3497 dnl ===================================================================
3498 dnl thread-safe statics
3499 dnl ===================================================================
3500 AC_MSG_CHECKING([whether $CXX supports thread safe statics])
3501 unset HAVE_THREADSAFE_STATICS
3502 if test "$GCC" = "yes"; then
3503 save_CXXFLAGS=$CXXFLAGS
3504 CXXFLAGS="$CXXFLAGS -fthreadsafe-statics"
3506 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)],[HAVE_THREADSAFE_STATICS=TRUE],[])
3508 CXXFLAGS=$save_CXXFLAGS
3509 if test "$HAVE_THREADSAFE_STATICS" = "TRUE"; then
3510 dnl Some C++ runtimes use a single lock for all static variables, which
3511 dnl can cause deadlock in multi-threaded applications. This is not
3512 dnl easily tested here; for POSIX-based systems, if executing the
3513 dnl following C++ program does not terminate then the tool chain
3514 dnl apparently has this problem:
3516 dnl #include <pthread.h>
3517 dnl int h() { return 0; }
3518 dnl void * g(void * unused) {
3519 dnl static int n = h();
3524 dnl pthread_create(&t, 0, g, 0);
3525 dnl pthread_join(t, 0);
3529 dnl static int n = f();
3533 dnl Mac OS X up to at least 10.7.1 is known to have this problem:
3534 if test "$_os" = "Darwin"; then
3535 unset HAVE_THREADSAFE_STATICS
3536 AC_MSG_RESULT([broken (i.e., no)])
3538 AC_MSG_RESULT([yes])
3544 AC_MSG_RESULT([unknown (assuming no)])
3546 AC_SUBST(HAVE_THREADSAFE_STATICS)
3548 dnl ===================================================================
3549 dnl visibility and c++0x features
3550 dnl ===================================================================
3551 if test "$GCC" = "yes"; then
3552 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
3554 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3555 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_VISIBILITY_FEATURE=TRUE ],[])
3557 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
3558 AC_MSG_RESULT([yes])
3563 AC_MSG_CHECKING([whether $CC supports -Wno-long-double])
3565 CFLAGS="$CFLAGS -Werror -Wno-long-double"
3566 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_NO_LONG_DOUBLE=TRUE ],[])
3568 if test "$HAVE_GCC_NO_LONG_DOUBLE" = "TRUE"; then
3569 AC_MSG_RESULT([yes])
3574 AC_MSG_CHECKING([whether $CC supports -mno-avx])
3576 CFLAGS="$CFLAGS -Werror -mno-avx"
3577 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
3579 if test "$HAVE_GCC_AVX" = "TRUE"; then
3580 AC_MSG_RESULT([yes])
3585 AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 757])
3586 save_CXXFLAGS=$CXXFLAGS
3587 CXXFLAGS="$CXXFLAGS -std=c++0x"
3590 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3593 template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
3609 a thinga[]={{0,0}, {1,1}};
3610 b thingb[]={{0,0}, {1,1}};
3611 size_t i = sizeof(sal_n_array_size(thinga));
3612 size_t j = sizeof(sal_n_array_size(thingb));
3613 return !(i != 0 && j != 0);
3614 ]])],[HAVE_CXX0X=TRUE],[])
3617 CXXFLAGS=$save_CXXFLAGS
3618 if test "$HAVE_CXX0X" = "TRUE"; then
3619 AC_MSG_RESULT([yes])
3625 AC_SUBST(HAVE_CXX0X)
3626 AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
3627 AC_SUBST(HAVE_GCC_AVX)
3629 dnl ===================================================================
3630 dnl system stl sanity tests
3631 dnl ===================================================================
3632 HAVE_GCC_VISIBILITY_BROKEN=
3633 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) ; then
3637 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
3638 AC_MSG_CHECKING([if STL headers are visibility safe])
3639 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
3640 AC_MSG_RESULT([$stlvisok])
3641 if test "$stlvisok" = "no"; then
3642 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
3643 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
3644 unset HAVE_GCC_VISIBILITY_FEATURE
3648 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
3649 sharedlink_ldflags_save=$LDFLAGS
3650 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
3652 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
3653 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3655 using namespace std;
3657 istringstream strm( "test" ); return 0;
3658 ]])],[$EGREP -q unresolvable conftest.err;
3659 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi],[gccvisok=no
3661 AC_MSG_RESULT([$gccvisok])
3662 if test "$gccvisok" = "no"; then
3663 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
3664 echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn
3665 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
3668 LDFLAGS=$sharedlink_ldflags_save
3671 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
3672 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
3673 cat >visibility.cxx <<_ACEOF
3674 #pragma GCC visibility push(hidden)
3675 struct __attribute__ ((visibility ("default"))) TestStruct {
3678 __attribute__ ((visibility ("default"))) void TestFunc() {
3682 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
3687 if test "$_os" = "Darwin"; then
3690 if $EGREP -q '@PLT' visibility.s; then
3702 rm -f visibility.s visibility.cxx
3704 AC_MSG_RESULT([$gccvisbroken])
3705 if test "$gccvisbroken" = "yes"; then
3706 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
3707 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
3708 unset HAVE_GCC_VISIBILITY_FEATURE
3715 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
3716 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
3718 dnl ===================================================================
3720 dnl ===================================================================
3721 AC_MSG_CHECKING([which memory allocator to use])
3722 if test "$with_alloc" = "system"; then
3723 AC_MSG_RESULT([system])
3725 AC_CHECK_FUNCS([malloc realloc calloc free])
3727 if test "$with_alloc" = "tcmalloc"; then
3728 AC_MSG_RESULT(tcmalloc)
3729 if ! echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
3730 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
3732 AC_CHECK_LIB(tcmalloc, malloc, [],
3733 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
3736 if test "$with_alloc" = "jemalloc"; then
3737 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
3738 AC_MSG_RESULT(jemalloc)
3740 CFLAGS="$CFLAGS -pthread"
3741 AC_CHECK_LIB(jemalloc, malloc, [],
3742 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
3746 AC_MSG_RESULT([system])
3748 AC_CHECK_FUNCS([malloc realloc calloc free])
3751 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
3752 AC_MSG_RESULT([internal])
3756 dnl ===================================================================
3757 dnl Custom build version
3758 dnl ===================================================================
3760 AC_MSG_CHECKING([whether to add custom build version])
3761 if test "z$with_build_version" != "z"; then
3762 BUILD_VER_STRING=$with_build_version
3763 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
3768 AC_SUBST(BUILD_VER_STRING)
3770 dnl ===================================================================
3771 dnl Java support enable
3772 dnl ===================================================================
3773 AC_MSG_CHECKING([whether to build with Java support])
3774 if test "$with_java" != "no"; then
3775 AC_MSG_RESULT([yes])
3782 AC_SUBST(SOLAR_JAVA)
3784 dnl SOLAR_JAVA="YES" (yes, silly name, should rename) indicates whether we
3785 dnl want there to be *run-time* (and build-time) support for Java extensions in the
3786 dnl built LibreOffice.
3787 dnl SOLAR_JAVA="BUILD" indicate build-time only support (no runtime support)
3788 dnl SOLAR_JAVA="" indicate no java support at all
3790 if test "$_os" = "Linux" && test "$host_cpu" = "powerpc"; then
3791 # IBMs JDK needs this...
3792 JITC_PROCESSOR_TYPE=6
3793 export JITC_PROCESSOR_TYPE
3795 AC_SUBST([JITC_PROCESSOR_TYPE])
3797 if test $_os = "WINNT"; then
3798 WITH_VC_REDIST="TRUE"
3800 AC_SUBST(WITH_VC_REDIST)
3802 dnl ===================================================================
3804 dnl ===================================================================
3805 if test "$SOLAR_JAVA" != ""; then
3807 # Windows-specific tests
3808 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
3809 if test "$CL_X64" != ""; then
3811 otherbitness="32-bit"
3814 otherbitness="64-bit"
3817 if test -z "$with_jdk_home"; then
3819 # Unfortunately apparently no way to find, if needed, the 64-bit
3820 # JDK in the Registry from the 32-bit Perl oowintool
3822 _jdk_home=`./oowintool --jdk-home`
3823 if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
3824 with_jdk_home="$_jdk_home"
3825 howfound="found by oowintool"
3827 AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK])
3830 test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
3831 howfound="you passed"
3835 JAVA_HOME=; export JAVA_HOME
3836 if test -z "$with_jdk_home"; then
3837 AC_PATH_PROG(JAVAINTERPRETER, $with_java)
3839 _java_path="$with_jdk_home/bin/$with_java"
3840 dnl Check if there is a Java interpreter at all.
3841 if test -x "$_java_path"; then
3842 JAVAINTERPRETER=$_java_path
3844 AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
3848 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
3849 # Check that the JDK found is correct architecture
3850 # Why is this necessary, we don't link with any library from the JDK I think,
3852 shortjdkhome=`cygpath -d "$with_jdk_home"`
3853 if test "$CL_X64" != "" -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" = "" >/dev/null; then
3854 AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
3855 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
3856 elif test "$CL_X64" = "" -a -f "$_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" != "" >/dev/null; then
3857 AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
3858 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
3861 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
3862 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
3864 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
3865 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
3866 elif test "$_os" = "Darwin"; then
3867 dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X,
3868 dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
3869 dnl to run in 32 bit mode and be able to load LibreOffice jnilibs:
3870 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
3871 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
3872 AC_MSG_RESULT([yes])
3880 dnl ===================================================================
3882 dnl ===================================================================
3883 if test "$SOLAR_JAVA" != ""; then
3885 AC_MSG_CHECKING([the installed JDK])
3886 if test -n "$JAVAINTERPRETER"; then
3887 dnl java -version sends output to stderr!
3888 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
3889 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
3890 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
3892 AC_MSG_RESULT([checked (gcj)])
3893 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
3894 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
3896 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "BEA"` -gt 0; then
3897 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
3898 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "IBM"` -gt 0; then
3901 dnl IBM JDK specific tests
3902 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
3903 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
3905 if test "$_jdk_ver" -lt 10500; then
3906 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
3909 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
3911 if test "$with_jdk_home" = ""; then
3912 AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
3913 you must use the "--with-jdk-home" configure option explicitly])
3916 JAVA_HOME=$with_jdk_home
3921 dnl Sun JDK specific tests
3922 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
3923 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
3925 if test "$_jdk_ver" -lt 10500; then
3926 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
3928 AC_MSG_RESULT([checked (JDK $_jdk)])
3929 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
3930 if test "$_os" = "WINNT"; then
3931 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
3935 AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
3939 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
3942 _java_target_ver="1.5"
3943 dnl ===================================================================
3944 dnl Check for target Java bytecode version
3945 dnl ===================================================================
3946 if test "$SOLAR_JAVA" != ""; then
3947 AC_MSG_CHECKING([for target Java bytecode version])
3948 if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
3949 AC_MSG_RESULT([default by $JDK])
3950 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
3951 AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
3954 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
3955 _java_target_ver="$with_java_target_version"
3956 AC_MSG_RESULT([$_java_target_ver])
3957 elif test $_jdk_ver -gt 10000 ; then
3958 _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
3959 AC_MSG_RESULT([$_java_target_ver])
3961 AC_MSG_ERROR([Unable to guess Java bytecode version from Java version!])
3965 if ! test -z "$_java_target_ver" -o \
3966 "$_java_target_ver" = "1.1" -o \
3967 "$_java_target_ver" = "1.2" -o \
3968 "$_java_target_ver" = "1.3" -o \
3969 "$_java_target_ver" = "1.4" -o \
3970 "$_java_target_ver" = "1.5" -o \
3971 "$_java_target_ver" = "1.6" -o \
3972 "$_java_target_ver" = "5" ; then
3973 AC_MSG_ERROR([$_java_target_ver is not a supported Java bytecode version!])
3976 JAVA_SOURCE_VER="$_java_target_ver"
3977 JAVA_TARGET_VER="$_java_target_ver"
3980 dnl ===================================================================
3981 dnl Checks for javac
3982 dnl ===================================================================
3983 if test "$SOLAR_JAVA" != ""; then
3984 if test "$JDK" = "gcj"; then
3985 javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
3987 javacompiler="javac"
3989 if test -z "$with_jdk_home"; then
3990 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
3992 _javac_path="$with_jdk_home/bin/$javacompiler"
3993 dnl Check if there is a Java compiler at all.
3994 if test -x "$_javac_path"; then
3995 JAVACOMPILER=$_javac_path
3998 if test -z "$JAVACOMPILER"; then
3999 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
4001 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
4002 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
4003 JAVACOMPILER="${JAVACOMPILER}.exe"
4005 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
4006 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
4009 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
4010 AC_MSG_CHECKING([re-checking JDK])
4012 AC_MSG_RESULT([checked (ecj)])
4013 #TODO: what's to do here? some switch to do 1.5 compiling?
4014 JAVAFLAGS="-source 1.5 -target 1.5"
4015 _gij_longver="40200"
4020 dnl ===================================================================
4021 dnl Checks that javac is gcj
4022 dnl ===================================================================
4023 if test "$SOLAR_JAVA" != ""; then
4024 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
4028 AC_SUBST(JAVACISGCJ)
4031 dnl ===================================================================
4032 dnl Checks that javac is kaffe
4033 dnl ===================================================================
4034 if test "$SOLAR_JAVA" != ""; then
4035 if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
4039 AC_SUBST(JAVACISKAFFE)
4041 dnl ===================================================================
4042 dnl Checks for javadoc
4043 dnl ===================================================================
4044 if test "$SOLAR_JAVA" != ""; then
4045 if test -z "$with_jdk_home"; then
4046 AC_PATH_PROG(JAVADOC, javadoc)
4048 _javadoc_path="$with_jdk_home/bin/javadoc"
4049 dnl Check if there is a javadoc at all.
4050 if test -x "$_javadoc_path"; then
4051 JAVADOC=$_javadoc_path
4053 AC_PATH_PROG(JAVADOC, javadoc)
4056 if test -z "$JAVADOC"; then
4057 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
4059 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
4060 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
4061 JAVADOC="${JAVADOC}.exe"
4063 JAVADOC=`cygpath -d "$JAVADOC"`
4064 JAVADOC=`cygpath -u "$JAVADOC"`
4068 if test "$SOLAR_JAVA" != ""; then
4069 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
4070 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
4071 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
4072 # try to recover first by looking whether we have a alternatives
4073 # system as in Debian or newer SuSEs where following /usr/bin/javac
4074 # over /etc/alternatives/javac leads to the right bindir where we
4075 # just need to strip a bit away to get a valid JAVA_HOME
4076 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
4077 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
4078 # maybe only one level of symlink (e.g. on Mac)
4079 JAVA_HOME=$(readlink $JAVACOMPILER)
4080 if test "$(dirname $JAVA_HOME)" = "."; then
4081 # we've got no path to trim back
4086 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
4087 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
4088 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
4089 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
4091 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
4092 if test "$JAVA_HOME" != "/usr"; then
4093 if test "$_os" = "Darwin"; then
4094 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
4095 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
4096 dnl Tiger already returns a JDK path..
4097 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
4099 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
4103 # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
4105 dnl now if JAVA_HOME has been set to empty, then call findhome to find it
4106 if test -z "$JAVA_HOME"; then
4107 if test "x$with_jdk_home" = "x"; then
4108 cat > findhome.java <<_ACEOF
4109 [import java.io.File;
4113 public static void main(String args[])
4115 String jrelocation = System.getProperty("java.home");
4116 File jre = new File(jrelocation);
4117 System.out.println(jre.getParent());
4121 AC_MSG_CHECKING([if javac works])
4122 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
4123 AC_TRY_EVAL(javac_cmd)
4124 if test $? = 0 && test -f ./findhome.class ; then
4125 AC_MSG_RESULT([javac works])
4127 echo "configure: javac test failed" >&5
4128 cat findhome.java >&5
4129 AC_MSG_ERROR([javac does not work - java projects will not build!])
4131 AC_MSG_CHECKING([if gij knows its java.home])
4132 JAVA_HOME=`$JAVAINTERPRETER findhome`
4133 if test $? = 0 && test "$JAVA_HOME" != "" ; then
4134 AC_MSG_RESULT([$JAVA_HOME])
4136 echo "configure: java test failed" >&5
4137 cat findhome.java >&5
4138 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
4140 # clean-up after ourselves
4141 rm -f ./findhome.java ./findhome.class
4143 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
4147 dnl second sanity check JAVA_HOME if possible
4148 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
4149 # now check if $JAVA_HOME is really valid
4150 if test "$_os" = "Darwin"; then
4151 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
4154 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
4157 if test "$JAVA_HOME_OK" = "NO"; then
4158 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
4159 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
4160 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
4161 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
4162 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
4163 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
4170 if test "$SOLAR_JAVA" != ""; then
4171 AC_MSG_CHECKING([for jawt lib name])
4172 if test "$JDK" = "gcj"; then
4174 save_LDFLAGS=$LDFLAGS
4175 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
4176 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
4177 exec 6>/dev/null # no output
4178 AC_CHECK_HEADER(jni.h, [],
4179 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
4180 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
4181 exec 6>&1 # output on again
4183 LDFLAGS=$save_LDFLAGS
4185 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
4186 # A workaround is to link also against libpmawt.so
4187 if test "$JDK" = "ibm" ; then
4189 save_LDFLAGS=$LDFLAGS
4190 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
4191 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
4192 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
4193 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
4194 export LD_LIBRARY_PATH
4195 exec 6>/dev/null # no output
4196 AC_CHECK_HEADER(jni.h, [],
4197 [AC_MSG_ERROR([jni.h could not be found.])], [])
4198 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
4199 if test -z "$AWTLIB"; then
4200 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
4201 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
4203 exec 6>&1 # output on again
4205 LDFLAGS=$save_LDFLAGS
4206 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
4208 if test -z "$AWTLIB"; then
4211 AC_MSG_RESULT([$AWTLIB])
4218 AC_SUBST(JAVA_SOURCE_VER)
4219 AC_SUBST(JAVA_TARGET_VER)
4220 AC_SUBST(JAVAINTERPRETER)
4221 AC_SUBST(JAVAIFLAGS)
4222 AC_SUBST(JAVACOMPILER)
4225 dnl ===================================================================
4226 dnl Checks for specific files.
4227 dnl ===================================================================
4229 dnl ===================================================================
4230 dnl Checks for programs.
4231 dnl ===================================================================
4233 dnl ===================================================================
4234 dnl Check whether we already have dmake
4235 dnl ===================================================================
4236 AC_PATH_PROG(DMAKE, dmake, no)
4237 if test "$DMAKE" = "no"; then
4239 echo "dmake will be built on ./bootstrap"
4241 AC_MSG_CHECKING([whether the found dmake is the right dmake])
4242 # we need to find out whether that dmake we found is "our" dmake
4243 # or the dmake from Sun's SunStudio Compiler which is something
4245 # This test _should_ work because the one accepts -V (ours) and one
4246 # (the other) not...
4247 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
4248 if test $? -eq 0; then
4250 AC_MSG_RESULT([yes])
4251 AC_MSG_CHECKING([the dmake version])
4252 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
4253 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
4254 AC_MSG_RESULT([OK, >= 4.11])
4255 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
4256 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
4257 AC_MSG_RESULT([OK, >= 4.11])
4259 AC_MSG_RESULT([too old. >= 4.11 is needed])
4260 echo "A newer dmake will be built on ./bootstrap"
4265 echo "dmake will be built on ./bootstrap"
4269 AC_SUBST(BUILD_DMAKE)
4271 AC_MSG_CHECKING([whether to enable EPM for packing])
4273 if test "$enable_epm" = "yes"; then
4274 AC_MSG_RESULT([yes])
4275 dnl ===================================================================
4276 dnl Check for epm - not needed for Windows
4277 dnl ===================================================================
4278 if test "$_os" != "WINNT"; then
4279 if test -n "$with_epm"; then
4282 AC_PATH_PROG(EPM, epm, no)
4284 if test "$EPM" = "no" || test "$EPM" = "internal"; then
4285 echo "EPM will be built."
4287 BUILD_TYPE="$BUILD_TYPE EPM"
4289 # Gentoo has some epm which is something different...
4290 AC_MSG_CHECKING([whether the found epm is the right epm])
4291 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
4292 AC_MSG_RESULT([yes])
4294 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
4296 AC_MSG_CHECKING([epm version])
4297 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
4298 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
4299 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
4300 AC_MSG_RESULT([OK, >= 3.7])
4302 if test "$_os" = "Darwin"; then
4303 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
4304 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
4305 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
4306 AC_MSG_ERROR([$_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)])
4307 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
4308 AC_MSG_RESULT([$_pm, ok])
4309 else # we never should get here, but go safe
4310 AC_MSG_ERROR([$_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)])
4314 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
4315 echo "EPM will be built."
4317 BUILD_TYPE="$BUILD_TYPE EPM"
4322 # test which package format to use
4323 AC_MSG_CHECKING([which package format to use])
4334 # if building on Debian, default should be deb...
4335 if test -e /etc/debian_version; then
4353 # we never should get here since we check the arciecture/os at the beginning,
4356 AC_MSG_ERROR([unknown system])
4358 if test -n "$with_package_format"; then
4359 for i in $with_package_format; do
4361 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
4364 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
4365 aix - AIX software distribution
4366 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
4367 deb - Debian software distribution
4368 inst or tardist - IRIX software distribution
4369 osx - MacOS X software distribution
4370 pkg - Solaris software distribution
4371 rpm - RedHat software distribution
4372 setld - Tru64 (setld) software distribution
4373 native - "Native" software distribution for the platform
4374 portable - Portable software distribution
4375 LibreOffice additionally supports:
4376 archive - .tar.gz or .zip
4378 installed - installation tree
4384 PKGFORMAT="$with_package_format"
4386 AC_MSG_RESULT([$PKGFORMAT])
4387 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
4388 AC_MSG_CHECKING([for rpm])
4389 for a in "$RPM" rpmbuild rpm; do
4390 $a --usage >/dev/null 2> /dev/null
4391 if test $? -eq 0; then
4395 $a --version >/dev/null 2> /dev/null
4396 if test $? -eq 0; then
4402 if test -z "$RPM" ; then
4403 AC_MSG_ERROR([not found])
4404 elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
4405 RPM_PATH=`which $RPM`
4406 AC_MSG_RESULT([$RPM_PATH])
4408 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
4411 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
4412 AC_PATH_PROG(DPKG, dpkg, no)
4413 if test "$DPKG" = "no"; then
4414 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
4417 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
4418 if test "$_os" = "Darwin"; then
4419 AC_MSG_CHECKING([for PackageMaker availability])
4420 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
4421 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
4426 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
4429 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
4430 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
4431 if test "$EPM" != "no" && test "$EPM" != "internal"; then
4432 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
4433 AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
4434 if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then
4435 AC_MSG_RESULT([yes])
4438 if echo "$PKGFORMAT" | grep -q rpm; then
4440 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
4441 echo "the rpms will need to be installed with --nodeps" >> warn
4445 AC_MSG_WARN([the ${_pt}s will not be relocateable])
4446 echo "the ${_pt}s will not be relocateable" >> warn
4447 AC_MSG_WARN([if you want to make sure installation without --nodeps and
4448 relocation will work, you need to patch your epm with the
4449 patch in epm/epm-3.7.patch or build with
4450 --with-epm=internal which will build a suitable epm])
4455 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
4456 AC_PATH_PROG(PKGMK, pkgmk, no)
4457 if test "$PKGMK" = "no"; then
4458 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
4473 dnl ===================================================================
4475 dnl ===================================================================
4476 AC_PATH_PROG(GPERF, gperf)
4477 if test -z "$GPERF"; then
4478 AC_MSG_ERROR([gperf not found but needed. Install it.])
4480 AC_MSG_CHECKING([gperf version])
4481 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
4484 AC_MSG_ERROR([too old, you need at least 3.0.0])
4488 dnl ===================================================================
4489 dnl Check for building stax
4490 dnl ===================================================================
4491 AC_MSG_CHECKING([whether to build the stax])
4492 if test "$with_system_saxon" = "no" -a "$with_system_jars" = "no" -a "$SOLAR_JAVA" != ""; then
4493 if test -f "./stax/download/jsr173_1.0_api.jar"; then
4495 AC_MSG_RESULT([no, will use the prebuilt stax/download/jsr173_1.0_api.jar])
4498 AC_MSG_RESULT([yes])
4501 AC_SUBST(BUILD_STAX)
4503 dnl ===================================================================
4504 dnl Check for building ODK
4505 dnl ===================================================================
4506 AC_MSG_CHECKING([whether to build the ODK])
4507 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
4508 AC_MSG_RESULT([yes])
4510 if test "$with_java" != "no"; then
4511 AC_MSG_CHECKING([whether to build unowinreg.dll])
4512 if test "$_os" = "WINNT" -a "z$enable_build_unowinreg" = "z" ; then
4513 # build on Win by default
4514 enable_build_unowinreg=yes
4516 if test "z$enable_build_unowinreg" = "z" -o "$enable_build_unowinreg" = "no"; then
4520 AC_MSG_RESULT([yes])
4523 if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "YES"; then
4524 if test -z "$with_mingw_cross_compiler"; then
4526 AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
4527 elif test -x "$with_mingw_cross_compiler"; then
4528 MINGWCXX="$with_mingw_cross_compiler"
4530 AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
4533 if test "$MINGWCXX" = "false"; then
4534 AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
4537 mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
4538 if test -x "$mingwstrip_test"; then
4539 MINGWSTRIP="$mingwstrip_test"
4541 AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
4544 if test "$MINGWSTRIP" = "false"; then
4545 AC_MSG_ERROR(MinGW32 binutils not found.)
4549 BUILD_TYPE="$BUILD_TYPE ODK"
4554 AC_SUBST(BUILD_UNOWINREG)
4556 AC_SUBST(MINGWSTRIP)
4558 dnl ===================================================================
4559 dnl Check for system stdlibs
4560 dnl ===================================================================
4561 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
4562 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
4563 test "$with_system_stdlibs" != "no"; then
4567 AC_MSG_RESULT([yes])
4570 AC_SUBST(SYSTEM_STDLIBS)
4572 dnl ===================================================================
4573 dnl Check for system zlib
4574 dnl ===================================================================
4575 AC_MSG_CHECKING([which zlib to use])
4576 if test -n "$with_system_zlib" -o -n "$with_system_libs" -o \
4577 "$_os" != "WINNT" && \
4578 test "$with_system_zlib" != "no"; then
4579 AC_MSG_RESULT([external])
4581 AC_CHECK_HEADER(zlib.h, [],
4582 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
4583 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
4584 [AC_MSG_ERROR(zlib not found or functional)], [])
4586 AC_MSG_RESULT([internal])
4588 BUILD_TYPE="$BUILD_TYPE ZLIB"
4590 AC_SUBST(SYSTEM_ZLIB)
4592 dnl ===================================================================
4593 dnl Check for system jpeg
4594 dnl ===================================================================
4595 AC_MSG_CHECKING([which jpeg to use])
4596 if test -n "$with_system_jpeg" -o -n "$with_system_libs" -o \
4597 "$_os" = "Linux" && \
4598 test "$with_system_jpeg" != "no"; then
4599 AC_MSG_RESULT([external])
4601 AC_CHECK_HEADER(jpeglib.h, [],
4602 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
4603 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
4604 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
4606 AC_MSG_RESULT([internal])
4608 BUILD_TYPE="$BUILD_TYPE JPEG"
4610 AC_SUBST(SYSTEM_JPEG)
4612 dnl ===================================================================
4613 dnl Check for system expat
4614 dnl ===================================================================
4615 AC_MSG_CHECKING([which expat to use])
4616 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
4617 test "$with_system_expat" != "no"; then
4618 AC_MSG_RESULT([external])
4620 AC_CHECK_HEADER(expat.h, [],
4621 [AC_MSG_ERROR(expat.h not found. install expat)], [])
4622 AC_CHECK_LIB(expat, XML_ParserCreate, [],
4623 [AC_MSG_RESULT(expat library not found or functional.)], [])
4624 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libexpat-1.dll"
4626 AC_MSG_RESULT([internal])
4628 BUILD_TYPE="$BUILD_TYPE EXPAT"
4630 AC_SUBST(SYSTEM_EXPAT)
4632 dnl ===================================================================
4633 dnl Check for system libvisio
4634 dnl ===================================================================
4635 AC_MSG_CHECKING([which libvisio to use])
4636 if test -n "$with_system_libvisio" -o -n "$with_system_libs" && \
4637 test "$with_system_libvisio" != "no"; then
4638 AC_MSG_RESULT([external])
4640 PKG_CHECK_MODULES( VISIO, libvisio-0.0 )
4642 AC_MSG_RESULT([internal])
4644 BUILD_TYPE="$BUILD_TYPE LIBVISIO"
4646 AC_SUBST(SYSTEM_LIBVISIO)
4647 AC_SUBST(VISIO_CFLAGS)
4648 AC_SUBST(VISIO_LIBS)
4650 dnl ===================================================================
4651 dnl Check for system libcmis
4652 dnl ===================================================================
4653 AC_MSG_CHECKING([which libcmis to use])
4654 if test -n "$with_system_libcmis" -o -n "$with_system_libs" && \
4655 test "$with_system_libcmis" != "no"; then
4656 AC_MSG_RESULT([external])
4658 PKG_CHECK_MODULES( LIBCMIS, libcmis-0.2 )
4660 AC_MSG_RESULT([internal])
4662 BUILD_TYPE="$BUILD_TYPE LIBCMIS"
4664 AC_SUBST(SYSTEM_LIBCMIS)
4665 AC_SUBST(LIBCMIS_CFLAGS)
4666 AC_SUBST(LIBCMIS_LIBS)
4669 dnl ===================================================================
4670 dnl Check for system libwpd
4671 dnl ===================================================================
4672 AC_MSG_CHECKING([which libwpd to use])
4673 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
4674 test "$with_system_libwpd" != "no"; then
4675 AC_MSG_RESULT([external])
4677 PKG_CHECK_MODULES( WPD, libwpd-0.9 libwpd-stream-0.9 )
4679 AC_MSG_RESULT([internal])
4681 BUILD_TYPE="$BUILD_TYPE LIBWPD"
4683 AC_SUBST(SYSTEM_LIBWPD)
4684 AC_SUBST(WPD_CFLAGS)
4687 dnl ===================================================================
4688 dnl Check for system cppunit
4689 dnl ===================================================================
4690 AC_MSG_CHECKING([which cppunit to use])
4691 if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
4692 test "$with_system_cppunit" != "no"; then
4693 AC_MSG_RESULT([external])
4695 # might work for earlier, too but go sure:
4696 PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.0 )
4698 AC_MSG_RESULT([internal])
4700 BUILD_TYPE="$BUILD_TYPE CPPUNIT"
4702 AC_SUBST(SYSTEM_CPPUNIT)
4703 AC_SUBST(CPPUNIT_CFLAGS)
4704 AC_SUBST(CPPUNIT_LIBS)
4706 dnl ===================================================================
4707 dnl Check whether freetype is available
4708 dnl ===================================================================
4709 if test "$test_freetype" = "yes"; then
4710 AC_MSG_CHECKING([whether freetype is available])
4711 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
4713 AC_SUBST(FREETYPE_CFLAGS)
4714 AC_SUBST(FREETYPE_LIBS)
4716 dnl ===================================================================
4717 dnl Check for system libwps
4718 dnl ===================================================================
4719 AC_MSG_CHECKING([which libwps to use])
4720 if test -n "$with_system_libwps" -o -n "$with_system_libs" && \
4721 test "$with_system_libwps" != "no"; then
4722 AC_MSG_RESULT([external])
4724 PKG_CHECK_MODULES( WPS, libwps-0.2 )
4726 AC_MSG_RESULT([internal])
4728 BUILD_TYPE="$BUILD_TYPE LIBWPS"
4730 AC_SUBST(SYSTEM_LIBWPS)
4731 AC_SUBST(WPS_CFLAGS)
4734 dnl ===================================================================
4735 dnl Check for system libwpg
4736 dnl ===================================================================
4737 AC_MSG_CHECKING([which libwpg to use])
4738 if test -n "$with_system_libwpg" -o -n "$with_system_libs" && \
4739 test "$with_system_libwpg" != "no"; then
4740 AC_MSG_RESULT([external])
4742 PKG_CHECK_MODULES( WPG, libwpg-0.2 )
4744 AC_MSG_RESULT([internal])
4746 BUILD_TYPE="$BUILD_TYPE LIBWPG"
4748 AC_SUBST(SYSTEM_LIBWPG)
4749 AC_SUBST(WPG_CFLAGS)
4752 dnl ===================================================================
4753 dnl Check whether freetype2 supports emboldening
4754 dnl ===================================================================
4755 if test "$test_freetype" = "yes"; then
4756 save_CPPFLAGS="$CPPFLAGS"
4757 save_LDFLAGS="$LDFLAGS"
4759 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
4760 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
4761 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
4762 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
4763 LDFLAGS="$save_LDFLAGS"
4764 CPPFLAGS="$save_CPPFLAGS"
4767 AC_SUBST(USE_FT_EMBOLDEN)
4769 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
4770 test "$with_system_libxslt" != "no"; then
4771 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
4772 test "$with_system_libxml" = "no"; then
4773 # somehow AC_MSG_WARN won't work...
4774 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
4775 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
4776 with_system_libxml=yes
4779 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
4780 test "$with_system_libxml" != "no"; then
4781 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
4782 test "$with_system_libxslt" = "no"; then
4783 # somehow AC_MSG_WARN won't work...
4784 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
4785 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
4786 with_system_libxslt=yes
4790 # ===================================================================
4791 # Check for system libxslt
4792 # ===================================================================
4793 AC_MSG_CHECKING([which libxslt to use])
4794 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
4795 "$_os" = "Darwin" && \
4796 test "$with_system_libxslt" != "no"; then
4797 AC_MSG_RESULT([external])
4799 if test "$_os" = "Darwin"; then
4800 dnl make sure to use SDK path
4801 LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
4803 LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
4805 PKG_CHECK_MODULES(LIBXSLT, libxslt)
4808 dnl Check for xsltproc
4809 AC_PATH_PROG(XSLTPROC, xsltproc, no)
4810 if test "$XSLTPROC" = "no"; then
4811 AC_MSG_ERROR([xsltproc is required])
4814 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libxslt-1.dll"
4816 AC_MSG_RESULT([internal])
4818 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
4820 if test "$cross_compiling" = "yes"; then
4821 AC_PATH_PROG(XSLTPROC, xsltproc, no)
4822 if test "$XSLTPROC" = "no"; then
4823 AC_MSG_ERROR([xsltproc is required])
4827 AC_SUBST(SYSTEM_LIBXSLT)
4828 AC_SUBST(LIBXSLT_CFLAGS)
4829 AC_SUBST(LIBXSLT_LIBS)
4832 # ===================================================================
4833 # Check for system libxml
4834 # ===================================================================
4835 AC_MSG_CHECKING([which libxml to use])
4836 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
4837 "$_os" = "Darwin" -o $_os = iOS && \
4838 test "$with_system_libxml" != "no"; then
4839 AC_MSG_RESULT([external])
4841 if test "$_os" = "Darwin"; then
4842 dnl make sure to use SDK path
4843 LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
4845 LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
4846 elif test $_os = iOS; then
4847 dnl make sure to use SDK path
4848 usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
4849 LIBXML_CFLAGS="-I$usr/include/libxml2"
4850 LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
4852 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
4854 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
4855 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS zlib1.dll libxml2-2.dll"
4857 AC_MSG_RESULT([internal])
4859 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
4861 AC_SUBST(SYSTEM_LIBXML)
4862 AC_SUBST(LIBXML_CFLAGS)
4863 AC_SUBST(LIBXML_LIBS)
4865 dnl ===================================================================
4866 dnl Checks for Python
4867 dnl ===================================================================
4869 AC_MSG_CHECKING([which Python to use])
4871 case "$enable_python" in
4874 AC_MSG_RESULT([none])
4878 if test $build_os = cygwin; then
4879 dnl When building on Windows we don't attempt to use any installed
4880 dnl "system" Python.
4882 dnl (When cross-compiling to Windows from Linux using the mingw32-cross
4883 dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
4884 dnl MinGW cross-compilation setups.)
4885 AC_MSG_RESULT([internal])
4886 enable_python=internal
4887 elif test $_os = Darwin -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then
4888 AC_MSG_RESULT([internal, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno])
4889 enable_python=internal
4891 AC_MSG_RESULT([checking below])
4896 AC_MSG_RESULT([internal])
4899 if test $_os = Darwin -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then
4900 AC_MSG_ERROR([Cannot use "system" Python, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno])
4902 AC_MSG_RESULT([system])
4905 AC_MSG_ERROR([Incorrect --enable-python option])
4909 AC_SUBST(DISABLE_PYTHON)
4911 if test $_os = WINNT -a "$WITH_MINGW" != yes -a $enable_python = system; then
4912 AC_MSG_ERROR([Must use internal Python when building with MSVC])
4915 if test $enable_python != no; then
4916 BUILD_TYPE="$BUILD_TYPE PYUNO"
4919 if test "$cross_compiling" = yes; then
4920 if test $enable_python = auto; then
4921 enable_python=system
4924 if test $enable_python = system; then
4925 # This causes an error if no python command is found
4926 # Note that this takes the system python called just "python",
4927 # which isn't actually what we want on MacOSX when building
4928 # against the 10.6 SDK. But that shouldn't matter, we
4929 # select the correct python command manually below anyway.
4930 AM_PATH_PYTHON([2.6])
4931 elif test $enable_python = auto; then
4932 dnl This allows lack of system Python
4933 AM_PATH_PYTHON([2.6],, [:])
4935 if test "$PYTHON" = :; then
4936 enable_python=internal
4938 enable_python=system
4943 if test $enable_python = system; then
4944 if test $_os = Darwin; then
4945 # We already have logic above to make sure the system Python
4946 # is used only when building against SDK 10.6 or newer.
4948 # Make sure we use the 2.6 Python when building against the
4950 case $with_macosx_sdk in
4952 python_version=2.6;;
4954 python_version=2.7;;
4957 python_version=2.7;;
4959 PYTHON=python$python_version
4961 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX${with_macosx_sdk}.sdk/System/Library/Frameworks/Python.framework/Versions/${python_version}/include/python${python_version}"
4962 PYTHON_LIBS="-framework Python"
4964 if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
4965 # Fallback: Accept these in the environment, or as set above
4968 elif test "$cross_compiling" != yes; then
4969 python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
4970 python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
4971 python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
4972 python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
4973 if $PKG_CONFIG --exists python-$python_version; then
4974 PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
4975 PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version`"
4977 PYTHON_CFLAGS="-I$python_include"
4978 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
4980 elif test "$cross_compiling" = yes; then
4981 dnl How to find out the cross-compilation Python installation path?
4982 dnl Let's hardocode what we know for different distributions for now...
4984 for python_sysroot in /usr/i686-w64-mingw32/sys-root/mingw ; do
4985 for python_version in 2.6 ; do
4986 if test -f ${python_sysroot}/include/python${python_version}/Python.h; then
4987 PYTHON_CFLAGS="-I ${python_sysroot}/include/python$python_version"
4988 PYTHON_LIBS="-L ${python_sysroot}lib -lpython$python_version $python_libs"
4992 test -n "$PYTHON_CFLAGS" && break
4997 dnl By now enable_python should be "system", "internal" or "no"
4998 case $enable_python in
5002 dnl Check if the headers really work
5003 save_CPPFLAGS="$CPPFLAGS"
5004 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
5005 AC_CHECK_HEADER(Python.h, [],
5006 [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
5008 CPPFLAGS="$save_CPPFLAGS"
5010 dnl FIXME Check if the Python library can be linked with, too?
5015 BUILD_TYPE="$BUILD_TYPE PYTHON"
5016 # Embedded Python dies without Home set
5017 if test "z$HOME" = "z"; then
5020 # bz2 tarball and bzip2 is not standard
5021 if test -z "$BZIP2"; then
5022 AC_PATH_PROG( BZIP2, bzip2)
5023 if test -z "$BZIP2"; then
5024 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
5032 AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
5036 AC_SUBST(SYSTEM_PYTHON)
5037 AC_SUBST(PYTHON_CFLAGS)
5038 AC_SUBST(PYTHON_LIBS)
5040 dnl ===================================================================
5041 dnl Check for system translate-toolkit
5042 dnl ===================================================================
5043 AC_MSG_CHECKING([which translate-toolkit to use])
5044 if test "$with_system_translate_toolkit" = "yes" ; then
5045 AC_MSG_RESULT([system])
5046 SYSTEM_TRANSLATE_TOOLKIT=YES
5048 AC_PATH_PROGS(OO2PO, oo2po)
5049 if test -z "$OO2PO"; then
5050 AC_MSG_ERROR([install translate-toolkit or use --without-system-translate-toolkit])
5053 AC_PATH_PROGS(PO2OO, po2oo)
5054 if test -z "$PO2OO"; then
5055 AC_MSG_ERROR([install translate-toolkit or use --without-system-translate-toolkit])
5058 $PO2OO --help | grep -q '\-\-skipsource'
5059 if test $? -ne 0 ; then
5060 AC_MSG_ERROR([$PO2OO does not support --skipsource; use translate-toolkit >= 1.9 or use --without-system-translate-toolkit])
5063 AC_MSG_RESULT([internal])
5064 SYSTEM_TRANSLATE_TOOLKIT=NO
5065 BUILD_TYPE="$BUILD_TYPE TRANSLATE_TOOLKIT"
5067 AC_SUBST(SYSTEM_TRANSLATE_TOOLKIT)
5069 dnl ===================================================================
5070 dnl Check for system Berkeley db
5071 dnl ===================================================================
5072 AC_MSG_CHECKING([which db to use])
5073 if test -n "$with_system_db" -o -n "$with_system_libs" && \
5074 test "$with_system_db" != "no"; then
5076 AC_MSG_RESULT([external])
5079 for dbver in 5.1 5.0 5 4.8 4.7 4; do
5080 for dash in - ''; do
5081 AC_CHECK_HEADER([db$dash$dbver/db.h],
5082 [ db_header="db$dash$dbver/db.h"; break 2 ])
5086 if test -z "$db_header"; then
5087 AC_CHECK_HEADER([db/db.h], [db_header='db/db.h'; dbver=''])
5090 if test -z "$db_header"; then
5091 AC_CHECK_HEADER(db.h, [ db_header='db.h'; dbver='' ])
5094 if test -z "$db_header"; then
5095 AC_MSG_ERROR([db.h not found. Use the correct -I flag, or install the Berkeley db development package.])
5098 AC_MSG_CHECKING([whether db is at least 4.1])
5099 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$db_header>]], [[int array[(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1))-1];]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no. you need at least db 4.1])])
5101 SYSTEM_DB_CFLAGS="-DSYSTEM_DB_HEADER='<$db_header>'"
5104 dnl At least on OpenBSD dbver is not appended to the library
5105 if test "$_os" = "OpenBSD"; then
5108 for dash in - ''; do
5109 AC_CHECK_LIB(db$dash$dbver, dbopen,
5110 [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
5111 AC_CHECK_LIB(db$dash$dbver, __db185_open,
5112 [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
5115 if test -z "$DB_LIB" ; then
5116 AC_MSG_ERROR([db library not found. Use the correct -L flag,
5117 or install the Berkeley db development package.])
5120 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
5121 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libdb-4.8.dll"
5123 AC_MSG_RESULT([internal])
5125 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
5128 AC_SUBST(SYSTEM_DB_CFLAGS)
5132 dnl ===================================================================
5133 dnl Check for system lucene
5134 dnl ===================================================================
5135 if test "$with_java" != "no"; then
5136 AC_MSG_CHECKING([which lucene to use])
5137 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
5138 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
5139 AC_MSG_RESULT([external])
5141 if test -z $LUCENE_CORE_JAR; then
5142 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
5143 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
5145 AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
5146 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
5147 [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
5148 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
5149 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
5156 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
5157 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
5160 if test -z $LUCENE_ANALYZERS_JAR; then
5161 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
5162 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
5164 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
5165 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
5166 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
5171 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
5172 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
5174 AC_MSG_CHECKING([whether lucene is version 2.x])
5175 export LUCENE_CORE_JAR
5176 if $PERL -e 'use Archive::Zip;
5177 my $file = "$ENV{'LUCENE_CORE_JAR'}";
5178 my $zip = Archive::Zip->new( $file );
5179 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
5180 if ( $mf =~ m/Specification-Version: 2.*/ ) {
5185 AC_MSG_RESULT([yes])
5187 AC_MSG_ERROR([no, you need lucene 2])
5191 AC_MSG_RESULT([internal])
5193 BUILD_TYPE="$BUILD_TYPE LUCENE"
5196 AC_SUBST(SYSTEM_LUCENE)
5197 AC_SUBST(LUCENE_CORE_JAR)
5198 AC_SUBST(LUCENE_ANALYZERS_JAR)
5200 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
5201 if test "x$enable_ext_mysql_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
5202 AC_MSG_RESULT([yes])
5204 BUILD_TYPE="$BUILD_TYPE MYSQLC"
5209 AC_SUBST(ENABLE_MYSQLC)
5211 if test "$ENABLE_MYSQLC" = "YES"; then
5213 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MYSQLC"
5215 dnl ===================================================================
5216 dnl Check for system MySQL
5217 dnl ===================================================================
5218 AC_MSG_CHECKING([for mysql pre-requisites])
5219 if test -n "$with_system_mysql" -o -n "$with_system_libs" && \
5220 test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then
5221 AC_MSG_RESULT([external MySQL])
5223 AC_PATH_PROG( MYSQLCONFIG, mysql_config)
5224 AC_MSG_CHECKING([MySQL version])
5225 MYSQL_VERSION=`$MYSQLCONFIG --version`
5226 MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
5227 if test "$MYSQL_MAJOR" -ge "5"; then
5230 AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
5232 AC_MSG_CHECKING([for MySQL Client library])
5233 MYSQL_INC=`$MYSQLCONFIG --include`
5234 MYSQL_LIB=`$MYSQLCONFIG --libs`
5235 MYSQL_DEFINES=`$MYSQLCONFIG --cflags | $SED -e s,$MYSQL_INC,,`
5236 AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
5239 if test -n "$with_libmysql_path"; then
5240 AC_MSG_RESULT([external Connector/C (libmysql)])
5241 LIBMYSQL=libmysql.so
5242 if test "$_os" = "Darwin"; then
5243 LIBMYSQL=libmysql.dylib
5244 elif test "$_os" = "WINNT"; then
5245 LIBMYSQL=libmysql.dll
5247 AC_MSG_CHECKING([for $LIBMYSQL])
5248 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
5249 AC_MSG_RESULT([found.])
5250 LIBMYSQL_PATH=$with_libmysql_path
5252 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
5255 AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path])
5258 AC_SUBST(SYSTEM_MYSQL)
5261 AC_SUBST(MYSQL_DEFINES)
5262 AC_SUBST(LIBMYSQL_PATH)
5265 dnl ===================================================================
5266 dnl Check for system MySQL C++ Connector
5267 dnl ===================================================================
5269 # who thought this too-generic cppconn dir was a good idea?
5270 AC_MSG_CHECKING([MySQL Connector/C++])
5271 if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \
5272 test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then
5273 AC_MSG_RESULT([external])
5274 SYSTEM_MYSQL_CPPCONN=YES
5276 AC_CHECK_HEADER(mysql_driver.h, [],
5277 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
5278 AC_CHECK_LIB(mysqlcppconn, main, [],
5279 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
5280 AC_MSG_CHECKING([version])
5281 AC_RUN_IFELSE([AC_LANG_SOURCE([[
5282 #include <mysql_driver.h>
5284 int main(int argc, char **argv) {
5285 sql::Driver *driver;
5286 driver = get_driver_instance();
5287 if (driver->getMajorVersion() > 1 || \
5288 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
5289 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
5294 ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[])
5299 AC_MSG_RESULT([internal])
5300 AC_MSG_CHECKING([for mysqlcppconn module])
5301 if test -d mysqlcppconn; then
5304 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5306 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
5307 SYSTEM_MYSQL_CPPCONN=NO
5310 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
5313 dnl ===================================================================
5314 dnl Check for system hsqldb
5315 dnl ===================================================================
5316 if test "$with_java" != "no"; then
5317 AC_MSG_CHECKING([which hsqldb to use])
5318 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
5319 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
5320 AC_MSG_RESULT([external])
5322 if test -z $HSQLDB_JAR; then
5323 HSQLDB_JAR=/usr/share/java/hsqldb.jar
5325 AC_CHECK_FILE($HSQLDB_JAR, [],
5326 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
5327 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
5329 if $PERL -e 'use Archive::Zip;
5330 my $file = "$ENV{'HSQLDB_JAR'}";
5331 my $zip = Archive::Zip->new( $file );
5332 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
5333 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
5334 push @l, split(/\n/, $mf);
5335 foreach my $line (@l) {
5336 if ($line =~ m/Specification-Version:/) {
5337 ($t, $version) = split (/:/,$line);
5338 $version =~ s/^\s//;
5339 ($a, $b, $c, $d) = split (/\./,$version);
5340 if ($c == "0" && $d > "8") {
5350 AC_MSG_RESULT([yes])
5352 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
5355 AC_MSG_RESULT([internal])
5357 BUILD_TYPE="$BUILD_TYPE HSQLDB"
5359 AC_SUBST(SYSTEM_HSQLDB)
5360 AC_SUBST(HSQLDB_JAR)
5363 dnl ===================================================================
5364 dnl Check for system beanshell
5365 dnl ===================================================================
5366 if test "$with_java" != "no"; then
5367 AC_MSG_CHECKING([which beanshell to use])
5368 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
5369 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
5370 AC_MSG_RESULT([external])
5372 if test -z $BSH_JAR; then
5373 BSH_JAR=/usr/share/java/bsh.jar
5375 AC_CHECK_FILE($BSH_JAR, [],
5376 [AC_MSG_ERROR(bsh.jar not found.)], [])
5378 AC_MSG_RESULT([internal])
5380 BUILD_TYPE="$BUILD_TYPE BSH"
5383 AC_SUBST(SYSTEM_BSH)
5387 dnl ===================================================================
5388 dnl Check for system saxon
5389 dnl ===================================================================
5390 if test "$with_java" != "no"; then
5391 AC_MSG_CHECKING([which saxon to use])
5392 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
5393 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
5394 AC_MSG_RESULT([external])
5396 if test -z $SAXON_JAR; then
5397 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
5398 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
5400 AC_CHECK_FILE(/usr/share/java/saxon.jar,
5401 [ SAXON_JAR=/usr/share/java/saxon.jar ],
5402 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
5403 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
5404 [ AC_MSG_ERROR(saxon.jar replacement not found)]
5411 AC_CHECK_FILE($SAXON_JAR, [],
5412 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
5414 if test -n "$SERIALIZER_JAR"; then
5415 AC_CHECK_FILE($SERIALIZER_JAR, [],
5416 [AC_MSG_ERROR(serializer.jar not found.)], [])
5417 AC_SUBST(SERIALIZER_JAR)
5420 dnl Saxon comes in two practically available versions, the out-of-date saxonb which
5421 dnl supports the Java extensions that LibreOffice uses, and the up-to-date saxon he
5422 dnl "home edition" version, which is crippled to not support those Java extensions.
5423 dnl And as an aside the he one also needs to be tweaked to include
5424 dnl a META-INF/services to broadcast that it supports the jaxp transform factory
5426 AC_MSG_CHECKING([if saxon works])
5427 cat > saxontest.java <<_ACEOF
5428 [import javax.xml.transform.TransformerFactory;
5429 import javax.xml.transform.Transformer;
5430 import javax.xml.transform.stream.StreamSource;
5433 import net.sf.saxon.FeatureKeys;
5436 public static void main(String[] args) {
5437 System.setProperty("javax.xml.transform.TransformerFactory",
5438 "net.sf.saxon.TransformerFactoryImpl");
5440 TransformerFactory tfactory = TransformerFactory.newInstance();
5441 // some external saxons (Debian, Ubuntu, ...) have this disabled
5443 tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
5444 System.out.println("TransformerFactory is" +
5445 tfactory.getClass().getName());
5446 Transformer transformer = tfactory.newTransformer(
5447 new StreamSource(new File(args[0])));
5448 } catch(Exception e){
5449 e.printStackTrace(System.err);
5458 cat > saxontest.xsl<<_ACEOF
5459 [<?xml version="1.0" encoding="UTF-8"?>
5460 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5461 <xsl:template match="/">
5462 <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/>
5468 javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2"
5469 AC_TRY_EVAL(javac_cmd)
5470 if test $? = 0 && test -f ./saxontest.class ; then
5471 java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2"
5472 AC_TRY_EVAL(java_cmd)
5473 if test $? = 0; then
5474 AC_MSG_RESULT([yes])
5476 cat saxontest.java >&5
5478 AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb])
5482 cat saxontest.java >&5
5483 AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar])
5486 AC_MSG_RESULT([internal])
5491 AC_SUBST(SYSTEM_SAXON)
5494 if test -n "$NEED_SAXON"; then
5495 BUILD_TYPE="$BUILD_TYPE SAXON"
5498 dnl ===================================================================
5499 dnl Check for system curl
5500 dnl ===================================================================
5501 if test "$_os" = "Darwin" -a "$with_system_curl" != "no"; then
5502 with_system_curl=yes
5504 AC_MSG_CHECKING([which libcurl to use])
5505 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
5506 test "$with_system_curl" != "no"; then
5507 AC_MSG_RESULT([external])
5511 if test "$cross_compiling" = "yes"; then
5512 dnl At least the OBS mingw32-libcurl-devel package
5513 dnl comes with a proper .pc file
5514 PKG_CHECK_MODULES(CURL, libcurl,, [:])
5515 if test -n "$CURL_PKG_ERRORS"; then
5518 curl_version=`$PKG_CONFIG --modversion libcurl`
5521 if test -z "$curl_version"; then
5522 AC_PATH_PROG(CURLCONFIG, curl-config)
5523 if test -z "$CURLCONFIG"; then
5524 AC_MSG_ERROR([install the libcurl development package])
5526 CURL_LIBS=`$CURLCONFIG --libs`
5527 CURL_CFLAGS=`$CURLCONFIG --cflags`
5528 curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
5531 AC_MSG_CHECKING([whether libcurl is >= 7.13.1])
5533 case $curl_version in
5534 dnl brackets doubled below because Autoconf uses them as m4 quote characters,
5535 dnl so they need to be doubled to end up in the configure script
5536 7.13.1|7.1[[4-9]].*|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
5537 AC_MSG_RESULT([yes, you have $curl_version])
5540 AC_MSG_ERROR([no, you have $curl_version])
5544 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libintl-8.dll libidn-11.dll libnspr4.dll nssutil3.dll libplc4.dll libplds4.dll nss3.dll ssl3.dll libgpg-error-0.dll libgcrypt-11.dll libssh2-1.dll libcurl-4.dll"
5546 AC_MSG_RESULT([internal])
5548 BUILD_TYPE="$BUILD_TYPE CURL"
5550 AC_SUBST(SYSTEM_CURL)
5551 AC_SUBST(CURL_CFLAGS)
5554 dnl ===================================================================
5555 dnl Check for system boost
5556 dnl ===================================================================
5557 AC_MSG_CHECKING([which boost to use])
5558 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
5559 test "$with_system_boost" != "no"; then
5560 AC_MSG_RESULT([external])
5563 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
5564 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
5565 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
5566 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
5567 AC_CHECK_HEADER(boost/function.hpp, [],
5568 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
5569 AC_CHECK_HEADER([boost/unordered_map.hpp], [HAVE_BOOST_UNORDERED_MAP=TRUE],
5570 [AC_MSG_WARN([boost/unordered_map.hpp not found])], [])
5572 save_CXXFLAGS=$CXXFLAGS
5573 CXXFLAGS="$CXXFLAGS -fno-exceptions"
5574 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
5575 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
5576 ]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
5578 if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
5579 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
5581 AC_MSG_RESULT([yes])
5583 CXXFLAGS=$save_CXXFLAGS
5586 AC_MSG_RESULT([internal])
5587 BUILD_TYPE="$BUILD_TYPE BOOST"
5589 HAVE_BOOST_UNORDERED_MAP=TRUE
5591 AC_SUBST([HAVE_BOOST_UNORDERED_MAP])
5592 AC_SUBST(SYSTEM_BOOST)
5594 dnl ===================================================================
5595 dnl Check for system mdds
5596 dnl ===================================================================
5597 AC_MSG_CHECKING([which mdds to use])
5598 if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
5599 test "$with_system_mdds" != "no"; then
5600 AC_MSG_RESULT([external])
5603 dnl ===================================================================
5604 dnl Determine which hash container mdds shall use
5605 dnl ===================================================================
5606 AC_MSG_CHECKING([which hash container mdds shall use])
5607 if test "x$HAVE_CXX0X" = "xTRUE"; then
5608 MDDS_CPPFLAGS="-std=c++0x"
5609 AC_MSG_RESULT([std::unordered_map])
5611 MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
5612 AC_MSG_RESULT([boost::unordered_map])
5616 save_CPPFLAGS="$CPPFLAGS"
5617 CPPFLAGS="$CPPFLAGS $MDDS_CPPFLAGS"
5618 AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
5619 [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
5620 AC_CHECK_HEADER(mdds/mixed_type_matrix.hpp, [],
5621 [AC_MSG_ERROR(mdds/mixed_type_matrix.hpp not found. install mdds >= 0.4.0)], [])
5622 CPPFLAGS="$save_CPPFLAGS"
5623 save_CXXFLAGS="$CXXFLAGS"
5624 CXXFLAGS="$CXXFLAGS $MDDS_CPPFLAGS"
5625 AC_MSG_CHECKING([for correct signature of ::mdds::flat_segment_tree])
5626 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <mdds/flat_segment_tree.hpp>
5628 int main(int argc, char **argv) {
5629 ::mdds::flat_segment_tree<long, short> db(0, 100, 0);
5631 if (!db.search(5, val).second)
5635 ]])],[ac_cv_cxx_mdds_flat_segment_tree_correct=yes],[ac_cv_cxx_mdds_flat_segment_tree_correct=no],[])
5637 if test "$ac_cv_cxx_mdds_flat_segment_tree_correct" = "yes"; then
5638 AC_MSG_RESULT([yes])
5640 AC_MSG_ERROR([no, install mdds >= 0.5.0])
5642 CXXFLAGS=$save_CXXFLAGS
5645 AC_MSG_RESULT([internal])
5646 BUILD_TYPE="$BUILD_TYPE MDDS"
5649 dnl ===================================================================
5650 dnl Determine which hash container mdds shall use
5651 dnl ===================================================================
5652 AC_MSG_CHECKING([which hash container mdds shall use])
5653 MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
5654 AC_MSG_RESULT([boost::unordered_map])
5656 AC_SUBST(SYSTEM_MDDS)
5657 AC_SUBST([MDDS_CPPFLAGS])
5659 dnl ===================================================================
5660 dnl Check for system vigra
5661 dnl ===================================================================
5662 AC_MSG_CHECKING([which vigra to use])
5663 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
5664 test "$with_system_vigra" != "no"; then
5665 AC_MSG_RESULT([external])
5668 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
5669 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
5672 AC_MSG_RESULT([internal])
5673 BUILD_TYPE="$BUILD_TYPE VIGRA"
5676 AC_SUBST(SYSTEM_VIGRA)
5678 dnl ===================================================================
5679 dnl Check for system odbc
5680 dnl ===================================================================
5681 AC_MSG_CHECKING([which odbc headers to use])
5682 if test -n "$with_system_odbc" -o -n "$with_system_headers" && \
5683 test "$with_system_odbc" != "no"; then
5684 AC_MSG_RESULT([external])
5685 SYSTEM_ODBC_HEADERS=YES
5687 AC_CHECK_HEADER(sqlext.h, [],
5688 [AC_MSG_ERROR(odbc not found. install odbc)], [])
5690 AC_MSG_RESULT([internal])
5691 SYSTEM_ODBC_HEADERS=NO
5692 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
5694 AC_SUBST(SYSTEM_ODBC_HEADERS)
5696 AC_MSG_CHECKING([whether to enable build of Mozilla])
5697 if test "$enable_mozilla" = "no"; then
5701 AC_MSG_RESULT([yes])
5704 AC_SUBST(WITH_MOZILLA)
5706 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
5707 if test "$enable_mozilla" = "no"; then
5709 elif test "$with_system_mozilla" = "yes"; then
5710 AC_MSG_RESULT([no, not possible with system-mozilla])
5712 AC_MSG_RESULT([yes])
5715 AC_MSG_CHECKING([whether to build XML Security support])
5716 if test "$enable_nss_module" = "no"; then
5717 AC_MSG_RESULT([no, NSS disabled])
5719 AC_MSG_RESULT([yes])
5722 AC_MSG_CHECKING([whether to build LDAP configuration backend])
5723 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
5724 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
5725 AC_MSG_RESULT([yes])
5728 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
5736 if test "$WITH_LDAP" = "YES"; then
5737 dnl ===================================================================
5738 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
5739 dnl ===================================================================
5740 AC_MSG_CHECKING([which LDAP SDK to use])
5741 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
5742 AC_MSG_RESULT([OpenLDAP])
5744 AC_CHECK_HEADERS(ldap.h, [],
5745 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
5746 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
5747 [AC_MSG_ERROR(openldap lib not found or functional)], [])
5748 # rumours say that OpenLDAP doesn't have that function. I looked and
5749 # it has it. Test for it to be sure
5750 AC_CHECK_LIB(ldap, ldap_set_option, [],
5751 [AC_MSG_ERROR(openldap lib not found or functional)], [])
5753 AC_MSG_RESULT([Netscape/Mozilla])
5754 # TODO. Actually do a sanity check and check for
5755 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
5760 AC_SUBST(WITH_OPENLDAP)
5762 dnl ===================================================================
5763 dnl Check for system mozilla
5764 dnl ===================================================================
5765 AC_MSG_CHECKING([which Mozilla to use])
5766 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
5767 AC_MSG_RESULT([external])
5769 ENABLE_NSS_MODULE=NO
5770 enable_nss_module=no
5771 AC_MSG_CHECKING([which Mozilla flavour to use])
5772 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
5774 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
5775 MOZ_FLAVOUR=xulrunner
5776 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
5777 MOZ_FLAVOUR=seamonkey
5778 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
5780 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
5785 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
5788 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
5789 if test -z "$STANDALONENSS"; then
5790 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
5792 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
5796 if $PKG_CONFIG --exists nspr ; then
5797 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
5798 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
5801 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
5804 if test "$MOZ_FLAVOUR" != "libxul"; then
5805 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
5806 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
5807 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
5810 if test -z "$HASXPCOM"; then
5811 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
5812 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
5813 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
5814 if ! test -e "$MOZ_LIB/libxul.so"; then
5815 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
5816 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
5817 MOZ_LIB="$MOZ_LIB/sdk/lib"
5822 save_CPPFLAGS="$CPPFLAGS"
5823 save_LDFLAGS="$LDFLAGS"
5825 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
5826 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
5827 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
5828 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
5829 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
5830 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
5831 LDFLAGS="$save_LDFLAGS"
5832 CPPFLAGS="$save_CPPFLAGS"
5835 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
5836 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
5837 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
5838 if test -d "$MOZ_INC/ldap"; then
5839 AC_MSG_RESULT([yes])
5840 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
5843 Could not find LDAP header include files in $MOZ_INC/ldap.
5844 Please recompile $tmp with --enable-ldap or use --with-openldap.])
5848 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
5849 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
5850 if test "$MOZ_FLAVOUR" = "libxul"; then
5851 MOZ_FLAVOUR="mozilla"
5854 elif test "$enable_mozilla" = "no"; then
5855 AC_MSG_RESULT([none])
5858 AC_MSG_RESULT([internal])
5860 BUILD_TYPE="$BUILD_TYPE MOZ"
5861 if test -z "$with_mozilla_version"; then
5864 AC_MSG_CHECKING([which Mozilla version to build])
5865 MOZILLA_VERSION=$with_mozilla_version
5866 enable_build_mozilla=1
5867 AC_MSG_RESULT([$MOZILLA_VERSION])
5870 AC_SUBST(MOZILLA_VERSION)
5872 AC_MSG_CHECKING([for toolkit Mozilla should use])
5873 if test -z "$with_mozilla_toolkit"; then
5874 if test "$_os" != "WINNT" ; then
5875 if test "$_os" = "Darwin" ; then
5877 AC_MSG_RESULT([mac])
5879 MOZILLA_TOOLKIT=gtk2
5880 AC_MSG_RESULT([gtk2])
5884 MOZILLA_TOOLKIT=$with_mozilla_toolkit
5885 enable_build_mozilla=1
5886 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
5889 AC_SUBST(MOZILLA_TOOLKIT)
5891 # default to enabling build mozilla
5892 if test "$enable_build_mozilla" != "no"; then
5893 enable_build_mozilla=yes
5895 enable_build_mozilla=
5898 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
5899 if test -n "$enable_build_mozilla"; then
5901 AC_MSG_RESULT([yes])
5907 if test "$BUILD_MOZAB" = "TRUE"; then
5908 if test "$_os" = "WINNT"; then
5909 if test "$WITH_MINGW" != "yes"; then
5910 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
5911 if test "$MSVSVER" != "2005"; then
5912 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio 2005 only.])
5915 AC_MSG_WARN([Building SeaMonkey with MinGW is not tested, and likely to break.])
5916 echo "Building SeaMonkey with MinGW is not tested, and likely to break." >> warn
5920 if test -z "$MOZILLA_VERSION"; then
5921 MOZILLA_VERSION=1.1.14
5923 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
5924 MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst.in`
5925 AC_MSG_CHECKING([for Mozilla sources])
5926 if test -z "$MOZILLA_FETCH_FILE"; then
5927 AC_MSG_RESULT([not found])
5928 HAVE_MOZILLA_TARBALL=n
5930 AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE])
5931 if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then
5932 if test -z "$DO_FETCH"; then
5933 AC_MSG_RESULT([will be fetched])
5934 HAVE_MOZILLA_TARBALL=y
5936 AC_MSG_RESULT([not found])
5937 HAVE_MOZILLA_TARBALL=n
5940 AC_MSG_RESULT([found])
5941 HAVE_MOZILLA_TARBALL=y
5944 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
5945 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
5946 Use "./download" to download.])
5948 if test "$_os" = "WINNT"; then
5949 AC_MSG_CHECKING([for moztools binaries])
5950 if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then
5951 AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip
5952 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
5956 elif test "$_os" = "Darwin"; then
5957 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
5958 if test -z "$MOZIDL"; then
5959 AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build Mozilla with Mac toolkit.])
5962 # Generic Unix/Linux section
5963 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
5964 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
5965 if test -z "$MOZGTK"; then
5966 AC_MSG_ERROR([GTK2 is needed to build Mozilla.])
5968 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
5969 if test -z "$MOZIDL"; then
5970 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build Mozilla.])
5973 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
5974 if test -z "$MOZGTK"; then
5975 AC_MSG_ERROR([GTK+ 1.2 is needed when not using GTK2 to build Mozilla.])
5977 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
5978 if test -z "$MOZIDL"; then
5979 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build Mozilla.])
5985 AC_SUBST(BUILD_MOZAB)
5988 AC_SUBST(MOZILLABUILD)
5989 AC_SUBST(SYSTEM_MOZILLA)
5990 AC_SUBST(MOZ_FLAVOUR)
5993 AC_SUBST(MOZ_LIB_XPCOM)
5994 AC_SUBST(MOZ_NSPR_CFLAGS)
5995 AC_SUBST(MOZ_NSS_CFLAGS)
5996 AC_SUBST(MOZ_LDAP_CFLAGS)
5998 dnl ===================================================================
5999 dnl Check for system NSS
6000 dnl ===================================================================
6001 AC_MSG_CHECKING([whether to build provided NSS module])
6002 if test "$enable_nss_module" != "no"; then
6003 ENABLE_NSS_MODULE="YES"
6004 BUILD_TYPE="$BUILD_TYPE NSS"
6005 AC_MSG_RESULT([yes])
6006 if test "$build_os" = "cygwin"; then
6007 AC_MSG_CHECKING([for Mozilla build tooling])
6008 if test -z "$MOZILLABUILD" ; then
6009 AC_MSG_ERROR([Mozilla build tooling not found.
6010 Use the --with-mozilla-build option after installing the tools obtained
6011 from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
6013 if test \( "$WITH_MINGW" = "yes" \) ; then
6014 if test ! -d "$MOZILLABUILD" ; then
6015 AC_MSG_ERROR([Mozilla build tooling incomplete!])
6020 if test ! -d "$MOZILLABUILD/moztools" \
6021 -o ! -d "$MOZILLABUILD/msys" ; then
6022 AC_MSG_ERROR([Mozilla build tooling incomplete!])
6030 ENABLE_NSS_MODULE="NO"
6033 AC_SUBST(ENABLE_NSS_MODULE)
6035 dnl ===================================================================
6036 dnl Check for system sane
6037 dnl ===================================================================
6038 AC_MSG_CHECKING([which sane header to use])
6039 if test -n "$with_system_sane" -o -n "$with_system_headers" && \
6040 test "$with_system_sane" != "no"; then
6041 AC_MSG_RESULT([external])
6042 SYSTEM_SANE_HEADER=YES
6043 AC_CHECK_HEADER(sane/sane.h, [],
6044 [AC_MSG_ERROR(sane not found. install sane)], [])
6046 AC_MSG_RESULT([internal])
6047 SYSTEM_SANE_HEADER=NO
6048 BUILD_TYPE="$BUILD_TYPE SANE"
6050 AC_SUBST(SYSTEM_SANE_HEADER)
6052 dnl ===================================================================
6053 dnl Check for system icu
6054 dnl ===================================================================
6061 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=
6062 AC_MSG_CHECKING([which icu to use])
6063 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
6064 test "$with_system_icu" != "no"; then
6065 AC_MSG_RESULT([external])
6068 AC_MSG_CHECKING([for unicode/rbbi.h])
6069 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
6073 if test "$WITH_MINGW" = "yes" ; then
6074 ICUPATH="/usr/i686-w64-mingw32/sys-root/mingw/bin:$ICUPATH"
6076 AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
6078 AC_MSG_CHECKING([ICU version])
6079 ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
6080 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
6081 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
6082 ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3`
6084 if test "$ICU_MAJOR" -ge "4"; then
6085 AC_MSG_RESULT([OK, $ICU_VERSION])
6087 AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
6090 if test "$cross_compiling" != "yes"; then
6091 # using the system icu tools can lead to version confusion, use the
6092 # ones from the build environment when cross-compiling
6093 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
6094 if test -z "$SYSTEM_GENBRK"; then
6095 AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
6097 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
6098 if test -z "$SYSTEM_GENCCODE"; then
6099 AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
6101 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
6102 if test -z "$SYSTEM_GENCMN"; then
6103 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
6105 if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4"; then
6106 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
6110 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS icui18n$ICU_MAJOR$ICU_MINOR.dll icuuc$ICU_MAJOR$ICU_MINOR.dll icudata$ICU_MAJOR$ICU_MINOR.dll"
6112 AC_MSG_RESULT([internal])
6114 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
6115 BUILD_TYPE="$BUILD_TYPE ICU"
6117 AC_SUBST(SYSTEM_ICU)
6118 AC_SUBST(SYSTEM_GENBRK)
6119 AC_SUBST(SYSTEM_GENCCODE)
6120 AC_SUBST(SYSTEM_GENCMN)
6124 AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
6126 dnl ===================================================================
6128 dnl ===================================================================
6130 AC_MSG_CHECKING([whether to enable graphite support])
6131 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then
6132 AC_MSG_RESULT([yes])
6133 ENABLE_GRAPHITE="TRUE"
6134 AC_MSG_CHECKING([which graphite to use])
6135 if test -n "$with_system_graphite" -o -n "$with_system_libs" && \
6136 test "$with_system_graphite" != "no"; then
6137 AC_MSG_RESULT([external])
6139 PKG_CHECK_MODULES( GRAPHITE, graphite2 >= 0.9.3 )
6140 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libgraphite2.dll"
6142 AC_MSG_RESULT([internal])
6144 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
6149 AC_SUBST(ENABLE_GRAPHITE)
6150 AC_SUBST(SYSTEM_GRAPHITE)
6151 AC_SUBST(GRAPHITE_LIBS)
6152 AC_SUBST(GRAPHITE_CFLAGS)
6154 dnl ===================================================================
6155 dnl Checks for libraries.
6156 dnl ===================================================================
6157 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
6158 dnl See if we have the AppKit framework for building with Quartz graphics.
6160 if test "$_os" = "Darwin"; then
6161 if test "x$with_x" = "xyes"; then
6162 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
6164 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
6165 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
6166 AC_MSG_RESULT([yes])
6167 x_includes="no_x_includes"
6168 x_libraries="no_x_libraries"
6169 dnl disable some things used on other Unix versions but not on the aqua build
6172 AC_MSG_ERROR([No AppKit.framewrok found])
6177 if test $_os = iOS -o $_os = Android; then
6181 dnl ***************************************
6182 dnl testing for X libraries and includes...
6183 dnl ***************************************
6184 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
6185 dnl Mac OS X using Aqua graphics. Don't check for X11.
6187 elif test "$_os" != "WINNT" -a "$_os" != "Android" -a "$_os" != "iOS"; then
6190 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6192 if test "x$x_includes" = "x"; then
6193 x_includes="default_x_includes"
6195 if test "x$x_libraries" = "x"; then
6196 x_libraries="default_x_libraries"
6198 dnl The variables $x_libraries and $x_includes are set.
6199 if test -z "$x_libraries"; then
6200 AC_MSG_ERROR([No X libraries found]) # Exit
6202 if test -z "$x_includes"; then
6203 AC_MSG_ERROR([No X includes found]) # Exit
6205 CFLAGS="$CFLAGS $X_CFLAGS"
6206 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
6207 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
6208 dnl Check if the XauDisposeAuth symbol is provided by libXau.
6209 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
6211 x_includes="no_x_includes"
6212 x_libraries="no_x_libraries"
6214 if test -z "$x_includes"; then
6215 x_includes="no_x_includes"
6217 if test -z "$x_libraries"; then
6218 x_libraries="no_x_libraries"
6220 if test "$x_includes" = "default_x_includes"; then
6226 if test "$x_libraries" = "default_x_libraries"; then
6227 XLIB=`$PKG_CONFIG --variable=libdir x11`
6228 if test "x$XLIB" = x; then
6237 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then
6238 dnl ===================================================================
6239 dnl Check for Composite.h for Mozilla plugin
6240 dnl ===================================================================
6241 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
6242 [#include <X11/Intrinsic.h>])
6246 dnl ===================================================================
6247 dnl Check for system Xrender
6248 dnl ===================================================================
6249 AC_MSG_CHECKING([whether to link to Xrender])
6250 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
6251 AC_MSG_RESULT([yes])
6253 with_system_xrender_headers=yes
6255 AC_MSG_RESULT([no, dynamically open it])
6258 AC_MSG_CHECKING([which Xrender headers to use])
6259 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
6260 test "$with_system_xrender_headers" != "no"; then
6261 AC_MSG_RESULT([external])
6262 SYSTEM_XRENDER_HEADERS=YES
6263 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
6264 [AC_MSG_ERROR(Xrender not found. install X)], [])
6266 AC_MSG_RESULT([internal])
6267 SYSTEM_XRENDER_HEADERS=NO
6268 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
6270 if test "$XRENDER_LINK" = "YES"; then
6271 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
6272 [AC_MSG_ERROR(libXrender not found or functional)], [])
6274 AC_SUBST(SYSTEM_XRENDER_HEADERS)
6275 AC_SUBST(XRENDER_LINK)
6277 dnl ===================================================================
6278 dnl Check for XRandr
6279 dnl ===================================================================
6280 AC_MSG_CHECKING([whether to enable RandR support])
6281 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
6282 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
6283 XRANDR_DLOPEN="TRUE"
6284 AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
6286 AC_MSG_RESULT([yes])
6287 XRANDR_DLOPEN="FALSE"
6288 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
6289 if test "$ENABLE_RANDR" != "TRUE"; then
6290 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
6291 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
6293 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
6294 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
6295 XRANDR_LIBS="-lXrandr "
6303 AC_SUBST(XRANDR_DLOPEN)
6304 AC_SUBST(XRANDR_CFLAGS)
6305 AC_SUBST(XRANDR_LIBS)
6306 AC_SUBST(ENABLE_RANDR)
6308 dnl ===================================================================
6309 dnl Check for building neon
6310 dnl ===================================================================
6311 AC_MSG_CHECKING([whether to use neon])
6312 if test "$enable_neon" = "no"; then
6315 AC_SUBST(DISABLE_NEON)
6317 AC_MSG_RESULT([yes])
6318 dnl ===================================================================
6319 dnl Check for system neon
6320 dnl ===================================================================
6321 AC_MSG_CHECKING([which neon to use])
6322 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
6323 test "$with_system_neon" != "no"; then
6324 AC_MSG_RESULT([external])
6325 PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
6326 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
6327 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
6329 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libtasn1-3.dll libgnutls-26.dll libneon-27.dll"
6331 AC_MSG_RESULT([internal])
6335 BUILD_TYPE="$BUILD_TYPE NEON"
6337 AC_SUBST(SYSTEM_NEON)
6338 AC_SUBST(NEON_VERSION)
6340 AC_SUBST(NEON_CFLAGS)
6343 dnl ===================================================================
6344 dnl Check for system openssl
6345 dnl ===================================================================
6346 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
6347 "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
6348 with_system_openssl=yes
6350 AC_MSG_CHECKING([which libssl to use])
6351 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
6352 test "$with_system_openssl" != "no"; then
6353 AC_MSG_RESULT([external])
6354 # Mac OS builds should get out without extra stuff is the Mac porters'
6355 # wish. And pkg-config is although Xcode ships a .pc for openssl
6356 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
6357 "$_os" = "DragonFly"; then
6359 OPENSSL_LIBS="-lssl -lcrypto"
6361 PKG_CHECK_MODULES( OPENSSL, openssl )
6364 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libssl-8.dll libcrypto-8.dll"
6366 AC_MSG_RESULT([internal])
6368 BUILD_TYPE="$BUILD_TYPE OPENSSL"
6370 AC_SUBST(SYSTEM_OPENSSL)
6371 AC_SUBST(OPENSSL_CFLAGS)
6372 AC_SUBST(OPENSSL_LIBS)
6374 dnl ===================================================================
6375 dnl Check for system redland
6376 dnl ===================================================================
6377 AC_MSG_CHECKING([which redland library to use])
6378 if test -n "$with_system_redland" -o -n "$with_system_libs" && \
6379 test "$with_system_redland" != "no"; then
6380 AC_MSG_RESULT([external])
6382 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
6383 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
6384 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libraptor-1.dll librasqal-2.dll libsqlite3-0.dll librdf-0.dll"
6386 AC_MSG_RESULT([internal])
6387 BUILD_TYPE="$BUILD_TYPE REDLAND"
6390 AC_SUBST(SYSTEM_REDLAND)
6391 AC_SUBST(REDLAND_CFLAGS)
6392 AC_SUBST(REDLAND_LIBS)
6394 dnl ===================================================================
6395 dnl Check for system hunspell
6396 dnl ===================================================================
6397 AC_MSG_CHECKING([which libhunspell to use])
6398 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
6399 test "$with_system_hunspell" != "no"; then
6400 AC_MSG_RESULT([external])
6403 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
6404 if test "$HUNSPELL_PC" != "TRUE"; then
6405 AC_CHECK_HEADER(hunspell.hxx, [],
6407 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
6408 [AC_MSG_ERROR(hunspell headers not found.)], [])
6410 AC_CHECK_LIB(hunspell, main, [],
6411 [ AC_MSG_ERROR(hunspell library not found.) ], [])
6412 HUNSPELL_LIBS=-lhunspell
6415 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libhunspell-1.3-0.dll"
6417 AC_MSG_RESULT([internal])
6419 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
6421 AC_SUBST(SYSTEM_HUNSPELL)
6422 AC_SUBST(HUNSPELL_CFLAGS)
6423 AC_SUBST(HUNSPELL_LIBS)
6425 dnl ===================================================================
6426 dnl Checking for altlinuxhyph
6427 dnl ===================================================================
6428 AC_MSG_CHECKING([which altlinuxhyph to use])
6429 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
6430 test "$with_system_altlinuxhyph" != "no"; then
6431 AC_MSG_RESULT([external])
6433 AC_CHECK_HEADER(hyphen.h, [],
6434 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
6435 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
6436 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
6437 [#include <hyphen.h>])
6438 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
6439 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6440 if test -z "$HYPHEN_LIB"; then
6441 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
6442 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6444 if test -z "$HYPHEN_LIB"; then
6445 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
6446 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6448 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libhyphen-0.dll"
6450 AC_MSG_RESULT([internal])
6452 BUILD_TYPE="$BUILD_TYPE HYPHEN"
6454 AC_SUBST(SYSTEM_HYPH)
6455 AC_SUBST(HYPHEN_LIB)
6457 dnl ===================================================================
6458 dnl Checking for mythes
6459 dnl ===================================================================
6460 AC_MSG_CHECKING([which mythes to use])
6461 if test -n "$with_system_mythes" -o -n "$with_system_libs" && \
6462 test "$with_system_mythes" != "no"; then
6463 AC_MSG_RESULT([external])
6466 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
6467 if test "$MYTHES_PKGCONFIG" = "no"; then
6468 AC_CHECK_HEADER(mythes.hxx, [],
6469 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
6470 AC_CHECK_LIB(mythes-1.2, main, [],
6471 [ MYTHES_FOUND=no], [])
6472 if test "$MYTHES_FOUND" = "no"; then
6473 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
6474 [ MYTHES_FOUND=no], [])
6476 if test "$MYTHES_FOUND" = "no"; then
6477 AC_MSG_ERROR([mythes library not found!.])
6481 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libmythes-1.2-0.dll"
6483 AC_MSG_RESULT([internal])
6485 BUILD_TYPE="$BUILD_TYPE MYTHES"
6487 AC_SUBST(SYSTEM_MYTHES)
6488 AC_SUBST(MYTHES_CFLAGS)
6489 AC_SUBST(MYTHES_LIBS)
6491 dnl ===================================================================
6492 dnl Checking for lpsolve
6493 dnl ===================================================================
6494 AC_MSG_CHECKING([which lpsolve to use])
6495 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
6496 test "$with_system_lpsolve" != "no"; then
6497 AC_MSG_RESULT([external])
6499 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
6500 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
6501 # some systems need this. Like Ubuntu....
6502 AC_CHECK_LIB(m, floor)
6503 AC_CHECK_LIB(dl, dlopen)
6504 AC_CHECK_LIB(lpsolve55, make_lp, ,
6505 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
6506 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS lpsolve55.dll"
6508 AC_MSG_RESULT([internal])
6510 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
6512 AC_SUBST(SYSTEM_LPSOLVE)
6514 dnl ===================================================================
6515 dnl Checking for libexttextcat
6516 dnl ===================================================================
6517 AC_MSG_CHECKING([which libexttextcat to use])
6518 if test -n "$with_system_libexttextcat" -o -n "$with_system_libs" && \
6519 test "$with_system_libexttextcat" != "no"; then
6520 AC_MSG_RESULT([external])
6521 SYSTEM_LIBEXTTEXTCAT=YES
6522 PKG_CHECK_MODULES([LIBEXTTEXTCAT], [libexttextcat >= 3.1.1])
6523 SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
6525 AC_MSG_RESULT([internal])
6526 SYSTEM_LIBEXTTEXTCAT=NO
6527 BUILD_TYPE="$BUILD_TYPE LIBEXTTEXTCAT"
6529 AC_SUBST(SYSTEM_LIBEXTTEXTCAT)
6530 AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
6531 AC_SUBST(LIBEXTTEXTCAT_CFLAGS)
6532 AC_SUBST(LIBEXTTEXTCAT_LIBS)
6534 dnl ***************************************
6535 dnl testing libc version for Linux...
6536 dnl ***************************************
6537 if test "$_os" = "Linux"; then
6538 AC_MSG_CHECKING([whether libc is >= 2.1.1])
6539 exec 6>/dev/null # no output
6540 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
6541 exec 6>&1 # output on again
6542 if test "$HAVE_LIBC"; then
6543 AC_MSG_RESULT([yes])
6545 AC_MSG_ERROR([no, upgrade libc])
6549 if test "$_os" != "WINNT"; then
6550 AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
6551 AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
6552 if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
6560 AC_SUBST(HAVE_GETOPT)
6561 AC_SUBST(HAVE_READDIR_R)
6562 AC_SUBST(SYSTEM_LIBC)
6564 dnl =========================================
6565 dnl Check for the Windows SDK.
6566 dnl =========================================
6567 dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
6568 dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
6569 if test "$_os" = "WINNT"; then
6570 AC_MSG_CHECKING([for Windows SDK])
6571 if test "$build_os" = "cygwin"; then
6572 if test -z "$with_windows_sdk_home"; then
6573 # This first line will detect a February 2003 Microsoft Platform SDK
6574 WINDOWS_SDK_HOME=`./oowintool --windows-sdk-home`
6575 # But there might be also an April 2005 PSDK, unfortunately MS changed
6576 # the registry entry. (we prefer the old version!?)
6577 if test -z "$WINDOWS_SDK_HOME"; then
6578 WINDOWS_SDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
6580 # normalize if found
6581 if test -n "$WINDOWS_SDK_HOME"; then
6582 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
6583 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
6586 WINDOWS_SDK_HOME=`cygpath -u "$with_windows_sdk_home"`
6589 if test -n "$WINDOWS_SDK_HOME"; then
6590 # Remove a possible trailing backslash
6591 WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
6592 # Problem with current PSDK (iz 49865)
6593 # (What "current" does that mean?)
6594 if test -f "$WINDOWS_SDK_HOME/Lib/libcp.lib"; then
6596 Some modules do not build correctly with MS Platform SDK - April 2005
6597 Edition if the library ($WINDOWS_SDK_HOME/Lib/libcp.lib) is found.
6598 Remove/rename/backup that file and restart configure. Details about this
6599 problem can be found in issue 49856.])
6602 if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
6603 -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
6604 -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
6609 if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
6615 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
6616 AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
6617 the Windows SDK are installed.])
6620 if test ! -x "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
6621 -o ! -x "$WINDOWS_SDK_HOME/bin/msidb.exe" \
6622 -o ! -x "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
6623 -o ! -x "$WINDOWS_SDK_HOME/bin/msitran.exe" ; then
6624 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
6628 if test -z "$WINDOWS_SDK_HOME"; then
6629 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
6630 elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
6631 AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
6632 elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
6633 AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
6634 elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
6635 AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
6637 AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
6640 AC_SUBST(WINDOWS_SDK_HOME)
6642 dnl =========================================
6643 dnl Check for the Microsoft DirectX SDK.
6644 dnl =========================================
6645 if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
6646 AC_MSG_CHECKING([for DirectX SDK])
6647 if test "$build_os" = "cygwin"; then
6648 if test -z "$with_directx_home"; then
6649 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
6650 if test -n "$DXSDK_DIR"; then
6651 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
6652 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
6654 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
6655 # the "DirectX SDK not found" error later
6657 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
6659 # Remove a possible trailing backslash
6660 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
6661 elif test -n "$with_directx_home"; then
6662 DIRECTXSDK_HOME="$with_directx_home"
6665 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h" ; then
6666 HAVE_DIRECTXSDK_H="yes"
6668 HAVE_DIRECTXSDK_H="no"
6671 # MS changed the location of the libraries with Dec 2004 DirectX SDK
6672 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
6673 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
6675 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
6678 if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib" ; then
6679 HAVE_DIRECTXSDK_LIB="yes"
6681 HAVE_DIRECTXSDK_LIB="no"
6684 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
6685 AC_MSG_RESULT([found])
6687 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
6690 AC_SUBST(DIRECTXSDK_HOME)
6691 AC_SUBST(DIRECTXSDK_LIB)
6693 dnl ============================================
6694 dnl Check for Nullsoft Scriptable Install System
6695 dnl ============================================
6697 if test "$_os" = "WINNT" ; then
6698 if test -z "$with_nsis_path"; then
6699 AC_PATH_PROG(NSIS_PATH, makensis)
6700 if test -n "$NSIS_PATH"; then
6701 NSIS_PATH=`dirname "$NSIS_PATH"`
6702 elif test "$build_os" = "cygwin"; then
6703 AC_MSG_CHECKING([for NSIS])
6704 nsistest=`./oowintool --nsis-dir`;
6705 nsistest=`cygpath -d -m "$nsistest"`
6706 nsistest=`cygpath -u "$nsistest"`
6707 if test -x "$nsistest/nsis.exe"; then
6708 NSIS_PATH="$nsistest"
6709 AC_MSG_RESULT([found ($NSIS_PATH)])
6711 AC_MSG_RESULT([no, no self-contained installer will be built.])
6715 AC_MSG_CHECKING([for NSIS])
6716 if test "$build_os" = "cygwin"; then
6717 with_nsis_path=`cygpath -u "$with_nsis_path"`
6719 if test -e "$with_nsis_path/makensis$EXEEXT_FOR_BUILD"; then
6720 NSIS_PATH="$with_nsis_path"
6722 if test -z "$NSIS_PATH"; then
6723 AC_MSG_RESULT([no, no self-contained installer will be built.])
6725 if test "$build_os" = "cygwin"; then
6726 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
6727 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
6729 AC_MSG_RESULT([found ($NSIS_PATH)])
6735 dnl ***************************************
6736 dnl Checking for bison and flex
6737 dnl ***************************************
6738 AC_PATH_PROG(BISON, bison)
6739 if test -z "$BISON"; then
6740 AC_MSG_ERROR([no bison found in \$PATH, install it])
6742 AC_MSG_CHECKING([the bison version])
6743 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
6744 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
6745 # Accept newer than 1.875 or older(equal) than 1.75
6746 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
6747 if test "$_bison_version" = "1.875" ; then
6748 AC_MSG_WARN([suspect ($BISON $_bison_version)])
6749 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
6751 AC_MSG_RESULT([checked ($BISON $_bison_version)])
6754 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
6757 AC_PATH_PROG(FLEX, flex)
6758 if test -z "$FLEX"; then
6759 AC_MSG_ERROR([no flex found in \$PATH, install it])
6761 dnl ***************************************
6762 dnl Checking for patch
6763 dnl ***************************************
6764 AC_PATH_PROG(PATCH, patch)
6765 if test -z "$PATCH"; then
6766 AC_MSG_ERROR([\"patch\" not found in \$PATH, install it])
6769 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
6770 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
6771 if test -z "$with_gnu_patch"; then
6774 if test -x "$with_gnu_patch"; then
6775 GNUPATCH=$with_gnu_patch
6777 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
6781 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
6782 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
6783 AC_MSG_RESULT([yes])
6785 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
6789 dnl We also need to check for --with-gnu-cp
6791 if test -z "$with_gnu_cp"; then
6792 # check the place where the good stuff is hidden on Solaris...
6793 if test -x /usr/gnu/bin/cp; then
6794 GNUCP=/usr/gnu/bin/cp
6796 AC_PATH_PROGS(GNUCP, gnucp cp)
6798 if test -z $GNUCP; then
6799 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
6802 if test -x "$with_gnu_cp"; then
6805 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
6809 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
6810 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
6811 AC_MSG_RESULT([yes])
6812 elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
6813 AC_MSG_RESULT([yes])
6816 darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*)
6818 AC_MSG_RESULT([no gnucp found - using the system's cp command])
6821 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
6829 dnl ***************************************
6830 dnl testing assembler path
6831 dnl ***************************************
6833 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
6834 if test "$CL_X64" = ""; then
6839 assembler_bin=bin/amd64
6841 if test -n "$with_asm_home"; then
6842 with_asm_home=`cygpath -u "$with_asm_home"`
6844 if test -x "$with_asm_home/$assembler"; then
6845 AC_MSG_CHECKING([$assembler assembler path])
6846 AC_MSG_RESULT([$with_asm_home/$assembler])
6847 ML_EXE="$with_asm_home/$assembler"
6849 AC_PATH_PROG(ML_EXE, $assembler)
6850 if test -z "$ML_EXE"; then
6851 AC_MSG_CHECKING([$with_cl_home/$assembler_bin/$assembler])
6852 if test -x "$with_cl_home/$assembler_bin/$assembler"; then
6853 with_asm_home=$with_cl_home/$assembler_bin
6854 AC_MSG_RESULT([found])
6855 ML_EXE="$with_cl_home/$assembler_bin/$assembler"
6857 AC_MSG_ERROR([Configure did not find $assembler assembler.])
6860 with_asm_home="ASM_IN_PATH"
6865 with_asm_home="NO_ASM_HOME"
6867 ASM_HOME="$with_asm_home"
6871 dnl ===================================================================
6872 dnl We need zip and unzip
6873 dnl ===================================================================
6874 AC_PATH_PROG(ZIP, zip)
6875 test -z "$ZIP" && AC_MSG_ERROR([zip is required])
6876 if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
6877 AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,)
6880 AC_PATH_PROG(UNZIP, unzip)
6881 test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
6883 dnl ===================================================================
6884 dnl Zip must be a specific type for different build types.
6885 dnl ===================================================================
6886 if test $build_os = cygwin; then
6887 if test -n "`$ZIP -h | grep -i WinNT`" ; then
6888 AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
6892 dnl ===================================================================
6893 dnl Test which vclplugs have to be built.
6894 dnl ===================================================================
6899 if test "x$enable_gtk3" = "xyes"; then
6900 if test "$with_system_cairo" != yes; then
6901 echo "System cairo required for gtk3 support, please use --system-cairo"
6903 PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.0 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="")
6904 if test "x$ENABLE_GTK3" = "xTRUE"; then
6909 AC_SUBST(GTK3_CFLAGS)
6910 AC_SUBST(ENABLE_GTK3)
6912 AC_MSG_CHECKING([which VCLplugs shall be built])
6914 if test "x$enable_gtk" = "xyes"; then
6918 AC_SUBST(ENABLE_GTK)
6921 if test "x$enable_kde" = "xyes"; then
6925 AC_SUBST(ENABLE_KDE)
6928 if test "x$enable_kde4" = "xyes"; then
6932 AC_SUBST(ENABLE_KDE4)
6934 if test -z "$R"; then
6935 AC_MSG_RESULT([none])
6940 dnl ===================================================================
6942 dnl ===================================================================
6945 AC_MSG_CHECKING([whether to enable GConf support])
6946 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gconf" = "yes"; then
6948 AC_MSG_RESULT([yes])
6949 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
6953 AC_SUBST(ENABLE_GCONF)
6955 dnl ===================================================================
6957 dnl ===================================================================
6960 AC_MSG_CHECKING([whether to enable GNOME VFS support])
6961 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
6962 ENABLE_GNOMEVFS="TRUE"
6963 AC_MSG_RESULT([yes])
6964 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
6965 if test "$ENABLE_GCONF" != "TRUE"; then
6966 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
6971 AC_SUBST(ENABLE_GNOMEVFS)
6973 dnl ===================================================================
6974 dnl Check whether the gtk 2.0 libraries are available.
6975 dnl ===================================================================
6979 ENABLE_SYSTRAY_GTK=""
6981 if test "$test_gtk" = "yes"; then
6983 if test "$ENABLE_GTK" = "TRUE" ; then
6984 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages]))
6985 PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages]))
6986 BUILD_TYPE="$BUILD_TYPE GTK"
6988 if test "x$enable_systray" = "xyes"; then
6989 PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
6990 [ ENABLE_SYSTRAY_GTK="TRUE" ],
6991 [ ENABLE_SYSTRAY_GTK="" ])
6994 AC_MSG_CHECKING([whether to enable DBUS support])
6995 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
6997 AC_MSG_RESULT([yes])
6998 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
7003 AC_MSG_CHECKING([whether to enable GIO support])
7004 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
7005 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
7006 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
7009 AC_MSG_RESULT([yes])
7010 PKG_CHECK_MODULES( GIO, gio-2.0 )
7016 AC_SUBST(ENABLE_GIO)
7017 AC_SUBST(ENABLE_DBUS)
7018 AC_SUBST(ENABLE_SYSTRAY_GTK)
7019 AC_SUBST(GTK_CFLAGS)
7021 AC_SUBST(GTHREAD_CFLAGS)
7022 AC_SUBST(GTHREAD_LIBS)
7024 PKG_CHECK_MODULES( LIBPNG, libpng, ENABLE_QUICKSTART_LIBPNG="TRUE", ENABLE_QUICKSTART_LIBPNG="" )
7025 AC_SUBST(LIBPNG_LIBS)
7026 AC_SUBST(LIBPNG_CFLAGS)
7028 AC_MSG_CHECKING([whether to enable libpng linking in quickstarter])
7029 if test "x$enable_unix_libpng" = "xyes"; then
7030 AC_MSG_RESULT([yes])
7033 ENABLE_QUICKSTART_LIBPNG=""
7035 AC_SUBST(ENABLE_QUICKSTART_LIBPNG)
7037 SPLIT_APP_MODULES=""
7038 if test "$enable_split_app_modules" = "yes"; then
7039 SPLIT_APP_MODULES="YES"
7041 AC_SUBST(SPLIT_APP_MODULES)
7043 SPLIT_OPT_FEATURES=""
7044 if test "$enable_split_opt_features" = "yes"; then
7045 SPLIT_OPT_FEATURES="YES"
7047 AC_SUBST(SPLIT_OPT_FEATURES)
7049 ENABLE_CAIRO_CANVAS="FALSE"
7050 if test "$enable_cairo_canvas" = "yes" ; then
7051 ENABLE_CAIRO_CANVAS="TRUE"
7053 AC_SUBST(ENABLE_CAIRO_CANVAS)
7055 dnl ===================================================================
7056 dnl Check whether the GStreamer libraries are available.
7057 dnl ===================================================================
7061 if test "$build_gstreamer" = "yes"; then
7063 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
7064 if test "x$enable_gstreamer" != "xno" ; then
7065 ENABLE_GSTREAMER="TRUE"
7066 AC_MSG_RESULT([yes])
7067 PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
7073 AC_SUBST(ENABLE_GSTREAMER)
7075 dnl ===================================================================
7076 dnl Check whether the OpenGL libraries are available
7077 dnl ===================================================================
7079 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
7082 if test "$_os" = "Darwin" ; then
7083 # We use frameworks on Mac OS X, no need for detail checks
7085 SYSTEM_MESA_HEADERS=YES
7086 AC_MSG_RESULT([yes])
7088 if test "x$enable_opengl" != "xno" ; then
7089 if test "$_os" != "WINNT"; then
7090 save_LDFLAGS=$LDFLAGS
7091 LDFLAGS="$LDFLAGS -lm"
7092 AC_MSG_RESULT([yes])
7093 AC_CHECK_LIB(GL, main, [],
7094 [AC_MSG_ERROR(libGL not installed or functional)], [])
7095 AC_CHECK_LIB(GLU, main, [],
7096 [AC_MSG_ERROR(libGLU not installed or functional)], [])
7098 LDFLAGS=$save_LDFLAGS
7100 dnl ===================================================================
7101 dnl Check for system Mesa
7102 dnl ===================================================================
7103 AC_MSG_CHECKING([which Mesa headers to use])
7104 if test -n "$with_system_mesa_headers" -o -n "$with_system_headers" && \
7105 test "$with_system_mesa_headers" != "no"; then
7106 AC_MSG_RESULT([external])
7107 SYSTEM_MESA_HEADERS=YES
7109 AC_CHECK_HEADER(GL/glxext.h, [],
7110 [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
7111 AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
7112 AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
7115 AC_MSG_RESULT([internal])
7116 SYSTEM_MESA_HEADERS=NO
7117 BUILD_TYPE="$BUILD_TYPE MESA"
7120 AC_MSG_RESULT([not on Windows])
7127 AC_SUBST(SYSTEM_MESA_HEADERS)
7128 AC_SUBST(ENABLE_OPENGL)
7130 # presenter minimizer extension?
7131 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
7132 if test "x$enable_ext_presenter_minimizer" != "xno" -a "x$enable_extension_integration" != "xno"; then
7133 AC_MSG_RESULT([yes])
7134 ENABLE_MINIMIZER=YES
7138 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MINIMIZER"
7140 AC_SUBST(ENABLE_MINIMIZER)
7142 # presenter console extension?
7143 AC_MSG_CHECKING([whether to build the Presenter Console extension])
7144 if test "x$enable_ext_presenter_console" != "xno" -a "x$enable_extension_integration" != "xno"; then
7145 AC_MSG_RESULT([yes])
7146 ENABLE_PRESENTER_SCREEN=YES
7149 ENABLE_PRESENTER_SCREEN=NO
7150 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PRESENTER_SCREEN"
7152 AC_SUBST(ENABLE_PRESENTER_SCREEN)
7154 # pdf import extension?
7155 AC_MSG_CHECKING([whether to build the PDF Import extension])
7156 if test "x$enable_ext_pdfimport" != "xno" -a "x$enable_extension_integration" != "xno"; then
7157 AC_MSG_RESULT([yes])
7158 ENABLE_PDFIMPORT=YES
7160 dnl ===================================================================
7161 dnl Check for system poppler
7162 dnl ===================================================================
7163 AC_MSG_CHECKING([which pdf backend to use])
7164 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
7165 test "$with_system_poppler" != "no"; then
7166 AC_MSG_RESULT([external])
7168 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
7170 save_CXXFLAGS=$CXXFLAGS
7171 save_CPPFLAGS=$CPPFLAGS
7172 CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
7173 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
7174 AC_CHECK_HEADER([cpp/poppler-version.h], [],
7175 [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
7176 CXXFLAGS=$save_CXXFLAGS
7177 CPPFLAGS=$save_CPPFLAGS
7180 AC_MSG_RESULT([internal])
7182 BUILD_TYPE="$BUILD_TYPE XPDF"
7187 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PDFIMPORT"
7189 AC_SUBST(ENABLE_PDFIMPORT)
7190 AC_SUBST(SYSTEM_POPPLER)
7191 AC_SUBST(POPPLER_CFLAGS)
7192 AC_SUBST(POPPLER_LIBS)
7195 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
7196 AC_MSG_CHECKING([for sdext module])
7197 BUILD_TYPE="$BUILD_TYPE SDEXT"
7200 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
7201 if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
7202 AC_MSG_RESULT([yes])
7203 AC_MSG_CHECKING([for swext module])
7204 ENABLE_MEDIAWIKI=YES
7205 BUILD_TYPE="$BUILD_TYPE SWEXT"
7206 if test "x$with_java" = "xno"; then
7207 AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
7212 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
7214 AC_SUBST(ENABLE_MEDIAWIKI)
7216 if test "$ENABLE_MEDIAWIKI" = "YES"; then
7217 AC_MSG_CHECKING([which Servlet API Jar to use])
7218 if test -n "$with_system_servlet_api"; then
7219 AC_MSG_RESULT([external])
7220 SYSTEM_SERVLETAPI=YES
7221 if test -z "$SERVLETAPI_JAR"; then
7222 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
7224 AC_CHECK_FILE($SERVLETAPI_JAR, [],
7225 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
7227 AC_MSG_RESULT([internal])
7228 SYSTEM_SERVLETAPI=NO
7229 BUILD_TYPE="$BUILD_TYPE TOMCAT"
7232 AC_SUBST(SYSTEM_SERVLETAPI)
7233 AC_SUBST(SERVLETAPI_JAR)
7235 AC_MSG_CHECKING([whether to build the Report Builder extension])
7236 if test "$enable_ext_report_builder" != "no" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
7237 AC_MSG_RESULT([yes])
7238 ENABLE_REPORTBUILDER=YES
7239 AC_MSG_CHECKING([for reportbuilder module])
7240 AC_MSG_CHECKING([which jfreereport libs to use])
7241 if test "$with_system_jfreereport" = "yes" -o "x$with_system_jars" = "xyes"; then
7242 SYSTEM_JFREEREPORT=YES
7243 AC_MSG_RESULT([external])
7244 if test -z $SAC_JAR; then
7245 SAC_JAR=/usr/share/java/sac.jar
7247 AC_CHECK_FILE($SAC_JAR, [],
7248 [AC_MSG_ERROR(sac.jar not found.)], [])
7250 if test -z $LIBXML_JAR; then
7251 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
7252 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
7254 AC_CHECK_FILE(/usr/share/java/libxml.jar,
7255 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
7256 [AC_MSG_ERROR(libxml.jar replacement not found.)]
7261 AC_CHECK_FILE($LIBXML_JAR, [],
7262 [AC_MSG_ERROR(libxml.jar not found.)], [])
7265 if test -z $FLUTE_JAR; then
7266 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
7267 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
7269 AC_CHECK_FILE(/usr/share/java/flute.jar,
7270 [ FLUTE_JAR=/usr/share/java/flute.jar ],
7271 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
7276 AC_CHECK_FILE($FLUTE_JAR, [],
7277 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
7280 if test -z $JFREEREPORT_JAR; then
7281 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
7282 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
7284 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
7285 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
7286 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
7291 AC_CHECK_FILE($JFREEREPORT_JAR, [],
7292 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
7295 if test -z $LIBLAYOUT_JAR; then
7296 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
7297 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
7299 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
7300 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
7301 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
7306 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
7307 [AC_MSG_ERROR(liblayout.jar not found.)], [])
7310 if test -z $LIBLOADER_JAR; then
7311 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
7312 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
7314 AC_CHECK_FILE(/usr/share/java/libloader.jar,
7315 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
7316 [AC_MSG_ERROR(libloader.jar replacement not found.)]
7321 AC_CHECK_FILE($LIBLOADER_JAR, [],
7322 [AC_MSG_ERROR(libloader.jar not found.)], [])
7325 if test -z $LIBFORMULA_JAR; then
7326 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
7327 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
7329 AC_CHECK_FILE(/usr/share/java/libformula.jar,
7330 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
7331 [AC_MSG_ERROR(libformula.jar replacement not found.)]
7336 AC_CHECK_FILE($LIBFORMULA_JAR, [],
7337 [AC_MSG_ERROR(libformula.jar not found.)], [])
7340 if test -z $LIBREPOSITORY_JAR; then
7341 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
7342 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
7344 AC_CHECK_FILE(/usr/share/java/librepository.jar,
7345 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
7346 [AC_MSG_ERROR(librepository.jar replacement not found.)]
7351 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
7352 [AC_MSG_ERROR(librepository.jar not found.)], [])
7355 if test -z $LIBFONTS_JAR; then
7356 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
7357 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
7359 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
7360 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
7361 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
7366 AC_CHECK_FILE($LIBFONTS_JAR, [],
7367 [AC_MSG_ERROR(libfonts.jar not found.)], [])
7370 if test -z $LIBSERIALIZER_JAR; then
7371 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
7372 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
7374 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
7375 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
7376 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
7381 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
7382 [AC_MSG_ERROR(libserializer.jar not found.)], [])
7386 if test -z $LIBBASE_JAR; then
7387 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
7388 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
7390 AC_CHECK_FILE(/usr/share/java/libbase.jar,
7391 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
7392 [AC_MSG_ERROR(libbase.jar replacement not found.)]
7397 AC_CHECK_FILE($LIBBASE_JAR, [],
7398 [AC_MSG_ERROR(libbase.jar not found.)], [])
7402 AC_MSG_RESULT([internal])
7403 AC_MSG_CHECKING([for jfreereport module])
7404 SYSTEM_JFREEREPORT=NO
7405 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
7407 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
7410 ENABLE_REPORTBUILDER=NO
7411 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN"
7412 SYSTEM_JFREEREPORT=NO
7414 AC_SUBST(ENABLE_REPORTBUILDER)
7415 AC_SUBST(SYSTEM_JFREEREPORT)
7417 AC_SUBST(LIBXML_JAR)
7419 AC_SUBST(JFREEREPORT_JAR)
7420 AC_SUBST(LIBBASE_JAR)
7421 AC_SUBST(LIBLAYOUT_JAR)
7422 AC_SUBST(LIBLOADER_JAR)
7423 AC_SUBST(LIBFORMULA_JAR)
7424 AC_SUBST(LIBREPOSITORY_JAR)
7425 AC_SUBST(LIBFONTS_JAR)
7426 AC_SUBST(LIBSERIALIZER_JAR)
7428 # this has to be here because both the Wiki Publisher and the SRB use
7430 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
7431 AC_MSG_CHECKING([which Apache commons-* libs to use])
7432 if test "x$with_system_apache_commons" = "xyes" -o "x$with_system_jars" = "xyes"; then
7433 SYSTEM_APACHE_COMMONS=YES
7434 AC_MSG_RESULT([external])
7435 if test "$ENABLE_MEDIAWIKI" = "YES"; then
7436 if test -z $COMMONS_CODEC_JAR; then
7437 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
7438 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
7440 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
7441 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
7442 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
7447 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
7448 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
7451 if test -z $COMMONS_LANG_JAR; then
7452 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
7453 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
7455 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
7456 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
7457 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
7462 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
7463 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
7466 if test -z $COMMONS_HTTPCLIENT_JAR; then
7467 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
7468 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
7470 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
7471 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
7472 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
7477 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
7478 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
7481 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
7482 if test -z $COMMONS_LOGGING_JAR; then
7483 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
7484 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
7486 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
7487 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
7488 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
7493 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
7494 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
7498 AC_MSG_RESULT([internal])
7499 SYSTEM_APACHE_COMMONS=NO
7500 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
7503 AC_SUBST(SYSTEM_APACHE_COMMONS)
7504 AC_SUBST(COMMONS_CODEC_JAR)
7505 AC_SUBST(COMMONS_LANG_JAR)
7506 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
7507 AC_SUBST(COMMONS_LOGGING_JAR)
7509 # scripting provider for BeanShell extension?
7510 AC_MSG_CHECKING([whether to build extension for support of scripts in BeanShell])
7511 if test "x$enable_ext_scripting_beanshell" = "xyes" -a "x$enable_extension_integration" != "xno"; then
7512 AC_MSG_RESULT([yes])
7513 ENABLE_SCRIPTING_BEANSHELL=YES
7516 ENABLE_SCRIPTING_BEANSHELL=NO
7517 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_BEANSHELL"
7519 AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
7521 # scripting provider for JavaScript extension?
7522 AC_MSG_CHECKING([whether to build extension for support of scripts in JavaScript])
7523 if test "x$enable_ext_scripting_javascript" = "xyes" -a "x$enable_extension_integration" != "xno"; then
7524 AC_MSG_RESULT([yes])
7525 ENABLE_SCRIPTING_JAVASCRIPT=YES
7528 ENABLE_SCRIPTING_JAVASCRIPT=NO
7529 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_JAVASCRIPT"
7531 AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
7533 dnl Scripting provider for Python extension?
7534 dnl We always provide this unless we have disabled Python completely
7535 if test $enable_python = no; then
7536 ENABLE_SCRIPTING_PYTHON=NO
7538 ENABLE_SCRIPTING_PYTHON=YES
7540 AC_SUBST(ENABLE_SCRIPTING_PYTHON)
7544 x86_64 | powerpc64 | s390x)
7545 if test "$SIZEOF_LONG" = "8"; then
7546 supports_multilib="yes"
7553 dnl ===================================================================
7554 dnl Check whether the Qt3 and KDE3 libraries are available.
7555 dnl ===================================================================
7559 if test "$_os" != "OpenBSD"; then
7562 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
7563 dnl Search paths for Qt3 and KDE3
7564 if test -z "$supports_multilib" ; then
7565 qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include /usr/local/include/X11/qt3 $x_includes"
7566 qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib /usr/local/lib/qt3 $x_libraries"
7568 qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib64/qt3/include /usr/lib64/qt/include /usr/share/qt3/include /usr/lib/qt3/include /usr/lib/qt/include /usr/local/include/X11/qt3 $x_includes"
7569 qt_libdirs="$QTLIB /usr/local/qt/lib64 /usr/lib64/qt /usr/lib64 /usr/X11R6/lib64/X11/qt /usr/X11R6/lib64/qt /usr/lib64/qt3/lib64 /usr/lib64/qt/lib64 /usr/share/qt3/lib64 /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib /usr/local/lib/qt3 $x_libraries"
7571 if test -n "$QTDIR" ; then
7572 qt_incdirs="$QTDIR/include $qt_incdirs"
7573 if test -z "$supports_multilib" ; then
7574 qt_libdirs="$QTDIR/lib $qt_libdirs"
7576 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
7579 if test -z "$supports_multilib" ; then
7580 kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /opt/kde3/include /opt/kde/include $x_includes"
7581 kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib /usr/lib $x_libraries"
7583 kde_incdirs="/usr/lib64/kde/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /opt/kde3/include /opt/kde/include $x_includes"
7584 kde_libdirs="/usr/lib64/kde/lib64 /usr/local/kde/lib64 /usr/kde/lib64 /usr/lib64/kde /usr/lib64/kde3 /usr/X11R6/lib64 /usr/local/lib64 /opt/kde3/lib64 /opt/kde/lib64 /usr/X11R6/kde/lib64 /usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib /usr/lib64 $x_libraries"
7586 if test -n "$KDEDIR" ; then
7587 kde_incdirs="$KDEDIR/include $kde_incdirs"
7588 if test -z "$supports_multilib" ; then
7589 kde_libdirs="$KDEDIR/lib $kde_libdirs"
7591 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
7596 qt_test_include="qstyle.h"
7597 kde_test_include="kapp.h"
7599 if test "$_os" != "OpenBSD"; then
7600 qt_test_library="libqt-mt.so"
7601 kde_test_library="libDCOP.so"
7603 qt_test_library="libqt-mt.so*"
7604 kde_test_library="libDCOP.so*"
7607 dnl Check for Qt3 headers
7608 AC_MSG_CHECKING([for Qt3 headers])
7610 for kde_check in $qt_incdirs ; do
7611 if test -r "$kde_check/$qt_test_include" ; then
7612 qt_incdir="$kde_check"
7616 AC_MSG_RESULT([$qt_incdir])
7617 if test "x$qt_incdir" = "xno" ; then
7618 AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
7619 your Qt3 installation by exporting QTDIR before running "configure".])
7622 dnl Check for Qt3 libraries
7623 AC_MSG_CHECKING([for Qt3 libraries])
7625 for qt_check in $qt_libdirs ; do
7626 if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`" ; then
7627 qt_libdir="$qt_check"
7631 AC_MSG_RESULT([$qt_libdir])
7632 if test "x$qt_libdir" = "xno" ; then
7633 AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
7634 your Qt3 installation by exporting QTDIR before running "configure".])
7637 dnl Check for Meta Object Compiler
7638 AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
7639 if test "$MOC" = "no" ; then
7640 AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
7641 the root of your Qt3 installation by exporting QTDIR before running "configure".])
7644 dnl Check for KDE3 headers
7645 AC_MSG_CHECKING([for KDE3 headers])
7647 for kde_check in $kde_incdirs ; do
7648 if test -r "$kde_check/$kde_test_include" ; then
7649 kde_incdir="$kde_check"
7653 AC_MSG_RESULT([$kde_incdir])
7654 if test "x$kde_incdir" = "xno" ; then
7655 AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
7656 your KDE3 installation by exporting KDEDIR before running "configure".])
7659 dnl Check for KDE3 libraries
7660 AC_MSG_CHECKING([for KDE3 libraries])
7662 for kde_check in $kde_libdirs ; do
7663 if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`" ; then
7664 kde_libdir="$kde_check"
7668 AC_MSG_RESULT([$kde_libdir])
7669 if test "x$kde_libdir" = "xno" ; then
7670 AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
7671 your KDE3 installation by exporting KDEDIR before running "configure".])
7674 dnl Set the variables
7675 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
7676 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
7678 AC_SUBST(KDE_CFLAGS)
7682 dnl ===================================================================
7683 dnl KDE4 Integration
7684 dnl ===================================================================
7692 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
7693 qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
7694 qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
7696 kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
7697 kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
7699 if test -n "$supports_multilib" ; then
7700 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
7701 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
7704 if test -n "$QTDIR" ; then
7705 qt_incdirs="$QTDIR/include $qt_incdirs"
7706 if test -z "$supports_multilib" ; then
7707 qt_libdirs="$QTDIR/lib $qt_libdirs"
7709 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
7712 if test -n "$QT4DIR" ; then
7713 qt_incdirs="$QT4DIR/include $qt_incdirs"
7714 if test -z "$supports_multilib" ; then
7715 qt_libdirs="$QT4DIR/lib $qt_libdirs"
7717 qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
7721 if test -n "$KDEDIR" ; then
7722 kde_incdirs="$KDEDIR/include $kde_incdirs"
7723 if test -z "$supports_multilib" ; then
7724 kde_libdirs="$KDEDIR/lib $kde_libdirs"
7726 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
7729 if test -n "$KDE4DIR" ; then
7730 kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
7731 if test -z "$supports_multilib" ; then
7732 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
7734 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
7738 qt_test_include="Qt/qobject.h"
7739 qt_test_library="libQtCore.so"
7740 kde_test_include="kwindowsystem.h"
7741 kde_test_library="libsolid.so"
7743 AC_MSG_CHECKING([for Qt4 headers])
7745 for inc_dir in $qt_incdirs ; do
7746 if test -r "$inc_dir/$qt_test_include" ; then
7747 qt_header_dir="$inc_dir"
7752 AC_MSG_RESULT([$qt_header_dir])
7753 if test "x$qt_header_dir" = "xno" ; then
7754 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
7757 AC_MSG_CHECKING([for Qt4 libraries])
7759 for lib_dir in $qt_libdirs ; do
7760 if test -r "$lib_dir/$qt_test_library" ; then
7761 qt_lib_dir="$lib_dir"
7762 PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
7767 AC_MSG_RESULT([$qt_lib_dir])
7769 if test "x$qt_lib_dir" = "xno" ; then
7770 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
7773 dnl Check for Meta Object Compiler
7775 AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7777 if test "$MOC4" = "no" ; then
7778 AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7779 if test "$MOC4" = "no" ; then
7780 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
7781 the root of your Qt installation by exporting QT4DIR before running "configure".])
7785 dnl Check for KDE4 headers
7786 AC_MSG_CHECKING([for KDE4 headers])
7788 for kde_check in $kde_incdirs ; do
7789 if test -r "$kde_check/$kde_test_include" ; then
7790 kde_incdir="$kde_check"
7794 AC_MSG_RESULT([$kde_incdir])
7795 if test "x$kde_incdir" = "xno" ; then
7796 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
7799 dnl Check for KDE4 libraries
7800 AC_MSG_CHECKING([for KDE4 libraries])
7802 for kde_check in $kde_libdirs ; do
7803 if test -r "$kde_check/$kde_test_library" ; then
7804 kde_libdir="$kde_check"
7809 AC_MSG_RESULT([$kde_libdir])
7810 if test "x$kde_libdir" = "xno" ; then
7811 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
7814 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
7815 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
7818 save_CXXFLAGS=$CXXFLAGS
7819 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
7820 AC_MSG_CHECKING([whether KDE is >= 4.2])
7821 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7822 #include <kdeversion.h>
7824 int main(int argc, char **argv) {
7825 if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
7828 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
7829 CXXFLAGS=$save_CXXFLAGS
7832 # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled
7833 PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
7835 AC_MSG_WARN([[No Glib found, KDE4 support will not integrate with Qt's Glib event loop support]]))
7837 AC_SUBST(KDE4_CFLAGS)
7840 AC_SUBST(KDE_GLIB_CFLAGS)
7841 AC_SUBST(KDE_GLIB_LIBS)
7842 AC_SUBST(KDE_HAVE_GLIB)
7844 dnl ===================================================================
7845 dnl Test for the enabling the lockdown pieces
7846 dnl ===================================================================
7847 AC_MSG_CHECKING([whether to enable the lockdown pieces])
7849 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
7851 AC_MSG_RESULT([yes])
7855 AC_SUBST(ENABLE_LOCKDOWN)
7857 dnl ===================================================================
7858 dnl Test whether to include Evolution 2 support
7859 dnl ===================================================================
7860 AC_MSG_CHECKING([whether to enable evolution 2 support])
7861 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
7862 AC_MSG_RESULT([yes])
7863 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
7864 ENABLE_EVOAB2="TRUE"
7869 AC_SUBST(ENABLE_EVOAB2)
7870 AC_SUBST(GOBJECT_CFLAGS)
7871 AC_SUBST(GOBJECT_LIBS)
7873 dnl ===================================================================
7874 dnl Test whether to include KDE AB support
7875 dnl ===================================================================
7876 AC_MSG_CHECKING([whether to enable KDE address book support])
7877 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
7878 AC_MSG_RESULT([yes])
7880 save_CXXFLAGS=$CXXFLAGS
7881 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
7882 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
7883 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7884 #include <kdeversion.h>
7886 int main(int argc, char **argv) {
7887 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
7890 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old or too recent, please use another version of KDE or disable KDE address book support])],[])
7891 CXXFLAGS=$save_CXXFLAGS
7898 AC_SUBST(ENABLE_KAB)
7900 dnl ===================================================================
7901 dnl Test whether to include MathMLDTD
7902 dnl ===================================================================
7903 AC_MSG_CHECKING([whether to include MathMLDTD])
7904 if test -n "$enable_mathmldtd"; then
7905 if test "$enable_mathmldtd" = "no"; then
7907 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
7909 AC_MSG_RESULT([yes])
7910 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
7914 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
7917 dnl ===================================================================
7918 dnl Test which themes to include
7919 dnl ===================================================================
7920 AC_MSG_CHECKING([which themes to include])
7921 # if none given, use all available themes
7922 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
7923 with_theme="default crystal hicontrast oxygen tango"
7927 for theme in $with_theme; do
7929 default|crystal|hicontrast|oxygen|tango) : ;;
7930 *) AC_MSG_ERROR([Unknown value for --with-themes: $theme]) ;;
7932 WITH_THEMES="$WITH_THEMES $theme"
7933 SCPDEFS="$SCPDEFS -DTHEME_`echo $theme|tr '[[:lower:]]' '[[:upper:]]'`"
7935 AC_MSG_RESULT([$WITH_THEMES])
7936 AC_SUBST([WITH_THEMES])
7938 dnl ===================================================================
7939 dnl Test whether to integrate helppacks into the product's installer
7940 dnl ===================================================================
7941 AC_MSG_CHECKING([for helppack integration])
7942 if test "z$with_helppack_integration" = "zno" ; then
7943 WITH_HELPPACK_INTEGRATION=NO
7944 AC_MSG_RESULT([no integration])
7946 WITH_HELPPACK_INTEGRATION=YES
7947 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
7948 AC_MSG_RESULT([integration])
7950 AC_SUBST(WITH_HELPPACK_INTEGRATION)
7952 ###############################################################################
7953 # Extensions checking
7954 ###############################################################################
7955 dnl ===================================================================
7956 dnl Test whether to integrate extensions into the product's installer
7957 dnl ===================================================================
7958 AC_MSG_CHECKING([for extensions integration])
7959 if test "x$enable_extension_integration" != "xno"; then
7960 WITH_EXTENSION_INTEGRATION=YES
7961 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
7962 AC_MSG_RESULT([yes, use integration])
7964 WITH_EXTENSION_INTEGRATION=NO
7965 AC_MSG_RESULT([no, do not integrate])
7967 AC_SUBST(WITH_EXTENSION_INTEGRATION)
7969 dnl ===================================================================
7970 dnl Test whether to include Lightproof extensions
7971 dnl ===================================================================
7972 AC_MSG_CHECKING([for Lightproof extensions integration (only supported languages displayed)])
7976 LIGHTPROOF_EN_US_PACK=
7977 if test "x$enable_ext_lightproof" = "xno" -o "x$enable_extension_integration" = "xno"; then
7978 AC_MSG_RESULT([no integration])
7980 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LIGHTPROOF"
7981 if test "x$enable_ext_lightproof" = "xyes" -o "x$enable_ext_lightproof" = "x"; then
7982 wanted_lightproof="en-US hu ru"
7984 for lang in $enable_ext_lightproof ; do
7987 wanted_lightproof="$wanted_lightproof $lang"
7990 AC_MSG_ERROR([Unknown value for --enable-ext-lightproof: $lang])
7995 for lang in $wanted_lightproof ; do
7996 LIGHTPROOF_LANG="$LIGHTPROOF_LANG $lang"
7998 en-US) LIGHTPROOF_EN_US_PACK="0ab55ac8e88f04258f1d3e79e984382f-lightproof-en_US-0.1.oxt" ;;
7999 hu) LIGHTPROOF_HU_PACK="76345f925e34fef2d29bade4f29108e9-lightproof-hu_1.3.oxt" ;;
8000 ru) LIGHTPROOF_RU_PACK="673860e8649cff2ebdc68bd46f2f7f1a-lightproof-ru_0.1.oxt" ;;
8001 *) AC_MSG_ERROR([Unknown value for --enable-ext-lightproof: $lang]) ;;
8004 AC_MSG_RESULT([$LIGHTPROOF_LANG])
8006 AC_SUBST(LIGHTPROOF_LANG)
8007 AC_SUBST(LIGHTPROOF_HU_PACK)
8008 AC_SUBST(LIGHTPROOF_RU_PACK)
8009 AC_SUBST(LIGHTPROOF_EN_US_PACK)
8011 dnl ===================================================================
8012 dnl Test whether to include Watch Window extension
8013 dnl ===================================================================
8014 AC_MSG_CHECKING([for Watch Window extension integration])
8015 WATCH_WINDOW_EXTENSION_PACK=
8016 if test "x$enable_ext_watch_window" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8017 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_WATCH_WINDOW"
8018 WATCH_WINDOW_EXTENSION_PACK="23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt"
8019 AC_MSG_RESULT([yes])
8023 AC_SUBST(WATCH_WINDOW_EXTENSION_PACK)
8025 dnl ===================================================================
8026 dnl Test whether to include SmART Gallery (Diagram) extension
8027 dnl ===================================================================
8028 AC_MSG_CHECKING([for SmART Gallery (Diagram) extension integration])
8029 DIAGRAM_EXTENSION_PACK=
8030 if test "x$enable_ext_diagram" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8031 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_DIAGRAM"
8032 DIAGRAM_EXTENSION_PACK="4a433efb6d385264ebc1d5513782d51c-SmART_0.9.4.oxt"
8033 AC_MSG_RESULT([yes])
8037 AC_SUBST(DIAGRAM_EXTENSION_PACK)
8039 dnl ===================================================================
8040 dnl Test whether to include Validator extension
8041 dnl ===================================================================
8042 AC_MSG_CHECKING([for Validator extension integration])
8043 VALIDATOR_EXTENSION_PACK=
8044 if test "x$enable_ext_validator" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8045 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_VALIDATOR"
8046 VALIDATOR_EXTENSION_PACK="bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt"
8047 AC_MSG_RESULT([yes])
8051 AC_SUBST(VALIDATOR_EXTENSION_PACK)
8053 dnl ===================================================================
8054 dnl Test whether to include Barcode extension
8055 dnl ===================================================================
8056 AC_MSG_CHECKING([for Barcode extension integration])
8057 BARCODE_EXTENSION_PACK=
8058 if test "x$enable_ext_barcode" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8059 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_BARCODE"
8060 BARCODE_EXTENSION_PACK="7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt"
8061 AC_MSG_RESULT([yes])
8065 AC_SUBST([BARCODE_EXTENSION_PACK])
8067 dnl ===================================================================
8068 dnl Test whether to include ConvertTextToNumber extension
8069 dnl ===================================================================
8070 AC_MSG_CHECKING([for ConvertTextToNumber extension integration])
8071 CT2N_EXTENSION_PACK=
8072 if test "x$enable_ext_ct2n" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8073 BUILD_TYPE="$BUILD_TYPE CT2N"
8074 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N"
8075 CT2N_EXTENSION_PACK="451ccf439a36a568653b024534669971-ConvertTextToNumber_1.3.2.oxt"
8076 AC_MSG_RESULT([yes])
8080 AC_SUBST(CT2N_EXTENSION_PACK)
8082 dnl ===================================================================
8083 dnl Test whether to include Numbertext extension
8084 dnl ===================================================================
8085 AC_MSG_CHECKING([for Numbertext extension integration])
8086 NUMBERTEXT_EXTENSION_PACK=
8087 if test "x$enable_ext_numbertext" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8088 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NUMBERTEXT"
8089 NUMBERTEXT_EXTENSION_PACK="b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt"
8090 AC_MSG_RESULT([yes])
8094 AC_SUBST(NUMBERTEXT_EXTENSION_PACK)
8096 dnl ===================================================================
8097 dnl Test whether to include Hungarian Cross-reference Toolbar extension
8098 dnl ===================================================================
8099 AC_MSG_CHECKING([for Hungarian Cross-reference Toolbar extension integration])
8100 HUNART_EXTENSION_PACK=
8101 if test "x$enable_ext_hunart" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8102 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_HUNART"
8103 HUNART_EXTENSION_PACK="b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt"
8104 AC_MSG_RESULT([yes])
8108 AC_SUBST(HUNART_EXTENSION_PACK)
8110 dnl ===================================================================
8111 dnl Test whether to include Typography Toolbar extension
8112 dnl ===================================================================
8113 AC_MSG_CHECKING([for Typography Toolbar extension integration])
8114 TYPO_EXTENSION_PACK=
8115 if test "x$enable_ext_typo" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8116 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_TYPO"
8117 TYPO_EXTENSION_PACK="9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt"
8118 AC_MSG_RESULT([yes])
8122 AC_SUBST(TYPO_EXTENSION_PACK)
8124 dnl ===================================================================
8125 dnl Test whether to include Google Docs extension
8126 dnl ===================================================================
8127 AC_MSG_CHECKING([for Google Docs extension integration])
8128 GOOGLE_DOCS_EXTENSION_PACK=
8129 if test "x$enable_ext_google_docs" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8130 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_GOOGLE_DOCS"
8131 GOOGLE_DOCS_EXTENSION_PACK="cea0f63d5985ba4fcbd882031df44346-gdocs_3.0.0_modified.oxt"
8132 AC_MSG_RESULT([yes])
8136 AC_SUBST(GOOGLE_DOCS_EXTENSION_PACK)
8138 dnl ===================================================================
8139 dnl Test whether to include NLPSolver extension
8140 dnl ===================================================================
8141 AC_MSG_CHECKING([for NLPSolver extension integration])
8142 if test "x$enable_ext_nlpsolver" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8143 BUILD_TYPE="$BUILD_TYPE NLPSOLVER"
8144 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER"
8145 AC_MSG_RESULT([yes])
8150 dnl ===================================================================
8151 dnl Test whether to include LanguageTool extension
8152 dnl ===================================================================
8153 AC_MSG_CHECKING([for LanguageTool extension integration])
8154 if test "x$enable_ext_languagetool" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8155 BUILD_TYPE="$BUILD_TYPE LANGUAGETOOL"
8156 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL"
8157 AC_MSG_RESULT([yes])
8162 dnl ===================================================================
8163 dnl Test whether to include oooblogger extension
8164 dnl ===================================================================
8165 AC_MSG_CHECKING([for oooblogger extension integration])
8166 OOOBLOGGER_EXTENSION_PACK=
8167 if test "x$enable_ext_oooblogger" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8168 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_OOOBLOGGER"
8169 OOOBLOGGER_EXTENSION_PACK="b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt"
8170 AC_MSG_RESULT([yes])
8174 AC_SUBST(OOOBLOGGER_EXTENSION_PACK)
8175 ###############################################################################
8177 dnl ===================================================================
8178 dnl Test whether to include Sun Professional Template Pack
8179 dnl ===================================================================
8180 AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
8181 if test "z$with_sun_templates" = "z" -o "z$with_sun_templates" = "zno" ; then
8182 SUNTEMPLATES_LANG=""
8183 AC_MSG_RESULT([no integration])
8185 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
8186 sun_supported_langs="en-US de it fr es hu"
8187 if test "z$with_sun_templates" = "zyes" ; then
8188 wanted_sun_templates="$sun_supported_langs"
8190 # check whether the langs are supported by Sun
8191 wanted_sun_templates=
8192 for lang in $with_sun_templates ; do
8193 if test -n "`echo $sun_supported_langs | grep "$lang"`" ; then
8194 wanted_sun_templates="$wanted_sun_templates $lang"
8199 SUNTEMPLATES_DE_PACK=
8200 SUNTEMPLATES_EN_US_PACK=
8201 SUNTEMPLATES_ES_PACK=
8202 SUNTEMPLATES_FR_PACK=
8203 SUNTEMPLATES_HU_PACK=
8204 SUNTEMPLATES_IT_PACK=
8205 # check whether the langs are requested at all
8206 for lang in $wanted_sun_templates ; do
8207 if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then
8208 SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
8210 "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
8211 "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
8212 "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
8213 "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
8214 "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
8215 "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
8219 AC_MSG_RESULT([$SUNTEMPLATES_LANG])
8221 AC_SUBST(SUNTEMPLATES_LANG)
8222 AC_SUBST(SUNTEMPLATES_DE_PACK)
8223 AC_SUBST(SUNTEMPLATES_EN_US_PACK)
8224 AC_SUBST(SUNTEMPLATES_ES_PACK)
8225 AC_SUBST(SUNTEMPLATES_FR_PACK)
8226 AC_SUBST(SUNTEMPLATES_HU_PACK)
8227 AC_SUBST(SUNTEMPLATES_IT_PACK)
8229 dnl ===================================================================
8230 dnl Test whether to include fonts
8231 dnl ===================================================================
8232 AC_MSG_CHECKING([whether to include third-party fonts])
8233 if test "$with_fonts" != "no" ; then
8234 AC_MSG_RESULT([yes])
8236 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
8240 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
8242 AC_SUBST(WITH_FONTS)
8244 AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
8245 if test "$with_agfa_monotype_fonts" = "yes" ; then
8246 AC_MSG_RESULT([yes])
8247 WITH_AGFA_MONOTYPE_FONTS=YES
8248 SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
8249 BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
8252 WITH_AGFA_MONOTYPE_FONTS=NO
8254 AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
8256 dnl ===================================================================
8257 dnl Test whether to include ppds
8258 dnl ===================================================================
8259 AC_MSG_CHECKING([whether to include PPDs])
8260 if test "$with_ppds" != "no"; then
8261 AC_MSG_RESULT([yes])
8265 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
8267 AC_SUBST(WITHOUT_PPDS)
8269 dnl ===================================================================
8270 dnl Test whether to include afms
8271 dnl ===================================================================
8272 AC_MSG_CHECKING([whether to include AFMs])
8273 if test "$with_afms" != "no"; then
8274 AC_MSG_RESULT([yes])
8275 BUILD_TYPE="$BUILD_TYPE AFMS"
8279 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
8281 AC_SUBST(WITHOUT_AFMS)
8283 dnl ===================================================================
8284 dnl Test whether to include extra galleries
8285 dnl ===================================================================
8286 AC_MSG_CHECKING([whether to include extra galleries])
8287 if test "z$enable_extra_gallery" = "z" -o "z$enable_extra_gallery" = "zno" ; then
8289 WITH_EXTRA_GALLERY=NO
8290 OOOP_GALLERY_PACK=""
8292 AC_MSG_RESULT([yes])
8293 WITH_EXTRA_GALLERY=YES
8294 BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
8295 SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
8296 OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
8298 AC_SUBST(WITH_EXTRA_GALLERY)
8299 AC_SUBST(OOOP_GALLERY_PACK)
8301 dnl ===================================================================
8302 dnl Test whether to include extra templates
8303 dnl ===================================================================
8304 AC_MSG_CHECKING([whether to include extra templates])
8305 if test "z$enable_extra_template" = "z" -o "z$enable_extra_template" = "zno" ; then
8307 WITH_EXTRA_TEMPLATE=NO
8308 OOOP_TEMPLATES_PACK=""
8310 AC_MSG_RESULT([yes])
8311 WITH_EXTRA_TEMPLATE=YES
8312 BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
8313 SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
8314 OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
8316 AC_SUBST(WITH_EXTRA_TEMPLATE)
8317 AC_SUBST(OOOP_TEMPLATES_PACK)
8319 dnl ===================================================================
8320 dnl Test whether to include extra samples
8321 dnl ===================================================================
8322 AC_MSG_CHECKING([whether to include extra samples])
8323 if test "z$enable_extra_sample" = "z" -o "z$enable_extra_sample" = "zno" ; then
8325 WITH_EXTRA_SAMPLE=NO
8326 OOOP_SAMPLES_PACK=""
8328 AC_MSG_RESULT([yes])
8329 WITH_EXTRA_SAMPLE=YES
8330 BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
8331 SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
8332 OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
8334 AC_SUBST(WITH_EXTRA_SAMPLE)
8335 AC_SUBST(OOOP_SAMPLES_PACK)
8337 dnl ===================================================================
8338 dnl Test whether to include extra fonts
8339 dnl ===================================================================
8340 AC_MSG_CHECKING([whether to include extra fonts])
8341 if test "z$enable_extra_font" = "z" -o "z$enable_extra_font" = "zno" ; then
8346 AC_MSG_RESULT([yes])
8348 BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
8349 SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
8350 OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
8352 AC_SUBST(WITH_EXTRA_FONT)
8353 AC_SUBST(OOOP_FONTS_PACK)
8355 dnl ===================================================================
8356 dnl Test whether to build global menu support
8357 dnl ===================================================================
8358 AC_MSG_CHECKING([whether to build global menu support])
8359 if test "z$enable_lomenubar" = "z" -o "z$enable_lomenubar" = "zno" ; then
8361 ENABLE_LOMENUBAR="FALSE"
8363 AC_MSG_RESULT([yes])
8364 PKG_CHECK_MODULES(DBUSMENUGTK, dbusmenu-gtk-0.4,, AC_MSG_ERROR([requirements to build lo-menubar not met. Use --disable-lomenubar or install the missing packages]))
8365 ENABLE_LOMENUBAR="TRUE"
8367 AC_SUBST(ENABLE_LOMENUBAR)
8369 dnl ===================================================================
8370 dnl Test whether to enable online update service
8371 dnl ===================================================================
8372 AC_MSG_CHECKING([whether to enable online update])
8373 ENABLE_ONLINE_UPDATE=
8374 if test "z$enable_online_update" = "z" ; then
8375 if test "$_os" = "WINNT" -o "$_os" = "Darwin" ; then
8376 AC_MSG_RESULT([yes])
8377 ENABLE_ONLINE_UPDATE="TRUE"
8382 if test "z$enable_online_update" = "zyes" ; then
8383 AC_MSG_RESULT([yes])
8384 ENABLE_ONLINE_UPDATE="TRUE"
8389 AC_SUBST(ENABLE_ONLINE_UPDATE)
8391 dnl ===================================================================
8392 dnl Test whether build target is Release Build
8393 dnl ===================================================================
8394 AC_MSG_CHECKING([whether build target is Release Build])
8395 if test "z$enable_release_build" = "z" -o "z$enable_release_build" = "zno" ; then
8397 ENABLE_RELEASE_BUILD="FALSE"
8399 AC_MSG_RESULT([yes])
8400 ENABLE_RELEASE_BUILD="TRUE"
8402 AC_SUBST(ENABLE_RELEASE_BUILD)
8404 dnl ===================================================================
8405 dnl Test whether to enable ActiveX embedding
8406 dnl ===================================================================
8407 if test "$_os" = "WINNT"; then
8408 AC_MSG_CHECKING([whether to enable ActiveX embedding of LibreOffice components])
8409 if test "$enable_activex_component" = "yes" -o "$enable_activex_component" = "TRUE" -o "$enable_activex_component" = ""; then
8410 ENABLE_ACTIVEX_COMPONENT="TRUE"
8411 AC_MSG_RESULT([yes])
8412 SCPDEFS="$SCPDEFS -DWITH_ACTIVEX_COMPONENT"
8414 ENABLE_ACTIVEX_COMPONENT=""
8417 AC_SUBST(ENABLE_ACTIVEX_COMPONENT)
8421 AC_MSG_CHECKING([whether and how to use Xinerama])
8422 if test "$_os" = "Darwin"; then
8424 XINERAMA_LINK=dynamic
8425 AC_MSG_RESULT([yes])
8426 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
8427 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
8428 # we have both versions, let the user decide but use the dynamic one
8431 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
8432 XINERAMA_LINK=dynamic
8434 XINERAMA_LINK=static
8436 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
8437 # we have only the dynamic version
8439 XINERAMA_LINK=dynamic
8440 elif test -e "$XLIB/libXinerama.a"; then
8442 if echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
8444 XINERAMA_LINK=static
8454 if test "$USE_XINERAMA" = "YES"; then
8455 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
8456 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
8457 [AC_MSG_ERROR(Xinerama header not found.)], [])
8458 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
8459 if test "$_os" = "FreeBSD"; then
8460 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
8462 if test "$_os" = "Linux"; then
8463 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
8465 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
8466 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
8468 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
8475 AC_SUBST(USE_XINERAMA)
8476 AC_SUBST(XINERAMA_LINK)
8478 dnl ===================================================================
8479 dnl Checks for librsvg
8480 dnl ===================================================================
8482 dnl ENABLE_LIBRSVG is set to "" (for NO), SYSTEM or INTERNAL. The
8483 dnl SYSTEM_LIBRSVG, SYSTEM_GDKPIXBUF etc are redundant.
8489 AC_MSG_CHECKING([what librsvg to use])
8491 case "$enable_librsvg" in
8493 AC_MSG_RESULT([none])
8498 if test $build_os = cygwin -o \
8500 dnl When building on/for these OSes always use the internal one,
8501 dnl if at all. Add more OSes above as needed.
8502 AC_MSG_RESULT([internal])
8503 enable_librsvg=internal
8504 elif test $_os = iOS -o $_os = Android; then
8505 AC_MSG_RESULT([none])
8508 if test "$with_system_libs" = yes; then
8509 AC_MSG_RESULT([system])
8510 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
8511 enable_librsvg=system
8512 elif test "$with_system_libs" = no; then
8513 AC_MSG_RESULT([internal])
8514 enable_librsvg=internal
8516 AC_MSG_RESULT([checking further])
8517 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14,, [:])
8518 if test -z "$LIBRSVG_PKG_ERRORS"; then
8519 enable_librsvg=system
8521 enable_librsvg=internal
8528 AC_MSG_RESULT([internal])
8532 if test $_os = WINNT -a "$WITH_MINGW" != yes; then
8533 AC_MSG_ERROR([Must use internal librsvg when building with MSVC])
8535 AC_MSG_RESULT([system])
8536 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
8540 AC_MSG_ERROR([Incorrect --enable-librsvg option])
8544 dnl By now enable_librsvg should be "system", "internal" or "no"
8545 case $enable_librsvg in
8547 ENABLE_LIBRSVG=SYSTEM
8552 ENABLE_LIBRSVG=INTERNAL
8554 BUILD_TYPE="$BUILD_TYPE LIBRSVG"
8563 AC_MSG_ERROR([Internal configure script error, invalid enable_librsvg value "$enable_librsvg"])
8567 AC_SUBST(ENABLE_LIBRSVG)
8568 AC_SUBST(LIBRSVG_CFLAGS)
8569 AC_SUBST(LIBRSVG_LIBS)
8570 AC_SUBST(SYSTEM_LIBRSVG)
8572 dnl ===================================================================
8573 dnl Test whether to build cairo or rely on the system version
8574 dnl ===================================================================
8578 AC_MSG_CHECKING([whether to use the system cairo])
8580 if test "$with_system_cairo" = yes -o \( "$with_system_libs" = yes -a "$with_system_cairo" != no \); then
8582 AC_MSG_RESULT([yes])
8584 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
8586 if test "$with_system_xrender_headers" = "yes"; then
8587 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
8588 AC_RUN_IFELSE([AC_LANG_SOURCE([[
8589 #include <X11/extensions/Xrender.h>
8591 int main(int argc, char **argv) {
8592 #ifdef PictStandardA8
8598 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])
8601 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libfontconfig-1.dll libfreetype-6.dll libpixman-1-0.dll libpng15-15.dll libcairo-2.dll"
8605 if test $_os = Android; then
8606 dnl For Android cairo isn't
8609 elif test $_os = WINNT; then
8610 dnl We only need cairo for Windows if we
8611 dnl build librsvg or directx disabled
8612 if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
8613 BUILD_TYPE="$BUILD_TYPE CAIRO"
8616 BUILD_TYPE="$BUILD_TYPE CAIRO"
8620 AC_SUBST(SYSTEM_CAIRO)
8621 AC_SUBST(CAIRO_CFLAGS)
8622 AC_SUBST(CAIRO_LIBS)
8625 dnl ===================================================================
8626 dnl Test whether to build gdk-pixbuf or rely on the system version
8627 dnl ===================================================================
8629 AC_MSG_CHECKING([whether to use the system gdk-pixbuf])
8631 dnl As long as the only thing we need gdk-pixbuf for is below
8632 dnl librsvg, use the same --enable-librsvg (possibly implied
8633 dnl by --with-system-libs) to override this.
8635 if test "$SYSTEM_LIBRSVG" = YES; then
8636 SYSTEM_GDKPIXBUF=YES
8637 AC_MSG_RESULT([yes])
8640 WINNT|Darwin|iOS|Android)
8645 SYSTEM_GDKPIXBUF=YES
8646 AC_MSG_RESULT([yes])
8650 AC_SUBST(SYSTEM_GDKPIXBUF)
8652 dnl ===================================================================
8653 dnl Test whether to build GLib or rely on the system version
8654 dnl ===================================================================
8656 AC_MSG_CHECKING([whether to use the system GLib])
8658 dnl As long as the only thing we need GLib for is below
8659 dnl librsvg, use the same --enable-librsvg (possibly implied
8660 dnl by --with-system-libs) to override this.
8662 if test "$SYSTEM_LIBRSVG" = YES; then
8664 AC_MSG_RESULT([yes])
8667 WINNT|Darwin|iOS|Android)
8673 AC_MSG_RESULT([yes])
8677 AC_SUBST(SYSTEM_GLIB)
8679 dnl ===================================================================
8680 dnl Test whether to build gettext runtime (libintl) or rely on the
8682 dnl ===================================================================
8684 AC_MSG_CHECKING([whether to use the system gettext runtime])
8686 if test "$with_system_gettext" = yes -o \( "$with_system_libs" = yes -a "$with_system_gettext" != no \); then
8688 AC_MSG_RESULT([yes])
8691 WINNT|Darwin|iOS|Android)
8697 AC_MSG_RESULT([yes])
8701 AC_SUBST(SYSTEM_GETTEXT)
8703 dnl ===================================================================
8704 dnl Test whether to build libcroco or rely on the system version
8705 dnl ===================================================================
8707 AC_MSG_CHECKING([whether to use the system libcroco])
8709 dnl As long as the only thing we need libcroco for is below
8710 dnl librsvg, use the same --enable-librsvg (possibly implied
8711 dnl by --with-system-libs) to override this.
8713 if test "$SYSTEM_LIBRSVG" = YES; then
8715 AC_MSG_RESULT([yes])
8718 WINNT|Darwin|iOS|Android)
8724 AC_MSG_RESULT([yes])
8728 AC_SUBST(SYSTEM_LIBCROCO)
8730 dnl ===================================================================
8731 dnl Test whether to build Pango or rely on the system version
8732 dnl ===================================================================
8734 AC_MSG_CHECKING([whether to use the system pango])
8736 dnl As long as the only thing we need Pango for is below
8737 dnl librsvg, use the same --enable-librsvg (possibly implied
8738 dnl by --with-system-libs) to override this.
8740 if test "$SYSTEM_LIBRSVG" = YES; then
8742 AC_MSG_RESULT([yes])
8745 WINNT|Darwin|iOS|Android)
8751 AC_MSG_RESULT([yes])
8755 AC_SUBST(SYSTEM_PANGO)
8757 dnl ===================================================================
8758 dnl Test whether to build libgsf or rely on the system version
8759 dnl ===================================================================
8761 AC_MSG_CHECKING([whether to use the system libgsf])
8763 dnl As long as the only thing we need libgsf for is below librsvg (is
8764 dnl it?), use the same --enable-librsvg (possibly implied by
8765 dnl --with-system-libs) to override this.
8767 if test "$SYSTEM_LIBRSVG" = YES; then
8769 AC_MSG_RESULT([yes])
8772 WINNT|Darwin|iOS|Android)
8778 AC_MSG_RESULT([yes])
8782 AC_SUBST(SYSTEM_LIBGSF)
8784 dnl ===================================================================
8785 dnl Test whether to build libpng or rely on the system version
8786 dnl ===================================================================
8788 AC_MSG_CHECKING([whether to use the system libpng])
8790 dnl How should and does this interact with the checks for libpng
8791 dnl related to use of libpng in the quickstarter above? This needs to
8794 if test "$with_system_libpng" = yes -o \( "$with_system_libs" = yes -a "$with_system_libpng" != no \); then
8796 AC_MSG_RESULT([yes])
8799 WINNT|Darwin|iOS|Android)
8809 AC_SUBST(SYSTEM_LIBPNG)
8811 dnl ===================================================================
8812 dnl Test whether to build libjpeg or rely on the system version
8813 dnl ===================================================================
8814 dnl FIXME: this is currently because we have jpeg-6b for our filters
8815 dnl and jpeg-8 as dependency for librsvg
8816 dnl this should be unified into using only one version for both
8818 AC_MSG_CHECKING([whether to use the system libjpeg])
8820 if test "$SYSTEM_JPEG" == "YES"; then
8822 AC_MSG_RESULT([yes])
8825 WINNT|Darwin|iOS|Android)
8831 AC_MSG_RESULT([yes])
8835 AC_SUBST(SYSTEM_LIBJPEG)
8837 dnl ===================================================================
8838 dnl Check for runtime JVM search path
8839 dnl ===================================================================
8840 if test "$SOLAR_JAVA" != ""; then
8841 AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
8842 if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then
8843 AC_MSG_RESULT([yes])
8844 if ! test -d "$with_jvm_path"; then
8845 AC_MSG_ERROR(["$with_jvm_path" not a directory])
8847 if ! test -d "$with_jvm_path"jvm; then
8848 AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
8850 JVM_ONE_PATH_CHECK="$with_jvm_path"
8851 AC_SUBST(JVM_ONE_PATH_CHECK)
8857 dnl ===================================================================
8858 dnl Test for the presence of Ant and that it works
8859 dnl ===================================================================
8861 if test "$SOLAR_JAVA" != ""; then
8862 ANT_HOME=; export ANT_HOME
8863 WITH_ANT_HOME=; export WITH_ANT_HOME
8864 if test -z "$with_ant_home"; then
8865 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
8867 if test "$_os" = "WINNT"; then
8868 with_ant_home=`cygpath -u "$with_ant_home"`
8870 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
8871 WITH_ANT_HOME=$with_ant_home
8872 ANT_HOME=$with_ant_home
8875 if test -z "$ANT"; then
8876 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
8878 # resolve relative or absolute symlink
8879 while test -h "$ANT"; do
8881 a_basename=`basename "$ANT"`
8882 a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
8883 cd "`dirname "$ANT"`"
8884 cd "`dirname "$a_script"`"
8885 ANT="`pwd`"/"`basename "$a_script"`"
8889 AC_MSG_CHECKING([if $ANT works])
8890 cat > conftest.java << EOF
8891 public class conftest {
8892 int testmethod(int a, int b) {
8898 cat > conftest.xml << EOF
8899 <project name="conftest" default="conftest">
8900 <target name="conftest">
8901 <javac srcdir="." includes="conftest.java">
8907 oldJAVA_HOME=$JAVA_HOME
8908 if test "$JAVACISGCJ" = "yes"; then
8909 JAVA_HOME=; export JAVA_HOME
8910 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
8912 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
8914 AC_TRY_EVAL(ant_cmd)
8915 if test $? = 0 && test -f ./conftest.class ; then
8916 AC_MSG_RESULT([Ant works])
8917 if test -z "$WITH_ANT_HOME"; then
8918 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
8919 if test -z "$ANT_HOME"; then
8920 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
8923 ANT_HOME="$WITH_ANT_HOME"
8926 echo "configure: Ant test failed" >&5
8927 cat conftest.java >&5
8928 cat conftest.xml >&5
8929 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
8931 echo "Ant does not work - Some Java projects will not build!" >>warn
8933 JAVA_HOME=$oldJAVA_HOME
8934 rm -f conftest* core core.* *.core
8936 if test -z "$ANT_HOME"; then
8937 ANT_HOME="NO_ANT_HOME"
8941 dnl Checking for ant.jar
8942 if test "$ANT_HOME" != "NO_ANT_HOME"; then
8943 AC_MSG_CHECKING([Ant lib directory])
8944 if test -f $ANT_HOME/lib/ant.jar; then
8945 ANT_LIB="$ANT_HOME/lib"
8947 if test -f $ANT_HOME/ant.jar; then
8950 if test -f /usr/share/java/ant.jar; then
8951 ANT_LIB=/usr/share/java
8953 if test -f /usr/share/ant-core/lib/ant.jar; then
8954 ANT_LIB=/usr/share/ant-core/lib
8956 if test -f $ANT_HOME/lib/ant/ant.jar; then
8957 ANT_LIB="$ANT_HOME/lib/ant"
8959 if test -f /usr/share/lib/ant/ant.jar; then
8960 ANT_LIB=/usr/share/lib/ant
8962 AC_MSG_ERROR([Ant libraries not found!])
8969 AC_MSG_RESULT([Ant lib directory found.])
8974 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
8976 AC_MSG_CHECKING([whether Ant is >= $ant_minver])
8977 ant_version=`$ANT -version | $AWK '{ print $4; }'`
8978 ant_version_major=`echo $ant_version | cut -d. -f1`
8979 ant_version_minor=`echo $ant_version | cut -d. -f2`
8980 echo "configure: ant_version $ant_version " >&5
8981 echo "configure: ant_version_major $ant_version_major " >&5
8982 echo "configure: ant_version_minor $ant_version_minor " >&5
8983 if test "$ant_version_major" -ge "2"; then
8984 AC_MSG_RESULT([yes, $ant_version])
8985 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
8986 AC_MSG_RESULT([yes, $ant_version])
8988 AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
8991 if test "$ENABLE_MEDIAWIKI" = "YES"; then
8992 AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
8995 cat > conftest.java << EOF
8996 public class conftest {
8997 int testmethod(int a, int b) {
9003 cat > conftest.xml << EOF
9004 <project name="conftest" default="conftest">
9005 <target name="conftest" depends="copytest">
9006 <javac srcdir="." includes="conftest.java">
9009 <target name="copytest">
9010 <copy todir="confdir">
9011 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
9013 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
9019 if test "$JAVACISGCJ" = "yes"; then
9020 JAVA_HOME=; export JAVA_HOME
9021 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
9023 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
9025 AC_TRY_EVAL(ant_cmd)
9026 if test $? = 0 && test -f ./conftest.class ; then
9027 AC_MSG_RESULT([yes])
9030 echo "configure: Ant test failed" >&5
9031 cat conftest.java >&5
9032 cat conftest.xml >&5
9034 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
9037 rm -f conftest* core core.* *.core
9041 if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
9042 AC_MSG_CHECKING([for JUnit 4])
9043 if test "$with_junit" = "yes"; then
9044 if test -e /usr/share/java/junit4.jar; then
9045 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
9047 if test -e /usr/share/lib/java/junit.jar; then
9048 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
9050 OOO_JUNIT_JAR=/usr/share/java/junit.jar
9054 OOO_JUNIT_JAR=$with_junit
9056 if test "$_os" = "WINNT"; then
9057 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
9059 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
9060 grep org/junit/Before.class > /dev/null 2>&5
9061 if test $? -eq 0; then
9062 # check if either class-path entry is available for hamcrest or
9064 if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |grep -q hamcrest || \
9065 "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |grep -q 'Class-Path: hamcrest'; then
9066 AC_MSG_RESULT([$OOO_JUNIT_JAR])
9068 AC_MSG_ERROR([your junit jar neither sets a classpath nor includes hamcrest; please
9069 provide a full junit jar or use --without-junit])
9073 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
9074 location (/usr/share/java), specify its pathname via
9075 --with-junit=..., or disable it via --without-junit])
9078 AC_SUBST(OOO_JUNIT_JAR)
9080 dnl ===================================================================
9082 dnl ===================================================================
9083 AC_MSG_CHECKING([for product version])
9084 PRODUCTVERSION=AC_PACKAGE_VERSION
9085 AC_MSG_RESULT([$PRODUCTVERSION])
9086 AC_SUBST(PRODUCTVERSION)
9088 dnl ===================================================================
9089 dnl Dealing with l10n options
9090 dnl ===================================================================
9091 AC_MSG_CHECKING([which languages to be built])
9092 # get list of all languages
9093 # generate shell variable from completelangiso= from solenv/inc/langlist.mk
9094 # the sed command does the following:
9095 # + if a line ends with a backslash, append the next line to it
9096 # + adds " on the beginning of the value (after =)
9097 # + adds " at the end of the value
9098 # + removes en-US; we want to put it on the beginning
9099 # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
9100 [eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' solenv/inc/langlist.mk)]
9101 ALL_LANGS="en-US $completelangiso"
9102 # check the configured localizations
9103 WITH_LANG="$with_lang"
9104 if test -z "$WITH_LANG"; then
9105 AC_MSG_RESULT([en-US])
9107 AC_MSG_RESULT([$WITH_LANG])
9108 GIT_REPO_NAMES="$GIT_REPO_NAMES translations"
9110 # check that the list is valid
9111 for lang in $WITH_LANG ; do
9112 test "$lang" = "ALL" && continue;
9113 # need to check for the exact string, so add space before and after the list of all languages
9114 for vl in $ALL_LANGS ; do
9115 if test "$vl" = "$lang" ; then
9119 if test "$vl" != "$lang" ; then
9120 AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS])
9123 # list with substituted ALL
9124 WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
9125 # this variable is used only by bin/distro-install-* helper scripts
9126 # they need a real list of languages
9127 test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
9130 AC_SUBST(WITH_LANG_LIST)
9131 AC_SUBST(GIT_REPO_NAMES)
9133 AC_MSG_CHECKING([for another 'intro' bitmap])
9135 if test -z "$with_intro_bitmap" -o "$with_intro_bitmap" = "no" ; then
9137 AC_MSG_RESULT([none])
9139 case "$with_intro_bitmap" in
9140 *.png) INTRO_BITMAP="$with_intro_bitmap" ;;
9141 *) AC_MSG_WARN([Intro bitmap should be a .png file!]) ;;
9143 AC_MSG_RESULT([$INTRO_BITMAP])
9145 AC_SUBST(INTRO_BITMAP)
9147 AC_MSG_CHECKING([for custom 'intro' progress bar color])
9149 if test -z "$with_intro_progressbar_color" ; then
9150 PROGRESSBARCOLOR="126,170,23"
9151 AC_MSG_RESULT([none])
9153 PROGRESSBARCOLOR="$with_intro_progressbar_color"
9154 AC_MSG_RESULT([$PROGRESSBARCOLOR])
9156 AC_SUBST(PROGRESSBARCOLOR)
9158 AC_MSG_CHECKING([for custom 'intro' progress bar size])
9160 if test -z "$with_intro_progressbar_size" ; then
9161 PROGRESSSIZE="319,10"
9162 AC_MSG_RESULT([none])
9164 PROGRESSSIZE="$with_intro_progressbar_size"
9165 AC_MSG_RESULT([$PROGRESSSIZE])
9167 AC_SUBST(PROGRESSSIZE)
9169 AC_MSG_CHECKING([for custom 'intro' progress bar position])
9171 if test -z "$with_intro_progressbar_position" ; then
9172 PROGRESSPOSITION="164,225"
9173 AC_MSG_RESULT([none])
9175 PROGRESSPOSITION="$with_intro_progressbar_position"
9176 AC_MSG_RESULT([$PROGRESSPOSITION])
9178 AC_SUBST(PROGRESSPOSITION)
9180 AC_MSG_CHECKING([for custom 'intro' progress bar frame color])
9182 if test -z "$with_intro_progressbar_frame_color" ; then
9183 PROGRESSFRAMECOLOR="207,208,211"
9184 AC_MSG_RESULT([none])
9186 PROGRESSFRAMECOLOR="$with_intro_progressbar_frame_color"
9187 AC_MSG_RESULT([$PROGRESSFRAMECOLOR])
9189 AC_SUBST(PROGRESSFRAMECOLOR)
9191 AC_MSG_CHECKING([for another 'about' bitmap])
9193 if test -z "$with_about_bitmap" -o "$with_about_bitmap" = "no" ; then
9195 AC_MSG_RESULT([none])
9197 case "$with_about_bitmap" in
9198 *.png) ABOUT_BITMAP="$with_about_bitmap" ;;
9199 *) AC_MSG_WARN([About bitmap should be a .png file!]) ;;
9201 AC_MSG_RESULT([$ABOUT_BITMAP])
9203 AC_SUBST(ABOUT_BITMAP)
9205 AC_MSG_CHECKING([for another 'start center left' bitmap])
9206 STARTCENTER_LEFT_BITMAP=
9207 if test -z "$with_startcenter_left_bitmap" -o "$with_startcenter_left_bitmap" = "no" ; then
9208 STARTCENTER_LEFT_BITMAP=
9209 AC_MSG_RESULT([none])
9211 case "$with_startcenter_left_bitmap" in
9212 *.png) STARTCENTER_LEFT_BITMAP="$with_startcenter_left_bitmap" ;;
9213 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
9215 AC_MSG_RESULT([$STARTCENTER_LEFT_BITMAP])
9217 AC_SUBST(STARTCENTER_LEFT_BITMAP)
9219 AC_MSG_CHECKING([for another 'start center right' bitmap])
9220 STARTCENTER_RIGHT_BITMAP=
9221 if test -z "$with_startcenter_right_bitmap" -o "$with_startcenter_right_bitmap" = "no" ; then
9222 STARTCENTER_RIGHT_BITMAP=
9223 AC_MSG_RESULT([none])
9225 case "$with_startcenter_right_bitmap" in
9226 *.png) STARTCENTER_RIGHT_BITMAP="$with_startcenter_right_bitmap" ;;
9227 *) AC_MSG_WARN([Startcenter right bitmap should be a .png file!]) ;;
9229 AC_MSG_RESULT([$STARTCENTER_RIGHT_BITMAP])
9231 AC_SUBST(STARTCENTER_RIGHT_BITMAP)
9233 AC_MSG_CHECKING([for another 'start center rtl left' bitmap])
9234 STARTCENTER_RTL_LEFT_BITMAP=
9235 if test -z "$with_startcenter_rtl_left_bitmap" -o "$with_startcenter_rtl_left_bitmap" = "no" ; then
9236 STARTCENTER_RTL_LEFT_BITMAP=
9237 AC_MSG_RESULT([none])
9239 case "$with_startcenter_rtl_left_bitmap" in
9240 *.png) STARTCENTER_RTL_LEFT_BITMAP="$with_startcenter_rtl_left_bitmap" ;;
9241 *) AC_MSG_WARN([Startcenter rtl left bitmap should be a .png file!]) ;;
9243 AC_MSG_RESULT([$STARTCENTER_RTL_LEFT_BITMAP])
9245 AC_SUBST(STARTCENTER_RTL_LEFT_BITMAP)
9247 AC_MSG_CHECKING([for another 'start center rtl right' bitmap])
9248 STARTCENTER_RTL_RIGHT_BITMAP=
9249 if test -z "$with_startcenter_rtl_right_bitmap" -o "$with_startcenter_rtl_right_bitmap" = "no" ; then
9250 STARTCENTER_RTL_RIGHT_BITMAP=
9251 AC_MSG_RESULT([none])
9253 case "$with_startcenter_rtl_right_bitmap" in
9254 *.png) STARTCENTER_RTL_RIGHT_BITMAP="$with_startcenter_rtl_right_bitmap" ;;
9255 *) AC_MSG_WARN([Startcenter rtl right bitmap should be a .png file!]) ;;
9257 AC_MSG_RESULT([$STARTCENTER_RTL_RIGHT_BITMAP])
9259 AC_SUBST(STARTCENTER_RTL_RIGHT_BITMAP)
9261 AC_MSG_CHECKING([for another 'start center space' bitmap])
9262 STARTCENTER_SPACE_BITMAP=
9263 if test -z "$with_startcenter_space_bitmap" -o "$with_startcenter_space_bitmap" = "no" ; then
9264 STARTCENTER_SPACE_BITMAP=
9265 AC_MSG_RESULT([none])
9267 case "$with_startcenter_space_bitmap" in
9268 *.png) STARTCENTER_SPACE_BITMAP="$with_startcenter_space_bitmap" ;;
9269 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
9271 AC_MSG_RESULT([$STARTCENTER_SPACE_BITMAP])
9273 AC_SUBST(STARTCENTER_SPACE_BITMAP)
9276 AC_MSG_CHECKING([for vendor])
9277 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
9278 AC_MSG_RESULT([not set])
9280 OOO_VENDOR="$with_vendor"
9281 AC_MSG_RESULT([$OOO_VENDOR])
9283 AC_SUBST(OOO_VENDOR)
9286 AC_MSG_CHECKING([for UNIX wrapper name])
9287 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
9288 AC_MSG_RESULT([not set])
9290 UNIXWRAPPERNAME="$with_unix_wrapper"
9291 AC_MSG_RESULT([$UNIXWRAPPERNAME])
9293 AC_SUBST(UNIXWRAPPERNAME)
9295 AC_MSG_CHECKING([whether to install the compat oo* wrappers])
9296 if test "$with_compat_oowrappers" = "yes" ; then
9297 WITH_COMPAT_OOWRAPPERS=YES
9300 WITH_COMPAT_OOWRAPPERS=
9303 AC_SUBST(WITH_COMPAT_OOWRAPPERS)
9305 AC_MSG_CHECKING([for product name])
9306 PRODUCTNAME=AC_PACKAGE_NAME
9307 AC_MSG_RESULT([$PRODUCTNAME])
9308 AC_SUBST(PRODUCTNAME)
9310 INSTALLDIRNAME=`echo AC_PACKAGE_NAME | tr '[[:upper:]]' '[[:lower:]]'`
9311 AC_MSG_CHECKING([for install dirname])
9312 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes" ; then
9313 INSTALLDIRNAME="$with_install_dirname"
9315 AC_MSG_RESULT([$INSTALLDIRNAME])
9316 AC_SUBST(INSTALLDIRNAME)
9318 AC_MSG_CHECKING([for prefix])
9319 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9320 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
9322 AC_MSG_RESULT([$PREFIXDIR])
9325 AC_MSG_CHECKING([for libdir])
9326 LIBDIR=[$(eval echo $(eval echo $libdir))]
9327 AC_MSG_RESULT([$LIBDIR])
9330 AC_MSG_CHECKING([for data dir])
9331 DATADIR=[$(eval echo $(eval echo $datadir))]
9332 AC_MSG_RESULT([$DATADIR])
9335 AC_MSG_CHECKING([for man dir])
9336 MANDIR=[$(eval echo $(eval echo $mandir))]
9337 AC_MSG_RESULT([$MANDIR])
9340 AC_MSG_CHECKING([for doc dir])
9341 DOCDIR=[$(eval echo $(eval echo $docdir))]
9342 AC_MSG_RESULT([$DOCDIR])
9345 AC_MSG_CHECKING([for install dir])
9346 INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
9347 AC_MSG_RESULT([$INSTALLDIR])
9348 AC_SUBST(INSTALLDIR)
9350 AC_MSG_CHECKING([whether to statically link to Gtk])
9351 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
9352 ENABLE_STATIC_GTK="TRUE"
9353 AC_MSG_RESULT([yes])
9355 ENABLE_STATIC_GTK="FALSE"
9358 AC_SUBST(ENABLE_STATIC_GTK)
9360 AC_MSG_CHECKING([whether to use layout dialogs])
9361 if test -n "$enable_layout" && test "$enable_layout" != "no"; then
9362 ENABLE_LAYOUT="TRUE"
9363 AC_MSG_RESULT([yes])
9365 ENABLE_LAYOUT="FALSE"
9368 AC_SUBST(ENABLE_LAYOUT)
9370 # ===================================================================
9371 # De- or increase default verbosity of build process
9372 # ===================================================================
9373 AC_MSG_CHECKING([build verbosity])
9374 if test -n "$enable_verbose"; then
9375 if test "$enable_verbose" = "yes"; then
9377 AC_MSG_RESULT([high])
9379 if test "$enable_verbose" = "no"; then
9381 AC_MSG_RESULT([low])
9384 AC_MSG_RESULT([not set])
9388 dnl ===================================================================
9389 dnl Use zenity during build
9390 dnl ===================================================================
9391 AC_MSG_CHECKING([whether to use zenity during build])
9392 if test "$enable_zenity" = "yes"; then
9393 AC_MSG_RESULT([yes])
9394 AC_PATH_PROGS( ZNTY, zenity )
9395 if test -z "$ZNTY"; then
9404 AC_SUBST(ENABLE_ZENITY)
9407 dnl ===================================================================
9408 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
9409 dnl --enable-dependency-tracking configure option
9410 dnl ===================================================================
9411 AC_MSG_CHECKING([whether to enable dependency tracking])
9412 if test "$enable_dependency_tracking" = "no"; then
9416 AC_MSG_RESULT([yes])
9420 dnl ===================================================================
9421 dnl Number of CPUs to use during the build
9422 dnl ===================================================================
9423 AC_MSG_CHECKING([for number of processors to use])
9424 if test -n "$with_num_cpus"; then
9425 BUILD_NCPUS=$with_num_cpus
9429 Darwin|FreeBSD|NetBSD|OpenBSD)
9430 BUILD_NCPUS=`sysctl -n hw.ncpu`
9434 BUILD_NCPUS=`getconf _NPROCESSORS_ONLN`
9436 # what else than above does profit here *and* has /proc?
9438 BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
9442 # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
9443 # unexpected format, 'wc -l' will have returned 0.
9444 if test "$BUILD_NCPUS" -eq 0; then
9448 AC_MSG_RESULT([$BUILD_NCPUS])
9449 AC_SUBST(BUILD_NCPUS)
9451 # ===================================================================
9452 # Creating bigger shared library to link against
9453 # ===================================================================
9454 AC_MSG_CHECKING([whether to create a big library for better performance])
9456 if test "$enable_mergelibs" = "yes"; then
9458 AC_MSG_RESULT([yes])
9464 dnl ===================================================================
9465 dnl Number of parallel jobs to be executed by dmake
9466 dnl ===================================================================
9467 AC_MSG_CHECKING([for maximum of jobs per processor])
9469 if test "z$with_max_jobs" != "z"; then
9470 BUILD_MAX_JOBS="$with_max_jobs"
9472 if test "$enable_icecream" = "yes" ; then
9476 AC_MSG_RESULT([$BUILD_MAX_JOBS])
9477 AC_SUBST(BUILD_MAX_JOBS)
9479 # =====================================================================
9480 # determine the parallelism for gnu make
9481 # =====================================================================
9482 AC_MSG_CHECKING([for maximum parallelism for gmake])
9483 if test $BUILD_MAX_JOBS -gt $BUILD_NCPUS ; then
9484 GMAKE_PARALLELISM="$BUILD_MAX_JOBS"
9486 GMAKE_PARALLELISM="$BUILD_NCPUS"
9488 GMAKE_MODULE_PARALLELISM="$BUILD_MAX_JOBS"
9489 if test "$no_parallelism_make" = "YES" ; then
9490 if test -z "$with_num_cpus"; then
9491 GMAKE_PARALLELISM="1";
9492 if test $GMAKE_MODULE_PARALLELISM -gt 1 ; then
9493 AC_MSG_WARN([gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this.])
9494 if test -z "$with_num_cpus"; then
9495 echo "gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this." >> warn
9497 GMAKE_MODULE_PARALLELISM="1"
9500 GMAKE_PARALLELISM="$BUILD_NCPUS";
9501 echo "make 3.81 is prone to crashes with parallelism > 1. Since --with-num-cpus was explicitely given, it is honored, but do not complain when make segfault on you." >> warn
9505 # GMAKE_PARALLELISM is used in tail_build
9506 # GMAKE_MODULE_PARALLELISM is used when building individual gbuildified module
9507 AC_MSG_RESULT([per module:$GMAKE_MODULE_PARALLELISM, for tail_build:$GMAKE_PARALLELISM])
9508 AC_SUBST(GMAKE_PARALLELISM)
9509 AC_SUBST(GMAKE_MODULE_PARALLELISM)
9511 dnl ===================================================================
9512 dnl Setting up the environment.
9513 dnl ===================================================================
9514 echo "setting up the build environment variables..."
9516 if test -z "$COMPATH"; then
9517 AC_MSG_ERROR([No compiler found.])
9521 AC_MSG_CHECKING([solver path])
9522 if test -z "$with_local_solver"; then
9523 LOCAL_SOLVER="DEFAULT"
9524 AC_MSG_RESULT([default])
9526 LOCAL_SOLVER=$with_local_solver
9527 AC_MSG_RESULT([$with_local_solver])
9529 AC_SUBST(LOCAL_SOLVER)
9531 AC_SUBST(BUILD_TYPE)
9533 if test "$WITH_MINGW" != "yes" ; then
9534 MINGW_EXTERNAL_DLLS=
9536 for DLL in $MINGW_EXTERNAL_DLLS ; do
9537 AC_MSG_CHECKING([for $DLL])
9538 if ! test -f "/usr/i686-w64-mingw32/sys-root/mingw/bin/$DLL" ; then
9539 AC_MSG_ERROR([Could not find $DLL, install the appropriate mingw32-<package>, not only mingw32-<package>-devel.])
9541 AC_MSG_RESULT([/usr/i686-w64-mingw32/sys-root/mingw/bin/$DLL])
9544 AC_SUBST(MINGW_EXTERNAL_DLLS)
9546 # make sure config.guess is +x; we execute config.guess, so it has to be so;
9547 chmod +x ./config.guess
9549 dnl Setting up the post_download check script
9550 dnl Using autoconf here, so that the migration from the previous state
9551 dnl (checks for the additional Windows downloads were directly in
9552 dnl configure.in) is as easy as possible
9553 echo "setting up the post_download check script"
9554 autoconf post_download.in > post_download
9555 chmod +x post_download
9557 # Generate a configuration timestamp we can use for deps
9558 if test -f set_soenv; then
9559 mv -f set_soenv set_soenv.last
9561 echo > set_soenv.last
9564 AC_CONFIG_FILES([ooo.lst set_soenv Makefile bin/repo-list desktop/scripts/soffice.sh])
9567 # make sure this is executable
9568 chmod +x desktop/scripts/soffice.sh
9570 # touch the config timestamp file set_soenv.stamp
9571 if test ! -f set_soenv.stamp; then
9572 echo > set_soenv.stamp
9573 elif diff set_soenv set_soenv.last >/dev/null 2>&1; then
9574 echo "Configuration unchanged - avoiding scp2 stamp update"
9576 echo > set_soenv.stamp
9579 dnl Run the set_soenv script to setup the Env.Host.sh script that sets
9580 dnl environment variables for the build.
9585 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: