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/])
14 MINGW_EXTERNAL_DLLS=""
16 if test -n "$SOLARENV" ; then
17 AC_MSG_ERROR([You have sourced Env.Host.sh in this shell. This may lead to trouble, please run in a fresh (login) shell.])
20 echo "********************************************************************"
22 echo "* Running ${PACKAGE_NAME} build configuration."
24 echo "********************************************************************"
27 dnl ===================================================================
28 dnl checks build and host OSes
29 dnl do this before argument processing to allow for platform dependent defaults
30 dnl ===================================================================
33 if test "$cross_compiling" = "yes"; then
37 BUILD_TYPE="$BUILD_TYPE NATIVE"
39 AC_SUBST(CROSS_COMPILING)
41 if test "$build_os" = "cygwin"; then
44 SRC_ROOT=`cygpath -d "$SRC_ROOT"`
45 SRC_ROOT=`cygpath -u "$SRC_ROOT"`
51 AC_SUBST(EXEEXT_FOR_BUILD)
55 if test "z$EUID" = "z0" -a "z`uname -o 2>/dev/null`" = "zCygwin"; then
56 AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account])
59 # need sed in os checks...
60 AC_PATH_PROGS(SED, sed)
61 if test -z "$SED"; then
62 AC_MSG_ERROR([install sed to run this script])
65 dnl ===================================================================
66 dnl The following is a list of supported systems.
67 dnl Sequential to keep the logic very simple
68 dnl These values may be checked and reset later.
69 dnl ===================================================================
70 #defaults unless the os test overrides this:
86 dnl ===========================================================
87 dnl Check whether we're using Solaris 10 - SPARC or Intel.
88 dnl ===========================================================
89 AC_MSG_CHECKING([the Solaris operating system release])
90 _os_release=`echo $host_os | $SED -e s/solaris2\.//`
91 if test "$_os_release" -lt "10"; then
92 AC_MSG_ERROR([use Solaris >= 10 to build LibreOffice])
94 AC_MSG_RESULT([ok ($_os_release)])
97 dnl Check whether we're using a SPARC or i386 processor
98 AC_MSG_CHECKING([the processor type])
99 if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then
100 AC_MSG_RESULT([ok ($host_cpu)])
102 AC_MSG_ERROR([only SPARC and i386 processors are supported])
106 linux-gnu*|k*bsd*-gnu*)
112 test_unix_quickstarter=yes
122 cygwin*|interix*|mingw32*)
124 # When building on Windows normally with MSVC under Cygwin,
125 # configure thinks that the host platform (the platform the
126 # built code will run on) is Cygwin, even if it obviously is
127 # Windows, which in Autoconf terminology is called
128 # "mingw32". (Which is misleading as MinGW is the name of the
129 # tool-chain, not an operating system.)
131 # Somewhat confusing, yes. But this configure script doesn't
132 # look at $host etc that much, it mostly uses its own $_os
133 # variable, set here in this case statement.
135 # When cross-compiling to Windows from Unix, the host platform
136 # is "mingw32" (because in that case it is the MinGW
137 # tool-chain that is used).
146 # If the host OS matches "mingw32*", that means we are using the
147 # MinGW cross-compiler, because we don't see the point in building
148 # LibreOffice using MinGW on Windows. If you want to build on
149 # Windows, use MSVC. If you want to use MinGW, surely you want to
150 # cross-compile (from Linux or some other Unix).
155 if test -z "$CC" ; then
156 CC="$host_cpu-$host_vendor-$host_os-gcc"
158 if test -z "$CXX" ; then
159 CXX="$host_cpu-$host_vendor-$host_os-g++"
165 darwin*) # Mac OS X or iOS
171 if test "$host_cpu" = "arm"; then
187 AC_MSG_CHECKING([the FreeBSD operating system release])
188 if test -n "$with_os_version"; then
189 OSVERSION="$with_os_version"
191 OSVERSION=`/sbin/sysctl -n kern.osreldate`
193 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
194 AC_MSG_CHECKING([which thread library to use])
195 if test "$OSVERSION" -lt "500016"; then
196 PTHREAD_CFLAGS="-D_THREAD_SAFE"
197 PTHREAD_LIBS="-pthread"
198 elif test "$OSVERSION" -lt "502102"; then
199 PTHREAD_CFLAGS="-D_THREAD_SAFE"
203 PTHREAD_LIBS="-pthread"
205 AC_MSG_RESULT([$PTHREAD_LIBS])
215 PTHREAD_LIBS="-pthread -lpthread"
222 PTHREAD_LIBS=-pthread
230 PTHREAD_CFLAGS="-D_THREAD_SAFE"
231 PTHREAD_LIBS="-pthread"
241 PTHREAD_LIBS="-pthread"
255 test_unix_quickstarter=no
258 # Make sure env vars pointing to where to find the cross-build
259 # toolchain are set. There aren't really any sensible
261 for var in CC CXX AR NM OBJDUMP RANLIB STRIP; do
262 if test -z `eval echo '$'$var`; then
263 AC_MSG_ERROR([You need to set the $var environment variable in a cross-compilation for Android. See README.cross for an example.])
269 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
273 if test "$_os" = "AIX"; then
274 AC_PATH_PROG(GAWK, gawk)
275 if test -z "$GAWK"; then
276 AC_MSG_ERROR([gawk not found in \$PATH])
282 AC_SUBST(PTHREAD_CFLAGS)
283 AC_SUBST(PTHREAD_LIBS)
286 ###############################################################################
287 # Extensions switches --enable/--disable
288 ###############################################################################
289 # By default these should be enabled unless having extra dependencies.
290 # If there is extra dependency over configure options then the enable should
291 # be automagic based on wether the requiring feature is enabled or not.
292 # All this options change anything only with --enable-extension-integration.
293 AC_ARG_ENABLE(extension-integration,
294 AS_HELP_STRING([--disable-extension-integration],
295 [Disable integration of the builded extensions to the installer of the
296 product. Use this switch to disable the integration.])
299 AC_ARG_ENABLE(ext-barcode,
300 AS_HELP_STRING([--enable-ext-barcode],
301 [Enable the Barcode extension.])
304 AC_ARG_ENABLE(ext-diagram,
305 AS_HELP_STRING([--enable-ext-diagram],
306 [Enable the SmART Gallery (Diagram) extension.])
309 AC_ARG_ENABLE(ext-google-docs,
310 AS_HELP_STRING([--enable-ext-google-docs],
311 [Enable the Google Documents extension.])
314 AC_ARG_ENABLE(ext-hunart,
315 AS_HELP_STRING([--enable-ext-hunart],
316 [Enable the Hungarian Cross-reference Toolbar extension.])
319 AC_ARG_ENABLE(ext-languagetool,
320 AS_HELP_STRING([--enable-ext-languagetool],
321 [Enable the LanguageTool extension.])
324 AC_ARG_ENABLE(ext-lightproof,
325 AS_HELP_STRING([--enable-ext-lightproof],
326 [Enable the Lightproof extension. The enable switch can contain only
327 the desired languages: --enable-lightproof="en hu ru"]),
328 [enable_ext_lightproof="$enableval"],
329 [enable_ext_lightproof=no]
332 AC_ARG_ENABLE(ext-mysql-connector,
333 AS_HELP_STRING([--enable-ext-mysql-connector],
334 [Enable the build of the MySQL Connector extension.])
337 AC_ARG_ENABLE(ext-nlpsolver,
338 AS_HELP_STRING([--enable-ext-nlpsolver],
339 [Enable the NLPSolver extension.])
342 AC_ARG_ENABLE(ext-ct2n,
343 AS_HELP_STRING([--enable-ext-ct2n],
344 [Enable the ConvertTextToNumber extension.])
347 AC_ARG_ENABLE(ext-numbertext,
348 AS_HELP_STRING([--enable-ext-numbertext],
349 [Enable the Numbertext extension.])
352 AC_ARG_ENABLE(ext-oooblogger,
353 AS_HELP_STRING([--enable-ext-oooblogger],
354 [Enable the OOo Blogger extension.])
357 AC_ARG_ENABLE(ext-pdfimport,
358 AS_HELP_STRING([--disable-ext-pdfimport],
359 [Disable the PDF Import extension.])
362 AC_ARG_ENABLE(ext-postgresql-sdbc,
363 AS_HELP_STRING([--enable-ext-postgresql-sdbc],
364 [Enable the build of the PostgreSQL-SDBC extension.])
367 AC_ARG_ENABLE(ext-presenter-console,
368 AS_HELP_STRING([--disable-ext-presenter-console],
369 [Disable the Presenter Console extension.])
372 AC_ARG_ENABLE(ext-presenter-minimizer,
373 AS_HELP_STRING([--disable-ext-presenter-minimizer],
374 [Disable the Presentation Minimizer extension.])
377 AC_ARG_ENABLE(ext-report-builder,
378 AS_HELP_STRING([--disable-ext-report-builder],
379 [Disable the Report Builder extension.])
382 AC_ARG_ENABLE(ext-scripting-beanshell,
383 AS_HELP_STRING([--enable-ext-scripting-beanshell],
384 [Enable support for scripts in BeanShell.])
387 AC_ARG_ENABLE(ext-scripting-javascript,
388 AS_HELP_STRING([--enable-ext-scripting-javascript],
389 [Enable support for scripts in JavaScript.])
392 AC_ARG_ENABLE(ext-typo,
393 AS_HELP_STRING([--enable-ext-typo],
394 [Enable the Typography Toolbar extension.])
397 AC_ARG_ENABLE(ext-validator,
398 AS_HELP_STRING([--enable-ext-validator],
399 [Enable the Validator extension.])
402 AC_ARG_ENABLE(ext-watch-window,
403 AS_HELP_STRING([--enable-ext-watch-window],
404 [Enable the Watch Window extension to Calc.])
407 AC_ARG_ENABLE(ext-wiki-publisher,
408 AS_HELP_STRING([--enable-ext-wiki-publisher],
409 [Enable the Wiki Publisher extension.])
411 ###############################################################################
413 dnl ---------- *** ----------
415 AC_ARG_ENABLE(mergelibs,
416 AS_HELP_STRING([--enable-mergelibs],
417 [Enables linking of big merged library used for better performance.])
420 AC_ARG_ENABLE(graphite,
421 AS_HELP_STRING([--enable-graphite],
422 [Enables the compilation of Graphite smart font rendering.])
426 AS_HELP_STRING([--disable-ldap],
427 [Disables the use of LDAP backend via Netscape/Mozilla or OpenLDAP LDAP SDK])
430 AC_ARG_ENABLE(fetch-external,
431 AS_HELP_STRING([--disable-fetch-external],
432 [Disables fetching external tarballs from web sources.])
435 AC_ARG_ENABLE(lockdown,
436 AS_HELP_STRING([--disable-lockdown],
437 [Disables the gconf integration work in LibreOffice.]),
441 AS_HELP_STRING([--disable-vba],
442 [Disables the vba compatibility feature.])
446 AS_HELP_STRING([--enable-pch],
447 [EXPERIMENTAL: Enables precompiled header support for C++.])
450 AC_ARG_ENABLE(mozilla,
451 AS_HELP_STRING([--disable-mozilla],
452 [LibreOffice usually includes a strangely hacked up Mozilla binary for your
453 platform, to build without this version, use this option.])
457 AS_HELP_STRING([--enable-epm],
458 [LibreOffice includes self-packaging code, that requires epm, however epm is
459 useless for large scale package building.])
462 AC_ARG_ENABLE(activex_component,
463 AS_HELP_STRING([--disable-activex-component],
464 [Remove support for ActiveX embedding of LibreOffice.])
468 AS_HELP_STRING([--disable-odk],
469 [LibreOffice includes an ODK, office development kit which some packagers may
470 wish to build without.])
473 AC_ARG_ENABLE(mathmldtd,
474 AS_HELP_STRING([--disable-mathmldtd],
475 [Disable mathmldtd (useful for distributions that want to avoid
479 AC_ARG_ENABLE(evolution2,
480 AS_HELP_STRING([--enable-evolution2],
481 [Allows the built-in evolution 2 addressbook connectivity build to be
485 AC_ARG_ENABLE(directx,
486 AS_HELP_STRING([--disable-directx],
487 [Remove DirectX implementation for the new XCanvas interface.
488 The DirectX support requires more stuff installed on Windows to
489 compile. (DirectX SDK, GDI+ libs)])
492 AC_ARG_ENABLE(activex,
493 AS_HELP_STRING([--disable-activex],
494 [Disable the use of ActiveX for a Windows build.
495 This switch is mandatory when using VC++ 2008 Express.])
499 AS_HELP_STRING([--disable-atl],
500 [Disable the use of ATL for a Windows build.])
502 This switch is mandatory when using VC++ 2008 Express.
506 AC_ARG_ENABLE(symbols,
507 AS_HELP_STRING([--enable-symbols],
508 [Include debugging symbols in output. WARNING - a complete build needs
509 8 Gb of space and takes much longer (enables -g compiler flag).])
511 Enabling symbols disables the stripping of the solver
512 (--disable-strip-solver).
516 AC_ARG_ENABLE(strip-solver,
517 AS_HELP_STRING([--disable-strip-solver],
518 [Disable the stripping of the solver. By default the solver is stripped
519 unless a build with debugging symbols (--enable-symbols) is requested.])
521 This switch allows to override this setting.
525 AC_ARG_ENABLE(werror,
526 AS_HELP_STRING([--enable-werror],
527 [Turn warnings to errors. (Has no effect in modules where the treating
528 of warnings as errors is disabled explicitly.)]),
532 AS_HELP_STRING([--enable-debug],
533 [Include debugging symbols from --enable-symbols plus extra debugging
534 code. Extra large build! (enables -g compiler flag and dmake debug=true)
535 If you need even more verbose output, build a module with
536 "build -- debug=true dbglevel=2".]))
538 AC_ARG_ENABLE(dbgutil,
539 AS_HELP_STRING([--enable-dbgutil],
540 [Include additional debugging utilities, such as assertions, object
541 counting, etc. Larger build. Independent from --enable-debug]))
543 AC_ARG_ENABLE(linkoo,
544 AS_HELP_STRING([--disable-linkoo],
545 [Disable linkoo for the smoketest installation.]))
548 AS_HELP_STRING([--enable-lto],
549 [Enable link-time optimization. Suitable for product builds.
550 Building takes longer but libraries are optimized for speed.
551 (possible only with gcc-4.5 or later,
552 better to use gcc-4.6 and 'gold' as linker)]))
554 AC_ARG_ENABLE(crashdump,
555 AS_HELP_STRING([--enable-crashdump],
556 [Enable the crashdump feature.]))
558 AC_ARG_ENABLE(python,
559 AS_HELP_STRING([--enable-python=<no/auto/system/internal>],
560 [Enables or disables Python support at run-time and build-time.
561 Also specifies what Python to use. 'auto' is the
562 default. Note that Python can be disabled with
563 --disable-python or --enable-python=no only if no
564 translations are required.]))
567 AS_HELP_STRING([--disable-gtk],
568 [Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available.]),
572 AS_HELP_STRING([--disable-gtk3],
573 [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
576 AC_ARG_ENABLE(systray,
577 AS_HELP_STRING([--disable-systray],
578 [Determines whether to build the systray quickstarter.]),
581 AC_ARG_ENABLE(split-app-modules,
582 AS_HELP_STRING([--enable-split-app-modules],
583 [Split file lists for app modules, e.g. base, calc.
584 Has effect only with make distro-pack-install]),
587 AC_ARG_ENABLE(split-opt-features,
588 AS_HELP_STRING([--enable-split-opt-features],
589 [Split file lists for some optional features, .e.g. pyuno, testtool.
590 Has effect only with make distro-pack-install]),
593 AC_ARG_ENABLE(cairo-canvas,
594 [ --disable-cairo-canvas Determines whether to build the Cairo canvas on
595 platforms where Cairo is available.
596 ],,enable_cairo_canvas=yes)
598 AC_ARG_ENABLE(librsvg,
599 AS_HELP_STRING([--enable-librsvg=<no/auto/system/internal>],
600 [Enables or disables use of librsvg to render SVG at run-time.
601 Also specificed what librsvg to use. 'auto' is the default.]))
603 AC_ARG_ENABLE(opengl,
604 AS_HELP_STRING([--disable-opengl],
605 [Determines whether to build the OpenGL 3D slide transitions component.]),
609 AS_HELP_STRING([--enable-dbus],
610 [Determines whether to enable presentation mode screensaver control
611 under GNOME via DBUS.]),
615 AS_HELP_STRING([--disable-gconf],
616 [Determines whether to use the GConf support.]),
619 AC_ARG_ENABLE(gnome-vfs,
620 AS_HELP_STRING([--disable-gnome-vfs],
621 [Determines whether to use the Gnome Virtual Filing System on platforms
622 where that VFS is available.]),
623 ,enable_gnome_vfs=yes)
626 AS_HELP_STRING([--enable-gio],
627 [Determines whether to use the GIO support.]),
630 AC_ARG_ENABLE(static-gtk,
631 AS_HELP_STRING([--enable-static-gtk],
632 [Modules that are linked against GTK+ libraries use the static libraries
633 instead of the dynamic ones. (Enables -Bstatic linker flag for GTK+ libraries.)]),
636 AC_ARG_ENABLE(build-mozilla,
637 AS_HELP_STRING([--disable-build-mozilla],
638 [Use this option if you do not want to build the Mozilla components from
639 the Mozilla source code but take precompiled zips.]),
642 AC_ARG_ENABLE(xmlsec,
643 AS_HELP_STRING([--disable-xmlsec],
644 [Whether to enable XMLsec for open document signing.]),
648 AS_HELP_STRING([--enable-kde],
649 [Determines whether to use Qt3/KDE3 vclplug on platforms where Qt3 and
650 KDE3 are available.]),
654 AS_HELP_STRING([--disable-kdeab],
655 [Disable the KDE3 address book support.]),
657 if test "$enable_kde" = "yes"; then
663 AS_HELP_STRING([--enable-kde4],
664 [Determines whether to use Qt4/KDE4 vclplug on platforms where Qt4 and
665 KDE4 are available. May be used with --enable-kde if you want to support
666 both KDE3 and KDE4.]),
669 AC_ARG_ENABLE(unix-qstart-libpng,
670 AS_HELP_STRING([--disable-unix-qstart-libpng],
671 [On UNIX systems, we have a faster splash app, that can use libpng to
672 render its splash, if we can safely link to the system libpng then
673 enabling this is a good idea (ie. for Linux Distro packaging).]),
674 ,enable_unix_libpng=yes)
676 AC_ARG_ENABLE(binfilter,
677 AS_HELP_STRING([--enable-binfilter],
678 [Enable legacy binary file formats filters build.]),
683 AS_HELP_STRING([--enable-ugly],
684 [Enables ugly pieces of functionality.]),
689 AS_HELP_STRING([--disable-rpath],
690 [Disable the use of relative paths in shared libraries.]),
694 AS_HELP_STRING([--disable-randr],
695 [Disable RandR support in the vcl project.]),
698 AC_ARG_ENABLE(randr-link,
699 AS_HELP_STRING([--disable-randr-link],
700 [Disable linking with libXrandr, instead dynamically open it at runtime.]),
701 ,enable_randr_link=yes)
703 AC_ARG_ENABLE(gstreamer,
704 AS_HELP_STRING([--disable-gstreamer],
705 [Disable building the gstreamer avmedia backend.]),
706 ,enable_gstreamer=yes)
709 AS_HELP_STRING([--disable-neon],
710 [Disable neon and the compilation of webdav binding.]),
713 AC_ARG_ENABLE(build-unowinreg,
714 AS_HELP_STRING([--enable-build-unowinreg],
715 [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
716 compiler is needed on Linux.])
718 Usage: --enable-build-unowinreg
722 AC_ARG_ENABLE(verbose,
723 AS_HELP_STRING([--enable-verbose],
724 [Increase build verbosity.])[
725 --disable-verbose Decrease build verbosity.],
728 AC_ARG_ENABLE(dependency-tracking,
729 AS_HELP_STRING([--enable-dependency-tracking],
730 [Do not reject slow dependency extractors.])[
731 --disable-dependency-tracking
732 Disables generation of dependency information.
733 Speed up one-time builds.],
736 AC_ARG_ENABLE(icecream,
737 AS_HELP_STRING([--enable-icecream],
738 [Use the 'icecream' distributed compiling tool to speedup the compilation.
739 It defaults to /opt/icecream for the location of the icecream gcc/g++
740 wrappers, you can override that using --with-gcc-home=/the/path switch.]),
743 AC_ARG_ENABLE(zenity,
744 AS_HELP_STRING([--disable-zenity],
745 [Do not display a build icon in the notification area (on unix) during build.]),
748 AC_ARG_ENABLE(nsplugin,
749 AS_HELP_STRING([--disable-nsplugin],
750 [Do not build nsplugin extension for browser embedding.])
753 AC_ARG_ENABLE(ccache,
754 AS_HELP_STRING([--disable-ccache],
755 [Do not try to use ccache automatically.
756 By default, we will try to detect if ccache is available; in that case if
757 CC/CXX are not yet set, and --enable-icecream is not given, we
758 attempt to use ccache. --disable-ccache disables ccache completely.
762 AC_ARG_ENABLE(cl-x64,
763 AS_HELP_STRING([--enable-cl-x64],
764 [Build a 64-bit LibreOffice using the Microsoft C/C++ x64 compiler.]),
767 AC_ARG_ENABLE(extra-gallery,
768 AS_HELP_STRING([--enable-extra-gallery],
769 [Add extra gallery content.]),
772 AC_ARG_ENABLE(extra-template,
773 AS_HELP_STRING([--enable-extra-template],
774 [Add extra template content.]),
777 AC_ARG_ENABLE(extra-sample,
778 AS_HELP_STRING([--enable-extra-sample],
779 [Add extra sample content.]),
782 AC_ARG_ENABLE(extra-font,
783 AS_HELP_STRING([--enable-extra-font],
784 [Add extra font content.]),
787 AC_ARG_ENABLE(lomenubar,
788 AS_HELP_STRING([--enable-lomenubar],
789 [Enable global menu support.]),
792 AC_ARG_ENABLE(online-update,
793 AS_HELP_STRING([--enable-online-update],
794 [Enable the online update service that will check for new versions of
795 LibreOffice. By default, it is on on Windows and Mac, and off on Linux.]),
798 AC_ARG_ENABLE(release-build,
799 AS_HELP_STRING([--enable-release-build],
800 [Enable release build.
801 See http://wiki.documentfoundation.org/DevBuild]),
804 AC_ARG_ENABLE(silent-msi,
805 AS_HELP_STRING([--enable-silent-msi],
806 [Enable MSI with LIMITUI=1 (silent install).]),
809 dnl ===================================================================
810 dnl Optional Packages (--with/without-)
811 dnl ===================================================================
812 AC_ARG_WITH(gnu-patch,
813 AS_HELP_STRING([--with-gnu-patch],
814 [Specify location of GNU patch on Solaris or FreeBSD.]),
818 AS_HELP_STRING([--with-gnu-cp],
819 [Specify location of GNU cp on Solaris or FreeBSD.]),
822 AC_ARG_WITH(external-tar,
823 AS_HELP_STRING([--with-external-tar=<TARFILE PATH>],
824 [Specify path to tarfiles manually.]),
825 TARFILE_LOCATION=$withval ,
828 AC_ARG_WITH(linked-git,
829 AS_HELP_STRING([--with-linked-git=<OTHER_CLONE_DIR>],
830 [Specify another checkout's clonedir to re-use. This makes use of
831 git-new-workdir, and saves a lot of diskspace when having multiple
832 trees side-by-side.]),
833 GIT_LINK_SRC=$withval ,
836 AC_ARG_WITH(openldap,
837 AS_HELP_STRING([--with-openldap],
838 [Enables the use of the OpenLDAP LDAP SDK instead of the Netscape/Mozilla one.]),
841 AC_ARG_WITH(vba-package-format,
842 AS_HELP_STRING([--with-vba-package-format],
843 [Specify package format for vba compatibility api. Specifying "builtin"
844 means the api component and associated type library are part of the
845 installation set. Specifying "extn" creates an uno extension that is
846 part of the installation set (located in the program directory) that
847 MUST be optionly registered using either the unopkg executeable or the
848 extension manager gui.])
850 Note: "builtin" is the default, "extn" can cause
853 Usage: --with-vba-package-format="builtin" or
854 --with-vba-package-format="extn"
859 AS_HELP_STRING([--with-theme="theme1 theme2..."],
860 [Choose which themes to include. By default those themes with an '*' are included.
861 Possible choices: *default, *crystal, *hicontrast, *oxygen, *tango, classic, industrial.]),
864 AC_ARG_WITH(helppack-integration,
866 --without-helppack-integration It will not integrate the helppacks to the installer
868 Please use this switch to use the online help or separate help packages.],
872 AS_HELP_STRING([--without-fonts],
873 [LibreOffice includes some third-party fonts to provide a reliable basis for
874 help content, templates, samples, etc. When these fonts are already
875 known to be available on the system then you should use this option.]),
879 AS_HELP_STRING([--without-ppds],
880 [Removes Postscript Printer definition files from LibreOffice
881 installation set, for people building for specific distributions where
882 PPDs are known to be already available (every recent distro with CUPS backend).]),
886 AS_HELP_STRING([--without-afms],
887 [Removes bitmap font files from LibreOffice installation set, for people
888 building for specific distributions where AFM files or TrueType Fonts
889 are known to be available.]),
892 AC_ARG_WITH(agfa-monotype-fonts,
893 AS_HELP_STRING([--with-agfa-monotype-fonts],
894 [This switch should only be enabled for those who have the right
895 to use or distribute the proprietary Agfa Monotype
900 AS_HELP_STRING([--with-epm],
901 [Decides which epm to use. Default is to use the one from the system if
902 one is built. When either this is not there or you say =internal epm
906 AC_ARG_WITH(package-format,
907 AS_HELP_STRING([--with-package-format],
908 [Specify package format(s) for LibreOffice installsets. Default is the
909 "normal" one of the OS/Distribution. Possible values: aix, bsd, deb,
910 inst, tardist, osx, pkg, rpm, setld, native, portable, archive, dmg,
911 installed, msi. Example: --with-package-format="deb dmg"]),
914 AC_ARG_WITH(system-libs,
915 AS_HELP_STRING([--with-system-libs],
916 [Use libraries already on system -- enables all --with-system-* flags except
920 AC_ARG_WITH(system-headers,
921 AS_HELP_STRING([--with-system-headers],
922 [Use headers already on system -- enables all --with-system-* flags for
923 external packages whose headers are the only entities used i.e.
924 boost/vigra/odbc/sane-header(s).]),
927 AC_ARG_WITH(system-jars,
928 AS_HELP_STRING([--without-system-jars],
929 [When building with --with-system-libs, also the needed jars are expected
930 on the system. Use this to disable that (except for the db case where
931 --with-system-db *has to* imply using the db.jar from there, too).]),
934 AC_ARG_WITH(system-stdlibs,
935 AS_HELP_STRING([--with-system-stdlibs],
936 [Use libstdc++/libgcc_s already on system.]),,
937 [with_system_stdlibs="$with_system_libs"])
939 AC_ARG_WITH(system-cairo,
940 AS_HELP_STRING([--with-system-cairo],
941 [Use Cairo libraries already on system.]),,
942 [with_system_cairo="$with_system_libs"])
944 AC_ARG_WITH(system-graphite,
945 AS_HELP_STRING([--with-system-graphite],
946 [Use graphite library already installed on system.]),,
947 [with_system_graphite="$with_system_libs"])
949 AC_ARG_WITH(system-nss,
950 AS_HELP_STRING([--with-system-nss],
951 [Use NSS/nspr libraries already on system.]),,
952 [with_system_nss="$with_system_libs"])
954 AC_ARG_WITH(mozilla-version,
955 AS_HELP_STRING([--with-mozilla-version],
956 [Choose which version of Mozilla to use while building Mozilla.
957 (default=1.7.5) Note that not all versions are supported.]),
960 AC_ARG_WITH(mozilla-toolkit,
961 AS_HELP_STRING([--with-mozilla-toolkit],
962 [Choose which GUI toolkit to use while building Mozilla components. (default=gtk2)]),
965 AC_ARG_WITH(myspell-dicts,
966 AS_HELP_STRING([--without-myspell-dicts],
967 [Removes myspell dictionaries from LibreOffice installation set, for
968 people building for specific distributions where the myspell dictionaries
969 are installed from other sources.]),
972 AC_ARG_WITH(system-dicts,
973 AS_HELP_STRING([--with-system-dicts],
974 [Use dictionaries from system paths- Specify them via
975 --with-{dict,hyph,thes}-path=/path if you want to override the default ones.]),
978 AC_ARG_WITH(external-dict-dir,
979 AS_HELP_STRING([--with-external-dict-dir],
980 [Specify external dictionary dir.]),
983 AC_ARG_WITH(external-hyph-dir,
984 AS_HELP_STRING([--with-external-hyph-dir],
985 [Specify external hyphenation pattern dir.]),
988 AC_ARG_WITH(external-thes-dir,
989 AS_HELP_STRING([--with-external-thes-dir],
990 [Specify external thesaurus dir.]),
993 AC_ARG_WITH(system-zlib,
994 AS_HELP_STRING([--with-system-zlib],
995 [Use zlib already on system.]),,
996 [if test "$_os" != "WINNT"; then
999 with_system_zlib="$with_system_libs"
1002 AC_ARG_WITH(system-openssl,
1003 AS_HELP_STRING([--with-system-openssl],
1004 [Use OpenSSL already on system.]),,
1005 [with_system_openssl="$with_system_libs"])
1007 AC_ARG_WITH(system-jpeg,
1008 AS_HELP_STRING([--with-system-jpeg],
1009 [Use jpeg already on system.]),,
1010 [if test "$_os" = "Linux"; then
1011 with_system_jpeg=yes
1013 with_system_jpeg="$with_system_libs"
1016 AC_ARG_WITH(system-expat,
1017 AS_HELP_STRING([--with-system-expat],
1018 [Use expat already on system.]),,
1019 [with_system_expat="$with_system_libs"])
1021 AC_ARG_WITH(system-libcmis,
1022 AS_HELP_STRING([--with-system-libcmis],
1023 [Use libcmis already on system.]),,
1024 [with_system_libcmis="$with_system_libs"])
1026 AC_ARG_WITH(system-libvisio,
1027 AS_HELP_STRING([--with-system-libvisio],
1028 [Use libvisio already on system.]),,
1029 [with_system_libvisio="$with_system_libs"])
1031 AC_ARG_WITH(system-libwpd,
1032 AS_HELP_STRING([--with-system-libwpd],
1033 [Use libwpd already on system.]),,
1034 [with_system_libwpd="$with_system_libs"])
1036 AC_ARG_WITH(system-libwps,
1037 AS_HELP_STRING([--with-system-libwps],
1038 [Use libwps already on system.]),,
1039 [with_system_libwps="$with_system_libs"])
1041 AC_ARG_WITH(system-libwpg,
1042 AS_HELP_STRING([--with-system-libwpg],
1043 [Use libwpg already on system.]),,
1044 [with_system_libwpg="$with_system_libs"])
1046 AC_ARG_WITH(system-libxml,
1047 AS_HELP_STRING([--with-system-libxml],
1048 [Use libxml/libxslt already on system.]),,
1049 [if test "$_os" = "Darwin"; then
1050 with_system_libxml=yes
1052 with_system_libxml="$with_system_libs"
1055 AC_ARG_WITH(system-icu,
1056 AS_HELP_STRING([--with-system-icu],
1057 [Use icu already on system.]),,
1058 [with_system_icu="$with_system_libs"])
1060 AC_ARG_WITH(system-poppler,
1061 AS_HELP_STRING([--with-system-poppler],
1062 [Use system poppler. (only needed for pdfimport extension)]),,
1063 [with_system_poppler="$with_system_libs"])
1065 AC_ARG_WITH(system-db,
1066 AS_HELP_STRING([--with-system-db],
1067 [Use Berkeley db already on system.]),,
1068 [with_system_db="$with_system_libs"])
1070 AC_ARG_WITH(system-lucene,
1071 AS_HELP_STRING([--with-system-lucene],
1072 [Use Lucene already on system.]),,
1073 [with_system_lucene="$with_system_jars"])
1075 AC_ARG_WITH(system-apache-commons,
1076 AS_HELP_STRING([--with-system-apache-commons],
1077 [Use Apache commons libraries already on system.]),,
1078 [with_system_apache_commons="$with_system_jars"])
1080 AC_ARG_WITH(lucene-core-jar,
1081 AS_HELP_STRING([--with-lucene-core-jar=JARFILE],
1082 [Specify path to jarfile manually.]),
1083 LUCENE_CORE_JAR=$withval)
1085 AC_ARG_WITH(lucene-analyzers-jar,
1086 AS_HELP_STRING([--with-lucene-analyzers-jar=JARFILE],
1087 [Specify path to jarfile manually.]),
1088 LUCENE_ANALYZERS_JAR=$withval ,)
1090 AC_ARG_WITH(system-mysql,
1091 AS_HELP_STRING([--with-system-mysql],
1092 [Use MySQL libraries already on system, for building the MySQL Connector/LibreOffice
1093 extension. If the the mysql_config executable is not in PATH, use MYSQLCONFIG to
1095 [with_system_mysql="$with_system_libs"])
1097 AC_ARG_WITH(libmysql-path,
1098 AS_HELP_STRING([--with-libmysql-path],
1099 [Use Connector/C (libmysql) installation for building the MySQL
1100 Connector/LibreOffice extension.])
1102 Usage: --with-libmysql-path=<absolute path to
1103 your Connector/C installation>
1107 AC_ARG_WITH(system-mysql-cppconn,
1108 AS_HELP_STRING([--with-system-mysql-cppconn],
1109 [Use MySQL C++ Connector libraries already on system.]),,
1110 [with_system_mysql_cppconn="$with_system_libs"])
1112 AC_ARG_WITH(system-postgresql,
1113 AS_HELP_STRING([--with-system-postgresql],
1114 [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC
1115 extension. If pg_config is not in PATH, use PGCONFIG to point to it.]),,
1116 [with_system_postgresql="$with_system_libs"])
1118 AC_ARG_WITH(libpq-path,
1119 AS_HELP_STRING([--with-libpq-path],
1120 [Use this PostgreSQL C interface (libpq) installation for building
1121 the PostgreSQL-SDBC extension.])
1123 Usage: --with-libpq-path=<absolute path to
1124 your libq installation>
1128 AC_ARG_WITH(system-hsqldb,
1129 AS_HELP_STRING([--with-system-hsqldb],
1130 [Use hsqldb already on system.]),,
1131 [with_system_hsqldb="$with_system_jars"])
1133 AC_ARG_WITH(hsqldb-jar,
1134 AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
1135 [Specify path to jarfile manually.]),
1136 HSQLDB_JAR=$withval)
1138 AC_ARG_WITH(system-beanshell,
1139 AS_HELP_STRING([--with-system-beanshell],
1140 [Use beanshell already on system.]),,
1141 [with_system_beanshell="$with_system_jars"])
1143 AC_ARG_WITH(beanshell-jar,
1144 AS_HELP_STRING([--with-beanshell-jar=JARFILE],
1145 [Specify path to jarfile manually.]),
1148 AC_ARG_WITH(commons-codec-jar,
1149 AS_HELP_STRING([--with-commons-codec-jar=JARFILE],
1150 [Specify path to jarfile manually.]),
1151 COMMONS_CODEC_JAR=$withval)
1153 AC_ARG_WITH(commons-lang-jar,
1154 AS_HELP_STRING([--with-commons-lang-jar=JARFILE],
1155 [Specify path to jarfile manually.]),
1156 COMMONS_LANG_JAR=$withval)
1158 AC_ARG_WITH(commons-httpclient-jar,
1159 AS_HELP_STRING([--with-commons-httpclient-jar=JARFILE],
1160 [Specify path to jarfile manually.]),
1161 COMMONS_HTTPCLIENT_JAR=$withval)
1163 AC_ARG_WITH(commons-logging-jar,
1164 AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
1165 [Specify path to jarfile manually.]),
1166 COMMONS_LOGGING_JAR=$withval)
1168 AC_ARG_WITH(system-servlet-api,
1169 AS_HELP_STRING([--with-system-servlet-api],
1170 [Use servlet-api already on system.]),,
1171 [with_system_servlet_api="$with_system_jars"])
1173 AC_ARG_WITH(servlet-api-jar,
1174 AS_HELP_STRING([--with-servlet-api-jar=JARFILE],
1175 [Specify path to jarfile manually.]),
1176 SERVLETAPI_JAR=$withval)
1178 AC_ARG_WITH(system-jfreereport,
1179 AS_HELP_STRING([--with-system-jfreereport],
1180 [Use JFreeReport already on system.]),,
1181 [with_system_jfreereport="$with_system_jars"])
1183 AC_ARG_WITH(sac-jar,
1184 AS_HELP_STRING([--with-sac-jar=JARFILE],
1185 [Specify path to jarfile manually.]),
1188 AC_ARG_WITH(libxml-jar,
1189 AS_HELP_STRING([--with-libxml-jar=JARFILE],
1190 [Specify path to jarfile manually.]),
1191 LIBXML_JAR=$withval)
1193 AC_ARG_WITH(flute-jar,
1194 AS_HELP_STRING([--with-flute-jar=JARFILE],
1195 [Specify path to jarfile manually.]),
1198 AC_ARG_WITH(jfreereport-jar,
1199 AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
1200 [Specify path to jarfile manually.]),
1201 JFREEREPORT_JAR=$withval)
1203 AC_ARG_WITH(liblayout-jar,
1204 AS_HELP_STRING([--with-liblayout-jar=JARFILE],
1205 [Specify path to jarfile manually.]),
1206 LIBLAYOUT_JAR=$withval)
1208 AC_ARG_WITH(libloader-jar,
1209 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1210 [Specify path to jarfile manually.]),
1211 LIBLOADER_JAR=$withval)
1213 AC_ARG_WITH(libloader-jar,
1214 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1215 [Specify path to jarfile manually.]),
1216 LIBLOADER_JAR=$withval)
1218 AC_ARG_WITH(libformula-jar,
1219 AS_HELP_STRING([--with-libformula-jar=JARFILE],
1220 [Specify path to jarfile manually.]),
1221 LIBFORMULA_JAR=$withval)
1223 AC_ARG_WITH(librepository-jar,
1224 AS_HELP_STRING([--with-librepository-jar=JARFILE],
1225 [Specify path to jarfile manually.]),
1226 LIBREPOSITORY_JAR=$withval)
1228 AC_ARG_WITH(libfonts-jar,
1229 AS_HELP_STRING([--with-libfonts-jar=JARFILE],
1230 [Specify path to jarfile manually.]),
1231 LIBFONTS_JAR=$withval)
1233 AC_ARG_WITH(libserializer-jar,
1234 AS_HELP_STRING([--with-libserializer-jar=JARFILE],
1235 [Specify path to jarfile manually.]),
1236 LIBSERIALIZER_JAR=$withval)
1238 AC_ARG_WITH(libbase-jar,
1239 AS_HELP_STRING([--with-libbase-jar=JARFILE],
1240 [Specify path to jarfile manually.]),
1241 LIBBASE_JAR=$withval)
1243 AC_ARG_WITH(system-saxon,
1244 AS_HELP_STRING([--with-system-saxon],
1245 [Use saxon already on system.]),,
1246 [with_system_saxon="$with_system_jars"])
1248 AC_ARG_WITH(saxon-jar,
1249 AS_HELP_STRING([--with-saxon-jar=JARFILE],
1250 [Specify path to jarfile manually.]),
1253 AC_ARG_WITH(system-odbc,
1254 AS_HELP_STRING([--with-system-odbc],
1255 [Use the odbc headers already on system.]),,
1256 [with_system_odbc="$with_system_headers"])
1258 AC_ARG_WITH(system-sane,
1259 AS_HELP_STRING([--with-system-sane],
1260 [Use sane.h already on system.]),,
1261 [with_system_sane="$with_system_headers"])
1263 AC_ARG_WITH(system-xextensions-headers,
1264 AS_HELP_STRING([--with-system-xextensions-headers],
1265 [To build without system X11 extensions headers, use
1266 --without-system-xextensions-headers. This is possibly
1267 useful on legacy unix systems which ship with the libs
1268 but without the headers.]))
1270 AC_ARG_WITH(system-mesa-headers,
1271 AS_HELP_STRING([--with-system-mesa-headers],
1272 [Use Mesa headers already on system.]),,
1273 [with_system_mesa_headers="$with_system_headers"])
1275 AC_ARG_WITH(system-curl,
1276 AS_HELP_STRING([--with-system-curl],
1277 [Use curl already on system.]),,
1278 [if test "$_os" = "Darwin"; then
1279 with_system_curl=yes
1281 with_system_curl="$with_system_libs"
1284 AC_ARG_WITH(system-boost,
1285 AS_HELP_STRING([--with-system-boost],
1286 [Use boost already on system.]),,
1287 [with_system_boost="$with_system_headers"])
1289 AC_ARG_WITH(system-mdds,
1290 AS_HELP_STRING([--with-system-mdds],
1291 [Use mdds already on system.]),,
1292 [with_system_mdds="$with_system_headers"])
1294 AC_ARG_WITH(system-vigra,
1295 AS_HELP_STRING([--with-system-vigra],
1296 [Use vigra already on system.]),,
1297 [with_system_vigra="$with_system_headers"])
1299 AC_ARG_WITH(system-neon,
1300 AS_HELP_STRING([--with-system-neon],
1301 [Use neon already on system.]),,
1302 [with_system_neon="$with_system_libs"])
1304 AC_ARG_WITH(system-hunspell,
1305 AS_HELP_STRING([--with-system-hunspell],
1306 [Use libhunspell already on system.]),,
1307 [with_system_hunspell="$with_system_libs"])
1309 AC_ARG_WITH(system-mythes,
1310 AS_HELP_STRING([--with-system-mythes],
1311 [Use mythes already on system.]),,
1312 [with_system_mythes="$with_system_libs"])
1314 AC_ARG_WITH(system-altlinuxhyph,
1315 AS_HELP_STRING([--with-system-altlinuxhyph],
1316 [Use ALTLinuxhyph already on system.]),,
1317 [with_system_altlinuxhyph="$with_system_libs"])
1319 AC_ARG_WITH(system-lpsolve,
1320 AS_HELP_STRING([--with-system-lpsolve],
1321 [Use lpsolve already on system.]),,
1322 [with_system_lpsolve="$with_system_libs"])
1324 AC_ARG_WITH(system-libexttextcat,
1325 AS_HELP_STRING([--with-system-libexttextcat],
1326 [Use libexttextcat already on system.]),,
1327 [with_system_libexttextcat="$with_system_libs"])
1329 AC_ARG_WITH(system-cppunit,
1330 AS_HELP_STRING([--with-system-cppunit],
1331 [Use cppunit already on system.]),,
1332 [with_system_cppunit="$with_system_libs"])
1334 AC_ARG_WITH(system-redland,
1335 AS_HELP_STRING([--with-system-redland],
1336 [Use redland library already on system.]),,
1337 [with_system_redland="$with_system_libs"])
1339 AC_ARG_WITH(system-mozilla,
1340 AS_HELP_STRING([--with-system-mozilla],
1341 [Use Mozilla already on system. Note that some components cannot be built
1342 against a contemporary Mozilla. The flavour used can be specified by
1343 --with-system-mozilla=<flavour>. Supported are: libxul (default),
1344 xulrunner, firefox, seamonkey, mozilla.]),
1345 WITH_SYSTEM_MOZILLA=$withval ,
1346 WITH_SYSTEM_MOZILLA=no)
1348 AC_ARG_WITH(system-mozilla-headers,
1349 AS_HELP_STRING([--with-system-mozilla-headers],
1350 [Use mozilla headers provided by system instead of bundled ones. Used in
1352 [with_system_mozilla_headers="$with_system_headers"]
1355 AC_ARG_WITH(system-gettext,
1356 AS_HELP_STRING([--with-system-gettext],
1357 [Use gettext runtime library already on system.]),,
1358 [with_system_gettext="$with_system_libs"])
1360 AC_ARG_WITH(system-libpng,
1361 AS_HELP_STRING([--with-system-libpng],
1362 [Use libpng already on system.]),,
1363 [with_system_libpng="$with_system_libs"])
1365 AC_ARG_WITH(linker-hash-style,
1366 AS_HELP_STRING([--with-linker-hash-style],
1367 [Use linker with --hash-style=<style> when linking shared objects.
1368 Possible values: "sysv", "gnu", "both". The default value is "gnu"
1369 if supported on the build system, and "sysv" otherwise.]))
1371 AC_ARG_WITH(stlport,
1372 AS_HELP_STRING([--with-stlport],
1373 [Build the STLPort library for compatibility with old extensions for
1374 architectures where STLPort used to be used.]),
1375 with_stlport=$withval ,
1378 AC_ARG_WITH(jdk-home,
1379 AS_HELP_STRING([--with-jdk-home],
1380 [If you have installed JDK 1.3 or later on your system please supply the
1381 path here. Note that this is not the location of the java command but the
1382 location of the entire distribution.])
1384 Usage: --with-jdk-home=<absolute path to JDK home>
1388 AC_ARG_WITH(gxx_include_path,
1389 AS_HELP_STRING([--with-gxx-include-path],
1390 [If you want to override the autodetected g++ include path.])
1392 Usage: --with-gxx-include-path=<absolute path to
1398 AS_HELP_STRING([--with-help],
1399 [Enable the build of help.
1401 To build without help, use --without-help.]))
1404 AS_HELP_STRING([--with-java],
1405 [Specify the name of the Java interpreter command. Typically "java"
1406 which is the default.
1408 To build without support for Java components, applets, accessibility
1409 or the XML filters written in Java, use --without-java or --with-java=no.])
1411 Usage: --with-java==<java command>
1414 [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
1418 AC_ARG_WITH(java_target_version,
1419 AS_HELP_STRING([--with-java-target-version],
1420 [Generate class files that will work on JVMs with the specified version.
1421 For example, use --with-java-target-version=1.4 to make sure that the
1422 application will work with JVM 1.4 even when compiled with JDK 1.5.])
1424 This option is ignored when you compile with gcj/gij.
1426 Usage: --with-java-target-version=<jvm version>
1430 AC_ARG_WITH(jvm-path,
1431 AS_HELP_STRING([--with-jvm-path],
1432 [Use a specific JVM search path at runtime.])
1434 Usage: --with-jvm-path=<absolute path to parent of jvm home>
1436 e. g.: --with-jvm-path=/usr/lib/
1437 to find JRE/JDK in /usr/lib/jvm/
1441 AC_ARG_WITH(ant-home,
1442 AS_HELP_STRING([--with-ant-home],
1443 [If you have installed Jakarta Ant on your system, please supply the path here.
1444 Note that this is not the location of the Ant binary but the location
1445 of the entire distribution.])
1447 Usage: --with-ant-home=<absolute path to Ant home>
1452 AS_HELP_STRING([--with-junit],
1453 [Specifies the JUnit 4 jar file to use for JUnit-based tests.
1454 --without-junit disables those tests. Not relevant in the --without-java case.])
1456 Usage: --with-junit=<absolute path to JUnit 4 jar>
1460 AC_ARG_WITH(perl-home,
1461 AS_HELP_STRING([--with-perl-home],
1462 [If you have installed Perl 5 Distribution, on your system, please
1463 supply the path here. Note that this is not the location of the Perl
1464 binary but the location of the entire distribution.])
1466 Usage: --with-perl-home=<abs. path to Perl 5 home>
1470 AC_ARG_WITH(cl-home,
1471 AS_HELP_STRING([--with-cl-home],
1472 [For Windows NT users, please supply the path for the Microsoft C/C++
1473 compiler. Note that this is not the location of the compiler binary but
1474 the location of the entire distribution.])
1476 Usage: --with-cl-home=<absolute path to Microsoft
1477 C/C++ compiler home>
1481 AC_ARG_WITH(mspdb-path,
1482 AS_HELP_STRING([--with-mspdb-path],
1483 [For Microsoft C/C++ compiler users, please supply the path pointing to
1484 the mspdb80.dll (if using Visual Studio 2008) or mspdb100.dll (if using
1485 Visual Studio 2010).])
1487 Usage: --with-mspdb-path=<path to
1488 mspdb80.dll/mspdb100.dll>
1492 AC_ARG_WITH(midl-path,
1493 AS_HELP_STRING([--with-midl-path],
1494 [For Microsoft compiler users, please supply the path pointing to the midl.exe.])
1496 Usage: --with-midl-path=<abs. path to midl.exe>
1500 AC_ARG_WITH(csc-path,
1501 AS_HELP_STRING([--with-csc-path],
1502 [For Windows builds, please supply the path pointing to the csc.exe.
1503 Usually found automatically when building on Windows.])
1505 Usage: --with-csc-path=<abs. path to csc.exe>
1509 AC_ARG_WITH(nsis-path,
1510 AS_HELP_STRING([--with-nsis-path],
1511 [For Windows builds, please supply the directory where makensis
1512 is located. If makensis is found in PATH or this option is
1513 properly supplied a self-contained executable installer for
1514 LibreOffice will be created.])
1516 Usage: --with-nsis-path=<path to directory containing makensis>
1520 AC_ARG_WITH(dotnet-framework-home,
1521 AS_HELP_STRING([--with-dotnet-framework-home],
1522 [For Microsoft compiler users, please supply the path pointing to
1523 lib/mscoree.lib, usually something like:
1524 "/cygdrive/c/Program Files/Windows SDKs/Windows/v7.0"])
1526 Note that in most cases it will be automatically
1529 Usage: --with-dotnet-framework-home=<absolute path to .NET
1534 AC_ARG_WITH(windows-sdk-home,
1535 AS_HELP_STRING([--with-windows-sdk-home],
1536 [For Windows builds, please supply the path to the Windows SDK.
1537 Usually found automatically when building on Windows.])
1539 Usage: --with-windows-sdk-home=<absolute path to Windows SDK>
1543 AC_ARG_WITH(directx-home,
1544 AS_HELP_STRING([--with-directx-home],
1545 [For Windows users, please supply the path to the Microsoft DirectX SDK.])
1547 Usage: --with-directx-home=<absolute path to
1548 Microsoft DirectX SDK>
1552 AC_ARG_WITH(mozilla-build,
1553 AS_HELP_STRING([--with-mozilla-build],
1554 [For Windows users, please supply the path to the Mozilla build tools.])
1556 Usage: --with-mozilla-build=<absolute path to
1557 Mozilla build tools>
1559 At the moment of this writing, an installer for the
1560 mozilla build tools can be obtained from http://ftp.
1561 mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
1563 MOZILLABUILD=$withval ,
1566 AC_ARG_WITH(local-solver,
1567 AS_HELP_STRING([--with-local-solver],
1568 [If you have solver in a location other than ./solver, please supply the path here.])
1570 Usage: --with-local-solver=<abs. path to solver>
1575 AS_HELP_STRING([--with-lang],
1576 [Use this option to build LibreOffice with additional language support.
1577 English (US) is always included by default.
1578 Separate multiple languages with space.
1579 For all languages, use --with-lang=ALL.])
1581 Usage: --with-lang="es sw tu cs sk"
1585 dnl ===================================================================
1587 dnl ===================================================================
1589 AC_ARG_WITH(intro-bitmap,
1590 [ --with-intro-bitmap Prefer the specified intro bitmap over the
1593 Usage: --with-intro-bitmap=/path/my_ooo_intro.png
1596 AC_ARG_WITH(intro-progressbar-color,
1597 [ --with-intro-progressbar-color Set color of progress bar on intro screen.
1598 Comma separated RGB values in decimal format.
1600 Usage: --with-intro-progressbar-color=126,170,23
1603 AC_ARG_WITH(intro-progressbar-size,
1604 [ --with-intro-progressbar-size Set size of progress bar on intro screen.
1605 Comma separated values in decimal format.
1607 Usage: --with-intro-progressbar-size=319,10
1610 AC_ARG_WITH(intro-progressbar-position,
1611 [ --with-intro-progressbar-position Set position of progress bar on intro screen.
1612 Comma separated values in decimal format.
1614 Usage: --with-intro-progressbar-position=164,225
1617 AC_ARG_WITH(intro-progressbar-frame-color,
1618 [ --with-intro-progressbar-frame-color Set color of progress bar frame on intro screen.
1619 Comma separated RGB values in decimal format.
1621 Usage: --with-intro-progressbar-frame-color=207,208,211
1624 AC_ARG_WITH(about-bitmap,
1625 [ --with-about-bitmap Similarly to --with-intro-bitmap, this allows
1626 specification of bitmap for the About box.
1628 Usage: --with-about-bitmap=/path/my_ooo_about.png
1631 AC_ARG_WITH(startcenter-left-bitmap,
1632 [ --with-startcenter-left-bitmap Similarly to --with-intro-bitmap, this allows
1633 specification of bitmap for the Start center.
1635 Usage: --with-startcenter-left-bitmap=/path/my_backing_left.png
1638 AC_ARG_WITH(startcenter-right-bitmap,
1639 [ --with-startcenter-right-bitmap Similarly to --with-intro-bitmap, this allows
1640 specification of bitmap for the Start center.
1642 Usage: --with-startcenter-right-bitmap=/path/my_backing_right.png
1645 AC_ARG_WITH(startcenter-rtl-left-bitmap,
1646 [ --with-startcenter-rtl-left-bitmap Similarly to --with-intro-bitmap, this allows
1647 specification of bitmap for the Start center.
1649 Usage: --with-startcenter-rtl-left-bitmap=/path/my_backing_rtl_left.png
1652 AC_ARG_WITH(startcenter-rtl-right-bitmap,
1653 [ --with-startcenter-rtl-right-bitmap Similarly to --with-intro-bitmap, this allows
1654 specification of bitmap for the Start center.
1656 Usage: --with-startcenter-rtl-right-bitmap=/path/my_backing_rtl_right.png
1659 AC_ARG_WITH(startcenter-space-bitmap,
1660 [ --with-startcenter-space-bitmap Similarly to --with-intro-bitmap, this allows
1661 specification of bitmap for the Start center.
1663 Usage: --with-startcenter-space-bitmap=/path/my_backing_space.png
1667 AS_HELP_STRING([--with-vendor],
1668 [Set vendor of the build.])
1670 Usage: --with-vendor="John the Builder"
1674 AC_ARG_WITH(unix-wrapper,
1675 AS_HELP_STRING([--with-unix-wrapper],
1676 [Redefines the name of the UNIX wrapper that will be used in the desktop
1677 files and in the desktop-integration RPMs.])
1679 Usage: --with-unix-wrapper=ooffice
1683 AC_ARG_WITH(compat-oowrappers,
1684 AS_HELP_STRING([--with-compat-oowrappers],
1685 [Install oo* wrappers in parallel with
1686 lo* ones to keep backward compatibility.
1687 Has effect only with make distro-pack-install]),
1690 AC_ARG_WITH(asm-home,
1691 AS_HELP_STRING([--with-asm-home],
1692 [For Windows, please supply the path for the ml.exe or ml64.exe assembler.])
1694 Usage: --with-asm-home=<path to assembler directory>
1698 AC_ARG_WITH(os-version,
1699 AS_HELP_STRING([--with-os-version],
1700 [For FreeBSD users, use this option option to override the detected OSVERSION.])
1702 Usage: --with-os-version=<OSVERSION>
1706 AC_ARG_WITH(mingw-cross-compiler,
1707 AS_HELP_STRING([--with-mingw-cross-compiler],
1708 [Specify the MinGW cross-compiler to use.])
1710 Usage: --with-mingw-cross-compiler=<mingw32-g++ command>
1712 When building on the ODK on Unix and building unowinreg.dll,
1713 specify the MinGW C++ cross-compiler.
1717 AC_ARG_WITH(build-version,
1718 AS_HELP_STRING([--with-build-version],
1719 [Allows the builder to add a custom version tag that will appear in the
1720 Help/About box for QA purposes.])
1722 Usage: --with-build-version="Built by Jim"
1724 with_build_version=$withval ,
1728 AS_HELP_STRING([--with-alloc],
1729 [Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
1730 Note that on FreeBSD/NetBSD system==jemalloc]),
1733 AC_ARG_WITH(sun-templates,
1734 AS_HELP_STRING([--with-sun-templates],
1735 [Integrate Sun template packages.]),
1738 AC_ARG_WITH(num-cpus,
1739 AS_HELP_STRING([--with-num-cpus],
1740 [Number of build processes/cpus to use (number of projects that will build at the same time).
1741 Multi-process/multi-cpu builds can save a lot of time on multi-cpu machines.
1742 Defaults to the number of CPUs on the machine.]),
1745 AC_ARG_WITH(max-jobs,
1746 AS_HELP_STRING([--with-max-jobs],
1747 [Maximum number of jobs that will be issued at the same time per dmake or gbuild subproject.
1748 The real number of the jobs is affected by the --with-num-cpus too, it can get up to CPUS*max_jobs.
1749 Defaults to 1, unless you configure --enable-icecream - then to 10.]),
1752 dnl ===================================================================
1753 dnl MacOSX build and runtime environment options
1754 dnl ===================================================================
1756 AC_ARG_WITH(macosx-sdk,
1757 AS_HELP_STRING([--with-macosx-sdk],
1758 [Use a specific SDK for building.])
1760 Usage: --with-macosx-sdk=<version>
1762 e. g.: --with-macosx-sdk=10.4
1764 there are 3 options to controle the MacOSX build:
1765 --with-macosx-sdk (refered as 'sdl' below)
1766 --with-macosx-version-min-required (refered as 'min' below)
1767 --with-macosx-version-max-allowed (refered as 'max' below)
1769 the connection between these value and the default they take is as follow:
1770 ( ? means not specified on the command line, constraint: x <= y <= z)
1772 ==========================================
1773 command line || config result
1774 ==========================================
1775 min | max | sdk || min | max | sdk |
1776 ? | ? | ? || 10.4 | 10.4 | 10.4 |
1777 ? | ? | 10.x || 10.4 | 10.4 | 10.x |
1778 ? | 10.x | ? || 10.4 | 10.x | 10.x |
1779 ? | 10.x | 10.y || 10.4 | 10.x | 10.y |
1780 10.x | ? | ? || 10.x | 10.x | 10.x |
1781 10.x | ? | 10.y || 10.x | 10.x | 10.y |
1782 10.x | 10.y | ? || 10.x | 10.y | 10.y |
1783 10.x | 10.y | 10.z || 10.x | 10.y | 10.z |
1786 see: http://developer.apple.com/library/mac/#technotes/tn2064/_index.html
1787 for a detailled technical explanation of these variables
1789 Note: MACOSX_DEPLOYMENT_TARGET will be set to the value of 'min'.
1794 AC_ARG_WITH(macosx-version-min-required,
1795 AS_HELP_STRING([--with-macosx-version-min-required],
1796 [set the minimum OS version needed to run the built LibreOffice])
1798 Usage: --with-macosx-version-min-required=<version>
1800 e. g.: --with-macos-version-min-required=10.4
1801 see --with-macosx-sdk for more info
1805 AC_ARG_WITH(macosx-version-max-allowed,
1806 AS_HELP_STRING([--with-macosx-version-max-allowed],
1807 [set the maximum allowed OS version the LibreOffice compilation can use APIs from])
1809 Usage: --with-macosx-version-max-allowed=<version>
1811 e. g.: --with-macos-version-max-allowed=10.6
1812 see --with-macosx-sdk for more info
1817 dnl ===================================================================
1818 dnl check for required programs (grep, awk, sed, bash)
1819 dnl ===================================================================
1822 AC_PATH_PROG( AWK, $AWK)
1823 if test -z "$AWK"; then
1824 AC_MSG_ERROR([install awk to run this script])
1827 AC_PATH_PROG(BASH, bash)
1828 if test -z "$BASH"; then
1829 AC_MSG_ERROR([bash not found in \$PATH])
1833 AC_MSG_CHECKING([for GNU or BSD tar])
1834 for a in $GNUTAR gtar gnutar tar /usr/sfw/bin/gtar; do
1835 $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
1836 if test $? -eq 0; then
1841 AC_MSG_RESULT($GNUTAR)
1842 if test -z "$GNUTAR"; then
1843 AC_MSG_ERROR([not found. install GNU or BSD tar.])
1847 dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
1848 dnl desktop OSes from "mobile" ones.
1850 dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
1851 dnl In other words, that when building for an OS that is not a
1852 dnl "desktop" one but a "mobile" one, we are always cross-compiling.
1854 dnl Note the direction of the implication; there is no assumption that
1855 dnl cross-compiling would imply a non-desktop OS.
1857 if test $_os != iOS -a $_os != Android; then
1858 BUILD_TYPE="$BUILD_TYPE DESKTOP"
1861 dnl ===================================================================
1862 dnl Extra check for Windows. Cygwin builds need gcc to build dmake
1863 dnl although MSVC is used to build other build-time tools and
1864 dnl LibreOffice itself.
1865 dnl ===================================================================
1866 if test "$build_os" = "cygwin" ; then
1867 AC_MSG_CHECKING([for Cygwin gcc/g++])
1868 if which gcc > /dev/null && which g++ > /dev/null ; then
1869 AC_MSG_RESULT([found])
1871 AC_MSG_ERROR([Cygwin gcc and g++ are needed, please install them.])
1877 dnl ===================================================================
1878 dnl Checks if ccache is available
1879 dnl ===================================================================
1880 if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \) ; then
1881 if test -z "$CC" ; then
1882 if test -z "$CXX" ; then
1883 AC_PATH_PROG([CCACHE],[ccache],[not found])
1884 if test "$CCACHE" = "not found" ; then
1888 # need to check for ccache version: otherwise prevents
1889 # caching of the results (like "-x objective-c++" for Mac)
1890 if test $_os = Darwin -o $_os = iOS; then
1891 # check ccache version
1892 AC_MSG_CHECKING([whether version of ccache is suitable])
1893 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
1894 CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1895 if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
1896 AC_MSG_RESULT([yes])
1899 AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. ccache will not be used.])
1905 AC_MSG_NOTICE([Automatic ccache detection ingored: CXX is pre-defined])
1909 AC_MSG_NOTICE([Automatic ccache detection ingored: CC is pre-defined])
1916 if test "$CCACHE" != "" ; then
1917 ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
1918 ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
1919 if test "$ccache_size" = "" ; then
1920 ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
1921 if test "$ccache_size" = "" ; then
1924 # we could not determine the size or it was less than 1GB -> disable auto-ccache
1925 if test $ccache_size -lt 1024 ; then
1927 AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-producive: Disabling auto-ccache detection])
1928 echo "ccache's cache size is less than 1GB using it is counter-producive: auto-ccache detection disabled" >> warn
1930 # warn that ccache may be too small for debug build
1931 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build])
1932 echo "ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build" >> warn
1935 if test $ccache_size -lt 5 ; then
1936 #warn that ccache may be too small for debug build
1937 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build])
1938 echo "ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build" >> warn
1943 dnl ===================================================================
1944 dnl Checks for C compiler,
1945 dnl The check for the C++ compiler is later on.
1946 dnl ===================================================================
1948 AC_MSG_CHECKING([gcc home])
1949 if test -z "$with_gcc_home"; then
1950 if test "$enable_icecream" = "yes" ; then
1951 GCC_HOME="/opt/icecream"
1953 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1954 GCC_HOME_SET="false"
1957 GCC_HOME="$with_gcc_home"
1959 AC_MSG_RESULT($GCC_HOME)
1962 if test "$GCC_HOME_SET" = "true" ; then
1963 if test -z "$CC"; then
1964 CC="$GCC_HOME/bin/gcc"
1966 if test -z "$CXX"; then
1967 CXX="$GCC_HOME/bin/g++"
1971 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1972 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
1976 COMPATH=`dirname "$CC"`
1977 if test "$COMPATH" = "." ; then
1978 AC_PATH_PROGS(COMPATH, $CC)
1979 dnl double square bracket to get single because of M4 quote...
1980 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1982 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
1987 dnl ===================================================================
1988 dnl Test MacOSX sdk and version requirement
1989 dnl ===================================================================
1990 if test "$_os" = "Darwin" ; then
1992 if test "$with_macosx_version_min_required" = "" ; then
1993 with_macosx_version_min_required="10.4"
1996 if test "$with_macosx_version_max_allowed" = "" ; then
1997 with_macosx_version_max_allowed="$with_macosx_version_min_required"
2000 if test "$with_macosx_sdk" = "" ; then
2001 with_macosx_sdk="$with_macosx_version_max_allowed"
2004 case "$with_macosx_sdk" in
2007 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.4u.sdk"
2008 if test ! -d "$MACOSX_SDK_PATH"; then
2009 MACOSX_SDK_PATH="/Developer-old/SDKs/MacOSX10.4u.sdk"
2011 macosx_sdk_value="1040"
2014 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.5.sdk"
2015 if test ! -d "$MACOSX_SDK_PATH"; then
2016 MACOSX_SDK_PATH="/Developer-old/SDKs/MacOSX10.5.sdk"
2018 macosx_sdk_value="1050"
2019 AC_MSG_WARN([Building with a SDK > 10.4 is experimental])
2020 echo "Building with a SDK > 10.4 is experimental" >> warn
2023 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.6.sdk"
2024 macosx_sdk_value="1060"
2025 AC_MSG_WARN([Building with a SDK > 10.4 is experimental])
2026 echo "Building with a SDK > 10.4 is experimental" >> warn
2029 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.7.sdk"
2030 macosx_sdk_value="1070"
2031 AC_MSG_WARN([Building with SDK 10.7 is known to fail in vcl])
2032 echo "Building with SDK 10.7 is known to fail in vcl" >> warn
2035 AC_MSG_ERROR([$with_macosx_sdk is not a supported SDK value, supported value are 10.4, 10.5, 10.6 and 10.7])
2038 AC_MSG_CHECKING([the presence of the SDK $with_macosx_sdk])
2039 if test -d "$MACOSX_SDK_PATH" ; then
2040 AC_MSG_RESULT([$MACOSX_SDK_PATH ok])
2042 AC_MSG_ERROR([$MACOSX_SDK_PATH not found])
2044 MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
2046 case "$with_macosx_version_min_required" in
2049 MAC_OS_X_VERSION_MIN_REQUIRED="1040"
2052 MAC_OS_X_VERSION_MIN_REQUIRED="1050"
2053 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
2054 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
2055 if test -z "$save_CC" ; then
2061 MAC_OS_X_VERSION_MIN_REQUIRED="1060"
2062 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
2063 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
2064 if test -z "$save_CC" ; then
2070 MAC_OS_X_VERSION_MIN_REQUIRED="1070"
2071 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
2072 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
2073 if test -z "$save_CC" ; then
2079 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])
2083 case "$with_macosx_version_max_allowed" in
2086 MAC_OS_X_VERSION_MAX_ALLOWED="1040"
2089 MAC_OS_X_VERSION_MAX_ALLOWED="1050"
2092 MAC_OS_X_VERSION_MAX_ALLOWED="1060"
2095 MAC_OS_X_VERSION_MAX_ALLOWED="1070"
2098 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])
2102 AC_MSG_CHECKING([that macosx-version-min-required is coherent with macosx-version-max-allowed])
2103 if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED ; then
2104 AC_MSG_ERROR([the version minimumn required must be inferior or equal to the version maximum allowed])
2109 AC_MSG_CHECKING([that macosx-version-max-allowed is coherent macos-with-sdk])
2110 if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $macosx_sdk_value ; then
2111 AC_MSG_ERROR([the version maximum allowed cannot be greater thatn the sdk level])
2115 AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED])
2116 AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED])
2118 AC_SUBST(MACOSX_SDK_PATH)
2119 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
2120 AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
2121 AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED)
2123 dnl ===================================================================
2124 dnl Test the gcc version, 3 is OK
2125 dnl ===================================================================
2126 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) -a "$GCC" = "yes"; then
2127 AC_MSG_CHECKING([the GNU C compiler version])
2128 _gcc_version=`$CC -dumpversion`
2129 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
2130 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2132 if test "$_os" = "Darwin" -a "$with_macosx_sdk" = "10.4" -a "$GCCVER" -ge "040100" ; then
2133 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
2134 export CC="$GCC_HOME/bin/gcc-4.0"
2135 # export CC to have it available in set_soenv -> config.guess
2136 GCCVER2=`$CC -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2137 if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
2141 if test "$GCCVER" -ge "040100" ; then
2142 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])
2144 AC_MSG_RESULT([implicitly using CC=$CC])
2147 AC_MSG_RESULT([checked (gcc $_gcc_version)])
2153 # prefix C with ccache if needed
2155 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" ; then
2156 if test "$CCACHE" != "" ; then
2157 AC_MSG_CHECKING([whether $CC is already ccached])
2162 CFLAGS="$CFLAGS --ccache-skip -O2"
2163 dnl an empty program will do, we're checking the compiler flags
2164 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
2165 [use_ccache=yes], [use_ccache=no])
2166 if test $use_ccache = yes ; then
2167 AC_MSG_RESULT([yes])
2178 HAVE_LD_BSYMBOLIC_FUNCTIONS=
2179 if test "$GCC" = "yes"; then
2180 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
2181 bsymbolic_functions_ldflags_save=$LDFLAGS
2182 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
2183 AC_LINK_IFELSE([AC_LANG_PROGRAM([
2186 printf ("hello world\n");
2187 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
2188 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
2189 AC_MSG_RESULT( found )
2191 AC_MSG_RESULT( not found )
2193 LDFLAGS=$bsymbolic_functions_ldflags_save
2195 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
2197 dnl ===================================================================
2198 dnl Set up a different compiler to produce tools to run on the build
2199 dnl machine when doing cross-compilation
2200 dnl ===================================================================
2202 m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
2203 if test "$cross_compiling" = "yes"; then
2204 AC_MSG_CHECKING([for BUILD platform configuration])
2206 rm -rf CONF-FOR-BUILD Env.Build.sh
2207 mkdir CONF-FOR-BUILD
2218 solenv/inc/langlist.mk \
2219 solenv/inc/postset.mk \
2220 desktop/scripts/soffice.sh.in \
2221 | (cd CONF-FOR-BUILD && tar xf -)
2223 unset COM GUI GUIBASE OS CPU CPUNAME
2224 unset CC CXX SYSBASE CFLAGS
2225 unset PYTHON_CFLAGS PYTHON_LIBS
2226 unset AR NM OBJDUMP PKG_CONFIG RANLIB STRIP
2227 test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
2228 test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
2229 test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
2232 test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
2233 test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
2234 test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
2237 --disable-build-mozilla \
2239 --with-num-cpus="$with_num_cpus" \
2240 --with-max-jobs="$with_max_jobs" \
2242 2>&1 | sed -e 's/^/ /'
2243 test -f ./Env.Host.sh 2>/dev/null || exit
2244 cp Env.Host.sh ../Env.Build.sh
2246 for V in COM GUI GUIBASE OS CPU CPUNAME CC CXX GXX_INCLUDE_PATH MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH \
2249 VV=`eval "echo $VV"`
2250 if test -n "$VV"; then
2251 line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
2252 echo "$line" >>build-config
2256 for V in OUTDIR PATH SOLARINC SOLARLIB WORKDIR; do
2258 VV=`eval "echo $VV"`
2259 VV=`echo $VV | sed -e 's,/CONF-FOR-BUILD,,g'`
2260 if test -n "$VV"; then
2261 line="${V}_FOR_BUILD='$VV'"
2262 echo "$line" >>build-config
2266 test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
2267 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])
2268 perl -pi -e 's,/CONF-FOR-BUILD,,g' Env.Build.sh
2269 eval `cat CONF-FOR-BUILD/build-config`
2270 AC_MSG_RESULT([checking for BUILD platform configuration... done])
2271 rm -rf CONF-FOR-BUILD
2274 CXX_FOR_BUILD="$CXX"
2276 AC_SUBST(COM_FOR_BUILD)
2277 AC_SUBST(GUI_FOR_BUILD)
2278 AC_SUBST(GUIBASE_FOR_BUILD)
2279 AC_SUBST(OS_FOR_BUILD)
2280 AC_SUBST(CPU_FOR_BUILD)
2281 AC_SUBST(CPUNAME_FOR_BUILD)
2282 AC_SUBST(CC_FOR_BUILD)
2283 AC_SUBST(CXX_FOR_BUILD)
2284 AC_SUBST(GXX_INCLUDE_PATH_FOR_BUILD)
2285 AC_SUBST(INPATH_FOR_BUILD)
2286 AC_SUBST(OUTPATH_FOR_BUILD)
2287 AC_SUBST(MACOSX_DEPLOYMENT_TARGET_FOR_BUILD)
2288 AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
2290 AC_SUBST(OUTDIR_FOR_BUILD)
2291 AC_SUBST(PATH_FOR_BUILD)
2292 AC_SUBST(SOLARINC_FOR_BUILD)
2293 AC_SUBST(SOLARLIB_FOR_BUILD)
2294 AC_SUBST(WORKDIR_FOR_BUILD)
2296 UPD="`echo AC_PACKAGE_VERSION | sed "s/\.//"`0"
2297 SOURCEVERSION="OOO$UPD"
2299 AC_SUBST(SOURCEVERSION)
2301 dnl ===================================================================
2302 dnl Set the ENABLE_CRASHDUMP variable.
2303 dnl ===================================================================
2304 AC_MSG_CHECKING([whether to enable crashdump feature])
2305 if test "$enable_crashdump" = "yes"; then
2306 ENABLE_CRASHDUMP="TRUE"
2307 BUILD_TYPE="$BUILD_TYPE CRASHREP"
2308 AC_MSG_RESULT([yes])
2313 AC_SUBST(ENABLE_CRASHDUMP)
2316 dnl ===================================================================
2317 dnl Windows specific tests and stuff
2318 dnl ===================================================================
2319 if test "$_os" = "WINNT"; then
2321 dnl Include twain scanners
2322 BUILD_TYPE="$BUILD_TYPE TWAIN"
2324 dnl Set the CL_X64 variable if we are building a 64-bit LibreOffice.
2325 AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
2326 if test "z$enable_cl_x64" = "z" -o "$enable_cl_x64" = "no"; then
2331 AC_MSG_RESULT([yes])
2335 AC_MSG_CHECKING([whether to use DirectX])
2336 if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
2337 ENABLE_DIRECTX="TRUE"
2338 AC_MSG_RESULT([yes])
2343 AC_SUBST(ENABLE_DIRECTX)
2345 AC_MSG_CHECKING([whether to use ActiveX])
2346 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
2348 AC_MSG_RESULT([yes])
2350 DISABLE_ACTIVEX="TRUE"
2353 AC_SUBST(DISABLE_ACTIVEX)
2355 AC_MSG_CHECKING([whether to use ATL])
2356 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE"; then
2358 AC_MSG_RESULT([yes])
2359 elif test "$enable_atl" = ""; then
2360 if test "$WITH_MINGW" = "yes"; then
2365 AC_MSG_RESULT([yes])
2371 AC_SUBST(DISABLE_ATL)
2374 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
2375 dnl ===================================================================
2376 AC_MSG_CHECKING([whether to turn warnings to errors])
2377 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
2378 ENABLE_WERROR="TRUE"
2379 AC_MSG_RESULT([yes])
2381 ENABLE_WERROR="FALSE"
2384 AC_SUBST(ENABLE_WERROR)
2386 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
2387 dnl ===================================================================
2388 AC_MSG_CHECKING([whether to do a debug build])
2389 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
2391 enable_symbols="yes"
2392 AC_MSG_RESULT([yes])
2394 ENABLE_DEBUG="FALSE"
2397 AC_SUBST(ENABLE_DEBUG)
2399 dnl Set the ENABLE_DBGUTIL variable
2400 dnl ===================================================================
2401 AC_MSG_CHECKING([whether to build with additional debug utilities])
2402 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
2406 # Compiling with MSVC using --enable-dbgutil (i.e. using the
2407 # debugging runtime, and defining _DEBUG when compiling) just
2408 # causes too many compilation errors. After having spent some
2409 # months slowly fixing them one by one, having reached sw, I give
2410 # up. Feel free to try again.
2411 if test "$_os" = WINNT -a "$WITH_MINGW" != yes; then
2412 AC_MSG_ERROR([Sorry, --enable-dbgutil won't work with MSVC])
2415 AC_MSG_RESULT([yes])
2416 # cppunit and graphite expose STL in public headers
2417 if test "$with_system_cppunit" = "yes"; then
2418 AC_MSG_ERROR([--with-system-cppunit conflicts with DBG_UTIL build])
2420 with_system_cppunit=no
2422 if test "$with_system_graphite" = "yes"; then
2423 AC_MSG_ERROR([--with-system-graphite conflicts with DBG_UTIL build])
2425 with_system_graphite=no
2427 if test "$with_system_mysql_cppconn" = "yes"; then
2428 AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with DBG_UTIL build])
2430 with_system_mysql_cppconn=no
2432 if test $_os = WINNT -a \
2433 \( "$enable_mozilla" != no -o \
2434 "$enable_build_mozilla" != no \); then
2435 # We can't build against the Mozilla stuff if using _DEBUG, will get linking errors
2436 # See connectivity/drivers/mozab
2437 AC_MSG_WARN([Also disabling Mozilla stuff then])
2439 enable_build_mozilla=no
2444 AC_MSG_RESULT([no, full product build])
2449 dnl Determine whether to use linkoo for the smoketest installation
2450 dnl ===================================================================
2451 AC_MSG_CHECKING([whether to use linkoo for the smoketest installation])
2452 if test "$enable_linkoo" = "no"; then
2453 DISABLE_LINKOO="TRUE"
2457 AC_MSG_RESULT([yes])
2459 AC_SUBST(DISABLE_LINKOO)
2461 # Set the ENABLE_LTO variable
2462 # ===================================================================
2463 AC_MSG_CHECKING([whether to use link-time optimization])
2464 if test -n "$enable_lto" -a "$enable_lto" != "no"; then
2466 AC_MSG_RESULT([yes])
2471 AC_SUBST(ENABLE_LTO)
2473 dnl whether to include symbols into final build.
2474 dnl ===================================================================
2475 AC_MSG_CHECKING([whether to include symbols])
2476 if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
2477 ENABLE_SYMBOLS="TRUE"
2478 AC_MSG_RESULT([yes])
2483 AC_SUBST(ENABLE_SYMBOLS)
2485 dnl Determine if the solver is to be stripped or not.
2486 dnl ===================================================================
2487 AC_MSG_CHECKING([whether to strip the solver or not.])
2488 if test "z$enable_strip_solver" = "zno"; then
2489 DISABLE_STRIP="TRUE"
2492 if test -n "$ENABLE_SYMBOLS"; then
2493 DISABLE_STRIP="TRUE"
2497 AC_MSG_RESULT([yes])
2500 AC_SUBST(DISABLE_STRIP)
2502 dnl check for cups support
2503 dnl ===================================================================
2504 if test "$test_cups" = "yes"; then
2505 AC_MSG_CHECKING([whether cups support is present])
2506 AC_CHECK_LIB(cups, cupsPrintFiles)
2507 AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
2508 if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then
2509 AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups???-devel.])
2514 # check for fontconfig support
2515 AC_MSG_CHECKING([whether we need fontconfig])
2516 if test "z$test_fontconfig" = "zyes"; then
2517 ENABLE_FONTCONFIG="TRUE"
2518 AC_MSG_RESULT([yes])
2519 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0])
2521 ENABLE_FONTCONFIG=""
2524 AC_SUBST(ENABLE_FONTCONFIG)
2525 AC_SUBST(FONTCONFIG_CFLAGS)
2526 AC_SUBST(FONTCONFIG_LIBS)
2528 dnl whether to find & fetch external tarballs?
2529 dnl ===================================================================
2530 if test -z "$TARFILE_LOCATION"; then
2531 TARFILE_LOCATION="DEFAULT"
2533 AC_SUBST(TARFILE_LOCATION)
2535 if test "z$enable_fetch_external" != "zno" ; then
2536 DO_FETCH_TARBALLS="YES"
2538 AC_SUBST(DO_FETCH_TARBALLS)
2541 dnl Disable legacy binary file formats filters
2542 dnl ===================================================================
2543 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
2544 if test "$enable_binfilter" = "no"; then
2548 WITH_BINFILTER="YES"
2549 BUILD_TYPE="$BUILD_TYPE BINFILTER"
2550 GIT_REPO_NAMES="$GIT_REPO_NAMES binfilter"
2551 AC_MSG_RESULT([yes])
2553 AC_SUBST(WITH_BINFILTER)
2555 AC_MSG_CHECKING([whether to build help])
2556 if test "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
2557 AC_MSG_RESULT([yes])
2558 BUILD_TYPE="$BUILD_TYPE HELP"
2559 SCPDEFS="$SCPDEFS -DWITH_HELP"
2560 GIT_REPO_NAMES="$GIT_REPO_NAMES help"
2565 dnl Enable ugly pieces of code we're better off without
2566 dnl ===================================================================
2567 if test "$enable_ugly" = "yes"; then
2568 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
2569 SCPDEFS="$SCPDEFS -DWITH_UGLY"
2574 AC_SUBST(ENABLE_UGLY)
2576 dnl ===================================================================
2577 dnl Disable rpath in shared libraries?
2578 dnl ===================================================================
2579 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
2580 if test "$enable_rpath" = "no"; then
2585 AC_MSG_RESULT([$ENABLE_RPATH])
2586 AC_SUBST(ENABLE_RPATH)
2588 dnl Test whether to include MySpell dictionaries
2589 dnl ===================================================================
2590 AC_MSG_CHECKING([whether to include MySpell dictionaries])
2591 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
2592 AC_MSG_RESULT([yes])
2593 WITH_MYSPELL_DICTS=YES
2594 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
2595 GIT_REPO_NAMES="$GIT_REPO_NAMES dictionaries"
2598 WITH_MYSPELL_DICTS=NO
2600 AC_SUBST(WITH_MYSPELL_DICTS)
2602 AC_MSG_CHECKING([whether to use dicts from external paths])
2603 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
2604 AC_MSG_RESULT([yes])
2606 AC_MSG_CHECKING([for spelling dictionary directory])
2607 if test -n "$with_external_dict_dir"; then
2608 DICT_SYSTEM_DIR=file://$with_external_dict_dir
2610 DICT_SYSTEM_DIR=file:///usr/share/hunspell
2612 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
2613 AC_MSG_CHECKING([for hyphenation patterns directory])
2614 if test -n "$with_external_hyph_dir"; then
2615 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
2617 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
2619 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
2620 AC_MSG_CHECKING([for thesaurus directory])
2621 if test -n "$with_external_thes_dir"; then
2622 THES_SYSTEM_DIR=file://$with_external_thes_dir
2624 THES_SYSTEM_DIR=file:///usr/share/mythes
2626 AC_MSG_RESULT([$THES_SYSTEM_DIR])
2631 AC_SUBST(SYSTEM_DICTS)
2632 AC_SUBST(DICT_SYSTEM_DIR)
2633 AC_SUBST(HYPH_SYSTEM_DIR)
2634 AC_SUBST(THES_SYSTEM_DIR)
2636 dnl ===================================================================
2637 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
2638 dnl ===================================================================
2639 AC_MSG_CHECKING([whether to enable pch feature])
2640 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
2641 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
2643 AC_MSG_RESULT([yes])
2644 dnl There is no PCH support in GCC versions prior to this
2645 elif test "$GCC" = "yes"; then
2647 AC_MSG_RESULT([yes])
2650 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
2656 AC_SUBST(ENABLE_PCH)
2658 dnl ===================================================================
2659 dnl Search all the common names for GNU make
2660 dnl ===================================================================
2661 AC_MSG_CHECKING([for GNU make])
2663 # try to use our own make if it is available and GNUMAKE was not already defined
2664 if test -z "$GNUMAKE"; then
2665 if test -x "/opt/lo/bin/make"; then
2666 GNUMAKE="/opt/lo/bin/make"
2670 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
2671 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
2672 if test $? -eq 0; then
2677 AC_MSG_RESULT($GNUMAKE)
2678 if test -z "$GNUMAKE"; then
2679 AC_MSG_ERROR([not found. install GNU make.])
2682 AC_MSG_CHECKING([the GNU make version])
2683 _make_version=`$GNUMAKE --version | grep GNU | grep -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2684 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2685 if test "$_make_longver" -ge "038200" ; then
2686 AC_MSG_RESULT([$GNUMAKE $_make_version])
2688 elif test "$_make_longver" -ge "038100" ; then
2689 AC_MSG_RESULT([$GNUMAKE $_make_version])
2690 AC_MSG_CHECKING([for GNU make bug 20033])
2691 TESTGMAKEBUG20033=`mktemp -d`
2692 cat > $TESTGMAKEBUG20033/Makefile << EOF
2693 A := \$(wildcard *.a)
2697 @echo survived bug20033. #dont kill these tabs, you will break the Makefile!!!!
2701 @touch 1.a 2.a 3.a 4.a 5.a 6.a
2714 \$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | sha1sum))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\
2715 \$(call d1,\$(CHECKSUM)),\
2716 \$(call d2,\$(CHECKSUM)))
2718 if test -z "`(cd $TESTGMAKEBUG20033 && $GNUMAKE setup && $GNUMAKE -j)|grep survived`"; then
2719 no_parallelism_make="YES"
2720 AC_MSG_RESULT([yes, disable parallelism])
2722 AC_MSG_RESULT([no, keep parallelism enabled])
2724 rm -rf $TESTGMAKEBUG20033
2726 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
2730 _make_ver_check=`$GNUMAKE --version | grep LibreOffice`;
2733 if test "z$_make_ver_check" = "z"; then
2736 AC_SUBST(STALE_MAKE)
2738 dnl ===================================================================
2739 dnl Test the Solaris compiler version
2740 dnl ===================================================================
2741 if test "$_os" = "SunOS"; then
2742 if test "$CC" = "cc"; then
2743 AC_PATH_PROGS(_cc, cc)
2744 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
2745 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
2746 dnl cc -V outputs to standard error!!!!
2747 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'`
2748 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
2749 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
2750 if test "$_sunstudio_major" != "5"; then
2751 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2753 _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" }'`
2754 if test "$_sunstudio_minor" = "false"; then
2755 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2757 dnl compiler will do
2758 AC_MSG_RESULT([checked])
2764 HAVE_LD_HASH_STYLE=FALSE
2765 WITH_LINKER_HASH_STYLE=
2766 AC_MSG_CHECKING( for --hash-style gcc linker support )
2767 if test "$GCC" = "yes" ; then
2768 if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes" ; then
2769 hash_styles="gnu sysv"
2770 elif test "$with_linker_hash_style" = "no" ; then
2773 hash_styles="$with_linker_hash_style"
2776 for hash_style in $hash_styles ; do
2777 test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
2778 hash_style_ldflags_save=$LDFLAGS
2779 LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
2781 AC_LINK_IFELSE([AC_LANG_PROGRAM(
2787 [ if ./conftest$EXEEXT; then
2788 HAVE_LD_HASH_STYLE=TRUE
2789 WITH_LINKER_HASH_STYLE=$hash_style
2791 [HAVE_LD_HASH_STYLE=FALSE])
2792 LDFLAGS=$hash_style_ldflags_save
2795 if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
2796 AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
2800 LDFLAGS=$hash_style_ldflags_save
2804 AC_SUBST(HAVE_LD_HASH_STYLE)
2805 AC_SUBST(WITH_LINKER_HASH_STYLE)
2807 dnl ===================================================================
2808 dnl Check whether there's a Perl version available.
2809 dnl ===================================================================
2810 if test -z "$with_perl_home"; then
2811 AC_PATH_PROG(PERL, perl)
2813 test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
2814 _perl_path="$with_perl_home/bin/perl"
2815 if test -x "$_perl_path"; then
2818 AC_MSG_ERROR([$_perl_path not found])
2822 dnl ===================================================================
2823 dnl Testing for Perl version 5 or greater.
2824 dnl $] is the Perl version variable, it is returned as an integer
2825 dnl ===================================================================
2826 if test "$PERL"; then
2827 AC_MSG_CHECKING([the Perl version])
2828 ${PERL} -e "exit($]);"
2830 if test "$_perl_version" -lt 5; then
2831 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
2833 AC_MSG_RESULT([checked (perl $_perl_version)])
2835 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
2839 dnl ===================================================================
2840 dnl Testing for required Perl modules
2841 dnl ===================================================================
2843 AC_MSG_CHECKING([for required Perl modules])
2844 if `$PERL -e 'use Archive::Zip; use Cwd;'`; then
2845 AC_MSG_RESULT([all modules found])
2847 AC_MSG_ERROR([Failed to find some modules])
2850 dnl ===================================================================
2851 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
2852 dnl ===================================================================
2853 SHOWINCLUDES_PREFIX=
2854 if test "$_os" = "WINNT"; then
2855 if test "$WITH_MINGW" != "yes"; then
2856 AC_MSG_CHECKING([for a friendly Microsoft C/C++ compiler installation path])
2857 if test -z "$with_cl_home"; then
2858 vctest=`./oowintool --msvc-productdir`;
2859 if test "$CL_X64" = ""; then
2860 if test -x "$vctest/bin/cl.exe"; then
2861 with_cl_home=$vctest;
2864 if test -x "$vctest/bin/amd64/cl.exe"; then
2865 with_cl_home=$vctest;
2869 with_cl_home=`cygpath -u "$with_cl_home"`
2871 with_cl_home=`cygpath -d "$with_cl_home"`
2872 with_cl_home=`cygpath -u "$with_cl_home"`
2873 AC_MSG_RESULT([$with_cl_home])
2875 dnl ===========================================================
2876 dnl Check for mspdb80.dll/mspdb100.dll
2877 dnl ===========================================================
2878 dnl MSVS 2008/10 Compiler
2879 if test -n "$with_mspdb_path";then
2880 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
2882 if test -e "$with_mspdb_path/mspdb80.dll" -o -e "$with_mspdb_path/mspdb100.dll"; then
2883 MSPDB_PATH="$with_mspdb_path"
2886 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
2887 MSPDB_PATH="$with_cl_home/../Common7/IDE"
2889 dnl Windows SDK 6.0 case
2890 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
2891 MSPDB_PATH="$with_cl_home/bin"
2894 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb100.dll"; then
2895 MSPDB_PATH="$with_cl_home/../Common7/IDE"
2898 if test -z "$MSPDB_PATH";then
2899 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
2900 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
2901 AC_PATH_PROG(MSPDB_PATH, mspdb100.dll)
2902 MSPDB_PATH=`dirname "$MSPDB_PATH"`
2905 if test -z "$MSPDB_PATH"; then
2906 AC_MSG_ERROR([You need a mspdb80.dllor mspdb100.dll, make sure it is in the path or use --with-mspdb-path])
2908 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
2909 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
2910 dnl The path needs to be added before cl is called
2911 PATH="$MSPDB_PATH:$PATH"
2913 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
2914 if test -z "$CC"; then
2915 if test "$CL_X64" = ""; then
2916 if test -x "$with_cl_home/bin/cl.exe"; then
2917 CC="$with_cl_home/bin/cl.exe"
2920 if test -x "$with_cl_home/bin/amd64/cl.exe"; then
2921 CC="$with_cl_home/bin/amd64/cl.exe"
2924 if test -z "$CC"; then
2925 AC_PATH_PROG(CC, cl.exe)
2927 # This gives us a posix path with 8.3 filename restrictions
2928 CC=`cygpath -d "$CC"`
2929 CC=`cygpath -u "$CC"`
2932 if test -n "$CC"; then
2933 # Remove /cl.exe from CC case insensitive
2934 AC_MSG_RESULT([found ($CC)])
2935 if test "$CL_X64" = ""; then
2936 COMPATH=`echo $CC | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
2938 if test -n "$with_cl_home"; then
2939 COMPATH=`echo $with_cl_home`
2942 export INCLUDE=`cygpath -d "$COMPATH/Include"`
2943 dnl Check which Microsoft C/C++ compiler is found
2944 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
2945 # The following finds Microsoft, matches nn.nn.nnnn then pulls numbers out.
2946 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
2947 x = match( \\\$0, /..\\...\\...../ )
2948 CCversion = substr( \\\$0, RSTART, RLENGTH)
2949 tokencount = split (CCversion,vertoken,\".\")
2950 for ( i = 1 ; i <= tokencount ; i++ ) {
2951 printf (\"%04d\",vertoken[[i]] )
2954 if test "$CCNUMVER" -ge "001600000000"; then
2957 elif test "$CCNUMVER" -ge "001500000000"; then
2961 AC_MSG_ERROR([Compiler too old. Use Microsoft Visual Studio 2008 or 2010.])
2963 AC_MSG_RESULT([found compiler version $CCNUMVER (MSVS $MSVSVER).])
2965 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
2968 dnl We need to guess the prefix of the -showIncludes output, it can be
2970 AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
2971 echo "#include <stdlib.h>" > conftest.c
2972 SHOWINCLUDES_PREFIX=`$CC -c -showIncludes conftest.c 2>/dev/null | \
2973 grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
2974 rm -f conftest.c conftest.obj
2975 if test -z "$SHOWINCLUDES_PREFIX" ; then
2976 AC_MSG_ERROR([cannot determine the -showIncludes prefix])
2978 AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
2981 # Check for 64-bit (cross-)compiler to use to build the 64-bit
2982 # version of the Explorer extension (and maybe other small
2983 # bits, too) needed when installing a 32-bit LibreOffice on a
2984 # 64-bit OS. The 64-bit Explorer extension is a feature that
2985 # has been present since long in OOo. Don't confuse it with
2986 # building LibreOffice itself as 64-bit code, which is
2987 # unfished work and highly experimental.
2994 AC_MSG_CHECKING([for a x64 compiler and libraries for 64bit ActiveX component])
2995 if test "$CL_X64" = "" -a -f "$with_cl_home/atlmfc/lib/amd64/atls.lib"; then
2996 # Prefer native x64 compiler to cross-compiler, in case we are running
2997 # the build on a 64-bit OS.
2998 if "$with_cl_home/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3000 CC_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
3001 CXX_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
3002 LINK_X64_BINARY="$with_cl_home/bin/amd64/link.exe"
3003 LIBMGR_X64_BINARY="$with_cl_home/bin/amd64/lib.exe"
3004 elif "$with_cl_home/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3006 CC_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
3007 CXX_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
3008 LINK_X64_BINARY="$with_cl_home/bin/x86_amd64/link.exe"
3009 LIBMGR_X64_BINARY="$with_cl_home/bin/x86_amd64/lib.exe"
3012 if test "$BUILD_X64" = TRUE; then
3013 AC_MSG_RESULT([found])
3015 AC_MSG_RESULT([not found])
3016 AC_MSG_WARN([Installation set will not contain the 64-bit Explorer extension])
3020 # These are passed to the environment through set_soenv.in as usual, and then
3021 # used in set_wntx64.mk
3022 AC_SUBST(CC_X64_BINARY)
3023 AC_SUBST(CXX_X64_BINARY)
3024 AC_SUBST(LINK_X64_BINARY)
3025 AC_SUBST(LIBMGR_X64_BINARY)
3028 AC_MSG_CHECKING([the compiler is MinGW])
3029 MACHINE_PREFIX=`$CC -dumpmachine`
3030 if echo $MACHINE_PREFIX | grep -q mingw32; then
3031 AC_MSG_RESULT([yes])
3033 AC_MSG_ERROR([Compiler is not MinGW.])
3038 AC_SUBST(MSPDB_PATH)
3039 AC_SUBST(SHOWINCLUDES_PREFIX)
3041 dnl ===================================================================
3042 dnl Check for pkg-config
3043 dnl ===================================================================
3044 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3048 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3050 # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
3051 # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
3052 # explicitly. Or put /path/to/compiler in PATH yourself.
3054 AC_CHECK_TOOL(AR,ar)
3055 AC_CHECK_TOOL(NM,nm)
3056 AC_CHECK_TOOL(OBJDUMP,objdump)
3057 AC_CHECK_TOOL(RANLIB,ranlib)
3058 AC_CHECK_TOOL(STRIP,strip)
3059 if test "$_os" = "WINNT"; then
3060 AC_CHECK_TOOL(DLLTOOL,dlltool)
3061 AC_CHECK_TOOL(WINDRES,windres)
3068 AC_SUBST(PKG_CONFIG)
3073 dnl ===================================================================
3074 dnl pkg-config checks on Mac OS X
3075 dnl ===================================================================
3077 if test $_os = Darwin; then
3078 AC_MSG_CHECKING([for bogus pkg-config])
3079 if test -n "$PKG_CONFIG"; then
3080 if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | grep -q Mono.framework; then
3081 AC_MSG_RESULT([yes, from Mono])
3083 AC_MSG_RESULT([yes, from unknown origin])
3085 AC_MSG_WARN([This might have unexpected consequences, please consider hiding $PKG_CONFIG])
3086 echo "Having a $PKG_CONFIG might have unexpected consequences, please consider hiding it" >>warn
3092 dnl ===================================================================
3093 dnl .NET needs special treatment
3094 dnl (does the above comment really mean .NET, or is it misusing
3095 dnl that to mean Visual Studio .NET 2003 ? And does this also
3096 dnl in fact apply equally to what we actually support, i.e.
3097 dnl Visual Studio 2008 and 2010?)
3098 dnl ===================================================================
3099 if test "$build_os" = "cygwin"; then
3101 AC_PATH_PROG(MIDL_PATH, midl.exe)
3102 if test -n "$MIDL_PATH";then
3103 MIDL_PATH=`dirname "$MIDL_PATH"`
3105 if test -n "$with_midl_path";then
3106 with_midl_path=`cygpath -u "$with_midl_path"`
3108 if test -x "$with_midl_path/midl.exe"; then
3109 MIDL_PATH="$with_midl_path"
3111 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
3112 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
3114 if test -z "$MIDL_PATH" ; then
3115 vstest=`./oowintool --msvs-productdir`;
3116 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
3117 MIDL_PATH="$vstest/Common7/Tools/Bin"
3120 if test -z "$MIDL_PATH" ; then
3121 winsdktest=`./oowintool --windows-sdk-home`
3122 if test -x "$winsdktest/Bin/midl.exe" ; then
3123 MIDL_PATH="$winsdktest/Bin"
3126 if test ! -x "$MIDL_PATH/midl.exe"; then
3127 AC_MSG_ERROR([midl.exe not found. Make sure it's in PATH or use --with-midl-path])
3129 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3130 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
3131 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
3134 AC_PATH_PROG(CSC_PATH, csc.exe)
3135 if test -n "$CSC_PATH";then
3136 CSC_PATH=`dirname "$CSC_PATH"`
3138 if test -n "$with_csc_path";then
3139 with_csc_path=`cygpath -u "$with_csc_path"`
3141 if test -x "$with_csc_path/csc.exe"; then
3142 CSC_PATH="$with_csc_path"
3144 csctest=`./oowintool --csc-compilerdir`;
3145 if test -x "$csctest/csc.exe"; then
3149 if test ! -x "$CSC_PATH/csc.exe"; then
3150 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
3152 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3153 CSC_PATH=`cygpath -d "$CSC_PATH"`
3154 CSC_PATH=`cygpath -u "$CSC_PATH"`
3156 dnl Check mscoree.lib / .NET Framework dir
3157 AC_MSG_CHECKING(.NET Framework)
3158 if test -n "$with_dotnet_framework_home"; then
3159 with_dotnet_framework_home=`cygpath -u "$with_dotnet_framework_home"`
3161 if test -f "$with_dotnet_framework_home/lib/mscoree.lib"; then
3162 DOTNET_FRAMEWORK_HOME="$with_dotnet_framework_home"
3164 if test -z "$DOTNET_FRAMEWORK_HOME" ; then
3165 frametest=`./oowintool --dotnetsdk-dir`
3166 if test -f "$frametest/lib/mscoree.lib"; then
3167 DOTNET_FRAMEWORK_HOME="$frametest"
3169 frametest=`./oowintool --windows-sdk-home`
3170 if test -f "$frametest/lib/mscoree.lib"; then
3171 DOTNET_FRAMEWORK_HOME="$frametest"
3175 if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib"; then
3176 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-dotnet-framework-home])
3178 AC_MSG_RESULT(found)
3179 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3180 DOTNET_FRAMEWORK_HOME=`cygpath -d "$DOTNET_FRAMEWORK_HOME"`
3181 DOTNET_FRAMEWORK_HOME=`cygpath -u "$DOTNET_FRAMEWORK_HOME"`
3184 AC_SUBST(DOTNET_FRAMEWORK_HOME)
3187 dnl ===================================================================
3188 dnl Check if stdc headers are available excluding MSVC.
3189 dnl ===================================================================
3190 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3194 dnl ===================================================================
3195 dnl Testing for C++ compiler and version...
3196 dnl ===================================================================
3198 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3201 if test -n "$CC" -a -z "$CXX"; then
3206 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
3207 if test "$GXX" = "yes"; then
3208 AC_MSG_CHECKING([the GNU C++ compiler version])
3210 _gpp_version=`$CXX -dumpversion`
3211 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
3213 if test "$_os" = "Darwin" -a "$with_macosx_sdk" = "10.4" -a "$_gpp_majmin" -ge "401" ; then
3214 if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
3215 export CXX="$GCC_HOME/bin/g++-4.0"
3216 _gpp_majmin_2=`$CXX -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
3217 if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
3218 _gpp_majmin=$_gpp_majmin_2
3221 if test "$_gpp_majmin" -ge "401" ; then
3222 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])
3224 AC_MSG_RESULT([implicitly using CXX=$CXX])
3227 AC_MSG_RESULT([checked (g++ $_gpp_version)])
3230 if test "$_gpp_majmin" = "304"; then
3231 AC_MSG_CHECKING([whether $CXX has the enum bug])
3232 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3233 extern "C" void abort (void);
3234 extern "C" void exit (int status);
3236 enum E { E0, E1, E2, E3, E4, E5 };
3238 void test (enum E e)
3240 if (e == E2 || e == E3 || e == E1)
3251 ]])],[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])],[])
3256 # prefx CXX with ccache if needed
3258 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3259 if test "$CCACHE" != "" ; then
3260 AC_MSG_CHECKING([whether $CXX is already ccached])
3262 save_CXXFLAGS=$CXXFLAGS
3263 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
3264 dnl an empty program will do, we're checking the compiler flags
3265 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
3266 [use_ccache=yes], [use_ccache=no])
3267 if test $use_ccache = yes ; then
3268 AC_MSG_RESULT([yes])
3273 CXXFLAGS=$save_CXXFLAGS
3278 dnl ===================================================================
3279 dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
3280 dnl ===================================================================
3282 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3285 dnl Check whether there's a C pre-processor.
3286 dnl ===================================================================
3287 dnl When using SunStudio compiler, there is a bug with the cc
3288 dnl preprocessor, so use CC preprocessor as the cc preprocessor
3289 dnl See Issuezilla #445.
3290 dnl ===================================================================
3291 if test "$_os" = "SunOS"; then
3299 dnl ===================================================================
3300 dnl Find integral type sizes and alignments
3301 dnl ===================================================================
3303 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3305 AC_CHECK_SIZEOF(long)
3306 AC_CHECK_SIZEOF(short)
3307 AC_CHECK_SIZEOF(int)
3308 AC_CHECK_SIZEOF(long long)
3309 AC_CHECK_SIZEOF(double)
3310 AC_CHECK_SIZEOF(void*)
3312 SIZEOF_SHORT=$ac_cv_sizeof_short
3313 SIZEOF_INT=$ac_cv_sizeof_int
3314 SIZEOF_LONG=$ac_cv_sizeof_long
3315 SIZEOF_LONGLONG=$ac_cv_sizeof_long_long
3316 SIZEOF_DOUBLE=$ac_cv_sizeof_double
3317 SIZEOF_POINTER=$ac_cv_sizeof_voidp
3319 dnl Allow build without AC_CHECK_ALIGNOF, grrr
3320 m4_pattern_allow([AC_CHECK_ALIGNOF])
3321 m4_ifdef([AC_CHECK_ALIGNOF],
3324 dnl We know that the ALIGNOF_ variables are used only when cross-compiling
3325 dnl in sal/typesconfig/makefile.mk...
3326 if test "$cross_compiling" = "yes"; then
3327 AC_MSG_ERROR([When cross-compiling you must use a recent Autoconf with [AC_][CHECK_ALIGNOF]])
3329 m4_define([AC_CHECK_ALIGNOF],
3331 AC_MSG_WARN([Cannot determine alignment of $1])
3332 AS_TR_SH([ac_cv_alignof_$3])=unknown
3336 AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
3337 AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
3338 AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
3339 AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
3341 ALIGNOF_SHORT=$ac_cv_alignof_short
3342 ALIGNOF_INT=$ac_cv_alignof_int
3343 ALIGNOF_LONG=$ac_cv_alignof_long
3344 ALIGNOF_DOUBLE=$ac_cv_alignof_double
3347 WORDS_BIGENDIAN=$ac_cv_c_bigendian
3349 dnl Check for large file support
3351 if test -n "$ac_cv_sys_file_offset_bits"; then
3352 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
3354 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
3355 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
3363 if test "$CL_X64" = ""; then
3375 AC_SUBST(WORDS_BIGENDIAN)
3376 AC_SUBST(LFS_CFLAGS)
3378 AC_SUBST(SIZEOF_SHORT)
3379 AC_SUBST(SIZEOF_INT)
3380 AC_SUBST(SIZEOF_LONG)
3381 AC_SUBST(SIZEOF_LONGLONG)
3382 AC_SUBST(SIZEOF_DOUBLE)
3383 AC_SUBST(SIZEOF_POINTER)
3384 AC_SUBST(ALIGNOF_SHORT)
3385 AC_SUBST(ALIGNOF_INT)
3386 AC_SUBST(ALIGNOF_LONG)
3387 AC_SUBST(ALIGNOF_DOUBLE)
3389 dnl ===================================================================
3390 dnl Check if valgrind.h is available
3391 dnl ===================================================================
3392 if test "$cross_compiling" != "yes" -a "$enable_dbgutil" != "no" -a \
3393 -z "$VALGRIND_CFLAGS"; then
3394 dnl Test $prefix (currently only testing for /usr and /usr/local)
3395 dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind
3396 prev_cppflags=$CPPFLAGS
3397 CPPFLAGS="-I/usr/include/valgrind"
3398 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h])
3399 if test -z "$VALGRIND_CFLAGS"; then
3400 CPPFLAGS="-I/usr/local/include/valgrind"
3401 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [])
3403 if test -n "$VALGRIND_CFLAGS"; then
3404 CPPFLAGS=$VALGRIND_CFLAGS
3405 AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""])
3407 CPPFLAGS=$prev_cppflags
3409 AC_SUBST([VALGRIND_CFLAGS])
3411 dnl ===================================================================
3412 dnl Set the gcc/gxx include directories
3413 dnl ===================================================================
3414 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
3415 # often contains an i386 which is expanded as a macro.
3416 if test "$GXX" = "yes"; then
3417 AC_MSG_CHECKING([for g++ include path])
3418 if test -z "$with_gxx_include_path"; then
3419 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
3420 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
3421 with_gxx_include_path="/usr/include"
3423 if echo $with_gxx_include_path | grep -q linux; then
3424 # workaround for Mandriva - issue 100049
3425 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
3428 dnl This is the original code...
3429 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
3430 if test -z "$with_gxx_include_path"; then
3431 with_gxx_include_path="NO_GXX_INCLUDE"
3432 AC_MSG_RESULT([none])
3434 AC_MSG_RESULT([$with_gxx_include_path])
3437 with_gxx_include_path="NO_GXX_INCLUDE"
3439 GXX_INCLUDE_PATH="$with_gxx_include_path"
3440 AC_SUBST(GXX_INCLUDE_PATH)
3442 dnl ===================================================================
3443 dnl Set the MinGW include directories
3444 dnl ===================================================================
3445 if test "$WITH_MINGW" = "yes"; then
3446 AC_MSG_CHECKING([for MinGW include path])
3447 cat >conftest.$ac_ext <<_ACEOF
3449 #include <bits/c++config.h>
3451 _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`
3453 if test -z "$_mingw_lib_include_path"; then
3454 _mingw_lib_include_path="NO_LIB_INCLUDE"
3455 AC_MSG_RESULT([no MinGW include path])
3457 AC_MSG_RESULT([$_mingw_lib_include_path])
3459 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
3460 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
3462 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
3463 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
3467 AC_MSG_CHECKING([for dynamic libgcc])
3468 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3470 using namespace std;
3471 ]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[
3472 MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's@.*DLL Name: @@'`
3473 if test -n "$MINGW_GCCDLL"; then
3474 MINGW_SHARED_GCCLIB=YES
3475 AC_MSG_RESULT([ $MINGW_GCCDLL])
3477 MINGW_SHARED_GCCLIB=NO
3480 ],[ AC_MSG_RESULT([no])
3484 AC_MSG_CHECKING([for dynamic libstdc++])
3485 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3487 using namespace std;
3488 ]], [[ cout << "Hello there." << endl; ]])],[
3489 MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's@.*DLL Name: @@'`
3490 if test -n "$MINGW_GXXDLL"; then
3491 mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
3492 mingw_gxxdll_root=${mingw_gxxdll_root#lib}
3493 MINGW_SHARED_LIBSTDCPP=-l$mingw_gxxdll_root
3494 MINGW_SHARED_GXXLIB=YES
3495 AC_MSG_RESULT([$MINGW_GXXDLL])
3497 MINGW_SHARED_GXXLIB=NO
3500 ],[ AC_MSG_RESULT([no])
3506 AC_SUBST(MINGW_CLIB_DIR)
3507 AC_SUBST(MINGW_SHARED_GCCLIB)
3508 AC_SUBST(MINGW_SHARED_GXXLIB)
3509 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
3510 AC_SUBST(MINGW_GCCDLL)
3511 AC_SUBST(MINGW_GXXDLL)
3514 dnl ===================================================================
3515 dnl Extra checking for the SunOS compiler
3516 dnl ===================================================================
3517 if test "$_os" = "SunOS"; then
3518 dnl SunStudio C++ compiler packaged with SunStudio C compiler
3519 if test "$CC" = "cc"; then
3520 AC_MSG_CHECKING([SunStudio C++ Compiler])
3521 if test "$CXX" != "CC"; then
3522 AC_MSG_WARN([SunStudio C++ was not found])
3523 echo "SunStudio C++ was not found" >> warn
3525 AC_MSG_RESULT([checked])
3530 dnl *************************************************************
3531 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
3532 dnl *************************************************************
3533 if test "$WITH_MINGW" = "yes"; then
3534 AC_MSG_CHECKING([exception type])
3536 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
3538 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
3540 ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
3542 AC_MSG_RESULT($exceptions_type)
3546 EXCEPTIONS="$exceptions_type"
3547 AC_SUBST(EXCEPTIONS)
3549 dnl ===================================================================
3550 dnl Checks for what the default STL should be
3551 dnl ===================================================================
3552 AC_MSG_CHECKING([Whether building STLPort library makes sense])
3554 if test "$_os" = "Linux"; then
3570 elif test "$_os" = "SunOS"; then
3572 elif test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
3574 elif test "$_os" = "FreeBSD"; then
3577 if test "$BUILD_STLPORT" = "yes" ; then
3578 AC_MSG_RESULT([yes])
3583 AC_MSG_CHECKING([Whether STLPort library will be actually built])
3584 if test "$with_stlport" = "auto" -o "$BUILD_STLPORT" = "no"; then
3585 with_stlport=$BUILD_STLPORT
3587 if test "$with_stlport" = "yes" ; then
3588 AC_MSG_RESULT([yes])
3590 SCPDEFS="$SCPDEFS -DWITH_STLPORT"
3591 BUILD_TYPE="$BUILD_TYPE STLPORT"
3597 AC_SUBST(WITH_STLPORT)
3599 dnl ===================================================================
3600 dnl thread-safe statics
3601 dnl ===================================================================
3602 AC_MSG_CHECKING([whether $CXX supports thread safe statics])
3603 unset HAVE_THREADSAFE_STATICS
3604 if test "$GCC" = "yes"; then
3605 save_CXXFLAGS=$CXXFLAGS
3606 CXXFLAGS="$CXXFLAGS -fthreadsafe-statics"
3608 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)],[HAVE_THREADSAFE_STATICS=TRUE],[])
3610 CXXFLAGS=$save_CXXFLAGS
3611 if test "$HAVE_THREADSAFE_STATICS" = "TRUE"; then
3612 dnl Some C++ runtimes use a single lock for all static variables, which
3613 dnl can cause deadlock in multi-threaded applications. This is not
3614 dnl easily tested here; for POSIX-based systems, if executing the
3615 dnl following C++ program does not terminate then the tool chain
3616 dnl apparently has this problem:
3618 dnl #include <pthread.h>
3619 dnl int h() { return 0; }
3620 dnl void * g(void * unused) {
3621 dnl static int n = h();
3626 dnl pthread_create(&t, 0, g, 0);
3627 dnl pthread_join(t, 0);
3631 dnl static int n = f();
3635 dnl Mac OS X up to at least 10.7.1 is known to have this problem:
3636 if test "$_os" = "Darwin"; then
3637 unset HAVE_THREADSAFE_STATICS
3638 AC_MSG_RESULT([broken (i.e., no)])
3640 AC_MSG_RESULT([yes])
3646 AC_MSG_RESULT([unknown (assuming no)])
3648 AC_SUBST(HAVE_THREADSAFE_STATICS)
3650 dnl ===================================================================
3651 dnl visibility and c++0x features
3652 dnl ===================================================================
3653 if test "$GCC" = "yes"; then
3654 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
3656 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3657 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_VISIBILITY_FEATURE=TRUE ],[])
3659 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
3660 AC_MSG_RESULT([yes])
3665 AC_MSG_CHECKING([whether $CC supports -Wno-long-double])
3667 CFLAGS="$CFLAGS -Werror -Wno-long-double"
3668 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_NO_LONG_DOUBLE=TRUE ],[])
3670 if test "$HAVE_GCC_NO_LONG_DOUBLE" = "TRUE"; then
3671 AC_MSG_RESULT([yes])
3676 AC_MSG_CHECKING([whether $CC supports -mno-avx])
3678 CFLAGS="$CFLAGS -Werror -mno-avx"
3679 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
3681 if test "$HAVE_GCC_AVX" = "TRUE"; then
3682 AC_MSG_RESULT([yes])
3687 AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 757])
3688 save_CXXFLAGS=$CXXFLAGS
3689 CXXFLAGS="$CXXFLAGS -std=c++0x"
3692 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3695 template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
3711 a thinga[]={{0,0}, {1,1}};
3712 b thingb[]={{0,0}, {1,1}};
3713 size_t i = sizeof(sal_n_array_size(thinga));
3714 size_t j = sizeof(sal_n_array_size(thingb));
3715 return !(i != 0 && j != 0);
3716 ]])],[HAVE_CXX0X=TRUE],[])
3719 CXXFLAGS=$save_CXXFLAGS
3720 if test "$HAVE_CXX0X" = "TRUE"; then
3721 AC_MSG_RESULT([yes])
3727 AC_SUBST(HAVE_CXX0X)
3728 AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
3729 AC_SUBST(HAVE_GCC_AVX)
3731 dnl ===================================================================
3732 dnl system stl sanity tests
3733 dnl ===================================================================
3734 HAVE_GCC_VISIBILITY_BROKEN=
3735 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) ; then
3739 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
3740 AC_MSG_CHECKING([if STL headers are visibility safe])
3741 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
3742 AC_MSG_RESULT([$stlvisok])
3743 if test "$stlvisok" = "no"; then
3744 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
3745 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
3746 unset HAVE_GCC_VISIBILITY_FEATURE
3750 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
3751 sharedlink_ldflags_save=$LDFLAGS
3752 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
3754 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
3755 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3757 using namespace std;
3759 istringstream strm( "test" ); return 0;
3760 ]])],[$EGREP -q unresolvable conftest.err;
3761 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi],[gccvisok=no
3763 AC_MSG_RESULT([$gccvisok])
3764 if test "$gccvisok" = "no"; then
3765 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
3766 echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn
3767 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
3770 LDFLAGS=$sharedlink_ldflags_save
3773 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
3774 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
3775 cat >visibility.cxx <<_ACEOF
3776 #pragma GCC visibility push(hidden)
3777 struct __attribute__ ((visibility ("default"))) TestStruct {
3780 __attribute__ ((visibility ("default"))) void TestFunc() {
3784 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
3789 if test "$_os" = "Darwin"; then
3792 if $EGREP -q '@PLT' visibility.s; then
3804 rm -f visibility.s visibility.cxx
3806 AC_MSG_RESULT([$gccvisbroken])
3807 if test "$gccvisbroken" = "yes"; then
3808 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
3809 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
3810 unset HAVE_GCC_VISIBILITY_FEATURE
3817 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
3818 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
3820 dnl ===================================================================
3822 dnl ===================================================================
3823 AC_MSG_CHECKING([which memory allocator to use])
3824 if test "$with_alloc" = "system"; then
3825 AC_MSG_RESULT([system])
3827 AC_CHECK_FUNCS([malloc realloc calloc free])
3829 if test "$with_alloc" = "tcmalloc"; then
3830 AC_MSG_RESULT(tcmalloc)
3831 if ! echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
3832 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
3834 AC_CHECK_LIB(tcmalloc, malloc, [],
3835 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
3838 if test "$with_alloc" = "jemalloc"; then
3839 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
3840 AC_MSG_RESULT(jemalloc)
3842 CFLAGS="$CFLAGS -pthread"
3843 AC_CHECK_LIB(jemalloc, malloc, [],
3844 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
3848 AC_MSG_RESULT([system])
3850 AC_CHECK_FUNCS([malloc realloc calloc free])
3853 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
3854 AC_MSG_RESULT([internal])
3858 dnl ===================================================================
3859 dnl Custom build version
3860 dnl ===================================================================
3862 AC_MSG_CHECKING([whether to add custom build version])
3863 if test "z$with_build_version" != "z"; then
3864 BUILD_VER_STRING=$with_build_version
3865 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
3870 AC_SUBST(BUILD_VER_STRING)
3872 dnl ===================================================================
3873 dnl Java support enable
3874 dnl ===================================================================
3875 AC_MSG_CHECKING([whether to build with Java support])
3876 if test "$with_java" != "no"; then
3877 AC_MSG_RESULT([yes])
3884 AC_SUBST(SOLAR_JAVA)
3886 dnl SOLAR_JAVA="YES" (yes, silly name, should rename) indicates whether we
3887 dnl want there to be *run-time* (and build-time) support for Java extensions in the
3888 dnl built LibreOffice.
3889 dnl SOLAR_JAVA="BUILD" indicate build-time only support (no runtime support)
3890 dnl SOLAR_JAVA="" indicate no java support at all
3892 if test "$_os" = "Linux" && test "$host_cpu" = "powerpc"; then
3893 # IBMs JDK needs this...
3894 JITC_PROCESSOR_TYPE=6
3895 export JITC_PROCESSOR_TYPE
3897 AC_SUBST([JITC_PROCESSOR_TYPE])
3899 if test $_os = "WINNT"; then
3900 WITH_VC_REDIST="TRUE"
3902 AC_SUBST(WITH_VC_REDIST)
3904 dnl ===================================================================
3906 dnl ===================================================================
3907 if test "$SOLAR_JAVA" != ""; then
3909 # Windows-specific tests
3910 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
3911 if test "$CL_X64" != ""; then
3913 otherbitness="32-bit"
3916 otherbitness="64-bit"
3919 if test -z "$with_jdk_home"; then
3921 # Unfortunately apparently no way to find, if needed, the 64-bit
3922 # JDK in the Registry from the 32-bit Perl oowintool
3924 _jdk_home=`./oowintool --jdk-home`
3925 if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
3926 with_jdk_home="$_jdk_home"
3927 howfound="found by oowintool"
3929 AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK])
3932 test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
3933 howfound="you passed"
3937 JAVA_HOME=; export JAVA_HOME
3938 if test -z "$with_jdk_home"; then
3939 AC_PATH_PROG(JAVAINTERPRETER, $with_java)
3941 _java_path="$with_jdk_home/bin/$with_java"
3942 dnl Check if there is a Java interpreter at all.
3943 if test -x "$_java_path"; then
3944 JAVAINTERPRETER=$_java_path
3946 AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
3950 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
3951 # Check that the JDK found is correct architecture
3952 # Why is this necessary, we don't link with any library from the JDK I think,
3954 shortjdkhome=`cygpath -d "$with_jdk_home"`
3955 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
3956 AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
3957 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
3958 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
3959 AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
3960 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
3963 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
3964 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
3966 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
3967 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
3968 elif test "$_os" = "Darwin"; then
3969 dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X,
3970 dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
3971 dnl to run in 32 bit mode and be able to load LibreOffice jnilibs:
3972 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
3973 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
3974 AC_MSG_RESULT([yes])
3982 dnl ===================================================================
3984 dnl ===================================================================
3985 if test "$SOLAR_JAVA" != ""; then
3987 AC_MSG_CHECKING([the installed JDK])
3988 if test -n "$JAVAINTERPRETER"; then
3989 dnl java -version sends output to stderr!
3990 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
3991 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
3992 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
3994 AC_MSG_RESULT([checked (gcj)])
3995 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
3996 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
3998 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "BEA"` -gt 0; then
3999 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
4000 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "IBM"` -gt 0; then
4003 dnl IBM JDK specific tests
4004 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
4005 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
4007 if test "$_jdk_ver" -lt 10500; then
4008 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
4011 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
4013 if test "$with_jdk_home" = ""; then
4014 AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
4015 you must use the "--with-jdk-home" configure option explicitly])
4018 JAVA_HOME=$with_jdk_home
4023 dnl Sun JDK specific tests
4024 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
4025 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
4027 if test "$_jdk_ver" -lt 10500; then
4028 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
4030 AC_MSG_RESULT([checked (JDK $_jdk)])
4031 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
4032 if test "$_os" = "WINNT"; then
4033 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
4037 AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
4041 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
4044 _java_target_ver="1.5"
4045 dnl ===================================================================
4046 dnl Check for target Java bytecode version
4047 dnl ===================================================================
4048 if test "$SOLAR_JAVA" != ""; then
4049 AC_MSG_CHECKING([for target Java bytecode version])
4050 if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
4051 AC_MSG_RESULT([default by $JDK])
4052 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
4053 AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
4056 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
4057 _java_target_ver="$with_java_target_version"
4058 AC_MSG_RESULT([$_java_target_ver])
4059 elif test $_jdk_ver -gt 10000 ; then
4060 _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
4061 AC_MSG_RESULT([$_java_target_ver])
4063 AC_MSG_ERROR([Unable to guess Java bytecode version from Java version!])
4067 if ! test -z "$_java_target_ver" -o \
4068 "$_java_target_ver" = "1.1" -o \
4069 "$_java_target_ver" = "1.2" -o \
4070 "$_java_target_ver" = "1.3" -o \
4071 "$_java_target_ver" = "1.4" -o \
4072 "$_java_target_ver" = "1.5" -o \
4073 "$_java_target_ver" = "1.6" -o \
4074 "$_java_target_ver" = "5" ; then
4075 AC_MSG_ERROR([$_java_target_ver is not a supported Java bytecode version!])
4078 JAVA_SOURCE_VER="$_java_target_ver"
4079 JAVA_TARGET_VER="$_java_target_ver"
4082 dnl ===================================================================
4083 dnl Checks for javac
4084 dnl ===================================================================
4085 if test "$SOLAR_JAVA" != ""; then
4086 if test "$JDK" = "gcj"; then
4087 javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
4089 javacompiler="javac"
4091 if test -z "$with_jdk_home"; then
4092 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
4094 _javac_path="$with_jdk_home/bin/$javacompiler"
4095 dnl Check if there is a Java compiler at all.
4096 if test -x "$_javac_path"; then
4097 JAVACOMPILER=$_javac_path
4100 if test -z "$JAVACOMPILER"; then
4101 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
4103 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
4104 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
4105 JAVACOMPILER="${JAVACOMPILER}.exe"
4107 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
4108 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
4111 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
4112 AC_MSG_CHECKING([re-checking JDK])
4114 AC_MSG_RESULT([checked (ecj)])
4115 #TODO: what's to do here? some switch to do 1.5 compiling?
4116 JAVAFLAGS="-source 1.5 -target 1.5"
4117 _gij_longver="40200"
4122 dnl ===================================================================
4123 dnl Checks that javac is gcj
4124 dnl ===================================================================
4125 if test "$SOLAR_JAVA" != ""; then
4126 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
4130 AC_SUBST(JAVACISGCJ)
4133 dnl ===================================================================
4134 dnl Checks that javac is kaffe
4135 dnl ===================================================================
4136 if test "$SOLAR_JAVA" != ""; then
4137 if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
4141 AC_SUBST(JAVACISKAFFE)
4143 dnl ===================================================================
4144 dnl Checks for javadoc
4145 dnl ===================================================================
4146 if test "$SOLAR_JAVA" != ""; then
4147 if test -z "$with_jdk_home"; then
4148 AC_PATH_PROG(JAVADOC, javadoc)
4150 _javadoc_path="$with_jdk_home/bin/javadoc"
4151 dnl Check if there is a javadoc at all.
4152 if test -x "$_javadoc_path"; then
4153 JAVADOC=$_javadoc_path
4155 AC_PATH_PROG(JAVADOC, javadoc)
4158 if test -z "$JAVADOC"; then
4159 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
4161 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
4162 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
4163 JAVADOC="${JAVADOC}.exe"
4165 JAVADOC=`cygpath -d "$JAVADOC"`
4166 JAVADOC=`cygpath -u "$JAVADOC"`
4170 if test "$SOLAR_JAVA" != ""; then
4171 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
4172 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
4173 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
4174 # try to recover first by looking whether we have a alternatives
4175 # system as in Debian or newer SuSEs where following /usr/bin/javac
4176 # over /etc/alternatives/javac leads to the right bindir where we
4177 # just need to strip a bit away to get a valid JAVA_HOME
4178 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
4179 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
4180 # maybe only one level of symlink (e.g. on Mac)
4181 JAVA_HOME=$(readlink $JAVACOMPILER)
4182 if test "$(dirname $JAVA_HOME)" = "."; then
4183 # we've got no path to trim back
4188 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
4189 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
4190 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
4191 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
4193 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
4194 if test "$JAVA_HOME" != "/usr"; then
4195 if test "$_os" = "Darwin"; then
4196 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
4197 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
4198 dnl Tiger already returns a JDK path..
4199 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
4201 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
4205 # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
4207 dnl now if JAVA_HOME has been set to empty, then call findhome to find it
4208 if test -z "$JAVA_HOME"; then
4209 if test "x$with_jdk_home" = "x"; then
4210 cat > findhome.java <<_ACEOF
4211 [import java.io.File;
4215 public static void main(String args[])
4217 String jrelocation = System.getProperty("java.home");
4218 File jre = new File(jrelocation);
4219 System.out.println(jre.getParent());
4223 AC_MSG_CHECKING([if javac works])
4224 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
4225 AC_TRY_EVAL(javac_cmd)
4226 if test $? = 0 && test -f ./findhome.class ; then
4227 AC_MSG_RESULT([javac works])
4229 echo "configure: javac test failed" >&5
4230 cat findhome.java >&5
4231 AC_MSG_ERROR([javac does not work - java projects will not build!])
4233 AC_MSG_CHECKING([if gij knows its java.home])
4234 JAVA_HOME=`$JAVAINTERPRETER findhome`
4235 if test $? = 0 && test "$JAVA_HOME" != "" ; then
4236 AC_MSG_RESULT([$JAVA_HOME])
4238 echo "configure: java test failed" >&5
4239 cat findhome.java >&5
4240 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
4242 # clean-up after ourselves
4243 rm -f ./findhome.java ./findhome.class
4245 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
4249 dnl second sanity check JAVA_HOME if possible
4250 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
4251 # now check if $JAVA_HOME is really valid
4252 if test "$_os" = "Darwin"; then
4253 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
4256 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
4259 if test "$JAVA_HOME_OK" = "NO"; then
4260 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
4261 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
4262 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
4263 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
4264 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
4265 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
4272 if test "$SOLAR_JAVA" != ""; then
4273 AC_MSG_CHECKING([for jawt lib name])
4274 if test "$JDK" = "gcj"; then
4276 save_LDFLAGS=$LDFLAGS
4277 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
4278 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
4279 exec 6>/dev/null # no output
4280 AC_CHECK_HEADER(jni.h, [],
4281 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
4282 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
4283 exec 6>&1 # output on again
4285 LDFLAGS=$save_LDFLAGS
4287 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
4288 # A workaround is to link also against libpmawt.so
4289 if test "$JDK" = "ibm" ; then
4291 save_LDFLAGS=$LDFLAGS
4292 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
4293 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
4294 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
4295 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
4296 export LD_LIBRARY_PATH
4297 exec 6>/dev/null # no output
4298 AC_CHECK_HEADER(jni.h, [],
4299 [AC_MSG_ERROR([jni.h could not be found.])], [])
4300 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
4301 if test -z "$AWTLIB"; then
4302 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
4303 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
4305 exec 6>&1 # output on again
4307 LDFLAGS=$save_LDFLAGS
4308 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
4310 if test -z "$AWTLIB"; then
4313 AC_MSG_RESULT([$AWTLIB])
4320 AC_SUBST(JAVA_SOURCE_VER)
4321 AC_SUBST(JAVA_TARGET_VER)
4322 AC_SUBST(JAVAINTERPRETER)
4323 AC_SUBST(JAVAIFLAGS)
4324 AC_SUBST(JAVACOMPILER)
4327 dnl ===================================================================
4328 dnl Checks for specific files.
4329 dnl ===================================================================
4331 dnl ===================================================================
4332 dnl Checks for programs.
4333 dnl ===================================================================
4335 dnl ===================================================================
4336 dnl Check whether we already have dmake
4337 dnl ===================================================================
4338 AC_PATH_PROG(DMAKE, dmake, no)
4339 if test "$DMAKE" = "no"; then
4341 echo "dmake will be built on ./bootstrap"
4343 AC_MSG_CHECKING([whether the found dmake is the right dmake])
4344 # we need to find out whether that dmake we found is "our" dmake
4345 # or the dmake from Sun's SunStudio Compiler which is something
4347 # This test _should_ work because the one accepts -V (ours) and one
4348 # (the other) not...
4349 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
4350 if test $? -eq 0; then
4352 AC_MSG_RESULT([yes])
4353 AC_MSG_CHECKING([the dmake version])
4354 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
4355 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
4356 AC_MSG_RESULT([OK, >= 4.11])
4357 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
4358 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
4359 AC_MSG_RESULT([OK, >= 4.11])
4361 AC_MSG_RESULT([too old. >= 4.11 is needed])
4362 echo "A newer dmake will be built on ./bootstrap"
4367 echo "dmake will be built on ./bootstrap"
4371 AC_SUBST(BUILD_DMAKE)
4373 AC_MSG_CHECKING([whether to enable EPM for packing])
4375 if test "$enable_epm" = "yes"; then
4376 AC_MSG_RESULT([yes])
4377 dnl ===================================================================
4378 dnl Check for epm - not needed for Windows
4379 dnl ===================================================================
4380 if test "$_os" != "WINNT"; then
4381 if test -n "$with_epm"; then
4384 AC_PATH_PROG(EPM, epm, no)
4386 if test "$EPM" = "no" || test "$EPM" = "internal"; then
4387 echo "EPM will be built."
4389 BUILD_TYPE="$BUILD_TYPE EPM"
4391 # Gentoo has some epm which is something different...
4392 AC_MSG_CHECKING([whether the found epm is the right epm])
4393 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
4394 AC_MSG_RESULT([yes])
4396 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
4398 AC_MSG_CHECKING([epm version])
4399 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
4400 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
4401 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
4402 AC_MSG_RESULT([OK, >= 3.7])
4404 if test "$_os" = "Darwin"; then
4405 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
4406 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
4407 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
4408 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)])
4409 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
4410 AC_MSG_RESULT([$_pm, ok])
4411 else # we never should get here, but go safe
4412 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)])
4416 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
4417 echo "EPM will be built."
4419 BUILD_TYPE="$BUILD_TYPE EPM"
4424 # test which package format to use
4425 AC_MSG_CHECKING([which package format to use])
4436 # if building on Debian, default should be deb...
4437 if test -e /etc/debian_version; then
4455 # we never should get here since we check the arciecture/os at the beginning,
4458 AC_MSG_ERROR([unknown system])
4460 if test -n "$with_package_format"; then
4461 for i in $with_package_format; do
4463 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
4466 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
4467 aix - AIX software distribution
4468 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
4469 deb - Debian software distribution
4470 inst or tardist - IRIX software distribution
4471 osx - MacOS X software distribution
4472 pkg - Solaris software distribution
4473 rpm - RedHat software distribution
4474 setld - Tru64 (setld) software distribution
4475 native - "Native" software distribution for the platform
4476 portable - Portable software distribution
4477 LibreOffice additionally supports:
4478 archive - .tar.gz or .zip
4480 installed - installation tree
4486 PKGFORMAT="$with_package_format"
4488 AC_MSG_RESULT([$PKGFORMAT])
4489 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
4490 AC_MSG_CHECKING([for rpm])
4491 for a in "$RPM" rpmbuild rpm; do
4492 $a --usage >/dev/null 2> /dev/null
4493 if test $? -eq 0; then
4497 $a --version >/dev/null 2> /dev/null
4498 if test $? -eq 0; then
4504 if test -z "$RPM" ; then
4505 AC_MSG_ERROR([not found])
4506 elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
4507 RPM_PATH=`which $RPM`
4508 AC_MSG_RESULT([$RPM_PATH])
4510 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
4513 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
4514 AC_PATH_PROG(DPKG, dpkg, no)
4515 if test "$DPKG" = "no"; then
4516 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
4519 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
4520 if test "$_os" = "Darwin"; then
4521 AC_MSG_CHECKING([for PackageMaker availability])
4522 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
4523 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
4528 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
4531 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
4532 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
4533 if test "$EPM" != "no" && test "$EPM" != "internal"; then
4534 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
4535 AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
4536 if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then
4537 AC_MSG_RESULT([yes])
4540 if echo "$PKGFORMAT" | grep -q rpm; then
4542 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
4543 echo "the rpms will need to be installed with --nodeps" >> warn
4547 AC_MSG_WARN([the ${_pt}s will not be relocateable])
4548 echo "the ${_pt}s will not be relocateable" >> warn
4549 AC_MSG_WARN([if you want to make sure installation without --nodeps and
4550 relocation will work, you need to patch your epm with the
4551 patch in epm/epm-3.7.patch or build with
4552 --with-epm=internal which will build a suitable epm])
4557 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
4558 AC_PATH_PROG(PKGMK, pkgmk, no)
4559 if test "$PKGMK" = "no"; then
4560 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
4575 dnl ===================================================================
4577 dnl ===================================================================
4578 AC_PATH_PROG(GPERF, gperf)
4579 if test -z "$GPERF"; then
4580 AC_MSG_ERROR([gperf not found but needed. Install it.])
4582 AC_MSG_CHECKING([gperf version])
4583 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
4586 AC_MSG_ERROR([too old, you need at least 3.0.0])
4590 dnl ===================================================================
4591 dnl Check for building ODK
4592 dnl ===================================================================
4593 AC_MSG_CHECKING([whether to build the ODK])
4594 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
4595 AC_MSG_RESULT([yes])
4597 if test "$with_java" != "no"; then
4598 AC_MSG_CHECKING([whether to build unowinreg.dll])
4599 if test "$_os" = "WINNT" -a "z$enable_build_unowinreg" = "z" ; then
4600 # build on Win by default
4601 enable_build_unowinreg=yes
4603 if test "z$enable_build_unowinreg" = "z" -o "$enable_build_unowinreg" = "no"; then
4607 AC_MSG_RESULT([yes])
4610 if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "YES"; then
4611 if test -z "$with_mingw_cross_compiler"; then
4613 AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
4614 elif test -x "$with_mingw_cross_compiler"; then
4615 MINGWCXX="$with_mingw_cross_compiler"
4617 AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
4620 if test "$MINGWCXX" = "false"; then
4621 AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
4624 mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
4625 if test -x "$mingwstrip_test"; then
4626 MINGWSTRIP="$mingwstrip_test"
4628 AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
4631 if test "$MINGWSTRIP" = "false"; then
4632 AC_MSG_ERROR(MinGW32 binutils not found.)
4636 BUILD_TYPE="$BUILD_TYPE ODK"
4641 AC_SUBST(BUILD_UNOWINREG)
4643 AC_SUBST(MINGWSTRIP)
4645 dnl ===================================================================
4646 dnl Check for system stdlibs
4647 dnl ===================================================================
4648 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
4649 if test "$with_system_stdlibs" = "yes"; then
4653 AC_MSG_RESULT([yes])
4656 AC_SUBST(SYSTEM_STDLIBS)
4658 dnl ===================================================================
4659 dnl Check for system zlib
4660 dnl ===================================================================
4661 AC_MSG_CHECKING([which zlib to use])
4662 if test "$with_system_zlib" = "yes"; then
4663 AC_MSG_RESULT([external])
4665 AC_CHECK_HEADER(zlib.h, [],
4666 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
4667 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
4668 [AC_MSG_ERROR(zlib not found or functional)], [])
4670 AC_MSG_RESULT([internal])
4672 BUILD_TYPE="$BUILD_TYPE ZLIB"
4674 AC_SUBST(SYSTEM_ZLIB)
4676 dnl ===================================================================
4677 dnl Check for system jpeg
4678 dnl ===================================================================
4679 AC_MSG_CHECKING([which jpeg to use])
4680 if test "$with_system_jpeg" = "yes"; then
4681 AC_MSG_RESULT([external])
4683 AC_CHECK_HEADER(jpeglib.h, [],
4684 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
4685 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
4686 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
4688 AC_MSG_RESULT([internal])
4690 BUILD_TYPE="$BUILD_TYPE JPEG"
4692 AC_SUBST(SYSTEM_JPEG)
4694 dnl ===================================================================
4695 dnl Check for system expat
4696 dnl ===================================================================
4697 AC_MSG_CHECKING([which expat to use])
4698 if test "$with_system_expat" = "yes"; then
4699 AC_MSG_RESULT([external])
4701 AC_CHECK_HEADER(expat.h, [],
4702 [AC_MSG_ERROR(expat.h not found. install expat)], [])
4703 AC_CHECK_LIB(expat, XML_ParserCreate, [],
4704 [AC_MSG_RESULT(expat library not found or functional.)], [])
4705 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libexpat-1.dll"
4707 AC_MSG_RESULT([internal])
4709 BUILD_TYPE="$BUILD_TYPE EXPAT"
4711 AC_SUBST(SYSTEM_EXPAT)
4713 dnl ===================================================================
4714 dnl Check for system libvisio
4715 dnl ===================================================================
4716 AC_MSG_CHECKING([which libvisio to use])
4717 if test "$with_system_libvisio" = "yes"; then
4718 AC_MSG_RESULT([external])
4720 PKG_CHECK_MODULES( VISIO, libvisio-0.0 )
4722 AC_MSG_RESULT([internal])
4724 BUILD_TYPE="$BUILD_TYPE LIBVISIO"
4726 AC_SUBST(SYSTEM_LIBVISIO)
4727 AC_SUBST(VISIO_CFLAGS)
4728 AC_SUBST(VISIO_LIBS)
4730 dnl ===================================================================
4731 dnl Check for system libcmis
4732 dnl ===================================================================
4733 AC_MSG_CHECKING([which libcmis to use])
4734 if test "$with_system_libcmis" = "yes"; then
4735 AC_MSG_RESULT([external])
4737 PKG_CHECK_MODULES( LIBCMIS, libcmis-0.2 )
4739 AC_MSG_RESULT([internal])
4741 BUILD_TYPE="$BUILD_TYPE LIBCMIS"
4743 AC_SUBST(SYSTEM_LIBCMIS)
4744 AC_SUBST(LIBCMIS_CFLAGS)
4745 AC_SUBST(LIBCMIS_LIBS)
4748 dnl ===================================================================
4749 dnl Check for system libwpd
4750 dnl ===================================================================
4751 AC_MSG_CHECKING([which libwpd to use])
4752 if test "$with_system_libwpd" = "yes"; then
4753 AC_MSG_RESULT([external])
4755 PKG_CHECK_MODULES( WPD, libwpd-0.9 libwpd-stream-0.9 )
4757 AC_MSG_RESULT([internal])
4759 BUILD_TYPE="$BUILD_TYPE LIBWPD"
4761 AC_SUBST(SYSTEM_LIBWPD)
4762 AC_SUBST(WPD_CFLAGS)
4765 dnl ===================================================================
4766 dnl Check for system cppunit
4767 dnl ===================================================================
4768 AC_MSG_CHECKING([which cppunit to use])
4769 if test "$with_system_cppunit" = "yes"; then
4770 AC_MSG_RESULT([external])
4772 # might work for earlier, too but go sure:
4773 PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.0 )
4775 AC_MSG_RESULT([internal])
4777 BUILD_TYPE="$BUILD_TYPE CPPUNIT"
4779 AC_SUBST(SYSTEM_CPPUNIT)
4780 AC_SUBST(CPPUNIT_CFLAGS)
4781 AC_SUBST(CPPUNIT_LIBS)
4783 dnl ===================================================================
4784 dnl Check whether freetype is available
4785 dnl ===================================================================
4786 if test "$test_freetype" = "yes"; then
4787 AC_MSG_CHECKING([whether freetype is available])
4788 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
4790 AC_SUBST(FREETYPE_CFLAGS)
4791 AC_SUBST(FREETYPE_LIBS)
4793 dnl ===================================================================
4794 dnl Check for system libwps
4795 dnl ===================================================================
4796 AC_MSG_CHECKING([which libwps to use])
4797 if test "$with_system_libwps" = "yes"; then
4798 AC_MSG_RESULT([external])
4800 PKG_CHECK_MODULES( WPS, libwps-0.2 )
4802 AC_MSG_RESULT([internal])
4804 BUILD_TYPE="$BUILD_TYPE LIBWPS"
4806 AC_SUBST(SYSTEM_LIBWPS)
4807 AC_SUBST(WPS_CFLAGS)
4810 dnl ===================================================================
4811 dnl Check for system libwpg
4812 dnl ===================================================================
4813 AC_MSG_CHECKING([which libwpg to use])
4814 if test "$with_system_libwpg" = "yes"; then
4815 AC_MSG_RESULT([external])
4817 PKG_CHECK_MODULES( WPG, libwpg-0.2 )
4819 AC_MSG_RESULT([internal])
4821 BUILD_TYPE="$BUILD_TYPE LIBWPG"
4823 AC_SUBST(SYSTEM_LIBWPG)
4824 AC_SUBST(WPG_CFLAGS)
4827 dnl ===================================================================
4828 dnl Check whether freetype2 supports emboldening
4829 dnl ===================================================================
4830 if test "$test_freetype" = "yes"; then
4831 save_CPPFLAGS="$CPPFLAGS"
4832 save_LDFLAGS="$LDFLAGS"
4834 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
4835 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
4836 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
4837 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
4838 LDFLAGS="$save_LDFLAGS"
4839 CPPFLAGS="$save_CPPFLAGS"
4842 AC_SUBST(USE_FT_EMBOLDEN)
4844 # ===================================================================
4845 # Check for system libxslt
4846 # to prevent incompatibilities between internal libxml2 and external libxslt,
4847 # or vice versa, use with_system_libxml here
4848 # ===================================================================
4849 AC_MSG_CHECKING([which libxslt to use])
4850 if test "$with_system_libxml" = "yes"; then
4851 AC_MSG_RESULT([external])
4853 if test "$_os" = "Darwin"; then
4854 dnl make sure to use SDK path
4855 LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
4857 LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
4859 PKG_CHECK_MODULES(LIBXSLT, libxslt)
4862 dnl Check for xsltproc
4863 AC_PATH_PROG(XSLTPROC, xsltproc, no)
4864 if test "$XSLTPROC" = "no"; then
4865 AC_MSG_ERROR([xsltproc is required])
4868 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libxslt-1.dll"
4870 AC_MSG_RESULT([internal])
4872 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
4874 if test "$cross_compiling" = "yes"; then
4875 AC_PATH_PROG(XSLTPROC, xsltproc, no)
4876 if test "$XSLTPROC" = "no"; then
4877 AC_MSG_ERROR([xsltproc is required])
4881 AC_SUBST(SYSTEM_LIBXSLT)
4882 AC_SUBST(LIBXSLT_CFLAGS)
4883 AC_SUBST(LIBXSLT_LIBS)
4886 # ===================================================================
4887 # Check for system libxml
4888 # ===================================================================
4889 AC_MSG_CHECKING([which libxml to use])
4890 if test "$with_system_libxml" = "yes"; then
4891 AC_MSG_RESULT([external])
4893 if test "$_os" = "Darwin"; then
4894 dnl make sure to use SDK path
4895 LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
4897 LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
4898 elif test $_os = iOS; then
4899 dnl make sure to use SDK path
4900 usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
4901 LIBXML_CFLAGS="-I$usr/include/libxml2"
4902 LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
4904 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
4906 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS zlib1.dll libxml2-2.dll"
4908 AC_MSG_RESULT([internal])
4910 BUILD_TYPE="$BUILD_TYPE LIBXML2"
4912 AC_SUBST(SYSTEM_LIBXML)
4913 AC_SUBST(LIBXML_CFLAGS)
4914 AC_SUBST(LIBXML_LIBS)
4916 dnl ===================================================================
4917 dnl Checks for Python
4918 dnl ===================================================================
4920 AC_MSG_CHECKING([which Python to use])
4922 case "$enable_python" in
4925 AC_MSG_RESULT([none])
4929 if test $build_os = cygwin; then
4930 dnl When building on Windows we don't attempt to use any installed
4931 dnl "system" Python.
4933 dnl (When cross-compiling to Windows from Linux using the mingw32-cross
4934 dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
4935 dnl MinGW cross-compilation setups.)
4936 AC_MSG_RESULT([internal])
4937 enable_python=internal
4938 elif test $_os = Darwin -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then
4939 AC_MSG_RESULT([internal, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno])
4940 enable_python=internal
4942 AC_MSG_RESULT([checking below])
4947 AC_MSG_RESULT([internal])
4950 if test $_os = Darwin -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then
4951 AC_MSG_ERROR([Cannot use "system" Python, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno])
4953 AC_MSG_RESULT([system])
4956 AC_MSG_ERROR([Incorrect --enable-python option])
4960 AC_SUBST(DISABLE_PYTHON)
4962 if test $_os = WINNT -a "$WITH_MINGW" != yes -a $enable_python = system; then
4963 AC_MSG_ERROR([Must use internal Python when building with MSVC])
4966 if test $enable_python != no; then
4967 BUILD_TYPE="$BUILD_TYPE PYUNO"
4970 if test "$cross_compiling" = yes; then
4971 if test $enable_python = auto; then
4972 enable_python=system
4975 if test $enable_python = system; then
4976 # This causes an error if no python command is found
4977 # Note that this takes the system python called just "python",
4978 # which isn't actually what we want on MacOSX when building
4979 # against the 10.6 SDK. But that shouldn't matter, we
4980 # select the correct python command manually below anyway.
4981 AM_PATH_PYTHON([2.6])
4982 elif test $enable_python = auto; then
4983 dnl This allows lack of system Python
4984 AM_PATH_PYTHON([2.6],, [:])
4986 if test "$PYTHON" = :; then
4987 enable_python=internal
4989 enable_python=system
4994 if test $enable_python = system; then
4995 if test $_os = Darwin; then
4996 # We already have logic above to make sure the system Python
4997 # is used only when building against SDK 10.6 or newer.
4999 # Make sure we use the 2.6 Python when building against the
5001 case $with_macosx_sdk in
5003 python_version=2.6;;
5005 python_version=2.7;;
5008 python_version=2.7;;
5010 PYTHON=python$python_version
5012 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX${with_macosx_sdk}.sdk/System/Library/Frameworks/Python.framework/Versions/${python_version}/include/python${python_version}"
5013 PYTHON_LIBS="-framework Python"
5015 if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
5016 # Fallback: Accept these in the environment, or as set above
5019 elif test "$cross_compiling" != yes; then
5020 python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
5021 python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
5022 python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
5023 python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
5024 if $PKG_CONFIG --exists python-$python_version; then
5025 PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
5026 PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version`"
5028 PYTHON_CFLAGS="-I$python_include"
5029 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
5031 elif test "$cross_compiling" = yes; then
5032 dnl How to find out the cross-compilation Python installation path?
5033 dnl Let's hardocode what we know for different distributions for now...
5035 for python_sysroot in /usr/i686-w64-mingw32/sys-root/mingw ; do
5036 for python_version in 2.6 ; do
5037 if test -f ${python_sysroot}/include/python${python_version}/Python.h; then
5038 PYTHON_CFLAGS="-I ${python_sysroot}/include/python$python_version"
5039 PYTHON_LIBS="-L ${python_sysroot}lib -lpython$python_version $python_libs"
5043 test -n "$PYTHON_CFLAGS" && break
5048 dnl By now enable_python should be "system", "internal" or "no"
5049 case $enable_python in
5053 dnl Check if the headers really work
5054 save_CPPFLAGS="$CPPFLAGS"
5055 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
5056 AC_CHECK_HEADER(Python.h, [],
5057 [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
5059 CPPFLAGS="$save_CPPFLAGS"
5061 dnl FIXME Check if the Python library can be linked with, too?
5066 BUILD_TYPE="$BUILD_TYPE PYTHON"
5067 # Embedded Python dies without Home set
5068 if test "z$HOME" = "z"; then
5071 # bz2 tarball and bzip2 is not standard
5072 if test -z "$BZIP2"; then
5073 AC_PATH_PROG( BZIP2, bzip2)
5074 if test -z "$BZIP2"; then
5075 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
5083 AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
5087 AC_SUBST(SYSTEM_PYTHON)
5088 AC_SUBST(PYTHON_CFLAGS)
5089 AC_SUBST(PYTHON_LIBS)
5091 dnl ===================================================================
5092 dnl Check for system Berkeley db
5093 dnl ===================================================================
5094 AC_MSG_CHECKING([which db to use])
5095 if test "$with_system_db" = "yes"; then
5097 AC_MSG_RESULT([external])
5100 for dbver in 5.1 5.0 5 4.8 4.7 4; do
5101 for dash in - ''; do
5102 AC_CHECK_HEADER([db$dash$dbver/db.h],
5103 [ db_header="db$dash$dbver/db.h"; break 2 ])
5107 if test -z "$db_header"; then
5108 AC_CHECK_HEADER([db/db.h], [db_header='db/db.h'; dbver=''])
5111 if test -z "$db_header"; then
5112 AC_CHECK_HEADER(db.h, [ db_header='db.h'; dbver='' ])
5115 if test -z "$db_header"; then
5116 AC_MSG_ERROR([db.h not found. Use the correct -I flag, or install the Berkeley db development package.])
5119 AC_MSG_CHECKING([whether db is at least 4.1])
5120 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])])
5122 SYSTEM_DB_CFLAGS="-DSYSTEM_DB_HEADER='<$db_header>'"
5125 dnl At least on OpenBSD dbver is not appended to the library
5126 if test "$_os" = "OpenBSD"; then
5129 for dash in - ''; do
5130 AC_CHECK_LIB(db$dash$dbver, dbopen,
5131 [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
5132 AC_CHECK_LIB(db$dash$dbver, __db185_open,
5133 [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
5136 if test -z "$DB_LIB" ; then
5137 AC_MSG_ERROR([db library not found. Use the correct -L flag,
5138 or install the Berkeley db development package.])
5141 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
5142 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libdb-4.8.dll"
5144 AC_MSG_RESULT([internal])
5146 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
5149 AC_SUBST(SYSTEM_DB_CFLAGS)
5153 dnl ===================================================================
5154 dnl Check for system lucene
5155 dnl ===================================================================
5156 if test "$with_java" != "no"; then
5157 AC_MSG_CHECKING([which lucene to use])
5158 if test "$with_system_lucene" = "yes"; then
5159 AC_MSG_RESULT([external])
5161 if test -z $LUCENE_CORE_JAR; then
5162 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
5163 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
5165 AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
5166 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
5167 [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
5168 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
5169 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
5176 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
5177 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
5180 if test -z $LUCENE_ANALYZERS_JAR; then
5181 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
5182 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
5184 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
5185 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
5186 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
5191 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
5192 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
5194 AC_MSG_CHECKING([whether lucene is version 2.x])
5195 export LUCENE_CORE_JAR
5196 if $PERL -e 'use Archive::Zip;
5197 my $file = "$ENV{'LUCENE_CORE_JAR'}";
5198 my $zip = Archive::Zip->new( $file );
5199 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
5200 if ( $mf =~ m/Specification-Version: 2.*/ ) {
5205 AC_MSG_RESULT([yes])
5207 AC_MSG_ERROR([no, you need lucene 2])
5211 AC_MSG_RESULT([internal])
5213 BUILD_TYPE="$BUILD_TYPE LUCENE"
5216 AC_SUBST(SYSTEM_LUCENE)
5217 AC_SUBST(LUCENE_CORE_JAR)
5218 AC_SUBST(LUCENE_ANALYZERS_JAR)
5220 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
5221 if test "x$enable_ext_mysql_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
5222 AC_MSG_RESULT([yes])
5224 BUILD_TYPE="$BUILD_TYPE MYSQLC"
5229 AC_SUBST(ENABLE_MYSQLC)
5231 if test "$ENABLE_MYSQLC" = "YES"; then
5233 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MYSQLC"
5235 dnl ===================================================================
5236 dnl Check for system MySQL
5237 dnl ===================================================================
5238 AC_MSG_CHECKING([for MySQL prerequisites])
5239 if test "$with_system_mysql" = "yes"; then
5240 AC_MSG_RESULT([external MySQL])
5242 AC_PATH_PROG( MYSQLCONFIG, mysql_config)
5243 AC_MSG_CHECKING([MySQL version])
5244 MYSQL_VERSION=`$MYSQLCONFIG --version`
5245 MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
5246 if test "$MYSQL_MAJOR" -ge "5"; then
5249 AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
5251 AC_MSG_CHECKING([for MySQL Client library])
5252 MYSQL_INC=`$MYSQLCONFIG --include`
5253 MYSQL_LIB=`$MYSQLCONFIG --libs`
5254 MYSQL_DEFINES=`$MYSQLCONFIG --cflags | $SED -e s,$MYSQL_INC,,`
5255 AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
5258 if test -n "$with_libmysql_path"; then
5259 AC_MSG_RESULT([external Connector/C (libmysql)])
5260 LIBMYSQL=libmysql.so
5261 if test "$_os" = "Darwin"; then
5262 LIBMYSQL=libmysql.dylib
5263 elif test "$_os" = "WINNT"; then
5264 LIBMYSQL=libmysql.dll
5266 AC_MSG_CHECKING([for $LIBMYSQL])
5267 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
5268 AC_MSG_RESULT([found.])
5269 LIBMYSQL_PATH=$with_libmysql_path
5271 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
5274 AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path])
5277 AC_SUBST(SYSTEM_MYSQL)
5280 AC_SUBST(MYSQL_DEFINES)
5281 AC_SUBST(LIBMYSQL_PATH)
5284 dnl ===================================================================
5285 dnl Check for system MySQL C++ Connector
5286 dnl ===================================================================
5288 # who thought this too-generic cppconn dir was a good idea?
5289 AC_MSG_CHECKING([MySQL Connector/C++])
5290 if test "$with_system_mysql_cppconn" = "yes"; then
5291 AC_MSG_RESULT([external])
5292 SYSTEM_MYSQL_CPPCONN=YES
5294 AC_CHECK_HEADER(mysql_driver.h, [],
5295 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
5296 AC_CHECK_LIB(mysqlcppconn, main, [],
5297 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
5298 AC_MSG_CHECKING([version])
5299 AC_RUN_IFELSE([AC_LANG_SOURCE([[
5300 #include <mysql_driver.h>
5302 int main(int argc, char **argv) {
5303 sql::Driver *driver;
5304 driver = get_driver_instance();
5305 if (driver->getMajorVersion() > 1 || \
5306 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
5307 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
5312 ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[])
5317 AC_MSG_RESULT([internal])
5318 AC_MSG_CHECKING([for mysqlcppconn module])
5319 if test -d mysqlcppconn; then
5322 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5324 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
5325 SYSTEM_MYSQL_CPPCONN=NO
5328 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
5331 dnl ===================================================================
5332 dnl Check for system hsqldb
5333 dnl ===================================================================
5334 if test "$with_java" != "no"; then
5335 AC_MSG_CHECKING([which hsqldb to use])
5336 if test "$with_system_hsqldb" = "yes"; then
5337 AC_MSG_RESULT([external])
5339 if test -z $HSQLDB_JAR; then
5340 HSQLDB_JAR=/usr/share/java/hsqldb.jar
5342 AC_CHECK_FILE($HSQLDB_JAR, [],
5343 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
5344 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
5346 if $PERL -e 'use Archive::Zip;
5347 my $file = "$ENV{'HSQLDB_JAR'}";
5348 my $zip = Archive::Zip->new( $file );
5349 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
5350 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
5351 push @l, split(/\n/, $mf);
5352 foreach my $line (@l) {
5353 if ($line =~ m/Specification-Version:/) {
5354 ($t, $version) = split (/:/,$line);
5355 $version =~ s/^\s//;
5356 ($a, $b, $c, $d) = split (/\./,$version);
5357 if ($c == "0" && $d > "8") {
5367 AC_MSG_RESULT([yes])
5369 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
5372 AC_MSG_RESULT([internal])
5374 BUILD_TYPE="$BUILD_TYPE HSQLDB"
5376 AC_SUBST(SYSTEM_HSQLDB)
5377 AC_SUBST(HSQLDB_JAR)
5380 dnl ===================================================================
5381 dnl Check for PostgreSQL stuff
5382 dnl ===================================================================
5384 if test "x$enable_ext_postgresql_sdbc" = "xyes"; then
5385 AC_MSG_CHECKING([for PostgreSQL prerequisites])
5386 if test "$with_system_postgresql" = "yes"; then
5387 AC_MSG_RESULT([external PostgreSQL])
5388 SYSTEM_POSTGRESQL=YES
5389 AC_PATH_PROG(PGCONFIG, pg_config)
5390 if test -z "$PGCONFIG"; then
5391 AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
5393 POSTGRESQL_INC=-I$(pg_config --includedir)
5394 POSTGRESQL_LIB="-L$(pg_config --libdir) -lpq"
5396 SYSTEM_POSTGRESQL=NO
5397 if test -n "$with_libpq_path"; then
5398 AC_MSG_RESULT([external libpq])
5399 POSTGRESQL_LIB="-L${with_libpq_path}/lib/ -lpq"
5400 POSTGRESQL_INC=-I"${with_libpq_path}/include/"
5402 AC_MSG_ERROR([not given. Please specify either --with-system-postgresql or --with-libpq-path])
5405 AC_MSG_CHECKING([for PostgreSQL C interface])
5407 save_CPPFLAGS=$CPPFLAGS
5409 CPPFLAGS="${POSTGRESQL_INC}"
5410 LIBS="${POSTGRESQL_LIB}"
5411 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
5412 AC_CHECK_LIB(pq, PQconnectdbParams, [],
5413 [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
5415 CPPFLAGS=$save_CPPFLAGS
5417 BUILD_POSTGRESQL_SDBC=YES
5419 AC_SUBST(BUILD_POSTGRESQL_SDBC)
5420 AC_SUBST(SYSTEM_POSTGRESQL)
5421 AC_SUBST(POSTGRESQL_INC)
5422 AC_SUBST(POSTGRESQL_LIB)
5424 dnl ===================================================================
5425 dnl Check for system beanshell
5426 dnl ===================================================================
5427 if test "$with_java" != "no"; then
5428 AC_MSG_CHECKING([which beanshell to use])
5429 if test "$with_system_beanshell" = "yes"; then
5430 AC_MSG_RESULT([external])
5432 if test -z $BSH_JAR; then
5433 BSH_JAR=/usr/share/java/bsh.jar
5435 AC_CHECK_FILE($BSH_JAR, [],
5436 [AC_MSG_ERROR(bsh.jar not found.)], [])
5438 AC_MSG_RESULT([internal])
5440 BUILD_TYPE="$BUILD_TYPE BSH"
5443 AC_SUBST(SYSTEM_BSH)
5447 dnl ===================================================================
5448 dnl Check for system saxon
5449 dnl ===================================================================
5450 if test "$with_java" != "no"; then
5451 AC_MSG_CHECKING([which saxon to use])
5452 if test "$with_system_saxon" = "yes"; then
5453 AC_MSG_RESULT([external])
5455 if test -z $SAXON_JAR; then
5456 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
5457 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
5459 AC_CHECK_FILE(/usr/share/java/saxon.jar,
5460 [ SAXON_JAR=/usr/share/java/saxon.jar ],
5461 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
5462 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
5463 [ AC_MSG_ERROR(saxon.jar replacement not found)]
5470 AC_CHECK_FILE($SAXON_JAR, [],
5471 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
5473 if test -n "$SERIALIZER_JAR"; then
5474 AC_CHECK_FILE($SERIALIZER_JAR, [],
5475 [AC_MSG_ERROR(serializer.jar not found.)], [])
5476 AC_SUBST(SERIALIZER_JAR)
5479 dnl Saxon comes in two practically available versions, the out-of-date saxonb which
5480 dnl supports the Java extensions that LibreOffice uses, and the up-to-date saxon he
5481 dnl "home edition" version, which is crippled to not support those Java extensions.
5482 dnl And as an aside the he one also needs to be tweaked to include
5483 dnl a META-INF/services to broadcast that it supports the jaxp transform factory
5485 AC_MSG_CHECKING([if saxon works])
5486 cat > saxontest.java <<_ACEOF
5487 [import javax.xml.transform.TransformerFactory;
5488 import javax.xml.transform.Transformer;
5489 import javax.xml.transform.stream.StreamSource;
5492 import net.sf.saxon.FeatureKeys;
5495 public static void main(String[] args) {
5496 System.setProperty("javax.xml.transform.TransformerFactory",
5497 "net.sf.saxon.TransformerFactoryImpl");
5499 TransformerFactory tfactory = TransformerFactory.newInstance();
5500 // some external saxons (Debian, Ubuntu, ...) have this disabled
5502 tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
5503 System.out.println("TransformerFactory is" +
5504 tfactory.getClass().getName());
5505 Transformer transformer = tfactory.newTransformer(
5506 new StreamSource(new File(args[0])));
5507 } catch(Exception e){
5508 e.printStackTrace(System.err);
5517 cat > saxontest.xsl<<_ACEOF
5518 [<?xml version="1.0" encoding="UTF-8"?>
5519 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5520 <xsl:template match="/">
5521 <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/>
5527 javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2"
5528 AC_TRY_EVAL(javac_cmd)
5529 if test $? = 0 && test -f ./saxontest.class ; then
5530 java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2"
5531 AC_TRY_EVAL(java_cmd)
5532 if test $? = 0; then
5533 AC_MSG_RESULT([yes])
5535 cat saxontest.java >&5
5537 AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb])
5541 cat saxontest.java >&5
5542 AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar])
5545 AC_MSG_RESULT([internal])
5550 AC_SUBST(SYSTEM_SAXON)
5553 if test -n "$NEED_SAXON"; then
5554 BUILD_TYPE="$BUILD_TYPE SAXON"
5557 # ===================================================================
5558 # Check whether to build stax
5559 # ===================================================================
5560 AC_MSG_CHECKING([whether building the stax is required])
5562 if test -z "$SOLAR_JAVA"; then
5563 AC_MSG_RESULT([no (java disabled)])
5564 elif test "$SYSTEM_SAXON" = "YES"; then
5565 AC_MSG_RESULT([no (already provided by system saxon)])
5566 elif test -f "./stax/download/jsr173_1.0_api.jar"; then
5567 AC_MSG_RESULT([no (will use the prebuilt stax/download/jsr173_1.0_api.jar)])
5570 AC_MSG_RESULT([yes (no system saxon and no prebuilt copy)])
5572 AC_SUBST(BUILD_STAX)
5574 dnl ===================================================================
5575 dnl Check for system curl
5576 dnl ===================================================================
5577 AC_MSG_CHECKING([which libcurl to use])
5578 if test "$with_system_curl" = "yes"; then
5579 AC_MSG_RESULT([external])
5583 if test "$cross_compiling" = "yes"; then
5584 dnl At least the OBS mingw32-libcurl-devel package
5585 dnl comes with a proper .pc file
5586 PKG_CHECK_MODULES(CURL, libcurl,, [:])
5587 if test -n "$CURL_PKG_ERRORS"; then
5590 curl_version=`$PKG_CONFIG --modversion libcurl`
5593 if test -z "$curl_version"; then
5594 AC_PATH_PROG(CURLCONFIG, curl-config)
5595 if test -z "$CURLCONFIG"; then
5596 AC_MSG_ERROR([install the libcurl development package])
5598 CURL_LIBS=`$CURLCONFIG --libs`
5599 CURL_CFLAGS=`$CURLCONFIG --cflags`
5600 curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
5603 AC_MSG_CHECKING([whether libcurl is >= 7.13.1])
5605 case $curl_version in
5606 dnl brackets doubled below because Autoconf uses them as m4 quote characters,
5607 dnl so they need to be doubled to end up in the configure script
5608 7.13.1|7.1[[4-9]].*|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
5609 AC_MSG_RESULT([yes, you have $curl_version])
5612 AC_MSG_ERROR([no, you have $curl_version])
5616 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"
5618 AC_MSG_RESULT([internal])
5620 BUILD_TYPE="$BUILD_TYPE CURL"
5622 AC_SUBST(SYSTEM_CURL)
5623 AC_SUBST(CURL_CFLAGS)
5626 dnl ===================================================================
5627 dnl Check for system boost
5628 dnl ===================================================================
5629 AC_MSG_CHECKING([which boost to use])
5630 if test "$with_system_boost" = "yes"; then
5631 AC_MSG_RESULT([external])
5634 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
5635 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
5636 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
5637 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
5638 AC_CHECK_HEADER(boost/function.hpp, [],
5639 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
5640 AC_CHECK_HEADER([boost/unordered_map.hpp], [HAVE_BOOST_UNORDERED_MAP=TRUE],
5641 [AC_MSG_WARN([boost/unordered_map.hpp not found])], [])
5643 save_CXXFLAGS=$CXXFLAGS
5644 CXXFLAGS="$CXXFLAGS -fno-exceptions"
5645 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
5646 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
5647 ]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
5649 if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
5650 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
5652 AC_MSG_RESULT([yes])
5654 CXXFLAGS=$save_CXXFLAGS
5657 AC_MSG_RESULT([internal])
5658 BUILD_TYPE="$BUILD_TYPE BOOST"
5660 HAVE_BOOST_UNORDERED_MAP=TRUE
5662 AC_SUBST([HAVE_BOOST_UNORDERED_MAP])
5663 AC_SUBST(SYSTEM_BOOST)
5665 dnl ===================================================================
5666 dnl Check for system mdds
5667 dnl ===================================================================
5668 AC_MSG_CHECKING([which mdds to use])
5669 if test "$with_system_mdds" = "yes"; then
5670 AC_MSG_RESULT([external])
5673 dnl ===================================================================
5674 dnl Determine which hash container mdds shall use
5675 dnl ===================================================================
5676 AC_MSG_CHECKING([which hash container mdds shall use])
5677 if test "x$HAVE_CXX0X" = "xTRUE"; then
5678 MDDS_CPPFLAGS="-std=c++0x"
5679 AC_MSG_RESULT([std::unordered_map])
5681 MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
5682 AC_MSG_RESULT([boost::unordered_map])
5686 save_CPPFLAGS="$CPPFLAGS"
5687 CPPFLAGS="$CPPFLAGS $MDDS_CPPFLAGS"
5688 AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
5689 [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
5690 AC_CHECK_HEADER(mdds/mixed_type_matrix.hpp, [],
5691 [AC_MSG_ERROR(mdds/mixed_type_matrix.hpp not found. install mdds >= 0.4.0)], [])
5692 CPPFLAGS="$save_CPPFLAGS"
5693 save_CXXFLAGS="$CXXFLAGS"
5694 CXXFLAGS="$CXXFLAGS $MDDS_CPPFLAGS"
5695 AC_MSG_CHECKING([for correct signature of ::mdds::flat_segment_tree])
5696 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <mdds/flat_segment_tree.hpp>
5698 int main(int argc, char **argv) {
5699 ::mdds::flat_segment_tree<long, short> db(0, 100, 0);
5701 if (!db.search(5, val).second)
5705 ]])],[ac_cv_cxx_mdds_flat_segment_tree_correct=yes],[ac_cv_cxx_mdds_flat_segment_tree_correct=no],[])
5707 if test "$ac_cv_cxx_mdds_flat_segment_tree_correct" = "yes"; then
5708 AC_MSG_RESULT([yes])
5710 AC_MSG_ERROR([no, install mdds >= 0.5.0])
5712 CXXFLAGS=$save_CXXFLAGS
5715 AC_MSG_RESULT([internal])
5716 BUILD_TYPE="$BUILD_TYPE MDDS"
5719 dnl ===================================================================
5720 dnl Determine which hash container mdds shall use
5721 dnl ===================================================================
5722 AC_MSG_CHECKING([which hash container mdds shall use])
5723 MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
5724 AC_MSG_RESULT([boost::unordered_map])
5726 AC_SUBST(SYSTEM_MDDS)
5727 AC_SUBST([MDDS_CPPFLAGS])
5729 dnl ===================================================================
5730 dnl Check for system vigra
5731 dnl ===================================================================
5732 AC_MSG_CHECKING([which vigra to use])
5733 if test "$with_system_vigra" = "yes"; then
5734 AC_MSG_RESULT([external])
5737 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
5738 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
5741 AC_MSG_RESULT([internal])
5742 BUILD_TYPE="$BUILD_TYPE VIGRA"
5745 AC_SUBST(SYSTEM_VIGRA)
5747 dnl ===================================================================
5748 dnl Check for system odbc
5749 dnl ===================================================================
5750 AC_MSG_CHECKING([which odbc headers to use])
5751 if test "$with_system_odbc" = "yes"; then
5752 AC_MSG_RESULT([external])
5753 SYSTEM_ODBC_HEADERS=YES
5755 AC_CHECK_HEADER(sqlext.h, [],
5756 [AC_MSG_ERROR(odbc not found. install odbc)], [])
5758 AC_MSG_RESULT([internal])
5759 SYSTEM_ODBC_HEADERS=NO
5760 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
5762 AC_SUBST(SYSTEM_ODBC_HEADERS)
5764 AC_MSG_CHECKING([whether to enable build of Mozilla])
5765 if test "$enable_mozilla" = "no"; then
5769 AC_MSG_RESULT([yes])
5772 AC_SUBST(WITH_MOZILLA)
5774 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
5775 if test "$enable_mozilla" = "no"; then
5777 elif test "$with_system_mozilla" = "yes"; then
5778 AC_MSG_RESULT([no, not possible with system-mozilla])
5780 AC_MSG_RESULT([yes])
5783 AC_MSG_CHECKING([whether to build XML Security support])
5784 if test "$enable_xmlsec" = "no"; then
5789 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
5790 AC_MSG_RESULT([yes])
5792 AC_SUBST(ENABLE_XMLSEC)
5794 AC_MSG_CHECKING([whether to build LDAP configuration backend])
5795 if test "$enable_ldap" != "no"; then
5798 if test "$with_openldap" = "yes"; then
5800 AC_MSG_RESULT([OpenLDAP])
5802 AC_CHECK_HEADERS(ldap.h, [],
5803 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
5804 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
5805 [AC_MSG_ERROR(openldap lib not found or functional)], [])
5806 AC_CHECK_LIB(ldap, ldap_set_option, [],
5807 [AC_MSG_ERROR(openldap lib not found or functional)], [])
5808 elif test "$enable_mozilla" != "no"; then
5809 AC_MSG_RESULT([Mozilla])
5813 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP required])
5820 AC_SUBST(WITH_OPENLDAP)
5822 dnl ===================================================================
5823 dnl Check for system mozilla
5824 dnl ===================================================================
5825 AC_MSG_CHECKING([which Mozilla to use])
5826 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
5827 AC_MSG_RESULT([external])
5829 AC_MSG_CHECKING([which Mozilla flavour to use])
5830 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
5832 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
5833 MOZ_FLAVOUR=xulrunner
5834 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
5835 MOZ_FLAVOUR=seamonkey
5836 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
5838 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
5843 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
5846 if test "$MOZ_FLAVOUR" != "libxul"; then
5847 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
5848 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
5849 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
5852 if test -z "$HASXPCOM"; then
5853 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
5854 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
5855 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
5856 if ! test -e "$MOZ_LIB/libxul.so"; then
5857 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
5858 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
5859 MOZ_LIB="$MOZ_LIB/sdk/lib"
5864 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
5865 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
5866 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
5867 if test -d "$MOZ_INC/ldap"; then
5868 AC_MSG_RESULT([yes])
5869 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
5872 Could not find LDAP header include files in $MOZ_INC/ldap.
5873 Please recompile $tmp with --enable-ldap or use --with-openldap.])
5877 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
5878 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
5879 if test "$MOZ_FLAVOUR" = "libxul"; then
5880 MOZ_FLAVOUR="mozilla"
5883 elif test "$enable_mozilla" = "no"; then
5884 AC_MSG_RESULT([none])
5887 AC_MSG_RESULT([internal])
5889 BUILD_TYPE="$BUILD_TYPE MOZ"
5890 if test -z "$with_mozilla_version"; then
5893 AC_MSG_CHECKING([which Mozilla version to build])
5894 MOZILLA_VERSION=$with_mozilla_version
5895 enable_build_mozilla=1
5896 AC_MSG_RESULT([$MOZILLA_VERSION])
5899 AC_SUBST(MOZILLA_VERSION)
5901 AC_MSG_CHECKING([for toolkit Mozilla should use])
5902 if test -z "$with_mozilla_toolkit"; then
5903 if test "$_os" != "WINNT" ; then
5904 if test "$_os" = "Darwin" ; then
5906 AC_MSG_RESULT([mac])
5908 MOZILLA_TOOLKIT=gtk2
5909 AC_MSG_RESULT([gtk2])
5913 MOZILLA_TOOLKIT=$with_mozilla_toolkit
5914 enable_build_mozilla=1
5915 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
5918 AC_SUBST(MOZILLA_TOOLKIT)
5920 # default to enabling build mozilla
5921 if test "$enable_build_mozilla" != "no"; then
5922 enable_build_mozilla=yes
5924 enable_build_mozilla=
5927 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
5928 if test -n "$enable_build_mozilla"; then
5930 AC_MSG_RESULT([yes])
5936 if test "$BUILD_MOZAB" = "TRUE"; then
5937 if test "$_os" = "WINNT"; then
5938 if test "$WITH_MINGW" != "yes"; then
5939 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
5940 if test "$MSVSVER" != "2005"; then
5941 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio 2005 only.])
5944 AC_MSG_WARN([Building SeaMonkey with MinGW is not tested, and likely to break.])
5945 echo "Building SeaMonkey with MinGW is not tested, and likely to break." >> warn
5949 if test -z "$MOZILLA_VERSION"; then
5950 MOZILLA_VERSION=1.1.14
5952 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
5953 MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst.in`
5954 AC_MSG_CHECKING([for Mozilla sources])
5955 if test -z "$MOZILLA_FETCH_FILE"; then
5956 AC_MSG_RESULT([not found])
5957 HAVE_MOZILLA_TARBALL=n
5959 AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE])
5960 if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then
5961 if test -z "$DO_FETCH"; then
5962 AC_MSG_RESULT([will be fetched])
5963 HAVE_MOZILLA_TARBALL=y
5965 AC_MSG_RESULT([not found])
5966 HAVE_MOZILLA_TARBALL=n
5969 AC_MSG_RESULT([found])
5970 HAVE_MOZILLA_TARBALL=y
5973 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
5974 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
5975 Use "./download" to download.])
5977 if test "$_os" = "WINNT"; then
5978 AC_MSG_CHECKING([for moztools binaries])
5979 if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then
5980 AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip
5981 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
5985 elif test "$_os" = "Darwin"; then
5986 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
5987 if test -z "$MOZIDL"; then
5988 AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build Mozilla with Mac toolkit.])
5991 # Generic Unix/Linux section
5992 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
5993 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
5994 if test -z "$MOZGTK"; then
5995 AC_MSG_ERROR([GTK2 is needed to build Mozilla.])
5997 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
5998 if test -z "$MOZIDL"; then
5999 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build Mozilla.])
6002 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
6003 if test -z "$MOZGTK"; then
6004 AC_MSG_ERROR([GTK+ 1.2 is needed when not using GTK2 to build Mozilla.])
6006 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
6007 if test -z "$MOZIDL"; then
6008 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build Mozilla.])
6014 AC_SUBST(BUILD_MOZAB)
6017 AC_SUBST(MOZILLABUILD)
6018 AC_SUBST(SYSTEM_MOZILLA)
6019 AC_SUBST(MOZ_FLAVOUR)
6022 AC_SUBST(MOZ_LIB_XPCOM)
6023 AC_SUBST(MOZ_LDAP_CFLAGS)
6025 dnl ===================================================================
6026 dnl Check for system NSS only with xmlsec or mozilla build enabled
6027 dnl ===================================================================
6028 if test "x$enable_xmlsec" != "xno" -o "x$enable_mozilla" != "xno"; then
6029 AC_MSG_CHECKING([which NSS to use])
6030 if test "$with_system_nss" = "yes"; then
6031 AC_MSG_RESULT([external])
6033 PKG_CHECK_MODULES(NSS, nss >= 3.9.3 nspr >= 4.8)
6036 BUILD_TYPE="$BUILD_TYPE NSS"
6037 AC_MSG_RESULT([internal])
6038 if test "$build_os" = "cygwin"; then
6039 AC_MSG_CHECKING([for Mozilla build tooling])
6040 if test -z "$MOZILLABUILD" ; then
6041 AC_MSG_ERROR([Mozilla build tooling not found.
6042 Use the --with-mozilla-build option after installing the tools obtained
6043 from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
6045 if test \( "$WITH_MINGW" = "yes" \) ; then
6046 if test ! -d "$MOZILLABUILD" ; then
6047 AC_MSG_ERROR([Mozilla build tooling incomplete!])
6052 if test ! -d "$MOZILLABUILD/moztools" \
6053 -o ! -d "$MOZILLABUILD/msys" ; then
6054 AC_MSG_ERROR([Mozilla build tooling incomplete!])
6062 fi # enable xmlsec || enable mozilla
6063 AC_SUBST(SYSTEM_NSS)
6064 AC_SUBST(NSS_CFLAGS)
6067 dnl ===================================================================
6068 dnl Check for system mozilla headers
6069 dnl ===================================================================
6070 AC_MSG_CHECKING([which mozilla headers to use])
6071 if test "$with_system_mozilla_headers" = "yes"; then
6072 AC_MSG_RESULT([external])
6073 SYSTEM_MOZILLA_HEADERS=YES
6074 # First try npapi-sdk:
6075 PKG_CHECK_MODULES(MOZILLA_HEADERS, npapi-sdk, [LOCATED=yes], [LOCATED=no])
6076 # Then go with libxul:
6077 if test "x$LOCATED" != "xyes"; then
6078 PKG_CHECK_MODULES(MOZILLA_HEADERS, libxul, [LOCATED=yes], [LOCATED=no])
6080 # if still not found bail out
6081 if test "x$LOCATED" != "xyes"; then
6082 AC_MSG_ERROR([npapi.h header file not found])
6085 AC_MSG_RESULT([internal])
6086 SYSTEM_MOZILLA_HEADERS=NO
6088 AC_SUBST(MOZILLA_HEADERS_CFLAGS)
6089 AC_SUBST(SYSTEM_MOZILLA_HEADERS)
6091 dnl ===================================================================
6092 dnl Check for system sane
6093 dnl ===================================================================
6094 AC_MSG_CHECKING([which sane header to use])
6095 if test "$with_system_sane" = "yes"; then
6096 AC_MSG_RESULT([external])
6097 SYSTEM_SANE_HEADER=YES
6098 AC_CHECK_HEADER(sane/sane.h, [],
6099 [AC_MSG_ERROR(sane not found. install sane)], [])
6101 AC_MSG_RESULT([internal])
6102 SYSTEM_SANE_HEADER=NO
6103 BUILD_TYPE="$BUILD_TYPE SANE"
6105 AC_SUBST(SYSTEM_SANE_HEADER)
6107 dnl ===================================================================
6108 dnl Check for system icu
6109 dnl ===================================================================
6116 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=
6117 AC_MSG_CHECKING([which icu to use])
6118 if test "$with_system_icu" = "yes"; then
6119 AC_MSG_RESULT([external])
6122 AC_MSG_CHECKING([for unicode/rbbi.h])
6123 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
6127 if test "$WITH_MINGW" = "yes" ; then
6128 ICUPATH="/usr/i686-w64-mingw32/sys-root/mingw/bin:$ICUPATH"
6130 AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
6132 AC_MSG_CHECKING([ICU version])
6133 ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
6134 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
6135 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
6136 ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3`
6138 if test "$ICU_MAJOR" -ge "4"; then
6139 AC_MSG_RESULT([OK, $ICU_VERSION])
6141 AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
6144 if test "$cross_compiling" != "yes"; then
6145 # using the system icu tools can lead to version confusion, use the
6146 # ones from the build environment when cross-compiling
6147 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
6148 if test -z "$SYSTEM_GENBRK"; then
6149 AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
6151 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
6152 if test -z "$SYSTEM_GENCCODE"; then
6153 AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
6155 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
6156 if test -z "$SYSTEM_GENCMN"; then
6157 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
6159 if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4"; then
6160 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
6164 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS icui18n$ICU_MAJOR$ICU_MINOR.dll icuuc$ICU_MAJOR$ICU_MINOR.dll icudata$ICU_MAJOR$ICU_MINOR.dll"
6166 AC_MSG_RESULT([internal])
6168 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
6169 BUILD_TYPE="$BUILD_TYPE ICU"
6171 AC_SUBST(SYSTEM_ICU)
6172 AC_SUBST(SYSTEM_GENBRK)
6173 AC_SUBST(SYSTEM_GENCCODE)
6174 AC_SUBST(SYSTEM_GENCMN)
6178 AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
6180 dnl ===================================================================
6182 dnl ===================================================================
6184 AC_MSG_CHECKING([whether to enable graphite support])
6185 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then
6186 AC_MSG_RESULT([yes])
6187 ENABLE_GRAPHITE="TRUE"
6188 AC_MSG_CHECKING([which graphite to use])
6189 if test "$with_system_graphite" = "yes"; then
6190 AC_MSG_RESULT([external])
6192 PKG_CHECK_MODULES( GRAPHITE, graphite2 >= 0.9.3 )
6193 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libgraphite2.dll"
6195 AC_MSG_RESULT([internal])
6197 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
6202 AC_SUBST(ENABLE_GRAPHITE)
6203 AC_SUBST(SYSTEM_GRAPHITE)
6204 AC_SUBST(GRAPHITE_LIBS)
6205 AC_SUBST(GRAPHITE_CFLAGS)
6207 dnl ===================================================================
6208 dnl Checks for libraries.
6209 dnl ===================================================================
6210 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
6211 dnl See if we have the AppKit framework for building with Quartz graphics.
6213 if test "$_os" = "Darwin"; then
6214 if test "x$with_x" = "xyes"; then
6215 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
6217 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
6218 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
6219 AC_MSG_RESULT([yes])
6220 x_includes="no_x_includes"
6221 x_libraries="no_x_libraries"
6222 dnl disable some things used on other Unix versions but not on the aqua build
6225 AC_MSG_ERROR([No AppKit.framewrok found])
6230 if test $_os = iOS -o $_os = Android; then
6234 dnl ===================================================================
6235 dnl Check for nsplugin
6236 dnl ===================================================================
6237 AC_MSG_CHECKING([wether to build nsplugin extension])
6239 if test "$enable_nsplugin" != "no"; then
6240 if test "$enable_gtk" != "no"; then
6241 AC_MSG_RESULT([yes])
6244 AC_MSG_RESULT([no, disabled gtk2])
6249 AC_SUBST(ENABLE_NSPLUGIN)
6251 dnl ***************************************
6252 dnl testing for X libraries and includes...
6253 dnl ***************************************
6254 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
6255 dnl Mac OS X using Aqua graphics. Don't check for X11.
6257 elif test "$_os" != "WINNT" -a "$_os" != "Android" -a "$_os" != "iOS"; then
6260 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6262 if test "x$x_includes" = "x"; then
6263 x_includes="default_x_includes"
6265 if test "x$x_libraries" = "x"; then
6266 x_libraries="default_x_libraries"
6268 dnl The variables $x_libraries and $x_includes are set.
6269 if test -z "$x_libraries"; then
6270 AC_MSG_ERROR([No X libraries found]) # Exit
6272 if test -z "$x_includes"; then
6273 AC_MSG_ERROR([No X includes found]) # Exit
6275 CFLAGS="$CFLAGS $X_CFLAGS"
6276 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
6277 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
6278 dnl Check if the XauDisposeAuth symbol is provided by libXau.
6279 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
6281 x_includes="no_x_includes"
6282 x_libraries="no_x_libraries"
6284 if test -z "$x_includes"; then
6285 x_includes="no_x_includes"
6287 if test -z "$x_libraries"; then
6288 x_libraries="no_x_libraries"
6290 if test "$x_includes" = "default_x_includes"; then
6296 if test "$x_libraries" = "default_x_libraries"; then
6297 XLIB=`$PKG_CONFIG --variable=libdir x11`
6298 if test "x$XLIB" = x; then
6307 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then
6308 dnl ===================================================================
6309 dnl Check for Composite.h for Mozilla plugin
6310 dnl ===================================================================
6311 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
6312 [#include <X11/Intrinsic.h>])
6315 AC_MSG_CHECKING([whether to use internal X11 extensions headers])
6316 if test "$with_system_xextensions_headers" != "no"; then
6319 AC_MSG_RESULT([yes])
6320 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
6323 dnl ===================================================================
6324 dnl Check for system Xrender
6325 dnl ===================================================================
6326 AC_MSG_CHECKING([whether to use Xrender])
6327 if test "$test_xrender" = "yes"; then
6328 AC_MSG_RESULT([yes])
6329 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
6330 [AC_MSG_ERROR(libXrender not found or functional)], [])
6331 AC_MSG_CHECKING([which Xrender headers to use])
6332 if test "$with_system_xextensions_headers" != "no"; then
6333 AC_MSG_RESULT([external])
6334 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
6335 [AC_MSG_ERROR(Xrender not found. install X)], [])
6337 AC_MSG_RESULT([internal])
6341 dnl ===================================================================
6342 dnl Check for XRandr
6343 dnl ===================================================================
6344 AC_MSG_CHECKING([whether to enable RandR support])
6345 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
6346 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
6347 XRANDR_DLOPEN="TRUE"
6348 AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
6350 AC_MSG_RESULT([yes])
6351 XRANDR_DLOPEN="FALSE"
6352 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
6353 if test "$ENABLE_RANDR" != "TRUE"; then
6354 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
6355 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
6357 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
6358 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
6359 XRANDR_LIBS="-lXrandr "
6367 AC_SUBST(XRANDR_DLOPEN)
6368 AC_SUBST(XRANDR_CFLAGS)
6369 AC_SUBST(XRANDR_LIBS)
6370 AC_SUBST(ENABLE_RANDR)
6372 dnl ===================================================================
6373 dnl Check for building neon
6374 dnl ===================================================================
6375 AC_MSG_CHECKING([whether to use neon])
6376 if test "$enable_neon" = "no"; then
6379 AC_SUBST(DISABLE_NEON)
6381 AC_MSG_RESULT([yes])
6382 dnl ===================================================================
6383 dnl Check for system neon
6384 dnl ===================================================================
6385 AC_MSG_CHECKING([which neon to use])
6386 if test "$with_system_neon" = "yes"; then
6387 AC_MSG_RESULT([external])
6388 PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
6389 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
6390 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
6392 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libtasn1-3.dll libgnutls-26.dll libneon-27.dll"
6394 AC_MSG_RESULT([internal])
6398 BUILD_TYPE="$BUILD_TYPE NEON"
6400 AC_SUBST(SYSTEM_NEON)
6401 AC_SUBST(NEON_VERSION)
6403 AC_SUBST(NEON_CFLAGS)
6406 dnl ===================================================================
6407 dnl Check for system openssl
6408 dnl ===================================================================
6409 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
6410 "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
6411 with_system_openssl=yes
6413 AC_MSG_CHECKING([which libssl to use])
6414 if test "$with_system_openssl" = "yes"; then
6415 AC_MSG_RESULT([external])
6416 # Mac OS builds should get out without extra stuff is the Mac porters'
6417 # wish. And pkg-config is although Xcode ships a .pc for openssl
6418 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
6419 "$_os" = "DragonFly"; then
6421 OPENSSL_LIBS="-lssl -lcrypto"
6423 PKG_CHECK_MODULES( OPENSSL, openssl )
6426 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libssl-8.dll libcrypto-8.dll"
6428 AC_MSG_RESULT([internal])
6430 BUILD_TYPE="$BUILD_TYPE OPENSSL"
6432 AC_SUBST(SYSTEM_OPENSSL)
6433 AC_SUBST(OPENSSL_CFLAGS)
6434 AC_SUBST(OPENSSL_LIBS)
6436 dnl ===================================================================
6437 dnl Check for system redland
6438 dnl ===================================================================
6439 AC_MSG_CHECKING([which redland library to use])
6440 if test "$with_system_redland" = "yes"; then
6441 AC_MSG_RESULT([external])
6443 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
6444 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
6445 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libraptor-1.dll librasqal-2.dll libsqlite3-0.dll librdf-0.dll"
6447 AC_MSG_RESULT([internal])
6448 BUILD_TYPE="$BUILD_TYPE REDLAND"
6451 AC_SUBST(SYSTEM_REDLAND)
6452 AC_SUBST(REDLAND_CFLAGS)
6453 AC_SUBST(REDLAND_LIBS)
6455 dnl ===================================================================
6456 dnl Check for system hunspell
6457 dnl ===================================================================
6458 AC_MSG_CHECKING([which libhunspell to use])
6459 if test "$with_system_hunspell" = "yes"; then
6460 AC_MSG_RESULT([external])
6463 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
6464 if test "$HUNSPELL_PC" != "TRUE"; then
6465 AC_CHECK_HEADER(hunspell.hxx, [],
6467 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
6468 [AC_MSG_ERROR(hunspell headers not found.)], [])
6470 AC_CHECK_LIB(hunspell, main, [],
6471 [ AC_MSG_ERROR(hunspell library not found.) ], [])
6472 HUNSPELL_LIBS=-lhunspell
6475 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libhunspell-1.3-0.dll"
6477 AC_MSG_RESULT([internal])
6479 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
6481 AC_SUBST(SYSTEM_HUNSPELL)
6482 AC_SUBST(HUNSPELL_CFLAGS)
6483 AC_SUBST(HUNSPELL_LIBS)
6485 dnl ===================================================================
6486 dnl Checking for altlinuxhyph
6487 dnl ===================================================================
6488 AC_MSG_CHECKING([which altlinuxhyph to use])
6489 if test "$with_system_altlinuxhyph" = "yes"; then
6490 AC_MSG_RESULT([external])
6492 AC_CHECK_HEADER(hyphen.h, [],
6493 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
6494 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
6495 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
6496 [#include <hyphen.h>])
6497 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
6498 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6499 if test -z "$HYPHEN_LIB"; then
6500 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
6501 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6503 if test -z "$HYPHEN_LIB"; then
6504 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
6505 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6507 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libhyphen-0.dll"
6509 AC_MSG_RESULT([internal])
6511 BUILD_TYPE="$BUILD_TYPE HYPHEN"
6513 AC_SUBST(SYSTEM_HYPH)
6514 AC_SUBST(HYPHEN_LIB)
6516 dnl ===================================================================
6517 dnl Checking for mythes
6518 dnl ===================================================================
6519 AC_MSG_CHECKING([which mythes to use])
6520 if test "$with_system_mythes" = "yes"; then
6521 AC_MSG_RESULT([external])
6524 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
6525 if test "$MYTHES_PKGCONFIG" = "no"; then
6526 AC_CHECK_HEADER(mythes.hxx, [],
6527 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
6528 AC_CHECK_LIB(mythes-1.2, main, [],
6529 [ MYTHES_FOUND=no], [])
6530 if test "$MYTHES_FOUND" = "no"; then
6531 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
6532 [ MYTHES_FOUND=no], [])
6534 if test "$MYTHES_FOUND" = "no"; then
6535 AC_MSG_ERROR([mythes library not found!.])
6539 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libmythes-1.2-0.dll"
6541 AC_MSG_RESULT([internal])
6543 BUILD_TYPE="$BUILD_TYPE MYTHES"
6545 AC_SUBST(SYSTEM_MYTHES)
6546 AC_SUBST(MYTHES_CFLAGS)
6547 AC_SUBST(MYTHES_LIBS)
6549 dnl ===================================================================
6550 dnl Checking for lpsolve
6551 dnl ===================================================================
6552 AC_MSG_CHECKING([which lpsolve to use])
6553 if test "$with_system_lpsolve" = "yes"; then
6554 AC_MSG_RESULT([external])
6556 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
6557 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
6558 # some systems need this. Like Ubuntu....
6559 AC_CHECK_LIB(m, floor)
6560 AC_CHECK_LIB(dl, dlopen)
6561 AC_CHECK_LIB(lpsolve55, make_lp, ,
6562 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
6563 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS lpsolve55.dll"
6565 AC_MSG_RESULT([internal])
6567 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
6569 AC_SUBST(SYSTEM_LPSOLVE)
6571 dnl ===================================================================
6572 dnl Checking for libexttextcat
6573 dnl ===================================================================
6574 AC_MSG_CHECKING([which libexttextcat to use])
6575 if test "$with_system_libexttextcat" = "yes"; then
6576 AC_MSG_RESULT([external])
6577 SYSTEM_LIBEXTTEXTCAT=YES
6578 PKG_CHECK_MODULES([LIBEXTTEXTCAT], [libexttextcat >= 3.1.1])
6579 SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
6581 AC_MSG_RESULT([internal])
6582 SYSTEM_LIBEXTTEXTCAT=NO
6583 BUILD_TYPE="$BUILD_TYPE LIBEXTTEXTCAT"
6585 AC_SUBST(SYSTEM_LIBEXTTEXTCAT)
6586 AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
6587 AC_SUBST(LIBEXTTEXTCAT_CFLAGS)
6588 AC_SUBST(LIBEXTTEXTCAT_LIBS)
6590 dnl ***************************************
6591 dnl testing libc version for Linux...
6592 dnl ***************************************
6593 if test "$_os" = "Linux"; then
6594 AC_MSG_CHECKING([whether libc is >= 2.1.1])
6595 exec 6>/dev/null # no output
6596 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
6597 exec 6>&1 # output on again
6598 if test "$HAVE_LIBC"; then
6599 AC_MSG_RESULT([yes])
6601 AC_MSG_ERROR([no, upgrade libc])
6605 if test "$_os" != "WINNT"; then
6606 AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
6607 AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
6608 if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
6616 AC_SUBST(HAVE_GETOPT)
6617 AC_SUBST(HAVE_READDIR_R)
6618 AC_SUBST(SYSTEM_LIBC)
6620 dnl =========================================
6621 dnl Check for the Windows SDK.
6622 dnl =========================================
6623 dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
6624 dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
6625 if test "$_os" = "WINNT"; then
6626 AC_MSG_CHECKING([for Windows SDK])
6627 if test "$build_os" = "cygwin"; then
6628 if test -z "$with_windows_sdk_home"; then
6629 # This first line will detect a February 2003 Microsoft Platform SDK
6630 WINDOWS_SDK_HOME=`./oowintool --windows-sdk-home`
6631 # But there might be also an April 2005 PSDK, unfortunately MS changed
6632 # the registry entry. (we prefer the old version!?)
6633 if test -z "$WINDOWS_SDK_HOME"; then
6634 WINDOWS_SDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
6636 # normalize if found
6637 if test -n "$WINDOWS_SDK_HOME"; then
6638 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
6639 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
6642 WINDOWS_SDK_HOME=`cygpath -u "$with_windows_sdk_home"`
6645 if test -n "$WINDOWS_SDK_HOME"; then
6646 # Remove a possible trailing backslash
6647 WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
6648 # Problem with current PSDK (iz 49865)
6649 # (What "current" does that mean?)
6650 if test -f "$WINDOWS_SDK_HOME/Lib/libcp.lib"; then
6652 Some modules do not build correctly with MS Platform SDK - April 2005
6653 Edition if the library ($WINDOWS_SDK_HOME/Lib/libcp.lib) is found.
6654 Remove/rename/backup that file and restart configure. Details about this
6655 problem can be found in issue 49856.])
6658 if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
6659 -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
6660 -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
6665 if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
6671 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
6672 AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
6673 the Windows SDK are installed.])
6676 if test ! -x "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
6677 -o ! -x "$WINDOWS_SDK_HOME/bin/msidb.exe" \
6678 -o ! -x "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
6679 -o ! -x "$WINDOWS_SDK_HOME/bin/msitran.exe" ; then
6680 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
6684 if test -z "$WINDOWS_SDK_HOME"; then
6685 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
6686 elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
6687 AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
6688 elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
6689 AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
6690 elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
6691 AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
6693 AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
6696 AC_SUBST(WINDOWS_SDK_HOME)
6698 dnl =========================================
6699 dnl Check for the Microsoft DirectX SDK.
6700 dnl =========================================
6701 if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
6702 AC_MSG_CHECKING([for DirectX SDK])
6703 if test "$build_os" = "cygwin"; then
6704 if test -z "$with_directx_home"; then
6705 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
6706 if test -n "$DXSDK_DIR"; then
6707 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
6708 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
6710 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
6711 # the "DirectX SDK not found" error later
6713 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
6715 # Remove a possible trailing backslash
6716 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
6717 elif test -n "$with_directx_home"; then
6718 DIRECTXSDK_HOME="$with_directx_home"
6721 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h" ; then
6722 HAVE_DIRECTXSDK_H="yes"
6724 HAVE_DIRECTXSDK_H="no"
6727 # MS changed the location of the libraries with Dec 2004 DirectX SDK
6728 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
6729 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
6731 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
6734 if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib" ; then
6735 HAVE_DIRECTXSDK_LIB="yes"
6737 HAVE_DIRECTXSDK_LIB="no"
6740 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
6741 AC_MSG_RESULT([found])
6743 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
6746 AC_SUBST(DIRECTXSDK_HOME)
6747 AC_SUBST(DIRECTXSDK_LIB)
6749 dnl ============================================
6750 dnl Check for Nullsoft Scriptable Install System
6751 dnl ============================================
6753 if test "$_os" = "WINNT" ; then
6754 if test -z "$with_nsis_path"; then
6755 AC_PATH_PROG(NSIS_PATH, makensis)
6756 if test -n "$NSIS_PATH"; then
6757 NSIS_PATH=`dirname "$NSIS_PATH"`
6758 elif test "$build_os" = "cygwin"; then
6759 AC_MSG_CHECKING([for NSIS])
6760 nsistest=`./oowintool --nsis-dir`;
6761 nsistest=`cygpath -d -m "$nsistest"`
6762 nsistest=`cygpath -u "$nsistest"`
6763 if test -x "$nsistest/nsis.exe"; then
6764 NSIS_PATH="$nsistest"
6765 AC_MSG_RESULT([found ($NSIS_PATH)])
6767 AC_MSG_RESULT([no, no self-contained installer will be built.])
6771 AC_MSG_CHECKING([for NSIS])
6772 if test "$build_os" = "cygwin"; then
6773 with_nsis_path=`cygpath -u "$with_nsis_path"`
6775 if test -e "$with_nsis_path/makensis$EXEEXT_FOR_BUILD"; then
6776 NSIS_PATH="$with_nsis_path"
6778 if test -z "$NSIS_PATH"; then
6779 AC_MSG_RESULT([no, no self-contained installer will be built.])
6781 if test "$build_os" = "cygwin"; then
6782 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
6783 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
6785 AC_MSG_RESULT([found ($NSIS_PATH)])
6791 dnl ***************************************
6792 dnl Checking for bison and flex
6793 dnl ***************************************
6794 AC_PATH_PROG(BISON, bison)
6795 if test -z "$BISON"; then
6796 AC_MSG_ERROR([no bison found in \$PATH, install it])
6798 AC_MSG_CHECKING([the bison version])
6799 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
6800 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
6801 # Accept newer than 1.875 or older(equal) than 1.75
6802 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
6803 if test "$_bison_version" = "1.875" ; then
6804 AC_MSG_WARN([suspect ($BISON $_bison_version)])
6805 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
6807 AC_MSG_RESULT([checked ($BISON $_bison_version)])
6810 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
6813 AC_PATH_PROG(FLEX, flex)
6814 if test -z "$FLEX"; then
6815 AC_MSG_ERROR([no flex found in \$PATH, install it])
6817 dnl ***************************************
6818 dnl Checking for patch
6819 dnl ***************************************
6820 AC_PATH_PROG(PATCH, patch)
6821 if test -z "$PATCH"; then
6822 AC_MSG_ERROR([\"patch\" not found in \$PATH, install it])
6825 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
6826 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
6827 if test -z "$with_gnu_patch"; then
6830 if test -x "$with_gnu_patch"; then
6831 GNUPATCH=$with_gnu_patch
6833 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
6837 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
6838 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
6839 AC_MSG_RESULT([yes])
6841 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
6845 dnl We also need to check for --with-gnu-cp
6847 if test -z "$with_gnu_cp"; then
6848 # check the place where the good stuff is hidden on Solaris...
6849 if test -x /usr/gnu/bin/cp; then
6850 GNUCP=/usr/gnu/bin/cp
6852 AC_PATH_PROGS(GNUCP, gnucp cp)
6854 if test -z $GNUCP; then
6855 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
6858 if test -x "$with_gnu_cp"; then
6861 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
6865 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
6866 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
6867 AC_MSG_RESULT([yes])
6868 elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
6869 AC_MSG_RESULT([yes])
6872 darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*)
6874 AC_MSG_RESULT([no gnucp found - using the system's cp command])
6877 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
6885 dnl ***************************************
6886 dnl testing assembler path
6887 dnl ***************************************
6889 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
6890 if test "$CL_X64" = ""; then
6895 assembler_bin=bin/amd64
6897 if test -n "$with_asm_home"; then
6898 with_asm_home=`cygpath -u "$with_asm_home"`
6900 if test -x "$with_asm_home/$assembler"; then
6901 AC_MSG_CHECKING([$assembler assembler path])
6902 AC_MSG_RESULT([$with_asm_home/$assembler])
6903 ML_EXE="$with_asm_home/$assembler"
6905 AC_PATH_PROG(ML_EXE, $assembler)
6906 if test -z "$ML_EXE"; then
6907 AC_MSG_CHECKING([$with_cl_home/$assembler_bin/$assembler])
6908 if test -x "$with_cl_home/$assembler_bin/$assembler"; then
6909 with_asm_home=$with_cl_home/$assembler_bin
6910 AC_MSG_RESULT([found])
6911 ML_EXE="$with_cl_home/$assembler_bin/$assembler"
6913 AC_MSG_ERROR([Configure did not find $assembler assembler.])
6916 with_asm_home="ASM_IN_PATH"
6921 with_asm_home="NO_ASM_HOME"
6923 ASM_HOME="$with_asm_home"
6927 dnl ===================================================================
6928 dnl We need zip and unzip
6929 dnl ===================================================================
6930 AC_PATH_PROG(ZIP, zip)
6931 test -z "$ZIP" && AC_MSG_ERROR([zip is required])
6932 if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
6933 AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,)
6936 AC_PATH_PROG(UNZIP, unzip)
6937 test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
6939 dnl ===================================================================
6940 dnl Zip must be a specific type for different build types.
6941 dnl ===================================================================
6942 if test $build_os = cygwin; then
6943 if test -n "`$ZIP -h | grep -i WinNT`" ; then
6944 AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
6948 dnl ===================================================================
6949 dnl Test which vclplugs have to be built.
6950 dnl ===================================================================
6955 if test "x$enable_gtk3" = "xyes"; then
6956 if test "$with_system_cairo" != yes; then
6957 echo "System cairo required for gtk3 support, please use --with-system-cairo"
6959 PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.2 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="")
6960 if test "x$ENABLE_GTK3" = "xTRUE"; then
6963 AC_MSG_ERROR([gtk3 libraries of the correct versions, not found])
6967 AC_SUBST(GTK3_CFLAGS)
6968 AC_SUBST(ENABLE_GTK3)
6970 AC_MSG_CHECKING([which VCLplugs shall be built])
6972 if test "x$enable_gtk" = "xyes"; then
6976 AC_SUBST(ENABLE_GTK)
6979 if test "x$enable_kde" = "xyes"; then
6983 AC_SUBST(ENABLE_KDE)
6986 if test "x$enable_kde4" = "xyes"; then
6990 AC_SUBST(ENABLE_KDE4)
6992 if test -z "$R"; then
6993 AC_MSG_RESULT([none])
6998 dnl ===================================================================
7000 dnl ===================================================================
7003 AC_MSG_CHECKING([whether to enable GConf support])
7004 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gconf" = "yes"; then
7006 AC_MSG_RESULT([yes])
7007 PKG_CHECK_MODULES( GCONF, gconf-2.0 ORBit-2.0 )
7011 AC_SUBST(ENABLE_GCONF)
7013 dnl ===================================================================
7015 dnl ===================================================================
7018 AC_MSG_CHECKING([whether to enable GNOME VFS support])
7019 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" -a "$enable_gconf" = "yes"; then
7020 ENABLE_GNOMEVFS="TRUE"
7021 AC_MSG_RESULT([yes])
7022 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
7026 AC_SUBST(ENABLE_GNOMEVFS)
7028 dnl ===================================================================
7029 dnl Check whether the gtk 2.0 libraries are available.
7030 dnl ===================================================================
7034 ENABLE_SYSTRAY_GTK=""
7038 if test "$test_gtk" = "yes"; then
7040 if test "$ENABLE_GTK" = "TRUE" ; then
7041 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]))
7042 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]))
7043 BUILD_TYPE="$BUILD_TYPE GTK"
7045 if test "x$enable_systray" = "xyes"; then
7046 PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
7047 [ ENABLE_SYSTRAY_GTK="TRUE" ],
7048 [ ENABLE_SYSTRAY_GTK="" ])
7051 AC_MSG_CHECKING([whether to enable DBUS support])
7052 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
7054 AC_MSG_RESULT([yes])
7055 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
7060 AC_MSG_CHECKING([whether to enable GIO support])
7061 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
7062 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
7063 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
7066 AC_MSG_RESULT([yes])
7067 PKG_CHECK_MODULES( GIO, gio-2.0 )
7073 AC_SUBST(ENABLE_GIO)
7074 AC_SUBST(ENABLE_DBUS)
7075 AC_SUBST(ENABLE_SYSTRAY_GTK)
7076 AC_SUBST(GTK_CFLAGS)
7078 AC_SUBST(GTHREAD_CFLAGS)
7079 AC_SUBST(GTHREAD_LIBS)
7080 AC_SUBST(DBUS_CFLAGS)
7083 PKG_CHECK_MODULES( LIBPNG, libpng, ENABLE_QUICKSTART_LIBPNG="TRUE", ENABLE_QUICKSTART_LIBPNG="" )
7084 AC_SUBST(LIBPNG_LIBS)
7085 AC_SUBST(LIBPNG_CFLAGS)
7087 AC_MSG_CHECKING([whether to enable libpng linking in quickstarter])
7088 if test "x$unix_qstart_libpng" != "xno"; then
7089 AC_MSG_RESULT([yes])
7092 ENABLE_QUICKSTART_LIBPNG=""
7094 AC_SUBST(ENABLE_QUICKSTART_LIBPNG)
7096 SPLIT_APP_MODULES=""
7097 if test "$enable_split_app_modules" = "yes"; then
7098 SPLIT_APP_MODULES="YES"
7100 AC_SUBST(SPLIT_APP_MODULES)
7102 SPLIT_OPT_FEATURES=""
7103 if test "$enable_split_opt_features" = "yes"; then
7104 SPLIT_OPT_FEATURES="YES"
7106 AC_SUBST(SPLIT_OPT_FEATURES)
7108 ENABLE_CAIRO_CANVAS="FALSE"
7109 if test "$enable_cairo_canvas" = "yes" ; then
7110 ENABLE_CAIRO_CANVAS="TRUE"
7112 AC_SUBST(ENABLE_CAIRO_CANVAS)
7114 dnl ===================================================================
7115 dnl Check whether the GStreamer libraries are available.
7116 dnl ===================================================================
7120 if test "$build_gstreamer" = "yes"; then
7122 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
7123 if test "x$enable_gstreamer" != "xno" ; then
7124 ENABLE_GSTREAMER="TRUE"
7125 AC_MSG_RESULT([yes])
7126 PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
7132 AC_SUBST(ENABLE_GSTREAMER)
7134 dnl ===================================================================
7135 dnl Check whether the OpenGL libraries are available
7136 dnl ===================================================================
7138 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
7141 if test "$_os" = "Darwin" ; then
7142 # We use frameworks on Mac OS X, no need for detail checks
7144 SYSTEM_MESA_HEADERS=YES
7145 AC_MSG_RESULT([yes])
7147 if test "x$enable_opengl" != "xno" ; then
7148 if test "$_os" != "WINNT"; then
7149 save_LDFLAGS=$LDFLAGS
7150 LDFLAGS="$LDFLAGS -lm"
7151 AC_MSG_RESULT([yes])
7152 AC_CHECK_LIB(GL, main, [],
7153 [AC_MSG_ERROR(libGL not installed or functional)], [])
7154 AC_CHECK_LIB(GLU, main, [],
7155 [AC_MSG_ERROR(libGLU not installed or functional)], [])
7157 LDFLAGS=$save_LDFLAGS
7159 dnl ===================================================================
7160 dnl Check for system Mesa
7161 dnl ===================================================================
7162 AC_MSG_CHECKING([which Mesa headers to use])
7163 if test "$with_system_mesa_headers" = "yes"; then
7164 AC_MSG_RESULT([external])
7165 SYSTEM_MESA_HEADERS=YES
7167 AC_CHECK_HEADER(GL/glxext.h, [],
7168 [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
7169 AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
7170 AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
7173 AC_MSG_RESULT([internal])
7174 SYSTEM_MESA_HEADERS=NO
7175 BUILD_TYPE="$BUILD_TYPE MESA"
7178 AC_MSG_RESULT([not on Windows])
7185 AC_SUBST(SYSTEM_MESA_HEADERS)
7186 AC_SUBST(ENABLE_OPENGL)
7188 # presenter minimizer extension?
7189 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
7190 if test "x$enable_ext_presenter_minimizer" != "xno" -a "x$enable_extension_integration" != "xno"; then
7191 AC_MSG_RESULT([yes])
7192 ENABLE_MINIMIZER=YES
7196 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MINIMIZER"
7198 AC_SUBST(ENABLE_MINIMIZER)
7200 # presenter console extension?
7201 AC_MSG_CHECKING([whether to build the Presenter Console extension])
7202 if test "x$enable_ext_presenter_console" != "xno" -a "x$enable_extension_integration" != "xno"; then
7203 AC_MSG_RESULT([yes])
7204 ENABLE_PRESENTER_SCREEN=YES
7207 ENABLE_PRESENTER_SCREEN=NO
7208 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PRESENTER_SCREEN"
7210 AC_SUBST(ENABLE_PRESENTER_SCREEN)
7212 # pdf import extension?
7213 AC_MSG_CHECKING([whether to build the PDF Import extension])
7214 if test "x$enable_ext_pdfimport" != "xno" -a "x$enable_extension_integration" != "xno"; then
7215 AC_MSG_RESULT([yes])
7216 ENABLE_PDFIMPORT=YES
7218 dnl ===================================================================
7219 dnl Check for system poppler
7220 dnl ===================================================================
7221 AC_MSG_CHECKING([which pdf backend to use])
7222 if test "$with_system_poppler" = "yes"; then
7223 AC_MSG_RESULT([external])
7225 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
7227 save_CXXFLAGS=$CXXFLAGS
7228 save_CPPFLAGS=$CPPFLAGS
7229 CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
7230 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
7231 AC_CHECK_HEADER([cpp/poppler-version.h], [],
7232 [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
7233 CXXFLAGS=$save_CXXFLAGS
7234 CPPFLAGS=$save_CPPFLAGS
7237 AC_MSG_RESULT([internal])
7239 BUILD_TYPE="$BUILD_TYPE XPDF"
7244 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PDFIMPORT"
7246 AC_SUBST(ENABLE_PDFIMPORT)
7247 AC_SUBST(SYSTEM_POPPLER)
7248 AC_SUBST(POPPLER_CFLAGS)
7249 AC_SUBST(POPPLER_LIBS)
7252 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
7253 AC_MSG_CHECKING([for sdext module])
7254 BUILD_TYPE="$BUILD_TYPE SDEXT"
7257 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
7258 if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
7259 AC_MSG_RESULT([yes])
7260 AC_MSG_CHECKING([for swext module])
7261 ENABLE_MEDIAWIKI=YES
7262 BUILD_TYPE="$BUILD_TYPE SWEXT"
7263 if test "x$with_java" = "xno"; then
7264 AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
7269 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
7271 AC_SUBST(ENABLE_MEDIAWIKI)
7273 if test "$ENABLE_MEDIAWIKI" = "YES"; then
7274 AC_MSG_CHECKING([which Servlet API Jar to use])
7275 if test "$with_system_servlet_api" = "yes"; then
7276 AC_MSG_RESULT([external])
7277 SYSTEM_SERVLETAPI=YES
7278 if test -z "$SERVLETAPI_JAR"; then
7279 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
7281 AC_CHECK_FILE($SERVLETAPI_JAR, [],
7282 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
7284 AC_MSG_RESULT([internal])
7285 SYSTEM_SERVLETAPI=NO
7286 BUILD_TYPE="$BUILD_TYPE TOMCAT"
7289 AC_SUBST(SYSTEM_SERVLETAPI)
7290 AC_SUBST(SERVLETAPI_JAR)
7292 AC_MSG_CHECKING([whether to build the Report Builder extension])
7293 if test "$enable_ext_report_builder" != "no" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
7294 AC_MSG_RESULT([yes])
7295 ENABLE_REPORTBUILDER=YES
7296 AC_MSG_CHECKING([for reportbuilder module])
7297 AC_MSG_CHECKING([which jfreereport libs to use])
7298 if test "$with_system_jfreereport" = "yes"; then
7299 SYSTEM_JFREEREPORT=YES
7300 AC_MSG_RESULT([external])
7301 if test -z $SAC_JAR; then
7302 SAC_JAR=/usr/share/java/sac.jar
7304 AC_CHECK_FILE($SAC_JAR, [],
7305 [AC_MSG_ERROR(sac.jar not found.)], [])
7307 if test -z $LIBXML_JAR; then
7308 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
7309 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
7311 AC_CHECK_FILE(/usr/share/java/libxml.jar,
7312 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
7313 [AC_MSG_ERROR(libxml.jar replacement not found.)]
7318 AC_CHECK_FILE($LIBXML_JAR, [],
7319 [AC_MSG_ERROR(libxml.jar not found.)], [])
7322 if test -z $FLUTE_JAR; then
7323 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
7324 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
7326 AC_CHECK_FILE(/usr/share/java/flute.jar,
7327 [ FLUTE_JAR=/usr/share/java/flute.jar ],
7328 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
7333 AC_CHECK_FILE($FLUTE_JAR, [],
7334 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
7337 if test -z $JFREEREPORT_JAR; then
7338 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
7339 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
7341 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
7342 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
7343 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
7348 AC_CHECK_FILE($JFREEREPORT_JAR, [],
7349 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
7352 if test -z $LIBLAYOUT_JAR; then
7353 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
7354 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
7356 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
7357 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
7358 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
7363 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
7364 [AC_MSG_ERROR(liblayout.jar not found.)], [])
7367 if test -z $LIBLOADER_JAR; then
7368 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
7369 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
7371 AC_CHECK_FILE(/usr/share/java/libloader.jar,
7372 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
7373 [AC_MSG_ERROR(libloader.jar replacement not found.)]
7378 AC_CHECK_FILE($LIBLOADER_JAR, [],
7379 [AC_MSG_ERROR(libloader.jar not found.)], [])
7382 if test -z $LIBFORMULA_JAR; then
7383 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
7384 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
7386 AC_CHECK_FILE(/usr/share/java/libformula.jar,
7387 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
7388 [AC_MSG_ERROR(libformula.jar replacement not found.)]
7393 AC_CHECK_FILE($LIBFORMULA_JAR, [],
7394 [AC_MSG_ERROR(libformula.jar not found.)], [])
7397 if test -z $LIBREPOSITORY_JAR; then
7398 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
7399 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
7401 AC_CHECK_FILE(/usr/share/java/librepository.jar,
7402 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
7403 [AC_MSG_ERROR(librepository.jar replacement not found.)]
7408 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
7409 [AC_MSG_ERROR(librepository.jar not found.)], [])
7412 if test -z $LIBFONTS_JAR; then
7413 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
7414 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
7416 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
7417 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
7418 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
7423 AC_CHECK_FILE($LIBFONTS_JAR, [],
7424 [AC_MSG_ERROR(libfonts.jar not found.)], [])
7427 if test -z $LIBSERIALIZER_JAR; then
7428 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
7429 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
7431 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
7432 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
7433 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
7438 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
7439 [AC_MSG_ERROR(libserializer.jar not found.)], [])
7443 if test -z $LIBBASE_JAR; then
7444 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
7445 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
7447 AC_CHECK_FILE(/usr/share/java/libbase.jar,
7448 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
7449 [AC_MSG_ERROR(libbase.jar replacement not found.)]
7454 AC_CHECK_FILE($LIBBASE_JAR, [],
7455 [AC_MSG_ERROR(libbase.jar not found.)], [])
7459 AC_MSG_RESULT([internal])
7460 AC_MSG_CHECKING([for jfreereport module])
7461 SYSTEM_JFREEREPORT=NO
7462 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
7464 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
7467 ENABLE_REPORTBUILDER=NO
7468 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN"
7469 SYSTEM_JFREEREPORT=NO
7471 AC_SUBST(ENABLE_REPORTBUILDER)
7472 AC_SUBST(SYSTEM_JFREEREPORT)
7474 AC_SUBST(LIBXML_JAR)
7476 AC_SUBST(JFREEREPORT_JAR)
7477 AC_SUBST(LIBBASE_JAR)
7478 AC_SUBST(LIBLAYOUT_JAR)
7479 AC_SUBST(LIBLOADER_JAR)
7480 AC_SUBST(LIBFORMULA_JAR)
7481 AC_SUBST(LIBREPOSITORY_JAR)
7482 AC_SUBST(LIBFONTS_JAR)
7483 AC_SUBST(LIBSERIALIZER_JAR)
7485 # this has to be here because both the Wiki Publisher and the SRB use
7487 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
7488 AC_MSG_CHECKING([which Apache commons-* libs to use])
7489 if test "$with_system_apache_commons" = "yes"; then
7490 SYSTEM_APACHE_COMMONS=YES
7491 AC_MSG_RESULT([external])
7492 if test "$ENABLE_MEDIAWIKI" = "YES"; then
7493 if test -z $COMMONS_CODEC_JAR; then
7494 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
7495 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
7497 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
7498 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
7499 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
7504 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
7505 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
7508 if test -z $COMMONS_LANG_JAR; then
7509 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
7510 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
7512 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
7513 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
7514 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
7519 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
7520 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
7523 if test -z $COMMONS_HTTPCLIENT_JAR; then
7524 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
7525 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
7527 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
7528 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
7529 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
7534 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
7535 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
7538 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
7539 if test -z $COMMONS_LOGGING_JAR; then
7540 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
7541 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
7543 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
7544 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
7545 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
7550 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
7551 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
7555 AC_MSG_RESULT([internal])
7556 SYSTEM_APACHE_COMMONS=NO
7557 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
7560 AC_SUBST(SYSTEM_APACHE_COMMONS)
7561 AC_SUBST(COMMONS_CODEC_JAR)
7562 AC_SUBST(COMMONS_LANG_JAR)
7563 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
7564 AC_SUBST(COMMONS_LOGGING_JAR)
7566 # scripting provider for BeanShell extension?
7567 AC_MSG_CHECKING([whether to build extension for support of scripts in BeanShell])
7568 if test "x$enable_ext_scripting_beanshell" = "xyes" -a "x$enable_extension_integration" != "xno"; then
7569 AC_MSG_RESULT([yes])
7570 ENABLE_SCRIPTING_BEANSHELL=YES
7573 ENABLE_SCRIPTING_BEANSHELL=NO
7574 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_BEANSHELL"
7576 AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
7578 # scripting provider for JavaScript extension?
7579 AC_MSG_CHECKING([whether to build extension for support of scripts in JavaScript])
7580 if test "x$enable_ext_scripting_javascript" = "xyes" -a "x$enable_extension_integration" != "xno"; then
7581 AC_MSG_RESULT([yes])
7582 ENABLE_SCRIPTING_JAVASCRIPT=YES
7585 ENABLE_SCRIPTING_JAVASCRIPT=NO
7586 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_JAVASCRIPT"
7588 AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
7590 dnl Scripting provider for Python extension?
7591 dnl We always provide this unless we have disabled Python completely
7592 if test $enable_python = no; then
7593 ENABLE_SCRIPTING_PYTHON=NO
7595 ENABLE_SCRIPTING_PYTHON=YES
7597 AC_SUBST(ENABLE_SCRIPTING_PYTHON)
7601 x86_64 | powerpc64 | s390x)
7602 if test "$SIZEOF_LONG" = "8"; then
7603 supports_multilib="yes"
7610 dnl ===================================================================
7611 dnl Check whether the Qt3 and KDE3 libraries are available.
7612 dnl ===================================================================
7616 if test "$_os" != "OpenBSD"; then
7619 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
7620 dnl Search paths for Qt3 and KDE3
7621 if test -z "$supports_multilib" ; then
7622 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"
7623 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"
7625 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"
7626 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"
7628 if test -n "$QTDIR" ; then
7629 qt_incdirs="$QTDIR/include $qt_incdirs"
7630 if test -z "$supports_multilib" ; then
7631 qt_libdirs="$QTDIR/lib $qt_libdirs"
7633 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
7636 if test -z "$supports_multilib" ; then
7637 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"
7638 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"
7640 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"
7641 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"
7643 if test -n "$KDEDIR" ; then
7644 kde_incdirs="$KDEDIR/include $kde_incdirs"
7645 if test -z "$supports_multilib" ; then
7646 kde_libdirs="$KDEDIR/lib $kde_libdirs"
7648 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
7653 qt_test_include="qstyle.h"
7654 kde_test_include="kapp.h"
7656 if test "$_os" != "OpenBSD"; then
7657 qt_test_library="libqt-mt.so"
7658 kde_test_library="libDCOP.so"
7660 qt_test_library="libqt-mt.so*"
7661 kde_test_library="libDCOP.so*"
7664 dnl Check for Qt3 headers
7665 AC_MSG_CHECKING([for Qt3 headers])
7667 for kde_check in $qt_incdirs ; do
7668 if test -r "$kde_check/$qt_test_include" ; then
7669 qt_incdir="$kde_check"
7673 AC_MSG_RESULT([$qt_incdir])
7674 if test "x$qt_incdir" = "xno" ; then
7675 AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
7676 your Qt3 installation by exporting QTDIR before running "configure".])
7679 dnl Check for Qt3 libraries
7680 AC_MSG_CHECKING([for Qt3 libraries])
7682 for qt_check in $qt_libdirs ; do
7683 if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`" ; then
7684 qt_libdir="$qt_check"
7688 AC_MSG_RESULT([$qt_libdir])
7689 if test "x$qt_libdir" = "xno" ; then
7690 AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
7691 your Qt3 installation by exporting QTDIR before running "configure".])
7694 dnl Check for Meta Object Compiler
7695 AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
7696 if test "$MOC" = "no" ; then
7697 AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
7698 the root of your Qt3 installation by exporting QTDIR before running "configure".])
7701 dnl Check for KDE3 headers
7702 AC_MSG_CHECKING([for KDE3 headers])
7704 for kde_check in $kde_incdirs ; do
7705 if test -r "$kde_check/$kde_test_include" ; then
7706 kde_incdir="$kde_check"
7710 AC_MSG_RESULT([$kde_incdir])
7711 if test "x$kde_incdir" = "xno" ; then
7712 AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
7713 your KDE3 installation by exporting KDEDIR before running "configure".])
7716 dnl Check for KDE3 libraries
7717 AC_MSG_CHECKING([for KDE3 libraries])
7719 for kde_check in $kde_libdirs ; do
7720 if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`" ; then
7721 kde_libdir="$kde_check"
7725 AC_MSG_RESULT([$kde_libdir])
7726 if test "x$kde_libdir" = "xno" ; then
7727 AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
7728 your KDE3 installation by exporting KDEDIR before running "configure".])
7731 dnl Set the variables
7732 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
7733 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
7735 AC_SUBST(KDE_CFLAGS)
7739 dnl ===================================================================
7740 dnl KDE4 Integration
7741 dnl ===================================================================
7749 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
7750 qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
7751 qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
7753 kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
7754 kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
7756 if test -n "$supports_multilib" ; then
7757 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
7758 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
7761 if test -n "$QTDIR" ; then
7762 qt_incdirs="$QTDIR/include $qt_incdirs"
7763 if test -z "$supports_multilib" ; then
7764 qt_libdirs="$QTDIR/lib $qt_libdirs"
7766 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
7769 if test -n "$QT4DIR" ; then
7770 qt_incdirs="$QT4DIR/include $qt_incdirs"
7771 if test -z "$supports_multilib" ; then
7772 qt_libdirs="$QT4DIR/lib $qt_libdirs"
7774 qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
7778 if test -n "$KDEDIR" ; then
7779 kde_incdirs="$KDEDIR/include $kde_incdirs"
7780 if test -z "$supports_multilib" ; then
7781 kde_libdirs="$KDEDIR/lib $kde_libdirs"
7783 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
7786 if test -n "$KDE4DIR" ; then
7787 kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
7788 if test -z "$supports_multilib" ; then
7789 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
7791 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
7795 qt_test_include="Qt/qobject.h"
7796 qt_test_library="libQtCore.so"
7797 kde_test_include="kwindowsystem.h"
7798 kde_test_library="libsolid.so"
7800 AC_MSG_CHECKING([for Qt4 headers])
7802 for inc_dir in $qt_incdirs ; do
7803 if test -r "$inc_dir/$qt_test_include" ; then
7804 qt_header_dir="$inc_dir"
7809 AC_MSG_RESULT([$qt_header_dir])
7810 if test "x$qt_header_dir" = "xno" ; then
7811 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
7814 AC_MSG_CHECKING([for Qt4 libraries])
7816 for lib_dir in $qt_libdirs ; do
7817 if test -r "$lib_dir/$qt_test_library" ; then
7818 qt_lib_dir="$lib_dir"
7819 PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
7824 AC_MSG_RESULT([$qt_lib_dir])
7826 if test "x$qt_lib_dir" = "xno" ; then
7827 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
7830 dnl Check for Meta Object Compiler
7832 AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7834 if test "$MOC4" = "no" ; then
7835 AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7836 if test "$MOC4" = "no" ; then
7837 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
7838 the root of your Qt installation by exporting QT4DIR before running "configure".])
7842 dnl Check for KDE4 headers
7843 AC_MSG_CHECKING([for KDE4 headers])
7845 for kde_check in $kde_incdirs ; do
7846 if test -r "$kde_check/$kde_test_include" ; then
7847 kde_incdir="$kde_check"
7851 AC_MSG_RESULT([$kde_incdir])
7852 if test "x$kde_incdir" = "xno" ; then
7853 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
7856 dnl Check for KDE4 libraries
7857 AC_MSG_CHECKING([for KDE4 libraries])
7859 for kde_check in $kde_libdirs ; do
7860 if test -r "$kde_check/$kde_test_library" ; then
7861 kde_libdir="$kde_check"
7866 AC_MSG_RESULT([$kde_libdir])
7867 if test "x$kde_libdir" = "xno" ; then
7868 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
7871 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
7872 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
7875 save_CXXFLAGS=$CXXFLAGS
7876 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
7877 AC_MSG_CHECKING([whether KDE is >= 4.2])
7878 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7879 #include <kdeversion.h>
7881 int main(int argc, char **argv) {
7882 if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
7885 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
7886 CXXFLAGS=$save_CXXFLAGS
7889 # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled
7890 PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
7892 AC_MSG_WARN([[No Glib found, KDE4 support will not integrate with Qt's Glib event loop support]]))
7894 AC_SUBST(KDE4_CFLAGS)
7897 AC_SUBST(KDE_GLIB_CFLAGS)
7898 AC_SUBST(KDE_GLIB_LIBS)
7899 AC_SUBST(KDE_HAVE_GLIB)
7901 dnl ===================================================================
7902 dnl Test for the enabling the lockdown pieces
7903 dnl ===================================================================
7904 AC_MSG_CHECKING([whether to enable the lockdown pieces])
7906 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
7908 AC_MSG_RESULT([yes])
7912 AC_SUBST(ENABLE_LOCKDOWN)
7914 dnl ===================================================================
7915 dnl Test whether to include Evolution 2 support
7916 dnl ===================================================================
7917 AC_MSG_CHECKING([whether to enable evolution 2 support])
7918 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
7919 AC_MSG_RESULT([yes])
7920 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
7921 ENABLE_EVOAB2="TRUE"
7926 AC_SUBST(ENABLE_EVOAB2)
7927 AC_SUBST(GOBJECT_CFLAGS)
7928 AC_SUBST(GOBJECT_LIBS)
7930 dnl ===================================================================
7931 dnl Test whether to include KDE AB support
7932 dnl ===================================================================
7933 AC_MSG_CHECKING([whether to enable KDE address book support])
7934 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
7935 AC_MSG_RESULT([yes])
7937 save_CXXFLAGS=$CXXFLAGS
7938 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
7939 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
7940 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7941 #include <kdeversion.h>
7943 int main(int argc, char **argv) {
7944 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
7947 ]])],[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])],[])
7948 CXXFLAGS=$save_CXXFLAGS
7955 AC_SUBST(ENABLE_KAB)
7957 dnl ===================================================================
7958 dnl Test whether to include MathMLDTD
7959 dnl ===================================================================
7960 AC_MSG_CHECKING([whether to include MathMLDTD])
7961 if test -n "$enable_mathmldtd"; then
7962 if test "$enable_mathmldtd" = "no"; then
7964 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
7966 AC_MSG_RESULT([yes])
7967 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
7971 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
7974 dnl ===================================================================
7975 dnl Test which themes to include
7976 dnl ===================================================================
7977 AC_MSG_CHECKING([which themes to include])
7978 # if none given, use all available themes
7979 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
7980 with_theme="default crystal hicontrast oxygen tango"
7984 for theme in $with_theme; do
7986 default|crystal|hicontrast|oxygen|tango) : ;;
7987 *) AC_MSG_ERROR([Unknown value for --with-themes: $theme]) ;;
7989 WITH_THEMES="$WITH_THEMES $theme"
7990 SCPDEFS="$SCPDEFS -DTHEME_`echo $theme|tr '[[:lower:]]' '[[:upper:]]'`"
7992 AC_MSG_RESULT([$WITH_THEMES])
7993 AC_SUBST([WITH_THEMES])
7995 dnl ===================================================================
7996 dnl Test whether to integrate helppacks into the product's installer
7997 dnl ===================================================================
7998 AC_MSG_CHECKING([for helppack integration])
7999 if test "z$with_helppack_integration" = "zno" ; then
8000 WITH_HELPPACK_INTEGRATION=NO
8001 AC_MSG_RESULT([no integration])
8003 WITH_HELPPACK_INTEGRATION=YES
8004 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
8005 AC_MSG_RESULT([integration])
8007 AC_SUBST(WITH_HELPPACK_INTEGRATION)
8009 ###############################################################################
8010 # Extensions checking
8011 ###############################################################################
8012 dnl ===================================================================
8013 dnl Test whether to integrate extensions into the product's installer
8014 dnl ===================================================================
8015 AC_MSG_CHECKING([for extensions integration])
8016 if test "x$enable_extension_integration" != "xno"; then
8017 WITH_EXTENSION_INTEGRATION=YES
8018 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
8019 AC_MSG_RESULT([yes, use integration])
8021 WITH_EXTENSION_INTEGRATION=NO
8022 AC_MSG_RESULT([no, do not integrate])
8024 AC_SUBST(WITH_EXTENSION_INTEGRATION)
8026 dnl ===================================================================
8027 dnl Test whether to include Lightproof extensions
8028 dnl ===================================================================
8029 AC_MSG_CHECKING([for Lightproof extensions integration (only supported languages displayed)])
8033 LIGHTPROOF_EN_US_PACK=
8034 if test "x$enable_ext_lightproof" = "xno" -o "x$enable_extension_integration" = "xno"; then
8035 AC_MSG_RESULT([no integration])
8037 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LIGHTPROOF"
8038 if test "x$enable_ext_lightproof" = "xyes" -o "x$enable_ext_lightproof" = "x"; then
8039 wanted_lightproof="en-US hu ru"
8041 for lang in $enable_ext_lightproof ; do
8044 wanted_lightproof="$wanted_lightproof $lang"
8047 AC_MSG_ERROR([Unknown value for --enable-ext-lightproof: $lang])
8052 for lang in $wanted_lightproof ; do
8053 LIGHTPROOF_LANG="$LIGHTPROOF_LANG $lang"
8055 en-US) LIGHTPROOF_EN_US_PACK="0ab55ac8e88f04258f1d3e79e984382f-lightproof-en_US-0.1.oxt" ;;
8056 hu) LIGHTPROOF_HU_PACK="76345f925e34fef2d29bade4f29108e9-lightproof-hu_1.3.oxt" ;;
8057 ru) LIGHTPROOF_RU_PACK="673860e8649cff2ebdc68bd46f2f7f1a-lightproof-ru_0.1.oxt" ;;
8058 *) AC_MSG_ERROR([Unknown value for --enable-ext-lightproof: $lang]) ;;
8061 AC_MSG_RESULT([$LIGHTPROOF_LANG])
8063 AC_SUBST(LIGHTPROOF_LANG)
8064 AC_SUBST(LIGHTPROOF_HU_PACK)
8065 AC_SUBST(LIGHTPROOF_RU_PACK)
8066 AC_SUBST(LIGHTPROOF_EN_US_PACK)
8068 dnl ===================================================================
8069 dnl Test whether to include Watch Window extension
8070 dnl ===================================================================
8071 AC_MSG_CHECKING([for Watch Window extension integration])
8072 WATCH_WINDOW_EXTENSION_PACK=
8073 if test "x$enable_ext_watch_window" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8074 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_WATCH_WINDOW"
8075 WATCH_WINDOW_EXTENSION_PACK="23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt"
8076 AC_MSG_RESULT([yes])
8080 AC_SUBST(WATCH_WINDOW_EXTENSION_PACK)
8082 dnl ===================================================================
8083 dnl Test whether to include SmART Gallery (Diagram) extension
8084 dnl ===================================================================
8085 AC_MSG_CHECKING([for SmART Gallery (Diagram) extension integration])
8086 DIAGRAM_EXTENSION_PACK=
8087 if test "x$enable_ext_diagram" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8088 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_DIAGRAM"
8089 DIAGRAM_EXTENSION_PACK="4a433efb6d385264ebc1d5513782d51c-SmART_0.9.4.oxt"
8090 AC_MSG_RESULT([yes])
8094 AC_SUBST(DIAGRAM_EXTENSION_PACK)
8096 dnl ===================================================================
8097 dnl Test whether to include Validator extension
8098 dnl ===================================================================
8099 AC_MSG_CHECKING([for Validator extension integration])
8100 VALIDATOR_EXTENSION_PACK=
8101 if test "x$enable_ext_validator" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8102 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_VALIDATOR"
8103 VALIDATOR_EXTENSION_PACK="bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt"
8104 AC_MSG_RESULT([yes])
8108 AC_SUBST(VALIDATOR_EXTENSION_PACK)
8110 dnl ===================================================================
8111 dnl Test whether to include Barcode extension
8112 dnl ===================================================================
8113 AC_MSG_CHECKING([for Barcode extension integration])
8114 BARCODE_EXTENSION_PACK=
8115 if test "x$enable_ext_barcode" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8116 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_BARCODE"
8117 BARCODE_EXTENSION_PACK="7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt"
8118 AC_MSG_RESULT([yes])
8122 AC_SUBST([BARCODE_EXTENSION_PACK])
8124 dnl ===================================================================
8125 dnl Test whether to include ConvertTextToNumber extension
8126 dnl ===================================================================
8127 AC_MSG_CHECKING([for ConvertTextToNumber extension integration])
8128 CT2N_EXTENSION_PACK=
8129 if test "x$enable_ext_ct2n" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8130 BUILD_TYPE="$BUILD_TYPE CT2N"
8131 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N"
8132 CT2N_EXTENSION_PACK="451ccf439a36a568653b024534669971-ConvertTextToNumber_1.3.2.oxt"
8133 AC_MSG_RESULT([yes])
8137 AC_SUBST(CT2N_EXTENSION_PACK)
8139 dnl ===================================================================
8140 dnl Test whether to include Numbertext extension
8141 dnl ===================================================================
8142 AC_MSG_CHECKING([for Numbertext extension integration])
8143 NUMBERTEXT_EXTENSION_PACK=
8144 if test "x$enable_ext_numbertext" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8145 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NUMBERTEXT"
8146 NUMBERTEXT_EXTENSION_PACK="b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt"
8147 AC_MSG_RESULT([yes])
8151 AC_SUBST(NUMBERTEXT_EXTENSION_PACK)
8153 dnl ===================================================================
8154 dnl Test whether to include Hungarian Cross-reference Toolbar extension
8155 dnl ===================================================================
8156 AC_MSG_CHECKING([for Hungarian Cross-reference Toolbar extension integration])
8157 HUNART_EXTENSION_PACK=
8158 if test "x$enable_ext_hunart" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8159 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_HUNART"
8160 HUNART_EXTENSION_PACK="b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt"
8161 AC_MSG_RESULT([yes])
8165 AC_SUBST(HUNART_EXTENSION_PACK)
8167 dnl ===================================================================
8168 dnl Test whether to include Typography Toolbar extension
8169 dnl ===================================================================
8170 AC_MSG_CHECKING([for Typography Toolbar extension integration])
8171 TYPO_EXTENSION_PACK=
8172 if test "x$enable_ext_typo" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8173 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_TYPO"
8174 TYPO_EXTENSION_PACK="9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt"
8175 AC_MSG_RESULT([yes])
8179 AC_SUBST(TYPO_EXTENSION_PACK)
8181 dnl ===================================================================
8182 dnl Test whether to include Google Docs extension
8183 dnl ===================================================================
8184 AC_MSG_CHECKING([for Google Docs extension integration])
8185 GOOGLE_DOCS_EXTENSION_PACK=
8186 if test "x$enable_ext_google_docs" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8187 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_GOOGLE_DOCS"
8188 GOOGLE_DOCS_EXTENSION_PACK="cea0f63d5985ba4fcbd882031df44346-gdocs_3.0.0_modified.oxt"
8189 AC_MSG_RESULT([yes])
8193 AC_SUBST(GOOGLE_DOCS_EXTENSION_PACK)
8195 dnl ===================================================================
8196 dnl Test whether to include NLPSolver extension
8197 dnl ===================================================================
8198 AC_MSG_CHECKING([for NLPSolver extension integration])
8199 if test "x$enable_ext_nlpsolver" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8200 BUILD_TYPE="$BUILD_TYPE NLPSOLVER"
8201 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER"
8202 AC_MSG_RESULT([yes])
8207 dnl ===================================================================
8208 dnl Test whether to include LanguageTool extension
8209 dnl ===================================================================
8210 AC_MSG_CHECKING([for LanguageTool extension integration])
8211 if test "x$enable_ext_languagetool" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8212 BUILD_TYPE="$BUILD_TYPE LANGUAGETOOL"
8213 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL"
8214 AC_MSG_RESULT([yes])
8219 dnl ===================================================================
8220 dnl Test whether to include oooblogger extension
8221 dnl ===================================================================
8222 AC_MSG_CHECKING([for oooblogger extension integration])
8223 OOOBLOGGER_EXTENSION_PACK=
8224 if test "x$enable_ext_oooblogger" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8225 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_OOOBLOGGER"
8226 OOOBLOGGER_EXTENSION_PACK="b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt"
8227 AC_MSG_RESULT([yes])
8231 AC_SUBST(OOOBLOGGER_EXTENSION_PACK)
8232 ###############################################################################
8234 dnl ===================================================================
8235 dnl Test whether to include Sun Professional Template Pack
8236 dnl ===================================================================
8237 AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
8238 if test "z$with_sun_templates" = "z" -o "z$with_sun_templates" = "zno" ; then
8239 SUNTEMPLATES_LANG=""
8240 AC_MSG_RESULT([no integration])
8242 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
8243 sun_supported_langs="en-US de it fr es hu"
8244 if test "z$with_sun_templates" = "zyes" ; then
8245 wanted_sun_templates="$sun_supported_langs"
8247 # check whether the langs are supported by Sun
8248 wanted_sun_templates=
8249 for lang in $with_sun_templates ; do
8250 if test -n "`echo $sun_supported_langs | grep "$lang"`" ; then
8251 wanted_sun_templates="$wanted_sun_templates $lang"
8256 SUNTEMPLATES_DE_PACK=
8257 SUNTEMPLATES_EN_US_PACK=
8258 SUNTEMPLATES_ES_PACK=
8259 SUNTEMPLATES_FR_PACK=
8260 SUNTEMPLATES_HU_PACK=
8261 SUNTEMPLATES_IT_PACK=
8262 # check whether the langs are requested at all
8263 for lang in $wanted_sun_templates ; do
8264 if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then
8265 SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
8267 "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
8268 "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
8269 "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
8270 "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
8271 "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
8272 "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
8276 AC_MSG_RESULT([$SUNTEMPLATES_LANG])
8278 AC_SUBST(SUNTEMPLATES_LANG)
8279 AC_SUBST(SUNTEMPLATES_DE_PACK)
8280 AC_SUBST(SUNTEMPLATES_EN_US_PACK)
8281 AC_SUBST(SUNTEMPLATES_ES_PACK)
8282 AC_SUBST(SUNTEMPLATES_FR_PACK)
8283 AC_SUBST(SUNTEMPLATES_HU_PACK)
8284 AC_SUBST(SUNTEMPLATES_IT_PACK)
8286 dnl ===================================================================
8287 dnl Test whether to include fonts
8288 dnl ===================================================================
8289 AC_MSG_CHECKING([whether to include third-party fonts])
8290 if test "$with_fonts" != "no" ; then
8291 AC_MSG_RESULT([yes])
8293 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
8297 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
8299 AC_SUBST(WITH_FONTS)
8301 AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
8302 if test "$with_agfa_monotype_fonts" = "yes" ; then
8303 AC_MSG_RESULT([yes])
8304 WITH_AGFA_MONOTYPE_FONTS=YES
8305 SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
8306 BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
8309 WITH_AGFA_MONOTYPE_FONTS=NO
8311 AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
8313 dnl ===================================================================
8314 dnl Test whether to include ppds
8315 dnl ===================================================================
8316 AC_MSG_CHECKING([whether to include PPDs])
8317 if test "$with_ppds" != "no"; then
8318 AC_MSG_RESULT([yes])
8322 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
8324 AC_SUBST(WITHOUT_PPDS)
8326 dnl ===================================================================
8327 dnl Test whether to include afms
8328 dnl ===================================================================
8329 AC_MSG_CHECKING([whether to include AFMs])
8330 if test "$with_afms" != "no"; then
8331 AC_MSG_RESULT([yes])
8332 BUILD_TYPE="$BUILD_TYPE AFMS"
8336 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
8338 AC_SUBST(WITHOUT_AFMS)
8340 dnl ===================================================================
8341 dnl Test whether to include extra galleries
8342 dnl ===================================================================
8343 AC_MSG_CHECKING([whether to include extra galleries])
8344 if test "z$enable_extra_gallery" = "z" -o "z$enable_extra_gallery" = "zno" ; then
8346 WITH_EXTRA_GALLERY=NO
8347 OOOP_GALLERY_PACK=""
8349 AC_MSG_RESULT([yes])
8350 WITH_EXTRA_GALLERY=YES
8351 BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
8352 SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
8353 OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
8355 AC_SUBST(WITH_EXTRA_GALLERY)
8356 AC_SUBST(OOOP_GALLERY_PACK)
8358 dnl ===================================================================
8359 dnl Test whether to include extra templates
8360 dnl ===================================================================
8361 AC_MSG_CHECKING([whether to include extra templates])
8362 if test "z$enable_extra_template" = "z" -o "z$enable_extra_template" = "zno" ; then
8364 WITH_EXTRA_TEMPLATE=NO
8365 OOOP_TEMPLATES_PACK=""
8367 AC_MSG_RESULT([yes])
8368 WITH_EXTRA_TEMPLATE=YES
8369 BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
8370 SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
8371 OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
8373 AC_SUBST(WITH_EXTRA_TEMPLATE)
8374 AC_SUBST(OOOP_TEMPLATES_PACK)
8376 dnl ===================================================================
8377 dnl Test whether to include extra samples
8378 dnl ===================================================================
8379 AC_MSG_CHECKING([whether to include extra samples])
8380 if test "z$enable_extra_sample" = "z" -o "z$enable_extra_sample" = "zno" ; then
8382 WITH_EXTRA_SAMPLE=NO
8383 OOOP_SAMPLES_PACK=""
8385 AC_MSG_RESULT([yes])
8386 WITH_EXTRA_SAMPLE=YES
8387 BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
8388 SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
8389 OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
8391 AC_SUBST(WITH_EXTRA_SAMPLE)
8392 AC_SUBST(OOOP_SAMPLES_PACK)
8394 dnl ===================================================================
8395 dnl Test whether to include extra fonts
8396 dnl ===================================================================
8397 AC_MSG_CHECKING([whether to include extra fonts])
8398 if test "z$enable_extra_font" = "z" -o "z$enable_extra_font" = "zno" ; then
8403 AC_MSG_RESULT([yes])
8405 BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
8406 SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
8407 OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
8409 AC_SUBST(WITH_EXTRA_FONT)
8410 AC_SUBST(OOOP_FONTS_PACK)
8412 dnl ===================================================================
8413 dnl Test whether to build global menu support
8414 dnl ===================================================================
8415 AC_MSG_CHECKING([whether to build global menu support])
8416 if test "z$enable_lomenubar" = "z" -o "z$enable_lomenubar" = "zno" ; then
8418 ENABLE_LOMENUBAR="FALSE"
8420 AC_MSG_RESULT([yes])
8421 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]))
8422 ENABLE_LOMENUBAR="TRUE"
8424 AC_SUBST(ENABLE_LOMENUBAR)
8426 dnl ===================================================================
8427 dnl Test whether to enable online update service
8428 dnl ===================================================================
8429 AC_MSG_CHECKING([whether to enable online update])
8430 ENABLE_ONLINE_UPDATE=
8431 if test "z$enable_online_update" = "z" ; then
8432 if test "$_os" = "WINNT" -o "$_os" = "Darwin" ; then
8433 AC_MSG_RESULT([yes])
8434 ENABLE_ONLINE_UPDATE="TRUE"
8439 if test "z$enable_online_update" = "zyes" ; then
8440 AC_MSG_RESULT([yes])
8441 ENABLE_ONLINE_UPDATE="TRUE"
8446 AC_SUBST(ENABLE_ONLINE_UPDATE)
8448 dnl ===================================================================
8449 dnl Test whether build target is Release Build
8450 dnl ===================================================================
8451 AC_MSG_CHECKING([whether build target is Release Build])
8452 if test "z$enable_release_build" = "z" -o "z$enable_release_build" = "zno" ; then
8454 ENABLE_RELEASE_BUILD="FALSE"
8456 AC_MSG_RESULT([yes])
8457 ENABLE_RELEASE_BUILD="TRUE"
8459 AC_SUBST(ENABLE_RELEASE_BUILD)
8461 dnl ===================================================================
8462 dnl Test whether to create MSI with LIMITUI=1 (silent install)
8463 dnl ===================================================================
8464 AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
8465 if test "z$enable_silent_msi" = "z" -o "z$enable_silent_msi" = "zno" ; then
8467 ENABLE_SILENT_MSI="FALSE"
8469 AC_MSG_RESULT([yes])
8470 ENABLE_SILENT_MSI="TRUE"
8471 SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
8473 AC_SUBST(ENABLE_SILENT_MSI)
8475 dnl ===================================================================
8476 dnl Test whether to enable ActiveX embedding
8477 dnl ===================================================================
8478 if test "$_os" = "WINNT"; then
8479 AC_MSG_CHECKING([whether to enable ActiveX embedding of LibreOffice components])
8480 if test "$enable_activex_component" = "yes" -o "$enable_activex_component" = "TRUE" -o "$enable_activex_component" = ""; then
8481 ENABLE_ACTIVEX_COMPONENT="TRUE"
8482 AC_MSG_RESULT([yes])
8483 SCPDEFS="$SCPDEFS -DWITH_ACTIVEX_COMPONENT"
8485 ENABLE_ACTIVEX_COMPONENT=""
8488 AC_SUBST(ENABLE_ACTIVEX_COMPONENT)
8492 AC_MSG_CHECKING([whether and how to use Xinerama])
8493 if test "$_os" = "Darwin"; then
8495 XINERAMA_LINK=dynamic
8496 AC_MSG_RESULT([yes])
8497 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
8498 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
8499 # we have both versions, let the user decide but use the dynamic one
8502 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
8503 XINERAMA_LINK=dynamic
8505 XINERAMA_LINK=static
8507 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
8508 # we have only the dynamic version
8510 XINERAMA_LINK=dynamic
8511 elif test -e "$XLIB/libXinerama.a"; then
8513 if echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
8515 XINERAMA_LINK=static
8525 if test "$USE_XINERAMA" = "YES"; then
8526 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
8527 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
8528 [AC_MSG_ERROR(Xinerama header not found.)], [])
8529 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
8530 if test "$_os" = "FreeBSD"; then
8531 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
8533 if test "$_os" = "Linux"; then
8534 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
8536 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
8537 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
8539 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
8546 AC_SUBST(USE_XINERAMA)
8547 AC_SUBST(XINERAMA_LINK)
8549 dnl ===================================================================
8550 dnl Checks for librsvg
8551 dnl ===================================================================
8553 dnl ENABLE_LIBRSVG is set to "" (for NO), SYSTEM or INTERNAL. The
8554 dnl SYSTEM_LIBRSVG, SYSTEM_GDKPIXBUF etc are redundant.
8560 AC_MSG_CHECKING([what librsvg to use])
8562 case "$enable_librsvg" in
8564 AC_MSG_RESULT([none])
8569 if test $build_os = cygwin -o \
8571 dnl When building on/for these OSes always use the internal one,
8572 dnl if at all. Add more OSes above as needed.
8573 AC_MSG_RESULT([internal])
8574 enable_librsvg=internal
8575 elif test $_os = iOS -o $_os = Android; then
8576 AC_MSG_RESULT([none])
8579 if test "$with_system_libs" = yes; then
8580 AC_MSG_RESULT([system])
8581 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
8582 enable_librsvg=system
8583 elif test "$with_system_libs" = no; then
8584 AC_MSG_RESULT([internal])
8585 enable_librsvg=internal
8587 AC_MSG_RESULT([checking further])
8588 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14,, [:])
8589 if test -z "$LIBRSVG_PKG_ERRORS"; then
8590 enable_librsvg=system
8592 enable_librsvg=internal
8599 AC_MSG_RESULT([internal])
8603 if test $_os = WINNT -a "$WITH_MINGW" != yes; then
8604 AC_MSG_ERROR([Must use internal librsvg when building with MSVC])
8606 AC_MSG_RESULT([system])
8607 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
8611 AC_MSG_ERROR([Incorrect --enable-librsvg option])
8615 dnl By now enable_librsvg should be "system", "internal" or "no"
8616 case $enable_librsvg in
8618 ENABLE_LIBRSVG=SYSTEM
8623 ENABLE_LIBRSVG=INTERNAL
8625 BUILD_TYPE="$BUILD_TYPE LIBRSVG"
8634 AC_MSG_ERROR([Internal configure script error, invalid enable_librsvg value "$enable_librsvg"])
8638 AC_SUBST(ENABLE_LIBRSVG)
8639 AC_SUBST(LIBRSVG_CFLAGS)
8640 AC_SUBST(LIBRSVG_LIBS)
8641 AC_SUBST(SYSTEM_LIBRSVG)
8643 dnl ===================================================================
8644 dnl Test whether to build cairo or rely on the system version
8645 dnl ===================================================================
8650 AC_MSG_CHECKING([whether to use the system cairo])
8652 if test "$with_system_cairo" = "yes"; then
8654 AC_MSG_RESULT([yes])
8656 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
8658 if test "$test_xrender" = "yes"; then
8659 if test "$with_system_xextensions_headers" != "no"; then
8660 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
8662 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
8663 #ifdef PictStandardA8
8667 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
8672 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libfontconfig-1.dll libfreetype-6.dll libpixman-1-0.dll libpng15-15.dll libcairo-2.dll"
8676 if test $_os = Android; then
8677 dnl For Android cairo isn't
8680 elif test $_os = WINNT; then
8681 dnl We only need cairo for Windows if we
8682 dnl build librsvg or directx disabled
8683 if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
8684 BUILD_TYPE="$BUILD_TYPE CAIRO"
8687 BUILD_TYPE="$BUILD_TYPE CAIRO"
8691 AC_SUBST(SYSTEM_CAIRO)
8692 AC_SUBST(CAIRO_CFLAGS)
8693 AC_SUBST(CAIRO_LIBS)
8696 dnl ===================================================================
8697 dnl Test whether to build gdk-pixbuf or rely on the system version
8698 dnl ===================================================================
8700 AC_MSG_CHECKING([whether to use the system gdk-pixbuf])
8702 dnl As long as the only thing we need gdk-pixbuf for is below
8703 dnl librsvg, use the same --enable-librsvg (possibly implied
8704 dnl by --with-system-libs) to override this.
8706 if test "$SYSTEM_LIBRSVG" = YES; then
8707 SYSTEM_GDKPIXBUF=YES
8708 AC_MSG_RESULT([yes])
8711 WINNT|Darwin|iOS|Android)
8716 SYSTEM_GDKPIXBUF=YES
8717 AC_MSG_RESULT([yes])
8721 AC_SUBST(SYSTEM_GDKPIXBUF)
8723 dnl ===================================================================
8724 dnl Test whether to build GLib or rely on the system version
8725 dnl ===================================================================
8727 AC_MSG_CHECKING([whether to use the system GLib])
8729 dnl As long as the only thing we need GLib for is below
8730 dnl librsvg, use the same --enable-librsvg (possibly implied
8731 dnl by --with-system-libs) to override this.
8733 if test "$SYSTEM_LIBRSVG" = YES; then
8735 AC_MSG_RESULT([yes])
8738 WINNT|Darwin|iOS|Android)
8744 AC_MSG_RESULT([yes])
8748 AC_SUBST(SYSTEM_GLIB)
8750 dnl ===================================================================
8751 dnl Test whether to build gettext runtime (libintl) or rely on the
8753 dnl ===================================================================
8755 AC_MSG_CHECKING([whether to use the system gettext runtime])
8757 if test "$with_system_gettext" = yes; then
8759 AC_MSG_RESULT([yes])
8762 WINNT|Darwin|iOS|Android)
8768 AC_MSG_RESULT([yes])
8772 AC_SUBST(SYSTEM_GETTEXT)
8774 dnl ===================================================================
8775 dnl Test whether to build libcroco or rely on the system version
8776 dnl ===================================================================
8778 AC_MSG_CHECKING([whether to use the system libcroco])
8780 dnl As long as the only thing we need libcroco for is below
8781 dnl librsvg, use the same --enable-librsvg (possibly implied
8782 dnl by --with-system-libs) to override this.
8784 if test "$SYSTEM_LIBRSVG" = YES; then
8786 AC_MSG_RESULT([yes])
8789 WINNT|Darwin|iOS|Android)
8795 AC_MSG_RESULT([yes])
8799 AC_SUBST(SYSTEM_LIBCROCO)
8801 dnl ===================================================================
8802 dnl Test whether to build Pango or rely on the system version
8803 dnl ===================================================================
8805 AC_MSG_CHECKING([whether to use the system pango])
8807 dnl As long as the only thing we need Pango for is below
8808 dnl librsvg, use the same --enable-librsvg (possibly implied
8809 dnl by --with-system-libs) to override this.
8811 if test "$SYSTEM_LIBRSVG" = YES; then
8813 AC_MSG_RESULT([yes])
8816 WINNT|Darwin|iOS|Android)
8822 AC_MSG_RESULT([yes])
8826 AC_SUBST(SYSTEM_PANGO)
8828 dnl ===================================================================
8829 dnl Test whether to build libgsf or rely on the system version
8830 dnl ===================================================================
8832 AC_MSG_CHECKING([whether to use the system libgsf])
8834 dnl As long as the only thing we need libgsf for is below librsvg (is
8835 dnl it?), use the same --enable-librsvg (possibly implied by
8836 dnl --with-system-libs) to override this.
8838 if test "$SYSTEM_LIBRSVG" = YES; then
8840 AC_MSG_RESULT([yes])
8843 WINNT|Darwin|iOS|Android)
8849 AC_MSG_RESULT([yes])
8853 AC_SUBST(SYSTEM_LIBGSF)
8855 dnl ===================================================================
8856 dnl Test whether to build libpng or rely on the system version
8857 dnl ===================================================================
8859 AC_MSG_CHECKING([whether to use the system libpng])
8861 dnl How should and does this interact with the checks for libpng
8862 dnl related to use of libpng in the quickstarter above? This needs to
8865 if test "$with_system_libpng" = yes; then
8867 AC_MSG_RESULT([yes])
8870 WINNT|Darwin|iOS|Android)
8880 AC_SUBST(SYSTEM_LIBPNG)
8882 dnl ===================================================================
8883 dnl Test whether to build libjpeg or rely on the system version
8884 dnl ===================================================================
8885 dnl FIXME: this is currently because we have jpeg-6b for our filters
8886 dnl and jpeg-8 as dependency for librsvg
8887 dnl this should be unified into using only one version for both
8889 AC_MSG_CHECKING([whether to use the system libjpeg])
8891 if test "$SYSTEM_JPEG" == "YES"; then
8893 AC_MSG_RESULT([yes])
8896 WINNT|Darwin|iOS|Android)
8902 AC_MSG_RESULT([yes])
8906 AC_SUBST(SYSTEM_LIBJPEG)
8908 dnl ===================================================================
8909 dnl Check for runtime JVM search path
8910 dnl ===================================================================
8911 if test "$SOLAR_JAVA" != ""; then
8912 AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
8913 if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then
8914 AC_MSG_RESULT([yes])
8915 if ! test -d "$with_jvm_path"; then
8916 AC_MSG_ERROR(["$with_jvm_path" not a directory])
8918 if ! test -d "$with_jvm_path"jvm; then
8919 AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
8921 JVM_ONE_PATH_CHECK="$with_jvm_path"
8922 AC_SUBST(JVM_ONE_PATH_CHECK)
8928 dnl ===================================================================
8929 dnl Test for the presence of Ant and that it works
8930 dnl ===================================================================
8932 if test "$SOLAR_JAVA" != ""; then
8933 ANT_HOME=; export ANT_HOME
8934 WITH_ANT_HOME=; export WITH_ANT_HOME
8935 if test -z "$with_ant_home"; then
8936 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
8938 if test "$_os" = "WINNT"; then
8939 with_ant_home=`cygpath -u "$with_ant_home"`
8941 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
8942 WITH_ANT_HOME=$with_ant_home
8943 ANT_HOME=$with_ant_home
8946 if test -z "$ANT"; then
8947 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
8949 # resolve relative or absolute symlink
8950 while test -h "$ANT"; do
8952 a_basename=`basename "$ANT"`
8953 a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
8954 cd "`dirname "$ANT"`"
8955 cd "`dirname "$a_script"`"
8956 ANT="`pwd`"/"`basename "$a_script"`"
8960 AC_MSG_CHECKING([if $ANT works])
8961 cat > conftest.java << EOF
8962 public class conftest {
8963 int testmethod(int a, int b) {
8969 cat > conftest.xml << EOF
8970 <project name="conftest" default="conftest">
8971 <target name="conftest">
8972 <javac srcdir="." includes="conftest.java">
8978 oldJAVA_HOME=$JAVA_HOME
8979 if test "$JAVACISGCJ" = "yes"; then
8980 JAVA_HOME=; export JAVA_HOME
8981 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
8983 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
8985 AC_TRY_EVAL(ant_cmd)
8986 if test $? = 0 && test -f ./conftest.class ; then
8987 AC_MSG_RESULT([Ant works])
8988 if test -z "$WITH_ANT_HOME"; then
8989 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
8990 if test -z "$ANT_HOME"; then
8991 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
8994 ANT_HOME="$WITH_ANT_HOME"
8997 echo "configure: Ant test failed" >&5
8998 cat conftest.java >&5
8999 cat conftest.xml >&5
9000 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
9002 echo "Ant does not work - Some Java projects will not build!" >>warn
9004 JAVA_HOME=$oldJAVA_HOME
9005 rm -f conftest* core core.* *.core
9007 if test -z "$ANT_HOME"; then
9008 ANT_HOME="NO_ANT_HOME"
9012 dnl Checking for ant.jar
9013 if test "$ANT_HOME" != "NO_ANT_HOME"; then
9014 AC_MSG_CHECKING([Ant lib directory])
9015 if test -f $ANT_HOME/lib/ant.jar; then
9016 ANT_LIB="$ANT_HOME/lib"
9018 if test -f $ANT_HOME/ant.jar; then
9021 if test -f /usr/share/java/ant.jar; then
9022 ANT_LIB=/usr/share/java
9024 if test -f /usr/share/ant-core/lib/ant.jar; then
9025 ANT_LIB=/usr/share/ant-core/lib
9027 if test -f $ANT_HOME/lib/ant/ant.jar; then
9028 ANT_LIB="$ANT_HOME/lib/ant"
9030 if test -f /usr/share/lib/ant/ant.jar; then
9031 ANT_LIB=/usr/share/lib/ant
9033 AC_MSG_ERROR([Ant libraries not found!])
9040 AC_MSG_RESULT([Ant lib directory found.])
9045 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
9047 AC_MSG_CHECKING([whether Ant is >= $ant_minver])
9048 ant_version=`$ANT -version | $AWK '{ print $4; }'`
9049 ant_version_major=`echo $ant_version | cut -d. -f1`
9050 ant_version_minor=`echo $ant_version | cut -d. -f2`
9051 echo "configure: ant_version $ant_version " >&5
9052 echo "configure: ant_version_major $ant_version_major " >&5
9053 echo "configure: ant_version_minor $ant_version_minor " >&5
9054 if test "$ant_version_major" -ge "2"; then
9055 AC_MSG_RESULT([yes, $ant_version])
9056 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
9057 AC_MSG_RESULT([yes, $ant_version])
9059 AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
9062 if test "$ENABLE_MEDIAWIKI" = "YES"; then
9063 AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
9066 cat > conftest.java << EOF
9067 public class conftest {
9068 int testmethod(int a, int b) {
9074 cat > conftest.xml << EOF
9075 <project name="conftest" default="conftest">
9076 <target name="conftest" depends="copytest">
9077 <javac srcdir="." includes="conftest.java">
9080 <target name="copytest">
9081 <copy todir="confdir">
9082 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
9084 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
9090 if test "$JAVACISGCJ" = "yes"; then
9091 JAVA_HOME=; export JAVA_HOME
9092 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
9094 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
9096 AC_TRY_EVAL(ant_cmd)
9097 if test $? = 0 && test -f ./conftest.class ; then
9098 AC_MSG_RESULT([yes])
9101 echo "configure: Ant test failed" >&5
9102 cat conftest.java >&5
9103 cat conftest.xml >&5
9105 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
9108 rm -f conftest* core core.* *.core
9112 if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
9113 AC_MSG_CHECKING([for JUnit 4])
9114 if test "$with_junit" = "yes"; then
9115 if test -e /usr/share/java/junit4.jar; then
9116 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
9118 if test -e /usr/share/lib/java/junit.jar; then
9119 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
9121 OOO_JUNIT_JAR=/usr/share/java/junit.jar
9125 OOO_JUNIT_JAR=$with_junit
9127 if test "$_os" = "WINNT"; then
9128 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
9130 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
9131 grep org/junit/Before.class > /dev/null 2>&5
9132 if test $? -eq 0; then
9133 # check if either class-path entry is available for hamcrest or
9135 if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |grep -q hamcrest || \
9136 "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |grep -q 'Class-Path: hamcrest'; then
9137 AC_MSG_RESULT([$OOO_JUNIT_JAR])
9139 AC_MSG_ERROR([your junit jar neither sets a classpath nor includes hamcrest; please
9140 provide a full junit jar or use --without-junit])
9144 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
9145 location (/usr/share/java), specify its pathname via
9146 --with-junit=..., or disable it via --without-junit])
9149 AC_SUBST(OOO_JUNIT_JAR)
9151 dnl ===================================================================
9153 dnl ===================================================================
9154 AC_MSG_CHECKING([for product version])
9155 PRODUCTVERSION=AC_PACKAGE_VERSION
9156 AC_MSG_RESULT([$PRODUCTVERSION])
9157 AC_SUBST(PRODUCTVERSION)
9159 dnl ===================================================================
9160 dnl Dealing with l10n options
9161 dnl ===================================================================
9162 AC_MSG_CHECKING([which languages to be built])
9163 # get list of all languages
9164 # generate shell variable from completelangiso= from solenv/inc/langlist.mk
9165 # the sed command does the following:
9166 # + if a line ends with a backslash, append the next line to it
9167 # + adds " on the beginning of the value (after =)
9168 # + adds " at the end of the value
9169 # + removes en-US; we want to put it on the beginning
9170 # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
9171 [eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' solenv/inc/langlist.mk)]
9172 ALL_LANGS="en-US $completelangiso"
9173 # check the configured localizations
9174 WITH_LANG="$with_lang"
9175 if test -z "$WITH_LANG"; then
9176 AC_MSG_RESULT([en-US])
9178 AC_MSG_RESULT([$WITH_LANG])
9179 GIT_REPO_NAMES="$GIT_REPO_NAMES translations"
9181 # check that the list is valid
9182 for lang in $WITH_LANG ; do
9183 test "$lang" = "ALL" && continue;
9184 # need to check for the exact string, so add space before and after the list of all languages
9185 for vl in $ALL_LANGS ; do
9186 if test "$vl" = "$lang" ; then
9190 if test "$vl" != "$lang" ; then
9191 AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS])
9194 # list with substituted ALL
9195 WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
9196 # this variable is used only by bin/distro-install-* helper scripts
9197 # they need a real list of languages
9198 test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
9201 AC_SUBST(WITH_LANG_LIST)
9202 AC_SUBST(GIT_REPO_NAMES)
9205 dnl ===================================================================
9206 if test -n "${GIT_LINK_SRC}"; then
9207 for repo in ${GIT_REPO_NAMES}; do
9208 if ! test -d "${GIT_LINK_SRC}"/${repo}; then
9209 AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
9213 AC_SUBST(GIT_LINK_SRC)
9215 AC_MSG_CHECKING([for another 'intro' bitmap])
9217 if test -z "$with_intro_bitmap" -o "$with_intro_bitmap" = "no" ; then
9219 AC_MSG_RESULT([none])
9221 case "$with_intro_bitmap" in
9222 *.png) INTRO_BITMAP="$with_intro_bitmap" ;;
9223 *) AC_MSG_WARN([Intro bitmap should be a .png file!]) ;;
9225 AC_MSG_RESULT([$INTRO_BITMAP])
9227 AC_SUBST(INTRO_BITMAP)
9229 AC_MSG_CHECKING([for custom 'intro' progress bar color])
9231 if test -z "$with_intro_progressbar_color" ; then
9232 PROGRESSBARCOLOR="126,170,23"
9233 AC_MSG_RESULT([none])
9235 PROGRESSBARCOLOR="$with_intro_progressbar_color"
9236 AC_MSG_RESULT([$PROGRESSBARCOLOR])
9238 AC_SUBST(PROGRESSBARCOLOR)
9240 AC_MSG_CHECKING([for custom 'intro' progress bar size])
9242 if test -z "$with_intro_progressbar_size" ; then
9243 PROGRESSSIZE="319,10"
9244 AC_MSG_RESULT([none])
9246 PROGRESSSIZE="$with_intro_progressbar_size"
9247 AC_MSG_RESULT([$PROGRESSSIZE])
9249 AC_SUBST(PROGRESSSIZE)
9251 AC_MSG_CHECKING([for custom 'intro' progress bar position])
9253 if test -z "$with_intro_progressbar_position" ; then
9254 PROGRESSPOSITION="164,225"
9255 AC_MSG_RESULT([none])
9257 PROGRESSPOSITION="$with_intro_progressbar_position"
9258 AC_MSG_RESULT([$PROGRESSPOSITION])
9260 AC_SUBST(PROGRESSPOSITION)
9262 AC_MSG_CHECKING([for custom 'intro' progress bar frame color])
9264 if test -z "$with_intro_progressbar_frame_color" ; then
9265 PROGRESSFRAMECOLOR="207,208,211"
9266 AC_MSG_RESULT([none])
9268 PROGRESSFRAMECOLOR="$with_intro_progressbar_frame_color"
9269 AC_MSG_RESULT([$PROGRESSFRAMECOLOR])
9271 AC_SUBST(PROGRESSFRAMECOLOR)
9273 AC_MSG_CHECKING([for another 'about' bitmap])
9275 if test -z "$with_about_bitmap" -o "$with_about_bitmap" = "no" ; then
9277 AC_MSG_RESULT([none])
9279 case "$with_about_bitmap" in
9280 *.png) ABOUT_BITMAP="$with_about_bitmap" ;;
9281 *) AC_MSG_WARN([About bitmap should be a .png file!]) ;;
9283 AC_MSG_RESULT([$ABOUT_BITMAP])
9285 AC_SUBST(ABOUT_BITMAP)
9287 AC_MSG_CHECKING([for another 'start center left' bitmap])
9288 STARTCENTER_LEFT_BITMAP=
9289 if test -z "$with_startcenter_left_bitmap" -o "$with_startcenter_left_bitmap" = "no" ; then
9290 STARTCENTER_LEFT_BITMAP=
9291 AC_MSG_RESULT([none])
9293 case "$with_startcenter_left_bitmap" in
9294 *.png) STARTCENTER_LEFT_BITMAP="$with_startcenter_left_bitmap" ;;
9295 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
9297 AC_MSG_RESULT([$STARTCENTER_LEFT_BITMAP])
9299 AC_SUBST(STARTCENTER_LEFT_BITMAP)
9301 AC_MSG_CHECKING([for another 'start center right' bitmap])
9302 STARTCENTER_RIGHT_BITMAP=
9303 if test -z "$with_startcenter_right_bitmap" -o "$with_startcenter_right_bitmap" = "no" ; then
9304 STARTCENTER_RIGHT_BITMAP=
9305 AC_MSG_RESULT([none])
9307 case "$with_startcenter_right_bitmap" in
9308 *.png) STARTCENTER_RIGHT_BITMAP="$with_startcenter_right_bitmap" ;;
9309 *) AC_MSG_WARN([Startcenter right bitmap should be a .png file!]) ;;
9311 AC_MSG_RESULT([$STARTCENTER_RIGHT_BITMAP])
9313 AC_SUBST(STARTCENTER_RIGHT_BITMAP)
9315 AC_MSG_CHECKING([for another 'start center rtl left' bitmap])
9316 STARTCENTER_RTL_LEFT_BITMAP=
9317 if test -z "$with_startcenter_rtl_left_bitmap" -o "$with_startcenter_rtl_left_bitmap" = "no" ; then
9318 STARTCENTER_RTL_LEFT_BITMAP=
9319 AC_MSG_RESULT([none])
9321 case "$with_startcenter_rtl_left_bitmap" in
9322 *.png) STARTCENTER_RTL_LEFT_BITMAP="$with_startcenter_rtl_left_bitmap" ;;
9323 *) AC_MSG_WARN([Startcenter rtl left bitmap should be a .png file!]) ;;
9325 AC_MSG_RESULT([$STARTCENTER_RTL_LEFT_BITMAP])
9327 AC_SUBST(STARTCENTER_RTL_LEFT_BITMAP)
9329 AC_MSG_CHECKING([for another 'start center rtl right' bitmap])
9330 STARTCENTER_RTL_RIGHT_BITMAP=
9331 if test -z "$with_startcenter_rtl_right_bitmap" -o "$with_startcenter_rtl_right_bitmap" = "no" ; then
9332 STARTCENTER_RTL_RIGHT_BITMAP=
9333 AC_MSG_RESULT([none])
9335 case "$with_startcenter_rtl_right_bitmap" in
9336 *.png) STARTCENTER_RTL_RIGHT_BITMAP="$with_startcenter_rtl_right_bitmap" ;;
9337 *) AC_MSG_WARN([Startcenter rtl right bitmap should be a .png file!]) ;;
9339 AC_MSG_RESULT([$STARTCENTER_RTL_RIGHT_BITMAP])
9341 AC_SUBST(STARTCENTER_RTL_RIGHT_BITMAP)
9343 AC_MSG_CHECKING([for another 'start center space' bitmap])
9344 STARTCENTER_SPACE_BITMAP=
9345 if test -z "$with_startcenter_space_bitmap" -o "$with_startcenter_space_bitmap" = "no" ; then
9346 STARTCENTER_SPACE_BITMAP=
9347 AC_MSG_RESULT([none])
9349 case "$with_startcenter_space_bitmap" in
9350 *.png) STARTCENTER_SPACE_BITMAP="$with_startcenter_space_bitmap" ;;
9351 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
9353 AC_MSG_RESULT([$STARTCENTER_SPACE_BITMAP])
9355 AC_SUBST(STARTCENTER_SPACE_BITMAP)
9358 AC_MSG_CHECKING([for vendor])
9359 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
9360 AC_MSG_RESULT([not set])
9362 OOO_VENDOR="$with_vendor"
9363 AC_MSG_RESULT([$OOO_VENDOR])
9365 AC_SUBST(OOO_VENDOR)
9368 AC_MSG_CHECKING([for UNIX wrapper name])
9369 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
9370 AC_MSG_RESULT([not set])
9372 UNIXWRAPPERNAME="$with_unix_wrapper"
9373 AC_MSG_RESULT([$UNIXWRAPPERNAME])
9375 AC_SUBST(UNIXWRAPPERNAME)
9377 AC_MSG_CHECKING([whether to install the compat oo* wrappers])
9378 if test "$with_compat_oowrappers" = "yes" ; then
9379 WITH_COMPAT_OOWRAPPERS=YES
9382 WITH_COMPAT_OOWRAPPERS=
9385 AC_SUBST(WITH_COMPAT_OOWRAPPERS)
9387 AC_MSG_CHECKING([for product name])
9388 PRODUCTNAME=AC_PACKAGE_NAME
9389 AC_MSG_RESULT([$PRODUCTNAME])
9390 AC_SUBST(PRODUCTNAME)
9392 INSTALLDIRNAME=`echo AC_PACKAGE_NAME | tr '[[:upper:]]' '[[:lower:]]'`
9393 AC_MSG_CHECKING([for install dirname])
9394 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes" ; then
9395 INSTALLDIRNAME="$with_install_dirname"
9397 AC_MSG_RESULT([$INSTALLDIRNAME])
9398 AC_SUBST(INSTALLDIRNAME)
9400 AC_MSG_CHECKING([for prefix])
9401 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9402 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
9404 AC_MSG_RESULT([$PREFIXDIR])
9407 AC_MSG_CHECKING([for libdir])
9408 LIBDIR=[$(eval echo $(eval echo $libdir))]
9409 AC_MSG_RESULT([$LIBDIR])
9412 AC_MSG_CHECKING([for data dir])
9413 DATADIR=[$(eval echo $(eval echo $datadir))]
9414 AC_MSG_RESULT([$DATADIR])
9417 AC_MSG_CHECKING([for man dir])
9418 MANDIR=[$(eval echo $(eval echo $mandir))]
9419 AC_MSG_RESULT([$MANDIR])
9422 AC_MSG_CHECKING([for doc dir])
9423 DOCDIR=[$(eval echo $(eval echo $docdir))]
9424 AC_MSG_RESULT([$DOCDIR])
9427 AC_MSG_CHECKING([for install dir])
9428 INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
9429 AC_MSG_RESULT([$INSTALLDIR])
9430 AC_SUBST(INSTALLDIR)
9432 AC_MSG_CHECKING([whether to statically link to Gtk])
9433 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
9434 ENABLE_STATIC_GTK="TRUE"
9435 AC_MSG_RESULT([yes])
9437 ENABLE_STATIC_GTK="FALSE"
9440 AC_SUBST(ENABLE_STATIC_GTK)
9442 # ===================================================================
9443 # De- or increase default verbosity of build process
9444 # ===================================================================
9445 AC_MSG_CHECKING([build verbosity])
9446 if test -n "$enable_verbose"; then
9447 if test "$enable_verbose" = "yes"; then
9449 AC_MSG_RESULT([high])
9451 if test "$enable_verbose" = "no"; then
9453 AC_MSG_RESULT([low])
9456 AC_MSG_RESULT([not set])
9460 dnl ===================================================================
9461 dnl Use zenity during build
9462 dnl ===================================================================
9463 AC_MSG_CHECKING([whether to use zenity during build])
9464 if test "$enable_zenity" = "yes"; then
9465 AC_MSG_RESULT([yes])
9466 AC_PATH_PROGS( ZNTY, zenity )
9467 if test -z "$ZNTY"; then
9476 AC_SUBST(ENABLE_ZENITY)
9479 dnl ===================================================================
9480 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
9481 dnl --enable-dependency-tracking configure option
9482 dnl ===================================================================
9483 AC_MSG_CHECKING([whether to enable dependency tracking])
9484 if test "$enable_dependency_tracking" = "no"; then
9488 AC_MSG_RESULT([yes])
9492 dnl ===================================================================
9493 dnl Number of CPUs to use during the build
9494 dnl ===================================================================
9495 AC_MSG_CHECKING([for number of processors to use])
9496 if test -n "$with_num_cpus"; then
9497 BUILD_NCPUS=$with_num_cpus
9501 Darwin|FreeBSD|NetBSD|OpenBSD)
9502 BUILD_NCPUS=`sysctl -n hw.ncpu`
9506 BUILD_NCPUS=`getconf _NPROCESSORS_ONLN`
9508 # what else than above does profit here *and* has /proc?
9510 BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
9514 # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
9515 # unexpected format, 'wc -l' will have returned 0.
9516 if test "$BUILD_NCPUS" -eq 0; then
9520 AC_MSG_RESULT([$BUILD_NCPUS])
9521 AC_SUBST(BUILD_NCPUS)
9523 # ===================================================================
9524 # Creating bigger shared library to link against
9525 # ===================================================================
9526 AC_MSG_CHECKING([whether to create a big library for better performance])
9528 if test "$enable_mergelibs" = "yes"; then
9530 AC_MSG_RESULT([yes])
9536 dnl ===================================================================
9537 dnl Number of parallel jobs to be executed by dmake
9538 dnl ===================================================================
9539 AC_MSG_CHECKING([for maximum of jobs per processor])
9541 if test "z$with_max_jobs" != "z"; then
9542 BUILD_MAX_JOBS="$with_max_jobs"
9544 if test "$enable_icecream" = "yes" ; then
9548 AC_MSG_RESULT([$BUILD_MAX_JOBS])
9549 AC_SUBST(BUILD_MAX_JOBS)
9551 # =====================================================================
9552 # determine the parallelism for gnu make
9553 # =====================================================================
9554 AC_MSG_CHECKING([for maximum parallelism for gmake])
9555 if test $BUILD_MAX_JOBS -gt $BUILD_NCPUS ; then
9556 GMAKE_PARALLELISM="$BUILD_MAX_JOBS"
9558 GMAKE_PARALLELISM="$BUILD_NCPUS"
9560 GMAKE_MODULE_PARALLELISM="$BUILD_MAX_JOBS"
9561 if test "$no_parallelism_make" = "YES" ; then
9562 if test -z "$with_num_cpus"; then
9563 GMAKE_PARALLELISM="1";
9564 if test $GMAKE_MODULE_PARALLELISM -gt 1 ; then
9565 AC_MSG_WARN([gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this.])
9566 if test -z "$with_num_cpus"; then
9567 echo "gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this." >> warn
9569 GMAKE_MODULE_PARALLELISM="1"
9572 GMAKE_PARALLELISM="$BUILD_NCPUS";
9573 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
9577 # GMAKE_PARALLELISM is used in tail_build
9578 # GMAKE_MODULE_PARALLELISM is used when building individual gbuildified module
9579 AC_MSG_RESULT([per module:$GMAKE_MODULE_PARALLELISM, for tail_build:$GMAKE_PARALLELISM])
9580 AC_SUBST(GMAKE_PARALLELISM)
9581 AC_SUBST(GMAKE_MODULE_PARALLELISM)
9583 dnl ===================================================================
9584 dnl Setting up the environment.
9585 dnl ===================================================================
9586 echo "setting up the build environment variables..."
9588 if test -z "$COMPATH"; then
9589 AC_MSG_ERROR([No compiler found.])
9593 AC_MSG_CHECKING([solver path])
9594 if test -z "$with_local_solver"; then
9595 LOCAL_SOLVER="DEFAULT"
9596 AC_MSG_RESULT([default])
9598 LOCAL_SOLVER=$with_local_solver
9599 AC_MSG_RESULT([$with_local_solver])
9601 AC_SUBST(LOCAL_SOLVER)
9603 AC_SUBST(BUILD_TYPE)
9605 if test "$WITH_MINGW" != "yes" ; then
9606 MINGW_EXTERNAL_DLLS=
9608 mingw_dlldir=`$CC -print-sysroot`/mingw/bin
9609 for DLL in $MINGW_EXTERNAL_DLLS ; do
9610 AC_MSG_CHECKING([for $DLL])
9611 if ! test -f "$mingw_dlldir/$DLL" ; then
9612 AC_MSG_ERROR([Could not find $DLL, install the appropriate mingw32-<package>, not only mingw32-<package>-devel.])
9614 AC_MSG_RESULT([$mingw_dlldir/$DLL])
9617 AC_SUBST(MINGW_EXTERNAL_DLLS)
9619 # make sure config.guess is +x; we execute config.guess, so it has to be so;
9620 chmod +x ./config.guess
9622 dnl Setting up the post_download check script
9623 dnl Using autoconf here, so that the migration from the previous state
9624 dnl (checks for the additional Windows downloads were directly in
9625 dnl configure.in) is as easy as possible
9626 echo "setting up the post_download check script"
9627 autoconf post_download.in > post_download
9628 chmod +x post_download
9630 # Generate a configuration timestamp we can use for deps
9631 if test -f set_soenv; then
9632 mv -f set_soenv set_soenv.last
9634 echo > set_soenv.last
9637 AC_CONFIG_FILES([ooo.lst set_soenv Makefile bin/repo-list desktop/scripts/soffice.sh build_env])
9640 # make sure this is executable
9641 chmod +x desktop/scripts/soffice.sh
9643 # touch the config timestamp file set_soenv.stamp
9644 if test ! -f set_soenv.stamp; then
9645 echo > set_soenv.stamp
9646 elif diff set_soenv set_soenv.last >/dev/null 2>&1; then
9647 echo "Configuration unchanged - avoiding scp2 stamp update"
9649 echo > set_soenv.stamp
9652 dnl Run the set_soenv script to setup the Env.Host.sh script that sets
9653 dnl environment variables for the build.
9658 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: