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++"
164 if test "$build_os" = "cygwin" ; then
165 SCPDEFS="$SCPDEFS -D_MSC_VER"
169 darwin*) # Mac OS X or iOS
175 if test "$host_cpu" = "arm"; then
191 AC_MSG_CHECKING([the FreeBSD operating system release])
192 if test -n "$with_os_version"; then
193 OSVERSION="$with_os_version"
195 OSVERSION=`/sbin/sysctl -n kern.osreldate`
197 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
198 AC_MSG_CHECKING([which thread library to use])
199 if test "$OSVERSION" -lt "500016"; then
200 PTHREAD_CFLAGS="-D_THREAD_SAFE"
201 PTHREAD_LIBS="-pthread"
202 elif test "$OSVERSION" -lt "502102"; then
203 PTHREAD_CFLAGS="-D_THREAD_SAFE"
207 PTHREAD_LIBS="-pthread"
209 AC_MSG_RESULT([$PTHREAD_LIBS])
219 PTHREAD_LIBS="-pthread -lpthread"
226 PTHREAD_LIBS=-pthread
234 PTHREAD_CFLAGS="-D_THREAD_SAFE"
235 PTHREAD_LIBS="-pthread"
245 PTHREAD_LIBS="-pthread"
259 test_unix_quickstarter=no
262 # Make sure env vars pointing to where to find the cross-build
263 # toolchain are set. There aren't really any sensible
265 for var in CC CXX AR NM OBJDUMP RANLIB STRIP; do
266 if test -z "`eval echo '$'$var`"; then
267 AC_MSG_ERROR([You need to set the $var environment variable in a cross-compilation for Android. See README.cross for an example.])
273 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
277 if test "$_os" = "AIX"; then
278 AC_PATH_PROG(GAWK, gawk)
279 if test -z "$GAWK"; then
280 AC_MSG_ERROR([gawk not found in \$PATH])
286 AC_SUBST(PTHREAD_CFLAGS)
287 AC_SUBST(PTHREAD_LIBS)
290 ###############################################################################
291 # Extensions switches --enable/--disable
292 ###############################################################################
293 # By default these should be enabled unless having extra dependencies.
294 # If there is extra dependency over configure options then the enable should
295 # be automagic based on wether the requiring feature is enabled or not.
296 # All this options change anything only with --enable-extension-integration.
297 AC_ARG_ENABLE(extension-integration,
298 AS_HELP_STRING([--disable-extension-integration],
299 [Disable integration of the builded extensions to the installer of the
300 product. Use this switch to disable the integration.])
303 AC_ARG_ENABLE(ext-barcode,
304 AS_HELP_STRING([--enable-ext-barcode],
305 [Enable the Barcode extension.])
308 AC_ARG_ENABLE(ext-diagram,
309 AS_HELP_STRING([--enable-ext-diagram],
310 [Enable the SmART Gallery (Diagram) extension.])
313 AC_ARG_ENABLE(ext-google-docs,
314 AS_HELP_STRING([--enable-ext-google-docs],
315 [Enable the Google Documents extension.])
318 AC_ARG_ENABLE(ext-hunart,
319 AS_HELP_STRING([--enable-ext-hunart],
320 [Enable the Hungarian Cross-reference Toolbar extension.])
323 AC_ARG_ENABLE(ext-languagetool,
324 AS_HELP_STRING([--enable-ext-languagetool],
325 [Enable the LanguageTool extension.])
328 AC_ARG_ENABLE(ext-mysql-connector,
329 AS_HELP_STRING([--enable-ext-mysql-connector],
330 [Enable the build of the MySQL Connector extension.])
333 AC_ARG_ENABLE(ext-nlpsolver,
334 AS_HELP_STRING([--enable-ext-nlpsolver],
335 [Enable the NLPSolver extension.])
338 AC_ARG_ENABLE(ext-ct2n,
339 AS_HELP_STRING([--enable-ext-ct2n],
340 [Enable the ConvertTextToNumber extension.])
343 AC_ARG_ENABLE(ext-numbertext,
344 AS_HELP_STRING([--enable-ext-numbertext],
345 [Enable the Numbertext extension.])
348 AC_ARG_ENABLE(ext-oooblogger,
349 AS_HELP_STRING([--enable-ext-oooblogger],
350 [Enable the OOo Blogger extension.])
353 AC_ARG_ENABLE(ext-pdfimport,
354 AS_HELP_STRING([--disable-ext-pdfimport],
355 [Disable the PDF Import extension.])
358 AC_ARG_ENABLE(ext-presenter-console,
359 AS_HELP_STRING([--disable-ext-presenter-console],
360 [Disable the Presenter Console extension.])
363 AC_ARG_ENABLE(ext-presenter-minimizer,
364 AS_HELP_STRING([--disable-ext-presenter-minimizer],
365 [Disable the Presentation Minimizer extension.])
368 AC_ARG_ENABLE(ext-report-builder,
369 AS_HELP_STRING([--disable-ext-report-builder],
370 [Disable the Report Builder extension.])
373 AC_ARG_ENABLE(ext-scripting-beanshell,
374 AS_HELP_STRING([--enable-ext-scripting-beanshell],
375 [Enable support for scripts in BeanShell.])
378 AC_ARG_ENABLE(ext-scripting-javascript,
379 AS_HELP_STRING([--enable-ext-scripting-javascript],
380 [Enable support for scripts in JavaScript.])
383 AC_ARG_ENABLE(ext-typo,
384 AS_HELP_STRING([--enable-ext-typo],
385 [Enable the Typography Toolbar extension.])
388 AC_ARG_ENABLE(ext-validator,
389 AS_HELP_STRING([--enable-ext-validator],
390 [Enable the Validator extension.])
393 AC_ARG_ENABLE(ext-watch-window,
394 AS_HELP_STRING([--enable-ext-watch-window],
395 [Enable the Watch Window extension to Calc.])
398 AC_ARG_ENABLE(ext-wiki-publisher,
399 AS_HELP_STRING([--enable-ext-wiki-publisher],
400 [Enable the Wiki Publisher extension.])
402 ###############################################################################
404 dnl ---------- *** ----------
406 AC_ARG_ENABLE(mergelibs,
407 AS_HELP_STRING([--enable-mergelibs],
408 [Enables linking of big merged library used for better performance.])
411 AC_ARG_ENABLE(graphite,
412 AS_HELP_STRING([--enable-graphite],
413 [Enables the compilation of Graphite smart font rendering.])
417 AS_HELP_STRING([--disable-ldap],
418 [Disables the use of LDAP backend via Netscape/Mozilla or OpenLDAP LDAP SDK])
421 AC_ARG_ENABLE(fetch-external,
422 AS_HELP_STRING([--disable-fetch-external],
423 [Disables fetching external tarballs from web sources.])
426 AC_ARG_ENABLE(lockdown,
427 AS_HELP_STRING([--disable-lockdown],
428 [Disables the gconf integration work in LibreOffice.]),
432 AS_HELP_STRING([--disable-vba],
433 [Disables the vba compatibility feature.])
437 AS_HELP_STRING([--enable-pch],
438 [DEPRECATED : is ignored])
441 AC_ARG_ENABLE(mozilla,
442 AS_HELP_STRING([--disable-mozilla],
443 [LibreOffice usually includes a strangely hacked up Mozilla binary for your
444 platform, to build without this version, use this option.])
448 AS_HELP_STRING([--enable-epm],
449 [LibreOffice includes self-packaging code, that requires epm, however epm is
450 useless for large scale package building.])
453 AC_ARG_ENABLE(activex_component,
454 AS_HELP_STRING([--disable-activex-component],
455 [Remove support for ActiveX embedding of LibreOffice.])
459 AS_HELP_STRING([--disable-odk],
460 [LibreOffice includes an ODK, office development kit which some packagers may
461 wish to build without.])
464 AC_ARG_ENABLE(mathmldtd,
465 AS_HELP_STRING([--disable-mathmldtd],
466 [Disable mathmldtd (useful for distributions that want to avoid
470 AC_ARG_ENABLE(evolution2,
471 AS_HELP_STRING([--enable-evolution2],
472 [Allows the built-in evolution 2 addressbook connectivity build to be
476 AC_ARG_ENABLE(directx,
477 AS_HELP_STRING([--disable-directx],
478 [Remove DirectX implementation for the new XCanvas interface.
479 The DirectX support requires more stuff installed on Windows to
480 compile. (DirectX SDK, GDI+ libs)])
483 AC_ARG_ENABLE(activex,
484 AS_HELP_STRING([--disable-activex],
485 [Disable the use of ActiveX for a Windows build.
486 This switch is mandatory when using VC++ 2008 Express.])
490 AS_HELP_STRING([--disable-atl],
491 [Disable the use of ATL for a Windows build.])
493 This switch is mandatory when using VC++ 2008 Express.
497 AC_ARG_ENABLE(symbols,
498 AS_HELP_STRING([--enable-symbols],
499 [Include debugging symbols in output. WARNING - a complete build needs
500 8 Gb of space and takes much longer (enables -g compiler flag).])
502 Enabling symbols disables the stripping of the solver
503 (--disable-strip-solver).
507 AC_ARG_ENABLE(strip-solver,
508 AS_HELP_STRING([--disable-strip-solver],
509 [Disable the stripping of the solver. By default the solver is stripped
510 unless a build with debugging symbols (--enable-symbols) is requested.])
512 This switch allows to override this setting.
516 AC_ARG_ENABLE(werror,
517 AS_HELP_STRING([--enable-werror],
518 [Turn warnings to errors. (Has no effect in modules where the treating
519 of warnings as errors is disabled explicitly.)]),
523 AS_HELP_STRING([--enable-debug],
524 [Include debugging symbols from --enable-symbols plus extra debugging
525 code. Extra large build! (enables -g compiler flag and dmake debug=true)
526 If you need even more verbose output, build a module with
527 "build -- debug=true dbglevel=2".]))
529 AC_ARG_ENABLE(dbgutil,
530 AS_HELP_STRING([--enable-dbgutil],
531 [Include additional debugging utilities, such as assertions, object
532 counting, etc. Larger build. Independent from --enable-debug]))
534 AC_ARG_ENABLE(linkoo,
535 AS_HELP_STRING([--disable-linkoo],
536 [Disable linkoo for the smoketest installation.]))
539 AS_HELP_STRING([--enable-lto],
540 [Enable link-time optimization. Suitable for product builds.
541 Building takes longer but libraries are optimized for speed.
542 (possible only with gcc-4.5 or later,
543 better to use gcc-4.6 and 'gold' as linker)]))
545 AC_ARG_ENABLE(crashdump,
546 AS_HELP_STRING([--enable-crashdump],
547 [Enable the crashdump feature.]))
549 AC_ARG_ENABLE(python,
550 AS_HELP_STRING([--enable-python=<no/auto/system/internal>],
551 [Enables or disables Python support at run-time and build-time.
552 Also specifies what Python to use. 'auto' is the
553 default. Note that Python can be disabled with
554 --disable-python or --enable-python=no only if no
555 translations are required.]))
558 AS_HELP_STRING([--disable-gtk],
559 [Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available.]),
563 AS_HELP_STRING([--disable-gtk3],
564 [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
567 AC_ARG_ENABLE(systray,
568 AS_HELP_STRING([--disable-systray],
569 [Determines whether to build the systray quickstarter.]),
572 AC_ARG_ENABLE(split-app-modules,
573 AS_HELP_STRING([--enable-split-app-modules],
574 [Split file lists for app modules, e.g. base, calc.
575 Has effect only with make distro-pack-install]),
578 AC_ARG_ENABLE(split-opt-features,
579 AS_HELP_STRING([--enable-split-opt-features],
580 [Split file lists for some optional features, .e.g. pyuno, testtool.
581 Has effect only with make distro-pack-install]),
584 AC_ARG_ENABLE(cairo-canvas,
585 [ --disable-cairo-canvas Determines whether to build the Cairo canvas on
586 platforms where Cairo is available.
587 ],,enable_cairo_canvas=yes)
589 AC_ARG_ENABLE(librsvg,
590 AS_HELP_STRING([--enable-librsvg=<no/auto/system/internal>],
591 [Enables or disables use of librsvg to render SVG at run-time.
592 Also specificed what librsvg to use. 'auto' is the default.]))
594 AC_ARG_ENABLE(opengl,
595 AS_HELP_STRING([--disable-opengl],
596 [Determines whether to build the OpenGL 3D slide transitions component.]),
600 AS_HELP_STRING([--enable-dbus],
601 [Determines whether to enable presentation mode screensaver control
602 under GNOME via DBUS.]),
606 AS_HELP_STRING([--disable-gconf],
607 [Determines whether to use the GConf support.]),
610 AC_ARG_ENABLE(gnome-vfs,
611 AS_HELP_STRING([--disable-gnome-vfs],
612 [Determines whether to use the Gnome Virtual Filing System on platforms
613 where that VFS is available.]),
614 ,enable_gnome_vfs=yes)
617 AS_HELP_STRING([--enable-gio],
618 [Determines whether to use the GIO support.]),
621 AC_ARG_ENABLE(static-gtk,
622 AS_HELP_STRING([--enable-static-gtk],
623 [Modules that are linked against GTK+ libraries use the static libraries
624 instead of the dynamic ones. (Enables -Bstatic linker flag for GTK+ libraries.)]),
627 AC_ARG_ENABLE(build-mozilla,
628 AS_HELP_STRING([--disable-build-mozilla],
629 [Use this option if you do not want to build the Mozilla components from
630 the Mozilla source code but take precompiled zips.]),
633 AC_ARG_ENABLE(xmlsec,
634 AS_HELP_STRING([--disable-xmlsec],
635 [Whether to enable XMLsec for open document signing.]),
639 AS_HELP_STRING([--enable-kde],
640 [Determines whether to use Qt3/KDE3 vclplug on platforms where Qt3 and
641 KDE3 are available.]),
645 AS_HELP_STRING([--disable-kdeab],
646 [Disable the KDE3 address book support.]),
648 if test "$enable_kde" = "yes"; then
654 AS_HELP_STRING([--enable-kde4],
655 [Determines whether to use Qt4/KDE4 vclplug on platforms where Qt4 and
656 KDE4 are available. May be used with --enable-kde if you want to support
657 both KDE3 and KDE4.]),
660 AC_ARG_ENABLE(unix-qstart-libpng,
661 AS_HELP_STRING([--disable-unix-qstart-libpng],
662 [On UNIX systems, we have a faster splash app, that can use libpng to
663 render its splash, if we can safely link to the system libpng then
664 enabling this is a good idea (ie. for Linux Distro packaging).]),
665 ,enable_unix_qstart_libpng=yes)
667 AC_ARG_ENABLE(binfilter,
668 AS_HELP_STRING([--enable-binfilter],
669 [Enable legacy binary file formats filters build.]),
674 AS_HELP_STRING([--enable-ugly],
675 [Enables ugly pieces of functionality.]),
680 AS_HELP_STRING([--disable-rpath],
681 [Disable the use of relative paths in shared libraries.]),
685 AS_HELP_STRING([--disable-randr],
686 [Disable RandR support in the vcl project.]),
689 AC_ARG_ENABLE(randr-link,
690 AS_HELP_STRING([--disable-randr-link],
691 [Disable linking with libXrandr, instead dynamically open it at runtime.]),
692 ,enable_randr_link=yes)
694 AC_ARG_ENABLE(gstreamer,
695 AS_HELP_STRING([--disable-gstreamer],
696 [Disable building the gstreamer avmedia backend.]),
697 ,enable_gstreamer=yes)
700 AS_HELP_STRING([--disable-neon],
701 [Disable neon and the compilation of webdav binding.]),
704 AC_ARG_ENABLE(build-unowinreg,
705 AS_HELP_STRING([--enable-build-unowinreg],
706 [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
707 compiler is needed on Linux.])
709 Usage: --enable-build-unowinreg
713 AC_ARG_ENABLE(verbose,
714 AS_HELP_STRING([--enable-verbose],
715 [Increase build verbosity.])[
716 --disable-verbose Decrease build verbosity.],
719 AC_ARG_ENABLE(dependency-tracking,
720 AS_HELP_STRING([--enable-dependency-tracking],
721 [Do not reject slow dependency extractors.])[
722 --disable-dependency-tracking
723 Disables generation of dependency information.
724 Speed up one-time builds.],
727 AC_ARG_ENABLE(icecream,
728 AS_HELP_STRING([--enable-icecream],
729 [Use the 'icecream' distributed compiling tool to speedup the compilation.
730 It defaults to /opt/icecream for the location of the icecream gcc/g++
731 wrappers, you can override that using --with-gcc-home=/the/path switch.]),
734 AC_ARG_ENABLE(zenity,
735 AS_HELP_STRING([--disable-zenity],
736 [Do not display a build icon in the notification area (on unix) during build.]),
739 AC_ARG_ENABLE(nsplugin,
740 AS_HELP_STRING([--disable-nsplugin],
741 [Do not build nsplugin extension for browser embedding.])
744 AC_ARG_ENABLE(ccache,
745 AS_HELP_STRING([--disable-ccache],
746 [Do not try to use ccache automatically.
747 By default, we will try to detect if ccache is available; in that case if
748 CC/CXX are not yet set, and --enable-icecream is not given, we
749 attempt to use ccache. --disable-ccache disables ccache completely.
753 AC_ARG_ENABLE(cl-x64,
754 AS_HELP_STRING([--enable-cl-x64],
755 [Build a 64-bit LibreOffice using the Microsoft C/C++ x64 compiler.]),
758 AC_ARG_ENABLE(extra-gallery,
759 AS_HELP_STRING([--enable-extra-gallery],
760 [Add extra gallery content.]),
763 AC_ARG_ENABLE(extra-template,
764 AS_HELP_STRING([--enable-extra-template],
765 [Add extra template content.]),
768 AC_ARG_ENABLE(extra-sample,
769 AS_HELP_STRING([--enable-extra-sample],
770 [Add extra sample content.]),
773 AC_ARG_ENABLE(extra-font,
774 AS_HELP_STRING([--enable-extra-font],
775 [Add extra font content.]),
778 AC_ARG_ENABLE(oxygenoffice,
779 AS_HELP_STRING([--enable-oxygenoffice],
780 [Download OxygenOffice branding and set custom settings.]),
783 AC_ARG_ENABLE(lomenubar,
784 AS_HELP_STRING([--enable-lomenubar],
785 [Enable global menu support.]),
788 AC_ARG_ENABLE(online-update,
789 AS_HELP_STRING([--enable-online-update],
790 [Enable the online update service that will check for new versions of
791 LibreOffice. By default, it is on on Windows and Mac, and off on Linux.]),
794 AC_ARG_ENABLE(release-build,
795 AS_HELP_STRING([--enable-release-build],
796 [Enable release build.
797 See http://wiki.documentfoundation.org/DevBuild]),
800 AC_ARG_ENABLE(silent-msi,
801 AS_HELP_STRING([--enable-silent-msi],
802 [Enable MSI with LIMITUI=1 (silent install).]),
805 AC_ARG_ENABLE(postgresql-sdbc,
806 AS_HELP_STRING([--disable-postgresql-sdbc],
807 [Disable the build of the PostgreSQL-SDBC driver.])
810 dnl ===================================================================
811 dnl Optional Packages (--with/without-)
812 dnl ===================================================================
813 AC_ARG_WITH(gnu-patch,
814 AS_HELP_STRING([--with-gnu-patch],
815 [Specify location of GNU patch on Solaris or FreeBSD.]),
819 AS_HELP_STRING([--with-gnu-cp],
820 [Specify location of GNU cp on Solaris or FreeBSD.]),
823 AC_ARG_WITH(external-tar,
824 AS_HELP_STRING([--with-external-tar=<TARFILE PATH>],
825 [Specify path to tarfiles manually.]),
826 TARFILE_LOCATION=$withval ,
829 AC_ARG_WITH(linked-git,
830 AS_HELP_STRING([--with-linked-git=<OTHER_CLONE_DIR>],
831 [Specify another checkout's clonedir to re-use. This makes use of
832 git-new-workdir, and saves a lot of diskspace when having multiple
833 trees side-by-side.]),
834 GIT_LINK_SRC=$withval ,
837 AC_ARG_WITH(openldap,
838 AS_HELP_STRING([--with-openldap],
839 [Enables the use of the OpenLDAP LDAP SDK instead of the Netscape/Mozilla one.]),
842 AC_ARG_WITH(vba-package-format,
843 AS_HELP_STRING([--with-vba-package-format],
844 [Specify package format for vba compatibility api. Specifying "builtin"
845 means the api component and associated type library are part of the
846 installation set. Specifying "extn" creates an uno extension that is
847 part of the installation set (located in the program directory) that
848 MUST be optionly registered using either the unopkg executeable or the
849 extension manager gui.])
851 Note: "builtin" is the default, "extn" can cause
854 Usage: --with-vba-package-format="builtin" or
855 --with-vba-package-format="extn"
860 AS_HELP_STRING([--with-theme="theme1 theme2..."],
861 [Choose which themes to include. By default those themes with an '*' are included.
862 Possible choices: *default, *crystal, *hicontrast, *oxygen, *tango, classic, industrial, human.]),
865 AC_ARG_WITH(helppack-integration,
867 --without-helppack-integration It will not integrate the helppacks to the installer
869 Please use this switch to use the online help or separate help packages.],
873 AS_HELP_STRING([--without-fonts],
874 [LibreOffice includes some third-party fonts to provide a reliable basis for
875 help content, templates, samples, etc. When these fonts are already
876 known to be available on the system then you should use this option.]),
880 AS_HELP_STRING([--without-ppds],
881 [Removes Postscript Printer definition files from LibreOffice
882 installation set, for people building for specific distributions where
883 PPDs are known to be already available (every recent distro with CUPS backend).]),
887 AS_HELP_STRING([--without-afms],
888 [Removes bitmap font files from LibreOffice installation set, for people
889 building for specific distributions where AFM files or TrueType Fonts
890 are known to be available.]),
893 AC_ARG_WITH(agfa-monotype-fonts,
894 AS_HELP_STRING([--with-agfa-monotype-fonts],
895 [This switch should only be enabled for those who have the right
896 to use or distribute the proprietary Agfa Monotype
901 AS_HELP_STRING([--with-epm],
902 [Decides which epm to use. Default is to use the one from the system if
903 one is built. When either this is not there or you say =internal epm
907 AC_ARG_WITH(package-format,
908 AS_HELP_STRING([--with-package-format],
909 [Specify package format(s) for LibreOffice installsets. Default is the
910 "normal" one of the OS/Distribution. Possible values: aix, bsd, deb,
911 inst, tardist, osx, pkg, rpm, setld, native, portable, archive, dmg,
912 installed, msi. Example: --with-package-format="deb dmg"]),
915 AC_ARG_WITH(system-libs,
916 AS_HELP_STRING([--with-system-libs],
917 [Use libraries already on system -- enables all --with-system-* flags except
921 AC_ARG_WITH(system-headers,
922 AS_HELP_STRING([--with-system-headers],
923 [Use headers already on system -- enables all --with-system-* flags for
924 external packages whose headers are the only entities used i.e.
925 boost/vigra/odbc/sane-header(s).]),
928 AC_ARG_WITH(system-jars,
929 AS_HELP_STRING([--without-system-jars],
930 [When building with --with-system-libs, also the needed jars are expected
931 on the system. Use this to disable that (except for the db case where
932 --with-system-db *has to* imply using the db.jar from there, too).]),
935 AC_ARG_WITH(system-stdlibs,
936 AS_HELP_STRING([--without-system-stdlibs],
937 [Bundle the used libstdc++/libgcc_s into the installation set.]),,
938 [with_system_stdlibs="$with_system_libs"])
940 AC_ARG_WITH(system-cairo,
941 AS_HELP_STRING([--with-system-cairo],
942 [Use Cairo libraries already on system.]),,
943 [with_system_cairo="$with_system_libs"])
945 AC_ARG_WITH(system-graphite,
946 AS_HELP_STRING([--with-system-graphite],
947 [Use graphite library already installed on system.]),,
948 [with_system_graphite="$with_system_libs"])
950 AC_ARG_WITH(system-nss,
951 AS_HELP_STRING([--with-system-nss],
952 [Use NSS/nspr libraries already on system.]),,
953 [with_system_nss="$with_system_libs"])
955 AC_ARG_WITH(system-sampleicc,
956 AS_HELP_STRING([--with-system-sampleicc],
957 [Use SampleICC libraries already on system (used only during build).]),,
958 [with_system_sampleicc="$with_system_libs"])
960 AC_ARG_WITH(mozilla-version,
961 AS_HELP_STRING([--with-mozilla-version],
962 [Choose which version of Mozilla to use while building Mozilla.
963 (default=1.7.5) Note that not all versions are supported.]),
966 AC_ARG_WITH(mozilla-toolkit,
967 AS_HELP_STRING([--with-mozilla-toolkit],
968 [Choose which GUI toolkit to use while building Mozilla components. (default=gtk2)]),
971 AC_ARG_WITH(myspell-dicts,
972 AS_HELP_STRING([--without-myspell-dicts],
973 [Removes myspell dictionaries from LibreOffice installation set, for
974 people building for specific distributions where the myspell dictionaries
975 are installed from other sources.]),
978 AC_ARG_WITH(system-dicts,
979 AS_HELP_STRING([--with-system-dicts],
980 [Use dictionaries from system paths- Specify them via
981 --with-{dict,hyph,thes}-path=/path if you want to override the default ones.]),
984 AC_ARG_WITH(external-dict-dir,
985 AS_HELP_STRING([--with-external-dict-dir],
986 [Specify external dictionary dir.]),
989 AC_ARG_WITH(external-hyph-dir,
990 AS_HELP_STRING([--with-external-hyph-dir],
991 [Specify external hyphenation pattern dir.]),
994 AC_ARG_WITH(external-thes-dir,
995 AS_HELP_STRING([--with-external-thes-dir],
996 [Specify external thesaurus dir.]),
999 AC_ARG_WITH(system-zlib,
1000 AS_HELP_STRING([--with-system-zlib],
1001 [Use zlib already on system.]),,
1002 [if test "$_os" != "WINNT"; then
1003 with_system_zlib=yes
1005 with_system_zlib="$with_system_libs"
1008 AC_ARG_WITH(system-openssl,
1009 AS_HELP_STRING([--with-system-openssl],
1010 [Use OpenSSL already on system.]),,
1011 [with_system_openssl="$with_system_libs"])
1013 AC_ARG_WITH(system-jpeg,
1014 AS_HELP_STRING([--with-system-jpeg],
1015 [Use jpeg already on system.]),,
1016 [if test "$_os" = "Linux"; then
1017 with_system_jpeg=yes
1019 with_system_jpeg="$with_system_libs"
1022 AC_ARG_WITH(system-expat,
1023 AS_HELP_STRING([--with-system-expat],
1024 [Use expat already on system.]),,
1025 [with_system_expat="$with_system_libs"])
1027 AC_ARG_WITH(system-libcmis,
1028 AS_HELP_STRING([--with-system-libcmis],
1029 [Use libcmis already on system.]),,
1030 [with_system_libcmis="$with_system_libs"])
1032 AC_ARG_WITH(system-libvisio,
1033 AS_HELP_STRING([--with-system-libvisio],
1034 [Use libvisio already on system.]),,
1035 [with_system_libvisio="$with_system_libs"])
1037 AC_ARG_WITH(system-libwpd,
1038 AS_HELP_STRING([--with-system-libwpd],
1039 [Use libwpd already on system.]),,
1040 [with_system_libwpd="$with_system_libs"])
1042 AC_ARG_WITH(system-libwps,
1043 AS_HELP_STRING([--with-system-libwps],
1044 [Use libwps already on system.]),,
1045 [with_system_libwps="$with_system_libs"])
1047 AC_ARG_WITH(system-libwpg,
1048 AS_HELP_STRING([--with-system-libwpg],
1049 [Use libwpg already on system.]),,
1050 [with_system_libwpg="$with_system_libs"])
1052 AC_ARG_WITH(system-libxml,
1053 AS_HELP_STRING([--with-system-libxml],
1054 [Use libxml/libxslt already on system.]),,
1055 [if test "$_os" = "Darwin"; then
1056 with_system_libxml=yes
1058 with_system_libxml="$with_system_libs"
1061 AC_ARG_WITH(system-icu,
1062 AS_HELP_STRING([--with-system-icu],
1063 [Use icu already on system.]),,
1064 [with_system_icu="$with_system_libs"])
1066 AC_ARG_WITH(system-poppler,
1067 AS_HELP_STRING([--with-system-poppler],
1068 [Use system poppler. (only needed for pdfimport extension)]),,
1069 [with_system_poppler="$with_system_libs"])
1071 AC_ARG_WITH(system-db,
1072 AS_HELP_STRING([--with-system-db],
1073 [Use Berkeley db already on system.]),,
1074 [with_system_db="$with_system_libs"])
1076 AC_ARG_WITH(system-lucene,
1077 AS_HELP_STRING([--with-system-lucene],
1078 [Use Lucene already on system.]),,
1079 [with_system_lucene="$with_system_jars"])
1081 AC_ARG_WITH(system-apache-commons,
1082 AS_HELP_STRING([--with-system-apache-commons],
1083 [Use Apache commons libraries already on system.]),,
1084 [with_system_apache_commons="$with_system_jars"])
1086 AC_ARG_WITH(lucene-core-jar,
1087 AS_HELP_STRING([--with-lucene-core-jar=JARFILE],
1088 [Specify path to jarfile manually.]),
1089 LUCENE_CORE_JAR=$withval)
1091 AC_ARG_WITH(lucene-analyzers-jar,
1092 AS_HELP_STRING([--with-lucene-analyzers-jar=JARFILE],
1093 [Specify path to jarfile manually.]),
1094 LUCENE_ANALYZERS_JAR=$withval ,)
1096 AC_ARG_WITH(system-mysql,
1097 AS_HELP_STRING([--with-system-mysql],
1098 [Use MySQL libraries already on system, for building the MySQL Connector/LibreOffice
1099 extension. If the the mysql_config executable is not in PATH, use MYSQLCONFIG to
1101 [with_system_mysql="$with_system_libs"])
1103 AC_ARG_WITH(libmysql-path,
1104 AS_HELP_STRING([--with-libmysql-path],
1105 [Use Connector/C (libmysql) installation for building the MySQL
1106 Connector/LibreOffice extension.])
1108 Usage: --with-libmysql-path=<absolute path to
1109 your Connector/C installation>
1113 AC_ARG_WITH(system-mysql-cppconn,
1114 AS_HELP_STRING([--with-system-mysql-cppconn],
1115 [Use MySQL C++ Connector libraries already on system.]),,
1116 [with_system_mysql_cppconn="$with_system_libs"])
1118 AC_ARG_WITH(system-postgresql,
1119 AS_HELP_STRING([--with-system-postgresql],
1120 [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC
1121 driver. If pg_config is not in PATH, use PGCONFIG to point to it.]),,
1122 [with_system_postgresql="$with_system_libs"])
1124 AC_ARG_WITH(libpq-path,
1125 AS_HELP_STRING([--with-libpq-path],
1126 [Use this PostgreSQL C interface (libpq) installation for building
1127 the PostgreSQL-SDBC extension.])
1129 Usage: --with-libpq-path=<absolute path to
1130 your libq installation>
1134 AC_ARG_WITH(system-hsqldb,
1135 AS_HELP_STRING([--with-system-hsqldb],
1136 [Use hsqldb already on system.]),,
1137 [with_system_hsqldb="$with_system_jars"])
1139 AC_ARG_WITH(hsqldb-jar,
1140 AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
1141 [Specify path to jarfile manually.]),
1142 HSQLDB_JAR=$withval)
1144 AC_ARG_WITH(system-beanshell,
1145 AS_HELP_STRING([--with-system-beanshell],
1146 [Use beanshell already on system.]),,
1147 [with_system_beanshell="$with_system_jars"])
1149 AC_ARG_WITH(beanshell-jar,
1150 AS_HELP_STRING([--with-beanshell-jar=JARFILE],
1151 [Specify path to jarfile manually.]),
1154 AC_ARG_WITH(commons-codec-jar,
1155 AS_HELP_STRING([--with-commons-codec-jar=JARFILE],
1156 [Specify path to jarfile manually.]),
1157 COMMONS_CODEC_JAR=$withval)
1159 AC_ARG_WITH(commons-lang-jar,
1160 AS_HELP_STRING([--with-commons-lang-jar=JARFILE],
1161 [Specify path to jarfile manually.]),
1162 COMMONS_LANG_JAR=$withval)
1164 AC_ARG_WITH(commons-httpclient-jar,
1165 AS_HELP_STRING([--with-commons-httpclient-jar=JARFILE],
1166 [Specify path to jarfile manually.]),
1167 COMMONS_HTTPCLIENT_JAR=$withval)
1169 AC_ARG_WITH(commons-logging-jar,
1170 AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
1171 [Specify path to jarfile manually.]),
1172 COMMONS_LOGGING_JAR=$withval)
1174 AC_ARG_WITH(system-servlet-api,
1175 AS_HELP_STRING([--with-system-servlet-api],
1176 [Use servlet-api already on system.]),,
1177 [with_system_servlet_api="$with_system_jars"])
1179 AC_ARG_WITH(servlet-api-jar,
1180 AS_HELP_STRING([--with-servlet-api-jar=JARFILE],
1181 [Specify path to jarfile manually.]),
1182 SERVLETAPI_JAR=$withval)
1184 AC_ARG_WITH(system-jfreereport,
1185 AS_HELP_STRING([--with-system-jfreereport],
1186 [Use JFreeReport already on system.]),,
1187 [with_system_jfreereport="$with_system_jars"])
1189 AC_ARG_WITH(sac-jar,
1190 AS_HELP_STRING([--with-sac-jar=JARFILE],
1191 [Specify path to jarfile manually.]),
1194 AC_ARG_WITH(libxml-jar,
1195 AS_HELP_STRING([--with-libxml-jar=JARFILE],
1196 [Specify path to jarfile manually.]),
1197 LIBXML_JAR=$withval)
1199 AC_ARG_WITH(flute-jar,
1200 AS_HELP_STRING([--with-flute-jar=JARFILE],
1201 [Specify path to jarfile manually.]),
1204 AC_ARG_WITH(jfreereport-jar,
1205 AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
1206 [Specify path to jarfile manually.]),
1207 JFREEREPORT_JAR=$withval)
1209 AC_ARG_WITH(liblayout-jar,
1210 AS_HELP_STRING([--with-liblayout-jar=JARFILE],
1211 [Specify path to jarfile manually.]),
1212 LIBLAYOUT_JAR=$withval)
1214 AC_ARG_WITH(libloader-jar,
1215 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1216 [Specify path to jarfile manually.]),
1217 LIBLOADER_JAR=$withval)
1219 AC_ARG_WITH(libloader-jar,
1220 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1221 [Specify path to jarfile manually.]),
1222 LIBLOADER_JAR=$withval)
1224 AC_ARG_WITH(libformula-jar,
1225 AS_HELP_STRING([--with-libformula-jar=JARFILE],
1226 [Specify path to jarfile manually.]),
1227 LIBFORMULA_JAR=$withval)
1229 AC_ARG_WITH(librepository-jar,
1230 AS_HELP_STRING([--with-librepository-jar=JARFILE],
1231 [Specify path to jarfile manually.]),
1232 LIBREPOSITORY_JAR=$withval)
1234 AC_ARG_WITH(libfonts-jar,
1235 AS_HELP_STRING([--with-libfonts-jar=JARFILE],
1236 [Specify path to jarfile manually.]),
1237 LIBFONTS_JAR=$withval)
1239 AC_ARG_WITH(libserializer-jar,
1240 AS_HELP_STRING([--with-libserializer-jar=JARFILE],
1241 [Specify path to jarfile manually.]),
1242 LIBSERIALIZER_JAR=$withval)
1244 AC_ARG_WITH(libbase-jar,
1245 AS_HELP_STRING([--with-libbase-jar=JARFILE],
1246 [Specify path to jarfile manually.]),
1247 LIBBASE_JAR=$withval)
1249 AC_ARG_WITH(system-saxon,
1250 AS_HELP_STRING([--with-system-saxon],
1251 [Use saxon already on system.]),,
1252 [with_system_saxon="$with_system_jars"])
1254 AC_ARG_WITH(saxon-jar,
1255 AS_HELP_STRING([--with-saxon-jar=JARFILE],
1256 [Specify path to jarfile manually.]),
1259 AC_ARG_WITH(system-odbc,
1260 AS_HELP_STRING([--with-system-odbc],
1261 [Use the odbc headers already on system.]),,
1262 [with_system_odbc="$with_system_headers"])
1264 AC_ARG_WITH(system-sane,
1265 AS_HELP_STRING([--with-system-sane],
1266 [Use sane.h already on system.]),,
1267 [with_system_sane="$with_system_headers"])
1269 AC_ARG_WITH(system-xextensions-headers,
1270 AS_HELP_STRING([--with-system-xextensions-headers],
1271 [To build without system X11 extensions headers, use
1272 --without-system-xextensions-headers. This is possibly
1273 useful on legacy unix systems which ship with the libs
1274 but without the headers.]))
1276 AC_ARG_WITH(system-mesa-headers,
1277 AS_HELP_STRING([--with-system-mesa-headers],
1278 [Use Mesa headers already on system.]),,
1279 [with_system_mesa_headers="$with_system_headers"])
1281 AC_ARG_WITH(system-curl,
1282 AS_HELP_STRING([--with-system-curl],
1283 [Use curl already on system.]),,
1284 [if test "$_os" = "Darwin"; then
1285 with_system_curl=yes
1287 with_system_curl="$with_system_libs"
1290 AC_ARG_WITH(system-boost,
1291 AS_HELP_STRING([--with-system-boost],
1292 [Use boost already on system.]),,
1293 [with_system_boost="$with_system_headers"])
1295 AC_ARG_WITH(system-mdds,
1296 AS_HELP_STRING([--with-system-mdds],
1297 [Use mdds already on system.]),,
1298 [with_system_mdds="$with_system_headers"])
1300 AC_ARG_WITH(system-vigra,
1301 AS_HELP_STRING([--with-system-vigra],
1302 [Use vigra already on system.]),,
1303 [with_system_vigra="$with_system_headers"])
1305 AC_ARG_WITH(system-neon,
1306 AS_HELP_STRING([--with-system-neon],
1307 [Use neon already on system.]),,
1308 [with_system_neon="$with_system_libs"])
1310 AC_ARG_WITH(system-hunspell,
1311 AS_HELP_STRING([--with-system-hunspell],
1312 [Use libhunspell already on system.]),,
1313 [with_system_hunspell="$with_system_libs"])
1315 AC_ARG_WITH(system-mythes,
1316 AS_HELP_STRING([--with-system-mythes],
1317 [Use mythes already on system.]),,
1318 [with_system_mythes="$with_system_libs"])
1320 AC_ARG_WITH(system-altlinuxhyph,
1321 AS_HELP_STRING([--with-system-altlinuxhyph],
1322 [Use ALTLinuxhyph already on system.]),,
1323 [with_system_altlinuxhyph="$with_system_libs"])
1325 AC_ARG_WITH(system-lpsolve,
1326 AS_HELP_STRING([--with-system-lpsolve],
1327 [Use lpsolve already on system.]),,
1328 [with_system_lpsolve="$with_system_libs"])
1330 AC_ARG_WITH(system-libexttextcat,
1331 AS_HELP_STRING([--with-system-libexttextcat],
1332 [Use libexttextcat already on system.]),,
1333 [with_system_libexttextcat="$with_system_libs"])
1335 AC_ARG_WITH(system-cppunit,
1336 AS_HELP_STRING([--with-system-cppunit],
1337 [Use cppunit already on system.]),,
1338 [with_system_cppunit="$with_system_libs"])
1340 AC_ARG_WITH(system-redland,
1341 AS_HELP_STRING([--with-system-redland],
1342 [Use redland library already on system.]),,
1343 [with_system_redland="$with_system_libs"])
1345 AC_ARG_WITH(system-mozilla,
1346 AS_HELP_STRING([--with-system-mozilla],
1347 [Use Mozilla already on system. Note that some components cannot be built
1348 against a contemporary Mozilla. The flavour used can be specified by
1349 --with-system-mozilla=<flavour>. Supported are: libxul (default),
1350 xulrunner, firefox, seamonkey, mozilla, iceape.]),
1351 WITH_SYSTEM_MOZILLA=$withval ,
1352 WITH_SYSTEM_MOZILLA=no)
1354 AC_ARG_WITH(system-mozilla-headers,
1355 AS_HELP_STRING([--with-system-mozilla-headers],
1356 [Use mozilla headers provided by system instead of bundled ones. Used in
1358 [with_system_mozilla_headers="$with_system_headers"]
1361 AC_ARG_WITH(system-gettext,
1362 AS_HELP_STRING([--with-system-gettext],
1363 [Use gettext runtime library already on system.]),,
1364 [with_system_gettext="$with_system_libs"])
1366 AC_ARG_WITH(system-libpng,
1367 AS_HELP_STRING([--with-system-libpng],
1368 [Use libpng already on system.]),,
1369 [with_system_libpng="$with_system_libs"])
1371 AC_ARG_WITH(linker-hash-style,
1372 AS_HELP_STRING([--with-linker-hash-style],
1373 [Use linker with --hash-style=<style> when linking shared objects.
1374 Possible values: "sysv", "gnu", "both". The default value is "gnu"
1375 if supported on the build system, and "sysv" otherwise.]))
1377 AC_ARG_WITH(stlport,
1378 AS_HELP_STRING([--with-stlport],
1379 [Build the STLPort library for compatibility with old extensions for
1380 architectures where STLPort used to be used.]),
1381 with_stlport=$withval ,
1384 AC_ARG_WITH(jdk-home,
1385 AS_HELP_STRING([--with-jdk-home],
1386 [If you have installed JDK 1.3 or later on your system please supply the
1387 path here. Note that this is not the location of the java command but the
1388 location of the entire distribution.])
1390 Usage: --with-jdk-home=<absolute path to JDK home>
1394 AC_ARG_WITH(gxx_include_path,
1395 AS_HELP_STRING([--with-gxx-include-path],
1396 [If you want to override the autodetected g++ include path.])
1398 Usage: --with-gxx-include-path=<absolute path to
1404 AS_HELP_STRING([--with-help],
1405 [Enable the build of help.
1407 To build without help, use --without-help.]))
1410 AS_HELP_STRING([--with-java],
1411 [Specify the name of the Java interpreter command. Typically "java"
1412 which is the default.
1414 To build without support for Java components, applets, accessibility
1415 or the XML filters written in Java, use --without-java or --with-java=no.])
1417 Usage: --with-java==<java command>
1420 [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
1424 AC_ARG_WITH(java_target_version,
1425 AS_HELP_STRING([--with-java-target-version],
1426 [Generate class files that will work on JVMs with the specified version.
1427 For example, use --with-java-target-version=1.4 to make sure that the
1428 application will work with JVM 1.4 even when compiled with JDK 1.5.])
1430 This option is ignored when you compile with gcj/gij.
1432 Usage: --with-java-target-version=<jvm version>
1436 AC_ARG_WITH(jvm-path,
1437 AS_HELP_STRING([--with-jvm-path],
1438 [Use a specific JVM search path at runtime.])
1440 Usage: --with-jvm-path=<absolute path to parent of jvm home>
1442 e. g.: --with-jvm-path=/usr/lib/
1443 to find JRE/JDK in /usr/lib/jvm/
1447 AC_ARG_WITH(ant-home,
1448 AS_HELP_STRING([--with-ant-home],
1449 [If you have installed Jakarta Ant on your system, please supply the path here.
1450 Note that this is not the location of the Ant binary but the location
1451 of the entire distribution.])
1453 Usage: --with-ant-home=<absolute path to Ant home>
1458 AS_HELP_STRING([--with-junit],
1459 [Specifies the JUnit 4 jar file to use for JUnit-based tests.
1460 --without-junit disables those tests. Not relevant in the --without-java case.])
1462 Usage: --with-junit=<absolute path to JUnit 4 jar>
1466 AC_ARG_WITH(perl-home,
1467 AS_HELP_STRING([--with-perl-home],
1468 [If you have installed Perl 5 Distribution, on your system, please
1469 supply the path here. Note that this is not the location of the Perl
1470 binary but the location of the entire distribution.])
1472 Usage: --with-perl-home=<abs. path to Perl 5 home>
1476 AC_ARG_WITH(cl-home,
1477 AS_HELP_STRING([--with-cl-home],
1478 [For Windows NT users, please supply the path for the Microsoft C/C++
1479 compiler. Note that this is not the location of the compiler binary but
1480 the location of the entire distribution.])
1482 Usage: --with-cl-home=<absolute path to Microsoft
1483 C/C++ compiler home>
1487 AC_ARG_WITH(mspdb-path,
1488 AS_HELP_STRING([--with-mspdb-path],
1489 [For Microsoft C/C++ compiler users, please supply the path pointing to
1490 the mspdb80.dll (if using Visual Studio 2008) or mspdb100.dll (if using
1491 Visual Studio 2010).])
1493 Usage: --with-mspdb-path=<path to
1494 mspdb80.dll/mspdb100.dll>
1498 AC_ARG_WITH(midl-path,
1499 AS_HELP_STRING([--with-midl-path],
1500 [For Microsoft compiler users, please supply the path pointing to the midl.exe.])
1502 Usage: --with-midl-path=<abs. path to midl.exe>
1506 AC_ARG_WITH(csc-path,
1507 AS_HELP_STRING([--with-csc-path],
1508 [For Windows builds, please supply the path pointing to the csc.exe.
1509 Usually found automatically when building on Windows.])
1511 Usage: --with-csc-path=<abs. path to csc.exe>
1515 AC_ARG_WITH(dotnet-framework-home,
1516 AS_HELP_STRING([--with-dotnet-framework-home],
1517 [For Microsoft compiler users, please supply the path pointing to
1518 lib/mscoree.lib, usually something like:
1519 "/cygdrive/c/Program Files/Windows SDKs/Windows/v7.0"])
1521 Note that in most cases it will be automatically
1524 Usage: --with-dotnet-framework-home=<absolute path to .NET
1529 AC_ARG_WITH(windows-sdk-home,
1530 AS_HELP_STRING([--with-windows-sdk-home],
1531 [For Windows builds, please supply the path to the Windows SDK.
1532 Usually found automatically when building on Windows.])
1534 Usage: --with-windows-sdk-home=<absolute path to Windows SDK>
1538 AC_ARG_WITH(directx-home,
1539 AS_HELP_STRING([--with-directx-home],
1540 [For Windows users, please supply the path to the Microsoft DirectX SDK.])
1542 Usage: --with-directx-home=<absolute path to
1543 Microsoft DirectX SDK>
1547 AC_ARG_WITH(mozilla-build,
1548 AS_HELP_STRING([--with-mozilla-build],
1549 [For Windows users, please supply the path to the Mozilla build tools.])
1551 Usage: --with-mozilla-build=<absolute path to
1552 Mozilla build tools>
1554 At the moment of this writing, an installer for the
1555 mozilla build tools can be obtained from http://ftp.
1556 mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
1558 MOZILLABUILD=$withval ,
1561 AC_ARG_WITH(local-solver,
1562 AS_HELP_STRING([--with-local-solver],
1563 [If you have solver in a location other than ./solver, please supply the path here.])
1565 Usage: --with-local-solver=<abs. path to solver>
1570 AS_HELP_STRING([--with-lang],
1571 [Use this option to build LibreOffice with additional language support.
1572 English (US) is always included by default.
1573 Separate multiple languages with space.
1574 For all languages, use --with-lang=ALL.])
1576 Usage: --with-lang="es sw tu cs sk"
1580 dnl ===================================================================
1582 dnl ===================================================================
1584 AC_ARG_WITH(branding,
1585 [ --with-branding Use given path to retrieve all branding images.
1586 Expects /path/intro.png ...
1587 /path/backing_rtl_right.png to be there. Individual
1588 images can be overridden via --with-intro-bitmap ...
1589 --with-startcenter-rtl-left-bitmap switches.
1591 Usage: --with-branding=/path/to/images
1594 AC_ARG_WITH(intro-bitmap,
1595 [ --with-intro-bitmap Prefer the specified intro bitmap over the
1598 Usage: --with-intro-bitmap=/path/my_ooo_intro.png
1601 AC_ARG_WITH(intro-progressbar-color,
1602 [ --with-intro-progressbar-color Set color of progress bar on intro screen.
1603 Comma separated RGB values in decimal format.
1605 Usage: --with-intro-progressbar-color=126,170,23
1608 AC_ARG_WITH(intro-progressbar-size,
1609 [ --with-intro-progressbar-size Set size of progress bar on intro screen.
1610 Comma separated values in decimal format.
1612 Usage: --with-intro-progressbar-size=319,10
1615 AC_ARG_WITH(intro-progressbar-position,
1616 [ --with-intro-progressbar-position Set position of progress bar on intro screen.
1617 Comma separated values in decimal format.
1619 Usage: --with-intro-progressbar-position=164,225
1622 AC_ARG_WITH(intro-progressbar-frame-color,
1623 [ --with-intro-progressbar-frame-color Set color of progress bar frame on intro screen.
1624 Comma separated RGB values in decimal format.
1626 Usage: --with-intro-progressbar-frame-color=207,208,211
1629 AC_ARG_WITH(about-bitmap,
1630 [ --with-about-bitmap Similarly to --with-intro-bitmap, this allows
1631 specification of bitmap for the About box.
1633 Usage: --with-about-bitmap=/path/my_ooo_about.png
1636 AC_ARG_WITH(startcenter-left-bitmap,
1637 [ --with-startcenter-left-bitmap Similarly to --with-intro-bitmap, this allows
1638 specification of bitmap for the Start center.
1640 Usage: --with-startcenter-left-bitmap=/path/my_backing_left.png
1643 AC_ARG_WITH(startcenter-right-bitmap,
1644 [ --with-startcenter-right-bitmap Similarly to --with-intro-bitmap, this allows
1645 specification of bitmap for the Start center.
1647 Usage: --with-startcenter-right-bitmap=/path/my_backing_right.png
1650 AC_ARG_WITH(startcenter-rtl-left-bitmap,
1651 [ --with-startcenter-rtl-left-bitmap Similarly to --with-intro-bitmap, this allows
1652 specification of bitmap for the Start center.
1654 Usage: --with-startcenter-rtl-left-bitmap=/path/my_backing_rtl_left.png
1657 AC_ARG_WITH(startcenter-rtl-right-bitmap,
1658 [ --with-startcenter-rtl-right-bitmap Similarly to --with-intro-bitmap, this allows
1659 specification of bitmap for the Start center.
1661 Usage: --with-startcenter-rtl-right-bitmap=/path/my_backing_rtl_right.png
1664 AC_ARG_WITH(startcenter-space-bitmap,
1665 [ --with-startcenter-space-bitmap Similarly to --with-intro-bitmap, this allows
1666 specification of bitmap for the Start center.
1668 Usage: --with-startcenter-space-bitmap=/path/my_backing_space.png
1672 AS_HELP_STRING([--with-vendor],
1673 [Set vendor of the build.])
1675 Usage: --with-vendor="John the Builder"
1679 AC_ARG_WITH(unix-wrapper,
1680 AS_HELP_STRING([--with-unix-wrapper],
1681 [Redefines the name of the UNIX wrapper that will be used in the desktop
1682 files and in the desktop-integration RPMs.])
1684 Usage: --with-unix-wrapper=ooffice
1688 AC_ARG_WITH(compat-oowrappers,
1689 AS_HELP_STRING([--with-compat-oowrappers],
1690 [Install oo* wrappers in parallel with
1691 lo* ones to keep backward compatibility.
1692 Has effect only with make distro-pack-install]),
1695 AC_ARG_WITH(asm-home,
1696 AS_HELP_STRING([--with-asm-home],
1697 [For Windows, please supply the path for the ml.exe or ml64.exe assembler.])
1699 Usage: --with-asm-home=<path to assembler directory>
1703 AC_ARG_WITH(os-version,
1704 AS_HELP_STRING([--with-os-version],
1705 [For FreeBSD users, use this option option to override the detected OSVERSION.])
1707 Usage: --with-os-version=<OSVERSION>
1711 AC_ARG_WITH(mingw-cross-compiler,
1712 AS_HELP_STRING([--with-mingw-cross-compiler],
1713 [Specify the MinGW cross-compiler to use.])
1715 Usage: --with-mingw-cross-compiler=<mingw32-g++ command>
1717 When building on the ODK on Unix and building unowinreg.dll,
1718 specify the MinGW C++ cross-compiler.
1722 AC_ARG_WITH(build-version,
1723 AS_HELP_STRING([--with-build-version],
1724 [Allows the builder to add a custom version tag that will appear in the
1725 Help/About box for QA purposes.])
1727 Usage: --with-build-version="Built by Jim"
1729 with_build_version=$withval ,
1733 AS_HELP_STRING([--with-alloc],
1734 [Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
1735 Note that on FreeBSD/NetBSD system==jemalloc]),
1738 AC_ARG_WITH(sun-templates,
1739 AS_HELP_STRING([--with-sun-templates],
1740 [Integrate Sun template packages.]),
1743 AC_ARG_WITH(num-cpus,
1744 AS_HELP_STRING([--with-num-cpus],
1745 [Number of build processes/cpus to use (number of projects that will build at the same time).
1746 Multi-process/multi-cpu builds can save a lot of time on multi-cpu machines.
1747 Defaults to the number of CPUs on the machine.]),
1750 AC_ARG_WITH(max-jobs,
1751 AS_HELP_STRING([--with-max-jobs],
1752 [Maximum number of jobs that will be issued at the same time per dmake or gbuild subproject.
1753 The real number of the jobs is affected by the --with-num-cpus too, it can get up to CPUS*max_jobs.
1754 Defaults to 1, unless you configure --enable-icecream - then to 10.]),
1757 dnl ===================================================================
1758 dnl MacOSX build and runtime environment options
1759 dnl ===================================================================
1761 AC_ARG_WITH(macosx-sdk,
1762 AS_HELP_STRING([--with-macosx-sdk],
1763 [Use a specific SDK for building.])
1765 Usage: --with-macosx-sdk=<version>
1767 e. g.: --with-macosx-sdk=10.4
1769 there are 3 options to controle the MacOSX build:
1770 --with-macosx-sdk (refered as 'sdl' below)
1771 --with-macosx-version-min-required (refered as 'min' below)
1772 --with-macosx-version-max-allowed (refered as 'max' below)
1774 the connection between these value and the default they take is as follow:
1775 ( ? means not specified on the command line, constraint: x <= y <= z)
1777 ==========================================
1778 command line || config result
1779 ==========================================
1780 min | max | sdk || min | max | sdk |
1781 ? | ? | ? || 10.4 | 10.4 | 10.4 |
1782 ? | ? | 10.x || 10.4 | 10.4 | 10.x |
1783 ? | 10.x | ? || 10.4 | 10.x | 10.x |
1784 ? | 10.x | 10.y || 10.4 | 10.x | 10.y |
1785 10.x | ? | ? || 10.x | 10.x | 10.x |
1786 10.x | ? | 10.y || 10.x | 10.x | 10.y |
1787 10.x | 10.y | ? || 10.x | 10.y | 10.y |
1788 10.x | 10.y | 10.z || 10.x | 10.y | 10.z |
1791 see: http://developer.apple.com/library/mac/#technotes/tn2064/_index.html
1792 for a detailled technical explanation of these variables
1794 Note: MACOSX_DEPLOYMENT_TARGET will be set to the value of 'min'.
1799 AC_ARG_WITH(macosx-version-min-required,
1800 AS_HELP_STRING([--with-macosx-version-min-required],
1801 [set the minimum OS version needed to run the built LibreOffice])
1803 Usage: --with-macosx-version-min-required=<version>
1805 e. g.: --with-macos-version-min-required=10.4
1806 see --with-macosx-sdk for more info
1810 AC_ARG_WITH(macosx-version-max-allowed,
1811 AS_HELP_STRING([--with-macosx-version-max-allowed],
1812 [set the maximum allowed OS version the LibreOffice compilation can use APIs from])
1814 Usage: --with-macosx-version-max-allowed=<version>
1816 e. g.: --with-macos-version-max-allowed=10.6
1817 see --with-macosx-sdk for more info
1822 dnl ===================================================================
1823 dnl check for required programs (grep, awk, sed, bash)
1824 dnl ===================================================================
1827 AC_PATH_PROG( AWK, $AWK)
1828 if test -z "$AWK"; then
1829 AC_MSG_ERROR([install awk to run this script])
1832 AC_PATH_PROG(BASH, bash)
1833 if test -z "$BASH"; then
1834 AC_MSG_ERROR([bash not found in \$PATH])
1838 AC_MSG_CHECKING([for GNU or BSD tar])
1839 for a in $GNUTAR gtar gnutar tar /usr/sfw/bin/gtar; do
1840 $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
1841 if test $? -eq 0; then
1846 AC_MSG_RESULT($GNUTAR)
1847 if test -z "$GNUTAR"; then
1848 AC_MSG_ERROR([not found. install GNU or BSD tar.])
1852 dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
1853 dnl desktop OSes from "mobile" ones.
1855 dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
1856 dnl In other words, that when building for an OS that is not a
1857 dnl "desktop" one but a "mobile" one, we are always cross-compiling.
1859 dnl Note the direction of the implication; there is no assumption that
1860 dnl cross-compiling would imply a non-desktop OS.
1862 if test $_os != iOS -a $_os != Android; then
1863 BUILD_TYPE="$BUILD_TYPE DESKTOP"
1866 dnl ===================================================================
1867 dnl Extra check for Windows. Cygwin builds need gcc to build dmake
1868 dnl although MSVC is used to build other build-time tools and
1869 dnl LibreOffice itself.
1870 dnl ===================================================================
1871 if test "$build_os" = "cygwin" ; then
1872 AC_MSG_CHECKING([for Cygwin gcc/g++])
1873 if which gcc > /dev/null && which g++ > /dev/null ; then
1874 AC_MSG_RESULT([found])
1876 AC_MSG_ERROR([Cygwin gcc and g++ are needed, please install them.])
1882 dnl ===================================================================
1883 dnl Checks if ccache is available
1884 dnl ===================================================================
1885 if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \) ; then
1886 if test -z "$CC" ; then
1887 if test -z "$CXX" ; then
1888 AC_PATH_PROG([CCACHE],[ccache],[not found])
1889 if test "$CCACHE" = "not found" ; then
1893 # need to check for ccache version: otherwise prevents
1894 # caching of the results (like "-x objective-c++" for Mac)
1895 if test $_os = Darwin -o $_os = iOS; then
1896 # check ccache version
1897 AC_MSG_CHECKING([whether version of ccache is suitable])
1898 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
1899 CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1900 if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
1901 AC_MSG_RESULT([yes])
1904 AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. ccache will not be used.])
1910 AC_MSG_NOTICE([Automatic ccache detection ingored: CXX is pre-defined])
1914 AC_MSG_NOTICE([Automatic ccache detection ingored: CC is pre-defined])
1921 if test "$CCACHE" != "" ; then
1922 ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
1923 ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
1924 if test "$ccache_size" = "" ; then
1925 ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
1926 if test "$ccache_size" = "" ; then
1929 # we could not determine the size or it was less than 1GB -> disable auto-ccache
1930 if test $ccache_size -lt 1024 ; then
1932 AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-producive: Disabling auto-ccache detection])
1933 echo "ccache's cache size is less than 1GB using it is counter-producive: auto-ccache detection disabled" >> warn
1935 # warn that ccache may be too small for debug build
1936 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build])
1937 echo "ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build" >> warn
1940 if test $ccache_size -lt 5 ; then
1941 #warn that ccache may be too small for debug build
1942 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build])
1943 echo "ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build" >> warn
1948 dnl ===================================================================
1949 dnl Checks for C compiler,
1950 dnl The check for the C++ compiler is later on.
1951 dnl ===================================================================
1953 AC_MSG_CHECKING([gcc home])
1954 if test -z "$with_gcc_home"; then
1955 if test "$enable_icecream" = "yes" ; then
1956 GCC_HOME="/opt/icecream"
1958 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1959 GCC_HOME_SET="false"
1962 GCC_HOME="$with_gcc_home"
1964 AC_MSG_RESULT($GCC_HOME)
1967 if test "$GCC_HOME_SET" = "true" ; then
1968 if test -z "$CC"; then
1969 CC="$GCC_HOME/bin/gcc"
1971 if test -z "$CXX"; then
1972 CXX="$GCC_HOME/bin/g++"
1976 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1977 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
1981 COMPATH=`dirname "$CC"`
1982 if test "$COMPATH" = "." ; then
1983 AC_PATH_PROGS(COMPATH, $CC)
1984 dnl double square bracket to get single because of M4 quote...
1985 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1987 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
1992 dnl ===================================================================
1993 dnl Test MacOSX sdk and version requirement
1994 dnl ===================================================================
1995 if test "$_os" = "Darwin" ; then
1997 if test "$with_macosx_version_min_required" = "" ; then
1998 with_macosx_version_min_required="10.4"
2001 if test "$with_macosx_version_max_allowed" = "" ; then
2002 with_macosx_version_max_allowed="$with_macosx_version_min_required"
2005 if test "$with_macosx_sdk" = "" ; then
2006 with_macosx_sdk="$with_macosx_version_max_allowed"
2009 case "$with_macosx_sdk" in
2012 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.4u.sdk"
2013 if test ! -d "$MACOSX_SDK_PATH"; then
2014 MACOSX_SDK_PATH="/Developer-old/SDKs/MacOSX10.4u.sdk"
2016 macosx_sdk_value="1040"
2019 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.5.sdk"
2020 if test ! -d "$MACOSX_SDK_PATH"; then
2021 MACOSX_SDK_PATH="/Developer-old/SDKs/MacOSX10.5.sdk"
2023 macosx_sdk_value="1050"
2024 AC_MSG_WARN([Building with a SDK > 10.4 is experimental])
2025 echo "Building with a SDK > 10.4 is experimental" >> warn
2028 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.6.sdk"
2029 macosx_sdk_value="1060"
2030 AC_MSG_WARN([Building with a SDK > 10.4 is experimental])
2031 echo "Building with a SDK > 10.4 is experimental" >> warn
2034 MACOSX_SDK_PATH="/Developer/SDKs/MacOSX10.7.sdk"
2035 macosx_sdk_value="1070"
2036 AC_MSG_WARN([Building with SDK 10.7 is known to fail in vcl])
2037 echo "Building with SDK 10.7 is known to fail in vcl" >> warn
2040 AC_MSG_ERROR([$with_macosx_sdk is not a supported SDK value, supported value are 10.4, 10.5, 10.6 and 10.7])
2043 AC_MSG_CHECKING([the presence of the SDK $with_macosx_sdk])
2044 if test -d "$MACOSX_SDK_PATH" ; then
2045 AC_MSG_RESULT([$MACOSX_SDK_PATH ok])
2047 AC_MSG_ERROR([$MACOSX_SDK_PATH not found])
2049 MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
2051 case "$with_macosx_version_min_required" in
2054 MAC_OS_X_VERSION_MIN_REQUIRED="1040"
2057 MAC_OS_X_VERSION_MIN_REQUIRED="1050"
2058 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
2059 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
2060 if test -z "$save_CC" ; then
2066 MAC_OS_X_VERSION_MIN_REQUIRED="1060"
2067 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
2068 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
2069 if test -z "$save_CC" ; then
2075 MAC_OS_X_VERSION_MIN_REQUIRED="1070"
2076 AC_MSG_WARN([Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build])
2077 echo "Building with a minimum version requirement > 10.4 break 10.4 compatibility. do not use for deliverable build" >>warn
2078 if test -z "$save_CC" ; then
2084 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])
2088 case "$with_macosx_version_max_allowed" in
2091 MAC_OS_X_VERSION_MAX_ALLOWED="1040"
2094 MAC_OS_X_VERSION_MAX_ALLOWED="1050"
2097 MAC_OS_X_VERSION_MAX_ALLOWED="1060"
2100 MAC_OS_X_VERSION_MAX_ALLOWED="1070"
2103 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])
2107 AC_MSG_CHECKING([that macosx-version-min-required is coherent with macosx-version-max-allowed])
2108 if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED ; then
2109 AC_MSG_ERROR([the version minimumn required must be inferior or equal to the version maximum allowed])
2114 AC_MSG_CHECKING([that macosx-version-max-allowed is coherent macos-with-sdk])
2115 if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $macosx_sdk_value ; then
2116 AC_MSG_ERROR([the version maximum allowed cannot be greater thatn the sdk level])
2120 AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED])
2121 AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED])
2123 AC_SUBST(MACOSX_SDK_PATH)
2124 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
2125 AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
2126 AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED)
2128 dnl ===================================================================
2129 dnl Test the gcc version, 3 is OK
2130 dnl ===================================================================
2131 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) -a "$GCC" = "yes"; then
2132 AC_MSG_CHECKING([the GNU C compiler version])
2133 _gcc_version=`$CC -dumpversion`
2134 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
2135 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2137 if test "$_os" = "Darwin" -a "$with_macosx_sdk" = "10.4" -a "$GCCVER" -ge "040100" ; then
2138 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
2139 export CC="$GCC_HOME/bin/gcc-4.0"
2140 # export CC to have it available in set_soenv -> config.guess
2141 GCCVER2=`$CC -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2142 if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
2146 if test "$GCCVER" -ge "040100" ; then
2147 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])
2149 AC_MSG_RESULT([implicitly using CC=$CC])
2152 AC_MSG_RESULT([checked (gcc $_gcc_version)])
2158 # prefix C with ccache if needed
2160 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" ; then
2161 if test "$CCACHE" != "" ; then
2162 AC_MSG_CHECKING([whether $CC is already ccached])
2167 CFLAGS="$CFLAGS --ccache-skip -O2"
2168 dnl an empty program will do, we're checking the compiler flags
2169 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
2170 [use_ccache=yes], [use_ccache=no])
2171 if test $use_ccache = yes ; then
2172 AC_MSG_RESULT([yes])
2183 HAVE_LD_BSYMBOLIC_FUNCTIONS=
2184 if test "$GCC" = "yes"; then
2185 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
2186 bsymbolic_functions_ldflags_save=$LDFLAGS
2187 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
2188 AC_LINK_IFELSE([AC_LANG_PROGRAM([
2191 printf ("hello world\n");
2192 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
2193 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
2194 AC_MSG_RESULT( found )
2196 AC_MSG_RESULT( not found )
2198 LDFLAGS=$bsymbolic_functions_ldflags_save
2200 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
2202 dnl ===================================================================
2203 dnl Set up a different compiler to produce tools to run on the build
2204 dnl machine when doing cross-compilation
2205 dnl ===================================================================
2207 m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
2208 if test "$cross_compiling" = "yes"; then
2209 AC_MSG_CHECKING([for BUILD platform configuration])
2211 rm -rf CONF-FOR-BUILD Env.Build.sh
2212 mkdir CONF-FOR-BUILD
2223 solenv/inc/langlist.mk \
2224 solenv/inc/postset.mk \
2225 desktop/scripts/soffice.sh.in \
2226 | (cd CONF-FOR-BUILD && tar xf -)
2228 unset COM GUI GUIBASE OS CPU CPUNAME
2229 unset CC CXX SYSBASE CFLAGS
2230 unset PYTHON_CFLAGS PYTHON_LIBS
2231 unset AR NM OBJDUMP PKG_CONFIG RANLIB STRIP
2232 test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
2233 test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
2234 test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
2237 test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
2238 test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
2239 test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
2242 --disable-build-mozilla \
2244 --with-num-cpus="$with_num_cpus" \
2245 --with-max-jobs="$with_max_jobs" \
2247 2>&1 | sed -e 's/^/ /'
2248 test -f ./Env.Host.sh 2>/dev/null || exit
2249 cp Env.Host.sh ../Env.Build.sh
2251 for V in COM GUI GUIBASE OS CPU CPUNAME CC CXX GXX_INCLUDE_PATH MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH \
2254 VV=`eval "echo $VV"`
2255 if test -n "$VV"; then
2256 line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
2257 echo "$line" >>build-config
2261 for V in OUTDIR PATH SOLARINC SOLARLIB WORKDIR; do
2263 VV=`eval "echo $VV"`
2264 VV=`echo $VV | sed -e 's,/CONF-FOR-BUILD,,g'`
2265 if test -n "$VV"; then
2266 line="${V}_FOR_BUILD='$VV'"
2267 echo "$line" >>build-config
2271 test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
2272 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])
2273 perl -pi -e 's,/CONF-FOR-BUILD,,g' Env.Build.sh
2274 eval `cat CONF-FOR-BUILD/build-config`
2275 AC_MSG_RESULT([checking for BUILD platform configuration... done])
2276 rm -rf CONF-FOR-BUILD
2279 CXX_FOR_BUILD="$CXX"
2281 AC_SUBST(COM_FOR_BUILD)
2282 AC_SUBST(GUI_FOR_BUILD)
2283 AC_SUBST(GUIBASE_FOR_BUILD)
2284 AC_SUBST(OS_FOR_BUILD)
2285 AC_SUBST(CPU_FOR_BUILD)
2286 AC_SUBST(CPUNAME_FOR_BUILD)
2287 AC_SUBST(CC_FOR_BUILD)
2288 AC_SUBST(CXX_FOR_BUILD)
2289 AC_SUBST(GXX_INCLUDE_PATH_FOR_BUILD)
2290 AC_SUBST(INPATH_FOR_BUILD)
2291 AC_SUBST(OUTPATH_FOR_BUILD)
2292 AC_SUBST(MACOSX_DEPLOYMENT_TARGET_FOR_BUILD)
2293 AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
2295 AC_SUBST(OUTDIR_FOR_BUILD)
2296 AC_SUBST(PATH_FOR_BUILD)
2297 AC_SUBST(SOLARINC_FOR_BUILD)
2298 AC_SUBST(SOLARLIB_FOR_BUILD)
2299 AC_SUBST(WORKDIR_FOR_BUILD)
2301 UPD="`echo AC_PACKAGE_VERSION | sed "s/\.//"`0"
2302 SOURCEVERSION="OOO$UPD"
2304 AC_SUBST(SOURCEVERSION)
2306 dnl ===================================================================
2307 dnl Set the ENABLE_CRASHDUMP variable.
2308 dnl ===================================================================
2309 AC_MSG_CHECKING([whether to enable crashdump feature])
2310 if test "$enable_crashdump" = "yes"; then
2311 ENABLE_CRASHDUMP="TRUE"
2312 BUILD_TYPE="$BUILD_TYPE CRASHREP"
2313 AC_MSG_RESULT([yes])
2318 AC_SUBST(ENABLE_CRASHDUMP)
2321 dnl ===================================================================
2322 dnl Windows specific tests and stuff
2323 dnl ===================================================================
2324 if test "$_os" = "WINNT"; then
2326 dnl Include twain scanners
2327 BUILD_TYPE="$BUILD_TYPE TWAIN"
2329 dnl Set the CL_X64 variable if we are building a 64-bit LibreOffice.
2330 AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
2331 if test "z$enable_cl_x64" = "z" -o "$enable_cl_x64" = "no"; then
2336 AC_MSG_RESULT([yes])
2340 AC_MSG_CHECKING([whether to use DirectX])
2341 if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
2342 ENABLE_DIRECTX="TRUE"
2343 AC_MSG_RESULT([yes])
2348 AC_SUBST(ENABLE_DIRECTX)
2350 AC_MSG_CHECKING([whether to use ActiveX])
2351 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
2353 AC_MSG_RESULT([yes])
2355 DISABLE_ACTIVEX="TRUE"
2358 AC_SUBST(DISABLE_ACTIVEX)
2360 AC_MSG_CHECKING([whether to use ATL])
2361 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE"; then
2363 AC_MSG_RESULT([yes])
2364 elif test "$enable_atl" = ""; then
2365 if test "$WITH_MINGW" = "yes"; then
2370 AC_MSG_RESULT([yes])
2376 AC_SUBST(DISABLE_ATL)
2379 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
2380 dnl ===================================================================
2381 AC_MSG_CHECKING([whether to turn warnings to errors])
2382 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
2383 ENABLE_WERROR="TRUE"
2384 AC_MSG_RESULT([yes])
2386 ENABLE_WERROR="FALSE"
2389 AC_SUBST(ENABLE_WERROR)
2391 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
2392 dnl ===================================================================
2393 AC_MSG_CHECKING([whether to do a debug build])
2394 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
2396 enable_symbols="yes"
2397 AC_MSG_RESULT([yes])
2399 ENABLE_DEBUG="FALSE"
2402 AC_SUBST(ENABLE_DEBUG)
2404 dnl Set the ENABLE_DBGUTIL variable
2405 dnl ===================================================================
2406 AC_MSG_CHECKING([whether to build with additional debug utilities])
2407 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
2411 # Compiling with MSVC using --enable-dbgutil (i.e. using the
2412 # debugging runtime, and defining _DEBUG when compiling) just
2413 # causes too many compilation errors. After having spent some
2414 # months slowly fixing them one by one, having reached sw, I give
2415 # up. Feel free to try again.
2416 if test "$_os" = WINNT -a "$WITH_MINGW" != yes; then
2417 AC_MSG_ERROR([Sorry, --enable-dbgutil won't work with MSVC])
2420 AC_MSG_RESULT([yes])
2421 # cppunit and graphite expose STL in public headers
2422 if test "$with_system_cppunit" = "yes"; then
2423 AC_MSG_ERROR([--with-system-cppunit conflicts with DBG_UTIL build])
2425 with_system_cppunit=no
2427 if test "$with_system_graphite" = "yes"; then
2428 AC_MSG_ERROR([--with-system-graphite conflicts with DBG_UTIL build])
2430 with_system_graphite=no
2432 if test "$with_system_mysql_cppconn" = "yes"; then
2433 AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with DBG_UTIL build])
2435 with_system_mysql_cppconn=no
2437 if test $_os = WINNT -a \
2438 \( "$enable_mozilla" != no -o \
2439 "$enable_build_mozilla" != no \); then
2440 # We can't build against the Mozilla stuff if using _DEBUG, will get linking errors
2441 # See connectivity/drivers/mozab
2442 AC_MSG_WARN([Also disabling Mozilla stuff then])
2444 enable_build_mozilla=no
2449 AC_MSG_RESULT([no, full product build])
2454 dnl Determine whether to use linkoo for the smoketest installation
2455 dnl ===================================================================
2456 AC_MSG_CHECKING([whether to use linkoo for the smoketest installation])
2457 if test "$enable_linkoo" = "no"; then
2458 DISABLE_LINKOO="TRUE"
2462 AC_MSG_RESULT([yes])
2464 AC_SUBST(DISABLE_LINKOO)
2466 # Set the ENABLE_LTO variable
2467 # ===================================================================
2468 AC_MSG_CHECKING([whether to use link-time optimization])
2469 if test -n "$enable_lto" -a "$enable_lto" != "no"; then
2471 AC_MSG_RESULT([yes])
2476 AC_SUBST(ENABLE_LTO)
2478 dnl whether to include symbols into final build.
2479 dnl ===================================================================
2480 AC_MSG_CHECKING([whether to include symbols])
2481 if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
2482 ENABLE_SYMBOLS="TRUE"
2483 AC_MSG_RESULT([yes])
2488 AC_SUBST(ENABLE_SYMBOLS)
2490 dnl Determine if the solver is to be stripped or not.
2491 dnl ===================================================================
2492 AC_MSG_CHECKING([whether to strip the solver or not.])
2493 if test "z$enable_strip_solver" = "zno"; then
2494 DISABLE_STRIP="TRUE"
2497 if test -n "$ENABLE_SYMBOLS"; then
2498 DISABLE_STRIP="TRUE"
2502 AC_MSG_RESULT([yes])
2505 AC_SUBST(DISABLE_STRIP)
2507 dnl check for cups support
2508 dnl ===================================================================
2509 if test "$test_cups" = "yes"; then
2510 AC_MSG_CHECKING([whether cups support is present])
2511 AC_CHECK_LIB(cups, cupsPrintFiles)
2512 AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
2513 if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then
2514 AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups???-devel.])
2519 # check for fontconfig support
2520 AC_MSG_CHECKING([whether we need fontconfig])
2521 if test "z$test_fontconfig" = "zyes"; then
2522 ENABLE_FONTCONFIG="TRUE"
2523 AC_MSG_RESULT([yes])
2524 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0])
2526 ENABLE_FONTCONFIG=""
2529 AC_SUBST(ENABLE_FONTCONFIG)
2530 AC_SUBST(FONTCONFIG_CFLAGS)
2531 AC_SUBST(FONTCONFIG_LIBS)
2533 dnl whether to find & fetch external tarballs?
2534 dnl ===================================================================
2535 if test -z "$TARFILE_LOCATION"; then
2536 TARFILE_LOCATION="DEFAULT"
2538 AC_SUBST(TARFILE_LOCATION)
2540 AC_MSG_CHECKING([whether we want to fetch tarballs])
2541 if test "z$enable_fetch_external" != "zno" ; then
2542 AC_MSG_RESULT([yes])
2543 DO_FETCH_TARBALLS="YES"
2546 DO_FETCH_TARBALLS="NO"
2548 AC_SUBST(DO_FETCH_TARBALLS)
2551 dnl Disable legacy binary file formats filters
2552 dnl ===================================================================
2553 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
2554 if test "$enable_binfilter" = "no"; then
2558 WITH_BINFILTER="YES"
2559 BUILD_TYPE="$BUILD_TYPE BINFILTER"
2560 GIT_REPO_NAMES="$GIT_REPO_NAMES binfilter"
2561 AC_MSG_RESULT([yes])
2563 AC_SUBST(WITH_BINFILTER)
2565 AC_MSG_CHECKING([whether to build help])
2566 if test "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
2567 AC_MSG_RESULT([yes])
2568 BUILD_TYPE="$BUILD_TYPE HELP"
2569 SCPDEFS="$SCPDEFS -DWITH_HELP"
2570 GIT_REPO_NAMES="$GIT_REPO_NAMES help"
2575 dnl Enable ugly pieces of code we're better off without
2576 dnl ===================================================================
2577 if test "$enable_ugly" = "yes"; then
2578 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
2579 SCPDEFS="$SCPDEFS -DWITH_UGLY"
2584 AC_SUBST(ENABLE_UGLY)
2586 dnl ===================================================================
2587 dnl Disable rpath in shared libraries?
2588 dnl ===================================================================
2589 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
2590 if test "$enable_rpath" = "no"; then
2595 AC_MSG_RESULT([$ENABLE_RPATH])
2596 AC_SUBST(ENABLE_RPATH)
2598 dnl Test whether to include MySpell dictionaries
2599 dnl ===================================================================
2600 AC_MSG_CHECKING([whether to include MySpell dictionaries])
2601 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
2602 AC_MSG_RESULT([yes])
2603 WITH_MYSPELL_DICTS=YES
2604 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
2605 GIT_REPO_NAMES="$GIT_REPO_NAMES dictionaries"
2608 WITH_MYSPELL_DICTS=NO
2610 AC_SUBST(WITH_MYSPELL_DICTS)
2612 AC_MSG_CHECKING([whether to use dicts from external paths])
2613 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
2614 AC_MSG_RESULT([yes])
2616 AC_MSG_CHECKING([for spelling dictionary directory])
2617 if test -n "$with_external_dict_dir"; then
2618 DICT_SYSTEM_DIR=file://$with_external_dict_dir
2620 DICT_SYSTEM_DIR=file:///usr/share/hunspell
2622 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
2623 AC_MSG_CHECKING([for hyphenation patterns directory])
2624 if test -n "$with_external_hyph_dir"; then
2625 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
2627 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
2629 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
2630 AC_MSG_CHECKING([for thesaurus directory])
2631 if test -n "$with_external_thes_dir"; then
2632 THES_SYSTEM_DIR=file://$with_external_thes_dir
2634 THES_SYSTEM_DIR=file:///usr/share/mythes
2636 AC_MSG_RESULT([$THES_SYSTEM_DIR])
2641 AC_SUBST(SYSTEM_DICTS)
2642 AC_SUBST(DICT_SYSTEM_DIR)
2643 AC_SUBST(HYPH_SYSTEM_DIR)
2644 AC_SUBST(THES_SYSTEM_DIR)
2646 dnl ===================================================================
2647 dnl ENABLE_PCH i now a no-op
2648 dnl ===================================================================
2649 AC_MSG_CHECKING([whether to enable pch feature])
2650 AC_MSG_RESULT([no, obsolete])
2652 dnl ===================================================================
2653 dnl Search all the common names for GNU make
2654 dnl ===================================================================
2655 AC_MSG_CHECKING([for GNU make])
2657 # try to use our own make if it is available and GNUMAKE was not already defined
2658 if test -z "$GNUMAKE"; then
2659 if test -x "/opt/lo/bin/make"; then
2660 GNUMAKE="/opt/lo/bin/make"
2664 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
2665 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
2666 if test $? -eq 0; then
2671 AC_MSG_RESULT($GNUMAKE)
2672 if test -z "$GNUMAKE"; then
2673 AC_MSG_ERROR([not found. install GNU make.])
2676 AC_MSG_CHECKING([the GNU make version])
2677 _make_version=`$GNUMAKE --version | grep GNU | grep -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2678 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2679 if test "$_make_longver" -ge "038200" ; then
2680 AC_MSG_RESULT([$GNUMAKE $_make_version])
2682 elif test "$_make_longver" -ge "038100" ; then
2683 AC_MSG_RESULT([$GNUMAKE $_make_version])
2684 AC_MSG_CHECKING([for GNU make bug 20033])
2685 TESTGMAKEBUG20033=`mktemp -d`
2686 cat > $TESTGMAKEBUG20033/Makefile << EOF
2687 A := \$(wildcard *.a)
2691 @echo survived bug20033. #dont kill these tabs, you will break the Makefile!!!!
2695 @touch 1.a 2.a 3.a 4.a 5.a 6.a
2708 \$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | sha1sum))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\
2709 \$(call d1,\$(CHECKSUM)),\
2710 \$(call d2,\$(CHECKSUM)))
2712 if test -z "`(cd $TESTGMAKEBUG20033 && $GNUMAKE setup && $GNUMAKE -j)|grep survived`"; then
2713 no_parallelism_make="YES"
2714 AC_MSG_RESULT([yes, disable parallelism])
2716 AC_MSG_RESULT([no, keep parallelism enabled])
2718 rm -rf $TESTGMAKEBUG20033
2720 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
2724 _make_ver_check=`$GNUMAKE --version | grep LibreOffice`;
2727 if test "z$_make_ver_check" = "z"; then
2730 AC_SUBST(STALE_MAKE)
2732 dnl ===================================================================
2733 dnl Test the Solaris compiler version
2734 dnl ===================================================================
2735 if test "$_os" = "SunOS"; then
2736 if test "$CC" = "cc"; then
2737 AC_PATH_PROGS(_cc, cc)
2738 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
2739 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
2740 dnl cc -V outputs to standard error!!!!
2741 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'`
2742 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
2743 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
2744 if test "$_sunstudio_major" != "5"; then
2745 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2747 _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" }'`
2748 if test "$_sunstudio_minor" = "false"; then
2749 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2751 dnl compiler will do
2752 AC_MSG_RESULT([checked])
2758 HAVE_LD_HASH_STYLE=FALSE
2759 WITH_LINKER_HASH_STYLE=
2760 AC_MSG_CHECKING( for --hash-style gcc linker support )
2761 if test "$GCC" = "yes" ; then
2762 if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes" ; then
2763 hash_styles="gnu sysv"
2764 elif test "$with_linker_hash_style" = "no" ; then
2767 hash_styles="$with_linker_hash_style"
2770 for hash_style in $hash_styles ; do
2771 test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
2772 hash_style_ldflags_save=$LDFLAGS
2773 LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
2775 AC_LINK_IFELSE([AC_LANG_PROGRAM(
2781 [ if ./conftest$EXEEXT; then
2782 HAVE_LD_HASH_STYLE=TRUE
2783 WITH_LINKER_HASH_STYLE=$hash_style
2785 [HAVE_LD_HASH_STYLE=FALSE])
2786 LDFLAGS=$hash_style_ldflags_save
2789 if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
2790 AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
2794 LDFLAGS=$hash_style_ldflags_save
2798 AC_SUBST(HAVE_LD_HASH_STYLE)
2799 AC_SUBST(WITH_LINKER_HASH_STYLE)
2801 dnl ===================================================================
2802 dnl Check whether there's a Perl version available.
2803 dnl ===================================================================
2804 if test -z "$with_perl_home"; then
2805 AC_PATH_PROG(PERL, perl)
2807 test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
2808 _perl_path="$with_perl_home/bin/perl"
2809 if test -x "$_perl_path"; then
2812 AC_MSG_ERROR([$_perl_path not found])
2816 dnl ===================================================================
2817 dnl Testing for Perl version 5 or greater.
2818 dnl $] is the Perl version variable, it is returned as an integer
2819 dnl ===================================================================
2820 if test "$PERL"; then
2821 AC_MSG_CHECKING([the Perl version])
2822 ${PERL} -e "exit($]);"
2824 if test "$_perl_version" -lt 5; then
2825 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
2827 AC_MSG_RESULT([checked (perl $_perl_version)])
2829 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
2833 dnl ===================================================================
2834 dnl Testing for required Perl modules
2835 dnl ===================================================================
2837 AC_MSG_CHECKING([for required Perl modules])
2838 if `$PERL -e 'use Archive::Zip; use Cwd;'`; then
2839 AC_MSG_RESULT([all modules found])
2841 AC_MSG_ERROR([Failed to find some modules])
2844 dnl ===================================================================
2845 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
2846 dnl ===================================================================
2847 SHOWINCLUDES_PREFIX=
2848 if test "$_os" = "WINNT"; then
2849 if test "$WITH_MINGW" != "yes"; then
2850 AC_MSG_CHECKING([for a friendly Microsoft C/C++ compiler installation path])
2851 if test -z "$with_cl_home"; then
2852 vctest=`./oowintool --msvc-productdir`;
2853 if test "$CL_X64" = ""; then
2854 if test -x "$vctest/bin/cl.exe"; then
2855 with_cl_home=$vctest;
2858 if test -x "$vctest/bin/amd64/cl.exe"; then
2859 with_cl_home=$vctest;
2863 with_cl_home=`cygpath -u "$with_cl_home"`
2865 with_cl_home=`cygpath -d "$with_cl_home"`
2866 with_cl_home=`cygpath -u "$with_cl_home"`
2867 AC_MSG_RESULT([$with_cl_home])
2869 dnl ===========================================================
2870 dnl Check for mspdb80.dll/mspdb100.dll
2871 dnl ===========================================================
2872 dnl MSVS 2008/10 Compiler
2873 if test -n "$with_mspdb_path";then
2874 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
2876 if test -e "$with_mspdb_path/mspdb80.dll" -o -e "$with_mspdb_path/mspdb100.dll"; then
2877 MSPDB_PATH="$with_mspdb_path"
2880 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
2881 MSPDB_PATH="$with_cl_home/../Common7/IDE"
2883 dnl Windows SDK 6.0 case
2884 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
2885 MSPDB_PATH="$with_cl_home/bin"
2888 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb100.dll"; then
2889 MSPDB_PATH="$with_cl_home/../Common7/IDE"
2892 if test -z "$MSPDB_PATH";then
2893 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
2894 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
2895 AC_PATH_PROG(MSPDB_PATH, mspdb100.dll)
2896 MSPDB_PATH=`dirname "$MSPDB_PATH"`
2899 if test -z "$MSPDB_PATH"; then
2900 AC_MSG_ERROR([You need a mspdb80.dllor mspdb100.dll, make sure it is in the path or use --with-mspdb-path])
2902 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
2903 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
2904 dnl The path needs to be added before cl is called
2905 PATH="$MSPDB_PATH:$PATH"
2907 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
2908 if test -z "$CC"; then
2909 if test "$CL_X64" = ""; then
2910 if test -x "$with_cl_home/bin/cl.exe"; then
2911 CC="$with_cl_home/bin/cl.exe"
2914 if test -x "$with_cl_home/bin/amd64/cl.exe"; then
2915 CC="$with_cl_home/bin/amd64/cl.exe"
2918 if test -z "$CC"; then
2919 AC_PATH_PROG(CC, cl.exe)
2921 # This gives us a posix path with 8.3 filename restrictions
2922 CC=`cygpath -d "$CC"`
2923 CC=`cygpath -u "$CC"`
2926 if test -n "$CC"; then
2927 # Remove /cl.exe from CC case insensitive
2928 AC_MSG_RESULT([found ($CC)])
2929 if test "$CL_X64" = ""; then
2930 COMPATH=`echo $CC | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
2932 if test -n "$with_cl_home"; then
2933 COMPATH=`echo $with_cl_home`
2936 export INCLUDE=`cygpath -d "$COMPATH/Include"`
2937 dnl Check which Microsoft C/C++ compiler is found
2938 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
2939 # The following finds Microsoft, matches nn.nn.nnnn then pulls numbers out.
2940 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
2941 x = match( \\\$0, /..\\...\\...../ )
2942 CCversion = substr( \\\$0, RSTART, RLENGTH)
2943 tokencount = split (CCversion,vertoken,\".\")
2944 for ( i = 1 ; i <= tokencount ; i++ ) {
2945 printf (\"%04d\",vertoken[[i]] )
2948 if test "$CCNUMVER" -ge "001600000000"; then
2951 elif test "$CCNUMVER" -ge "001500000000"; then
2955 AC_MSG_ERROR([Compiler too old. Use Microsoft Visual Studio 2008 or 2010.])
2957 AC_MSG_RESULT([found compiler version $CCNUMVER (MSVS $MSVSVER).])
2959 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
2962 dnl We need to guess the prefix of the -showIncludes output, it can be
2964 AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
2965 echo "#include <stdlib.h>" > conftest.c
2966 SHOWINCLUDES_PREFIX=`$CC -c -showIncludes conftest.c 2>/dev/null | \
2967 grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
2968 rm -f conftest.c conftest.obj
2969 if test -z "$SHOWINCLUDES_PREFIX" ; then
2970 AC_MSG_ERROR([cannot determine the -showIncludes prefix])
2972 AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
2975 # Check for 64-bit (cross-)compiler to use to build the 64-bit
2976 # version of the Explorer extension (and maybe other small
2977 # bits, too) needed when installing a 32-bit LibreOffice on a
2978 # 64-bit OS. The 64-bit Explorer extension is a feature that
2979 # has been present since long in OOo. Don't confuse it with
2980 # building LibreOffice itself as 64-bit code, which is
2981 # unfished work and highly experimental.
2988 AC_MSG_CHECKING([for a x64 compiler and libraries for 64bit ActiveX component])
2989 if test "$CL_X64" = "" -a -f "$with_cl_home/atlmfc/lib/amd64/atls.lib"; then
2990 # Prefer native x64 compiler to cross-compiler, in case we are running
2991 # the build on a 64-bit OS.
2992 if "$with_cl_home/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
2994 CC_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
2995 CXX_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
2996 LINK_X64_BINARY="$with_cl_home/bin/amd64/link.exe"
2997 LIBMGR_X64_BINARY="$with_cl_home/bin/amd64/lib.exe"
2998 elif "$with_cl_home/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3000 CC_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
3001 CXX_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
3002 LINK_X64_BINARY="$with_cl_home/bin/x86_amd64/link.exe"
3003 LIBMGR_X64_BINARY="$with_cl_home/bin/x86_amd64/lib.exe"
3006 if test "$BUILD_X64" = TRUE; then
3007 AC_MSG_RESULT([found])
3009 AC_MSG_RESULT([not found])
3010 AC_MSG_WARN([Installation set will not contain the 64-bit Explorer extension])
3014 # These are passed to the environment through set_soenv.in as usual, and then
3015 # used in set_wntx64.mk
3016 AC_SUBST(CC_X64_BINARY)
3017 AC_SUBST(CXX_X64_BINARY)
3018 AC_SUBST(LINK_X64_BINARY)
3019 AC_SUBST(LIBMGR_X64_BINARY)
3022 AC_MSG_CHECKING([the compiler is MinGW])
3023 MACHINE_PREFIX=`$CC -dumpmachine`
3024 if echo $MACHINE_PREFIX | grep -q mingw32; then
3025 AC_MSG_RESULT([yes])
3027 AC_MSG_ERROR([Compiler is not MinGW.])
3032 AC_SUBST(MSPDB_PATH)
3033 AC_SUBST(SHOWINCLUDES_PREFIX)
3035 dnl ===================================================================
3036 dnl Check for pkg-config
3037 dnl ===================================================================
3038 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3042 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3044 # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
3045 # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
3046 # explicitly. Or put /path/to/compiler in PATH yourself.
3048 AC_CHECK_TOOL(AR,ar)
3049 AC_CHECK_TOOL(NM,nm)
3050 AC_CHECK_TOOL(OBJDUMP,objdump)
3051 AC_CHECK_TOOL(RANLIB,ranlib)
3052 AC_CHECK_TOOL(STRIP,strip)
3053 if test "$_os" = "WINNT"; then
3054 AC_CHECK_TOOL(DLLTOOL,dlltool)
3055 AC_CHECK_TOOL(WINDRES,windres)
3062 AC_SUBST(PKG_CONFIG)
3067 dnl ===================================================================
3068 dnl pkg-config checks on Mac OS X
3069 dnl ===================================================================
3071 if test $_os = Darwin; then
3072 AC_MSG_CHECKING([for bogus pkg-config])
3073 if test -n "$PKG_CONFIG"; then
3074 if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | grep -q Mono.framework; then
3075 AC_MSG_RESULT([yes, from Mono])
3077 AC_MSG_RESULT([yes, from unknown origin])
3079 AC_MSG_WARN([This might have unexpected consequences, please consider hiding $PKG_CONFIG])
3080 echo "Having a $PKG_CONFIG might have unexpected consequences, please consider hiding it" >>warn
3086 dnl ===================================================================
3087 dnl .NET needs special treatment
3088 dnl (does the above comment really mean .NET, or is it misusing
3089 dnl that to mean Visual Studio .NET 2003 ? And does this also
3090 dnl in fact apply equally to what we actually support, i.e.
3091 dnl Visual Studio 2008 and 2010?)
3092 dnl ===================================================================
3093 if test "$build_os" = "cygwin"; then
3095 AC_PATH_PROG(MIDL_PATH, midl.exe)
3096 if test -n "$MIDL_PATH";then
3097 MIDL_PATH=`dirname "$MIDL_PATH"`
3099 if test -n "$with_midl_path";then
3100 with_midl_path=`cygpath -u "$with_midl_path"`
3102 if test -x "$with_midl_path/midl.exe"; then
3103 MIDL_PATH="$with_midl_path"
3105 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
3106 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
3108 if test -z "$MIDL_PATH" ; then
3109 vstest=`./oowintool --msvs-productdir`;
3110 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
3111 MIDL_PATH="$vstest/Common7/Tools/Bin"
3114 if test -z "$MIDL_PATH" ; then
3115 winsdktest=`./oowintool --windows-sdk-home`
3116 if test -x "$winsdktest/Bin/midl.exe" ; then
3117 MIDL_PATH="$winsdktest/Bin"
3120 if test ! -x "$MIDL_PATH/midl.exe"; then
3121 AC_MSG_ERROR([midl.exe not found. Make sure it's in PATH or use --with-midl-path])
3123 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3124 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
3125 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
3128 AC_PATH_PROG(CSC_PATH, csc.exe)
3129 if test -n "$CSC_PATH";then
3130 CSC_PATH=`dirname "$CSC_PATH"`
3132 if test -n "$with_csc_path";then
3133 with_csc_path=`cygpath -u "$with_csc_path"`
3135 if test -x "$with_csc_path/csc.exe"; then
3136 CSC_PATH="$with_csc_path"
3138 csctest=`./oowintool --csc-compilerdir`;
3139 if test -x "$csctest/csc.exe"; then
3143 if test ! -x "$CSC_PATH/csc.exe"; then
3144 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
3146 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3147 CSC_PATH=`cygpath -d "$CSC_PATH"`
3148 CSC_PATH=`cygpath -u "$CSC_PATH"`
3150 dnl Check mscoree.lib / .NET Framework dir
3151 AC_MSG_CHECKING(.NET Framework)
3152 if test -n "$with_dotnet_framework_home"; then
3153 with_dotnet_framework_home=`cygpath -u "$with_dotnet_framework_home"`
3155 if test -f "$with_dotnet_framework_home/lib/mscoree.lib"; then
3156 DOTNET_FRAMEWORK_HOME="$with_dotnet_framework_home"
3158 if test -z "$DOTNET_FRAMEWORK_HOME" ; then
3159 frametest=`./oowintool --dotnetsdk-dir`
3160 if test -f "$frametest/lib/mscoree.lib"; then
3161 DOTNET_FRAMEWORK_HOME="$frametest"
3163 frametest=`./oowintool --windows-sdk-home`
3164 if test -f "$frametest/lib/mscoree.lib"; then
3165 DOTNET_FRAMEWORK_HOME="$frametest"
3169 if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib"; then
3170 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-dotnet-framework-home])
3172 AC_MSG_RESULT(found)
3173 # Convert to posix path with 8.3 filename restrictions ( No spaces )
3174 DOTNET_FRAMEWORK_HOME=`cygpath -d "$DOTNET_FRAMEWORK_HOME"`
3175 DOTNET_FRAMEWORK_HOME=`cygpath -u "$DOTNET_FRAMEWORK_HOME"`
3178 AC_SUBST(DOTNET_FRAMEWORK_HOME)
3181 dnl ===================================================================
3182 dnl Check if stdc headers are available excluding MSVC.
3183 dnl ===================================================================
3184 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3188 dnl ===================================================================
3189 dnl Testing for C++ compiler and version...
3190 dnl ===================================================================
3192 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3195 if test -n "$CC" -a -z "$CXX"; then
3200 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
3201 if test "$GXX" = "yes"; then
3202 AC_MSG_CHECKING([the GNU C++ compiler version])
3204 _gpp_version=`$CXX -dumpversion`
3205 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
3207 if test "$_os" = "Darwin" -a "$with_macosx_sdk" = "10.4" -a "$_gpp_majmin" -ge "401" ; then
3208 if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
3209 export CXX="$GCC_HOME/bin/g++-4.0"
3210 _gpp_majmin_2=`$CXX -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
3211 if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
3212 _gpp_majmin=$_gpp_majmin_2
3215 if test "$_gpp_majmin" -ge "401" ; then
3216 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])
3218 AC_MSG_RESULT([implicitly using CXX=$CXX])
3221 AC_MSG_RESULT([checked (g++ $_gpp_version)])
3224 if test "$_gpp_majmin" = "304"; then
3225 AC_MSG_CHECKING([whether $CXX has the enum bug])
3226 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3227 extern "C" void abort (void);
3228 extern "C" void exit (int status);
3230 enum E { E0, E1, E2, E3, E4, E5 };
3232 void test (enum E e)
3234 if (e == E2 || e == E3 || e == E1)
3245 ]])],[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])],[])
3250 # prefx CXX with ccache if needed
3252 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3253 if test "$CCACHE" != "" ; then
3254 AC_MSG_CHECKING([whether $CXX is already ccached])
3256 save_CXXFLAGS=$CXXFLAGS
3257 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
3258 dnl an empty program will do, we're checking the compiler flags
3259 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
3260 [use_ccache=yes], [use_ccache=no])
3261 if test $use_ccache = yes ; then
3262 AC_MSG_RESULT([yes])
3267 CXXFLAGS=$save_CXXFLAGS
3272 dnl ===================================================================
3273 dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
3274 dnl ===================================================================
3276 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3279 dnl Check whether there's a C pre-processor.
3280 dnl ===================================================================
3281 dnl When using SunStudio compiler, there is a bug with the cc
3282 dnl preprocessor, so use CC preprocessor as the cc preprocessor
3283 dnl See Issuezilla #445.
3284 dnl ===================================================================
3285 if test "$_os" = "SunOS"; then
3293 dnl ===================================================================
3294 dnl Find integral type sizes and alignments
3295 dnl ===================================================================
3297 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
3299 AC_CHECK_SIZEOF(long)
3300 AC_CHECK_SIZEOF(short)
3301 AC_CHECK_SIZEOF(int)
3302 AC_CHECK_SIZEOF(long long)
3303 AC_CHECK_SIZEOF(double)
3304 AC_CHECK_SIZEOF(void*)
3306 SIZEOF_SHORT=$ac_cv_sizeof_short
3307 SIZEOF_INT=$ac_cv_sizeof_int
3308 SIZEOF_LONG=$ac_cv_sizeof_long
3309 SIZEOF_LONGLONG=$ac_cv_sizeof_long_long
3310 SIZEOF_DOUBLE=$ac_cv_sizeof_double
3311 SIZEOF_POINTER=$ac_cv_sizeof_voidp
3313 dnl Allow build without AC_CHECK_ALIGNOF, grrr
3314 m4_pattern_allow([AC_CHECK_ALIGNOF])
3315 m4_ifdef([AC_CHECK_ALIGNOF],
3318 dnl We know that the ALIGNOF_ variables are used only when cross-compiling
3319 dnl in sal/typesconfig/makefile.mk...
3320 if test "$cross_compiling" = "yes"; then
3321 AC_MSG_ERROR([When cross-compiling you must use a recent Autoconf with [AC_][CHECK_ALIGNOF]])
3323 m4_define([AC_CHECK_ALIGNOF],
3325 AC_MSG_WARN([Cannot determine alignment of $1])
3326 AS_TR_SH([ac_cv_alignof_$3])=unknown
3330 AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
3331 AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
3332 AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
3333 AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
3335 ALIGNOF_SHORT=$ac_cv_alignof_short
3336 ALIGNOF_INT=$ac_cv_alignof_int
3337 ALIGNOF_LONG=$ac_cv_alignof_long
3338 ALIGNOF_DOUBLE=$ac_cv_alignof_double
3341 WORDS_BIGENDIAN=$ac_cv_c_bigendian
3343 dnl Check for large file support
3345 if test -n "$ac_cv_sys_file_offset_bits"; then
3346 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
3348 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
3349 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
3357 if test "$CL_X64" = ""; then
3369 AC_SUBST(WORDS_BIGENDIAN)
3370 AC_SUBST(LFS_CFLAGS)
3372 AC_SUBST(SIZEOF_SHORT)
3373 AC_SUBST(SIZEOF_INT)
3374 AC_SUBST(SIZEOF_LONG)
3375 AC_SUBST(SIZEOF_LONGLONG)
3376 AC_SUBST(SIZEOF_DOUBLE)
3377 AC_SUBST(SIZEOF_POINTER)
3378 AC_SUBST(ALIGNOF_SHORT)
3379 AC_SUBST(ALIGNOF_INT)
3380 AC_SUBST(ALIGNOF_LONG)
3381 AC_SUBST(ALIGNOF_DOUBLE)
3383 dnl ===================================================================
3384 dnl Check if valgrind.h is available
3385 dnl ===================================================================
3386 if test "$cross_compiling" != "yes" -a "$enable_dbgutil" != "no" -a \
3387 -z "$VALGRIND_CFLAGS"; then
3388 dnl Test $prefix (currently only testing for /usr and /usr/local)
3389 dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind
3390 prev_cppflags=$CPPFLAGS
3391 CPPFLAGS="-I/usr/include/valgrind"
3392 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h])
3393 if test -z "$VALGRIND_CFLAGS"; then
3394 CPPFLAGS="-I/usr/local/include/valgrind"
3395 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [])
3397 if test -n "$VALGRIND_CFLAGS"; then
3398 CPPFLAGS=$VALGRIND_CFLAGS
3399 AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""])
3401 CPPFLAGS=$prev_cppflags
3403 AC_SUBST([VALGRIND_CFLAGS])
3405 dnl ===================================================================
3406 dnl Set the gcc/gxx include directories
3407 dnl ===================================================================
3408 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
3409 # often contains an i386 which is expanded as a macro.
3410 if test "$GXX" = "yes"; then
3411 AC_MSG_CHECKING([for g++ include path])
3412 if test -z "$with_gxx_include_path"; then
3413 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
3414 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
3415 with_gxx_include_path="/usr/include"
3417 if echo $with_gxx_include_path | grep -q linux; then
3418 # workaround for Mandriva - issue 100049
3419 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
3422 dnl This is the original code...
3423 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
3424 if test -z "$with_gxx_include_path"; then
3425 with_gxx_include_path="NO_GXX_INCLUDE"
3426 AC_MSG_RESULT([none])
3428 AC_MSG_RESULT([$with_gxx_include_path])
3431 with_gxx_include_path="NO_GXX_INCLUDE"
3433 GXX_INCLUDE_PATH="$with_gxx_include_path"
3434 AC_SUBST(GXX_INCLUDE_PATH)
3436 dnl ===================================================================
3437 dnl Set the MinGW include directories
3438 dnl ===================================================================
3439 if test "$WITH_MINGW" = "yes"; then
3440 AC_MSG_CHECKING([for MinGW include path])
3441 cat >conftest.$ac_ext <<_ACEOF
3443 #include <bits/c++config.h>
3445 _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`
3447 if test -z "$_mingw_lib_include_path"; then
3448 _mingw_lib_include_path="NO_LIB_INCLUDE"
3449 AC_MSG_RESULT([no MinGW include path])
3451 AC_MSG_RESULT([$_mingw_lib_include_path])
3453 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
3454 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
3456 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
3457 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
3461 AC_MSG_CHECKING([for dynamic libgcc])
3462 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3464 using namespace std;
3465 ]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[
3466 MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's@.*DLL Name: @@'`
3467 if test -n "$MINGW_GCCDLL"; then
3468 MINGW_SHARED_GCCLIB=YES
3469 AC_MSG_RESULT([ $MINGW_GCCDLL])
3471 MINGW_SHARED_GCCLIB=NO
3474 ],[ AC_MSG_RESULT([no])
3478 AC_MSG_CHECKING([for dynamic libstdc++])
3479 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3481 using namespace std;
3482 ]], [[ cout << "Hello there." << endl; ]])],[
3483 MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's@.*DLL Name: @@'`
3484 if test -n "$MINGW_GXXDLL"; then
3485 mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
3486 mingw_gxxdll_root=${mingw_gxxdll_root#lib}
3487 MINGW_SHARED_LIBSTDCPP=-l$mingw_gxxdll_root
3488 MINGW_SHARED_GXXLIB=YES
3489 AC_MSG_RESULT([$MINGW_GXXDLL])
3491 MINGW_SHARED_GXXLIB=NO
3494 ],[ AC_MSG_RESULT([no])
3500 AC_SUBST(MINGW_CLIB_DIR)
3501 AC_SUBST(MINGW_SHARED_GCCLIB)
3502 AC_SUBST(MINGW_SHARED_GXXLIB)
3503 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
3504 AC_SUBST(MINGW_GCCDLL)
3505 AC_SUBST(MINGW_GXXDLL)
3508 dnl ===================================================================
3509 dnl Extra checking for the SunOS compiler
3510 dnl ===================================================================
3511 if test "$_os" = "SunOS"; then
3512 dnl SunStudio C++ compiler packaged with SunStudio C compiler
3513 if test "$CC" = "cc"; then
3514 AC_MSG_CHECKING([SunStudio C++ Compiler])
3515 if test "$CXX" != "CC"; then
3516 AC_MSG_WARN([SunStudio C++ was not found])
3517 echo "SunStudio C++ was not found" >> warn
3519 AC_MSG_RESULT([checked])
3524 dnl *************************************************************
3525 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
3526 dnl *************************************************************
3527 if test "$WITH_MINGW" = "yes"; then
3528 AC_MSG_CHECKING([exception type])
3530 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
3532 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
3534 ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
3536 AC_MSG_RESULT($exceptions_type)
3540 EXCEPTIONS="$exceptions_type"
3541 AC_SUBST(EXCEPTIONS)
3543 dnl ===================================================================
3544 dnl Checks for what the default STL should be
3545 dnl ===================================================================
3546 AC_MSG_CHECKING([Whether building STLPort library makes sense])
3548 if test "$_os" = "Linux"; then
3564 elif test "$_os" = "SunOS"; then
3566 elif test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
3568 elif test "$_os" = "FreeBSD"; then
3571 if test "$BUILD_STLPORT" = "yes" ; then
3572 AC_MSG_RESULT([yes])
3577 AC_MSG_CHECKING([Whether STLPort library will be actually built])
3578 if test "$with_stlport" = "auto" -o "$BUILD_STLPORT" = "no"; then
3579 with_stlport=$BUILD_STLPORT
3581 if test "$with_stlport" = "yes" ; then
3582 AC_MSG_RESULT([yes])
3584 SCPDEFS="$SCPDEFS -DWITH_STLPORT"
3585 BUILD_TYPE="$BUILD_TYPE STLPORT"
3591 AC_SUBST(WITH_STLPORT)
3593 dnl ===================================================================
3594 dnl thread-safe statics
3595 dnl ===================================================================
3596 AC_MSG_CHECKING([whether $CXX supports thread safe statics])
3597 unset HAVE_THREADSAFE_STATICS
3598 if test "$GCC" = "yes"; then
3599 save_CXXFLAGS=$CXXFLAGS
3600 CXXFLAGS="$CXXFLAGS -fthreadsafe-statics"
3602 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)],[HAVE_THREADSAFE_STATICS=TRUE],[])
3604 CXXFLAGS=$save_CXXFLAGS
3605 if test "$HAVE_THREADSAFE_STATICS" = "TRUE"; then
3606 dnl Some C++ runtimes use a single lock for all static variables, which
3607 dnl can cause deadlock in multi-threaded applications. This is not
3608 dnl easily tested here; for POSIX-based systems, if executing the
3609 dnl following C++ program does not terminate then the tool chain
3610 dnl apparently has this problem:
3612 dnl #include <pthread.h>
3613 dnl int h() { return 0; }
3614 dnl void * g(void * unused) {
3615 dnl static int n = h();
3620 dnl pthread_create(&t, 0, g, 0);
3621 dnl pthread_join(t, 0);
3625 dnl static int n = f();
3629 dnl Mac OS X up to at least 10.7.1 is known to have this problem, as is
3630 dnl at least one instance of GCC 4.2.4 (used on a "Linux
3631 dnl ooobuild1.osuosl.org 2.6.9-101.plus.c4smp #1 SMP Thu Jul 21 19:08:15
3632 dnl EDT 2011 i686 i686 i386 GNU/Linux" machine); see the definition of
3633 dnl __cxa_guard_acquire in GCC's libstdc++-v3/libsupc++/guard.cc for
3634 dnl what #ifdefs actually make a difference there. Conservative advice
3635 dnl from Jakub Jelinek is to assume it working in GCC >= 4.3:
3636 if test "$_os" = "Darwin" -o "${GCCVER?}" -lt 040300; 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])
3856 AC_CHECK_FUNCS(posix_fallocate, HAVE_POSIX_FALLOCATE=YES, [HAVE_POSIX_FALLOCATE=NO])
3857 AC_SUBST(HAVE_POSIX_FALLOCATE)
3860 dnl ===================================================================
3861 dnl Custom build version
3862 dnl ===================================================================
3864 AC_MSG_CHECKING([whether to add custom build version])
3865 if test "z$with_build_version" != "z"; then
3866 BUILD_VER_STRING=$with_build_version
3867 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
3872 AC_SUBST(BUILD_VER_STRING)
3874 dnl ===================================================================
3875 dnl Java support enable
3876 dnl ===================================================================
3877 AC_MSG_CHECKING([whether to build with Java support])
3878 if test "$with_java" != "no"; then
3879 AC_MSG_RESULT([yes])
3886 AC_SUBST(SOLAR_JAVA)
3888 dnl SOLAR_JAVA="YES" (yes, silly name, should rename) indicates whether we
3889 dnl want there to be *run-time* (and build-time) support for Java extensions in the
3890 dnl built LibreOffice.
3892 dnl SOLAR_JAVA="BUILD" is claimed to indicate build-time only support
3893 dnl (no runtime support). It doesn't seem to ever be set to this
3894 dnl value, though, and everywhere SOLAR_JAVA is only checked for being
3895 dnl empty or non-empty.
3897 dnl SOLAR_JAVA="" indicate no java support at all
3899 if test "$_os" = "Linux" && test "$host_cpu" = "powerpc"; then
3900 # IBMs JDK needs this...
3901 JITC_PROCESSOR_TYPE=6
3902 export JITC_PROCESSOR_TYPE
3903 JITC_PROCESSOR_TYPE_EXPORT="export JITC_PROCESSOR_TYPE=$JITC_PROCESSOR_TYPE"
3905 AC_SUBST([JITC_PROCESSOR_TYPE_EXPORT])
3907 if test $_os = "WINNT"; then
3908 WITH_VC_REDIST="TRUE"
3910 AC_SUBST(WITH_VC_REDIST)
3912 dnl ===================================================================
3914 dnl ===================================================================
3915 if test "$SOLAR_JAVA" != ""; then
3917 # Windows-specific tests
3918 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
3919 if test "$CL_X64" != ""; then
3921 otherbitness="32-bit"
3924 otherbitness="64-bit"
3927 if test -z "$with_jdk_home"; then
3929 # Unfortunately apparently no way to find, if needed, the 64-bit
3930 # JDK in the Registry from the 32-bit Perl oowintool
3932 _jdk_home=`./oowintool --jdk-home`
3933 if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
3934 with_jdk_home="$_jdk_home"
3935 howfound="found by oowintool"
3937 AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK])
3940 test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
3941 howfound="you passed"
3945 JAVA_HOME=; export JAVA_HOME
3946 if test -z "$with_jdk_home"; then
3947 AC_PATH_PROG(JAVAINTERPRETER, $with_java)
3949 _java_path="$with_jdk_home/bin/$with_java"
3950 dnl Check if there is a Java interpreter at all.
3951 if test -x "$_java_path"; then
3952 JAVAINTERPRETER=$_java_path
3954 AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
3958 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
3959 # Check that the JDK found is correct architecture
3960 # Why is this necessary, we don't link with any library from the JDK I think,
3962 shortjdkhome=`cygpath -d "$with_jdk_home"`
3963 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
3964 AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
3965 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
3966 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
3967 AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
3968 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
3971 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
3972 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
3974 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
3975 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
3976 elif test "$_os" = "Darwin"; then
3977 dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X,
3978 dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
3979 dnl to run in 32 bit mode and be able to load LibreOffice jnilibs:
3980 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
3981 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
3982 AC_MSG_RESULT([yes])
3990 dnl ===================================================================
3992 dnl ===================================================================
3994 # Note that JAVA_HOME as for now always means the *build* platform's
3995 # JAVA_HOME. Whether all the complexity here actually is needed any
3996 # more or not, no idea.
3998 if test "$SOLAR_JAVA" != ""; then
4000 AC_MSG_CHECKING([the installed JDK])
4001 if test -n "$JAVAINTERPRETER"; then
4002 dnl java -version sends output to stderr!
4003 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
4004 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
4005 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
4007 AC_MSG_RESULT([checked (gcj)])
4008 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
4009 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
4011 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "BEA"` -gt 0; then
4012 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
4013 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "IBM"` -gt 0; then
4016 dnl IBM JDK specific tests
4017 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
4018 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
4020 if test "$_jdk_ver" -lt 10500; then
4021 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
4024 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
4026 if test "$with_jdk_home" = ""; then
4027 AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
4028 you must use the "--with-jdk-home" configure option explicitly])
4031 JAVA_HOME=$with_jdk_home
4036 dnl Sun JDK specific tests
4037 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
4038 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
4040 if test "$_jdk_ver" -lt 10500; then
4041 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
4043 AC_MSG_RESULT([checked (JDK $_jdk)])
4044 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
4045 if test "$_os" = "WINNT"; then
4046 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
4050 AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
4054 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
4057 _java_target_ver="1.5"
4058 dnl ===================================================================
4059 dnl Check for target Java bytecode version
4060 dnl ===================================================================
4061 if test "$SOLAR_JAVA" != ""; then
4062 AC_MSG_CHECKING([for target Java bytecode version])
4063 if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
4064 AC_MSG_RESULT([default by $JDK])
4065 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
4066 AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
4069 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
4070 _java_target_ver="$with_java_target_version"
4071 AC_MSG_RESULT([$_java_target_ver])
4072 elif test $_jdk_ver -gt 10000 ; then
4073 _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
4074 AC_MSG_RESULT([$_java_target_ver])
4076 AC_MSG_ERROR([Unable to guess Java bytecode version from Java version!])
4080 if ! test -z "$_java_target_ver" -o \
4081 "$_java_target_ver" = "1.1" -o \
4082 "$_java_target_ver" = "1.2" -o \
4083 "$_java_target_ver" = "1.3" -o \
4084 "$_java_target_ver" = "1.4" -o \
4085 "$_java_target_ver" = "1.5" -o \
4086 "$_java_target_ver" = "1.6" -o \
4087 "$_java_target_ver" = "5" ; then
4088 AC_MSG_ERROR([$_java_target_ver is not a supported Java bytecode version!])
4091 JAVA_SOURCE_VER="$_java_target_ver"
4092 JAVA_TARGET_VER="$_java_target_ver"
4095 dnl ===================================================================
4096 dnl Checks for javac
4097 dnl ===================================================================
4098 if test "$SOLAR_JAVA" != ""; then
4099 if test "$JDK" = "gcj"; then
4100 javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
4102 javacompiler="javac"
4104 if test -z "$with_jdk_home"; then
4105 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
4107 _javac_path="$with_jdk_home/bin/$javacompiler"
4108 dnl Check if there is a Java compiler at all.
4109 if test -x "$_javac_path"; then
4110 JAVACOMPILER=$_javac_path
4113 if test -z "$JAVACOMPILER"; then
4114 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
4116 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
4117 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
4118 JAVACOMPILER="${JAVACOMPILER}.exe"
4120 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
4121 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
4124 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
4125 AC_MSG_CHECKING([re-checking JDK])
4127 AC_MSG_RESULT([checked (ecj)])
4128 #TODO: what's to do here? some switch to do 1.5 compiling?
4129 JAVAFLAGS="-source 1.5 -target 1.5"
4130 _gij_longver="40200"
4135 dnl ===================================================================
4136 dnl Checks that javac is gcj
4137 dnl ===================================================================
4138 if test "$SOLAR_JAVA" != ""; then
4139 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
4143 AC_SUBST(JAVACISGCJ)
4146 dnl ===================================================================
4147 dnl Checks that javac is kaffe
4148 dnl ===================================================================
4149 if test "$SOLAR_JAVA" != ""; then
4150 if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
4154 AC_SUBST(JAVACISKAFFE)
4156 dnl ===================================================================
4157 dnl Checks for javadoc
4158 dnl ===================================================================
4159 if test "$SOLAR_JAVA" != ""; then
4160 if test -z "$with_jdk_home"; then
4161 AC_PATH_PROG(JAVADOC, javadoc)
4163 _javadoc_path="$with_jdk_home/bin/javadoc"
4164 dnl Check if there is a javadoc at all.
4165 if test -x "$_javadoc_path"; then
4166 JAVADOC=$_javadoc_path
4168 AC_PATH_PROG(JAVADOC, javadoc)
4171 if test -z "$JAVADOC"; then
4172 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
4174 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
4175 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
4176 JAVADOC="${JAVADOC}.exe"
4178 JAVADOC=`cygpath -d "$JAVADOC"`
4179 JAVADOC=`cygpath -u "$JAVADOC"`
4183 if test "$SOLAR_JAVA" != ""; then
4184 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
4185 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
4186 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
4187 # try to recover first by looking whether we have a alternatives
4188 # system as in Debian or newer SuSEs where following /usr/bin/javac
4189 # over /etc/alternatives/javac leads to the right bindir where we
4190 # just need to strip a bit away to get a valid JAVA_HOME
4191 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
4192 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
4193 # maybe only one level of symlink (e.g. on Mac)
4194 JAVA_HOME=$(readlink $JAVACOMPILER)
4195 if test "$(dirname $JAVA_HOME)" = "."; then
4196 # we've got no path to trim back
4201 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
4202 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
4203 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
4204 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
4206 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
4207 if test "$JAVA_HOME" != "/usr"; then
4208 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
4209 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
4210 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
4211 dnl Tiger already returns a JDK path..
4212 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
4214 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
4218 # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
4220 dnl now if JAVA_HOME has been set to empty, then call findhome to find it
4221 if test -z "$JAVA_HOME"; then
4222 if test "x$with_jdk_home" = "x"; then
4223 cat > findhome.java <<_ACEOF
4224 [import java.io.File;
4228 public static void main(String args[])
4230 String jrelocation = System.getProperty("java.home");
4231 File jre = new File(jrelocation);
4232 System.out.println(jre.getParent());
4236 AC_MSG_CHECKING([if javac works])
4237 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
4238 AC_TRY_EVAL(javac_cmd)
4239 if test $? = 0 && test -f ./findhome.class ; then
4240 AC_MSG_RESULT([javac works])
4242 echo "configure: javac test failed" >&5
4243 cat findhome.java >&5
4244 AC_MSG_ERROR([javac does not work - java projects will not build!])
4246 AC_MSG_CHECKING([if gij knows its java.home])
4247 JAVA_HOME=`$JAVAINTERPRETER findhome`
4248 if test $? = 0 && test "$JAVA_HOME" != "" ; then
4249 AC_MSG_RESULT([$JAVA_HOME])
4251 echo "configure: java test failed" >&5
4252 cat findhome.java >&5
4253 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
4255 # clean-up after ourselves
4256 rm -f ./findhome.java ./findhome.class
4258 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
4262 dnl second sanity check JAVA_HOME if possible
4263 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
4264 # now check if $JAVA_HOME is really valid
4265 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
4266 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
4269 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
4272 if test "$JAVA_HOME_OK" = "NO"; then
4273 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
4274 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
4275 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
4276 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
4277 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
4278 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
4285 if test "$SOLAR_JAVA" != ""; then
4286 AC_MSG_CHECKING([for jawt lib name])
4287 if test "$JDK" = "gcj"; then
4289 save_LDFLAGS=$LDFLAGS
4290 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
4291 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
4292 exec 6>/dev/null # no output
4293 AC_CHECK_HEADER(jni.h, [],
4294 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
4295 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
4296 exec 6>&1 # output on again
4298 LDFLAGS=$save_LDFLAGS
4300 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
4301 # A workaround is to link also against libpmawt.so
4302 if test "$JDK" = "ibm" ; then
4304 save_LDFLAGS=$LDFLAGS
4305 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
4306 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
4307 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
4308 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
4309 export LD_LIBRARY_PATH
4310 exec 6>/dev/null # no output
4311 AC_CHECK_HEADER(jni.h, [],
4312 [AC_MSG_ERROR([jni.h could not be found.])], [])
4313 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
4314 if test -z "$AWTLIB"; then
4315 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
4316 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
4318 exec 6>&1 # output on again
4320 LDFLAGS=$save_LDFLAGS
4321 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
4323 if test -z "$AWTLIB"; then
4326 AC_MSG_RESULT([$AWTLIB])
4333 AC_SUBST(JAVA_SOURCE_VER)
4334 AC_SUBST(JAVA_TARGET_VER)
4335 AC_SUBST(JAVAINTERPRETER)
4336 AC_SUBST(JAVAIFLAGS)
4337 AC_SUBST(JAVACOMPILER)
4340 dnl ===================================================================
4341 dnl Checks for specific files.
4342 dnl ===================================================================
4344 dnl ===================================================================
4345 dnl Checks for programs.
4346 dnl ===================================================================
4348 dnl ===================================================================
4349 dnl Check whether we already have dmake
4350 dnl ===================================================================
4351 AC_PATH_PROG(DMAKE, dmake, no)
4352 if test "$DMAKE" = "no"; then
4354 echo "dmake will be built on ./bootstrap"
4356 AC_MSG_CHECKING([whether the found dmake is the right dmake])
4357 # we need to find out whether that dmake we found is "our" dmake
4358 # or the dmake from Sun's SunStudio Compiler which is something
4360 # This test _should_ work because the one accepts -V (ours) and one
4361 # (the other) not...
4362 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
4363 if test $? -eq 0; then
4365 AC_MSG_RESULT([yes])
4366 AC_MSG_CHECKING([the dmake version])
4367 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
4368 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
4369 AC_MSG_RESULT([OK, >= 4.11])
4370 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
4371 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
4372 AC_MSG_RESULT([OK, >= 4.11])
4374 AC_MSG_RESULT([too old. >= 4.11 is needed])
4375 echo "A newer dmake will be built on ./bootstrap"
4380 echo "dmake will be built on ./bootstrap"
4384 AC_SUBST(BUILD_DMAKE)
4386 AC_MSG_CHECKING([whether to enable EPM for packing])
4388 if test "$enable_epm" = "yes"; then
4389 AC_MSG_RESULT([yes])
4390 dnl ===================================================================
4391 dnl Check for epm - not needed for Windows
4392 dnl ===================================================================
4393 if test "$_os" != "WINNT"; then
4394 if test -n "$with_epm"; then
4397 AC_PATH_PROG(EPM, epm, no)
4399 if test "$EPM" = "no" || test "$EPM" = "internal"; then
4400 echo "EPM will be built."
4402 BUILD_TYPE="$BUILD_TYPE EPM"
4404 # Gentoo has some epm which is something different...
4405 AC_MSG_CHECKING([whether the found epm is the right epm])
4406 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
4407 AC_MSG_RESULT([yes])
4409 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
4411 AC_MSG_CHECKING([epm version])
4412 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
4413 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
4414 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
4415 AC_MSG_RESULT([OK, >= 3.7])
4417 if test "$_os" = "Darwin"; then
4418 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
4419 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
4420 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
4421 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)])
4422 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
4423 AC_MSG_RESULT([$_pm, ok])
4424 else # we never should get here, but go safe
4425 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)])
4429 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
4430 echo "EPM will be built."
4432 BUILD_TYPE="$BUILD_TYPE EPM"
4437 # test which package format to use
4438 AC_MSG_CHECKING([which package format to use])
4449 # if building on Debian, default should be deb...
4450 if test -e /etc/debian_version; then
4468 # we never should get here since we check the arciecture/os at the beginning,
4471 AC_MSG_ERROR([unknown system])
4473 if test -n "$with_package_format"; then
4474 for i in $with_package_format; do
4476 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
4479 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
4480 aix - AIX software distribution
4481 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
4482 deb - Debian software distribution
4483 inst or tardist - IRIX software distribution
4484 osx - MacOS X software distribution
4485 pkg - Solaris software distribution
4486 rpm - RedHat software distribution
4487 setld - Tru64 (setld) software distribution
4488 native - "Native" software distribution for the platform
4489 portable - Portable software distribution
4490 LibreOffice additionally supports:
4491 archive - .tar.gz or .zip
4493 installed - installation tree
4499 PKGFORMAT="$with_package_format"
4501 AC_MSG_RESULT([$PKGFORMAT])
4502 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
4503 AC_MSG_CHECKING([for rpm])
4504 for a in "$RPM" rpmbuild rpm; do
4505 $a --usage >/dev/null 2> /dev/null
4506 if test $? -eq 0; then
4510 $a --version >/dev/null 2> /dev/null
4511 if test $? -eq 0; then
4517 if test -z "$RPM" ; then
4518 AC_MSG_ERROR([not found])
4519 elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
4520 RPM_PATH=`which $RPM`
4521 AC_MSG_RESULT([$RPM_PATH])
4523 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
4526 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
4527 AC_PATH_PROG(DPKG, dpkg, no)
4528 if test "$DPKG" = "no"; then
4529 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
4532 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
4533 if test "$_os" = "Darwin"; then
4534 AC_MSG_CHECKING([for PackageMaker availability])
4535 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
4536 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
4541 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
4544 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
4545 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
4546 if test "$EPM" != "no" && test "$EPM" != "internal"; then
4547 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
4548 AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
4549 if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then
4550 AC_MSG_RESULT([yes])
4553 if echo "$PKGFORMAT" | grep -q rpm; then
4555 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
4556 echo "the rpms will need to be installed with --nodeps" >> warn
4560 AC_MSG_WARN([the ${_pt}s will not be relocateable])
4561 echo "the ${_pt}s will not be relocateable" >> warn
4562 AC_MSG_WARN([if you want to make sure installation without --nodeps and
4563 relocation will work, you need to patch your epm with the
4564 patch in epm/epm-3.7.patch or build with
4565 --with-epm=internal which will build a suitable epm])
4570 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
4571 AC_PATH_PROG(PKGMK, pkgmk, no)
4572 if test "$PKGMK" = "no"; then
4573 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
4588 dnl ===================================================================
4590 dnl ===================================================================
4591 AC_PATH_PROG(GPERF, gperf)
4592 if test -z "$GPERF"; then
4593 AC_MSG_ERROR([gperf not found but needed. Install it.])
4595 AC_MSG_CHECKING([gperf version])
4596 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
4599 AC_MSG_ERROR([too old, you need at least 3.0.0])
4603 dnl ===================================================================
4604 dnl Check for building ODK
4605 dnl ===================================================================
4606 AC_MSG_CHECKING([whether to build the ODK])
4607 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
4608 AC_MSG_RESULT([yes])
4610 if test "$with_java" != "no"; then
4611 AC_MSG_CHECKING([whether to build unowinreg.dll])
4612 if test "$_os" = "WINNT" -a "z$enable_build_unowinreg" = "z" ; then
4613 # build on Win by default
4614 enable_build_unowinreg=yes
4616 if test "z$enable_build_unowinreg" = "z" -o "$enable_build_unowinreg" = "no"; then
4620 AC_MSG_RESULT([yes])
4623 if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "YES"; then
4624 if test -z "$with_mingw_cross_compiler"; then
4626 AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
4627 elif test -x "$with_mingw_cross_compiler"; then
4628 MINGWCXX="$with_mingw_cross_compiler"
4630 AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
4633 if test "$MINGWCXX" = "false"; then
4634 AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
4637 mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
4638 if test -x "$mingwstrip_test"; then
4639 MINGWSTRIP="$mingwstrip_test"
4641 AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
4644 if test "$MINGWSTRIP" = "false"; then
4645 AC_MSG_ERROR(MinGW32 binutils not found.)
4649 BUILD_TYPE="$BUILD_TYPE ODK"
4654 AC_SUBST(BUILD_UNOWINREG)
4656 AC_SUBST(MINGWSTRIP)
4658 dnl ===================================================================
4659 dnl Check for system stdlibs
4660 dnl ===================================================================
4661 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
4662 if test "$with_system_stdlibs" != "no"; then
4666 AC_MSG_RESULT([yes])
4669 AC_SUBST(SYSTEM_STDLIBS)
4671 dnl ===================================================================
4672 dnl Check for system zlib
4673 dnl ===================================================================
4674 AC_MSG_CHECKING([which zlib to use])
4675 if test "$with_system_zlib" = "yes"; then
4676 AC_MSG_RESULT([external])
4678 AC_CHECK_HEADER(zlib.h, [],
4679 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
4680 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
4681 [AC_MSG_ERROR(zlib not found or functional)], [])
4683 AC_MSG_RESULT([internal])
4685 BUILD_TYPE="$BUILD_TYPE ZLIB"
4687 AC_SUBST(SYSTEM_ZLIB)
4689 dnl ===================================================================
4690 dnl Check for system jpeg
4691 dnl ===================================================================
4692 AC_MSG_CHECKING([which jpeg to use])
4693 if test "$with_system_jpeg" = "yes"; then
4694 AC_MSG_RESULT([external])
4696 AC_CHECK_HEADER(jpeglib.h, [],
4697 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
4698 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
4699 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
4701 AC_MSG_RESULT([internal])
4703 BUILD_TYPE="$BUILD_TYPE JPEG"
4705 AC_SUBST(SYSTEM_JPEG)
4707 dnl ===================================================================
4708 dnl Check for system expat
4709 dnl ===================================================================
4710 AC_MSG_CHECKING([which expat to use])
4711 if test "$with_system_expat" = "yes"; then
4712 AC_MSG_RESULT([external])
4714 AC_CHECK_HEADER(expat.h, [],
4715 [AC_MSG_ERROR(expat.h not found. install expat)], [])
4716 AC_CHECK_LIB(expat, XML_ParserCreate, [],
4717 [AC_MSG_RESULT(expat library not found or functional.)], [])
4718 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libexpat-1.dll"
4720 AC_MSG_RESULT([internal])
4722 BUILD_TYPE="$BUILD_TYPE EXPAT"
4724 AC_SUBST(SYSTEM_EXPAT)
4726 dnl ===================================================================
4727 dnl Check for system libvisio
4728 dnl ===================================================================
4729 AC_MSG_CHECKING([which libvisio to use])
4730 if test "$with_system_libvisio" = "yes"; then
4731 AC_MSG_RESULT([external])
4733 PKG_CHECK_MODULES( VISIO, libvisio-0.0 )
4735 AC_MSG_RESULT([internal])
4737 BUILD_TYPE="$BUILD_TYPE LIBVISIO"
4739 AC_SUBST(SYSTEM_LIBVISIO)
4740 AC_SUBST(VISIO_CFLAGS)
4741 AC_SUBST(VISIO_LIBS)
4743 dnl ===================================================================
4744 dnl Check for system libcmis
4745 dnl ===================================================================
4746 AC_MSG_CHECKING([which libcmis to use])
4747 if test "$with_system_libcmis" = "yes"; then
4748 AC_MSG_RESULT([external])
4750 PKG_CHECK_MODULES( LIBCMIS, libcmis-0.2 )
4752 AC_MSG_RESULT([internal])
4754 BUILD_TYPE="$BUILD_TYPE LIBCMIS"
4756 AC_SUBST(SYSTEM_LIBCMIS)
4757 AC_SUBST(LIBCMIS_CFLAGS)
4758 AC_SUBST(LIBCMIS_LIBS)
4761 dnl ===================================================================
4762 dnl Check for system libwpd
4763 dnl ===================================================================
4764 AC_MSG_CHECKING([which libwpd to use])
4765 if test "$with_system_libwpd" = "yes"; then
4766 AC_MSG_RESULT([external])
4768 PKG_CHECK_MODULES( WPD, libwpd-0.9 libwpd-stream-0.9 )
4770 AC_MSG_RESULT([internal])
4772 BUILD_TYPE="$BUILD_TYPE LIBWPD"
4774 AC_SUBST(SYSTEM_LIBWPD)
4775 AC_SUBST(WPD_CFLAGS)
4778 dnl ===================================================================
4779 dnl Check for system cppunit
4780 dnl ===================================================================
4781 AC_MSG_CHECKING([which cppunit to use])
4782 if test "$with_system_cppunit" = "yes"; then
4783 AC_MSG_RESULT([external])
4785 # might work for earlier, too but go sure:
4786 PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.0 )
4788 AC_MSG_RESULT([internal])
4790 BUILD_TYPE="$BUILD_TYPE CPPUNIT"
4792 AC_SUBST(SYSTEM_CPPUNIT)
4793 AC_SUBST(CPPUNIT_CFLAGS)
4794 AC_SUBST(CPPUNIT_LIBS)
4796 dnl ===================================================================
4797 dnl Check whether freetype is available
4798 dnl ===================================================================
4799 if test "$test_freetype" = "yes"; then
4800 AC_MSG_CHECKING([whether freetype is available])
4801 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
4803 AC_SUBST(FREETYPE_CFLAGS)
4804 AC_SUBST(FREETYPE_LIBS)
4806 dnl ===================================================================
4807 dnl Check for system libwps
4808 dnl ===================================================================
4809 AC_MSG_CHECKING([which libwps to use])
4810 if test "$with_system_libwps" = "yes"; then
4811 AC_MSG_RESULT([external])
4813 PKG_CHECK_MODULES( WPS, libwps-0.2 )
4815 AC_MSG_RESULT([internal])
4817 BUILD_TYPE="$BUILD_TYPE LIBWPS"
4819 AC_SUBST(SYSTEM_LIBWPS)
4820 AC_SUBST(WPS_CFLAGS)
4823 dnl ===================================================================
4824 dnl Check for system libwpg
4825 dnl ===================================================================
4826 AC_MSG_CHECKING([which libwpg to use])
4827 if test "$with_system_libwpg" = "yes"; then
4828 AC_MSG_RESULT([external])
4830 PKG_CHECK_MODULES( WPG, libwpg-0.2 )
4832 AC_MSG_RESULT([internal])
4834 BUILD_TYPE="$BUILD_TYPE LIBWPG"
4836 AC_SUBST(SYSTEM_LIBWPG)
4837 AC_SUBST(WPG_CFLAGS)
4840 dnl ===================================================================
4841 dnl Check whether freetype2 supports emboldening
4842 dnl ===================================================================
4843 if test "$test_freetype" = "yes"; then
4844 save_CPPFLAGS="$CPPFLAGS"
4845 save_LDFLAGS="$LDFLAGS"
4847 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
4848 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
4849 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
4850 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
4851 LDFLAGS="$save_LDFLAGS"
4852 CPPFLAGS="$save_CPPFLAGS"
4855 AC_SUBST(USE_FT_EMBOLDEN)
4857 # ===================================================================
4858 # Check for system libxslt
4859 # to prevent incompatibilities between internal libxml2 and external libxslt,
4860 # or vice versa, use with_system_libxml here
4861 # ===================================================================
4862 AC_MSG_CHECKING([which libxslt to use])
4863 if test "$with_system_libxml" = "yes"; then
4864 AC_MSG_RESULT([external])
4866 if test "$_os" = "Darwin"; then
4867 dnl make sure to use SDK path
4868 LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
4870 LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
4872 PKG_CHECK_MODULES(LIBXSLT, libxslt)
4875 dnl Check for xsltproc
4876 AC_PATH_PROG(XSLTPROC, xsltproc, no)
4877 if test "$XSLTPROC" = "no"; then
4878 AC_MSG_ERROR([xsltproc is required])
4881 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libxslt-1.dll"
4883 AC_MSG_RESULT([internal])
4885 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
4887 if test "$cross_compiling" = "yes"; then
4888 AC_PATH_PROG(XSLTPROC, xsltproc, no)
4889 if test "$XSLTPROC" = "no"; then
4890 AC_MSG_ERROR([xsltproc is required])
4894 AC_SUBST(SYSTEM_LIBXSLT)
4895 AC_SUBST(LIBXSLT_CFLAGS)
4896 AC_SUBST(LIBXSLT_LIBS)
4899 # ===================================================================
4900 # Check for system libxml
4901 # ===================================================================
4902 AC_MSG_CHECKING([which libxml to use])
4903 if test "$with_system_libxml" = "yes"; then
4904 AC_MSG_RESULT([external])
4906 if test "$_os" = "Darwin"; then
4907 dnl make sure to use SDK path
4908 LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
4910 LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
4911 elif test $_os = iOS; then
4912 dnl make sure to use SDK path
4913 usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
4914 LIBXML_CFLAGS="-I$usr/include/libxml2"
4915 LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
4917 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
4919 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS zlib1.dll libxml2-2.dll"
4921 AC_MSG_RESULT([internal])
4923 BUILD_TYPE="$BUILD_TYPE LIBXML2"
4925 AC_SUBST(SYSTEM_LIBXML)
4926 AC_SUBST(LIBXML_CFLAGS)
4927 AC_SUBST(LIBXML_LIBS)
4929 dnl ===================================================================
4930 dnl Checks for Python
4931 dnl ===================================================================
4933 AC_MSG_CHECKING([which Python to use])
4935 case "$enable_python" in
4938 AC_MSG_RESULT([none])
4942 if test $build_os = cygwin; then
4943 dnl When building on Windows we don't attempt to use any installed
4944 dnl "system" Python.
4946 dnl (When cross-compiling to Windows from Linux using the mingw32-cross
4947 dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
4948 dnl MinGW cross-compilation setups.)
4949 AC_MSG_RESULT([internal])
4950 enable_python=internal
4951 elif test $_os = Darwin -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then
4952 AC_MSG_RESULT([internal, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno])
4953 enable_python=internal
4955 AC_MSG_RESULT([checking below])
4960 AC_MSG_RESULT([internal])
4963 if test $_os = Darwin -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then
4964 AC_MSG_ERROR([Cannot use "system" Python, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno])
4966 AC_MSG_RESULT([system])
4969 AC_MSG_ERROR([Incorrect --enable-python option])
4973 AC_SUBST(DISABLE_PYTHON)
4975 if test $_os = WINNT -a "$WITH_MINGW" != yes -a $enable_python = system; then
4976 AC_MSG_ERROR([Must use internal Python when building with MSVC])
4979 if test $enable_python != no; then
4980 BUILD_TYPE="$BUILD_TYPE PYUNO"
4983 if test "$cross_compiling" = yes; then
4984 if test $enable_python = auto; then
4985 enable_python=system
4988 if test $enable_python = system; then
4989 # This causes an error if no python command is found
4990 # Note that this takes the system python called just "python",
4991 # which isn't actually what we want on MacOSX when building
4992 # against the 10.6 SDK. But that shouldn't matter, we
4993 # select the correct python command manually below anyway.
4994 AM_PATH_PYTHON([2.6])
4995 elif test $enable_python = auto; then
4996 dnl This allows lack of system Python
4997 AM_PATH_PYTHON([2.6],, [:])
4999 if test "$PYTHON" = :; then
5000 enable_python=internal
5002 enable_python=system
5007 if test $enable_python = system; then
5008 if test $_os = Darwin; then
5009 # We already have logic above to make sure the system Python
5010 # is used only when building against SDK 10.6 or newer.
5012 # Make sure we use the 2.6 Python when building against the
5014 case $with_macosx_sdk in
5016 python_version=2.6;;
5018 python_version=2.7;;
5021 python_version=2.7;;
5023 PYTHON=python$python_version
5025 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX${with_macosx_sdk}.sdk/System/Library/Frameworks/Python.framework/Versions/${python_version}/include/python${python_version}"
5026 PYTHON_LIBS="-framework Python"
5028 if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
5029 # Fallback: Accept these in the environment, or as set above
5032 elif test "$cross_compiling" != yes; then
5033 python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
5034 python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
5035 python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
5036 python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
5037 if $PKG_CONFIG --exists python-$python_version; then
5038 PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
5039 PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version`"
5041 PYTHON_CFLAGS="-I$python_include"
5042 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
5044 elif test "$cross_compiling" = yes; then
5045 dnl How to find out the cross-compilation Python installation path?
5046 dnl Let's hardocode what we know for different distributions for now...
5048 for python_sysroot in /usr/i686-w64-mingw32/sys-root/mingw ; do
5049 for python_version in 2.6 ; do
5050 if test -f ${python_sysroot}/include/python${python_version}/Python.h; then
5051 PYTHON_CFLAGS="-I ${python_sysroot}/include/python$python_version"
5052 PYTHON_LIBS="-L ${python_sysroot}lib -lpython$python_version $python_libs"
5056 test -n "$PYTHON_CFLAGS" && break
5061 dnl By now enable_python should be "system", "internal" or "no"
5062 case $enable_python in
5066 dnl Check if the headers really work
5067 save_CPPFLAGS="$CPPFLAGS"
5068 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
5069 AC_CHECK_HEADER(Python.h, [],
5070 [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
5072 CPPFLAGS="$save_CPPFLAGS"
5074 dnl FIXME Check if the Python library can be linked with, too?
5079 BUILD_TYPE="$BUILD_TYPE PYTHON"
5080 # Embedded Python dies without Home set
5081 if test "z$HOME" = "z"; then
5084 # bz2 tarball and bzip2 is not standard
5085 if test -z "$BZIP2"; then
5086 AC_PATH_PROG( BZIP2, bzip2)
5087 if test -z "$BZIP2"; then
5088 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
5096 AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
5100 AC_SUBST(SYSTEM_PYTHON)
5101 AC_SUBST(PYTHON_CFLAGS)
5102 AC_SUBST(PYTHON_LIBS)
5104 dnl ===================================================================
5105 dnl Check for system Berkeley db
5106 dnl ===================================================================
5107 AC_MSG_CHECKING([which db to use])
5108 if test "$with_system_db" = "yes"; then
5110 AC_MSG_RESULT([external])
5113 for dbver in 5.1 5.0 5 4.8 4.7 4; do
5114 for dash in - ''; do
5115 AC_CHECK_HEADER([db$dash$dbver/db.h],
5116 [ db_header="db$dash$dbver/db.h"; break 2 ])
5120 if test -z "$db_header"; then
5121 AC_CHECK_HEADER([db/db.h], [db_header='db/db.h'; dbver=''])
5124 if test -z "$db_header"; then
5125 AC_CHECK_HEADER(db.h, [ db_header='db.h'; dbver='' ])
5128 if test -z "$db_header"; then
5129 AC_MSG_ERROR([db.h not found. Use the correct -I flag, or install the Berkeley db development package.])
5132 AC_MSG_CHECKING([whether db is at least 4.1])
5133 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])])
5135 SYSTEM_DB_CFLAGS="-DSYSTEM_DB_HEADER='<$db_header>'"
5138 dnl At least on OpenBSD dbver is not appended to the library
5139 if test "$_os" = "OpenBSD"; then
5142 for dash in - ''; do
5143 AC_CHECK_LIB(db$dash$dbver, dbopen,
5144 [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
5145 AC_CHECK_LIB(db$dash$dbver, __db185_open,
5146 [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
5149 if test -z "$DB_LIB" ; then
5150 AC_MSG_ERROR([db library not found. Use the correct -L flag,
5151 or install the Berkeley db development package.])
5154 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
5155 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libdb-4.8.dll"
5157 AC_MSG_RESULT([internal])
5159 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
5162 AC_SUBST(SYSTEM_DB_CFLAGS)
5166 dnl ===================================================================
5167 dnl Check for system lucene
5168 dnl ===================================================================
5169 if test "$with_java" != "no"; then
5170 AC_MSG_CHECKING([which lucene to use])
5171 if test "$with_system_lucene" = "yes"; then
5172 AC_MSG_RESULT([external])
5174 if test -z $LUCENE_CORE_JAR; then
5175 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
5176 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
5178 AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
5179 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
5180 [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
5181 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
5182 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
5189 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
5190 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
5193 if test -z $LUCENE_ANALYZERS_JAR; then
5194 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
5195 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
5197 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
5198 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
5199 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
5204 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
5205 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
5207 AC_MSG_CHECKING([whether lucene is version 2.x])
5208 export LUCENE_CORE_JAR
5209 if $PERL -e 'use Archive::Zip;
5210 my $file = "$ENV{'LUCENE_CORE_JAR'}";
5211 my $zip = Archive::Zip->new( $file );
5212 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
5213 if ( $mf =~ m/Specification-Version: 2.*/ ) {
5218 AC_MSG_RESULT([yes])
5220 AC_MSG_ERROR([no, you need lucene 2])
5224 AC_MSG_RESULT([internal])
5226 BUILD_TYPE="$BUILD_TYPE LUCENE"
5229 AC_SUBST(SYSTEM_LUCENE)
5230 AC_SUBST(LUCENE_CORE_JAR)
5231 AC_SUBST(LUCENE_ANALYZERS_JAR)
5233 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
5234 if test "x$enable_ext_mysql_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
5235 AC_MSG_RESULT([yes])
5237 BUILD_TYPE="$BUILD_TYPE MYSQLC"
5242 AC_SUBST(ENABLE_MYSQLC)
5244 if test "$ENABLE_MYSQLC" = "YES"; then
5246 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MYSQLC"
5248 dnl ===================================================================
5249 dnl Check for system MySQL
5250 dnl ===================================================================
5251 AC_MSG_CHECKING([for MySQL prerequisites])
5252 if test "$with_system_mysql" = "yes"; then
5253 AC_MSG_RESULT([external MySQL])
5255 AC_PATH_PROG( MYSQLCONFIG, mysql_config)
5256 AC_MSG_CHECKING([MySQL version])
5257 MYSQL_VERSION=`$MYSQLCONFIG --version`
5258 MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
5259 if test "$MYSQL_MAJOR" -ge "5"; then
5262 AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
5264 AC_MSG_CHECKING([for MySQL Client library])
5265 MYSQL_INC=`$MYSQLCONFIG --include`
5266 MYSQL_LIB=`$MYSQLCONFIG --libs`
5267 MYSQL_DEFINES=`$MYSQLCONFIG --cflags | $SED -e s,$MYSQL_INC,,`
5268 AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
5271 if test -n "$with_libmysql_path"; then
5272 AC_MSG_RESULT([external Connector/C (libmysql)])
5273 LIBMYSQL=libmysql.so
5274 if test "$_os" = "Darwin"; then
5275 LIBMYSQL=libmysql.dylib
5276 elif test "$_os" = "WINNT"; then
5277 LIBMYSQL=libmysql.dll
5279 AC_MSG_CHECKING([for $LIBMYSQL])
5280 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
5281 AC_MSG_RESULT([found.])
5282 LIBMYSQL_PATH=$with_libmysql_path
5284 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
5287 AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path])
5290 AC_SUBST(SYSTEM_MYSQL)
5293 AC_SUBST(MYSQL_DEFINES)
5294 AC_SUBST(LIBMYSQL_PATH)
5297 dnl ===================================================================
5298 dnl Check for system MySQL C++ Connector
5299 dnl ===================================================================
5301 # who thought this too-generic cppconn dir was a good idea?
5302 AC_MSG_CHECKING([MySQL Connector/C++])
5303 if test "$with_system_mysql_cppconn" = "yes"; then
5304 AC_MSG_RESULT([external])
5305 SYSTEM_MYSQL_CPPCONN=YES
5307 AC_CHECK_HEADER(mysql_driver.h, [],
5308 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
5309 AC_CHECK_LIB(mysqlcppconn, main, [],
5310 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
5311 AC_MSG_CHECKING([version])
5312 AC_RUN_IFELSE([AC_LANG_SOURCE([[
5313 #include <mysql_driver.h>
5315 int main(int argc, char **argv) {
5316 sql::Driver *driver;
5317 driver = get_driver_instance();
5318 if (driver->getMajorVersion() > 1 || \
5319 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
5320 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
5325 ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[])
5330 AC_MSG_RESULT([internal])
5331 AC_MSG_CHECKING([for mysqlcppconn module])
5332 if test -d mysqlcppconn; then
5335 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5337 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
5338 SYSTEM_MYSQL_CPPCONN=NO
5341 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
5344 dnl ===================================================================
5345 dnl Check for system hsqldb
5346 dnl ===================================================================
5347 if test "$with_java" != "no"; then
5348 AC_MSG_CHECKING([which hsqldb to use])
5349 if test "$with_system_hsqldb" = "yes"; then
5350 AC_MSG_RESULT([external])
5352 if test -z $HSQLDB_JAR; then
5353 HSQLDB_JAR=/usr/share/java/hsqldb.jar
5355 AC_CHECK_FILE($HSQLDB_JAR, [],
5356 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
5357 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
5359 if $PERL -e 'use Archive::Zip;
5360 my $file = "$ENV{'HSQLDB_JAR'}";
5361 my $zip = Archive::Zip->new( $file );
5362 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
5363 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
5364 push @l, split(/\n/, $mf);
5365 foreach my $line (@l) {
5366 if ($line =~ m/Specification-Version:/) {
5367 ($t, $version) = split (/:/,$line);
5368 $version =~ s/^\s//;
5369 ($a, $b, $c, $d) = split (/\./,$version);
5370 if ($c == "0" && $d > "8") {
5380 AC_MSG_RESULT([yes])
5382 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
5385 AC_MSG_RESULT([internal])
5387 BUILD_TYPE="$BUILD_TYPE HSQLDB"
5389 AC_SUBST(SYSTEM_HSQLDB)
5390 AC_SUBST(HSQLDB_JAR)
5393 dnl ===================================================================
5394 dnl Check for PostgreSQL stuff
5395 dnl ===================================================================
5397 if test "x$enable_postgresql_sdbc" != "xno"; then
5398 SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
5399 AC_MSG_CHECKING([PostgreSQL C interface])
5400 if test "$with_system_postgresql" = "yes"; then
5401 AC_MSG_RESULT([external PostgreSQL])
5402 SYSTEM_POSTGRESQL=YES
5403 if test "$_os" = Darwin; then
5405 for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
5406 pg_supp_path="$PATH_SEPARATOR$d$pg_supp_path"
5409 AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
5410 if test -z "$PGCONFIG"; then
5411 AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
5413 POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
5414 POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
5416 if test -n "$with_libpq_path"; then
5417 SYSTEM_POSTGRESQL=YES
5418 AC_MSG_RESULT([external libpq])
5419 POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
5420 POSTGRESQL_INC=-I"${with_libpq_path}/include/"
5422 SYSTEM_POSTGRESQL=NO
5423 AC_MSG_RESULT([internal])
5425 POSTGRESQL_INC="%OVERRIDE_ME%"
5426 BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
5429 if test "${SYSTEM_POSTGRESQL}" = "YES"; then
5430 AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
5432 save_CPPFLAGS=$CPPFLAGS
5434 CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
5435 LIBS="${LIBS} ${POSTGRESQL_LIB}"
5436 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
5437 AC_CHECK_LIB(pq, PQconnectdbParams, [],
5438 [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
5440 CPPFLAGS=$save_CPPFLAGS
5443 BUILD_POSTGRESQL_SDBC=YES
5445 AC_SUBST(BUILD_POSTGRESQL_SDBC)
5446 AC_SUBST(SYSTEM_POSTGRESQL)
5447 AC_SUBST(POSTGRESQL_INC)
5448 AC_SUBST(POSTGRESQL_LIB)
5450 dnl ===================================================================
5451 dnl Check for system beanshell
5452 dnl ===================================================================
5453 if test "$with_java" != "no"; then
5454 AC_MSG_CHECKING([which beanshell to use])
5455 if test "$with_system_beanshell" = "yes"; then
5456 AC_MSG_RESULT([external])
5458 if test -z $BSH_JAR; then
5459 BSH_JAR=/usr/share/java/bsh.jar
5461 AC_CHECK_FILE($BSH_JAR, [],
5462 [AC_MSG_ERROR(bsh.jar not found.)], [])
5464 AC_MSG_RESULT([internal])
5466 BUILD_TYPE="$BUILD_TYPE BSH"
5469 AC_SUBST(SYSTEM_BSH)
5473 dnl ===================================================================
5474 dnl Check for system saxon
5475 dnl ===================================================================
5476 if test "$with_java" != "no"; then
5477 AC_MSG_CHECKING([which saxon to use])
5478 if test "$with_system_saxon" = "yes"; then
5479 AC_MSG_RESULT([external])
5481 if test -z $SAXON_JAR; then
5482 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
5483 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
5485 AC_CHECK_FILE(/usr/share/java/saxon.jar,
5486 [ SAXON_JAR=/usr/share/java/saxon.jar ],
5487 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
5488 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
5489 [ AC_MSG_ERROR(saxon.jar replacement not found)]
5496 AC_CHECK_FILE($SAXON_JAR, [],
5497 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
5499 if test -n "$SERIALIZER_JAR"; then
5500 AC_CHECK_FILE($SERIALIZER_JAR, [],
5501 [AC_MSG_ERROR(serializer.jar not found.)], [])
5502 AC_SUBST(SERIALIZER_JAR)
5505 dnl Saxon comes in two practically available versions, the out-of-date saxonb which
5506 dnl supports the Java extensions that LibreOffice uses, and the up-to-date saxon he
5507 dnl "home edition" version, which is crippled to not support those Java extensions.
5508 dnl And as an aside the he one also needs to be tweaked to include
5509 dnl a META-INF/services to broadcast that it supports the jaxp transform factory
5511 AC_MSG_CHECKING([if saxon works])
5512 cat > saxontest.java <<_ACEOF
5513 [import javax.xml.transform.TransformerFactory;
5514 import javax.xml.transform.Transformer;
5515 import javax.xml.transform.stream.StreamSource;
5518 import net.sf.saxon.FeatureKeys;
5521 public static void main(String[] args) {
5522 System.setProperty("javax.xml.transform.TransformerFactory",
5523 "net.sf.saxon.TransformerFactoryImpl");
5525 TransformerFactory tfactory = TransformerFactory.newInstance();
5526 // some external saxons (Debian, Ubuntu, ...) have this disabled
5528 tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
5529 System.out.println("TransformerFactory is" +
5530 tfactory.getClass().getName());
5531 Transformer transformer = tfactory.newTransformer(
5532 new StreamSource(new File(args[0])));
5533 } catch(Exception e){
5534 e.printStackTrace(System.err);
5543 cat > saxontest.xsl<<_ACEOF
5544 [<?xml version="1.0" encoding="UTF-8"?>
5545 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5546 <xsl:template match="/">
5547 <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/>
5553 javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2"
5554 AC_TRY_EVAL(javac_cmd)
5555 if test $? = 0 && test -f ./saxontest.class ; then
5556 java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2"
5557 AC_TRY_EVAL(java_cmd)
5558 if test $? = 0; then
5559 AC_MSG_RESULT([yes])
5561 cat saxontest.java >&5
5563 AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb])
5567 cat saxontest.java >&5
5568 AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar])
5571 AC_MSG_RESULT([internal])
5576 AC_SUBST(SYSTEM_SAXON)
5579 if test -n "$NEED_SAXON"; then
5580 BUILD_TYPE="$BUILD_TYPE SAXON"
5583 # ===================================================================
5584 # Check whether to build stax
5585 # ===================================================================
5586 AC_MSG_CHECKING([whether building the stax is required])
5588 if test -z "$SOLAR_JAVA"; then
5589 AC_MSG_RESULT([no (java disabled)])
5590 elif test "$SYSTEM_SAXON" = "YES"; then
5591 AC_MSG_RESULT([no (already provided by system saxon)])
5592 elif test -f "./stax/download/jsr173_1.0_api.jar"; then
5593 AC_MSG_RESULT([no (will use the prebuilt stax/download/jsr173_1.0_api.jar)])
5596 AC_MSG_RESULT([yes (no system saxon and no prebuilt copy)])
5598 AC_SUBST(BUILD_STAX)
5600 dnl ===================================================================
5601 dnl Check for system curl
5602 dnl ===================================================================
5603 AC_MSG_CHECKING([which libcurl to use])
5604 if test "$with_system_curl" = "yes"; then
5605 AC_MSG_RESULT([external])
5609 if test "$cross_compiling" = "yes"; then
5610 dnl At least the OBS mingw32-libcurl-devel package
5611 dnl comes with a proper .pc file
5612 PKG_CHECK_MODULES(CURL, libcurl,, [:])
5613 if test -n "$CURL_PKG_ERRORS"; then
5616 curl_version=`$PKG_CONFIG --modversion libcurl`
5619 if test -z "$curl_version"; then
5620 AC_PATH_PROG(CURLCONFIG, curl-config)
5621 if test -z "$CURLCONFIG"; then
5622 AC_MSG_ERROR([install the libcurl development package])
5624 CURL_LIBS=`$CURLCONFIG --libs`
5625 CURL_CFLAGS=`$CURLCONFIG --cflags`
5626 curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
5629 AC_MSG_CHECKING([whether libcurl is >= 7.13.1])
5631 case $curl_version in
5632 dnl brackets doubled below because Autoconf uses them as m4 quote characters,
5633 dnl so they need to be doubled to end up in the configure script
5634 7.13.1|7.1[[4-9]].*|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
5635 AC_MSG_RESULT([yes, you have $curl_version])
5638 AC_MSG_ERROR([no, you have $curl_version])
5642 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"
5644 AC_MSG_RESULT([internal])
5646 BUILD_TYPE="$BUILD_TYPE CURL"
5648 AC_SUBST(SYSTEM_CURL)
5649 AC_SUBST(CURL_CFLAGS)
5652 dnl ===================================================================
5653 dnl Check for system boost
5654 dnl ===================================================================
5655 AC_MSG_CHECKING([which boost to use])
5656 if test "$with_system_boost" = "yes"; then
5657 AC_MSG_RESULT([external])
5660 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
5661 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
5662 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
5663 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
5664 AC_CHECK_HEADER(boost/function.hpp, [],
5665 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
5666 AC_CHECK_HEADER([boost/unordered_map.hpp], [HAVE_BOOST_UNORDERED_MAP=TRUE],
5667 [AC_MSG_WARN([boost/unordered_map.hpp not found])], [])
5669 save_CXXFLAGS=$CXXFLAGS
5670 CXXFLAGS="$CXXFLAGS -fno-exceptions"
5671 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
5672 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
5673 ]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
5675 if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
5676 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
5678 AC_MSG_RESULT([yes])
5680 CXXFLAGS=$save_CXXFLAGS
5683 AC_MSG_RESULT([internal])
5684 BUILD_TYPE="$BUILD_TYPE BOOST"
5686 HAVE_BOOST_UNORDERED_MAP=TRUE
5688 AC_SUBST([HAVE_BOOST_UNORDERED_MAP])
5689 AC_SUBST(SYSTEM_BOOST)
5691 dnl ===================================================================
5692 dnl Check for system mdds
5693 dnl ===================================================================
5694 AC_MSG_CHECKING([which mdds to use])
5695 if test "$with_system_mdds" = "yes"; then
5696 AC_MSG_RESULT([external])
5699 dnl ===================================================================
5700 dnl Determine which hash container mdds shall use
5701 dnl ===================================================================
5702 AC_MSG_CHECKING([which hash container mdds shall use])
5703 if test "x$HAVE_CXX0X" = "xTRUE"; then
5704 MDDS_CPPFLAGS="-std=c++0x"
5705 AC_MSG_RESULT([std::unordered_map])
5707 MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
5708 AC_MSG_RESULT([boost::unordered_map])
5712 save_CPPFLAGS="$CPPFLAGS"
5713 CPPFLAGS="$CPPFLAGS $MDDS_CPPFLAGS"
5714 AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
5715 [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
5716 AC_CHECK_HEADER(mdds/mixed_type_matrix.hpp, [],
5717 [AC_MSG_ERROR(mdds/mixed_type_matrix.hpp not found. install mdds >= 0.4.0)], [])
5718 CPPFLAGS="$save_CPPFLAGS"
5719 save_CXXFLAGS="$CXXFLAGS"
5720 CXXFLAGS="$CXXFLAGS $MDDS_CPPFLAGS"
5721 AC_MSG_CHECKING([for correct signature of ::mdds::flat_segment_tree])
5722 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <mdds/flat_segment_tree.hpp>
5724 int main(int argc, char **argv) {
5725 ::mdds::flat_segment_tree<long, short> db(0, 100, 0);
5727 if (!db.search(5, val).second)
5731 ]])],[ac_cv_cxx_mdds_flat_segment_tree_correct=yes],[ac_cv_cxx_mdds_flat_segment_tree_correct=no],[])
5733 if test "$ac_cv_cxx_mdds_flat_segment_tree_correct" = "yes"; then
5734 AC_MSG_RESULT([yes])
5736 AC_MSG_ERROR([no, install mdds >= 0.5.0])
5738 CXXFLAGS=$save_CXXFLAGS
5741 AC_MSG_RESULT([internal])
5742 BUILD_TYPE="$BUILD_TYPE MDDS"
5745 dnl ===================================================================
5746 dnl Determine which hash container mdds shall use
5747 dnl ===================================================================
5748 AC_MSG_CHECKING([which hash container mdds shall use])
5749 MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
5750 AC_MSG_RESULT([boost::unordered_map])
5752 AC_SUBST(SYSTEM_MDDS)
5753 AC_SUBST([MDDS_CPPFLAGS])
5755 dnl ===================================================================
5756 dnl Check for system vigra
5757 dnl ===================================================================
5758 AC_MSG_CHECKING([which vigra to use])
5759 if test "$with_system_vigra" = "yes"; then
5760 AC_MSG_RESULT([external])
5763 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
5764 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
5767 AC_MSG_RESULT([internal])
5768 BUILD_TYPE="$BUILD_TYPE VIGRA"
5771 AC_SUBST(SYSTEM_VIGRA)
5773 dnl ===================================================================
5774 dnl Check for system odbc
5775 dnl ===================================================================
5776 AC_MSG_CHECKING([which odbc headers to use])
5777 if test "$with_system_odbc" = "yes"; then
5778 AC_MSG_RESULT([external])
5779 SYSTEM_ODBC_HEADERS=YES
5781 AC_CHECK_HEADER(sqlext.h, [],
5782 [AC_MSG_ERROR(odbc not found. install odbc)], [])
5784 AC_MSG_RESULT([internal])
5785 SYSTEM_ODBC_HEADERS=NO
5786 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
5788 AC_SUBST(SYSTEM_ODBC_HEADERS)
5790 AC_MSG_CHECKING([whether to enable build of Mozilla])
5791 if test "$enable_mozilla" = "no"; then
5795 AC_MSG_RESULT([yes])
5798 AC_SUBST(WITH_MOZILLA)
5800 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
5801 if test "$enable_mozilla" = "no"; then
5803 elif test "$with_system_mozilla" = "yes"; then
5804 AC_MSG_RESULT([no, not possible with system-mozilla])
5806 AC_MSG_RESULT([yes])
5809 AC_MSG_CHECKING([whether to build XML Security support])
5810 if test "$enable_xmlsec" = "no"; then
5815 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
5816 AC_MSG_RESULT([yes])
5818 AC_SUBST(ENABLE_XMLSEC)
5820 AC_MSG_CHECKING([whether to build LDAP configuration backend])
5821 if test "$enable_ldap" != "no"; then
5824 if test "$with_openldap" = "yes"; then
5826 AC_MSG_RESULT([OpenLDAP])
5828 AC_CHECK_HEADERS(ldap.h, [],
5829 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
5830 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
5831 [AC_MSG_ERROR(openldap lib not found or functional)], [])
5832 AC_CHECK_LIB(ldap, ldap_set_option, [],
5833 [AC_MSG_ERROR(openldap lib not found or functional)], [])
5834 elif test "$enable_mozilla" != "no"; then
5835 AC_MSG_RESULT([Mozilla])
5839 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP required])
5846 AC_SUBST(WITH_OPENLDAP)
5848 dnl ===================================================================
5849 dnl Check for system mozilla
5850 dnl ===================================================================
5851 AC_MSG_CHECKING([which Mozilla to use])
5852 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
5853 AC_MSG_RESULT([external])
5855 AC_MSG_CHECKING([which Mozilla flavour to use])
5856 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
5858 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
5859 MOZ_FLAVOUR=xulrunner
5860 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
5861 MOZ_FLAVOUR=seamonkey
5862 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "iceape"; then
5864 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
5866 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
5871 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
5874 if test "$MOZ_FLAVOUR" != "libxul"; then
5875 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
5876 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
5877 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
5880 if test -z "$HASXPCOM"; then
5881 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
5882 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
5883 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
5884 if ! test -e "$MOZ_LIB/libxul.so"; then
5885 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
5886 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
5887 MOZ_LIB="$MOZ_LIB/sdk/lib"
5892 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
5893 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
5894 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
5895 if test -d "$MOZ_INC/ldap"; then
5896 AC_MSG_RESULT([yes])
5897 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
5900 Could not find LDAP header include files in $MOZ_INC/ldap.
5901 Please recompile $tmp with --enable-ldap or use --with-openldap.])
5905 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
5906 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
5907 if test "$MOZ_FLAVOUR" = "libxul"; then
5908 MOZ_FLAVOUR="mozilla"
5911 elif test "$enable_mozilla" = "no"; then
5912 AC_MSG_RESULT([none])
5915 AC_MSG_RESULT([internal])
5917 BUILD_TYPE="$BUILD_TYPE MOZ"
5918 if test -z "$with_mozilla_version"; then
5921 AC_MSG_CHECKING([which Mozilla version to build])
5922 MOZILLA_VERSION=$with_mozilla_version
5923 enable_build_mozilla=1
5924 AC_MSG_RESULT([$MOZILLA_VERSION])
5927 AC_SUBST(MOZILLA_VERSION)
5929 AC_MSG_CHECKING([for toolkit Mozilla should use])
5930 if test -z "$with_mozilla_toolkit"; then
5931 if test "$_os" != "WINNT" ; then
5932 if test "$_os" = "Darwin" ; then
5934 AC_MSG_RESULT([mac])
5936 MOZILLA_TOOLKIT=gtk2
5937 AC_MSG_RESULT([gtk2])
5941 MOZILLA_TOOLKIT=$with_mozilla_toolkit
5942 enable_build_mozilla=1
5943 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
5946 AC_SUBST(MOZILLA_TOOLKIT)
5948 # default to enabling build mozilla
5949 if test "$enable_build_mozilla" != "no"; then
5950 enable_build_mozilla=yes
5952 enable_build_mozilla=
5955 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
5956 if test -n "$enable_build_mozilla"; then
5958 AC_MSG_RESULT([yes])
5964 if test "$BUILD_MOZAB" = "TRUE"; then
5965 if test "$_os" = "WINNT"; then
5966 if test "$WITH_MINGW" != "yes"; then
5967 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
5968 if test "$MSVSVER" != "2005"; then
5969 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio 2005 only.])
5972 AC_MSG_WARN([Building SeaMonkey with MinGW is not tested, and likely to break.])
5973 echo "Building SeaMonkey with MinGW is not tested, and likely to break." >> warn
5977 if test -z "$MOZILLA_VERSION"; then
5978 MOZILLA_VERSION=1.1.14
5980 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
5981 MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst.in`
5982 AC_MSG_CHECKING([for Mozilla sources])
5983 if test -z "$MOZILLA_FETCH_FILE"; then
5984 AC_MSG_RESULT([not found])
5985 HAVE_MOZILLA_TARBALL=n
5987 AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE])
5988 if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then
5989 if test -z "$DO_FETCH"; then
5990 AC_MSG_RESULT([will be fetched])
5991 HAVE_MOZILLA_TARBALL=y
5993 AC_MSG_RESULT([not found])
5994 HAVE_MOZILLA_TARBALL=n
5997 AC_MSG_RESULT([found])
5998 HAVE_MOZILLA_TARBALL=y
6001 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
6002 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
6003 Use "./download" to download.])
6005 if test "$_os" = "WINNT"; then
6006 AC_MSG_CHECKING([for moztools binaries])
6007 if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then
6008 AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip
6009 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
6013 elif test "$_os" = "Darwin"; then
6014 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
6015 if test -z "$MOZIDL"; then
6016 AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build Mozilla with Mac toolkit.])
6019 # Generic Unix/Linux section
6020 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
6021 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
6022 if test -z "$MOZGTK"; then
6023 AC_MSG_ERROR([GTK2 is needed to build Mozilla.])
6025 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
6026 if test -z "$MOZIDL"; then
6027 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build Mozilla.])
6030 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
6031 if test -z "$MOZGTK"; then
6032 AC_MSG_ERROR([GTK+ 1.2 is needed when not using GTK2 to build Mozilla.])
6034 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
6035 if test -z "$MOZIDL"; then
6036 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build Mozilla.])
6042 AC_SUBST(BUILD_MOZAB)
6045 AC_SUBST(MOZILLABUILD)
6046 AC_SUBST(SYSTEM_MOZILLA)
6047 AC_SUBST(MOZ_FLAVOUR)
6050 AC_SUBST(MOZ_LIB_XPCOM)
6051 AC_SUBST(MOZ_LDAP_CFLAGS)
6053 dnl ===================================================================
6054 dnl Check for system NSS only with xmlsec or mozilla build enabled
6055 dnl ===================================================================
6056 if test "x$enable_xmlsec" != "xno" -o "x$enable_mozilla" != "xno"; then
6057 AC_MSG_CHECKING([which NSS to use])
6058 if test "$with_system_nss" = "yes"; then
6059 AC_MSG_RESULT([external])
6061 PKG_CHECK_MODULES(NSS, nss >= 3.9.3 nspr >= 4.8)
6064 BUILD_TYPE="$BUILD_TYPE NSS"
6065 AC_MSG_RESULT([internal])
6066 if test "$build_os" = "cygwin"; then
6067 AC_MSG_CHECKING([for Mozilla build tooling. Required for nss and/or mozilla])
6068 if test -z "$MOZILLABUILD" ; then
6069 AC_MSG_ERROR([Mozilla build tooling not found.
6070 Use the --with-mozilla-build option after installing the tools obtained
6071 from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
6073 if test \( "$WITH_MINGW" = "yes" \) ; then
6074 if test ! -d "$MOZILLABUILD" ; then
6075 AC_MSG_ERROR([Mozilla build tooling incomplete!])
6080 if test ! -d "$MOZILLABUILD/moztools" \
6081 -o ! -d "$MOZILLABUILD/msys" ; then
6082 AC_MSG_ERROR([Mozilla build tooling incomplete!])
6090 fi # enable xmlsec || enable mozilla
6091 AC_SUBST(SYSTEM_NSS)
6092 AC_SUBST(NSS_CFLAGS)
6095 dnl ===================================================================
6096 dnl Check for system mozilla headers
6097 dnl ===================================================================
6098 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=
6099 AC_MSG_CHECKING([which mozilla headers to use])
6100 if test "$with_system_mozilla_headers" = "yes"; then
6101 AC_MSG_RESULT([external])
6102 SYSTEM_MOZILLA_HEADERS=YES
6103 # First try npapi-sdk:
6104 PKG_CHECK_MODULES(MOZILLA_HEADERS, npapi-sdk, [LOCATED=yes], [LOCATED=no])
6105 # Then go with libxul:
6106 if test "x$LOCATED" != "xyes"; then
6107 PKG_CHECK_MODULES(MOZILLA_HEADERS, libxul, [LOCATED=yes], [LOCATED=no])
6109 # if still not found bail out
6110 if test "x$LOCATED" != "xyes"; then
6111 AC_MSG_ERROR([npapi.h header file not found])
6116 CFLAGS="$CFLAGS $MOZILLA_HEADERS_CFLAGS"
6117 AC_MSG_CHECKING([for NPP_GetMIMEDescription return type])
6122 const char* NPP_GetMIMEDescription(void) { return "foo"; }
6124 [AC_MSG_RESULT([const char*])],
6126 AC_MSG_RESULT([char*])
6127 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=TRUE
6132 AC_MSG_RESULT([internal])
6133 SYSTEM_MOZILLA_HEADERS=NO
6135 AC_SUBST(MOZILLA_HEADERS_CFLAGS)
6136 AC_SUBST(SYSTEM_MOZILLA_HEADERS)
6137 AC_SUBST(HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION)
6139 dnl ===================================================================
6140 dnl Check for system sane
6141 dnl ===================================================================
6142 AC_MSG_CHECKING([which sane header to use])
6143 if test "$with_system_sane" = "yes"; then
6144 AC_MSG_RESULT([external])
6145 SYSTEM_SANE_HEADER=YES
6146 AC_CHECK_HEADER(sane/sane.h, [],
6147 [AC_MSG_ERROR(sane not found. install sane)], [])
6149 AC_MSG_RESULT([internal])
6150 SYSTEM_SANE_HEADER=NO
6151 BUILD_TYPE="$BUILD_TYPE SANE"
6153 AC_SUBST(SYSTEM_SANE_HEADER)
6155 dnl ===================================================================
6156 dnl Check for system icu
6157 dnl ===================================================================
6164 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=
6165 AC_MSG_CHECKING([which icu to use])
6166 if test "$with_system_icu" = "yes"; then
6167 AC_MSG_RESULT([external])
6170 AC_MSG_CHECKING([for unicode/rbbi.h])
6171 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
6175 if test "$WITH_MINGW" = "yes" ; then
6176 ICUPATH="/usr/i686-w64-mingw32/sys-root/mingw/bin:$ICUPATH"
6178 AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
6180 AC_MSG_CHECKING([ICU version])
6181 ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
6182 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
6183 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
6184 ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3`
6186 if test "$ICU_MAJOR" -ge "4"; then
6187 AC_MSG_RESULT([OK, $ICU_VERSION])
6189 AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
6192 if test "$cross_compiling" != "yes"; then
6193 # using the system icu tools can lead to version confusion, use the
6194 # ones from the build environment when cross-compiling
6195 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
6196 if test -z "$SYSTEM_GENBRK"; then
6197 AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
6199 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
6200 if test -z "$SYSTEM_GENCCODE"; then
6201 AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
6203 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
6204 if test -z "$SYSTEM_GENCMN"; then
6205 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
6207 if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4"; then
6208 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
6212 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS icui18n$ICU_MAJOR$ICU_MINOR.dll icuuc$ICU_MAJOR$ICU_MINOR.dll icudata$ICU_MAJOR$ICU_MINOR.dll"
6214 AC_MSG_RESULT([internal])
6216 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
6217 BUILD_TYPE="$BUILD_TYPE ICU"
6219 AC_SUBST(SYSTEM_ICU)
6220 AC_SUBST(SYSTEM_GENBRK)
6221 AC_SUBST(SYSTEM_GENCCODE)
6222 AC_SUBST(SYSTEM_GENCMN)
6226 AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
6228 dnl ===================================================================
6230 dnl ===================================================================
6232 AC_MSG_CHECKING([whether to enable graphite support])
6233 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then
6234 AC_MSG_RESULT([yes])
6235 ENABLE_GRAPHITE="TRUE"
6236 AC_MSG_CHECKING([which graphite to use])
6237 if test "$with_system_graphite" = "yes"; then
6238 AC_MSG_RESULT([external])
6240 PKG_CHECK_MODULES( GRAPHITE, graphite2 >= 0.9.3 )
6241 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libgraphite2.dll"
6243 AC_MSG_RESULT([internal])
6245 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
6250 AC_SUBST(ENABLE_GRAPHITE)
6251 AC_SUBST(SYSTEM_GRAPHITE)
6252 AC_SUBST(GRAPHITE_LIBS)
6253 AC_SUBST(GRAPHITE_CFLAGS)
6255 dnl ===================================================================
6257 dnl ===================================================================
6258 AC_MSG_CHECKING([whether to use system SampleICC])
6259 if test "$with_system_sampleicc" = "yes"; then
6260 AC_MSG_RESULT([yes])
6261 SYSTEM_SAMPLEICC=YES
6262 PKG_CHECK_MODULES(SAMPLEICC, sampleicc)
6267 AC_SUBST(SYSTEM_SAMPLEICC)
6268 AC_SUBST(SAMPLEICC_LIBS)
6269 AC_SUBST(SAMPLEICC_CFLAGS)
6271 dnl ===================================================================
6272 dnl Checks for libraries.
6273 dnl ===================================================================
6274 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
6275 dnl See if we have the AppKit framework for building with Quartz graphics.
6277 if test "$_os" = "Darwin"; then
6278 if test "x$with_x" = "xyes"; then
6279 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
6281 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
6282 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
6283 AC_MSG_RESULT([yes])
6284 x_includes="no_x_includes"
6285 x_libraries="no_x_libraries"
6286 dnl disable some things used on other Unix versions but not on the aqua build
6289 AC_MSG_ERROR([No AppKit.framewrok found])
6294 if test $_os = iOS -o $_os = Android; then
6298 dnl ===================================================================
6299 dnl Check for nsplugin
6300 dnl ===================================================================
6301 AC_MSG_CHECKING([wether to build nsplugin extension])
6303 if test "$enable_nsplugin" != "no"; then
6304 if test "$enable_gtk" != "no"; then
6305 AC_MSG_RESULT([yes])
6308 AC_MSG_RESULT([no, disabled gtk2])
6313 AC_SUBST(ENABLE_NSPLUGIN)
6315 dnl ***************************************
6316 dnl testing for X libraries and includes...
6317 dnl ***************************************
6318 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
6319 dnl Mac OS X using Aqua graphics. Don't check for X11.
6321 elif test "$_os" != "WINNT" -a "$_os" != "Android" -a "$_os" != "iOS"; then
6324 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6326 if test "x$x_includes" = "x"; then
6327 x_includes="default_x_includes"
6329 if test "x$x_libraries" = "x"; then
6330 x_libraries="default_x_libraries"
6332 dnl The variables $x_libraries and $x_includes are set.
6333 if test -z "$x_libraries"; then
6334 AC_MSG_ERROR([No X libraries found]) # Exit
6336 if test -z "$x_includes"; then
6337 AC_MSG_ERROR([No X includes found]) # Exit
6339 CFLAGS="$CFLAGS $X_CFLAGS"
6340 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
6341 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
6342 dnl Check if the XauDisposeAuth symbol is provided by libXau.
6343 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
6345 x_includes="no_x_includes"
6346 x_libraries="no_x_libraries"
6348 if test -z "$x_includes"; then
6349 x_includes="no_x_includes"
6351 if test -z "$x_libraries"; then
6352 x_libraries="no_x_libraries"
6354 if test "$x_includes" = "default_x_includes"; then
6360 if test "$x_libraries" = "default_x_libraries"; then
6361 XLIB=`$PKG_CONFIG --variable=libdir x11`
6362 if test "x$XLIB" = x; then
6371 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then
6372 dnl ===================================================================
6373 dnl Check for Composite.h for Mozilla plugin
6374 dnl ===================================================================
6375 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
6376 [#include <X11/Intrinsic.h>])
6379 AC_MSG_CHECKING([whether to use internal X11 extensions headers])
6380 if test "$with_system_xextensions_headers" != "no"; then
6383 AC_MSG_RESULT([yes])
6384 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
6387 dnl ===================================================================
6388 dnl Check for system Xrender
6389 dnl ===================================================================
6390 AC_MSG_CHECKING([whether to use Xrender])
6391 if test "$test_xrender" = "yes"; then
6392 AC_MSG_RESULT([yes])
6393 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
6394 [AC_MSG_ERROR(libXrender not found or functional)], [])
6395 AC_MSG_CHECKING([which Xrender headers to use])
6396 if test "$with_system_xextensions_headers" != "no"; then
6397 AC_MSG_RESULT([external])
6398 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
6399 [AC_MSG_ERROR(Xrender not found. install X)], [])
6401 AC_MSG_RESULT([internal])
6405 dnl ===================================================================
6406 dnl Check for XRandr
6407 dnl ===================================================================
6408 AC_MSG_CHECKING([whether to enable RandR support])
6409 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
6410 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
6411 XRANDR_DLOPEN="TRUE"
6412 AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
6414 AC_MSG_RESULT([yes])
6415 XRANDR_DLOPEN="FALSE"
6416 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
6417 if test "$ENABLE_RANDR" != "TRUE"; then
6418 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
6419 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
6421 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
6422 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
6423 XRANDR_LIBS="-lXrandr "
6431 AC_SUBST(XRANDR_DLOPEN)
6432 AC_SUBST(XRANDR_CFLAGS)
6433 AC_SUBST(XRANDR_LIBS)
6434 AC_SUBST(ENABLE_RANDR)
6436 dnl ===================================================================
6437 dnl Check for building neon
6438 dnl ===================================================================
6439 AC_MSG_CHECKING([whether to use neon])
6440 if test "$enable_neon" = "no"; then
6443 AC_SUBST(DISABLE_NEON)
6445 AC_MSG_RESULT([yes])
6446 dnl ===================================================================
6447 dnl Check for system neon
6448 dnl ===================================================================
6449 AC_MSG_CHECKING([which neon to use])
6450 if test "$with_system_neon" = "yes"; then
6451 AC_MSG_RESULT([external])
6452 PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
6453 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
6454 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
6456 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libtasn1-3.dll libgnutls-26.dll libneon-27.dll"
6458 AC_MSG_RESULT([internal])
6462 BUILD_TYPE="$BUILD_TYPE NEON"
6464 AC_SUBST(SYSTEM_NEON)
6465 AC_SUBST(NEON_VERSION)
6467 AC_SUBST(NEON_CFLAGS)
6470 dnl ===================================================================
6471 dnl Check for system openssl
6472 dnl ===================================================================
6473 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
6474 "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
6475 with_system_openssl=yes
6477 AC_MSG_CHECKING([which libssl to use])
6478 if test "$with_system_openssl" = "yes"; then
6479 AC_MSG_RESULT([external])
6480 # Mac OS builds should get out without extra stuff is the Mac porters'
6481 # wish. And pkg-config is although Xcode ships a .pc for openssl
6482 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
6483 "$_os" = "DragonFly"; then
6485 OPENSSL_LIBS="-lssl -lcrypto"
6487 PKG_CHECK_MODULES( OPENSSL, openssl )
6490 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libssl-8.dll libcrypto-8.dll"
6492 AC_MSG_RESULT([internal])
6494 BUILD_TYPE="$BUILD_TYPE OPENSSL"
6496 AC_SUBST(SYSTEM_OPENSSL)
6497 AC_SUBST(OPENSSL_CFLAGS)
6498 AC_SUBST(OPENSSL_LIBS)
6500 dnl ===================================================================
6501 dnl Check for system redland
6502 dnl ===================================================================
6503 AC_MSG_CHECKING([which redland library to use])
6504 if test "$with_system_redland" = "yes"; then
6505 AC_MSG_RESULT([external])
6507 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
6508 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
6509 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libraptor-1.dll librasqal-2.dll libsqlite3-0.dll librdf-0.dll"
6511 AC_MSG_RESULT([internal])
6512 BUILD_TYPE="$BUILD_TYPE REDLAND"
6515 AC_SUBST(SYSTEM_REDLAND)
6516 AC_SUBST(REDLAND_CFLAGS)
6517 AC_SUBST(REDLAND_LIBS)
6519 dnl ===================================================================
6520 dnl Check for system hunspell
6521 dnl ===================================================================
6522 AC_MSG_CHECKING([which libhunspell to use])
6523 if test "$with_system_hunspell" = "yes"; then
6524 AC_MSG_RESULT([external])
6527 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
6528 if test "$HUNSPELL_PC" != "TRUE"; then
6529 AC_CHECK_HEADER(hunspell.hxx, [],
6531 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
6532 [AC_MSG_ERROR(hunspell headers not found.)], [])
6534 AC_CHECK_LIB(hunspell, main, [],
6535 [ AC_MSG_ERROR(hunspell library not found.) ], [])
6536 HUNSPELL_LIBS=-lhunspell
6539 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libhunspell-1.3-0.dll"
6541 AC_MSG_RESULT([internal])
6543 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
6545 AC_SUBST(SYSTEM_HUNSPELL)
6546 AC_SUBST(HUNSPELL_CFLAGS)
6547 AC_SUBST(HUNSPELL_LIBS)
6549 dnl ===================================================================
6550 dnl Checking for altlinuxhyph
6551 dnl ===================================================================
6552 AC_MSG_CHECKING([which altlinuxhyph to use])
6553 if test "$with_system_altlinuxhyph" = "yes"; then
6554 AC_MSG_RESULT([external])
6556 AC_CHECK_HEADER(hyphen.h, [],
6557 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
6558 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
6559 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
6560 [#include <hyphen.h>])
6561 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
6562 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6563 if test -z "$HYPHEN_LIB"; then
6564 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
6565 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6567 if test -z "$HYPHEN_LIB"; then
6568 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
6569 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6571 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libhyphen-0.dll"
6573 AC_MSG_RESULT([internal])
6575 BUILD_TYPE="$BUILD_TYPE HYPHEN"
6577 AC_SUBST(SYSTEM_HYPH)
6578 AC_SUBST(HYPHEN_LIB)
6580 dnl ===================================================================
6581 dnl Checking for mythes
6582 dnl ===================================================================
6583 AC_MSG_CHECKING([which mythes to use])
6584 if test "$with_system_mythes" = "yes"; then
6585 AC_MSG_RESULT([external])
6588 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
6589 if test "$MYTHES_PKGCONFIG" = "no"; then
6590 AC_CHECK_HEADER(mythes.hxx, [],
6591 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
6592 AC_CHECK_LIB(mythes-1.2, main, [],
6593 [ MYTHES_FOUND=no], [])
6594 if test "$MYTHES_FOUND" = "no"; then
6595 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
6596 [ MYTHES_FOUND=no], [])
6598 if test "$MYTHES_FOUND" = "no"; then
6599 AC_MSG_ERROR([mythes library not found!.])
6603 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libmythes-1.2-0.dll"
6605 AC_MSG_RESULT([internal])
6607 BUILD_TYPE="$BUILD_TYPE MYTHES"
6609 AC_SUBST(SYSTEM_MYTHES)
6610 AC_SUBST(MYTHES_CFLAGS)
6611 AC_SUBST(MYTHES_LIBS)
6613 dnl ===================================================================
6614 dnl Checking for lpsolve
6615 dnl ===================================================================
6616 AC_MSG_CHECKING([which lpsolve to use])
6617 if test "$with_system_lpsolve" = "yes"; then
6618 AC_MSG_RESULT([external])
6620 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
6621 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
6622 # some systems need this. Like Ubuntu....
6623 AC_CHECK_LIB(m, floor)
6624 AC_CHECK_LIB(dl, dlopen)
6625 AC_CHECK_LIB(lpsolve55, make_lp, ,
6626 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
6627 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS lpsolve55.dll"
6629 AC_MSG_RESULT([internal])
6631 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
6633 AC_SUBST(SYSTEM_LPSOLVE)
6635 dnl ===================================================================
6636 dnl Checking for libexttextcat
6637 dnl ===================================================================
6638 AC_MSG_CHECKING([which libexttextcat to use])
6639 if test "$with_system_libexttextcat" = "yes"; then
6640 AC_MSG_RESULT([external])
6641 SYSTEM_LIBEXTTEXTCAT=YES
6642 PKG_CHECK_MODULES([LIBEXTTEXTCAT], [libexttextcat >= 3.1.1])
6643 SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
6645 AC_MSG_RESULT([internal])
6646 SYSTEM_LIBEXTTEXTCAT=NO
6647 BUILD_TYPE="$BUILD_TYPE LIBEXTTEXTCAT"
6649 AC_SUBST(SYSTEM_LIBEXTTEXTCAT)
6650 AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
6651 AC_SUBST(LIBEXTTEXTCAT_CFLAGS)
6652 AC_SUBST(LIBEXTTEXTCAT_LIBS)
6654 dnl ***************************************
6655 dnl testing libc version for Linux...
6656 dnl ***************************************
6657 if test "$_os" = "Linux"; then
6658 AC_MSG_CHECKING([whether libc is >= 2.1.1])
6659 exec 6>/dev/null # no output
6660 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
6661 exec 6>&1 # output on again
6662 if test "$HAVE_LIBC"; then
6663 AC_MSG_RESULT([yes])
6665 AC_MSG_ERROR([no, upgrade libc])
6669 if test "$_os" != "WINNT"; then
6670 AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
6671 AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
6672 if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
6680 AC_SUBST(HAVE_GETOPT)
6681 AC_SUBST(HAVE_READDIR_R)
6682 AC_SUBST(SYSTEM_LIBC)
6684 dnl =========================================
6685 dnl Check for the Windows SDK.
6686 dnl =========================================
6687 dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
6688 dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
6689 if test "$_os" = "WINNT"; then
6690 AC_MSG_CHECKING([for Windows SDK])
6691 if test "$build_os" = "cygwin"; then
6692 if test -z "$with_windows_sdk_home"; then
6693 # This first line will detect a February 2003 Microsoft Platform SDK
6694 WINDOWS_SDK_HOME=`./oowintool --windows-sdk-home`
6695 # But there might be also an April 2005 PSDK, unfortunately MS changed
6696 # the registry entry. (we prefer the old version!?)
6697 if test -z "$WINDOWS_SDK_HOME"; then
6698 WINDOWS_SDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
6700 # normalize if found
6701 if test -n "$WINDOWS_SDK_HOME"; then
6702 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
6703 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
6706 WINDOWS_SDK_HOME=`cygpath -u "$with_windows_sdk_home"`
6709 if test -n "$WINDOWS_SDK_HOME"; then
6710 # Remove a possible trailing backslash
6711 WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
6712 # Problem with current PSDK (iz 49865)
6713 # (What "current" does that mean?)
6714 if test -f "$WINDOWS_SDK_HOME/Lib/libcp.lib"; then
6716 Some modules do not build correctly with MS Platform SDK - April 2005
6717 Edition if the library ($WINDOWS_SDK_HOME/Lib/libcp.lib) is found.
6718 Remove/rename/backup that file and restart configure. Details about this
6719 problem can be found in issue 49856.])
6722 if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
6723 -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
6724 -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
6729 if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
6735 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
6736 AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
6737 the Windows SDK are installed.])
6740 if test ! -x "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
6741 -o ! -x "$WINDOWS_SDK_HOME/bin/msidb.exe" \
6742 -o ! -x "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
6743 -o ! -x "$WINDOWS_SDK_HOME/bin/msitran.exe" ; then
6744 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
6748 if test -z "$WINDOWS_SDK_HOME"; then
6749 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
6750 elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
6751 AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
6752 elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
6753 AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
6754 elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
6755 AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
6757 AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
6760 AC_SUBST(WINDOWS_SDK_HOME)
6762 dnl =========================================
6763 dnl Check for the Microsoft DirectX SDK.
6764 dnl =========================================
6765 if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
6766 AC_MSG_CHECKING([for DirectX SDK])
6767 if test "$build_os" = "cygwin"; then
6768 if test -z "$with_directx_home"; then
6769 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
6770 if test -n "$DXSDK_DIR"; then
6771 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
6772 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
6774 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
6775 # the "DirectX SDK not found" error later
6777 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
6779 # Remove a possible trailing backslash
6780 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
6781 elif test -n "$with_directx_home"; then
6782 DIRECTXSDK_HOME="$with_directx_home"
6785 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h" ; then
6786 HAVE_DIRECTXSDK_H="yes"
6788 HAVE_DIRECTXSDK_H="no"
6791 # MS changed the location of the libraries with Dec 2004 DirectX SDK
6792 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
6793 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
6795 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
6798 if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib" ; then
6799 HAVE_DIRECTXSDK_LIB="yes"
6801 HAVE_DIRECTXSDK_LIB="no"
6804 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
6805 AC_MSG_RESULT([found])
6807 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
6810 AC_SUBST(DIRECTXSDK_HOME)
6811 AC_SUBST(DIRECTXSDK_LIB)
6813 dnl ***************************************
6814 dnl Checking for bison and flex
6815 dnl ***************************************
6816 AC_PATH_PROG(BISON, bison)
6818 if test -z "$BISON"; then
6819 AC_MSG_ERROR([no bison found in \$PATH, install it])
6821 AC_MSG_CHECKING([the bison version])
6822 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
6823 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
6824 # Accept newer than 1.875 or older(equal) than 1.75
6825 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
6826 if test "$_bison_version" = "1.875" ; then
6827 AC_MSG_WARN([suspect ($BISON $_bison_version)])
6828 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
6830 AC_MSG_RESULT([checked ($BISON $_bison_version)])
6833 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
6835 if test "$_bison_longver" -lt 2000; then
6839 AC_SUBST(ANCIENT_BISON)
6841 AC_PATH_PROG(FLEX, flex)
6842 if test -z "$FLEX"; then
6843 AC_MSG_ERROR([no flex found in \$PATH, install it])
6845 dnl ***************************************
6846 dnl Checking for patch
6847 dnl ***************************************
6848 AC_PATH_PROG(PATCH, patch)
6849 if test -z "$PATCH"; then
6850 AC_MSG_ERROR([\"patch\" not found in \$PATH, install it])
6853 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
6854 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
6855 if test -z "$with_gnu_patch"; then
6858 if test -x "$with_gnu_patch"; then
6859 GNUPATCH=$with_gnu_patch
6861 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
6865 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
6866 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
6867 AC_MSG_RESULT([yes])
6869 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
6873 dnl We also need to check for --with-gnu-cp
6875 if test -z "$with_gnu_cp"; then
6876 # check the place where the good stuff is hidden on Solaris...
6877 if test -x /usr/gnu/bin/cp; then
6878 GNUCP=/usr/gnu/bin/cp
6880 AC_PATH_PROGS(GNUCP, gnucp cp)
6882 if test -z $GNUCP; then
6883 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
6886 if test -x "$with_gnu_cp"; then
6889 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
6893 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
6894 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
6895 AC_MSG_RESULT([yes])
6896 elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
6897 AC_MSG_RESULT([yes])
6900 darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*)
6902 AC_MSG_RESULT([no gnucp found - using the system's cp command])
6905 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
6913 dnl ***************************************
6914 dnl testing assembler path
6915 dnl ***************************************
6917 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
6918 if test "$CL_X64" = ""; then
6923 assembler_bin=bin/amd64
6925 if test -n "$with_asm_home"; then
6926 with_asm_home=`cygpath -u "$with_asm_home"`
6928 if test -x "$with_asm_home/$assembler"; then
6929 AC_MSG_CHECKING([$assembler assembler path])
6930 AC_MSG_RESULT([$with_asm_home/$assembler])
6931 ML_EXE="$with_asm_home/$assembler"
6933 AC_PATH_PROG(ML_EXE, $assembler)
6934 if test -z "$ML_EXE"; then
6935 AC_MSG_CHECKING([$with_cl_home/$assembler_bin/$assembler])
6936 if test -x "$with_cl_home/$assembler_bin/$assembler"; then
6937 with_asm_home=$with_cl_home/$assembler_bin
6938 AC_MSG_RESULT([found])
6939 ML_EXE="$with_cl_home/$assembler_bin/$assembler"
6941 AC_MSG_ERROR([Configure did not find $assembler assembler.])
6944 with_asm_home="ASM_IN_PATH"
6949 with_asm_home="NO_ASM_HOME"
6951 ASM_HOME="$with_asm_home"
6955 dnl ===================================================================
6956 dnl We need zip and unzip
6957 dnl ===================================================================
6958 AC_PATH_PROG(ZIP, zip)
6959 test -z "$ZIP" && AC_MSG_ERROR([zip is required])
6960 if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
6961 AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,)
6964 AC_PATH_PROG(UNZIP, unzip)
6965 test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
6967 dnl ===================================================================
6968 dnl Zip must be a specific type for different build types.
6969 dnl ===================================================================
6970 if test $build_os = cygwin; then
6971 if test -n "`$ZIP -h | grep -i WinNT`" ; then
6972 AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
6976 dnl ===================================================================
6977 dnl Test which vclplugs have to be built.
6978 dnl ===================================================================
6983 if test "x$enable_gtk3" = "xyes"; then
6984 if test "$with_system_cairo" != yes; then
6985 echo "System cairo required for gtk3 support, please use --with-system-cairo"
6987 PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.2 gtk+-unix-print-3.0 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="")
6988 if test "x$ENABLE_GTK3" = "xTRUE"; then
6991 AC_MSG_ERROR([gtk3 libraries of the correct versions, not found])
6995 AC_SUBST(GTK3_CFLAGS)
6996 AC_SUBST(ENABLE_GTK3)
6998 AC_MSG_CHECKING([which VCLplugs shall be built])
7000 if test "x$enable_gtk" = "xyes"; then
7004 AC_SUBST(ENABLE_GTK)
7007 if test "x$enable_kde" = "xyes"; then
7011 AC_SUBST(ENABLE_KDE)
7014 if test "x$enable_kde4" = "xyes"; then
7018 AC_SUBST(ENABLE_KDE4)
7020 if test -z "$R"; then
7021 AC_MSG_RESULT([none])
7026 dnl ===================================================================
7028 dnl ===================================================================
7031 AC_MSG_CHECKING([whether to enable GConf support])
7032 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gconf" = "yes"; then
7034 AC_MSG_RESULT([yes])
7035 PKG_CHECK_MODULES( GCONF, gconf-2.0 ORBit-2.0 )
7039 AC_SUBST(ENABLE_GCONF)
7041 dnl ===================================================================
7043 dnl ===================================================================
7046 AC_MSG_CHECKING([whether to enable GNOME VFS support])
7047 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" -a "$enable_gconf" = "yes"; then
7048 ENABLE_GNOMEVFS="TRUE"
7049 AC_MSG_RESULT([yes])
7050 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
7054 AC_SUBST(ENABLE_GNOMEVFS)
7056 dnl ===================================================================
7057 dnl Check whether the gtk 2.0 libraries are available.
7058 dnl ===================================================================
7062 ENABLE_SYSTRAY_GTK=""
7066 if test "$test_gtk" = "yes"; then
7068 if test "$ENABLE_GTK" = "TRUE" ; then
7069 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]))
7070 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]))
7071 BUILD_TYPE="$BUILD_TYPE GTK"
7073 if test "x$enable_systray" = "xyes"; then
7074 PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
7075 [ ENABLE_SYSTRAY_GTK="TRUE" ],
7076 [ ENABLE_SYSTRAY_GTK="" ])
7079 AC_MSG_CHECKING([whether to enable Gtk print dialog support])
7080 PKG_CHECK_MODULES([GTK_PRINT], [gtk+-unix-print-2.0 >= 2.10.0],
7081 [ENABLE_GTK_PRINT="TRUE"],
7082 [ENABLE_GTK_PRINT=""])
7084 AC_MSG_CHECKING([whether to enable DBUS support])
7085 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
7087 AC_MSG_RESULT([yes])
7088 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
7093 AC_MSG_CHECKING([whether to enable GIO support])
7094 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
7095 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
7096 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
7099 AC_MSG_RESULT([yes])
7100 PKG_CHECK_MODULES( GIO, gio-2.0 )
7106 AC_SUBST(ENABLE_GIO)
7107 AC_SUBST(ENABLE_DBUS)
7108 AC_SUBST(ENABLE_SYSTRAY_GTK)
7109 AC_SUBST(GTK_CFLAGS)
7111 AC_SUBST(GTHREAD_CFLAGS)
7112 AC_SUBST(GTHREAD_LIBS)
7113 AC_SUBST(DBUS_CFLAGS)
7115 AC_SUBST([ENABLE_GTK_PRINT])
7116 AC_SUBST([GTK_PRINT_CFLAGS])
7117 AC_SUBST([GTK_PRINT_LIBS])
7119 PKG_CHECK_MODULES( LIBPNG, libpng, ENABLE_QUICKSTART_LIBPNG="TRUE", ENABLE_QUICKSTART_LIBPNG="" )
7120 AC_SUBST(LIBPNG_LIBS)
7121 AC_SUBST(LIBPNG_CFLAGS)
7123 AC_MSG_CHECKING([whether to enable libpng linking in quickstarter])
7124 if test "x$enable_unix_qstart_libpng" != "xno"; then
7125 AC_MSG_RESULT([yes])
7128 ENABLE_QUICKSTART_LIBPNG=""
7130 AC_SUBST(ENABLE_QUICKSTART_LIBPNG)
7132 SPLIT_APP_MODULES=""
7133 if test "$enable_split_app_modules" = "yes"; then
7134 SPLIT_APP_MODULES="YES"
7136 AC_SUBST(SPLIT_APP_MODULES)
7138 SPLIT_OPT_FEATURES=""
7139 if test "$enable_split_opt_features" = "yes"; then
7140 SPLIT_OPT_FEATURES="YES"
7142 AC_SUBST(SPLIT_OPT_FEATURES)
7144 ENABLE_CAIRO_CANVAS="FALSE"
7145 if test "$enable_cairo_canvas" = "yes" ; then
7146 ENABLE_CAIRO_CANVAS="TRUE"
7148 AC_SUBST(ENABLE_CAIRO_CANVAS)
7150 dnl ===================================================================
7151 dnl Check whether the GStreamer libraries are available.
7152 dnl ===================================================================
7156 if test "$build_gstreamer" = "yes"; then
7158 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
7159 if test "x$enable_gstreamer" != "xno" ; then
7160 ENABLE_GSTREAMER="TRUE"
7161 AC_MSG_RESULT([yes])
7162 PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
7168 AC_SUBST(ENABLE_GSTREAMER)
7170 dnl ===================================================================
7171 dnl Check whether the OpenGL libraries are available
7172 dnl ===================================================================
7174 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
7177 if test "$_os" = "Darwin" ; then
7178 # We use frameworks on Mac OS X, no need for detail checks
7180 SYSTEM_MESA_HEADERS=YES
7181 AC_MSG_RESULT([yes])
7183 if test "x$enable_opengl" != "xno" ; then
7184 if test "$_os" != "WINNT"; then
7185 save_LDFLAGS=$LDFLAGS
7186 LDFLAGS="$LDFLAGS -lm"
7187 AC_MSG_RESULT([yes])
7188 AC_CHECK_LIB(GL, main, [],
7189 [AC_MSG_ERROR(libGL not installed or functional)], [])
7190 AC_CHECK_LIB(GLU, main, [],
7191 [AC_MSG_ERROR(libGLU not installed or functional)], [])
7193 LDFLAGS=$save_LDFLAGS
7195 dnl ===================================================================
7196 dnl Check for system Mesa
7197 dnl ===================================================================
7198 AC_MSG_CHECKING([which Mesa headers to use])
7199 if test "$with_system_mesa_headers" = "yes"; then
7200 AC_MSG_RESULT([external])
7201 SYSTEM_MESA_HEADERS=YES
7203 AC_CHECK_HEADER(GL/glxext.h, [],
7204 [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
7205 AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
7206 AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
7209 AC_MSG_RESULT([internal])
7210 SYSTEM_MESA_HEADERS=NO
7211 BUILD_TYPE="$BUILD_TYPE MESA"
7214 AC_MSG_RESULT([not on Windows])
7221 AC_SUBST(SYSTEM_MESA_HEADERS)
7222 AC_SUBST(ENABLE_OPENGL)
7224 # presenter minimizer extension?
7225 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
7226 if test "x$enable_ext_presenter_minimizer" != "xno" -a "x$enable_extension_integration" != "xno"; then
7227 AC_MSG_RESULT([yes])
7228 ENABLE_MINIMIZER=YES
7232 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MINIMIZER"
7234 AC_SUBST(ENABLE_MINIMIZER)
7236 # presenter console extension?
7237 AC_MSG_CHECKING([whether to build the Presenter Console extension])
7238 if test "x$enable_ext_presenter_console" != "xno" -a "x$enable_extension_integration" != "xno"; then
7239 AC_MSG_RESULT([yes])
7240 ENABLE_PRESENTER_SCREEN=YES
7243 ENABLE_PRESENTER_SCREEN=NO
7244 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PRESENTER_SCREEN"
7246 AC_SUBST(ENABLE_PRESENTER_SCREEN)
7248 # pdf import extension?
7249 AC_MSG_CHECKING([whether to build the PDF Import extension])
7250 if test "x$enable_ext_pdfimport" != "xno" -a "x$enable_extension_integration" != "xno"; then
7251 AC_MSG_RESULT([yes])
7252 ENABLE_PDFIMPORT=YES
7254 dnl ===================================================================
7255 dnl Check for system poppler
7256 dnl ===================================================================
7257 AC_MSG_CHECKING([which pdf backend to use])
7258 if test "$with_system_poppler" = "yes"; then
7259 AC_MSG_RESULT([external])
7261 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
7263 save_CXXFLAGS=$CXXFLAGS
7264 save_CPPFLAGS=$CPPFLAGS
7265 CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
7266 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
7267 AC_CHECK_HEADER([cpp/poppler-version.h], [],
7268 [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
7269 CXXFLAGS=$save_CXXFLAGS
7270 CPPFLAGS=$save_CPPFLAGS
7273 AC_MSG_RESULT([internal])
7275 BUILD_TYPE="$BUILD_TYPE XPDF"
7280 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PDFIMPORT"
7282 AC_SUBST(ENABLE_PDFIMPORT)
7283 AC_SUBST(SYSTEM_POPPLER)
7284 AC_SUBST(POPPLER_CFLAGS)
7285 AC_SUBST(POPPLER_LIBS)
7288 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
7289 AC_MSG_CHECKING([for sdext module])
7290 BUILD_TYPE="$BUILD_TYPE SDEXT"
7293 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
7294 if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
7295 AC_MSG_RESULT([yes])
7296 AC_MSG_CHECKING([for swext module])
7297 ENABLE_MEDIAWIKI=YES
7298 BUILD_TYPE="$BUILD_TYPE SWEXT"
7299 if test "x$with_java" = "xno"; then
7300 AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
7305 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
7307 AC_SUBST(ENABLE_MEDIAWIKI)
7309 if test "$ENABLE_MEDIAWIKI" = "YES"; then
7310 AC_MSG_CHECKING([which Servlet API Jar to use])
7311 if test "$with_system_servlet_api" = "yes"; then
7312 AC_MSG_RESULT([external])
7313 SYSTEM_SERVLETAPI=YES
7314 if test -z "$SERVLETAPI_JAR"; then
7315 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
7317 AC_CHECK_FILE($SERVLETAPI_JAR, [],
7318 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
7320 AC_MSG_RESULT([internal])
7321 SYSTEM_SERVLETAPI=NO
7322 BUILD_TYPE="$BUILD_TYPE TOMCAT"
7325 AC_SUBST(SYSTEM_SERVLETAPI)
7326 AC_SUBST(SERVLETAPI_JAR)
7328 AC_MSG_CHECKING([whether to build the Report Builder extension])
7329 if test "$enable_ext_report_builder" != "no" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
7330 AC_MSG_RESULT([yes])
7331 ENABLE_REPORTBUILDER=YES
7332 AC_MSG_CHECKING([for reportbuilder module])
7333 AC_MSG_CHECKING([which jfreereport libs to use])
7334 if test "$with_system_jfreereport" = "yes"; then
7335 SYSTEM_JFREEREPORT=YES
7336 AC_MSG_RESULT([external])
7337 if test -z $SAC_JAR; then
7338 SAC_JAR=/usr/share/java/sac.jar
7340 AC_CHECK_FILE($SAC_JAR, [],
7341 [AC_MSG_ERROR(sac.jar not found.)], [])
7343 if test -z $LIBXML_JAR; then
7344 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
7345 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
7347 AC_CHECK_FILE(/usr/share/java/libxml.jar,
7348 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
7349 [AC_MSG_ERROR(libxml.jar replacement not found.)]
7354 AC_CHECK_FILE($LIBXML_JAR, [],
7355 [AC_MSG_ERROR(libxml.jar not found.)], [])
7358 if test -z $FLUTE_JAR; then
7359 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
7360 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
7362 AC_CHECK_FILE(/usr/share/java/flute.jar,
7363 [ FLUTE_JAR=/usr/share/java/flute.jar ],
7364 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
7369 AC_CHECK_FILE($FLUTE_JAR, [],
7370 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
7373 if test -z $JFREEREPORT_JAR; then
7374 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
7375 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
7377 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
7378 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
7379 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
7384 AC_CHECK_FILE($JFREEREPORT_JAR, [],
7385 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
7388 if test -z $LIBLAYOUT_JAR; then
7389 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
7390 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
7392 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
7393 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
7394 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
7399 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
7400 [AC_MSG_ERROR(liblayout.jar not found.)], [])
7403 if test -z $LIBLOADER_JAR; then
7404 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
7405 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
7407 AC_CHECK_FILE(/usr/share/java/libloader.jar,
7408 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
7409 [AC_MSG_ERROR(libloader.jar replacement not found.)]
7414 AC_CHECK_FILE($LIBLOADER_JAR, [],
7415 [AC_MSG_ERROR(libloader.jar not found.)], [])
7418 if test -z $LIBFORMULA_JAR; then
7419 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
7420 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
7422 AC_CHECK_FILE(/usr/share/java/libformula.jar,
7423 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
7424 [AC_MSG_ERROR(libformula.jar replacement not found.)]
7429 AC_CHECK_FILE($LIBFORMULA_JAR, [],
7430 [AC_MSG_ERROR(libformula.jar not found.)], [])
7433 if test -z $LIBREPOSITORY_JAR; then
7434 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
7435 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
7437 AC_CHECK_FILE(/usr/share/java/librepository.jar,
7438 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
7439 [AC_MSG_ERROR(librepository.jar replacement not found.)]
7444 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
7445 [AC_MSG_ERROR(librepository.jar not found.)], [])
7448 if test -z $LIBFONTS_JAR; then
7449 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
7450 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
7452 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
7453 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
7454 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
7459 AC_CHECK_FILE($LIBFONTS_JAR, [],
7460 [AC_MSG_ERROR(libfonts.jar not found.)], [])
7463 if test -z $LIBSERIALIZER_JAR; then
7464 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
7465 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
7467 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
7468 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
7469 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
7474 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
7475 [AC_MSG_ERROR(libserializer.jar not found.)], [])
7479 if test -z $LIBBASE_JAR; then
7480 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
7481 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
7483 AC_CHECK_FILE(/usr/share/java/libbase.jar,
7484 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
7485 [AC_MSG_ERROR(libbase.jar replacement not found.)]
7490 AC_CHECK_FILE($LIBBASE_JAR, [],
7491 [AC_MSG_ERROR(libbase.jar not found.)], [])
7495 AC_MSG_RESULT([internal])
7496 AC_MSG_CHECKING([for jfreereport module])
7497 SYSTEM_JFREEREPORT=NO
7498 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
7500 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
7503 ENABLE_REPORTBUILDER=NO
7504 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN"
7505 SYSTEM_JFREEREPORT=NO
7507 AC_SUBST(ENABLE_REPORTBUILDER)
7508 AC_SUBST(SYSTEM_JFREEREPORT)
7510 AC_SUBST(LIBXML_JAR)
7512 AC_SUBST(JFREEREPORT_JAR)
7513 AC_SUBST(LIBBASE_JAR)
7514 AC_SUBST(LIBLAYOUT_JAR)
7515 AC_SUBST(LIBLOADER_JAR)
7516 AC_SUBST(LIBFORMULA_JAR)
7517 AC_SUBST(LIBREPOSITORY_JAR)
7518 AC_SUBST(LIBFONTS_JAR)
7519 AC_SUBST(LIBSERIALIZER_JAR)
7521 # this has to be here because both the Wiki Publisher and the SRB use
7523 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
7524 AC_MSG_CHECKING([which Apache commons-* libs to use])
7525 if test "$with_system_apache_commons" = "yes"; then
7526 SYSTEM_APACHE_COMMONS=YES
7527 AC_MSG_RESULT([external])
7528 if test "$ENABLE_MEDIAWIKI" = "YES"; then
7529 if test -z $COMMONS_CODEC_JAR; then
7530 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
7531 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
7533 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
7534 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
7535 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
7540 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
7541 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
7544 if test -z $COMMONS_LANG_JAR; then
7545 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
7546 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
7548 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
7549 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
7550 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
7555 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
7556 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
7559 if test -z $COMMONS_HTTPCLIENT_JAR; then
7560 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
7561 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
7563 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
7564 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
7565 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
7570 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
7571 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
7574 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
7575 if test -z $COMMONS_LOGGING_JAR; then
7576 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
7577 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
7579 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
7580 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
7581 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
7586 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
7587 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
7591 AC_MSG_RESULT([internal])
7592 SYSTEM_APACHE_COMMONS=NO
7593 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
7596 AC_SUBST(SYSTEM_APACHE_COMMONS)
7597 AC_SUBST(COMMONS_CODEC_JAR)
7598 AC_SUBST(COMMONS_LANG_JAR)
7599 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
7600 AC_SUBST(COMMONS_LOGGING_JAR)
7602 # scripting provider for BeanShell extension?
7603 AC_MSG_CHECKING([whether to build extension for support of scripts in BeanShell])
7604 if test "x$enable_ext_scripting_beanshell" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
7605 AC_MSG_RESULT([yes])
7606 ENABLE_SCRIPTING_BEANSHELL=YES
7609 ENABLE_SCRIPTING_BEANSHELL=NO
7610 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_BEANSHELL"
7612 AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
7614 # scripting provider for JavaScript extension?
7615 AC_MSG_CHECKING([whether to build extension for support of scripts in JavaScript])
7616 if test "x$enable_ext_scripting_javascript" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
7617 AC_MSG_RESULT([yes])
7618 ENABLE_SCRIPTING_JAVASCRIPT=YES
7621 ENABLE_SCRIPTING_JAVASCRIPT=NO
7622 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_JAVASCRIPT"
7624 AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
7626 dnl Scripting provider for Python extension?
7627 dnl We always provide this unless we have disabled Python completely
7628 if test $enable_python = no; then
7629 ENABLE_SCRIPTING_PYTHON=NO
7631 ENABLE_SCRIPTING_PYTHON=YES
7633 AC_SUBST(ENABLE_SCRIPTING_PYTHON)
7637 x86_64 | powerpc64 | s390x)
7638 if test "$SIZEOF_LONG" = "8"; then
7639 supports_multilib="yes"
7646 dnl ===================================================================
7647 dnl Check whether the Qt3 and KDE3 libraries are available.
7648 dnl ===================================================================
7652 if test "$_os" != "OpenBSD"; then
7655 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
7656 dnl Search paths for Qt3 and KDE3
7657 if test -z "$supports_multilib" ; then
7658 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"
7659 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"
7661 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"
7662 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"
7664 if test -n "$QTDIR" ; then
7665 qt_incdirs="$QTDIR/include $qt_incdirs"
7666 if test -z "$supports_multilib" ; then
7667 qt_libdirs="$QTDIR/lib $qt_libdirs"
7669 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
7672 if test -z "$supports_multilib" ; then
7673 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"
7674 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"
7676 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"
7677 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"
7679 if test -n "$KDEDIR" ; then
7680 kde_incdirs="$KDEDIR/include $kde_incdirs"
7681 if test -z "$supports_multilib" ; then
7682 kde_libdirs="$KDEDIR/lib $kde_libdirs"
7684 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
7689 qt_test_include="qstyle.h"
7690 kde_test_include="kapp.h"
7692 if test "$_os" != "OpenBSD"; then
7693 qt_test_library="libqt-mt.so"
7694 kde_test_library="libDCOP.so"
7696 qt_test_library="libqt-mt.so*"
7697 kde_test_library="libDCOP.so*"
7700 dnl Check for Qt3 headers
7701 AC_MSG_CHECKING([for Qt3 headers])
7703 for kde_check in $qt_incdirs ; do
7704 if test -r "$kde_check/$qt_test_include" ; then
7705 qt_incdir="$kde_check"
7709 AC_MSG_RESULT([$qt_incdir])
7710 if test "x$qt_incdir" = "xno" ; then
7711 AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
7712 your Qt3 installation by exporting QTDIR before running "configure".])
7715 dnl Check for Qt3 libraries
7716 AC_MSG_CHECKING([for Qt3 libraries])
7718 for qt_check in $qt_libdirs ; do
7719 if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`" ; then
7720 qt_libdir="$qt_check"
7724 AC_MSG_RESULT([$qt_libdir])
7725 if test "x$qt_libdir" = "xno" ; then
7726 AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
7727 your Qt3 installation by exporting QTDIR before running "configure".])
7730 dnl Check for Meta Object Compiler
7731 AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
7732 if test "$MOC" = "no" ; then
7733 AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
7734 the root of your Qt3 installation by exporting QTDIR before running "configure".])
7737 dnl Check for KDE3 headers
7738 AC_MSG_CHECKING([for KDE3 headers])
7740 for kde_check in $kde_incdirs ; do
7741 if test -r "$kde_check/$kde_test_include" ; then
7742 kde_incdir="$kde_check"
7746 AC_MSG_RESULT([$kde_incdir])
7747 if test "x$kde_incdir" = "xno" ; then
7748 AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
7749 your KDE3 installation by exporting KDEDIR before running "configure".])
7752 dnl Check for KDE3 libraries
7753 AC_MSG_CHECKING([for KDE3 libraries])
7755 for kde_check in $kde_libdirs ; do
7756 if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`" ; then
7757 kde_libdir="$kde_check"
7761 AC_MSG_RESULT([$kde_libdir])
7762 if test "x$kde_libdir" = "xno" ; then
7763 AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
7764 your KDE3 installation by exporting KDEDIR before running "configure".])
7767 dnl Set the variables
7768 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
7769 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
7771 AC_SUBST(KDE_CFLAGS)
7775 dnl ===================================================================
7776 dnl KDE4 Integration
7777 dnl ===================================================================
7785 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
7786 qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
7787 qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
7789 kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
7790 kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
7792 if test -n "$supports_multilib" ; then
7793 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
7794 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
7797 if test -n "$QTDIR" ; then
7798 qt_incdirs="$QTDIR/include $qt_incdirs"
7799 if test -z "$supports_multilib" ; then
7800 qt_libdirs="$QTDIR/lib $qt_libdirs"
7802 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
7805 if test -n "$QT4DIR" ; then
7806 qt_incdirs="$QT4DIR/include $qt_incdirs"
7807 if test -z "$supports_multilib" ; then
7808 qt_libdirs="$QT4DIR/lib $qt_libdirs"
7810 qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
7814 if test -n "$KDEDIR" ; then
7815 kde_incdirs="$KDEDIR/include $kde_incdirs"
7816 if test -z "$supports_multilib" ; then
7817 kde_libdirs="$KDEDIR/lib $kde_libdirs"
7819 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
7822 if test -n "$KDE4DIR" ; then
7823 kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
7824 if test -z "$supports_multilib" ; then
7825 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
7827 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
7831 qt_test_include="Qt/qobject.h"
7832 qt_test_library="libQtCore.so"
7833 kde_test_include="kwindowsystem.h"
7834 kde_test_library="libsolid.so"
7836 AC_MSG_CHECKING([for Qt4 headers])
7838 for inc_dir in $qt_incdirs ; do
7839 if test -r "$inc_dir/$qt_test_include" ; then
7840 qt_header_dir="$inc_dir"
7845 AC_MSG_RESULT([$qt_header_dir])
7846 if test "x$qt_header_dir" = "xno" ; then
7847 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
7850 AC_MSG_CHECKING([for Qt4 libraries])
7852 for lib_dir in $qt_libdirs ; do
7853 if test -r "$lib_dir/$qt_test_library" ; then
7854 qt_lib_dir="$lib_dir"
7855 PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
7860 AC_MSG_RESULT([$qt_lib_dir])
7862 if test "x$qt_lib_dir" = "xno" ; then
7863 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
7866 dnl Check for Meta Object Compiler
7868 AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7870 if test "$MOC4" = "no" ; then
7871 AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7872 if test "$MOC4" = "no" ; then
7873 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
7874 the root of your Qt installation by exporting QT4DIR before running "configure".])
7878 dnl Check for KDE4 headers
7879 AC_MSG_CHECKING([for KDE4 headers])
7881 for kde_check in $kde_incdirs ; do
7882 if test -r "$kde_check/$kde_test_include" ; then
7883 kde_incdir="$kde_check"
7887 AC_MSG_RESULT([$kde_incdir])
7888 if test "x$kde_incdir" = "xno" ; then
7889 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
7892 dnl Check for KDE4 libraries
7893 AC_MSG_CHECKING([for KDE4 libraries])
7895 for kde_check in $kde_libdirs ; do
7896 if test -r "$kde_check/$kde_test_library" ; then
7897 kde_libdir="$kde_check"
7902 AC_MSG_RESULT([$kde_libdir])
7903 if test "x$kde_libdir" = "xno" ; then
7904 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
7907 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
7908 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
7911 save_CXXFLAGS=$CXXFLAGS
7912 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
7913 AC_MSG_CHECKING([whether KDE is >= 4.2])
7914 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7915 #include <kdeversion.h>
7917 int main(int argc, char **argv) {
7918 if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
7921 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
7922 CXXFLAGS=$save_CXXFLAGS
7925 # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled
7926 PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
7928 AC_MSG_WARN([[No Glib found, KDE4 support will not integrate with Qt's Glib event loop support]]))
7930 AC_SUBST(KDE4_CFLAGS)
7933 AC_SUBST(KDE_GLIB_CFLAGS)
7934 AC_SUBST(KDE_GLIB_LIBS)
7935 AC_SUBST(KDE_HAVE_GLIB)
7937 dnl ===================================================================
7938 dnl Test for the enabling the lockdown pieces
7939 dnl ===================================================================
7940 AC_MSG_CHECKING([whether to enable the lockdown pieces])
7942 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
7944 AC_MSG_RESULT([yes])
7948 AC_SUBST(ENABLE_LOCKDOWN)
7950 dnl ===================================================================
7951 dnl Test whether to include Evolution 2 support
7952 dnl ===================================================================
7953 AC_MSG_CHECKING([whether to enable evolution 2 support])
7954 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
7955 AC_MSG_RESULT([yes])
7956 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
7957 ENABLE_EVOAB2="TRUE"
7962 AC_SUBST(ENABLE_EVOAB2)
7963 AC_SUBST(GOBJECT_CFLAGS)
7964 AC_SUBST(GOBJECT_LIBS)
7966 dnl ===================================================================
7967 dnl Test whether to include KDE AB support
7968 dnl ===================================================================
7969 AC_MSG_CHECKING([whether to enable KDE address book support])
7970 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
7971 AC_MSG_RESULT([yes])
7973 save_CXXFLAGS=$CXXFLAGS
7974 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
7975 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
7976 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7977 #include <kdeversion.h>
7979 int main(int argc, char **argv) {
7980 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
7983 ]])],[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])],[])
7984 CXXFLAGS=$save_CXXFLAGS
7991 AC_SUBST(ENABLE_KAB)
7993 dnl ===================================================================
7994 dnl Test whether to include MathMLDTD
7995 dnl ===================================================================
7996 AC_MSG_CHECKING([whether to include MathMLDTD])
7997 if test -n "$enable_mathmldtd"; then
7998 if test "$enable_mathmldtd" = "no"; then
8000 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
8002 AC_MSG_RESULT([yes])
8003 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
8007 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
8010 dnl ===================================================================
8011 dnl Test which themes to include
8012 dnl ===================================================================
8013 AC_MSG_CHECKING([which themes to include])
8014 # if none given, use all available themes
8015 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
8016 with_theme="default crystal hicontrast oxygen tango"
8020 for theme in $with_theme; do
8022 default|crystal|hicontrast|oxygen|tango|human) : ;;
8023 *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
8025 WITH_THEMES="$WITH_THEMES $theme"
8026 SCPDEFS="$SCPDEFS -DTHEME_`echo $theme|tr '[[:lower:]]' '[[:upper:]]'`"
8028 AC_MSG_RESULT([$WITH_THEMES])
8029 AC_SUBST([WITH_THEMES])
8031 dnl ===================================================================
8032 dnl Test whether to integrate helppacks into the product's installer
8033 dnl ===================================================================
8034 AC_MSG_CHECKING([for helppack integration])
8035 if test "z$with_helppack_integration" = "zno" ; then
8036 WITH_HELPPACK_INTEGRATION=NO
8037 AC_MSG_RESULT([no integration])
8039 WITH_HELPPACK_INTEGRATION=YES
8040 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
8041 AC_MSG_RESULT([integration])
8043 AC_SUBST(WITH_HELPPACK_INTEGRATION)
8045 ###############################################################################
8046 # Extensions checking
8047 ###############################################################################
8048 dnl ===================================================================
8049 dnl Test whether to integrate extensions into the product's installer
8050 dnl ===================================================================
8051 AC_MSG_CHECKING([for extensions integration])
8052 if test "x$enable_extension_integration" != "xno"; then
8053 WITH_EXTENSION_INTEGRATION=YES
8054 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
8055 AC_MSG_RESULT([yes, use integration])
8057 WITH_EXTENSION_INTEGRATION=NO
8058 AC_MSG_RESULT([no, do not integrate])
8060 AC_SUBST(WITH_EXTENSION_INTEGRATION)
8062 dnl ===================================================================
8063 dnl Test whether to include Watch Window extension
8064 dnl ===================================================================
8065 AC_MSG_CHECKING([for Watch Window extension integration])
8066 WATCH_WINDOW_EXTENSION_PACK=
8067 if test "x$enable_ext_watch_window" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8068 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_WATCH_WINDOW"
8069 WATCH_WINDOW_EXTENSION_PACK="23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt"
8070 AC_MSG_RESULT([yes])
8074 AC_SUBST(WATCH_WINDOW_EXTENSION_PACK)
8076 dnl ===================================================================
8077 dnl Test whether to include SmART Gallery (Diagram) extension
8078 dnl ===================================================================
8079 AC_MSG_CHECKING([for SmART Gallery (Diagram) extension integration])
8080 DIAGRAM_EXTENSION_PACK=
8081 if test "x$enable_ext_diagram" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8082 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_DIAGRAM"
8083 DIAGRAM_EXTENSION_PACK="8d74685d41f8bffe8c3e71fe8deac09d-SmART_0.9.5.oxt"
8084 AC_MSG_RESULT([yes])
8088 AC_SUBST(DIAGRAM_EXTENSION_PACK)
8090 dnl ===================================================================
8091 dnl Test whether to include Validator extension
8092 dnl ===================================================================
8093 AC_MSG_CHECKING([for Validator extension integration])
8094 VALIDATOR_EXTENSION_PACK=
8095 if test "x$enable_ext_validator" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8096 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_VALIDATOR"
8097 VALIDATOR_EXTENSION_PACK="bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt"
8098 AC_MSG_RESULT([yes])
8102 AC_SUBST(VALIDATOR_EXTENSION_PACK)
8104 dnl ===================================================================
8105 dnl Test whether to include Barcode extension
8106 dnl ===================================================================
8107 AC_MSG_CHECKING([for Barcode extension integration])
8108 BARCODE_EXTENSION_PACK=
8109 if test "x$enable_ext_barcode" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8110 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_BARCODE"
8111 BARCODE_EXTENSION_PACK="7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt"
8112 AC_MSG_RESULT([yes])
8116 AC_SUBST([BARCODE_EXTENSION_PACK])
8118 dnl ===================================================================
8119 dnl Test whether to include ConvertTextToNumber extension
8120 dnl ===================================================================
8121 AC_MSG_CHECKING([for ConvertTextToNumber extension integration])
8122 CT2N_EXTENSION_PACK=
8123 if test "x$enable_ext_ct2n" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8124 BUILD_TYPE="$BUILD_TYPE CT2N"
8125 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N"
8126 CT2N_EXTENSION_PACK="451ccf439a36a568653b024534669971-ConvertTextToNumber_1.3.2.oxt"
8127 AC_MSG_RESULT([yes])
8131 AC_SUBST(CT2N_EXTENSION_PACK)
8133 dnl ===================================================================
8134 dnl Test whether to include Numbertext extension
8135 dnl ===================================================================
8136 AC_MSG_CHECKING([for Numbertext extension integration])
8137 NUMBERTEXT_EXTENSION_PACK=
8138 if test "x$enable_ext_numbertext" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8139 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NUMBERTEXT"
8140 NUMBERTEXT_EXTENSION_PACK="b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt"
8141 AC_MSG_RESULT([yes])
8145 AC_SUBST(NUMBERTEXT_EXTENSION_PACK)
8147 dnl ===================================================================
8148 dnl Test whether to include Hungarian Cross-reference Toolbar extension
8149 dnl ===================================================================
8150 AC_MSG_CHECKING([for Hungarian Cross-reference Toolbar extension integration])
8151 HUNART_EXTENSION_PACK=
8152 if test "x$enable_ext_hunart" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8153 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_HUNART"
8154 HUNART_EXTENSION_PACK="b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt"
8155 AC_MSG_RESULT([yes])
8159 AC_SUBST(HUNART_EXTENSION_PACK)
8161 dnl ===================================================================
8162 dnl Test whether to include Typography Toolbar extension
8163 dnl ===================================================================
8164 AC_MSG_CHECKING([for Typography Toolbar extension integration])
8165 TYPO_EXTENSION_PACK=
8166 if test "x$enable_ext_typo" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8167 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_TYPO"
8168 TYPO_EXTENSION_PACK="9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt"
8169 AC_MSG_RESULT([yes])
8173 AC_SUBST(TYPO_EXTENSION_PACK)
8175 dnl ===================================================================
8176 dnl Test whether to include Google Docs extension
8177 dnl ===================================================================
8178 AC_MSG_CHECKING([for Google Docs extension integration])
8179 GOOGLE_DOCS_EXTENSION_PACK=
8180 if test "x$enable_ext_google_docs" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8181 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_GOOGLE_DOCS"
8182 GOOGLE_DOCS_EXTENSION_PACK="cea0f63d5985ba4fcbd882031df44346-gdocs_3.0.0_modified.oxt"
8183 AC_MSG_RESULT([yes])
8187 AC_SUBST(GOOGLE_DOCS_EXTENSION_PACK)
8189 dnl ===================================================================
8190 dnl Test whether to include NLPSolver extension
8191 dnl ===================================================================
8192 AC_MSG_CHECKING([for NLPSolver extension integration])
8193 if test "x$enable_ext_nlpsolver" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
8194 BUILD_TYPE="$BUILD_TYPE NLPSOLVER"
8195 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER"
8196 AC_MSG_RESULT([yes])
8201 dnl ===================================================================
8202 dnl Test whether to include LanguageTool extension
8203 dnl ===================================================================
8204 AC_MSG_CHECKING([for LanguageTool extension integration])
8205 if test "x$enable_ext_languagetool" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8206 BUILD_TYPE="$BUILD_TYPE LANGUAGETOOL"
8207 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL"
8208 AC_MSG_RESULT([yes])
8213 dnl ===================================================================
8214 dnl Test whether to include oooblogger extension
8215 dnl ===================================================================
8216 AC_MSG_CHECKING([for oooblogger extension integration])
8217 OOOBLOGGER_EXTENSION_PACK=
8218 if test "x$enable_ext_oooblogger" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8219 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_OOOBLOGGER"
8220 OOOBLOGGER_EXTENSION_PACK="b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt"
8221 AC_MSG_RESULT([yes])
8225 AC_SUBST(OOOBLOGGER_EXTENSION_PACK)
8226 ###############################################################################
8228 dnl ===================================================================
8229 dnl Test whether to include Sun Professional Template Pack
8230 dnl ===================================================================
8231 AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
8232 if test "z$with_sun_templates" = "z" -o "z$with_sun_templates" = "zno" ; then
8233 SUNTEMPLATES_LANG=""
8234 AC_MSG_RESULT([no integration])
8236 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
8237 sun_supported_langs="en-US de it fr es hu"
8238 if test "z$with_sun_templates" = "zyes" ; then
8239 wanted_sun_templates="$sun_supported_langs"
8241 # check whether the langs are supported by Sun
8242 wanted_sun_templates=
8243 for lang in $with_sun_templates ; do
8244 if test -n "`echo $sun_supported_langs | grep "$lang"`" ; then
8245 wanted_sun_templates="$wanted_sun_templates $lang"
8250 SUNTEMPLATES_DE_PACK=
8251 SUNTEMPLATES_EN_US_PACK=
8252 SUNTEMPLATES_ES_PACK=
8253 SUNTEMPLATES_FR_PACK=
8254 SUNTEMPLATES_HU_PACK=
8255 SUNTEMPLATES_IT_PACK=
8256 # check whether the langs are requested at all
8257 for lang in $wanted_sun_templates ; do
8258 if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then
8259 SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
8261 "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
8262 "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
8263 "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
8264 "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
8265 "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
8266 "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
8270 AC_MSG_RESULT([$SUNTEMPLATES_LANG])
8272 AC_SUBST(SUNTEMPLATES_LANG)
8273 AC_SUBST(SUNTEMPLATES_DE_PACK)
8274 AC_SUBST(SUNTEMPLATES_EN_US_PACK)
8275 AC_SUBST(SUNTEMPLATES_ES_PACK)
8276 AC_SUBST(SUNTEMPLATES_FR_PACK)
8277 AC_SUBST(SUNTEMPLATES_HU_PACK)
8278 AC_SUBST(SUNTEMPLATES_IT_PACK)
8280 dnl ===================================================================
8281 dnl Test whether to include fonts
8282 dnl ===================================================================
8283 AC_MSG_CHECKING([whether to include third-party fonts])
8284 if test "$with_fonts" != "no" ; then
8285 AC_MSG_RESULT([yes])
8287 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
8291 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
8293 AC_SUBST(WITH_FONTS)
8295 AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
8296 if test "$with_agfa_monotype_fonts" = "yes" ; then
8297 AC_MSG_RESULT([yes])
8298 WITH_AGFA_MONOTYPE_FONTS=YES
8299 SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
8300 BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
8303 WITH_AGFA_MONOTYPE_FONTS=NO
8305 AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
8307 dnl ===================================================================
8308 dnl Test whether to include ppds
8309 dnl ===================================================================
8310 AC_MSG_CHECKING([whether to include PPDs])
8311 if test "$with_ppds" != "no"; then
8312 AC_MSG_RESULT([yes])
8316 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
8318 AC_SUBST(WITHOUT_PPDS)
8320 dnl ===================================================================
8321 dnl Test whether to include afms
8322 dnl ===================================================================
8323 AC_MSG_CHECKING([whether to include AFMs])
8324 if test "$with_afms" != "no"; then
8325 AC_MSG_RESULT([yes])
8326 BUILD_TYPE="$BUILD_TYPE AFMS"
8330 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
8332 AC_SUBST(WITHOUT_AFMS)
8334 dnl ===================================================================
8335 dnl Test whether to include extra galleries
8336 dnl ===================================================================
8337 AC_MSG_CHECKING([whether to include extra galleries])
8338 if test "z$enable_extra_gallery" = "z" -o "z$enable_extra_gallery" = "zno" ; then
8340 WITH_EXTRA_GALLERY=NO
8341 OOOP_GALLERY_PACK=""
8343 AC_MSG_RESULT([yes])
8344 WITH_EXTRA_GALLERY=YES
8345 BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
8346 SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
8347 OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
8349 AC_SUBST(WITH_EXTRA_GALLERY)
8350 AC_SUBST(OOOP_GALLERY_PACK)
8352 dnl ===================================================================
8353 dnl Test whether to include extra templates
8354 dnl ===================================================================
8355 AC_MSG_CHECKING([whether to include extra templates])
8356 if test "z$enable_extra_template" = "z" -o "z$enable_extra_template" = "zno" ; then
8358 WITH_EXTRA_TEMPLATE=NO
8359 OOOP_TEMPLATES_PACK=""
8361 AC_MSG_RESULT([yes])
8362 WITH_EXTRA_TEMPLATE=YES
8363 BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
8364 SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
8365 OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
8367 AC_SUBST(WITH_EXTRA_TEMPLATE)
8368 AC_SUBST(OOOP_TEMPLATES_PACK)
8370 dnl ===================================================================
8371 dnl Test whether to include extra samples
8372 dnl ===================================================================
8373 AC_MSG_CHECKING([whether to include extra samples])
8374 if test "z$enable_extra_sample" = "z" -o "z$enable_extra_sample" = "zno" ; then
8376 WITH_EXTRA_SAMPLE=NO
8377 OOOP_SAMPLES_PACK=""
8379 AC_MSG_RESULT([yes])
8380 WITH_EXTRA_SAMPLE=YES
8381 BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
8382 SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
8383 OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
8385 AC_SUBST(WITH_EXTRA_SAMPLE)
8386 AC_SUBST(OOOP_SAMPLES_PACK)
8388 dnl ===================================================================
8389 dnl Test whether to include extra fonts
8390 dnl ===================================================================
8391 AC_MSG_CHECKING([whether to include extra fonts])
8392 if test "z$enable_extra_font" = "z" -o "z$enable_extra_font" = "zno" ; then
8397 AC_MSG_RESULT([yes])
8399 BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
8400 SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
8401 OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
8403 AC_SUBST(WITH_EXTRA_FONT)
8404 AC_SUBST(OOOP_FONTS_PACK)
8406 dnl ===================================================================
8407 dnl Test whether to download OxygenOffice branding and set custom settings
8408 dnl ===================================================================
8409 AC_MSG_CHECKING([whether to download OxygenOffice branding and set custom settings])
8410 if test "z$enable_oxygenoffice" = "z" -o "z$enable_oxygenoffice" = "zno" ; then
8412 ENABLE_OXYGENOFFICE=NO
8414 AC_MSG_RESULT([yes])
8415 ENABLE_OXYGENOFFICE=YES
8416 OXYGENOFFICE_PACK="18bf204479ff641d99a88cd71f6f25f7-oxygenoffice-001.zip"
8417 BUILD_TYPE="$BUILD_TYPE OXYGENOFFICE"
8419 AC_SUBST(ENABLE_OXYGENOFFICE)
8420 AC_SUBST(OXYGENOFFICE_PACK)
8422 dnl ===================================================================
8423 dnl Test whether to build global menu support
8424 dnl ===================================================================
8425 AC_MSG_CHECKING([whether to build global menu support])
8426 if test "z$enable_lomenubar" = "z" -o "z$enable_lomenubar" = "zno" ; then
8428 ENABLE_LOMENUBAR="FALSE"
8430 AC_MSG_RESULT([yes])
8431 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]))
8432 ENABLE_LOMENUBAR="TRUE"
8434 AC_SUBST(ENABLE_LOMENUBAR)
8436 dnl ===================================================================
8437 dnl Test whether to enable online update service
8438 dnl ===================================================================
8439 AC_MSG_CHECKING([whether to enable online update])
8440 ENABLE_ONLINE_UPDATE=
8441 if test "z$enable_online_update" = "z" ; then
8442 if test "$_os" = "WINNT" -o "$_os" = "Darwin" ; then
8443 AC_MSG_RESULT([yes])
8444 ENABLE_ONLINE_UPDATE="TRUE"
8449 if test "z$enable_online_update" = "zyes" ; then
8450 AC_MSG_RESULT([yes])
8451 ENABLE_ONLINE_UPDATE="TRUE"
8456 AC_SUBST(ENABLE_ONLINE_UPDATE)
8458 dnl ===================================================================
8459 dnl Test whether build target is Release Build
8460 dnl ===================================================================
8461 AC_MSG_CHECKING([whether build target is Release Build])
8462 if test "z$enable_release_build" = "z" -o "z$enable_release_build" = "zno" ; then
8464 ENABLE_RELEASE_BUILD="FALSE"
8466 AC_MSG_RESULT([yes])
8467 ENABLE_RELEASE_BUILD="TRUE"
8469 AC_SUBST(ENABLE_RELEASE_BUILD)
8471 dnl ===================================================================
8472 dnl Test whether to create MSI with LIMITUI=1 (silent install)
8473 dnl ===================================================================
8474 AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
8475 if test "z$enable_silent_msi" = "z" -o "z$enable_silent_msi" = "zno" ; then
8477 ENABLE_SILENT_MSI="FALSE"
8479 AC_MSG_RESULT([yes])
8480 ENABLE_SILENT_MSI="TRUE"
8481 SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
8483 AC_SUBST(ENABLE_SILENT_MSI)
8485 dnl ===================================================================
8486 dnl Test whether to enable ActiveX embedding
8487 dnl ===================================================================
8488 if test "$_os" = "WINNT"; then
8489 AC_MSG_CHECKING([whether to enable ActiveX embedding of LibreOffice components])
8490 if test "$enable_activex_component" = "yes" -o "$enable_activex_component" = "TRUE" -o "$enable_activex_component" = ""; then
8491 ENABLE_ACTIVEX_COMPONENT="TRUE"
8492 AC_MSG_RESULT([yes])
8493 SCPDEFS="$SCPDEFS -DWITH_ACTIVEX_COMPONENT"
8495 ENABLE_ACTIVEX_COMPONENT=""
8498 AC_SUBST(ENABLE_ACTIVEX_COMPONENT)
8502 AC_MSG_CHECKING([whether and how to use Xinerama])
8503 if test "$_os" = "Darwin"; then
8505 XINERAMA_LINK=dynamic
8506 AC_MSG_RESULT([yes])
8507 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
8508 if test "$x_libraries" = "default_x_libraries"; then
8509 XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
8510 if test "x$XINERAMALIB" = x; then
8511 XINERAMALIB="/usr/lib"
8514 XINERAMALIB="$x_libraries"
8516 if test -e "$XINERAMALIB/libXinerama.so" -a -e "$XINERAMALIB/libXinerama.a"; then
8517 # we have both versions, let the user decide but use the dynamic one
8520 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
8521 XINERAMA_LINK=dynamic
8523 XINERAMA_LINK=static
8525 elif test -e "$XINERAMALIB/libXinerama.so" -a ! -e "$XINERAMALIB/libXinerama.a"; then
8526 # we have only the dynamic version
8528 XINERAMA_LINK=dynamic
8529 elif test -e "$XINERAMALIB/libXinerama.a"; then
8531 if echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
8533 XINERAMA_LINK=static
8543 if test "$USE_XINERAMA" = "YES"; then
8544 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
8545 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
8546 [AC_MSG_ERROR(Xinerama header not found.)], [])
8547 XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
8548 if test "x$XEXTLIB" = x; then
8549 XEXTLIBS="-L$XLIB -L$XINERAMALIB -lXext"
8551 XINERAMA_EXTRA_LIBS="$XEXTLIBS"
8552 if test "$_os" = "FreeBSD"; then
8553 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
8555 if test "$_os" = "Linux"; then
8556 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
8558 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
8559 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
8561 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
8568 AC_SUBST(USE_XINERAMA)
8569 AC_SUBST(XINERAMA_LINK)
8571 dnl ===================================================================
8572 dnl Checks for librsvg
8573 dnl ===================================================================
8575 dnl ENABLE_LIBRSVG is set to "" (for NO), SYSTEM or INTERNAL. The
8576 dnl SYSTEM_LIBRSVG, SYSTEM_GDKPIXBUF etc are redundant.
8582 AC_MSG_CHECKING([what librsvg to use])
8584 case "$enable_librsvg" in
8586 AC_MSG_RESULT([none])
8591 if test $build_os = cygwin -o \
8593 dnl When building on/for these OSes always use the internal one,
8594 dnl if at all. Add more OSes above as needed.
8595 AC_MSG_RESULT([internal])
8596 enable_librsvg=internal
8597 elif test $_os = iOS -o $_os = Android; then
8598 AC_MSG_RESULT([none])
8601 if test "$with_system_libs" = yes; then
8602 AC_MSG_RESULT([system])
8603 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
8604 enable_librsvg=system
8605 elif test "$with_system_libs" = no; then
8606 AC_MSG_RESULT([internal])
8607 enable_librsvg=internal
8609 AC_MSG_RESULT([checking further])
8610 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14,, [:])
8611 if test -z "$LIBRSVG_PKG_ERRORS"; then
8612 enable_librsvg=system
8614 enable_librsvg=internal
8621 AC_MSG_RESULT([internal])
8625 if test $_os = WINNT -a "$WITH_MINGW" != yes; then
8626 AC_MSG_ERROR([Must use internal librsvg when building with MSVC])
8628 AC_MSG_RESULT([system])
8629 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
8633 AC_MSG_ERROR([Incorrect --enable-librsvg option])
8637 dnl By now enable_librsvg should be "system", "internal" or "no"
8638 case $enable_librsvg in
8640 ENABLE_LIBRSVG=SYSTEM
8645 ENABLE_LIBRSVG=INTERNAL
8647 BUILD_TYPE="$BUILD_TYPE LIBRSVG"
8656 AC_MSG_ERROR([Internal configure script error, invalid enable_librsvg value "$enable_librsvg"])
8660 AC_SUBST(ENABLE_LIBRSVG)
8661 AC_SUBST(LIBRSVG_CFLAGS)
8662 AC_SUBST(LIBRSVG_LIBS)
8663 AC_SUBST(SYSTEM_LIBRSVG)
8665 dnl ===================================================================
8666 dnl Test whether to build cairo or rely on the system version
8667 dnl ===================================================================
8672 AC_MSG_CHECKING([whether to use the system cairo])
8674 if test "$with_system_cairo" = "yes"; then
8676 AC_MSG_RESULT([yes])
8678 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
8680 if test "$test_xrender" = "yes"; then
8681 if test "$with_system_xextensions_headers" != "no"; then
8682 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
8684 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
8685 #ifdef PictStandardA8
8689 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
8694 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libfontconfig-1.dll libfreetype-6.dll libpixman-1-0.dll libpng15-15.dll libcairo-2.dll"
8698 if test $_os = Android; then
8699 dnl For Android cairo isn't
8702 elif test $_os = WINNT; then
8703 dnl We only need cairo for Windows if we
8704 dnl build librsvg or directx disabled
8705 if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
8706 BUILD_TYPE="$BUILD_TYPE CAIRO"
8709 BUILD_TYPE="$BUILD_TYPE CAIRO"
8713 AC_SUBST(SYSTEM_CAIRO)
8714 AC_SUBST(CAIRO_CFLAGS)
8715 AC_SUBST(CAIRO_LIBS)
8718 dnl ===================================================================
8719 dnl Test whether to build gdk-pixbuf or rely on the system version
8720 dnl ===================================================================
8722 AC_MSG_CHECKING([whether to use the system gdk-pixbuf])
8724 dnl As long as the only thing we need gdk-pixbuf for is below
8725 dnl librsvg, use the same --enable-librsvg (possibly implied
8726 dnl by --with-system-libs) to override this.
8728 if test "$SYSTEM_LIBRSVG" = YES; then
8729 SYSTEM_GDKPIXBUF=YES
8730 AC_MSG_RESULT([yes])
8733 WINNT|Darwin|iOS|Android)
8738 SYSTEM_GDKPIXBUF=YES
8739 AC_MSG_RESULT([yes])
8743 AC_SUBST(SYSTEM_GDKPIXBUF)
8745 dnl ===================================================================
8746 dnl Test whether to build GLib or rely on the system version
8747 dnl ===================================================================
8749 AC_MSG_CHECKING([whether to use the system GLib])
8751 dnl As long as the only thing we need GLib for is below
8752 dnl librsvg, use the same --enable-librsvg (possibly implied
8753 dnl by --with-system-libs) to override this.
8755 if test "$SYSTEM_LIBRSVG" = YES; then
8757 AC_MSG_RESULT([yes])
8760 WINNT|Darwin|iOS|Android)
8766 AC_MSG_RESULT([yes])
8770 AC_SUBST(SYSTEM_GLIB)
8772 dnl ===================================================================
8773 dnl Test whether to build gettext runtime (libintl) or rely on the
8775 dnl ===================================================================
8777 AC_MSG_CHECKING([whether to use the system gettext runtime])
8779 if test "$with_system_gettext" = yes; then
8781 AC_MSG_RESULT([yes])
8784 WINNT|Darwin|iOS|Android)
8790 AC_MSG_RESULT([yes])
8794 AC_SUBST(SYSTEM_GETTEXT)
8796 dnl ===================================================================
8797 dnl Test whether to build libcroco or rely on the system version
8798 dnl ===================================================================
8800 AC_MSG_CHECKING([whether to use the system libcroco])
8802 dnl As long as the only thing we need libcroco for is below
8803 dnl librsvg, use the same --enable-librsvg (possibly implied
8804 dnl by --with-system-libs) to override this.
8806 if test "$SYSTEM_LIBRSVG" = YES; then
8808 AC_MSG_RESULT([yes])
8811 WINNT|Darwin|iOS|Android)
8817 AC_MSG_RESULT([yes])
8821 AC_SUBST(SYSTEM_LIBCROCO)
8823 dnl ===================================================================
8824 dnl Test whether to build Pango or rely on the system version
8825 dnl ===================================================================
8827 AC_MSG_CHECKING([whether to use the system pango])
8829 dnl As long as the only thing we need Pango for is below
8830 dnl librsvg, use the same --enable-librsvg (possibly implied
8831 dnl by --with-system-libs) to override this.
8833 if test "$SYSTEM_LIBRSVG" = YES; then
8835 AC_MSG_RESULT([yes])
8838 WINNT|Darwin|iOS|Android)
8844 AC_MSG_RESULT([yes])
8848 AC_SUBST(SYSTEM_PANGO)
8850 dnl ===================================================================
8851 dnl Test whether to build libgsf or rely on the system version
8852 dnl ===================================================================
8854 AC_MSG_CHECKING([whether to use the system libgsf])
8856 dnl As long as the only thing we need libgsf for is below librsvg (is
8857 dnl it?), use the same --enable-librsvg (possibly implied by
8858 dnl --with-system-libs) to override this.
8860 if test "$SYSTEM_LIBRSVG" = YES; then
8862 AC_MSG_RESULT([yes])
8865 WINNT|Darwin|iOS|Android)
8871 AC_MSG_RESULT([yes])
8875 AC_SUBST(SYSTEM_LIBGSF)
8877 dnl ===================================================================
8878 dnl Test whether to build libpng or rely on the system version
8879 dnl ===================================================================
8881 AC_MSG_CHECKING([whether to use the system libpng])
8883 dnl How should and does this interact with the checks for libpng
8884 dnl related to use of libpng in the quickstarter above? This needs to
8887 if test "$with_system_libpng" = yes; then
8889 AC_MSG_RESULT([yes])
8892 WINNT|Darwin|iOS|Android)
8902 AC_SUBST(SYSTEM_LIBPNG)
8904 dnl ===================================================================
8905 dnl Test whether to build libjpeg or rely on the system version
8906 dnl ===================================================================
8907 dnl FIXME: this is currently because we have jpeg-6b for our filters
8908 dnl and jpeg-8 as dependency for librsvg
8909 dnl this should be unified into using only one version for both
8911 AC_MSG_CHECKING([whether to use the system libjpeg])
8913 if test "$SYSTEM_JPEG" == "YES"; then
8915 AC_MSG_RESULT([yes])
8918 WINNT|Darwin|iOS|Android)
8924 AC_MSG_RESULT([yes])
8928 AC_SUBST(SYSTEM_LIBJPEG)
8930 dnl ===================================================================
8931 dnl Check for runtime JVM search path
8932 dnl ===================================================================
8933 if test "$SOLAR_JAVA" != ""; then
8934 AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
8935 if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then
8936 AC_MSG_RESULT([yes])
8937 if ! test -d "$with_jvm_path"; then
8938 AC_MSG_ERROR(["$with_jvm_path" not a directory])
8940 if ! test -d "$with_jvm_path"jvm; then
8941 AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
8943 JVM_ONE_PATH_CHECK="$with_jvm_path"
8944 AC_SUBST(JVM_ONE_PATH_CHECK)
8950 dnl ===================================================================
8951 dnl Test for the presence of Ant and that it works
8952 dnl ===================================================================
8954 if test "$SOLAR_JAVA" != ""; then
8955 ANT_HOME=; export ANT_HOME
8956 WITH_ANT_HOME=; export WITH_ANT_HOME
8957 if test -z "$with_ant_home"; then
8958 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
8960 if test "$_os" = "WINNT"; then
8961 with_ant_home=`cygpath -u "$with_ant_home"`
8963 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
8964 WITH_ANT_HOME=$with_ant_home
8965 ANT_HOME=$with_ant_home
8968 if test -z "$ANT"; then
8969 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
8971 # resolve relative or absolute symlink
8972 while test -h "$ANT"; do
8974 a_basename=`basename "$ANT"`
8975 a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
8976 cd "`dirname "$ANT"`"
8977 cd "`dirname "$a_script"`"
8978 ANT="`pwd`"/"`basename "$a_script"`"
8982 AC_MSG_CHECKING([if $ANT works])
8983 cat > conftest.java << EOF
8984 public class conftest {
8985 int testmethod(int a, int b) {
8991 cat > conftest.xml << EOF
8992 <project name="conftest" default="conftest">
8993 <target name="conftest">
8994 <javac srcdir="." includes="conftest.java">
9000 oldJAVA_HOME=$JAVA_HOME
9001 if test "$JAVACISGCJ" = "yes"; then
9002 JAVA_HOME=; export JAVA_HOME
9003 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
9005 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
9007 AC_TRY_EVAL(ant_cmd)
9008 if test $? = 0 && test -f ./conftest.class ; then
9009 AC_MSG_RESULT([Ant works])
9010 if test -z "$WITH_ANT_HOME"; then
9011 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
9012 if test -z "$ANT_HOME"; then
9013 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
9016 ANT_HOME="$WITH_ANT_HOME"
9019 echo "configure: Ant test failed" >&5
9020 cat conftest.java >&5
9021 cat conftest.xml >&5
9022 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
9024 echo "Ant does not work - Some Java projects will not build!" >>warn
9026 JAVA_HOME=$oldJAVA_HOME
9027 rm -f conftest* core core.* *.core
9029 if test -z "$ANT_HOME"; then
9030 ANT_HOME="NO_ANT_HOME"
9034 dnl Checking for ant.jar
9035 if test "$ANT_HOME" != "NO_ANT_HOME"; then
9036 AC_MSG_CHECKING([Ant lib directory])
9037 if test -f $ANT_HOME/lib/ant.jar; then
9038 ANT_LIB="$ANT_HOME/lib"
9040 if test -f $ANT_HOME/ant.jar; then
9043 if test -f /usr/share/java/ant.jar; then
9044 ANT_LIB=/usr/share/java
9046 if test -f /usr/share/ant-core/lib/ant.jar; then
9047 ANT_LIB=/usr/share/ant-core/lib
9049 if test -f $ANT_HOME/lib/ant/ant.jar; then
9050 ANT_LIB="$ANT_HOME/lib/ant"
9052 if test -f /usr/share/lib/ant/ant.jar; then
9053 ANT_LIB=/usr/share/lib/ant
9055 AC_MSG_ERROR([Ant libraries not found!])
9062 AC_MSG_RESULT([Ant lib directory found.])
9067 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
9069 AC_MSG_CHECKING([whether Ant is >= $ant_minver])
9070 ant_version=`$ANT -version | $AWK '{ print $4; }'`
9071 ant_version_major=`echo $ant_version | cut -d. -f1`
9072 ant_version_minor=`echo $ant_version | cut -d. -f2`
9073 echo "configure: ant_version $ant_version " >&5
9074 echo "configure: ant_version_major $ant_version_major " >&5
9075 echo "configure: ant_version_minor $ant_version_minor " >&5
9076 if test "$ant_version_major" -ge "2"; then
9077 AC_MSG_RESULT([yes, $ant_version])
9078 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
9079 AC_MSG_RESULT([yes, $ant_version])
9081 AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
9084 if test "$ENABLE_MEDIAWIKI" = "YES"; then
9085 AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
9088 cat > conftest.java << EOF
9089 public class conftest {
9090 int testmethod(int a, int b) {
9096 cat > conftest.xml << EOF
9097 <project name="conftest" default="conftest">
9098 <target name="conftest" depends="copytest">
9099 <javac srcdir="." includes="conftest.java">
9102 <target name="copytest">
9103 <copy todir="confdir">
9104 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
9106 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
9112 if test "$JAVACISGCJ" = "yes"; then
9113 JAVA_HOME=; export JAVA_HOME
9114 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
9116 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
9118 AC_TRY_EVAL(ant_cmd)
9119 if test $? = 0 && test -f ./conftest.class ; then
9120 AC_MSG_RESULT([yes])
9123 echo "configure: Ant test failed" >&5
9124 cat conftest.java >&5
9125 cat conftest.xml >&5
9127 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
9130 rm -f conftest* core core.* *.core
9134 if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
9135 AC_MSG_CHECKING([for JUnit 4])
9136 if test "$with_junit" = "yes"; then
9137 if test -e /usr/share/java/junit4.jar; then
9138 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
9140 if test -e /usr/share/lib/java/junit.jar; then
9141 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
9143 OOO_JUNIT_JAR=/usr/share/java/junit.jar
9147 OOO_JUNIT_JAR=$with_junit
9149 if test "$_os" = "WINNT"; then
9150 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
9152 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
9153 grep org/junit/Before.class > /dev/null 2>&5
9154 if test $? -eq 0; then
9155 # check if either class-path entry is available for hamcrest or
9157 if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |grep -q hamcrest || \
9158 "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |grep -q 'Class-Path: hamcrest'; then
9159 AC_MSG_RESULT([$OOO_JUNIT_JAR])
9161 AC_MSG_ERROR([your junit jar neither sets a classpath nor includes hamcrest; please
9162 provide a full junit jar or use --without-junit])
9166 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
9167 location (/usr/share/java), specify its pathname via
9168 --with-junit=..., or disable it via --without-junit])
9170 if test $OOO_JUNIT_JAR != ""; then
9171 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
9174 AC_SUBST(OOO_JUNIT_JAR)
9176 dnl ===================================================================
9178 dnl ===================================================================
9179 AC_MSG_CHECKING([for product version])
9180 PRODUCTVERSION=AC_PACKAGE_VERSION
9181 AC_MSG_RESULT([$PRODUCTVERSION])
9182 AC_SUBST(PRODUCTVERSION)
9184 dnl ===================================================================
9185 dnl Dealing with l10n options
9186 dnl ===================================================================
9187 AC_MSG_CHECKING([which languages to be built])
9188 # get list of all languages
9189 # generate shell variable from completelangiso= from solenv/inc/langlist.mk
9190 # the sed command does the following:
9191 # + if a line ends with a backslash, append the next line to it
9192 # + adds " on the beginning of the value (after =)
9193 # + adds " at the end of the value
9194 # + removes en-US; we want to put it on the beginning
9195 # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
9196 [eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' solenv/inc/langlist.mk)]
9197 ALL_LANGS="en-US $completelangiso"
9198 # check the configured localizations
9199 WITH_LANG="$with_lang"
9200 if test -z "$WITH_LANG"; then
9201 AC_MSG_RESULT([en-US])
9203 AC_MSG_RESULT([$WITH_LANG])
9204 GIT_REPO_NAMES="$GIT_REPO_NAMES translations"
9206 # check that the list is valid
9207 for lang in $WITH_LANG ; do
9208 test "$lang" = "ALL" && continue;
9209 # need to check for the exact string, so add space before and after the list of all languages
9210 for vl in $ALL_LANGS ; do
9211 if test "$vl" = "$lang" ; then
9215 if test "$vl" != "$lang" ; then
9216 AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS])
9219 # list with substituted ALL
9220 WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
9221 # this variable is used only by bin/distro-install-* helper scripts
9222 # they need a real list of languages
9223 test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
9226 AC_SUBST(WITH_LANG_LIST)
9227 AC_SUBST(GIT_REPO_NAMES)
9230 dnl ===================================================================
9231 if test -n "${GIT_LINK_SRC}"; then
9232 for repo in ${GIT_REPO_NAMES}; do
9233 if ! test -d "${GIT_LINK_SRC}"/${repo}; then
9234 AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
9238 AC_SUBST(GIT_LINK_SRC)
9240 AC_MSG_CHECKING([for custom 'intro' progress bar color])
9242 if test -z "$with_intro_progressbar_color" ; then
9243 PROGRESSBARCOLOR="126,170,23"
9244 AC_MSG_RESULT([none])
9246 PROGRESSBARCOLOR="$with_intro_progressbar_color"
9247 AC_MSG_RESULT([$PROGRESSBARCOLOR])
9249 AC_SUBST(PROGRESSBARCOLOR)
9251 AC_MSG_CHECKING([for custom 'intro' progress bar size])
9253 if test -z "$with_intro_progressbar_size" ; then
9254 PROGRESSSIZE="319,10"
9255 AC_MSG_RESULT([none])
9257 PROGRESSSIZE="$with_intro_progressbar_size"
9258 AC_MSG_RESULT([$PROGRESSSIZE])
9260 AC_SUBST(PROGRESSSIZE)
9262 AC_MSG_CHECKING([for custom 'intro' progress bar position])
9264 if test -z "$with_intro_progressbar_position" ; then
9265 PROGRESSPOSITION="164,225"
9266 AC_MSG_RESULT([none])
9268 PROGRESSPOSITION="$with_intro_progressbar_position"
9269 AC_MSG_RESULT([$PROGRESSPOSITION])
9271 AC_SUBST(PROGRESSPOSITION)
9273 AC_MSG_CHECKING([for custom 'intro' progress bar frame color])
9275 if test -z "$with_intro_progressbar_frame_color" ; then
9276 PROGRESSFRAMECOLOR="207,208,211"
9277 AC_MSG_RESULT([none])
9279 PROGRESSFRAMECOLOR="$with_intro_progressbar_frame_color"
9280 AC_MSG_RESULT([$PROGRESSFRAMECOLOR])
9282 AC_SUBST(PROGRESSFRAMECOLOR)
9284 AC_MSG_CHECKING([for alternative branding images directory])
9287 STARTCENTER_LEFT_BITMAP=
9288 STARTCENTER_RIGHT_BITMAP=
9289 STARTCENTER_RTL_LEFT_BITMAP=
9290 STARTCENTER_RTL_RIGHT_BITMAP=
9291 STARTCENTER_SPACE_BITMAP=
9292 if test -z "$with_branding" -o "$with_branding" = "no" ; then
9293 AC_MSG_RESULT([none])
9295 INTRO_BITMAP="$with_branding/intro.png"
9296 ABOUT_BITMAP="$with_branding/about.png"
9297 STARTCENTER_LEFT_BITMAP="$with_branding/backing_left.png"
9298 STARTCENTER_RIGHT_BITMAP="$with_branding/backing_right.png"
9299 STARTCENTER_RTL_LEFT_BITMAP="$with_branding/backing_rtl_left.png"
9300 STARTCENTER_RTL_RIGHT_BITMAP="$with_branding/backing_rtl_right.png"
9301 STARTCENTER_SPACE_BITMAP="$with_branding/backing_space.png"
9302 for i in $INTRO_BITMAP \
9304 $STARTCENTER_LEFT_BITMAP \
9305 $STARTCENTER_RIGHT_BITMAP \
9306 $STARTCENTER_RTL_LEFT_BITMAP \
9307 $STARTCENTER_RTL_RIGHT_BITMAP \
9308 $STARTCENTER_SPACE_BITMAP; do
9309 if test ! -f $i; then
9310 AC_MSG_WARN([Required file $i does not exist!])
9313 AC_MSG_RESULT([$with_branding])
9316 AC_MSG_CHECKING([for yet another 'intro' bitmap])
9317 if test -z "$with_intro_bitmap" -o "$with_intro_bitmap" = "no" ; then
9318 if test "$with_intro_bitmap" = "no" ; then
9321 AC_MSG_RESULT([none])
9323 case "$with_intro_bitmap" in
9324 *.png) INTRO_BITMAP="$with_intro_bitmap" ;;
9325 *) AC_MSG_WARN([Intro bitmap should be a .png file!]) ;;
9327 AC_MSG_RESULT([$INTRO_BITMAP])
9329 AC_SUBST(INTRO_BITMAP)
9331 AC_MSG_CHECKING([for yet another 'about' bitmap])
9332 if test -z "$with_about_bitmap" -o "$with_about_bitmap" = "no" ; then
9333 if test "$with_about_bitmap" = "no" ; then
9336 AC_MSG_RESULT([none])
9338 case "$with_about_bitmap" in
9339 *.png) ABOUT_BITMAP="$with_about_bitmap" ;;
9340 *) AC_MSG_WARN([About bitmap should be a .png file!]) ;;
9342 AC_MSG_RESULT([$ABOUT_BITMAP])
9344 AC_SUBST(ABOUT_BITMAP)
9346 AC_MSG_CHECKING([for yet another 'start center left' bitmap])
9347 if test -z "$with_startcenter_left_bitmap" -o "$with_startcenter_left_bitmap" = "no" ; then
9348 if test "$with_startcenter_left_bitmap" = "no" ; then
9349 STARTCENTER_LEFT_BITMAP=
9351 AC_MSG_RESULT([none])
9353 case "$with_startcenter_left_bitmap" in
9354 *.png) STARTCENTER_LEFT_BITMAP="$with_startcenter_left_bitmap" ;;
9355 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
9357 AC_MSG_RESULT([$STARTCENTER_LEFT_BITMAP])
9359 AC_SUBST(STARTCENTER_LEFT_BITMAP)
9361 AC_MSG_CHECKING([for yet another 'start center right' bitmap])
9362 if test -z "$with_startcenter_right_bitmap" -o "$with_startcenter_right_bitmap" = "no" ; then
9363 if test "$with_startcenter_right_bitmap" = "no" ; then
9364 STARTCENTER_RIGHT_BITMAP=
9366 AC_MSG_RESULT([none])
9368 case "$with_startcenter_right_bitmap" in
9369 *.png) STARTCENTER_RIGHT_BITMAP="$with_startcenter_right_bitmap" ;;
9370 *) AC_MSG_WARN([Startcenter right bitmap should be a .png file!]) ;;
9372 AC_MSG_RESULT([$STARTCENTER_RIGHT_BITMAP])
9374 AC_SUBST(STARTCENTER_RIGHT_BITMAP)
9376 AC_MSG_CHECKING([for yet another 'start center rtl left' bitmap])
9377 if test -z "$with_startcenter_rtl_left_bitmap" -o "$with_startcenter_rtl_left_bitmap" = "no" ; then
9378 if test "$with_startcenter_rtl_left_bitmap" = "no" ; then
9379 STARTCENTER_RTL_LEFT_BITMAP=
9381 AC_MSG_RESULT([none])
9383 case "$with_startcenter_rtl_left_bitmap" in
9384 *.png) STARTCENTER_RTL_LEFT_BITMAP="$with_startcenter_rtl_left_bitmap" ;;
9385 *) AC_MSG_WARN([Startcenter rtl left bitmap should be a .png file!]) ;;
9387 AC_MSG_RESULT([$STARTCENTER_RTL_LEFT_BITMAP])
9389 AC_SUBST(STARTCENTER_RTL_LEFT_BITMAP)
9391 AC_MSG_CHECKING([for yet another 'start center rtl right' bitmap])
9392 if test -z "$with_startcenter_rtl_right_bitmap" -o "$with_startcenter_rtl_right_bitmap" = "no" ; then
9393 if test "$with_startcenter_rtl_right_bitmap" = "no" ; then
9394 STARTCENTER_RTL_RIGHT_BITMAP=
9396 AC_MSG_RESULT([none])
9398 case "$with_startcenter_rtl_right_bitmap" in
9399 *.png) STARTCENTER_RTL_RIGHT_BITMAP="$with_startcenter_rtl_right_bitmap" ;;
9400 *) AC_MSG_WARN([Startcenter rtl right bitmap should be a .png file!]) ;;
9402 AC_MSG_RESULT([$STARTCENTER_RTL_RIGHT_BITMAP])
9404 AC_SUBST(STARTCENTER_RTL_RIGHT_BITMAP)
9406 AC_MSG_CHECKING([for yet another 'start center space' bitmap])
9407 if test -z "$with_startcenter_space_bitmap" -o "$with_startcenter_space_bitmap" = "no" ; then
9408 if test "$with_startcenter_space_bitmap" = "no" ; then
9409 STARTCENTER_SPACE_BITMAP=
9411 AC_MSG_RESULT([none])
9413 case "$with_startcenter_space_bitmap" in
9414 *.png) STARTCENTER_SPACE_BITMAP="$with_startcenter_space_bitmap" ;;
9415 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
9417 AC_MSG_RESULT([$STARTCENTER_SPACE_BITMAP])
9419 AC_SUBST(STARTCENTER_SPACE_BITMAP)
9422 AC_MSG_CHECKING([for vendor])
9423 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
9424 AC_MSG_RESULT([not set])
9426 OOO_VENDOR="$with_vendor"
9427 AC_MSG_RESULT([$OOO_VENDOR])
9429 AC_SUBST(OOO_VENDOR)
9432 AC_MSG_CHECKING([for UNIX wrapper name])
9433 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
9434 AC_MSG_RESULT([not set])
9436 UNIXWRAPPERNAME="$with_unix_wrapper"
9437 AC_MSG_RESULT([$UNIXWRAPPERNAME])
9439 AC_SUBST(UNIXWRAPPERNAME)
9441 AC_MSG_CHECKING([whether to install the compat oo* wrappers])
9442 if test "$with_compat_oowrappers" = "yes" ; then
9443 WITH_COMPAT_OOWRAPPERS=YES
9446 WITH_COMPAT_OOWRAPPERS=
9449 AC_SUBST(WITH_COMPAT_OOWRAPPERS)
9451 AC_MSG_CHECKING([for product name])
9452 PRODUCTNAME=AC_PACKAGE_NAME
9453 AC_MSG_RESULT([$PRODUCTNAME])
9454 AC_SUBST(PRODUCTNAME)
9456 INSTALLDIRNAME=`echo AC_PACKAGE_NAME | tr '[[:upper:]]' '[[:lower:]]'`
9457 AC_MSG_CHECKING([for install dirname])
9458 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes" ; then
9459 INSTALLDIRNAME="$with_install_dirname"
9461 AC_MSG_RESULT([$INSTALLDIRNAME])
9462 AC_SUBST(INSTALLDIRNAME)
9464 AC_MSG_CHECKING([for prefix])
9465 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9466 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
9468 AC_MSG_RESULT([$PREFIXDIR])
9471 AC_MSG_CHECKING([for libdir])
9472 LIBDIR=[$(eval echo $(eval echo $libdir))]
9473 AC_MSG_RESULT([$LIBDIR])
9476 AC_MSG_CHECKING([for data dir])
9477 DATADIR=[$(eval echo $(eval echo $datadir))]
9478 AC_MSG_RESULT([$DATADIR])
9481 AC_MSG_CHECKING([for man dir])
9482 MANDIR=[$(eval echo $(eval echo $mandir))]
9483 AC_MSG_RESULT([$MANDIR])
9486 AC_MSG_CHECKING([for doc dir])
9487 DOCDIR=[$(eval echo $(eval echo $docdir))]
9488 AC_MSG_RESULT([$DOCDIR])
9491 AC_MSG_CHECKING([for install dir])
9492 INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
9493 AC_MSG_RESULT([$INSTALLDIR])
9494 AC_SUBST(INSTALLDIR)
9496 AC_MSG_CHECKING([whether to statically link to Gtk])
9497 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
9498 ENABLE_STATIC_GTK="TRUE"
9499 AC_MSG_RESULT([yes])
9501 ENABLE_STATIC_GTK="FALSE"
9504 AC_SUBST(ENABLE_STATIC_GTK)
9506 # ===================================================================
9507 # De- or increase default verbosity of build process
9508 # ===================================================================
9509 AC_MSG_CHECKING([build verbosity])
9510 if test -n "$enable_verbose"; then
9511 if test "$enable_verbose" = "yes"; then
9513 AC_MSG_RESULT([high])
9515 if test "$enable_verbose" = "no"; then
9517 AC_MSG_RESULT([low])
9520 AC_MSG_RESULT([not set])
9524 dnl ===================================================================
9525 dnl Use zenity during build
9526 dnl ===================================================================
9527 AC_MSG_CHECKING([whether to use zenity during build])
9528 if test "$enable_zenity" = "yes"; then
9529 AC_MSG_RESULT([yes])
9530 AC_PATH_PROGS( ZNTY, zenity )
9531 if test -z "$ZNTY"; then
9540 AC_SUBST(ENABLE_ZENITY)
9543 dnl ===================================================================
9544 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
9545 dnl --enable-dependency-tracking configure option
9546 dnl ===================================================================
9547 AC_MSG_CHECKING([whether to enable dependency tracking])
9548 if test "$enable_dependency_tracking" = "no"; then
9552 AC_MSG_RESULT([yes])
9556 dnl ===================================================================
9557 dnl Number of CPUs to use during the build
9558 dnl ===================================================================
9559 AC_MSG_CHECKING([for number of processors to use])
9560 if test -n "$with_num_cpus"; then
9561 BUILD_NCPUS=$with_num_cpus
9565 Darwin|FreeBSD|NetBSD|OpenBSD)
9566 BUILD_NCPUS=`sysctl -n hw.ncpu`
9570 BUILD_NCPUS=`getconf _NPROCESSORS_ONLN`
9572 # what else than above does profit here *and* has /proc?
9574 BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
9578 # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
9579 # unexpected format, 'wc -l' will have returned 0.
9580 if test "$BUILD_NCPUS" -eq 0; then
9584 AC_MSG_RESULT([$BUILD_NCPUS])
9585 AC_SUBST(BUILD_NCPUS)
9587 # ===================================================================
9588 # Creating bigger shared library to link against
9589 # ===================================================================
9590 AC_MSG_CHECKING([whether to create a big library for better performance])
9592 if test "$enable_mergelibs" = "yes"; then
9594 AC_MSG_RESULT([yes])
9600 dnl ===================================================================
9601 dnl Number of parallel jobs to be executed by dmake
9602 dnl ===================================================================
9603 AC_MSG_CHECKING([for maximum of jobs per processor])
9605 if test "z$with_max_jobs" != "z"; then
9606 BUILD_MAX_JOBS="$with_max_jobs"
9608 if test "$enable_icecream" = "yes" ; then
9612 AC_MSG_RESULT([$BUILD_MAX_JOBS])
9613 AC_SUBST(BUILD_MAX_JOBS)
9615 # =====================================================================
9616 # determine the parallelism for gnu make
9617 # =====================================================================
9618 AC_MSG_CHECKING([for maximum parallelism for gmake])
9619 if test $BUILD_MAX_JOBS -gt $BUILD_NCPUS ; then
9620 GMAKE_PARALLELISM="$BUILD_MAX_JOBS"
9622 GMAKE_PARALLELISM="$BUILD_NCPUS"
9624 GMAKE_MODULE_PARALLELISM="$BUILD_MAX_JOBS"
9625 if test "$no_parallelism_make" = "YES" ; then
9626 if test -z "$with_num_cpus"; then
9627 GMAKE_PARALLELISM="1";
9628 if test $GMAKE_MODULE_PARALLELISM -gt 1 ; then
9629 AC_MSG_WARN([gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this.])
9630 if test -z "$with_num_cpus"; then
9631 echo "gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this." >> warn
9633 GMAKE_MODULE_PARALLELISM="1"
9636 GMAKE_PARALLELISM="$BUILD_NCPUS";
9637 echo "make 3.81 is prone to crashes with parallelism > 1. Since --with-num-cpus was explicitly given, it is honored, but do not complain when make segfault on you." >> warn
9641 # GMAKE_PARALLELISM is used in tail_build
9642 # GMAKE_MODULE_PARALLELISM is used when building individual gbuildified module
9643 AC_MSG_RESULT([per module:$GMAKE_MODULE_PARALLELISM, for tail_build:$GMAKE_PARALLELISM])
9644 AC_SUBST(GMAKE_PARALLELISM)
9645 AC_SUBST(GMAKE_MODULE_PARALLELISM)
9647 dnl ===================================================================
9648 dnl Setting up the environment.
9649 dnl ===================================================================
9650 echo "setting up the build environment variables..."
9652 if test -z "$COMPATH"; then
9653 AC_MSG_ERROR([No compiler found.])
9657 AC_MSG_CHECKING([solver path])
9658 if test -z "$with_local_solver"; then
9659 LOCAL_SOLVER="DEFAULT"
9660 AC_MSG_RESULT([default])
9662 LOCAL_SOLVER=$with_local_solver
9663 AC_MSG_RESULT([$with_local_solver])
9665 AC_SUBST(LOCAL_SOLVER)
9667 AC_SUBST(BUILD_TYPE)
9669 if test "$WITH_MINGW" != "yes" ; then
9670 MINGW_EXTERNAL_DLLS=
9672 mingw_dlldir=`$CC -print-sysroot`/mingw/bin
9673 for DLL in $MINGW_EXTERNAL_DLLS ; do
9674 AC_MSG_CHECKING([for $DLL])
9675 if ! test -f "$mingw_dlldir/$DLL" ; then
9676 AC_MSG_ERROR([Could not find $DLL, install the appropriate mingw32-<package>, not only mingw32-<package>-devel.])
9678 AC_MSG_RESULT([$mingw_dlldir/$DLL])
9681 AC_SUBST(MINGW_EXTERNAL_DLLS)
9683 # make sure config.guess is +x; we execute config.guess, so it has to be so;
9684 chmod +x ./config.guess
9686 dnl Setting up the post_download check script
9687 dnl Using autoconf here, so that the migration from the previous state
9688 dnl (checks for the additional Windows downloads were directly in
9689 dnl configure.in) is as easy as possible
9690 echo "setting up the post_download check script"
9691 autoconf post_download.in > post_download
9692 chmod +x post_download
9694 # Generate a configuration timestamp we can use for deps
9695 if test -f set_soenv; then
9696 mv -f set_soenv set_soenv.last
9698 echo > set_soenv.last
9701 AC_CONFIG_FILES([ooo.lst set_soenv bin/repo-list desktop/scripts/soffice.sh build_env])
9704 # make sure this is executable
9705 chmod +x desktop/scripts/soffice.sh
9707 # touch the config timestamp file set_soenv.stamp
9708 if test ! -f set_soenv.stamp; then
9709 echo > set_soenv.stamp
9710 elif diff set_soenv set_soenv.last >/dev/null 2>&1; then
9711 echo "Configuration unchanged - avoiding scp2 stamp update"
9713 echo > set_soenv.stamp
9716 dnl Run the set_soenv script to setup the Env.Host.sh script that sets
9717 dnl environment variables for the build.
9722 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: