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.3 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 ICU_RECLASSIFIED_PREPEND_SET_EMPTY=
6166 AC_MSG_CHECKING([which icu to use])
6167 if test "$with_system_icu" = "yes"; then
6168 AC_MSG_RESULT([external])
6171 AC_MSG_CHECKING([for unicode/rbbi.h])
6172 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
6176 if test "$WITH_MINGW" = "yes" ; then
6177 ICUPATH="/usr/i686-w64-mingw32/sys-root/mingw/bin:$ICUPATH"
6179 AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
6181 AC_MSG_CHECKING([ICU version])
6182 ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
6183 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
6184 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
6185 ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3`
6187 if test "$ICU_MAJOR" -ge "4"; then
6188 AC_MSG_RESULT([OK, $ICU_VERSION])
6190 AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
6193 if test "$cross_compiling" != "yes"; then
6194 # using the system icu tools can lead to version confusion, use the
6195 # ones from the build environment when cross-compiling
6196 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
6197 if test -z "$SYSTEM_GENBRK"; then
6198 AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
6200 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
6201 if test -z "$SYSTEM_GENCCODE"; then
6202 AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
6204 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
6205 if test -z "$SYSTEM_GENCMN"; then
6206 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
6208 if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4"; then
6209 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
6211 if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "9"; then
6212 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
6216 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS icui18n$ICU_MAJOR$ICU_MINOR.dll icuuc$ICU_MAJOR$ICU_MINOR.dll icudata$ICU_MAJOR$ICU_MINOR.dll"
6218 AC_MSG_RESULT([internal])
6220 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
6221 # ICU_RECLASSIFIED_PREPEND_SET_EMPTY not applied for our internal ICU 4.4.2
6222 BUILD_TYPE="$BUILD_TYPE ICU"
6224 AC_SUBST(SYSTEM_ICU)
6225 AC_SUBST(SYSTEM_GENBRK)
6226 AC_SUBST(SYSTEM_GENCCODE)
6227 AC_SUBST(SYSTEM_GENCMN)
6231 AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
6232 AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
6234 dnl ===================================================================
6236 dnl ===================================================================
6238 AC_MSG_CHECKING([whether to enable graphite support])
6239 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then
6240 AC_MSG_RESULT([yes])
6241 ENABLE_GRAPHITE="TRUE"
6242 AC_MSG_CHECKING([which graphite to use])
6243 if test "$with_system_graphite" = "yes"; then
6244 AC_MSG_RESULT([external])
6246 PKG_CHECK_MODULES( GRAPHITE, graphite2 >= 0.9.3 )
6247 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libgraphite2.dll"
6249 AC_MSG_RESULT([internal])
6251 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
6256 AC_SUBST(ENABLE_GRAPHITE)
6257 AC_SUBST(SYSTEM_GRAPHITE)
6258 AC_SUBST(GRAPHITE_LIBS)
6259 AC_SUBST(GRAPHITE_CFLAGS)
6261 dnl ===================================================================
6263 dnl ===================================================================
6264 AC_MSG_CHECKING([whether to use system SampleICC])
6265 if test "$with_system_sampleicc" = "yes"; then
6266 AC_MSG_RESULT([yes])
6267 SYSTEM_SAMPLEICC=YES
6268 PKG_CHECK_MODULES(SAMPLEICC, sampleicc)
6273 AC_SUBST(SYSTEM_SAMPLEICC)
6274 AC_SUBST(SAMPLEICC_LIBS)
6275 AC_SUBST(SAMPLEICC_CFLAGS)
6277 dnl ===================================================================
6278 dnl Checks for libraries.
6279 dnl ===================================================================
6280 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
6281 dnl See if we have the AppKit framework for building with Quartz graphics.
6283 if test "$_os" = "Darwin"; then
6284 if test "x$with_x" = "xyes"; then
6285 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
6287 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
6288 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
6289 AC_MSG_RESULT([yes])
6290 x_includes="no_x_includes"
6291 x_libraries="no_x_libraries"
6292 dnl disable some things used on other Unix versions but not on the aqua build
6295 AC_MSG_ERROR([No AppKit.framewrok found])
6300 if test $_os = iOS -o $_os = Android; then
6304 dnl ===================================================================
6305 dnl Check for nsplugin
6306 dnl ===================================================================
6307 AC_MSG_CHECKING([wether to build nsplugin extension])
6309 if test "$enable_nsplugin" != "no"; then
6310 if test "$enable_gtk" != "no"; then
6311 AC_MSG_RESULT([yes])
6314 AC_MSG_RESULT([no, disabled gtk2])
6319 AC_SUBST(ENABLE_NSPLUGIN)
6321 dnl ***************************************
6322 dnl testing for X libraries and includes...
6323 dnl ***************************************
6324 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
6325 dnl Mac OS X using Aqua graphics. Don't check for X11.
6327 elif test "$_os" != "WINNT" -a "$_os" != "Android" -a "$_os" != "iOS"; then
6330 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6332 if test "x$x_includes" = "x"; then
6333 x_includes="default_x_includes"
6335 if test "x$x_libraries" = "x"; then
6336 x_libraries="default_x_libraries"
6338 dnl The variables $x_libraries and $x_includes are set.
6339 if test -z "$x_libraries"; then
6340 AC_MSG_ERROR([No X libraries found]) # Exit
6342 if test -z "$x_includes"; then
6343 AC_MSG_ERROR([No X includes found]) # Exit
6345 CFLAGS="$CFLAGS $X_CFLAGS"
6346 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
6347 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
6348 dnl Check if the XauDisposeAuth symbol is provided by libXau.
6349 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
6351 x_includes="no_x_includes"
6352 x_libraries="no_x_libraries"
6354 if test -z "$x_includes"; then
6355 x_includes="no_x_includes"
6357 if test -z "$x_libraries"; then
6358 x_libraries="no_x_libraries"
6360 if test "$x_includes" = "default_x_includes"; then
6366 if test "$x_libraries" = "default_x_libraries"; then
6367 XLIB=`$PKG_CONFIG --variable=libdir x11`
6368 if test "x$XLIB" = x; then
6377 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then
6378 dnl ===================================================================
6379 dnl Check for Composite.h for Mozilla plugin
6380 dnl ===================================================================
6381 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
6382 [#include <X11/Intrinsic.h>])
6385 AC_MSG_CHECKING([whether to use internal X11 extensions headers])
6386 if test "$with_system_xextensions_headers" != "no"; then
6389 AC_MSG_RESULT([yes])
6390 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
6393 dnl ===================================================================
6394 dnl Check for system Xrender
6395 dnl ===================================================================
6396 AC_MSG_CHECKING([whether to use Xrender])
6397 if test "$test_xrender" = "yes"; then
6398 AC_MSG_RESULT([yes])
6399 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
6400 [AC_MSG_ERROR(libXrender not found or functional)], [])
6401 AC_MSG_CHECKING([which Xrender headers to use])
6402 if test "$with_system_xextensions_headers" != "no"; then
6403 AC_MSG_RESULT([external])
6404 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
6405 [AC_MSG_ERROR(Xrender not found. install X)], [])
6407 AC_MSG_RESULT([internal])
6411 dnl ===================================================================
6412 dnl Check for XRandr
6413 dnl ===================================================================
6414 AC_MSG_CHECKING([whether to enable RandR support])
6415 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
6416 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
6417 XRANDR_DLOPEN="TRUE"
6418 AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
6420 AC_MSG_RESULT([yes])
6421 XRANDR_DLOPEN="FALSE"
6422 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
6423 if test "$ENABLE_RANDR" != "TRUE"; then
6424 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
6425 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
6427 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
6428 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
6429 XRANDR_LIBS="-lXrandr "
6437 AC_SUBST(XRANDR_DLOPEN)
6438 AC_SUBST(XRANDR_CFLAGS)
6439 AC_SUBST(XRANDR_LIBS)
6440 AC_SUBST(ENABLE_RANDR)
6442 dnl ===================================================================
6443 dnl Check for building neon
6444 dnl ===================================================================
6445 AC_MSG_CHECKING([whether to use neon])
6446 if test "$enable_neon" = "no"; then
6449 AC_SUBST(DISABLE_NEON)
6451 AC_MSG_RESULT([yes])
6452 dnl ===================================================================
6453 dnl Check for system neon
6454 dnl ===================================================================
6455 AC_MSG_CHECKING([which neon to use])
6456 if test "$with_system_neon" = "yes"; then
6457 AC_MSG_RESULT([external])
6458 PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
6459 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
6460 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
6462 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libtasn1-3.dll libgnutls-26.dll libneon-27.dll"
6464 AC_MSG_RESULT([internal])
6468 BUILD_TYPE="$BUILD_TYPE NEON"
6470 AC_SUBST(SYSTEM_NEON)
6471 AC_SUBST(NEON_VERSION)
6473 AC_SUBST(NEON_CFLAGS)
6476 dnl ===================================================================
6477 dnl Check for system openssl
6478 dnl ===================================================================
6479 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
6480 "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
6481 with_system_openssl=yes
6483 AC_MSG_CHECKING([which libssl to use])
6484 if test "$with_system_openssl" = "yes"; then
6485 AC_MSG_RESULT([external])
6486 # Mac OS builds should get out without extra stuff is the Mac porters'
6487 # wish. And pkg-config is although Xcode ships a .pc for openssl
6488 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
6489 "$_os" = "DragonFly"; then
6491 OPENSSL_LIBS="-lssl -lcrypto"
6493 PKG_CHECK_MODULES( OPENSSL, openssl )
6496 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libssl-8.dll libcrypto-8.dll"
6498 AC_MSG_RESULT([internal])
6500 BUILD_TYPE="$BUILD_TYPE OPENSSL"
6502 AC_SUBST(SYSTEM_OPENSSL)
6503 AC_SUBST(OPENSSL_CFLAGS)
6504 AC_SUBST(OPENSSL_LIBS)
6506 dnl ===================================================================
6507 dnl Check for system redland
6508 dnl ===================================================================
6509 AC_MSG_CHECKING([which redland library to use])
6510 if test "$with_system_redland" = "yes"; then
6511 AC_MSG_RESULT([external])
6513 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
6514 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
6515 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libraptor-1.dll librasqal-2.dll libsqlite3-0.dll librdf-0.dll"
6517 AC_MSG_RESULT([internal])
6518 BUILD_TYPE="$BUILD_TYPE REDLAND"
6521 AC_SUBST(SYSTEM_REDLAND)
6522 AC_SUBST(REDLAND_CFLAGS)
6523 AC_SUBST(REDLAND_LIBS)
6525 dnl ===================================================================
6526 dnl Check for system hunspell
6527 dnl ===================================================================
6528 AC_MSG_CHECKING([which libhunspell to use])
6529 if test "$with_system_hunspell" = "yes"; then
6530 AC_MSG_RESULT([external])
6533 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
6534 if test "$HUNSPELL_PC" != "TRUE"; then
6535 AC_CHECK_HEADER(hunspell.hxx, [],
6537 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
6538 [AC_MSG_ERROR(hunspell headers not found.)], [])
6540 AC_CHECK_LIB(hunspell, main, [],
6541 [ AC_MSG_ERROR(hunspell library not found.) ], [])
6542 HUNSPELL_LIBS=-lhunspell
6545 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libhunspell-1.3-0.dll"
6547 AC_MSG_RESULT([internal])
6549 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
6551 AC_SUBST(SYSTEM_HUNSPELL)
6552 AC_SUBST(HUNSPELL_CFLAGS)
6553 AC_SUBST(HUNSPELL_LIBS)
6555 dnl ===================================================================
6556 dnl Checking for altlinuxhyph
6557 dnl ===================================================================
6558 AC_MSG_CHECKING([which altlinuxhyph to use])
6559 if test "$with_system_altlinuxhyph" = "yes"; then
6560 AC_MSG_RESULT([external])
6562 AC_CHECK_HEADER(hyphen.h, [],
6563 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
6564 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
6565 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
6566 [#include <hyphen.h>])
6567 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
6568 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6569 if test -z "$HYPHEN_LIB"; then
6570 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
6571 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6573 if test -z "$HYPHEN_LIB"; then
6574 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
6575 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
6577 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libhyphen-0.dll"
6579 AC_MSG_RESULT([internal])
6581 BUILD_TYPE="$BUILD_TYPE HYPHEN"
6583 AC_SUBST(SYSTEM_HYPH)
6584 AC_SUBST(HYPHEN_LIB)
6586 dnl ===================================================================
6587 dnl Checking for mythes
6588 dnl ===================================================================
6589 AC_MSG_CHECKING([which mythes to use])
6590 if test "$with_system_mythes" = "yes"; then
6591 AC_MSG_RESULT([external])
6594 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
6595 if test "$MYTHES_PKGCONFIG" = "no"; then
6596 AC_CHECK_HEADER(mythes.hxx, [],
6597 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
6598 AC_CHECK_LIB(mythes-1.2, main, [],
6599 [ MYTHES_FOUND=no], [])
6600 if test "$MYTHES_FOUND" = "no"; then
6601 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
6602 [ MYTHES_FOUND=no], [])
6604 if test "$MYTHES_FOUND" = "no"; then
6605 AC_MSG_ERROR([mythes library not found!.])
6609 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libmythes-1.2-0.dll"
6611 AC_MSG_RESULT([internal])
6613 BUILD_TYPE="$BUILD_TYPE MYTHES"
6615 AC_SUBST(SYSTEM_MYTHES)
6616 AC_SUBST(MYTHES_CFLAGS)
6617 AC_SUBST(MYTHES_LIBS)
6619 dnl ===================================================================
6620 dnl Checking for lpsolve
6621 dnl ===================================================================
6622 AC_MSG_CHECKING([which lpsolve to use])
6623 if test "$with_system_lpsolve" = "yes"; then
6624 AC_MSG_RESULT([external])
6626 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
6627 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
6628 # some systems need this. Like Ubuntu....
6629 AC_CHECK_LIB(m, floor)
6630 AC_CHECK_LIB(dl, dlopen)
6631 AC_CHECK_LIB(lpsolve55, make_lp, ,
6632 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
6633 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS lpsolve55.dll"
6635 AC_MSG_RESULT([internal])
6637 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
6639 AC_SUBST(SYSTEM_LPSOLVE)
6641 dnl ===================================================================
6642 dnl Checking for libexttextcat
6643 dnl ===================================================================
6644 AC_MSG_CHECKING([which libexttextcat to use])
6645 if test "$with_system_libexttextcat" = "yes"; then
6646 AC_MSG_RESULT([external])
6647 SYSTEM_LIBEXTTEXTCAT=YES
6648 PKG_CHECK_MODULES([LIBEXTTEXTCAT], [libexttextcat >= 3.1.1])
6649 SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
6651 AC_MSG_RESULT([internal])
6652 SYSTEM_LIBEXTTEXTCAT=NO
6653 BUILD_TYPE="$BUILD_TYPE LIBEXTTEXTCAT"
6655 AC_SUBST(SYSTEM_LIBEXTTEXTCAT)
6656 AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
6657 AC_SUBST(LIBEXTTEXTCAT_CFLAGS)
6658 AC_SUBST(LIBEXTTEXTCAT_LIBS)
6660 dnl ***************************************
6661 dnl testing libc version for Linux...
6662 dnl ***************************************
6663 if test "$_os" = "Linux"; then
6664 AC_MSG_CHECKING([whether libc is >= 2.1.1])
6665 exec 6>/dev/null # no output
6666 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
6667 exec 6>&1 # output on again
6668 if test "$HAVE_LIBC"; then
6669 AC_MSG_RESULT([yes])
6671 AC_MSG_ERROR([no, upgrade libc])
6675 if test "$_os" != "WINNT"; then
6676 AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
6677 AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
6678 if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
6686 AC_SUBST(HAVE_GETOPT)
6687 AC_SUBST(HAVE_READDIR_R)
6688 AC_SUBST(SYSTEM_LIBC)
6690 dnl =========================================
6691 dnl Check for the Windows SDK.
6692 dnl =========================================
6693 dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
6694 dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
6695 if test "$_os" = "WINNT"; then
6696 AC_MSG_CHECKING([for Windows SDK])
6697 if test "$build_os" = "cygwin"; then
6698 if test -z "$with_windows_sdk_home"; then
6699 # This first line will detect a February 2003 Microsoft Platform SDK
6700 WINDOWS_SDK_HOME=`./oowintool --windows-sdk-home`
6701 # But there might be also an April 2005 PSDK, unfortunately MS changed
6702 # the registry entry. (we prefer the old version!?)
6703 if test -z "$WINDOWS_SDK_HOME"; then
6704 WINDOWS_SDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
6706 # normalize if found
6707 if test -n "$WINDOWS_SDK_HOME"; then
6708 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
6709 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
6712 WINDOWS_SDK_HOME=`cygpath -u "$with_windows_sdk_home"`
6715 if test -n "$WINDOWS_SDK_HOME"; then
6716 # Remove a possible trailing backslash
6717 WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
6718 # Problem with current PSDK (iz 49865)
6719 # (What "current" does that mean?)
6720 if test -f "$WINDOWS_SDK_HOME/Lib/libcp.lib"; then
6722 Some modules do not build correctly with MS Platform SDK - April 2005
6723 Edition if the library ($WINDOWS_SDK_HOME/Lib/libcp.lib) is found.
6724 Remove/rename/backup that file and restart configure. Details about this
6725 problem can be found in issue 49856.])
6728 if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
6729 -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
6730 -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
6735 if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
6741 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
6742 AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
6743 the Windows SDK are installed.])
6746 if test ! -x "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
6747 -o ! -x "$WINDOWS_SDK_HOME/bin/msidb.exe" \
6748 -o ! -x "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
6749 -o ! -x "$WINDOWS_SDK_HOME/bin/msitran.exe" ; then
6750 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
6754 if test -z "$WINDOWS_SDK_HOME"; then
6755 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
6756 elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
6757 AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
6758 elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
6759 AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
6760 elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
6761 AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
6763 AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
6766 AC_SUBST(WINDOWS_SDK_HOME)
6768 dnl =========================================
6769 dnl Check for the Microsoft DirectX SDK.
6770 dnl =========================================
6771 if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
6772 AC_MSG_CHECKING([for DirectX SDK])
6773 if test "$build_os" = "cygwin"; then
6774 if test -z "$with_directx_home"; then
6775 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
6776 if test -n "$DXSDK_DIR"; then
6777 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
6778 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
6780 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
6781 # the "DirectX SDK not found" error later
6783 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
6785 # Remove a possible trailing backslash
6786 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
6787 elif test -n "$with_directx_home"; then
6788 DIRECTXSDK_HOME="$with_directx_home"
6791 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h" ; then
6792 HAVE_DIRECTXSDK_H="yes"
6794 HAVE_DIRECTXSDK_H="no"
6797 # MS changed the location of the libraries with Dec 2004 DirectX SDK
6798 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
6799 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
6801 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
6804 if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib" ; then
6805 HAVE_DIRECTXSDK_LIB="yes"
6807 HAVE_DIRECTXSDK_LIB="no"
6810 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
6811 AC_MSG_RESULT([found])
6813 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
6816 AC_SUBST(DIRECTXSDK_HOME)
6817 AC_SUBST(DIRECTXSDK_LIB)
6819 dnl ***************************************
6820 dnl Checking for bison and flex
6821 dnl ***************************************
6822 AC_PATH_PROG(BISON, bison)
6824 if test -z "$BISON"; then
6825 AC_MSG_ERROR([no bison found in \$PATH, install it])
6827 AC_MSG_CHECKING([the bison version])
6828 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
6829 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
6830 # Accept newer than 1.875 or older(equal) than 1.75
6831 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
6832 if test "$_bison_version" = "1.875" ; then
6833 AC_MSG_WARN([suspect ($BISON $_bison_version)])
6834 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
6836 AC_MSG_RESULT([checked ($BISON $_bison_version)])
6839 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
6841 if test "$_bison_longver" -lt 2000; then
6845 AC_SUBST(ANCIENT_BISON)
6847 AC_PATH_PROG(FLEX, flex)
6848 if test -z "$FLEX"; then
6849 AC_MSG_ERROR([no flex found in \$PATH, install it])
6851 dnl ***************************************
6852 dnl Checking for patch
6853 dnl ***************************************
6854 AC_PATH_PROG(PATCH, patch)
6855 if test -z "$PATCH"; then
6856 AC_MSG_ERROR([\"patch\" not found in \$PATH, install it])
6859 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
6860 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
6861 if test -z "$with_gnu_patch"; then
6864 if test -x "$with_gnu_patch"; then
6865 GNUPATCH=$with_gnu_patch
6867 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
6871 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
6872 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
6873 AC_MSG_RESULT([yes])
6875 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
6879 dnl We also need to check for --with-gnu-cp
6881 if test -z "$with_gnu_cp"; then
6882 # check the place where the good stuff is hidden on Solaris...
6883 if test -x /usr/gnu/bin/cp; then
6884 GNUCP=/usr/gnu/bin/cp
6886 AC_PATH_PROGS(GNUCP, gnucp cp)
6888 if test -z $GNUCP; then
6889 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
6892 if test -x "$with_gnu_cp"; then
6895 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
6899 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
6900 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
6901 AC_MSG_RESULT([yes])
6902 elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
6903 AC_MSG_RESULT([yes])
6906 darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*)
6908 AC_MSG_RESULT([no gnucp found - using the system's cp command])
6911 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
6919 dnl ***************************************
6920 dnl testing assembler path
6921 dnl ***************************************
6923 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
6924 if test "$CL_X64" = ""; then
6929 assembler_bin=bin/amd64
6931 if test -n "$with_asm_home"; then
6932 with_asm_home=`cygpath -u "$with_asm_home"`
6934 if test -x "$with_asm_home/$assembler"; then
6935 AC_MSG_CHECKING([$assembler assembler path])
6936 AC_MSG_RESULT([$with_asm_home/$assembler])
6937 ML_EXE="$with_asm_home/$assembler"
6939 AC_PATH_PROG(ML_EXE, $assembler)
6940 if test -z "$ML_EXE"; then
6941 AC_MSG_CHECKING([$with_cl_home/$assembler_bin/$assembler])
6942 if test -x "$with_cl_home/$assembler_bin/$assembler"; then
6943 with_asm_home=$with_cl_home/$assembler_bin
6944 AC_MSG_RESULT([found])
6945 ML_EXE="$with_cl_home/$assembler_bin/$assembler"
6947 AC_MSG_ERROR([Configure did not find $assembler assembler.])
6950 with_asm_home="ASM_IN_PATH"
6955 with_asm_home="NO_ASM_HOME"
6957 ASM_HOME="$with_asm_home"
6961 dnl ===================================================================
6962 dnl We need zip and unzip
6963 dnl ===================================================================
6964 AC_PATH_PROG(ZIP, zip)
6965 test -z "$ZIP" && AC_MSG_ERROR([zip is required])
6966 if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
6967 AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,)
6970 AC_PATH_PROG(UNZIP, unzip)
6971 test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
6973 dnl ===================================================================
6974 dnl Zip must be a specific type for different build types.
6975 dnl ===================================================================
6976 if test $build_os = cygwin; then
6977 if test -n "`$ZIP -h | grep -i WinNT`" ; then
6978 AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
6982 dnl ===================================================================
6983 dnl Test which vclplugs have to be built.
6984 dnl ===================================================================
6989 if test "x$enable_gtk3" = "xyes"; then
6990 if test "$with_system_cairo" != yes; then
6991 echo "System cairo required for gtk3 support, please use --with-system-cairo"
6993 PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.2 gtk+-unix-print-3.0 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="")
6994 if test "x$ENABLE_GTK3" = "xTRUE"; then
6997 AC_MSG_ERROR([gtk3 libraries of the correct versions, not found])
7001 AC_SUBST(GTK3_CFLAGS)
7002 AC_SUBST(ENABLE_GTK3)
7004 AC_MSG_CHECKING([which VCLplugs shall be built])
7006 if test "x$enable_gtk" = "xyes"; then
7010 AC_SUBST(ENABLE_GTK)
7013 if test "x$enable_kde" = "xyes"; then
7017 AC_SUBST(ENABLE_KDE)
7020 if test "x$enable_kde4" = "xyes"; then
7024 AC_SUBST(ENABLE_KDE4)
7026 if test -z "$R"; then
7027 AC_MSG_RESULT([none])
7032 dnl ===================================================================
7034 dnl ===================================================================
7037 AC_MSG_CHECKING([whether to enable GConf support])
7038 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gconf" = "yes"; then
7040 AC_MSG_RESULT([yes])
7041 PKG_CHECK_MODULES( GCONF, gconf-2.0 ORBit-2.0 )
7045 AC_SUBST(ENABLE_GCONF)
7047 dnl ===================================================================
7049 dnl ===================================================================
7052 AC_MSG_CHECKING([whether to enable GNOME VFS support])
7053 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" -a "$enable_gconf" = "yes"; then
7054 ENABLE_GNOMEVFS="TRUE"
7055 AC_MSG_RESULT([yes])
7056 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
7060 AC_SUBST(ENABLE_GNOMEVFS)
7062 dnl ===================================================================
7063 dnl Check whether the gtk 2.0 libraries are available.
7064 dnl ===================================================================
7068 ENABLE_SYSTRAY_GTK=""
7072 if test "$test_gtk" = "yes"; then
7074 if test "$ENABLE_GTK" = "TRUE" ; then
7075 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]))
7076 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]))
7077 BUILD_TYPE="$BUILD_TYPE GTK"
7079 if test "x$enable_systray" = "xyes"; then
7080 PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
7081 [ ENABLE_SYSTRAY_GTK="TRUE" ],
7082 [ ENABLE_SYSTRAY_GTK="" ])
7085 AC_MSG_CHECKING([whether to enable Gtk print dialog support])
7086 PKG_CHECK_MODULES([GTK_PRINT], [gtk+-unix-print-2.0 >= 2.10.0],
7087 [ENABLE_GTK_PRINT="TRUE"],
7088 [ENABLE_GTK_PRINT=""])
7090 AC_MSG_CHECKING([whether to enable DBUS support])
7091 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
7093 AC_MSG_RESULT([yes])
7094 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
7099 AC_MSG_CHECKING([whether to enable GIO support])
7100 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
7101 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
7102 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
7105 AC_MSG_RESULT([yes])
7106 PKG_CHECK_MODULES( GIO, gio-2.0 )
7112 AC_SUBST(ENABLE_GIO)
7113 AC_SUBST(ENABLE_DBUS)
7114 AC_SUBST(ENABLE_SYSTRAY_GTK)
7115 AC_SUBST(GTK_CFLAGS)
7117 AC_SUBST(GTHREAD_CFLAGS)
7118 AC_SUBST(GTHREAD_LIBS)
7119 AC_SUBST(DBUS_CFLAGS)
7121 AC_SUBST([ENABLE_GTK_PRINT])
7122 AC_SUBST([GTK_PRINT_CFLAGS])
7123 AC_SUBST([GTK_PRINT_LIBS])
7125 PKG_CHECK_MODULES( LIBPNG, libpng, ENABLE_QUICKSTART_LIBPNG="TRUE", ENABLE_QUICKSTART_LIBPNG="" )
7126 AC_SUBST(LIBPNG_LIBS)
7127 AC_SUBST(LIBPNG_CFLAGS)
7129 AC_MSG_CHECKING([whether to enable libpng linking in quickstarter])
7130 if test "x$enable_unix_qstart_libpng" != "xno"; then
7131 AC_MSG_RESULT([yes])
7134 ENABLE_QUICKSTART_LIBPNG=""
7136 AC_SUBST(ENABLE_QUICKSTART_LIBPNG)
7138 SPLIT_APP_MODULES=""
7139 if test "$enable_split_app_modules" = "yes"; then
7140 SPLIT_APP_MODULES="YES"
7142 AC_SUBST(SPLIT_APP_MODULES)
7144 SPLIT_OPT_FEATURES=""
7145 if test "$enable_split_opt_features" = "yes"; then
7146 SPLIT_OPT_FEATURES="YES"
7148 AC_SUBST(SPLIT_OPT_FEATURES)
7150 ENABLE_CAIRO_CANVAS="FALSE"
7151 if test "$enable_cairo_canvas" = "yes" ; then
7152 ENABLE_CAIRO_CANVAS="TRUE"
7154 AC_SUBST(ENABLE_CAIRO_CANVAS)
7156 dnl ===================================================================
7157 dnl Check whether the GStreamer libraries are available.
7158 dnl ===================================================================
7162 if test "$build_gstreamer" = "yes"; then
7164 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
7165 if test "x$enable_gstreamer" != "xno" ; then
7166 ENABLE_GSTREAMER="TRUE"
7167 AC_MSG_RESULT([yes])
7168 PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
7174 AC_SUBST(ENABLE_GSTREAMER)
7176 dnl ===================================================================
7177 dnl Check whether the OpenGL libraries are available
7178 dnl ===================================================================
7180 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
7183 if test "$_os" = "Darwin" ; then
7184 # We use frameworks on Mac OS X, no need for detail checks
7186 SYSTEM_MESA_HEADERS=YES
7187 AC_MSG_RESULT([yes])
7189 if test "x$enable_opengl" != "xno" ; then
7190 if test "$_os" != "WINNT"; then
7191 save_LDFLAGS=$LDFLAGS
7192 LDFLAGS="$LDFLAGS -lm"
7193 AC_MSG_RESULT([yes])
7194 AC_CHECK_LIB(GL, main, [],
7195 [AC_MSG_ERROR(libGL not installed or functional)], [])
7196 AC_CHECK_LIB(GLU, main, [],
7197 [AC_MSG_ERROR(libGLU not installed or functional)], [])
7199 LDFLAGS=$save_LDFLAGS
7201 dnl ===================================================================
7202 dnl Check for system Mesa
7203 dnl ===================================================================
7204 AC_MSG_CHECKING([which Mesa headers to use])
7205 if test "$with_system_mesa_headers" = "yes"; then
7206 AC_MSG_RESULT([external])
7207 SYSTEM_MESA_HEADERS=YES
7209 AC_CHECK_HEADER(GL/glxext.h, [],
7210 [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
7211 AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
7212 AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
7215 AC_MSG_RESULT([internal])
7216 SYSTEM_MESA_HEADERS=NO
7217 BUILD_TYPE="$BUILD_TYPE MESA"
7220 AC_MSG_RESULT([not on Windows])
7227 AC_SUBST(SYSTEM_MESA_HEADERS)
7228 AC_SUBST(ENABLE_OPENGL)
7230 # presenter minimizer extension?
7231 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
7232 if test "x$enable_ext_presenter_minimizer" != "xno" -a "x$enable_extension_integration" != "xno"; then
7233 AC_MSG_RESULT([yes])
7234 ENABLE_MINIMIZER=YES
7238 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MINIMIZER"
7240 AC_SUBST(ENABLE_MINIMIZER)
7242 # presenter console extension?
7243 AC_MSG_CHECKING([whether to build the Presenter Console extension])
7244 if test "x$enable_ext_presenter_console" != "xno" -a "x$enable_extension_integration" != "xno"; then
7245 AC_MSG_RESULT([yes])
7246 ENABLE_PRESENTER_SCREEN=YES
7249 ENABLE_PRESENTER_SCREEN=NO
7250 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PRESENTER_SCREEN"
7252 AC_SUBST(ENABLE_PRESENTER_SCREEN)
7254 # pdf import extension?
7255 AC_MSG_CHECKING([whether to build the PDF Import extension])
7256 if test "x$enable_ext_pdfimport" != "xno" -a "x$enable_extension_integration" != "xno"; then
7257 AC_MSG_RESULT([yes])
7258 ENABLE_PDFIMPORT=YES
7260 dnl ===================================================================
7261 dnl Check for system poppler
7262 dnl ===================================================================
7263 AC_MSG_CHECKING([which pdf backend to use])
7264 if test "$with_system_poppler" = "yes"; then
7265 AC_MSG_RESULT([external])
7267 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
7269 save_CXXFLAGS=$CXXFLAGS
7270 save_CPPFLAGS=$CPPFLAGS
7271 CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
7272 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
7273 AC_CHECK_HEADER([cpp/poppler-version.h], [],
7274 [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
7275 CXXFLAGS=$save_CXXFLAGS
7276 CPPFLAGS=$save_CPPFLAGS
7279 AC_MSG_RESULT([internal])
7281 BUILD_TYPE="$BUILD_TYPE XPDF"
7286 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PDFIMPORT"
7288 AC_SUBST(ENABLE_PDFIMPORT)
7289 AC_SUBST(SYSTEM_POPPLER)
7290 AC_SUBST(POPPLER_CFLAGS)
7291 AC_SUBST(POPPLER_LIBS)
7294 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
7295 AC_MSG_CHECKING([for sdext module])
7296 BUILD_TYPE="$BUILD_TYPE SDEXT"
7299 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
7300 if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
7301 AC_MSG_RESULT([yes])
7302 AC_MSG_CHECKING([for swext module])
7303 ENABLE_MEDIAWIKI=YES
7304 BUILD_TYPE="$BUILD_TYPE SWEXT"
7305 if test "x$with_java" = "xno"; then
7306 AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
7311 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
7313 AC_SUBST(ENABLE_MEDIAWIKI)
7315 if test "$ENABLE_MEDIAWIKI" = "YES"; then
7316 AC_MSG_CHECKING([which Servlet API Jar to use])
7317 if test "$with_system_servlet_api" = "yes"; then
7318 AC_MSG_RESULT([external])
7319 SYSTEM_SERVLETAPI=YES
7320 if test -z "$SERVLETAPI_JAR"; then
7321 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
7323 AC_CHECK_FILE($SERVLETAPI_JAR, [],
7324 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
7326 AC_MSG_RESULT([internal])
7327 SYSTEM_SERVLETAPI=NO
7328 BUILD_TYPE="$BUILD_TYPE TOMCAT"
7331 AC_SUBST(SYSTEM_SERVLETAPI)
7332 AC_SUBST(SERVLETAPI_JAR)
7334 AC_MSG_CHECKING([whether to build the Report Builder extension])
7335 if test "$enable_ext_report_builder" != "no" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
7336 AC_MSG_RESULT([yes])
7337 ENABLE_REPORTBUILDER=YES
7338 AC_MSG_CHECKING([for reportbuilder module])
7339 AC_MSG_CHECKING([which jfreereport libs to use])
7340 if test "$with_system_jfreereport" = "yes"; then
7341 SYSTEM_JFREEREPORT=YES
7342 AC_MSG_RESULT([external])
7343 if test -z $SAC_JAR; then
7344 SAC_JAR=/usr/share/java/sac.jar
7346 AC_CHECK_FILE($SAC_JAR, [],
7347 [AC_MSG_ERROR(sac.jar not found.)], [])
7349 if test -z $LIBXML_JAR; then
7350 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
7351 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
7353 AC_CHECK_FILE(/usr/share/java/libxml.jar,
7354 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
7355 [AC_MSG_ERROR(libxml.jar replacement not found.)]
7360 AC_CHECK_FILE($LIBXML_JAR, [],
7361 [AC_MSG_ERROR(libxml.jar not found.)], [])
7364 if test -z $FLUTE_JAR; then
7365 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
7366 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
7368 AC_CHECK_FILE(/usr/share/java/flute.jar,
7369 [ FLUTE_JAR=/usr/share/java/flute.jar ],
7370 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
7375 AC_CHECK_FILE($FLUTE_JAR, [],
7376 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
7379 if test -z $JFREEREPORT_JAR; then
7380 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
7381 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
7383 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
7384 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
7385 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
7390 AC_CHECK_FILE($JFREEREPORT_JAR, [],
7391 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
7394 if test -z $LIBLAYOUT_JAR; then
7395 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
7396 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
7398 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
7399 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
7400 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
7405 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
7406 [AC_MSG_ERROR(liblayout.jar not found.)], [])
7409 if test -z $LIBLOADER_JAR; then
7410 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
7411 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
7413 AC_CHECK_FILE(/usr/share/java/libloader.jar,
7414 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
7415 [AC_MSG_ERROR(libloader.jar replacement not found.)]
7420 AC_CHECK_FILE($LIBLOADER_JAR, [],
7421 [AC_MSG_ERROR(libloader.jar not found.)], [])
7424 if test -z $LIBFORMULA_JAR; then
7425 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
7426 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
7428 AC_CHECK_FILE(/usr/share/java/libformula.jar,
7429 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
7430 [AC_MSG_ERROR(libformula.jar replacement not found.)]
7435 AC_CHECK_FILE($LIBFORMULA_JAR, [],
7436 [AC_MSG_ERROR(libformula.jar not found.)], [])
7439 if test -z $LIBREPOSITORY_JAR; then
7440 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
7441 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
7443 AC_CHECK_FILE(/usr/share/java/librepository.jar,
7444 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
7445 [AC_MSG_ERROR(librepository.jar replacement not found.)]
7450 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
7451 [AC_MSG_ERROR(librepository.jar not found.)], [])
7454 if test -z $LIBFONTS_JAR; then
7455 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
7456 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
7458 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
7459 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
7460 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
7465 AC_CHECK_FILE($LIBFONTS_JAR, [],
7466 [AC_MSG_ERROR(libfonts.jar not found.)], [])
7469 if test -z $LIBSERIALIZER_JAR; then
7470 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
7471 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
7473 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
7474 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
7475 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
7480 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
7481 [AC_MSG_ERROR(libserializer.jar not found.)], [])
7485 if test -z $LIBBASE_JAR; then
7486 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
7487 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
7489 AC_CHECK_FILE(/usr/share/java/libbase.jar,
7490 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
7491 [AC_MSG_ERROR(libbase.jar replacement not found.)]
7496 AC_CHECK_FILE($LIBBASE_JAR, [],
7497 [AC_MSG_ERROR(libbase.jar not found.)], [])
7501 AC_MSG_RESULT([internal])
7502 AC_MSG_CHECKING([for jfreereport module])
7503 SYSTEM_JFREEREPORT=NO
7504 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
7506 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
7509 ENABLE_REPORTBUILDER=NO
7510 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN"
7511 SYSTEM_JFREEREPORT=NO
7513 AC_SUBST(ENABLE_REPORTBUILDER)
7514 AC_SUBST(SYSTEM_JFREEREPORT)
7516 AC_SUBST(LIBXML_JAR)
7518 AC_SUBST(JFREEREPORT_JAR)
7519 AC_SUBST(LIBBASE_JAR)
7520 AC_SUBST(LIBLAYOUT_JAR)
7521 AC_SUBST(LIBLOADER_JAR)
7522 AC_SUBST(LIBFORMULA_JAR)
7523 AC_SUBST(LIBREPOSITORY_JAR)
7524 AC_SUBST(LIBFONTS_JAR)
7525 AC_SUBST(LIBSERIALIZER_JAR)
7527 # this has to be here because both the Wiki Publisher and the SRB use
7529 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
7530 AC_MSG_CHECKING([which Apache commons-* libs to use])
7531 if test "$with_system_apache_commons" = "yes"; then
7532 SYSTEM_APACHE_COMMONS=YES
7533 AC_MSG_RESULT([external])
7534 if test "$ENABLE_MEDIAWIKI" = "YES"; then
7535 if test -z $COMMONS_CODEC_JAR; then
7536 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
7537 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
7539 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
7540 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
7541 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
7546 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
7547 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
7550 if test -z $COMMONS_LANG_JAR; then
7551 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
7552 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
7554 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
7555 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
7556 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
7561 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
7562 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
7565 if test -z $COMMONS_HTTPCLIENT_JAR; then
7566 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
7567 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
7569 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
7570 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
7571 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
7576 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
7577 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
7580 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
7581 if test -z $COMMONS_LOGGING_JAR; then
7582 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
7583 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
7585 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
7586 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
7587 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
7592 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
7593 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
7597 AC_MSG_RESULT([internal])
7598 SYSTEM_APACHE_COMMONS=NO
7599 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
7602 AC_SUBST(SYSTEM_APACHE_COMMONS)
7603 AC_SUBST(COMMONS_CODEC_JAR)
7604 AC_SUBST(COMMONS_LANG_JAR)
7605 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
7606 AC_SUBST(COMMONS_LOGGING_JAR)
7608 # scripting provider for BeanShell extension?
7609 AC_MSG_CHECKING([whether to build extension for support of scripts in BeanShell])
7610 if test "x$enable_ext_scripting_beanshell" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
7611 AC_MSG_RESULT([yes])
7612 ENABLE_SCRIPTING_BEANSHELL=YES
7615 ENABLE_SCRIPTING_BEANSHELL=NO
7616 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_BEANSHELL"
7618 AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
7620 # scripting provider for JavaScript extension?
7621 AC_MSG_CHECKING([whether to build extension for support of scripts in JavaScript])
7622 if test "x$enable_ext_scripting_javascript" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
7623 AC_MSG_RESULT([yes])
7624 ENABLE_SCRIPTING_JAVASCRIPT=YES
7627 ENABLE_SCRIPTING_JAVASCRIPT=NO
7628 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_JAVASCRIPT"
7630 AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
7632 dnl Scripting provider for Python extension?
7633 dnl We always provide this unless we have disabled Python completely
7634 if test $enable_python = no; then
7635 ENABLE_SCRIPTING_PYTHON=NO
7637 ENABLE_SCRIPTING_PYTHON=YES
7639 AC_SUBST(ENABLE_SCRIPTING_PYTHON)
7643 x86_64 | powerpc64 | s390x)
7644 if test "$SIZEOF_LONG" = "8"; then
7645 supports_multilib="yes"
7652 dnl ===================================================================
7653 dnl Check whether the Qt3 and KDE3 libraries are available.
7654 dnl ===================================================================
7658 if test "$_os" != "OpenBSD"; then
7661 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
7662 dnl Search paths for Qt3 and KDE3
7663 if test -z "$supports_multilib" ; then
7664 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"
7665 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"
7667 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"
7668 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"
7670 if test -n "$QTDIR" ; then
7671 qt_incdirs="$QTDIR/include $qt_incdirs"
7672 if test -z "$supports_multilib" ; then
7673 qt_libdirs="$QTDIR/lib $qt_libdirs"
7675 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
7678 if test -z "$supports_multilib" ; then
7679 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"
7680 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"
7682 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"
7683 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"
7685 if test -n "$KDEDIR" ; then
7686 kde_incdirs="$KDEDIR/include $kde_incdirs"
7687 if test -z "$supports_multilib" ; then
7688 kde_libdirs="$KDEDIR/lib $kde_libdirs"
7690 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
7695 qt_test_include="qstyle.h"
7696 kde_test_include="kapp.h"
7698 if test "$_os" != "OpenBSD"; then
7699 qt_test_library="libqt-mt.so"
7700 kde_test_library="libDCOP.so"
7702 qt_test_library="libqt-mt.so*"
7703 kde_test_library="libDCOP.so*"
7706 dnl Check for Qt3 headers
7707 AC_MSG_CHECKING([for Qt3 headers])
7709 for kde_check in $qt_incdirs ; do
7710 if test -r "$kde_check/$qt_test_include" ; then
7711 qt_incdir="$kde_check"
7715 AC_MSG_RESULT([$qt_incdir])
7716 if test "x$qt_incdir" = "xno" ; then
7717 AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
7718 your Qt3 installation by exporting QTDIR before running "configure".])
7721 dnl Check for Qt3 libraries
7722 AC_MSG_CHECKING([for Qt3 libraries])
7724 for qt_check in $qt_libdirs ; do
7725 if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`" ; then
7726 qt_libdir="$qt_check"
7730 AC_MSG_RESULT([$qt_libdir])
7731 if test "x$qt_libdir" = "xno" ; then
7732 AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
7733 your Qt3 installation by exporting QTDIR before running "configure".])
7736 dnl Check for Meta Object Compiler
7737 AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
7738 if test "$MOC" = "no" ; then
7739 AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
7740 the root of your Qt3 installation by exporting QTDIR before running "configure".])
7743 dnl Check for KDE3 headers
7744 AC_MSG_CHECKING([for KDE3 headers])
7746 for kde_check in $kde_incdirs ; do
7747 if test -r "$kde_check/$kde_test_include" ; then
7748 kde_incdir="$kde_check"
7752 AC_MSG_RESULT([$kde_incdir])
7753 if test "x$kde_incdir" = "xno" ; then
7754 AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
7755 your KDE3 installation by exporting KDEDIR before running "configure".])
7758 dnl Check for KDE3 libraries
7759 AC_MSG_CHECKING([for KDE3 libraries])
7761 for kde_check in $kde_libdirs ; do
7762 if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`" ; then
7763 kde_libdir="$kde_check"
7767 AC_MSG_RESULT([$kde_libdir])
7768 if test "x$kde_libdir" = "xno" ; then
7769 AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
7770 your KDE3 installation by exporting KDEDIR before running "configure".])
7773 dnl Set the variables
7774 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
7775 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
7777 AC_SUBST(KDE_CFLAGS)
7781 dnl ===================================================================
7782 dnl KDE4 Integration
7783 dnl ===================================================================
7792 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
7793 qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
7794 qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
7796 kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
7797 kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
7799 if test -n "$supports_multilib" ; then
7800 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
7801 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
7804 if test -n "$QTDIR" ; then
7805 qt_incdirs="$QTDIR/include $qt_incdirs"
7806 if test -z "$supports_multilib" ; then
7807 qt_libdirs="$QTDIR/lib $qt_libdirs"
7809 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
7812 if test -n "$QT4DIR" ; then
7813 qt_incdirs="$QT4DIR/include $qt_incdirs"
7814 if test -z "$supports_multilib" ; then
7815 qt_libdirs="$QT4DIR/lib $qt_libdirs"
7817 qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
7821 if test -n "$KDEDIR" ; then
7822 kde_incdirs="$KDEDIR/include $kde_incdirs"
7823 if test -z "$supports_multilib" ; then
7824 kde_libdirs="$KDEDIR/lib $kde_libdirs"
7826 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
7829 if test -n "$KDE4DIR" ; then
7830 kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
7831 if test -z "$supports_multilib" ; then
7832 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
7834 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
7838 qt_test_include="Qt/qobject.h"
7839 qt_test_library="libQtCore.so"
7840 kde_test_include="kwindowsystem.h"
7841 kde_test_library="libsolid.so"
7843 AC_MSG_CHECKING([for Qt4 headers])
7845 for inc_dir in $qt_incdirs ; do
7846 if test -r "$inc_dir/$qt_test_include" ; then
7847 qt_header_dir="$inc_dir"
7852 AC_MSG_RESULT([$qt_header_dir])
7853 if test "x$qt_header_dir" = "xno" ; then
7854 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
7858 AC_PATH_PROG( QMAKEQT4, qmake-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7860 if test "$QMAKE4" = "no" ; then
7861 AC_PATH_PROG( QMAKE4, qmake, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7862 if test "$QMAKE4" = "no" ; then
7863 AC_MSG_ERROR([Qmake not found. Please specify
7864 the root of your Qt installation by exporting QT4DIR before running "configure".])
7868 qt_libdirs="`$QMAKE4 -query QT_INSTALL_LIBS` $qt_libdirs"
7869 AC_MSG_CHECKING([for Qt4 libraries])
7871 for lib_dir in $qt_libdirs ; do
7872 if test -r "$lib_dir/$qt_test_library" ; then
7873 qt_lib_dir="$lib_dir"
7874 PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
7879 AC_MSG_RESULT([$qt_lib_dir])
7881 if test "x$qt_lib_dir" = "xno" ; then
7882 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
7885 dnl Check for Meta Object Compiler
7887 AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7889 if test "$MOC4" = "no" ; then
7890 AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
7891 if test "$MOC4" = "no" ; then
7892 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
7893 the root of your Qt installation by exporting QT4DIR before running "configure".])
7897 dnl Check for KDE4 headers
7898 AC_MSG_CHECKING([for KDE4 headers])
7900 for kde_check in $kde_incdirs ; do
7901 if test -r "$kde_check/$kde_test_include" ; then
7902 kde_incdir="$kde_check"
7906 AC_MSG_RESULT([$kde_incdir])
7907 if test "x$kde_incdir" = "xno" ; then
7908 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
7911 dnl Check for KDE4 libraries
7912 AC_MSG_CHECKING([for KDE4 libraries])
7914 for kde_check in $kde_libdirs ; do
7915 if test -r "$kde_check/$kde_test_library" ; then
7916 kde_libdir="$kde_check"
7921 AC_MSG_RESULT([$kde_libdir])
7922 if test "x$kde_libdir" = "xno" ; then
7923 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
7926 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
7927 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
7930 save_CXXFLAGS=$CXXFLAGS
7931 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
7932 AC_MSG_CHECKING([whether KDE is >= 4.2])
7933 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7934 #include <kdeversion.h>
7936 int main(int argc, char **argv) {
7937 if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
7940 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
7941 CXXFLAGS=$save_CXXFLAGS
7944 # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled
7945 PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
7947 AC_MSG_WARN([[No Glib found, KDE4 support will not integrate with Qt's Glib event loop support]]))
7949 AC_SUBST(KDE4_CFLAGS)
7952 AC_SUBST(KDE_GLIB_CFLAGS)
7953 AC_SUBST(KDE_GLIB_LIBS)
7954 AC_SUBST(KDE_HAVE_GLIB)
7956 dnl ===================================================================
7957 dnl Test for the enabling the lockdown pieces
7958 dnl ===================================================================
7959 AC_MSG_CHECKING([whether to enable the lockdown pieces])
7961 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
7963 AC_MSG_RESULT([yes])
7967 AC_SUBST(ENABLE_LOCKDOWN)
7969 dnl ===================================================================
7970 dnl Test whether to include Evolution 2 support
7971 dnl ===================================================================
7972 AC_MSG_CHECKING([whether to enable evolution 2 support])
7973 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
7974 AC_MSG_RESULT([yes])
7975 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
7976 ENABLE_EVOAB2="TRUE"
7981 AC_SUBST(ENABLE_EVOAB2)
7982 AC_SUBST(GOBJECT_CFLAGS)
7983 AC_SUBST(GOBJECT_LIBS)
7985 dnl ===================================================================
7986 dnl Test whether to include KDE AB support
7987 dnl ===================================================================
7988 AC_MSG_CHECKING([whether to enable KDE address book support])
7989 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
7990 AC_MSG_RESULT([yes])
7992 save_CXXFLAGS=$CXXFLAGS
7993 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
7994 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
7995 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7996 #include <kdeversion.h>
7998 int main(int argc, char **argv) {
7999 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
8002 ]])],[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])],[])
8003 CXXFLAGS=$save_CXXFLAGS
8010 AC_SUBST(ENABLE_KAB)
8012 dnl ===================================================================
8013 dnl Test whether to include MathMLDTD
8014 dnl ===================================================================
8015 AC_MSG_CHECKING([whether to include MathMLDTD])
8016 if test -n "$enable_mathmldtd"; then
8017 if test "$enable_mathmldtd" = "no"; then
8019 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
8021 AC_MSG_RESULT([yes])
8022 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
8026 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
8029 dnl ===================================================================
8030 dnl Test which themes to include
8031 dnl ===================================================================
8032 AC_MSG_CHECKING([which themes to include])
8033 # if none given, use all available themes
8034 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
8035 with_theme="default crystal hicontrast oxygen tango"
8039 for theme in $with_theme; do
8041 default|crystal|hicontrast|oxygen|tango|human) : ;;
8042 *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
8044 WITH_THEMES="$WITH_THEMES $theme"
8045 SCPDEFS="$SCPDEFS -DTHEME_`echo $theme|tr '[[:lower:]]' '[[:upper:]]'`"
8047 AC_MSG_RESULT([$WITH_THEMES])
8048 AC_SUBST([WITH_THEMES])
8050 dnl ===================================================================
8051 dnl Test whether to integrate helppacks into the product's installer
8052 dnl ===================================================================
8053 AC_MSG_CHECKING([for helppack integration])
8054 if test "z$with_helppack_integration" = "zno" ; then
8055 WITH_HELPPACK_INTEGRATION=NO
8056 AC_MSG_RESULT([no integration])
8058 WITH_HELPPACK_INTEGRATION=YES
8059 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
8060 AC_MSG_RESULT([integration])
8062 AC_SUBST(WITH_HELPPACK_INTEGRATION)
8064 ###############################################################################
8065 # Extensions checking
8066 ###############################################################################
8067 dnl ===================================================================
8068 dnl Test whether to integrate extensions into the product's installer
8069 dnl ===================================================================
8070 AC_MSG_CHECKING([for extensions integration])
8071 if test "x$enable_extension_integration" != "xno"; then
8072 WITH_EXTENSION_INTEGRATION=YES
8073 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
8074 AC_MSG_RESULT([yes, use integration])
8076 WITH_EXTENSION_INTEGRATION=NO
8077 AC_MSG_RESULT([no, do not integrate])
8079 AC_SUBST(WITH_EXTENSION_INTEGRATION)
8081 dnl ===================================================================
8082 dnl Test whether to include Watch Window extension
8083 dnl ===================================================================
8084 AC_MSG_CHECKING([for Watch Window extension integration])
8085 WATCH_WINDOW_EXTENSION_PACK=
8086 if test "x$enable_ext_watch_window" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8087 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_WATCH_WINDOW"
8088 WATCH_WINDOW_EXTENSION_PACK="23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt"
8089 AC_MSG_RESULT([yes])
8093 AC_SUBST(WATCH_WINDOW_EXTENSION_PACK)
8095 dnl ===================================================================
8096 dnl Test whether to include SmART Gallery (Diagram) extension
8097 dnl ===================================================================
8098 AC_MSG_CHECKING([for SmART Gallery (Diagram) extension integration])
8099 DIAGRAM_EXTENSION_PACK=
8100 if test "x$enable_ext_diagram" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8101 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_DIAGRAM"
8102 DIAGRAM_EXTENSION_PACK="8d74685d41f8bffe8c3e71fe8deac09d-SmART_0.9.5.oxt"
8103 AC_MSG_RESULT([yes])
8107 AC_SUBST(DIAGRAM_EXTENSION_PACK)
8109 dnl ===================================================================
8110 dnl Test whether to include Validator extension
8111 dnl ===================================================================
8112 AC_MSG_CHECKING([for Validator extension integration])
8113 VALIDATOR_EXTENSION_PACK=
8114 if test "x$enable_ext_validator" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8115 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_VALIDATOR"
8116 VALIDATOR_EXTENSION_PACK="bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt"
8117 AC_MSG_RESULT([yes])
8121 AC_SUBST(VALIDATOR_EXTENSION_PACK)
8123 dnl ===================================================================
8124 dnl Test whether to include Barcode extension
8125 dnl ===================================================================
8126 AC_MSG_CHECKING([for Barcode extension integration])
8127 BARCODE_EXTENSION_PACK=
8128 if test "x$enable_ext_barcode" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8129 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_BARCODE"
8130 BARCODE_EXTENSION_PACK="3ed18025a766f1e955707b969c8113a5-Barcode_1.3.5.0.oxt"
8131 AC_MSG_RESULT([yes])
8135 AC_SUBST([BARCODE_EXTENSION_PACK])
8137 dnl ===================================================================
8138 dnl Test whether to include ConvertTextToNumber extension
8139 dnl ===================================================================
8140 AC_MSG_CHECKING([for ConvertTextToNumber extension integration])
8141 CT2N_EXTENSION_PACK=
8142 if test "x$enable_ext_ct2n" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8143 BUILD_TYPE="$BUILD_TYPE CT2N"
8144 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N"
8145 CT2N_EXTENSION_PACK="451ccf439a36a568653b024534669971-ConvertTextToNumber_1.3.2.oxt"
8146 AC_MSG_RESULT([yes])
8150 AC_SUBST(CT2N_EXTENSION_PACK)
8152 dnl ===================================================================
8153 dnl Test whether to include Numbertext extension
8154 dnl ===================================================================
8155 AC_MSG_CHECKING([for Numbertext extension integration])
8156 NUMBERTEXT_EXTENSION_PACK=
8157 if test "x$enable_ext_numbertext" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8158 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NUMBERTEXT"
8159 NUMBERTEXT_EXTENSION_PACK="b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt"
8160 AC_MSG_RESULT([yes])
8164 AC_SUBST(NUMBERTEXT_EXTENSION_PACK)
8166 dnl ===================================================================
8167 dnl Test whether to include Hungarian Cross-reference Toolbar extension
8168 dnl ===================================================================
8169 AC_MSG_CHECKING([for Hungarian Cross-reference Toolbar extension integration])
8170 HUNART_EXTENSION_PACK=
8171 if test "x$enable_ext_hunart" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8172 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_HUNART"
8173 HUNART_EXTENSION_PACK="b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt"
8174 AC_MSG_RESULT([yes])
8178 AC_SUBST(HUNART_EXTENSION_PACK)
8180 dnl ===================================================================
8181 dnl Test whether to include Typography Toolbar extension
8182 dnl ===================================================================
8183 AC_MSG_CHECKING([for Typography Toolbar extension integration])
8184 TYPO_EXTENSION_PACK=
8185 if test "x$enable_ext_typo" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8186 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_TYPO"
8187 TYPO_EXTENSION_PACK="9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt"
8188 AC_MSG_RESULT([yes])
8192 AC_SUBST(TYPO_EXTENSION_PACK)
8194 dnl ===================================================================
8195 dnl Test whether to include Google Docs extension
8196 dnl ===================================================================
8197 AC_MSG_CHECKING([for Google Docs extension integration])
8198 GOOGLE_DOCS_EXTENSION_PACK=
8199 if test "x$enable_ext_google_docs" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8200 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_GOOGLE_DOCS"
8201 GOOGLE_DOCS_EXTENSION_PACK="cea0f63d5985ba4fcbd882031df44346-gdocs_3.0.0_modified.oxt"
8202 AC_MSG_RESULT([yes])
8206 AC_SUBST(GOOGLE_DOCS_EXTENSION_PACK)
8208 dnl ===================================================================
8209 dnl Test whether to include NLPSolver extension
8210 dnl ===================================================================
8211 AC_MSG_CHECKING([for NLPSolver extension integration])
8212 if test "x$enable_ext_nlpsolver" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
8213 BUILD_TYPE="$BUILD_TYPE NLPSOLVER"
8214 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER"
8215 AC_MSG_RESULT([yes])
8220 dnl ===================================================================
8221 dnl Test whether to include LanguageTool extension
8222 dnl ===================================================================
8223 AC_MSG_CHECKING([for LanguageTool extension integration])
8224 if test "x$enable_ext_languagetool" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8225 BUILD_TYPE="$BUILD_TYPE LANGUAGETOOL"
8226 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL"
8227 AC_MSG_RESULT([yes])
8232 dnl ===================================================================
8233 dnl Test whether to include oooblogger extension
8234 dnl ===================================================================
8235 AC_MSG_CHECKING([for oooblogger extension integration])
8236 OOOBLOGGER_EXTENSION_PACK=
8237 if test "x$enable_ext_oooblogger" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8238 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_OOOBLOGGER"
8239 OOOBLOGGER_EXTENSION_PACK="b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt"
8240 AC_MSG_RESULT([yes])
8244 AC_SUBST(OOOBLOGGER_EXTENSION_PACK)
8245 ###############################################################################
8247 dnl ===================================================================
8248 dnl Test whether to include Sun Professional Template Pack
8249 dnl ===================================================================
8250 AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
8251 if test "z$with_sun_templates" = "z" -o "z$with_sun_templates" = "zno" ; then
8252 SUNTEMPLATES_LANG=""
8253 AC_MSG_RESULT([no integration])
8255 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
8256 sun_supported_langs="en-US de it fr es hu"
8257 if test "z$with_sun_templates" = "zyes" ; then
8258 wanted_sun_templates="$sun_supported_langs"
8260 # check whether the langs are supported by Sun
8261 wanted_sun_templates=
8262 for lang in $with_sun_templates ; do
8263 if test -n "`echo $sun_supported_langs | grep "$lang"`" ; then
8264 wanted_sun_templates="$wanted_sun_templates $lang"
8269 SUNTEMPLATES_DE_PACK=
8270 SUNTEMPLATES_EN_US_PACK=
8271 SUNTEMPLATES_ES_PACK=
8272 SUNTEMPLATES_FR_PACK=
8273 SUNTEMPLATES_HU_PACK=
8274 SUNTEMPLATES_IT_PACK=
8275 # check whether the langs are requested at all
8276 for lang in $wanted_sun_templates ; do
8277 if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then
8278 SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
8280 "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
8281 "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
8282 "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
8283 "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
8284 "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
8285 "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
8289 AC_MSG_RESULT([$SUNTEMPLATES_LANG])
8291 AC_SUBST(SUNTEMPLATES_LANG)
8292 AC_SUBST(SUNTEMPLATES_DE_PACK)
8293 AC_SUBST(SUNTEMPLATES_EN_US_PACK)
8294 AC_SUBST(SUNTEMPLATES_ES_PACK)
8295 AC_SUBST(SUNTEMPLATES_FR_PACK)
8296 AC_SUBST(SUNTEMPLATES_HU_PACK)
8297 AC_SUBST(SUNTEMPLATES_IT_PACK)
8299 dnl ===================================================================
8300 dnl Test whether to include fonts
8301 dnl ===================================================================
8302 AC_MSG_CHECKING([whether to include third-party fonts])
8303 if test "$with_fonts" != "no" ; then
8304 AC_MSG_RESULT([yes])
8306 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
8310 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
8312 AC_SUBST(WITH_FONTS)
8314 AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
8315 if test "$with_agfa_monotype_fonts" = "yes" ; then
8316 AC_MSG_RESULT([yes])
8317 WITH_AGFA_MONOTYPE_FONTS=YES
8318 SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
8319 BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
8322 WITH_AGFA_MONOTYPE_FONTS=NO
8324 AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
8326 dnl ===================================================================
8327 dnl Test whether to include ppds
8328 dnl ===================================================================
8329 AC_MSG_CHECKING([whether to include PPDs])
8330 if test "$with_ppds" != "no"; then
8331 AC_MSG_RESULT([yes])
8335 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
8337 AC_SUBST(WITHOUT_PPDS)
8339 dnl ===================================================================
8340 dnl Test whether to include afms
8341 dnl ===================================================================
8342 AC_MSG_CHECKING([whether to include AFMs])
8343 if test "$with_afms" != "no"; then
8344 AC_MSG_RESULT([yes])
8345 BUILD_TYPE="$BUILD_TYPE AFMS"
8349 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
8351 AC_SUBST(WITHOUT_AFMS)
8353 dnl ===================================================================
8354 dnl Test whether to include extra galleries
8355 dnl ===================================================================
8356 AC_MSG_CHECKING([whether to include extra galleries])
8357 if test "z$enable_extra_gallery" = "z" -o "z$enable_extra_gallery" = "zno" ; then
8359 WITH_EXTRA_GALLERY=NO
8360 OOOP_GALLERY_PACK=""
8362 AC_MSG_RESULT([yes])
8363 WITH_EXTRA_GALLERY=YES
8364 BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
8365 SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
8366 OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
8368 AC_SUBST(WITH_EXTRA_GALLERY)
8369 AC_SUBST(OOOP_GALLERY_PACK)
8371 dnl ===================================================================
8372 dnl Test whether to include extra templates
8373 dnl ===================================================================
8374 AC_MSG_CHECKING([whether to include extra templates])
8375 if test "z$enable_extra_template" = "z" -o "z$enable_extra_template" = "zno" ; then
8377 WITH_EXTRA_TEMPLATE=NO
8378 OOOP_TEMPLATES_PACK=""
8380 AC_MSG_RESULT([yes])
8381 WITH_EXTRA_TEMPLATE=YES
8382 BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
8383 SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
8384 OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
8386 AC_SUBST(WITH_EXTRA_TEMPLATE)
8387 AC_SUBST(OOOP_TEMPLATES_PACK)
8389 dnl ===================================================================
8390 dnl Test whether to include extra samples
8391 dnl ===================================================================
8392 AC_MSG_CHECKING([whether to include extra samples])
8393 if test "z$enable_extra_sample" = "z" -o "z$enable_extra_sample" = "zno" ; then
8395 WITH_EXTRA_SAMPLE=NO
8396 OOOP_SAMPLES_PACK=""
8398 AC_MSG_RESULT([yes])
8399 WITH_EXTRA_SAMPLE=YES
8400 BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
8401 SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
8402 OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
8404 AC_SUBST(WITH_EXTRA_SAMPLE)
8405 AC_SUBST(OOOP_SAMPLES_PACK)
8407 dnl ===================================================================
8408 dnl Test whether to include extra fonts
8409 dnl ===================================================================
8410 AC_MSG_CHECKING([whether to include extra fonts])
8411 if test "z$enable_extra_font" = "z" -o "z$enable_extra_font" = "zno" ; then
8416 AC_MSG_RESULT([yes])
8418 BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
8419 SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
8420 OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
8422 AC_SUBST(WITH_EXTRA_FONT)
8423 AC_SUBST(OOOP_FONTS_PACK)
8425 dnl ===================================================================
8426 dnl Test whether to download OxygenOffice branding and set custom settings
8427 dnl ===================================================================
8428 AC_MSG_CHECKING([whether to download OxygenOffice branding and set custom settings])
8429 if test "z$enable_oxygenoffice" = "z" -o "z$enable_oxygenoffice" = "zno" ; then
8431 ENABLE_OXYGENOFFICE=NO
8433 AC_MSG_RESULT([yes])
8434 ENABLE_OXYGENOFFICE=YES
8435 OXYGENOFFICE_PACK="18bf204479ff641d99a88cd71f6f25f7-oxygenoffice-001.zip"
8436 BUILD_TYPE="$BUILD_TYPE OXYGENOFFICE"
8438 AC_SUBST(ENABLE_OXYGENOFFICE)
8439 AC_SUBST(OXYGENOFFICE_PACK)
8441 dnl ===================================================================
8442 dnl Test whether to build global menu support
8443 dnl ===================================================================
8444 AC_MSG_CHECKING([whether to build global menu support])
8445 if test "z$enable_lomenubar" = "z" -o "z$enable_lomenubar" = "zno" ; then
8447 ENABLE_LOMENUBAR="FALSE"
8449 AC_MSG_RESULT([yes])
8450 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]))
8451 ENABLE_LOMENUBAR="TRUE"
8453 AC_SUBST(ENABLE_LOMENUBAR)
8455 dnl ===================================================================
8456 dnl Test whether to enable online update service
8457 dnl ===================================================================
8458 AC_MSG_CHECKING([whether to enable online update])
8459 ENABLE_ONLINE_UPDATE=
8460 if test "z$enable_online_update" = "z" ; then
8461 if test "$_os" = "WINNT" -o "$_os" = "Darwin" ; then
8462 AC_MSG_RESULT([yes])
8463 ENABLE_ONLINE_UPDATE="TRUE"
8468 if test "z$enable_online_update" = "zyes" ; then
8469 AC_MSG_RESULT([yes])
8470 ENABLE_ONLINE_UPDATE="TRUE"
8475 AC_SUBST(ENABLE_ONLINE_UPDATE)
8477 dnl ===================================================================
8478 dnl Test whether build target is Release Build
8479 dnl ===================================================================
8480 AC_MSG_CHECKING([whether build target is Release Build])
8481 if test "z$enable_release_build" = "z" -o "z$enable_release_build" = "zno" ; then
8483 ENABLE_RELEASE_BUILD="FALSE"
8485 AC_MSG_RESULT([yes])
8486 ENABLE_RELEASE_BUILD="TRUE"
8488 AC_SUBST(ENABLE_RELEASE_BUILD)
8490 dnl ===================================================================
8491 dnl Test whether to create MSI with LIMITUI=1 (silent install)
8492 dnl ===================================================================
8493 AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
8494 if test "z$enable_silent_msi" = "z" -o "z$enable_silent_msi" = "zno" ; then
8496 ENABLE_SILENT_MSI="FALSE"
8498 AC_MSG_RESULT([yes])
8499 ENABLE_SILENT_MSI="TRUE"
8500 SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
8502 AC_SUBST(ENABLE_SILENT_MSI)
8504 dnl ===================================================================
8505 dnl Test whether to enable ActiveX embedding
8506 dnl ===================================================================
8507 if test "$_os" = "WINNT"; then
8508 AC_MSG_CHECKING([whether to enable ActiveX embedding of LibreOffice components])
8509 if test "$enable_activex_component" = "yes" -o "$enable_activex_component" = "TRUE" -o "$enable_activex_component" = ""; then
8510 ENABLE_ACTIVEX_COMPONENT="TRUE"
8511 AC_MSG_RESULT([yes])
8512 SCPDEFS="$SCPDEFS -DWITH_ACTIVEX_COMPONENT"
8514 ENABLE_ACTIVEX_COMPONENT=""
8517 AC_SUBST(ENABLE_ACTIVEX_COMPONENT)
8521 AC_MSG_CHECKING([whether and how to use Xinerama])
8522 if test "$_os" = "Darwin"; then
8524 XINERAMA_LINK=dynamic
8525 AC_MSG_RESULT([yes])
8526 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
8527 if test "$x_libraries" = "default_x_libraries"; then
8528 XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
8529 if test "x$XINERAMALIB" = x; then
8530 XINERAMALIB="/usr/lib"
8533 XINERAMALIB="$x_libraries"
8535 if test -e "$XINERAMALIB/libXinerama.so" -a -e "$XINERAMALIB/libXinerama.a"; then
8536 # we have both versions, let the user decide but use the dynamic one
8539 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
8540 XINERAMA_LINK=dynamic
8542 XINERAMA_LINK=static
8544 elif test -e "$XINERAMALIB/libXinerama.so" -a ! -e "$XINERAMALIB/libXinerama.a"; then
8545 # we have only the dynamic version
8547 XINERAMA_LINK=dynamic
8548 elif test -e "$XINERAMALIB/libXinerama.a"; then
8550 if echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
8552 XINERAMA_LINK=static
8562 if test "$USE_XINERAMA" = "YES"; then
8563 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
8564 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
8565 [AC_MSG_ERROR(Xinerama header not found.)], [])
8566 XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
8567 if test "x$XEXTLIB" = x; then
8568 XEXTLIBS="-L$XLIB -L$XINERAMALIB -lXext"
8570 XINERAMA_EXTRA_LIBS="$XEXTLIBS"
8571 if test "$_os" = "FreeBSD"; then
8572 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
8574 if test "$_os" = "Linux"; then
8575 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
8577 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
8578 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
8580 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
8587 AC_SUBST(USE_XINERAMA)
8588 AC_SUBST(XINERAMA_LINK)
8590 dnl ===================================================================
8591 dnl Checks for librsvg
8592 dnl ===================================================================
8594 dnl ENABLE_LIBRSVG is set to "" (for NO), SYSTEM or INTERNAL. The
8595 dnl SYSTEM_LIBRSVG, SYSTEM_GDKPIXBUF etc are redundant.
8601 AC_MSG_CHECKING([what librsvg to use])
8603 case "$enable_librsvg" in
8605 AC_MSG_RESULT([none])
8610 if test $build_os = cygwin -o \
8612 dnl When building on/for these OSes always use the internal one,
8613 dnl if at all. Add more OSes above as needed.
8614 AC_MSG_RESULT([internal])
8615 enable_librsvg=internal
8616 elif test $_os = iOS -o $_os = Android; then
8617 AC_MSG_RESULT([none])
8620 if test "$with_system_libs" = yes; then
8621 AC_MSG_RESULT([system])
8622 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
8623 enable_librsvg=system
8624 elif test "$with_system_libs" = no; then
8625 AC_MSG_RESULT([internal])
8626 enable_librsvg=internal
8628 AC_MSG_RESULT([checking further])
8629 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14,, [:])
8630 if test -z "$LIBRSVG_PKG_ERRORS"; then
8631 enable_librsvg=system
8633 enable_librsvg=internal
8640 AC_MSG_RESULT([internal])
8644 if test $_os = WINNT -a "$WITH_MINGW" != yes; then
8645 AC_MSG_ERROR([Must use internal librsvg when building with MSVC])
8647 AC_MSG_RESULT([system])
8648 PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
8652 AC_MSG_ERROR([Incorrect --enable-librsvg option])
8656 dnl By now enable_librsvg should be "system", "internal" or "no"
8657 case $enable_librsvg in
8659 ENABLE_LIBRSVG=SYSTEM
8664 ENABLE_LIBRSVG=INTERNAL
8666 BUILD_TYPE="$BUILD_TYPE LIBRSVG"
8675 AC_MSG_ERROR([Internal configure script error, invalid enable_librsvg value "$enable_librsvg"])
8679 AC_SUBST(ENABLE_LIBRSVG)
8680 AC_SUBST(LIBRSVG_CFLAGS)
8681 AC_SUBST(LIBRSVG_LIBS)
8682 AC_SUBST(SYSTEM_LIBRSVG)
8684 dnl ===================================================================
8685 dnl Test whether to build cairo or rely on the system version
8686 dnl ===================================================================
8691 AC_MSG_CHECKING([whether to use the system cairo])
8693 if test "$with_system_cairo" = "yes"; then
8695 AC_MSG_RESULT([yes])
8697 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
8699 if test "$test_xrender" = "yes"; then
8700 if test "$with_system_xextensions_headers" != "no"; then
8701 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
8703 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
8704 #ifdef PictStandardA8
8708 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
8713 MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libfontconfig-1.dll libfreetype-6.dll libpixman-1-0.dll libpng15-15.dll libcairo-2.dll"
8717 if test $_os = Android; then
8718 dnl For Android cairo isn't
8721 elif test $_os = WINNT; then
8722 dnl We only need cairo for Windows if we
8723 dnl build librsvg or directx disabled
8724 if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
8725 BUILD_TYPE="$BUILD_TYPE CAIRO"
8728 BUILD_TYPE="$BUILD_TYPE CAIRO"
8732 AC_SUBST(SYSTEM_CAIRO)
8733 AC_SUBST(CAIRO_CFLAGS)
8734 AC_SUBST(CAIRO_LIBS)
8737 dnl ===================================================================
8738 dnl Test whether to build gdk-pixbuf or rely on the system version
8739 dnl ===================================================================
8741 AC_MSG_CHECKING([whether to use the system gdk-pixbuf])
8743 dnl As long as the only thing we need gdk-pixbuf for is below
8744 dnl librsvg, use the same --enable-librsvg (possibly implied
8745 dnl by --with-system-libs) to override this.
8747 if test "$SYSTEM_LIBRSVG" = YES; then
8748 SYSTEM_GDKPIXBUF=YES
8749 AC_MSG_RESULT([yes])
8752 WINNT|Darwin|iOS|Android)
8757 SYSTEM_GDKPIXBUF=YES
8758 AC_MSG_RESULT([yes])
8762 AC_SUBST(SYSTEM_GDKPIXBUF)
8764 dnl ===================================================================
8765 dnl Test whether to build GLib or rely on the system version
8766 dnl ===================================================================
8768 AC_MSG_CHECKING([whether to use the system GLib])
8770 dnl As long as the only thing we need GLib for is below
8771 dnl librsvg, use the same --enable-librsvg (possibly implied
8772 dnl by --with-system-libs) to override this.
8774 if test "$SYSTEM_LIBRSVG" = YES; then
8776 AC_MSG_RESULT([yes])
8779 WINNT|Darwin|iOS|Android)
8785 AC_MSG_RESULT([yes])
8789 AC_SUBST(SYSTEM_GLIB)
8791 dnl ===================================================================
8792 dnl Test whether to build gettext runtime (libintl) or rely on the
8794 dnl ===================================================================
8796 AC_MSG_CHECKING([whether to use the system gettext runtime])
8798 if test "$with_system_gettext" = yes; then
8800 AC_MSG_RESULT([yes])
8803 WINNT|Darwin|iOS|Android)
8809 AC_MSG_RESULT([yes])
8813 AC_SUBST(SYSTEM_GETTEXT)
8815 dnl ===================================================================
8816 dnl Test whether to build libcroco or rely on the system version
8817 dnl ===================================================================
8819 AC_MSG_CHECKING([whether to use the system libcroco])
8821 dnl As long as the only thing we need libcroco for is below
8822 dnl librsvg, use the same --enable-librsvg (possibly implied
8823 dnl by --with-system-libs) to override this.
8825 if test "$SYSTEM_LIBRSVG" = YES; then
8827 AC_MSG_RESULT([yes])
8830 WINNT|Darwin|iOS|Android)
8836 AC_MSG_RESULT([yes])
8840 AC_SUBST(SYSTEM_LIBCROCO)
8842 dnl ===================================================================
8843 dnl Test whether to build Pango or rely on the system version
8844 dnl ===================================================================
8846 AC_MSG_CHECKING([whether to use the system pango])
8848 dnl As long as the only thing we need Pango for is below
8849 dnl librsvg, use the same --enable-librsvg (possibly implied
8850 dnl by --with-system-libs) to override this.
8852 if test "$SYSTEM_LIBRSVG" = YES; then
8854 AC_MSG_RESULT([yes])
8857 WINNT|Darwin|iOS|Android)
8863 AC_MSG_RESULT([yes])
8867 AC_SUBST(SYSTEM_PANGO)
8869 dnl ===================================================================
8870 dnl Test whether to build libgsf or rely on the system version
8871 dnl ===================================================================
8873 AC_MSG_CHECKING([whether to use the system libgsf])
8875 dnl As long as the only thing we need libgsf for is below librsvg (is
8876 dnl it?), use the same --enable-librsvg (possibly implied by
8877 dnl --with-system-libs) to override this.
8879 if test "$SYSTEM_LIBRSVG" = YES; then
8881 AC_MSG_RESULT([yes])
8884 WINNT|Darwin|iOS|Android)
8890 AC_MSG_RESULT([yes])
8894 AC_SUBST(SYSTEM_LIBGSF)
8896 dnl ===================================================================
8897 dnl Test whether to build libpng or rely on the system version
8898 dnl ===================================================================
8900 AC_MSG_CHECKING([whether to use the system libpng])
8902 dnl How should and does this interact with the checks for libpng
8903 dnl related to use of libpng in the quickstarter above? This needs to
8906 if test "$with_system_libpng" = yes; then
8908 AC_MSG_RESULT([yes])
8911 WINNT|Darwin|iOS|Android)
8917 AC_MSG_RESULT([yes])
8921 AC_SUBST(SYSTEM_LIBPNG)
8923 dnl ===================================================================
8924 dnl Test whether to build libjpeg or rely on the system version
8925 dnl ===================================================================
8926 dnl FIXME: this is currently because we have jpeg-6b for our filters
8927 dnl and jpeg-8 as dependency for librsvg
8928 dnl this should be unified into using only one version for both
8930 AC_MSG_CHECKING([whether to use the system libjpeg])
8932 if test "$SYSTEM_JPEG" == "YES"; then
8934 AC_MSG_RESULT([yes])
8937 WINNT|Darwin|iOS|Android)
8943 AC_MSG_RESULT([yes])
8947 AC_SUBST(SYSTEM_LIBJPEG)
8949 dnl ===================================================================
8950 dnl Check for runtime JVM search path
8951 dnl ===================================================================
8952 if test "$SOLAR_JAVA" != ""; then
8953 AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
8954 if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then
8955 AC_MSG_RESULT([yes])
8956 if ! test -d "$with_jvm_path"; then
8957 AC_MSG_ERROR(["$with_jvm_path" not a directory])
8959 if ! test -d "$with_jvm_path"jvm; then
8960 AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
8962 JVM_ONE_PATH_CHECK="$with_jvm_path"
8963 AC_SUBST(JVM_ONE_PATH_CHECK)
8969 dnl ===================================================================
8970 dnl Test for the presence of Ant and that it works
8971 dnl ===================================================================
8973 if test "$SOLAR_JAVA" != ""; then
8974 ANT_HOME=; export ANT_HOME
8975 WITH_ANT_HOME=; export WITH_ANT_HOME
8976 if test -z "$with_ant_home"; then
8977 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
8979 if test "$_os" = "WINNT"; then
8980 with_ant_home=`cygpath -u "$with_ant_home"`
8982 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
8983 WITH_ANT_HOME=$with_ant_home
8984 ANT_HOME=$with_ant_home
8987 if test -z "$ANT"; then
8988 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
8990 # resolve relative or absolute symlink
8991 while test -h "$ANT"; do
8993 a_basename=`basename "$ANT"`
8994 a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
8995 cd "`dirname "$ANT"`"
8996 cd "`dirname "$a_script"`"
8997 ANT="`pwd`"/"`basename "$a_script"`"
9001 AC_MSG_CHECKING([if $ANT works])
9002 cat > conftest.java << EOF
9003 public class conftest {
9004 int testmethod(int a, int b) {
9010 cat > conftest.xml << EOF
9011 <project name="conftest" default="conftest">
9012 <target name="conftest">
9013 <javac srcdir="." includes="conftest.java">
9019 oldJAVA_HOME=$JAVA_HOME
9020 if test "$JAVACISGCJ" = "yes"; then
9021 JAVA_HOME=; export JAVA_HOME
9022 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
9024 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
9026 AC_TRY_EVAL(ant_cmd)
9027 if test $? = 0 && test -f ./conftest.class ; then
9028 AC_MSG_RESULT([Ant works])
9029 if test -z "$WITH_ANT_HOME"; then
9030 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
9031 if test -z "$ANT_HOME"; then
9032 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
9035 ANT_HOME="$WITH_ANT_HOME"
9038 echo "configure: Ant test failed" >&5
9039 cat conftest.java >&5
9040 cat conftest.xml >&5
9041 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
9043 echo "Ant does not work - Some Java projects will not build!" >>warn
9045 JAVA_HOME=$oldJAVA_HOME
9046 rm -f conftest* core core.* *.core
9048 if test -z "$ANT_HOME"; then
9049 ANT_HOME="NO_ANT_HOME"
9053 dnl Checking for ant.jar
9054 if test "$ANT_HOME" != "NO_ANT_HOME"; then
9055 AC_MSG_CHECKING([Ant lib directory])
9056 if test -f $ANT_HOME/lib/ant.jar; then
9057 ANT_LIB="$ANT_HOME/lib"
9059 if test -f $ANT_HOME/ant.jar; then
9062 if test -f /usr/share/java/ant.jar; then
9063 ANT_LIB=/usr/share/java
9065 if test -f /usr/share/ant-core/lib/ant.jar; then
9066 ANT_LIB=/usr/share/ant-core/lib
9068 if test -f $ANT_HOME/lib/ant/ant.jar; then
9069 ANT_LIB="$ANT_HOME/lib/ant"
9071 if test -f /usr/share/lib/ant/ant.jar; then
9072 ANT_LIB=/usr/share/lib/ant
9074 AC_MSG_ERROR([Ant libraries not found!])
9081 AC_MSG_RESULT([Ant lib directory found.])
9086 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
9088 AC_MSG_CHECKING([whether Ant is >= $ant_minver])
9089 ant_version=`$ANT -version | $AWK '{ print $4; }'`
9090 ant_version_major=`echo $ant_version | cut -d. -f1`
9091 ant_version_minor=`echo $ant_version | cut -d. -f2`
9092 echo "configure: ant_version $ant_version " >&5
9093 echo "configure: ant_version_major $ant_version_major " >&5
9094 echo "configure: ant_version_minor $ant_version_minor " >&5
9095 if test "$ant_version_major" -ge "2"; then
9096 AC_MSG_RESULT([yes, $ant_version])
9097 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
9098 AC_MSG_RESULT([yes, $ant_version])
9100 AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
9103 if test "$ENABLE_MEDIAWIKI" = "YES"; then
9104 AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
9107 cat > conftest.java << EOF
9108 public class conftest {
9109 int testmethod(int a, int b) {
9115 cat > conftest.xml << EOF
9116 <project name="conftest" default="conftest">
9117 <target name="conftest" depends="copytest">
9118 <javac srcdir="." includes="conftest.java">
9121 <target name="copytest">
9122 <copy todir="confdir">
9123 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
9125 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
9131 if test "$JAVACISGCJ" = "yes"; then
9132 JAVA_HOME=; export JAVA_HOME
9133 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
9135 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
9137 AC_TRY_EVAL(ant_cmd)
9138 if test $? = 0 && test -f ./conftest.class ; then
9139 AC_MSG_RESULT([yes])
9142 echo "configure: Ant test failed" >&5
9143 cat conftest.java >&5
9144 cat conftest.xml >&5
9146 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
9149 rm -f conftest* core core.* *.core
9153 if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
9154 AC_MSG_CHECKING([for JUnit 4])
9155 if test "$with_junit" = "yes"; then
9156 if test -e /usr/share/java/junit4.jar; then
9157 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
9159 if test -e /usr/share/lib/java/junit.jar; then
9160 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
9162 OOO_JUNIT_JAR=/usr/share/java/junit.jar
9166 OOO_JUNIT_JAR=$with_junit
9168 if test "$_os" = "WINNT"; then
9169 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
9171 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
9172 grep org/junit/Before.class > /dev/null 2>&5
9173 if test $? -eq 0; then
9174 # check if either class-path entry is available for hamcrest or
9176 if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |$GREP -q hamcrest || \
9177 "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |$GREP 'Class-Path:' | $GREP -q 'hamcrest'; then
9178 AC_MSG_RESULT([$OOO_JUNIT_JAR])
9180 AC_MSG_ERROR([your junit jar neither sets a classpath nor includes hamcrest; please
9181 provide a full junit jar or use --without-junit])
9185 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
9186 location (/usr/share/java), specify its pathname via
9187 --with-junit=..., or disable it via --without-junit])
9189 if test $OOO_JUNIT_JAR != ""; then
9190 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
9193 AC_SUBST(OOO_JUNIT_JAR)
9195 dnl ===================================================================
9197 dnl ===================================================================
9198 AC_MSG_CHECKING([for product version])
9199 PRODUCTVERSION=AC_PACKAGE_VERSION
9200 AC_MSG_RESULT([$PRODUCTVERSION])
9201 AC_SUBST(PRODUCTVERSION)
9203 dnl ===================================================================
9204 dnl Dealing with l10n options
9205 dnl ===================================================================
9206 AC_MSG_CHECKING([which languages to be built])
9207 # get list of all languages
9208 # generate shell variable from completelangiso= from solenv/inc/langlist.mk
9209 # the sed command does the following:
9210 # + if a line ends with a backslash, append the next line to it
9211 # + adds " on the beginning of the value (after =)
9212 # + adds " at the end of the value
9213 # + removes en-US; we want to put it on the beginning
9214 # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
9215 [eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' solenv/inc/langlist.mk)]
9216 ALL_LANGS="en-US $completelangiso"
9217 # check the configured localizations
9218 WITH_LANG="$with_lang"
9219 if test -z "$WITH_LANG"; then
9220 AC_MSG_RESULT([en-US])
9222 AC_MSG_RESULT([$WITH_LANG])
9223 GIT_REPO_NAMES="$GIT_REPO_NAMES translations"
9225 # check that the list is valid
9226 for lang in $WITH_LANG ; do
9227 test "$lang" = "ALL" && continue;
9228 # need to check for the exact string, so add space before and after the list of all languages
9229 for vl in $ALL_LANGS ; do
9230 if test "$vl" = "$lang" ; then
9234 if test "$vl" != "$lang" ; then
9235 AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS])
9238 # list with substituted ALL
9239 WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
9240 # this variable is used only by bin/distro-install-* helper scripts
9241 # they need a real list of languages
9242 test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
9245 AC_SUBST(WITH_LANG_LIST)
9246 AC_SUBST(GIT_REPO_NAMES)
9249 dnl ===================================================================
9250 if test -n "${GIT_LINK_SRC}"; then
9251 for repo in ${GIT_REPO_NAMES}; do
9252 if ! test -d "${GIT_LINK_SRC}"/${repo}; then
9253 AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
9257 AC_SUBST(GIT_LINK_SRC)
9259 AC_MSG_CHECKING([for custom 'intro' progress bar color])
9261 if test -z "$with_intro_progressbar_color" ; then
9262 PROGRESSBARCOLOR="126,170,23"
9263 AC_MSG_RESULT([none])
9265 PROGRESSBARCOLOR="$with_intro_progressbar_color"
9266 AC_MSG_RESULT([$PROGRESSBARCOLOR])
9268 AC_SUBST(PROGRESSBARCOLOR)
9270 AC_MSG_CHECKING([for custom 'intro' progress bar size])
9272 if test -z "$with_intro_progressbar_size" ; then
9273 PROGRESSSIZE="319,10"
9274 AC_MSG_RESULT([none])
9276 PROGRESSSIZE="$with_intro_progressbar_size"
9277 AC_MSG_RESULT([$PROGRESSSIZE])
9279 AC_SUBST(PROGRESSSIZE)
9281 AC_MSG_CHECKING([for custom 'intro' progress bar position])
9283 if test -z "$with_intro_progressbar_position" ; then
9284 PROGRESSPOSITION="164,225"
9285 AC_MSG_RESULT([none])
9287 PROGRESSPOSITION="$with_intro_progressbar_position"
9288 AC_MSG_RESULT([$PROGRESSPOSITION])
9290 AC_SUBST(PROGRESSPOSITION)
9292 AC_MSG_CHECKING([for custom 'intro' progress bar frame color])
9294 if test -z "$with_intro_progressbar_frame_color" ; then
9295 PROGRESSFRAMECOLOR="207,208,211"
9296 AC_MSG_RESULT([none])
9298 PROGRESSFRAMECOLOR="$with_intro_progressbar_frame_color"
9299 AC_MSG_RESULT([$PROGRESSFRAMECOLOR])
9301 AC_SUBST(PROGRESSFRAMECOLOR)
9303 AC_MSG_CHECKING([for alternative branding images directory])
9306 STARTCENTER_LEFT_BITMAP=
9307 STARTCENTER_RIGHT_BITMAP=
9308 STARTCENTER_RTL_LEFT_BITMAP=
9309 STARTCENTER_RTL_RIGHT_BITMAP=
9310 STARTCENTER_SPACE_BITMAP=
9311 if test -z "$with_branding" -o "$with_branding" = "no" ; then
9312 AC_MSG_RESULT([none])
9314 INTRO_BITMAP="$with_branding/intro.png"
9315 ABOUT_BITMAP="$with_branding/about.png"
9316 STARTCENTER_LEFT_BITMAP="$with_branding/backing_left.png"
9317 STARTCENTER_RIGHT_BITMAP="$with_branding/backing_right.png"
9318 STARTCENTER_RTL_LEFT_BITMAP="$with_branding/backing_rtl_left.png"
9319 STARTCENTER_RTL_RIGHT_BITMAP="$with_branding/backing_rtl_right.png"
9320 STARTCENTER_SPACE_BITMAP="$with_branding/backing_space.png"
9321 for i in $INTRO_BITMAP \
9323 $STARTCENTER_LEFT_BITMAP \
9324 $STARTCENTER_RIGHT_BITMAP \
9325 $STARTCENTER_RTL_LEFT_BITMAP \
9326 $STARTCENTER_RTL_RIGHT_BITMAP \
9327 $STARTCENTER_SPACE_BITMAP; do
9328 if test ! -f $i; then
9329 AC_MSG_WARN([Required file $i does not exist!])
9332 AC_MSG_RESULT([$with_branding])
9335 AC_MSG_CHECKING([for yet another 'intro' bitmap])
9336 if test -z "$with_intro_bitmap" -o "$with_intro_bitmap" = "no" ; then
9337 if test "$with_intro_bitmap" = "no" ; then
9340 AC_MSG_RESULT([none])
9342 case "$with_intro_bitmap" in
9343 *.png) INTRO_BITMAP="$with_intro_bitmap" ;;
9344 *) AC_MSG_WARN([Intro bitmap should be a .png file!]) ;;
9346 AC_MSG_RESULT([$INTRO_BITMAP])
9348 AC_SUBST(INTRO_BITMAP)
9350 AC_MSG_CHECKING([for yet another 'about' bitmap])
9351 if test -z "$with_about_bitmap" -o "$with_about_bitmap" = "no" ; then
9352 if test "$with_about_bitmap" = "no" ; then
9355 AC_MSG_RESULT([none])
9357 case "$with_about_bitmap" in
9358 *.png) ABOUT_BITMAP="$with_about_bitmap" ;;
9359 *) AC_MSG_WARN([About bitmap should be a .png file!]) ;;
9361 AC_MSG_RESULT([$ABOUT_BITMAP])
9363 AC_SUBST(ABOUT_BITMAP)
9365 AC_MSG_CHECKING([for yet another 'start center left' bitmap])
9366 if test -z "$with_startcenter_left_bitmap" -o "$with_startcenter_left_bitmap" = "no" ; then
9367 if test "$with_startcenter_left_bitmap" = "no" ; then
9368 STARTCENTER_LEFT_BITMAP=
9370 AC_MSG_RESULT([none])
9372 case "$with_startcenter_left_bitmap" in
9373 *.png) STARTCENTER_LEFT_BITMAP="$with_startcenter_left_bitmap" ;;
9374 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
9376 AC_MSG_RESULT([$STARTCENTER_LEFT_BITMAP])
9378 AC_SUBST(STARTCENTER_LEFT_BITMAP)
9380 AC_MSG_CHECKING([for yet another 'start center right' bitmap])
9381 if test -z "$with_startcenter_right_bitmap" -o "$with_startcenter_right_bitmap" = "no" ; then
9382 if test "$with_startcenter_right_bitmap" = "no" ; then
9383 STARTCENTER_RIGHT_BITMAP=
9385 AC_MSG_RESULT([none])
9387 case "$with_startcenter_right_bitmap" in
9388 *.png) STARTCENTER_RIGHT_BITMAP="$with_startcenter_right_bitmap" ;;
9389 *) AC_MSG_WARN([Startcenter right bitmap should be a .png file!]) ;;
9391 AC_MSG_RESULT([$STARTCENTER_RIGHT_BITMAP])
9393 AC_SUBST(STARTCENTER_RIGHT_BITMAP)
9395 AC_MSG_CHECKING([for yet another 'start center rtl left' bitmap])
9396 if test -z "$with_startcenter_rtl_left_bitmap" -o "$with_startcenter_rtl_left_bitmap" = "no" ; then
9397 if test "$with_startcenter_rtl_left_bitmap" = "no" ; then
9398 STARTCENTER_RTL_LEFT_BITMAP=
9400 AC_MSG_RESULT([none])
9402 case "$with_startcenter_rtl_left_bitmap" in
9403 *.png) STARTCENTER_RTL_LEFT_BITMAP="$with_startcenter_rtl_left_bitmap" ;;
9404 *) AC_MSG_WARN([Startcenter rtl left bitmap should be a .png file!]) ;;
9406 AC_MSG_RESULT([$STARTCENTER_RTL_LEFT_BITMAP])
9408 AC_SUBST(STARTCENTER_RTL_LEFT_BITMAP)
9410 AC_MSG_CHECKING([for yet another 'start center rtl right' bitmap])
9411 if test -z "$with_startcenter_rtl_right_bitmap" -o "$with_startcenter_rtl_right_bitmap" = "no" ; then
9412 if test "$with_startcenter_rtl_right_bitmap" = "no" ; then
9413 STARTCENTER_RTL_RIGHT_BITMAP=
9415 AC_MSG_RESULT([none])
9417 case "$with_startcenter_rtl_right_bitmap" in
9418 *.png) STARTCENTER_RTL_RIGHT_BITMAP="$with_startcenter_rtl_right_bitmap" ;;
9419 *) AC_MSG_WARN([Startcenter rtl right bitmap should be a .png file!]) ;;
9421 AC_MSG_RESULT([$STARTCENTER_RTL_RIGHT_BITMAP])
9423 AC_SUBST(STARTCENTER_RTL_RIGHT_BITMAP)
9425 AC_MSG_CHECKING([for yet another 'start center space' bitmap])
9426 if test -z "$with_startcenter_space_bitmap" -o "$with_startcenter_space_bitmap" = "no" ; then
9427 if test "$with_startcenter_space_bitmap" = "no" ; then
9428 STARTCENTER_SPACE_BITMAP=
9430 AC_MSG_RESULT([none])
9432 case "$with_startcenter_space_bitmap" in
9433 *.png) STARTCENTER_SPACE_BITMAP="$with_startcenter_space_bitmap" ;;
9434 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
9436 AC_MSG_RESULT([$STARTCENTER_SPACE_BITMAP])
9438 AC_SUBST(STARTCENTER_SPACE_BITMAP)
9441 AC_MSG_CHECKING([for vendor])
9442 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
9443 AC_MSG_RESULT([not set])
9445 OOO_VENDOR="$with_vendor"
9446 AC_MSG_RESULT([$OOO_VENDOR])
9448 AC_SUBST(OOO_VENDOR)
9451 AC_MSG_CHECKING([for UNIX wrapper name])
9452 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
9453 AC_MSG_RESULT([not set])
9455 UNIXWRAPPERNAME="$with_unix_wrapper"
9456 AC_MSG_RESULT([$UNIXWRAPPERNAME])
9458 AC_SUBST(UNIXWRAPPERNAME)
9460 AC_MSG_CHECKING([whether to install the compat oo* wrappers])
9461 if test "$with_compat_oowrappers" = "yes" ; then
9462 WITH_COMPAT_OOWRAPPERS=YES
9465 WITH_COMPAT_OOWRAPPERS=
9468 AC_SUBST(WITH_COMPAT_OOWRAPPERS)
9470 AC_MSG_CHECKING([for product name])
9471 PRODUCTNAME=AC_PACKAGE_NAME
9472 AC_MSG_RESULT([$PRODUCTNAME])
9473 AC_SUBST(PRODUCTNAME)
9475 INSTALLDIRNAME=`echo AC_PACKAGE_NAME | tr '[[:upper:]]' '[[:lower:]]'`
9476 AC_MSG_CHECKING([for install dirname])
9477 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes" ; then
9478 INSTALLDIRNAME="$with_install_dirname"
9480 AC_MSG_RESULT([$INSTALLDIRNAME])
9481 AC_SUBST(INSTALLDIRNAME)
9483 AC_MSG_CHECKING([for prefix])
9484 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9485 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
9487 AC_MSG_RESULT([$PREFIXDIR])
9490 AC_MSG_CHECKING([for libdir])
9491 LIBDIR=[$(eval echo $(eval echo $libdir))]
9492 AC_MSG_RESULT([$LIBDIR])
9495 AC_MSG_CHECKING([for data dir])
9496 DATADIR=[$(eval echo $(eval echo $datadir))]
9497 AC_MSG_RESULT([$DATADIR])
9500 AC_MSG_CHECKING([for man dir])
9501 MANDIR=[$(eval echo $(eval echo $mandir))]
9502 AC_MSG_RESULT([$MANDIR])
9505 AC_MSG_CHECKING([for doc dir])
9506 DOCDIR=[$(eval echo $(eval echo $docdir))]
9507 AC_MSG_RESULT([$DOCDIR])
9510 AC_MSG_CHECKING([for install dir])
9511 INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
9512 AC_MSG_RESULT([$INSTALLDIR])
9513 AC_SUBST(INSTALLDIR)
9515 AC_MSG_CHECKING([whether to statically link to Gtk])
9516 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
9517 ENABLE_STATIC_GTK="TRUE"
9518 AC_MSG_RESULT([yes])
9520 ENABLE_STATIC_GTK="FALSE"
9523 AC_SUBST(ENABLE_STATIC_GTK)
9525 # ===================================================================
9526 # De- or increase default verbosity of build process
9527 # ===================================================================
9528 AC_MSG_CHECKING([build verbosity])
9529 if test -n "$enable_verbose"; then
9530 if test "$enable_verbose" = "yes"; then
9532 AC_MSG_RESULT([high])
9534 if test "$enable_verbose" = "no"; then
9536 AC_MSG_RESULT([low])
9539 AC_MSG_RESULT([not set])
9543 dnl ===================================================================
9544 dnl Use zenity during build
9545 dnl ===================================================================
9546 AC_MSG_CHECKING([whether to use zenity during build])
9547 if test "$enable_zenity" = "yes"; then
9548 AC_MSG_RESULT([yes])
9549 AC_PATH_PROGS( ZNTY, zenity )
9550 if test -z "$ZNTY"; then
9559 AC_SUBST(ENABLE_ZENITY)
9562 dnl ===================================================================
9563 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
9564 dnl --enable-dependency-tracking configure option
9565 dnl ===================================================================
9566 AC_MSG_CHECKING([whether to enable dependency tracking])
9567 if test "$enable_dependency_tracking" = "no"; then
9571 AC_MSG_RESULT([yes])
9575 dnl ===================================================================
9576 dnl Number of CPUs to use during the build
9577 dnl ===================================================================
9578 AC_MSG_CHECKING([for number of processors to use])
9579 if test -n "$with_num_cpus"; then
9580 BUILD_NCPUS=$with_num_cpus
9584 Darwin|FreeBSD|NetBSD|OpenBSD)
9585 BUILD_NCPUS=`sysctl -n hw.ncpu`
9589 BUILD_NCPUS=`getconf _NPROCESSORS_ONLN`
9591 # what else than above does profit here *and* has /proc?
9593 BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
9597 # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
9598 # unexpected format, 'wc -l' will have returned 0.
9599 if test "$BUILD_NCPUS" -eq 0; then
9603 AC_MSG_RESULT([$BUILD_NCPUS])
9604 AC_SUBST(BUILD_NCPUS)
9606 # ===================================================================
9607 # Creating bigger shared library to link against
9608 # ===================================================================
9609 AC_MSG_CHECKING([whether to create a big library for better performance])
9611 if test "$enable_mergelibs" = "yes"; then
9613 AC_MSG_RESULT([yes])
9619 dnl ===================================================================
9620 dnl Number of parallel jobs to be executed by dmake
9621 dnl ===================================================================
9622 AC_MSG_CHECKING([for maximum of jobs per processor])
9624 if test "z$with_max_jobs" != "z"; then
9625 BUILD_MAX_JOBS="$with_max_jobs"
9627 if test "$enable_icecream" = "yes" ; then
9631 AC_MSG_RESULT([$BUILD_MAX_JOBS])
9632 AC_SUBST(BUILD_MAX_JOBS)
9634 # =====================================================================
9635 # determine the parallelism for gnu make
9636 # =====================================================================
9637 AC_MSG_CHECKING([for maximum parallelism for gmake])
9638 if test $BUILD_MAX_JOBS -gt $BUILD_NCPUS ; then
9639 GMAKE_PARALLELISM="$BUILD_MAX_JOBS"
9641 GMAKE_PARALLELISM="$BUILD_NCPUS"
9643 GMAKE_MODULE_PARALLELISM="$BUILD_MAX_JOBS"
9644 if test "$no_parallelism_make" = "YES" ; then
9645 if test -z "$with_num_cpus"; then
9646 GMAKE_PARALLELISM="1";
9647 if test $GMAKE_MODULE_PARALLELISM -gt 1 ; then
9648 AC_MSG_WARN([gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this.])
9649 if test -z "$with_num_cpus"; then
9650 echo "gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this." >> warn
9652 GMAKE_MODULE_PARALLELISM="1"
9655 GMAKE_PARALLELISM="$BUILD_NCPUS";
9656 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
9660 # GMAKE_PARALLELISM is used in tail_build
9661 # GMAKE_MODULE_PARALLELISM is used when building individual gbuildified module
9662 AC_MSG_RESULT([per module:$GMAKE_MODULE_PARALLELISM, for tail_build:$GMAKE_PARALLELISM])
9663 AC_SUBST(GMAKE_PARALLELISM)
9664 AC_SUBST(GMAKE_MODULE_PARALLELISM)
9666 dnl ===================================================================
9667 dnl Setting up the environment.
9668 dnl ===================================================================
9669 echo "setting up the build environment variables..."
9671 if test -z "$COMPATH"; then
9672 AC_MSG_ERROR([No compiler found.])
9676 AC_MSG_CHECKING([solver path])
9677 if test -z "$with_local_solver"; then
9678 LOCAL_SOLVER="DEFAULT"
9679 AC_MSG_RESULT([default])
9681 LOCAL_SOLVER=$with_local_solver
9682 AC_MSG_RESULT([$with_local_solver])
9684 AC_SUBST(LOCAL_SOLVER)
9686 AC_SUBST(BUILD_TYPE)
9688 if test "$WITH_MINGW" != "yes" ; then
9689 MINGW_EXTERNAL_DLLS=
9691 mingw_dlldir=`$CC -print-sysroot`/mingw/bin
9692 for DLL in $MINGW_EXTERNAL_DLLS ; do
9693 AC_MSG_CHECKING([for $DLL])
9694 if ! test -f "$mingw_dlldir/$DLL" ; then
9695 AC_MSG_ERROR([Could not find $DLL, install the appropriate mingw32-<package>, not only mingw32-<package>-devel.])
9697 AC_MSG_RESULT([$mingw_dlldir/$DLL])
9700 AC_SUBST(MINGW_EXTERNAL_DLLS)
9702 # make sure config.guess is +x; we execute config.guess, so it has to be so;
9703 chmod +x ./config.guess
9705 dnl Setting up the post_download check script
9706 dnl Using autoconf here, so that the migration from the previous state
9707 dnl (checks for the additional Windows downloads were directly in
9708 dnl configure.in) is as easy as possible
9709 echo "setting up the post_download check script"
9710 autoconf post_download.in > post_download
9711 chmod +x post_download
9713 # Generate a configuration timestamp we can use for deps
9714 if test -f set_soenv; then
9715 mv -f set_soenv set_soenv.last
9717 echo > set_soenv.last
9720 AC_CONFIG_FILES([ooo.lst set_soenv bin/repo-list desktop/scripts/soffice.sh build_env])
9723 # make sure this is executable
9724 chmod +x desktop/scripts/soffice.sh
9726 # touch the config timestamp file set_soenv.stamp
9727 if test ! -f set_soenv.stamp; then
9728 echo > set_soenv.stamp
9729 elif diff set_soenv set_soenv.last >/dev/null 2>&1; then
9730 echo "Configuration unchanged - avoiding scp2 stamp update"
9732 echo > set_soenv.stamp
9735 dnl Run the set_soenv script to setup the Env.Host.sh script that sets
9736 dnl environment variables for the build.
9741 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: