summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 11:36:52 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 11:36:52 +0200
commit81a1c065fd3c0242efa0273eba0aefeebadcd877 (patch)
tree3f5f6c2f91eda7581f58473c1c79857eba48ef01 /configure.in
parent6f0d3f2a5b72673086f82a88831535e535885998 (diff)
parent13b9f49c1dcb324aa712a82de73bfeffca7b9524 (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: Repository.mk RepositoryFixes.mk configure configure.in set_soenv.in solenv/config/sdev300.ini solenv/gbuild/ComponentTarget.mk solenv/gbuild/CppunitTest.mk solenv/gbuild/CustomTarget.mk solenv/gbuild/Deliver.mk solenv/gbuild/Executable.mk solenv/gbuild/JavaClassSet.mk solenv/gbuild/Library.mk solenv/gbuild/LinkTarget.mk solenv/gbuild/StaticLibrary.mk solenv/gbuild/TargetLocations.mk solenv/gbuild/gbuild.mk solenv/gbuild/platform/linux.mk solenv/gbuild/platform/macosx.mk solenv/gbuild/platform/solaris.mk solenv/gbuild/platform/windows.mk solenv/gbuild/platform/winmingw.mk solenv/gbuild/templates/Executable.mk solenv/gbuild/templates/Library.mk solenv/inc/libs.mk solenv/inc/unxobsd.mk
Diffstat (limited to 'configure.in')
-rwxr-xr-x[-rw-r--r--]configure.in7628
1 files changed, 4505 insertions, 3123 deletions
diff --git a/configure.in b/configure.in
index 34af2af72703..5241c6ed78cc 100644..100755
--- a/configure.in
+++ b/configure.in
@@ -1,883 +1,1323 @@
-dnl /******************************************************************
-dnl * vi:set sw=3 ts=3 et:
-dnl *
-dnl * Name: configure.in
-dnl * Auth: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems Ireland
-dnl * Date: $Date: 2008-09-08 07:38:40 $
-dnl *
-dnl * Desc: This file serves as input for the GNU autoconf package
-dnl * in order to create a configure script.
-dnl * In this stage configure just checks the pre-requisites
-dnl * necessary to build OpenOffice.org
-dnl *
-dnl *
-dnl ******************************************************************/
-AC_REVISION( $Revision: 1.290 $ )
+dnl -*- Mode: Autoconf; tab-width: 8; indent-tabs-mode: nil -*-
+dnl configure.in serves as input for the GNU autoconf package
+dnl in order to create a configure script.
+
+AC_INIT([LibreOffice], [3.5],,, [http://documentfoundation.org/])
AC_PREREQ(2.50)
-AC_INIT()
echo "$@" >config.parms
-AC_ARG_WITH(gnu-patch,
-[ --with-gnu-patch Specify location of GNU patch on Solaris or FreeBSD
-],,)
-AC_ARG_WITH(agg,
-[ --without-agg Disable the use of agg altogether
-],,with_agg=yes)
-AC_ARG_WITH(gnu-cp,
-[ --with-gnu-cp Specify location of GNU cp on Solaris or FreeBSD
-],,)
+
+dnl ===================================================================
+dnl Optional Features (--enable/disable-)
+dnl ===================================================================
+
+dnl ---------- Extensions ----------
+
+AC_ARG_ENABLE(ext-barcode,
+ AS_HELP_STRING([--enable-ext-barcode],
+ [Enables the Barcode extension.]),
+,)
+
+AC_ARG_ENABLE(ext-diagram,
+ AS_HELP_STRING([--enable-ext-diagram],
+ [Enables the Diagram extension.]),
+,)
+
+AC_ARG_ENABLE(ext-google-docs,
+ AS_HELP_STRING([--enable-ext-google-docs],
+ [Download and enables the Google Documents extension.]),
+,)
+
+AC_ARG_ENABLE(ext-hunart,
+ AS_HELP_STRING([--enable-ext-hunart],
+ [Enables the Hungarian Cross-reference Toolbar extension.]),
+,)
+
+AC_ARG_ENABLE(ext-lightproof,
+ AS_HELP_STRING([--enable-ext-lightproof],
+ [Enables the Lightproof extension.]),
+,)
+
+AC_ARG_ENABLE(ext-mysql-connector,
+ AS_HELP_STRING([--enable-ext-mysql-connector],
+ [Enables the build of the MySQL Connector/LibreOffice extension. This requires
+ access to the MySQL Connector/C (aka libmysql) to be given, too, with
+ either the --with-system-mysql or --with-libmysql-path option.]),
+,)
+
+AC_ARG_ENABLE(ext-nlpsolver,
+ AS_HELP_STRING([--enable-ext-nlpsolver],
+ [Download and enables the NLPSolver extension.]),
+,)
+
+AC_ARG_ENABLE(ext-ct2n,
+ AS_HELP_STRING([--enable-ext-ct2n],
+ [Enables the ConvertTextToNumber extension.]),
+,)
+
+AC_ARG_ENABLE(ext-numbertext,
+ AS_HELP_STRING([--enable-ext-numbertext],
+ [Enables the Numbertext extension.]),
+,)
+
+AC_ARG_ENABLE(ext-oooblogger,
+ AS_HELP_STRING([--enable-ext-oooblogger],
+ [Download and enables the OOo Blogger extension.]),
+,)
+
+AC_ARG_ENABLE(ext-pdfimport,
+ AS_HELP_STRING([--enable-ext-pdfimport],
+ [Enables the PDF Import extension and xpdf.]),
+,)
+
+AC_ARG_ENABLE(ext-presenter-console,
+ AS_HELP_STRING([--enable-ext-presenter-console],
+ [Enables the Presenter Console extension.]),
+,)
+
+AC_ARG_ENABLE(ext-presenter-minimizer,
+ AS_HELP_STRING([--enable-ext-presenter-minimizer],
+ [Enables the Presentation Minimizer extension.]),
+,)
+
+AC_ARG_ENABLE(ext-report-builder,
+ AS_HELP_STRING([--enable-ext-report-builder],
+ [Enables the build of the Report Builder extension.]),
+,)
+
+AC_ARG_ENABLE(ext-scripting-beanshell,
+ AS_HELP_STRING([--enable-ext-scripting-beanshell],
+ [Enables support for scripts in BeanShell.]),
+,)
+
+AC_ARG_ENABLE(ext-scripting-javascript,
+ AS_HELP_STRING([--enable-ext-scripting-javascript],
+ [Enables support for scripts in JavaScript.]),
+,)
+
+AC_ARG_ENABLE(ext-typo,
+ AS_HELP_STRING([--enable-ext-typo],
+ [Enables the Typography Toolbar extension.]),
+,)
+
+AC_ARG_ENABLE(ext-validator,
+ AS_HELP_STRING([--enable-ext-validator],
+ [Enables the Validator extension.]),
+,)
+
+AC_ARG_ENABLE(ext-watch-window,
+ AS_HELP_STRING([--enable-ext-watch-window],
+ [Enables the Watch Window extension to Calc.]),
+,)
+
+AC_ARG_ENABLE(ext-wiki-publisher,
+ AS_HELP_STRING([--enable-ext-wiki-publisher],
+ [Enables the Wiki Publisher extension.]),
+,)
+
+dnl ---------- *** ----------
+
AC_ARG_ENABLE(graphite,
-[ --enable-graphite Enables the compilation of Graphite smart font rendering
-],,)
-AC_ARG_WITH(system-graphite,
-[ --with-system-graphite use graphite library already installed on system
-],,)
+ AS_HELP_STRING([--enable-graphite],
+ [Enables the compilation of Graphite smart font rendering.]),
+,)
+
AC_ARG_ENABLE(ldap,
-[ --disable-ldap Disables the use of LDAP backend via Netscape/Mozilla
- or OpenLDAP LDAP SDK
-],,)
+ AS_HELP_STRING([--disable-ldap],
+ [Disables the use of LDAP backend via Netscape/Mozilla or OpenLDAP LDAP SDK]),
+,)
+
AC_ARG_ENABLE(fetch-external,
-[ --disable-fetch-external Disables fetching external tarballs from web sources.
-],,)
-AC_ARG_WITH(external-tar,
-[ --with-external-tar=<TARFILE PATH> Specify path to tarfiles manually ],
-[ TARFILE_LOCATION="$withval"
-])
-AC_ARG_WITH(openldap,
-[ --with-openldap Enables the use of the OpenLDAP LDAP SDK instead
- of the Netscape/Mozilla one
-],,)
+ AS_HELP_STRING([--disable-fetch-external],
+ [Disables fetching external tarballs from web sources.]),
+,)
+
AC_ARG_ENABLE(lockdown,
-[ --enable-lockdown Enables the gconf integration work in OOo
-],,)
+ AS_HELP_STRING([--disable-lockdown],
+ [Disables the gconf integration work in LibreOffice.]),
+,enable_lockdown=yes)
+
AC_ARG_ENABLE(vba,
-[ --disable-vba disables the vba compatibility feature
-],,)
-AC_ARG_WITH(vba-package-format,
-[ --with-vba-package-format specify package format for vba compatibility api.
- Specifying "builtin" means the api component and
- associated type library are part of the installation set.
- Specifying "extn" creates an uno extension that is
- part of the installation set ( located in the program
- directory ) that MUST be optionly registered using
- either the unopkg executeable or the extension manager
- gui.
-
- Note: "builtin" is the default, "extn" can cause
- problems.
- Usage: --with-vba-package-format="builtin" or
- --with-vba-package-format="extn"
-],,)
+ AS_HELP_STRING([--disable-vba],
+ [Disables the vba compatibility feature.]),
+,)
+
AC_ARG_ENABLE(pch,
-[ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++.
-],,)
+ AS_HELP_STRING([--enable-pch],
+ [EXPERIMENTAL: Enables precompiled header support for C++.]),
+,)
+
AC_ARG_ENABLE(mozilla,
-[ --disable-mozilla OO.o usually includes a strangely hacked up mozilla
- binary for your platform, to build without this
- version, use this option.
-],,enable_mozilla="yes")
-AC_ARG_WITH(fonts,
-[ --without-fonts OOo includes some third-party fonts to provide a reliable
- basis for help content, templates, samples, etc.
- When these fonts are already known to be available on the
- system then you should use this option.
-],,)
-AC_ARG_WITH(ppds,
-[ --without-ppds Removes Postscript Printer definition files from
- openoffice.org installation set, for people building
- for specific distributions where PPDs are known to be
- already available (every recent distro with CUPS
- backend)
-],,)
-AC_ARG_WITH(afms,
-[ --without-afms Removes bitmap font files from openoffice.org
- installation set, for people building for specific
- distributions where AFM files or TrueType Fonts
- are known to be available.
-],,)
+ AS_HELP_STRING([--disable-mozilla],
+ [LibreOffice usually includes a strangely hacked up Mozilla binary for your
+ platform, to build without this version, use this option.]),
+,enable_mozilla=yes)
+
AC_ARG_ENABLE(epm,
-[ --disable-epm OO.o includes self-packaging code, that requires
- epm, however epm is useless for large scale
- package building.
-],,enable_epm="yes")
-AC_ARG_WITH(epm,
-[ --with-epm Decides which epm to use. Default is to use
- the one from the system if one is built. When
- either this is not there or you say =internal
- epm will be built.
-],,)
-AC_ARG_WITH(package-format,
-[ --with-package-format specify package format(s) for OOo installsets.
- Default is "normal" one of the OS/Distribution.
+ AS_HELP_STRING([--enable-epm],
+ [LibreOffice includes self-packaging code, that requires epm, however epm is
+ useless for large scale package building.]),
+,enable_epm=no)
+
+AC_ARG_ENABLE(activex_component,
+ AS_HELP_STRING([--disable-activex-component],
+ [Remove support for ActiveX embedding of LibreOffice.]),
+,enable_activex_component=yes)
- Usage: --with-package-format="foo bar"
-],,)
AC_ARG_ENABLE(odk,
-[ --disable-odk OO.o includes an ODK, office development kit
- which some packagers may with to build without
-],,enable_odk="yes")
+ AS_HELP_STRING([--disable-odk],
+ [LibreOffice includes an ODK, office development kit which some packagers may
+ wish to build without.]),
+,enable_odk=yes)
+
AC_ARG_ENABLE(mathmldtd,
-[ --disable-mathmldtd disable mathmldtd
- (useful for distributions that want to avoid packaging
- it)
-],,enable_mathmldtd="yes")
+ AS_HELP_STRING([--disable-mathmldtd],
+ [Disable mathmldtd (useful for distributions that want to avoid
+ packaging it).]),
+,enable_mathmldtd=yes)
+
AC_ARG_ENABLE(evolution2,
-[ --enable-evolution2 Allows the built-in evolution 2 addressbook
- connectivity build to be enabled.
-],,)
-AC_ARG_WITH(system-stdlibs,
-[ --with-system-stdlibs use libstdc++/libgcc_s already on system
-],,)
+ AS_HELP_STRING([--enable-evolution2],
+ [Allows the built-in evolution 2 addressbook connectivity build to be
+ enabled.]))
+
AC_ARG_ENABLE(cups,
-[ --disable-cups disable cups support in the psprint project
-],,enable_cups=yes)
+ AS_HELP_STRING([--disable-cups],
+ [Disable cups support in the psprint project.]))
+
AC_ARG_ENABLE(fontconfig,
-[ --disable-fontconfig disable support for the fontconfig library
-],,enable_fontconfig=yes)
+ AS_HELP_STRING([--disable-fontconfig],
+ [Disable support for the fontconfig library.]),
+,enable_fontconfig=yes)
+
AC_ARG_ENABLE(directx,
-[ --disable-directx Remove DirectX implementation for the new XCanvas
- interface. The DirectX support requires more stuff
- installed on Windows to compile.
- (DirectX SDK, GDI+ libs)
-],,enable_directx=yes)
+ AS_HELP_STRING([--disable-directx],
+ [Remove DirectX implementation for the new XCanvas interface.
+ The DirectX support requires more stuff installed on Windows to
+ compile. (DirectX SDK, GDI+ libs)]),
+,enable_directx=yes)
+
AC_ARG_ENABLE(activex,
-[ --disable-activex Disable the use of ActiveX for windows build.
- This switch is mandatory when using VC++ 2005/2008 Express.
-],,)
+ AS_HELP_STRING([--disable-activex],
+ [Disable the use of ActiveX for a Windows build.])
+ [
+ This switch is mandatory when using VC++ 2008 Express.
+ ],
+,)
AC_ARG_ENABLE(atl,
-[ --disable-atl Disable the use of ATL for windows build.
- This switch is mandatory when using VC++ 2005/2008 Express.
-],,)
+ AS_HELP_STRING([--disable-atl],
+ [Disable the use of ATL for a Windows build.])
+ [
+ This switch is mandatory when using VC++ 2008 Express.
+ ],
+,)
AC_ARG_ENABLE(symbols,
-[ --enable-symbols Include debugging symbols in output.
- WARNING - a complete build needs 8 Gb of space and
- takes much longer. (enables -g compiler flag)
-
- --enable-symbols=SMALL sets the gcc -g1 setting
- which is smaller.
-
+ AS_HELP_STRING([--enable-symbols],
+ [Include debugging symbols in output. WARNING - a complete build needs
+ 8 Gb of space and takes much longer (enables -g compiler flag).])
+ [
Enabling symbols disables the stripping of the solver
(--disable-strip-solver).
-],,)
-AC_ARG_ENABLE(strip-solver,
-[ --disable-strip-solver Disable the stripping of the solver.
- By default the solver is stripped unless a build with
- debugging symbols (--enable-symbols) is requested.
+ ],
+,)
+AC_ARG_ENABLE(strip-solver,
+ AS_HELP_STRING([--disable-strip-solver],
+ [Disable the stripping of the solver. By default the solver is stripped
+ unless a build with debugging symbols (--enable-symbols) is requested.])
+ [
This switch allows to override this setting.
-],,)
+ ],
+,)
+
AC_ARG_ENABLE(werror,
-[ --enable-werror Turn warnings to errors. (Has no effect in modules
- where the treating of warnings as errors is disabled
- explicitely)
-],,)
+ AS_HELP_STRING([--enable-werror],
+ [Turn warnings to errors. (Has no effect in modules where the treating
+ of warnings as errors is disabled explicitly.)]),
+,)
+
AC_ARG_ENABLE(debug,
-[ --enable-debug Include debugging symbols from --enable-symbols
- plus extra debugging code. Extra large build!
- (enables -g compiler flag and dmake debug=true)
-],,)
+ AS_HELP_STRING([--enable-debug],
+ [Include debugging symbols from --enable-symbols plus extra debugging
+ code. Extra large build! (enables -g compiler flag and dmake debug=true)
+ If you need even more verbose output, build a module with
+ "build -- debug=true dbglevel=2".]))
+
AC_ARG_ENABLE(dbgutil,
-[ --enable-dbgutil Include additional debugging utilities, such as
- assertions, object counting, etc. Larger build.
- Independent from --enable-debug
-],,)
+ AS_HELP_STRING([--enable-dbgutil],
+ [Include additional debugging utilities, such as assertions, object
+ counting, etc. Larger build. Independent from --enable-debug]))
+
AC_ARG_ENABLE(crashdump,
-[ --enable-crashdump Enable the crashdump feature code.
-],,)
-AC_ARG_ENABLE(cl-standard,
-[ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing
- standard compiler. ( This just disavles optimization
- options and therefore removes a lot of warnings when
- using the cheaper standard compiler. )
-],,)
+ AS_HELP_STRING([--enable-crashdump],
+ [Enable the crashdump feature.]))
+
+AC_ARG_ENABLE(python,
+ AS_HELP_STRING([--enable-python=<no/auto/system/internal>],
+ [Enables or disables Python support at run-time and build-time.
+ Also specifies what Python to use. 'auto' is the
+ default. Note that Python can be disabled with
+ --disable-python or --enable-python=no only if no
+ translations are required.]))
+
AC_ARG_ENABLE(gtk,
-[ --disable-gtk Determines whether to use Gtk+ vclplug on platforms
- where Gtk+ is available.
-],,enable_gtk=yes)
-AC_ARG_ENABLE(gstreamer,
-[ --disable-gstreamer Determines whether to use the GStreamer media
- backend on platforms where GStreamer is available.
-],,enable_gstreamer=yes)
+ AS_HELP_STRING([--disable-gtk],
+ [Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available.]),
+,enable_gtk=yes)
+
+AC_ARG_ENABLE(gtk3,
+ AS_HELP_STRING([--disable-gtk3],
+ [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
+,enable_gtk3=no)
+
AC_ARG_ENABLE(systray,
-[ --disable-systray Determines whether to build the systray quickstarter.
-],,enable_systray=yes)
-AC_ARG_ENABLE(cairo,
-[ --enable-cairo Determines whether to use Cairo library on
- platforms where Cairo is available.
-],,enable_cairo=no)
-AC_ARG_WITH(system-cairo,
-[ --with-system-cairo Use Cairo libraries already on system
-],,)
+ AS_HELP_STRING([--disable-systray],
+ [Determines whether to build the systray quickstarter.]),
+,enable_systray=yes)
+
AC_ARG_ENABLE(cairo-canvas,
[ --disable-cairo-canvas Determines whether to build the Cairo canvas on
platforms where Cairo is available.
],,enable_cairo_canvas=yes)
AC_ARG_ENABLE(librsvg,
-[ --enable-librsvg Determines whether to use librsvg library on
- platforms where librsvg is available.
- (actually, it is possible to build with
- --disable-librsvg and to still have SVG support
- within a running soffice instance, since this
- dependency is a runtime only dependency.
- To have SVG suppport at runtime, the librsvg, the cairo
- and the gobject library - and all depending libraries
- as well - need to be accessible by the running soffice
- instance.
- The intention of defaulting this flag to yes is to
- indicate this fact to the build maintainer)
-],,enable_librsvg=yes)
+ AS_HELP_STRING([--enable-librsvg=<no/auto/system/internal>],
+ [Enables or disables use of librsvg to render SVG at run-time.
+ Also specificed what librsvg to use. 'auto' is the default.]))
+
AC_ARG_ENABLE(opengl,
-[ --enable-opengl Determines whether to build the OpenGL 3D slide
- transitions component
-],,enable_opengl=no)
+ AS_HELP_STRING([--disable-opengl],
+ [Determines whether to build the OpenGL 3D slide transitions component.]),
+,enable_opengl=yes)
+
AC_ARG_ENABLE(dbus,
-[ --enable-dbus Determines whether to enable presentation mode
- screensaver control under GNOME via DBUS
-],,enable_dbus=no)
+ AS_HELP_STRING([--enable-dbus],
+ [Determines whether to enable presentation mode screensaver control
+ under GNOME via DBUS.]),
+,enable_dbus=no)
+
AC_ARG_ENABLE(gconf,
-[ --disable-gconf Determines whether to use the GConf support
-],,enable_gconf=yes)
+ AS_HELP_STRING([--disable-gconf],
+ [Determines whether to use the GConf support.]),
+,enable_gconf=yes)
+
AC_ARG_ENABLE(gnome-vfs,
-[ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing
- System on platforms where that VFS is available
-],,enable_gnome_vfs=yes)
+ AS_HELP_STRING([--disable-gnome-vfs],
+ [Determines whether to use the Gnome Virtual Filing System on platforms
+ where that VFS is available.]),
+,enable_gnome_vfs=yes)
+
AC_ARG_ENABLE(gio,
-[ --enable-gio Determines whether to use the GIO support
-],,enable_gio=no)
+ AS_HELP_STRING([--enable-gio],
+ [Determines whether to use the GIO support.]),
+,enable_gio=no)
+
AC_ARG_ENABLE(static-gtk,
-[ --enable-static-gtk Modules that are linked against gtk libraries use
- the static libraries instead of the dynamic ones.
- (enables -Bstatic linker flag for gtk libraries)
-],,)
+ AS_HELP_STRING([--enable-static-gtk],
+ [Modules that are linked against GTK+ libraries use the static libraries
+ instead of the dynamic ones. (Enables -Bstatic linker flag for GTK+ libraries.)]),
+,)
+
AC_ARG_ENABLE(layout,
-[ --enable-layout Enable the compilation and use of layout dialogs
-],,)
+ AS_HELP_STRING([--enable-layout],
+ [Enable the compilation and use of layout dialogs.]),
+,)
+
AC_ARG_ENABLE(build-mozilla,
-[ --disable-build-mozilla Use this option if you do not want to build the
- mozilla components from the mozilla source code but
- take precompiled zips
-],,)
-AC_ARG_WITH(mozilla-version,
-[ --with-mozilla-version Choose which version of mozilla to use while building
- mozilla. Default: 1.7.5.
- Note that not all versions are supported.
-],,)
-AC_ARG_WITH(mozilla-toolkit,
-[ --with-mozilla-toolkit Choose which GUI toolkit to use while building mozilla
- components. Default: gtk2
-],,)
-AC_ARG_ENABLE(nss_module,
-[ --disable-nss-module Whether to use provided NSS module
-],,enable_nss_module=yes)
+ AS_HELP_STRING([--disable-build-mozilla],
+ [Use this option if you do not want to build the Mozilla components from
+ the Mozilla source code but take precompiled zips.]),
+,)
+
+AC_ARG_ENABLE(nss-module,
+ AS_HELP_STRING([--disable-nss-module],
+ [Whether to use provided NSS module.]),
+,enable_nss_module=yes)
+
AC_ARG_ENABLE(kde,
-[ --enable-kde Determines whether to use Qt/KDE vclplug on platforms
- where Qt and KDE are available.
-],,)
+ AS_HELP_STRING([--enable-kde],
+ [Determines whether to use Qt3/KDE3 vclplug on platforms where Qt3 and
+ KDE3 are available.]),
+,)
+
AC_ARG_ENABLE(kdeab,
-[ --disable-kdeab Disable the KDE address book support
-],,if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi)
+ AS_HELP_STRING([--disable-kdeab],
+ [Disable the KDE3 address book support.]),
+,
+ if test "$enable_kde" = "yes"; then
+ enable_kdeab=yes;
+ fi
+)
+
AC_ARG_ENABLE(kde4,
-[ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms
- where Qt4 and KDE4 are available. May be used with --enable-kde
- if you want to support both KDE3 and KDE4.
-],,)
+ AS_HELP_STRING([--enable-kde4],
+ [Determines whether to use Qt4/KDE4 vclplug on platforms where Qt4 and
+ KDE4 are available. May be used with --enable-kde if you want to support
+ both KDE3 and KDE4.]),
+,)
+
+AC_ARG_ENABLE(unix-qstart-libpng,
+ AS_HELP_STRING([--disable-unix-qstart-libpng],
+ [On UNIX systems, we have a faster splash app, that can use libpng to
+ render its splash, if we can safely link to the system libpng then
+ enabling this is a good idea (ie. for Linux Distro packaging).]),
+,enable_unix_libpng=yes)
+
AC_ARG_ENABLE(binfilter,
-[ --disable-binfilter Disable legacy binary file formats filters
-],,if ! test -d ./binfilter; then enable_binfilter=no; fi)
+ AS_HELP_STRING([--enable-binfilter],
+ [Enable legacy binary file formats filters build.]),
+,enable_binfilter=no
+)
+
+AC_ARG_ENABLE(ugly,
+ AS_HELP_STRING([--enable-ugly],
+ [Enables ugly pieces of functionality.]),
+,enable_ugly=no
+)
+
AC_ARG_ENABLE(rpath,
-[ --disable-rpath Disable the use of relative paths in shared libraries
-],,)
-AC_ARG_ENABLE(pam,
-[ --disable-pam Disable pam support.
-],,)
-AC_ARG_ENABLE(pam-link,
-[ --enable-pam-link link with libpam instead of dynamically open it
-],,)
-AC_ARG_ENABLE(crypt-link,
-[ --disable-crypt-link disable linking with libcrypt instead of dynamically
- open it (needed for ancient GNU/Linux distributions
- without crypt()/libcrypt)
-],,enable_crypt_link=yes)
+ AS_HELP_STRING([--disable-rpath],
+ [Disable the use of relative paths in shared libraries.]),
+,)
+
AC_ARG_ENABLE(xrender-link,
-[ --enable-xrender-link link with libXrender instead of dynamically open it
-],,)
+ AS_HELP_STRING([--enable-xrender-link],
+ [Link with libXrender instead of dynamically open it.]),
+,)
+
AC_ARG_ENABLE(randr,
-[ --disable-randr disable RandR support in the vcl project
-],,enable_randr=yes)
+ AS_HELP_STRING([--disable-randr],
+ [Disable RandR support in the vcl project.]),
+,enable_randr=yes)
+
AC_ARG_ENABLE(randr-link,
-[ --disable-randr-link disable linking with libXrandr, instead dynamically
- open it at runtime
-],,enable_randr_link=yes)
+ AS_HELP_STRING([--disable-randr-link],
+ [Disable linking with libXrandr, instead dynamically open it at runtime.]),
+,enable_randr_link=yes)
+
+AC_ARG_ENABLE(gstreamer,
+ AS_HELP_STRING([--disable-gstreamer],
+ [Disable building the gstreamer avmedia backend.]),
+,enable_gstreamer=yes)
+
+AC_ARG_ENABLE(neon,
+ AS_HELP_STRING([--disable-neon],
+ [Disable neon and the compilation of webdav binding.]),
+,)
+
+AC_ARG_ENABLE(build-unowinreg,
+ AS_HELP_STRING([--enable-build-unowinreg],
+ [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
+ compiler is needed on Linux.])
+ [
+ Usage: --enable-build-unowinreg
+ ],
+,)
+
+AC_ARG_ENABLE(verbose,
+ AS_HELP_STRING([--enable-verbose],
+ [Increase build verbosity.])[
+ --disable-verbose Decrease build verbosity.],
+,)
+
+AC_ARG_ENABLE(dependency-tracking,
+ AS_HELP_STRING([--enable-dependency-tracking],
+ [Do not reject slow dependency extractors.])[
+ --disable-dependency-tracking
+ Disables generation of dependency information.
+ Speed up one-time builds.],
+,)
+
+AC_ARG_ENABLE(icecream,
+ AS_HELP_STRING([--enable-icecream],
+ [Use the 'icecream' distributed compiling tool to speedup the compilation.
+ It defaults to /opt/icecream for the location of the icecream gcc/g++
+ wrappers, you can override that using --with-gcc-home=/the/path switch.]),
+,)
+
+AC_ARG_ENABLE(zenity,
+ AS_HELP_STRING([--disable-zenity],
+ [Do not display a build icon in the notification area (on unix) during build.]),
+,enable_zenity=yes)
+
+AC_ARG_ENABLE(cl-x64,
+ AS_HELP_STRING([--enable-cl-x64],
+ [Build a 64-bit LibreOffice using the Microsoft C/C++ x64 compiler.]),
+,)
+
+AC_ARG_ENABLE(extra-gallery,
+ AS_HELP_STRING([--enable-extra-gallery],
+ [Add extra gallery content.]),
+,)
+
+AC_ARG_ENABLE(extra-template,
+ AS_HELP_STRING([--enable-extra-template],
+ [Add extra template content.]),
+,)
+
+AC_ARG_ENABLE(extra-sample,
+ AS_HELP_STRING([--enable-extra-sample],
+ [Add extra sample content.]),
+,)
+
+AC_ARG_ENABLE(extra-font,
+ AS_HELP_STRING([--enable-extra-font],
+ [Add extra font content.]),
+,)
+
+AC_ARG_ENABLE(lomenubar,
+ AS_HELP_STRING([--enable-lomenubar],
+ [Enable global menu support.]),
+,)
+
+AC_ARG_ENABLE(release-build,
+ AS_HELP_STRING([--enable-release-build],
+ [Enable release build.
+ See http://wiki.documentfoundation.org/DevBuild]),
+,)
+
+dnl ===================================================================
+dnl Optional Packages (--with/without-)
+dnl ===================================================================
+AC_ARG_WITH(gnu-patch,
+ AS_HELP_STRING([--with-gnu-patch],
+ [Specify location of GNU patch on Solaris or FreeBSD.]),
+,)
+
+AC_ARG_WITH(gnu-cp,
+ AS_HELP_STRING([--with-gnu-cp],
+ [Specify location of GNU cp on Solaris or FreeBSD.]),
+,)
+
+AC_ARG_WITH(system-graphite,
+ AS_HELP_STRING([--with-system-graphite],
+ [Use graphite library already installed on system.]),
+,)
+
+AC_ARG_WITH(external-tar,
+ AS_HELP_STRING([--with-external-tar=<TARFILE PATH>],
+ [Specify path to tarfiles manually.]),
+ TARFILE_LOCATION=$withval ,
+)
+
+AC_ARG_WITH(linked-git,
+ AS_HELP_STRING([--with-linked-git=<OTHER_CLONE_DIR>],
+ [Specify another checkout's clonedir to re-use. This makes use of
+ git-new-workdir, and saves a lot of diskspace when having multiple
+ trees side-by-side.]),
+ GIT_LINK_SRC=$withval ,
+)
+
+AC_ARG_WITH(openldap,
+ AS_HELP_STRING([--with-openldap],
+ [Enables the use of the OpenLDAP LDAP SDK instead of the Netscape/Mozilla one.]),
+,)
+
+AC_ARG_WITH(vba-package-format,
+ AS_HELP_STRING([--with-vba-package-format],
+ [Specify package format for vba compatibility api. Specifying "builtin"
+ means the api component and associated type library are part of the
+ installation set. Specifying "extn" creates an uno extension that is
+ part of the installation set (located in the program directory) that
+ MUST be optionly registered using either the unopkg executeable or the
+ extension manager gui.])
+ [
+ Note: "builtin" is the default, "extn" can cause
+ problems.
+
+ Usage: --with-vba-package-format="builtin" or
+ --with-vba-package-format="extn"
+ ],
+,)
+
+AC_ARG_WITH(theme,
+ AS_HELP_STRING([--with-theme="theme1 theme2..."],
+ [Choose which themes to include. By default those themes with an '*' are included.
+ Possible choices: *default, *crystal, *hicontrast, *oxygen, *tango, classic, industrial.]),
+,)
+
+AC_ARG_WITH(theme,
+ AS_HELP_STRING([--with-theme="theme1 theme2..."],
+ [Choose which themes to include. By default those themes with an '*' are included.
+ Possible choices: *default, *crystal, *hicontrast, *oxygen, *tango, classic, industrial.]),
+,)
+
+AC_ARG_WITH(extension-integration,
+ AS_HELP_STRING([--with-extension-integration],
+ [It will integrate the builded extensions to the installer of the product.
+ Please use this switch to include any extension.]),
+,)
+
+AC_ARG_WITH(helppack-integration,
+[
+ --without-helppack-integration It will not integrate the helppacks to the installer
+ of the product.
+ Please use this switch to use the online help or separate help packages.],
+,)
+
+AC_ARG_WITH(fonts,
+ AS_HELP_STRING([--without-fonts],
+ [LibreOffice includes some third-party fonts to provide a reliable basis for
+ help content, templates, samples, etc. When these fonts are already
+ known to be available on the system then you should use this option.]),
+,)
+
+AC_ARG_WITH(ppds,
+ AS_HELP_STRING([--without-ppds],
+ [Removes Postscript Printer definition files from LibreOffice
+ installation set, for people building for specific distributions where
+ PPDs are known to be already available (every recent distro with CUPS backend).]),
+,)
+
+AC_ARG_WITH(afms,
+ AS_HELP_STRING([--without-afms],
+ [Removes bitmap font files from LibreOffice installation set, for people
+ building for specific distributions where AFM files or TrueType Fonts
+ are known to be available.]),
+,)
+
+AC_ARG_WITH(agfa-monotype-fonts,
+ AS_HELP_STRING([--with-agfa-monotype-fonts],
+ [Do not include the proprietary Agfa Monotype fonts
+ (even if present) in the LibreOffice installation
+ set.])
+,)
+
+AC_ARG_WITH(epm,
+ AS_HELP_STRING([--with-epm],
+ [Decides which epm to use. Default is to use the one from the system if
+ one is built. When either this is not there or you say =internal epm
+ will be built.]),
+,)
+
+AC_ARG_WITH(package-format,
+ AS_HELP_STRING([--with-package-format],
+ [Specify package format(s) for LibreOffice installsets. Default is the
+ "normal" one of the OS/Distribution. Possible values: aix, bsd, deb,
+ inst, tardist, osx, pkg, rpm, setld, native, portable, archive, dmg,
+ installed, msi. Example: --with-package-format="deb dmg"]),
+,)
+
+AC_ARG_WITH(system-stdlibs,
+ AS_HELP_STRING([--with-system-stdlibs],
+ [Use libstdc++/libgcc_s already on system.]),
+,)
+
+AC_ARG_WITH(system-cairo,
+ AS_HELP_STRING([--with-system-cairo],
+ [Use Cairo libraries already on system.]),
+,)
+
+AC_ARG_WITH(mozilla-version,
+ AS_HELP_STRING([--with-mozilla-version],
+ [Choose which version of Mozilla to use while building Mozilla.
+ (default=1.7.5) Note that not all versions are supported.]),
+,)
+
+AC_ARG_WITH(mozilla-toolkit,
+ AS_HELP_STRING([--with-mozilla-toolkit],
+ [Choose which GUI toolkit to use while building Mozilla components. (default=gtk2)]),
+,)
+
AC_ARG_WITH(myspell-dicts,
-[ --without-myspell-dicts Removes myspell dictionaries from openoffice.org
- installation set, for people building for specific
- distributions where the myspell dictionaries are
- installed from other sources
-],,)
+ AS_HELP_STRING([--without-myspell-dicts],
+ [Removes myspell dictionaries from LibreOffice installation set, for
+ people building for specific distributions where the myspell dictionaries
+ are installed from other sources.]),
+,)
+
AC_ARG_WITH(system-dicts,
-[ --with-system-dicts Use dictionaries from system paths- Specify
- them via --with-{dict,hyph,thes}-path=/path
- if you want to override the default ones
-],,)
+ AS_HELP_STRING([--with-system-dicts],
+ [Use dictionaries from system paths- Specify them via
+ --with-{dict,hyph,thes}-path=/path if you want to override the default ones.]),
+,)
+
AC_ARG_WITH(external-dict-dir,
-[ --with-external-dict-dir Specify external dictionary dir
-],,)
+ AS_HELP_STRING([--with-external-dict-dir],
+ [Specify external dictionary dir.]),
+,)
+
AC_ARG_WITH(external-hyph-dir,
-[ --with-external-hyph-dir Specify external hyphenation pattern dir
-],,)
+ AS_HELP_STRING([--with-external-hyph-dir],
+ [Specify external hyphenation pattern dir.]),
+,)
+
AC_ARG_WITH(external-thes-dir,
-[ --with-external-thes-dir Specify external thesaurus dir
-],,)
+ AS_HELP_STRING([--with-external-thes-dir],
+ [Specify external thesaurus dir.]),
+,)
+
AC_ARG_WITH(system-libs,
-[ --with-system-libs Use libs already on system -- enables all
- --with-system-* flags except mozilla and
- odbc/sane/xrender-header(s)
-],,)
+ AS_HELP_STRING([--with-system-libs],
+ [Use libs already on system -- enables all --with-system-* flags except
+ mozilla and odbc/sane/xrender-header(s).]),
+,)
+
AC_ARG_WITH(system-headers,
-[ --with-system-headers Use headers already on system -- enables all
- --with-system-* flags for external packages
- whose headers are the only entities used i.e.
- boost/vigra/odbc/sane/xrender-header(s)
-],,)
+ AS_HELP_STRING([--with-system-headers],
+ [Use headers already on system -- enables all --with-system-* flags for
+ external packages whose headers are the only entities used i.e.
+ boost/vigra/odbc/sane/xrender-header(s).]),
+,)
+
AC_ARG_WITH(system-jars,
-[ --without-system-jars When building with --with-system-libs, also the
- needed jars are expected on the system. Use this to
- disable that.
- (except for the db case where --with-system-db
- *has to* imply using the db.jar from there, too)
-],,)
+ AS_HELP_STRING([--without-system-jars],
+ [When building with --with-system-libs, also the needed jars are expected
+ on the system. Use this to disable that (except for the db case where
+ --with-system-db *has to* imply using the db.jar from there, too).]),
+,)
+
AC_ARG_WITH(system-zlib,
-[ --with-system-zlib Use zlib already on system
-],,)
+ AS_HELP_STRING([--with-system-zlib],
+ [Use zlib already on system.]),
+,)
+
AC_ARG_WITH(system-openssl,
-[ --with-system-openssl Use OpenSSL already on system
-],,)
+ AS_HELP_STRING([--with-system-openssl],
+ [Use OpenSSL already on system.]),
+,)
+
AC_ARG_WITH(system-jpeg,
-[ --with-system-jpeg Use jpeg already on system
-],,)
+ AS_HELP_STRING([--with-system-jpeg],
+ [Use jpeg already on system.]),
+,)
+
AC_ARG_WITH(system-expat,
-[ --with-system-expat Use expat already on system
-],,)
+ AS_HELP_STRING([--with-system-expat],
+ [Use expat already on system.]),
+,)
+
+AC_ARG_WITH(system-libvisio,
+ AS_HELP_STRING([--with-system-libvisio],
+ [Use libvisio already on system.]),
+,)
+
AC_ARG_WITH(system-libwpd,
-[ --with-system-libwpd Use libwpd already on system
-],,)
+ AS_HELP_STRING([--with-system-libwpd],
+ [Use libwpd already on system.]),
+,)
+
+AC_ARG_WITH(system-libwps,
+ AS_HELP_STRING([--with-system-libwps],
+ [Use libwps already on system.]),
+,)
+
+AC_ARG_WITH(system-libwpg,
+ AS_HELP_STRING([--with-system-libwpg],
+ [Use libwpg already on system.]),
+,)
+
AC_ARG_WITH(system-libxml,
-[ --with-system-libxml Use libxml already on system
-],,)
-AC_ARG_WITH(system-python,
-[ --with-system-python Use python already on system
-],,)
+ AS_HELP_STRING([--with-system-libxml],
+ [Use libxml already on system.]),
+,)
+
+AC_ARG_WITH(system-translate-toolkit,
+ AS_HELP_STRING([--with-system-translate-toolkit],
+ [Use translate-toolkit already on system.]))
+
AC_ARG_WITH(system-icu,
-[ --with-system-icu Use icu already on system
-],,)
+ AS_HELP_STRING([--with-system-icu],
+ [Use icu already on system.]))
+
AC_ARG_WITH(system-poppler,
-[ --with-system-poppler Use poppler already on system
-],,)
+ AS_HELP_STRING([--with-system-poppler],
+ [Use system poppler. (only needed for pdfimport extension)]))
+
AC_ARG_WITH(system-db,
-[ --with-system-db Use berkeley db already on system
-],,)
+ AS_HELP_STRING([--with-system-db],
+ [Use Berkeley db already on system.]))
+
AC_ARG_WITH(system-lucene,
-[ --with-system-lucene Use lucene already on system
-],,)
+ AS_HELP_STRING([--with-system-lucene],
+ [Use Lucene already on system.]))
+
+AC_ARG_WITH(system-apache-commons,
+ AS_HELP_STRING([--with-system-apache-commons],
+ [Use Apache commons libraries already on system.]))
+
AC_ARG_WITH(lucene-core-jar,
-[ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ],
-[ LUCENE_CORE_JAR="$withval"
-])
+ AS_HELP_STRING([--with-lucene-core-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LUCENE_CORE_JAR=$withval)
+
AC_ARG_WITH(lucene-analyzers-jar,
-[ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ],
-[ LUCENE_ANALYZERS_JAR="$withval"
-])
-AC_ARG_ENABLE(mysql-connector,
-[ --enable-mysql-connector enables the build of the MySQL Connector/OOo extension.
- This requires access to the MySQL Connector/C (aka libmysql) to be given, too, with
- either the --with-system-mysql or --with-libmysql-path option.
-],,)
+ AS_HELP_STRING([--with-lucene-analyzers-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LUCENE_ANALYZERS_JAR=$withval ,)
+
AC_ARG_WITH(system-mysql,
-[ --with-system-mysql Use MySQL libraries already on system, for building the MySQL Connector/OOo extension.
- Requires MYSQLCONFIG to point to the mysql_config executable.
-],,)
+ AS_HELP_STRING([--with-system-mysql],
+ [Use MySQL libraries already on system, for building the MySQL Connector/LibreOffice
+ extension. Requires MYSQLCONFIG to point to the mysql_config executable.]))
+
AC_ARG_WITH(libmysql-path,
-[ --with-libmysql-path Use Connector/C (libmysql) installation for building the MySQL Connector/OOo extension.
+ AS_HELP_STRING([--with-libmysql-path],
+ [Use Connector/C (libmysql) installation for building the MySQL
+ Connector/LibreOffice extension.])
+ [
+ Usage: --with-libmysql-path=<absolute path to
+ your Connector/C installation>
+ ],
+,)
- Usage: --with-libmysql-path=<absolute path to your Connector/C installation>
-],,)
AC_ARG_WITH(system-mysql-cppconn,
-[ --with-system-mysql-cppconn Use MySQL C++ Connector libraries already on system
-],,)
+ AS_HELP_STRING([--with-system-mysql-cppconn],
+ [Use MySQL C++ Connector libraries already on system.]))
+
AC_ARG_WITH(system-hsqldb,
-[ --with-system-hsqldb Use hsqldb already on system
-],,)
+ AS_HELP_STRING([--with-system-hsqldb],
+ [Use hsqldb already on system.]))
+
AC_ARG_WITH(hsqldb-jar,
-[ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ],
-[ HSQLDB_JAR="$withval"
-])
+ AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ HSQLDB_JAR=$withval)
+
AC_ARG_WITH(system-beanshell,
-[ --with-system-beanshell Use beanshell already on system
-],,)
+ AS_HELP_STRING([--with-system-beanshell],
+ [Use beanshell already on system.]))
+
AC_ARG_WITH(beanshell-jar,
-[ --with-beanshell-jar=JARFILE Specify path to jarfile manually ],
-[ BSH_JAR="$withval"
-])
-AC_ARG_ENABLE(presenter-extra-ui,
-[ --enable-presenter-extra-ui enables extra functionality during slideshow,
- e.g. selecting pen color, erasing drawings etc.
-],,enable_presenter_extra_ui=no)
-AC_ARG_ENABLE(minimizer,
-[ --enable-minimizer enables the build of the Presentation Minimizer extension
-],,)
-AC_ARG_ENABLE(presenter-console,
-[ --enable-presenter-console enables the build of the Presenter Console extension
-],,)
-AC_ARG_ENABLE(pdfimport,
-[ --enable-pdfimport enables the build of the PDF Import extension and xpdf
-],,)
-AC_ARG_ENABLE(wiki-publisher,
-[ --enable-wiki-publisher enables the build of the Wiki Publisher extension
-],,)
+ AS_HELP_STRING([--with-beanshell-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ BSH_JAR=$withval)
+
AC_ARG_WITH(commons-codec-jar,
-[ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ],
-[ COMMONS_CODEC_JAR="$withval"
-])
+ AS_HELP_STRING([--with-commons-codec-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ COMMONS_CODEC_JAR=$withval)
+
AC_ARG_WITH(commons-lang-jar,
-[ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ],
-[ COMMONS_LANG_JAR="$withval"
-])
+ AS_HELP_STRING([--with-commons-lang-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ COMMONS_LANG_JAR=$withval)
+
AC_ARG_WITH(commons-httpclient-jar,
-[ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ],
-[ COMMONS_HTTPCLIENT_JAR="$withval"
-])
+ AS_HELP_STRING([--with-commons-httpclient-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ COMMONS_HTTPCLIENT_JAR=$withval)
+
AC_ARG_WITH(commons-logging-jar,
-[ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ],
-[ COMMONS_LOGGING_JAR="$withval"
-])
+ AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ COMMONS_LOGGING_JAR=$withval)
+
AC_ARG_WITH(servlet-api-jar,
-[ --servlet-api-jar=JARFILE Specify path to jarfile manually ],
-[ SERVLETAPI_JAR="$withval"
-])
-AC_ARG_ENABLE(report-builder,
-[ --enable-report-builder enables the build of the Report Builder extension
-],,)
+ AS_HELP_STRING([--with-servlet-api-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ SERVLETAPI_JAR=$withval)
+
AC_ARG_WITH(system-jfreereport,
-[ --with-system-jfreereport Use JFreeReport already on system
-],,)
+ AS_HELP_STRING([--with-system-jfreereport],
+ [Use JFreeReport already on system.]))
+
AC_ARG_WITH(sac-jar,
-[ --with-sac-jar=JARFILE Specify path to jarfile manually ],
-[ SAC_JAR="$withval"
-])
+ AS_HELP_STRING([--with-sac-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ SAC_JAR=$withval)
+
AC_ARG_WITH(libxml-jar,
-[ --with-libxml-jar=JARFILE Specify path to jarfile manually ],
-[ LIBXML_JAR="$withval"
-])
+ AS_HELP_STRING([--with-libxml-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBXML_JAR=$withval)
+
AC_ARG_WITH(flute-jar,
-[ --with-flute-jar=JARFILE Specify path to jarfile manually ],
-[ FLUTE_JAR="$withval"
-])
+ AS_HELP_STRING([--with-flute-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ FLUTE_JAR=$withval)
+
AC_ARG_WITH(jfreereport-jar,
-[ --with-jfreereport-jar=JARFILE Specify path to jarfile manually ],
-[ JFREEREPORT_JAR="$withval"
-])
+ AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ JFREEREPORT_JAR=$withval)
+
AC_ARG_WITH(liblayout-jar,
-[ --with-liblayout-jar=JARFILE Specify path to jarfile manually ],
-[ LIBLAYOUT_JAR="$withval"
-])
+ AS_HELP_STRING([--with-liblayout-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBLAYOUT_JAR=$withval)
+
AC_ARG_WITH(libloader-jar,
-[ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
-[ LIBLOADER_JAR="$withval"
-])
+ AS_HELP_STRING([--with-libloader-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBLOADER_JAR=$withval)
+
AC_ARG_WITH(libloader-jar,
-[ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
-[ LIBLOADER_JAR="$withval"
-])
+ AS_HELP_STRING([--with-libloader-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBLOADER_JAR=$withval)
+
AC_ARG_WITH(libformula-jar,
-[ --with-libformula-jar=JARFILE Specify path to jarfile manually ],
-[ LIBFORMULA_JAR="$withval"
-])
+ AS_HELP_STRING([--with-libformula-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBFORMULA_JAR=$withval)
+
AC_ARG_WITH(librepository-jar,
-[ --with-librepository-jar=JARFILE Specify path to jarfile manually ],
-[ LIBREPOSITORY_JAR="$withval"
-])
+ AS_HELP_STRING([--with-librepository-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBREPOSITORY_JAR=$withval)
+
AC_ARG_WITH(libfonts-jar,
-[ --with-libfonts-jar=JARFILE Specify path to jarfile manually ],
-[ LIBFONTS_JAR="$withval"
-])
+ AS_HELP_STRING([--with-libfonts-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBFONTS_JAR=$withval)
+
AC_ARG_WITH(libserializer-jar,
-[ --with-libserializer-jar=JARFILE Specify path to jarfile manually ],
-[ LIBSERIALIZER_JAR="$withval"
-])
+ AS_HELP_STRING([--with-libserializer-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBSERIALIZER_JAR=$withval)
+
AC_ARG_WITH(libbase-jar,
-[ --with-libbase-jar=JARFILE Specify path to jarfile manually ],
-[ LIBBASE_JAR="$withval"
-])
+ AS_HELP_STRING([--with-libbase-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ LIBBASE_JAR=$withval)
+
AC_ARG_WITH(system-saxon,
-[ --with-system-saxon Use saxon already on system
-],,)
+ AS_HELP_STRING([--with-system-saxon],
+ [Use saxon already on system.]))
+
AC_ARG_WITH(saxon-jar,
-[ --with-saxon-jar=JARFILE Specify path to jarfile manually ],
-[ SAXON_JAR="$withval"
-])
+ AS_HELP_STRING([--with-saxon-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ SAXON_JAR=$withval)
+
AC_ARG_WITH(system-libxslt,
-[ --with-system-libxslt Use libxslt already on system
-],,)
+ AS_HELP_STRING([--with-system-libxslt],
+ [Use libxslt already on system.]))
+
AC_ARG_WITH(system-odbc,
-[ --with-system-odbc-headers Use the odbc headers already on system
-],,)
+ AS_HELP_STRING([--with-system-odbc],
+ [Use the odbc headers already on system.]))
+
AC_ARG_WITH(system-sane,
-[ --with-system-sane-header Use sane.h already on system
-],,)
-AC_ARG_WITH(system-xrender,
-[ --with-system-xrender-headers Use XRender headers already on system
-],,)
+ AS_HELP_STRING([--with-system-sane-header],
+ [Use sane.h already on system.]))
+
+AC_ARG_WITH(system-xrender-headers,
+ AS_HELP_STRING([--with-system-xrender-headers],
+ [Use XRender headers already on system.]))
+
+AC_ARG_WITH(system-mesa-headers,
+ AS_HELP_STRING([--with-system-mesa-headers],
+ [Use Mesa headers already on system.]))
+
AC_ARG_WITH(system-curl,
-[ --with-system-curl Use curl already on system
-],,)
+ AS_HELP_STRING([--with-system-curl],
+ [Use curl already on system.]))
+
AC_ARG_WITH(system-boost,
-[ --with-system-boost Use boost already on system
-],,)
+ AS_HELP_STRING([--with-system-boost],
+ [Use boost already on system.]))
+
AC_ARG_WITH(system-mdds,
-[ --with-system-mdds Use mdds already on system
-],,)
+ AS_HELP_STRING([--with-system-mdds],
+ [Use mdds already on system.]))
+
AC_ARG_WITH(system-vigra,
-[ --with-system-vigra Use vigra already on system
-],,)
-AC_ARG_ENABLE(neon,
-[ --disable-neon Disable neon and the compilation of webdav binding
-],,)
-AC_ARG_ENABLE(Xaw,
-[ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla
- plugin
-],,)
+ AS_HELP_STRING([--with-system-vigra],
+ [Use vigra already on system.]))
+
AC_ARG_WITH(system-neon,
-[ --with-system-neon Use neon already on system
-],,)
-AC_ARG_WITH(system-agg,
-[ --with-system-agg Use AGG already on system
-],,)
+ AS_HELP_STRING([--with-system-neon],
+ [Use neon already on system.]))
+
AC_ARG_WITH(system-hunspell,
-[ --with-system-hunspell Use libhunspell already on system
-],,)
+ AS_HELP_STRING([--with-system-hunspell],
+ [Use libhunspell already on system.]))
+
AC_ARG_WITH(system-mythes,
-[ --with-system-mythes Use mythes already on system
-],,)
+ AS_HELP_STRING([--with-system-mythes],
+ [Use mythes already on system.]))
+
AC_ARG_WITH(system-altlinuxhyph,
-[ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
-],,)
+ AS_HELP_STRING([--with-system-altlinuxhyph],
+ [Use ALTLinuxhyph already on system.]))
+
AC_ARG_WITH(system-lpsolve,
-[ --with-system-lpsolve Use lpsolve already on system
-],,)
+ AS_HELP_STRING([--with-system-lpsolve],
+ [Use lpsolve already on system.]))
+
AC_ARG_WITH(system-libtextcat,
-[ --with-system-libtextcat Use libtextcat already on system
-],,)
+ AS_HELP_STRING([--with-system-libtextcat],
+ [Use libtextcat already on system.]))
+
AC_ARG_WITH(external-libtextcat-data,
-[ --with-system-libtextcat-data Use libtextcat data already on system
-],,)
+ AS_HELP_STRING([--with-external-libtextcat-data],
+ [Use libtextcat data already on system.]))
+
AC_ARG_WITH(system-cppunit,
-[ --with-system-cppunit Use cppunit already on system
-],,)
+ AS_HELP_STRING([--with-system-cppunit],
+ [Use cppunit already on system.]))
+
AC_ARG_WITH(system-redland,
-[ --with-system-redland Use redland library already on system
-],,)
+ AS_HELP_STRING([--with-system-redland],
+ [Use redland library already on system.]))
+
AC_ARG_WITH(system-mozilla,
-[ --with-system-mozilla Use mozilla already on system. Note that some
- components cannot be built against a contemporary
- mozilla. The flavour used can be specified by
- --with-system-mozilla=<flavour>. Supported are:
- libxul (default), xulrunner, firefox, seamonkey,
- mozilla
-], WITH_SYSTEM_MOZILLA=$withval, WITH_SYSTEM_MOZILLA=no)
-AC_ARG_WITH(stlport,
-[ --with-stlport The location that STLport is installed in. The STL
- header files are assumed to be in
- stlport-home/stlport and the STLPort library in
- stlport-home/lib.
+ AS_HELP_STRING([--with-system-mozilla],
+ [Use Mozilla already on system. Note that some components cannot be built
+ against a contemporary Mozilla. The flavour used can be specified by
+ --with-system-mozilla=<flavour>. Supported are: libxul (default),
+ xulrunner, firefox, seamonkey, mozilla.]),
+ WITH_SYSTEM_MOZILLA=$withval ,
+WITH_SYSTEM_MOZILLA=no)
+
+AC_ARG_WITH(system-gettext,
+ AS_HELP_STRING([--with-system-gettext],
+ [Use gettext runtime library already on system.]))
+
+AC_ARG_WITH(system-libpng,
+ AS_HELP_STRING([--with-system-libpng],
+ [Use libpng already on system.]))
+
+AC_ARG_WITH(linker-hash-style,
+ AS_HELP_STRING([--with-linker-hash-style],
+ [Use linker with --hash-style=<style> when linking shared objects.
+ Possible values: "sysv", "gnu", "both". The default value is "gnu"
+ if supported on the build system, and "sysv" otherwise.]))
- Usage: --with-stlport=<absolute path to stlport home>
+AC_ARG_WITH(stlport,
+ AS_HELP_STRING([--with-stlport],
+ [Build the STLPort library for compatibility with old extensions for
+ architectures where STLPort used to be used.]),
+ with_stlport=$withval ,
+with_stlport=auto)
- Warning!!, disabling using --without-stlport or
- enabling using --with-stlport on a platform that
- defaults to the opposite will break ABI compatability
-], WITH_STLPORT=$withval , WITH_STLPORT=auto)
AC_ARG_WITH(jdk-home,
-[ --with-jdk-home if you have installed JDK 1.3 or later on your system
- please supply the path here.
- Note that this is not the location of the Java binary
- but the location of the entire distribution.
-
- Usage: --with-jdk-home=<absolute path to JDK home>
-],,)
+ AS_HELP_STRING([--with-jdk-home],
+ [If you have installed JDK 1.3 or later on your system please supply the
+ path here. Note that this is not the location of the java command but the
+ location of the entire distribution.])
+ [
+ Usage: --with-jdk-home=<absolute path to JDK home>
+ ],
+,)
+
AC_ARG_WITH(gxx_include_path,
-[ --with-gxx-include-path if you want to override the autodetected g++ include
- path.
-
- Usage: --with-gxx-include-path=<absolute path to g++ include dir>
-],,)
+ AS_HELP_STRING([--with-gxx-include-path],
+ [If you want to override the autodetected g++ include path.])
+ [
+ Usage: --with-gxx-include-path=<absolute path to
+ g++ include dir>
+ ],
+,)
+
AC_ARG_WITH(java,
-[ --with-java Build with[[out]] Java support. If you use
- --without-java/--with-java=no then the build will have
- no support for Java components, applets, accessibility
- or XML filters.
-], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java)
-AC_ARG_ENABLE(gcjaot,
-[ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation
- support to speed up buildsi by compiling the jars also
- to native code..
- --enable-gcjaot is only known to work with bytecode
- created with gcj or ecj
-],,)
+ AS_HELP_STRING([--with-java],
+ [Specify the name of the Java interpreter command. Typically "java"
+ which is the default.
+
+ To build without support for Java components, applets, accessibility
+ or the XML filters written in Java, use --without-java or --with-java=no.])
+ [
+ Usage: --with-java==<java command>
+ --without-java
+ ],
+ [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
+ [ with_java=java ]
+)
+
+AC_ARG_WITH(java_target_version,
+ AS_HELP_STRING([--with-java-target-version],
+ [Generate class files that will work on JVMs with the specified version.
+ For example, use --with-java-target-version=1.4 to make sure that the
+ application will work with JVM 1.4 even when compiled with JDK 1.5.])
+ [
+ This option is ignored when you compile with gcj/gij.
+
+ Usage: --with-java-target-version=<jvm version>
+ ],
+,)
+
+AC_ARG_WITH(jvm-path,
+ AS_HELP_STRING([--with-jvm-path],
+ [Use a specific JVM search path at runtime.])
+ [
+ Usage: --with-jvm-path=<absolute path to parent of jvm home>
+
+ e. g.: --with-jvm-path=/usr/lib/
+ to find JRE/JDK in /usr/lib/jvm/
+ ],
+,)
+
AC_ARG_WITH(ant-home,
-[ --with-ant-home If you have installed Jakarta Ant on your system,
- please supply the path here.
- Note that this is not the location of the Ant binary
- but the location of the entire distribution.
-
- Usage: --with-ant-home=<absolute path to Ant home>
-],,)
+ AS_HELP_STRING([--with-ant-home],
+ [If you have installed Jakarta Ant on your system, please supply the path here.
+ Note that this is not the location of the Ant binary but the location
+ of the entire distribution.])
+ [
+ Usage: --with-ant-home=<absolute path to Ant home>
+ ],
+,)
+
AC_ARG_WITH(junit,
-[ --with-junit Specifies the JUnit 4 jar file to use for JUnit-based
- tests. --without-junit disables those tests. Not
- relevant in the --without-java case.
+ AS_HELP_STRING([--with-junit],
+ [Specifies the JUnit 4 jar file to use for JUnit-based tests.
+ --without-junit disables those tests. Not relevant in the --without-java case.])
+ [
+ Usage: --with-junit=<absolute path to JUnit 4 jar>
+ ],
+,with_junit=yes)
- Usage: --with-junit=<absolute path to JUnit 4 jar>
-],,with_junit=yes)
AC_ARG_WITH(perl-home,
-[ --with-perl-home If you have installed the Perl 5 Distribution, on your
- system, please supply the path here.
- Note that this is not the location of the Perl binary
- but the location of the entire distribution.
-
- Usage: --with-perl-home=<absolute path to Perl 5 home>
-],,)
+ AS_HELP_STRING([--with-perl-home],
+ [If you have installed Perl 5 Distribution, on your system, please
+ supply the path here. Note that this is not the location of the Perl
+ binary but the location of the entire distribution.])
+ [
+ Usage: --with-perl-home=<abs. path to Perl 5 home>
+ ],
+,)
+
AC_ARG_WITH(cl-home,
-[ --with-cl-home For Windows NT users, please supply the path
- for the Microsoft C/C++ compiler.
- Note that this is not the location of the compiler
- binary but the location of the entire distribution.
-
- Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>
-],,)
+ AS_HELP_STRING([--with-cl-home],
+ [For Windows NT users, please supply the path for the Microsoft C/C++
+ compiler. Note that this is not the location of the compiler binary but
+ the location of the entire distribution.])
+ [
+ Usage: --with-cl-home=<absolute path to Microsoft
+ C/C++ compiler home>
+ ],
+,)
+
AC_ARG_WITH(mspdb-path,
-[ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the
- path pointing to the mspdb71.dll (.NET 2003).
-
- Usage: --with-mspdb-path=<absolute path to mspdb71.dll>
-],,)
+ AS_HELP_STRING([--with-mspdb-path],
+ [For Microsoft C/C++ compiler users, please supply the path pointing to
+ the mspdb80.dll (if using Visual Studio 2008) or mspdb100.dl (if using
+ Visual Studio 2010).])
+ [
+ Usage: --with-mspdb-path=<path to
+ mspdb80.dll/mspdb100.dll>
+ ],
+,)
+
AC_ARG_WITH(midl-path,
-[ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply
- the path pointing to the midl.exe.
-
- Usage: --with-midl-path=<absolute path to midl.exe>
-],,)
+ AS_HELP_STRING([--with-midl-path],
+ [For Microsoft compiler users, please supply the path pointing to the midl.exe.])
+ [
+ Usage: --with-midl-path=<abs. path to midl.exe>
+ ],
+,)
+
AC_ARG_WITH(csc-path,
-[ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply
- the path pointing to the csc.exe.
-
- Usage: --with-csc-path=<absolute path to csc.exe>
-],,)
+ AS_HELP_STRING([--with-csc-path],
+ [For Windows builds, please supply the path pointing to the csc.exe.
+ Usually found automatically when building on Windows.])
+ [
+ Usage: --with-csc-path=<abs. path to csc.exe>
+ ],
+,)
+
AC_ARG_WITH(nsis-path,
-[ --with-nsis-path For Windows users, please supply the path to the
- "Nullsoft Scriptable Install System" (NSIS). If NSIS
- is found in the path or this option is supplied a self
- contained executable installer for OpenOffice.org will
- be created.
+ AS_HELP_STRING([--with-nsis-path],
+ [For Windows builds, please supply the directory where makensis
+ is located. If makensis is found in PATH or this option is
+ properly supplied a self-contained executable installer for
+ LibreOffice will be created.])
+ [
+ Usage: --with-nsis-path=<path to directory containing makensis>
+ ],
+,)
+
+AC_ARG_WITH(dotnet-framework-home,
+ AS_HELP_STRING([--with-dotnet-framework-home],
+ [For Microsoft compiler users, please supply the path pointing to
+ lib/mscoree.lib, usually something like:
+ "/cygdrive/c/Program Files/Windows SDKs/Windows/v7.0"])
+ [
+ Note that in most cases it will be automatically
+ found, though.
+
+ Usage: --with-dotnet-framework-home=<absolute path to .NET
+ Framework>
+ ],
+,)
+
+AC_ARG_WITH(windows-sdk-home,
+ AS_HELP_STRING([--with-windows-sdk-home],
+ [For Windows builds, please supply the path to the Windows SDK.
+ Usually found automatically when building on Windows.])
+ [
+ Usage: --with-windows-sdk-home=<absolute path to Windows SDK>
+ ],
+,)
- Usage: --with-nsis-path=<absolute path to nsis.exe>
-],,)
-AC_ARG_WITH(frame-home,
-[ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply
- the path pointing to lib/mscoree.lib, usually
- something like:
- "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"
-
- MS Visual Toolkit compiler users, please supply the
- path pointing to lib/msvcrt.lib, usually something
- like:
- "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"
-
- Usage: --with-frame-home=<absolute path to Framework SDK [[home]]>
-],,)
-AC_ARG_WITH(psdk-home,
-[ --with-psdk-home For Windows users, please supply the path to the
- Microsoft Platform SDK.
-
- Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>
-],,)
AC_ARG_WITH(directx-home,
-[ --with-directx-home For Windows users, please supply the path to the
- Microsoft DirectX SDK.
-
- Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
-],,)
+ AS_HELP_STRING([--with-directx-home],
+ [For Windows users, please supply the path to the Microsoft DirectX SDK.])
+ [
+ Usage: --with-directx-home=<absolute path to
+ Microsoft DirectX SDK>
+ ],
+,)
+
AC_ARG_WITH(mozilla-build,
-[ --with-mozilla-build For Windows users, please supply the path to the
- mozilla build tools.
-
- Usage: --with-mozilla-build=<absolute path to mozilla build tools>
-
- At the moment of this writing, an installer for the mozilla build tools
- can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
-],[MOZILLABUILD=$withval],)
-AC_ARG_WITH(local-solenv,
-[ --with-local-solenv If you have solenv in a location other than ./solenv,
- please supply the path here.
-
- Usage: --with-local-solenv=<absolute path to solenv>
-],,)
+ AS_HELP_STRING([--with-mozilla-build],
+ [For Windows users, please supply the path to the Mozilla build tools.])
+ [
+ Usage: --with-mozilla-build=<absolute path to
+ Mozilla build tools>
+
+ At the moment of this writing, an installer for the
+ mozilla build tools can be obtained from http://ftp.
+ mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
+ ],
+ MOZILLABUILD=$withval ,
+)
+
AC_ARG_WITH(local-solver,
-[ --with-local-solver if you have solver in a location other than ./solver,
- please supply the path here.
-
- Usage: --with-local-solver=<absolute path to solver>
-],,)
-AC_ARG_ENABLE(check-only,
-[ --enable-check-only Use this option option if you just want to check your
- environment. This option stops the generation of an
- ????env.set
-
- Usage: --enable-check-only=yes
-],,)
-AC_ARG_ENABLE(ccache-skip,
-[[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to
- escape compiler flags that would otherwise prevent
- caching of the result (currently used on Mac only)
- NOTE: requires patched version because of a bug in
- ccache (see issue 104567 for details and patch)
- explicitly enable if your version of ccache doesn't
- identify as version 2.4_OOo
-]],,enable_ccache_skip=auto)
-AC_ARG_WITH(lang,
-[ --with-lang Use this option to build OpenOffice.org with
- additional language support. English (US) is always
- included by default. Separate multiple languages with
- space. For all languages, use --with-lang=ALL.
+ AS_HELP_STRING([--with-local-solver],
+ [If you have solver in a location other than ./solver, please supply the path here.])
+ [
+ Usage: --with-local-solver=<abs. path to solver>
+ ],
+,)
- Usage: --with-lang="es sw tu cs sk"
+AC_ARG_WITH(lang,
+ AS_HELP_STRING([--with-lang],
+ [Use this option to build LibreOffice with additional language support.
+ English (US) is always included by default.
+ Separate multiple languages with space.
+ For all languages, use --with-lang=ALL.])
+ [
+ Usage: --with-lang="es sw tu cs sk"
+ ],
+,)
+
+AC_ARG_WITH(intro-bitmap,
+[ --with-intro-bitmap Prefer the specified intro bitmap over the
+ the default one.
+
+ Usage: --with-intro-bitmap=/path/my_ooo_intro.png
],,)
-AC_ARG_WITH(poor-help-localizations,
-[ --with-poor-help-localizations
- Use this option to specify which languages have
- unusable help localizations. Separate multiple
- languages with space.
- Usage: --with-poor-help-localizations="af ar be-BY ca"
-],,)
-AC_ARG_WITH(dict,
-[ --with-dict Use this option to build OpenOffice.org with
- dictionary support. ALL dictionaries are always
- included by default unless overridden with
- this option. Separate multiple dictionaries with
- commas. For all dictionaries, use --with-dict=ALL.
-
- Usage: --with-dict=ENGB,ENUS,ITIT
-],,)
-AC_ARG_WITH(intro-bitmaps,
-[ --with-intro-bitmaps Prefer the specified intro bitmaps over the
- the default one. Can be more than one (separated by
- commas), the order means priority of fallback if the
- first does not exist (in the installed tree).
+AC_ARG_WITH(about-bitmap,
+[ --with-about-bitmap Similarly to --with-intro-bitmap, this allows
+ specification of bitmap for the About box.
- Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
+ Usage: --with-about-bitmap=/path/my_ooo_about.png
],,)
-AC_ARG_WITH(about-bitmaps,
-[ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
- specification of bitmaps for the About box.
- Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
-],,)
AC_ARG_WITH(vendor,
-[ --with-vendor Set vendor of the build.
+ AS_HELP_STRING([--with-vendor],
+ [Set vendor of the build.])
+ [
+ Usage: --with-vendor="John the Builder"
+ ],
+,)
- Usage: --with-vendor="John the Builder"
-],,)
AC_ARG_WITH(unix-wrapper,
-[ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
- in the desktop files and in the desktop-integration RPMs.
+ AS_HELP_STRING([--with-unix-wrapper],
+ [Redefines the name of the UNIX wrapper that will be used in the desktop
+ files and in the desktop-integration RPMs.])
+ [
+ Usage: --with-unix-wrapper=ooffice
+ ],
+,)
- Usage: --with-unix-wrapper=ooffice
-],,)
AC_ARG_WITH(asm-home,
-[ --with-asm-home For Windows users, please supply the path for the
- ml.exe assembler.
+ AS_HELP_STRING([--with-asm-home],
+ [For Windows, please supply the path for the ml.exe or ml64.exe assembler.])
+ [
+ Usage: --with-asm-home=<path to assembler directory>
+ ],
+,)
- Usage: --with-asm-home=<path to ml.exe directory>
-],,)
AC_ARG_WITH(os-version,
-[ --with-os-version For FreeBSD users, use this option option to override
- the detected OSVERSION.
-
- Usage: --with-os-version=<OSVERSION>
-],,)
-AC_ARG_WITH(unzip-home,
-[ --with-unzip-home Deprecated: use --with-zip-home instead],,)
-AC_ARG_WITH(zip-home,
-[ --with-zip-home If you use a non standard zip, for example windows
- please supply the path for zip
-
- Usage: --with-zip-home=<path to zip executable>
-],,)
-AC_ARG_WITH(mingwin,
-[ --with-mingwin For Windows users, use the mingwin32 compiler within
- cygwin environment
-
- Usage: --with-mingwin=yes
+ AS_HELP_STRING([--with-os-version],
+ [For FreeBSD users, use this option option to override the detected OSVERSION.])
+ [
+ Usage: --with-os-version=<OSVERSION>
+ ],
+,)
+
+AC_ARG_WITH(mingw-cross-compiler,
+ AS_HELP_STRING([--with-mingw-cross-compiler],
+ [Specify the MinGW cross-compiler to use.])
+ [
+ Usage: --with-mingw-cross-compiler=<mingw32-g++ command>
+
+ When building on the ODK on Unix and building unowinreg.dll,
+ specify the MinGW C++ cross-compiler.
+ ],
+,)
- For !Windows use, use the mingw32 C++ compiler to
- (re-) build unowinreg.dll. Specify the MinGW C++
- Compilers name.
-
- Usage: --with-mingwin=i586-mingw32msvc-g++
-],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
AC_ARG_WITH(build-version,
-[ --with-build-version Allows the builder to add a custom version tag
- that will appear in the Help/About box for QA
- purposes.
+ AS_HELP_STRING([--with-build-version],
+ [Allows the builder to add a custom version tag that will appear in the
+ Help/About box for QA purposes.])
+ [
+ Usage: --with-build-version="Built by Jim"
+ ],
+ with_build_version=$withval ,
+)
- Usage: --with-build-version="Built by Jim"
-],with_build_version=$withval)
AC_ARG_WITH(alloc,
-[ --with-alloc Define which allocator to build with
- (choices are oo, system, tcmalloc, jemalloc)
-
- Note that on FreeBSD/NetBSD system==jemalloc
-],,)
-AC_ARG_ENABLE(verbose,
-[ --enable-verbose Increase build verbosity.
- --disable-verbose Decrease build verbosity.
-],,)
-AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking Disables generation of dependency information.
-],,)
-
-BUILD_TYPE="OOo"
+ AS_HELP_STRING([--with-alloc],
+ [Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
+ Note that on FreeBSD/NetBSD system==jemalloc]),
+,)
+
+AC_ARG_WITH(sun-templates,
+ AS_HELP_STRING([--with-sun-templates],
+ [Integrate Sun template packages.]),
+,)
+
+AC_ARG_WITH(num-cpus,
+ AS_HELP_STRING([--with-num-cpus],
+ [Number of build processes/cpus to use (number of projects that will build at the same time).
+ Multi-process/multi-cpu builds can save a lot of time on multi-cpu machines.
+ Defaults to the number of CPUs on the machine.]),
+,)
+
+AC_ARG_WITH(max-jobs,
+ AS_HELP_STRING([--with-max-jobs],
+ [Maximum number of jobs per one CPU that will be issued at the same time my dmake.
+ The real number of the jobs is affected by the --with-num-cpus too, it can get up to CPUS*max_jobs.
+ Defaults to 1, unless you configure --enable-icecream - then to 10.]),
+,)
+
+BUILD_TYPE="LibO"
+SCPDEFS=""
-dnl ===================================================================
-dnl Message.
-dnl ===================================================================
echo "********************************************************************"
-echo "* *"
-echo "* OpenOffice.org build configuration. *"
-echo "* *"
-echo "* The configure process checks your platform to see whether *"
-echo "* you can build OpenOffice.org on it. *"
-echo "* This process checks all pre-requisites and generates a file *"
-echo "* containing the necessary environment variables. *"
-echo "* Source this file after configure has ended successfully. *"
-echo "* *"
-echo "* Any warning that is generated during the configure process *"
-echo "* must be taken into account since it can be a reason for *"
-echo "* an unsuccessful build of OpenOffice.org *"
-echo "* *"
-echo "********************************************************************"
-echo ""
-echo "********************************************************************"
-echo "* *"
-echo "* Checking the platform pre-requisites. *"
-echo "* *"
+echo "*"
+echo "* Running ${PACKAGE_NAME} build configuration."
+echo "*"
echo "********************************************************************"
echo ""
+
dnl ===================================================================
-dnl Configure pre-requisites.
+dnl checks build and host OSes
+dnl ===================================================================
+AC_CANONICAL_SYSTEM
+
+if test "$cross_compiling" = "yes"; then
+ CROSS_COMPILING=YES
+else
+ CROSS_COMPILING=
+fi
+AC_SUBST(CROSS_COMPILING)
+
+if test "$build_os" = "cygwin"; then
+ EXEEXT_FOR_BUILD=.exe
+else
+ EXEEXT_FOR_BUILD=
+fi
+AC_SUBST(EXEEXT_FOR_BUILD)
+
+dnl ===================================================================
+dnl check for required programs (grep, awk, sed, bash)
dnl ===================================================================
cat /dev/null > warn
+
+if test "$EUID" -eq "0" -a "z`uname -o 2>/dev/null`" = "zCygwin" ; then
+ AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account])
+fi
+
+save_CC=$CC
+save_CXX=$CXX
+
AC_PROG_EGREP
AC_PROG_AWK
AC_PATH_PROG( AWK, $AWK)
@@ -890,212 +1330,432 @@ if test -z "$SED"; then
AC_MSG_ERROR([install sed to run this script])
fi
-AC_MSG_CHECKING([for solenv environment])
-if test -z "$with_local_solenv"; then
- LOCAL_SOLENV="DEFAULT"
- AC_MSG_RESULT([default])
-else
- LOCAL_SOLENV=$with_local_solenv
- AC_MSG_RESULT([$with_local_solenv])
-fi
-AC_SUBST(LOCAL_SOLENV)
-
-if test "$LOCAL_SOLENV" = "DEFAULT"; then
- _solenv="./solenv"
-else
- _solenv="$LOCAL_SOLENV"
-fi
-AC_SUBST(_solenv)
-
-if test -e $_solenv/inc/minor.mk; then
- # Get UPD number from ./solenv/inc/minor.mk
- UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
- AC_SUBST(UPD)
- SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
- AC_SUBST(SOURCEVERSION)
-else
- AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
+AC_PATH_PROG(BASH, bash)
+if test -z "$BASH"; then
+ AC_MSG_ERROR([bash not found in \$PATH])
fi
+AC_SUBST(BASH)
-dnl ===================================================================
-dnl Checks for the operating system and processor.
-dnl ===================================================================
-AC_CANONICAL_SYSTEM
-if test "$build" != "$host" -o "$build" != "$target" \
- -o "$host" != "$target"; then
- AC_MSG_WARN([cross-compiling by any means is not supported (yet)!])
- echo "cross-compiling by any means is not supported (yet)!" >> warn
-fi
-
-if echo "$build_os" | grep cygwin; then
- AC_MSG_CHECKING([Cygwin version])
- CygwinVer=`uname -r`
- AC_MSG_RESULT([$CygwinVer])
- if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
- AC_MSG_ERROR([You need at least Cygwin V1.5.x])
- fi
-else
- CygwinVer="false"
+AC_MSG_CHECKING([for GNU or BSD tar])
+for a in $GNUTAR gtar gnutar tar; do
+ $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
+ if test $? -eq 0; then
+ GNUTAR=$a
+ break
+ fi
+done
+AC_MSG_RESULT($GNUTAR)
+if test -z "$GNUTAR"; then
+ AC_MSG_ERROR([not found. install GNU or BSD tar.])
fi
+AC_SUBST(GNUTAR)
dnl ===================================================================
dnl The following is a list of supported systems.
dnl Sequential to keep the logic very simple
dnl These values may be checked and reset later.
dnl ===================================================================
-case "$build_os" in
- solaris*)
- test_gtk=yes
- test_cairo=yes
- test_librsvg=yes
- test_kde=yes
- test_cups=yes
- test_randr=yes
- test_freetype=yes
- test_gstreamer=yes
- _os=SunOS
- AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
- if test -z "$GNUTAR"; then
- AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).])
- fi
- AC_SUBST(GNUTAR)
-
- dnl ===========================================================
- dnl check whether we're using solaris 6,7,8 - sparc or intel.
- dnl ===========================================================
- AC_MSG_CHECKING([the Solaris operating system release])
- _os_release=`echo $build_os | $SED -e s/solaris2\.//`
- if test "$_os_release" -lt "6"; then
- AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
- else
- AC_MSG_RESULT([ok ($_os_release)])
- fi
-
- dnl check whether we're using a sparc or i386 processor
- AC_MSG_CHECKING([the processor type])
- if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
- AC_MSG_RESULT([ok ($build_cpu)])
- else
- AC_MSG_ERROR([only sparc and i386 processors are supported])
- fi
- ;;
- linux-gnu*|k*bsd*-gnu*)
- test_gtk=yes
- test_cairo=yes
- test_librsvg=yes
- test_kde=yes
- test_kde4=yes
- test_cups=yes
- test_randr=yes
- test_freetype=yes
+#defaults unless the os test overrides this:
+test_randr=yes
+test_cups=yes
+test_fontconfig=yes
+
+case "$host_os" in
+ solaris*)
+ test_gtk=yes
+ build_gstreamer=yes
+ test_kde=yes
+ test_freetype=yes
test_gstreamer=yes
- _os=Linux
- ;;
- gnu)
- test_cups=no
- _os=GNU
- ;;
- cygwin*) # Windows
- test_cups=no
- test_cairo=yes
- test_librsvg=no
- test_freetype=no
- test_gstreamer=no
- _os=WINNT
- ;;
- darwin*) # Mac OS X
- test_cups=yes
- test_gtk=yes
- test_cairo=yes
- test_librsvg=no
+ _os=SunOS
+ AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
+ if test -z "$GNUTAR"; then
+ AC_MSG_ERROR([gtar (GNU tar) not found but needed. Install it (Sun Freeware package).])
+ fi
+ AC_SUBST(GNUTAR)
+
+ dnl ===========================================================
+ dnl Check whether we're using Solaris 6,7,8 - SPARC or Intel.
+ dnl ===========================================================
+ AC_MSG_CHECKING([the Solaris operating system release])
+ _os_release=`echo $host_os | $SED -e s/solaris2\.//`
+ if test "$_os_release" -lt "6"; then
+ AC_MSG_ERROR([use Solaris >= 6 to build LibreOffice])
+ else
+ AC_MSG_RESULT([ok ($_os_release)])
+ fi
+
+ dnl Check whether we're using a SPARC or i386 processor
+ AC_MSG_CHECKING([the processor type])
+ if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then
+ AC_MSG_RESULT([ok ($host_cpu)])
+ else
+ AC_MSG_ERROR([only SPARC and i386 processors are supported])
+ fi
+ ;;
+ linux-gnu*|k*bsd*-gnu*)
+ test_gtk=yes
+ build_gstreamer=yes
+ test_kde=yes
+ test_kde4=yes
+ test_freetype=yes
+ test_unix_quickstarter=yes
+ _os=Linux
+ ;;
+ gnu)
test_randr=no
- test_freetype=no
- test_gstreamer=no
- _os=Darwin
- if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
- AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
- echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
- enable_systray=no
- fi
- ;;
- os2*)
- test_x=no
- test_cups=no
+ test_cups=no
+ _os=GNU
+ ;;
+ cygwin*|interix*|mingw32*)
+
+ # When building on Windows normally with MSVC under Cygwin,
+ # configure thinks that the host platform (the platform the
+ # built code will run on) is Cygwin, even if it obviously is
+ # Windows, which in Autoconf terminology is called
+ # "mingw32". (Which is misleading as MinGW is the name of the
+ # tool-chain, not an operating system.)
+
+ # Somewhat confusing, yes. But this configure script doesn't
+ # look at $host etc that much, it mostly uses its own $_os
+ # variable, set here in this case statement.
+
+ # When cross-compiling to Windows from Unix, the host platform
+ # is "mingw32" (because in that case it is the MinGW
+ # tool-chain that is used).
+
+ test_cups=no
test_randr=no
- test_gtk=no
- test_librsvg=no
- test_freetype=no
- test_gstreamer=no
- _os=OS2
- ;;
- freebsd*)
- test_gtk=yes
- test_cairo=yes
- test_librsvg=yes
- test_kde=yes
- test_kde4=yes
- test_cups=yes
- test_randr=yes
- test_freetype=yes
- test_gstreamer=yes
- AC_MSG_CHECKING([the FreeBSD operating system release])
- if test -n "$with_os_version"; then
- OSVERSION="$with_os_version"
- else
- OSVERSION=`/sbin/sysctl -n kern.osreldate`
- fi
- AC_MSG_RESULT([found OSVERSION=$OSVERSION])
- AC_MSG_CHECKING([which thread library to use])
- if test "$OSVERSION" -lt "500016"; then
- PTHREAD_CFLAGS="-D_THREAD_SAFE"
- PTHREAD_LIBS="-pthread"
- elif test "$OSVERSION" -lt "502102"; then
- PTHREAD_CFLAGS="-D_THREAD_SAFE"
- PTHREAD_LIBS="-lc_r"
- else
- PTHREAD_CFLAGS=""
- PTHREAD_LIBS="-pthread"
- fi
- AC_MSG_RESULT([$PTHREAD_LIBS])
- _os=FreeBSD
- ;;
- osf)
- test_cups=no
+ test_freetype=no
+ test_fontconfig=no
+ _os=WINNT
+ # Confusingly, if the host OS matches "mingw32*", that means
+ # we are using the MinGW compiler, either natively (unlikely)
+ # or cross-compiling. We use WITH_MINGW to indicate
+ # use of MinGW in both cases.
+ case "$host_os" in
+ mingw32*)
+ WITH_MINGW=yes
+ ;;
+ esac
+ ;;
+ darwin*) # Mac OS X or iOS
+ test_gtk=yes
test_randr=no
- _os=OSF1
- ;;
- netbsd)
- test_gtk=yes
- test_cairo=yes
- test_librsvg=yes
- test_kde=yes
- test_kde4=yes
- test_cups=no
- test_randr=yes
- test_freetype=yes
- test_gstreamer=yes
- PTHREAD_CFLAGS="-pthread"
- PTHREAD_LIBS="-pthread -lpthread"
- _os=NetBSD
- ;;
- aix*)
- test_cups=no
+ test_freetype=no
+ test_fontconfig=no
+ if test "$host_cpu" = "arm"; then
+ _os=iOS
+ test_gtk=no
+ else
+ _os=Darwin
+ fi
+ enable_systray=no
+ ;;
+ freebsd*)
+ test_gtk=yes
+ build_gstreamer=yes
+ test_kde=yes
+ test_kde4=yes
+ test_freetype=yes
+ AC_MSG_CHECKING([the FreeBSD operating system release])
+ if test -n "$with_os_version"; then
+ OSVERSION="$with_os_version"
+ else
+ OSVERSION=`/sbin/sysctl -n kern.osreldate`
+ fi
+ AC_MSG_RESULT([found OSVERSION=$OSVERSION])
+ AC_MSG_CHECKING([which thread library to use])
+ if test "$OSVERSION" -lt "500016"; then
+ PTHREAD_CFLAGS="-D_THREAD_SAFE"
+ PTHREAD_LIBS="-pthread"
+ elif test "$OSVERSION" -lt "502102"; then
+ PTHREAD_CFLAGS="-D_THREAD_SAFE"
+ PTHREAD_LIBS="-lc_r"
+ else
+ PTHREAD_CFLAGS=""
+ PTHREAD_LIBS="-pthread"
+ fi
+ AC_MSG_RESULT([$PTHREAD_LIBS])
+ _os=FreeBSD
+ ;;
+ *netbsd*)
+ test_gtk=yes
+ build_gstreamer=yes
+ test_kde=no
+ test_kde4=yes
+ test_freetype=yes
+ PTHREAD_LIBS="-pthread -lpthread"
+ _os=NetBSD
+ ;;
+ aix*)
+ test_cups=no
test_randr=no
- test_freetype=yes
- test_gstreamer=yes
- PTHREAD_LIBS=-pthread
- echo "AIX is an alpha port --- Use at own risk" >> warn
- _os=AIX
- ;;
+ test_freetype=yes
+ PTHREAD_LIBS=-pthread
+ _os=AIX
+ ;;
+ openbsd*)
+ test_gtk=yes
+ test_kde=yes
+ test_freetype=yes
+ PTHREAD_CFLAGS="-D_THREAD_SAFE"
+ PTHREAD_LIBS="-pthread"
+ _os=OpenBSD
+ ;;
+ dragonfly*)
+ test_gtk=yes
+ build_gstreamer=yes
+ test_kde=yes
+ test_kde4=yes
+ test_freetype=yes
+ PTHREAD_LIBS="-pthread"
+ _os=DragonFly
+ ;;
+ androideabi*)
+ build_gstreamer=no
+ test_cups=no
+ test_fontconfig=no
+ test_freetype=no
+ test_gtk=no
+ test_kde=no
+ test_kde4=no
+ test_randr=no
+ test_unix_quickstarter=no
+ _os=Android
+ ;;
*)
- AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
+ AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice!])
;;
esac
+AC_SUBST(WITH_MINGW)
AC_SUBST(OSVERSION)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS)
+if test $build_os = "cygwin"; then
+ dnl ===================================================================
+ dnl If $CC is set to a MinGW compiler, set WITH_MINGW
+ dnl ===================================================================
+ if test "$WITH_MINGW" != "yes" -a -n "$CC" -a "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
+ WITH_MINGW="yes"
+ fi
+fi
+
+dnl ===================================================================
+dnl Extra check for Windows. Cygwin builds need gcc to build dmake
+dnl and g++ to build guw.exe although MSVC or MinGW is used to
+dnl build LibreOffice.
+dnl ===================================================================
+if test "build_os" = "cygwin" ; then
+ AC_MSG_CHECKING([for Cygwin gcc/g++])
+ if which gcc > /dev/null && which g++ > /dev/null ; then
+ AC_MSG_RESULT([found])
+ else
+ AC_MSG_ERROR([Cygwin gcc and g++ are needed, please install them.])
+ fi
+fi
+
+dnl ===================================================================
+dnl Checks for C compiler,
+dnl The check for the C++ compiler is later on.
+dnl ===================================================================
+GCC_HOME_SET="true"
+AC_MSG_CHECKING([gcc home])
+if test -z "$with_gcc_home"; then
+ if test -n "$enable_icecream" && test "$enable_icecream" != "no" ; then
+ GCC_HOME="/opt/icecream"
+ else
+ GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
+ GCC_HOME_SET="false"
+ fi
+else
+ GCC_HOME="$with_gcc_home"
+fi
+AC_MSG_RESULT($GCC_HOME)
+AC_SUBST(GCC_HOME)
+
+if test "$GCC_HOME_SET" = "true" ; then
+ if test -z "$CC"; then
+ CC="$GCC_HOME/bin/gcc"
+ fi
+ if test -z "$CXX"; then
+ CXX="$GCC_HOME/bin/g++"
+ fi
+fi
+
+dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+ AC_PROG_CC
+fi
+
+COMPATH=`dirname "$CC"`
+if test "$COMPATH" = "." ; then
+ AC_PATH_PROGS(COMPATH, $CC)
+ dnl double square bracket to get single because of M4 quote...
+ COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
+fi
+COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
+
+dnl ===================================================================
+dnl Test the gcc version, 3 is OK
+dnl ===================================================================
+if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) -a "$GCC" = "yes"; then
+ AC_MSG_CHECKING([the GNU C compiler version])
+ _gcc_version=`$CC -dumpversion`
+ _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
+ GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+
+ if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then
+ if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
+ export CC=$GCC_HOME/bin/gcc-4.0
+ dnl export CC to have it available in set_soenv -> config.guess
+ GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+ if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
+ GCCVER=$GCCVER2
+ fi
+ fi
+ if test "$GCCVER" -ge "040100" ; then
+ 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])
+ else
+ AC_MSG_RESULT([implicitly using CC=$CC])
+ fi
+ else
+ AC_MSG_RESULT([checked (gcc $_gcc_version)])
+ fi
+ if test "$_os" = "SunOS"; then
+ AC_MSG_CHECKING([gcc linker])
+ if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
+ AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
+ fi
+ AC_MSG_RESULT([ok (GNU ld)])
+ fi
+fi
+
+HAVE_LD_BSYMBOLIC_FUNCTIONS=
+if test "$GCC" = "yes"; then
+ AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
+ bsymbolic_functions_ldflags_save=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ ],[
+ printf ("hello world\n");
+ ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
+ if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
+ AC_MSG_RESULT( found )
+ else
+ AC_MSG_RESULT( not found )
+ fi
+ LDFLAGS=$bsymbolic_functions_ldflags_save
+fi
+AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
+
+dnl ===================================================================
+dnl Set up a different compiler to produce tools to run on the build
+dnl machine when doing cross-compilation
+dnl ===================================================================
+
+m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
+if test "$cross_compiling" = "yes"; then
+ AC_MSG_CHECKING([for BUILD platform configuration])
+ echo
+ rm -rf CONF-FOR-BUILD Env.Build.sh
+ mkdir CONF-FOR-BUILD
+ tar cf - \
+ configure \
+ config.guess \
+ oowintool \
+ solenv/inc/minor.mk \
+ solenv/inc/postset.mk \
+ solenv/inc/langlist.mk \
+ set_soenv.in \
+ bootstrap.1 \
+ post_download.in \
+ ooo.lst.in \
+ Makefile.in \
+ bin/repo-list.in | (cd CONF-FOR-BUILD && tar xf -)
+ (
+ unset COM GUI GUIBASE OS CPU CPUNAME
+ unset CC CXX SYSBASE CFLAGS
+ unset AR NM OBJDUMP PKG_CONFIG RANLIB STRIP
+ test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
+ test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
+ test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
+ cd CONF-FOR-BUILD
+ sub_conf_opts=""
+ test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
+ test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
+ test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
+ ./configure \
+ --disable-mozilla \
+ --disable-build-mozilla \
+ $sub_conf_opts \
+ 2>&1 | sed -e 's/^/ /'
+ test -f ./*Env.Set.sh 2>/dev/null || exit
+ cp *Env.Set.sh ../Env.Build.sh
+ . ./*Env.Set.sh
+ for V in COM GUI GUIBASE OS CPU CPUNAME CC CXX GXX_INCLUDE_PATH MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH \
+ SYSTEM_LIBXSLT; do
+ VV='$'$V
+ VV=`eval "echo $VV"`
+ if test -n "$VV"; then
+ line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
+ echo "$line" >>build-config
+ fi
+ done
+
+ for V in OUTDIR PATH SOLARINC SOLARLIB WORKDIR; do
+ VV='$'$V
+ VV=`eval "echo $VV"`
+ VV=`echo $VV | sed -e 's,/CONF-FOR-BUILD,,g'`
+ if test -n "$VV"; then
+ line="${V}_FOR_BUILD='$VV'"
+ echo "$line" >>build-config
+ fi
+ done
+ )
+ test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
+ 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])
+ perl -pi -e 's,/CONF-FOR-BUILD,,g' Env.Build.sh
+ eval `cat CONF-FOR-BUILD/build-config`
+ AC_MSG_RESULT([checking for BUILD platform configuration... done])
+ rm -rf CONF-FOR-BUILD
+else
+ CC_FOR_BUILD="$CC"
+ CXX_FOR_BUILD="$CXX"
+fi
+AC_SUBST(COM_FOR_BUILD)
+AC_SUBST(GUI_FOR_BUILD)
+AC_SUBST(GUIBASE_FOR_BUILD)
+AC_SUBST(OS_FOR_BUILD)
+AC_SUBST(CPU_FOR_BUILD)
+AC_SUBST(CPUNAME_FOR_BUILD)
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CXX_FOR_BUILD)
+AC_SUBST(GXX_INCLUDE_PATH_FOR_BUILD)
+AC_SUBST(INPATH_FOR_BUILD)
+AC_SUBST(OUTPATH_FOR_BUILD)
+AC_SUBST(MACOSX_DEPLOYMENT_TARGET_FOR_BUILD)
+AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
+
+AC_SUBST(OUTDIR_FOR_BUILD)
+AC_SUBST(PATH_FOR_BUILD)
+AC_SUBST(SOLARINC_FOR_BUILD)
+AC_SUBST(SOLARLIB_FOR_BUILD)
+AC_SUBST(WORKDIR_FOR_BUILD)
+
+if test -e solenv/inc/minor.mk; then
+ # Get UPD number from ./solenv/inc/minor.mk
+ UPD="`grep RSCVERSION= solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
+ AC_SUBST(UPD)
+ SOURCEVERSION="`grep SOURCEVERSION= solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
+ AC_SUBST(SOURCEVERSION)
+else
+ AC_MSG_ERROR([solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
+fi
+
dnl ===================================================================
dnl Set the ENABLE_CRASHDUMP variable.
dnl ===================================================================
@@ -1110,26 +1770,58 @@ else
fi
AC_SUBST(ENABLE_CRASHDUMP)
+
+dnl ===================================================================
+dnl Windows specific tests and stuff
+dnl ===================================================================
if test "$_os" = "WINNT"; then
+
+ dnl Include twain scanners
BUILD_TYPE="$BUILD_TYPE TWAIN"
-fi
-if test "$_os" = "WINNT"; then
- dnl ===================================================================
- dnl Set the VC_STANDARD variable.
- dnl ===================================================================
- AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
- if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
- VC_STANDARD=""
+ dnl Set the CL_X64 variable if we are building a 64-bit LibreOffice.
+ AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
+ if test "z$enable_cl_x64" = "z" -o "$enable_cl_x64" = "no"; then
+ CL_X64=""
+ AC_MSG_RESULT([no])
+ else
+ CL_X64="TRUE"
+ AC_MSG_RESULT([yes])
+ fi
+ AC_SUBST(CL_X64)
+
+ AC_MSG_CHECKING([whether to use DirectX])
+ if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
+ ENABLE_DIRECTX="TRUE"
+ AC_MSG_RESULT([yes])
+ else
+ ENABLE_DIRECTX=""
AC_MSG_RESULT([no])
+ fi
+ AC_SUBST(ENABLE_DIRECTX)
+
+ AC_MSG_CHECKING([whether to use ActiveX])
+ if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
+ DISABLE_ACTIVEX=""
+ AC_MSG_RESULT([yes])
else
- VC_STANDARD="TRUE"
+ DISABLE_ACTIVEX="TRUE"
+ AC_MSG_RESULT([no])
+ fi
+ AC_SUBST(DISABLE_ACTIVEX)
+
+ AC_MSG_CHECKING([whether to use ATL])
+ if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
+ DISABLE_ATL=""
AC_MSG_RESULT([yes])
+ else
+ DISABLE_ATL="TRUE"
+ AC_MSG_RESULT([no])
fi
- AC_SUBST(VC_STANDARD)
+ AC_SUBST(DISABLE_ATL)
+
fi
-dnl ===================================================================
dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
dnl ===================================================================
AC_MSG_CHECKING([whether to turn warnings to errors])
@@ -1137,23 +1829,20 @@ if test -n "$enable_werror" && test "$enable_werror" != "no"; then
ENABLE_WERROR="TRUE"
AC_MSG_RESULT([yes])
AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
- AC_MSG_WARN([on platforms where it has been disabled explicitely])
- echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
+ AC_MSG_WARN([on platforms where it has been disabled explicitly])
+ echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitly" >> warn
else
ENABLE_WERROR="FALSE"
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_WERROR)
-dnl ===================================================================
dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
dnl ===================================================================
AC_MSG_CHECKING([whether to do a debug build])
if test -n "$enable_debug" && test "$enable_debug" != "no"; then
ENABLE_DEBUG="TRUE"
- if test -z "$enable_symbols"; then
- enable_symbols="yes"
- fi
+ enable_symbols="yes"
AC_MSG_RESULT([yes])
else
ENABLE_DEBUG="FALSE"
@@ -1161,7 +1850,6 @@ else
fi
AC_SUBST(ENABLE_DEBUG)
-dnl ===================================================================
dnl Set the ENABLE_DBGUTIL variable
dnl ===================================================================
AC_MSG_CHECKING([whether to build with additional debug utilities])
@@ -1180,92 +1868,85 @@ AC_SUBST(PRODUCT)
AC_SUBST(PROFULLSWITCH)
AC_SUBST(PROEXT)
+dnl whether to include symbols into final build.
dnl ===================================================================
-dnl First setting is whether to include symbols into final build.
-dnl ===================================================================
-AC_MSG_CHECKING([whether to include symbols into final build])
-if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
- if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
- ENABLE_SYMBOLS="TRUE"
- AC_MSG_RESULT([yes])
- else
- if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
- ENABLE_SYMBOLS="SMALL"
- AC_MSG_RESULT([yes, small ones])
- else if test "$enable_symbols" != "no" ; then
- echo enable symbols is: $enable_symbols
- AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
- else
- ENABLE_SYMBOLS=
- fi
- fi
- fi
+AC_MSG_CHECKING([whether to include symbols])
+if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
+ ENABLE_SYMBOLS="TRUE"
+ AC_MSG_RESULT([yes])
else
ENABLE_SYMBOLS=
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_SYMBOLS)
-dnl ===================================================================
dnl Determine if the solver is to be stripped or not.
dnl ===================================================================
AC_MSG_CHECKING([whether to strip the solver or not.])
-if test -n "$enable_strip_solver"; then
- if test "$enable_strip_solver" = "yes"; then
- DISABLE_STRIP=
- else if test "$enable_strip_solver" = "no"; then
- DISABLE_STRIP="TRUE"
- else
- AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
- fi
- fi
+if test "z$enable_strip_solver" = "zno"; then
+ DISABLE_STRIP="TRUE"
+ AC_MSG_RESULT([no])
else
if test -n "$ENABLE_SYMBOLS"; then
DISABLE_STRIP="TRUE"
+ AC_MSG_RESULT([no])
else
DISABLE_STRIP=
+ AC_MSG_RESULT([yes])
fi
fi
AC_SUBST(DISABLE_STRIP)
+dnl check for cups support
dnl ===================================================================
-dnl Build options
-dnl ===================================================================
-AC_MSG_CHECKING([whether to enable native CUPS support])
-if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
+AC_MSG_CHECKING([whether to enable native cups support])
+if test "$test_cups" = "yes" -a "z$enable_cups" != "zno"; then
ENABLE_CUPS="TRUE"
AC_MSG_RESULT([yes])
+ AC_CHECK_LIB(cups, cupsPrintFiles)
+ AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
+ if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then
+ AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups???-devel.])
+ fi
else
ENABLE_CUPS=""
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_CUPS)
+
+# check for fontconfig support
AC_MSG_CHECKING([whether to enable fontconfig support])
-if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
+if test "z$test_fontconfig" = "zyes" -a "z$enable_fontconfig" != "no"; then
ENABLE_FONTCONFIG="TRUE"
AC_MSG_RESULT([yes])
+ PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0])
else
ENABLE_FONTCONFIG=""
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_FONTCONFIG)
+AC_SUBST(FONTCONFIG_CFLAGS)
+AC_SUBST(FONTCONFIG_LIBS)
+dnl whether to find & fetch external tarballs?
dnl ===================================================================
-dnl find external tarballs.
-dnl ===================================================================
-if test -z $TARFILE_LOCATION; then
+if test -z "$TARFILE_LOCATION"; then
TARFILE_LOCATION="DEFAULT"
fi
AC_SUBST(TARFILE_LOCATION)
-if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \
+if test "z$enable_fetch_external" != "zno" \
&& test -z "$with_system_libs" -a "$with_system_jars" != "no"; then
- DO_FETCH_TARBALLS="yes"
+ DO_FETCH_TARBALLS="YES"
fi
AC_SUBST(DO_FETCH_TARBALLS)
+
+dnl git-new-workdir
dnl ===================================================================
+AC_SUBST(GIT_LINK_SRC)
+
dnl Disable legacy binary file formats filters
dnl ===================================================================
AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
@@ -1279,38 +1960,16 @@ else
fi
AC_SUBST(WITH_BINFILTER)
-if test "$_os" = "WINNT"; then
- AC_MSG_CHECKING([whether to use DirectX])
- if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
- ENABLE_DIRECTX="TRUE"
- AC_MSG_RESULT([yes])
- else
- ENABLE_DIRECTX=""
- AC_MSG_RESULT([no])
- fi
- AC_SUBST(ENABLE_DIRECTX)
-
- AC_MSG_CHECKING([whether to use ActiveX])
- if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
- DISABLE_ACTIVEX=""
- AC_MSG_RESULT([yes])
- else
- DISABLE_ACTIVEX="TRUE"
- AC_MSG_RESULT([no])
- fi
- AC_SUBST(DISABLE_ACTIVEX)
-
- AC_MSG_CHECKING([whether to use ATL])
- if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
- DISABLE_ATL=""
- AC_MSG_RESULT([yes])
- else
- DISABLE_ATL="TRUE"
- AC_MSG_RESULT([no])
- fi
- AC_SUBST(DISABLE_ATL)
-
+dnl Enable ugly pieces of code we're better off without
+dnl ===================================================================
+if test "$enable_ugly" = "yes"; then
+ BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
+ SCPDEFS="$SCPDEFS -DWITH_UGLY"
+ ENABLE_UGLY=YES
+else
+ ENABLE_UGLY=NO
fi
+AC_SUBST(ENABLE_UGLY)
dnl ===================================================================
dnl Disable rpath in shared libraries?
@@ -1337,222 +1996,55 @@ else
fi
AC_SUBST(WITH_MYSPELL_DICTS)
-if test "$WITH_MYSPELL_DICTS" = "NO"; then
- AC_MSG_CHECKING([whether to use dicts from external paths])
- if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
- AC_MSG_RESULT([yes])
- SYSTEM_DICTS=YES
- AC_MSG_CHECKING([for spelling dictionary directory])
- if test -n "$with_external_dict_dir"; then
- DICT_SYSTEM_DIR=file://$with_external_dict_dir
- else
- DICT_SYSTEM_DIR=file:///usr/share/hunspell
- fi
- AC_MSG_RESULT([$DICT_SYSTEM_DIR])
- AC_MSG_CHECKING([for hyphenation patterns directory])
- if test -n "$with_external_hyph_dir"; then
- HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
- else
- HYPH_SYSTEM_DIR=file:///usr/share/hyphen
- fi
- AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
- AC_MSG_CHECKING([for thesaurus directory])
- if test -n "$with_external_thes_dir"; then
- THES_SYSTEM_DIR=file://$with_external_thes_dir
- else
- THES_SYSTEM_DIR=file:///usr/share/mythes
- fi
- AC_MSG_RESULT([$THES_SYSTEM_DIR])
- else
- AC_MSG_RESULT([no])
- SYSTEM_DICTS=NO
- fi
+AC_MSG_CHECKING([whether to use dicts from external paths])
+if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
+ AC_MSG_RESULT([yes])
+ SYSTEM_DICTS=YES
+ AC_MSG_CHECKING([for spelling dictionary directory])
+ if test -n "$with_external_dict_dir"; then
+ DICT_SYSTEM_DIR=file://$with_external_dict_dir
+ else
+ DICT_SYSTEM_DIR=file:///usr/share/hunspell
+ fi
+ AC_MSG_RESULT([$DICT_SYSTEM_DIR])
+ AC_MSG_CHECKING([for hyphenation patterns directory])
+ if test -n "$with_external_hyph_dir"; then
+ HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
+ else
+ HYPH_SYSTEM_DIR=file:///usr/share/hyphen
+ fi
+ AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
+ AC_MSG_CHECKING([for thesaurus directory])
+ if test -n "$with_external_thes_dir"; then
+ THES_SYSTEM_DIR=file://$with_external_thes_dir
+ else
+ THES_SYSTEM_DIR=file:///usr/share/mythes
+ fi
+ AC_MSG_RESULT([$THES_SYSTEM_DIR])
+else
+ AC_MSG_RESULT([no])
+ SYSTEM_DICTS=NO
fi
AC_SUBST(SYSTEM_DICTS)
AC_SUBST(DICT_SYSTEM_DIR)
AC_SUBST(HYPH_SYSTEM_DIR)
AC_SUBST(THES_SYSTEM_DIR)
-if test $_os = "WINNT"; then
- AC_MSG_CHECKING([Windows build environment sanity])
- dnl ===================================================================
- dnl Sanity check! Native windows programs cannot use cygwin symlinks!
- dnl ===================================================================
- dnl As long as awk instead of $AWK is used somewhere in the sources,
- dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
- if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
- AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
-Native windows programs cannot use cygwin symlinks. Remove the symbolic
-link, and copy the program to the name of the link.])
- fi
- dnl ===================================================================
- dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
- dnl CC and CXX but the configure checks here assume that guw.exe
- dnl (if needed at all) is not yet present.
- dnl ===================================================================
- CC=`echo $CC | $SED "s/^guw.exe //"`
- CXX=`echo $CXX | $SED "s/^guw.exe //"`
- dnl ===================================================================
- dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
- dnl $WITH_MINGWIN
- dnl ===================================================================
- if test -n "$CC";then
- if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
- WITH_MINGWIN="yes"
- fi
- fi
- dnl ===================================================================
- if test "$WITH_MINGWIN" = "yes" ; then
- if test -z "$CC"; then
- CC="gcc -mno-cygwin"
- CXX="g++ -mno-cygwin"
- fi
- fi
- AC_MSG_RESULT([ok])
-fi
-AC_SUBST(WITH_MINGWIN)
-
-dnl ===================================================================
-dnl Extra check for Windows. cygwin builds need gcc to build dmake
-dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
-dnl build OOo.
-dnl ===================================================================
-if test "$_os" = "WINNT" ; then
- AC_MSG_CHECKING([for cygwin gcc/g++])
- if which gcc > /dev/null && which g++ > /dev/null ; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
- fi
-fi
-
-
-dnl ===================================================================
-dnl Check whether the bash shell can be used.
-dnl ===================================================================
-AC_PATH_PROG(SHELLPATH, bash)
-if test -z "$SHELLPATH"; then
- AC_MSG_ERROR([bash not found in \$PATH])
-else
- SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
-fi
-AC_SUBST(SHELLPATH)
-
-dnl ===================================================================
-dnl Checks for c compiler,
-dnl The check for the c++ compiler is later on.
-dnl ===================================================================
-AC_MSG_CHECKING([gcc home])
-if test -z "$with_gcc_home"; then
- GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
-else
- GCC_HOME="$with_gcc_home"
-fi
-AC_MSG_RESULT($GCC_HOME)
-AC_SUBST(GCC_HOME)
-
-save_CC=$CC
-save_CXX=$CXX
-
-if test -n "$with_gcc_home"; then
- if test -z "$CC"; then
- CC="$with_gcc_home/bin/gcc"
- fi
-fi
-
-dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
-if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
- AC_PROG_CC
-fi
-
-COMPATH=`dirname "$CC"`
-if test "$COMPATH" = "." ; then
- AC_PATH_PROGS(COMPATH, $CC)
- dnl double square bracket to get single because of M4 quote...
- COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
-fi
-COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
-
-dnl ===================================================================
-dnl Test the gcc version, 3 is OK
-dnl ===================================================================
-GCCVER=20995
-if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
- AC_MSG_CHECKING([the GNU gcc compiler version])
- _gcc_version=`$CC -dumpversion`
- _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
- GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
-
- if test "$_gcc_major" -lt "3"; then
- AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
- else
- if test "$GCCVER" -eq "030203"; then
- if test "$ENABLE_SYMBOLS" = "SMALL"; then
- AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
- fi
- fi
- fi
- if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then
- if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
- export CC=$GCC_HOME/bin/gcc-4.0
- dnl export CC to have it available in set_soenv -> config.guess
- GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
- if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
- GCCVER=$GCCVER2
- fi
- fi
- if test "$GCCVER" -ge "040100" ; then
- 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])
- else
- AC_MSG_RESULT([implicitly using CC=$CC])
- fi
- else
- AC_MSG_RESULT([checked (gcc $_gcc_version)])
- fi
- if test "$_os" = "SunOS"; then
- AC_MSG_CHECKING([gcc linker])
- if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
- AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
- fi
- AC_MSG_RESULT([ok (GNU ld)])
- fi
-fi
-AC_SUBST(GCCVER)
-
-HAVE_LD_BSYMBOLIC_FUNCTIONS=
-if test "$GCC" = "yes"; then
- AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
- bsymbolic_functions_ldflags_save=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([
- #include <stdio.h>
- ],[
- printf ("hello world\n");
- ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
- if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
- AC_MSG_RESULT( found )
- else
- AC_MSG_RESULT( not found )
- fi
- LDFLAGS=$bsymbolic_functions_ldflags_save
-fi
-AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
-
dnl ===================================================================
dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
dnl ===================================================================
AC_MSG_CHECKING([whether to enable pch feature])
if test -n "$enable_pch" && test "$enable_pch" != "no"; then
- if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
- ENABLE_PCH="TRUE"
- AC_MSG_RESULT([yes])
+ if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
+ ENABLE_PCH="TRUE"
+ AC_MSG_RESULT([yes])
dnl There is no PCH support in GCC versions prior to this
- elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
- ENABLE_PCH="TRUE"
- AC_MSG_RESULT([yes])
+ elif test "$GCC" = "yes"; then
+ ENABLE_PCH="TRUE"
+ AC_MSG_RESULT([yes])
else
- ENABLE_PCH=""
- AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
+ ENABLE_PCH=""
+ AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
fi
else
ENABLE_PCH=""
@@ -1577,35 +2069,17 @@ if test -z "$GNUMAKE"; then
fi
AC_MSG_CHECKING([the GNU make version])
-_make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
+_make_version=`$GNUMAKE --version | grep GNU | grep -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
_make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
if test "$_make_longver" -ge "038100" ; then
- AC_MSG_RESULT([$GNUMAKE $_make_version])
+ AC_MSG_RESULT([$GNUMAKE $_make_version])
else
AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
fi
AC_SUBST(GNUMAKE)
dnl ===================================================================
-dnl Search all the common names for GNU tar
-dnl ===================================================================
-AC_MSG_CHECKING([for GNU tar])
-for a in $GNUTAR gtar gnutar tar; do
- $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
- if test $? -eq 0; then
- GNUTAR=$a
- break
- fi
-done
-AC_MSG_RESULT($GNUTAR)
-if test -z "$GNUTAR"; then
- AC_MSG_ERROR([not found. install GNU tar.])
-fi
-
-AC_SUBST(GNUTAR)
-
-dnl ===================================================================
-dnl Test the solaris compiler version
+dnl Test the Solaris compiler version
dnl ===================================================================
if test "$_os" = "SunOS"; then
if test "$CC" = "cc"; then
@@ -1613,13 +2087,13 @@ if test "$_os" = "SunOS"; then
COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
dnl cc -V outputs to standard error!!!!
- _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
+ _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'`
_sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
- _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
+ _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
if test "$_sunstudio_major" != "5"; then
AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
else
- _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" }'`
+ _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" }'`
if test "$_sunstudio_minor" = "false"; then
AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
else
@@ -1630,44 +2104,47 @@ if test "$_os" = "SunOS"; then
fi
fi
-if test "$GCC" = "yes"; then
- AC_MSG_CHECKING( for --hash-style=both linker support )
- hash_style_ldflags_save=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,--hash-style=both"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([
- #include <stdio.h>
- ],[
- printf ("hello world\n");
- ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
- if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
- AC_MSG_RESULT( found )
+HAVE_LD_HASH_STYLE=FALSE
+WITH_LINKER_HASH_STYLE=
+AC_MSG_CHECKING( for --hash-style gcc linker support )
+if test "$GCC" = "yes" ; then
+ if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes" ; then
+ hash_styles="gnu sysv"
+ elif test "$with_linker_hash_style" = "no" ; then
+ hash_styles=
else
- AC_MSG_RESULT( not found )
+ hash_styles="$with_linker_hash_style"
fi
- LDFLAGS=$hash_style_ldflags_save
-fi
-AC_SUBST(HAVE_LD_HASH_STYLE)
-dnl ===================================================================
-dnl Test the Compaq compiler for OSF1
-dnl ===================================================================
-if test "$_os" = "OSF1"; then
- if test "$CC" = "cc"; then
- AC_PATH_PROGS(_cc, cc)
- COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
- AC_MSG_WARN([******* $_cc , $COMPATH])
- AC_MSG_CHECKING([the Compaq C compiler version])
- dnl cc -V outputs to standard error!!!!
- _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
- _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
- if test "$_compaqc_major" != "T6"; then
- AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
- else
- dnl compiler will do
- AC_MSG_RESULT([checked])
- fi
+ for hash_style in $hash_styles ; do
+ test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
+ hash_style_ldflags_save=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ ],[
+ printf ("");
+ ])],
+ [ if ./conftest$EXEEXT; then
+ HAVE_LD_HASH_STYLE=TRUE
+ WITH_LINKER_HASH_STYLE=$hash_style
+ fi],
+ [HAVE_LD_HASH_STYLE=FALSE])
+ LDFLAGS=$hash_style_ldflags_save
+ done
+
+ if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
+ AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
+ else
+ AC_MSG_RESULT( no )
fi
+ LDFLAGS=$hash_style_ldflags_save
+else
+ AC_MSG_RESULT( no )
fi
+AC_SUBST(HAVE_LD_HASH_STYLE)
+AC_SUBST(WITH_LINKER_HASH_STYLE)
dnl ===================================================================
dnl Check whether there's a Perl version available.
@@ -1675,9 +2152,7 @@ dnl ===================================================================
if test -z "$with_perl_home"; then
AC_PATH_PROG(PERL, perl)
else
- if test "$_os" = "WINNT"; then
- with_perl_home=`cygpath -u "$with_perl_home"`
- fi
+ test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
_perl_path="$with_perl_home/bin/perl"
if test -x "$_perl_path"; then
PERL=$_perl_path
@@ -1688,7 +2163,7 @@ fi
dnl ===================================================================
dnl Testing for Perl version 5 or greater.
-dnl $] is the perl version variable, it is returned as an integer
+dnl $] is the Perl version variable, it is returned as an integer
dnl ===================================================================
if test "$PERL"; then
AC_MSG_CHECKING([the Perl version])
@@ -1696,7 +2171,7 @@ if test "$PERL"; then
_perl_version=$?
if test "$_perl_version" -lt 5; then
AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
- fi
+ fi
AC_MSG_RESULT([checked (perl $_perl_version)])
else
AC_MSG_ERROR([Perl not found, install version 5 of Perl])
@@ -1706,274 +2181,474 @@ AC_SUBST(PERL)
dnl ===================================================================
dnl Testing for required Perl modules
dnl ===================================================================
+
AC_MSG_CHECKING([for required Perl modules])
if `$PERL -e 'use Archive::Zip;'`; then
- AC_MSG_RESULT([all modules found])
+ AC_MSG_RESULT([all modules found])
else
- AC_MSG_ERROR([Failed to find some modules])
+ AC_MSG_ERROR([Failed to find some modules])
fi
dnl ===================================================================
dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
dnl ===================================================================
+SHOWINCLUDES_PREFIX=
if test "$_os" = "WINNT"; then
- if test "$WITH_MINGWIN" != "yes"; then
- AC_MSG_CHECKING([for friendly registry keys])
- # VS.Net 2003, VS.Net 2005
- if test -z "$with_cl_home"; then
- vctest=`./oowintool --msvc-productdir`;
- if test -x "$vctest/bin/cl.exe"; then
- with_cl_home=$vctest;
- fi
- else
- with_cl_home=`cygpath -u "$with_cl_home"`
- fi
- AC_MSG_RESULT([done])
-
- dnl ===========================================================
- dnl Check for mspdb71.dll/mspdb80.dll
- dnl ===========================================================
- dnl .NET 2003/5/8 Compiler
- if test -n "$with_mspdb_path";then
- with_mspdb_path=`cygpath -u "$with_mspdb_path"`
- fi
- if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
- MSPDB_PATH="$with_mspdb_path"
- fi
- dnl .NET 2003 case
- if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
- MSPDB_PATH="$with_cl_home/../Common7/IDE"
- fi
- dnl .NET 2005/2008 case
- if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
- MSPDB_PATH="$with_cl_home/../Common7/IDE"
- fi
- dnl Windows SDK 6.0 case
- if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
- MSPDB_PATH="$with_cl_home/bin"
- fi
-
- if test -z "$MSPDB_PATH";then
- dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
- AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
- AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
- MSPDB_PATH=`dirname "$MSPDB_PATH"`
- fi
-
- if test -z "$MSPDB_PATH"; then
- AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
- fi
- MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
- MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
- dnl The path needs to be added before cl is called
- PATH="$MSPDB_PATH:$PATH"
-
- AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
- if test -x "$with_cl_home/bin/cl.exe"; then
- CC="$with_cl_home/bin/cl.exe"
- else
- AC_PATH_PROG(CC, cl.exe)
- fi
- if test -e "$CC"; then
- # This gives us a posix path with 8.3 filename restrictions
- CC=`cygpath -d "$CC"`
- CC=`cygpath -u "$CC"`
- # Remove /cl.exe from CC case insensitive
- AC_MSG_RESULT([found ($CC)])
- COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
- export INCLUDE=`cygpath -d "$COMPATH/Include"`
- dnl Check which Microsoft C/C++ compiler is found
- AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
-dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
- CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
- x = match( \\\$0, /..\\...\\...../ )
- CCversion = substr( \\\$0, RSTART, RLENGTH)
- tokencount = split (CCversion,vertoken,\".\")
- for ( i = 1 ; i <= tokencount ; i++ ) {
- printf (\"%04d\",vertoken[[i]] )
- }
- }"`
- AC_MSG_RESULT([found Compiler version $CCNUMVER.])
- if test "$CCNUMVER" -ge "001500000000"; then
- COMEX=12
- MSVSVER=2008
- AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
- elif test "$CCNUMVER" -ge "001400000000"; then
- COMEX=11
- MSVSVER=2005
- AC_MSG_RESULT([found .NET 2005.])
- elif test "$CCNUMVER" -ge "001300102240"; then
- COMEX=10
- MSVSVER=2003
- AC_MSG_RESULT([found .NET 2003.])
- else
- AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
- fi
- else
- AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
- fi
- else
- AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
- if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
- AC_MSG_RESULT([found.])
- if $CC -dumpspecs | grep -q "mno-cygwin"; then
- USE_MINGW="cygwin"
- else
- USE_MINGW="pure-mingw"
- fi
- else
- AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
- fi
+ if test "$WITH_MINGW" != "yes"; then
+ AC_MSG_CHECKING([for a friendly Microsoft C/C++ compiler installation path])
+ if test -z "$with_cl_home"; then
+ vctest=`./oowintool --msvc-productdir`;
+ if test "$CL_X64" = ""; then
+ if test -x "$vctest/bin/cl.exe"; then
+ with_cl_home=$vctest;
+ fi
+ else
+ if test -x "$vctest/bin/amd64/cl.exe"; then
+ with_cl_home=$vctest;
+ fi
+ fi
+ else
+ with_cl_home=`cygpath -u "$with_cl_home"`
+ fi
+ with_cl_home=`cygpath -d "$with_cl_home"`
+ with_cl_home=`cygpath -u "$with_cl_home"`
+ AC_MSG_RESULT([$with_cl_home])
+
+ dnl ===========================================================
+ dnl Check for mspdb80.dll/mspdb100.dll
+ dnl ===========================================================
+ dnl MSVS 2008/10 Compiler
+ if test -n "$with_mspdb_path";then
+ with_mspdb_path=`cygpath -u "$with_mspdb_path"`
+ fi
+ if test -e "$with_mspdb_path/mspdb80.dll" -o -e "$with_mspdb_path/mspdb100.dll"; then
+ MSPDB_PATH="$with_mspdb_path"
+ fi
+ dnl MSVS 2008 case
+ if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
+ MSPDB_PATH="$with_cl_home/../Common7/IDE"
+ fi
+ dnl Windows SDK 6.0 case
+ if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
+ MSPDB_PATH="$with_cl_home/bin"
+ fi
+ dnl MSVS 2010 case
+ if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb100.dll"; then
+ MSPDB_PATH="$with_cl_home/../Common7/IDE"
+ fi
+
+ if test -z "$MSPDB_PATH";then
+ dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
+ AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
+ AC_PATH_PROG(MSPDB_PATH, mspdb100.dll)
+ MSPDB_PATH=`dirname "$MSPDB_PATH"`
+ fi
+
+ if test -z "$MSPDB_PATH"; then
+ AC_MSG_ERROR([You need a mspdb80.dllor mspdb100.dll, make sure it is in the path or use --with-mspdb-path])
+ fi
+ MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
+ MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
+ dnl The path needs to be added before cl is called
+ PATH="$MSPDB_PATH:$PATH"
+
+ AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
+ if test -z "$CC"; then
+ if test "$CL_X64" = ""; then
+ if test -x "$with_cl_home/bin/cl.exe"; then
+ CC="$with_cl_home/bin/cl.exe"
+ fi
+ else
+ if test -x "$with_cl_home/bin/amd64/cl.exe"; then
+ CC="$with_cl_home/bin/amd64/cl.exe"
+ fi
+ fi
+ if test -z "$CC"; then
+ AC_PATH_PROG(CC, cl.exe)
+ fi
+ # This gives us a posix path with 8.3 filename restrictions
+ CC=`cygpath -d "$CC"`
+ CC=`cygpath -u "$CC"`
+ fi
+
+ if test -n "$CC"; then
+ # Remove /cl.exe from CC case insensitive
+ AC_MSG_RESULT([found ($CC)])
+ if test "$CL_X64" = ""; then
+ COMPATH=`echo $CC | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
+ else
+ if test -n "$with_cl_home"; then
+ COMPATH=`echo $with_cl_home`
+ fi
+ fi
+ export INCLUDE=`cygpath -d "$COMPATH/Include"`
+ dnl Check which Microsoft C/C++ compiler is found
+ AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
+ # The following finds Microsoft, matches nn.nn.nnnn then pulls numbers out.
+ CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
+ x = match( \\\$0, /..\\...\\...../ )
+ CCversion = substr( \\\$0, RSTART, RLENGTH)
+ tokencount = split (CCversion,vertoken,\".\")
+ for ( i = 1 ; i <= tokencount ; i++ ) {
+ printf (\"%04d\",vertoken[[i]] )
+ }
+ }"`
+ if test "$CCNUMVER" -ge "001600000000"; then
+ COMEX=13
+ MSVSVER=2010
+ elif test "$CCNUMVER" -ge "001500000000"; then
+ COMEX=12
+ MSVSVER=2008
+ else
+ AC_MSG_ERROR([Compiler too old. Use Microsoft Visual Studio 2008 or 2010.])
+ fi
+ AC_MSG_RESULT([found compiler version $CCNUMVER (MSVS $MSVSVER).])
+ else
+ AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
+ fi
+
+ dnl We need to guess the prefix of the -showIncludes output, it can be
+ dnl localized
+ AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
+ echo "#include <stdlib.h>" > conftest.c
+ SHOWINCLUDES_PREFIX=`$CC -c -showIncludes conftest.c 2>/dev/null | \
+ grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
+ rm -f conftest.c conftest.obj
+ if test -z "$SHOWINCLUDES_PREFIX" ; then
+ AC_MSG_ERROR([cannot determine the -showIncludes prefix])
+ else
+ AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
+ fi
+
+ # Check for 64-bit (cross-)compiler to use to build the 64-bit
+ # version of the Explorer extension (and maybe other small
+ # bits, too) needed when installing a 32-bit LibreOffice on a
+ # 64-bit OS. The 64-bit Explorer extension is a feature that
+ # has been present since long in OOo. Don't confuse it with
+ # building LibreOffice itself as 64-bit code, which is
+ # unfished work and highly experimental.
+
+ BUILD_X64=
+ CC_X64_BINARY=
+ LINK_X64_BINARY=
+ LIBMGR_X64_BINARY=
+
+ if test "$CL_X64" = ""; then
+ AC_MSG_CHECKING([for a x64 compiler])
+
+ # Prefer native x64 compiler to cross-compiler, in case we are running
+ # the build on a 64-bit OS.
+ if "$with_cl_home/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
+ BUILD_X64=TRUE
+ CC_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
+ CXX_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
+ LINK_X64_BINARY="$with_cl_home/bin/amd64/link.exe"
+ LIBMGR_X64_BINARY="$with_cl_home/bin/amd64/lib.exe"
+ elif "$with_cl_home/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
+ BUILD_X64=TRUE
+ CC_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
+ CXX_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
+ LINK_X64_BINARY="$with_cl_home/bin/x86_amd64/link.exe"
+ LIBMGR_X64_BINARY="$with_cl_home/bin/x86_amd64/lib.exe"
+ fi
+ if test "$BUILD_X64" = TRUE; then
+ AC_MSG_RESULT([found])
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_WARN([Installation set will not contain the 64-bit Explorer extension])
+ fi
fi
+ AC_SUBST(BUILD_X64)
+
+ # These are passed to the environment through set_soenv.in as usual, and then
+ # used in set_wntx64.mk
+ AC_SUBST(CC_X64_BINARY)
+ AC_SUBST(CXX_X64_BINARY)
+ AC_SUBST(LINK_X64_BINARY)
+ AC_SUBST(LIBMGR_X64_BINARY)
+
+ else
+ AC_MSG_CHECKING([the compiler is MinGW])
+ MACHINE_PREFIX=`$CC -dumpmachine`
+ if echo $MACHINE_PREFIX | grep -q mingw32; then
+ AC_MSG_RESULT([yes])
+ if $CC -dumpspecs | grep -q "mno-cygwin"; then
+ USE_MINGW="cygwin"
+ else
+ USE_MINGW="pure-mingw"
+ fi
+ else
+ AC_MSG_ERROR([Compiler is not MinGW.])
+ fi
+ fi
fi
AC_SUBST(COMEX)
AC_SUBST(MSPDB_PATH)
AC_SUBST(USE_MINGW)
+AC_SUBST(SHOWINCLUDES_PREFIX)
dnl ===================================================================
-dnl .NET needs special treatment
+dnl Check for pkg-config
dnl ===================================================================
-if test "$_os" = "WINNT"; then
-if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
- dnl Check midl.exe
- AC_PATH_PROG(MIDL_PATH, midl.exe)
- if test -n "$MIDL_PATH";then
- MIDL_PATH=`dirname "$MIDL_PATH"`
- fi
- if test -n "$with_midl_path";then
- with_midl_path=`cygpath -u "$with_midl_path"`
- fi
- if test -x "$with_midl_path/midl.exe"; then
- MIDL_PATH="$with_midl_path"
- fi
- if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
- MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
- fi
- if test -z "$MIDL_PATH" ; then
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+ PKG_PROG_PKG_CONFIG
+fi
+
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+
+ # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
+ # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
+ # explicitly. Or put /path/to/compiler in PATH yourself.
+
+ AC_CHECK_TOOL(AR,ar)
+ AC_CHECK_TOOL(NM,nm)
+ AC_CHECK_TOOL(OBJDUMP,objdump)
+ AC_CHECK_TOOL(RANLIB,ranlib)
+ AC_CHECK_TOOL(STRIP,strip)
+ if test "$_os" = "WINNT"; then
+ AC_CHECK_TOOL(DLLTOOL,dlltool)
+ AC_CHECK_TOOL(WINDRES,windres)
+ fi
+fi
+AC_SUBST(AR)
+AC_SUBST(DLLTOOL)
+AC_SUBST(NM)
+AC_SUBST(OBJDUMP)
+AC_SUBST(PKG_CONFIG)
+AC_SUBST(RANLIB)
+AC_SUBST(STRIP)
+AC_SUBST(WINDRES)
+
+dnl ===================================================================
+dnl pkg-config checks on Mac OS X
+dnl ===================================================================
+
+if test $_os = Darwin; then
+ AC_MSG_CHECKING([for bogus pkg-config])
+ if test -n "$PKG_CONFIG"; then
+ if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | grep -q Mono.framework; then
+ AC_MSG_RESULT([yes, from Mono])
+ else
+ AC_MSG_RESULT([yes, from unknown origin])
+ fi
+ AC_MSG_WARN([This might have unexpected consequences, please consider hiding $PKG_CONFIG])
+ echo "Having a $PKG_CONFIG might have unexpected consequences, please consider hiding it" >>warn
+ else
+ AC_MSG_RESULT([no])
+ fi
+fi
+
+dnl ===================================================================
+dnl .NET needs special treatment
+dnl (does the above comment really mean .NET, or is it misusing
+dnl that to mean Visual Studio .NET 2003 ? And does this also
+dnl in fact apply equally to what we actually support, i.e.
+dnl Visual Studio 2008 and 2010?)
+dnl ===================================================================
+if test "$build_os" = "cygwin"; then
+ dnl Check midl.exe
+ AC_PATH_PROG(MIDL_PATH, midl.exe)
+ if test -n "$MIDL_PATH";then
+ MIDL_PATH=`dirname "$MIDL_PATH"`
+ fi
+ if test -n "$with_midl_path";then
+ with_midl_path=`cygpath -u "$with_midl_path"`
+ fi
+ if test -x "$with_midl_path/midl.exe"; then
+ MIDL_PATH="$with_midl_path"
+ fi
+ if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
+ MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
+ fi
+ if test -z "$MIDL_PATH" ; then
vstest=`./oowintool --msvs-productdir`;
if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
- MIDL_PATH="$vstest/Common7/Tools/Bin"
+ MIDL_PATH="$vstest/Common7/Tools/Bin"
fi
- fi
- if test -z "$MIDL_PATH" ; then
- psdktest=`./oowintool --psdk-home`
- if test -x "$psdktest/Bin/midl.exe" ; then
- MIDL_PATH="$psdktest/Bin"
- fi
- fi
- if test ! -x "$MIDL_PATH/midl.exe"; then
- AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
- fi
- # Convert to posix path with 8.3 filename restrictions ( No spaces )
- MIDL_PATH=`cygpath -d "$MIDL_PATH"`
- MIDL_PATH=`cygpath -u "$MIDL_PATH"`
-
- dnl Check csc.exe
- AC_PATH_PROG(CSC_PATH, csc.exe)
- if test -n "$CSC_PATH";then
- CSC_PATH=`dirname "$CSC_PATH"`
- fi
- if test -n "$with_csc_path";then
- with_csc_path=`cygpath -u "$with_csc_path"`
- fi
- if test -x "$with_csc_path/csc.exe"; then
- CSC_PATH="$with_csc_path"
- else
- csctest=`./oowintool --csc-compilerdir`;
- if test -x "$csctest/csc.exe"; then
- CSC_PATH="$csctest"
- fi
- fi
- if test ! -x "$CSC_PATH/csc.exe"; then
- AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
- fi
- # Convert to posix path with 8.3 filename restrictions ( No spaces )
- CSC_PATH=`cygpath -d "$CSC_PATH"`
- CSC_PATH=`cygpath -u "$CSC_PATH"`
-
- dnl Check mscoree.lib / .NET Frameworks dir
- dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
- AC_MSG_CHECKING(.NET Framework)
- if test -n "$with_frame_home"; then
- with_frame_home=`cygpath -u "$with_frame_home"`
- fi
- if test -f "$with_frame_home/lib/mscoree.lib"; then
- FRAME_HOME="$with_frame_home"
- fi
- if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
- FRAME_HOME="$with_cl_home/../SDK/v1.1"
- fi
- if test -z "$FRAME_HOME" ; then
+ fi
+ if test -z "$MIDL_PATH" ; then
+ winsdktest=`./oowintool --windows-sdk-home`
+ if test -x "$winsdktest/Bin/midl.exe" ; then
+ MIDL_PATH="$winsdktest/Bin"
+ fi
+ fi
+ if test ! -x "$MIDL_PATH/midl.exe"; then
+ AC_MSG_ERROR([midl.exe not found. Make sure it's in PATH or use --with-midl-path])
+ fi
+ # Convert to posix path with 8.3 filename restrictions ( No spaces )
+ MIDL_PATH=`cygpath -d "$MIDL_PATH"`
+ MIDL_PATH=`cygpath -u "$MIDL_PATH"`
+
+ dnl Check csc.exe
+ AC_PATH_PROG(CSC_PATH, csc.exe)
+ if test -n "$CSC_PATH";then
+ CSC_PATH=`dirname "$CSC_PATH"`
+ fi
+ if test -n "$with_csc_path";then
+ with_csc_path=`cygpath -u "$with_csc_path"`
+ fi
+ if test -x "$with_csc_path/csc.exe"; then
+ CSC_PATH="$with_csc_path"
+ else
+ csctest=`./oowintool --csc-compilerdir`;
+ if test -x "$csctest/csc.exe"; then
+ CSC_PATH="$csctest"
+ fi
+ fi
+ if test ! -x "$CSC_PATH/csc.exe"; then
+ AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
+ fi
+ # Convert to posix path with 8.3 filename restrictions ( No spaces )
+ CSC_PATH=`cygpath -d "$CSC_PATH"`
+ CSC_PATH=`cygpath -u "$CSC_PATH"`
+
+ dnl Check mscoree.lib / .NET Framework dir
+ AC_MSG_CHECKING(.NET Framework)
+ if test -n "$with_dotnet_framework_home"; then
+ with_dotnet_framework_home=`cygpath -u "$with_dotnet_framework_home"`
+ fi
+ if test -f "$with_dotnet_framework_home/lib/mscoree.lib"; then
+ DOTNET_FRAMEWORK_HOME="$with_dotnet_framework_home"
+ fi
+ if test -z "$DOTNET_FRAMEWORK_HOME" ; then
frametest=`./oowintool --dotnetsdk-dir`
if test -f "$frametest/lib/mscoree.lib"; then
- FRAME_HOME="$frametest"
+ DOTNET_FRAMEWORK_HOME="$frametest"
else
- frametest=`./oowintool --psdk-home`
+ frametest=`./oowintool --windows-sdk-home`
if test -f "$frametest/lib/mscoree.lib"; then
- FRAME_HOME="$frametest"
+ DOTNET_FRAMEWORK_HOME="$frametest"
fi
fi
- fi
- if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
- AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
- fi
- AC_MSG_RESULT(found)
- # Convert to posix path with 8.3 filename restrictions ( No spaces )
- FRAME_HOME=`cygpath -d "$FRAME_HOME"`
- FRAME_HOME=`cygpath -u "$FRAME_HOME"`
-fi
-AC_SUBST(MIDL_PATH)
-AC_SUBST(CSC_PATH)
-AC_SUBST(FRAME_HOME)
+ fi
+ if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib"; then
+ AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-dotnet-framework-home])
+ fi
+ AC_MSG_RESULT(found)
+ # Convert to posix path with 8.3 filename restrictions ( No spaces )
+ DOTNET_FRAMEWORK_HOME=`cygpath -d "$DOTNET_FRAMEWORK_HOME"`
+ DOTNET_FRAMEWORK_HOME=`cygpath -u "$DOTNET_FRAMEWORK_HOME"`
+ AC_SUBST(MIDL_PATH)
+ AC_SUBST(CSC_PATH)
+ AC_SUBST(DOTNET_FRAMEWORK_HOME)
fi
dnl ===================================================================
-dnl Check if stdc headers are available excluding windows.
+dnl Check if stdc headers are available excluding MSVC.
dnl ===================================================================
-if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
AC_HEADER_STDC
fi
-dnl ===================================================================
-dnl Find pre-processors.
-dnl ===================================================================
-if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+ dnl ===================================================================
+ dnl Find pre-processors.
+ dnl ===================================================================
+
AC_PROG_CXXCPP
-dnl Check whether there's a C pre-processor.
-dnl ===================================================================
-dnl When using SunStudio compiler, there is a bug with the cc
-dnl preprocessor, so use CC preprocessor as the cc preprocessor
-dnl See Issuezilla #445.
-dnl ===================================================================
+ dnl Check whether there's a C pre-processor.
+ dnl ===================================================================
+ dnl When using SunStudio compiler, there is a bug with the cc
+ dnl preprocessor, so use CC preprocessor as the cc preprocessor
+ dnl See Issuezilla #445.
+ dnl ===================================================================
if test "$_os" = "SunOS"; then
CPP=$CXXCPP
else
AC_PROG_CPP
fi
-fi
-
-AC_CHECK_SIZEOF(long)
-SIZEOF_LONG=$ac_cv_sizeof_long
-AC_SUBST(SIZEOF_LONG)
-AC_C_BIGENDIAN
-WORDS_BIGENDIAN=$ac_cv_c_bigendian
-AC_SUBST(WORDS_BIGENDIAN)
-dnl Check for large file support
-AC_SYS_LARGEFILE
-if test -n "$ac_cv_sys_file_offset_bits"; then
- LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
-fi
-if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
- LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
+ dnl Find integral type sizes and alignments
+
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(short)
+ AC_CHECK_SIZEOF(int)
+ AC_CHECK_SIZEOF(long long)
+ AC_CHECK_SIZEOF(double)
+ AC_CHECK_SIZEOF(void*)
+
+ SIZEOF_SHORT=$ac_cv_sizeof_short
+ SIZEOF_INT=$ac_cv_sizeof_int
+ SIZEOF_LONG=$ac_cv_sizeof_long
+ SIZEOF_LONGLONG=$ac_cv_sizeof_long_long
+ SIZEOF_DOUBLE=$ac_cv_sizeof_double
+ SIZEOF_POINTER=$ac_cv_sizeof_voidp
+
+ dnl Allow build without AC_CHECK_ALIGNOF, grrr
+ m4_pattern_allow([AC_CHECK_ALIGNOF])
+ m4_ifdef([AC_CHECK_ALIGNOF],
+ ,
+ [
+ dnl We know that the ALIGNOF_ variables are used only when cross-compiling
+ dnl in sal/typesconfig/makefile.mk...
+ if test "$cross_compiling" = "yes"; then
+ AC_MSG_ERROR([When cross-compiling you must use a recent Autoconf with [AC_][CHECK_ALIGNOF]])
+ fi
+ m4_define([AC_CHECK_ALIGNOF],
+ [
+ AC_MSG_WARN([Cannot determine alignment of $1])
+ AS_TR_SH([ac_cv_alignof_$3])=unknown
+ ])
+ ])
+
+ AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
+ AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
+ AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
+ AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
+
+ ALIGNOF_SHORT=$ac_cv_alignof_short
+ ALIGNOF_INT=$ac_cv_alignof_int
+ ALIGNOF_LONG=$ac_cv_alignof_long
+ ALIGNOF_DOUBLE=$ac_cv_alignof_double
+
+ AC_C_BIGENDIAN
+ WORDS_BIGENDIAN=$ac_cv_c_bigendian
+
+ dnl Check for large file support
+ AC_SYS_LARGEFILE
+ if test -n "$ac_cv_sys_file_offset_bits"; then
+ LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+ fi
+ if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
+ LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
+ fi
+else
+ # Hardcode for MSVC
+ SIZEOF_SHORT=2
+ SIZEOF_INT=4
+ SIZEOF_LONG=4
+ SIZEOF_LONGLONG=8
+ if test "$CL_X64" = ""; then
+ SIZEOF_POINTER=4
+ else
+ SIZEOF_POINTER=8
+ fi
+ ALIGNOF_SHORT=2
+ ALIGNOF_INT=4
+ ALIGNOF_LONG=4
+ ALIGNOF_DOUBLE=8
+ WORDS_BIGENDIAN=no
+ LFS_CFLAGS=''
fi
+AC_SUBST(WORDS_BIGENDIAN)
AC_SUBST(LFS_CFLAGS)
+AC_SUBST(SIZEOF_SHORT)
+AC_SUBST(SIZEOF_INT)
+AC_SUBST(SIZEOF_LONG)
+AC_SUBST(SIZEOF_LONGLONG)
+AC_SUBST(SIZEOF_DOUBLE)
+AC_SUBST(SIZEOF_POINTER)
+AC_SUBST(ALIGNOF_SHORT)
+AC_SUBST(ALIGNOF_INT)
+AC_SUBST(ALIGNOF_LONG)
+AC_SUBST(ALIGNOF_DOUBLE)
+
dnl ===================================================================
-dnl Check if valgrind.h is available
+dnl Check if valgrind.h is available
dnl ===================================================================
-if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
+if test "$cross_compiling" != "yes" -a "$enable_dbgutil" != "no"; then
dnl Test $prefix (currently only testing for /usr and /usr/local)
dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind
VALGRIND_CFLAGS=""
@@ -1995,76 +2670,16 @@ fi
AC_SUBST([VALGRIND_CFLAGS])
dnl ===================================================================
-dnl Check if cups/cups.h is available
-dnl ===================================================================
-if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
- AC_CHECK_HEADER(cups/cups.h, [],
- [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
-fi
-
-dnl ===================================================================
-dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
+dnl Testing for C++ compiler and version...
dnl ===================================================================
-if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
- AC_MSG_CHECKING([whether to enable pam support])
- if test -z "$enable_pam" || test "$enable_pam" != "no"; then
- AC_MSG_RESULT([yes])
- PAM=YES
- AC_CHECK_HEADER(security/pam_appl.h, [],
- [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
- AC_MSG_CHECKING([whether to link to libpam])
- if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
- AC_MSG_RESULT([yes])
- PAM_LINK=YES
- AC_CHECK_LIB(pam, pam_start, [],
- [AC_MSG_ERROR(libpam not found or functional)], [])
- else
- AC_MSG_RESULT([no, dynamically open it])
- PAM_LINK=NO
- fi
- else
- AC_MSG_RESULT([no])
- PAM=NO
- PAM_LINK=NO
- dnl check getspnam_r for needed args (4 or 5)
- AX_FUNC_WHICH_GETSPNAM_R
- fi
-fi
-AC_SUBST(PAM)
-AC_SUBST(NEW_SHADOW_API)
-AC_SUBST(PAM_LINK)
-
-if test "$_os" = "Linux"; then
- AC_MSG_CHECKING([whether to link to libcrypt])
- if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
- AC_MSG_RESULT([yes])
- CRYPT_LINK=YES
- AC_CHECK_LIB(crypt, crypt, [],
- [AC_MSG_ERROR(libcrypt not found or functional)], [])
- else
- AC_MSG_RESULT([no, dynamically open it])
- CRYPT_LINK=NO
- fi
-fi
-AC_SUBST(CRYPT_LINK)
-
-dnl ===================================================================
-dnl Testing for c++ compiler and version...
-dnl ===================================================================
-if test -n "$with_gcc_home"; then
- if test -z "$CXX"; then
- CXX="$with_gcc_home/bin/g++"
- fi
-fi
-
-if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
- if test -e "$CC"; then
+if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
+ if test -n "$CC" -a -z "$CXX"; then
CXX="$CC"
fi
fi
dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
-if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
AC_PROG_CXX
fi
@@ -2115,7 +2730,7 @@ main (void)
test (E0);
return 0;
}
-],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])], [AC_MSG_RESULT([no])])
+],[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])])
fi
fi
@@ -2123,7 +2738,7 @@ dnl ===================================================================
dnl Set the gcc/gxx include directories
dnl ===================================================================
# Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
-# often contains an i386 which is expanded as a macro. Solved in stlport.
+# often contains an i386 which is expanded as a macro.
if test "$GXX" = "yes"; then
AC_MSG_CHECKING([for g++ include path])
if test -z "$with_gxx_include_path"; then
@@ -2131,7 +2746,7 @@ if test "$GXX" = "yes"; then
if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
with_gxx_include_path="/usr/include"
fi
- if test "$WITH_MINGWIN" = "yes"; then
+ if test "$build_os" = "cygwin" -a "$WITH_MINGW" = "yes"; then
with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
fi
@@ -2140,30 +2755,32 @@ if test "$GXX" = "yes"; then
with_gxx_include_path=`cd $with_gxx_include_path && pwd`
fi
fi
-fi
-dnl This is the original code...
-dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
-if test -z "$with_gxx_include_path"; then
- with_gxx_include_path="NO_GXX_INCLUDE"
- AC_MSG_RESULT([no g++ includes])
+ dnl This is the original code...
+ dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
+ if test -z "$with_gxx_include_path"; then
+ with_gxx_include_path="NO_GXX_INCLUDE"
+ AC_MSG_RESULT([none])
+ else
+ AC_MSG_RESULT([$with_gxx_include_path])
+ fi
else
- AC_MSG_RESULT([$with_gxx_include_path])
+ with_gxx_include_path="NO_GXX_INCLUDE"
fi
GXX_INCLUDE_PATH="$with_gxx_include_path"
AC_SUBST(GXX_INCLUDE_PATH)
dnl ===================================================================
-dnl Set the mingw runtime library include directories
+dnl Set the MinGW include directories
dnl ===================================================================
-if test "$WITH_MINGWIN" = "yes"; then
- AC_MSG_CHECKING([for mingwin runtime include path])
+if test "$WITH_MINGW" = "yes"; then
+ AC_MSG_CHECKING([for MinGW runtime include path])
cat >conftest.$ac_ext <<_ACEOF
#include <stddef.h>
#include <bits/c++config.h>
_ACEOF
_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`
rm conftest.$ac_ext
- if test -n "$_mingw_lib_include_path"; then
+ if test "$build_os" = "cygwin" -a -n "$_mingw_lib_include_path"; then
_temp=""
for a in $_mingw_lib_include_path
do
@@ -2174,35 +2791,37 @@ _ACEOF
fi
if test -z "$_mingw_lib_include_path"; then
_mingw_lib_include_path="NO_LIB_INCLUDE"
- AC_MSG_RESULT([no mingwin runtime includes])
+ AC_MSG_RESULT([no MinGW include path])
else
AC_MSG_RESULT([$_mingw_lib_include_path])
fi
MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
AC_SUBST(MINGW_LIB_INCLUDE_PATH)
dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map
- AC_MSG_CHECKING([for mingwin c++ backward include path])
+ AC_MSG_CHECKING([for MinGW C++ backward include path])
cat >conftest.$ac_ext <<_ACEOF
#include <hash_set>
_ACEOF
_mingw_backward_include_path=`$CXX -E -xc++ -Wno-deprecated conftest.$ac_ext 2>&5| $SED -n -e '/.*1*"\(.*\)\/hash_set".*/s//\1/p' | sort -u | xargs echo`
rm conftest.$ac_ext
- if test -n "$_mingw_backward_include_path"; then
+ if test "$build_os" = "cygwin" -a -n "$_mingw_backward_include_path"; then
_mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path`
_mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path`
AC_MSG_RESULT([$_mingw_backward_include_path])
else
_mingw_backward_include_path="NO_BACKWARD_INCLUDE"
- AC_MSG_RESULT([no mingwin c++ backward includes])
+ AC_MSG_RESULT([no MinGW C++ backward includes])
fi
MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path"
AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH)
mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
+
+ # How to do this crack when cross-compiling?
AC_MSG_CHECKING([whether to use dynamic libgcc])
- if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then
+ if test "$build_os" = "cygwin" -a -e "$MINGW_CLIB_DIR/libgcc_s.a"; then
AC_MSG_CHECKING([dynamic libgcc name])
- MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'`
+ MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | $SED -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | $SED -e 's@_@?@g'`
MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null`
if test -n "$MINGW_GCCDLL"; then
MINGW_SHARED_GCCLIB=YES
@@ -2216,6 +2835,7 @@ _ACEOF
if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then
MINGW_GCCLIB_EH=YES
fi
+
AC_MSG_CHECKING([whether to use dynamic libstdc++])
MINGW_SHARED_LIBSTDCPP=
if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then
@@ -2224,7 +2844,7 @@ _ACEOF
if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then
MINGW_SHARED_LIBSTDCPP=stdc++.dll
fi
- if test -n "$MINGW_SHARED_LIBSTDCPP" ; then
+ if test "$build_os" = "cygwin" -a -n "$MINGW_SHARED_LIBSTDCPP" ; then
AC_MSG_CHECKING([dynamic libstdc++ name])
MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'`
MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null`
@@ -2239,7 +2859,7 @@ _ACEOF
else
AC_MSG_RESULT([no])
fi
- MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR`
+ test "$build_os" = "cygwin" && MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR`
AC_SUBST(MINGW_CLIB_DIR)
AC_SUBST(MINGW_SHARED_GCCLIB)
AC_SUBST(MINGW_GCCLIB_EH)
@@ -2250,7 +2870,7 @@ _ACEOF
fi
dnl ===================================================================
-dnl Extra checking for the SUN OS compiler
+dnl Extra checking for the SunOS compiler
dnl ===================================================================
if test "$_os" = "SunOS"; then
dnl SunStudio C++ compiler packaged with SunStudio C compiler
@@ -2260,173 +2880,90 @@ if test "$_os" = "SunOS"; then
AC_MSG_WARN([SunStudio C++ was not found])
echo "SunStudio C++ was not found" >> warn
else
- AC_MSG_RESULT([checked])
+ AC_MSG_RESULT([checked])
fi
- fi
-fi
-dnl ===================================================================
-dnl Extra checking for the OSF compiler
-dnl ===================================================================
-if test "$_os" = "OSF1"; then
- AC_MSG_CHECKING([Compaq C++ compiler version])
- dnl cxx -V outputs to standard error!!!!
- _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
- _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
- if test "$_compaqcxx_major" != "V6"; then
- AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
- echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
- else
- dnl compiler will do
- AC_MSG_RESULT([checked])
fi
fi
dnl *************************************************************
dnl Testing for exception handling - dwarf2 or sjlj exceptions...
dnl *************************************************************
-AC_MSG_CHECKING([exception type])
-AC_LANG_PUSH([C++])
-if test "$WITH_MINGWIN" = "yes"; then
+if test "$WITH_MINGW" = "yes"; then
+ AC_MSG_CHECKING([exception type])
+ AC_LANG_PUSH([C++])
AC_TRY_LINK(
- [#include <iostream>
+ [#include <iostream>
extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
- ],
- [_Unwind_SjLj_RaiseException() ],
- [exceptions_type="sjlj"],
- [exceptions_type="dwarf2"]
+ ],
+ [_Unwind_SjLj_RaiseException() ],
+ [exceptions_type="sjlj"],
+ [exceptions_type="dwarf2"]
)
+ AC_MSG_RESULT($exceptions_type)
+ AC_LANG_POP([C++])
fi
-AC_MSG_RESULT($exceptions_type)
-AC_LANG_POP([C++])
EXCEPTIONS="$exceptions_type"
AC_SUBST(EXCEPTIONS)
dnl ===================================================================
dnl Checks for what the default STL should be
dnl ===================================================================
- AC_MSG_CHECKING([what the default STL should be])
- DEFAULT_TO_STLPORT="no"
- if test "$_os" = "Linux"; then
- case "$build_cpu" in
- i?86)
- case "$build_os" in k*bsd*-gnu*)
- DEFAULT_TO_STLPORT="no"
- ;;
- *)
- DEFAULT_TO_STLPORT="yes"
- ;;
- esac
- ;;
- *)
- DEFAULT_TO_STLPORT="no"
- ;;
- esac
- elif test "$_os" = "SunOS"; then
- DEFAULT_TO_STLPORT="yes"
- elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
- DEFAULT_TO_STLPORT="yes"
- elif test "$_os" = "OS2"; then
- DEFAULT_TO_STLPORT="yes"
- elif test "$_os" = "FreeBSD"; then
- DEFAULT_TO_STLPORT="yes"
- fi
- if test "$DEFAULT_TO_STLPORT" = "yes"; then
- AC_MSG_RESULT([stlport])
- else
- AC_MSG_RESULT([system])
- fi
- if test "$WITH_STLPORT" = "auto"; then
- WITH_STLPORT=$DEFAULT_TO_STLPORT
- fi
-
-dnl ===================================================================
-dnl Checks for STLPORT
-dnl ===================================================================
- AC_MSG_CHECKING([for STL providing headers])
- STLPORT4=""
- USE_SYSTEM_STL=""
- if test "$WITH_STLPORT" = "yes"; then
- AC_MSG_RESULT([using internal stlport.])
- if test "$DEFAULT_TO_STLPORT" != "yes"; then
- AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
- echo "using stlport. Warning, breaks your ABI compatability!" >>warn
- fi
- elif test "$WITH_STLPORT" = "no"; then
- AC_MSG_RESULT([using system STL])
- USE_SYSTEM_STL="YES"
- if test "$DEFAULT_TO_STLPORT" != "no"; then
- AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
- echo "using system STL. Warning, breaks your ABI compatability!" >>warn
- fi
- else
- STLPORT4=$WITH_STLPORT
- if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
- AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
- else
- dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
- if test -f "$STLPORT4/stlport/hash_map"; then
- AC_MSG_RESULT([checked.])
- else
- AC_MSG_ERROR([STLport headers not found.])
- fi
- fi
- if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
- AC_MSG_CHECKING([for STLport libraries])
- if test "$_os" = "SunOS"; then
- if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
- AC_MSG_RESULT([checked])
- elif test -f "$STLPORT4/lib/libstlport.so"; then
- AC_MSG_RESULT([checked])
- STLPORT_VER=500
- else
- AC_MSG_ERROR([STLport libraries not found])
- fi
- elif test "$_os" = "Darwin"; then
- if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
- AC_MSG_RESULT([checked])
- elif test -f "$STLPORT4/lib/libstlport.dylib"; then
- AC_MSG_RESULT([checked])
- STLPORT_VER=500
- else
- AC_MSG_ERROR([STLport libraries not found])
- fi
- else
- if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
- AC_MSG_RESULT([checked])
- elif test -f "$STLPORT4/lib/libstlport.so"; then
- AC_MSG_RESULT([checked])
- STLPORT_VER=500
- else
- AC_MSG_ERROR([STLport libraries not found])
- fi
- fi
- fi
- if test "$DEFAULT_TO_STLPORT" != "yes"; then
- AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
- echo "using stlport. Warning, breaks your ABI compatability!" >>warn
- fi
- fi
+AC_MSG_CHECKING([Whether building STLPort library makes sense])
+BUILD_STLPORT="no"
+if test "$_os" = "Linux"; then
+ case "$host_cpu" in
+ i?86)
+ case "$host_os" in k*bsd*-gnu*)
+ BUILD_STLPORT="no"
+ ;;
+ *)
+ BUILD_STLPORT="yes"
+ ;;
+ esac
+ ;;
+ *)
+ BUILD_STLPORT="no"
+ ;;
+ esac
+elif test "$_os" = "SunOS"; then
+ BUILD_STLPORT="yes"
+elif test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
+ BUILD_STLPORT="yes"
+elif test "$_os" = "FreeBSD"; then
+ BUILD_STLPORT="yes"
+fi
+if test "$BUILD_STLPORT" = "yes" ; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
-if test -z "$STLPORT4"; then
- STLPORT4="NO_STLPORT4"
+AC_MSG_CHECKING([Whether STLPort library will be actually built])
+if test "$with_stlport" = "auto" -o "$BUILD_STLPORT" = "no"; then
+ with_stlport=$BUILD_STLPORT
fi
-if test -z "$STLPORT_VER"; then
- STLPORT_VER=400
+if test "$with_stlport" = "yes" ; then
+ AC_MSG_RESULT([yes])
+ WITH_STLPORT=YES
+ SCPDEFS="$SCPDEFS -DWITH_STLPORT"
+ BUILD_TYPE="$BUILD_TYPE STLPORT"
+else
+ WITH_STLPORT=NO
+ AC_MSG_RESULT([no])
fi
-AC_SUBST(STLPORT4)
-AC_SUBST(STLPORT_VER)
-AC_SUBST(USE_SYSTEM_STL)
+
+AC_SUBST(WITH_STLPORT)
dnl ===================================================================
-dnl visibility feature
+dnl visibility and c++0x features
dnl ===================================================================
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -fvisibility=hidden"
+ CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
CFLAGS=$save_CFLAGS
if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
@@ -2434,39 +2971,76 @@ if test "$GCC" = "yes"; then
else
AC_MSG_RESULT([no])
fi
+
+ AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 757])
+ save_CXXFLAGS=$CFLAGS
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+ AC_LANG_PUSH([C++])
+
+ AC_TRY_COMPILE([
+#include <stddef.h>
+
+template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
+
+namespace
+{
+ struct b
+ {
+ int i;
+ int j;
+ };
+}
+],[
+struct a
+{
+ int i;
+ int j;
+};
+a thinga[]={{0,0}, {1,1}};
+b thingb[]={{0,0}, {1,1}};
+size_t i = sizeof(sal_n_array_size(thinga));
+size_t j = sizeof(sal_n_array_size(thingb));
+return !(i != 0 && j != 0);
+], HAVE_CXX0X=TRUE,)
+
+ AC_LANG_POP([C++])
+ CXXFLAGS=$save_CXXFLAGS
+ if test "$HAVE_CXX0X" = "TRUE"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
fi
+AC_SUBST(HAVE_CXX0X)
+
# ===================================================================
-# use --ccache-skip?
+# use ccache?
# ===================================================================
-dnl used to escape compiler options for ccache that otherwise prevent
+dnl need to check for ccache version: otherwise prevents
dnl caching of the results (like "-x objective-c++" for Mac)
-AC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip])
+AC_MSG_CHECKING([whether we are able to use --ccache-skip])
if test "$_os" != "Darwin" ; then
AC_MSG_RESULT([only used on Mac currently, skipping])
-elif test "$enable_ccache_skip" = "no" ; then
- AC_MSG_RESULT([no - diabled explicitly])
-elif test "$enable_ccache_skip" = "yes" ; then
- AC_MSG_RESULT([yes - enabled explicitly, skipping checks])
- AC_SUBST([USE_CCACHE], [YES])
-elif test "$enable_ccache_skip" = "auto" ; then
+else
# checking for ccache presence/version
AC_MSG_RESULT([probing...])
AC_PATH_PROG([CCACHE],[ccache],[not_found])
if test "$CCACHE" = "not_found" ; then
AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)])
else
- # check ccache version
+ # check ccache version
AC_MSG_CHECKING([whether version of ccache is suitable])
CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
- if test "$CCACHE_VERSION" = "2.4_OOo"; then
+ CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+ if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([whether ccache is actually used for the build])
AC_LANG_PUSH([C++])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
dnl an empty program will do, we're checking the compiler flags
- AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
[use_ccache=yes], [use_ccache=no])
if test $use_ccache = yes ; then
AC_MSG_RESULT([yes, will enable --ccache-skip])
@@ -2478,30 +3052,18 @@ elif test "$enable_ccache_skip" = "auto" ; then
AC_LANG_POP([C++])
else
AC_MSG_RESULT([no])
- AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip])
+ AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. ccache will not be used.])
fi
fi
-else
- AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"])
fi
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
-if test "$USE_SYSTEM_STL" = "YES"; then
- AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
- AC_LANG_PUSH([C++])
+HAVE_GCC_VISIBILITY_BROKEN=
+if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) ; then
- AC_TRY_COMPILE([#include <ext/hash_map>
-using namespace __gnu_cxx;
-],[hash_map<int, int> t; return 0;],
- ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
-
- if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
- AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
- else
- AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
- fi
+ AC_LANG_PUSH([C++])
if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
AC_MSG_CHECKING([if STL headers are visibility safe])
@@ -2523,13 +3085,13 @@ using namespace __gnu_cxx;
using namespace std;
],[istringstream strm( "test" ); return 0;],
$EGREP -q unresolvable conftest.err;
- if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
+ if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
gccvisok=no)
AC_MSG_RESULT([$gccvisok])
if test "$gccvisok" = "no"; then
- AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility])
- echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn
- unset HAVE_GCC_VISIBILITY_FEATURE
+ AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
+ echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn
+ HAVE_GCC_VISIBILITY_BROKEN="TRUE"
fi
LDFLAGS=$sharedlink_ldflags_save
@@ -2549,12 +3111,16 @@ _ACEOF
if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
gccvisbroken=yes
else
- case "$build_cpu" in
+ case "$host_cpu" in
i?86|x86_64)
- if $EGREP -q '@PLT' visibility.s; then
+ if test "$_os" = "Darwin"; then
gccvisbroken=no
- else
- gccvisbroken=yes
+ else
+ if $EGREP -q '@PLT' visibility.s; then
+ gccvisbroken=no
+ else
+ gccvisbroken=yes
+ fi
fi
;;
*)
@@ -2576,6 +3142,7 @@ _ACEOF
fi
AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
+AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
dnl ===================================================================
dnl allocator
@@ -2588,7 +3155,7 @@ if test "$with_alloc" = "system"; then
fi
if test "$with_alloc" = "tcmalloc"; then
AC_MSG_RESULT(tcmalloc)
- if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
+ if ! echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
AC_MSG_ERROR([tcmalloc only available/usable on ix86])
fi
AC_CHECK_LIB(tcmalloc, malloc, [],
@@ -2633,61 +3200,105 @@ dnl ===================================================================
dnl Java support enable
dnl ===================================================================
AC_MSG_CHECKING([whether to build with Java support])
-if test "$WITH_JAVA" != "no"; then
+if test "$with_java" != "no"; then
AC_MSG_RESULT([yes])
SOLAR_JAVA="TRUE"
else
AC_MSG_RESULT([no])
SOLAR_JAVA=""
-
- AC_MSG_WARN([building without java will mean some features will not be available])
- echo "building without java will mean some features will not be available" >>warn
fi
+
AC_SUBST(SOLAR_JAVA)
-if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
+dnl SOLAR_JAVA (yes, silly name, should rename) indicates whether we
+dnl want there to be *run-time* support for Java extensions in the
+dnl built LibreOffice. We might need a different test for whether
+dnl there is Java at *build-time*.
+
+dnl If we don't have access to Java at build-time we can't have
+dnl run-time Java support either. But I think there are some uses of
+dnl Java at build-time even if no run-time Java support is wanted. Or
+dnl is there? This is a bit unclear to me.
+
+if test "$_os" = "Linux" && test "$host_cpu" = "powerpc"; then
# IBMs JDK needs this...
JITC_PROCESSOR_TYPE=6
export JITC_PROCESSOR_TYPE
fi
-if test "$_os" = "WINNT"; then
- if test -z "$with_jdk_home"; then
- _jdk_home=`./oowintool --jdk-home`
- if test -d "$_jdk_home"; then
- with_jdk_home="$_jdk_home"
- fi
- else
- with_jdk_home=`cygpath -u "$with_jdk_home"`
- fi
+if test $_os = "WINNT"; then
+ WITH_VC_REDIST="TRUE"
fi
+AC_SUBST(WITH_VC_REDIST)
dnl ===================================================================
-dnl Checks for java
+dnl Checks for Java
dnl ===================================================================
if test "$SOLAR_JAVA" != ""; then
+
+ # Windows-specific tests
+ if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
+ if test "$CL_X64" != ""; then
+ bitness="64-bit"
+ otherbitness="32-bit"
+ else
+ bitness="32-bit"
+ otherbitness="64-bit"
+ fi
+
+ if test -z "$with_jdk_home"; then
+
+ # Unfortunately apparently no way to find, if needed, the 64-bit
+ # JDK in the Registry from the 32-bit Perl oowintool
+
+ _jdk_home=`./oowintool --jdk-home`
+ if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
+ with_jdk_home="$_jdk_home"
+ howfound="found by oowintool"
+ else
+ AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK])
+ fi
+ else
+ test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
+ howfound="you passed"
+ fi
+ fi
+
JAVA_HOME=; export JAVA_HOME
if test -z "$with_jdk_home"; then
- AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
+ AC_PATH_PROG(JAVAINTERPRETER, $with_java)
else
- _java_path="$with_jdk_home/bin/$WITH_JAVA"
- dnl Check if there is a java interpreter at all.
+ _java_path="$with_jdk_home/bin/$with_java"
+ dnl Check if there is a Java interpreter at all.
if test -x "$_java_path"; then
JAVAINTERPRETER=$_java_path
else
- AC_MSG_ERROR([$_java_path not found set with_jdk_home])
+ AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
fi
fi
- if test "$_os" = "WINNT"; then
+
+ if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
+ # Check that the JDK found is correct architecture
+ # Why is this necessary, we don't link with any library from the JDK I think,
+
+ shortjdkhome=`cygpath -d "$with_jdk_home"`
+ 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
+ AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
+ AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
+ 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
+ AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
+ AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
+ fi
+
if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
fi
JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
elif test "$_os" = "Darwin"; then
- dnl HACK: There currently is only a 32 bit version of OOo for Mac OS X,
- dnl and Tiger java complains about -d32 while Snow Leopard java needs it
- dnl to run in 32 bit mode and be able to load OOo jnilibs:
+ dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X,
+ dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
+ dnl to run in 32 bit mode and be able to load LibreOffice jnilibs:
AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
AC_MSG_RESULT([yes])
@@ -2708,60 +3319,21 @@ if test "$SOLAR_JAVA" != ""; then
dnl java -version sends output to stderr!
if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
-# dnl Kaffe specific tests
-# KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
-# if test -z "$KAFFE_VER"; then
-# AC_MSG_ERROR([looks like Kaffe but version detection failed])
-# fi
-# _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
-# if test "$_kaffe_ver" -lt 10100; then
-# AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
-# fi
-# JDK=kaffe
-#
-# dnl TODO: define some project exclusion variables
-#
-# AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
-# AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
-# echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
-# JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
JDK=gcj
- AC_MSG_RESULT([checked (gcj)])
+ AC_MSG_RESULT([checked (gcj)])
_gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
_gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
- elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
+ elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "BEA"` -gt 0; then
AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
-# JDK=bea
-#
-# dnl BEA JDK specific tests
-# _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
-# _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
-#
-# if test "$_jdk_ver" -lt 10500; then
-# AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0])
-# fi
-#
-# AC_MSG_RESULT([checked (BEA JDK $_jdk)])
-#
-# if test "$with_jdk_home" = ""; then
-# AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
-#you must use the "--with-jdk-home" configure option explicitly])
-# fi
-#
-# AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
-# echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
-#
-# JAVA_HOME=$with_jdk_home
-#
- elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
+ elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "IBM"` -gt 0; then
JDK=ibm
dnl IBM JDK specific tests
_jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
_jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
-
+
if test "$_jdk_ver" -lt 10500; then
AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
fi
@@ -2769,19 +3341,19 @@ if test "$SOLAR_JAVA" != ""; then
AC_MSG_RESULT([checked (IBM JDK $_jdk)])
if test "$with_jdk_home" = ""; then
- AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
+ AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
you must use the "--with-jdk-home" configure option explicitly])
fi
JAVA_HOME=$with_jdk_home
-
- else
+
+ else
JDK=sun
- dnl SUN JDK specific tests
+ dnl Sun JDK specific tests
_jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
_jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
-
+
if test "$_jdk_ver" -lt 10500; then
AC_MSG_ERROR([JDK is too old, you need at least 1.5])
fi
@@ -2790,37 +3362,67 @@ you must use the "--with-jdk-home" configure option explicitly])
if test "$_os" = "WINNT"; then
JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
fi
- if test "$_os" = "OS2"; then
- JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
- fi
fi
else
- AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
+ AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
fi
else
dnl Java disabled
JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
fi
+_java_target_ver="1.5"
+dnl ===================================================================
+dnl Check for target Java bytecode version
+dnl ===================================================================
+if test "$SOLAR_JAVA" != ""; then
+ AC_MSG_CHECKING([for target Java bytecode version])
+ if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
+ AC_MSG_RESULT([default by $JDK])
+ if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
+ AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
+ fi
+ else
+ if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
+ _java_target_ver="$with_java_target_version"
+ AC_MSG_RESULT([$_java_target_ver])
+ elif test $_jdk_ver -gt 10000 ; then
+ _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
+ AC_MSG_RESULT([$_java_target_ver])
+ else
+ AC_MSG_ERROR([Unable to guess Java bytecode version from Java version!])
+ fi
+ fi
+
+ if ! test -z "$_java_target_ver" -o \
+ "$_java_target_ver" = "1.1" -o \
+ "$_java_target_ver" = "1.2" -o \
+ "$_java_target_ver" = "1.3" -o \
+ "$_java_target_ver" = "1.4" -o \
+ "$_java_target_ver" = "1.5" -o \
+ "$_java_target_ver" = "1.6" -o \
+ "$_java_target_ver" = "5" ; then
+ AC_MSG_ERROR([$_java_target_ver is not a supported Java bytecode version!])
+ fi
+
+ JAVA_SOURCE_VER="$_java_target_ver"
+ JAVA_TARGET_VER="$_java_target_ver"
+fi
+
dnl ===================================================================
dnl Checks for javac
dnl ===================================================================
if test "$SOLAR_JAVA" != ""; then
- if test "$JDK" = "gcj"; then
- javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
+ if test "$JDK" = "gcj"; then
+ javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
else
javacompiler="javac"
fi
- if test "$_os" = "OS2"; then
- if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
- javacompiler="${javacompiler}.exe"
- fi
- fi
if test -z "$with_jdk_home"; then
AC_PATH_PROG(JAVACOMPILER, $javacompiler)
else
_javac_path="$with_jdk_home/bin/$javacompiler"
- dnl Check if there is a java compiler at all.
+ dnl Check if there is a Java compiler at all.
if test -x "$_javac_path"; then
JAVACOMPILER=$_javac_path
fi
@@ -2828,18 +3430,13 @@ if test "$SOLAR_JAVA" != ""; then
if test -z "$JAVACOMPILER"; then
AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
fi
- if test "$_os" = "WINNT"; then
+ if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
JAVACOMPILER="${JAVACOMPILER}.exe"
fi
JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
fi
- if test "$_os" = "OS2"; then
- if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
- JAVACOMPILER="${JAVACOMPILER}.exe"
- fi
- fi
if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
AC_MSG_CHECKING([re-checking JDK])
@@ -2862,6 +3459,17 @@ if test "$SOLAR_JAVA" != ""; then
fi
AC_SUBST(JAVACISGCJ)
+JAVACISKAFFE=""
+dnl ===================================================================
+dnl Checks that javac is kaffe
+dnl ===================================================================
+if test "$SOLAR_JAVA" != ""; then
+ if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
+ JAVACISKAFFE="yes"
+ fi
+fi
+AC_SUBST(JAVACISKAFFE)
+
dnl ===================================================================
dnl Checks for javadoc
dnl ===================================================================
@@ -2870,11 +3478,6 @@ if test "$SOLAR_JAVA" != ""; then
AC_PATH_PROG(JAVADOC, javadoc)
else
_javadoc_path="$with_jdk_home/bin/javadoc"
- if test "$_os" = "OS2"; then
- if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
- _javadoc_path="${_javadoc_path}.exe"
- fi
- fi
dnl Check if there is a javadoc at all.
if test -x "$_javadoc_path"; then
JAVADOC=$_javadoc_path
@@ -2885,24 +3488,56 @@ if test "$SOLAR_JAVA" != ""; then
if test -z "$JAVADOC"; then
AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
fi
- if test "$_os" = "WINNT"; then
+ if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
JAVADOC="${JAVADOC}.exe"
fi
JAVADOC=`cygpath -d "$JAVADOC"`
JAVADOC=`cygpath -u "$JAVADOC"`
fi
- if test "$_os" = "OS2"; then
- if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
- JAVADOC="${JAVADOC}.exe"
- fi
- fi
fi
if test "$SOLAR_JAVA" != ""; then
- dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
- if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then
- if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then
+ # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
+ if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
+
+ if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
+ # try to recover first by looking whether we have a alternatives
+ # system as in Debian or newer SuSEs where following /usr/bin/javac
+ # over /etc/alternatives/javac leads to the right bindir where we
+ # just need to strip a bit away to get a valid JAVA_HOME
+ JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
+ elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
+ # maybe only one level of symlink (e.g. on Mac)
+ JAVA_HOME=$(readlink $JAVACOMPILER)
+ if test "$(dirname $JAVA_HOME)" = "."; then
+ # we've got no path to trim back
+ JAVA_HOME=""
+ fi
+ else
+ # else warn
+ AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
+ AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
+ echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
+ echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
+ fi
+ dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
+ if test "$JAVA_HOME" != "/usr"; then
+ if test "$_os" = "Darwin"; then
+ dnl Leopard returns a non-suitable path with readlink - points to "Current" only
+ JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
+ dnl Tiger already returns a JDK path..
+ JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
+ else
+ JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
+ fi
+ fi
+fi
+# as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
+
+dnl now if JAVA_HOME has been set to empty, then call findhome to find it
+ if test -z "$JAVA_HOME"; then
+ if test "x$with_jdk_home" = "x"; then
cat > findhome.java <<_ACEOF
[import java.io.File;
@@ -2937,45 +3572,12 @@ _ACEOF
AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
fi
else
- JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
+ JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
fi
fi
dnl second sanity check JAVA_HOME if possible
if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
- # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
- if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
- javac_link_f=`readlink -f "$JAVACOMPILER" 2>/dev/null`
- if test $? == 0 && test "$JAVACOMPILER" != "$javac_link_f"; then
- # try to recover first by looking whether we have a alternatives
- # system as in Debian or newer SuSEs where following /usr/bin/javac
- # over /etc/alternatives/javac leads to the right bindir where we
- # just need to strip a bit away to get a valid JAVA_HOME
- # Solaris 11 is even worse, because target is relative, so use -f
- JAVA_HOME="$javac_link_f"
- elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
- # Darwin readlink(1) is so primitive it doesn't even support -f
- # maybe only one level of symlink (e.g. on Mac)
- JAVA_HOME=`readlink $JAVACOMPILER`
- else
- # else warn
- AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
- AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
- echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
- echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
- fi
- dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
- if test "$JAVA_HOME" != "/usr"; then
- if test "$_os" = "Darwin"; then
- dnl Leopard returns a non-suitable path with readlink - points to "Current" only
- JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
- dnl Tiger already returns a JDK path..
- JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
- else
- JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
- fi
- fi
- fi
# now check if $JAVA_HOME is really valid
if test "$_os" = "Darwin"; then
if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
@@ -2991,17 +3593,14 @@ _ACEOF
echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
-# if test "$JDK" = "gcj"; then
-# echo "e.g. install java-1.4.2-gcj-compat-devel and use --with-jdk-home=/usr/lib/jvm/java-1.4.2-gcj" >> warn
-# fi
fi
fi
+ AC_MSG_NOTICE([JAVA_HOME=$JAVA_HOME])
fi
-
AWTLIB=
if test "$SOLAR_JAVA" != ""; then
AC_MSG_CHECKING([for jawt lib name])
- if test "$JDK" = "gcj"; then
+ if test "$JDK" = "gcj"; then
save_CFLAGS=$CFLAGS
save_LDFLAGS=$LDFLAGS
CFLAGS="$CFLAGS -I$JAVA_HOME/include"
@@ -3044,44 +3643,14 @@ if test "$SOLAR_JAVA" != ""; then
AC_SUBST(AWTLIB)
fi
-dnl ===================================================================
-dnl Check for optional gcj for AOT
-dnl ===================================================================
-if test "$SOLAR_JAVA" != ""; then
- AC_MSG_CHECKING([whether to enable gcj aot compilation])
- if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
- AC_MSG_RESULT([yes])
- if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
- gcjaot="gcj"
- else
- gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
- fi
- AC_MSG_RESULT([$gcjaot])
- if test -n "$with_jdk_home"; then
- _javac_path="$with_jdk_home/bin/$gcjaot"
- dnl Check if there is a gcj at all.
- if test -x "$_javac_path"; then
- JAVAAOTCOMPILER=$_javac_path
- fi
- fi
- if test -z "$JAVAAOTCOMPILER"; then
- AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
- fi
- if test -z "$JAVAAOTCOMPILER"; then
- AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
- fi
- else
- AC_MSG_RESULT([no])
- fi
-fi
-
AC_SUBST(JAVA_HOME)
AC_SUBST(JDK)
AC_SUBST(JAVAFLAGS)
+AC_SUBST(JAVA_SOURCE_VER)
+AC_SUBST(JAVA_TARGET_VER)
AC_SUBST(JAVAINTERPRETER)
AC_SUBST(JAVAIFLAGS)
AC_SUBST(JAVACOMPILER)
-AC_SUBST(JAVAAOTCOMPILER)
AC_SUBST(JAVADOC)
dnl ===================================================================
@@ -3107,20 +3676,20 @@ else
# This test _should_ work because the one accepts -V (ours) and one
# (the other) not...
$DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
- if test $? -eq 0; then
+ if test $? -eq 0; then
BUILD_DMAKE=NO
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([the dmake version])
DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
- AC_MSG_RESULT([OK, >= 4.11])
+ AC_MSG_RESULT([OK, >= 4.11])
elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
- test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
- AC_MSG_RESULT([OK, >= 4.11])
+ test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
+ AC_MSG_RESULT([OK, >= 4.11])
else
- AC_MSG_RESULT([too old. >= 4.11 is needed])
- echo "A newer dmake will be built on ./bootstrap"
- BUILD_DMAKE=YES
+ AC_MSG_RESULT([too old. >= 4.11 is needed])
+ echo "A newer dmake will be built on ./bootstrap"
+ BUILD_DMAKE=YES
fi
else
AC_MSG_RESULT([no])
@@ -3131,14 +3700,15 @@ fi
AC_SUBST(BUILD_DMAKE)
AC_MSG_CHECKING([whether to enable EPM for packing])
+BUILD_EPM=NO
if test "$enable_epm" = "yes"; then
AC_MSG_RESULT([yes])
dnl ===================================================================
- dnl Check for epm - not needed for windows
+ dnl Check for epm - not needed for Windows
dnl ===================================================================
if test "$_os" != "WINNT"; then
if test -n "$with_epm"; then
- EPM=$with_epm
+ EPM=$with_epm
else
AC_PATH_PROG(EPM, epm, no)
fi
@@ -3156,27 +3726,27 @@ if test "$enable_epm" = "yes"; then
fi
AC_MSG_CHECKING([epm version])
EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
- if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
- test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
+ if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
+ test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
AC_MSG_RESULT([OK, >= 3.7])
BUILD_EPM=NO
- if test "$_os" = "Darwin"; then
+ if test "$_os" = "Darwin"; then
AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
- _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
- if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
- 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)])
- elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
- AC_MSG_RESULT([$_pm, ok])
- else # we never should get here, but go safe
- 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)])
- fi
- fi
- else
+ _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
+ if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
+ 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)])
+ elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
+ AC_MSG_RESULT([$_pm, ok])
+ else # we never should get here, but go safe
+ 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)])
+ fi
+ fi
+ else
AC_MSG_RESULT([too old. epm >= 3.7 is required.])
echo "EPM will be built."
BUILD_EPM=YES
BUILD_TYPE="$BUILD_TYPE EPM"
- fi
+ fi
fi
fi
@@ -3185,47 +3755,44 @@ if test "$enable_epm" = "yes"; then
# defaults
case "$_os" in
- OS2)
- PKGFORMAT=native
- ;;
- Darwin)
- PKGFORMAT=dmg
- ;;
- SunOS)
- PKGFORMAT=pkg
- ;;
- Linux)
+ Darwin)
+ PKGFORMAT=dmg
+ ;;
+ SunOS)
+ PKGFORMAT=pkg
+ ;;
+ Linux)
# if building on Debian, default should be deb...
if test -e /etc/debian_version; then
PKGFORMAT=deb
else
PKGFORMAT=rpm
fi
- ;;
- AIX)
- PKGFORMAT=aix
- ;;
- *BSD)
- PKGFORMAT=bsd
- ;;
- OSF1)
- PKGFORMAT=setld
- ;;
+ ;;
+ AIX)
+ PKGFORMAT=rpm
+ ;;
+ OpenBSD|DragonFly)
+ PKGFORMAT=portable
+ ;;
+ *BSD)
+ PKGFORMAT=bsd
+ ;;
WINNT)
PKGFORMAT=msi
;;
- # we never should get here since we check the arciecture/os at the beginning,
- # but go sure...
- *)
- AC_MSG_ERROR([unknown system])
+ # we never should get here since we check the arciecture/os at the beginning,
+ # but go sure...
+ *)
+ AC_MSG_ERROR([unknown system])
esac
if test -n "$with_package_format"; then
- for i in $with_package_format; do
- case "$i" in
- aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
- ;;
- *)
- AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
+ for i in $with_package_format; do
+ case "$i" in
+ aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
+ ;;
+ *)
+ AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
aix - AIX software distribution
bsd - FreeBSD, NetBSD, or OpenBSD software distribution
depot or swinstall - HP-UX software distribution
@@ -3237,16 +3804,16 @@ rpm - RedHat software distribution
setld - Tru64 (setld) software distribution
native - "Native" software distribution for the platform
portable - Portable software distribution
-OOo additionally supports:
+LibreOffice additionally supports:
archive - .tar.gz or .zip
dmg - Mac OS X .dmg
installed - installation tree
msi - Windows .msi
- ])
- ;;
- esac
- done
- PKGFORMAT="$with_package_format"
+ ])
+ ;;
+ esac
+ done
+ PKGFORMAT="$with_package_format"
fi
AC_MSG_RESULT([$PKGFORMAT])
if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
@@ -3261,12 +3828,12 @@ msi - Windows .msi
if test $? -eq 0; then
RPM=$a
break
- fi
+ fi
fi
done
if test -z "$RPM" ; then
AC_MSG_ERROR([not found])
- elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then
+ elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
RPM_PATH=`which $RPM`
AC_MSG_RESULT([$RPM_PATH])
else
@@ -3293,10 +3860,10 @@ msi - Windows .msi
fi
if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
- if test "$EPM" != "no" && test "$EPM" != "internal"; then
+ if test "$EPM" != "no" && test "$EPM" != "internal"; then
if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
- AC_MSG_CHECKING([whether epm is patched for OOos needs])
- if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
+ AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
+ if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
@@ -3323,7 +3890,6 @@ msi - Windows .msi
AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
fi
fi
- AC_SUBST(BUILD_EPM)
AC_SUBST(RPM)
AC_SUBST(DPKG)
AC_SUBST(PKGMK)
@@ -3333,6 +3899,7 @@ else
PKGFORMAT=native
fi
AC_SUBST(EPM)
+AC_SUBST(BUILD_EPM)
AC_SUBST(PKGFORMAT)
dnl ===================================================================
@@ -3340,14 +3907,15 @@ dnl Check for gperf
dnl ===================================================================
AC_PATH_PROG(GPERF, gperf)
if test -z "$GPERF"; then
- AC_MSG_ERROR([gperf not found but needed. Install it.])
+ AC_MSG_ERROR([gperf not found but needed. Install it.])
fi
AC_MSG_CHECKING([gperf version])
if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
- AC_MSG_RESULT([OK])
+ AC_MSG_RESULT([OK])
else
- AC_MSG_ERROR([too old, you need at least 3.0.0])
+ AC_MSG_ERROR([too old, you need at least 3.0.0])
fi
+AC_SUBST(GPERF)
dnl ===================================================================
dnl Check for building stax
@@ -3368,75 +3936,44 @@ dnl ===================================================================
AC_MSG_CHECKING([whether to build the ODK])
if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
AC_MSG_RESULT([yes])
- if test "$WITH_JAVA" != "no"; then
- AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
- if ! test -f "./external/unowinreg/unowinreg.dll"; then
- HAVE_UNOWINREG_DLL=no
- else
- HAVE_UNOWINREG_DLL=yes
- fi
- if test "$HAVE_UNOWINREG_DLL" = "yes"; then
- AC_MSG_RESULT([found])
- BUILD_UNOWINREG=NO
- else
- if test "$_os" = "WINNT"; then
- AC_MSG_RESULT([not found, will be built])
- else
- AC_MSG_WARN([not found, will be cross-built using mingw32])
- fi
- BUILD_UNOWINREG=YES
- fi
- if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
- if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
- AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
- Specify mingw32 g++ executable name with --with-mingwin.
- Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
- put it into external/unowinreg])
- fi
- if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
- if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
- else
- AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
- fi
- if test "$MINGWCXX" = "false"; then
- AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
- fi
- AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
- if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
- AC_MSG_ERROR(no)
- else
- AC_MSG_RESULT(yes)
+
+ if test "$with_java" != "no"; then
+ AC_MSG_CHECKING([whether to build unowinreg.dll])
+ if test "$_os" = "WINNT" -a "z$enable_build_unowinreg" = "z" ; then
+ # build on Win by default
+ enable_build_unowinreg=yes
fi
- if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
- if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`"; then MINGWSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi
+ if test "z$enable_build_unowinreg" = "z" -o "$enable_build_unowinreg" = "no"; then
+ AC_MSG_RESULT([no])
+ BUILD_UNOWINREG=NO
else
- AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`, false)
- fi
- if test "$MINGWSTRIP" = "false"; then
- AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
+ AC_MSG_RESULT([yes])
+ BUILD_UNOWINREG=YES
fi
- AC_LANG_PUSH([C++])
- save_CXX=$CXX
- save_CXXCPP=$CXXCPP
- CXX=$MINGWCXX
- CXXCPP="$MINGWCXX -E"
- save_CXXFLAGS=$CXXFLAGS
- save_CPPFLAGS=$CPPFLAGS
- CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
- CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
- # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
- # do not make sense here (and 'd make the check fail)
- save_LIBS=$LIBS
- LIBS=""
- AC_HAVE_LIBRARY(kernel32)
- AC_HAVE_LIBRARY(advapi32)
- AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
- CXXFLAGS=$save_CXXFLAGS
- CPPFLAGS=$save_CPPFLAGS
- CXX=$save_CXX
- CXXCPP=$save_CXXCPP
- LIBS=$save_LIBS
- AC_LANG_POP([C++])
+ if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "YES"; then
+ if test -z "$with_mingw_cross_compiler"; then
+ dnl Guess...
+ AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
+ elif test -x "$with_mingw_cross_compiler"; then
+ MINGWCXX="$with_mingw_cross_compiler"
+ else
+ AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
+ fi
+
+ if test "$MINGWCXX" = "false"; then
+ AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
+ fi
+
+ mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
+ if test -x "$mingwstrip_test"; then
+ MINGWSTRIP="$mingwstrip_test"
+ else
+ AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
+ fi
+
+ if test "$MINGWSTRIP" = "false"; then
+ AC_MSG_ERROR(MinGW32 binutils not found.)
+ fi
fi
fi
BUILD_TYPE="$BUILD_TYPE ODK"
@@ -3465,12 +4002,10 @@ AC_SUBST(SYSTEM_STDLIBS)
dnl ===================================================================
dnl Check for system zlib
dnl ===================================================================
-if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
- with_system_zlib=yes
-fi
AC_MSG_CHECKING([which zlib to use])
-if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
- test "$with_system_zlib" != "no"; then
+if test -n "$with_system_zlib" -o -n "$with_system_libs" -o \
+ "$_os" != "WINNT" && \
+ test "$with_system_zlib" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_ZLIB=YES
AC_CHECK_HEADER(zlib.h, [],
@@ -3488,14 +4023,15 @@ dnl ===================================================================
dnl Check for system jpeg
dnl ===================================================================
AC_MSG_CHECKING([which jpeg to use])
-if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
- test "$with_system_jpeg" != "no"; then
+if test -n "$with_system_jpeg" -o -n "$with_system_libs" -o \
+ "$_os" = "Linux" && \
+ test "$with_system_jpeg" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_JPEG=YES
AC_CHECK_HEADER(jpeglib.h, [],
[AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
- [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
+ [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
else
AC_MSG_RESULT([internal])
SYSTEM_JPEG=NO
@@ -3508,13 +4044,13 @@ dnl Check for system expat
dnl ===================================================================
AC_MSG_CHECKING([which expat to use])
if test -n "$with_system_expat" -o -n "$with_system_libs" && \
- test "$with_system_expat" != "no"; then
+ test "$with_system_expat" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_EXPAT=YES
AC_CHECK_HEADER(expat.h, [],
[AC_MSG_ERROR(expat.h not found. install expat)], [])
AC_CHECK_LIB(expat, XML_ParserCreate, [],
- [AC_MSG_RESULT(expat library not found or functional.)], [])
+ [AC_MSG_RESULT(expat library not found or functional.)], [])
else
AC_MSG_RESULT([internal])
SYSTEM_EXPAT=NO
@@ -3523,6 +4059,24 @@ fi
AC_SUBST(SYSTEM_EXPAT)
dnl ===================================================================
+dnl Check for system libvisio
+dnl ===================================================================
+AC_MSG_CHECKING([which libvisio to use])
+if test -n "$with_system_libvisio" -a "$with_system_libvisio" = "yes"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_LIBVISIO=YES
+ PKG_CHECK_MODULES( LIBVISIO, libvisio-0.0 )
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_LIBVISIO=NO
+ BUILD_TYPE="$BUILD_TYPE LIBVISIO"
+fi
+AC_SUBST(SYSTEM_LIBVISIO)
+AC_SUBST(LIBVISIO_CFLAGS)
+AC_SUBST(LIBVISIO_LIBS)
+
+
+dnl ===================================================================
dnl Check for system libwpd
dnl ===================================================================
AC_MSG_CHECKING([which libwpd to use])
@@ -3530,7 +4084,7 @@ if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
test "$with_system_libwpd" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_LIBWPD=YES
- PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
+ PKG_CHECK_MODULES( LIBWPD, libwpd-0.9 libwpd-stream-0.9 )
else
AC_MSG_RESULT([internal])
SYSTEM_LIBWPD=NO
@@ -3564,12 +4118,48 @@ dnl Check whether freetype is available
dnl ===================================================================
if test "$test_freetype" = "yes"; then
AC_MSG_CHECKING([whether freetype is available])
- PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
+ PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
fi
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)
dnl ===================================================================
+dnl Check for system libwps
+dnl ===================================================================
+AC_MSG_CHECKING([which libwps to use])
+if test -n "$with_system_libwps" -o -n "$with_system_libs" && \
+ test "$with_system_libwps" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_LIBWPS=YES
+ PKG_CHECK_MODULES( LIBWPS, libwps-0.2 )
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_LIBWPS=NO
+ BUILD_TYPE="$BUILD_TYPE LIBWPS"
+fi
+AC_SUBST(SYSTEM_LIBWPS)
+AC_SUBST(LIBWPS_CFLAGS)
+AC_SUBST(LIBWPS_LIBS)
+
+dnl ===================================================================
+dnl Check for system libwpg
+dnl ===================================================================
+AC_MSG_CHECKING([which libwpg to use])
+if test -n "$with_system_libwpg" -o -n "$with_system_libs" && \
+ test "$with_system_libwpg" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_LIBWPG=YES
+ PKG_CHECK_MODULES( LIBWPG, libwpg-0.2 )
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_LIBWPG=NO
+ BUILD_TYPE="$BUILD_TYPE LIBWPG"
+fi
+AC_SUBST(SYSTEM_LIBWPG)
+AC_SUBST(LIBWPG_CFLAGS)
+AC_SUBST(LIBWPG_LIBS)
+
+dnl ===================================================================
dnl Check whether freetype2 supports emboldening
dnl ===================================================================
if test "$test_freetype" = "yes"; then
@@ -3607,43 +4197,68 @@ if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
fi
fi
-dnl ===================================================================
-dnl Check for system libxslt
-dnl ===================================================================
+# ===================================================================
+# Check for system libxslt
+# ===================================================================
AC_MSG_CHECKING([which libxslt to use])
if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
"$_os" = "Darwin" && \
test "$with_system_libxslt" != "no"; then
- AC_MSG_RESULT([external])
- SYSTEM_LIBXSLT=YES
-
- PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
+ AC_MSG_RESULT([external])
+ SYSTEM_LIBXSLT=YES
+ if test "$_os" = "Darwin"; then
+ dnl make sure to use SDK path
+ LIBXSLT_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/libxml2"
+ dnl omit -L/usr/lib
+ LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
+ else
+ PKG_CHECK_MODULES(LIBXSLT, libxslt)
+ fi
- dnl Check for xsltproc
- AC_PATH_PROG(XSLTPROC, xsltproc, no)
- if test "$XSLTPROC" = "no"; then
- AC_MSG_ERROR([xsltproc is required])
- fi
+ dnl Check for xsltproc
+ AC_PATH_PROG(XSLTPROC, xsltproc, no)
+ if test "$XSLTPROC" = "no"; then
+ AC_MSG_ERROR([xsltproc is required])
+ fi
else
- AC_MSG_RESULT([internal])
- SYSTEM_LIBXSLT=NO
- BUILD_TYPE="$BUILD_TYPE LIBXSLT"
+ AC_MSG_RESULT([internal])
+ SYSTEM_LIBXSLT=NO
+ BUILD_TYPE="$BUILD_TYPE LIBXSLT"
+
+ if test "$cross_compiling" = "yes"; then
+ AC_PATH_PROG(XSLTPROC, xsltproc, no)
+ if test "$XSLTPROC" = "no"; then
+ AC_MSG_ERROR([xsltproc is required])
+ fi
+ fi
fi
AC_SUBST(SYSTEM_LIBXSLT)
AC_SUBST(LIBXSLT_CFLAGS)
AC_SUBST(LIBXSLT_LIBS)
+AC_SUBST(XSLTPROC)
-
-dnl ===================================================================
-dnl Check for system libxml
-dnl ===================================================================
+# ===================================================================
+# Check for system libxml
+# ===================================================================
AC_MSG_CHECKING([which libxml to use])
if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
- "$_os" = "Darwin" && \
- test "$with_system_libxml" != "no"; then
+ "$_os" = "Darwin" -o $_os = iOS && \
+ test "$with_system_libxml" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_LIBXML=YES
- PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
+ if test "$_os" = "Darwin"; then
+ dnl make sure to use SDK path
+ LIBXML_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/libxml2"
+ dnl omit -L/usr/lib
+ LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
+ elif test $_os = iOS; then
+ dnl make sure to use SDK path
+ usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
+ LIBXML_CFLAGS="-I$usr/include/libxml2"
+ LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
+ else
+ PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
+ fi
BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
else
AC_MSG_RESULT([internal])
@@ -3655,82 +4270,232 @@ AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_LIBS)
dnl ===================================================================
-dnl Check for system python
+dnl Checks for Python
dnl ===================================================================
-AC_MSG_CHECKING([which python to use])
-if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
- with_system_python=yes
- AC_MSG_RESULT([compiling against MacOSX10.4u.sdk (python version 2.3)])
- PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
- PYTHON_LIBS="-framework Python"
-elif test -n "$with_system_python" -o -n "$with_system_libs" && \
- test "$with_system_python" != "no"; then
- with_system_python=yes
- AC_MSG_RESULT([external])
- AM_PATH_PYTHON([2.2])
- python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
- python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
- PYTHON_CFLAGS="-I$python_include"
- PYTHON_LIBS="-lpython$python_version"
+AC_MSG_CHECKING([which Python to use])
+
+case "$enable_python" in
+no|disable)
+ enable_python=no
+ AC_MSG_RESULT([none])
+ DISABLE_PYTHON=TRUE
+ ;;
+""|yes|auto)
+ if test $build_os = cygwin; then
+ dnl When building on Windows we don't attempt to use any installed
+ dnl "system" Python.
+ dnl
+ dnl (When cross-compiling to Windows from Linux using the mingw32-cross
+ dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
+ dnl MinGW cross-compilation setups.)
+ AC_MSG_RESULT([internal])
+ enable_python=internal
+ elif test $_os = Darwin; then
+ AC_MSG_RESULT([system, MacOSX10.4u.SDK (Python 2.3)])
+ enable_python=system
+ PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
+ PYTHON_LIBS="-framework Python"
+ else
+ AC_MSG_RESULT([checking below])
+ enable_python=auto
+ fi
+ ;;
+internal)
+ AC_MSG_RESULT([internal])
+ ;;
+system)
+ AC_MSG_RESULT([system])
+ ;;
+*)
+ AC_MSG_ERROR([Incorrect --enable-python option])
+ ;;
+esac
+
+AC_SUBST(DISABLE_PYTHON)
+
+if test $_os = WINNT -a "$WITH_MINGW" != yes -a $enable_python = system; then
+ AC_MSG_ERROR([Must use internal Python when building with MSVC])
fi
-if test "$with_system_python" = "yes" ; then
+
+if test $enable_python != no; then
+ BUILD_TYPE="$BUILD_TYPE PYUNO"
+fi
+
+if test "$cross_compiling" != yes; then
+ if test $enable_python = system; then
+ dnl This causes an error if no Python found
+ AM_PATH_PYTHON([2.2])
+ elif test $enable_python = auto; then
+ dnl This allows lack of system Python
+ AM_PATH_PYTHON([2.2],, [:])
+
+ if test "$PYTHON" = :; then
+ enable_python=internal
+ else
+ enable_python=system
+ fi
+ fi
+fi
+
+if test $enable_python = system; then
+ if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
+ dnl Fallback: Accept these in the environment.
+ :
+ elif test "$cross_compiling" != yes; then
+ python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
+ python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
+ python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
+ python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
+ PYTHON_CFLAGS="-I$python_include"
+ PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+ elif test "$cross_compiling" = yes; then
+ dnl How to find out the cross-compilation Python installation path?
+ dnl Let's hardocode what we know for different distributions for now...
+
+ for python_sysroot in /usr/i686-w64-mingw32/sys-root/mingw ; do
+ for python_version in 2.6 ; do
+ if test -f ${python_sysroot}/include/python${python_version}/Python.h; then
+ PYTHON_CFLAGS="-I ${python_sysroot}/include/python$python_version"
+ PYTHON_LIBS="-L ${python_sysroot}lib -lpython$python_version $python_libs"
+ break
+ fi
+ done
+ test -n "$PYTHON_CFLAGS" && break
+ done
+ fi
+fi
+
+dnl By now enable_python should be "system", "internal" or "no"
+case $enable_python in
+system)
SYSTEM_PYTHON=YES
- dnl check if the headers really work:
+
+ dnl Check if the headers really work
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
AC_CHECK_HEADER(Python.h, [],
- [AC_MSG_ERROR(Python headers not found)], [])
+ [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
+ [])
CPPFLAGS="$save_CPPFLAGS"
-else
+
+ dnl FIXME Check if the Python library can be linked with, too?
+ ;;
+
+internal)
SYSTEM_PYTHON=NO
BUILD_TYPE="$BUILD_TYPE PYTHON"
- AC_MSG_RESULT([internal])
- # Embedded python dies without Home set
+ # Embedded Python dies without Home set
if test "z$HOME" = "z"; then
export HOME="";
fi
# bz2 tarball and bzip2 is not standard
if test -z "$BZIP2"; then
- AC_PATH_PROG( BZIP2, bzip2)
- if test -z "$BZIP2"; then
- AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
- fi
+ AC_PATH_PROG( BZIP2, bzip2)
+ if test -z "$BZIP2"; then
+ AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
+ fi
fi
-fi
+ ;;
+no)
+ SYSTEM_PYTHON=NO
+ ;;
+*)
+ AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
+ ;;
+esac
+
AC_SUBST(SYSTEM_PYTHON)
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)
-HOME=`echo $HOME | sed 's:\\\\:/:g'`
-AC_SUBST(HOME)
dnl ===================================================================
-dnl Check for system berkley db
+dnl Check for system translate-toolkit
+dnl ===================================================================
+AC_MSG_CHECKING([which translate-toolkit to use])
+if test "$with_system_translate_toolkit" = "yes" ; then
+ AC_MSG_RESULT([system])
+ SYSTEM_TRANSLATE_TOOLKIT=YES
+
+ AC_PATH_PROGS(OO2PO, oo2po)
+ if test -z "$OO2PO"; then
+ AC_MSG_ERROR([install translate-toolkit or use --without-system-translate-toolkit])
+ fi
+
+ AC_PATH_PROGS(PO2OO, po2oo)
+ if test -z "$PO2OO"; then
+ AC_MSG_ERROR([install translate-toolkit or use --without-system-translate-toolkit])
+ fi
+
+ $PO2OO --help | grep -q '\-\-skipsource'
+ if test $? -ne 0 ; then
+ AC_MSG_ERROR([$PO2OO does not support --skipsource; use translate-toolkit >= 1.9 or use --without-system-translate-toolkit])
+ fi
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_TRANSLATE_TOOLKIT=NO
+ BUILD_TYPE="$BUILD_TYPE TRANSLATE_TOOLKIT"
+fi
+AC_SUBST(SYSTEM_TRANSLATE_TOOLKIT)
+
+dnl ===================================================================
+dnl Check for system Berkeley db
dnl ===================================================================
AC_MSG_CHECKING([which db to use])
if test -n "$with_system_db" -o -n "$with_system_libs" && \
- test "$with_system_db" != "no"; then
+ test "$with_system_db" != "no"; then
SYSTEM_DB=YES
AC_MSG_RESULT([external])
- AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
- [
- CFLAGS=-I/usr/include/db4
- AC_CHECK_HEADER(db4/db.h,
- [ DB_INCLUDES=/usr/include/db4 ],
- [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
- ], []
- )
+
+ db_header=
+ for dbver in 5.1 5.0 5 4.8 4.7 4; do
+ for dash in - ''; do
+ AC_CHECK_HEADER([db$dash$dbver/db.h],
+ [ db_header="db$dash$dbver/db.h"; break ])
+ done
+ done
+
+ if test -z "$db_header"; then
+ AC_CHECK_HEADER([db/db.h], [db_header='db/db.h'])
+ fi
+
+ if test -z "$db_header"; then
+ AC_CHECK_HEADER(db.h, [ db_header='db.h' ])
+ fi
+
+ if test -z "$db_header"; then
+ AC_MSG_ERROR([db.h not found. Use the correct -I flag, or install the Berkeley db development package.])
+ fi
+
AC_MSG_CHECKING([whether db is at least 4.1])
- AC_TRY_RUN([
-#include <db.h>
+ AC_TRY_COMPILE([#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])])
+
+ SYSTEM_DB_CFLAGS="-DSYSTEM_DB_HEADER='<$db_header>'"
+
+ DB_LIB=
+ for dbver in 5.1 5.0 5 4.8 4.7 4 ''; do
+ for dash in - ''; do
+ AC_CHECK_LIB(db$dash$dbver, dbopen,
+ [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
+ AC_CHECK_LIB(db$dash$dbver, __db185_open,
+ [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
+ done
+ test -n "$DB_LIB" && break
+ done
+
+ if test -z "$DB_LIB"; then
+ AC_CHECK_LIB(db, dbopen,
+ [ DB_LIB="db"; DB_CPPLIB="db_cxx" ])
+ fi
+
+ if test -z "$DB_LIB" ; then
+ AC_MSG_ERROR([db library not found. Use the correct -L flag,
+or install the Berkeley db development package.])
+ fi
-int main(int argc, char **argv) {
- if(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) return 0;
- else return 1;
-}
- ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
- AC_HAVE_LIBRARY(db, [],
- [AC_MSG_ERROR([db not installed or functional])], [])
SCPDEFS="$SCPDEFS -DSYSTEM_DB"
else
AC_MSG_RESULT([internal])
@@ -3738,9 +4503,9 @@ else
BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
fi
AC_SUBST(SYSTEM_DB)
-AC_SUBST(DB_VERSION)
-AC_SUBST(DB_INCLUDES)
-AC_SUBST(DB_JAR)
+AC_SUBST(SYSTEM_DB_CFLAGS)
+AC_SUBST(DB_LIB)
+AC_SUBST(DB_CPPLIB)
dnl ===================================================================
dnl Check for system lucene
@@ -3751,12 +4516,12 @@ if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
AC_MSG_RESULT([external])
SYSTEM_LUCENE=YES
if test -z $LUCENE_CORE_JAR; then
- AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
+ AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
[ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
[
- AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
+ AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
[ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
- [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
+ [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
[ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
[ AC_MSG_ERROR(lucene-core.jar replacement not found)]
)
@@ -3770,10 +4535,10 @@ if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
fi
if test -z $LUCENE_ANALYZERS_JAR; then
- AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
+ AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
[ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
[
- AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
+ AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
[ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
[ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
)
@@ -3809,7 +4574,7 @@ AC_SUBST(LUCENE_CORE_JAR)
AC_SUBST(LUCENE_ANALYZERS_JAR)
AC_MSG_CHECKING([whether to build the MySQL Connector extension])
-if test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then
+if test -n "$enable_ext_mysql_connector" -a "$enable_ext_mysql_connector" != "no"; then
AC_MSG_RESULT([yes])
ENABLE_MYSQLC=YES
AC_MSG_CHECKING([for mysqlc module])
@@ -3826,28 +4591,31 @@ fi
AC_SUBST(ENABLE_MYSQLC)
if test "$ENABLE_MYSQLC" = "YES"; then
+
+SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MYSQLC"
+
dnl ===================================================================
dnl Check for system MySQL
dnl ===================================================================
AC_MSG_CHECKING([for mysql pre-requisites])
if test -n "$with_system_mysql" -o -n "$with_system_libs" && \
test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then
- AC_MSG_RESULT([external MySQL])
- SYSTEM_MYSQL=YES
- AC_PATH_PROG( MYSQLCONFIG, mysql_config)
- AC_MSG_CHECKING([MySQL version])
- MYSQL_VERSION=`$MYSQLCONFIG --version`
- MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
- if test "$MYSQL_MAJOR" -ge "5"; then
- AC_MSG_RESULT([OK])
- else
- AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
- fi
- AC_MSG_CHECKING([for MySQL Client library])
- MYSQL_INC=`$MYSQLCONFIG --include`
- MYSQL_LIB=`$MYSQLCONFIG --libs`
- MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,`
- AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
+ AC_MSG_RESULT([external MySQL])
+ SYSTEM_MYSQL=YES
+ AC_PATH_PROG( MYSQLCONFIG, mysql_config)
+ AC_MSG_CHECKING([MySQL version])
+ MYSQL_VERSION=`$MYSQLCONFIG --version`
+ MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
+ if test "$MYSQL_MAJOR" -ge "5"; then
+ AC_MSG_RESULT([OK])
+ else
+ AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
+ fi
+ AC_MSG_CHECKING([for MySQL Client library])
+ MYSQL_INC=`$MYSQLCONFIG --include`
+ MYSQL_LIB=`$MYSQLCONFIG --libs`
+ MYSQL_DEFINES=`$MYSQLCONFIG --cflags | $SED -e s,$MYSQL_INC,,`
+ AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
else
SYSTEM_MYSQL=NO
if test -n "$with_libmysql_path"; then
@@ -3883,24 +4651,24 @@ dnl ===================================================================
# who thought this too-generic cppconn dir was a good idea?
AC_MSG_CHECKING([MySQL Connector/C++])
if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \
- test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then
- AC_MSG_RESULT([external])
- SYSTEM_MYSQL_CPPCONN=YES
+ test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_MYSQL_CPPCONN=YES
AC_LANG_PUSH([C++])
- AC_CHECK_HEADER(mysql_driver.h, [],
- [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
- AC_CHECK_LIB(mysqlcppconn, main, [],
- [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
+ AC_CHECK_HEADER(mysql_driver.h, [],
+ [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
+ AC_CHECK_LIB(mysqlcppconn, main, [],
+ [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
AC_MSG_CHECKING([version])
AC_TRY_RUN([
#include <mysql_driver.h>
int main(int argc, char **argv) {
- sql::Driver *driver;
- driver = get_driver_instance();
- if (driver->getMajorVersion() > 1 || \
- (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
- (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
+ sql::Driver *driver;
+ driver = get_driver_instance();
+ if (driver->getMajorVersion() > 1 || \
+ (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
+ (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
return 0;
else
return 1;
@@ -3909,15 +4677,15 @@ int main(int argc, char **argv) {
AC_LANG_POP([C++])
else
- AC_MSG_RESULT([internal])
+ AC_MSG_RESULT([internal])
AC_MSG_CHECKING([for mysqlcppconn module])
if test -d mysqlcppconn; then
AC_MSG_RESULT([OK])
else
AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
fi
- BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
- SYSTEM_MYSQL_CPPCONN=NO
+ BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
+ SYSTEM_MYSQL_CPPCONN=NO
fi
AC_LANG_POP([C++])
AC_SUBST(SYSTEM_MYSQL_CPPCONN)
@@ -4002,10 +4770,10 @@ if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
AC_MSG_RESULT([external])
SYSTEM_SAXON=YES
if test -z $SAXON_JAR; then
- AC_CHECK_FILE(/usr/share/java/saxon9.jar,
+ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
[ SAXON_JAR=/usr/share/java/saxon9.jar ],
[
- AC_CHECK_FILE(/usr/share/java/saxon.jar,
+ AC_CHECK_FILE(/usr/share/java/saxon.jar,
[ SAXON_JAR=/usr/share/java/saxon.jar ],
[ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
[ SAXON_JAR=/usr/share/java/saxon9.jar ],
@@ -4026,9 +4794,9 @@ if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
fi
dnl Saxon comes in two practically available versions, the out-of-date saxonb which
-dnl supports the java extensions that OOo uses, and the up-to-date saxon he
-dnl "home edition" version, which is crippled to not support those java extensions.
-dnl And as an aside the he one also needs to be tweaked to include
+dnl supports the Java extensions that LibreOffice uses, and the up-to-date saxon he
+dnl "home edition" version, which is crippled to not support those Java extensions.
+dnl And as an aside the he one also needs to be tweaked to include
dnl a META-INF/services to broadcast that it supports the jaxp transform factory
AC_MSG_CHECKING([if saxon works])
@@ -4046,9 +4814,9 @@ class saxontest {
"net.sf.saxon.TransformerFactoryImpl");
try {
TransformerFactory tfactory = TransformerFactory.newInstance();
- // some external saxons (Debian, Ubuntu, ...) have this disabled
- // per default
- tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
+ // some external saxons (Debian, Ubuntu, ...) have this disabled
+ // per default
+ tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
System.out.println("TransformerFactory is" +
tfactory.getClass().getName());
Transformer transformer = tfactory.newTransformer(
@@ -4103,31 +4871,47 @@ fi
dnl ===================================================================
dnl Check for system curl
dnl ===================================================================
-if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
+if test "$_os" = "Darwin" -a "$with_system_curl" != "no"; then
with_system_curl=yes
fi
-AC_MSG_CHECKING([which curl to use])
+AC_MSG_CHECKING([which libcurl to use])
if test -n "$with_system_curl" -o -n "$with_system_libs" && \
- test "$with_system_curl" != "no"; then
+ test "$with_system_curl" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_CURL=YES
- AC_PATH_PROG( CURLCONFIG, curl-config)
- if test -z "$CURLCONFIG"; then
- AC_MSG_ERROR([install curl to run this script])
+ curl_version=""
+ if test "$cross_compiling" = "yes"; then
+ dnl At least the OBS mingw32-libcurl-devel package
+ dnl comes with a proper .pc file
+ PKG_CHECK_MODULES(CURL, libcurl,, [:])
+ if test -n "CURL_PKG_ERRORS"; then
+ AC_MSG_RESULT([no])
+ else
+ curl_version=`$PKG_CONFIG --modversion libcurl`
+ fi
fi
-
- # check curl version
- AC_MSG_CHECKING([whether curl is >= 7.13.1])
- if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
- "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \
- "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then
- AC_MSG_ERROR([no, you need at least curl 7.13,1])
- else
- AC_MSG_RESULT([yes])
+ if test -z "$curl_version"; then
+ AC_PATH_PROG(CURLCONFIG, curl-config)
+ if test -z "$CURLCONFIG"; then
+ AC_MSG_ERROR([install the libcurl development package])
+ fi
+ CURL_LIBS=`$CURLCONFIG --libs`
+ CURL_CFLAGS=`$CURLCONFIG --cflags`
+ curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
fi
- CURL_LIBS=`$CURLCONFIG --libs`
- CURL_CFLAGS=`$CURLCONFIG --cflags`
+
+ AC_MSG_CHECKING([whether libcurl is >= 7.13.1])
+ case $curl_version in
+ dnl brackets doubled below because Autoconf uses them as m4 quote characters,
+ dnl so they need to be doubled to end up in the configure script
+ 7.13.1|7.1[[4-9]].*|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
+ AC_MSG_RESULT([yes, you have $curl_version])
+ ;;
+ *)
+ AC_MSG_ERROR([no, you have $curl_version])
+ ;;
+ esac
else
AC_MSG_RESULT([internal])
SYSTEM_CURL=NO
@@ -4138,30 +4922,11 @@ AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
dnl ===================================================================
-dnl Check for system mdds
-dnl ===================================================================
-AC_MSG_CHECKING([which mdds to use])
-if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
- test "$with_system_mdds" != "no"; then
- AC_MSG_RESULT([external])
- SYSTEM_MDDS=YES
- AC_LANG_PUSH([C++])
- AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
- [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
- AC_LANG_POP([C++])
-else
- AC_MSG_RESULT([internal])
- BUILD_TYPE="$BUILD_TYPE MDDS"
- SYSTEM_MDDS=NO
-fi
-AC_SUBST(SYSTEM_MDDS)
-
-dnl ===================================================================
dnl Check for system boost
dnl ===================================================================
AC_MSG_CHECKING([which boost to use])
if test -n "$with_system_boost" -o -n "$with_system_headers" && \
- test "$with_system_boost" != "no"; then
+ test "$with_system_boost" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_BOOST=YES
AC_LANG_PUSH([C++])
@@ -4171,18 +4936,20 @@ if test -n "$with_system_boost" -o -n "$with_system_headers" && \
[AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
AC_CHECK_HEADER(boost/function.hpp, [],
[AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
+ AC_CHECK_HEADER([boost/unordered_map.hpp], [HAVE_BOOST_UNORDERED_MAP=TRUE],
+ [AC_MSG_WARN([boost/unordered_map.hpp not found])], [])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -fno-exceptions"
AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
AC_TRY_COMPILE([#include <boost/function.hpp>
], [],
- ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes)
+ ac_cv_cxx_boost_no_exceptions_broken=no, ac_cv_cxx_boost_no_exceptions_broken=yes)
- if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then
- AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
+ if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
+ AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
else
- AC_MSG_RESULT([yes])
+ AC_MSG_RESULT([yes])
fi
CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP([C++])
@@ -4190,15 +4957,82 @@ else
AC_MSG_RESULT([internal])
BUILD_TYPE="$BUILD_TYPE BOOST"
SYSTEM_BOOST=NO
+ HAVE_BOOST_UNORDERED_MAP=TRUE
fi
+AC_SUBST([HAVE_BOOST_UNORDERED_MAP])
AC_SUBST(SYSTEM_BOOST)
dnl ===================================================================
+dnl Check for system mdds
+dnl ===================================================================
+AC_MSG_CHECKING([which mdds to use])
+if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
+ test "$with_system_mdds" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_MDDS=YES
+
+ dnl ===================================================================
+ dnl Determine which hash container mdds shall use
+ dnl ===================================================================
+ AC_MSG_CHECKING([which hash container mdds shall use])
+ if test "x$HAVE_CXX0X" = "xTRUE"; then
+ MDDS_CPPFLAGS="-std=c++0x"
+ AC_MSG_RESULT([std::unordered_map])
+ else
+ MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
+ AC_MSG_RESULT([boost::unordered_map])
+ fi
+
+ AC_LANG_PUSH([C++])
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $MDDS_CPPFLAGS"
+ AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
+ [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
+ AC_CHECK_HEADER(mdds/mixed_type_matrix.hpp, [],
+ [AC_MSG_ERROR(mdds/mixed_type_matrix.hpp not found. install mdds >= 0.4.0)], [])
+ CPPFLAGS="$save_CPPFLAGS"
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $MDDS_CPPFLAGS"
+ AC_MSG_CHECKING([for correct signature of ::mdds::flat_segment_tree])
+ AC_TRY_RUN([#include <mdds/flat_segment_tree.hpp>
+
+ int main(int argc, char **argv) {
+ ::mdds::flat_segment_tree<long, short> db(0, 100, 0);
+ short val;
+ if (!db.search(5, val).second)
+ return 1;
+ return 0;
+ }
+], ac_cv_cxx_mdds_flat_segment_tree_correct=yes, ac_cv_cxx_mdds_flat_segment_tree_correct=no)
+
+ if test "$ac_cv_cxx_mdds_flat_segment_tree_correct" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([no, install mdds >= 0.5.0])
+ fi
+ CXXFLAGS=$save_CXXFLAGS
+ AC_LANG_POP([C++])
+else
+ AC_MSG_RESULT([internal])
+ BUILD_TYPE="$BUILD_TYPE MDDS"
+ SYSTEM_MDDS=NO
+
+ dnl ===================================================================
+ dnl Determine which hash container mdds shall use
+ dnl ===================================================================
+ AC_MSG_CHECKING([which hash container mdds shall use])
+ MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
+ AC_MSG_RESULT([boost::unordered_map])
+fi
+AC_SUBST(SYSTEM_MDDS)
+AC_SUBST([MDDS_CPPFLAGS])
+
+dnl ===================================================================
dnl Check for system vigra
dnl ===================================================================
AC_MSG_CHECKING([which vigra to use])
if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
- test "$with_system_vigra" != "no"; then
+ test "$with_system_vigra" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_VIGRA=YES
AC_LANG_PUSH([C++])
@@ -4216,8 +5050,8 @@ dnl ===================================================================
dnl Check for system odbc
dnl ===================================================================
AC_MSG_CHECKING([which odbc headers to use])
-if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
- test "$with_system_odbc_headers" != "no"; then
+if test -n "$with_system_odbc" -o -n "$with_system_headers" && \
+ test "$with_system_odbc" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_ODBC_HEADERS=YES
@@ -4277,30 +5111,32 @@ if test "$WITH_LDAP" = "YES"; then
dnl ===================================================================
AC_MSG_CHECKING([which LDAP SDK to use])
if test -n "$with_openldap" && test "$with_openldap" != "no"; then
- AC_MSG_RESULT([OpenLDAP])
- WITH_OPENLDAP=YES
- AC_CHECK_HEADERS(ldap.h, [],
- [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
- AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
- [AC_MSG_ERROR(openldap lib not found or functional)], [])
- # rumours say that OpenLDAP doesn't have that function. I looked and
- # it has it. Test for it to be sure
+ AC_MSG_RESULT([OpenLDAP])
+ WITH_OPENLDAP=YES
+ AC_CHECK_HEADERS(ldap.h, [],
+ [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
+ AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
+ [AC_MSG_ERROR(openldap lib not found or functional)], [])
+ # rumours say that OpenLDAP doesn't have that function. I looked and
+ # it has it. Test for it to be sure
AC_CHECK_LIB(ldap, ldap_set_option, [],
[AC_MSG_ERROR(openldap lib not found or functional)], [])
else
- AC_MSG_RESULT([Netscape/Mozilla])
- # TODO. Actually do a sanity check and check for
- # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
- WITH_OPENLDAP=NO
+ AC_MSG_RESULT([Netscape/Mozilla])
+ # TODO. Actually do a sanity check and check for
+ # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
+ WITH_OPENLDAP=NO
fi
fi
AC_SUBST(WITH_LDAP)
AC_SUBST(WITH_OPENLDAP)
+AC_OUTPUT([ooo.lst])
+
dnl ===================================================================
dnl Check for system mozilla
dnl ===================================================================
-AC_MSG_CHECKING([which mozilla to use])
+AC_MSG_CHECKING([which Mozilla to use])
if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_MOZILLA=YES
@@ -4362,7 +5198,7 @@ if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
- AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
+ AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
[AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
@@ -4401,7 +5237,7 @@ else
if test -z "$with_mozilla_version"; then
MOZILLA_VERSION=
else
- AC_MSG_CHECKING([which mozilla version to build])
+ AC_MSG_CHECKING([which Mozilla version to build])
MOZILLA_VERSION=$with_mozilla_version
enable_build_mozilla=1
AC_MSG_RESULT([$MOZILLA_VERSION])
@@ -4409,11 +5245,11 @@ fi
AC_SUBST(MOZILLA_VERSION)
-AC_MSG_CHECKING([for toolkit mozilla should use])
+AC_MSG_CHECKING([for toolkit Mozilla should use])
if test -z "$with_mozilla_toolkit"; then
if test "$_os" != "WINNT" ; then
if test "$_os" = "Darwin" ; then
- MOZILLA_TOOLKIT=mac
+ MOZILLA_TOOLKIT=mac
AC_MSG_RESULT([mac])
else
MOZILLA_TOOLKIT=gtk2
@@ -4445,7 +5281,7 @@ if test -n "$enable_build_mozilla"; then
BUILD_MOZAB="TRUE"
AC_MSG_RESULT([yes])
else
- BUILD_MOZAB=""
+ BUILD_MOZAB=""
AC_MSG_RESULT([no])
fi
@@ -4454,14 +5290,14 @@ if test "$enable_nss_module" != "no"; then
ENABLE_NSS_MODULE="YES"
BUILD_TYPE="$BUILD_TYPE NSS"
AC_MSG_RESULT([yes])
- if test "$_os" = "WINNT"; then
+ if test "$build_os" = "cygwin"; then
AC_MSG_CHECKING([for Mozilla build tooling])
if test -z "$MOZILLABUILD" ; then
AC_MSG_ERROR([Mozilla build tooling not found.
-Use the --with-mozilla-build option after installling the tools obtained
+Use the --with-mozilla-build option after installing the tools obtained
from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
else
- if test \( "$WITH_MINGWIN" = "yes" \) ; then
+ if test \( "$WITH_MINGW" = "yes" \) ; then
if test ! -d "$MOZILLABUILD" ; then
AC_MSG_ERROR([Mozilla build tooling incomplete!])
else
@@ -4482,16 +5318,17 @@ else
AC_MSG_RESULT([no])
fi
+
if test "$BUILD_MOZAB" = "TRUE"; then
if test "$_os" = "WINNT"; then
- if test "$WITH_MINGWIN" != "yes"; then
+ if test "$WITH_MINGW" != "yes"; then
# compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
if test "$MSVSVER" != "2005"; then
- AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
+ AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio 2005 only.])
fi
else
- AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
- echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
+ AC_MSG_WARN([Building SeaMonkey with MinGW is not tested, and likely to break.])
+ echo "Building SeaMonkey with MinGW is not tested, and likely to break." >> warn
fi
fi
@@ -4500,7 +5337,7 @@ if test "$BUILD_MOZAB" = "TRUE"; then
fi
MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst`
- AC_MSG_CHECKING([for mozilla sources])
+ AC_MSG_CHECKING([for Mozilla sources])
if test -z "$MOZILLA_FETCH_FILE"; then
AC_MSG_RESULT([not found])
HAVE_MOZILLA_TARBALL=n
@@ -4521,7 +5358,7 @@ if test "$BUILD_MOZAB" = "TRUE"; then
fi
if test "$HAVE_MOZILLA_TARBALL" != "y"; then
AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
-Use "./fetch_tarballs.sh ooo.lst" to download.])
+Use "./download" to download.])
fi
if test "$_os" = "WINNT"; then
AC_MSG_CHECKING([for moztools binaries])
@@ -4533,12 +5370,12 @@ Use "./fetch_tarballs.sh ooo.lst" to download.])
fi
elif test "$_os" = "Darwin"; then
if test "$MOZILLA_TOOLKIT" = "gtk2"; then
- AC_MSG_NOTICE([checking whether mozilla can be built...])
- PKG_CHECK_MODULES(MOZGTK2, gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8, AC_MSG_NOTICE([OK - can build mozilla]), AC_MSG_ERROR([Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages]))
+ AC_MSG_NOTICE([checking whether Mozilla can be built...])
+ PKG_CHECK_MODULES(MOZGTK2, gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8, AC_MSG_NOTICE([OK - can build Mozilla]), AC_MSG_ERROR([Prerequisites to build Mozilla not met. Either use the precompiled Mozilla binaries or install the missing packages]))
else
PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
if test -z "$MOZIDL"; then
- AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit.])
+ AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build Mozilla with Mac toolkit.])
fi
fi
else
@@ -4546,20 +5383,20 @@ Use "./fetch_tarballs.sh ooo.lst" to download.])
if test "$MOZILLA_TOOLKIT" = "gtk2"; then
PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
if test -z "$MOZGTK"; then
- AC_MSG_ERROR([GTK2 is needed to build mozilla.])
+ AC_MSG_ERROR([GTK2 is needed to build Mozilla.])
fi
PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
if test -z "$MOZIDL"; then
- AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.])
- fi
+ AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build Mozilla.])
+ fi
else
PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
if test -z "$MOZGTK"; then
- AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.])
+ AC_MSG_ERROR([GTK+ 1.2 is needed when not using GTK2 to build Mozilla.])
fi
PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
if test -z "$MOZIDL"; then
- AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
+ AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build Mozilla.])
fi
fi
fi
@@ -4584,7 +5421,7 @@ dnl Check for system sane
dnl ===================================================================
AC_MSG_CHECKING([which sane header to use])
if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \
- test "$with_system_sane_header" != "no"; then
+ test "$with_system_sane_header" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_SANE_HEADER=YES
AC_CHECK_HEADER(sane/sane.h, [],
@@ -4601,7 +5438,7 @@ dnl Check for system icu
dnl ===================================================================
AC_MSG_CHECKING([which icu to use])
if test -n "$with_system_icu" -o -n "$with_system_libs" && \
- test "$with_system_icu" != "no"; then
+ test "$with_system_icu" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_ICU=YES
AC_LANG_PUSH([C++])
@@ -4612,11 +5449,11 @@ if test -n "$with_system_icu" -o -n "$with_system_libs" && \
if test -z "$SYSTEM_GENBRK"; then
AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
fi
- AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
if test -z "$SYSTEM_GENCCODE"; then
AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
fi
- AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
if test -z "$SYSTEM_GENCMN"; then
AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
fi
@@ -4660,7 +5497,7 @@ if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -
test "$with_system_graphite" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_GRAPHITE=YES
- PKG_CHECK_MODULES( GRAPHITE, silgraphite )
+ PKG_CHECK_MODULES( GRAPHITE, graphite2 >= 0.9.3 )
else
AC_MSG_RESULT([internal])
SYSTEM_GRAPHITE=NO
@@ -4704,14 +5541,9 @@ dnl ***************************************
dnl testing for X libraries and includes...
dnl ***************************************
if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
- echo "Do Nothing for _os = Darwin"
dnl Mac OS X using Aqua graphics. Don't check for X11.
:
-elif test "$_os" = "OS2" ; then
- echo "Do Nothing for _os = OS2. Don't check for X11."
- dnl OS/2 uses native graphics. Don't check for X11.
- :
-elif test "$_os" != "WINNT" ; then
+elif test "$_os" != "WINNT" -a "$_os" != "Android" -a "$_os" != "iOS"; then
AC_PATH_X
AC_PATH_XTRA
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
@@ -4729,8 +5561,8 @@ elif test "$_os" != "WINNT" ; then
if test -z "$x_includes"; then
AC_MSG_ERROR([No X includes found]) # Exit
fi
- CFLAGS=$X_CFLAGS
- LDFLAGS="$X_LDFLAGS $X_LIBS"
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
dnl Check if the XauDisposeAuth symbol is provided by libXau.
AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
@@ -4761,44 +5593,14 @@ fi
AC_SUBST(XLIB)
AC_SUBST(XAU_LIBS)
-if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then
+if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then
dnl ===================================================================
- dnl Check for using Xaw
+ dnl Check for Composite.h for Mozilla plugin
dnl ===================================================================
- AC_MSG_CHECKING([whether to use Xaw])
- if test "$enable_Xaw" = "no"; then
- DISABLE_XAW=TRUE
- AC_MSG_RESULT([no])
- AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt include headers not found])],
- [#include <X11/Intrinsic.h>])
- else
- AC_MSG_RESULT([yes])
- AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])],
- [#include <X11/Intrinsic.h>])
- AC_CHECK_LIB(Xaw, main, [],
- [AC_MSG_ERROR(Xaw library not found or functional)], [])
- fi
+ AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
+ [#include <X11/Intrinsic.h>])
fi
-AC_SUBST(DISABLE_XAW)
-
-
-
-dnl ===================================================================
-dnl Check if fontconfig/fontconfig.h is available
-dnl ===================================================================
-if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
- AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
- [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
- AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
- AC_TRY_RUN([
-#include <fontconfig/fontconfig.h>
-int main(int argc, char **argv) {
- if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
- else return 1;
-}
-], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
-fi
dnl ===================================================================
dnl Check for system Xrender
@@ -4814,7 +5616,7 @@ else
fi
AC_MSG_CHECKING([which Xrender headers to use])
if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
- test "$with_system_xrender_headers" != "no"; then
+ test "$with_system_xrender_headers" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_XRENDER_HEADERS=YES
AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
@@ -4837,10 +5639,11 @@ dnl ===================================================================
AC_MSG_CHECKING([whether to enable RandR support])
if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
- XRANDR_DLOPEN="TRUE"
- AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
+ XRANDR_DLOPEN="TRUE"
+ AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
else
- XRANDR_DLOPEN="FALSE"
+ AC_MSG_RESULT([yes])
+ XRANDR_DLOPEN="FALSE"
PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
if test "$ENABLE_RANDR" != "TRUE"; then
AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
@@ -4850,7 +5653,6 @@ if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" =
[ AC_MSG_ERROR(libXrandr not found or functional) ], [])
XRANDR_LIBS="-lXrandr "
ENABLE_RANDR="TRUE"
- AC_MSG_RESULT([enabling RandR support])
fi
fi
else
@@ -4877,7 +5679,7 @@ dnl Check for system neon
dnl ===================================================================
AC_MSG_CHECKING([which neon to use])
if test -n "$with_system_neon" -o -n "$with_system_libs" && \
- test "$with_system_neon" != "no"; then
+ test "$with_system_neon" != "no"; then
AC_MSG_RESULT([external])
PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
@@ -4899,7 +5701,8 @@ fi
dnl ===================================================================
dnl Check for system openssl
dnl ===================================================================
-if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
+if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
+ "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
with_system_openssl=yes
fi
AC_MSG_CHECKING([which libssl to use])
@@ -4908,11 +5711,12 @@ if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
AC_MSG_RESULT([external])
# Mac OS builds should get out without extra stuff is the Mac porters'
# wish. And pkg-config is although Xcode ships a .pc for openssl
- if test "$_os" = "Darwin"; then
+ if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
+ "$_os" = "DragonFly"; then
OPENSSL_CFLAGS=
OPENSSL_LIBS="-lssl -lcrypto"
else
- PKG_CHECK_MODULES( OPENSSL, openssl )
+ PKG_CHECK_MODULES( OPENSSL, openssl )
fi
SYSTEM_OPENSSL=YES
else
@@ -4925,70 +5729,19 @@ AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LIBS)
dnl ===================================================================
-dnl Test for disabling agg
-dnl ===================================================================
-AC_MSG_CHECKING([whether to enable agg])
-if test "$with_agg" = "no"; then
- AC_MSG_RESULT([no])
-else
- AC_MSG_RESULT([yes])
- ENABLE_AGG=YES
- AC_SUBST(ENABLE_AGG)
-
- dnl ===================================================================
- dnl Check for system AGG
- dnl ===================================================================
- AC_MSG_CHECKING([which AGG to use])
- if test -n "$with_system_agg" -o -n "$with_system_libs" && \
- test "$with_system_agg" != "no"; then
- AC_MSG_RESULT([external])
- PKG_CHECK_MODULES(AGG, libagg >= 2.3)
- AC_MSG_CHECKING([agg version])
- # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
- # (/usr/include gets stripped from pkg-config output)
- if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
- AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
- else
- AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
- fi
- if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
- $PKG_CONFIG --modversion libagg | grep -q 2.4; then
- # 2.4's libagg.pc.in still contains 2.3 :/
- if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
- AC_MSG_RESULT([2.4])
- AGG_VERSION=2400
- else
- AC_MSG_RESULT([2.3])
- AGG_VERSION=2300
- fi
- SYSTEM_AGG=YES
- else
- AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
- fi
- else
- AC_MSG_RESULT([internal])
- SYSTEM_AGG=NO
- AGG_VERSION=2300
- BUILD_TYPE="$BUILD_TYPE AGG"
- fi
- AC_SUBST(SYSTEM_AGG)
- AC_SUBST(AGG_VERSION)
-fi
-
-dnl ===================================================================
dnl Check for system redland
dnl ===================================================================
AC_MSG_CHECKING([which redland library to use])
if test -n "$with_system_redland" -o -n "$with_system_libs" && \
- test "$with_system_redland" != "no"; then
- AC_MSG_RESULT([external])
- SYSTEM_REDLAND=YES
+ test "$with_system_redland" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_REDLAND=YES
dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
else
- AC_MSG_RESULT([internal])
- BUILD_TYPE="$BUILD_TYPE REDLAND"
- SYSTEM_REDLAND=NO
+ AC_MSG_RESULT([internal])
+ BUILD_TYPE="$BUILD_TYPE REDLAND"
+ SYSTEM_REDLAND=NO
fi
AC_SUBST(SYSTEM_REDLAND)
AC_SUBST(REDLAND_CFLAGS)
@@ -4999,7 +5752,7 @@ dnl Check for system hunspell
dnl ===================================================================
AC_MSG_CHECKING([which libhunspell to use])
if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
- test "$with_system_hunspell" != "no"; then
+ test "$with_system_hunspell" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_HUNSPELL=YES
AC_LANG_PUSH([C++])
@@ -5029,7 +5782,7 @@ dnl Checking for altlinuxhyph
dnl ===================================================================
AC_MSG_CHECKING([which altlinuxhyph to use])
if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
- test "$with_system_altlinuxhyph" != "no"; then
+ test "$with_system_altlinuxhyph" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_HYPH=YES
AC_CHECK_HEADER(hyphen.h, [],
@@ -5059,7 +5812,8 @@ dnl ===================================================================
dnl Checking for mythes
dnl ===================================================================
AC_MSG_CHECKING([which mythes to use])
-if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
+if test -n "$with_system_mythes" -o -n "$with_system_libs" && \
+ test "$with_system_mythes" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_MYTHES=YES
AC_LANG_PUSH([C++])
@@ -5069,13 +5823,13 @@ if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
[ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
AC_CHECK_LIB(mythes-1.2, main, [],
[ MYTHES_FOUND=no], [])
- if test "$MYTHES_FOUND" = "no"; then
+ if test "$MYTHES_FOUND" = "no"; then
AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
[ MYTHES_FOUND=no], [])
- fi
- if test "$MYTHES_FOUND" = "no"; then
- AC_MSG_ERROR([mythes library not found!.])
- fi
+ fi
+ if test "$MYTHES_FOUND" = "no"; then
+ AC_MSG_ERROR([mythes library not found!.])
+ fi
fi
AC_LANG_POP([C++])
else
@@ -5092,7 +5846,7 @@ dnl Checking for lpsolve
dnl ===================================================================
AC_MSG_CHECKING([which lpsolve to use])
if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
- test "$with_system_lpsolve" != "no"; then
+ test "$with_system_lpsolve" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_LPSOLVE=YES
AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
@@ -5128,11 +5882,11 @@ fi
AC_SUBST(SYSTEM_LIBTEXTCAT)
AC_MSG_CHECKING([which libtextcat data directory to use])
-if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then
- if test "$with_system_libtextcat_data" = "yes"; then
+if test -n "$with_external_libtextcat_data" && test "$with_external_libtextcat_data" != "no"; then
+ if test "$with_external_libtextcat_data" = "yes"; then
SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat
else
- SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data
+ SYSTEM_LIBTEXTCAT_DATA=file://$with_external_libtextcat_data
fi
AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA])
else
@@ -5156,11 +5910,11 @@ if test "$_os" = "Linux"; then
fi
fi
-if test "$_os" != "WNT"; then
+if test "$_os" != "WINNT"; then
AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
- SYSTEM_LIBC=YES
+ SYSTEM_LIBC=YES
fi
else
HAVE_GETOPT=NO
@@ -5172,121 +5926,129 @@ AC_SUBST(HAVE_READDIR_R)
AC_SUBST(SYSTEM_LIBC)
dnl =========================================
-dnl Check for the Microsoft Platform SDK.
+dnl Check for the Windows SDK.
dnl =========================================
-dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
-dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
-if test \( "$_os" = "WINNT" \) ; then
- AC_MSG_CHECKING([for PSDK files])
- if test -z "$with_psdk_home"; then
- # This first line will detect a February 2003 Microsoft Platform SDK
- PSDK_HOME=`./oowintool --psdk-home`
- # But there might be also an April 2005 PSDK, unfortunately MS changed
- # the registry entry. (we prefer the old version!?)
- if test -z "$PSDK_HOME"; then
- PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
- fi
+dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
+dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
+if test "$_os" = "WINNT"; then
+ AC_MSG_CHECKING([for Windows SDK])
+ if test "$build_os" = "cygwin"; then
+ if test -z "$with_windows_sdk_home"; then
+ # This first line will detect a February 2003 Microsoft Platform SDK
+ WINDOWS_SDK_HOME=`./oowintool --windows-sdk-home`
+ # But there might be also an April 2005 PSDK, unfortunately MS changed
+ # the registry entry. (we prefer the old version!?)
+ if test -z "$WINDOWS_SDK_HOME"; then
+ WINDOWS_SDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
+ fi
# normalize if found
- if test -n "$PSDK_HOME"; then
- PSDK_HOME=`cygpath -d "$PSDK_HOME"`
- PSDK_HOME=`cygpath -u "$PSDK_HOME"`
- fi
- else
- PSDK_HOME=`cygpath -u "$with_psdk_home"`
- fi
+ if test -n "$WINDOWS_SDK_HOME"; then
+ WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
+ WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
+ fi
+ else
+ WINDOWS_SDK_HOME=`cygpath -u "$with_windows_sdk_home"`
+ fi
+ fi
+ if test -n "$WINDOWS_SDK_HOME"; then
# Remove a possible trailing backslash
- PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
- # Problem with current PSDK (iz 49865)
- if test -f "$PSDK_HOME/Lib/libcp.lib"; then
- AC_MSG_ERROR([
-
+ WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
+ # Problem with current PSDK (iz 49865)
+ # (What "current" does that mean?)
+ if test -f "$WINDOWS_SDK_HOME/Lib/libcp.lib"; then
+ AC_MSG_ERROR([
Some modules do not build correctly with MS Platform SDK - April 2005
-Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
+Edition if the library ($WINDOWS_SDK_HOME/Lib/libcp.lib) is found.
Remove/rename/backup that file and restart configure. Details about this
problem can be found in issue 49856.])
+ fi
+
+ if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
+ -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
+ -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
+ HAVE_PSDK_H="yes"
+ else
+ HAVE_PSDK_H="no"
+ fi
+ if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
+ HAVE_PSDK_LIB="yes"
+ else
+ HAVE_PSDK_LIB="no"
+ fi
+
+ if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
+ AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
+the Windows SDK are installed.])
+ fi
+
+ if test ! -x "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
+ -o ! -x "$WINDOWS_SDK_HOME/bin/msidb.exe" \
+ -o ! -x "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
+ -o ! -x "$WINDOWS_SDK_HOME/bin/msitran.exe" ; then
+ AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
+ fi
fi
-# WIndows SDK has different headers
- if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
- -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
- -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
- HAVE_PSDK_H="yes"
- else
- HAVE_PSDK_H="no"
- fi
- if test -f "$PSDK_HOME/lib/unicows.lib"; then
- HAVE_PSDK_LIB="yes"
- else
- HAVE_PSDK_LIB="no"
- fi
- if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
- AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
-are installed or use --with-psdk-home .])
- fi
- if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
- -o ! -x "$PSDK_HOME/bin/msidb.exe" \
- -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
- -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
- AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
- fi
- AC_MSG_RESULT([SDK files found ...)])
-dnl Check if this is the right SDK.
- if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
- AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
- WINDOWS_VISTA_PSDK=TRUE
- elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
- AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
- WINDOWS_VISTA_PSDK=TRUE
+
+ if test -z "$WINDOWS_SDK_HOME"; then
+ AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
+ elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
+ elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
+ elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
else
- AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
+ AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
fi
fi
-AC_SUBST(PSDK_HOME)
-AC_SUBST(WINDOWS_VISTA_PSDK)
+AC_SUBST(WINDOWS_SDK_HOME)
dnl =========================================
dnl Check for the Microsoft DirectX SDK.
dnl =========================================
-if test \( "$_os" = "WINNT" \) ; then
- AC_MSG_CHECKING([for DirectX SDK files])
- if test -z "$with_directx_home"; then
- dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
- if test -n "$DXSDK_DIR"; then
- DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
- DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
+if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
+ AC_MSG_CHECKING([for DirectX SDK])
+ if test "$build_os" = "cygwin"; then
+ if test -z "$with_directx_home"; then
+ dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
+ if test -n "$DXSDK_DIR"; then
+ DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
+ DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
+ fi
+ # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
+ # the "DirectX SDK not found" error later
+ else
+ DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
fi
- # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
- # the "DirectX SDK files not found" error later
- else
- DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
+ # Remove a possible trailing backslash
+ DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
+ elif test -n "$with_directx_home"; then
+ DIRECTXSDK_HOME="$with_directx_home"
fi
- # Remove a possible trailing backslash
- DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
- if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
+ if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h" ; then
HAVE_DIRECTXSDK_H="yes"
else
HAVE_DIRECTXSDK_H="no"
fi
- # MS changed the location of the libraries with dec 2004 directx sdk
+
+ # MS changed the location of the libraries with Dec 2004 DirectX SDK
if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
else
DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
fi
- if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
+
+ if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib" ; then
HAVE_DIRECTXSDK_LIB="yes"
else
HAVE_DIRECTXSDK_LIB="no"
fi
- if test -n "$ENABLE_DIRECTX"; then
- if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
- fi
+
+ if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
+ AC_MSG_RESULT([found])
else
- DIRECTXSDK_HOME=""
- AC_MSG_RESULT([disabled])
+ AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
fi
fi
AC_SUBST(DIRECTXSDK_HOME)
@@ -5297,38 +6059,49 @@ dnl Check for Nullsoft Scriptable Install System
dnl ============================================
NSIS_PATH=""
if test "$_os" = "WINNT" ; then
- AC_MSG_CHECKING([for NSIS])
- AC_PATH_PROG(NSIS_PATH, nsis.exe)
- if test -n "$NSIS_PATH"; then
- NSIS_PATH=`dirname "$NSIS_PATH"`
- fi
- if test -n "$with_nsis_path"; then
- with_nsis_path=`cygpath -u "$with_nsis_path"`
- fi
- if test -e "$with_nsis_path/nsis.exe"; then
- NSIS_PATH="$with_nsis_path"
- fi
- nsistest=`./oowintool --nsis-dir`;
- if test -x "$nsistest/nsis.exe"; then
- NSIS_PATH="$nsistest"
- fi
- if test -z "$NSIS_PATH"; then
- AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
- echo "NSIS not found, no self contained installer will be build." >> warn
+ if test -z "$with_nsis_path"; then
+ AC_PATH_PROG(NSIS_PATH, makensis)
+ if test -n "$NSIS_PATH"; then
+ NSIS_PATH=`dirname "$NSIS_PATH"`
+ elif test "$build_os" = "cygwin"; then
+ AC_MSG_CHECKING([for NSIS])
+ nsistest=`./oowintool --nsis-dir`;
+ nsistest=`cygpath -d -m "$nsistest"`
+ nsistest=`cygpath -u "$nsistest"`
+ if test -x "$nsistest/nsis.exe"; then
+ NSIS_PATH="$nsistest"
+ AC_MSG_RESULT([found ($NSIS_PATH)])
+ else
+ AC_MSG_RESULT([no, no self-contained installer will be built.])
+ fi
+ fi
else
- NSIS_PATH=`cygpath -d "$NSIS_PATH"`
- NSIS_PATH=`cygpath -u "$NSIS_PATH"`
- AC_MSG_RESULT([found ($NSIS_PATH)])
+ AC_MSG_CHECKING([for NSIS])
+ if test "$build_os" = "cygwin"; then
+ with_nsis_path=`cygpath -u "$with_nsis_path"`
+ fi
+ if test -e "$with_nsis_path/makensis$EXEEXT_FOR_BUILD"; then
+ NSIS_PATH="$with_nsis_path"
+ fi
+ if test -z "$NSIS_PATH"; then
+ AC_MSG_RESULT([no, no self-contained installer will be built.])
+ else
+ if test "$build_os" = "cygwin"; then
+ NSIS_PATH=`cygpath -d "$NSIS_PATH"`
+ NSIS_PATH=`cygpath -u "$NSIS_PATH"`
+ fi
+ AC_MSG_RESULT([found ($NSIS_PATH)])
+ fi
fi
fi
AC_SUBST(NSIS_PATH)
dnl ***************************************
-dnl testing bison and flex exist
+dnl Checking for bison and flex
dnl ***************************************
AC_PATH_PROG(BISON, bison)
if test -z "$BISON"; then
- AC_MSG_ERROR([no bison found in \$PATH, install bison])
+ AC_MSG_ERROR([no bison found in \$PATH, install it])
else
AC_MSG_CHECKING([the bison version])
_bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
@@ -5347,14 +6120,14 @@ else
fi
AC_PATH_PROG(FLEX, flex)
if test -z "$FLEX"; then
- AC_MSG_ERROR([no flex found in \$PATH, install flex])
+ AC_MSG_ERROR([no flex found in \$PATH, install it])
fi
dnl ***************************************
-dnl testing that patch exists
+dnl Checking for patch
dnl ***************************************
AC_PATH_PROG(PATCH, patch)
if test -z "$PATCH"; then
- AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
+ AC_MSG_ERROR([\"patch\" not found in \$PATH, install it])
fi
dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
@@ -5363,7 +6136,7 @@ if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
GNUPATCH=$PATCH
else
if test -x "$with_gnu_patch"; then
- GNUPATCH=$with_gnu_patch
+ GNUPATCH=$with_gnu_patch
else
AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
fi
@@ -5371,7 +6144,7 @@ if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
- AC_MSG_RESULT([yes])
+ AC_MSG_RESULT([yes])
else
AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
fi
@@ -5400,90 +6173,67 @@ fi
AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
AC_MSG_RESULT([yes])
+elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no])
- GNUCP=''
-fi
-
-if test -z "$GNUCP"; then
- if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then
- AC_MSG_ERROR([no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it])
- else
- AC_MSG_RESULT([no GNU cp from coreutils found - using the system's cp command])
- fi
+ case "$build_os" in
+ darwin*|netbsd*|openbsd*|freebsd*|dragonfly*)
+ GNUCP=''
+ AC_MSG_RESULT([no gnucp found - using the system's cp command])
+ ;;
+ *)
+ AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
+ ;;
+ esac
fi
AC_SUBST(GNUPATCH)
AC_SUBST(GNUCP)
dnl ***************************************
-dnl testing bash tools path on Windows
+dnl testing assembler path
dnl ***************************************
-if test "$_os" = "WINNT"; then
- CYGWIN_PATH=""
- AC_PATH_PROG(CYGWIN_PATH, bash)
- CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
-fi
-if test -z "$CYGWIN_PATH"; then
- CYGWIN_PATH="NO_CYGWIN"
-fi
-AC_SUBST(CYGWIN_PATH)
-
-dnl ***************************************
-dnl testing ml.exe assembler path
-dnl ***************************************
-if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
- AC_MSG_CHECKING([ml.exe assembler path])
+if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
+ if test "$CL_X64" = ""; then
+ assembler=ml.exe
+ assembler_bin=bin
+ else
+ assembler=ml64.exe
+ assembler_bin=bin/amd64
+ fi
if test -n "$with_asm_home"; then
with_asm_home=`cygpath -u "$with_asm_home"`
fi
- if test ! -x "$with_asm_home/ml.exe"; then
- AC_PATH_PROG(ML_EXE, ml.exe)
+ if test -x "$with_asm_home/$assembler"; then
+ AC_MSG_CHECKING([$assembler assembler path])
+ AC_MSG_RESULT([$with_asm_home/$assembler])
+ else
+ AC_PATH_PROG(ML_EXE, $assembler)
if test -z "$ML_EXE"; then
- if test -x "$with_cl_home/bin/ml.exe"; then
- with_asm_home=$with_cl_home/bin
- AC_MSG_RESULT([found ($with_asm_home)])
+ AC_MSG_CHECKING([$with_cl_home/$assembler_bin/$assembler])
+ if test -x "$with_cl_home/$assembler_bin/$assembler"; then
+ with_asm_home=$with_cl_home/$assembler_bin
+ AC_MSG_RESULT([found])
else
- AC_MSG_ERROR([Configure did not find ml.exe assembler.])
+ AC_MSG_ERROR([Configure did not find $assembler assembler.])
fi
else
with_asm_home="ASM_IN_PATH"
fi
fi
- AC_MSG_RESULT([$ASM_HOME])
else
with_asm_home="NO_ASM_HOME"
fi
ASM_HOME="$with_asm_home"
AC_SUBST(ASM_HOME)
-
-dnl ===================================================================
-dnl testing handle deprecated unzip switch
-dnl ===================================================================
-if test -z "$with_zip_home"; then
- with_zip_home="$with_unzip_home"
-fi
-dnl ===================================================================
-dnl Zip will be found where you tell me to find it
-dnl ===================================================================
-if test -n "$with_zip_home" ; then
- if test "$_os" = "WINNT"; then
- with_zip_home=`cygpath -u "$with_zip_home"`
- fi
- ZIP="$with_zip_home/zip"
- UNZIP="$with_zip_home/unzip"
- ZIP_HOME="$with_zip_home"
-else
- AC_PATH_PROG(ZIP, zip)
- AC_PATH_PROG(UNZIP, unzip)
- ZIP_HOME=`dirname "$ZIP"`
-fi
+
dnl ===================================================================
-dnl Zip must be available or else it is an error, all platforms
+dnl We need zip and unzip
dnl ===================================================================
-if test -z "$ZIP" -o -z "$UNZIP"; then
- AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
-fi
+AC_PATH_PROG(ZIP, zip)
+test -z "$ZIP" && AC_MSG_ERROR([zip is required])
+AC_PATH_PROG(UNZIP, unzip)
+test -z "$ZIP" && AC_MSG_ERROR([unzip is required])
if "$ZIP" -FS < /dev/null 2>&1 | $EGREP "no such option: S" > /dev/null; then
AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,)
fi
@@ -5491,114 +6241,37 @@ fi
dnl ===================================================================
dnl Zip must be a specific type for different build types.
dnl ===================================================================
-if test "$_os" = "WINNT"; then
+if test $build_os = cygwin; then
if test -n "`$ZIP -h | grep -i WinNT`" ; then
-AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
+ AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
fi
fi
-AC_SUBST(ZIP_HOME)
-
-dnl ===================================================================
-dnl Windows builds need unicows.dll in external/unicows/
-dnl ===================================================================
-if test "$_os" = "WINNT"; then
- AC_MSG_CHECKING([for unicows.dll])
- if test -x ./external/unicows/unicows.dll; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
-Get it from the Microsoft site and put it into external/unicows.
-(Note: Microsoft seems to enjoy changing the exact location of this file. You
-may have to search Microsoft's website.) Last time it was seen at:
-<http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
- fi
-fi
dnl ===================================================================
-dnl Windows builds need dbghelp.dll in external/dbghelp/
+dnl Test which vclplugs have to be built.
dnl ===================================================================
-if test "$_os" = "WINNT"; then
- AC_MSG_CHECKING([for dbghelp.dll])
- if test -x ./external/dbghelp/dbghelp.dll; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
-Get it from the Microsoft site and put it into external/dbghelp.
-(Note: Microsoft seems to enjoy changing the exact location of this file. You
-may have to search Microsoft's website.) Last time it was seen at:
-<http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
+R=""
+GTK3_CFLAGS=""
+GTK3_LIBS=""
+ENABLE_GTK3=""
+if test "x$enable_gtk3" = "xyes"; then
+ if test "$with_system_cairo" != yes; then
+ echo "System cairo required for gtk3 support, please use --system-cairo"
fi
-fi
-
-dnl ===================================================================
-dnl Windows builds - use oowintool to copy CRT dlls and manifest
-dnl ===================================================================
-if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
- if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
- :
- else
- AC_MSG_ERROR([oowintool failed to copy CRT])
- fi
-fi
-
-dnl ===================================================================
-dnl Windows builds need gdiplus.dll in external/gdiplus/
-dnl ===================================================================
-if test "$_os" = "WINNT"; then
- AC_MSG_CHECKING([for gdiplus.dll])
- if test -x ./external/gdiplus/gdiplus.dll; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
-Get it from the Microsoft site and put it into external/gdiplus.
-You may have to search Microsoft's website. Last time it was seen at:
-<http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
+ PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.0 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="")
+ if test "x$ENABLE_GTK3" = "xTRUE"; then
+ R="gtk3"
fi
fi
+AC_SUBST(GTK3_LIBS)
+AC_SUBST(GTK3_CFLAGS)
+AC_SUBST(ENABLE_GTK3)
-dnl ===================================================================
-dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
-dnl ===================================================================
-if test "$_os" = "WINNT"; then
- ./oowintool --msvc-copy-instmsi ./external/msi
-fi
-
-dnl ===================================================================
-dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
-dnl ===================================================================
-if test "$_os" = "WINNT"; then
- if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
- AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
- if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
- AC_MSG_RESULT([found])
- else
- MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1`
- MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1`
- if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
- cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
- cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
- fi
- if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
- AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
-These programs are part of the Visual Studio installation and should be found in a
-directory similar to:
-"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
-As the automatic detection fails please copy the files to external/msi/.])
- else
- AC_MSG_RESULT([found and copied])
- fi
- fi
-fi
-fi
-
-dnl ===================================================================
-dnl Test which vclplugs have to be built.
-dnl ===================================================================
AC_MSG_CHECKING([which VCLplugs shall be built])
ENABLE_GTK=""
if test "x$enable_gtk" = "xyes"; then
ENABLE_GTK="TRUE"
- R="gtk"
+ R="gtk $R"
fi
AC_SUBST(ENABLE_GTK)
@@ -5617,9 +6290,9 @@ fi
AC_SUBST(ENABLE_KDE4)
if test -z "$R"; then
- AC_MSG_RESULT([none])
+ AC_MSG_RESULT([none])
else
- AC_MSG_RESULT([$R])
+ AC_MSG_RESULT([$R])
fi
dnl ===================================================================
@@ -5628,7 +6301,7 @@ dnl ===================================================================
ENABLE_GCONF=""
AC_MSG_CHECKING([whether to enable GConf support])
-if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
+if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gconf" = "yes"; then
ENABLE_GCONF="TRUE"
AC_MSG_RESULT([yes])
PKG_CHECK_MODULES( GCONF, gconf-2.0 )
@@ -5671,8 +6344,9 @@ if test "$test_gtk" = "yes"; then
BUILD_TYPE="$BUILD_TYPE GTK"
if test "x$enable_systray" = "xyes"; then
- ENABLE_SYSTRAY_GTK="TRUE"
- BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
+ PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
+ [ ENABLE_SYSTRAY_GTK="TRUE" ],
+ [ ENABLE_SYSTRAY_GTK="" ])
fi
AC_MSG_CHECKING([whether to enable DBUS support])
@@ -5695,9 +6369,7 @@ if test "$test_gtk" = "yes"; then
else
AC_MSG_RESULT([no])
fi
-
fi
-
fi
AC_SUBST(ENABLE_GIO)
AC_SUBST(ENABLE_DBUS)
@@ -5707,56 +6379,44 @@ AC_SUBST(GTK_LIBS)
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)
-dnl ===================================================================
-dnl Check whether the GStreamer libraries are available.
-dnl ===================================================================
+PKG_CHECK_MODULES( LIBPNG, libpng, ENABLE_QUICKSTART_LIBPNG="TRUE", ENABLE_QUICKSTART_LIBPNG="" )
+AC_SUBST(LIBPNG_LIBS)
+AC_SUBST(LIBPNG_CFLAGS)
-GSTREAMER_CFLAGS=""
-GSTREAMER_LIBS=""
-ENABLE_GSTREAMER=""
-
-if test "$test_gstreamer" = "yes"; then
- AC_MSG_CHECKING([whether to build the GStreamer media backend])
- if test "x$enable_gstreamer" != "xno" ; then
- PKG_CHECK_MODULES( GSTREAMER, gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ,,AC_MSG_ERROR([requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages]))
- ENABLE_GSTREAMER="TRUE"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
+AC_MSG_CHECKING([whether to enable libpng linking in quickstarter])
+if test "x$enable_unix_libpng" = "xyes"; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+ ENABLE_QUICKSTART_LIBPNG=""
fi
-AC_SUBST(ENABLE_GSTREAMER)
-AC_SUBST(GSTREAMER_CFLAGS)
-AC_SUBST(GSTREAMER_LIBS)
-
+AC_SUBST(ENABLE_QUICKSTART_LIBPNG)
dnl ===================================================================
-dnl Check whether the Cairo libraries are available.
+dnl Test whether to build cairo or rely on the system version
dnl ===================================================================
-ENABLE_CAIRO=""
+dnl ENABLE_CAIRO will be set to empty later when necessary
+ENABLE_CAIRO="TRUE"
+
BUILD_PIXMAN=""
SYSTEM_CAIRO=""
-if test "$test_cairo" = "yes"; then
-
- AC_MSG_CHECKING([whether to use cairo])
- if test "x$enable_cairo" != "xno" ; then
- ENABLE_CAIRO="TRUE"
- AC_MSG_RESULT([yes])
- AC_MSG_CHECKING([which cairo to use])
- if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
- test "$with_system_cairo" != "no"; then
- AC_MSG_RESULT([external])
- SYSTEM_CAIRO=YES
-
- PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
- if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
- AC_MSG_ERROR([Cairo library requires fontconfig.])
- fi
- if test "$with_system_xrender_headers" = "yes"; then
- AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
- AC_TRY_RUN([
+AC_MSG_CHECKING([whether to use the system cairo])
+
+if test "$with_system_cairo" = yes -o \( "$with_system_libs" = yes -a "$with_system_cairo" != no \); then
+ SYSTEM_CAIRO=YES
+ AC_MSG_RESULT([yes])
+
+ PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
+
+ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
+ AC_MSG_ERROR([Cairo library requires fontconfig.])
+ fi
+
+ if test "$with_system_xrender_headers" = "yes"; then
+ AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
+ AC_TRY_RUN([
#include <X11/extensions/Xrender.h>
int main(int argc, char **argv) {
@@ -5766,19 +6426,15 @@ int main(int argc, char **argv) {
return 1;
#endif
}
- ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
- fi
- else
- BUILD_TYPE="$BUILD_TYPE CAIRO"
- dnl === compiler fails on pixman with 64bit architectures...===
- if test "$build_cpu" != "x86_64"; then
- BUILD_PIXMAN=YES
- fi
- AC_MSG_RESULT([internal])
- fi
- else
- AC_MSG_RESULT([no])
+ ],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR([no, X headers too old.])]
+ )
fi
+else
+ AC_MSG_RESULT([no])
+ BUILD_TYPE="$BUILD_TYPE CAIRO"
+ BUILD_PIXMAN=YES
fi
AC_SUBST(ENABLE_CAIRO)
@@ -5794,27 +6450,24 @@ fi
AC_SUBST(ENABLE_CAIRO_CANVAS)
dnl ===================================================================
-dnl Check whether the librsvg libraries are available.
+dnl Check whether the GStreamer libraries are available.
dnl ===================================================================
-ENABLE_LIBRSVG=""
-LIBRSVG_CFLAGS=""
-LIBRSVG_LIBS=""
+ENABLE_GSTREAMER=""
+
+if test "$build_gstreamer" = "yes"; then
-if test "$test_librsvg" = "yes"; then
- AC_MSG_CHECKING([whether to use librsvg])
- if test "x$enable_librsvg" != "xno" ; then
- PKG_CHECK_MODULES( LIBRSVG, librsvg-2.0 >= 2.14,,AC_MSG_ERROR([requirements to build with librsvg support not met. Use --disable-librsvg or install the missing packages]))
- ENABLE_LIBRSVG="TRUE"
- AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
+ if test "x$enable_gstreamer" != "xno" ; then
+ ENABLE_GSTREAMER="TRUE"
+ AC_MSG_RESULT([yes])
+ PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
else
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no])
fi
fi
-AC_SUBST(ENABLE_LIBRSVG)
-AC_SUBST(LIBRSVG_CFLAGS)
-AC_SUBST(LIBRSVG_LIBS)
+AC_SUBST(ENABLE_GSTREAMER)
dnl ===================================================================
dnl Check whether the OpenGL libraries are available
@@ -5823,53 +6476,81 @@ dnl ===================================================================
AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
ENABLE_OPENGL=
-if test "x$enable_opengl" != "xno" ; then
- AC_MSG_RESULT([yes])
- AC_CHECK_HEADER(GL/gl.h, [],
- [AC_MSG_ERROR([OpenGL headers not found])], [])
- AC_CHECK_LIB(GL, main, [],
- [AC_MSG_ERROR(libGL not installed or functional)], [])
- AC_CHECK_LIB(GLU, main, [],
- [AC_MSG_ERROR(libGLU not installed or functional)], [])
+if test "$_os" = "Darwin" ; then
+ # We use frameworks on Mac OS X, no need for detail checks
ENABLE_OPENGL=TRUE
+ AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no])
+ if test "x$enable_opengl" != "xno" ; then
+ if test "$_os" != "WINNT"; then
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -lm"
+ AC_MSG_RESULT([yes])
+ AC_CHECK_LIB(GL, main, [],
+ [AC_MSG_ERROR(libGL not installed or functional)], [])
+ AC_CHECK_LIB(GLU, main, [],
+ [AC_MSG_ERROR(libGLU not installed or functional)], [])
+ ENABLE_OPENGL=TRUE
+ LDFLAGS=$save_LDFLAGS
+
+ dnl ===================================================================
+ dnl Check for system Mesa
+ dnl ===================================================================
+ AC_MSG_CHECKING([which Mesa headers to use])
+ if test -n "$with_system_mesa_headers" -o -n "$with_system_headers" && \
+ test "$with_system_mesa_headers" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_MESA_HEADERS=YES
+ AC_LANG_PUSH(C)
+ AC_CHECK_HEADER(GL/glxext.h, [],
+ [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
+ AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
+ AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
+ AC_LANG_POP(C)
+ else
+ AC_MSG_RESULT([internal])
+ SYSTEM_MESA_HEADERS=NO
+ BUILD_TYPE="$BUILD_TYPE MESA"
+ fi
+
+ else
+ AC_MSG_RESULT([not on Windows])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
fi
+AC_SUBST(SYSTEM_MESA_HEADERS)
AC_SUBST(ENABLE_OPENGL)
-AC_MSG_CHECKING([whether to build extra presenter ui])
-if test -n "$enable_presenter_extra_ui" -a "$enable_presenter_extra_ui" != "no"; then
- AC_MSG_RESULT([yes])
- ENABLE_PRESENTER_EXTRA_UI=YES
-else
- AC_MSG_RESULT([no])
- ENABLE_PRESENTER_EXTRA_UI=NO
-fi
-AC_SUBST(ENABLE_PRESENTER_EXTRA_UI)
-
+# presenter minimizer extension?
AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
-if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
+AS_IF([test "x$enable_ext_presenter_minimizer" = "xyes"], [
AC_MSG_RESULT([yes])
ENABLE_MINIMIZER=YES
-else
+],[
AC_MSG_RESULT([no])
ENABLE_MINIMIZER=NO
-fi
+ SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MINIMIZER"
+])
AC_SUBST(ENABLE_MINIMIZER)
-AC_MSG_CHECKING([whether to build the Presenter Screen extension])
-if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
+# presenter console extension?
+AC_MSG_CHECKING([whether to build the Presenter Console extension])
+AS_IF([test "x$enable_ext_presenter_console" = "xyes"], [
AC_MSG_RESULT([yes])
ENABLE_PRESENTER_SCREEN=YES
-else
+],[
AC_MSG_RESULT([no])
ENABLE_PRESENTER_SCREEN=NO
-fi
+ SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PRESENTER_SCREEN"
+])
AC_SUBST(ENABLE_PRESENTER_SCREEN)
+# pdf import extension?
AC_MSG_CHECKING([whether to build the PDF Import extension])
-if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
+AS_IF([test "x$enable_ext_pdfimport" = "xyes"], [
AC_MSG_RESULT([yes])
ENABLE_PDFIMPORT=YES
@@ -5886,47 +6567,37 @@ if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
AC_MSG_RESULT([internal])
SYSTEM_POPPLER=NO
BUILD_TYPE="$BUILD_TYPE XPDF"
- AC_MSG_CHECKING([for xpdf module])
- if test -d ./xpdf; then
- AC_MSG_RESULT([OK])
- else
- AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
- fi
fi
-else
- AC_MSG_RESULT([no])
- ENABLE_PDFIMPORT=NO
-fi
+],[
+ AC_MSG_RESULT([no])
+ ENABLE_PDFIMPORT=NO
+ SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PDFIMPORT"
+])
AC_SUBST(ENABLE_PDFIMPORT)
AC_SUBST(SYSTEM_POPPLER)
AC_SUBST(POPPLER_CFLAGS)
AC_SUBST(POPPLER_LIBS)
+
if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
AC_MSG_CHECKING([for sdext module])
- if test -d ./sdext; then
- AC_MSG_RESULT([OK])
- else
- AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
- fi
BUILD_TYPE="$BUILD_TYPE SDEXT"
fi
AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
-if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
+AS_IF([test "x$enable_ext_wiki_publisher" = "xyes"], [
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for swext module])
- if test -d ./swext; then
- AC_MSG_RESULT([OK])
- else
- AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
- fi
ENABLE_MEDIAWIKI=YES
BUILD_TYPE="$BUILD_TYPE SWEXT"
-else
+ if test "x$with_java" = "xno"; then
+ AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
+ fi
+],[
AC_MSG_RESULT([no])
ENABLE_MEDIAWIKI=NO
-fi
+ SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
+])
AC_SUBST(ENABLE_MEDIAWIKI)
if test "$ENABLE_MEDIAWIKI" = "YES"; then
@@ -5935,7 +6606,7 @@ if test "$ENABLE_MEDIAWIKI" = "YES"; then
AC_MSG_RESULT([external])
SYSTEM_SERVLETAPI=YES
if test -z "$SERVLETAPI_JAR"; then
- SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
+ SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
fi
AC_CHECK_FILE($SERVLETAPI_JAR, [],
[AC_MSG_ERROR(servlet-api.jar not found.)], [])
@@ -5949,15 +6620,10 @@ AC_SUBST(SYSTEM_SERVLETAPI)
AC_SUBST(SERVLETAPI_JAR)
AC_MSG_CHECKING([whether to build the Report Builder extension])
-if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
+if test -n "$enable_ext_report_builder" -a "$enable_ext_report_builder" != "no" && test "$with_java" != "no"; then
AC_MSG_RESULT([yes])
ENABLE_REPORTBUILDER=YES
AC_MSG_CHECKING([for reportbuilder module])
- if test -d ./reportbuilder; then
- AC_MSG_RESULT([OK])
- else
- AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
- fi
AC_MSG_CHECKING([which jfreereport libs to use])
if test "$with_system_jfreereport" = "yes"; then
SYSTEM_JFREEREPORT=YES
@@ -5969,10 +6635,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
[AC_MSG_ERROR(sac.jar not found.)], [])
if test -z $LIBXML_JAR; then
- AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
+ AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
[ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
[
- AC_CHECK_FILE(/usr/share/java/libxml.jar,
+ AC_CHECK_FILE(/usr/share/java/libxml.jar,
[ LIBXML_JAR=/usr/share/java/libxml.jar ],
[AC_MSG_ERROR(libxml.jar replacement not found.)]
)
@@ -5984,10 +6650,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
fi
if test -z $FLUTE_JAR; then
- AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
+ AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
[ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
[
- AC_CHECK_FILE(/usr/share/java/flute.jar,
+ AC_CHECK_FILE(/usr/share/java/flute.jar,
[ FLUTE_JAR=/usr/share/java/flute.jar ],
[ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
)
@@ -5999,10 +6665,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
fi
if test -z $JFREEREPORT_JAR; then
- AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
+ AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
[ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
[
- AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
+ AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
[ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
[AC_MSG_ERROR(jfreereport.jar replacement not found.)]
)
@@ -6014,10 +6680,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
fi
if test -z $LIBLAYOUT_JAR; then
- AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
+ AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
[ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
[
- AC_CHECK_FILE(/usr/share/java/liblayout.jar,
+ AC_CHECK_FILE(/usr/share/java/liblayout.jar,
[ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
[AC_MSG_ERROR(liblayout.jar replacement not found.)]
)
@@ -6029,10 +6695,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
fi
if test -z $LIBLOADER_JAR; then
- AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
+ AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
[ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
[
- AC_CHECK_FILE(/usr/share/java/libloader.jar,
+ AC_CHECK_FILE(/usr/share/java/libloader.jar,
[ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
[AC_MSG_ERROR(libloader.jar replacement not found.)]
)
@@ -6044,10 +6710,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
fi
if test -z $LIBFORMULA_JAR; then
- AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
+ AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
[ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
[
- AC_CHECK_FILE(/usr/share/java/libformula.jar,
+ AC_CHECK_FILE(/usr/share/java/libformula.jar,
[ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
[AC_MSG_ERROR(libformula.jar replacement not found.)]
)
@@ -6059,10 +6725,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
fi
if test -z $LIBREPOSITORY_JAR; then
- AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
+ AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
[ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
[
- AC_CHECK_FILE(/usr/share/java/librepository.jar,
+ AC_CHECK_FILE(/usr/share/java/librepository.jar,
[ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
[AC_MSG_ERROR(librepository.jar replacement not found.)]
)
@@ -6074,10 +6740,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
fi
if test -z $LIBFONTS_JAR; then
- AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
+ AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
[ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
[
- AC_CHECK_FILE(/usr/share/java/libfonts.jar,
+ AC_CHECK_FILE(/usr/share/java/libfonts.jar,
[ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
[AC_MSG_ERROR(libfonts.jar replacement not found.)]
)
@@ -6089,10 +6755,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
fi
if test -z $LIBSERIALIZER_JAR; then
- AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
+ AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
[ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
[
- AC_CHECK_FILE(/usr/share/java/libserializer.jar,
+ AC_CHECK_FILE(/usr/share/java/libserializer.jar,
[ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
[AC_MSG_ERROR(libserializer.jar replacement not found.)]
)
@@ -6105,10 +6771,10 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
if test -z $LIBBASE_JAR; then
- AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
+ AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
[ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
[
- AC_CHECK_FILE(/usr/share/java/libbase.jar,
+ AC_CHECK_FILE(/usr/share/java/libbase.jar,
[ LIBBASE_JAR=/usr/share/java/libbase.jar ],
[AC_MSG_ERROR(libbase.jar replacement not found.)]
)
@@ -6122,11 +6788,6 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
else
AC_MSG_RESULT([internal])
AC_MSG_CHECKING([for jfreereport module])
- if test -d ./jfreereport; then
- AC_MSG_RESULT([OK])
- else
- AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
- fi
SYSTEM_JFREEREPORT=NO
BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
fi
@@ -6134,6 +6795,7 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
else
AC_MSG_RESULT([no])
ENABLE_REPORTBUILDER=NO
+ SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN"
SYSTEM_JFREEREPORT=NO
fi
AC_SUBST(ENABLE_REPORTBUILDER)
@@ -6150,7 +6812,7 @@ AC_SUBST(LIBREPOSITORY_JAR)
AC_SUBST(LIBFONTS_JAR)
AC_SUBST(LIBSERIALIZER_JAR)
-# this has to be here because both the wiki publisher and the SRB use
+# this has to be here because both the Wiki Publisher and the SRB use
# commons-logging
if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
AC_MSG_CHECKING([which Apache commons-* libs to use])
@@ -6159,10 +6821,10 @@ if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
AC_MSG_RESULT([external])
if test "$ENABLE_MEDIAWIKI" = "YES"; then
if test -z $COMMONS_CODEC_JAR; then
- AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
+ AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
[ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
[
- AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
+ AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
[ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
[AC_MSG_ERROR(commons-codec.jar replacement not found.)]
)
@@ -6174,10 +6836,10 @@ if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
fi
if test -z $COMMONS_LANG_JAR; then
- AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
+ AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
[ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
[
- AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
+ AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
[ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
[AC_MSG_ERROR(commons-lang.jar replacement not found.)]
)
@@ -6189,10 +6851,10 @@ if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
fi
if test -z $COMMONS_HTTPCLIENT_JAR; then
- AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
+ AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
[ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
[
- AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
+ AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
[ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
[AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
)
@@ -6205,10 +6867,10 @@ if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
fi
if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
if test -z $COMMONS_LOGGING_JAR; then
- AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
+ AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
[ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
[
- AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
+ AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
[ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
[AC_MSG_ERROR(commons-logging.jar replacement not found.)]
)
@@ -6231,31 +6893,77 @@ AC_SUBST(COMMONS_LANG_JAR)
AC_SUBST(COMMONS_HTTPCLIENT_JAR)
AC_SUBST(COMMONS_LOGGING_JAR)
+# scripting provider for BeanShell extension?
+AC_MSG_CHECKING([whether to build extension for support of scripts in BeanShell])
+AS_IF([test "x$enable_ext_scripting_beanshell" = "xyes"], [
+ AC_MSG_RESULT([yes])
+ ENABLE_SCRIPTING_BEANSHELL=YES
+],[
+ AC_MSG_RESULT([no])
+ ENABLE_SCRIPTING_BEANSHELL=NO
+ SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_BEANSHELL"
+])
+AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
+
+# scripting provider for JavaScript extension?
+AC_MSG_CHECKING([whether to build extension for support of scripts in JavaScript])
+AS_IF([test "x$enable_ext_scripting_javascript" = "xyes"], [
+ AC_MSG_RESULT([yes])
+ ENABLE_SCRIPTING_JAVASCRIPT=YES
+],[
+ AC_MSG_RESULT([no])
+ ENABLE_SCRIPTING_JAVASCRIPT=NO
+ SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_JAVASCRIPT"
+])
+AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
+
+dnl Scripting provider for Python extension?
+dnl We always provide this unless we have disabled Python completely
+if test $enable_python = no; then
+ ENABLE_SCRIPTING_PYTHON=NO
+else
+ ENABLE_SCRIPTING_PYTHON=YES
+fi
+AC_SUBST(ENABLE_SCRIPTING_PYTHON)
+
+supports_multilib=
+case "$host_cpu" in
+ x86_64 | powerpc64 | s390x)
+ if test "$SIZEOF_LONG" = "8"; then
+ supports_multilib="yes"
+ fi
+ ;;
+ *)
+ ;;
+esac
+
dnl ===================================================================
-dnl Check whether the Qt and KDE libraries are available.
+dnl Check whether the Qt3 and KDE3 libraries are available.
dnl ===================================================================
KDE_CFLAGS=""
KDE_LIBS=""
-MOC="moc"
+if test "$_os" != "OpenBSD"; then
+ MOC="moc"
+fi
if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
- dnl Search paths for Qt and KDE
- if test "$build_cpu" != "x86_64" ; then
- 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 $x_includes"
- 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 $x_libraries"
+ dnl Search paths for Qt3 and KDE3
+ if test -z "$supports_multilib" ; then
+ 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"
+ 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"
else
- 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 $x_includes"
- 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 $x_libraries"
+ 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"
+ 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"
fi
if test -n "$QTDIR" ; then
qt_incdirs="$QTDIR/include $qt_incdirs"
- if test "$build_cpu" != "x86_64" ; then
+ if test -z "$supports_multilib" ; then
qt_libdirs="$QTDIR/lib $qt_libdirs"
else
qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
fi
fi
- if test "$build_cpu" != "x86_64" ; then
+ if test -z "$supports_multilib" ; then
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"
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"
else
@@ -6264,7 +6972,7 @@ if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
fi
if test -n "$KDEDIR" ; then
kde_incdirs="$KDEDIR/include $kde_incdirs"
- if test "$build_cpu" != "x86_64" ; then
+ if test -z "$supports_multilib" ; then
kde_libdirs="$KDEDIR/lib $kde_libdirs"
else
kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
@@ -6273,12 +6981,18 @@ if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
dnl What to test
qt_test_include="qstyle.h"
- qt_test_library="libqt-mt.so"
- kde_test_include="ksharedptr.h"
- kde_test_library="libkdeui.so"
+ kde_test_include="kapp.h"
+
+ if test "$_os" != "OpenBSD"; then
+ qt_test_library="libqt-mt.so"
+ kde_test_library="libDCOP.so"
+ else
+ qt_test_library="libqt-mt.so*"
+ kde_test_library="libDCOP.so*"
+ fi
- dnl Check for Qt headers
- AC_MSG_CHECKING([for Qt headers])
+ dnl Check for Qt3 headers
+ AC_MSG_CHECKING([for Qt3 headers])
qt_incdir="no"
for kde_check in $qt_incdirs ; do
if test -r "$kde_check/$qt_test_include" ; then
@@ -6288,34 +7002,34 @@ if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
done
AC_MSG_RESULT([$qt_incdir])
if test "x$qt_incdir" = "xno" ; then
- AC_MSG_ERROR([Qt headers not found. Please specify the root of
-your Qt installation by exporting QTDIR before running "configure".])
+ AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
+your Qt3 installation by exporting QTDIR before running "configure".])
fi
- dnl Check for Qt libraries
- AC_MSG_CHECKING([for Qt libraries])
+ dnl Check for Qt3 libraries
+ AC_MSG_CHECKING([for Qt3 libraries])
qt_libdir="no"
for qt_check in $qt_libdirs ; do
- if test -r "$qt_check/$qt_test_library" ; then
+ if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`" ; then
qt_libdir="$qt_check"
break
fi
done
AC_MSG_RESULT([$qt_libdir])
if test "x$qt_libdir" = "xno" ; then
- AC_MSG_ERROR([Qt libraries not found. Please specify the root of
-your Qt installation by exporting QTDIR before running "configure".])
+ AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
+your Qt3 installation by exporting QTDIR before running "configure".])
fi
dnl Check for Meta Object Compiler
- AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
+ AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
if test "$MOC" = "no" ; then
- AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
-the root of your Qt installation by exporting QTDIR before running "configure".])
+ AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
+the root of your Qt3 installation by exporting QTDIR before running "configure".])
fi
- dnl Check for KDE headers
- AC_MSG_CHECKING([for KDE headers])
+ dnl Check for KDE3 headers
+ AC_MSG_CHECKING([for KDE3 headers])
kde_incdir="no"
for kde_check in $kde_incdirs ; do
if test -r "$kde_check/$kde_test_include" ; then
@@ -6325,23 +7039,23 @@ the root of your Qt installation by exporting QTDIR before running "configure".]
done
AC_MSG_RESULT([$kde_incdir])
if test "x$kde_incdir" = "xno" ; then
- AC_MSG_ERROR([KDE headers not found. Please specify the root of
-your KDE installation by exporting KDEDIR before running "configure".])
+ AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
+your KDE3 installation by exporting KDEDIR before running "configure".])
fi
- dnl Check for KDE libraries
- AC_MSG_CHECKING([for KDE libraries])
+ dnl Check for KDE3 libraries
+ AC_MSG_CHECKING([for KDE3 libraries])
kde_libdir="no"
for kde_check in $kde_libdirs ; do
- if test -r "$kde_check/$kde_test_library" ; then
+ if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`" ; then
kde_libdir="$kde_check"
break
fi
done
AC_MSG_RESULT([$kde_libdir])
if test "x$kde_libdir" = "xno" ; then
- AC_MSG_ERROR([KDE libraries not found. Please specify the root of
-your KDE installation by exporting KDEDIR before running "configure".])
+ AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
+your KDE3 installation by exporting KDEDIR before running "configure".])
fi
dnl Set the variables
@@ -6359,21 +7073,49 @@ dnl ===================================================================
KDE4_CFLAGS=""
KDE4_LIBS=""
MOC4="moc"
+KDE_GLIB_CFLAGS=""
+KDE_GLIB_LIBS=""
+KDE_HAVE_GLIB=""
if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
- qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes"
+ qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
qt_libdirs="$QT4LIB /usr/lib $x_libraries"
-
- kde_incdirs="/usr/include $x_includes"
- kde_libdirs="/usr/lib $x_libraries"
-
- if test "$build_cpu" = "x86_64" ; then
+
+ kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
+ kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
+
+ if test -n "$supports_multilib" ; then
qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
- kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
+ kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
+ fi
+
+ if test -n "$QTDIR" ; then
+ qt_incdirs="$QTDIR/include $qt_incdirs"
+ if test -z "$supports_multilib" ; then
+ qt_libdirs="$QTDIR/lib $qt_libdirs"
+ else
+ qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
+ fi
+ fi
+ if test -n "$QT4DIR" ; then
+ qt_incdirs="$QT4DIR/include $qt_incdirs"
+ if test -z "$supports_multilib" ; then
+ qt_libdirs="$QT4DIR/lib $qt_libdirs"
+ else
+ qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
+ fi
fi
+ if test -n "$KDEDIR" ; then
+ kde_incdirs="$KDEDIR/include $kde_incdirs"
+ if test -z "$supports_multilib" ; then
+ kde_libdirs="$KDEDIR/lib $kde_libdirs"
+ else
+ kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
+ fi
+ fi
if test -n "$KDE4DIR" ; then
- kde_incdirs="$KDE4DIR/include $kde_incdirs"
- if test "$build_cpu" != "x86_64" ; then
+ kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
+ if test -z "$supports_multilib" ; then
kde_libdirs="$KDE4DIR/lib $kde_libdirs"
else
kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
@@ -6382,9 +7124,9 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
qt_test_include="Qt/qobject.h"
qt_test_library="libQtCore.so"
- kde_test_include="ksharedptr.h"
- kde_test_library="libkdeui.so"
-
+ kde_test_include="kwindowsystem.h"
+ kde_test_library="libsolid.so"
+
AC_MSG_CHECKING([for Qt4 headers])
qt_header_dir="no"
for inc_dir in $qt_incdirs ; do
@@ -6393,32 +7135,38 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
break
fi
done
-
+
AC_MSG_RESULT([$qt_header_dir])
if test "x$qt_header_dir" = "xno" ; then
AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
fi
-
+
AC_MSG_CHECKING([for Qt4 libraries])
qt_lib_dir="no"
for lib_dir in $qt_libdirs ; do
if test -r "$lib_dir/$qt_test_library" ; then
qt_lib_dir="$lib_dir"
+ PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
break
fi
done
-
+
AC_MSG_RESULT([$qt_lib_dir])
-
+
if test "x$qt_lib_dir" = "xno" ; then
AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
fi
dnl Check for Meta Object Compiler
- AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
+
+ AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
+ MOC4="$MOCQT4"
if test "$MOC4" = "no" ; then
- AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
+ AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
+ if test "$MOC4" = "no" ; then
+ AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
the root of your Qt installation by exporting QT4DIR before running "configure".])
+ fi
fi
dnl Check for KDE4 headers
@@ -6444,7 +7192,7 @@ the root of your Qt installation by exporting QT4DIR before running "configure".
break
fi
done
-
+
AC_MSG_RESULT([$kde_libdir])
if test "x$kde_libdir" = "xno" ; then
AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
@@ -6452,10 +7200,33 @@ the root of your Qt installation by exporting QT4DIR before running "configure".
KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
+
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
+ AC_MSG_CHECKING([whether KDE is >= 4.2])
+ AC_TRY_RUN([
+#include <kdeversion.h>
+
+int main(int argc, char **argv) {
+ if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
+ else return 1;
+}
+ ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([KDE version too old])])
+ CXXFLAGS=$save_CXXFLAGS
+ AC_LANG_POP([C++])
+
+ # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled
+ PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
+ [KDE_HAVE_GLIB=1],
+ AC_MSG_WARN([[No Glib found, KDE4 support will not integrate with Qt's Glib event loop support]]))
fi
AC_SUBST(KDE4_CFLAGS)
AC_SUBST(KDE4_LIBS)
AC_SUBST(MOC4)
+AC_SUBST(KDE_GLIB_CFLAGS)
+AC_SUBST(KDE_GLIB_LIBS)
+AC_SUBST(KDE_HAVE_GLIB)
dnl ===================================================================
dnl Test for the enabling the lockdown pieces
@@ -6484,7 +7255,7 @@ else
fi
AC_SUBST(ENABLE_EVOAB2)
AC_SUBST(GOBJECT_CFLAGS)
-AC_SUBST(GOBJECT_LIBS)
+AC_SUBST(GOBJECT_LIBS)
dnl ===================================================================
dnl Test whether to include KDE AB support
@@ -6531,6 +7302,309 @@ else
fi
dnl ===================================================================
+dnl Test which themes to include
+dnl ===================================================================
+AC_MSG_CHECKING([which themes to include])
+# if none given, use all available themes
+if test "z$enable_theme" = "z" -o "z$enable_theme" = "zyes"; then
+ enable_theme="default crystal hicontrast oxygen tango"
+fi
+
+ WITH_THEMES=""
+ for theme in $enable_theme
+ do
+ WITH_THEMES="$WITH_THEMES $theme"
+ SCPDEFS="$SCPDEFS -DTHEME_`echo $theme|tr '[a-z]' '[A-Z]'`"
+ done
+ AC_MSG_RESULT([$WITH_THEMES])
+AC_SUBST(WITH_THEMES)
+
+dnl ===================================================================
+dnl Test whether to integrate helppacks into the product's installer
+dnl ===================================================================
+AC_MSG_CHECKING([for helppack integration])
+if test "z$with_helppack_integration" = "zno" ; then
+ WITH_HELPPACK_INTEGRATION=NO
+ AC_MSG_RESULT([no integration])
+else
+ WITH_HELPPACK_INTEGRATION=YES
+ SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
+ AC_MSG_RESULT([integration])
+fi
+AC_SUBST(WITH_HELPPACK_INTEGRATION)
+
+dnl ===================================================================
+dnl Test whether to integrate extensions into the product's installer
+dnl ===================================================================
+AC_MSG_CHECKING([for extensions integration])
+if test "z$with_extension_integration" = "z" -o "z$with_extension_integration" = "zno" ; then
+ WITH_EXTENSION_INTEGRATION=NO
+ AC_MSG_RESULT([no integration])
+else
+ WITH_EXTENSION_INTEGRATION=YES
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
+ AC_MSG_RESULT([integration])
+fi
+AC_SUBST(WITH_EXTENSION_INTEGRATION)
+
+dnl ===================================================================
+dnl Test whether to include Lightproof extensions
+dnl ===================================================================
+AC_MSG_CHECKING([for Lightproof extensions integration (only supported languages displayed)])
+if test "z$enable_ext_lightproof" = "z" -o "z$enable_ext_lightproof" = "zno" ; then
+ LIGHTPROOF_LANG=""
+ AC_MSG_RESULT([no integration])
+else
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LIGHTPROOF"
+ lightproof_supported_langs="en-US hu"
+ if test "z$enable_ext_lightproof" = "zyes" ; then
+ wanted_lightproof="$lightproof_supported_langs"
+ else
+ # check whether the langs are supported by Lightproof
+ wanted_lightproof=
+ for lang in $enable_ext_lightproof ; do
+ if test -n "`echo $lightproof_supported_langs | grep "$lang"`" ; then
+ wanted_lightproof="$wanted_lightproof $lang"
+ fi
+ done
+ fi
+ LIGHTPROOF_LANG=
+ LIGHTPROOF_HU_PACK=
+ LIGHTPROOF_EN_US_PACK=
+ # check whether the langs are requested at all
+ for lang in $wanted_lightproof ; do
+ if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then
+ LIGHTPROOF_LANG="$LIGHTPROOF_LANG $lang"
+ case $lang in
+ "hu") LIGHTPROOF_HU_PACK="324ddcb9ef45c3bc055fcc002bc4e556-lightproof-hu_1.2.oxt";;
+ "en-US") LIGHTPROOF_EN_US_PACK="942541da5f5498214518c8b459ae4524-lightproof-en-US_0.1.oxt";;
+ esac
+ fi
+ done
+ AC_MSG_RESULT([$LIGHTPROOF_LANG])
+fi
+AC_SUBST(LIGHTPROOF_LANG)
+AC_SUBST(LIGHTPROOF_HU_PACK)
+AC_SUBST(LIGHTPROOF_EN_US_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Watch Window extension
+dnl ===================================================================
+AC_MSG_CHECKING([for Watch Window extension integration])
+if test "z$enable_ext_watch_window" = "z" -o "z$enable_ext_watch_window" = "zno" ; then
+ AC_MSG_RESULT([no])
+ WATCH_WINDOW_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_WATCH_WINDOW"
+ WATCH_WINDOW_EXTENSION_PACK="23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt"
+fi
+AC_SUBST(WATCH_WINDOW_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Diagram extension
+dnl ===================================================================
+AC_MSG_CHECKING([for Diagram extension integration])
+if test "z$enable_ext_diagram" = "z" -o "z$enable_ext_diagram" = "zno" ; then
+ AC_MSG_RESULT([no])
+ DIAGRAM_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_DIAGRAM"
+ DIAGRAM_EXTENSION_PACK="41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt"
+fi
+AC_SUBST(DIAGRAM_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Validator extension
+dnl ===================================================================
+AC_MSG_CHECKING([for Validator extension integration])
+if test "z$enable_ext_validator" = "z" -o "z$enable_ext_validator" = "zno" ; then
+ AC_MSG_RESULT([no])
+ VALIDATOR_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_VALIDATOR"
+ VALIDATOR_EXTENSION_PACK="bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt"
+fi
+AC_SUBST(VALIDATOR_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Barcode extension
+dnl ===================================================================
+AC_MSG_CHECKING([for Barcode extension integration])
+if test "z$enable_ext_barcode" = "z" -o "z$enable_ext_barcode" = "zno" ; then
+ AC_MSG_RESULT([no])
+ BARCODE_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_BARCODE"
+ BARCODE_EXTENSION_PACK="7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt"
+fi
+AC_SUBST(BARCODE_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include ConvertTextToNumber extension
+dnl ===================================================================
+AC_MSG_CHECKING([for ConvertTextToNumber extension integration])
+if test "z$enable_ext_ct2n" = "z" -o "z$enable_ext_ct2n" = "zno" ; then
+ AC_MSG_RESULT([no])
+ CT2N_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ BUILD_TYPE="$BUILD_TYPE CT2N"
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N"
+ CT2N_EXTENSION_PACK="451ccf439a36a568653b024534669971-ConvertTextToNumber_1.3.2.oxt"
+fi
+AC_SUBST(CT2N_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Numbertext extension
+dnl ===================================================================
+AC_MSG_CHECKING([for Numbertext extension integration])
+if test "z$enable_ext_numbertext" = "z" -o "z$enable_ext_numbertext" = "zno" ; then
+ AC_MSG_RESULT([no])
+ NUMBERTEXT_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NUMBERTEXT"
+ NUMBERTEXT_EXTENSION_PACK="b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt"
+fi
+AC_SUBST(NUMBERTEXT_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Hungarian Cross-reference Toolbar extension
+dnl ===================================================================
+AC_MSG_CHECKING([for Hungarian Cross-reference Toolbar extension integration])
+if test "z$enable_ext_hunart" = "z" -o "z$enable_ext_hunart" = "zno" ; then
+ AC_MSG_RESULT([no])
+ HUNART_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_HUNART"
+ HUNART_EXTENSION_PACK="b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt"
+fi
+AC_SUBST(HUNART_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Typography Toolbar extension
+dnl ===================================================================
+AC_MSG_CHECKING([for Typography Toolbar extension integration])
+if test "z$enable_ext_typo" = "z" -o "z$enable_ext_typo" = "zno" ; then
+ AC_MSG_RESULT([no])
+ TYPO_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_TYPO"
+ TYPO_EXTENSION_PACK="9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt"
+fi
+AC_SUBST(TYPO_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Google Docs extension
+dnl ===================================================================
+AC_MSG_CHECKING([for Google Docs extension integration])
+if test "z$enable_ext_google_docs" = "z" -o "z$enable_ext_google_docs" = "zno" ; then
+ AC_MSG_RESULT([no])
+ GOOGLE_DOCS_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_GOOGLE_DOCS"
+ GOOGLE_DOCS_EXTENSION_PACK="dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt"
+fi
+AC_SUBST(GOOGLE_DOCS_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include NLPSolver extension
+dnl ===================================================================
+AC_MSG_CHECKING([for NLPSolver extension integration])
+if test "z$enable_ext_nlpsolver" = "z" -o "z$enable_ext_nlpsolver" = "zno" ; then
+ AC_MSG_RESULT([no])
+else
+ AC_MSG_RESULT([yes])
+ BUILD_TYPE="$BUILD_TYPE NLPSOLVER"
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER"
+fi
+
+dnl ===================================================================
+dnl Test whether to include LanguageTool extension
+dnl ===================================================================
+AC_MSG_CHECKING([for LanguageTool extension integration])
+if test "z$with_languagetool" = "z" -o "z$with_languagetool" = "zno" ; then
+ AC_MSG_RESULT([no])
+else
+ AC_MSG_RESULT([yes])
+ BUILD_TYPE="$BUILD_TYPE LANGUAGETOOL"
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL"
+fi
+
+dnl ===================================================================
+dnl Test whether to include oooblogger extension
+dnl ===================================================================
+AC_MSG_CHECKING([for oooblogger extension integration])
+if test "z$enable_ext_oooblogger" = "z" -o "z$enable_ext_oooblogger" = "zno" ; then
+ AC_MSG_RESULT([no])
+ OOOBLOGGER_EXTENSION_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_OOOBLOGGER"
+ OOOBLOGGER_EXTENSION_PACK="b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt"
+fi
+AC_SUBST(OOOBLOGGER_EXTENSION_PACK)
+
+dnl ===================================================================
+dnl Test whether to include Sun Professional Template Pack
+dnl ===================================================================
+AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
+if test "z$with_sun_templates" = "z" -o "z$with_sun_templates" = "zno" ; then
+ SUNTEMPLATES_LANG=""
+ AC_MSG_RESULT([no integration])
+else
+ SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
+ sun_supported_langs="en-US de it fr es hu"
+ if test "z$with_sun_templates" = "zyes" ; then
+ wanted_sun_templates="$sun_supported_langs"
+ else
+ # check whether the langs are supported by Sun
+ wanted_sun_templates=
+ for lang in $with_sun_templates ; do
+ if test -n "`echo $sun_supported_langs | grep "$lang"`" ; then
+ wanted_sun_templates="$wanted_sun_templates $lang"
+ fi
+ done
+ fi
+ SUNTEMPLATES_LANG=
+ SUNTEMPLATES_DE_PACK=
+ SUNTEMPLATES_EN_US_PACK=
+ SUNTEMPLATES_ES_PACK=
+ SUNTEMPLATES_FR_PACK=
+ SUNTEMPLATES_HU_PACK=
+ SUNTEMPLATES_IT_PACK=
+ # check whether the langs are requested at all
+ for lang in $wanted_sun_templates ; do
+ if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then
+ SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
+ case $lang in
+ "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
+ "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
+ "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
+ "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
+ "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
+ "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
+ esac
+ fi
+ done
+ AC_MSG_RESULT([$SUNTEMPLATES_LANG])
+fi
+AC_SUBST(SUNTEMPLATES_LANG)
+AC_SUBST(SUNTEMPLATES_DE_PACK)
+AC_SUBST(SUNTEMPLATES_EN_US_PACK)
+AC_SUBST(SUNTEMPLATES_ES_PACK)
+AC_SUBST(SUNTEMPLATES_FR_PACK)
+AC_SUBST(SUNTEMPLATES_HU_PACK)
+AC_SUBST(SUNTEMPLATES_IT_PACK)
+
+dnl ===================================================================
dnl Test whether to include fonts
dnl ===================================================================
AC_MSG_CHECKING([whether to include third-party fonts])
@@ -6545,6 +7619,18 @@ else
fi
AC_SUBST(WITH_FONTS)
+AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
+if test "$with_agfa_monotype_fonts" = "yes" ; then
+ AC_MSG_RESULT([yes])
+ WITH_AGFA_MONOTYPE_FONTS=YES
+ SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
+ BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
+else
+ AC_MSG_RESULT([no])
+ WITH_AGFA_MONOTYPE_FONTS=NO
+fi
+AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
+
dnl ===================================================================
dnl Test whether to include ppds
dnl ===================================================================
@@ -6572,7 +7658,120 @@ else
fi
AC_SUBST(WITHOUT_AFMS)
-AC_SUBST(SCPDEFS)
+dnl ===================================================================
+dnl Test whether to include extra galleries
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include extra galleries])
+if test "z$enable_extra_gallery" = "z" -o "z$enable_extra_gallery" = "zno" ; then
+ AC_MSG_RESULT([no])
+ WITH_EXTRA_GALLERY=NO
+ OOOP_GALLERY_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ WITH_EXTRA_GALLERY=YES
+ BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
+ SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
+ OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
+fi
+AC_SUBST(WITH_EXTRA_GALLERY)
+AC_SUBST(OOOP_GALLERY_PACK)
+
+dnl ===================================================================
+dnl Test whether to include extra templates
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include extra templates])
+if test "z$enable_extra_template" = "z" -o "z$enable_extra_template" = "zno" ; then
+ AC_MSG_RESULT([no])
+ WITH_EXTRA_TEMPLATE=NO
+ OOOP_TEMPLATES_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ WITH_EXTRA_TEMPLATE=YES
+ BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
+ SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
+ OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
+fi
+AC_SUBST(WITH_EXTRA_TEMPLATE)
+AC_SUBST(OOOP_TEMPLATES_PACK)
+
+dnl ===================================================================
+dnl Test whether to include extra samples
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include extra samples])
+if test "z$enable_extra_sample" = "z" -o "z$enable_extra_sample" = "zno" ; then
+ AC_MSG_RESULT([no])
+ WITH_EXTRA_SAMPLE=NO
+ OOOP_SAMPLES_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ WITH_EXTRA_SAMPLE=YES
+ BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
+ SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
+ OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
+fi
+AC_SUBST(WITH_EXTRA_SAMPLE)
+AC_SUBST(OOOP_SAMPLES_PACK)
+
+dnl ===================================================================
+dnl Test whether to include extra fonts
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include extra fonts])
+if test "z$enable_extra_font" = "z" -o "z$enable_extra_font" = "zno" ; then
+ AC_MSG_RESULT([no])
+ WITH_EXTRA_FONT=NO
+ OOOP_FONTS_PACK=""
+else
+ AC_MSG_RESULT([yes])
+ WITH_EXTRA_FONT=YES
+ BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
+ SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
+ OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
+fi
+AC_SUBST(WITH_EXTRA_FONT)
+AC_SUBST(OOOP_FONTS_PACK)
+
+dnl ===================================================================
+dnl Test whether to build global menu support
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build global menu support])
+if test "z$enable_lomenubar" = "z" -o "z$enable_lomenubar" = "zno" ; then
+ AC_MSG_RESULT([no])
+ ENABLE_LOMENUBAR="FALSE"
+else
+ AC_MSG_RESULT([yes])
+ ENABLE_LOMENUBAR="TRUE"
+fi
+AC_SUBST(ENABLE_LOMENUBAR)
+
+dnl ===================================================================
+dnl Test whether build target is Release Build
+dnl ===================================================================
+AC_MSG_CHECKING([whether build target is Release Build])
+if test "z$enable_release_build" = "z" -o "z$enable_release_build" = "zno" ; then
+ AC_MSG_RESULT([no])
+ ENABLE_RELEASE_BUILD="FALSE"
+else
+ AC_MSG_RESULT([yes])
+ ENABLE_RELEASE_BUILD="TRUE"
+fi
+AC_SUBST(ENABLE_RELEASE_BUILD)
+
+dnl ===================================================================
+dnl Test whether to enable ActiveX embedding
+dnl ===================================================================
+if test "$_os" = "WINNT"; then
+ AC_MSG_CHECKING([whether to enable ActiveX embedding of LibreOffice components])
+ if test "$enable_activex_component" = "yes" -o "$enable_activex_component" = "TRUE" -o "$enable_activex_component" = ""; then
+ ENABLE_ACTIVEX_COMPONENT="TRUE"
+ AC_MSG_RESULT([yes])
+ SCPDEFS="$SCPDEFS -DWITH_ACTIVEX_COMPONENT"
+ else
+ ENABLE_ACTIVEX_COMPONENT=""
+ AC_MSG_RESULT([no])
+ fi
+ AC_SUBST(ENABLE_ACTIVEX_COMPONENT)
+ AC_SUBST(SCPDEFS)
+fi
AC_MSG_CHECKING([whether and how to use Xinerama])
if test "$_os" = "Darwin"; then
@@ -6595,7 +7794,7 @@ elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
XINERAMA_LINK=dynamic
elif test -e "$XLIB/libXinerama.a"; then
# static version
- if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
+ if echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
USE_XINERAMA=YES
XINERAMA_LINK=static
else
@@ -6624,173 +7823,292 @@ elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
fi
else
+ USE_XINERAMA=NO
+ XINERAMA_LINK=none
AC_MSG_RESULT([no])
fi
AC_SUBST(USE_XINERAMA)
AC_SUBST(XINERAMA_LINK)
dnl ===================================================================
-dnl Test whether to build librsvg or rely on the system version
+dnl Checks for librsvg
dnl ===================================================================
-AC_MSG_CHECKING([whether to build own version of librsvg])
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_LIBRSVG=NO
- AC_MSG_RESULT([yes])
- ;;
- Darwin*)
- SYSTEM_LIBRSVG=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
+dnl ENABLE_LIBRSVG is set to "" (for NO), SYSTEM or INTERNAL. The
+dnl SYSTEM_LIBRSVG, SYSTEM_GDKPIXBUF etc are redundant.
+
+ENABLE_LIBRSVG=""
+LIBRSVG_CFLAGS=""
+LIBRSVG_LIBS=""
+
+AC_MSG_CHECKING([what librsvg to use])
+
+case "$enable_librsvg" in
+no|disable)
+ AC_MSG_RESULT([none])
+ enable_librsvg=no
+ ;;
+
+""|yes|auto)
+ if test $build_os = cygwin -o \
+ $_os = Darwin; then
+ dnl When building on/for these OSes always use the internal one,
+ dnl if at all. Add more OSes above as needed.
+ AC_MSG_RESULT([internal])
+ enable_librsvg=internal
+ elif test $_os = iOS -o $_os = Android; then
+ AC_MSG_RESULT([none])
+ enable_librsvg=no
+ else
+ if test "$with_system_libs" = yes; then
+ AC_MSG_RESULT([system])
+ PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
+ enable_librsvg=system
+ elif test "$with_system_libs" = no; then
+ AC_MSG_RESULT([internal])
+ enable_librsvg=internal
+ else
+ AC_MSG_RESULT([checking further])
+ PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14,, [:])
+ if test -z "$LIBRSVG_PKG_ERRORS"; then
+ enable_librsvg=system
+ else
+ enable_librsvg=internal
+ fi
+ fi
+ fi
+ ;;
+
+internal)
+ AC_MSG_RESULT([internal])
+ ;;
+
+system)
+ if test $_os = WINNT -a "$WITH_MINGW" != yes; then
+ AC_MSG_ERROR([Must use internal librsvg when building with MSVC])
+ fi
+ AC_MSG_RESULT([system])
+ PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14)
+ ;;
+
+*)
+ AC_MSG_ERROR([Incorrect --enable-librsvg option])
+ ;;
+esac
+
+dnl By now enable_librsvg should be "system", "internal" or "no"
+case $enable_librsvg in
+system)
+ ENABLE_LIBRSVG=SYSTEM
SYSTEM_LIBRSVG=YES
- AC_MSG_RESULT([no])
+ ;;
+
+internal)
+ ENABLE_LIBRSVG=INTERNAL
+ SYSTEM_LIBRSVG=NO
+ BUILD_TYPE="$BUILD_TYPE LIBRSVG"
+ ;;
+
+no)
+ ENABLE_LIBRSVG=NO
+ SYSTEM_LIBRSVG=NO
+ ENABLE_CAIRO=
+ ;;
+
+*)
+ AC_MSG_ERROR([Internal configure script error, invalid enable_librsvg value "$enable_librsvg"])
;;
esac
+
+AC_SUBST(ENABLE_LIBRSVG)
+AC_SUBST(LIBRSVG_CFLAGS)
+AC_SUBST(LIBRSVG_LIBS)
AC_SUBST(SYSTEM_LIBRSVG)
dnl ===================================================================
dnl Test whether to build gdk-pixbuf or rely on the system version
dnl ===================================================================
-AC_MSG_CHECKING([whether to build own version of gdk-pixbuf])
-
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_GDKPIXBUF=NO
- AC_MSG_RESULT([yes])
- ;;
- Darwin*)
- SYSTEM_GDKPIXBUF=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
- SYSTEM_GDKPIXBUF=YES
- AC_MSG_RESULT([no])
- ;;
-esac
+
+AC_MSG_CHECKING([whether to use the system gdk-pixbuf])
+
+dnl As long as the only thing we need gdk-pxbuf for is below
+dnl librsvg, use the same --enable-librsvg (possibly implied
+dnl by --with-system-libs) to override this.
+
+if test "$SYSTEM_LIBRSVG" = YES; then
+ SYSTEM_GDKPIXBUF=YES
+ AC_MSG_RESULT([yes])
+else
+ case "$_os" in
+ WINNT|Darwin|iOS|Android)
+ SYSTEM_GDKPIXBUF=NO
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ SYSTEM_GDKPIXBUF=YES
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
+fi
AC_SUBST(SYSTEM_GDKPIXBUF)
dnl ===================================================================
-dnl Test whether to build glib or rely on the system version
+dnl Test whether to build GLib or rely on the system version
dnl ===================================================================
-AC_MSG_CHECKING([whether to build own version of glib])
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_GLIB=NO
- AC_MSG_RESULT([yes])
- ;;
- Darwin*)
- SYSTEM_GLIB=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
- SYSTEM_GLIB=YES
- AC_MSG_RESULT([no])
- ;;
-esac
+AC_MSG_CHECKING([whether to use the system GLib])
+
+dnl As long as the only thing we need GLib for is below
+dnl librsvg, use the same --enable-librsvg (possibly implied
+dnl by --with-system-libs) to override this.
+
+if test "$SYSTEM_LIBRSVG" = YES; then
+ SYSTEM_GLIB=YES
+ AC_MSG_RESULT([yes])
+else
+ case "$_os" in
+ WINNT|Darwin|iOS|Android)
+ SYSTEM_GLIB=NO
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ SYSTEM_GLIB=YES
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
+fi
AC_SUBST(SYSTEM_GLIB)
dnl ===================================================================
-dnl Test whether to build gettext or rely on the system version
+dnl Test whether to build gettext runtime (libintl) or rely on the
+dnl system version
dnl ===================================================================
-AC_MSG_CHECKING([whether to build own version of gettext])
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_GETTEXT=NO
- AC_MSG_RESULT([yes])
- ;;
- Darwin*)
- SYSTEM_GETTEXT=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
- SYSTEM_GETTEXT=YES
- AC_MSG_RESULT([no])
- ;;
-esac
+AC_MSG_CHECKING([whether to use the system gettext runtime])
+
+if test "$with_system_gettext" = yes -o \( "$with_system_libs" = yes -a "$with_system_gettext" != no \); then
+ SYSTEM_GETTEXT=YES
+ AC_MSG_RESULT([yes])
+else
+ case "$_os" in
+ WINNT|Darwin|iOS|Android)
+ SYSTEM_GETTEXT=NO
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ SYSTEM_GETTEXT=YES
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
+fi
AC_SUBST(SYSTEM_GETTEXT)
dnl ===================================================================
dnl Test whether to build libcroco or rely on the system version
dnl ===================================================================
-AC_MSG_CHECKING([whether to build own version of libcroco])
-
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_LIBCROCO=NO
- AC_MSG_RESULT([yes])
- ;;
- Darwin*)
- SYSTEM_LIBCROCO=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
- SYSTEM_LIBCROCO=YES
- AC_MSG_RESULT([no])
- ;;
-esac
+
+AC_MSG_CHECKING([whether to use the system libcroco])
+
+dnl As long as the only thing we need libcroco for is below
+dnl librsvg, use the same --enable-librsvg (possibly implied
+dnl by --with-system-libs) to override this.
+
+if test "$SYSTEM_LIBRSVG" = YES; then
+ SYSTEM_LIBCROCO=YES
+ AC_MSG_RESULT([yes])
+else
+ case "$_os" in
+ WINNT|Darwin|iOS|Android)
+ SYSTEM_LIBCROCO=NO
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ SYSTEM_LIBCROCO=YES
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
+fi
AC_SUBST(SYSTEM_LIBCROCO)
dnl ===================================================================
-dnl Test whether to build pango or rely on the system version
+dnl Test whether to build Pango or rely on the system version
dnl ===================================================================
-AC_MSG_CHECKING([whether to build own version of pango])
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_PANGO=NO
- AC_MSG_RESULT([yes])
- ;;
- Darwin*)
- SYSTEM_PANGO=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
- SYSTEM_PANGO=YES
- AC_MSG_RESULT([no])
- ;;
-esac
+AC_MSG_CHECKING([whether to use the system pango])
+
+dnl As long as the only thing we need Pango for is below
+dnl librsvg, use the same --enable-librsvg (possibly implied
+dnl by --with-system-libs) to override this.
+
+if test "$SYSTEM_LIBRSVG" = YES; then
+ SYSTEM_PANGO=YES
+ AC_MSG_RESULT([yes])
+else
+ case "$_os" in
+ WINNT|Darwin|iOS|Android)
+ SYSTEM_PANGO=NO
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ SYSTEM_PANGO=YES
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
+fi
AC_SUBST(SYSTEM_PANGO)
dnl ===================================================================
dnl Test whether to build libgsf or rely on the system version
dnl ===================================================================
-AC_MSG_CHECKING([whether to build own version of libgsf])
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_LIBGSF=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
- SYSTEM_LIBGSF=YES
- AC_MSG_RESULT([no])
- ;;
-esac
+AC_MSG_CHECKING([whether to use the system libgsf])
+
+dnl As long as the only thing we need libgsf for is below librsvg (is
+dnl it?), use the same --enable-librsvg (possibly implied by
+dnl --with-system-libs) to override this.
+
+if test "$SYSTEM_LIBRSVG" = YES; then
+ SYSTEM_LIBGSF=YES
+ AC_MSG_RESULT([yes])
+else
+ case "$_os" in
+ WINNT|Darwin|iOS|Android)
+ SYSTEM_LIBGSF=NO
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ SYSTEM_LIBGSF=YES
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
+fi
AC_SUBST(SYSTEM_LIBGSF)
dnl ===================================================================
dnl Test whether to build libpng or rely on the system version
dnl ===================================================================
-AC_MSG_CHECKING([whether to build own version of libpng])
-
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_LIBPNG=NO
- AC_MSG_RESULT([yes])
- ;;
- Darwin*)
- SYSTEM_LIBPNG=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
- SYSTEM_LIBPNG=YES
- AC_MSG_RESULT([no])
- ;;
-esac
+
+AC_MSG_CHECKING([whether to use the system libpng])
+
+dnl How should and does this interact with the checks for libpng
+dnl related to use of libpng in the quickstarter above? This needs to
+dnl be unified.
+
+if test "$with_system_libpng" = yes -o \( "$with_system_libs" = yes -a "$with_system_libpng" != no \); then
+ SYSTEM_LIBPNG=YES
+ AC_MSG_RESULT([yes])
+else
+ case "$_os" in
+ WINNT|Darwin|iOS|Android)
+ SYSTEM_LIBPNG=NO
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ SYSTEM_LIBPNG=YES
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
AC_SUBST(SYSTEM_LIBPNG)
dnl ===================================================================
@@ -6800,34 +8118,44 @@ dnl FIXME: this is currently because we have jpeg-6b for our filters
dnl and jpeg-8 as dependency for librsvg
dnl this should be unified into using only one version for both
-AC_MSG_CHECKING([whether to build own version of libjpeg])
+AC_MSG_CHECKING([whether to use the system libjpeg])
if test "$SYSTEM_JPEG" == "YES"; then
-SYSTEM_LIBJPEG=YES
-else
-case "$_os" in
- WINNT*) # Windows
- SYSTEM_LIBJPEG=NO
- AC_MSG_RESULT([yes])
- ;;
- Darwin*)
- SYSTEM_LIBJPEG=NO
- AC_MSG_RESULT([yes])
- ;;
- *)
- SYSTEM_LIBJPEG=YES
- AC_MSG_RESULT([no])
- ;;
-esac
-fi
-
-if test "$SYSTEM_LIBJPEG" == "YES"; then
- AC_MSG_RESULT([no])
+ SYSTEM_LIBJPEG=YES
+ AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([yes])
+ case "$_os" in
+ WINNT|Darwin|iOS|Android)
+ SYSTEM_LIBJPEG=NO
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ SYSTEM_LIBJPEG=YES
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
fi
AC_SUBST(SYSTEM_LIBJPEG)
+dnl ===================================================================
+dnl Check for runtime JVM search path
+dnl ===================================================================
+if test "$SOLAR_JAVA" != ""; then
+ AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
+ if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then
+ AC_MSG_RESULT([yes])
+ if ! test -d "$with_jvm_path"; then
+ AC_MSG_ERROR(["$with_jvm_path" not a directory])
+ fi
+ if ! test -d "$with_jvm_path"jvm; then
+ AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
+ fi
+ JVM_ONE_PATH_CHECK="$with_jvm_path"
+ AC_SUBST(JVM_ONE_PATH_CHECK)
+ else
+ AC_MSG_RESULT([no])
+ fi
+fi
dnl ===================================================================
dnl Test for the presence of Ant and that it works
@@ -6854,33 +8182,28 @@ else
while test -h "$ANT"; do
a_cwd=`pwd`
a_basename=`basename "$ANT"`
- a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
+ a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
cd "`dirname "$ANT"`"
cd "`dirname "$a_script"`"
ANT="`pwd`"/"`basename "$a_script"`"
cd "$a_cwd"
done
- if test "$_os" = "OS2"; then
- ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
- export ANT_HOME
- fi
-
AC_MSG_CHECKING([if $ANT works])
cat > conftest.java << EOF
public class conftest {
- int testmethod(int a, int b) {
+ int testmethod(int a, int b) {
return a + b;
- }
+ }
}
EOF
cat > conftest.xml << EOF
<project name="conftest" default="conftest">
- <target name="conftest">
+ <target name="conftest">
<javac srcdir="." includes="conftest.java">
- </javac>
- </target>
+ </javac>
+ </target>
</project>
EOF
oldJAVA_HOME=$JAVA_HOME
@@ -6892,7 +8215,7 @@ EOF
fi
AC_TRY_EVAL(ant_cmd)
if test $? = 0 && test -f ./conftest.class ; then
- AC_MSG_RESULT([Ant works])
+ AC_MSG_RESULT([Ant works])
if test -z "$WITH_ANT_HOME"; then
ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
if test -z "$ANT_HOME"; then
@@ -6921,10 +8244,10 @@ dnl Checking for ant.jar
if test "$ANT_HOME" != "NO_ANT_HOME"; then
AC_MSG_CHECKING([Ant lib directory])
if test -f $ANT_HOME/lib/ant.jar; then
- ANT_LIB="$ANT_HOME/lib"
+ ANT_LIB="$ANT_HOME/lib"
else
if test -f $ANT_HOME/ant.jar; then
- ANT_LIB="$ANT_HOME"
+ ANT_LIB="$ANT_HOME"
else
if test -f /usr/share/java/ant.jar; then
ANT_LIB=/usr/share/java
@@ -6940,7 +8263,7 @@ if test "$ANT_HOME" != "NO_ANT_HOME"; then
else
AC_MSG_ERROR([Ant libraries not found!])
fi
- fi
+ fi
fi
fi
fi
@@ -6948,16 +8271,11 @@ if test "$ANT_HOME" != "NO_ANT_HOME"; then
AC_MSG_RESULT([Ant lib directory found.])
fi
AC_SUBST(ANT_LIB)
-fi
ant_minver=1.6.0
-# update for more extensions...
-if test "$ENABLE_MEDIAWIKI" = "YES"; then
- ant_minver=1.7.0
-fi
ant_minminor1=`echo $ant_minver | cut -d"." -f2`
-AC_MSG_CHECKING([whether ant is >= $ant_minver])
+AC_MSG_CHECKING([whether Ant is >= $ant_minver])
ant_version=`$ANT -version | $AWK '{ print $4; }'`
ant_version_major=`echo $ant_version | cut -d. -f1`
ant_version_minor=`echo $ant_version | cut -d. -f2`
@@ -6969,11 +8287,11 @@ if test "$ant_version_major" -ge "2"; then
elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
AC_MSG_RESULT([yes, $ant_version])
else
- AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
+ AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
fi
if test "$ENABLE_MEDIAWIKI" = "YES"; then
-AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
+AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
rm -rf confdir
mkdir confdir
cat > conftest.java << EOF
@@ -7007,7 +8325,7 @@ EOF
fi
AC_TRY_EVAL(ant_cmd)
if test $? = 0 && test -f ./conftest.class ; then
- AC_MSG_RESULT([yes])
+ AC_MSG_RESULT([yes])
rm -rf confdir
else
echo "configure: Ant test failed" >&5
@@ -7018,11 +8336,12 @@ EOF
fi
fi
rm -f conftest* core core.* *.core
+fi
OOO_JUNIT_JAR=
if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
AC_MSG_CHECKING([for JUnit 4])
- if test "$with_junit" == "yes"; then
+ if test "$with_junit" = "yes"; then
if test -e /usr/share/java/junit4.jar; then
OOO_JUNIT_JAR=/usr/share/java/junit4.jar
else
@@ -7041,7 +8360,15 @@ if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
"$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
grep org/junit/Before.class > /dev/null 2>&5
if test $? -eq 0; then
- AC_MSG_RESULT([$OOO_JUNIT_JAR])
+ # check if either class-path entry is available for hamcrest or
+ # it's bundled
+ if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |grep hamcrest || \
+ "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |grep -q 'Class-Path: hamcrest'; then
+ AC_MSG_RESULT([$OOO_JUNIT_JAR])
+ else
+ AC_MSG_ERROR([your junit jar neither sets a classpath nor includes hamcrest; please
+provide a full junit jar or use --without-junit])
+ fi
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
@@ -7051,71 +8378,69 @@ location (/usr/share/java), specify its pathname via
fi
AC_SUBST(OOO_JUNIT_JAR)
+dnl ===================================================================
+dnl Dealing with l10n options
+dnl ===================================================================
+GIT_REPO_NAMES="artwork base calc components extensions extras filters help impress libs-core libs-extern libs-extern-sys libs-gui postprocess sdk testing ure writer"
AC_MSG_CHECKING([which languages to be built])
+# get list of all languages
+# generate shell variable from completelangiso= from solenv/inc/langlist.mk
+# the sed command does the following:
+# + if a line ends with a backslash, append the next line to it
+# + adds " on the beginning of the value (after =)
+# + adds " at the end of the value
+# + removes en-US; we want to put it on the beginning
+# + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
+[eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' solenv/inc/langlist.mk)]
+ALL_LANGS="en-US $completelangiso"
+# check the configured localizations
WITH_LANG="$with_lang"
if test -z "$WITH_LANG"; then
AC_MSG_RESULT([en-US])
else
AC_MSG_RESULT([$WITH_LANG])
-fi
+ GIT_REPO_NAMES="$GIT_REPO_NAMES translations"
+fi
+# check that the list is valid
+for lang in $WITH_LANG ; do
+ test "$lang" = "ALL" && continue;
+ test "$lang" = "kid" && continue;
+ # need to check for the exact string, so add space before and after the list of all languages
+ all_langs=" $ALL_LANGS "
+ test `echo "$all_langs" | sed "s|.* $lang .*|found|"` = "found" && continue;
+ AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS])
+done
+AC_SUBST(ALL_LANGS)
AC_SUBST(WITH_LANG)
+AC_SUBST(GIT_REPO_NAMES)
-AC_MSG_CHECKING([which languages have poor help localizations])
-WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
-if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
- AC_MSG_RESULT([none])
-else
- AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
-fi
-AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
-
-AC_MSG_CHECKING([which dictionaries to include])
-if test -z "$with_dict"; then
- WITH_DICT=,ALL,
- AC_MSG_RESULT([ALL])
-else
- WITH_DICT=","$with_dict","
- AC_MSG_RESULT([$with_dict])
-fi
-AC_SUBST(WITH_DICT)
-
-AC_MSG_CHECKING([for additional 'intro' bitmaps])
-INTRO_BITMAPS=
-if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
- INTRO_BITMAPS=
+AC_MSG_CHECKING([for another 'intro' bitmap])
+INTRO_BITMAP=
+if test -z "$with_intro_bitmap" -o "$with_intro_bitmap" = "no" ; then
+ INTRO_BITMAP=
AC_MSG_RESULT([none])
else
- for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
- case "$bitmap" in
- *.bmp) ;;
- *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
- esac
- if test -n "$bitmap" ; then
- INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
- fi
- done
- AC_MSG_RESULT([$INTRO_BITMAPS])
+ case "$with_intro_bitmap" in
+ *.png) INTRO_BITMAP="$with_intro_bitmap" ;;
+ *) AC_MSG_WARN([Intro bitmap should be a .png file!]) ;;
+ esac
+ AC_MSG_RESULT([$INTRO_BITMAP])
fi
-AC_SUBST(INTRO_BITMAPS)
+AC_SUBST(INTRO_BITMAP)
-AC_MSG_CHECKING([for additional 'about' bitmaps])
-ABOUT_BITMAPS=
-if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
- ABOUT_BITMAPS=
+AC_MSG_CHECKING([for another 'about' bitmap])
+ABOUT_BITMAP=
+if test -z "$with_about_bitmap" -o "$with_about_bitmap" = "no" ; then
+ ABOUT_BITMAP=
AC_MSG_RESULT([none])
else
- for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
- case "$bitmap" in
- *.bmp) ;;
- *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
- esac
- if test -n "$bitmap" ; then
- ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
- fi
- done
- AC_MSG_RESULT([$ABOUT_BITMAPS])
+ case "$with_about_bitmap" in
+ *.png) ABOUT_BITMAP="$with_about_bitmap" ;;
+ *) AC_MSG_WARN([About bitmap should be a .png file!]) ;;
+ esac
+ AC_MSG_RESULT([$ABOUT_BITMAP])
fi
-AC_SUBST(ABOUT_BITMAPS)
+AC_SUBST(ABOUT_BITMAP)
OOO_VENDOR=
AC_MSG_CHECKING([for vendor])
@@ -7142,7 +8467,7 @@ if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
ENABLE_STATIC_GTK="TRUE"
AC_MSG_RESULT([yes])
else
- ENABLE_STATIC_GTK="FALSE"
+ ENABLE_STATIC_GTK="FALSE"
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_STATIC_GTK)
@@ -7152,7 +8477,7 @@ if test -n "$enable_layout" && test "$enable_layout" != "no"; then
ENABLE_LAYOUT="TRUE"
AC_MSG_RESULT([yes])
else
- ENABLE_LAYOUT="FALSE"
+ ENABLE_LAYOUT="FALSE"
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_LAYOUT)
@@ -7176,7 +8501,26 @@ fi
AC_SUBST(VERBOSE)
dnl ===================================================================
-dnl Hook up OOos nodep environmental variable to automake's equivalent
+dnl Use zenity during build
+dnl ===================================================================
+AC_MSG_CHECKING([whether to use zenity during build])
+if test "$enable_zenity" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_PATH_PROGS( ZNTY, zenity )
+ if test -z "$ZNTY"; then
+ ENABLE_ZENITY=FALSE
+ else
+ ENABLE_ZENITY=TRUE
+ fi
+else
+ ENABLE_ZENITY=FALSE
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_ZENITY)
+
+
+dnl ===================================================================
+dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
dnl --enable-dependency-tracking configure option
dnl ===================================================================
AC_MSG_CHECKING([whether to enable dependency tracking])
@@ -7189,13 +8533,42 @@ fi
AC_SUBST(nodep)
dnl ===================================================================
+dnl Number of CPUs to use during the build
+dnl ===================================================================
+AC_MSG_CHECKING([for number of processors to use])
+if test "z`uname -s`" = "zDarwin" -o "z`uname -s`" = "zNetBSD" -o "z`uname -s`" = "zOpenBSD"; then
+ BUILD_NCPUS=`sysctl -n hw.ncpu`
+else
+ BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
+fi
+if test "z$with_num_cpus" != "z"; then
+ BUILD_NCPUS=$with_num_cpus
+fi
+if echo "$BUILD_NCPUS" | $EGREP -q '^[[[:space:]]]*0[[[:space:]]]*$' ; then
+ BUILD_NCPUS=1
+fi
+AC_MSG_RESULT([$BUILD_NCPUS])
+AC_SUBST(BUILD_NCPUS)
+
+dnl ===================================================================
+dnl Number of parallel jobs to be executed by dmake
+dnl ===================================================================
+AC_MSG_CHECKING([for maximum of jobs per processor])
+BUILD_MAX_JOBS="1"
+if test "z$with_max_jobs" != "z"; then
+ BUILD_MAX_JOBS="$with_max_jobs"
+else
+ if test -n "$enable_icecream" && test "$enable_icecream" != "no" ; then
+ BUILD_MAX_JOBS="10"
+ fi
+fi
+AC_MSG_RESULT([$BUILD_MAX_JOBS])
+AC_SUBST(BUILD_MAX_JOBS)
+
+dnl ===================================================================
dnl Setting up the environment.
dnl ===================================================================
-echo "********************************************************************"
-echo "* *"
-echo "* Setting up the build environment variables. *"
-echo "* *"
-echo "********************************************************************"
+echo "setting up the build environment variables..."
if test -z "$COMPATH"; then
AC_MSG_ERROR([No compiler found.])
@@ -7214,30 +8587,39 @@ AC_SUBST(LOCAL_SOLVER)
AC_SUBST(BUILD_TYPE)
-# make sure config.guess is +x; we execute config.guess, so it has to be so;
+# make sure config.guess is +x; we execute config.guess, so it has to be so;
chmod +x ./config.guess
-AC_OUTPUT([set_soenv Makefile])
-
-dnl Executing the set_soenv script to setup the environment variables.
-chmod a+x set_soenv
-if test -z "$enable_check_only"; then
- './set_soenv'
-else
- echo
- echo Test Complete
- echo No environment file will be generated
- echo
- num_warnings=`wc -l warn`
- _num=`echo $num_warnings | $AWK '{ print $1 }'`
- if test $_num -gt 0; then
- echo The following warning\(s\) were generated by configure
- echo ----------------------------------------------------
- echo
- cat warn
- echo
- else
- echo There were no warnings
- fi
- echo
-fi
+dnl Setting up the post_download check script
+dnl Using autoconf here, so that the migration from the previous state
+dnl (checks for the additional Windows downloads were directly in
+dnl configure.in) is as easy as possible
+echo "setting up the post_download check script"
+autoconf post_download.in > post_download
+chmod +x post_download
+
+# Generate a configuration timestamp we can use for deps
+if test -f set_soenv; then
+ mv -f set_soenv set_soenv.last
+else
+ echo > set_soenv.last
+fi
+
+AC_OUTPUT([set_soenv Makefile bin/repo-list])
+
+# touch the config timestamp file set_soenv.stamp
+if test ! -f set_soenv.stamp; then
+ echo > set_soenv.stamp
+elif diff set_soenv set_soenv.last >/dev/null 2>&1; then
+ echo "Configuration unchanged - avoiding scp2 stamp update"
+else
+ echo > set_soenv.stamp
+fi
+
+dnl Run the set_soenv script to setup the *Env.sh script that sets
+dnl environment variables for the build.
+chmod +x set_soenv
+
+./set_soenv
+
+dnl vim:set shiftwidth=4 softtabstop=4 expandtab: