| dnl * ************************************************************* | |
| dnl * | |
| dnl * Licensed to the Apache Software Foundation (ASF) under one | |
| dnl * or more contributor license agreements. See the NOTICE file | |
| dnl * distributed with this work for additional information | |
| dnl * regarding copyright ownership. The ASF licenses this file | |
| dnl * to you under the Apache License, Version 2.0 (the | |
| dnl * "License"); you may not use this file except in compliance | |
| dnl * with the License. You may obtain a copy of the License at | |
| dnl * | |
| dnl * http://www.apache.org/licenses/LICENSE-2.0 | |
| dnl * | |
| dnl * Unless required by applicable law or agreed to in writing, | |
| dnl * software distributed under the License is distributed on an | |
| dnl * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| dnl * KIND, either express or implied. See the License for the | |
| dnl * specific language governing permissions and limitations | |
| dnl * under the License. | |
| dnl * | |
| dnl * ************************************************************* | |
| AC_REVISION( $Revision$ ) | |
| dnl macOS needs autoconf 2.72 (2.71 mis-detects the toolchain there); | |
| dnl other platforms remain on the older 2.71 floor. | |
| m4_define([AOO_REQUIRED_AUTOCONF], | |
| [m4_if(m4_esyscmd_s([uname]), [Darwin], [2.72], [2.71])]) | |
| AC_PREREQ(AOO_REQUIRED_AUTOCONF) | |
| AC_INIT | |
| echo "$@" >config.parms | |
| AC_ARG_WITH(dmake-path, | |
| [ --with-dmake-path=<PATH TO EXECUTABLE> Specify the location of dmake ], | |
| [ DMAKE_PATH="$withval" | |
| ]) | |
| AC_ARG_WITH(dmake-url, | |
| [ --with-dmake-url=<URL> Specify the location of downloadable dmake source code. For example: | |
| https://github.com/jimjag/dmake/archive/v4.13.2/dmake-4.13.2.tar.gz | |
| Note that dmake is under GPL license.], | |
| [ DMAKE_URL="$withval" | |
| ]) | |
| AC_ARG_WITH(packager-list, | |
| [ --with-packager-list=<PATH TO PACK LIST> Specify a file to drive the packaging process. | |
| The file must follow the format explained in | |
| instsetoo_native/util/pack.lst | |
| ],,) | |
| AC_ARG_WITH(gnu-patch, | |
| [ --with-gnu-patch Specify location of GNU patch on Solaris or FreeBSD | |
| ],,) | |
| AC_ARG_WITH(gnu-cp, | |
| [ --with-gnu-cp Specify location of GNU cp on Solaris | |
| ],,) | |
| AC_ARG_WITH(gperf, | |
| [ --with-gperf Specify location of gperf on Solaris or FreeBSD | |
| ],,) | |
| 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 | |
| ],,) | |
| AC_ARG_WITH(system-apache-commons, | |
| [ --with-system-apache-commons use apache-commons jar files already installed on system | |
| ],,) | |
| AC_ARG_ENABLE(online-update, | |
| [ --disable-online-update Disables the Online Update feature. | |
| ],,enable_online_update=yes) | |
| AC_ARG_ENABLE(unit-tests, | |
| [ --disable-unit-tests Disables default unit tests (eg. unit tests using Google test, ...). | |
| ],,enable_unit_tests=yes) | |
| AC_ARG_ENABLE(ldap, | |
| [ --disable-ldap Disables the use of LDAP backend via OpenLDAP | |
| ],,) | |
| 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 | |
| ],,) | |
| AC_ARG_ENABLE(lockdown, | |
| [ --enable-lockdown Enables the gconf integration work in AOO | |
| ],,) | |
| 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" | |
| ],,) | |
| AC_ARG_ENABLE(pch, | |
| [ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++. | |
| ],,) | |
| AC_ARG_WITH(fonts, | |
| [ --without-fonts AOO 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 | |
| Apache OpenOffice 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 Apache Openoffice | |
| installation set, for people building for specific | |
| distributions where AFM files or TrueType Fonts | |
| are known to be available. | |
| ],,) | |
| AC_ARG_ENABLE(epm, | |
| [ --disable-epm AOO includes self-packaging code, that requires EPM. | |
| ],,enable_epm="yes") | |
| AC_ARG_WITH(epm, | |
| [ --with-epm Decides which EPM to use. Default is to use | |
| the one installed on the system if one is there. When | |
| either this is not there or you say =internal | |
| EPM will be built. | |
| ],,) | |
| AC_ARG_WITH(epm-url, | |
| [ --with-epm-url=<URL> Specify the location of downloadable epm source code. For example: | |
| https://github.com/jimjag/epm/archive/v5.1.0/epm-5.1.0.tar.gz | |
| Version 5.0.0 or later is required. | |
| ],[ EPM_URL="$withval" | |
| ]) | |
| AC_ARG_WITH(package-format, | |
| [ --with-package-format specify package format(s) for AOO installsets. | |
| Default is "normal" one of the OS/Distribution. | |
| Usage: --with-package-format="foo bar" | |
| ],,) | |
| AC_ARG_ENABLE(odk, | |
| [ --disable-odk AOO includes an ODK, office development kit | |
| which some packagers may want 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") | |
| 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 | |
| ],,) | |
| AC_ARG_ENABLE(cups, | |
| [ --disable-cups disable CUPS support (for printing on UNIX) | |
| ],,enable_cups=yes) | |
| AC_ARG_ENABLE(fontconfig, | |
| [ --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) | |
| AC_ARG_ENABLE(activex, | |
| [ --disable-activex Disable the use of ActiveX for Windows build. | |
| This switch is mandatory when using VC++ 2005/2008 Express. | |
| Alternatively you can use the Windows Driver Kit (WDK) and | |
| configure with the following switches: | |
| --with-atl-include-dir=$WDK_HOME\inc\atl71 | |
| --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 | |
| --with-mfc-include-dir=$WDK_HOME\inc\mfc42 | |
| --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 | |
| ],,) | |
| AC_ARG_ENABLE(atl, | |
| [ --disable-atl Disable the use of ATL for Windows build. | |
| This switch is mandatory when using VC++ 2005/2008 Express. | |
| Alternatively you can use the Windows Driver Kit (WDK) and | |
| configure with the following switches: | |
| --with-atl-include-dir=$WDK_HOME\inc\atl71 | |
| --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 | |
| --with-mfc-include-dir=$WDK_HOME\inc\mfc42 | |
| --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 | |
| ],,) | |
| AC_ARG_WITH(atl-include-dir, | |
| [ --with-atl-include-dir Path to ATL include directory for Windows build. | |
| This switch is mandatory when using VC++ 2008 Express | |
| and configuring with ATL/ActiveX enabled. | |
| You can use the Windows Driver Kit (WDK) and | |
| configure with the following switch: | |
| --with-atl-include-dir=$WDK_HOME\inc\atl71 | |
| ],,) | |
| AC_ARG_WITH(atl-lib-dir, | |
| [ --with-atl-lib-dir Path to ATL libraries directory for Windows build. | |
| This switch is mandatory when using VC++ 2008 Express | |
| and configuring with ATL/ActiveX enabled. | |
| You can use the Windows Driver Kit (WDK) and | |
| configure with the following switch: | |
| --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 | |
| ],,) | |
| AC_ARG_WITH(mfc-include-dir, | |
| [ --with-mfc-include-dir Path to MFC include directory for Windows build. | |
| This switch is mandatory when using VC++ 2008 Express | |
| and configuring with ATL/ActiveX enabled. | |
| You can use the Windows Driver Kit (WDK) and | |
| configure with the following switch: | |
| --with-mfc-include-dir=$WDK_HOME\inc\mfc42 | |
| ],,) | |
| AC_ARG_WITH(mfc-lib-dir, | |
| [ --with-mfc-lib-dir Path to MFC libraries directory for Windows build. | |
| This switch is mandatory when using VC++ 2008 Express | |
| and configuring with ATL/ActiveX enabled. | |
| You can use the Windows Driver Kit (WDK) and | |
| configure with the following switch: | |
| --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 | |
| ],,) | |
| 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. | |
| 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. | |
| 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 | |
| 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) | |
| ],,) | |
| AC_ARG_ENABLE(dbgutil, | |
| [ --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 disables optimization | |
| options and therefore removes a lot of warnings when | |
| using the cheaper standard compiler. ) | |
| ],,) | |
| AC_ARG_ENABLE(win64, | |
| [ --enable-win64 Enable building 64 bit OpenOffice on 64 bit Windows, (as | |
| opposed to 32 bit OpenOffice that is usually built there). | |
| This is a temporary option during the transition, | |
| as 64 bit OpenOffice doesn't fully build on Windows yet. | |
| ],,enable_win64=no) | |
| AC_ARG_ENABLE(win-x64-shellext, | |
| [ --enable-win-x64-shellext Enable the build/usage of Windows 64bit shell extensions. | |
| These extensions are used for the system integration on | |
| Windows 64bit systems. For example supporting the search | |
| in ODF files with the standard Windows search feature. | |
| ],,) | |
| 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, | |
| [ --enable-gstreamer Determines whether to use the GStreamer media | |
| backend on platforms where GStreamer is available. | |
| ],,enable_gstreamer=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 | |
| ],,) | |
| 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(opengl, | |
| [ --enable-opengl Determines whether to build the OpenGL 3D slide | |
| transitions component | |
| ],,enable_opengl=no) | |
| AC_ARG_ENABLE(dbus, | |
| [ --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) | |
| 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=no) | |
| AC_ARG_ENABLE(gio, | |
| [ --enable-gio Determines whether to use the GIO support | |
| ],,enable_gio=yes) | |
| 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) | |
| ],,) | |
| AC_ARG_ENABLE(layout, | |
| [ --enable-layout Enable the compilation and use of layout dialogs | |
| ],,) | |
| AC_ARG_ENABLE(nss-module, | |
| [ --disable-nss-module Whether to use the NSS module that is used for xml-security | |
| ],,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. | |
| ],,) | |
| 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. | |
| ],,) | |
| 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) | |
| AC_ARG_ENABLE(xrender-link, | |
| [ --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) | |
| AC_ARG_ENABLE(randr-link, | |
| [ --disable-randr-link disable linking with libXrandr, instead dynamically | |
| open it at runtime | |
| ],,enable_randr_link=yes) | |
| AC_ARG_WITH(bundled-extension-blobs, | |
| [ --with-bundled-extension-blobs Whitespace separated list of files in the tarball directory | |
| that are to be bundled as-is for installation as extensions | |
| at the first program start. Make sure to only bundle extensions | |
| which can be installed without requiring a license dialog | |
| and comply with their distribution requirements by updating the | |
| files LICENSE_aggregated and NOTICE_aggregated accordingly | |
| ],,) | |
| #AC_ARG_WITH(bundled-prereg-extensions, | |
| #[ --with-bundled-prereg-extensions Whitespace separated list of files in the tarball directory that | |
| # are to be bundled as pre-registered extensions. Make sure to only bundle | |
| # extensions which can be installed without requiring a license dialog | |
| #],,) | |
| AC_ARG_ENABLE(bundled-dictionaries, | |
| [ --enable-bundled-dictionaries Download dictionaries (spelling, hyphenation, thesaurus) | |
| according to main/extensions.lst and bundle them. Make sure to | |
| comply with their distribution requirements and update the | |
| files LICENSE_aggregated and NOTICE_aggregated accordingly | |
| ],,enable_bundled_dictionaries=no) | |
| # Remove the following switches when not in release mode. | |
| 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 | |
| ],,) | |
| AC_ARG_WITH(external-dict-dir, | |
| [ --with-external-dict-dir Specify external dictionary dir | |
| ],,) | |
| AC_ARG_WITH(external-hyph-dir, | |
| [ --with-external-hyph-dir Specify external hyphenation pattern dir | |
| ],,) | |
| AC_ARG_WITH(external-thes-dir, | |
| [ --with-external-thes-dir Specify external thesaurus dir | |
| ],,) | |
| # End of remove. | |
| AC_ARG_WITH(system-libs, | |
| [ --with-system-libs Use libs already on system -- enables all | |
| --with-system-* flags except | |
| 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) | |
| ],,) | |
| 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) | |
| ],,) | |
| AC_ARG_WITH(system-zlib, | |
| [ --with-system-zlib Use zlib already on system | |
| ],,) | |
| AC_ARG_WITH(system-nss, | |
| [ --with-system-nss Use NSS already on system | |
| ],,) | |
| AC_ARG_WITH(system-openssl, | |
| [ --with-system-openssl Use OpenSSL already on system | |
| ],,) | |
| AC_ARG_WITH(system-jpeg, | |
| [ --with-system-jpeg Use jpeg already on system | |
| ],,) | |
| AC_ARG_WITH(system-expat, | |
| [ --with-system-expat Use expat already on system | |
| ],,) | |
| AC_ARG_WITH(system-libxml, | |
| [ --with-system-libxml Use libxml already on system | |
| ],,) | |
| AC_ARG_WITH(static-system-libs, | |
| [ --with-static-system-libs=LIST | |
| Comma-separated list of system libraries to link | |
| statically, each NAME or NAME:DIR, e.g. | |
| "libxml,libxslt,curl,libiconv:/usr/local". | |
| Supported: libxml, libxslt, curl, libiconv. | |
| NAME alone uses the prefix the matching | |
| --with-system-NAME resolved; libiconv has no such | |
| option, so it always needs the :DIR form. Without | |
| this the archive is used only when the prefix | |
| happens to have no dylib, so a dylib appearing | |
| there silently switches the build to dynamic | |
| linking. | |
| ],,) | |
| AC_ARG_WITH(system-python, | |
| [ --with-system-python Use python already on system | |
| ],,) | |
| AC_ARG_WITH(system-icu, | |
| [ --with-system-icu Use icu already on system | |
| ],,) | |
| AC_ARG_WITH(system-poppler, | |
| [ --with-system-poppler Use poppler already on system | |
| ],,) | |
| AC_ARG_WITH(system-lucene, | |
| [ --with-system-lucene Use lucene already on system | |
| ],,) | |
| AC_ARG_WITH(lucene-core-jar, | |
| [ --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. | |
| ],,) | |
| 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. | |
| ],,) | |
| AC_ARG_WITH(libmysql-path, | |
| [ --with-libmysql-path Use Connector/C (libmysql) installation for building the MySQL Connector/OOo extension. | |
| 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 | |
| ],,) | |
| AC_ARG_WITH(system-hsqldb, | |
| [ --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" | |
| ]) | |
| AC_ARG_WITH(system-beanshell, | |
| [ --with-system-beanshell Use beanshell already on system (default) | |
| ],,) | |
| AC_ARG_ENABLE(beanshell, | |
| [ --enable-beanshell Enable the use of beanshell. | |
| ],,) | |
| AC_ARG_WITH(beanshell-jar, | |
| [ --with-beanshell-jar=JARFILE Specify path to jarfile manually ], | |
| [ BSH_JAR="$withval" | |
| ]) | |
| AC_ARG_ENABLE(pdfimport, | |
| [ --enable-pdfimport enables the build of the PDF Import extension | |
| ],,) | |
| AC_ARG_ENABLE(wiki-publisher, | |
| [ --enable-wiki-publisher enables the build of the Wiki Publisher extension | |
| ],,) | |
| AC_ARG_WITH(commons-lang-jar, | |
| [ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ], | |
| [ COMMONS_LANG_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(commons-logging-jar, | |
| [ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ], | |
| [ COMMONS_LOGGING_JAR="$withval" | |
| ]) | |
| AC_ARG_ENABLE(report-builder, | |
| [ --enable-report-builder enables the build of the Report Builder extension | |
| ],,) | |
| AC_ARG_WITH(sac-jar, | |
| [ --with-sac-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ SAC_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(libxml-jar, | |
| [ --with-libxml-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ LIBXML_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(flute-jar, | |
| [ --with-flute-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ FLUTE_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(jfreereport-jar, | |
| [ --with-jfreereport-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ JFREEREPORT_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(liblayout-jar, | |
| [ --with-liblayout-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ LIBLAYOUT_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(libloader-jar, | |
| [ --with-libloader-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ LIBLOADER_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(libformula-jar, | |
| [ --with-libformula-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ LIBFORMULA_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(librepository-jar, | |
| [ --with-librepository-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ LIBREPOSITORY_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(libfonts-jar, | |
| [ --with-libfonts-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ LIBFONTS_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(libserializer-jar, | |
| [ --with-libserializer-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ LIBSERIALIZER_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(libbase-jar, | |
| [ --with-libbase-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], | |
| [ LIBBASE_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(system-saxon, | |
| [ --with-system-saxon Use saxon already on system (default) | |
| ],,) | |
| AC_ARG_ENABLE(saxon, | |
| [ --disable-saxon Disable use of saxon | |
| ],,) | |
| AC_ARG_WITH(saxon-jar, | |
| [ --with-saxon-jar=JARFILE Specify path to jarfile manually. This implies --with-system-saxon ], | |
| [ SAXON_JAR="$withval" | |
| ]) | |
| AC_ARG_WITH(system-libxslt, | |
| [ --with-system-libxslt Use libxslt already on system | |
| ],,) | |
| AC_ARG_WITH(system-odbc, | |
| [ --with-system-odbc-headers 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 | |
| ],,) | |
| AC_ARG_WITH(system-curl, | |
| [ --with-system-curl Use curl already on system | |
| ],,) | |
| AC_ARG_WITH(system-boost, | |
| [ --with-system-boost Use boost already on system | |
| ],,) | |
| AC_ARG_WITH(system-mdds, | |
| [ --with-system-mdds Use mdds already on system | |
| ],,) | |
| AC_ARG_WITH(system-vigra, | |
| [ --with-system-vigra Use vigra already on system | |
| ],,) | |
| AC_ARG_ENABLE(hunspell, | |
| [ --enable-hunspell Determines whether to enable the Hunspell library. | |
| If enabled, the library will be built unless you | |
| specify --with-system-hunspell to use the library | |
| already present on your system. | |
| If disabled, the Spell Checking component will also | |
| be disabled. | |
| (Default: hunspell disabled) | |
| ],,enable_hunspell=no) | |
| AC_ARG_WITH(system-hunspell, | |
| [ --with-system-hunspell Use libhunspell already on system | |
| ],,) | |
| AC_ARG_WITH(system-mythes, | |
| [ --with-system-mythes Use mythes already on system | |
| ],,) | |
| AC_ARG_ENABLE(hyphen, | |
| [ --enable-hyphen Determines whether to enable the Hyphen library. | |
| If enabled, the library will be built unless you | |
| specify --with-system-hyphen to use the library | |
| already present on your system. | |
| If disabled, the Hyphenator component will also | |
| be disabled. | |
| (Default: hyphen disabled) | |
| ],,enable_hyphen=no) | |
| AC_ARG_WITH(system-hyphen, | |
| [ --with-system-hyphen Use libhypeh already on system | |
| ],,) | |
| AC_ARG_WITH(system-libtextcat, | |
| [ --with-system-libtextcat Use libtextcat already on system | |
| ],,) | |
| AC_ARG_WITH(external-libtextcat-data, | |
| [ --with-system-libtextcat-data Use libtextcat data already on system | |
| ],,) | |
| AC_ARG_WITH(system-redland, | |
| [ --with-system-redland Use redland library already on system | |
| ],,) | |
| AC_ARG_WITH(stlport, | |
| [ --with-stlport Only building --without-stlport is supported. | |
| ], WITH_STLPORT=$withval , WITH_STLPORT=no) | |
| 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> | |
| ],,) | |
| 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 | |
| ],,) | |
| AC_ARG_WITH(ant-home, | |
| [ --with-ant-home If you have installed Apache 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. | |
| Usage: --with-junit=<absolute path to JUnit 4 jar> | |
| ],,with_junit=yes) | |
| AC_ARG_WITH(hamcrest-core, | |
| [ --with-hamcrest-core Specifies the hamcrest-core jar file to use for | |
| JUnit-based tests. --without-junit disables those | |
| tests. Not relevant in the --without-java or | |
| --without-junit cases, and only needed for JUnit | |
| >= 4.11. | |
| ],,with_hamcrest_core=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> | |
| ],,) | |
| 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> | |
| ],,) | |
| 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> | |
| ],,) | |
| 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> | |
| ],,) | |
| 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> | |
| ],,) | |
| AC_ARG_WITH(host-python, | |
| [ --with-host-python For Windows users on a modern MSVC, the Python 3.9 or | |
| newer used to RUN the bundled Python's build scripts. | |
| It is not the Python that gets shipped. Autodetected | |
| from the path; supply it when that finds nothing, or | |
| the build would try to download one. | |
| Usage: --with-host-python=<absolute path to python.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 Apache OpenOffice | |
| will be created. | |
| 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(msbuild-path, | |
| [ --with-msbuild-path For Windows users building with a VS2015-or-newer | |
| toolset: the directory holding MSBuild.exe. Only | |
| needed when it is not beside the toolset. | |
| Usage: --with-msbuild-path=<absolute path to MSBuild.exe directory> | |
| ],,) | |
| AC_ARG_WITH(windows-sdk-home, | |
| [ --with-windows-sdk-home For Windows users building with a VS2015-or-newer | |
| toolset: the root of the Windows 10/11 SDK, i.e. the | |
| directory holding Include/, Lib/ and bin/. Only | |
| needed when it is not in the default location. | |
| Usage: --with-windows-sdk-home=<absolute path to Windows Kits\10> | |
| ],,) | |
| AC_ARG_WITH(windows-sdk-version, | |
| [ --with-windows-sdk-version | |
| Pin the Windows 10/11 SDK to one version instead of | |
| taking the newest complete one that is installed. | |
| Usage: --with-windows-sdk-version=10.0.19041.0 | |
| ],,) | |
| 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> | |
| ],,) | |
| 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 https://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> | |
| ],,) | |
| 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(javascript, | |
| [ --disable-javascript Disables support for JavaScript macros. | |
| ],,) | |
| AC_ARG_WITH(system-coinmp, | |
| [ --with-system-coinmp Use CoinMP library already installed on the system | |
| ],,) | |
| AC_ARG_ENABLE(coinmp, | |
| [ --disable-coinmp Do not use CoinMP as the Calc 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 does not | |
| identify as version 2.4_OOo | |
| ]],,enable_ccache_skip=auto) | |
| AC_ARG_WITH(lang, | |
| [ --with-lang Use this option to build Apache OpenOffice 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(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 Apache OpenOffice 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). | |
| Usage: --with-intro-bitmaps=/path/my_ooo_intro.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.png | |
| ],,) | |
| AC_ARG_WITH(vendor, | |
| [ --with-vendor Set vendor of the build. | |
| 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. | |
| 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. | |
| Usage: --with-asm-home=<path to ml.exe directory> | |
| ],,) | |
| AC_ARG_WITH(nasm-home, | |
| [ --with-nasm-home For Windows users, please supply the path for the | |
| nasm.exe assembler. | |
| Usage: --with-nasm-home=<path to nasm.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 | |
| 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. | |
| 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. | |
| ],,) | |
| AC_ARG_ENABLE(category-b, | |
| [ --enable-category-b Activate components under a category B license | |
| (see https://www.apache.org/legal/3party.html#category-b): | |
| MPL (hunspell, hyphen, nss, saxon, rhino), | |
| CPL (silgraphite), CPL/EPL (CoinMP), OFL (fonts). | |
| Flags for individual libraries override this one. | |
| ],,) | |
| AC_ARG_WITH(arm-target, | |
| [ --arm-target The minimal targeted arm processor | |
| used for the build environment. | |
| Cases : | |
| arm-target < 6 : armv4t compatibility | |
| arm-target = 6 : exact armv6 compatibility | |
| arm-target > 6 : armv7-a compatibility | |
| Usage: --with-arm-target=7 | |
| ],with_arm_target=$withval,with_arm_target=4) | |
| AC_ARG_WITH(macosx-target, | |
| [ --macosx-target The minimal macOS/OSX deployment and build target | |
| Usage: --with-macosx-target=11.0 | |
| ],with_macosx_target=$withval,with_macosx_target=11.0) | |
| AC_ARG_WITH(macosx-sdk, | |
| [ --macosx-sdk The macOS SDK to build against | |
| Usage: --with-macosx-sdk=10.11 | |
| (or full path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk) | |
| ],with_macosx_sdk=$withval,) | |
| AC_ARG_WITH(macosx-codesigning-identity, | |
| [ --with-macosx-codesigning-identity | |
| Code-sign the macOS application bundle and disk image | |
| while packaging, with this codesign identity | |
| ("-" for ad-hoc). Unset: package unsigned, as before. | |
| Traditional macOS language packs cannot be installed | |
| into a signed application because that would invalidate | |
| its resource seal. | |
| Usage: --with-macosx-codesigning-identity="Developer ID Application: ..." | |
| ],with_macosx_codesigning_identity=$withval,) | |
| AC_ARG_WITH(macosx-codesigning-keychain, | |
| [ --with-macosx-codesigning-keychain | |
| Keychain holding that identity (default: the | |
| keychain search list, i.e. normally the login keychain). | |
| Usage: --with-macosx-codesigning-keychain=/path/to/build.keychain-db | |
| ],with_macosx_codesigning_keychain=$withval,) | |
| AC_ARG_WITH(macosx-notary-profile, | |
| [ --with-macosx-notary-profile | |
| After code-signing with a Developer ID identity, submit | |
| the application and disk image to Apple's notary service | |
| and staple the ticket, using this "xcrun notarytool | |
| store-credentials" keychain profile name. Requires | |
| --with-macosx-codesigning-identity to be a real | |
| Developer ID identity (not "-"). Unset: package signed | |
| but not notarized, as before. | |
| Usage: --with-macosx-notary-profile=my-notary-profile | |
| ],with_macosx_notary_profile=$withval,) | |
| AC_ARG_WITH(rat-scan, | |
| [ --with-rat-scan Scan source code for license headers. | |
| Use as --with-rat-scan to automatically download pre-built Rat binaries. | |
| Alternatively use as --with-rat-scan=<path-to-rat-direcetory> to use | |
| a separately installed library. | |
| ],with_rat_scan=$withval,) | |
| BUILD_TYPE="OOo" | |
| ADDITIONAL_REPOSITORIES="../ext_libraries" | |
| SCPDEFS="" | |
| dnl =================================================================== | |
| dnl Check configure script vs. configure.ac | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether configure is up-to-date]) | |
| if test "configure" -ot "configure.ac"; then | |
| AC_MSG_RESULT([no]) | |
| AC_MSG_ERROR([configure is not up-to-date, run autoconf first!]) | |
| else | |
| AC_MSG_RESULT([yes]) | |
| fi | |
| dnl =================================================================== | |
| dnl Message. | |
| dnl =================================================================== | |
| echo "********************************************************************" | |
| echo "* *" | |
| echo "* Apache OpenOffice build configuration. *" | |
| echo "* *" | |
| echo "* The configure process checks your platform to see whether *" | |
| echo "* you can build Apache OpenOffice 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 "* Warnings that are generated during the configure process *" | |
| echo "* must be taken into account since it can be a reason for *" | |
| echo "* an unsuccessful build of Apache OpenOffice. *" | |
| echo "* *" | |
| echo "********************************************************************" | |
| echo "" | |
| echo "********************************************************************" | |
| echo "* *" | |
| echo "* Checking the platform pre-requisites. *" | |
| echo "* *" | |
| echo "********************************************************************" | |
| echo "" | |
| dnl =================================================================== | |
| dnl Configure pre-requisites. | |
| dnl =================================================================== | |
| cat /dev/null > warn | |
| AC_PROG_EGREP | |
| if test -z "$GREP"; then | |
| GREP=$EGREP | |
| fi | |
| AC_PATH_PROG(AWK, gawk) | |
| dnl =================================================================== | |
| dnl A space in $AWK is fatal, so take the 8.3 form when there is one | |
| dnl =================================================================== | |
| dnl configure.ac spells $AWK unquoted in some forty places, so a path | |
| dnl with a space in it does not merely look untidy -- it word-splits, | |
| dnl and the build dies a long way from here with | |
| dnl | |
| dnl ./configure: line NNNN: /cygdrive/c/Program: No such file | |
| dnl | |
| dnl That is what a Cygwin carrying gawk-<version>.exe but no plain | |
| dnl gawk gives you: the only gawk left on PATH is then Git for | |
| dnl Windows' copy, under C:\Program Files. | |
| dnl | |
| dnl Fixing it on the Cygwin side -- copying gawk-<version>.exe to | |
| dnl gawk.exe -- does work, and does not survive the next Cygwin | |
| dnl update, which is why it keeps coming back. The 8.3 form of the | |
| dnl very same file has no space and needs no upkeep at all. | |
| case "$AWK" in | |
| *\ *) | |
| _awk_short=`cygpath -d "$AWK" 2>/dev/null` | |
| if test -n "$_awk_short"; then | |
| _awk_short=`cygpath -u "$_awk_short" 2>/dev/null` | |
| fi | |
| if test -n "$_awk_short" -a -x "$_awk_short"; then | |
| AC_MSG_NOTICE([$AWK has a space in it, using $_awk_short instead]) | |
| AWK="$_awk_short" | |
| else | |
| AC_MSG_WARN([$AWK has a space in it and has no 8.3 name. | |
| Either put a space-free awk earlier on PATH, or enable 8.3 names on that | |
| volume; several checks below will fail on the space otherwise.]) | |
| fi | |
| ;; | |
| esac | |
| if test -z "$AWK"; then | |
| AC_MSG_ERROR([install GNU awk to build Apache OpenOffice]) | |
| fi | |
| AC_PATH_PROGS(SED, sed ) | |
| 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...]) | |
| fi | |
| dnl ================================================================== | |
| dnl Checks for custom pack.lst | |
| dnl ================================================================== | |
| AC_MSG_CHECKING([for custom pack.lst]) | |
| CUSTOM_PACK_LIST= | |
| USE_PACKAGER= | |
| if test -n "$with_packager_list" ; then | |
| if test -e $with_packager_list; then | |
| CUSTOM_PACK_LIST=$with_packager_list | |
| USE_PACKAGER=YES | |
| fi | |
| fi | |
| if test -n "$CUSTOM_PACK_LIST"; then | |
| AC_MSG_RESULT([$CUSTOM_PACK_LIST]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(CUSTOM_PACK_LIST) | |
| AC_SUBST(USE_PACKAGER) | |
| dnl =================================================================== | |
| dnl Checks for the operating system and processor. | |
| dnl =================================================================== | |
| AC_CANONICAL_TARGET | |
| 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" | |
| fi | |
| # get info about the system provided release/version details | |
| head /etc/*-release | |
| uname -a | |
| 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_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 Apache OpenOffice]) | |
| 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_kde=yes | |
| test_kde4=yes | |
| test_cups=yes | |
| test_randr=yes | |
| test_freetype=yes | |
| test_gstreamer=yes | |
| _os=Linux | |
| ;; | |
| gnu) | |
| test_cups=no | |
| _os=GNU | |
| ;; | |
| cygwin*) # Windows | |
| test_cups=no | |
| test_cairo=yes | |
| test_freetype=no | |
| test_gstreamer=no | |
| _os=WINNT | |
| ;; | |
| darwin*) # Mac OS X | |
| test_cups=yes | |
| test_gtk=yes | |
| test_cairo=yes | |
| 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 | |
| SDKROOT="`xcrun --sdk macosx --show-sdk-path`" | |
| export SDKROOT | |
| if test ! -n "$CC"; then | |
| CC="`xcrun -f clang`" | |
| fi | |
| if test ! -n "$CXX"; then | |
| CXX="`xcrun -f clang++` -std=c++11" | |
| macos_c11=`pwd`/macos_c11 | |
| echo "#!/bin/sh" > $macos_c11 | |
| echo "$CXX \"\$@\"" >> $macos_c11 | |
| chmod 755 $macos_c11 | |
| CXX="$macos_c11" | |
| fi | |
| # Don't use OSVERSION until we know no conflicts result from it | |
| _darwin_version="`uname -r | $AWK -F . '{ print $1 }'`" | |
| # Map the Darwin (XNU) major version to the macOS version. | |
| # Darwin 6..19 => macOS 10.(darwin-4) (10.2 .. 10.15) | |
| # Darwin 20+ => macOS (darwin-9) (11, 12, 13, ...) | |
| if test "$_darwin_version" -ge 20; then | |
| _osx_version="`expr $_darwin_version - 9`" | |
| else | |
| _osx_version="10.`expr $_darwin_version - 4`" | |
| fi | |
| AC_MSG_NOTICE([Detected Darwin version: $_darwin_version ($_osx_version)]) | |
| # Detect the build CPU architecture. Apple Silicon (arm64) reports | |
| # "arm64" from uname -m and maps to the aarch64 toolchain/bridge. | |
| _darwin_cpu="`uname -m`" | |
| case "$_darwin_cpu" in | |
| arm64|aarch64) | |
| AC_MSG_NOTICE([Detected Apple Silicon (arm64) build host]) | |
| ;; | |
| x86_64|i*86) | |
| AC_MSG_NOTICE([Detected Intel (x86_64) build host]) | |
| ;; | |
| *) | |
| AC_MSG_ERROR([Unsupported macOS CPU architecture: $_darwin_cpu]) | |
| ;; | |
| esac | |
| ;; | |
| os2*) | |
| test_x=no | |
| test_cups=no | |
| test_randr=no | |
| test_gtk=no | |
| test_freetype=no | |
| test_gstreamer=no | |
| test_cairo=yes | |
| _os=OS2 | |
| ;; | |
| freebsd*) | |
| test_gtk=yes | |
| test_cairo=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_randr=no | |
| _os=OSF1 | |
| ;; | |
| netbsd) | |
| test_gtk=yes | |
| test_cairo=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_randr=no | |
| test_freetype=yes | |
| test_gstreamer=yes | |
| PTHREAD_LIBS=-pthread | |
| echo "AIX is an alpha port --- Use at own risk" >> warn | |
| _os=AIX | |
| ;; | |
| *) | |
| AC_MSG_ERROR([$_os operating system is not suitable to build Apache OpenOffice!]) | |
| ;; | |
| esac | |
| AC_SUBST(OSVERSION) | |
| AC_SUBST(PTHREAD_CFLAGS) | |
| AC_SUBST(PTHREAD_LIBS) | |
| dnl Ensure pkg-config is initialized before any possible use | |
| PKG_PROG_PKG_CONFIG | |
| dnl =================================================================== | |
| dnl Set the ENABLE_CRASHDUMP variable. | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to enable crashdump feature]) | |
| if test "$enable_crashdump" = "yes"; then | |
| ENABLE_CRASHDUMP="TRUE" | |
| BUILD_TYPE="$BUILD_TYPE CRASHREP" | |
| AC_MSG_RESULT([yes]) | |
| else | |
| ENABLE_CRASHDUMP="" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_CRASHDUMP) | |
| if test "$_os" = "WINNT"; then | |
| 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="" | |
| AC_MSG_RESULT([no]) | |
| else | |
| VC_STANDARD="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| fi | |
| AC_SUBST(VC_STANDARD) | |
| fi | |
| if test "$_os" = "WINNT"; then | |
| dnl =================================================================== | |
| dnl Set the BUILD_X64 variable. | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to build/use the Windows 64bit shell extensions]) | |
| if test "$enable_win_x64_shellext" = "" -o "$enable_win_x64_shellext" = "no"; then | |
| BUILD_X64="" | |
| AC_MSG_RESULT([no]) | |
| else | |
| BUILD_X64="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| fi | |
| AC_SUBST(BUILD_X64) | |
| dnl =================================================================== | |
| dnl Set the BUILD_WIN64 variable. | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to build 64 bit OpenOffice on 64 bit Windows]) | |
| if test "$build_cpu" = "x86_64" ; then | |
| if test "x$enable_win64" != "xno" ; then | |
| BUILD_WIN64="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| OOWINTOOL="./oowintool" | |
| else | |
| BUILD_WIN64="" | |
| AC_MSG_RESULT([no]) | |
| OOWINTOOL="./oowintool --aoo32-on-win64" | |
| fi | |
| else | |
| if test "x$enable_win64" != "xno" ; then | |
| AC_MSG_ERROR([the --enable-win64 option can only be used on an AMD64 CPU]) | |
| fi | |
| BUILD_WIN64="" | |
| AC_MSG_RESULT([no]) | |
| OOWINTOOL="./oowintool" | |
| fi | |
| AC_SUBST(BUILD_WIN64) | |
| fi | |
| dnl =================================================================== | |
| dnl Set the ENABLE_WERROR variable. (Activate --enable-werror) | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to turn warnings to errors]) | |
| 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 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 | |
| AC_MSG_RESULT([yes]) | |
| else | |
| ENABLE_DEBUG="FALSE" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_DEBUG) | |
| dnl =================================================================== | |
| dnl Set the ENABLE_DBGUTIL variable | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to build with additional debug utilities]) | |
| if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then | |
| PROEXT="" | |
| PRODUCT="" | |
| PROFULLSWITCH="" | |
| AC_MSG_RESULT([yes]) | |
| else | |
| PRODUCT="full" | |
| PROFULLSWITCH="product=full" | |
| PROEXT=".pro" | |
| AC_MSG_RESULT([no, full product build]) | |
| fi | |
| AC_SUBST(PRODUCT) | |
| AC_SUBST(PROFULLSWITCH) | |
| AC_SUBST(PROEXT) | |
| 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 | |
| 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 | |
| else | |
| if test -n "$ENABLE_SYMBOLS"; then | |
| DISABLE_STRIP="TRUE" | |
| else | |
| DISABLE_STRIP= | |
| fi | |
| fi | |
| if test -z "$DISABLE_STRIP"; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(DISABLE_STRIP) | |
| dnl =================================================================== | |
| dnl Build options | |
| dnl =================================================================== | |
| # Disable or enable category-B libraries: nss, hunspell, hyphen, saxon, | |
| # rhino, silgraphite. | |
| # Note that further below they may be enabled or disabled again by | |
| # more specific options. | |
| ENABLE_CATEGORY_B= | |
| AC_MSG_CHECKING([whether to enable category B components]) | |
| # Category B modules (libraries): | |
| # nss (nss) | |
| # hunspell (hunspell) | |
| # hyphen (hyphen) | |
| # saxon (saxon) | |
| # rhino (rhino) | |
| # graphite (silgraphite) | |
| if test "$enable_category_b" = "yes"; then | |
| ENABLE_CATEGORY_B=YES | |
| enable_nss_module="yes" | |
| enable_hunspell="yes" | |
| enable_hyphen="yes" | |
| enable_saxon="yes" | |
| enable_javascript="yes" | |
| enable_graphite="yes" | |
| enable_coinmp="yes" | |
| enable_category_b_fonts="yes" | |
| AC_MSG_RESULT([yes: allow modules nss, hunspell, hyphen, saxon, rhino, graphite, coinmp to be built]) | |
| else | |
| # Disable libraries. | |
| enable_nss_module="no" | |
| enable_hunspell="no" | |
| enable_hyphen="no" | |
| enable_saxon="no" | |
| enable_javascript="no" | |
| enable_graphite="no" | |
| enable_coinmp="no" | |
| enable_category_b_fonts="no" | |
| AC_MSG_RESULT([no: disabled modules nss, hunspell, hyphen, saxon, rhino, graphite, coinmp]) | |
| fi | |
| AC_SUBST(ENABLE_CATEGORY_B) | |
| # gstreamer is used only via pre-installed libraries: not a problem | |
| dnl =================================================================== | |
| dnl Online Update | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to enable the Online Update support]) | |
| if test "$enable_online_update" = "yes" -o "$enable_online_update" = "TRUE"; then | |
| ENABLE_ONLINE_UPDATE="YES" | |
| SCPDEFS="$SCPDEFS -DENABLE_ONLINE_UPDATE" | |
| AC_MSG_RESULT([yes]) | |
| else | |
| ENABLE_ONLINE_UPDATE="" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_ONLINE_UPDATE) | |
| dnl =================================================================== | |
| dnl Unit Tests | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to enable unit tests]) | |
| if test "$enable_unit_tests" = "yes" -o "$enable_unit_tests" = "TRUE"; then | |
| ENABLE_UNIT_TESTS="YES" | |
| BUILD_TYPE="$BUILD_TYPE GTEST" | |
| AC_MSG_RESULT([yes]) | |
| else | |
| ENABLE_UNIT_TESTS="" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_UNIT_TESTS) | |
| AC_MSG_CHECKING([whether to enable native CUPS support]) | |
| if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then | |
| ENABLE_CUPS="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| else | |
| ENABLE_CUPS="" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_CUPS) | |
| AC_MSG_CHECKING([whether to enable fontconfig support]) | |
| if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then | |
| ENABLE_FONTCONFIG="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| else | |
| ENABLE_FONTCONFIG="" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_FONTCONFIG) | |
| dnl =================================================================== | |
| dnl find external tarballs. | |
| dnl =================================================================== | |
| 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" \ | |
| && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then | |
| DO_FETCH_TARBALLS="yes" | |
| fi | |
| AC_SUBST(DO_FETCH_TARBALLS) | |
| if test "$_os" = "WINNT"; then | |
| AC_MSG_CHECKING([whether to use DirectX]) | |
| ENABLE_DIRECT_DRAW="" | |
| 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_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" | |
| dnl ActiveX depends on ATL, it should be disabled | |
| DISABLE_ACTIVEX="TRUE" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(DISABLE_ATL) | |
| AC_SUBST(DISABLE_ACTIVEX) | |
| fi | |
| dnl =================================================================== | |
| dnl Disable rpath in shared libraries? | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to use RPATH in shared libraries]) | |
| if test "$enable_rpath" = "no"; then | |
| ENABLE_RPATH="no" | |
| else | |
| ENABLE_RPATH="yes" | |
| fi | |
| AC_MSG_RESULT([$ENABLE_RPATH]) | |
| AC_SUBST(ENABLE_RPATH) | |
| dnl =================================================================== | |
| dnl Check extensions to be bundled as literal blobs | |
| dnl =================================================================== | |
| if test -n "$with_bundled_extension_blobs"; then | |
| BUNDLED_EXTENSION_BLOBS="$with_bundled_extension_blobs" | |
| else | |
| BUNDLED_EXTENSION_BLOBS= | |
| fi | |
| AC_SUBST(BUNDLED_EXTENSION_BLOBS) | |
| #dnl =================================================================== | |
| #dnl Check extensions that are to be bundled as pre-registered | |
| #dnl =================================================================== | |
| if test -n "$with_bundled_prereg_extensions"; then | |
| BUNDLED_PREREG_EXTENSIONS="$with_bundled_prereg_extensions" | |
| else | |
| BUNDLED_PREREG_EXTENSIONS= | |
| fi | |
| AC_SUBST(BUNDLED_PREREG_EXTENSIONS) | |
| dnl =================================================================== | |
| dnl Configure system provided dictionary/hyphenation/thesaurus | |
| dnl =================================================================== | |
| 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. | |
| dnl Quoted: either side can be a path with a space in it, and an | |
| dnl unquoted one splits into "test: too many arguments" here. | |
| if test -L "$AWK" -o -L "`which awk`" ; then | |
| AC_MSG_ERROR([$AWK / awk 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 | |
| if test -L `which tar` ; then | |
| AC_MSG_ERROR([tar 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 | |
| if test -L `which gunzip` ; then | |
| AC_MSG_ERROR([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 AOO. | |
| 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 | |
| dnl Newer autoconf (>= 2.70) probes for the highest C standard the compiler | |
| dnl accepts and appends it (e.g. -std=gnu23) to $CC. That breaks bundled | |
| dnl module configure scripts (nss/nspr, ...) which pass CC=$(CC) unquoted as | |
| dnl an inline environment assignment: the embedded space makes the shell | |
| dnl treat -std=gnu23 as a command ("-std=gnu23: command not found"). We pin | |
| dnl the C dialect per-module in solenv/inc/*.mk anyway, so strip the appended | |
| dnl -std= token and keep $CC a single bare compiler word. | |
| CC=`echo "$CC" | $SED 's/ -std=[[^ ]]*//g'` | |
| 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 | |
| CC_PATH="$COMPATH/" | |
| 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" ; then | |
| AC_MSG_RESULT([implicitly using CC=$CC]) | |
| 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]) | |
| 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]) | |
| else | |
| ENABLE_PCH="" | |
| AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler]) | |
| fi | |
| else | |
| ENABLE_PCH="" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_PCH) | |
| dnl =================================================================== | |
| dnl Search all the common names for GNU make | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([for GNU make]) | |
| for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do | |
| $a --version 2> /dev/null | $GREP GNU 2>&1 > /dev/null | |
| if test $? -eq 0; then | |
| GNUMAKE=$a | |
| break | |
| fi | |
| done | |
| AC_MSG_RESULT($GNUMAKE) | |
| if test -z "$GNUMAKE"; then | |
| AC_MSG_ERROR([not found. install GNU make.]) | |
| fi | |
| AC_MSG_CHECKING([the GNU make version]) | |
| _make_version=`$GNUMAKE --version | $GREP GNU | $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]) | |
| else | |
| AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed]) | |
| fi | |
| AC_SUBST(GNUMAKE) | |
| dnl =================================================================== | |
| dnl Search for a pre-installed dmake | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([for dmake]) | |
| DMAKE="no" | |
| # Override system dmake if --with-dmake-path or --with-dmake-url is used. | |
| if test -z "$with_dmake_path" && test -z "$with_dmake_url"; then | |
| AC_PATH_PROG(DMAKE, dmake, no) | |
| IS_SYSTEM_DMAKE=NO | |
| if test "$DMAKE" != "no"; then | |
| AC_MSG_RESULT([using system dmake]) | |
| DMAKE_PATH="$DMAKE" | |
| IS_SYSTEM_DMAKE=YES | |
| fi | |
| elif test -n "$with_dmake_path" ; then | |
| # Did not find pre-installed dmake. | |
| # Is it at a nonstandard location provided by --with-dmake-path ? | |
| AC_MSG_NOTICE([looking for dmake at $DMAKE_PATH]) | |
| if test -x "$with_dmake_path" ; then | |
| AC_MSG_RESULT([using user provided dmake]) | |
| DMAKE=$with_dmake_path | |
| fi | |
| fi | |
| DMAKE_URL= | |
| if test "$DMAKE" = "no"; then | |
| AC_MSG_NOTICE([no system or user-provided dmake found]) | |
| # Check if a URL was supplied from which we can download the source and compile it. | |
| if test -n "$with_dmake_url" ; then | |
| # At this moment we can not verify the URL or the content that we want to download. | |
| # Neither can we apply the test below for ruling out that it is the SunStudio dmake. | |
| DMAKE_URL=$with_dmake_url | |
| AC_MSG_RESULT([dmake will be downloaded and compiled in bootstrap]) | |
| DMAKE= | |
| BUILD_DMAKE=YES | |
| else | |
| AC_MSG_ERROR([no URL for dmake source code specified, either. Use --with-dmake-url to supply an URL; run configure with the --help option for a list of possible URLs.]) | |
| fi | |
| else | |
| AC_MSG_CHECKING([whether the found dmake is the right dmake]) | |
| # we need to find out whether that dmake we found is "our" dmake | |
| # or the dmake from Sun's SunStudio Compiler which is something | |
| # different | |
| # This test _should_ work because the one accepts -V (ours) and one | |
| # (the other) not... | |
| $DMAKE -V 2>/dev/null | $GREP -E 'dmake(.exe)? .* Version .*' >/dev/null | |
| 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]) | |
| 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]) | |
| else | |
| AC_MSG_ERROR([too old. >= 4.11 is needed]) | |
| DMAKE=no | |
| fi | |
| else | |
| AC_MSG_WARN([no]) | |
| DMAKE=no | |
| fi | |
| fi | |
| if test "$DMAKE" = "no"; then | |
| AC_MSG_ERROR([please use --with-dmake-path or --with-dmake-url to specify dmake executable or source]) | |
| fi | |
| AC_SUBST(DMAKE_URL) | |
| AC_SUBST(BUILD_DMAKE) | |
| AC_SUBST(DMAKE_PATH) | |
| AC_SUBST(IS_SYSTEM_DMAKE) | |
| dnl =================================================================== | |
| dnl Search all the common names for GNU or BSD tar | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([for GNU or compatible BSD tar]) | |
| for a in $GNUTAR gtar gnutar bsdtar tar; do | |
| $a --version 2> /dev/null | $EGREP "GNU|libarchive" 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 Search for xz, needed to unpack .tar.xz external dependency tarballs | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([for xz]) | |
| for a in $XZ xz; do | |
| $a --version 2> /dev/null > /dev/null | |
| if test $? -eq 0; then | |
| XZ=$a | |
| break | |
| fi | |
| done | |
| if test -z "$XZ"; then | |
| AC_MSG_RESULT([not found]) | |
| AC_MSG_WARN([xz not found - building with a .tar.xz external dependency will fail. Install xz-utils.]) | |
| echo "xz not found - building with a .tar.xz external dependency will fail. Install xz-utils." >> warn | |
| else | |
| AC_MSG_RESULT($XZ) | |
| fi | |
| AC_SUBST(XZ) | |
| dnl =================================================================== | |
| dnl Test the solaris compiler version | |
| dnl =================================================================== | |
| if test "$_os" = "SunOS"; then | |
| if test "$CC" = "cc"; then | |
| AC_PATH_PROGS(_cc, cc) | |
| 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_version=`echo $_sunstudio_string | $AWK '{ 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" }'` | |
| 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 | |
| dnl compiler will do | |
| AC_MSG_RESULT([checked]) | |
| fi | |
| fi | |
| 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 ) | |
| else | |
| AC_MSG_RESULT( not found ) | |
| 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 | |
| fi | |
| fi | |
| dnl =================================================================== | |
| dnl Check whether there's a Perl version available. | |
| 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 | |
| _perl_path="$with_perl_home/bin/perl" | |
| if test -x "$_perl_path"; then | |
| PERL=$_perl_path | |
| else | |
| AC_MSG_ERROR([$_perl_path not found]) | |
| fi | |
| fi | |
| dnl =================================================================== | |
| dnl Testing for Perl version 5 or greater. | |
| dnl $] is the perl version variable, it is returned as an integer | |
| dnl =================================================================== | |
| if test "$PERL"; then | |
| AC_MSG_CHECKING([the Perl version]) | |
| ${PERL} -e "exit($]);" | |
| _perl_version=$? | |
| if test "$_perl_version" -lt 5; then | |
| AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl]) | |
| fi | |
| AC_MSG_RESULT([checked (perl $_perl_version)]) | |
| else | |
| AC_MSG_ERROR([Perl not found, install version 5 of Perl]) | |
| fi | |
| AC_SUBST(PERL) | |
| dnl =================================================================== | |
| dnl Testing for required Perl modules | |
| dnl The list of required Perl modules is documented here: | |
| dnl https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO#General_Build_Requirements | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([for required Perl modules]) | |
| if `$PERL -e 'use Archive::Zip; | |
| use LWP::UserAgent; | |
| use XML::Parser; | |
| use Digest::SHA; | |
| use Digest::MD5; | |
| use LWP::Protocol::https;'>/dev/null 2>&1`; then | |
| AC_MSG_RESULT([all modules found]) | |
| else | |
| # Find out which modules are missing. | |
| missing_perl_modules= | |
| if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then | |
| missing_perl_modules=Archive::Zip | |
| fi | |
| if ! `$PERL -e 'use LWP::UserAgent;'>/dev/null 2>&1`; then | |
| missing_perl_modules="$missing_perl_modules LWP::UserAgent" | |
| fi | |
| if ! `$PERL -e 'use XML::Parser;'>/dev/null 2>&1`; then | |
| missing_perl_modules="$missing_perl_modules XML::Parser" | |
| fi | |
| if ! `$PERL -e 'use Digest::SHA;'>/dev/null 2>&1`; then | |
| missing_perl_modules="$missing_perl_modules Digest::SHA" | |
| fi | |
| if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then | |
| missing_perl_modules="$missing_perl_modules Digest::MD5" | |
| fi | |
| if ! `$PERL -e 'use LWP::Protocol::https;'>/dev/null 2>&1`; then | |
| missing_perl_modules="$missing_perl_modules LWP::Protocol::https" | |
| fi | |
| AC_MSG_ERROR([ | |
| The missing Perl modules are: $missing_perl_modules | |
| Install them as superuser/administrator with "cpan -i $missing_perl_modules"]) | |
| fi | |
| dnl =================================================================== | |
| dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT | |
| dnl =================================================================== | |
| 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 Which MSVC layout is --with-cl-home pointing at? | |
| dnl =========================================================== | |
| dnl VS2008 (VC9) keeps cl.exe in VC/bin and its debug-info server | |
| dnl (mspdb80.dll) somewhere else entirely -- Common7/IDE, or the | |
| dnl Windows SDK's own bin. From VS2015 on the toolset is versioned, | |
| dnl self-contained and reached as | |
| dnl VC/Tools/MSVC/<toolset>/bin/Host<host>/<target>/cl.exe | |
| dnl with its headers in <toolset>/include, its import libraries in | |
| dnl <toolset>/lib/<target>, and mspdb140.dll next to cl.exe. | |
| dnl Detecting the layout here lets the mspdb hunt and the VC/bin | |
| dnl logic below stay exactly as they were for VC9. | |
| MSVC_MODERN= | |
| if test -d "$with_cl_home/bin/Hostx86" -o -d "$with_cl_home/bin/Hostx64"; then | |
| MSVC_MODERN="TRUE" | |
| fi | |
| dnl =========================================================== | |
| dnl Check for mspdb71.dll/mspdb80.dll | |
| dnl =========================================================== | |
| dnl VC9 and older only: a modern toolset ships its mspdb*.dll in the | |
| dnl same directory as cl.exe, which the compile actions already have | |
| dnl on PATH. | |
| if test -z "$MSVC_MODERN"; then | |
| 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" | |
| fi | |
| AC_MSG_CHECKING([the Microsoft C/C++ Compiler]) | |
| dnl A modern toolset splits bin/ by HOST and then by TARGET, so the | |
| dnl cross compiler is a directory rather than VC9's "bin/amd64" | |
| dnl suffix. Prefer a Hostx64 tree when one exists: the x64-hosted | |
| dnl compiler is not confined to a 2GB address space, which matters | |
| dnl on the larger translation units in this tree. | |
| if test -n "$MSVC_MODERN"; then | |
| if test -d "$with_cl_home/bin/Hostx64"; then | |
| cl_host="Hostx64" | |
| else | |
| cl_host="Hostx86" | |
| fi | |
| case "$build_cpu" in | |
| i?86) | |
| cl_subdirectory="bin/$cl_host/x86" | |
| ;; | |
| x86_64) | |
| if test "$BUILD_WIN64" = "TRUE" ; then | |
| cl_subdirectory="bin/$cl_host/x64" | |
| else | |
| cl_subdirectory="bin/$cl_host/x86" | |
| fi | |
| ;; | |
| *) | |
| AC_MSG_ERROR([Unknown/unsupported Windows CPU $build_cpu.]) | |
| ;; | |
| esac | |
| else | |
| case "$build_cpu" in | |
| i?86) | |
| cl_subdirectory="bin" | |
| ;; | |
| x86_64) | |
| if test "$BUILD_WIN64" = "TRUE" ; then | |
| cl_subdirectory="bin/amd64" | |
| else | |
| cl_subdirectory="bin" | |
| fi | |
| ;; | |
| *) | |
| AC_MSG_ERROR([Unknown/unsupported Windows CPU $build_cpu.]) | |
| ;; | |
| esac | |
| fi | |
| if test -x "$with_cl_home/$cl_subdirectory/cl.exe"; then | |
| CC="$with_cl_home/$cl_subdirectory/cl.exe" | |
| COMPATH="$with_cl_home" | |
| # This gives us a posix path with 8.3 filename restrictions | |
| CC=`cygpath -d "$CC"` | |
| CC=`cygpath -u "$CC"` | |
| COMPATH=`cygpath -d "$COMPATH"` | |
| COMPATH=`cygpath -u "$COMPATH"` | |
| # Remove /cl.exe from CC case insensitive | |
| AC_MSG_RESULT([found ($CC)]) | |
| dnl VC9 spells it VC/Include, a modern toolset spells it | |
| dnl <toolset>/include. NTFS is case-insensitive so either | |
| dnl name resolves, but only one of the two directories exists. | |
| if test -n "$MSVC_MODERN"; then | |
| export INCLUDE=`cygpath -d "$COMPATH/include"` | |
| else | |
| export INCLUDE=`cygpath -d "$COMPATH/Include"` | |
| fi | |
| 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. | |
| CCTXTVER=`$CC 2>&1 | head -n1` | |
| CCNUMVER=`echo $CCTXTVER | $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 in "$CCTXTVER"]) | |
| dnl COMEX names the compiler generation the rest of the build | |
| dnl switches on: it selects solenv/inc/wntmsci<COMEX>.mk, the | |
| dnl CVER define, and the wntmsci<COMEX> output tree. 14 is the | |
| dnl UCRT generation -- VS2015 (cl 19.00) and everything since, | |
| dnl which share one CRT and one SDK layout. There is | |
| dnl deliberately no value per Visual Studio release: nothing in | |
| dnl this tree distinguishes VS2017 from VS2022. | |
| if test "$CCNUMVER" -ge "001900000000"; then | |
| COMEX=14 | |
| MSVSVER=2015 | |
| AC_MSG_RESULT([found a UCRT-generation compiler (VS2015 or newer).]) | |
| if test -z "$MSVC_MODERN"; then | |
| AC_MSG_ERROR([cl.exe reports version $CCNUMVER, i.e. VS2015 or newer, but $with_cl_home has no bin/Host* layout. Point --with-cl-home at the versioned toolset directory, e.g. .../VC/Tools/MSVC/14.29.30133]) | |
| fi | |
| elif test "$CCNUMVER" -ge "001500000000"; then | |
| COMEX=12 | |
| MSVSVER=2008 | |
| AC_MSG_RESULT([found .NET 2008 / VS 9.0.]) | |
| if test -n "$MSVC_MODERN"; then | |
| AC_MSG_ERROR([$with_cl_home has a modern bin/Host* layout but its cl.exe reports version $CCNUMVER. Refusing to guess which of the two it is.]) | |
| fi | |
| else | |
| AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2008, or a VS2015-or-newer toolset.]) | |
| fi | |
| else | |
| AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home.]) | |
| 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 | |
| fi | |
| fi | |
| AC_SUBST(COMEX) | |
| AC_SUBST(MSPDB_PATH) | |
| AC_SUBST(MSVC_MODERN) | |
| AC_SUBST(USE_MINGW) | |
| dnl =================================================================== | |
| dnl The CLI/.NET language binding, and whether it can be built at all | |
| dnl =================================================================== | |
| dnl cli_ure, the .NET language binding. It was written in Managed | |
| dnl Extensions for C++ -- __gc, S"...", __pin -- which needs /clr:oldSyntax, | |
| dnl and that switch was removed after VS2015; it is now C++/CLI and builds | |
| dnl with either compiler generation. | |
| dnl | |
| dnl It is still optional, because it wants a .NET SDK: csc.exe to compile the | |
| dnl C# half and mscoree.lib to link the C++ half. --disable-cli is for a | |
| dnl Windows box that has a compiler but no SDK. | |
| dnl | |
| dnl One variable rather than a test in each consumer: the module makefiles, | |
| dnl the SDK's file lists and its checker all need the same answer, and they | |
| dnl should not each rediscover it. | |
| AC_ARG_ENABLE(cli, | |
| [ --disable-cli Do not build the CLI (.NET) language binding. It | |
| needs a .NET SDK -- csc.exe and mscoree.lib -- which | |
| a Windows machine need not have. | |
| ],,) | |
| DISABLE_CLI= | |
| if test "$_os" != "WINNT" -o "$enable_cli" = "no" ; then | |
| DISABLE_CLI="TRUE" | |
| fi | |
| if test "$_os" = "WINNT" ; then | |
| AC_MSG_CHECKING([whether to build the CLI language binding]) | |
| if test -z "$DISABLE_CLI" ; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_RESULT([no, --disable-cli]) | |
| fi | |
| fi | |
| AC_SUBST(DISABLE_CLI) | |
| dnl =================================================================== | |
| dnl A host Python, for building the bundled one on Windows | |
| dnl =================================================================== | |
| dnl Python 3's PCbuild runs generator scripts under an ALREADY EXISTING | |
| dnl Python. Its find_python.bat probes only "py -3.10" and "py -3.9" | |
| dnl and then falls back to downloading a private copy through nuget, | |
| dnl which an offline build cannot do. HOST_PYTHON is the environment | |
| dnl variable that batch file checks before any of that, so naming one | |
| dnl here keeps the build off the network. | |
| dnl AOO_CHECK_HOST_PYTHON(candidate) | |
| dnl | |
| dnl Sets HOST_PYTHON to the Windows form of $1 when it is a NATIVE Windows | |
| dnl Python 3.9 or newer, and leaves it empty otherwise. | |
| dnl | |
| dnl os.name is the whole point of the test. A cygwin Python passes the | |
| dnl version check and is still the wrong tool: it reads the native paths | |
| dnl PCbuild hands it -- C:\foo\bar -- as RELATIVE, and prepends its own | |
| dnl working directory, so deepfreeze.py dies on a path with a drive letter | |
| dnl in the middle of it. | |
| AC_DEFUN([AOO_CHECK_HOST_PYTHON], [ | |
| _pycand="$1" | |
| dnl cygwin's which reports the name without the .exe that Windows needs | |
| if test -f "$_pycand.exe"; then | |
| _pycand="$_pycand.exe" | |
| fi | |
| if "$_pycand" -Ec "import os, sys; assert os.name == 'nt'; assert sys.version_info[[:2]] >= (3, 9)" >/dev/null 2>&1; then | |
| HOST_PYTHON=`cygpath -m "$_pycand"` | |
| fi | |
| ]) | |
| HOST_PYTHON= | |
| if test \( "$_os" = "WINNT" \) -a \( -n "$MSVC_MODERN" \) -a \( "$SYSTEM_PYTHON" != "YES" \) ; then | |
| AC_MSG_CHECKING([for a host Python to build the bundled Python with]) | |
| if test -n "$with_host_python"; then | |
| AOO_CHECK_HOST_PYTHON([$with_host_python]) | |
| if test -z "$HOST_PYTHON"; then | |
| AC_MSG_ERROR([--with-host-python=$with_host_python is not a native Windows Python 3.9 or newer]) | |
| fi | |
| else | |
| dnl which -a, not which: cygwin's own python comes first on PATH and | |
| dnl is not usable here, so the search has to see past it. | |
| for _pypath in `which -a python3 python py 2>/dev/null`; do | |
| AOO_CHECK_HOST_PYTHON([$_pypath]) | |
| if test -n "$HOST_PYTHON"; then | |
| break | |
| fi | |
| done | |
| fi | |
| if test -z "$HOST_PYTHON"; then | |
| AC_MSG_ERROR([no Python 3.9 or newer found. PCbuild needs one to build the bundled Python; pass --with-host-python=<path to python.exe>]) | |
| fi | |
| AC_MSG_RESULT([$HOST_PYTHON]) | |
| fi | |
| AC_SUBST(HOST_PYTHON) | |
| dnl =================================================================== | |
| dnl The Windows 10 SDK, for a UCRT-generation toolset | |
| dnl =================================================================== | |
| dnl This sits here, immediately after the compiler, rather than next to | |
| dnl the Platform SDK check far below, because the SDK now supplies | |
| dnl midl.exe and the Windows Installer tools -- and the .NET/midl hunt | |
| dnl is only a few lines further down. | |
| if test \( "$_os" = "WINNT" \) -a \( -n "$MSVC_MODERN" \) ; then | |
| dnl ===================================================================== | |
| dnl A UCRT-generation toolset is paired with the Windows 10/11 SDK, | |
| dnl whose layout is genuinely different rather than merely renamed. | |
| dnl Platform SDK v7.0 has one Include/ and one Lib/; the Windows 10 SDK | |
| dnl has FOUR include trees (ucrt, um, shared, winrt) and TWO lib trees | |
| dnl (ucrt, um) per installed version, each under a version directory. | |
| dnl So the single PSDK_HOME/Include and PSDK_HOME/Lib that set_soenv.in | |
| dnl builds by concatenation become a version plus a fixed set of | |
| dnl subdirectories -- and that version is what has to be found here. | |
| AC_MSG_CHECKING([for the Windows 10 SDK]) | |
| dnl Every candidate is judged by ONE rule: does it have Include/<ver>/um? | |
| dnl That is the only cheap thing that separates a Windows 10 SDK from the | |
| dnl old Platform SDK, which also has an Include/ and a Lib/ -- so a test | |
| dnl for those two accepts v7.0 and then fails the version scan below with | |
| dnl a message naming the right directory and the wrong reason. | |
| dnl | |
| dnl In order: what the user said, what the old option said, what the | |
| dnl registry says (oowintool knows only pre-Windows-8 keys, so this is | |
| dnl usually the Platform SDK and usually rejected here), then the two | |
| dnl documented install roots. | |
| windows_sdk_seen= | |
| WINDOWS_SDK_HOME= | |
| for windows_sdk_try in \ | |
| "$with_windows_sdk_home" \ | |
| "$with_psdk_home" \ | |
| "`$OOWINTOOL --psdk-home 2>/dev/null`" \ | |
| "/cygdrive/c/Program Files (x86)/Windows Kits/10" \ | |
| "/cygdrive/c/Program Files/Windows Kits/10" ; do | |
| test -z "$windows_sdk_try" && continue | |
| windows_sdk_try=`cygpath -u "$windows_sdk_try" 2>/dev/null || echo "$windows_sdk_try"` | |
| windows_sdk_try=`echo "$windows_sdk_try" | $SED 's:/$::'` | |
| windows_sdk_seen="$windows_sdk_seen | |
| $windows_sdk_try" | |
| if test -n "`ls -d \"$windows_sdk_try\"/Include/*/um 2>/dev/null`"; then | |
| WINDOWS_SDK_HOME="$windows_sdk_try" | |
| break | |
| fi | |
| done | |
| if test -z "$WINDOWS_SDK_HOME"; then | |
| AC_MSG_ERROR([No Windows 10 SDK found. A directory qualifies only when it has an Include/<version>/um; the old Platform SDK does not, and is not a substitute. Tried, in order:$windows_sdk_seen | |
| Use --with-windows-sdk-home to name one explicitly.]) | |
| fi | |
| if test -n "$with_psdk_home" -a "$WINDOWS_SDK_HOME" != "`cygpath -u \"$with_psdk_home\" 2>/dev/null`"; then | |
| AC_MSG_WARN([--with-psdk-home=$with_psdk_home is not a Windows 10 SDK; using $WINDOWS_SDK_HOME instead. It is still used for --with-frame-home purposes only if you passed it there too.]) | |
| fi | |
| dnl Pick the newest COMPLETE version. Completeness matters more than it | |
| dnl sounds: bin/ routinely holds several versions while Include/ and | |
| dnl Lib/ hold one or two, so selecting on bin/ alone can pick a version | |
| dnl that has no headers at all. Compare component by component as | |
| dnl integers -- a plain string compare sorts 10.0.9xxxx above | |
| dnl 10.0.19041. | |
| if test -n "$with_windows_sdk_version"; then | |
| WINDOWS_SDK_VERSION="$with_windows_sdk_version" | |
| else | |
| windows_sdk_candidates= | |
| for sdkver in `ls "$WINDOWS_SDK_HOME/Include" 2>/dev/null`; do | |
| if test -d "$WINDOWS_SDK_HOME/Include/$sdkver/um" -a -d "$WINDOWS_SDK_HOME/Lib/$sdkver/um"; then | |
| windows_sdk_candidates="$windows_sdk_candidates $sdkver" | |
| fi | |
| done | |
| WINDOWS_SDK_VERSION=`for v in $windows_sdk_candidates; do echo $v; done | $AWK -F. '{ printf "%05d%05d%05d%05d %s\n", $1, $2, $3, $4, $0 }' | sort | tail -n 1 | $AWK '{ print $2 }'` | |
| fi | |
| if test -z "$WINDOWS_SDK_VERSION"; then | |
| AC_MSG_ERROR([No complete Windows 10 SDK found under $WINDOWS_SDK_HOME. A version counts as complete only when it has both an Include/<version>/um and a Lib/<version>/um. Use --with-windows-sdk-home and/or --with-windows-sdk-version.]) | |
| fi | |
| AC_MSG_RESULT([$WINDOWS_SDK_VERSION in $WINDOWS_SDK_HOME]) | |
| dnl PSDK_HOME stays the SDK root, so everything downstream that only | |
| dnl wants a base directory keeps working. What changes is that the | |
| dnl include and lib paths are built from the version as well; that | |
| dnl happens in set_soenv.in. | |
| PSDK_HOME="$WINDOWS_SDK_HOME" | |
| windows_sdk_um="$WINDOWS_SDK_HOME/Include/$WINDOWS_SDK_VERSION/um" | |
| if test ! -f "$windows_sdk_um/adoint.h" -o ! -f "$windows_sdk_um/sqlucode.h" -o ! -f "$windows_sdk_um/usp10.h"; then | |
| AC_MSG_ERROR([$windows_sdk_um is missing headers this build needs (adoint.h, sqlucode.h, usp10.h). Install the "Windows SDK for Desktop C++" component.]) | |
| fi | |
| windows_sdk_lib="$WINDOWS_SDK_HOME/Lib/$WINDOWS_SDK_VERSION" | |
| if test ! -f "$windows_sdk_lib/ucrt/x86/ucrt.lib" -a ! -f "$windows_sdk_lib/ucrt/x64/ucrt.lib"; then | |
| AC_MSG_ERROR([$windows_sdk_lib has no ucrt import library for either architecture.]) | |
| fi | |
| dnl The Windows Installer tools moved into bin/<version>/<arch>. They | |
| dnl run on the build machine, so x86 is the right choice whatever is | |
| dnl being built. | |
| WINDOWS_SDK_BINDIR="$WINDOWS_SDK_HOME/bin/$WINDOWS_SDK_VERSION/x86" | |
| for sdktool in msiinfo msidb uuidgen msitran; do | |
| if test ! -x "$WINDOWS_SDK_BINDIR/$sdktool.exe"; then | |
| AC_MSG_ERROR([$sdktool.exe is missing from $WINDOWS_SDK_BINDIR. Install the "MSI Tools" SDK component.]) | |
| fi | |
| done | |
| WINDOWS_VISTA_PSDK=TRUE | |
| fi | |
| AC_SUBST(WINDOWS_SDK_HOME) | |
| AC_SUBST(WINDOWS_SDK_VERSION) | |
| AC_SUBST(WINDOWS_SDK_BINDIR) | |
| dnl =================================================================== | |
| dnl MSBuild, for dependencies that ship Visual Studio project files | |
| dnl =================================================================== | |
| dnl vcbuild.exe built .vcproj files and shipped with VS2005 and VS2008 | |
| dnl only; VS2010 replaced it with MSBuild and changed the project format | |
| dnl to .vcxproj at the same time, so this is not a renamed binary but a | |
| dnl different tool reading different files. CoinMP is the one bundled | |
| dnl dependency that needs it. | |
| dnl | |
| dnl MSBuild lives beside the toolset rather than inside it, and is not on | |
| dnl PATH in a BuildTools installation, so it is looked for relative to | |
| dnl --with-cl-home: <VS>/VC/Tools/MSVC/<ver> puts the VS root four levels | |
| dnl up. Only searched for a UCRT-generation toolset -- VC9 uses vcbuild | |
| dnl and must not be given an MSBuild it would not know what to do with. | |
| MSBUILD_PATH= | |
| if test "$_os" = "WINNT" -a -n "$MSVC_MODERN"; then | |
| AC_MSG_CHECKING([for MSBuild]) | |
| if test -n "$with_msbuild_path"; then | |
| MSBUILD_PATH=`cygpath -u "$with_msbuild_path"` | |
| else | |
| for msbuild_try in \ | |
| "$with_cl_home/../../../../MSBuild/Current/Bin" \ | |
| "$with_cl_home/../../../../MSBuild/15.0/Bin" ; do | |
| if test -x "$msbuild_try/MSBuild.exe"; then | |
| MSBUILD_PATH="$msbuild_try" | |
| break | |
| fi | |
| done | |
| if test -z "$MSBUILD_PATH"; then | |
| AC_PATH_PROG(MSBUILD_EXE, MSBuild.exe) | |
| if test -n "$MSBUILD_EXE"; then | |
| MSBUILD_PATH=`dirname "$MSBUILD_EXE"` | |
| fi | |
| fi | |
| fi | |
| if test -z "$MSBUILD_PATH" -o ! -x "$MSBUILD_PATH/MSBuild.exe"; then | |
| AC_MSG_ERROR([MSBuild.exe not found. It is needed to build CoinMP, whose Visual Studio projects can no longer be built by vcbuild. It is normally beside the toolset, in <VisualStudio>/MSBuild/Current/Bin; use --with-msbuild-path to name it, or --disable-coinmp to do without the Calc solver.]) | |
| fi | |
| dnl Convert to a posix path with 8.3 names, as the other tool paths are | |
| MSBUILD_PATH=`cygpath -d "$MSBUILD_PATH"` | |
| MSBUILD_PATH=`cygpath -u "$MSBUILD_PATH"` | |
| AC_MSG_RESULT([$MSBUILD_PATH]) | |
| fi | |
| AC_SUBST(MSBUILD_PATH) | |
| dnl The PlatformToolset MSBuild should retarget a project to. CoinMP's | |
| dnl MSBuild projects are v10, i.e. they name toolset v100 (VS2010), which is | |
| dnl not installed -- so the toolset has to be passed on the command line or | |
| dnl the build fails with "the build tools for v100 cannot be found". | |
| dnl | |
| dnl It is derived from the toolset directory name rather than from cl's | |
| dnl version, because that name IS the toolset version and needs no parsing | |
| dnl of the four-part number configure builds elsewhere: 14.29.30133 is v142, | |
| dnl 14.16.x is v141, 14.0x is v140, 14.3x is v143. | |
| VCTOOLSET= | |
| if test "$_os" = "WINNT" -a -n "$MSVC_MODERN"; then | |
| AC_MSG_CHECKING([which MSBuild PlatformToolset to use]) | |
| vctoolset_ver=`basename "$with_cl_home"` | |
| vctoolset_major=`echo "$vctoolset_ver" | cut -d. -f1` | |
| vctoolset_minor=`echo "$vctoolset_ver" | cut -d. -f2` | |
| if test -n "$vctoolset_major" -a -n "$vctoolset_minor"; then | |
| VCTOOLSET="v$vctoolset_major`expr $vctoolset_minor / 10`" | |
| fi | |
| if test -z "$VCTOOLSET"; then | |
| AC_MSG_ERROR([Could not work out a PlatformToolset from the toolset directory name "$vctoolset_ver". --with-cl-home should name the versioned toolset directory, e.g. .../VC/Tools/MSVC/14.29.30133]) | |
| fi | |
| AC_MSG_RESULT([$VCTOOLSET]) | |
| fi | |
| AC_SUBST(VCTOOLSET) | |
| dnl Compiler detection, logic from setsoenv.in | |
| case "$build_os" in | |
| *cygwin*) | |
| if test "$WITH_MINGWIN" = "yes"; then | |
| COM="GCC"; | |
| else | |
| COM="MSC"; | |
| fi;; | |
| os2*) | |
| COM="GCC";; | |
| netbsd | kfreebsd* | freebsd* | linux* | darwin* ) | |
| if $CC --version 2>&1 | $GREP clang > /dev/null ; then | |
| COM="CLANG"; | |
| else | |
| COM="GCC"; | |
| fi;; | |
| solaris*) | |
| case "$CC" in | |
| *gcc*) COM="GCC";; | |
| *) COM="C52";; | |
| esac;; | |
| osf | aix*) | |
| COM="CXX";; | |
| *) AC_MSG_ERROR([Unable to decipher compiler for $build_os]);; | |
| esac | |
| AC_SUBST(COM) | |
| dnl Decode the compiler version. Logic from main/solenv/inc/tg_compv.mk. | |
| case $COM in | |
| GCC) | |
| CCVER=`${CC} -dumpfullversion -dumpversion 2>&1`; | |
| CCNUMVER=`echo ${CCVER} | $AWK -v num=true -f ${_solenv}/bin/getcompver.awk`; | |
| if test "${CCNUMVER}" -ge 000300000001; then | |
| COMID="gcc3"; | |
| COMNAME="gcc3"; | |
| elif test "${CCNUMVER}" -ge 000300000001; then | |
| COMID="GCC"; | |
| COMNAME="gcc2"; | |
| else | |
| AC_MSG_ERROR([gcc too old]); | |
| fi | |
| ;; | |
| CLANG) | |
| CCVER=`${CC} --version 2>&1 | head -n1 | sed -e"s/.*version //" -e"s/ .*//"`; | |
| CCNUMVER=`echo ${CCVER} | $AWK -v num=true -f ${_solenv}/bin/getcompver.awk`; | |
| # The version in tg_compv.mk for darwin does not look correct | |
| # CCNUMVER = `echo ${CCVER} | sed -e"s/\.//"; | |
| case "$build_os" in | |
| darwin*) # Mac OS X | |
| COMID="s5abi"; | |
| COMNAME="s5abi"; | |
| ;; | |
| *) | |
| COMID="gcc3"; | |
| COMNAME="gcc3"; | |
| ;; | |
| esac | |
| ;; | |
| MSC) | |
| CCVER=`${CC} 2>&1 | $AWK -f ${_solenv}/bin/getcompver.awk`; | |
| CCNUMVER=`${CC} 2>&1 | $AWK -v num=true -f ${_solenv}/bin/getcompver.awk`; | |
| if test "${CCNUMVER}" -ge 001200000000; then | |
| COMID="MSC"; | |
| case "$build_cpu" in | |
| i?86) | |
| COMNAME="msci"; | |
| ;; | |
| x86_64) | |
| if test "$BUILD_WIN64" = "TRUE" ; then | |
| COMNAME="mscx"; | |
| else | |
| COMNAME="msci"; | |
| fi | |
| ;; | |
| *) | |
| AC_MSG_ERROR([Unknown/unsupported Windows CPU $build_cpu.]) | |
| ;; | |
| esac | |
| else | |
| AC_MSG_ERROR([MSC compiler too old]); | |
| fi | |
| ;; | |
| C55 | C54 | C52 | C40 | sunpro) | |
| CCVER=`${CC} -V 2>&1 | $AWK -f ${_solenv}/bin/getcompver.awk`; | |
| CCNUMVER=`${CC} -V 2>&1 | $AWK -v num=true -f ${_solenv}/bin/getcompver.awk`; | |
| if test "${CCNUMVER}" -ge 00050002; then | |
| COMID="C52"; | |
| COMNAME="sunpro5"; | |
| else | |
| AC_MSG_ERROR([Sun compiler too old]); | |
| fi | |
| ;; | |
| *) | |
| AC_MSG_ERROR([Unable to detect compiler version]);; | |
| esac | |
| AC_SUBST(CCVER) | |
| AC_SUBST(CCNUMVER) | |
| AC_SUBST(COMID) | |
| AC_SUBST(COMNAME) | |
| if test "$_os" = "FreeBSD"; then | |
| FBSD_GCC_RPATH= | |
| if test "$COM" = "GCC"; then | |
| rpath=`$CC --print-file-name libstdc++.so` | |
| rpath=`realpath $rpath` | |
| rpath=`dirname $rpath` | |
| if test "$rpath" != "/usr/lib" ; then | |
| FBSD_GCC_RPATH="-Wl,-rpath=$rpath" | |
| fi | |
| fi | |
| AC_SUBST(FBSD_GCC_RPATH) | |
| fi | |
| if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then | |
| AC_MSG_CHECKING( for --undefined-version linker support ) | |
| undefined_version_ldflags_save=$LDFLAGS | |
| LDFLAGS="$LDFLAGS -Wl,--undefined-version" | |
| AC_LINK_IFELSE([AC_LANG_PROGRAM([ | |
| #include <stdio.h> | |
| ],[ | |
| printf ("hello world\n"); | |
| ])], HAVE_LD_UNDEFINED_VERSION=TRUE, HAVE_LD_UNDEFINED_VERSION=FALSE) | |
| if test "z$HAVE_LD_UNDEFINED_VERSION" = "zTRUE"; then | |
| AC_MSG_RESULT( found ) | |
| else | |
| AC_MSG_RESULT( not found ) | |
| fi | |
| LDFLAGS=$undefined_version_ldflags_save | |
| AC_SUBST(HAVE_LD_UNDEFINED_VERSION) | |
| fi | |
| dnl =================================================================== | |
| dnl .NET needs special treatment | |
| 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 | |
| vstest=`$OOWINTOOL --msvs-productdir`; | |
| if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then | |
| 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 | |
| dnl On the Windows 10 SDK midl.exe sits with the other SDK tools in | |
| dnl bin/<version>/<arch>. This is preferred over what the searches above | |
| dnl turn up -- an AC_PATH_PROG hit from an ambient vcvars environment is | |
| dnl exactly the kind of midl/headers mismatch that surfaces much later as | |
| dnl output the compiler cannot parse -- but NOT over --with-midl-path, | |
| dnl which is the user saying which one they mean. | |
| if test -z "$with_midl_path" \ | |
| -a -n "$WINDOWS_SDK_BINDIR" -a -x "$WINDOWS_SDK_BINDIR/midl.exe" ; then | |
| MIDL_PATH="$WINDOWS_SDK_BINDIR" | |
| 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 | |
| dnl Which CLR the C# half must target is decided by the C++ half, and a | |
| dnl UCRT-generation compiler settles it: /clr has not emitted CLR 2 | |
| dnl assemblies since VS2010. Mixing the two does not fail at build time, | |
| dnl it fails when the process loads them -- | |
| dnl | |
| dnl System.BadImageFormatException: ... The assembly was created by a | |
| dnl runtime that is newer than the currently loaded runtime | |
| dnl | |
| dnl oowintool goes looking for the v2 csc on purpose, which is right for | |
| dnl VC9 and wrong here, so take the newest compiler beside it instead. | |
| dnl This overrides an explicit --with-csc-path, because the constraint is | |
| dnl the compiler's and not a preference; hence the warning. | |
| if test -n "$MSVC_MODERN" -a -z "$DISABLE_CLI"; then | |
| AC_MSG_CHECKING([for a csc.exe matching the C++ compiler's CLR]) | |
| case "$CSC_PATH" in | |
| *[[Vv]]1.*|*[[Vv]]2.*|*[[Vv]]3.*) | |
| _csc_root=`dirname "$CSC_PATH"` | |
| _csc_new= | |
| for _c in `ls -d "$_csc_root"/[[Vv]]4* 2>/dev/null | sort -r`; do | |
| if test -x "$_c/csc.exe"; then | |
| _csc_new="$_c" | |
| break | |
| fi | |
| done | |
| if test -n "$_csc_new"; then | |
| if test -n "$with_csc_path"; then | |
| AC_MSG_WARN([--with-csc-path points at a CLR 2 compiler; using $_csc_new instead, because this C++ compiler emits CLR 4 assemblies]) | |
| fi | |
| CSC_PATH="$_csc_new" | |
| AC_MSG_RESULT([$CSC_PATH]) | |
| else | |
| AC_MSG_RESULT([none found]) | |
| AC_MSG_ERROR([This C++ compiler emits CLR 4 assemblies, but only a CLR 2 csc.exe was found. Point --with-csc-path at a v4 .NET Framework directory, or configure --disable-cli.]) | |
| fi | |
| ;; | |
| *) | |
| AC_MSG_RESULT([$CSC_PATH]) | |
| ;; | |
| esac | |
| fi | |
| if test ! -x "$CSC_PATH/csc.exe" -a -z "$DISABLE_CLI"; then | |
| AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path, or configure --disable-cli]) | |
| 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 | |
| frametest=`$OOWINTOOL --dotnetsdk-dir` | |
| if test -f "$frametest/lib/mscoree.lib"; then | |
| FRAME_HOME="$frametest" | |
| else | |
| frametest=`$OOWINTOOL --psdk-home` | |
| if test -f "$frametest/lib/mscoree.lib"; then | |
| FRAME_HOME="$frametest" | |
| fi | |
| fi | |
| fi | |
| if test ! -f "$FRAME_HOME/lib/mscoree.lib" -a -z "$DISABLE_CLI"; then | |
| AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home, or configure --disable-cli]) | |
| 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 | |
| dnl =================================================================== | |
| dnl Check if stdc headers are available excluding Windows. | |
| dnl =================================================================== | |
| if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then | |
| m4_warn([obsolete], | |
| [The preprocessor macro 'STDC_HEADERS' is obsolete. | |
| Except in unusual embedded environments, you can safely include all | |
| C89 headers unconditionally.])dnl | |
| # Autoupdate added the next two lines to ensure that your configure | |
| # script's behavior did not change. They are probably safe to remove. | |
| AC_CHECK_INCLUDES_DEFAULT | |
| AC_PROG_EGREP | |
| fi | |
| dnl =================================================================== | |
| dnl Find pre-processors. | |
| dnl =================================================================== | |
| if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then | |
| 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 =================================================================== | |
| 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" | |
| fi | |
| AC_SUBST(LFS_CFLAGS) | |
| dnl =================================================================== | |
| dnl Check if valgrind.h is available | |
| dnl =================================================================== | |
| if test -n "$enable_dbgutil" && test "$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="" | |
| prev_cppflags=$CPPFLAGS | |
| if test -z "$VALGRIND_CFLAGS"; then | |
| CPPFLAGS="-I/usr/include/valgrind" | |
| AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h]) | |
| fi | |
| if test -z "$VALGRIND_CFLAGS"; then | |
| CPPFLAGS="-I/usr/local/include/valgrind" | |
| AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], []) | |
| fi | |
| if test -n "$VALGRIND_CFLAGS"; then | |
| CPPFLAGS=$VALGRIND_CFLAGS | |
| AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""]) | |
| fi | |
| CPPFLAGS=$prev_cppflags | |
| 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 =================================================================== | |
| 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 | |
| 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 | |
| AC_PROG_CXX | |
| fi | |
| dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk) | |
| if test "$GXX" = "yes"; then | |
| AC_MSG_CHECKING([the GNU C++ compiler version]) | |
| _gpp_version=`$CXX -dumpversion` | |
| _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` | |
| AC_MSG_RESULT([checked (g++ $_gpp_version)]) | |
| if test "$_gpp_majmin" = "304"; then | |
| AC_MSG_CHECKING([whether $CXX has the enum bug]) | |
| AC_RUN_IFELSE([AC_LANG_SOURCE([[ | |
| extern "C" void abort (void); | |
| extern "C" void exit (int status); | |
| enum E { E0, E1, E2, E3, E4, E5 }; | |
| void | |
| test (enum E e) | |
| { | |
| if (e == E2 || e == E3 || e == E1) | |
| exit (1); | |
| } | |
| int | |
| main (void) | |
| { | |
| test (E4); | |
| test (E5); | |
| test (E0); | |
| return 0; | |
| } | |
| ]])],[AC_MSG_ERROR([your version of the GNU C++ compiler has a bug which prevents Apache OpenOffice from being compiled correctly - please check https://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])],[AC_MSG_RESULT([no])],[]) | |
| fi | |
| fi | |
| dnl =================================================================== | |
| dnl Set the mingw runtime library include directories | |
| dnl =================================================================== | |
| if test "$WITH_MINGWIN" = "yes"; then | |
| AC_MSG_CHECKING([for mingwin 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 | |
| _temp="" | |
| for a in $_mingw_lib_include_path | |
| do | |
| a=`cygpath -d "$a"` | |
| _temp="$_temp "`cygpath -u "$a"` | |
| done | |
| _mingw_lib_include_path=$_temp | |
| fi | |
| if test -z "$_mingw_lib_include_path"; then | |
| _mingw_lib_include_path="NO_LIB_INCLUDE" | |
| AC_MSG_RESULT([no mingwin runtime includes]) | |
| 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]) | |
| 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 | |
| _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]) | |
| 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` | |
| AC_MSG_CHECKING([whether to use dynamic libgcc]) | |
| if test -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=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` | |
| if test -n "$MINGW_GCCDLL"; then | |
| MINGW_SHARED_GCCLIB=YES | |
| AC_MSG_RESULT([use $MINGW_GCCDLL]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| 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 | |
| MINGW_SHARED_LIBSTDCPP=stdc++_s | |
| fi | |
| if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then | |
| MINGW_SHARED_LIBSTDCPP=stdc++.dll | |
| fi | |
| if test -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` | |
| if test -n "$MINGW_GXXDLL"; then | |
| MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP | |
| MINGW_SHARED_GXXLIB=YES | |
| AC_MSG_RESULT([use $MINGW_GXXDLL]) | |
| else | |
| MINGW_SHARED_LIBSTDCPP= | |
| AC_MSG_RESULT([no]) | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` | |
| AC_SUBST(MINGW_CLIB_DIR) | |
| AC_SUBST(MINGW_SHARED_GCCLIB) | |
| AC_SUBST(MINGW_GCCLIB_EH) | |
| AC_SUBST(MINGW_SHARED_GXXLIB) | |
| AC_SUBST(MINGW_SHARED_LIBSTDCPP) | |
| AC_SUBST(MINGW_GCCDLL) | |
| AC_SUBST(MINGW_GXXDLL) | |
| fi | |
| dnl =================================================================== | |
| dnl Extra checking for the SUN OS compiler | |
| dnl =================================================================== | |
| if test "$_os" = "SunOS"; then | |
| dnl SunStudio C++ compiler packaged with SunStudio C compiler | |
| if test "$CC" = "cc"; then | |
| AC_MSG_CHECKING([SunStudio C++ Compiler]) | |
| if test "$CXX" != "CC"; then | |
| AC_MSG_WARN([SunStudio C++ was not found]) | |
| echo "SunStudio C++ was not found" >> warn | |
| else | |
| 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 | |
| AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream> | |
| extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__)); | |
| ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2" | |
| ]) | |
| 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 "$WITH_STLPORT" != "no"; then | |
| AC_MSG_ERROR([Option --with-stlport is no longer available.]) | |
| else | |
| USE_SYSTEM_STL="YES" | |
| fi | |
| AC_SUBST(USE_SYSTEM_STL) | |
| dnl =================================================================== | |
| dnl visibility feature | |
| dnl =================================================================== | |
| if test "$GCC" = "yes"; then | |
| AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) | |
| save_CFLAGS=$CFLAGS | |
| CFLAGS="$CFLAGS -fvisibility=hidden" | |
| AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_VISIBILITY_FEATURE=TRUE ],[]) | |
| CFLAGS=$save_CFLAGS | |
| if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| fi | |
| # =================================================================== | |
| # use --ccache-skip? | |
| # =================================================================== | |
| dnl used to escape compiler options for ccache that otherwise prevent | |
| dnl caching of the results (like "-x objective-c++" for Mac) | |
| AC_MSG_CHECKING([whether we are allowed and 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 - disabled 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 | |
| # 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 | |
| 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 | |
| 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([],[])], | |
| [use_ccache=yes], [use_ccache=no]) | |
| if test $use_ccache = yes ; then | |
| AC_MSG_RESULT([yes, will enable --ccache-skip]) | |
| AC_SUBST([USE_CCACHE], [YES]) | |
| else | |
| AC_MSG_RESULT([no, will not enable --ccache-skip]) | |
| fi | |
| CXXFLAGS=$save_CXXFLAGS | |
| AC_LANG_POP([C++]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip]) | |
| 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 false ; then # TODO: update TR1 compliant STLs | |
| if test "$USE_SYSTEM_STL" = "YES"; then | |
| AC_MSG_CHECKING([system stl sanity]) | |
| AC_LANG_PUSH([C++]) | |
| if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then | |
| AC_MSG_CHECKING([if STL headers are visibility safe]) | |
| AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no) | |
| AC_MSG_RESULT([$stlvisok]) | |
| if test "$stlvisok" = "no"; then | |
| AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility]) | |
| echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn | |
| unset HAVE_GCC_VISIBILITY_FEATURE | |
| fi | |
| fi | |
| if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then | |
| sharedlink_ldflags_save=$LDFLAGS | |
| LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" | |
| AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers]) | |
| AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sstream> | |
| using namespace std; | |
| ]], [[istringstream strm( "test" ); return 0;]])],[$EGREP -q unresolvable conftest.err; | |
| 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 | |
| fi | |
| LDFLAGS=$sharedlink_ldflags_save | |
| fi | |
| if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then | |
| AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) | |
| cat >visibility.cxx <<_ACEOF | |
| #pragma GCC visibility push(hidden) | |
| struct __attribute__ ((visibility ("default"))) TestStruct { | |
| static void Init(); | |
| }; | |
| __attribute__ ((visibility ("default"))) void TestFunc() { | |
| TestStruct::Init(); | |
| } | |
| _ACEOF | |
| if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then | |
| gccvisbroken=yes | |
| else | |
| case "$build_cpu" in | |
| i?86|x86_64) | |
| if $EGREP -q '@PLT' visibility.s; then | |
| gccvisbroken=no | |
| else | |
| gccvisbroken=yes | |
| fi | |
| ;; | |
| *) | |
| gccvisbroken=no | |
| ;; | |
| esac | |
| fi | |
| rm -f visibility.s visibility.cxx | |
| AC_MSG_RESULT([$gccvisbroken]) | |
| if test "$gccvisbroken" = "yes"; then | |
| AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility]) | |
| echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn | |
| unset HAVE_GCC_VISIBILITY_FEATURE | |
| fi | |
| fi | |
| AC_LANG_POP([C++]) | |
| fi | |
| fi # endof TODO: update TR1 compliant STLs | |
| AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE) | |
| dnl =================================================================== | |
| dnl allocator | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([which memory allocator to use]) | |
| if test "$with_alloc" = "system"; then | |
| AC_MSG_RESULT([system]) | |
| ALLOC="SYS_ALLOC"; | |
| AC_CHECK_FUNCS([malloc realloc calloc free]) | |
| 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 | |
| AC_MSG_ERROR([tcmalloc only available/usable on ix86]) | |
| fi | |
| AC_CHECK_LIB(tcmalloc, malloc, [], | |
| [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], []) | |
| ALLOC="TCMALLOC"; | |
| fi | |
| if test "$with_alloc" = "jemalloc"; then | |
| if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then | |
| AC_MSG_RESULT(jemalloc) | |
| save_CFLAGS=$CFLAGS | |
| CFLAGS="$CFLAGS -pthread" | |
| AC_CHECK_LIB(jemalloc, malloc, [], | |
| [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], []) | |
| ALLOC="JEMALLOC"; | |
| CFLAGS=$save_CFLAGS | |
| else | |
| AC_MSG_RESULT([system]) | |
| ALLOC="SYS_ALLOC"; | |
| AC_CHECK_FUNCS([malloc realloc calloc free]) | |
| fi | |
| fi | |
| if test "$with_alloc" = "internal" -o -z "$with_alloc"; then | |
| AC_MSG_RESULT([internal]) | |
| fi | |
| AC_SUBST(ALLOC) | |
| dnl =================================================================== | |
| dnl Custom build version | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to add custom build version]) | |
| if test "z$with_build_version" != "z"; then | |
| BUILD_VER_STRING=$with_build_version | |
| AC_MSG_RESULT([yes, $BUILD_VER_STRING]) | |
| else | |
| BUILD_VER_STRING= | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(BUILD_VER_STRING) | |
| dnl =================================================================== | |
| dnl Java support enable | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to build with Java support]) | |
| 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 | |
| # 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 | |
| AC_MSG_CHECKING([for JDK home]) | |
| _jdk_home=`$OOWINTOOL --jdk-home` | |
| AC_MSG_RESULT([$_jdk_home]) | |
| if test -d "$_jdk_home"; then | |
| with_jdk_home="$_jdk_home" | |
| else | |
| AC_MSG_WARN([$_jdk_home is not a JDK home directory, ignoring it]) | |
| fi | |
| else | |
| with_jdk_home=`cygpath -u "$with_jdk_home"` | |
| fi | |
| fi | |
| dnl on macOS there is no reliable way to derive JAVA_HOME from the path | |
| dnl of the java/javac binaries (the /usr/bin/java* wrappers are no longer | |
| dnl symlinks into a JDK, they are dispatcher stubs that shell out to | |
| dnl /usr/libexec/java_home), so ask the system tool directly. | |
| if test "$_os" = "Darwin"; then | |
| if test -z "$with_jdk_home"; then | |
| AC_MSG_CHECKING([for JDK home]) | |
| _jdk_home=`/usr/libexec/java_home 2>/dev/null` | |
| AC_MSG_RESULT([$_jdk_home]) | |
| if test -d "$_jdk_home"; then | |
| with_jdk_home="$_jdk_home" | |
| else | |
| AC_MSG_WARN([/usr/libexec/java_home did not return a JDK home directory, ignoring it]) | |
| fi | |
| fi | |
| fi | |
| dnl =================================================================== | |
| dnl Checks for java | |
| dnl =================================================================== | |
| if test "$SOLAR_JAVA" != ""; then | |
| JAVA_HOME=; export JAVA_HOME | |
| if test -z "$with_jdk_home"; then | |
| 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. | |
| if test -x "$_java_path"; then | |
| JAVAINTERPRETER=$_java_path | |
| else | |
| AC_MSG_ERROR([$_java_path not found, please use --with-jdk-home]) | |
| fi | |
| fi | |
| if test "$_os" = "WINNT"; then | |
| 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 | |
| JAVAIFLAGS="" | |
| fi | |
| fi | |
| dnl =================================================================== | |
| dnl Checks for JDK. | |
| dnl =================================================================== | |
| if test "$SOLAR_JAVA" != ""; then | |
| _gij_longver=0 | |
| AC_MSG_CHECKING([the installed JDK]) | |
| if test -n "$JAVAINTERPRETER"; 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)]) | |
| _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 | |
| 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 Apache OpenOffice 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 | |
| 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 | |
| AC_MSG_RESULT([checked (IBM JDK $_jdk)]) | |
| if test "$with_jdk_home" = ""; then | |
| AC_MSG_ERROR([In order to successfully build Apache OpenOffice using the IBM JDK, | |
| you must use the "--with-jdk-home" configure option explicitly]) | |
| fi | |
| JAVA_HOME=$with_jdk_home | |
| else | |
| JDK=sun | |
| 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 | |
| AC_MSG_RESULT([checked (JDK $_jdk)]) | |
| JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` | |
| 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]) | |
| fi | |
| else | |
| dnl Java disabled | |
| JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME | |
| 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"` | |
| else | |
| javacompiler="javac" | |
| fi | |
| if test "$_os" = "WNT" -o "$_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. | |
| if test -x "$_javac_path"; then | |
| JAVACOMPILER=$_javac_path | |
| fi | |
| fi | |
| if test -z "$JAVACOMPILER"; then | |
| AC_MSG_ERROR([$javacompiler not found, please use --with-jdk-home]) | |
| fi | |
| if test "$_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]) | |
| JDK=gcj | |
| AC_MSG_RESULT([checked (ecj)]) | |
| #TODO: what's to do here? some switch to do 1.5 compiling? | |
| JAVAFLAGS="-source 1.5 -target 1.5" | |
| _gij_longver="40200" | |
| fi | |
| fi | |
| JAVACISGCJ="" | |
| dnl =================================================================== | |
| dnl Checks that javac is gcj | |
| dnl =================================================================== | |
| if test "$SOLAR_JAVA" != ""; then | |
| if test `$JAVACOMPILER --version 2>&1 | $GREP -c "GCC"` -gt 0; then | |
| JAVACISGCJ="yes" | |
| fi | |
| fi | |
| AC_SUBST(JAVACISGCJ) | |
| dnl =================================================================== | |
| dnl Checks for javadoc | |
| dnl =================================================================== | |
| if test "$SOLAR_JAVA" != ""; then | |
| if test -z "$with_jdk_home"; then | |
| AC_PATH_PROG(JAVADOC, javadoc) | |
| else | |
| _javadoc_path="$with_jdk_home/bin/javadoc" | |
| if test "$_os" = "WNT" -o "$_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 | |
| else | |
| AC_PATH_PROG(JAVADOC, javadoc) | |
| fi | |
| fi | |
| if test -z "$JAVADOC"; then | |
| AC_MSG_ERROR([$_javadoc_path not found, please use --with-jdk-home]) | |
| fi | |
| if test "$_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 | |
| cat > findhome.java <<_ACEOF | |
| [import java.io.File; | |
| class findhome | |
| { | |
| public static void main(String args[]) | |
| { | |
| String jrelocation = System.getProperty("java.home"); | |
| File jre = new File(jrelocation); | |
| System.out.println(jre.getParent()); | |
| } | |
| }] | |
| _ACEOF | |
| AC_MSG_CHECKING([if javac works]) | |
| javac_cmd="$JAVACOMPILER findhome.java 1>&2" | |
| AC_TRY_EVAL(javac_cmd) | |
| if test $? = 0 && test -f ./findhome.class ; then | |
| AC_MSG_RESULT([javac works]) | |
| else | |
| echo "configure: javac test failed" >&5 | |
| cat findhome.java >&5 | |
| AC_MSG_ERROR([javac does not work - java projects will not build!]) | |
| fi | |
| AC_MSG_CHECKING([if gij knows its java.home]) | |
| JAVA_HOME=`$JAVAINTERPRETER findhome` | |
| if test $? = 0 && test "$JAVA_HOME" != "" ; then | |
| AC_MSG_RESULT([$JAVA_HOME]) | |
| else | |
| echo "configure: java test failed" >&5 | |
| cat findhome.java >&5 | |
| 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"` | |
| 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 | |
| JAVA_HOME_OK="NO" | |
| fi | |
| elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then | |
| JAVA_HOME_OK="NO" | |
| fi | |
| if test "$JAVA_HOME_OK" = "NO"; then | |
| AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script]) | |
| AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed]) | |
| AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly]) | |
| 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 | |
| fi | |
| AWTLIB= | |
| if test "$SOLAR_JAVA" != ""; then | |
| AC_MSG_CHECKING([for jawt lib name]) | |
| if test "$JDK" = "gcj"; then | |
| save_CFLAGS=$CFLAGS | |
| save_LDFLAGS=$LDFLAGS | |
| CFLAGS="$CFLAGS -I$JAVA_HOME/include" | |
| LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" | |
| exec 6>/dev/null # no output | |
| AC_CHECK_HEADER(jni.h, [], | |
| [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], []) | |
| AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] ) | |
| exec 6>&1 # output on again | |
| CFLAGS=$save_CFLAGS | |
| LDFLAGS=$save_LDFLAGS | |
| fi | |
| # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols. | |
| # A workaround is to link also against libpmawt.so | |
| if test "$JDK" = "ibm" ; then | |
| save_CFLAGS=$CFLAGS | |
| save_LDFLAGS=$LDFLAGS | |
| save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH | |
| CFLAGS="$CFLAGS -I$JAVA_HOME/include" | |
| if test "$_os" = "Darwin"; then | |
| dnl jni_md.h lives in a platform-specific subdirectory on macOS, | |
| dnl matching the layout set up for the real build in set_soenv.in | |
| CFLAGS="$CFLAGS -I$JAVA_HOME/include/darwin" | |
| fi | |
| LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin" | |
| LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH | |
| export LD_LIBRARY_PATH | |
| exec 6>/dev/null # no output | |
| AC_CHECK_HEADER(jni.h, [], | |
| [AC_MSG_ERROR([jni.h could not be found.])], []) | |
| AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] ) | |
| if test -z "$AWTLIB"; then | |
| LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" | |
| AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"]) | |
| fi | |
| exec 6>&1 # output on again | |
| CFLAGS=$save_CFLAGS | |
| LDFLAGS=$save_LDFLAGS | |
| LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH | |
| fi | |
| if test -z "$AWTLIB"; then | |
| AWTLIB=-ljawt | |
| fi | |
| AC_MSG_RESULT([$AWTLIB]) | |
| 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, please use --with-jdk-home]) | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| fi | |
| AC_SUBST(JAVA_HOME) | |
| AC_SUBST(JDK) | |
| AC_SUBST(JAVAFLAGS) | |
| AC_SUBST(JAVAINTERPRETER) | |
| AC_SUBST(JAVAIFLAGS) | |
| AC_SUBST(JAVACOMPILER) | |
| AC_SUBST(JAVAAOTCOMPILER) | |
| AC_SUBST(JAVADOC) | |
| dnl =================================================================== | |
| dnl Checks for specific files. | |
| dnl =================================================================== | |
| dnl =================================================================== | |
| dnl Checks for programs. | |
| dnl =================================================================== | |
| dnl EPM is not needed for Windows, or when every requested package format is | |
| dnl handled directly by the simple packager (installer/simplepackage.pm) | |
| dnl rather than by EPM: "archive"/"installed" on any platform, and Darwin's | |
| dnl "dmg" - including the empty default, which resolves to "dmg" on Darwin | |
| dnl below. simplepackage.pm never invokes EPM for any of these three, so | |
| dnl requiring EPM to be present for e.g. a plain "dmg" or "archive dmg" | |
| dnl build serves no purpose. | |
| need_epm_for_packaging=yes | |
| if test "$_os" = "WINNT"; then | |
| need_epm_for_packaging=no | |
| elif test "$with_package_format" = "archive" -o "$with_package_format" = "installed"; then | |
| need_epm_for_packaging=no | |
| elif test "$_os" = "Darwin"; then | |
| need_epm_for_packaging=no | |
| for pkgformat_word in $with_package_format; do | |
| case "$pkgformat_word" in | |
| archive|installed|dmg) ;; | |
| *) need_epm_for_packaging=yes ;; | |
| esac | |
| done | |
| fi | |
| AC_MSG_CHECKING([whether to enable EPM for packing]) | |
| if test "$enable_epm" = "yes"; then | |
| AC_MSG_RESULT([yes]) | |
| dnl ================================================================================ | |
| dnl Check for epm - not needed for Windows, or when the requested package | |
| dnl format(s) are all handled without it (see need_epm_for_packaging above) | |
| dnl ================================================================================ | |
| if test "$need_epm_for_packaging" = "yes"; then | |
| if test -n "$with_epm"; then | |
| EPM=$with_epm | |
| else | |
| AC_PATH_PROG(EPM, epm, no) | |
| fi | |
| # Override system epm and --with-epm if --with-epm-url is used. | |
| if test -n "$with_epm_url" ; then | |
| # At this moment we can not verify the URL or the content that we want to download. | |
| EPM_URL=$with_epm_url | |
| AC_MSG_RESULT([epm will be downloaded and compiled in bootstrap]) | |
| EPM= | |
| echo "EPM will be built." | |
| BUILD_EPM=YES | |
| BUILD_TYPE="$BUILD_TYPE EPM" | |
| else | |
| if test "$EPM" = "no" ; then | |
| AC_MSG_ERROR([no. Install ESP Package Manager (EPM) (https://jimjag.github.io/epm/) and/or specify the path to the right epm (--with-epm). Or specify an URL to an epm-5.0.0 (or later) source package (--with-epm-url); run configure with the --help option for a list of possible URLs.]) | |
| else | |
| # Gentoo has some epm which is something different... | |
| AC_MSG_CHECKING([whether the found EPM is the right EPM]) | |
| if $EPM --version | $GREP "ESP Package Manager" >/dev/null 2>/dev/null; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([no. Install ESP Package Manager (https://jimjag.github.io/epm/) and/or specify the path to the right epm (--with-epm). Or specify an URL to an epm-5.0.0 (or later) source package (--with-epm-url); run configure with the --help option for a list of possible URLs.]) | |
| fi | |
| AC_MSG_CHECKING([EPM version]) | |
| EPM_VERSION=`$EPM --version | $GREP 'ESP Package Manager' | cut -d' ' -f5 | $SED -e s/v//` | |
| if test "`echo $EPM_VERSION | cut -d'.' -f1`" -ge "5"; then | |
| AC_MSG_RESULT([OK, >= 5.0]) | |
| BUILD_EPM=NO | |
| else | |
| AC_MSG_ERROR([too old. EPM >= 5.0.0 is required.]) | |
| fi | |
| fi | |
| fi | |
| fi | |
| # test which package format to use | |
| AC_MSG_CHECKING([which package format to use]) | |
| # defaults | |
| case "$_os" in | |
| OS2) | |
| PKGFORMAT=native | |
| ;; | |
| 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 | |
| ;; | |
| WINNT) | |
| PKGFORMAT=msi | |
| ;; | |
| # we never should get here since we check the architecture/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: | |
| aix - AIX software distribution | |
| bsd - FreeBSD, NetBSD, or OpenBSD software distribution | |
| depot or swinstall - HP-UX software distribution | |
| deb - Debian software distribution | |
| inst or tardist - IRIX software distribution | |
| osx - MacOS X software distribution | |
| pkg - Solaris software distribution | |
| rpm - RedHat software distribution | |
| setld - Tru64 (setld) software distribution | |
| native - "Native" software distribution for the platform | |
| portable - Portable software distribution | |
| AOO additionally supports: | |
| archive - .tar.gz or .zip | |
| dmg - Mac OS X .dmg | |
| installed - installation tree | |
| msi - Windows .msi | |
| ]) | |
| ;; | |
| esac | |
| done | |
| PKGFORMAT="$with_package_format" | |
| fi | |
| AC_MSG_RESULT([$PKGFORMAT]) | |
| if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then | |
| AC_MSG_CHECKING([for rpm]) | |
| for a in "$RPM" rpmbuild rpm; do | |
| $a --usage >/dev/null 2> /dev/null | |
| if test $? -eq 0; then | |
| RPM=$a | |
| break | |
| else | |
| $a --version >/dev/null 2> /dev/null | |
| if test $? -eq 0; then | |
| RPM=$a | |
| break | |
| fi | |
| fi | |
| done | |
| if test -z "$RPM" ; then | |
| AC_MSG_ERROR([not found]) | |
| elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then | |
| RPM_PATH=`which $RPM` | |
| AC_MSG_RESULT([$RPM_PATH]) | |
| else | |
| AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.]) | |
| fi | |
| fi | |
| if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then | |
| AC_PATH_PROG(DPKG, dpkg, no) | |
| if test "$DPKG" = "no"; then | |
| AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.]) | |
| fi | |
| AC_PATH_PROG(FAKEROOT, fakeroot, no) | |
| if test "$FAKEROOT" = "no"; then | |
| AC_MSG_ERROR([fakeroot needed for deb creation. Install fakeroot.]) | |
| fi | |
| fi | |
| if echo "$PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then | |
| if test "$_os" = "Darwin"; then | |
| AC_MSG_CHECKING([for PackageMaker availability]) | |
| if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then | |
| AC_MSG_ERROR([not installed. Apple's PackageMaker does not exist on | |
| current Xcode; the "osx" EPM format is obsolete on this platform - use "dmg" | |
| instead, or see MACOS_PACKAGING_EPM_REVIEW.md for a modern product-PKG path.]) | |
| else | |
| AC_MSG_RESULT([ok]) | |
| fi | |
| else | |
| AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...]) | |
| fi | |
| fi | |
| if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then | |
| AC_PATH_PROG(PKGMK, pkgmk, no) | |
| if test "$PKGMK" = "no"; then | |
| AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.]) | |
| fi | |
| fi | |
| AC_SUBST(RPM) | |
| AC_SUBST(DPKG) | |
| AC_SUBST(FAKEROOT) | |
| AC_SUBST(PKGMK) | |
| else | |
| AC_MSG_RESULT([no]) | |
| BUILD_EPM=NO | |
| EPM=NO | |
| if test "$_os" = "Darwin" -a "$need_epm_for_packaging" = "no"; then | |
| dnl simplepackage.pm builds archive/installed/dmg without EPM, so | |
| dnl --disable-epm should not discard a requested "dmg" (or Darwin's | |
| dnl "dmg" default) the way it must for a format that does need EPM. | |
| PKGFORMAT=dmg | |
| test -z "$with_package_format" || PKGFORMAT="$with_package_format" | |
| else | |
| PKGFORMAT=native | |
| fi | |
| fi | |
| AC_SUBST(BUILD_EPM) | |
| AC_SUBST(EPM_URL) | |
| AC_SUBST(EPM) | |
| AC_SUBST(PKGFORMAT) | |
| dnl =================================================================== | |
| dnl Check for gperf | |
| dnl =================================================================== | |
| AC_PATH_PROG(GPERF, gperf) | |
| if test -z "$with_gperf"; then | |
| AC_PATH_PROG(GPERF, gperf) | |
| if test -z "$GPERF"; then | |
| AC_MSG_ERROR([gperf not found but needed. Install it and/or specify --with-gperf=/path/to/it.]) | |
| fi | |
| else | |
| if test -x "$with_gperf"; then | |
| GPERF=$with_gperf | |
| else | |
| AC_MSG_ERROR([--with-gperf did not point to an executable]) | |
| fi | |
| 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]) | |
| GPERF=$GPERF | |
| else | |
| AC_MSG_ERROR([too old, you need at least 3.0.0]) | |
| fi | |
| AC_SUBST(GPERF) | |
| dnl =================================================================== | |
| dnl Check for building ODK | |
| 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 https://tools.openoffice.org/unowinreg_prebuild/680/ and | |
| put it into external/unowinreg using your browser or a command equivalent to: | |
| wget -O external/unowinreg/unowinreg.dll https://www.openoffice.org/tools/unowinreg_prebuild/680/unowinreg.dll]) | |
| 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) | |
| 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 | |
| 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.) | |
| 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 the AC_CHECK_LIBS which obviously | |
| # do not make sense here (and 'd make the check fail) | |
| save_LIBS=$LIBS | |
| LIBS="" | |
| AC_CHECK_LIB([kernel32],[main],[],[],[])ac_cv_lib_kernel32=ac_cv_lib_kernel32_main | |
| AC_CHECK_LIB([advapi32],[main],[],[],[])ac_cv_lib_advapi32=ac_cv_lib_advapi32_main | |
| 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++]) | |
| fi | |
| fi | |
| BUILD_TYPE="$BUILD_TYPE ODK" | |
| else | |
| AC_MSG_RESULT([no]) | |
| BUILD_UNOWINREG=NO | |
| fi | |
| AC_SUBST(BUILD_UNOWINREG) | |
| AC_SUBST(MINGWCXX) | |
| AC_SUBST(MINGWSTRIP) | |
| dnl =================================================================== | |
| dnl Check for system stdlibs | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset]) | |
| if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ | |
| test "$with_system_stdlibs" != "no"; then | |
| AC_MSG_RESULT([no]) | |
| SYSTEM_STDLIBS=YES | |
| else | |
| AC_MSG_RESULT([yes]) | |
| SYSTEM_STDLIBS=NO | |
| fi | |
| 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 | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_ZLIB=YES | |
| AC_CHECK_HEADER(zlib.h, [], | |
| [AC_MSG_ERROR(zlib.h not found. install zlib)], []) | |
| AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ], | |
| [AC_MSG_ERROR(zlib not found or functional)], []) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_ZLIB=NO | |
| BUILD_TYPE="$BUILD_TYPE ZLIB" | |
| fi | |
| AC_SUBST(SYSTEM_ZLIB) | |
| 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 | |
| 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 functional)], []) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_JPEG=NO | |
| BUILD_TYPE="$BUILD_TYPE JPEG" | |
| fi | |
| AC_SUBST(SYSTEM_JPEG) | |
| dnl =================================================================== | |
| 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 | |
| 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.)], []) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_EXPAT=NO | |
| BUILD_TYPE="$BUILD_TYPE EXPAT" | |
| fi | |
| AC_SUBST(SYSTEM_EXPAT) | |
| dnl =================================================================== | |
| 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 ) | |
| fi | |
| AC_SUBST(FREETYPE_CFLAGS) | |
| AC_SUBST(FREETYPE_LIBS) | |
| dnl =================================================================== | |
| dnl Check whether freetype2 supports emboldening | |
| dnl =================================================================== | |
| if test "$test_freetype" = "yes"; then | |
| save_CPPFLAGS="$CPPFLAGS" | |
| save_LDFLAGS="$LDFLAGS" | |
| save_LIBS="$LIBS" | |
| CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" | |
| LDFLAGS="$LDFLAGS $FREETYPE_LIBS" | |
| AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden, | |
| [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], []) | |
| LDFLAGS="$save_LDFLAGS" | |
| CPPFLAGS="$save_CPPFLAGS" | |
| LIBS="$save_LIBS" | |
| fi | |
| AC_SUBST(USE_FT_EMBOLDEN) | |
| if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \ | |
| test "$with_system_libxslt" != "no"; then | |
| if test -z "$with_system_libxml" -a -z "$with_system_libs" || \ | |
| test "$with_system_libxml" = "no"; then | |
| # somehow AC_MSG_WARN won't work... | |
| echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" | |
| echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn | |
| with_system_libxml=yes | |
| fi | |
| fi | |
| if test -n "$with_system_libxml" -o -n "$with_system_libs" && \ | |
| test "$with_system_libxml" != "no"; then | |
| if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \ | |
| test "$with_system_libxslt" = "no"; then | |
| # somehow AC_MSG_WARN won't work... | |
| echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" | |
| echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn | |
| with_system_libxslt=yes | |
| fi | |
| fi | |
| dnl =================================================================== | |
| dnl Check for system libxslt | |
| dnl =================================================================== | |
| 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 | |
| if test "$_os" != "Darwin"; then | |
| PKG_CHECK_MODULES(LIBXSLT, libxslt) | |
| else | |
| dnl See the matching libxml check below for why this pins | |
| dnl xslt-config to the directory given to --with-system-libxslt | |
| dnl instead of resolving a bare "xslt-config" off PATH. | |
| if test "$with_system_libxslt" != "yes" -a -n "$with_system_libxslt"; then | |
| XSLT_CONFIG="$with_system_libxslt/bin/xslt-config" | |
| if test ! -x "$XSLT_CONFIG"; then | |
| AC_MSG_ERROR([--with-system-libxslt=$with_system_libxslt given, but $XSLT_CONFIG not found or not executable]) | |
| fi | |
| else | |
| AC_PATH_PROG(XSLT_CONFIG, xslt-config, []) | |
| if test -z "$XSLT_CONFIG"; then | |
| AC_MSG_ERROR([xslt-config not found on PATH]) | |
| fi | |
| fi | |
| LIBXSLT_CFLAGS=`$XSLT_CONFIG --cflags` | |
| LIBXSLT_LIBS=`$XSLT_CONFIG --libs` | |
| LIBXSLT_PREFIX=`$XSLT_CONFIG --prefix` | |
| 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" | |
| fi | |
| AC_SUBST(SYSTEM_LIBXSLT) | |
| AC_SUBST(LIBXSLT_CFLAGS) | |
| AC_SUBST(LIBXSLT_LIBS) | |
| AC_SUBST(LIBXSLT_PREFIX) | |
| dnl =================================================================== | |
| dnl Check for system libxml | |
| dnl =================================================================== | |
| 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 | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_LIBXML=YES | |
| BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" | |
| if test "$_os" != "Darwin"; then | |
| PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0) | |
| else | |
| dnl A bare "xml2-config" resolves off whatever happens to be | |
| dnl first on PATH, which is ambiguous when several package | |
| dnl managers each ship their own libxml2 (MacPorts, Homebrew, | |
| dnl a hand-built static copy, ...). When --with-system-libxml | |
| dnl is given an actual directory (not just a bare "yes"), pin | |
| dnl xml2-config to that prefix explicitly so the intended copy | |
| dnl can't be shadowed by PATH order. | |
| if test "$with_system_libxml" != "yes" -a -n "$with_system_libxml"; then | |
| XML2_CONFIG="$with_system_libxml/bin/xml2-config" | |
| if test ! -x "$XML2_CONFIG"; then | |
| AC_MSG_ERROR([--with-system-libxml=$with_system_libxml given, but $XML2_CONFIG not found or not executable]) | |
| fi | |
| else | |
| AC_PATH_PROG(XML2_CONFIG, xml2-config, []) | |
| if test -z "$XML2_CONFIG"; then | |
| AC_MSG_ERROR([xml2-config not found on PATH]) | |
| fi | |
| fi | |
| LIBXML_CFLAGS=`$XML2_CONFIG --cflags` | |
| LIBXML_LIBS=`$XML2_CONFIG --libs` | |
| LIBXML_PREFIX=`$XML2_CONFIG --prefix` | |
| fi | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_LIBXML=NO | |
| BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" | |
| fi | |
| AC_SUBST(SYSTEM_LIBXML) | |
| AC_SUBST(SYSTEM_LIBXML_STATIC) | |
| AC_SUBST(LIBXML_CFLAGS) | |
| AC_SUBST(LIBXML_LIBS) | |
| AC_SUBST(LIBXML_PREFIX) | |
| dnl =================================================================== | |
| dnl Checks for a MacOS platform SDK compatible with deployment target | |
| dnl =================================================================== | |
| if test "$_os" = "Darwin"; then | |
| sdk_target=$with_macosx_target | |
| AC_MSG_CHECKING([checking SDK compatibility with OSX $sdk_target]) | |
| sdk_major=`echo $sdk_target | cut -d"." -f1` | |
| sdk_minor=`echo $sdk_target | cut -d"." -f2` | |
| test -z "$sdk_minor" && sdk_minor=0 | |
| dnl Minimum supported macOS deployment target is 11.0 (Big Sur). This is | |
| dnl also the hard floor for Apple Silicon (arm64), so enforce it for every | |
| dnl architecture. | |
| if test "$sdk_major" -lt "11" ; then | |
| AC_MSG_ERROR([macOS deployment target < 11.0 is no longer supported; use --with-macosx-target=11.0 or later]) | |
| else | |
| MACOSX_DEPLOYMENT_TARGET=$sdk_target | |
| sdk_path=$with_macosx_sdk | |
| if test -z "$sdk_path"; then | |
| dnl --macosx-sdk not used (or blank): We look for the SDK. | |
| dnl Prefer xcodebuild when full Xcode is installed, but fall back | |
| dnl to xcrun so that Command Line Tools-only setups also work | |
| dnl (xcodebuild is unavailable without the full Xcode app). | |
| sdk_found=`xcodebuild -showsdks 2>/dev/null | $EGREP "sdk macosx(1[1-9]|[2-9][0-9])" | sed -e "s/.*sdk //" | tail -n1` | |
| if test -n "$sdk_found"; then | |
| AC_MSG_RESULT([yes, by using SDK $sdk_found]) | |
| sdk_path=`xcodebuild -version -sdk ${sdk_found} Path` | |
| else | |
| sdk_path=`xcrun --sdk macosx --show-sdk-path 2>/dev/null` | |
| if test -z "$sdk_path"; then | |
| AC_MSG_ERROR([No SDK with OSX $sdk_target compatibility found]) | |
| fi | |
| AC_MSG_RESULT([yes, by using SDK at $sdk_path]) | |
| fi | |
| elif test ! -d "$sdk_path"; then | |
| dnl --macosx-sdk=<version> given (not a path): resolve it. Prefer | |
| dnl xcodebuild, but fall back to xcrun so Command Line Tools-only | |
| dnl setups (no full Xcode) also work. | |
| sdk_found=`xcodebuild -showsdks 2>/dev/null | $EGREP "sdk macosx${sdk_path}" | sed -e "s/.*sdk //" | tail -n1` | |
| if test -n "$sdk_found"; then | |
| AC_MSG_RESULT([SDK $sdk_found]) | |
| sdk_path=`xcodebuild -version -sdk ${sdk_found} Path` | |
| else | |
| sdk_xcrun=`xcrun --sdk macosx${sdk_path} --show-sdk-path 2>/dev/null` | |
| if test -z "$sdk_xcrun"; then | |
| AC_MSG_ERROR([SDK macosx${sdk_path} not found]) | |
| fi | |
| AC_MSG_RESULT([SDK at $sdk_xcrun]) | |
| sdk_path=$sdk_xcrun | |
| fi | |
| fi | |
| AC_MSG_CHECKING([for $sdk_path]) | |
| if test -d "$sdk_path"; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([not found!]) | |
| fi | |
| MACOSX_SDK_PATH=$sdk_path | |
| SDKROOT=$sdk_path | |
| export SDKROOT | |
| fi | |
| fi | |
| dnl Code signing during packaging: solenv/bin/modules/installer/simplepackage.pm | |
| dnl reads these from the environment (via set_soenv), so a bare "yes" is an error. | |
| MACOSX_CODESIGNING_IDENTITY= | |
| MACOSX_CODESIGNING_KEYCHAIN= | |
| MACOSX_NOTARY_PROFILE= | |
| if test "$with_macosx_codesigning_identity" = "yes"; then | |
| AC_MSG_ERROR([--with-macosx-codesigning-identity needs a codesign identity, or "-" for ad-hoc]) | |
| fi | |
| if test -n "$with_macosx_codesigning_identity" -a "$with_macosx_codesigning_identity" != "no"; then | |
| MACOSX_CODESIGNING_IDENTITY=$with_macosx_codesigning_identity | |
| fi | |
| if test -n "$with_macosx_codesigning_keychain" -a "$with_macosx_codesigning_keychain" != "no" -a "$with_macosx_codesigning_keychain" != "yes"; then | |
| MACOSX_CODESIGNING_KEYCHAIN=$with_macosx_codesigning_keychain | |
| fi | |
| if test "$with_macosx_notary_profile" = "yes"; then | |
| AC_MSG_ERROR([--with-macosx-notary-profile needs a notarytool keychain profile name]) | |
| fi | |
| if test -n "$with_macosx_notary_profile" -a "$with_macosx_notary_profile" != "no"; then | |
| if test "$MACOSX_CODESIGNING_IDENTITY" = "" -o "$MACOSX_CODESIGNING_IDENTITY" = "-"; then | |
| AC_MSG_ERROR([--with-macosx-notary-profile needs --with-macosx-codesigning-identity set to a real Developer ID identity, not ad-hoc]) | |
| fi | |
| MACOSX_NOTARY_PROFILE=$with_macosx_notary_profile | |
| fi | |
| AC_SUBST(MACOSX_DEPLOYMENT_TARGET) | |
| AC_SUBST(MACOSX_SDK_PATH) | |
| AC_SUBST(SDKROOT) | |
| AC_SUBST(MACOSX_CODESIGNING_IDENTITY) | |
| AC_SUBST(MACOSX_CODESIGNING_KEYCHAIN) | |
| AC_SUBST(MACOSX_NOTARY_PROFILE) | |
| dnl =================================================================== | |
| dnl Check for system python | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([which python to use]) | |
| if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then | |
| with_system_python=yes | |
| dnl Recent macOS releases no longer ship a usable Python under /usr/bin, | |
| dnl and even when python3 exists there it may be Apple's old CLT stub | |
| dnl (< 3.11). Probe the locations where a system/user Python is typically | |
| dnl found - the python.org framework build, Homebrew (Apple Silicon and | |
| dnl Intel), and whatever python3 is first on PATH (MacPorts/pyenv/etc.) - | |
| dnl and pick the first candidate that actually satisfies the 3.11 floor. | |
| dnl hex version of Python 3.11.0 = 51118080 | |
| _python="" | |
| for _python_candidate in \ | |
| "/Library/Frameworks/Python.framework/Versions/Current/bin/python3" \ | |
| "/Library/Frameworks/Python.framework/Versions/Current/bin/python" \ | |
| "/opt/homebrew/bin/python3" \ | |
| "/usr/local/bin/python3" \ | |
| `command -v python3 2>/dev/null` \ | |
| "/usr/bin/python3" \ | |
| "/usr/bin/python" ; do | |
| if test -x "$_python_candidate"; then | |
| _python_candidate_hexversion=`$_python_candidate -c "import sys; print(sys.hexversion)" 2>/dev/null` | |
| if test -n "$_python_candidate_hexversion" && \ | |
| test "$_python_candidate_hexversion" -ge 51118080 2>/dev/null; then | |
| _python="$_python_candidate" | |
| break | |
| fi | |
| fi | |
| done | |
| if test -z "$_python"; then | |
| AC_MSG_ERROR([Python 3.11 or higher is required; install it (e.g. from python.org or Homebrew), or configure with --without-system-python]) | |
| fi | |
| _python_version=`$_python -c "import sys; print(sys.version);" | head -c 4` | |
| AC_MSG_RESULT([compiling against system python ($_python, version $_python_version)]) | |
| dnl Hand the interpreter we just validated to the build, so that the build | |
| dnl steps that run Python scripts use it instead of whatever "python3" | |
| dnl happens to be first on PATH. | |
| PYTHON_BIN="$_python" | |
| _python_ver=`$_python -c "import sysconfig; print(sysconfig.get_config_var('VERSION'));"` | |
| dnl Locate the headers. Prefer the framework/SDK locations, but fall back | |
| dnl to whatever include dir the interpreter itself reports (this is what | |
| dnl makes Homebrew and other non-framework installs work). | |
| if test -d "/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"; then | |
| PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver" | |
| elif test -d "$MACOSX_SDK_PATH/usr/include/python$_python_ver"; then | |
| PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/python$_python_ver" | |
| elif test -d "$MACOSX_SDK_PATH/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"; then | |
| PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver" | |
| else | |
| _python_inc=`$_python -c "import sysconfig; print(sysconfig.get_path('include'));"` | |
| PYTHON_CFLAGS="-I$_python_inc" | |
| fi | |
| dnl A framework build links against the Python framework; any other | |
| dnl install (Homebrew, etc.) links against libpython in its LIBDIR. | |
| case "$_python" in | |
| /Library/Frameworks/Python.framework/*|*/System/Library/Frameworks/Python.framework/*) | |
| PYTHON_LIBS="-framework Python" | |
| ;; | |
| *) | |
| dnl Use sysconfig, not distutils.sysconfig: distutils was removed in | |
| dnl Python 3.12 and the interpreter we pick here may well be newer | |
| dnl than the 3.11 floor. | |
| _python_libdir=`$_python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'));"` | |
| PYTHON_LIBS="-L$_python_libdir -lpython$_python_ver" | |
| ;; | |
| esac | |
| 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([3.11]) | |
| dnl Hand the interpreter AM_PATH_PYTHON just validated to the build, so that | |
| dnl the build steps that run Python scripts use it instead of whatever | |
| dnl "python3" happens to be first on PATH. | |
| PYTHON_BIN="$PYTHON" | |
| python_include=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'));"` | |
| python_version=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_var('VERSION'));"` | |
| # Python 3.8 and later distinguish building Python modules from linking to the | |
| # libpython, so embedders must use the "-embed" pkg-config module: | |
| # (https://bugs.python.org/issue36721) | |
| # AM_PATH_PYTHON above already enforces a 3.11 floor, so "-embed" is always | |
| # the right variant here. (The old "$python_version" -lt "3.8" test was a | |
| # numeric comparison on a string like "3.11" and could never work.) | |
| PKG_CHECK_MODULES(PYTHON, python-$python_version-embed, PYTHON_PC="TRUE", PYTHON_PC="" ) | |
| if test "$PYTHON_PC" != "TRUE"; then | |
| PYTHON_CFLAGS="-I$python_include" | |
| PYTHON_LIBS="-lpython$python_version" | |
| fi | |
| fi | |
| if test "$with_system_python" = "yes" ; then | |
| SYSTEM_PYTHON=YES | |
| 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)], []) | |
| CPPFLAGS="$save_CPPFLAGS" | |
| else | |
| SYSTEM_PYTHON=NO | |
| BUILD_TYPE="$BUILD_TYPE PYTHON" | |
| AC_MSG_RESULT([internal]) | |
| # Embedded python dies without Home set | |
| if test "z$HOME" = "z"; then | |
| export HOME=""; | |
| fi | |
| dnl The internal Python tarball is a .tgz (see main/external_deps.lst), so | |
| dnl gzip is all that is needed to unpack it. The old bzip2 requirement was | |
| dnl for the Python 2.x .tar.bz2 and no longer applies. | |
| fi | |
| AC_SUBST(SYSTEM_PYTHON) | |
| AC_SUBST(PYTHON_BIN) | |
| AC_SUBST(PYTHON_CFLAGS) | |
| AC_SUBST(PYTHON_LIBS) | |
| HOME=`echo $HOME | sed 's:\\\\:/:g'` | |
| AC_SUBST(HOME) | |
| dnl =================================================================== | |
| dnl Check for system lucene | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([which lucene to use]) | |
| if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ | |
| test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_LUCENE=YES | |
| if test -z $LUCENE_CORE_JAR; then | |
| AC_CHECK_FILE(/usr/share/java/lucene-core-2.9.4.jar, | |
| [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.9.4.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, | |
| [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ], | |
| [ AC_MSG_ERROR(lucene-core.jar replacement not found)] | |
| ) | |
| ] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LUCENE_CORE_JAR, [], | |
| [AC_MSG_ERROR(lucene-core.jar not found.)], []) | |
| fi | |
| if test -z $LUCENE_ANALYZERS_JAR; then | |
| 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, | |
| [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ], | |
| [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LUCENE_CORE_JAR, [], | |
| [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], []) | |
| fi | |
| AC_MSG_CHECKING([whether lucene is version 2.x]) | |
| export LUCENE_CORE_JAR | |
| if $PERL -e 'use Archive::Zip; | |
| my $file = "$ENV{'LUCENE_CORE_JAR'}"; | |
| my $zip = Archive::Zip->new( $file ); | |
| my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); | |
| if ( $mf =~ m/Specification-Version: 2.*/ ) { | |
| exit 0; | |
| } else { | |
| exit 1; | |
| }'; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| AC_MSG_CHECKING([whether lucene is version 3.x]) | |
| if $PERL -e 'use Archive::Zip; | |
| my $file = "$ENV{'LUCENE_CORE_JAR'}"; | |
| my $zip = Archive::Zip->new( $file ); | |
| my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); | |
| if ( $mf =~ m/Specification-Version: 3.*/ ) { | |
| exit 0; | |
| } else { | |
| exit 1; | |
| }'; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([no, you need lucene 2 or 3]) | |
| fi | |
| fi | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_LUCENE=NO | |
| BUILD_TYPE="$BUILD_TYPE LUCENE" | |
| fi | |
| AC_SUBST(SYSTEM_LUCENE) | |
| 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 | |
| AC_MSG_RESULT([yes]) | |
| ENABLE_MYSQLC=YES | |
| AC_MSG_CHECKING([for mysqlc module]) | |
| if test -d mysqlc; then | |
| AC_MSG_RESULT([OK]) | |
| else | |
| AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) | |
| fi | |
| BUILD_TYPE="$BUILD_TYPE MYSQLC" | |
| else | |
| AC_MSG_RESULT([no]) | |
| ENABLE_MYSQLC=NO | |
| fi | |
| AC_SUBST(ENABLE_MYSQLC) | |
| if test "$ENABLE_MYSQLC" = "YES"; then | |
| 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]) | |
| if test -z "$MYSQLCONFIG" -o ! -x "$MYSQLCONFIG" ; then | |
| AC_MSG_ERROR([can not find/execute mysql_config]); | |
| fi | |
| 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 | |
| AC_MSG_RESULT([external Connector/C (libmysql)]) | |
| LIBMYSQL=libmysql.so | |
| if test "$_os" = "Darwin"; then | |
| LIBMYSQL=libmysql.dylib | |
| elif test "$_os" = "WINNT"; then | |
| LIBMYSQL=libmysql.dll | |
| fi | |
| AC_MSG_CHECKING([for $LIBMYSQL]) | |
| if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then | |
| AC_MSG_RESULT([found.]) | |
| LIBMYSQL_PATH=$with_libmysql_path | |
| else | |
| AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.]) | |
| fi | |
| else | |
| AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path]) | |
| fi | |
| fi | |
| AC_SUBST(SYSTEM_MYSQL) | |
| AC_SUBST(MYSQL_INC) | |
| AC_SUBST(MYSQL_LIB) | |
| AC_SUBST(MYSQL_DEFINES) | |
| AC_SUBST(LIBMYSQL_PATH) | |
| AC_LANG_PUSH([C++]) | |
| dnl =================================================================== | |
| dnl Check for system MySQL C++ Connector | |
| dnl =================================================================== | |
| # FIXME! | |
| # 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 | |
| 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_MSG_CHECKING([version]) | |
| AC_RUN_IFELSE([AC_LANG_SOURCE([[ | |
| #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)) | |
| return 0; | |
| else | |
| return 1; | |
| } | |
| ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[]) | |
| AC_LANG_POP([C++]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| SYSTEM_MYSQL_CPPCONN= | |
| fi | |
| AC_LANG_POP([C++]) | |
| AC_SUBST(SYSTEM_MYSQL_CPPCONN) | |
| fi | |
| dnl =================================================================== | |
| dnl Check for system hsqldb | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([which hsqldb to use]) | |
| if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ | |
| test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_HSQLDB=YES | |
| if test -z $HSQLDB_JAR; then | |
| HSQLDB_JAR=/usr/share/java/hsqldb.jar | |
| fi | |
| AC_CHECK_FILE($HSQLDB_JAR, [], | |
| [AC_MSG_ERROR(hsqldb.jar not found.)], []) | |
| AC_MSG_CHECKING([whether hsqldb is 1.8.0.x]) | |
| export HSQLDB_JAR | |
| if $PERL -e 'use Archive::Zip; | |
| my $file = "$ENV{'HSQLDB_JAR'}"; | |
| my $zip = Archive::Zip->new( $file ); | |
| my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); | |
| if ( $mf =~ m/Specification-Version: 1.8.*/ ) { | |
| push @l, split(/\n/, $mf); | |
| foreach my $line (@l) { | |
| if ($line =~ m/Specification-Version:/) { | |
| ($t, $version) = split (/:/,$line); | |
| $version =~ s/^\s//; | |
| ($a, $b, $c, $d) = split (/\./,$version); | |
| if ($c == "0" && $d > "8") { | |
| exit 0; | |
| } else { | |
| exit 1; | |
| } | |
| } | |
| } | |
| } else { | |
| exit 1; | |
| }'; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1]) | |
| fi | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_HSQLDB=NO | |
| BUILD_TYPE="$BUILD_TYPE HSQLDB" | |
| fi | |
| AC_SUBST(SYSTEM_HSQLDB) | |
| AC_SUBST(HSQLDB_JAR) | |
| dnl =================================================================== | |
| dnl Check for system beanshell | |
| dnl =================================================================== | |
| ENABLE_BEANSHELL=YES | |
| AC_MSG_CHECKING([which beanshell to use]) | |
| if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ | |
| test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_BSH=YES | |
| if test -z $BSH_JAR; then | |
| BSH_JAR=/usr/share/java/bsh.jar | |
| fi | |
| AC_CHECK_FILE($BSH_JAR, [], | |
| [AC_MSG_ERROR(bsh.jar not found.)], []) | |
| elif test "x$enable_beanshell" = "xyes"; then | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_BSH=NO | |
| BUILD_TYPE="$BUILD_TYPE BSH" | |
| else | |
| AC_MSG_RESULT([none (disabled)]) | |
| SYSTEM_BSH=NO | |
| ENABLE_BEANSHELL=NO | |
| fi | |
| AC_SUBST(SYSTEM_BSH) | |
| AC_SUBST(BSH_JAR) | |
| AC_SUBST(ENABLE_BEANSHELL) | |
| dnl =================================================================== | |
| dnl Check for saxon. It can come from two different places: | |
| dnl - pre-installed on the system. This is checked when the --with-system-saxon | |
| dnl option is given to configure. | |
| dnl The exact place can be specified with the --with-saxon-jar=<path> option. | |
| dnl - From the saxon tar ball in ext_sources/. This is used when --enable-saxon | |
| dnl is given to configure but not any of --with-system-saxon or --with-saxon-jar. | |
| dnl =================================================================== | |
| DISABLE_SAXON= | |
| AC_MSG_CHECKING([which saxon to use]) | |
| if test -n "$with_system_saxon" -o -n "$with_system_libs" && \ | |
| test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_SAXON=YES | |
| if test -z $SAXON_JAR; then | |
| AC_CHECK_FILE(/usr/share/java/saxon9.jar, | |
| [ SAXON_JAR=/usr/share/java/saxon9.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 ], | |
| [ AC_MSG_ERROR(saxon.jar replacement not found)] | |
| ) | |
| ] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($SAXON_JAR, [], | |
| [AC_MSG_ERROR(saxon.jar replacement not found.)], []) | |
| fi | |
| if test -n "$SERIALIZER_JAR"; then | |
| AC_CHECK_FILE($SERIALIZER_JAR, [], | |
| [AC_MSG_ERROR(serializer.jar not found.)], []) | |
| AC_SUBST(SERIALIZER_JAR) | |
| fi | |
| dnl Saxon comes in two practically available versions, the out-of-date saxonb which | |
| dnl supports the java extensions that AOO 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]) | |
| cat > saxontest.java <<_ACEOF | |
| [import javax.xml.transform.TransformerFactory; | |
| import javax.xml.transform.Transformer; | |
| import javax.xml.transform.stream.StreamSource; | |
| import java.io.*; | |
| import net.sf.saxon.FeatureKeys; | |
| class saxontest { | |
| public static void main(String[] args) { | |
| System.setProperty("javax.xml.transform.TransformerFactory", | |
| "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)); | |
| System.out.println("TransformerFactory is" + | |
| tfactory.getClass().getName()); | |
| Transformer transformer = tfactory.newTransformer( | |
| new StreamSource(new File(args[0]))); | |
| } catch(Exception e){ | |
| e.printStackTrace(System.err); | |
| System.exit(-1); | |
| } | |
| System.exit(0); | |
| } | |
| } | |
| ] | |
| _ACEOF | |
| cat > saxontest.xsl<<_ACEOF | |
| [<?xml version="1.0" encoding="UTF-8"?> | |
| <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
| <xsl:template match="/"> | |
| <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/> | |
| </xsl:template> | |
| </xsl:stylesheet> | |
| ] | |
| _ACEOF | |
| javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2" | |
| AC_TRY_EVAL(javac_cmd) | |
| if test $? = 0 && test -f ./saxontest.class ; then | |
| java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" | |
| AC_TRY_EVAL(java_cmd) | |
| if test $? = 0; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| cat saxontest.java >&5 | |
| AC_MSG_RESULT([no]) | |
| AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb]) | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| cat saxontest.java >&5 | |
| AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar]) | |
| fi | |
| elif test "x$enable_saxon" = "xyes"; then | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_SAXON=NO | |
| BUILD_TYPE="$BUILD_TYPE SAXON" | |
| else | |
| AC_MSG_RESULT([none (disabled)]) | |
| SYSTEM_SAXON=NO | |
| DISABLE_SAXON=YES | |
| fi | |
| AC_SUBST(SYSTEM_SAXON) | |
| AC_SUBST(SAXON_JAR) | |
| AC_SUBST(DISABLE_SAXON) | |
| dnl =================================================================== | |
| dnl Check for rhino | |
| dnl =================================================================== | |
| ENABLE_JAVASCRIPT= | |
| AC_MSG_CHECKING([whether to enable support for JavaScript]) | |
| if test "x$enable_javascript" = "xyes"; then | |
| BUILD_TYPE="$BUILD_TYPE RHINO" | |
| AC_MSG_RESULT([yes]) | |
| ENABLE_JAVASCRIPT=YES | |
| else | |
| AC_MSG_RESULT([no]) | |
| ENABLE_JAVASCRIPT=NO | |
| fi | |
| AC_SUBST(ENABLE_JAVASCRIPT) | |
| dnl =================================================================== | |
| dnl Check for CoinMP | |
| dnl =================================================================== | |
| ENABLE_COINMP= | |
| SYSTEM_COINMP=NO | |
| COINMP_CFLAGS= | |
| COINMP_LIBS= | |
| AC_MSG_CHECKING([whether to enable support for CoinMP]) | |
| if test "x$enable_coinmp" = "xyes"; then | |
| BUILD_TYPE="$BUILD_TYPE COINMP" | |
| AC_MSG_RESULT([yes]) | |
| ENABLE_COINMP=YES | |
| dnl Check whether to use system or internal CoinMP | |
| AC_MSG_CHECKING([which coinmp to use]) | |
| if test "x$with_system_coinmp" = "xyes" -o -n "$with_system_libs"; then | |
| AC_MSG_RESULT([system]) | |
| PKG_CHECK_MODULES([COINMP], [coinmp]) | |
| SYSTEM_COINMP=YES | |
| # some systems need this. Like Ubuntu.... | |
| AC_CHECK_LIB(m, floor) | |
| AC_CHECK_LIB(dl, dlopen) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_COINMP=NO | |
| BUILD_TYPE="$BUILD_TYPE COINMP" | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| ENABLE_COINMP=NO | |
| fi | |
| AC_SUBST(ENABLE_COINMP) | |
| AC_SUBST(SYSTEM_COINMP) | |
| AC_SUBST(COINMP_CFLAGS) | |
| AC_SUBST(COINMP_LIBS) | |
| dnl =================================================================== | |
| dnl Check for system curl | |
| dnl =================================================================== | |
| dnl Darwin always treats curl as external (see the "-o \"$_os\" = \"Darwin\"" | |
| dnl clause below), regardless of whether --with-system-curl was actually | |
| dnl given a directory -- capture the as-given value first, before it gets | |
| dnl forced to a bare "yes", so a real --with-system-curl=DIR isn't lost. | |
| with_system_curl_dir="$with_system_curl" | |
| if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then | |
| with_system_curl=yes | |
| fi | |
| AC_MSG_CHECKING([which curl to use]) | |
| if test -n "$with_system_curl" -o -n "$with_system_libs" && \ | |
| test "$with_system_curl" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_CURL=YES | |
| dnl See the matching libxml check above for why this pins | |
| dnl curl-config to the directory given to --with-system-curl instead | |
| dnl of resolving a bare "curl-config" off PATH. | |
| if test "$with_system_curl_dir" != "yes" -a -n "$with_system_curl_dir"; then | |
| CURLCONFIG="$with_system_curl_dir/bin/curl-config" | |
| if test ! -x "$CURLCONFIG"; then | |
| AC_MSG_ERROR([--with-system-curl=$with_system_curl_dir given, but $CURLCONFIG not found or not executable]) | |
| fi | |
| else | |
| AC_PATH_PROG( CURLCONFIG, curl-config) | |
| if test -z "$CURLCONFIG"; then | |
| AC_MSG_ERROR([install curl to run this script]) | |
| 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]) | |
| fi | |
| # Does curl use OpenSSL as its SSL implementation? Needed for ucb/source/ucp/webdav. | |
| AC_MSG_CHECKING([whether curl uses OpenSSL as its SSL backend]) | |
| if $CURLCONFIG --ssl-backends | $GREP -q 'OpenSSL'; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([no, cannot use system curl whose SSL backend isn't OpenSSL]) | |
| fi | |
| CURL_LIBS=`$CURLCONFIG --libs` | |
| CURL_CFLAGS=`$CURLCONFIG --cflags` | |
| CURL_PREFIX=`$CURLCONFIG --prefix` | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_CURL=NO | |
| BUILD_TYPE="$BUILD_TYPE CURL" | |
| fi | |
| AC_SUBST(SYSTEM_CURL) | |
| AC_SUBST(CURL_CFLAGS) | |
| AC_SUBST(CURL_LIBS) | |
| AC_SUBST(CURL_PREFIX) | |
| dnl =================================================================== | |
| dnl Pin selected system libraries to their static archives | |
| dnl =================================================================== | |
| dnl Runs after the libxml/libxslt/curl checks above, which is where the | |
| dnl *_PREFIX and *_LIBS values it rewrites are established. | |
| dnl | |
| dnl Without this the static-vs-dynamic choice is implicit: "-lfoo" lets the | |
| dnl linker take a dylib over an archive, and the libxml2 link in | |
| dnl forms/util and xmlsecurity/util explicitly prefers a dylib when the | |
| dnl prefix has one. Either way a dylib appearing at the prefix silently | |
| dnl turns a release build dynamic, and these dylibs carry absolute install | |
| dnl names that do not exist on an end user's machine. | |
| STATIC_SYSTEM_LIBS= | |
| STATIC_SYSTEM_LIBXML=NO | |
| STATIC_SYSTEM_LIBXSLT=NO | |
| STATIC_SYSTEM_CURL=NO | |
| if test -n "$with_static_system_libs" -a "$with_static_system_libs" != "no"; then | |
| if test "$with_static_system_libs" = "yes"; then | |
| AC_MSG_ERROR([--with-static-system-libs needs a list, e.g. --with-static-system-libs=libxml,libxslt,curl]) | |
| fi | |
| for _ssentry in `echo "$with_static_system_libs" | $SED -e 's/,/ /g'`; do | |
| dnl Each entry is NAME or NAME:DIR. The explicit DIR is what makes | |
| dnl libiconv usable here: it has no --with-system-libiconv, so | |
| dnl configure has no prefix of its own to fall back on. | |
| _sslib=`echo "$_ssentry" | $SED -e 's/:.*//'` | |
| _ssgiven= | |
| case "$_ssentry" in | |
| *:*) _ssgiven=`echo "$_ssentry" | $SED -e 's/^[[^:]]*://'` ;; | |
| esac | |
| AC_MSG_CHECKING([for a static system $_sslib]) | |
| case "$_sslib" in | |
| libxml) | |
| _ssenabled="$SYSTEM_LIBXML"; _ssprefix="$LIBXML_PREFIX"; _ssopt="--with-system-libxml" | |
| _ssarchives="libxml2.a"; _sslflags="-lxml2" | |
| ;; | |
| libxslt) | |
| _ssenabled="$SYSTEM_LIBXSLT"; _ssprefix="$LIBXSLT_PREFIX"; _ssopt="--with-system-libxslt" | |
| _ssarchives="libxslt.a libexslt.a"; _sslflags="-lxslt -lexslt" | |
| ;; | |
| curl) | |
| _ssenabled="$SYSTEM_CURL"; _ssprefix="$CURL_PREFIX"; _ssopt="--with-system-curl" | |
| _ssarchives="libcurl.a"; _sslflags="-lcurl" | |
| ;; | |
| libiconv) | |
| dnl The bundled XML libs are built --without-iconv, so this only | |
| dnl covers a *system* libxml2/libxslt/curl whose own build enabled | |
| dnl iconv and whose *-config therefore reports -liconv. There is no | |
| dnl --with-system-libiconv to take a prefix from, hence libiconv:DIR. | |
| _ssenabled=YES; _ssprefix="$_ssgiven"; _ssopt= | |
| _ssarchives="libiconv.a"; _sslflags="-liconv" | |
| ;; | |
| *) | |
| AC_MSG_ERROR([unsupported library "$_sslib" in --with-static-system-libs; supported: libxml, libxslt, curl, libiconv]) | |
| ;; | |
| esac | |
| test -n "$_ssgiven" && _ssprefix="$_ssgiven" | |
| if test "$_ssenabled" != "YES"; then | |
| AC_MSG_ERROR([--with-static-system-libs=$_sslib requires $_ssopt]) | |
| fi | |
| if test -z "$_ssprefix"; then | |
| if test -n "$_ssopt"; then | |
| AC_MSG_ERROR([--with-static-system-libs=$_sslib needs a prefix; give $_ssopt=DIR (macOS only)]) | |
| else | |
| AC_MSG_ERROR([--with-static-system-libs=$_sslib needs a prefix; write $_sslib:DIR, e.g. $_sslib:/usr/local]) | |
| fi | |
| fi | |
| for _ssa in $_ssarchives; do | |
| if test ! -f "$_ssprefix/lib/$_ssa"; then | |
| AC_MSG_ERROR([--with-static-system-libs=$_sslib given, but $_ssprefix/lib/$_ssa not found]) | |
| fi | |
| done | |
| dnl Replace each "-lfoo" with the archive's absolute path so the | |
| dnl linker cannot pick a dylib sitting beside it. Matching on a | |
| dnl trailing space (the value gets one appended, then trimmed) keeps | |
| dnl this to portable BRE -- $SED is whatever sed AC_PATH_PROGS found, | |
| dnl which is not required to be GNU, and \| alternation silently | |
| dnl matches nothing under the BSD sed macOS ships. | |
| for _ssl in $_sslflags; do | |
| _ssa="lib`echo "$_ssl" | $SED -e 's/^-l//'`.a" | |
| case "$_sslib" in | |
| libxml) LIBXML_LIBS=`echo "$LIBXML_LIBS " | $SED -e "s|$_ssl |$_ssprefix/lib/$_ssa |g" -e 's| *$||'` ;; | |
| libxslt) LIBXSLT_LIBS=`echo "$LIBXSLT_LIBS " | $SED -e "s|$_ssl |$_ssprefix/lib/$_ssa |g" -e 's| *$||'` ;; | |
| curl) CURL_LIBS=`echo "$CURL_LIBS " | $SED -e "s|$_ssl |$_ssprefix/lib/$_ssa |g" -e 's| *$||'` ;; | |
| libiconv) | |
| dnl iconv is a transitive dep, so -liconv turns up in whichever | |
| dnl of these *-config reported it -- rewrite all of them. | |
| LIBXML_LIBS=`echo "$LIBXML_LIBS " | $SED -e "s|$_ssl |$_ssprefix/lib/$_ssa |g" -e 's| *$||'` | |
| LIBXSLT_LIBS=`echo "$LIBXSLT_LIBS " | $SED -e "s|$_ssl |$_ssprefix/lib/$_ssa |g" -e 's| *$||'` | |
| CURL_LIBS=`echo "$CURL_LIBS " | $SED -e "s|$_ssl |$_ssprefix/lib/$_ssa |g" -e 's| *$||'` | |
| ;; | |
| esac | |
| done | |
| case "$_sslib" in | |
| libxml) STATIC_SYSTEM_LIBXML=YES ;; | |
| libxslt) STATIC_SYSTEM_LIBXSLT=YES ;; | |
| curl) STATIC_SYSTEM_CURL=YES ;; | |
| esac | |
| STATIC_SYSTEM_LIBS="$STATIC_SYSTEM_LIBS $_sslib" | |
| AC_MSG_RESULT([$_ssprefix/lib]) | |
| done | |
| STATIC_SYSTEM_LIBS=`echo $STATIC_SYSTEM_LIBS` | |
| fi | |
| AC_SUBST(STATIC_SYSTEM_LIBS) | |
| AC_SUBST(STATIC_SYSTEM_LIBXML) | |
| AC_SUBST(STATIC_SYSTEM_LIBXSLT) | |
| AC_SUBST(STATIC_SYSTEM_CURL) | |
| 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 | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_BOOST=YES | |
| AC_LANG_PUSH([C++]) | |
| AC_CHECK_HEADER(boost/shared_ptr.hpp, [], | |
| [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], []) | |
| AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [], | |
| [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)], []) | |
| save_CXXFLAGS=$CXXFLAGS | |
| CXXFLAGS="$CXXFLAGS -fno-exceptions" | |
| AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions]) | |
| AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp> | |
| ]], [[]])],[ac_cv_cxx_boost_no_exceptons_broken=no],[ac_cv_cxx_boost_no_exceptons_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]) | |
| else | |
| AC_MSG_RESULT([yes]) | |
| fi | |
| CXXFLAGS=$save_CXXFLAGS | |
| AC_LANG_POP([C++]) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| BUILD_TYPE="$BUILD_TYPE BOOST" | |
| SYSTEM_BOOST=NO | |
| fi | |
| AC_SUBST(SYSTEM_BOOST) | |
| 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 | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_VIGRA=YES | |
| AC_LANG_PUSH([C++]) | |
| AC_CHECK_HEADER(vigra/copyimage.hxx, [], | |
| [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], []) | |
| AC_LANG_POP([C++]) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| BUILD_TYPE="$BUILD_TYPE VIGRA" | |
| SYSTEM_VIGRA=NO | |
| fi | |
| AC_SUBST(SYSTEM_VIGRA) | |
| 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 | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_ODBC_HEADERS=YES | |
| AC_CHECK_HEADER(sqlext.h, [], | |
| [AC_MSG_ERROR(odbc not found. install odbc)], []) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_ODBC_HEADERS=NO | |
| BUILD_TYPE="$BUILD_TYPE UNIXODBC" | |
| fi | |
| AC_SUBST(SYSTEM_ODBC_HEADERS) | |
| AC_MSG_CHECKING([whether to build XML Security support]) | |
| if test "$enable_nss_module" = "no"; then | |
| AC_MSG_RESULT([no, since NSS disabled but needed]) | |
| else | |
| AC_MSG_RESULT([yes]) | |
| fi | |
| AC_MSG_CHECKING([whether to build LDAP configuration backend]) | |
| if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then | |
| if test "$with_openldap" = "yes"; then | |
| AC_MSG_RESULT([yes]) | |
| WITH_LDAP=YES | |
| else | |
| WITH_LDAP=NO | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| WITH_LDAP=NO | |
| fi | |
| if test "$WITH_LDAP" = "YES"; then | |
| dnl =================================================================== | |
| dnl Test whether we want to use the OpenLDAP LDAP SDK | |
| 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_CHECK_LIB(ldap, ldap_set_option, [], | |
| [AC_MSG_ERROR(openldap lib not found or functional)], []) | |
| fi | |
| fi | |
| AC_SUBST(WITH_LDAP) | |
| AC_SUBST(WITH_OPENLDAP) | |
| AC_MSG_CHECKING([whether to build the internal NSS module]) | |
| 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 | |
| AC_MSG_CHECKING([for Mozilla build tooling]) | |
| if test -z "$MOZILLABUILD" ; then | |
| AC_MSG_ERROR([ | |
| Mozilla build tooling not found! | |
| It is required for NSS that is needed for AOO's security facilities. | |
| Either disable NSS using the option --disable-nss-module | |
| or use the --with-mozilla-build option after installing the tool obtained | |
| from https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/]) | |
| else | |
| if test \( "$WITH_MINGWIN" = "yes" \) ; then | |
| if test ! -d "$MOZILLABUILD" ; then | |
| AC_MSG_ERROR([Mozilla build tooling incomplete!]) | |
| else | |
| AC_MSG_RESULT([ok]) | |
| fi | |
| else | |
| if test ! -d "$MOZILLABUILD/msys" ; then | |
| AC_MSG_ERROR([Mozilla build tooling incomplete!]) | |
| else | |
| AC_MSG_RESULT([ok]) | |
| fi | |
| fi | |
| fi | |
| fi | |
| else | |
| ENABLE_NSS_MODULE="NO" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_NSS_MODULE) | |
| AC_SUBST(MOZILLABUILD) | |
| AC_SUBST(MOZ_INC) | |
| dnl =================================================================== | |
| 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 | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_SANE_HEADER=YES | |
| AC_CHECK_HEADER(sane/sane.h, [], | |
| [AC_MSG_ERROR(sane not found. install sane)], []) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_SANE_HEADER=NO | |
| BUILD_TYPE="$BUILD_TYPE SANE" | |
| fi | |
| AC_SUBST(SYSTEM_SANE_HEADER) | |
| dnl =================================================================== | |
| 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 | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_ICU=YES | |
| AC_LANG_PUSH([C++]) | |
| AC_MSG_CHECKING([for unicode/rbbi.h]) | |
| AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)]) | |
| AC_LANG_POP([C++]) | |
| AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin]) | |
| 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]) | |
| 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]) | |
| if test -z "$SYSTEM_GENCMN"; then | |
| AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\]) | |
| fi | |
| AC_PATH_PROG( ICUCONFIG, icu-config) | |
| AC_MSG_CHECKING([ICU version]) | |
| if test "$_os" = "OS2"; then | |
| ICU_MAJOR=4 | |
| else | |
| ICU_VERSION=`$ICUCONFIG --version` | |
| ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` | |
| ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` | |
| ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` | |
| ICU_CFLAGS=`$ICUCONFIG --cppflags` | |
| fi | |
| if test "$ICU_MAJOR" -ge "4"; then | |
| AC_MSG_RESULT([OK]) | |
| else | |
| AC_MSG_ERROR([not suitable, only >= 4.0 supported currently]) | |
| fi | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_ICU=NO | |
| BUILD_TYPE="$BUILD_TYPE ICU" | |
| fi | |
| AC_SUBST(SYSTEM_ICU) | |
| AC_SUBST(SYSTEM_GENBRK) | |
| AC_SUBST(SYSTEM_GENCCODE) | |
| AC_SUBST(SYSTEM_GENCMN) | |
| AC_SUBST(ICU_MAJOR) | |
| AC_SUBST(ICU_MINOR) | |
| AC_SUBST(ICU_MICRO) | |
| AC_SUBST(ICU_CFLAGS) | |
| dnl =================================================================== | |
| dnl Graphite | |
| dnl =================================================================== | |
| ENABLE_GRAPHITE="FALSE" | |
| AC_MSG_CHECKING([whether to enable graphite support]) | |
| if test "x$enable_graphite" = "xyes" -a \( "$_os" = "WINNT" -o "$_os" = "Linux" -o "$_os" = "FreeBSD" \) ; then | |
| AC_MSG_RESULT([yes]) | |
| ENABLE_GRAPHITE="TRUE" | |
| AC_MSG_CHECKING([which graphite to use]) | |
| if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ | |
| test "$with_system_graphite" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_GRAPHITE=YES | |
| PKG_CHECK_MODULES( GRAPHITE, silgraphite ) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_GRAPHITE=NO | |
| BUILD_TYPE="$BUILD_TYPE GRAPHITE" | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| ENABLE_GRAPHITE="FALSE" | |
| fi | |
| AC_SUBST(ENABLE_GRAPHITE) | |
| AC_SUBST(SYSTEM_GRAPHITE) | |
| AC_SUBST(GRAPHITE_LIBS) | |
| AC_SUBST(GRAPHITE_CFLAGS) | |
| dnl =================================================================== | |
| dnl Checks for libraries. | |
| dnl =================================================================== | |
| dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported | |
| dnl See if we have the AppKit framework for building with Quartz graphics. | |
| if test "$_os" = "Darwin"; then | |
| if test "x$with_x" = "xyes"; then | |
| AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build]) | |
| else | |
| AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework]) | |
| if test -d "/System/Library/Frameworks/AppKit.framework/"; then | |
| AC_MSG_RESULT([yes]) | |
| x_includes="no_x_includes" | |
| x_libraries="no_x_libraries" | |
| dnl disable some things used on other Unix versions but not on the aqua build | |
| enable_gtk=no | |
| enable_cups=no | |
| ENABLE_CUPS="" | |
| AC_SUBST(ENABLE_CUPS) | |
| else | |
| AC_MSG_ERROR([No AppKit.framewrok found]) | |
| fi | |
| fi | |
| fi | |
| 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 | |
| AC_PATH_X | |
| AC_PATH_XTRA | |
| CPPFLAGS="$CPPFLAGS $X_CFLAGS" | |
| if test "x$x_includes" = "x"; then | |
| x_includes="default_x_includes" | |
| fi | |
| if test "x$x_libraries" = "x"; then | |
| x_libraries="default_x_libraries" | |
| fi | |
| dnl The variables $x_libraries and $x_includes are set. | |
| if test -z "$x_libraries"; then | |
| AC_MSG_ERROR([No X libraries found]) # Exit | |
| fi | |
| if test -z "$x_includes"; then | |
| AC_MSG_ERROR([No X includes found]) # Exit | |
| fi | |
| CFLAGS=$X_CFLAGS | |
| 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", []) | |
| else | |
| x_includes="no_x_includes" | |
| x_libraries="no_x_libraries" | |
| fi | |
| if test -z "$x_includes"; then | |
| x_includes="no_x_includes" | |
| fi | |
| if test -z "$x_libraries"; then | |
| x_libraries="no_x_libraries" | |
| fi | |
| if test "$x_includes" = "default_x_includes"; then | |
| XINC="/usr/include" | |
| else | |
| XINC="$x_includes" | |
| fi | |
| AC_SUBST(XINC) | |
| if test "$x_libraries" = "default_x_libraries"; then | |
| XLIB=`$PKG_CONFIG --variable=libdir x11` | |
| if test "x$XLIB" = x; then | |
| XLIB="/usr/lib" | |
| fi | |
| else | |
| XLIB="$x_libraries" | |
| fi | |
| AC_SUBST(XLIB) | |
| AC_SUBST(XAU_LIBS) | |
| 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_RUN_IFELSE([AC_LANG_SOURCE([[ | |
| #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 | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to link to Xrender]) | |
| if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then | |
| AC_MSG_RESULT([yes]) | |
| XRENDER_LINK=YES | |
| with_system_xrender_headers=yes | |
| else | |
| AC_MSG_RESULT([no, dynamically open it]) | |
| XRENDER_LINK=NO | |
| 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 | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_XRENDER_HEADERS=YES | |
| AC_CHECK_HEADER(X11/extensions/Xrender.h, [], | |
| [AC_MSG_ERROR(Xrender not found. install X)], []) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_XRENDER_HEADERS=NO | |
| BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" | |
| fi | |
| if test "$XRENDER_LINK" = "YES"; then | |
| AC_CHECK_LIB(Xrender, XRenderQueryVersion, [], | |
| [AC_MSG_ERROR(libXrender not found or functional)], []) | |
| fi | |
| AC_SUBST(SYSTEM_XRENDER_HEADERS) | |
| AC_SUBST(XRENDER_LINK) | |
| dnl =================================================================== | |
| dnl Check for XRandr | |
| 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]) | |
| else | |
| 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, [], | |
| [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], []) | |
| XRANDR_CFLAGS=" " | |
| AC_CHECK_LIB(Xrandr, XRRQueryExtension, [], | |
| [ AC_MSG_ERROR(libXrandr not found or functional) ], []) | |
| XRANDR_LIBS="-lXrandr " | |
| ENABLE_RANDR="TRUE" | |
| AC_MSG_RESULT([enabling RandR support]) | |
| fi | |
| fi | |
| else | |
| ENABLE_RANDR="" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(XRANDR_DLOPEN) | |
| AC_SUBST(XRANDR_CFLAGS) | |
| AC_SUBST(XRANDR_LIBS) | |
| AC_SUBST(ENABLE_RANDR) | |
| dnl =================================================================== | |
| dnl Check for system nss | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([which libnss to use]) | |
| if test -n "$with_system_nss" -o -n "$with_system_libs" && test "$with_system_nss" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| PKG_CHECK_MODULES( NSS, nss ) | |
| SYSTEM_NSS=YES | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_NSS=NO | |
| BUILD_TYPE="$BUILD_TYPE NSS" | |
| fi | |
| AC_SUBST(SYSTEM_NSS) | |
| AC_SUBST(NSS_CFLAGS) | |
| AC_SUBST(NSS_LIBS) | |
| dnl =================================================================== | |
| dnl Check for system openssl | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([which libssl to use]) | |
| if test -n "$with_system_openssl" -o -n "$with_system_libs" && \ | |
| test "$with_system_openssl" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| if test "$_os" = "FreeBSD"; then | |
| OPENSSL_CFLAGS= | |
| OPENSSL_LIBS="-lssl -lcrypto" | |
| else | |
| PKG_CHECK_MODULES( OPENSSL, openssl ) | |
| fi | |
| SYSTEM_OPENSSL=YES | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_OPENSSL=NO | |
| BUILD_TYPE="$BUILD_TYPE OPENSSL" | |
| fi | |
| AC_SUBST(SYSTEM_OPENSSL) | |
| AC_SUBST(OPENSSL_CFLAGS) | |
| AC_SUBST(OPENSSL_LIBS) | |
| 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 | |
| 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 | |
| fi | |
| AC_SUBST(SYSTEM_REDLAND) | |
| AC_SUBST(REDLAND_CFLAGS) | |
| AC_SUBST(REDLAND_LIBS) | |
| dnl =================================================================== | |
| dnl Check for hunspell | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to build the Spell Checking component]) | |
| ENABLE_HUNSPELL= | |
| if test "x$enable_hunspell" != "xno" ; then | |
| AC_MSG_CHECKING([which libhunspell to use]) | |
| if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ | |
| test "$with_system_hunspell" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_HUNSPELL=YES | |
| AC_LANG_PUSH([C++]) | |
| PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" ) | |
| if test "$HUNSPELL_PC" != "TRUE"; then | |
| AC_CHECK_HEADER(hunspell.hxx, [], | |
| [AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ], | |
| [AC_MSG_ERROR(hunspell headers not found.)], []) | |
| ], []) | |
| AC_CHECK_LIB(hunspell, main, [], | |
| [ AC_MSG_ERROR(hunspell library not found.) ], []) | |
| HUNSPELL_LIBS=-lhunspell | |
| fi | |
| AC_LANG_POP([C++]) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_HUNSPELL=NO | |
| BUILD_TYPE="$BUILD_TYPE HUNSPELL" | |
| fi | |
| ENABLE_HUNSPELL=YES | |
| AC_SUBST(SYSTEM_HUNSPELL) | |
| AC_SUBST(HUNSPELL_CFLAGS) | |
| AC_SUBST(HUNSPELL_LIBS) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_HUNSPELL) | |
| dnl =================================================================== | |
| dnl Checking for libhyphen | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to build the Hyphenator component]) | |
| ENABLE_HYPHEN= | |
| if test "x$enable_hyphen" != "xno" ; then | |
| AC_MSG_CHECKING([which libhyphen to use]) | |
| if test -n "$with_system_hyphen" -o -n "$with_system_libs" && \ | |
| test "$with_system_hyphen" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_HYPH=YES | |
| AC_CHECK_HEADER(hyphen.h, [], | |
| [ AC_MSG_ERROR(libhyphen headers not found.)], []) | |
| AC_CHECK_MEMBER(struct _HyphenDict.cset, [], | |
| [ AC_MSG_ERROR(no. You are sure you have libhyphen headers?)], | |
| [#include <hyphen.h>]) | |
| AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen], | |
| [ AC_MSG_ERROR(libhyphen not found or too old.)], []) | |
| if test -z "$HYPHEN_LIB"; then | |
| AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph], | |
| [ AC_MSG_ERROR(libhyphen not found or too old.)], []) | |
| fi | |
| if test -z "$HYPHEN_LIB"; then | |
| AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj], | |
| [ AC_MSG_ERROR(libhyphen not found or too old.)], []) | |
| fi | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_HYPH=NO | |
| BUILD_TYPE="$BUILD_TYPE HYPHEN" | |
| fi | |
| ENABLE_HYPHEN=YES | |
| AC_SUBST(SYSTEM_HYPH) | |
| AC_SUBST(HYPHEN_LIB) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_HYPHEN) | |
| #dnl =================================================================== | |
| #dnl Check whether we are allowed to bundle dictionaries and whether | |
| #dnl hunspell is available. | |
| #dnl =================================================================== | |
| ENABLE_BUNDLED_DICTIONARIES= | |
| if test "x$enable_bundled_dictionaries" != "xno" -a "x$ENABLE_HUNSPELL" = "xYES"; then | |
| ENABLE_BUNDLED_DICTIONARIES=YES | |
| fi | |
| AC_SUBST(ENABLE_BUNDLED_DICTIONARIES) | |
| dnl =================================================================== | |
| dnl Checking for mythes | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([which mythes to use]) | |
| 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++]) | |
| PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no) | |
| if test "$MYTHES_PKGCONFIG" = "no"; then | |
| AC_CHECK_HEADER(mythes.hxx, [], | |
| [ AC_MSG_ERROR(mythes.hxx headers not found.)], []) | |
| AC_CHECK_LIB(mythes-1.2, main, [], | |
| [ MYTHES_FOUND=no], []) | |
| 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 | |
| AC_LANG_POP([C++]) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_MYTHES=NO | |
| BUILD_TYPE="$BUILD_TYPE MYTHES" | |
| fi | |
| AC_SUBST(SYSTEM_MYTHES) | |
| AC_SUBST(MYTHES_CFLAGS) | |
| AC_SUBST(MYTHES_LIBS) | |
| dnl =================================================================== | |
| dnl Checking for libtextcat | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([which libtextcat to use]) | |
| if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_LIBTEXTCAT=YES | |
| AC_CHECK_HEADER(libtextcat/textcat.h, [], | |
| [ AC_MSG_ERROR(libtextcat headers not found.)], []) | |
| AC_CHECK_LIB(textcat, special_textcat_Init, , | |
| [ AC_MSG_ERROR(libtextcat library not found or not suitable. libtextcat typically needs to be patched)], []) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_LIBTEXTCAT=NO | |
| BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" | |
| 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 | |
| SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat | |
| else | |
| SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data | |
| fi | |
| AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA]) | |
| else | |
| AC_MSG_RESULT([internal]) | |
| BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" | |
| fi | |
| AC_SUBST(SYSTEM_LIBTEXTCAT_DATA) | |
| dnl *************************************** | |
| dnl testing libc version for Linux... | |
| dnl *************************************** | |
| if test "$_os" = "Linux"; then | |
| AC_MSG_CHECKING([whether libc is >= 2.1.1]) | |
| exec 6>/dev/null # no output | |
| AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC) | |
| exec 6>&1 # output on again | |
| if test "$HAVE_LIBC"; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([no, upgrade libc]) | |
| fi | |
| fi | |
| if test "$_os" != "WNT"; 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 | |
| fi | |
| else | |
| HAVE_GETOPT=NO | |
| HAVE_READDIR_R=NO | |
| SYSTEM_LIBC=YES | |
| fi | |
| AC_SUBST(HAVE_GETOPT) | |
| AC_SUBST(HAVE_READDIR_R) | |
| AC_SUBST(SYSTEM_LIBC) | |
| dnl ========================================= | |
| dnl Check for the Microsoft Platform 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" \) -a \( -z "$MSVC_MODERN" \) ; 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 | |
| # 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 | |
| # 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([ | |
| Some modules do not build correctly with MS Platform SDK - April 2005 | |
| Edition if the library ($PSDK_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 | |
| # 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 | |
| elif echo $PSDK_HOME | $GREP "v7.0" >/dev/null 2>/dev/null; then | |
| AC_MSG_RESULT([Found Windows SDK 7.0 ($PSDK_HOME)]) | |
| WINDOWS_VISTA_PSDK=TRUE | |
| else | |
| AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)]) | |
| fi | |
| fi | |
| AC_SUBST(PSDK_HOME) | |
| AC_SUBST(WINDOWS_VISTA_PSDK) | |
| 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"` | |
| 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"` | |
| fi | |
| # Remove a possible trailing backslash | |
| DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'` | |
| if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then | |
| HAVE_DIRECTDRAW_H="yes" | |
| else | |
| HAVE_DIRECTDRAW_H="no" | |
| fi | |
| if test -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 | |
| 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 | |
| HAVE_DIRECTDRAW_LIB="yes" | |
| else | |
| HAVE_DIRECTDRAW_LIB="no" | |
| fi | |
| if test -f "$DIRECTXSDK_LIB/d3d9.lib" ; then | |
| HAVE_DIRECTXSDK_LIB="yes" | |
| else | |
| HAVE_DIRECTXSDK_LIB="no" | |
| fi | |
| if test "$HAVE_DIRECTDRAW_H" = "yes" -a "$HAVE_DIRECTDRAW_LIB" = "yes" ; then | |
| ENABLE_DIRECT_DRAW="TRUE" | |
| fi | |
| if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes" ; then | |
| HAVE_DIRECTXSDK="yes" | |
| else | |
| HAVE_DIRECTXSDK="no" | |
| fi | |
| if test -n "$ENABLE_DIRECTX"; then | |
| if test "$HAVE_DIRECTDRAW" = "yes" -o "$HAVE_DIRECTXSDK" = "yes" ; then | |
| AC_MSG_RESULT([found]) | |
| else | |
| AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or --disable-directx.]) | |
| fi | |
| else | |
| DIRECTXSDK_HOME="" | |
| AC_MSG_RESULT([disabled]) | |
| fi | |
| fi | |
| AC_SUBST(ENABLE_DIRECT_DRAW) | |
| AC_SUBST(DIRECTXSDK_HOME) | |
| AC_SUBST(DIRECTXSDK_LIB) | |
| dnl ============================================ | |
| dnl Check for ATL and MFC | |
| dnl ============================================ | |
| if test \( "$_os" = "WINNT" \) ; then | |
| AC_MSG_CHECKING([for ATL and MFC]) | |
| if test "$DISABLE_ATL" = "TRUE"; then | |
| AC_MSG_RESULT([ATL is disabled, nothing to check]) | |
| else | |
| AC_MSG_NOTICE([testing ATL/MFC libs and includes]) | |
| if test -z "$with_atl_include_dir"; then | |
| ATL_INCLUDE=$COMPATH/atlmfc/include | |
| else | |
| ATL_INCLUDE=`cygpath -u "$with_atl_include_dir"` | |
| fi | |
| if test -z "$with_atl_lib_dir"; then | |
| ATL_LIB=$COMPATH/atlmfc/lib | |
| ATL_LIB_X64=$COMPATH/atlmfc/lib/amd64 | |
| else | |
| ATL_LIB=`cygpath -u "$with_atl_lib_dir"` | |
| ATL_LIB_X64=$ATL_LIB/../amd64 | |
| fi | |
| if test -z "$with_mfc_include_dir"; then | |
| MFC_INCLUDE=$COMPATH/atlmfc/include | |
| else | |
| MFC_INCLUDE=`cygpath -u "$with_mfc_include_dir"` | |
| fi | |
| if test -z "$with_mfc_lib_dir"; then | |
| MFC_LIB=$COMPATH/atlmfc/lib | |
| else | |
| MFC_LIB=`cygpath -u "$with_mfc_lib_dir"` | |
| fi | |
| ATL_INCLUDE=`echo $ATL_INCLUDE | $SED 's/\/$//'` | |
| ATL_LIB=`echo $ATL_LIB | $SED 's/\/$//'` | |
| ATL_LIB_X64=`echo $ATL_LIB_X64 | $SED 's/\/$//'` | |
| MFC_INCLUDE=`echo $MFC_INCLUDE | $SED 's/\/$//'` | |
| MFC_LIB=`echo $MFC_LIB | $SED 's/\/$//'` | |
| AC_MSG_NOTICE([looking for atlbase.h in "$ATL_INCLUDE"]) | |
| if test -f "$ATL_INCLUDE/atlbase.h"; then | |
| HAVE_ATL_H="yes" | |
| else | |
| HAVE_ATL_H="no" | |
| fi | |
| AC_MSG_NOTICE([found atlbase.h in "$ATL_INCLUDE"? "$HAVE_ATL_H"]) | |
| AC_MSG_NOTICE([looking for afx.h in "$MFC_INCLUDE"]) | |
| if test -f "$MFC_INCLUDE/afx.h"; then | |
| HAVE_MFC_H="yes" | |
| else | |
| HAVE_MFC_H="no" | |
| fi | |
| AC_MSG_NOTICE([found afx.h in "$MFC_INCLUDE"? "$HAVE_MFC_H"]) | |
| AC_MSG_NOTICE([looking for atls.lib in "$ATL_LIB"]) | |
| if test -f "$ATL_LIB/atls.lib"; then | |
| HAVE_ATL_LIB="yes" | |
| AC_MSG_NOTICE([looking for atlthunk.lib in "$ATL_LIB"]) | |
| if test -f "$ATL_LIB/atlthunk.lib"; then | |
| HAVE_ATLTHUNK="YES" | |
| else | |
| HAVE_ATLTHUNK="NO" | |
| fi | |
| AC_MSG_NOTICE([found atlthunk.lib in "$ATL_LIB"? "$HAVE_ATLTHUNK"]) | |
| else | |
| HAVE_ATL_LIB="no" | |
| fi | |
| AC_MSG_NOTICE([found atls.lib in "$ATL_LIB"? "$HAVE_ATL_LIB"]) | |
| dnl TODO check also MFC libraries, they seem to have different names | |
| dnl mfc42.lib mfc90.lib | |
| if test -d "$MFC_LIB"; then | |
| HAVE_MFC_LIB="yes" | |
| else | |
| HAVE_MFC_LIB="no" | |
| fi | |
| if test "$HAVE_ATL_H" = "no" -o "$HAVE_MFC_H" = "no" -o "$HAVE_ATL_LIB" = "no" -o "$HAVE_MFC_LIB" = "no"; then | |
| ATL_INCLUDE= | |
| ATL_LIB= | |
| ATL_LIB_X64= | |
| MFC_INCLUDE= | |
| MFC_LIB= | |
| HAVE_ATL_LIB= | |
| dnl TODO shouldn't this be an error? | |
| DISABLE_ACTIVEX="TRUE" | |
| DISABLE_ATL="TRUE" | |
| AC_MSG_RESULT([ATL/MFC disabled]) | |
| else | |
| ATL_INCLUDE=`cygpath -dm "$ATL_INCLUDE"` | |
| ATL_LIB=`cygpath -dm "$ATL_LIB"` | |
| ATL_LIB_X64=`cygpath -dm "$ATL_LIB_X64"` | |
| MFC_INCLUDE=`cygpath -dm "$MFC_INCLUDE"` | |
| MFC_LIB=`cygpath -dm "$MFC_LIB"` | |
| AC_MSG_RESULT([ATL/MFC enabled]) | |
| fi | |
| fi | |
| fi | |
| AC_SUBST(ATL_INCLUDE) | |
| AC_SUBST(ATL_LIB) | |
| AC_SUBST(ATL_LIB_X64) | |
| AC_SUBST(HAVE_ATLTHUNK) | |
| AC_SUBST(MFC_INCLUDE) | |
| AC_SUBST(MFC_LIB) | |
| dnl ============================================ | |
| 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 | |
| else | |
| NSIS_PATH=`cygpath -d "$NSIS_PATH"` | |
| NSIS_PATH=`cygpath -u "$NSIS_PATH"` | |
| AC_MSG_RESULT([found ($NSIS_PATH)]) | |
| AC_MSG_CHECKING([whether NSIS version is >= 3.*]) | |
| nsis_version_string=`"$NSIS_PATH/makensis.exe" /VERSION | $SED -e s/^v//i` | |
| nsis_version_major=`echo $nsis_version_string | cut -d. -f1` | |
| nsis_version_minor=`echo $nsis_version_string | cut -d. -f2` | |
| if test "$nsis_version_major" -ge "3"; then | |
| AC_MSG_RESULT([found NSIS $nsis_version_major.$nsis_version_minor >= 3.*]) | |
| AC_MSG_CHECKING([whether NSIS was compiled with Unicode support]) | |
| if echo `"$NSIS_PATH/makensis.exe" /HDRINFO` | $EGREP "\bNSIS_UNICODE_MAKENSIS\b" 2>&1 >/dev/null; then | |
| AC_MSG_RESULT([NSIS version compiled with Unicode support.]) | |
| else | |
| NSIS_PATH="" | |
| AC_MSG_WARN([NSIS version compiled without Unicode support, no self contained installer will be build.]) | |
| fi | |
| else | |
| NSIS_PATH="" | |
| AC_MSG_WARN([NSIS version found is < 3.*, no self contained installer will be build.]) | |
| fi | |
| fi | |
| fi | |
| AC_SUBST(NSIS_PATH) | |
| dnl *************************************** | |
| dnl testing bison and flex exist | |
| dnl *************************************** | |
| AC_PATH_PROG(BISON, bison) | |
| if test -z "$BISON"; then | |
| AC_MSG_ERROR([no bison found in \$PATH, install bison]) | |
| else | |
| AC_MSG_CHECKING([the bison version]) | |
| _bison_version=`$BISON --version | $GREP GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; | |
| _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` | |
| # Accept newer than 1.875 or older(equal) than 1.75 | |
| if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then | |
| if test "$_bison_version" = "1.875" ; then | |
| AC_MSG_WARN([suspect ($BISON $_bison_version)]) | |
| echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn | |
| else | |
| AC_MSG_RESULT([checked ($BISON $_bison_version)]) | |
| fi | |
| else | |
| AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))]) | |
| fi | |
| fi | |
| AC_PATH_PROG(FLEX, flex) | |
| if test -z "$FLEX"; then | |
| AC_MSG_ERROR([no flex found in \$PATH, install flex]) | |
| fi | |
| dnl *************************************** | |
| dnl testing that patch exists | |
| 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"\]) | |
| fi | |
| dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used | |
| if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then | |
| if test -z "$with_gnu_patch"; then | |
| GNUPATCH=$PATCH | |
| else | |
| if test -x "$with_gnu_patch"; then | |
| GNUPATCH=$with_gnu_patch | |
| else | |
| AC_MSG_ERROR([--with-gnu-patch did not point to an executable]) | |
| fi | |
| fi | |
| 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]) | |
| else | |
| AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it]) | |
| fi | |
| fi | |
| dnl We also need to check for --with-gnu-cp | |
| if test -z "$with_gnu_cp"; then | |
| # check the place where the GNU stuff is hidden on Solaris... | |
| if test -x /usr/gnu/bin/cp; then | |
| GNUCP=/usr/gnu/bin/cp | |
| else | |
| AC_PATH_PROGS(GNUCP, gnucp cp) | |
| fi | |
| if test -z $GNUCP; then | |
| AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it]) | |
| fi | |
| else | |
| if test -x "$with_gnu_cp"; then | |
| GNUCP=$with_gnu_cp | |
| else | |
| AC_MSG_ERROR([--with-gnu-cp did not point to an executable]) | |
| fi | |
| 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]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| GNUCP='' | |
| fi | |
| if test -z "$GNUCP"; then | |
| if test "$_os" = "SunOS"; 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 | |
| fi | |
| AC_SUBST(GNUPATCH) | |
| AC_SUBST(GNUCP) | |
| dnl *************************************** | |
| dnl testing bash tools path on Windows | |
| 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 | |
| dnl The 64 bit assembler is a different BINARY, not just a different copy: | |
| dnl ml.exe emits 32 bit objects and ml64.exe 64 bit ones, and the x64 | |
| dnl toolset directory ships only the latter. Look for whichever one goes | |
| dnl with the target being built. | |
| if test "$BUILD_WIN64" = "TRUE" ; then | |
| ASM_EXE_NAME=ml64.exe | |
| else | |
| ASM_EXE_NAME=ml.exe | |
| fi | |
| AC_MSG_CHECKING([$ASM_EXE_NAME assembler path]) | |
| if test -n "$with_asm_home"; then | |
| with_asm_home=`cygpath -u "$with_asm_home"` | |
| fi | |
| if test ! -x "$with_asm_home/$ASM_EXE_NAME"; then | |
| AC_PATH_PROG(ML_EXE, $ASM_EXE_NAME) | |
| if test -z "$ML_EXE"; then | |
| if test -x "$with_cl_home/bin/$ASM_EXE_NAME"; then | |
| with_asm_home=$with_cl_home/bin | |
| AC_MSG_RESULT([found ($with_asm_home)]) | |
| elif test -x "$with_cl_home/$cl_subdirectory/$ASM_EXE_NAME"; then | |
| dnl A modern toolset keeps the assembler beside the compiler in the | |
| dnl split bin/Host<host>/<target> tree, and the target half matters: | |
| dnl the x86 directory has ml.exe, the x64 one has ml64.exe. Reusing | |
| dnl $cl_subdirectory is what keeps assembler and compiler on the same | |
| dnl target rather than merely on the same toolset. | |
| with_asm_home=$with_cl_home/$cl_subdirectory | |
| AC_MSG_RESULT([found ($with_asm_home)]) | |
| else | |
| AC_MSG_ERROR([Configure did not find $ASM_EXE_NAME 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 nasm.exe assembler path | |
| dnl *************************************** | |
| if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes" -a "$SYSTEM_OPENSSL" = "NO"; then | |
| AC_MSG_CHECKING([nasm.exe assembler path]) | |
| if test -n "$with_nasm_home"; then | |
| with_nasm_home=`cygpath -u "$with_nasm_home"` | |
| fi | |
| if test ! -x "$with_nasm_home/nasm.exe"; then | |
| AC_PATH_PROG(NASM_EXE, nasm.exe) | |
| if test -z "$NASM_EXE"; then | |
| with_nasm_home="NO_NASM_HOME" | |
| AC_MSG_ERROR([NASM is required to build on Windows, please install or use --with-nasm-home],,) | |
| else | |
| with_nasm_home="NASM_IN_PATH" | |
| fi | |
| fi | |
| AC_MSG_RESULT([$NASM_HOME]) | |
| else | |
| with_nasm_home="NO_NASM_HOME" | |
| fi | |
| NASM_HOME="$with_nasm_home" | |
| AC_SUBST(NASM_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 =================================================================== | |
| 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 | |
| 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 | |
| dnl =================================================================== | |
| dnl Zip must be a specific type for different build types. | |
| dnl =================================================================== | |
| if test "$_os" = "WINNT"; 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.]) | |
| fi | |
| fi | |
| AC_SUBST(ZIP_HOME) | |
| dnl =================================================================== | |
| dnl Windows builds need dbghelp.dll in external/dbghelp/ | |
| dnl =================================================================== | |
| if test "$_os" = "WINNT"; then | |
| AC_MSG_CHECKING([for dbghelp.dll]) | |
| if test -x ./external/dbghelp/dbghelp.dll; then | |
| AC_MSG_RESULT([found and executable]) | |
| 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: | |
| <https://www.microsoft.com/downloads/release.asp?releaseid=30682>.]) | |
| fi | |
| fi | |
| dnl =================================================================== | |
| dnl Windows builds need vcredist_x*.exe in external/vcredist/ | |
| dnl =================================================================== | |
| WITH_VC_REDIST="" | |
| if test "$_os" = "WINNT"; then | |
| AC_MSG_CHECKING([for vcredist_x86.exe]) | |
| if test -x ./external/vcredist/vcredist_x86.exe; then | |
| AC_MSG_RESULT([found and executable]) | |
| else | |
| AC_MSG_ERROR([ vcredist_x86.exe is missing in external/vcredist/. | |
| Get it from the Microsoft site and put it into external/vcredist. You can try | |
| to download it from https://www.microsoft.com/download/en/search.aspx?q=redistributable%20package.]) | |
| fi | |
| AC_MSG_CHECKING([for vcredist_x64.exe]) | |
| if test -x ./external/vcredist/vcredist_x64.exe; then | |
| AC_MSG_RESULT([found and executable]) | |
| else | |
| AC_MSG_ERROR([ vcredist_x64.exe is missing in external/vcredist/. | |
| Get it from the Microsoft site and put it into external/vcredist. You can try | |
| to download it from https://www.microsoft.com/download/en/search.aspx?q=redistributable%20package.]) | |
| fi | |
| WITH_VC_REDIST=YES | |
| AC_SUBST(WITH_VC_REDIST) | |
| 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 and executable]) | |
| 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: | |
| <https://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.]) | |
| fi | |
| fi | |
| dnl =================================================================== | |
| dnl Windows builds need msvcr100.dll in external/msvcp100/ | |
| dnl =================================================================== | |
| if test "$_os" = "WINNT"; then | |
| AC_MSG_CHECKING([for msvcr100.dll]) | |
| if test -x ./external/msvcp100/msvcr100.dll; then | |
| AC_MSG_RESULT([found and executable]) | |
| else | |
| AC_MSG_ERROR([msvcr100.dll is missing in external/msvcp100/. | |
| Get it from the Microsoft Visual C++ 2010 Redistributable Package (x86), | |
| from the Microsoft site and put it into external/msvcp100. | |
| You may have to search Microsoft's website. Last time it was seen at: | |
| <https://www.microsoft.com/en-us/download/search.aspx?q=Microsoft+Visual+C%2b%2b+2010+Redistributable>.]) | |
| 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" | |
| fi | |
| AC_SUBST(ENABLE_GTK) | |
| ENABLE_KDE="" | |
| if test "x$enable_kde" = "xyes"; then | |
| ENABLE_KDE="TRUE" | |
| R="$R kde" | |
| fi | |
| AC_SUBST(ENABLE_KDE) | |
| ENABLE_KDE4="" | |
| if test "x$enable_kde4" = "xyes"; then | |
| ENABLE_KDE4="TRUE" | |
| R="$R kde4" | |
| fi | |
| AC_SUBST(ENABLE_KDE4) | |
| if test -z "$R"; then | |
| AC_MSG_RESULT([none]) | |
| else | |
| AC_MSG_RESULT([$R]) | |
| fi | |
| dnl =================================================================== | |
| dnl GCONF check | |
| 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 | |
| ENABLE_GCONF="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| PKG_CHECK_MODULES( GCONF, gconf-2.0 ) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_GCONF) | |
| dnl =================================================================== | |
| dnl Gnome VFS check | |
| dnl =================================================================== | |
| ENABLE_GNOMEVFS="" | |
| AC_MSG_CHECKING([whether to enable GNOME VFS support]) | |
| if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then | |
| ENABLE_GNOMEVFS="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 ) | |
| if test "$ENABLE_GCONF" != "TRUE"; then | |
| PKG_CHECK_MODULES( GCONF, gconf-2.0 ) | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_GNOMEVFS) | |
| dnl =================================================================== | |
| dnl Check whether the gtk 2.0 libraries are available. | |
| dnl =================================================================== | |
| GTK_CFLAGS="" | |
| GTK_LIBS="" | |
| ENABLE_SYSTRAY_GTK="" | |
| ENABLE_DBUS="" | |
| if test "$test_gtk" = "yes"; then | |
| if test "$ENABLE_GTK" = "TRUE" ; then | |
| PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages])) | |
| PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages])) | |
| BUILD_TYPE="$BUILD_TYPE GTK" | |
| if test "x$enable_systray" = "xyes"; then | |
| PKG_CHECK_MODULES(GTK_2_10,gtk+-2.0 >= 2.10.0, | |
| [ENABLE_SYSTRAY_GTK="TRUE" | |
| BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"], | |
| [ENABLE_SYSTRAY_GTK=""]) | |
| fi | |
| AC_MSG_CHECKING([whether to enable DBUS support]) | |
| if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then | |
| ENABLE_DBUS="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 ) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_MSG_CHECKING([whether to enable GIO support]) | |
| if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then | |
| if test "$ENABLE_GNOMEVFS" = "TRUE" ; then | |
| AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.]) | |
| fi | |
| ENABLE_GIO="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| PKG_CHECK_MODULES( GIO, gio-2.0 ) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| fi | |
| fi | |
| AC_SUBST(ENABLE_GIO) | |
| AC_SUBST(ENABLE_DBUS) | |
| AC_SUBST(ENABLE_SYSTRAY_GTK) | |
| AC_SUBST(GTK_CFLAGS) | |
| AC_SUBST(GTK_LIBS) | |
| AC_SUBST(GTHREAD_CFLAGS) | |
| AC_SUBST(GTHREAD_LIBS) | |
| dnl =================================================================== | |
| dnl Check whether the GStreamer libraries are available. | |
| dnl =================================================================== | |
| 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-1.0 gstreamer-video-1.0,,AC_MSG_ERROR([requirements to build the GStreamer media backend not met. Do not use --enable-gstreamer or install the missing packages])) | |
| ENABLE_GSTREAMER="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| fi | |
| AC_SUBST(ENABLE_GSTREAMER) | |
| AC_SUBST(GSTREAMER_CFLAGS) | |
| AC_SUBST(GSTREAMER_LIBS) | |
| dnl =================================================================== | |
| dnl Check the ARM target | |
| dnl =================================================================== | |
| if echo "$build_cpu" | $GREP -q arm && test "$build_cpu" != "arm64" && test "$build_cpu" != "aarch64"; then | |
| # default value | |
| ARM_TARGET=ARMV4T | |
| AC_MSG_CHECKING([which ARM processor optimization to use]) | |
| if test "$with_arm_target" -lt "6"; then | |
| ARM_TARGET=ARMV4T | |
| elif test "$with_arm_target" = "6"; then | |
| ARM_TARGET=ARMV6 | |
| elif test "$with_arm_target" -gt "6"; then | |
| ARM_TARGET=ARMV7 | |
| fi | |
| AC_MSG_RESULT([$ARM_TARGET]) | |
| AC_SUBST(ARM_TARGET) | |
| fi | |
| dnl =================================================================== | |
| dnl Check whether the Cairo libraries are available. | |
| dnl =================================================================== | |
| ENABLE_CAIRO="" | |
| 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_RUN_IFELSE([AC_LANG_SOURCE([[ | |
| #include <X11/extensions/Xrender.h> | |
| int main(int argc, char **argv) { | |
| #ifdef PictStandardA8 | |
| return 0; | |
| #else | |
| 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]) | |
| fi | |
| fi | |
| AC_SUBST(ENABLE_CAIRO) | |
| AC_SUBST(BUILD_PIXMAN) | |
| AC_SUBST(SYSTEM_CAIRO) | |
| AC_SUBST(CAIRO_CFLAGS) | |
| AC_SUBST(CAIRO_LIBS) | |
| ENABLE_CAIRO_CANVAS="FALSE" | |
| if test "$enable_cairo_canvas" = "yes" -a "$ENABLE_CAIRO" = "TRUE" ; then | |
| ENABLE_CAIRO_CANVAS="TRUE" | |
| fi | |
| AC_SUBST(ENABLE_CAIRO_CANVAS) | |
| dnl =================================================================== | |
| dnl Check whether the OpenGL libraries are available | |
| 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)], []) | |
| ENABLE_OPENGL=TRUE | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_OPENGL) | |
| AC_MSG_CHECKING([whether to build the PDF Import extension]) | |
| if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then | |
| AC_MSG_RESULT([yes]) | |
| ENABLE_PDFIMPORT=YES | |
| dnl =================================================================== | |
| dnl Check for system poppler | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to use system pdf backend]) | |
| if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ | |
| test "$with_system_poppler" != "no"; then | |
| AC_MSG_RESULT([external]) | |
| SYSTEM_POPPLER=YES | |
| PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 ) | |
| else | |
| AC_MSG_RESULT([no]) | |
| SYSTEM_POPPLER=NO | |
| ENABLE_PDFIMPORT=NO | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| ENABLE_PDFIMPORT=NO | |
| fi | |
| AC_SUBST(ENABLE_PDFIMPORT) | |
| AC_SUBST(SYSTEM_POPPLER) | |
| AC_SUBST(POPPLER_CFLAGS) | |
| AC_SUBST(POPPLER_LIBS) | |
| 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 | |
| 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 | |
| AC_MSG_RESULT([no]) | |
| ENABLE_MEDIAWIKI=NO | |
| fi | |
| AC_SUBST(ENABLE_MEDIAWIKI) | |
| 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 | |
| AC_MSG_RESULT([yes]) | |
| ENABLE_REPORTBUILDER=YES | |
| SYSTEM_JFREEREPORT=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 (for Report Builder extension)]) | |
| AC_MSG_RESULT([external]) | |
| if test -z $SAC_JAR; then | |
| SAC_JAR=/usr/share/java/sac.jar | |
| fi | |
| AC_CHECK_FILE($SAC_JAR, [], | |
| [AC_MSG_ERROR(sac.jar not found.)], []) | |
| if test -z $LIBXML_JAR; then | |
| 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, | |
| [ LIBXML_JAR=/usr/share/java/libxml.jar ], | |
| [AC_MSG_ERROR(libxml.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LIBXML_JAR, [], | |
| [AC_MSG_ERROR(libxml.jar not found.)], []) | |
| fi | |
| if test -z $FLUTE_JAR; then | |
| 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, | |
| [ FLUTE_JAR=/usr/share/java/flute.jar ], | |
| [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($FLUTE_JAR, [], | |
| [AC_MSG_ERROR(flute-1.3.0.jar not found.)], []) | |
| fi | |
| if test -z $JFREEREPORT_JAR; then | |
| 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, | |
| [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ], | |
| [AC_MSG_ERROR(jfreereport.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($JFREEREPORT_JAR, [], | |
| [AC_MSG_ERROR(jfreereport.jar not found.)], []) | |
| fi | |
| if test -z $LIBLAYOUT_JAR; then | |
| 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, | |
| [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ], | |
| [AC_MSG_ERROR(liblayout.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LIBLAYOUT_JAR, [], | |
| [AC_MSG_ERROR(liblayout.jar not found.)], []) | |
| fi | |
| if test -z $LIBLOADER_JAR; then | |
| 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, | |
| [ LIBLOADER_JAR=/usr/share/java/libloader.jar ], | |
| [AC_MSG_ERROR(libloader.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LIBLOADER_JAR, [], | |
| [AC_MSG_ERROR(libloader.jar not found.)], []) | |
| fi | |
| if test -z $LIBFORMULA_JAR; then | |
| 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, | |
| [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ], | |
| [AC_MSG_ERROR(libformula.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LIBFORMULA_JAR, [], | |
| [AC_MSG_ERROR(libformula.jar not found.)], []) | |
| fi | |
| if test -z $LIBREPOSITORY_JAR; then | |
| 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, | |
| [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ], | |
| [AC_MSG_ERROR(librepository.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LIBREPOSITORY_JAR, [], | |
| [AC_MSG_ERROR(librepository.jar not found.)], []) | |
| fi | |
| if test -z $LIBFONTS_JAR; then | |
| 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, | |
| [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ], | |
| [AC_MSG_ERROR(libfonts.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LIBFONTS_JAR, [], | |
| [AC_MSG_ERROR(libfonts.jar not found.)], []) | |
| fi | |
| if test -z $LIBSERIALIZER_JAR; then | |
| 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, | |
| [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ], | |
| [AC_MSG_ERROR(libserializer.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LIBSERIALIZER_JAR, [], | |
| [AC_MSG_ERROR(libserializer.jar not found.)], []) | |
| fi | |
| if test -z $LIBBASE_JAR; then | |
| 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, | |
| [ LIBBASE_JAR=/usr/share/java/libbase.jar ], | |
| [AC_MSG_ERROR(libbase.jar replacement not found.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($LIBBASE_JAR, [], | |
| [AC_MSG_ERROR(libbase.jar not found.)], []) | |
| fi | |
| BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" | |
| else | |
| AC_MSG_RESULT([no]) | |
| ENABLE_REPORTBUILDER=NO | |
| fi | |
| AC_SUBST(ENABLE_REPORTBUILDER) | |
| AC_SUBST(SYSTEM_JFREEREPORT) | |
| AC_SUBST(SAC_JAR) | |
| AC_SUBST(LIBXML_JAR) | |
| AC_SUBST(FLUTE_JAR) | |
| AC_SUBST(JFREEREPORT_JAR) | |
| AC_SUBST(LIBBASE_JAR) | |
| AC_SUBST(LIBLAYOUT_JAR) | |
| AC_SUBST(LIBLOADER_JAR) | |
| AC_SUBST(LIBFORMULA_JAR) | |
| AC_SUBST(LIBREPOSITORY_JAR) | |
| AC_SUBST(LIBFONTS_JAR) | |
| AC_SUBST(LIBSERIALIZER_JAR) | |
| # this has to be here because the Report Builder uses commons-logging, | |
| # while the non-optional PostgreSQL connector uses commons-lang. | |
| AC_MSG_CHECKING([which Apache commons-* libs to use]) | |
| if test "$with_system_apache_commons" = "yes"; then | |
| SYSTEM_APACHE_COMMONS=YES | |
| AC_MSG_RESULT([external]) | |
| if test -z $COMMONS_LANG_JAR; then | |
| AC_CHECK_FILE(/usr/share/java/commons-lang3-3.3.jar, | |
| [ COMMONS_LANG_JAR=/usr/share/java/commons-lang3-3.3.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.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($COMMONS_LANG_JAR, [], | |
| [AC_MSG_ERROR(commons-lang.jar not found.)], []) | |
| fi | |
| AC_MSG_CHECKING([whether commons-lang is version 3.x]) | |
| export COMMONS_LANG_JAR | |
| if $PERL -e 'use Archive::Zip; | |
| my $file = "$ENV{'COMMONS_LANG_JAR'}"; | |
| my $zip = Archive::Zip->new( $file ); | |
| my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); | |
| if ( $mf =~ m/Specification-Version: 3.*/ ) { | |
| exit 0; | |
| } else { | |
| exit 1; | |
| }'; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([no, you need Apache Commons Lang 3.x]) | |
| fi | |
| if test "$ENABLE_REPORTBUILDER" = "YES"; then | |
| if test -z $COMMONS_LOGGING_JAR; then | |
| AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.3.jar, | |
| [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.3.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.)] | |
| ) | |
| ] | |
| ) | |
| else | |
| AC_CHECK_FILE($COMMONS_LOGGING_JAR, [], | |
| [AC_MSG_ERROR(commons-logging.jar not found.)], []) | |
| fi | |
| fi | |
| else | |
| AC_MSG_RESULT([internal]) | |
| SYSTEM_APACHE_COMMONS=NO | |
| BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS" | |
| fi | |
| AC_SUBST(SYSTEM_APACHE_COMMONS) | |
| AC_SUBST(COMMONS_LANG_JAR) | |
| AC_SUBST(COMMONS_LOGGING_JAR) | |
| dnl =================================================================== | |
| dnl Check whether the Qt and KDE libraries are available. | |
| dnl =================================================================== | |
| KDE_CFLAGS="" | |
| KDE_LIBS="" | |
| MOC="moc" | |
| 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" | |
| 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" | |
| fi | |
| if test -n "$QTDIR" ; then | |
| qt_incdirs="$QTDIR/include $qt_incdirs" | |
| if test "$build_cpu" != "x86_64" ; 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 | |
| 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 | |
| kde_incdirs="/usr/lib64/kde/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /opt/kde3/include /opt/kde/include $x_includes" | |
| kde_libdirs="/usr/lib64/kde/lib64 /usr/local/kde/lib64 /usr/kde/lib64 /usr/lib64/kde /usr/lib64/kde3 /usr/X11R6/lib64 /usr/local/lib64 /opt/kde3/lib64 /opt/kde/lib64 /usr/X11R6/kde/lib64 /usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib /usr/lib64 $x_libraries" | |
| fi | |
| if test -n "$KDEDIR" ; then | |
| kde_incdirs="$KDEDIR/include $kde_incdirs" | |
| if test "$build_cpu" != "x86_64" ; then | |
| kde_libdirs="$KDEDIR/lib $kde_libdirs" | |
| else | |
| kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs" | |
| fi | |
| fi | |
| 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" | |
| dnl Check for Qt headers | |
| AC_MSG_CHECKING([for Qt headers]) | |
| qt_incdir="no" | |
| for kde_check in $qt_incdirs ; do | |
| if test -r "$kde_check/$qt_test_include" ; then | |
| qt_incdir="$kde_check" | |
| break | |
| fi | |
| 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".]) | |
| fi | |
| dnl Check for Qt libraries | |
| AC_MSG_CHECKING([for Qt libraries]) | |
| qt_libdir="no" | |
| for qt_check in $qt_libdirs ; do | |
| if test -r "$qt_check/$qt_test_library" ; 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".]) | |
| fi | |
| dnl Check for Meta Object Compiler | |
| AC_PATH_PROG( MOC, moc, no, [$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".]) | |
| fi | |
| dnl Check for KDE headers | |
| AC_MSG_CHECKING([for KDE headers]) | |
| kde_incdir="no" | |
| for kde_check in $kde_incdirs ; do | |
| if test -r "$kde_check/$kde_test_include" ; then | |
| kde_incdir="$kde_check" | |
| break | |
| fi | |
| 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".]) | |
| fi | |
| dnl Check for KDE libraries | |
| AC_MSG_CHECKING([for KDE libraries]) | |
| kde_libdir="no" | |
| for kde_check in $kde_libdirs ; do | |
| if test -r "$kde_check/$kde_test_library" ; 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".]) | |
| fi | |
| dnl Set the variables | |
| KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" | |
| KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt" | |
| fi | |
| AC_SUBST(KDE_CFLAGS) | |
| AC_SUBST(KDE_LIBS) | |
| AC_SUBST(MOC) | |
| dnl =================================================================== | |
| dnl KDE4 Integration | |
| dnl =================================================================== | |
| KDE4_CFLAGS="" | |
| KDE4_LIBS="" | |
| MOC4="moc" | |
| if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then | |
| qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes" | |
| qt_libdirs="$QT4LIB /usr/lib $x_libraries" | |
| kde_incdirs="/usr/include /usr/include/kde4 $x_includes" | |
| kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries" | |
| if test "$build_cpu" = "x86_64" ; then | |
| qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64" | |
| kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel" | |
| fi | |
| if test -n "$KDE4DIR" ; then | |
| kde_incdirs="$KDE4DIR/include $kde_incdirs" | |
| if test "$build_cpu" != "x86_64" ; then | |
| kde_libdirs="$KDE4DIR/lib $kde_libdirs" | |
| else | |
| kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs" | |
| fi | |
| fi | |
| qt_test_include="Qt/qobject.h" | |
| qt_test_library="libQtCore.so" | |
| kde_test_include="ksharedptr.h" | |
| kde_test_library="libkdeui.so" | |
| AC_MSG_CHECKING([for Qt4 headers]) | |
| qt_header_dir="no" | |
| for inc_dir in $qt_incdirs ; do | |
| if test -r "$inc_dir/$qt_test_include" ; then | |
| qt_header_dir="$inc_dir" | |
| 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" | |
| 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( MOCQT4, moc-qt4, no, [$QT4DIR/bin:$PATH] ) | |
| MOC4="$MOCQT4" | |
| if test "$MOC4" = "no" ; then | |
| AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] ) | |
| 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 | |
| AC_MSG_CHECKING([for KDE4 headers]) | |
| kde_incdir="no" | |
| for kde_check in $kde_incdirs ; do | |
| if test -r "$kde_check/$kde_test_include" ; then | |
| kde_incdir="$kde_check" | |
| break | |
| fi | |
| done | |
| AC_MSG_RESULT([$kde_incdir]) | |
| if test "x$kde_incdir" = "xno" ; then | |
| AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) | |
| fi | |
| dnl Check for KDE4 libraries | |
| AC_MSG_CHECKING([for KDE4 libraries]) | |
| kde_libdir="no" | |
| for kde_check in $kde_libdirs ; do | |
| if test -r "$kde_check/$kde_test_library" ; then | |
| kde_libdir="$kde_check" | |
| 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".]) | |
| fi | |
| 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" | |
| fi | |
| AC_SUBST(KDE4_CFLAGS) | |
| AC_SUBST(KDE4_LIBS) | |
| AC_SUBST(MOC4) | |
| dnl =================================================================== | |
| dnl Test for the enabling the lockdown pieces | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to enable the lockdown pieces]) | |
| ENABLE_LOCKDOWN="" | |
| if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then | |
| ENABLE_LOCKDOWN=YES | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_LOCKDOWN) | |
| dnl =================================================================== | |
| dnl Test whether to include Evolution 2 support | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to enable evolution 2 support]) | |
| if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then | |
| AC_MSG_RESULT([yes]) | |
| PKG_CHECK_MODULES(GOBJECT, gobject-2.0) | |
| ENABLE_EVOAB2="TRUE" | |
| else | |
| ENABLE_EVOAB2="" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_EVOAB2) | |
| AC_SUBST(GOBJECT_CFLAGS) | |
| AC_SUBST(GOBJECT_LIBS) | |
| dnl =================================================================== | |
| dnl Test whether to include MathMLDTD | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to include MathMLDTD]) | |
| if test -n "$enable_mathmldtd"; then | |
| if test "$enable_mathmldtd" = "no"; then | |
| AC_MSG_RESULT([no]) | |
| SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" | |
| else | |
| AC_MSG_RESULT([yes]) | |
| BUILD_TYPE="$BUILD_TYPE MATHMLDTD" | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" | |
| fi | |
| dnl =================================================================== | |
| dnl Test whether to include category-B fonts | |
| dnl =================================================================== | |
| WITH_CATB_FONTS= | |
| AC_MSG_CHECKING([whether to include category B fonts]) | |
| if test "x$enable_category_b_fonts" = "xyes" && test "x$with_fonts" != "xno"; then | |
| AC_MSG_RESULT([yes]) | |
| BUILD_TYPE="$BUILD_TYPE CATB_FONTS" | |
| WITH_CATB_FONTS=YES | |
| SCPDEFS="$SCPDEFS -DWITH_CATB_FONTS" | |
| else | |
| AC_MSG_RESULT([no]) | |
| WITH_CATB_FONTS=NO | |
| fi | |
| dnl =================================================================== | |
| dnl Test whether to include category-A fonts | |
| dnl =================================================================== | |
| WITH_CATA_FONTS= | |
| AC_MSG_CHECKING([whether to include category A fonts]) | |
| if test "x$with_fonts" != "xno" ; then | |
| AC_MSG_RESULT([yes]) | |
| WITH_CATA_FONTS=YES | |
| SCPDEFS="$SCPDEFS -DWITH_CATA_FONTS" | |
| else | |
| AC_MSG_RESULT([no]) | |
| WITH_CATA_FONTS=NO | |
| WITH_CATB_FONTS=NO | |
| fi | |
| WITH_FONTS=NO | |
| AC_MSG_CHECKING([whether any fonts are included]) | |
| if test "x$WITH_CATA_FONTS" = "xYES" -o "x$WITH_CATB_FONTS" = "xYES"; then | |
| BUILD_TYPE="$BUILD_TYPE MORE_FONTS" | |
| WITH_FONTS=YES | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(WITH_CATA_FONTS) | |
| AC_SUBST(WITH_CATB_FONTS) | |
| AC_SUBST(WITH_FONTS) | |
| dnl =================================================================== | |
| dnl Test whether to include ppds | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to include PPDs]) | |
| if test "$with_ppds" != "no"; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_RESULT([no]) | |
| WITHOUT_PPDS=YES | |
| SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" | |
| fi | |
| AC_SUBST(WITHOUT_PPDS) | |
| dnl =================================================================== | |
| dnl Test whether to include afms | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to include AFMs]) | |
| if test "$with_afms" != "no"; then | |
| AC_MSG_RESULT([yes]) | |
| BUILD_TYPE="$BUILD_TYPE AFMS" | |
| else | |
| AC_MSG_RESULT([no]) | |
| WITHOUT_AFMS=YES | |
| SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" | |
| fi | |
| AC_SUBST(WITHOUT_AFMS) | |
| AC_SUBST(SCPDEFS) | |
| AC_MSG_CHECKING([whether and how to use Xinerama]) | |
| if test "$_os" = "Darwin"; then | |
| USE_XINERAMA=YES | |
| XINERAMA_LINK=dynamic | |
| AC_MSG_RESULT([yes]) | |
| elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then | |
| if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then | |
| # we have both versions, let the user decide but use the dynamic one | |
| # per default | |
| USE_XINERAMA=YES | |
| if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then | |
| XINERAMA_LINK=dynamic | |
| else | |
| XINERAMA_LINK=static | |
| fi | |
| elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then | |
| # we have only the dynamic version | |
| USE_XINERAMA=YES | |
| 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 | |
| USE_XINERAMA=YES | |
| XINERAMA_LINK=static | |
| else | |
| USE_XINERAMA=NO | |
| XINERAMA_LINK=none | |
| fi | |
| else | |
| # no Xinerama | |
| USE_XINERAMA=NO | |
| XINERAMA_LINK=none | |
| fi | |
| if test "$USE_XINERAMA" = "YES"; then | |
| AC_MSG_RESULT([yes, with $XINERAMA_LINK linking]) | |
| AC_CHECK_HEADER(X11/extensions/Xinerama.h, [], | |
| [AC_MSG_ERROR(Xinerama header not found.)], []) | |
| XINERAMA_EXTRA_LIBS="-L$XLIB -lXext" | |
| if test "$_os" = "FreeBSD"; then | |
| XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt" | |
| fi | |
| if test "$_os" = "Linux"; then | |
| XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" | |
| fi | |
| AC_CHECK_LIB(Xinerama, XineramaIsActive, [], | |
| [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS]) | |
| else | |
| AC_MSG_RESULT([no, libXinerama not found or wrong architecture.]) | |
| fi | |
| else | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(USE_XINERAMA) | |
| AC_SUBST(XINERAMA_LINK) | |
| dnl =================================================================== | |
| dnl always rely on the system version of gdk-pixbuf | |
| dnl =================================================================== | |
| SYSTEM_GDKPIXBUF=YES | |
| AC_SUBST(SYSTEM_GDKPIXBUF) | |
| dnl =================================================================== | |
| dnl always rely on the system version of glib | |
| dnl =================================================================== | |
| SYSTEM_GLIB=YES | |
| AC_SUBST(SYSTEM_GLIB) | |
| dnl =================================================================== | |
| dnl always rely on the system version of gettext | |
| dnl =================================================================== | |
| SYSTEM_GETTEXT=YES | |
| AC_SUBST(SYSTEM_GETTEXT) | |
| if test "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then | |
| LIBINTL_PREFIX= | |
| for dir in $CPPFLAGS; do | |
| if dir=`expr -- $dir : '-I\(.*\)'`; then | |
| if test -f "$dir/libintl.h" ; then | |
| LIBINTL_PREFIX=`dirname $dir` | |
| fi | |
| fi | |
| done | |
| if test -z "$LIBINTL_PREFIX"; then | |
| for dir in /usr/local /opt/homebrew /opt/local /usr; do | |
| test -f "$dir/include/libintl.h" && LIBINTL_PREFIX=$dir && break | |
| done | |
| fi | |
| AC_SUBST(LIBINTL_PREFIX) | |
| fi | |
| dnl =================================================================== | |
| dnl always rely on the system version of pango | |
| dnl =================================================================== | |
| SYSTEM_PANGO=YES | |
| AC_SUBST(SYSTEM_PANGO) | |
| 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_SUBST(SYSTEM_LIBPNG) | |
| dnl =================================================================== | |
| dnl Test whether to build libjpeg or rely on the system version | |
| dnl =================================================================== | |
| 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]) | |
| if test "$SYSTEM_JPEG" = "YES"; then | |
| SYSTEM_LIBJPEG=YES | |
| else | |
| case "$_os" in | |
| WINNT*) # Windows | |
| SYSTEM_LIBJPEG=NO | |
| ;; | |
| Darwin*) | |
| SYSTEM_LIBJPEG=NO | |
| ;; | |
| *) | |
| SYSTEM_LIBJPEG=YES | |
| ;; | |
| esac | |
| fi | |
| if test "$SYSTEM_LIBJPEG" = "YES"; then | |
| AC_MSG_RESULT([no]) | |
| else | |
| AC_MSG_RESULT([yes]) | |
| fi | |
| AC_SUBST(SYSTEM_LIBJPEG) | |
| dnl =================================================================== | |
| dnl Test whether rat scan was requested and whether apache-rat is available | |
| dnl =================================================================== | |
| RAT_JAR= | |
| AC_MSG_CHECKING([whether to trigger rat scan]) | |
| if test -z "$with_rat_scan" -o "$with_rat_scan" = "no"; then | |
| AC_MSG_RESULT([no]) | |
| else | |
| if test "$WITH_JAVA" = "no"; then | |
| AC_MSG_ERROR([no, java disabled, enable with --with-java]) | |
| elif test "$enable_saxon" = "no"; then | |
| AC_MSG_ERROR([no, saxon disabled, enable with --enable-category-b]) | |
| elif test "$with_rat_scan" = "yes"; then | |
| AC_MSG_RESULT([yes, use pre-built library]) | |
| RAT_JAR_HOME="BUILD" | |
| BUILD_TYPE="$BUILD_TYPE RAT" | |
| else | |
| AC_MSG_RESULT([yes, use pre-installed library]) | |
| AC_MSG_CHECKING([whether apache-rat is available]) | |
| if test -d "$with_rat_scan"; then | |
| RAT_JAR_HOME=$with_rat_scan | |
| else | |
| AC_MSG_ERROR([$with_rat_scan is not a directory]) | |
| fi | |
| fi | |
| fi | |
| AC_SUBST(RAT_JAR_HOME) | |
| dnl =================================================================== | |
| dnl Test for the presence of Ant and that it works | |
| dnl =================================================================== | |
| if test "$SOLAR_JAVA" != ""; then | |
| ANT_HOME=; export ANT_HOME | |
| WITH_ANT_HOME=; export WITH_ANT_HOME | |
| if test -z "$with_ant_home"; then | |
| if test "$_os" = "OS2"; then | |
| AC_PATH_PROGS(ANT, ant.cmd) | |
| else | |
| AC_PATH_PROGS(ANT, [apache-ant ant ant.sh ant.bat ant.cmd]) | |
| fi | |
| else | |
| if test "$_os" = "WINNT"; then | |
| with_ant_home=`cygpath -u "$with_ant_home"` | |
| fi | |
| if test "$_os" = "OS2"; then | |
| AC_PATH_PROGS(ANT, ant.cmd,,$with_ant_home/bin:$PATH) | |
| else | |
| AC_PATH_PROGS(ANT, [apache-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH) | |
| fi | |
| WITH_ANT_HOME=$with_ant_home | |
| ANT_HOME=$with_ant_home | |
| fi | |
| if test -z "$ANT"; then | |
| AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home]) | |
| else | |
| # resolve relative or absolute symlink | |
| while test -h "$ANT"; do | |
| a_cwd=`pwd` | |
| a_basename=`basename "$ANT"` | |
| 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) { | |
| return a + b; | |
| } | |
| } | |
| EOF | |
| cat > conftest.xml << EOF | |
| <project name="conftest" default="conftest"> | |
| <target name="conftest"> | |
| <javac srcdir="." includes="conftest.java"> | |
| </javac> | |
| </target> | |
| </project> | |
| EOF | |
| oldJAVA_HOME=$JAVA_HOME | |
| if test "$JAVACISGCJ" = "yes"; then | |
| JAVA_HOME=; export JAVA_HOME | |
| ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" | |
| else | |
| ant_cmd="$ANT -buildfile conftest.xml 1>&2" | |
| fi | |
| AC_TRY_EVAL(ant_cmd) | |
| if test $? = 0 && test -f ./conftest.class ; then | |
| 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 | |
| ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` | |
| fi | |
| else | |
| ANT_HOME="$WITH_ANT_HOME" | |
| fi | |
| else | |
| echo "configure: Ant test failed" >&5 | |
| cat conftest.java >&5 | |
| cat conftest.xml >&5 | |
| AC_MSG_WARN([Ant does not work - Some Java projects will not build!]) | |
| ANT_HOME="" | |
| echo "Ant does not work - Some Java projects will not build!" >>warn | |
| fi | |
| JAVA_HOME=$oldJAVA_HOME | |
| rm -f conftest* core core.* *.core | |
| fi | |
| if test -z "$ANT_HOME"; then | |
| ANT_HOME="NO_ANT_HOME" | |
| fi | |
| AC_SUBST(ANT_HOME) | |
| 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" | |
| else | |
| if test -f $ANT_HOME/ant.jar; then | |
| ANT_LIB="$ANT_HOME" | |
| else | |
| if test -f /usr/share/java/ant.jar; then | |
| ANT_LIB=/usr/share/java | |
| else | |
| if test -f /usr/share/ant-core/lib/ant.jar; then | |
| ANT_LIB=/usr/share/ant-core/lib | |
| else | |
| if test -f $ANT_HOME/lib/ant/ant.jar; then | |
| ANT_LIB="$ANT_HOME/lib/ant" | |
| else | |
| if test -f /usr/share/lib/ant/ant.jar; then | |
| ANT_LIB=/usr/share/lib/ant | |
| else | |
| AC_MSG_ERROR([Ant libraries not found!]) | |
| fi | |
| fi | |
| fi | |
| fi | |
| fi | |
| fi | |
| AC_MSG_RESULT([Ant lib directory found.]) | |
| fi | |
| AC_SUBST(ANT_LIB) | |
| fi | |
| ant_minver=1.9.1 | |
| # update for more extensions... | |
| if test "$ENABLE_MEDIAWIKI" = "YES"; then | |
| ant_minver=1.9.1 | |
| fi | |
| ant_minminor1=`echo $ant_minver | cut -d"." -f2` | |
| 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` | |
| echo "configure: ant_version $ant_version " >&5 | |
| echo "configure: ant_version_major $ant_version_major " >&5 | |
| echo "configure: ant_version_minor $ant_version_minor " >&5 | |
| if test "$ant_version_major" -ge "2"; then | |
| AC_MSG_RESULT([yes, $ant_version]) | |
| 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]) | |
| fi | |
| if test "$ENABLE_MEDIAWIKI" = "YES"; then | |
| AC_MSG_CHECKING([whether ant supports mapper type="regexp"]) | |
| rm -rf confdir | |
| mkdir confdir | |
| cat > conftest.java << EOF | |
| public class conftest { | |
| int testmethod(int a, int b) { | |
| return a + b; | |
| } | |
| } | |
| EOF | |
| cat > conftest.xml << EOF | |
| <project name="conftest" default="conftest"> | |
| <target name="conftest" depends="copytest"> | |
| <javac srcdir="." includes="conftest.java"> | |
| </javac> | |
| </target> | |
| <target name="copytest"> | |
| <copy todir="confdir"> | |
| <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/> | |
| <filterset/> | |
| <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/> | |
| </copy> | |
| </target> | |
| </project> | |
| EOF | |
| if test "$JAVACISGCJ" = "yes"; then | |
| JAVA_HOME=; export JAVA_HOME | |
| ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" | |
| else | |
| ant_cmd="$ANT -buildfile conftest.xml 1>&2" | |
| fi | |
| AC_TRY_EVAL(ant_cmd) | |
| if test $? = 0 && test -f ./conftest.class ; then | |
| AC_MSG_RESULT([yes]) | |
| rm -rf confdir | |
| else | |
| echo "configure: Ant test failed" >&5 | |
| cat conftest.java >&5 | |
| cat conftest.xml >&5 | |
| rm -rf confdir | |
| AC_MSG_ERROR([no. Did you install ant-apache-regexp?]) | |
| fi | |
| fi | |
| rm -f conftest* core core.* *.core | |
| OOO_JUNIT_JAR= | |
| JUNIT_NEEDS_HAMCREST= | |
| if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then | |
| AC_MSG_CHECKING([for JUnit]) | |
| if test "$with_junit" = "yes"; then | |
| if test -e /usr/share/java/junit4.jar; then | |
| OOO_JUNIT_JAR=/usr/share/java/junit4.jar | |
| else | |
| if test -e /usr/local/share/java/classes/junit4.jar; then | |
| OOO_JUNIT_JAR=/usr/local/share/java/classes/junit4.jar | |
| else | |
| if test -e /usr/share/lib/java/junit.jar; then | |
| OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar | |
| else | |
| if test -e /usr/share/local/lib/java/junit.jar; then | |
| OOO_JUNIT_JAR=/usr/share/local/lib/java/junit.jar | |
| else | |
| if test -e /usr/share/java/junit.jar; then | |
| OOO_JUNIT_JAR=/usr/share/java/junit.jar | |
| else | |
| if test -e /usr/local/share/java/classes/junit.jar; then | |
| OOO_JUNIT_JAR=/usr/local/share/java/classes/junit.jar | |
| fi | |
| fi | |
| fi | |
| fi | |
| fi | |
| fi | |
| else | |
| OOO_JUNIT_JAR=$with_junit | |
| fi | |
| if test -e "$OOO_JUNIT_JAR"; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default | |
| locations (/usr/share/java or /usr/local/share/java/classes), specify its pathname via | |
| --with-junit=..., or disable it via --without-junit.]) | |
| fi | |
| if test "$_os" = "WINNT"; then | |
| OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"` | |
| fi | |
| AC_MSG_CHECKING([whether JUnit is version 4.x]) | |
| export OOO_JUNIT_JAR | |
| if $PERL -e 'use Archive::Zip; | |
| my $file = "$ENV{'OOO_JUNIT_JAR'}"; | |
| my $zip = Archive::Zip->new( $file ); | |
| my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); | |
| if ( $mf =~ m/Implementation-Version: 4.12*/ ) { | |
| exit 0; | |
| } elsif ( $mf =~ m/Implementation-Version: 4.11*/ ) { | |
| exit 0; | |
| } elsif ( $mf =~ m/Bundle-Version: 4.12*/ ) { | |
| exit 0; | |
| } elsif ( $mf =~ m/Bundle-Version: 4.11*/ ) { | |
| exit 0; | |
| } else { | |
| exit 1; | |
| }'; then | |
| AC_MSG_RESULT([yes, but Hamcrest Core is mandatory with this JUnit version (>= 4.11)]) | |
| JUNIT_NEEDS_HAMCREST=yes | |
| elif $PERL -e 'use Archive::Zip; | |
| my $file = "$ENV{'OOO_JUNIT_JAR'}"; | |
| my $zip = Archive::Zip->new( $file ); | |
| my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); | |
| if ( $mf =~ m/Implementation-Version: 4.*/ ) { | |
| exit 0; | |
| } elsif ( $mf =~ m/Bundle-Version: 4.*/ ) { | |
| } else { | |
| exit 1; | |
| }'; then | |
| AC_MSG_RESULT([yes]) | |
| else | |
| AC_MSG_ERROR([no, your JUnit version is too old, you need JUnit 4.x]) | |
| fi | |
| fi | |
| AC_SUBST(OOO_JUNIT_JAR) | |
| HAMCREST_CORE_JAR= | |
| if test "$SOLAR_JAVA" != "" && test "$with_hamcrest_core" != "no"; then | |
| AC_MSG_CHECKING([for hamcrest-core]) | |
| if test "$with_hamcrest_core" = "yes"; then | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/java/hamcrest-core-1.3.jar; then | |
| HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core-1.3.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/java/classes/hamcrest-core-1.3.jar; then | |
| HAMCREST_CORE_JAR=/usr/local/share/java/classes/hamcrest-core-1.3.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/lib/java/hamcrest-core.jar; then | |
| HAMCREST_CORE_JAR=/usr/share/lib/java/hamcrest-core.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/lib/java/hamcrest-core.jar; then | |
| HAMCREST_CORE_JAR=/usr/local/share/lib/java/hamcrest-core.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/java/hamcrest-core.jar; then | |
| HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/java/classes/hamcrest-core.jar; then | |
| HAMCREST_CORE_JAR=/usr/local/share/java/classes/hamcrest-core.jar | |
| fi | |
| # Sometimes the "-core-" part is missing... | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/java/hamcrest1.3.jar; then | |
| HAMCREST_CORE_JAR=/usr/share/java/hamcrest1.3.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/java/classes/hamcrest1.3.jar; then | |
| HAMCREST_CORE_JAR=/usr/local/share/java/classes/hamcrest1.3.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/lib/java/hamcrest.jar; then | |
| HAMCREST_CORE_JAR=/usr/share/lib/java/hamcrest.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/lib/java/hamcrest.jar; then | |
| HAMCREST_CORE_JAR=/usr/local/share/lib/java/hamcrest.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/java/hamcrest.jar; then | |
| HAMCREST_CORE_JAR=/usr/share/java/hamcrest.jar | |
| fi | |
| if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/java/classes/hamcrest.jar; then | |
| HAMCREST_CORE_JAR=/usr/local/share/java/classes/hamcrest.jar | |
| fi | |
| else | |
| HAMCREST_CORE_JAR=$with_hamcrest_core | |
| fi | |
| if test -e "$HAMCREST_CORE_JAR"; then | |
| AC_MSG_RESULT([yes]) | |
| if test "$_os" = "WINNT"; then | |
| HAMCREST_CORE_JAR=`cygpath -m "$HAMCREST_CORE_JAR"` | |
| fi | |
| else | |
| if test "$JUNIT_NEEDS_HAMCREST" = "yes"; then | |
| AC_MSG_ERROR([cannot find hamcrest-core jar; please install one in the | |
| default locations (/usr/share/java or /usr/local/share/java/classes), specify its | |
| pathname via --with-hamcrest-core=..., or disable | |
| it via --without-hamcrest-core or --without-junit]) | |
| else | |
| AC_MSG_RESULT([no, skipping]) | |
| fi | |
| fi | |
| else | |
| if test "$JUNIT_NEEDS_HAMCREST" = "yes"; then | |
| AC_MSG_ERROR([JUnit needs Hamcrest but Hamcrest disabled.]) | |
| fi | |
| fi | |
| AC_SUBST(HAMCREST_CORE_JAR) | |
| AC_MSG_CHECKING([which languages to be built]) | |
| WITH_LANG="$with_lang" | |
| if test -z "$WITH_LANG"; then | |
| AC_MSG_RESULT([en-US]) | |
| else | |
| AC_MSG_RESULT([$WITH_LANG]) | |
| ADDITIONAL_REPOSITORIES="$ADDITIONAL_REPOSITORIES ../extras" | |
| BUILD_TYPE="$BUILD_TYPE L10N" | |
| fi | |
| AC_SUBST(WITH_LANG) | |
| 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_RESULT([none]) | |
| else | |
| for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do | |
| case "$bitmap" in | |
| *.png) ;; | |
| *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .png files!]) ;; | |
| esac | |
| if test -n "$bitmap" ; then | |
| INTRO_BITMAPS="$INTRO_BITMAPS $bitmap" | |
| fi | |
| done | |
| AC_MSG_RESULT([$INTRO_BITMAPS]) | |
| fi | |
| AC_SUBST(INTRO_BITMAPS) | |
| 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_RESULT([none]) | |
| else | |
| for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do | |
| case "$bitmap" in | |
| *.png) ;; | |
| *) bitmap= ; AC_MSG_WARN([About bitmaps should be .png files!]) ;; | |
| esac | |
| if test -n "$bitmap" ; then | |
| ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap" | |
| fi | |
| done | |
| AC_MSG_RESULT([$ABOUT_BITMAPS]) | |
| fi | |
| AC_SUBST(ABOUT_BITMAPS) | |
| OOO_VENDOR= | |
| AC_MSG_CHECKING([for vendor]) | |
| if test -z "$with_vendor" -o "$with_vendor" = "no" ; then | |
| AC_MSG_RESULT([not set]) | |
| else | |
| OOO_VENDOR="$with_vendor" | |
| AC_MSG_RESULT([$OOO_VENDOR]) | |
| fi | |
| AC_SUBST(OOO_VENDOR) | |
| UNIXWRAPPERNAME= | |
| AC_MSG_CHECKING([for UNIX wrapper name]) | |
| if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then | |
| AC_MSG_RESULT([not set]) | |
| else | |
| UNIXWRAPPERNAME="$with_unix_wrapper" | |
| AC_MSG_RESULT([$UNIXWRAPPERNAME]) | |
| fi | |
| AC_SUBST(UNIXWRAPPERNAME) | |
| AC_MSG_CHECKING([whether to statically link to Gtk]) | |
| 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" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_STATIC_GTK) | |
| AC_MSG_CHECKING([whether to use layout dialogs]) | |
| if test -n "$enable_layout" && test "$enable_layout" != "no"; then | |
| ENABLE_LAYOUT="TRUE" | |
| AC_MSG_RESULT([yes]) | |
| else | |
| ENABLE_LAYOUT="FALSE" | |
| AC_MSG_RESULT([no]) | |
| fi | |
| AC_SUBST(ENABLE_LAYOUT) | |
| # =================================================================== | |
| # De- or increase default verbosity of build process | |
| # =================================================================== | |
| AC_MSG_CHECKING([build verbosity]) | |
| if test -n "$enable_verbose"; then | |
| if test "$enable_verbose" = "yes"; then | |
| VERBOSE="TRUE" | |
| AC_MSG_RESULT([high]) | |
| fi | |
| if test "$enable_verbose" = "no"; then | |
| VERBOSE="FALSE" | |
| AC_MSG_RESULT([low]) | |
| fi | |
| else | |
| AC_MSG_RESULT([not set]) | |
| fi | |
| AC_SUBST(VERBOSE) | |
| dnl =================================================================== | |
| dnl Hook up AOOs nodep environmental variable to automake's equivalent | |
| dnl --enable-dependency-tracking configure option | |
| dnl =================================================================== | |
| AC_MSG_CHECKING([whether to enable dependency tracking]) | |
| if test "$enable_dependency_tracking" = "no"; then | |
| nodep=TRUE | |
| AC_MSG_RESULT([no]) | |
| else | |
| AC_MSG_RESULT([yes]) | |
| fi | |
| AC_SUBST(nodep) | |
| dnl =================================================================== | |
| dnl Setting up the environment. | |
| dnl =================================================================== | |
| echo "********************************************************************" | |
| echo "* *" | |
| echo "* Setting up the build environment variables. *" | |
| echo "* *" | |
| echo "********************************************************************" | |
| if test -z "$COMPATH"; then | |
| AC_MSG_ERROR([No compiler found.]) | |
| fi | |
| AC_SUBST(COMPATH) | |
| AC_SUBST(CC_PATH) | |
| AC_MSG_CHECKING([solver path]) | |
| if test -z "$with_local_solver"; then | |
| LOCAL_SOLVER="DEFAULT" | |
| AC_MSG_RESULT([default]) | |
| else | |
| LOCAL_SOLVER=$with_local_solver | |
| AC_MSG_RESULT([$with_local_solver]) | |
| fi | |
| AC_SUBST(LOCAL_SOLVER) | |
| AC_SUBST(BUILD_TYPE) | |
| AC_SUBST(ADDITIONAL_REPOSITORIES) | |
| # make sure config.guess is +x; we execute config.guess, so it has to be so; | |
| chmod +x ./config.guess | |
| # Create files from their *.in templates. | |
| AC_CONFIG_FILES([set_soenv Makefile]) | |
| AC_MSG_NOTICE([writing config.status]) | |
| AC_OUTPUT | |
| 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 | |