1184e05d2SAndrew Ristdnl * ************************************************************* 2184e05d2SAndrew Ristdnl * 3184e05d2SAndrew Ristdnl * Licensed to the Apache Software Foundation (ASF) under one 4184e05d2SAndrew Ristdnl * or more contributor license agreements. See the NOTICE file 5184e05d2SAndrew Ristdnl * distributed with this work for additional information 6184e05d2SAndrew Ristdnl * regarding copyright ownership. The ASF licenses this file 7184e05d2SAndrew Ristdnl * to you under the Apache License, Version 2.0 (the 8184e05d2SAndrew Ristdnl * "License"); you may not use this file except in compliance 9184e05d2SAndrew Ristdnl * with the License. You may obtain a copy of the License at 10184e05d2SAndrew Ristdnl * 11184e05d2SAndrew Ristdnl * http://www.apache.org/licenses/LICENSE-2.0 12184e05d2SAndrew Ristdnl * 13184e05d2SAndrew Ristdnl * Unless required by applicable law or agreed to in writing, 14184e05d2SAndrew Ristdnl * software distributed under the License is distributed on an 15184e05d2SAndrew Ristdnl * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16184e05d2SAndrew Ristdnl * KIND, either express or implied. See the License for the 17184e05d2SAndrew Ristdnl * specific language governing permissions and limitations 18184e05d2SAndrew Ristdnl * under the License. 19184e05d2SAndrew Ristdnl * 20184e05d2SAndrew Ristdnl * ************************************************************* 210495d53eSpfgAC_REVISION( $Revision$ ) 22cdf0e10cSrcweirAC_PREREQ(2.50) 23cdf0e10cSrcweirAC_INIT() 24cdf0e10cSrcweirecho "$@" >config.parms 25fb6b49d1SJürgen SchmidtAC_ARG_WITH(dmake-path, 26fb6b49d1SJürgen Schmidt[ --with-dmake-path=<PATH TO EXECUTABLE> Specify the location of dmake ], 27fb6b49d1SJürgen Schmidt[ DMAKE_PATH="$withval" 28fb6b49d1SJürgen Schmidt]) 29fb6b49d1SJürgen SchmidtAC_ARG_WITH(dmake-url, 30fb6b49d1SJürgen Schmidt[ --with-dmake-url=<URL> Specify the location of downloadable dmake source code. For example: 316fdc6058Struckman http://sourceforge.net/projects/oooextras.mirror/files/dmake-4.12.tar.bz2 32fb6b49d1SJürgen Schmidt Note that dmake is under GPL license.], 33fb6b49d1SJürgen Schmidt[ DMAKE_URL="$withval" 34fb6b49d1SJürgen Schmidt]) 3572bd2d34SAriel Constenla-HaileAC_ARG_WITH(packager-list, 3672bd2d34SAriel Constenla-Haile[ --with-packager-list=<PATH TO PACK LIST> Specify a file to drive the packaging process. 3772bd2d34SAriel Constenla-Haile The file must follow the format explained in 3872bd2d34SAriel Constenla-Haile instsetoo_native/util/pack.lst 3972bd2d34SAriel Constenla-Haile],,) 40cdf0e10cSrcweirAC_ARG_WITH(gnu-patch, 41cdf0e10cSrcweir[ --with-gnu-patch Specify location of GNU patch on Solaris or FreeBSD 42cdf0e10cSrcweir],,) 43cdf0e10cSrcweirAC_ARG_WITH(gnu-cp, 4462840caaSPedro Giffuni[ --with-gnu-cp Specify location of GNU cp on Solaris 45cdf0e10cSrcweir],,) 4610e8ff58SPedro GiffuniAC_ARG_WITH(gperf, 4710e8ff58SPedro Giffuni[ --with-gperf Specify location of gperf on Solaris or FreeBSD 4810e8ff58SPedro Giffuni],,) 49cdf0e10cSrcweirAC_ARG_ENABLE(graphite, 50cdf0e10cSrcweir[ --enable-graphite Enables the compilation of Graphite smart font rendering 51cdf0e10cSrcweir],,) 52cdf0e10cSrcweirAC_ARG_WITH(system-graphite, 53cdf0e10cSrcweir[ --with-system-graphite use graphite library already installed on system 54cdf0e10cSrcweir],,) 55e9b3fa8aSMaho NAKATAAC_ARG_WITH(system-apache-commons, 56e9b3fa8aSMaho NAKATA[ --with-system-apache-commons use apache-commons jar files already installed on system 57e9b3fa8aSMaho NAKATA],,) 5835779863SAriel Constenla-HaileAC_ARG_ENABLE(online-update, 5935779863SAriel Constenla-Haile[ --disable-online-update Disables the Online Update feature. 6035779863SAriel Constenla-Haile],,enable_online_update=yes) 6143feee13SJuergen SchmidtAC_ARG_ENABLE(unit-tests, 6243feee13SJuergen Schmidt[ --disable-unit-tests Disables default unit tests (eg. unit tests using Google test, ...). 6343feee13SJuergen Schmidt],,enable_unit_tests=yes) 64cdf0e10cSrcweirAC_ARG_ENABLE(ldap, 65ffd43a0aSHerbert Dürr[ --disable-ldap Disables the use of LDAP backend via OpenLDAP 66cdf0e10cSrcweir],,) 67cdf0e10cSrcweirAC_ARG_ENABLE(fetch-external, 68cdf0e10cSrcweir[ --disable-fetch-external Disables fetching external tarballs from web sources. 69cdf0e10cSrcweir],,) 70cdf0e10cSrcweirAC_ARG_WITH(external-tar, 71cdf0e10cSrcweir[ --with-external-tar=<TARFILE PATH> Specify path to tarfiles manually ], 72cdf0e10cSrcweir[ TARFILE_LOCATION="$withval" 73cdf0e10cSrcweir]) 74cdf0e10cSrcweirAC_ARG_WITH(openldap, 75ffd43a0aSHerbert Dürr[ --with-openldap Enables the use of the OpenLDAP 76cdf0e10cSrcweir],,) 77cdf0e10cSrcweirAC_ARG_ENABLE(lockdown, 78cdf0e10cSrcweir[ --enable-lockdown Enables the gconf integration work in OOo 79cdf0e10cSrcweir],,) 80cdf0e10cSrcweirAC_ARG_ENABLE(vba, 81cdf0e10cSrcweir[ --disable-vba disables the vba compatibility feature 82cdf0e10cSrcweir],,) 83cdf0e10cSrcweirAC_ARG_WITH(vba-package-format, 84cdf0e10cSrcweir[ --with-vba-package-format specify package format for vba compatibility api. 85cdf0e10cSrcweir Specifying "builtin" means the api component and 86cdf0e10cSrcweir associated type library are part of the installation set. 87cdf0e10cSrcweir Specifying "extn" creates an uno extension that is 88cdf0e10cSrcweir part of the installation set ( located in the program 89cdf0e10cSrcweir directory ) that MUST be optionly registered using 90cdf0e10cSrcweir either the unopkg executeable or the extension manager 91cdf0e10cSrcweir gui. 92cdf0e10cSrcweir 93cdf0e10cSrcweir Note: "builtin" is the default, "extn" can cause 94cdf0e10cSrcweir problems. 95cdf0e10cSrcweir Usage: --with-vba-package-format="builtin" or 96cdf0e10cSrcweir --with-vba-package-format="extn" 97cdf0e10cSrcweir],,) 98cdf0e10cSrcweirAC_ARG_ENABLE(pch, 99cdf0e10cSrcweir[ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++. 100cdf0e10cSrcweir],,) 101cdf0e10cSrcweirAC_ARG_WITH(fonts, 102cdf0e10cSrcweir[ --without-fonts OOo includes some third-party fonts to provide a reliable 103cdf0e10cSrcweir basis for help content, templates, samples, etc. 104cdf0e10cSrcweir When these fonts are already known to be available on the 105cdf0e10cSrcweir system then you should use this option. 106cdf0e10cSrcweir],,) 107cdf0e10cSrcweirAC_ARG_WITH(ppds, 108cdf0e10cSrcweir[ --without-ppds Removes Postscript Printer definition files from 109c4266413SHerbert Dürr Apache Openoffice installation set, for people building 110cdf0e10cSrcweir for specific distributions where PPDs are known to be 111cdf0e10cSrcweir already available (every recent distro with CUPS 112cdf0e10cSrcweir backend) 113cdf0e10cSrcweir],,) 114cdf0e10cSrcweirAC_ARG_WITH(afms, 115c4266413SHerbert Dürr[ --without-afms Removes bitmap font files from Apache Openoffice 116cdf0e10cSrcweir installation set, for people building for specific 117cdf0e10cSrcweir distributions where AFM files or TrueType Fonts 118cdf0e10cSrcweir are known to be available. 119cdf0e10cSrcweir],,) 120cdf0e10cSrcweirAC_ARG_ENABLE(epm, 1217734da27SHerbert Dürr[ --disable-epm AOO includes self-packaging code, that requires 122cdf0e10cSrcweir epm, however epm is useless for large scale 123cdf0e10cSrcweir package building. 124cdf0e10cSrcweir],,enable_epm="yes") 125cdf0e10cSrcweirAC_ARG_WITH(epm, 126cdf0e10cSrcweir[ --with-epm Decides which epm to use. Default is to use 127cdf0e10cSrcweir the one from the system if one is built. When 128cdf0e10cSrcweir either this is not there or you say =internal 129cdf0e10cSrcweir epm will be built. 130cdf0e10cSrcweir],,) 13144a214f4SJürgen SchmidtAC_ARG_WITH(epm-url, 132b48104e3Sjim[ --with-epm-url=<URL> Specify the location of downloadable epm source code. For example: 1334c04325dSMatthias Seidel https://sourceforge.net/projects/oooextras.mirror/files/epm-3.7.tar.gz 1347734da27SHerbert Dürr or 1354c04325dSMatthias Seidel http://epm.sourcearchive.com/downloads/3.7-1/epm_3.7.orig.tar.gz 136b48104e3Sjim Version 3.7 or later is required. Note that epm is under GPL license. 1377734da27SHerbert Dürr],[ EPM_URL="$withval" 13844a214f4SJürgen Schmidt]) 139cdf0e10cSrcweirAC_ARG_WITH(package-format, 140cdf0e10cSrcweir[ --with-package-format specify package format(s) for OOo installsets. 141cdf0e10cSrcweir Default is "normal" one of the OS/Distribution. 142cdf0e10cSrcweir 143cdf0e10cSrcweir Usage: --with-package-format="foo bar" 144cdf0e10cSrcweir],,) 145cdf0e10cSrcweirAC_ARG_ENABLE(odk, 146c4211d71SMatthias Seidel[ --disable-odk AOO includes an ODK, office development kit 147c4211d71SMatthias Seidel which some packagers may want to build without 148cdf0e10cSrcweir],,enable_odk="yes") 149cdf0e10cSrcweirAC_ARG_ENABLE(mathmldtd, 150cdf0e10cSrcweir[ --disable-mathmldtd disable mathmldtd 151cdf0e10cSrcweir (useful for distributions that want to avoid packaging 152cdf0e10cSrcweir it) 153cdf0e10cSrcweir],,enable_mathmldtd="yes") 154cdf0e10cSrcweirAC_ARG_ENABLE(evolution2, 155cdf0e10cSrcweir[ --enable-evolution2 Allows the built-in evolution 2 addressbook 156cdf0e10cSrcweir connectivity build to be enabled. 157cdf0e10cSrcweir],,) 158cdf0e10cSrcweirAC_ARG_WITH(system-stdlibs, 159cdf0e10cSrcweir[ --with-system-stdlibs use libstdc++/libgcc_s already on system 160cdf0e10cSrcweir],,) 161cdf0e10cSrcweirAC_ARG_ENABLE(cups, 1627f413237SHerbert Dürr[ --disable-cups disable CUPS support (for printing on UNIX) 163cdf0e10cSrcweir],,enable_cups=yes) 164cdf0e10cSrcweirAC_ARG_ENABLE(fontconfig, 165cdf0e10cSrcweir[ --disable-fontconfig disable support for the fontconfig library 166cdf0e10cSrcweir],,enable_fontconfig=yes) 167cdf0e10cSrcweirAC_ARG_ENABLE(directx, 168cdf0e10cSrcweir[ --disable-directx Remove DirectX implementation for the new XCanvas 169cdf0e10cSrcweir interface. The DirectX support requires more stuff 170cdf0e10cSrcweir installed on Windows to compile. 171cdf0e10cSrcweir (DirectX SDK, GDI+ libs) 172cdf0e10cSrcweir],,enable_directx=yes) 173cdf0e10cSrcweirAC_ARG_ENABLE(activex, 174cdf0e10cSrcweir[ --disable-activex Disable the use of ActiveX for windows build. 175cdf0e10cSrcweir This switch is mandatory when using VC++ 2005/2008 Express. 1768e8da03fSAriel Constenla-Haile Alternatively you can use the Windows Driver Kit (WDK) and 1778e8da03fSAriel Constenla-Haile configure with the following switches: 1788e8da03fSAriel Constenla-Haile --with-atl-include-dir=$WDK_HOME\inc\atl71 1798e8da03fSAriel Constenla-Haile --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 1808e8da03fSAriel Constenla-Haile --with-mfc-include-dir=$WDK_HOME\inc\mfc42 1818e8da03fSAriel Constenla-Haile --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 182cdf0e10cSrcweir],,) 183cdf0e10cSrcweir 184cdf0e10cSrcweirAC_ARG_ENABLE(atl, 185cdf0e10cSrcweir[ --disable-atl Disable the use of ATL for windows build. 186cdf0e10cSrcweir This switch is mandatory when using VC++ 2005/2008 Express. 1878e8da03fSAriel Constenla-Haile Alternatively you can use the Windows Driver Kit (WDK) and 1888e8da03fSAriel Constenla-Haile configure with the following switches: 1898e8da03fSAriel Constenla-Haile --with-atl-include-dir=$WDK_HOME\inc\atl71 1908e8da03fSAriel Constenla-Haile --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 1918e8da03fSAriel Constenla-Haile --with-mfc-include-dir=$WDK_HOME\inc\mfc42 1928e8da03fSAriel Constenla-Haile --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 193cdf0e10cSrcweir],,) 194cdf0e10cSrcweir 1958e8da03fSAriel Constenla-HaileAC_ARG_WITH(atl-include-dir, 1968e8da03fSAriel Constenla-Haile[ --with-atl-include-dir Path to ATL include directory for windows build. 1978e8da03fSAriel Constenla-Haile This switch is mandatory when using VC++ 2008 Express 1988e8da03fSAriel Constenla-Haile and configuring with ATL/ActiveX enabled. 1998e8da03fSAriel Constenla-Haile You can use the Windows Driver Kit (WDK) and 2008e8da03fSAriel Constenla-Haile configure with the following switch: 2018e8da03fSAriel Constenla-Haile --with-atl-include-dir=$WDK_HOME\inc\atl71 2028e8da03fSAriel Constenla-Haile],,) 2038e8da03fSAriel Constenla-Haile 2048e8da03fSAriel Constenla-HaileAC_ARG_WITH(atl-lib-dir, 2058e8da03fSAriel Constenla-Haile[ --with-atl-lib-dir Path to ATL libraries directory for windows build. 2068e8da03fSAriel Constenla-Haile This switch is mandatory when using VC++ 2008 Express 2078e8da03fSAriel Constenla-Haile and configuring with ATL/ActiveX enabled. 2088e8da03fSAriel Constenla-Haile You can use the Windows Driver Kit (WDK) and 2098e8da03fSAriel Constenla-Haile configure with the following switch: 2108e8da03fSAriel Constenla-Haile --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 2118e8da03fSAriel Constenla-Haile],,) 2128e8da03fSAriel Constenla-Haile 2138e8da03fSAriel Constenla-HaileAC_ARG_WITH(mfc-include-dir, 2148e8da03fSAriel Constenla-Haile[ --with-mfc-include-dir Path to MFC include directory for windows build. 2158e8da03fSAriel Constenla-Haile This switch is mandatory when using VC++ 2008 Express 2168e8da03fSAriel Constenla-Haile and configuring with ATL/ActiveX enabled. 2178e8da03fSAriel Constenla-Haile You can use the Windows Driver Kit (WDK) and 2188e8da03fSAriel Constenla-Haile configure with the following switch: 2198e8da03fSAriel Constenla-Haile --with-mfc-include-dir=$WDK_HOME\inc\mfc42 2208e8da03fSAriel Constenla-Haile],,) 2218e8da03fSAriel Constenla-Haile 2228e8da03fSAriel Constenla-HaileAC_ARG_WITH(mfc-lib-dir, 2238e8da03fSAriel Constenla-Haile[ --with-mfc-lib-dir Path to MFC libraries directory for windows build. 2248e8da03fSAriel Constenla-Haile This switch is mandatory when using VC++ 2008 Express 2258e8da03fSAriel Constenla-Haile and configuring with ATL/ActiveX enabled. 2268e8da03fSAriel Constenla-Haile You can use the Windows Driver Kit (WDK) and 2278e8da03fSAriel Constenla-Haile configure with the following switch: 2288e8da03fSAriel Constenla-Haile --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 2298e8da03fSAriel Constenla-Haile],,) 2308e8da03fSAriel Constenla-Haile 2318e8da03fSAriel Constenla-Haile 232cdf0e10cSrcweirAC_ARG_ENABLE(symbols, 233cdf0e10cSrcweir[ --enable-symbols Include debugging symbols in output. 234cdf0e10cSrcweir WARNING - a complete build needs 8 Gb of space and 235cdf0e10cSrcweir takes much longer. (enables -g compiler flag) 236cdf0e10cSrcweir 237cdf0e10cSrcweir --enable-symbols=SMALL sets the gcc -g1 setting 238cdf0e10cSrcweir which is smaller. 239cdf0e10cSrcweir 240cdf0e10cSrcweir Enabling symbols disables the stripping of the solver 241cdf0e10cSrcweir (--disable-strip-solver). 242cdf0e10cSrcweir],,) 243cdf0e10cSrcweirAC_ARG_ENABLE(strip-solver, 244cdf0e10cSrcweir[ --disable-strip-solver Disable the stripping of the solver. 245cdf0e10cSrcweir By default the solver is stripped unless a build with 246cdf0e10cSrcweir debugging symbols (--enable-symbols) is requested. 247cdf0e10cSrcweir 248cdf0e10cSrcweir This switch allows to override this setting. 249cdf0e10cSrcweir],,) 250cdf0e10cSrcweirAC_ARG_ENABLE(werror, 251cdf0e10cSrcweir[ --enable-werror Turn warnings to errors. (Has no effect in modules 252cdf0e10cSrcweir where the treating of warnings as errors is disabled 2538a62b599SPavel Janík explicitly) 254cdf0e10cSrcweir],,) 255cdf0e10cSrcweirAC_ARG_ENABLE(debug, 256cdf0e10cSrcweir[ --enable-debug Include debugging symbols from --enable-symbols 257cdf0e10cSrcweir plus extra debugging code. Extra large build! 258cdf0e10cSrcweir (enables -g compiler flag and dmake debug=true) 259cdf0e10cSrcweir],,) 260cdf0e10cSrcweirAC_ARG_ENABLE(dbgutil, 261cdf0e10cSrcweir[ --enable-dbgutil Include additional debugging utilities, such as 262cdf0e10cSrcweir assertions, object counting, etc. Larger build. 263cdf0e10cSrcweir Independent from --enable-debug 264cdf0e10cSrcweir],,) 265cdf0e10cSrcweirAC_ARG_ENABLE(crashdump, 266cdf0e10cSrcweir[ --enable-crashdump Enable the crashdump feature code. 267cdf0e10cSrcweir],,) 268cdf0e10cSrcweirAC_ARG_ENABLE(cl-standard, 269cdf0e10cSrcweir[ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing 270a46fe8a8SPavel Janík standard compiler. ( This just disables optimization 271cdf0e10cSrcweir options and therefore removes a lot of warnings when 272cdf0e10cSrcweir using the cheaper standard compiler. ) 273cdf0e10cSrcweir],,) 27433605542SJürgen SchmidtAC_ARG_ENABLE(win-x64-shellext, 27533605542SJürgen Schmidt[ --enable-win-x64-shellext Enable the build/usage of Windows 64bit shell extensions. 276d507b48eSMatthias Seidel These extensions are used for the system integration on 277d507b48eSMatthias Seidel Windows 64bit systems. For example supporting the search 27833605542SJürgen Schmidt in ODF files with the standard Windows search feature. 27933605542SJürgen Schmidt],,) 280cdf0e10cSrcweirAC_ARG_ENABLE(gtk, 281cdf0e10cSrcweir[ --disable-gtk Determines whether to use Gtk+ vclplug on platforms 282cdf0e10cSrcweir where Gtk+ is available. 283cdf0e10cSrcweir],,enable_gtk=yes) 284cdf0e10cSrcweirAC_ARG_ENABLE(gstreamer, 285e1a336b3SAriel Constenla-Haile[ --enable-gstreamer Determines whether to use the GStreamer media 286cdf0e10cSrcweir backend on platforms where GStreamer is available. 287e1a336b3SAriel Constenla-Haile],,enable_gstreamer=no) 288cdf0e10cSrcweirAC_ARG_ENABLE(systray, 289cdf0e10cSrcweir[ --disable-systray Determines whether to build the systray quickstarter. 290cdf0e10cSrcweir],,enable_systray=yes) 291cdf0e10cSrcweirAC_ARG_ENABLE(cairo, 292cdf0e10cSrcweir[ --enable-cairo Determines whether to use Cairo library on 293cdf0e10cSrcweir platforms where Cairo is available. 294cdf0e10cSrcweir],,enable_cairo=no) 295cdf0e10cSrcweirAC_ARG_WITH(system-cairo, 296cdf0e10cSrcweir[ --with-system-cairo Use Cairo libraries already on system 297cdf0e10cSrcweir],,) 29846dacce6SMichael StahlAC_ARG_ENABLE(cairo-canvas, 29946dacce6SMichael Stahl[ --disable-cairo-canvas Determines whether to build the Cairo canvas on 30046dacce6SMichael Stahl platforms where Cairo is available. 30146dacce6SMichael Stahl],,enable_cairo_canvas=yes) 302cdf0e10cSrcweirAC_ARG_ENABLE(opengl, 303cdf0e10cSrcweir[ --enable-opengl Determines whether to build the OpenGL 3D slide 304cdf0e10cSrcweir transitions component 305cdf0e10cSrcweir],,enable_opengl=no) 306cdf0e10cSrcweirAC_ARG_ENABLE(dbus, 307cdf0e10cSrcweir[ --enable-dbus Determines whether to enable presentation mode 308cdf0e10cSrcweir screensaver control under GNOME via DBUS 309cdf0e10cSrcweir],,enable_dbus=no) 310cdf0e10cSrcweirAC_ARG_ENABLE(gconf, 311cdf0e10cSrcweir[ --disable-gconf Determines whether to use the GConf support 312cdf0e10cSrcweir],,enable_gconf=yes) 313cdf0e10cSrcweirAC_ARG_ENABLE(gnome-vfs, 314cdf0e10cSrcweir[ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing 315cdf0e10cSrcweir System on platforms where that VFS is available 316ca91c472SDamjan Jovanovic],,enable_gnome_vfs=no) 317cdf0e10cSrcweirAC_ARG_ENABLE(gio, 318cdf0e10cSrcweir[ --enable-gio Determines whether to use the GIO support 319ca91c472SDamjan Jovanovic],,enable_gio=yes) 320cdf0e10cSrcweirAC_ARG_ENABLE(static-gtk, 321cdf0e10cSrcweir[ --enable-static-gtk Modules that are linked against gtk libraries use 322cdf0e10cSrcweir the static libraries instead of the dynamic ones. 323cdf0e10cSrcweir (enables -Bstatic linker flag for gtk libraries) 324cdf0e10cSrcweir],,) 325cdf0e10cSrcweirAC_ARG_ENABLE(layout, 326cdf0e10cSrcweir[ --enable-layout Enable the compilation and use of layout dialogs 327cdf0e10cSrcweir],,) 328e3bd0393SPavel JaníkAC_ARG_ENABLE(nss-module, 3290021cf80SHerbert Dürr[ --disable-nss-module Whether to use the NSS module that is used for xml-security 330cdf0e10cSrcweir],,enable_nss_module=yes) 331cdf0e10cSrcweirAC_ARG_ENABLE(kde, 332cdf0e10cSrcweir[ --enable-kde Determines whether to use Qt/KDE vclplug on platforms 333cdf0e10cSrcweir where Qt and KDE are available. 334cdf0e10cSrcweir],,) 335cdf0e10cSrcweirAC_ARG_ENABLE(kde4, 336cdf0e10cSrcweir[ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms 337cdf0e10cSrcweir where Qt4 and KDE4 are available. May be used with --enable-kde 338cdf0e10cSrcweir if you want to support both KDE3 and KDE4. 339cdf0e10cSrcweir],,) 340cdf0e10cSrcweirAC_ARG_ENABLE(rpath, 341cdf0e10cSrcweir[ --disable-rpath Disable the use of relative paths in shared libraries 342cdf0e10cSrcweir],,) 343cdf0e10cSrcweirAC_ARG_ENABLE(pam, 344cdf0e10cSrcweir[ --disable-pam Disable pam support. 345cdf0e10cSrcweir],,) 346cdf0e10cSrcweirAC_ARG_ENABLE(pam-link, 347cdf0e10cSrcweir[ --enable-pam-link link with libpam instead of dynamically open it 348cdf0e10cSrcweir],,) 349cdf0e10cSrcweirAC_ARG_ENABLE(crypt-link, 350cdf0e10cSrcweir[ --disable-crypt-link disable linking with libcrypt instead of dynamically 351cdf0e10cSrcweir open it (needed for ancient GNU/Linux distributions 352cdf0e10cSrcweir without crypt()/libcrypt) 353cdf0e10cSrcweir],,enable_crypt_link=yes) 354cdf0e10cSrcweirAC_ARG_ENABLE(xrender-link, 355cdf0e10cSrcweir[ --enable-xrender-link link with libXrender instead of dynamically open it 356cdf0e10cSrcweir],,) 357cdf0e10cSrcweirAC_ARG_ENABLE(randr, 358cdf0e10cSrcweir[ --disable-randr disable RandR support in the vcl project 359cdf0e10cSrcweir],,enable_randr=yes) 360cdf0e10cSrcweirAC_ARG_ENABLE(randr-link, 361cdf0e10cSrcweir[ --disable-randr-link disable linking with libXrandr, instead dynamically 362cdf0e10cSrcweir open it at runtime 363cdf0e10cSrcweir],,enable_randr_link=yes) 364010ec03aSHerbert DürrAC_ARG_WITH(bundled-extension-blobs, 36507a3d7f1SPedro Giffuni[ --with-bundled-extension-blobs Whitespace separated list of files in the tarball directory 366010ec03aSHerbert Dürr that are to be bundled as-is for installation as extensions 367010ec03aSHerbert Dürr at the first program start. Make sure to only bundle extensions 368010ec03aSHerbert Dürr which can be installed without requiring a license dialog 369416de96fSHerbert Dürr and comply with their distribution requirements by updating the 370416de96fSHerbert Dürr files LICENSE_aggregated and NOTICE_aggregated accordingly 371010ec03aSHerbert Dürr],,) 372010ec03aSHerbert Dürr#AC_ARG_WITH(bundled-prereg-extensions, 37307a3d7f1SPedro Giffuni#[ --with-bundled-prereg-extensions Whitespace separated list of files in the tarball directory that 374010ec03aSHerbert Dürr# are to be bundled as pre-registered extensions. Make sure to only bundle 375010ec03aSHerbert Dürr# extensions which can be installed without requiring a license dialog 376010ec03aSHerbert Dürr#],,) 377764319a5SAndre FischerAC_ARG_ENABLE(bundled-dictionaries, 378764319a5SAndre Fischer[ --enable-bundled-dictionaries Download dictionaries (spelling, hyphenation, thesaurus) 379416de96fSHerbert Dürr according to main/extensions.lst and bundle them. Make sure to 380416de96fSHerbert Dürr comply with their distribution requirements and update the 381416de96fSHerbert Dürr files LICENSE_aggregated and NOTICE_aggregated accordingly 3821b01b3b8SOliver-Rainer Wittmann],,enable_bundled_dictionaries=no) 383764319a5SAndre Fischer 384764319a5SAndre Fischer# Remove the following switches when not in release mode. 385cdf0e10cSrcweirAC_ARG_WITH(system-dicts, 386cdf0e10cSrcweir[ --with-system-dicts Use dictionaries from system paths- Specify 387cdf0e10cSrcweir them via --with-{dict,hyph,thes}-path=/path 3889ef65f0eSAndre Fischer if you want to override the default ones 389cdf0e10cSrcweir],,) 390cdf0e10cSrcweirAC_ARG_WITH(external-dict-dir, 391cdf0e10cSrcweir[ --with-external-dict-dir Specify external dictionary dir 392cdf0e10cSrcweir],,) 393cdf0e10cSrcweirAC_ARG_WITH(external-hyph-dir, 394cdf0e10cSrcweir[ --with-external-hyph-dir Specify external hyphenation pattern dir 395cdf0e10cSrcweir],,) 396cdf0e10cSrcweirAC_ARG_WITH(external-thes-dir, 397cdf0e10cSrcweir[ --with-external-thes-dir Specify external thesaurus dir 398cdf0e10cSrcweir],,) 399764319a5SAndre Fischer# End of remove. 400764319a5SAndre Fischer 401764319a5SAndre Fischer 402cdf0e10cSrcweirAC_ARG_WITH(system-libs, 403cdf0e10cSrcweir[ --with-system-libs Use libs already on system -- enables all 404cc99daadSHerbert Dürr --with-system-* flags except 405cdf0e10cSrcweir odbc/sane/xrender-header(s) 406cdf0e10cSrcweir],,) 407cdf0e10cSrcweirAC_ARG_WITH(system-headers, 408cdf0e10cSrcweir[ --with-system-headers Use headers already on system -- enables all 409cdf0e10cSrcweir --with-system-* flags for external packages 410cdf0e10cSrcweir whose headers are the only entities used i.e. 411cdf0e10cSrcweir boost/vigra/odbc/sane/xrender-header(s) 412cdf0e10cSrcweir],,) 413cdf0e10cSrcweirAC_ARG_WITH(system-jars, 414cdf0e10cSrcweir[ --without-system-jars When building with --with-system-libs, also the 415cdf0e10cSrcweir needed jars are expected on the system. Use this to 416cdf0e10cSrcweir disable that. 417cdf0e10cSrcweir (except for the db case where --with-system-db 418cdf0e10cSrcweir *has to* imply using the db.jar from there, too) 419cdf0e10cSrcweir],,) 420cdf0e10cSrcweirAC_ARG_WITH(system-zlib, 421cdf0e10cSrcweir[ --with-system-zlib Use zlib already on system 422cdf0e10cSrcweir],,) 4230021cf80SHerbert DürrAC_ARG_WITH(system-nss, 4240021cf80SHerbert Dürr[ --with-system-nss Use NSS already on system 4250021cf80SHerbert Dürr],,) 426cdf0e10cSrcweirAC_ARG_WITH(system-openssl, 427cdf0e10cSrcweir[ --with-system-openssl Use OpenSSL already on system 428cdf0e10cSrcweir],,) 429cdf0e10cSrcweirAC_ARG_WITH(system-jpeg, 430cdf0e10cSrcweir[ --with-system-jpeg Use jpeg already on system 431cdf0e10cSrcweir],,) 432cdf0e10cSrcweirAC_ARG_WITH(system-expat, 433cdf0e10cSrcweir[ --with-system-expat Use expat already on system 434cdf0e10cSrcweir],,) 435cdf0e10cSrcweirAC_ARG_WITH(system-libxml, 436cdf0e10cSrcweir[ --with-system-libxml Use libxml already on system 437cdf0e10cSrcweir],,) 438cdf0e10cSrcweirAC_ARG_WITH(system-python, 439cdf0e10cSrcweir[ --with-system-python Use python already on system 440cdf0e10cSrcweir],,) 441cdf0e10cSrcweirAC_ARG_WITH(system-icu, 442cdf0e10cSrcweir[ --with-system-icu Use icu already on system 443cdf0e10cSrcweir],,) 444cdf0e10cSrcweirAC_ARG_WITH(system-poppler, 445cdf0e10cSrcweir[ --with-system-poppler Use poppler already on system 446cdf0e10cSrcweir],,) 447cdf0e10cSrcweirAC_ARG_WITH(system-lucene, 448cdf0e10cSrcweir[ --with-system-lucene Use lucene already on system 449cdf0e10cSrcweir],,) 450cdf0e10cSrcweirAC_ARG_WITH(lucene-core-jar, 451cdf0e10cSrcweir[ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ], 452cdf0e10cSrcweir[ LUCENE_CORE_JAR="$withval" 453cdf0e10cSrcweir]) 454cdf0e10cSrcweirAC_ARG_WITH(lucene-analyzers-jar, 455cdf0e10cSrcweir[ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ], 456cdf0e10cSrcweir[ LUCENE_ANALYZERS_JAR="$withval" 457cdf0e10cSrcweir]) 458cdf0e10cSrcweirAC_ARG_ENABLE(mysql-connector, 459cdf0e10cSrcweir[ --enable-mysql-connector enables the build of the MySQL Connector/OOo extension. 460cdf0e10cSrcweir This requires access to the MySQL Connector/C (aka libmysql) to be given, too, with 461cdf0e10cSrcweir either the --with-system-mysql or --with-libmysql-path option. 462cdf0e10cSrcweir],,) 463cdf0e10cSrcweirAC_ARG_WITH(system-mysql, 464cdf0e10cSrcweir[ --with-system-mysql Use MySQL libraries already on system, for building the MySQL Connector/OOo extension. 465cdf0e10cSrcweir Requires MYSQLCONFIG to point to the mysql_config executable. 466cdf0e10cSrcweir],,) 467cdf0e10cSrcweirAC_ARG_WITH(libmysql-path, 468cdf0e10cSrcweir[ --with-libmysql-path Use Connector/C (libmysql) installation for building the MySQL Connector/OOo extension. 469cdf0e10cSrcweir 470cdf0e10cSrcweir Usage: --with-libmysql-path=<absolute path to your Connector/C installation> 471cdf0e10cSrcweir],,) 472cdf0e10cSrcweirAC_ARG_WITH(system-mysql-cppconn, 473cdf0e10cSrcweir[ --with-system-mysql-cppconn Use MySQL C++ Connector libraries already on system 474cdf0e10cSrcweir],,) 475cdf0e10cSrcweirAC_ARG_WITH(system-hsqldb, 476cdf0e10cSrcweir[ --with-system-hsqldb Use hsqldb already on system 477cdf0e10cSrcweir],,) 478cdf0e10cSrcweirAC_ARG_WITH(hsqldb-jar, 479cdf0e10cSrcweir[ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ], 480cdf0e10cSrcweir[ HSQLDB_JAR="$withval" 481cdf0e10cSrcweir]) 482cdf0e10cSrcweirAC_ARG_WITH(system-beanshell, 4839ef65f0eSAndre Fischer[ --with-system-beanshell Use beanshell already on system (default) 4849ef65f0eSAndre Fischer],,) 4859ef65f0eSAndre FischerAC_ARG_ENABLE(beanshell, 4869ef65f0eSAndre Fischer[ --disable-beanshell Disable the use of beanshell. 487cdf0e10cSrcweir],,) 488cdf0e10cSrcweirAC_ARG_WITH(beanshell-jar, 489cdf0e10cSrcweir[ --with-beanshell-jar=JARFILE Specify path to jarfile manually ], 490cdf0e10cSrcweir[ BSH_JAR="$withval" 491cdf0e10cSrcweir]) 492cdf0e10cSrcweirAC_ARG_ENABLE(pdfimport, 4937afab28fSJürgen Schmidt[ --enable-pdfimport enables the build of the PDF Import extension 494cdf0e10cSrcweir],,) 495cdf0e10cSrcweirAC_ARG_ENABLE(wiki-publisher, 496cdf0e10cSrcweir[ --enable-wiki-publisher enables the build of the Wiki Publisher extension 497cdf0e10cSrcweir],,) 498cdf0e10cSrcweirAC_ARG_WITH(commons-codec-jar, 499cdf0e10cSrcweir[ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ], 500cdf0e10cSrcweir[ COMMONS_CODEC_JAR="$withval" 501cdf0e10cSrcweir]) 502cdf0e10cSrcweirAC_ARG_WITH(commons-lang-jar, 503cdf0e10cSrcweir[ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ], 504cdf0e10cSrcweir[ COMMONS_LANG_JAR="$withval" 505cdf0e10cSrcweir]) 506cdf0e10cSrcweirAC_ARG_WITH(commons-httpclient-jar, 507cdf0e10cSrcweir[ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ], 508cdf0e10cSrcweir[ COMMONS_HTTPCLIENT_JAR="$withval" 509cdf0e10cSrcweir]) 510cdf0e10cSrcweirAC_ARG_WITH(commons-logging-jar, 511cdf0e10cSrcweir[ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ], 512cdf0e10cSrcweir[ COMMONS_LOGGING_JAR="$withval" 513cdf0e10cSrcweir]) 514cdf0e10cSrcweirAC_ARG_WITH(servlet-api-jar, 515cdf0e10cSrcweir[ --servlet-api-jar=JARFILE Specify path to jarfile manually ], 516cdf0e10cSrcweir[ SERVLETAPI_JAR="$withval" 517cdf0e10cSrcweir]) 518cdf0e10cSrcweirAC_ARG_ENABLE(report-builder, 519cdf0e10cSrcweir[ --enable-report-builder enables the build of the Report Builder extension 520cdf0e10cSrcweir],,) 521cdf0e10cSrcweirAC_ARG_WITH(sac-jar, 52224fe865aSOliver-Rainer Wittmann[ --with-sac-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 523cdf0e10cSrcweir[ SAC_JAR="$withval" 524cdf0e10cSrcweir]) 525cdf0e10cSrcweirAC_ARG_WITH(libxml-jar, 52624fe865aSOliver-Rainer Wittmann[ --with-libxml-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 527cdf0e10cSrcweir[ LIBXML_JAR="$withval" 528cdf0e10cSrcweir]) 529cdf0e10cSrcweirAC_ARG_WITH(flute-jar, 53024fe865aSOliver-Rainer Wittmann[ --with-flute-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 531cdf0e10cSrcweir[ FLUTE_JAR="$withval" 532cdf0e10cSrcweir]) 533cdf0e10cSrcweirAC_ARG_WITH(jfreereport-jar, 53424fe865aSOliver-Rainer Wittmann[ --with-jfreereport-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 535cdf0e10cSrcweir[ JFREEREPORT_JAR="$withval" 536cdf0e10cSrcweir]) 537cdf0e10cSrcweirAC_ARG_WITH(liblayout-jar, 53824fe865aSOliver-Rainer Wittmann[ --with-liblayout-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 539cdf0e10cSrcweir[ LIBLAYOUT_JAR="$withval" 540cdf0e10cSrcweir]) 541cdf0e10cSrcweirAC_ARG_WITH(libloader-jar, 54224fe865aSOliver-Rainer Wittmann[ --with-libloader-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 543cdf0e10cSrcweir[ LIBLOADER_JAR="$withval" 544cdf0e10cSrcweir]) 545cdf0e10cSrcweirAC_ARG_WITH(libformula-jar, 54624fe865aSOliver-Rainer Wittmann[ --with-libformula-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 547cdf0e10cSrcweir[ LIBFORMULA_JAR="$withval" 548cdf0e10cSrcweir]) 549cdf0e10cSrcweirAC_ARG_WITH(librepository-jar, 55024fe865aSOliver-Rainer Wittmann[ --with-librepository-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 551cdf0e10cSrcweir[ LIBREPOSITORY_JAR="$withval" 552cdf0e10cSrcweir]) 553cdf0e10cSrcweirAC_ARG_WITH(libfonts-jar, 55424fe865aSOliver-Rainer Wittmann[ --with-libfonts-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 555cdf0e10cSrcweir[ LIBFONTS_JAR="$withval" 556cdf0e10cSrcweir]) 557cdf0e10cSrcweirAC_ARG_WITH(libserializer-jar, 55824fe865aSOliver-Rainer Wittmann[ --with-libserializer-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 559cdf0e10cSrcweir[ LIBSERIALIZER_JAR="$withval" 560cdf0e10cSrcweir]) 561cdf0e10cSrcweirAC_ARG_WITH(libbase-jar, 56224fe865aSOliver-Rainer Wittmann[ --with-libbase-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 563cdf0e10cSrcweir[ LIBBASE_JAR="$withval" 564cdf0e10cSrcweir]) 565cdf0e10cSrcweirAC_ARG_WITH(system-saxon, 5669ef65f0eSAndre Fischer[ --with-system-saxon Use saxon already on system (default) 5679ef65f0eSAndre Fischer],,) 5689ef65f0eSAndre FischerAC_ARG_ENABLE(saxon, 5699ef65f0eSAndre Fischer[ --disable-saxon Disable use of saxon 570cdf0e10cSrcweir],,) 571cdf0e10cSrcweirAC_ARG_WITH(saxon-jar, 5729ef65f0eSAndre Fischer[ --with-saxon-jar=JARFILE Specify path to jarfile manually. This implies --with-system-saxon ], 573cdf0e10cSrcweir[ SAXON_JAR="$withval" 574cdf0e10cSrcweir]) 575cdf0e10cSrcweirAC_ARG_WITH(system-libxslt, 576cdf0e10cSrcweir[ --with-system-libxslt Use libxslt already on system 577cdf0e10cSrcweir],,) 578cdf0e10cSrcweirAC_ARG_WITH(system-odbc, 579cdf0e10cSrcweir[ --with-system-odbc-headers Use the odbc headers already on system 580cdf0e10cSrcweir],,) 581cdf0e10cSrcweirAC_ARG_WITH(system-sane, 582cdf0e10cSrcweir[ --with-system-sane-header Use sane.h already on system 583cdf0e10cSrcweir],,) 584cdf0e10cSrcweirAC_ARG_WITH(system-xrender, 585cdf0e10cSrcweir[ --with-system-xrender-headers Use XRender headers already on system 586cdf0e10cSrcweir],,) 587cdf0e10cSrcweirAC_ARG_WITH(system-curl, 588cdf0e10cSrcweir[ --with-system-curl Use curl already on system 589cdf0e10cSrcweir],,) 590cdf0e10cSrcweirAC_ARG_WITH(system-boost, 591cdf0e10cSrcweir[ --with-system-boost Use boost already on system 592cdf0e10cSrcweir],,) 593cdf0e10cSrcweirAC_ARG_WITH(system-mdds, 594cdf0e10cSrcweir[ --with-system-mdds Use mdds already on system 595cdf0e10cSrcweir],,) 596cdf0e10cSrcweirAC_ARG_WITH(system-vigra, 597cdf0e10cSrcweir[ --with-system-vigra Use vigra already on system 598cdf0e10cSrcweir],,) 599a44fea77SAriel Constenla-HaileAC_ARG_ENABLE(hunspell, 600a44fea77SAriel Constenla-Haile[ --enable-hunspell Determines whether to enable the Hunspell library. 601a44fea77SAriel Constenla-Haile If enabled, the library will be built unless you 602a44fea77SAriel Constenla-Haile specify --with-system-hunspell to use the library 603a44fea77SAriel Constenla-Haile already present on your system. 604a44fea77SAriel Constenla-Haile If disabled, the Spell Checking component will also 605a44fea77SAriel Constenla-Haile be disabled. 606a44fea77SAriel Constenla-Haile (Default: hunspell disabled) 607a44fea77SAriel Constenla-Haile],,enable_hunspell=no) 608cdf0e10cSrcweirAC_ARG_WITH(system-hunspell, 609a44fea77SAriel Constenla-Haile[ --with-system-hunspell Use libhunspell already on system 610cdf0e10cSrcweir],,) 611cdf0e10cSrcweirAC_ARG_WITH(system-mythes, 612cdf0e10cSrcweir[ --with-system-mythes Use mythes already on system 613cdf0e10cSrcweir],,) 614a44fea77SAriel Constenla-HaileAC_ARG_ENABLE(hyphen, 615a44fea77SAriel Constenla-Haile[ --enable-hyphen Determines whether to enable the Hyphen library. 616a44fea77SAriel Constenla-Haile If enabled, the library will be built unless you 617a44fea77SAriel Constenla-Haile specify --with-system-hyphen to use the library 618a44fea77SAriel Constenla-Haile already present on your system. 619a44fea77SAriel Constenla-Haile If disabled, the Hyphenator component will also 620a44fea77SAriel Constenla-Haile be disabled. 621a44fea77SAriel Constenla-Haile (Default: hyphen disabled) 622a44fea77SAriel Constenla-Haile],,enable_hyphen=no) 623a44fea77SAriel Constenla-HaileAC_ARG_WITH(system-hyphen, 624a44fea77SAriel Constenla-Haile[ --with-system-hyphen Use libhypeh already on system 625cdf0e10cSrcweir],,) 626cdf0e10cSrcweirAC_ARG_WITH(system-libtextcat, 627cdf0e10cSrcweir[ --with-system-libtextcat Use libtextcat already on system 628cdf0e10cSrcweir],,) 629cdf0e10cSrcweirAC_ARG_WITH(external-libtextcat-data, 630cdf0e10cSrcweir[ --with-system-libtextcat-data Use libtextcat data already on system 631cdf0e10cSrcweir],,) 632cdf0e10cSrcweirAC_ARG_WITH(system-redland, 633cdf0e10cSrcweir[ --with-system-redland Use redland library already on system 634cdf0e10cSrcweir],,) 635cdf0e10cSrcweirAC_ARG_WITH(stlport, 636b597708bSHerbert Dürr[ --with-stlport Only building --without-stlport is supported. 637212f9143SJan Iversen], WITH_STLPORT=$withval , WITH_STLPORT=no) 638cdf0e10cSrcweirAC_ARG_WITH(jdk-home, 639cdf0e10cSrcweir[ --with-jdk-home if you have installed JDK 1.3 or later on your system 640cdf0e10cSrcweir please supply the path here. 641cdf0e10cSrcweir Note that this is not the location of the Java binary 642cdf0e10cSrcweir but the location of the entire distribution. 643cdf0e10cSrcweir 644cdf0e10cSrcweir Usage: --with-jdk-home=<absolute path to JDK home> 645cdf0e10cSrcweir],,) 646cdf0e10cSrcweirAC_ARG_WITH(java, 647cdf0e10cSrcweir[ --with-java Build with[[out]] Java support. If you use 648cdf0e10cSrcweir --without-java/--with-java=no then the build will have 649cdf0e10cSrcweir no support for Java components, applets, accessibility 650cdf0e10cSrcweir or XML filters. 651cdf0e10cSrcweir], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java) 652cdf0e10cSrcweirAC_ARG_ENABLE(gcjaot, 653cdf0e10cSrcweir[ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation 654cdf0e10cSrcweir support to speed up buildsi by compiling the jars also 655cdf0e10cSrcweir to native code.. 656cdf0e10cSrcweir --enable-gcjaot is only known to work with bytecode 657cdf0e10cSrcweir created with gcj or ecj 658cdf0e10cSrcweir],,) 659cdf0e10cSrcweirAC_ARG_WITH(ant-home, 660cdf0e10cSrcweir[ --with-ant-home If you have installed Jakarta Ant on your system, 661cdf0e10cSrcweir please supply the path here. 662cdf0e10cSrcweir Note that this is not the location of the Ant binary 663cdf0e10cSrcweir but the location of the entire distribution. 664cdf0e10cSrcweir 665cdf0e10cSrcweir Usage: --with-ant-home=<absolute path to Ant home> 666cdf0e10cSrcweir],,) 667cdf0e10cSrcweirAC_ARG_WITH(junit, 668cdf0e10cSrcweir[ --with-junit Specifies the JUnit 4 jar file to use for JUnit-based 669cdf0e10cSrcweir tests. --without-junit disables those tests. Not 670f0157b90Skschenk relevant in the --without-java case. 671cdf0e10cSrcweir 672cdf0e10cSrcweir Usage: --with-junit=<absolute path to JUnit 4 jar> 673cdf0e10cSrcweir],,with_junit=yes) 674947c15fcSDamjan JovanovicAC_ARG_WITH(hamcrest-core, 675947c15fcSDamjan Jovanovic[ --with-hamcrest-core Specifies the hamcrest-core jar file to use for 676947c15fcSDamjan Jovanovic JUnit-based tests. --without-junit disables those 677947c15fcSDamjan Jovanovic tests. Not relevant in the --without-java or 678947c15fcSDamjan Jovanovic --without-junit cases, and only needed for recent 679947c15fcSDamjan Jovanovic versions of JUnit. (Default: disabled.) 680947c15fcSDamjan Jovanovic],,with_hamcrest_core=no) 681cdf0e10cSrcweirAC_ARG_WITH(perl-home, 682cdf0e10cSrcweir[ --with-perl-home If you have installed the Perl 5 Distribution, on your 683cdf0e10cSrcweir system, please supply the path here. 684cdf0e10cSrcweir Note that this is not the location of the Perl binary 685cdf0e10cSrcweir but the location of the entire distribution. 686cdf0e10cSrcweir 687cdf0e10cSrcweir Usage: --with-perl-home=<absolute path to Perl 5 home> 688cdf0e10cSrcweir],,) 689cdf0e10cSrcweirAC_ARG_WITH(cl-home, 690cdf0e10cSrcweir[ --with-cl-home For Windows NT users, please supply the path 691cdf0e10cSrcweir for the Microsoft C/C++ compiler. 692cdf0e10cSrcweir Note that this is not the location of the compiler 693cdf0e10cSrcweir binary but the location of the entire distribution. 694cdf0e10cSrcweir 695cdf0e10cSrcweir Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home> 696cdf0e10cSrcweir],,) 697cdf0e10cSrcweirAC_ARG_WITH(mspdb-path, 698cdf0e10cSrcweir[ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the 699cdf0e10cSrcweir path pointing to the mspdb71.dll (.NET 2003). 700cdf0e10cSrcweir 701cdf0e10cSrcweir Usage: --with-mspdb-path=<absolute path to mspdb71.dll> 702cdf0e10cSrcweir],,) 703cdf0e10cSrcweirAC_ARG_WITH(midl-path, 704cdf0e10cSrcweir[ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply 705cdf0e10cSrcweir the path pointing to the midl.exe. 706cdf0e10cSrcweir 707cdf0e10cSrcweir Usage: --with-midl-path=<absolute path to midl.exe> 708cdf0e10cSrcweir],,) 709cdf0e10cSrcweirAC_ARG_WITH(csc-path, 710cdf0e10cSrcweir[ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply 711cdf0e10cSrcweir the path pointing to the csc.exe. 712cdf0e10cSrcweir 713cdf0e10cSrcweir Usage: --with-csc-path=<absolute path to csc.exe> 714cdf0e10cSrcweir],,) 715cdf0e10cSrcweirAC_ARG_WITH(nsis-path, 716cdf0e10cSrcweir[ --with-nsis-path For Windows users, please supply the path to the 717cdf0e10cSrcweir "Nullsoft Scriptable Install System" (NSIS). If NSIS 718cdf0e10cSrcweir is found in the path or this option is supplied a self 719c4266413SHerbert Dürr contained executable installer for Apache OpenOffice 720c4266413SHerbert Dürr will be created. 721cdf0e10cSrcweir 722cdf0e10cSrcweir Usage: --with-nsis-path=<absolute path to nsis.exe> 723cdf0e10cSrcweir],,) 724cdf0e10cSrcweirAC_ARG_WITH(frame-home, 725cdf0e10cSrcweir[ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply 726cdf0e10cSrcweir the path pointing to lib/mscoree.lib, usually 727cdf0e10cSrcweir something like: 728cdf0e10cSrcweir "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK" 729cdf0e10cSrcweir 730cdf0e10cSrcweir MS Visual Toolkit compiler users, please supply the 731cdf0e10cSrcweir path pointing to lib/msvcrt.lib, usually something 732cdf0e10cSrcweir like: 733cdf0e10cSrcweir "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7" 734cdf0e10cSrcweir 735cdf0e10cSrcweir Usage: --with-frame-home=<absolute path to Framework SDK [[home]]> 736cdf0e10cSrcweir],,) 737cdf0e10cSrcweirAC_ARG_WITH(psdk-home, 738cdf0e10cSrcweir[ --with-psdk-home For Windows users, please supply the path to the 739cdf0e10cSrcweir Microsoft Platform SDK. 740cdf0e10cSrcweir 741cdf0e10cSrcweir Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK> 742cdf0e10cSrcweir],,) 743cdf0e10cSrcweirAC_ARG_WITH(directx-home, 744cdf0e10cSrcweir[ --with-directx-home For Windows users, please supply the path to the 745cdf0e10cSrcweir Microsoft DirectX SDK. 746cdf0e10cSrcweir 747cdf0e10cSrcweir Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK> 748cdf0e10cSrcweir],,) 749cdf0e10cSrcweirAC_ARG_WITH(mozilla-build, 750cdf0e10cSrcweir[ --with-mozilla-build For Windows users, please supply the path to the 751cdf0e10cSrcweir mozilla build tools. 752cdf0e10cSrcweir 753cdf0e10cSrcweir Usage: --with-mozilla-build=<absolute path to mozilla build tools> 754cdf0e10cSrcweir 755cdf0e10cSrcweir At the moment of this writing, an installer for the mozilla build tools 7569d1669aeSMatthias Seidel can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/. 757cdf0e10cSrcweir],[MOZILLABUILD=$withval],) 758cdf0e10cSrcweirAC_ARG_WITH(local-solenv, 759cdf0e10cSrcweir[ --with-local-solenv If you have solenv in a location other than ./solenv, 760cdf0e10cSrcweir please supply the path here. 761cdf0e10cSrcweir 762cdf0e10cSrcweir Usage: --with-local-solenv=<absolute path to solenv> 763cdf0e10cSrcweir],,) 764cdf0e10cSrcweirAC_ARG_WITH(local-solver, 765cdf0e10cSrcweir[ --with-local-solver if you have solver in a location other than ./solver, 766cdf0e10cSrcweir please supply the path here. 767cdf0e10cSrcweir 768cdf0e10cSrcweir Usage: --with-local-solver=<absolute path to solver> 769cdf0e10cSrcweir],,) 7709ef65f0eSAndre FischerAC_ARG_ENABLE(javascript, 7719ef65f0eSAndre Fischer[ --disable-javascript Disables support for JavaScript macros. 7729ef65f0eSAndre Fischer],,) 773fdf35928SAndre FischerAC_ARG_WITH(system-apr, 774fdf35928SAndre Fischer[ --with-system-apr Use apr library already installed on the system 775fdf35928SAndre Fischer],,) 776fdf35928SAndre FischerAC_ARG_WITH(system-apr-util, 777fdf35928SAndre Fischer[ --with-system-apr-util Use apr-util library already installed on the system 778fdf35928SAndre Fischer],,) 779fdf35928SAndre FischerAC_ARG_WITH(system-serf, 780fdf35928SAndre Fischer[ --with-system-serf Use serf library already installed on the system 781fdf35928SAndre Fischer],,) 782fdf35928SAndre FischerAC_ARG_WITH(system-coinmp, 783fdf35928SAndre Fischer[ --with-system-coinmp Use CoinMP library already installed on the system 784fdf35928SAndre Fischer],,) 78527b2fc91SAndre FischerAC_ARG_ENABLE(coinmp, 78627b2fc91SAndre Fischer[ --disable-coinmp Do not use CoinMP as the Calc solver. 78727b2fc91SAndre Fischer],,) 788cdf0e10cSrcweirAC_ARG_ENABLE(check-only, 789cdf0e10cSrcweir[ --enable-check-only Use this option option if you just want to check your 790cdf0e10cSrcweir environment. This option stops the generation of an 791cdf0e10cSrcweir ????env.set 792cdf0e10cSrcweir 793cdf0e10cSrcweir Usage: --enable-check-only=yes 794cdf0e10cSrcweir],,) 795cdf0e10cSrcweirAC_ARG_ENABLE(ccache-skip, 796cdf0e10cSrcweir[[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to 797cdf0e10cSrcweir escape compiler flags that would otherwise prevent 798cdf0e10cSrcweir caching of the result (currently used on Mac only) 799cdf0e10cSrcweir NOTE: requires patched version because of a bug in 800cdf0e10cSrcweir ccache (see issue 104567 for details and patch) 8013f10de8fSEike Rathke explicitly enable if your version of ccache does not 802cdf0e10cSrcweir identify as version 2.4_OOo 803cdf0e10cSrcweir]],,enable_ccache_skip=auto) 804cdf0e10cSrcweirAC_ARG_WITH(lang, 805c4266413SHerbert Dürr[ --with-lang Use this option to build Apache OpenOffice with 806cdf0e10cSrcweir additional language support. English (US) is always 807cdf0e10cSrcweir included by default. Separate multiple languages with 808cdf0e10cSrcweir space. For all languages, use --with-lang=ALL. 809cdf0e10cSrcweir 810cdf0e10cSrcweir Usage: --with-lang="es sw tu cs sk" 811cdf0e10cSrcweir],,) 812cdf0e10cSrcweirAC_ARG_WITH(poor-help-localizations, 813cdf0e10cSrcweir[ --with-poor-help-localizations 814cdf0e10cSrcweir Use this option to specify which languages have 815cdf0e10cSrcweir unusable help localizations. Separate multiple 816cdf0e10cSrcweir languages with space. 817cdf0e10cSrcweir 818cdf0e10cSrcweir Usage: --with-poor-help-localizations="af ar be-BY ca" 819cdf0e10cSrcweir],,) 820cdf0e10cSrcweirAC_ARG_WITH(dict, 821c4266413SHerbert Dürr[ --with-dict Use this option to build Apache OpenOffice with 822cdf0e10cSrcweir dictionary support. ALL dictionaries are always 823cdf0e10cSrcweir included by default unless overridden with 824cdf0e10cSrcweir this option. Separate multiple dictionaries with 825cdf0e10cSrcweir commas. For all dictionaries, use --with-dict=ALL. 826cdf0e10cSrcweir 827cdf0e10cSrcweir Usage: --with-dict=ENGB,ENUS,ITIT 828cdf0e10cSrcweir],,) 829cdf0e10cSrcweirAC_ARG_WITH(intro-bitmaps, 830cdf0e10cSrcweir[ --with-intro-bitmaps Prefer the specified intro bitmaps over the 831cdf0e10cSrcweir the default one. Can be more than one (separated by 832cdf0e10cSrcweir commas), the order means priority of fallback if the 833cdf0e10cSrcweir first does not exist (in the installed tree). 834cdf0e10cSrcweir 835cdf0e10cSrcweir Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp 836cdf0e10cSrcweir],,) 837cdf0e10cSrcweirAC_ARG_WITH(about-bitmaps, 838cdf0e10cSrcweir[ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows 839cdf0e10cSrcweir specification of bitmaps for the About box. 840cdf0e10cSrcweir 841cdf0e10cSrcweir Usage: --with-about-bitmaps=/path/my_ooo_about.bmp 842cdf0e10cSrcweir],,) 843cdf0e10cSrcweirAC_ARG_WITH(vendor, 844cdf0e10cSrcweir[ --with-vendor Set vendor of the build. 845cdf0e10cSrcweir 846cdf0e10cSrcweir Usage: --with-vendor="John the Builder" 847cdf0e10cSrcweir],,) 848cdf0e10cSrcweirAC_ARG_WITH(unix-wrapper, 849cdf0e10cSrcweir[ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used 850cdf0e10cSrcweir in the desktop files and in the desktop-integration RPMs. 851cdf0e10cSrcweir 852cdf0e10cSrcweir Usage: --with-unix-wrapper=ooffice 853cdf0e10cSrcweir],,) 854cdf0e10cSrcweirAC_ARG_WITH(asm-home, 855cdf0e10cSrcweir[ --with-asm-home For Windows users, please supply the path for the 856cdf0e10cSrcweir ml.exe assembler. 857cdf0e10cSrcweir 858cdf0e10cSrcweir Usage: --with-asm-home=<path to ml.exe directory> 859cdf0e10cSrcweir],,) 860ad35682bStruckmanAC_ARG_WITH(nasm-home, 861ad35682bStruckman[ --with-nasm-home For Windows users, please supply the path for the 862ad35682bStruckman nasm.exe assembler. 863ad35682bStruckman 864ad35682bStruckman Usage: --with-nasm-home=<path to nasm.exe directory> 865ad35682bStruckman],,) 866cdf0e10cSrcweirAC_ARG_WITH(os-version, 867cdf0e10cSrcweir[ --with-os-version For FreeBSD users, use this option option to override 868cdf0e10cSrcweir the detected OSVERSION. 869cdf0e10cSrcweir 870cdf0e10cSrcweir Usage: --with-os-version=<OSVERSION> 871cdf0e10cSrcweir],,) 872cdf0e10cSrcweirAC_ARG_WITH(unzip-home, 873cdf0e10cSrcweir[ --with-unzip-home Deprecated: use --with-zip-home instead],,) 874cdf0e10cSrcweirAC_ARG_WITH(zip-home, 875cdf0e10cSrcweir[ --with-zip-home If you use a non standard zip, for example windows 876cdf0e10cSrcweir please supply the path for zip 877cdf0e10cSrcweir 878cdf0e10cSrcweir Usage: --with-zip-home=<path to zip executable> 879cdf0e10cSrcweir],,) 880cdf0e10cSrcweirAC_ARG_WITH(mingwin, 881cdf0e10cSrcweir[ --with-mingwin For Windows users, use the mingwin32 compiler within 882cdf0e10cSrcweir cygwin environment 883cdf0e10cSrcweir 884cdf0e10cSrcweir Usage: --with-mingwin=yes 885cdf0e10cSrcweir 886cdf0e10cSrcweir For !Windows use, use the mingw32 C++ compiler to 887cdf0e10cSrcweir (re-) build unowinreg.dll. Specify the MinGW C++ 888cdf0e10cSrcweir Compilers name. 889cdf0e10cSrcweir 890cdf0e10cSrcweir Usage: --with-mingwin=i586-mingw32msvc-g++ 891cdf0e10cSrcweir],WITH_MINGWIN=$withval,WITH_MINGWIN=0) 892cdf0e10cSrcweirAC_ARG_WITH(build-version, 893cdf0e10cSrcweir[ --with-build-version Allows the builder to add a custom version tag 894cdf0e10cSrcweir that will appear in the Help/About box for QA 895cdf0e10cSrcweir purposes. 896cdf0e10cSrcweir 897cdf0e10cSrcweir Usage: --with-build-version="Built by Jim" 898cdf0e10cSrcweir],with_build_version=$withval) 899cdf0e10cSrcweirAC_ARG_WITH(alloc, 900cdf0e10cSrcweir[ --with-alloc Define which allocator to build with 901cdf0e10cSrcweir (choices are oo, system, tcmalloc, jemalloc) 902cdf0e10cSrcweir 903cdf0e10cSrcweir Note that on FreeBSD/NetBSD system==jemalloc 904cdf0e10cSrcweir],,) 905cdf0e10cSrcweirAC_ARG_ENABLE(verbose, 906cdf0e10cSrcweir[ --enable-verbose Increase build verbosity. 907cdf0e10cSrcweir --disable-verbose Decrease build verbosity. 908cdf0e10cSrcweir],,) 909cdf0e10cSrcweirAC_ARG_ENABLE(dependency-tracking, 910cdf0e10cSrcweir[ --disable-dependency-tracking Disables generation of dependency information. 911cdf0e10cSrcweir],,) 9129ef65f0eSAndre FischerAC_ARG_ENABLE(category-b, 9139ef65f0eSAndre Fischer[ --enable-category-b Activate components under a category B license 9149ef65f0eSAndre Fischer (see http://www.apache.org/legal/3party.html#category-b): 9154c76cf94Spfg MPL (hunspell, hyphen, nss, saxon, rhino), 9168bebafa9SPedro Giffuni CPL (silgraphite), CPL/EPL (CoinMP), OFL (fonts). 9179ef65f0eSAndre Fischer Flags for individual libraries override this one. 9180ea1a209SEike Rathke],,) 9191309f2c9SPedro GiffuniAC_ARG_WITH(arm-target, 9203d781bd6SAndre Fischer[ --arm-target The minimal targeted arm processor 9213d781bd6SAndre Fischer used for the build environment. 9223d781bd6SAndre Fischer Cases : 9233d781bd6SAndre Fischer arm-target < 6 : armv4t compatibility 9243d781bd6SAndre Fischer arm-target = 6 : exact armv6 compatibility 9253d781bd6SAndre Fischer arm-target > 6 : armv7-a compatibility 9263d781bd6SAndre Fischer 9273d781bd6SAndre Fischer Usage: --with-arm-target=7 9281309f2c9SPedro Giffuni],with_arm_target=$withval,with_arm_target=4) 9290d16e2e7SJim JagielskiAC_ARG_WITH(macosx-target, 9300d16e2e7SJim Jagielski[ --macosx-target The minimal macOS/OSX deployment and build target 9310d16e2e7SJim Jagielski 932eda86b37SJim Jagielski Usage: --with-macosx-target=10.7 9330d16e2e7SJim Jagielski],with_macosx_target=$withval,with_macosx_target=10.7) 9343d781bd6SAndre FischerAC_ARG_WITH(rat-scan, 9353d781bd6SAndre Fischer[ --with-rat-scan Scan source code for license headers. 9363d781bd6SAndre Fischer Use as --with-rat-scan to automatically download pre-built Rat binaries. 9373d781bd6SAndre Fischer Alternatively use as --with-rat-scan=<path-to-rat-direcetory> to use 9383d781bd6SAndre Fischer a separately installed library. 9393d781bd6SAndre Fischer],with_rat_scan=$withval,) 940cdf0e10cSrcweir 941cdf0e10cSrcweirBUILD_TYPE="OOo" 94227b2fc91SAndre FischerADDITIONAL_REPOSITORIES="../ext_libraries" 94357c1b8dfSAndre FischerSCPDEFS="" 944cdf0e10cSrcweir 945a3f0327cSHerbert Dürrdnl =================================================================== 94631353920Spfgdnl Check configure script vs. configure.ac 947a3f0327cSHerbert Dürrdnl =================================================================== 948a3f0327cSHerbert DürrAC_MSG_CHECKING([whether configure is up-to-date]) 94931353920Spfgif test "configure" -ot "configure.ac"; then 950a3f0327cSHerbert Dürr AC_MSG_RESULT([no]) 951a3f0327cSHerbert Dürr AC_MSG_ERROR([configure is not up-to-date, run autoconf first!]) 952a3f0327cSHerbert Dürrelse 953a3f0327cSHerbert Dürr AC_MSG_RESULT([yes]) 954a3f0327cSHerbert Dürrfi 955cdf0e10cSrcweirdnl =================================================================== 956cdf0e10cSrcweirdnl Message. 957cdf0e10cSrcweirdnl =================================================================== 958cdf0e10cSrcweirecho "********************************************************************" 959cdf0e10cSrcweirecho "* *" 960c4266413SHerbert Dürrecho "* Apache OpenOffice build configuration. *" 961cdf0e10cSrcweirecho "* *" 962cdf0e10cSrcweirecho "* The configure process checks your platform to see whether *" 963c4266413SHerbert Dürrecho "* you can build Apache OpenOffice on it. *" 964cdf0e10cSrcweirecho "* This process checks all pre-requisites and generates a file *" 965cdf0e10cSrcweirecho "* containing the necessary environment variables. *" 966cdf0e10cSrcweirecho "* Source this file after configure has ended successfully. *" 967cdf0e10cSrcweirecho "* *" 968a5542d65SHerbert Dürrecho "* Warnings that are generated during the configure process *" 969cdf0e10cSrcweirecho "* must be taken into account since it can be a reason for *" 970c4266413SHerbert Dürrecho "* an unsuccessful build of Apache OpenOffice. *" 971cdf0e10cSrcweirecho "* *" 972cdf0e10cSrcweirecho "********************************************************************" 973cdf0e10cSrcweirecho "" 974cdf0e10cSrcweirecho "********************************************************************" 975cdf0e10cSrcweirecho "* *" 976cdf0e10cSrcweirecho "* Checking the platform pre-requisites. *" 977cdf0e10cSrcweirecho "* *" 978cdf0e10cSrcweirecho "********************************************************************" 979cdf0e10cSrcweirecho "" 980cdf0e10cSrcweirdnl =================================================================== 981cdf0e10cSrcweirdnl Configure pre-requisites. 982cdf0e10cSrcweirdnl =================================================================== 983cdf0e10cSrcweircat /dev/null > warn 9842a718e4fSJürgen Schmidt 985cdf0e10cSrcweirAC_PROG_EGREP 986308295dbSJim Jagielskiif test -z "$GREP"; then 987308295dbSJim JagielskiGREP=$EGREP 988308295dbSJim Jagielskifi 989cdf0e10cSrcweirAC_PROG_AWK 990cdf0e10cSrcweirAC_PATH_PROG( AWK, $AWK) 991cdf0e10cSrcweirif test -z "$AWK"; then 992cdf0e10cSrcweir AC_MSG_ERROR([install awk to run this script]) 993cdf0e10cSrcweirfi 994cdf0e10cSrcweir 995cdf0e10cSrcweirAC_PATH_PROGS(SED, sed ) 996cdf0e10cSrcweirif test -z "$SED"; then 997cdf0e10cSrcweir AC_MSG_ERROR([install sed to run this script]) 998cdf0e10cSrcweirfi 999cdf0e10cSrcweir 1000cdf0e10cSrcweirAC_MSG_CHECKING([for solenv environment]) 1001cdf0e10cSrcweirif test -z "$with_local_solenv"; then 1002cdf0e10cSrcweir LOCAL_SOLENV="DEFAULT" 1003cdf0e10cSrcweir AC_MSG_RESULT([default]) 1004cdf0e10cSrcweirelse 1005cdf0e10cSrcweir LOCAL_SOLENV=$with_local_solenv 1006cdf0e10cSrcweir AC_MSG_RESULT([$with_local_solenv]) 1007cdf0e10cSrcweirfi 1008cdf0e10cSrcweirAC_SUBST(LOCAL_SOLENV) 1009cdf0e10cSrcweir 1010cdf0e10cSrcweirif test "$LOCAL_SOLENV" = "DEFAULT"; then 1011cdf0e10cSrcweir _solenv="./solenv" 1012cdf0e10cSrcweirelse 1013cdf0e10cSrcweir _solenv="$LOCAL_SOLENV" 1014cdf0e10cSrcweirfi 1015cdf0e10cSrcweirAC_SUBST(_solenv) 1016cdf0e10cSrcweir 1017cdf0e10cSrcweirif test -e $_solenv/inc/minor.mk; then 1018cdf0e10cSrcweir # Get UPD number from ./solenv/inc/minor.mk 101928633775SPedro Giffuni UPD="`$GREP RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" 1020cdf0e10cSrcweir AC_SUBST(UPD) 102128633775SPedro Giffuni SOURCEVERSION="`$GREP SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" 1022cdf0e10cSrcweir AC_SUBST(SOURCEVERSION) 1023cdf0e10cSrcweirelse 1024cdf0e10cSrcweir AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...]) 1025cdf0e10cSrcweirfi 1026cdf0e10cSrcweir 102772bd2d34SAriel Constenla-Haile 102872bd2d34SAriel Constenla-Hailednl ================================================================== 102972bd2d34SAriel Constenla-Hailednl Checks for custom pack.lst 103072bd2d34SAriel Constenla-Hailednl ================================================================== 103172bd2d34SAriel Constenla-HaileAC_MSG_CHECKING([for custom pack.lst]) 103272bd2d34SAriel Constenla-HaileCUSTOM_PACK_LIST= 103372bd2d34SAriel Constenla-HaileUSE_PACKAGER= 103472bd2d34SAriel Constenla-Haileif test -n "$with_packager_list" ; then 103572bd2d34SAriel Constenla-Haile if test -e $with_packager_list; then 103672bd2d34SAriel Constenla-Haile CUSTOM_PACK_LIST=$with_packager_list 103772bd2d34SAriel Constenla-Haile USE_PACKAGER=YES 103872bd2d34SAriel Constenla-Haile fi 103972bd2d34SAriel Constenla-Hailefi 104072bd2d34SAriel Constenla-Haileif test -n "$CUSTOM_PACK_LIST"; then 104172bd2d34SAriel Constenla-Haile AC_MSG_RESULT([$CUSTOM_PACK_LIST]) 104272bd2d34SAriel Constenla-Haileelse 104372bd2d34SAriel Constenla-Haile AC_MSG_RESULT([no]) 104472bd2d34SAriel Constenla-Hailefi 104572bd2d34SAriel Constenla-HaileAC_SUBST(CUSTOM_PACK_LIST) 104672bd2d34SAriel Constenla-HaileAC_SUBST(USE_PACKAGER) 104772bd2d34SAriel Constenla-Haile 104872bd2d34SAriel Constenla-Haile 1049cdf0e10cSrcweirdnl =================================================================== 1050cdf0e10cSrcweirdnl Checks for the operating system and processor. 1051cdf0e10cSrcweirdnl =================================================================== 1052cdf0e10cSrcweirAC_CANONICAL_SYSTEM 1053cdf0e10cSrcweirif test "$build" != "$host" -o "$build" != "$target" \ 1054cdf0e10cSrcweir -o "$host" != "$target"; then 1055cdf0e10cSrcweir AC_MSG_WARN([cross-compiling by any means is not supported (yet)!]) 1056cdf0e10cSrcweir echo "cross-compiling by any means is not supported (yet)!" >> warn 1057cdf0e10cSrcweirfi 1058cdf0e10cSrcweir 105928633775SPedro Giffuniif echo "$build_os" | $GREP cygwin; then 1060cdf0e10cSrcweir AC_MSG_CHECKING([Cygwin version]) 1061cdf0e10cSrcweir CygwinVer=`uname -r` 1062cdf0e10cSrcweir AC_MSG_RESULT([$CygwinVer]) 1063cdf0e10cSrcweir if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then 1064cdf0e10cSrcweir AC_MSG_ERROR([You need at least Cygwin V1.5.x]) 1065cdf0e10cSrcweir fi 1066cdf0e10cSrcweirelse 1067cdf0e10cSrcweir CygwinVer="false" 1068cdf0e10cSrcweirfi 1069cdf0e10cSrcweir 10707ab687f7SHerbert Dürr# get info about the system provided release/version details 10717ab687f7SHerbert Dürrhead /etc/*-release 10727ab687f7SHerbert Dürruname -a 10737ab687f7SHerbert Dürr 1074cdf0e10cSrcweirdnl =================================================================== 1075cdf0e10cSrcweirdnl The following is a list of supported systems. 1076cdf0e10cSrcweirdnl Sequential to keep the logic very simple 1077cdf0e10cSrcweirdnl These values may be checked and reset later. 1078cdf0e10cSrcweirdnl =================================================================== 1079cdf0e10cSrcweircase "$build_os" in 1080cdf0e10cSrcweir solaris*) 1081cdf0e10cSrcweir test_gtk=yes 1082cdf0e10cSrcweir test_cairo=yes 1083cdf0e10cSrcweir test_kde=yes 1084cdf0e10cSrcweir test_cups=yes 10851439c24fSJürgen Schmidt test_randr=yes 1086cdf0e10cSrcweir test_freetype=yes 10871439c24fSJürgen Schmidt test_gstreamer=yes 1088cdf0e10cSrcweir _os=SunOS 1089cdf0e10cSrcweir AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin) 1090cdf0e10cSrcweir if test -z "$GNUTAR"; then 1091cdf0e10cSrcweir AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).]) 1092cdf0e10cSrcweir fi 1093cdf0e10cSrcweir AC_SUBST(GNUTAR) 1094cdf0e10cSrcweir 1095cdf0e10cSrcweir dnl =========================================================== 1096cdf0e10cSrcweir dnl check whether we're using solaris 6,7,8 - sparc or intel. 1097cdf0e10cSrcweir dnl =========================================================== 1098cdf0e10cSrcweir AC_MSG_CHECKING([the Solaris operating system release]) 1099cdf0e10cSrcweir _os_release=`echo $build_os | $SED -e s/solaris2\.//` 1100cdf0e10cSrcweir if test "$_os_release" -lt "6"; then 1101c4266413SHerbert Dürr AC_MSG_ERROR([use solaris >= 6 to build Apache OpenOffice]) 1102cdf0e10cSrcweir else 1103cdf0e10cSrcweir AC_MSG_RESULT([ok ($_os_release)]) 1104cdf0e10cSrcweir fi 1105cdf0e10cSrcweir 1106cdf0e10cSrcweir dnl check whether we're using a sparc or i386 processor 1107cdf0e10cSrcweir AC_MSG_CHECKING([the processor type]) 1108cdf0e10cSrcweir if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then 1109cdf0e10cSrcweir AC_MSG_RESULT([ok ($build_cpu)]) 1110cdf0e10cSrcweir else 1111cdf0e10cSrcweir AC_MSG_ERROR([only sparc and i386 processors are supported]) 1112cdf0e10cSrcweir fi 1113cdf0e10cSrcweir ;; 1114cdf0e10cSrcweir linux-gnu*|k*bsd*-gnu*) 1115cdf0e10cSrcweir test_gtk=yes 1116cdf0e10cSrcweir test_cairo=yes 1117cdf0e10cSrcweir test_kde=yes 1118cdf0e10cSrcweir test_kde4=yes 1119cdf0e10cSrcweir test_cups=yes 11201439c24fSJürgen Schmidt test_randr=yes 1121cdf0e10cSrcweir test_freetype=yes 11221439c24fSJürgen Schmidt test_gstreamer=yes 11231439c24fSJürgen Schmidt _os=Linux 1124cdf0e10cSrcweir ;; 1125cdf0e10cSrcweir gnu) 1126cdf0e10cSrcweir test_cups=no 1127cdf0e10cSrcweir _os=GNU 1128cdf0e10cSrcweir ;; 1129cdf0e10cSrcweir cygwin*) # Windows 1130cdf0e10cSrcweir test_cups=no 1131cdf0e10cSrcweir test_cairo=yes 1132cdf0e10cSrcweir test_freetype=no 11331439c24fSJürgen Schmidt test_gstreamer=no 1134cdf0e10cSrcweir _os=WINNT 1135cdf0e10cSrcweir ;; 1136cdf0e10cSrcweir darwin*) # Mac OS X 1137cdf0e10cSrcweir test_cups=yes 1138cdf0e10cSrcweir test_gtk=yes 1139cdf0e10cSrcweir test_cairo=yes 11401439c24fSJürgen Schmidt test_randr=no 1141cdf0e10cSrcweir test_freetype=no 11421439c24fSJürgen Schmidt test_gstreamer=no 1143cdf0e10cSrcweir _os=Darwin 11441439c24fSJürgen Schmidt if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then 11451439c24fSJürgen Schmidt AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray]) 11461439c24fSJürgen Schmidt echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn 11471439c24fSJürgen Schmidt enable_systray=no 11481439c24fSJürgen Schmidt fi 114961a3a0ffSHerbert Dürr if test ! -n "$CC"; then 115061a3a0ffSHerbert Dürr CC="`xcrun -f clang` -arch x86_64" 115161a3a0ffSHerbert Dürr fi 115261a3a0ffSHerbert Dürr if test ! -n "$CXX"; then 115387bf159bSJim Jagielski CXX="`xcrun -f clang++` -arch x86_64" 115461a3a0ffSHerbert Dürr fi 1155221de5adSjim # Don't use OSVERSION until we know no conflicts result from it 1156221de5adSjim _darwin_version="`uname -r | $AWK -F . '{ print $1 }'`" 1157221de5adSjim _osx_version="10.`expr $_darwin_version - 4`" 1158221de5adSjim AC_MSG_NOTICE([Detected Darwin version: $_darwin_version ($_osx_version)]) 1159cdf0e10cSrcweir ;; 1160cdf0e10cSrcweir os2*) 1161cdf0e10cSrcweir test_x=no 1162cdf0e10cSrcweir test_cups=no 11631439c24fSJürgen Schmidt test_randr=no 1164cdf0e10cSrcweir test_gtk=no 1165cdf0e10cSrcweir test_freetype=no 11661439c24fSJürgen Schmidt test_gstreamer=no 1167*906a4e93SYuri Dario test_cairo=yes 1168cdf0e10cSrcweir _os=OS2 1169cdf0e10cSrcweir ;; 1170cdf0e10cSrcweir freebsd*) 1171cdf0e10cSrcweir test_gtk=yes 1172cdf0e10cSrcweir test_cairo=yes 1173cdf0e10cSrcweir test_kde=yes 1174cdf0e10cSrcweir test_kde4=yes 1175cdf0e10cSrcweir test_cups=yes 11761439c24fSJürgen Schmidt test_randr=yes 1177cdf0e10cSrcweir test_freetype=yes 11781439c24fSJürgen Schmidt test_gstreamer=yes 1179cdf0e10cSrcweir AC_MSG_CHECKING([the FreeBSD operating system release]) 1180cdf0e10cSrcweir if test -n "$with_os_version"; then 1181cdf0e10cSrcweir OSVERSION="$with_os_version" 1182cdf0e10cSrcweir else 1183cdf0e10cSrcweir OSVERSION=`/sbin/sysctl -n kern.osreldate` 1184cdf0e10cSrcweir fi 1185cdf0e10cSrcweir AC_MSG_RESULT([found OSVERSION=$OSVERSION]) 1186cdf0e10cSrcweir AC_MSG_CHECKING([which thread library to use]) 1187cdf0e10cSrcweir if test "$OSVERSION" -lt "500016"; then 1188cdf0e10cSrcweir PTHREAD_CFLAGS="-D_THREAD_SAFE" 1189cdf0e10cSrcweir PTHREAD_LIBS="-pthread" 1190cdf0e10cSrcweir elif test "$OSVERSION" -lt "502102"; then 1191cdf0e10cSrcweir PTHREAD_CFLAGS="-D_THREAD_SAFE" 1192cdf0e10cSrcweir PTHREAD_LIBS="-lc_r" 1193cdf0e10cSrcweir else 1194cdf0e10cSrcweir PTHREAD_CFLAGS="" 1195cdf0e10cSrcweir PTHREAD_LIBS="-pthread" 1196cdf0e10cSrcweir fi 1197cdf0e10cSrcweir AC_MSG_RESULT([$PTHREAD_LIBS]) 1198cdf0e10cSrcweir _os=FreeBSD 1199cdf0e10cSrcweir ;; 1200cdf0e10cSrcweir osf) 1201cdf0e10cSrcweir test_cups=no 12021439c24fSJürgen Schmidt test_randr=no 1203cdf0e10cSrcweir _os=OSF1 1204cdf0e10cSrcweir ;; 1205cdf0e10cSrcweir netbsd) 1206cdf0e10cSrcweir test_gtk=yes 1207cdf0e10cSrcweir test_cairo=yes 1208cdf0e10cSrcweir test_kde=yes 1209cdf0e10cSrcweir test_kde4=yes 1210cdf0e10cSrcweir test_cups=no 12111439c24fSJürgen Schmidt test_randr=yes 1212cdf0e10cSrcweir test_freetype=yes 12131439c24fSJürgen Schmidt test_gstreamer=yes 1214cdf0e10cSrcweir PTHREAD_CFLAGS="-pthread" 1215cdf0e10cSrcweir PTHREAD_LIBS="-pthread -lpthread" 1216cdf0e10cSrcweir _os=NetBSD 1217cdf0e10cSrcweir ;; 1218cdf0e10cSrcweir aix*) 1219cdf0e10cSrcweir test_cups=no 12201439c24fSJürgen Schmidt test_randr=no 1221cdf0e10cSrcweir test_freetype=yes 12221439c24fSJürgen Schmidt test_gstreamer=yes 12231439c24fSJürgen Schmidt PTHREAD_LIBS=-pthread 1224cdf0e10cSrcweir echo "AIX is an alpha port --- Use at own risk" >> warn 1225cdf0e10cSrcweir _os=AIX 1226cdf0e10cSrcweir ;; 1227cdf0e10cSrcweir *) 1228c4266413SHerbert Dürr AC_MSG_ERROR([$_os operating system is not suitable to build Apache OpenOffice!]) 1229cdf0e10cSrcweir ;; 1230cdf0e10cSrcweiresac 1231cdf0e10cSrcweir 1232cdf0e10cSrcweirAC_SUBST(OSVERSION) 1233cdf0e10cSrcweirAC_SUBST(PTHREAD_CFLAGS) 1234cdf0e10cSrcweirAC_SUBST(PTHREAD_LIBS) 1235cdf0e10cSrcweir 12363f10de8fSEike Rathke 12373f10de8fSEike Rathkednl Ensure pkg-config is initialized before any possible use 12383f10de8fSEike RathkePKG_PROG_PKG_CONFIG 12393f10de8fSEike Rathke 12403f10de8fSEike Rathke 1241cdf0e10cSrcweirdnl =================================================================== 1242cdf0e10cSrcweirdnl Set the ENABLE_CRASHDUMP variable. 1243cdf0e10cSrcweirdnl =================================================================== 1244cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable crashdump feature]) 1245cdf0e10cSrcweirif test "$enable_crashdump" = "yes"; then 1246cdf0e10cSrcweir ENABLE_CRASHDUMP="TRUE" 1247cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE CRASHREP" 1248cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1249cdf0e10cSrcweirelse 1250cdf0e10cSrcweir ENABLE_CRASHDUMP="" 1251cdf0e10cSrcweir AC_MSG_RESULT([no]) 1252cdf0e10cSrcweirfi 1253cdf0e10cSrcweirAC_SUBST(ENABLE_CRASHDUMP) 1254cdf0e10cSrcweir 1255cdf0e10cSrcweirif test "$_os" = "WINNT"; then 1256cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE TWAIN" 1257cdf0e10cSrcweirfi 1258cdf0e10cSrcweir 1259cdf0e10cSrcweirif test "$_os" = "WINNT"; then 1260cdf0e10cSrcweir dnl =================================================================== 1261cdf0e10cSrcweir dnl Set the VC_STANDARD variable. 1262cdf0e10cSrcweir dnl =================================================================== 1263cdf0e10cSrcweir AC_MSG_CHECKING([whether to use the standard non-optimizing compiler]) 1264cdf0e10cSrcweir if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then 1265cdf0e10cSrcweir VC_STANDARD="" 1266cdf0e10cSrcweir AC_MSG_RESULT([no]) 1267cdf0e10cSrcweir else 1268cdf0e10cSrcweir VC_STANDARD="TRUE" 1269cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1270cdf0e10cSrcweir fi 1271cdf0e10cSrcweir AC_SUBST(VC_STANDARD) 1272cdf0e10cSrcweirfi 1273cdf0e10cSrcweir 127433605542SJürgen Schmidtif test "$_os" = "WINNT"; then 127533605542SJürgen Schmidt dnl =================================================================== 127633605542SJürgen Schmidt dnl Set the BUILD_X64 variable. 127733605542SJürgen Schmidt dnl =================================================================== 127833605542SJürgen Schmidt AC_MSG_CHECKING([whether to build/use the Windows 64bit shell extensions]) 127933605542SJürgen Schmidt if test "$enable_win_x64_shellext" = "" -o "$enable_win_x64_shellext" = "no"; then 128033605542SJürgen Schmidt BUILD_X64="" 128133605542SJürgen Schmidt AC_MSG_RESULT([no]) 128233605542SJürgen Schmidt else 128333605542SJürgen Schmidt BUILD_X64="TRUE" 128433605542SJürgen Schmidt AC_MSG_RESULT([yes]) 128533605542SJürgen Schmidt fi 128633605542SJürgen Schmidt AC_SUBST(BUILD_X64) 128733605542SJürgen Schmidtfi 128833605542SJürgen Schmidt 1289cdf0e10cSrcweirdnl =================================================================== 1290cdf0e10cSrcweirdnl Set the ENABLE_WERROR variable. (Activate --enable-werror) 1291cdf0e10cSrcweirdnl =================================================================== 1292cdf0e10cSrcweirAC_MSG_CHECKING([whether to turn warnings to errors]) 1293cdf0e10cSrcweirif test -n "$enable_werror" && test "$enable_werror" != "no"; then 1294cdf0e10cSrcweir ENABLE_WERROR="TRUE" 1295cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1296cdf0e10cSrcweir AC_MSG_WARN([Turning warnings to errors has no effect in modules or]) 1297cdf0e10cSrcweir AC_MSG_WARN([on platforms where it has been disabled explicitely]) 1298cdf0e10cSrcweir echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn 1299cdf0e10cSrcweirelse 1300cdf0e10cSrcweir ENABLE_WERROR="FALSE" 1301cdf0e10cSrcweir AC_MSG_RESULT([no]) 1302cdf0e10cSrcweirfi 1303cdf0e10cSrcweirAC_SUBST(ENABLE_WERROR) 1304cdf0e10cSrcweir 1305cdf0e10cSrcweirdnl =================================================================== 1306cdf0e10cSrcweirdnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols) 1307cdf0e10cSrcweirdnl =================================================================== 1308cdf0e10cSrcweirAC_MSG_CHECKING([whether to do a debug build]) 1309cdf0e10cSrcweirif test -n "$enable_debug" && test "$enable_debug" != "no"; then 1310cdf0e10cSrcweir ENABLE_DEBUG="TRUE" 1311cdf0e10cSrcweir if test -z "$enable_symbols"; then 1312cdf0e10cSrcweir enable_symbols="yes" 1313cdf0e10cSrcweir fi 1314cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1315cdf0e10cSrcweirelse 1316cdf0e10cSrcweir ENABLE_DEBUG="FALSE" 1317cdf0e10cSrcweir AC_MSG_RESULT([no]) 1318cdf0e10cSrcweirfi 1319cdf0e10cSrcweirAC_SUBST(ENABLE_DEBUG) 1320cdf0e10cSrcweir 1321cdf0e10cSrcweirdnl =================================================================== 1322cdf0e10cSrcweirdnl Set the ENABLE_DBGUTIL variable 1323cdf0e10cSrcweirdnl =================================================================== 1324cdf0e10cSrcweirAC_MSG_CHECKING([whether to build with additional debug utilities]) 1325cdf0e10cSrcweirif test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then 1326cdf0e10cSrcweir PROEXT="" 1327cdf0e10cSrcweir PRODUCT="" 1328cdf0e10cSrcweir PROFULLSWITCH="" 1329cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1330cdf0e10cSrcweirelse 1331cdf0e10cSrcweir PRODUCT="full" 1332cdf0e10cSrcweir PROFULLSWITCH="product=full" 1333cdf0e10cSrcweir PROEXT=".pro" 1334cdf0e10cSrcweir AC_MSG_RESULT([no, full product build]) 1335cdf0e10cSrcweirfi 1336cdf0e10cSrcweirAC_SUBST(PRODUCT) 1337cdf0e10cSrcweirAC_SUBST(PROFULLSWITCH) 1338cdf0e10cSrcweirAC_SUBST(PROEXT) 1339cdf0e10cSrcweir 1340cdf0e10cSrcweirdnl =================================================================== 1341cdf0e10cSrcweirdnl First setting is whether to include symbols into final build. 1342cdf0e10cSrcweirdnl =================================================================== 1343cdf0e10cSrcweirAC_MSG_CHECKING([whether to include symbols into final build]) 1344cdf0e10cSrcweirif test -n "$enable_symbols" && test "$enable_symbols" != "no"; then 1345cdf0e10cSrcweir if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then 1346cdf0e10cSrcweir ENABLE_SYMBOLS="TRUE" 1347cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1348cdf0e10cSrcweir else 1349cdf0e10cSrcweir if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then 1350cdf0e10cSrcweir ENABLE_SYMBOLS="SMALL" 1351cdf0e10cSrcweir AC_MSG_RESULT([yes, small ones]) 1352cdf0e10cSrcweir else if test "$enable_symbols" != "no" ; then 1353cdf0e10cSrcweir echo enable symbols is: $enable_symbols 1354cdf0e10cSrcweir AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.]) 1355cdf0e10cSrcweir else 1356cdf0e10cSrcweir ENABLE_SYMBOLS= 1357cdf0e10cSrcweir fi 1358cdf0e10cSrcweir fi 1359cdf0e10cSrcweir fi 1360cdf0e10cSrcweirelse 1361cdf0e10cSrcweir ENABLE_SYMBOLS= 1362cdf0e10cSrcweir AC_MSG_RESULT([no]) 1363cdf0e10cSrcweirfi 1364cdf0e10cSrcweirAC_SUBST(ENABLE_SYMBOLS) 1365cdf0e10cSrcweir 1366cdf0e10cSrcweirdnl =================================================================== 1367cdf0e10cSrcweirdnl Determine if the solver is to be stripped or not. 1368cdf0e10cSrcweirdnl =================================================================== 1369cdf0e10cSrcweirAC_MSG_CHECKING([whether to strip the solver or not.]) 1370cdf0e10cSrcweirif test -n "$enable_strip_solver"; then 1371cdf0e10cSrcweir if test "$enable_strip_solver" = "yes"; then 1372cdf0e10cSrcweir DISABLE_STRIP= 1373cdf0e10cSrcweir else if test "$enable_strip_solver" = "no"; then 1374cdf0e10cSrcweir DISABLE_STRIP="TRUE" 1375cdf0e10cSrcweir else 1376cdf0e10cSrcweir AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.]) 1377cdf0e10cSrcweir fi 1378cdf0e10cSrcweir fi 1379cdf0e10cSrcweirelse 1380cdf0e10cSrcweir if test -n "$ENABLE_SYMBOLS"; then 1381cdf0e10cSrcweir DISABLE_STRIP="TRUE" 1382cdf0e10cSrcweir else 1383cdf0e10cSrcweir DISABLE_STRIP= 1384cdf0e10cSrcweir fi 1385cdf0e10cSrcweirfi 13869ef65f0eSAndre Fischerif test -z "$DISABLE_STRIP"; then 13879ef65f0eSAndre Fischer AC_MSG_RESULT([yes]) 13889ef65f0eSAndre Fischerelse 13899ef65f0eSAndre Fischer AC_MSG_RESULT([no]) 13909ef65f0eSAndre Fischerfi 1391cdf0e10cSrcweirAC_SUBST(DISABLE_STRIP) 1392cdf0e10cSrcweir 1393cdf0e10cSrcweirdnl =================================================================== 1394cdf0e10cSrcweirdnl Build options 1395cdf0e10cSrcweirdnl =================================================================== 13960ea1a209SEike Rathke 13976f8e4455SHerbert Dürr# Disable or enable category-B librariets: nss, hunspell, hyphen, saxon, 13988bebafa9SPedro Giffuni# rhino, silgraphite. 13999ef65f0eSAndre Fischer 14009ef65f0eSAndre Fischer# Note that further below they may be enabled or disabled again by 14019ef65f0eSAndre Fischer# more specific options. 14029ef65f0eSAndre Fischer 1403ae258647SHerbert DürrENABLE_CATEGORY_B= 1404ae258647SHerbert Dürr 14059ef65f0eSAndre FischerAC_MSG_CHECKING([whether to enable category B components]) 14069ef65f0eSAndre Fischer# Category B modules (libraries): 14079ef65f0eSAndre Fischer# nss (nss) 14089ef65f0eSAndre Fischer# hunspell (hunspell) 14099ef65f0eSAndre Fischer# hyphen (hyphen) 14109ef65f0eSAndre Fischer# saxon (saxon) 14119ef65f0eSAndre Fischer# rhino (rhino) 14129ef65f0eSAndre Fischer# graphite (silgraphite) 1413f06c1a76SPedro Giffuniif test "$enable_category_b" = "yes"; then 1414ae258647SHerbert Dürr ENABLE_CATEGORY_B=YES 14159ef65f0eSAndre Fischer enable_hunspell="yes" 14169ef65f0eSAndre Fischer enable_hyphen="yes" 14179ef65f0eSAndre Fischer enable_saxon="yes" 14189ef65f0eSAndre Fischer enable_javascript="yes" 14199ef65f0eSAndre Fischer enable_graphite="yes" 142027b2fc91SAndre Fischer enable_coinmp="yes" 14213c6578e9SAndre Fischer enable_category_b_fonts="yes" 14229ef65f0eSAndre Fischer 14236f8e4455SHerbert Dürr AC_MSG_RESULT([yes: allow modules nss, hunspell, hyphen, saxon, rhino, beanshell, graphite, coinmp to be built]) 14249ef65f0eSAndre Fischerelse 14259835bf0fSPedro Giffuni # Disable libraries. 14260ea1a209SEike Rathke enable_nss_module="no" 14279ef65f0eSAndre Fischer enable_hunspell="no" 14289ef65f0eSAndre Fischer enable_hyphen="no" 14299ef65f0eSAndre Fischer enable_saxon="no" 14309ef65f0eSAndre Fischer enable_javascript="no" 14319ef65f0eSAndre Fischer enable_graphite="no" 143227b2fc91SAndre Fischer enable_coinmp="no" 14333c6578e9SAndre Fischer enable_category_b_fonts="no" 14340ea1a209SEike Rathke 14358bebafa9SPedro Giffuni AC_MSG_RESULT([no: disabled modules nss, hunspell, hyphen, saxon, rhino, graphite, coinmp]) 14360ea1a209SEike Rathkefi 1437ae258647SHerbert DürrAC_SUBST(ENABLE_CATEGORY_B) 14389ef65f0eSAndre Fischer 14399ef65f0eSAndre Fischer# gstreamer is used only via pre-installed libraries: not a problem 14400ea1a209SEike Rathke 144135779863SAriel Constenla-Hailednl =================================================================== 144235779863SAriel Constenla-Hailednl Online Update 144335779863SAriel Constenla-Hailednl =================================================================== 144435779863SAriel Constenla-HaileAC_MSG_CHECKING([whether to enable the Online Update support]) 144535779863SAriel Constenla-Haileif test "$enable_online_update" = "yes" -o "$enable_online_update" = "TRUE"; then 144635779863SAriel Constenla-Haile ENABLE_ONLINE_UPDATE="YES" 144735779863SAriel Constenla-Haile SCPDEFS="$SCPDEFS -DENABLE_ONLINE_UPDATE" 144835779863SAriel Constenla-Haile AC_MSG_RESULT([yes]) 144935779863SAriel Constenla-Haileelse 145035779863SAriel Constenla-Haile ENABLE_ONLINE_UPDATE="" 145135779863SAriel Constenla-Haile AC_MSG_RESULT([no]) 145235779863SAriel Constenla-Hailefi 145335779863SAriel Constenla-HaileAC_SUBST(ENABLE_ONLINE_UPDATE) 145435779863SAriel Constenla-Haile 145543feee13SJuergen Schmidtdnl =================================================================== 145643feee13SJuergen Schmidtdnl Unit Tests 145743feee13SJuergen Schmidtdnl =================================================================== 145843feee13SJuergen SchmidtAC_MSG_CHECKING([whether to enable unit tests]) 145943feee13SJuergen Schmidtif test "$enable_unit_tests" = "yes" -o "$enable_unit_tests" = "TRUE"; then 146043feee13SJuergen Schmidt ENABLE_UNIT_TESTS="YES" 146143feee13SJuergen Schmidt BUILD_TYPE="$BUILD_TYPE GTEST" 146243feee13SJuergen Schmidt AC_MSG_RESULT([yes]) 146343feee13SJuergen Schmidtelse 146443feee13SJuergen Schmidt ENABLE_UNIT_TESTS="" 146543feee13SJuergen Schmidt AC_MSG_RESULT([no]) 146643feee13SJuergen Schmidtfi 146743feee13SJuergen SchmidtAC_SUBST(ENABLE_UNIT_TESTS) 14680ea1a209SEike Rathke 1469cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable native CUPS support]) 1470cdf0e10cSrcweirif test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then 1471cdf0e10cSrcweir ENABLE_CUPS="TRUE" 1472cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1473cdf0e10cSrcweirelse 1474cdf0e10cSrcweir ENABLE_CUPS="" 1475cdf0e10cSrcweir AC_MSG_RESULT([no]) 1476cdf0e10cSrcweirfi 1477cdf0e10cSrcweirAC_SUBST(ENABLE_CUPS) 1478cdf0e10cSrcweir 1479cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable fontconfig support]) 1480cdf0e10cSrcweirif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then 1481cdf0e10cSrcweir ENABLE_FONTCONFIG="TRUE" 1482cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1483cdf0e10cSrcweirelse 1484cdf0e10cSrcweir ENABLE_FONTCONFIG="" 1485cdf0e10cSrcweir AC_MSG_RESULT([no]) 1486cdf0e10cSrcweirfi 1487cdf0e10cSrcweirAC_SUBST(ENABLE_FONTCONFIG) 1488cdf0e10cSrcweir 1489cdf0e10cSrcweirdnl =================================================================== 1490cdf0e10cSrcweirdnl find external tarballs. 1491cdf0e10cSrcweirdnl =================================================================== 1492cdf0e10cSrcweirif test -z $TARFILE_LOCATION; then 1493cdf0e10cSrcweir TARFILE_LOCATION="DEFAULT" 1494cdf0e10cSrcweirfi 1495cdf0e10cSrcweirAC_SUBST(TARFILE_LOCATION) 1496cdf0e10cSrcweir 1497cdf0e10cSrcweirif test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \ 1498cdf0e10cSrcweir && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then 1499cdf0e10cSrcweir DO_FETCH_TARBALLS="yes" 1500cdf0e10cSrcweirfi 1501cdf0e10cSrcweirAC_SUBST(DO_FETCH_TARBALLS) 1502cdf0e10cSrcweir 1503cdf0e10cSrcweirif test "$_os" = "WINNT"; then 1504cdf0e10cSrcweir AC_MSG_CHECKING([whether to use DirectX]) 1505549fe914SJürgen Schmidt ENABLE_DIRECT_DRAW="" 1506cdf0e10cSrcweir if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then 1507cdf0e10cSrcweir ENABLE_DIRECTX="TRUE" 1508cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1509cdf0e10cSrcweir else 1510cdf0e10cSrcweir ENABLE_DIRECTX="" 1511cdf0e10cSrcweir AC_MSG_RESULT([no]) 1512cdf0e10cSrcweir fi 1513cdf0e10cSrcweir AC_SUBST(ENABLE_DIRECTX) 1514cdf0e10cSrcweir 1515cdf0e10cSrcweir AC_MSG_CHECKING([whether to use ActiveX]) 1516cdf0e10cSrcweir if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then 1517cdf0e10cSrcweir DISABLE_ACTIVEX="" 1518cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1519cdf0e10cSrcweir else 1520cdf0e10cSrcweir DISABLE_ACTIVEX="TRUE" 1521cdf0e10cSrcweir AC_MSG_RESULT([no]) 1522cdf0e10cSrcweir fi 1523cdf0e10cSrcweir 1524cdf0e10cSrcweir AC_MSG_CHECKING([whether to use ATL]) 1525cdf0e10cSrcweir if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then 1526cdf0e10cSrcweir DISABLE_ATL="" 1527cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1528cdf0e10cSrcweir else 1529cdf0e10cSrcweir DISABLE_ATL="TRUE" 15300fd36615SAriel Constenla-Haile dnl ActiveX depends on ATL, it should be disabled 15310fd36615SAriel Constenla-Haile DISABLE_ACTIVEX="TRUE" 1532cdf0e10cSrcweir AC_MSG_RESULT([no]) 1533cdf0e10cSrcweir fi 15340fd36615SAriel Constenla-Haile 1535cdf0e10cSrcweir AC_SUBST(DISABLE_ATL) 15360fd36615SAriel Constenla-Haile AC_SUBST(DISABLE_ACTIVEX) 1537cdf0e10cSrcweir 1538cdf0e10cSrcweirfi 1539cdf0e10cSrcweir 1540cdf0e10cSrcweirdnl =================================================================== 1541cdf0e10cSrcweirdnl Disable rpath in shared libraries? 1542cdf0e10cSrcweirdnl =================================================================== 1543cdf0e10cSrcweirAC_MSG_CHECKING([whether to use RPATH in shared libraries]) 1544cdf0e10cSrcweirif test "$enable_rpath" = "no"; then 1545cdf0e10cSrcweir ENABLE_RPATH="no" 1546cdf0e10cSrcweirelse 1547cdf0e10cSrcweir ENABLE_RPATH="yes" 1548cdf0e10cSrcweirfi 1549cdf0e10cSrcweirAC_MSG_RESULT([$ENABLE_RPATH]) 1550cdf0e10cSrcweirAC_SUBST(ENABLE_RPATH) 1551cdf0e10cSrcweir 1552cdf0e10cSrcweirdnl =================================================================== 1553010ec03aSHerbert Dürrdnl Check extensions to be bundled as literal blobs 1554010ec03aSHerbert Dürrdnl =================================================================== 1555010ec03aSHerbert Dürrif test -n "$with_bundled_extension_blobs"; then 1556010ec03aSHerbert Dürr BUNDLED_EXTENSION_BLOBS="$with_bundled_extension_blobs" 15576feea343SAndre Fischerelse 1558010ec03aSHerbert Dürr BUNDLED_EXTENSION_BLOBS= 1559cdf0e10cSrcweirfi 1560010ec03aSHerbert DürrAC_SUBST(BUNDLED_EXTENSION_BLOBS) 1561010ec03aSHerbert Dürr 1562010ec03aSHerbert Dürr#dnl =================================================================== 1563010ec03aSHerbert Dürr#dnl Check extensions that are to be bundled as pre-registerd 1564010ec03aSHerbert Dürr#dnl =================================================================== 1565010ec03aSHerbert Dürrif test -n "$with_bundled_prereg_extensions"; then 1566010ec03aSHerbert Dürr BUNDLED_PREREG_EXTENSIONS="$with_bundled_prereg_extensions" 1567010ec03aSHerbert Dürrelse 1568010ec03aSHerbert Dürr BUNDLED_PREREG_EXTENSIONS= 1569010ec03aSHerbert Dürrfi 1570010ec03aSHerbert DürrAC_SUBST(BUNDLED_PREREG_EXTENSIONS) 1571010ec03aSHerbert Dürr 1572010ec03aSHerbert Dürrdnl =================================================================== 1573010ec03aSHerbert Dürrdnl Configure system provided dictionary/hyphenation/thesaurus 1574010ec03aSHerbert Dürrdnl =================================================================== 1575010ec03aSHerbert Dürr AC_MSG_CHECKING([whether to use dicts from external paths]) 1576010ec03aSHerbert Dürr if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then 1577010ec03aSHerbert Dürr AC_MSG_RESULT([yes]) 1578010ec03aSHerbert Dürr SYSTEM_DICTS=YES 1579010ec03aSHerbert Dürr AC_MSG_CHECKING([for spelling dictionary directory]) 1580010ec03aSHerbert Dürr if test -n "$with_external_dict_dir"; then 1581010ec03aSHerbert Dürr DICT_SYSTEM_DIR=file://$with_external_dict_dir 1582010ec03aSHerbert Dürr else 1583010ec03aSHerbert Dürr DICT_SYSTEM_DIR=file:///usr/share/hunspell 1584010ec03aSHerbert Dürr fi 1585010ec03aSHerbert Dürr AC_MSG_RESULT([$DICT_SYSTEM_DIR]) 1586010ec03aSHerbert Dürr AC_MSG_CHECKING([for hyphenation patterns directory]) 1587010ec03aSHerbert Dürr if test -n "$with_external_hyph_dir"; then 1588010ec03aSHerbert Dürr HYPH_SYSTEM_DIR=file://$with_external_hyph_dir 1589010ec03aSHerbert Dürr else 1590010ec03aSHerbert Dürr HYPH_SYSTEM_DIR=file:///usr/share/hyphen 1591010ec03aSHerbert Dürr fi 1592010ec03aSHerbert Dürr AC_MSG_RESULT([$HYPH_SYSTEM_DIR]) 1593010ec03aSHerbert Dürr AC_MSG_CHECKING([for thesaurus directory]) 1594010ec03aSHerbert Dürr if test -n "$with_external_thes_dir"; then 1595010ec03aSHerbert Dürr THES_SYSTEM_DIR=file://$with_external_thes_dir 1596010ec03aSHerbert Dürr else 1597010ec03aSHerbert Dürr THES_SYSTEM_DIR=file:///usr/share/mythes 1598010ec03aSHerbert Dürr fi 1599010ec03aSHerbert Dürr AC_MSG_RESULT([$THES_SYSTEM_DIR]) 1600010ec03aSHerbert Dürr else 1601010ec03aSHerbert Dürr AC_MSG_RESULT([no]) 1602010ec03aSHerbert Dürr SYSTEM_DICTS=NO 1603010ec03aSHerbert Dürr fi 1604cdf0e10cSrcweirAC_SUBST(SYSTEM_DICTS) 1605cdf0e10cSrcweirAC_SUBST(DICT_SYSTEM_DIR) 1606cdf0e10cSrcweirAC_SUBST(HYPH_SYSTEM_DIR) 1607cdf0e10cSrcweirAC_SUBST(THES_SYSTEM_DIR) 1608cdf0e10cSrcweir 1609cdf0e10cSrcweirif test $_os = "WINNT"; then 1610cdf0e10cSrcweir AC_MSG_CHECKING([Windows build environment sanity]) 1611cdf0e10cSrcweir dnl =================================================================== 1612cdf0e10cSrcweir dnl Sanity check! Native windows programs cannot use cygwin symlinks! 1613cdf0e10cSrcweir dnl =================================================================== 1614cdf0e10cSrcweir dnl As long as awk instead of $AWK is used somewhere in the sources, 1615cdf0e10cSrcweir dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin. 1616cdf0e10cSrcweir if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then 1617cdf0e10cSrcweir AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink! 1618cdf0e10cSrcweirNative windows programs cannot use cygwin symlinks. Remove the symbolic 1619cdf0e10cSrcweirlink, and copy the program to the name of the link.]) 1620cdf0e10cSrcweir fi 1621cdf0e10cSrcweir dnl =================================================================== 1622cdf0e10cSrcweir dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to 1623cdf0e10cSrcweir dnl CC and CXX but the configure checks here assume that guw.exe 1624cdf0e10cSrcweir dnl (if needed at all) is not yet present. 1625cdf0e10cSrcweir dnl =================================================================== 1626cdf0e10cSrcweir CC=`echo $CC | $SED "s/^guw.exe //"` 1627cdf0e10cSrcweir CXX=`echo $CXX | $SED "s/^guw.exe //"` 1628cdf0e10cSrcweir dnl =================================================================== 1629cdf0e10cSrcweir dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable 1630cdf0e10cSrcweir dnl $WITH_MINGWIN 1631cdf0e10cSrcweir dnl =================================================================== 1632cdf0e10cSrcweir if test -n "$CC";then 1633cdf0e10cSrcweir if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then 1634cdf0e10cSrcweir WITH_MINGWIN="yes" 1635cdf0e10cSrcweir fi 1636cdf0e10cSrcweir fi 1637cdf0e10cSrcweir dnl =================================================================== 1638cdf0e10cSrcweir if test "$WITH_MINGWIN" = "yes" ; then 1639cdf0e10cSrcweir if test -z "$CC"; then 1640cdf0e10cSrcweir CC="gcc -mno-cygwin" 1641cdf0e10cSrcweir CXX="g++ -mno-cygwin" 1642cdf0e10cSrcweir fi 1643cdf0e10cSrcweir fi 1644cdf0e10cSrcweir AC_MSG_RESULT([ok]) 1645cdf0e10cSrcweirfi 1646cdf0e10cSrcweirAC_SUBST(WITH_MINGWIN) 1647cdf0e10cSrcweir 1648cdf0e10cSrcweirdnl =================================================================== 1649cdf0e10cSrcweirdnl Extra check for Windows. cygwin builds need gcc to build dmake 1650cdf0e10cSrcweirdnl and g++ to build guw.exe although MS cl (or MinGW) is used to 1651cdf0e10cSrcweirdnl build OOo. 1652cdf0e10cSrcweirdnl =================================================================== 1653cdf0e10cSrcweirif test "$_os" = "WINNT" ; then 1654cdf0e10cSrcweir AC_MSG_CHECKING([for cygwin gcc/g++]) 1655cdf0e10cSrcweir if which gcc > /dev/null && which g++ > /dev/null ; then 1656cdf0e10cSrcweir AC_MSG_RESULT([found]) 1657cdf0e10cSrcweir else 1658cdf0e10cSrcweir AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.]) 1659cdf0e10cSrcweir fi 1660cdf0e10cSrcweirfi 1661cdf0e10cSrcweir 1662cdf0e10cSrcweir 1663cdf0e10cSrcweirdnl =================================================================== 1664cdf0e10cSrcweirdnl Check whether the bash shell can be used. 1665cdf0e10cSrcweirdnl =================================================================== 1666cdf0e10cSrcweirAC_PATH_PROG(SHELLPATH, bash) 1667cdf0e10cSrcweirif test -z "$SHELLPATH"; then 1668cdf0e10cSrcweir AC_MSG_ERROR([bash not found in \$PATH]) 1669cdf0e10cSrcweirelse 1670cdf0e10cSrcweir SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"` 1671cdf0e10cSrcweirfi 1672cdf0e10cSrcweirAC_SUBST(SHELLPATH) 1673cdf0e10cSrcweir 1674cdf0e10cSrcweirdnl =================================================================== 1675cdf0e10cSrcweirdnl Checks for c compiler, 1676cdf0e10cSrcweirdnl The check for the c++ compiler is later on. 1677cdf0e10cSrcweirdnl =================================================================== 1678cdf0e10cSrcweirAC_MSG_CHECKING([gcc home]) 1679cdf0e10cSrcweirif test -z "$with_gcc_home"; then 1680cdf0e10cSrcweir GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` 1681cdf0e10cSrcweirelse 1682cdf0e10cSrcweir GCC_HOME="$with_gcc_home" 1683cdf0e10cSrcweirfi 1684cdf0e10cSrcweirAC_MSG_RESULT($GCC_HOME) 1685cdf0e10cSrcweirAC_SUBST(GCC_HOME) 1686cdf0e10cSrcweir 1687cdf0e10cSrcweirsave_CC=$CC 1688cdf0e10cSrcweirsave_CXX=$CXX 1689cdf0e10cSrcweir 1690cdf0e10cSrcweirif test -n "$with_gcc_home"; then 1691cdf0e10cSrcweir if test -z "$CC"; then 1692cdf0e10cSrcweir CC="$with_gcc_home/bin/gcc" 1693cdf0e10cSrcweir fi 1694cdf0e10cSrcweirfi 1695cdf0e10cSrcweir 1696cdf0e10cSrcweirdnl The following checks for gcc, cc and then cl (if it weren't guarded for win32) 1697cdf0e10cSrcweirif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 1698cdf0e10cSrcweir AC_PROG_CC 1699cdf0e10cSrcweirfi 1700cdf0e10cSrcweir 1701bcc22a4cSDamjan Jovanovicdnl Clang detection on supported platforms 1702bcc22a4cSDamjan Jovanovicif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then 170328633775SPedro Giffuni if $CC --version 2>&1 | $GREP clang > /dev/null ; then 1704c25219e0SPedro Giffuni COM_IS=CLANG 1705c25219e0SPedro Giffuni else 1706c25219e0SPedro Giffuni COM_IS=GCC 1707bcc22a4cSDamjan Jovanovic fi 1708bcc22a4cSDamjan Jovanovic AC_SUBST(COM_IS) 1709bcc22a4cSDamjan Jovanovicfi 1710bcc22a4cSDamjan Jovanovic 1711bcc22a4cSDamjan Jovanovicif test "$_os" = "FreeBSD"; then 1712bcc22a4cSDamjan Jovanovic FBSD_GCC_RPATH= 1713bcc22a4cSDamjan Jovanovic if "$COM_IS" = "GCC"; then 1714c25219e0SPedro Giffuni rpath=`$CC --print-file-name libstdc++.so` 1715c25219e0SPedro Giffuni rpath=`realpath $rpath` 1716c25219e0SPedro Giffuni rpath=`dirname $rpath` 1717c25219e0SPedro Giffuni if test "$rpath" != "/usr/lib" ; then 1718c25219e0SPedro Giffuni FBSD_GCC_RPATH="-Wl,-rpath=$rpath" 1719c25219e0SPedro Giffuni fi 1720c25219e0SPedro Giffuni fi 1721c25219e0SPedro Giffuni AC_SUBST(FBSD_GCC_RPATH) 1722c25219e0SPedro Giffunifi 1723c25219e0SPedro Giffuni 1724cdf0e10cSrcweirCOMPATH=`dirname "$CC"` 1725cdf0e10cSrcweirif test "$COMPATH" = "." ; then 1726cdf0e10cSrcweir AC_PATH_PROGS(COMPATH, $CC) 1727cdf0e10cSrcweir dnl double square bracket to get single because of M4 quote... 1728cdf0e10cSrcweir COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`; 1729cdf0e10cSrcweirfi 17301e1ac450SHerbert DürrCC_PATH="$COMPATH/" 1731cdf0e10cSrcweirCOMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`; 1732cdf0e10cSrcweir 1733cdf0e10cSrcweirdnl =================================================================== 1734cdf0e10cSrcweirdnl Test the gcc version, 3 is OK 1735cdf0e10cSrcweirdnl =================================================================== 1736cdf0e10cSrcweirGCCVER=20995 1737cdf0e10cSrcweirif test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then 1738cdf0e10cSrcweir AC_MSG_CHECKING([the GNU gcc compiler version]) 1739cdf0e10cSrcweir _gcc_version=`$CC -dumpversion` 1740cdf0e10cSrcweir _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` 1741cdf0e10cSrcweir GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 1742cdf0e10cSrcweir 1743cdf0e10cSrcweir if test "$_gcc_major" -lt "3"; then 1744cdf0e10cSrcweir AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler]) 1745cdf0e10cSrcweir else 1746cdf0e10cSrcweir if test "$GCCVER" -eq "030203"; then 1747cdf0e10cSrcweir if test "$ENABLE_SYMBOLS" = "SMALL"; then 1748cdf0e10cSrcweir AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.]) 1749cdf0e10cSrcweir fi 1750cdf0e10cSrcweir fi 1751cdf0e10cSrcweir fi 17521e1ac450SHerbert Dürr if test "$_os" = "Darwin" ; then 1753cdf0e10cSrcweir AC_MSG_RESULT([implicitly using CC=$CC]) 1754cdf0e10cSrcweir else 1755cdf0e10cSrcweir AC_MSG_RESULT([checked (gcc $_gcc_version)]) 1756cdf0e10cSrcweir fi 1757cdf0e10cSrcweir if test "$_os" = "SunOS"; then 1758cdf0e10cSrcweir AC_MSG_CHECKING([gcc linker]) 175928633775SPedro Giffuni if $CC -Wl,--version 2>&1 |head -n 1| $GREP -v GNU > /dev/null;then 1760cdf0e10cSrcweir AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris]) 1761cdf0e10cSrcweir fi 1762cdf0e10cSrcweir AC_MSG_RESULT([ok (GNU ld)]) 1763cdf0e10cSrcweir fi 1764cdf0e10cSrcweirfi 1765cdf0e10cSrcweirAC_SUBST(GCCVER) 1766cdf0e10cSrcweir 1767cdf0e10cSrcweirHAVE_LD_BSYMBOLIC_FUNCTIONS= 1768cdf0e10cSrcweirif test "$GCC" = "yes"; then 1769cdf0e10cSrcweir AC_MSG_CHECKING( for -Bsymbolic-functions linker support ) 1770cdf0e10cSrcweir bsymbolic_functions_ldflags_save=$LDFLAGS 1771cdf0e10cSrcweir LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" 1772cdf0e10cSrcweir AC_LINK_IFELSE([AC_LANG_PROGRAM([ 1773cdf0e10cSrcweir #include <stdio.h> 1774cdf0e10cSrcweir ],[ 1775cdf0e10cSrcweir printf ("hello world\n"); 1776cdf0e10cSrcweir ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, []) 1777cdf0e10cSrcweir if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then 1778cdf0e10cSrcweir AC_MSG_RESULT( found ) 1779cdf0e10cSrcweir else 1780cdf0e10cSrcweir AC_MSG_RESULT( not found ) 1781cdf0e10cSrcweir fi 1782cdf0e10cSrcweir LDFLAGS=$bsymbolic_functions_ldflags_save 1783cdf0e10cSrcweirfi 1784cdf0e10cSrcweirAC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS) 1785cdf0e10cSrcweir 1786cdf0e10cSrcweirdnl =================================================================== 1787cdf0e10cSrcweirdnl Set the ENABLE_PCH variable. (Activate --enable-pch) 1788cdf0e10cSrcweirdnl =================================================================== 1789cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable pch feature]) 1790cdf0e10cSrcweirif test -n "$enable_pch" && test "$enable_pch" != "no"; then 1791cdf0e10cSrcweir if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 1792cdf0e10cSrcweir ENABLE_PCH="TRUE" 1793cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1794cdf0e10cSrcweirdnl There is no PCH support in GCC versions prior to this 1795cdf0e10cSrcweir elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then 1796cdf0e10cSrcweir ENABLE_PCH="TRUE" 1797cdf0e10cSrcweir AC_MSG_RESULT([yes]) 1798cdf0e10cSrcweir else 1799cdf0e10cSrcweir ENABLE_PCH="" 1800cdf0e10cSrcweir AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler]) 1801cdf0e10cSrcweir fi 1802cdf0e10cSrcweirelse 1803cdf0e10cSrcweir ENABLE_PCH="" 1804cdf0e10cSrcweir AC_MSG_RESULT([no]) 1805cdf0e10cSrcweirfi 1806cdf0e10cSrcweirAC_SUBST(ENABLE_PCH) 1807cdf0e10cSrcweir 1808cdf0e10cSrcweirdnl =================================================================== 1809cdf0e10cSrcweirdnl Search all the common names for GNU make 1810cdf0e10cSrcweirdnl =================================================================== 1811cdf0e10cSrcweirAC_MSG_CHECKING([for GNU make]) 1812308295dbSJim Jagielskifor a in "$MAKE" "$GNUMAKE" make gmake gnumake; do 181328633775SPedro Giffuni $a --version 2> /dev/null | $GREP GNU 2>&1 > /dev/null 1814cdf0e10cSrcweir if test $? -eq 0; then 1815cdf0e10cSrcweir GNUMAKE=$a 1816cdf0e10cSrcweir break 1817cdf0e10cSrcweir fi 1818cdf0e10cSrcweirdone 1819cdf0e10cSrcweirAC_MSG_RESULT($GNUMAKE) 1820cdf0e10cSrcweirif test -z "$GNUMAKE"; then 1821cdf0e10cSrcweir AC_MSG_ERROR([not found. install GNU make.]) 1822cdf0e10cSrcweirfi 1823cdf0e10cSrcweir 1824cdf0e10cSrcweirAC_MSG_CHECKING([the GNU make version]) 182528633775SPedro Giffuni_make_version=`$GNUMAKE --version | $GREP GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 1826cdf0e10cSrcweir_make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 1827cdf0e10cSrcweirif test "$_make_longver" -ge "038100" ; then 1828cdf0e10cSrcweir AC_MSG_RESULT([$GNUMAKE $_make_version]) 1829cdf0e10cSrcweirelse 1830cdf0e10cSrcweir AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed]) 1831cdf0e10cSrcweirfi 1832cdf0e10cSrcweirAC_SUBST(GNUMAKE) 1833cdf0e10cSrcweir 1834fb6b49d1SJürgen Schmidtdnl =================================================================== 1835fb6b49d1SJürgen Schmidtdnl Search for a pre-installed dmake 1836fb6b49d1SJürgen Schmidtdnl =================================================================== 1837fb6b49d1SJürgen SchmidtAC_MSG_CHECKING([for dmake]) 183825c8c0abSAndrea PescettiDMAKE="no" 183925c8c0abSAndrea Pescetti# Override system dmake if --with-dmake-path or --with-dmake-url is used. 184025c8c0abSAndrea Pescettiif test -z "$with_dmake_path" && test -z "$with_dmake_url"; then 184125c8c0abSAndrea Pescetti AC_PATH_PROG(DMAKE, dmake, no) 184225c8c0abSAndrea Pescetti IS_SYSTEM_DMAKE=NO 184325c8c0abSAndrea Pescetti if test "$DMAKE" != "no"; then 184425c8c0abSAndrea Pescetti AC_MSG_RESULT([using system dmake]) 184525c8c0abSAndrea Pescetti DMAKE_PATH="$DMAKE" 184625c8c0abSAndrea Pescetti IS_SYSTEM_DMAKE=YES 184725c8c0abSAndrea Pescetti fi 1848aee29faaSAriel Constenla-Haileelif test -n "$with_dmake_path" ; then 1849fb6b49d1SJürgen Schmidt # Did not find pre-installed dmake. 1850fb6b49d1SJürgen Schmidt # Is it at a nonstandard location provided by --with-dmake-path ? 1851aee29faaSAriel Constenla-Haile AC_MSG_NOTICE([looking for dmake at $DMAKE_PATH]) 1852aee29faaSAriel Constenla-Haile if test -x "$with_dmake_path" ; then 1853aee29faaSAriel Constenla-Haile AC_MSG_RESULT([using user provided dmake]) 1854aee29faaSAriel Constenla-Haile DMAKE=$with_dmake_path 1855fb6b49d1SJürgen Schmidt fi 1856fb6b49d1SJürgen Schmidtfi 1857fb6b49d1SJürgen Schmidt 1858fb6b49d1SJürgen SchmidtDMAKE_URL= 1859fb6b49d1SJürgen Schmidtif test "$DMAKE" = "no"; then 1860fb6b49d1SJürgen Schmidt AC_MSG_NOTICE([no system or user-provided dmake found]) 1861fb6b49d1SJürgen Schmidt # Check if a URL was supplied from which we can download the source and compile it. 1862fb6b49d1SJürgen Schmidt if test -n "$with_dmake_url" ; then 1863fb6b49d1SJürgen Schmidt # At this moment we can not verify the URL or the content that we want to download. 1864fb6b49d1SJürgen Schmidt # Neither can we apply the test below for ruling out that it is the SunStudio dmake. 1865fb6b49d1SJürgen Schmidt DMAKE_URL=$with_dmake_url 1866fb6b49d1SJürgen Schmidt AC_MSG_RESULT([dmake will be downloaded and compiled in bootstrap]) 1867fb6b49d1SJürgen Schmidt DMAKE= 1868fb6b49d1SJürgen Schmidt else 1869063b5acfSAndrea Pescetti 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.]) 1870fb6b49d1SJürgen Schmidt BUILD_DMAKE=YES 1871fb6b49d1SJürgen Schmidt fi 1872fb6b49d1SJürgen Schmidtelse 1873fb6b49d1SJürgen Schmidt AC_MSG_CHECKING([whether the found dmake is the right dmake]) 1874fb6b49d1SJürgen Schmidt # we need to find out whether that dmake we found is "our" dmake 1875fb6b49d1SJürgen Schmidt # or the dmake from Sun's SunStudio Compiler which is something 1876fb6b49d1SJürgen Schmidt # different 1877fb6b49d1SJürgen Schmidt # This test _should_ work because the one accepts -V (ours) and one 1878fb6b49d1SJürgen Schmidt # (the other) not... 187928633775SPedro Giffuni $DMAKE -V 2>/dev/null | $GREP -E 'dmake(.exe)? .* Version .*' >/dev/null 1880fb6b49d1SJürgen Schmidt if test $? -eq 0; then 1881fb6b49d1SJürgen Schmidt BUILD_DMAKE=NO 1882fb6b49d1SJürgen Schmidt AC_MSG_RESULT([yes]) 1883fb6b49d1SJürgen Schmidt AC_MSG_CHECKING([the dmake version]) 1884fb6b49d1SJürgen Schmidt DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` 1885fb6b49d1SJürgen Schmidt if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then 1886fb6b49d1SJürgen Schmidt AC_MSG_RESULT([OK, >= 4.11]) 1887fb6b49d1SJürgen Schmidt elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ 1888fb6b49d1SJürgen Schmidt test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then 1889fb6b49d1SJürgen Schmidt AC_MSG_RESULT([OK, >= 4.11]) 1890fb6b49d1SJürgen Schmidt else 1891fb6b49d1SJürgen Schmidt AC_MSG_ERROR([too old. >= 4.11 is needed]) 1892fb6b49d1SJürgen Schmidt DMAKE=no 1893fb6b49d1SJürgen Schmidt fi 1894fb6b49d1SJürgen Schmidt else 1895fb6b49d1SJürgen Schmidt AC_MSG_WARN([no]) 1896fb6b49d1SJürgen Schmidt DMAKE=no 1897fb6b49d1SJürgen Schmidt fi 1898fb6b49d1SJürgen Schmidtfi 1899fb6b49d1SJürgen Schmidtif test "$DMAKE" = "no"; then 1900fb6b49d1SJürgen Schmidt AC_MSG_ERROR([please use --with-dmake-path or --with-dmake-url to specify dmake executable or source]) 1901fb6b49d1SJürgen Schmidtfi 1902fb6b49d1SJürgen SchmidtAC_SUBST(DMAKE_URL) 1903aee29faaSAriel Constenla-HaileAC_SUBST(DMAKE_PATH) 1904aee29faaSAriel Constenla-HaileAC_SUBST(IS_SYSTEM_DMAKE) 1905fb6b49d1SJürgen Schmidt 1906fb6b49d1SJürgen Schmidt 1907cdf0e10cSrcweirdnl =================================================================== 190881996412SPedro Giffunidnl Search all the common names for GNU or BSD tar 1909cdf0e10cSrcweirdnl =================================================================== 191046a19ddeSPedro GiffuniAC_MSG_CHECKING([for GNU or compatible BSD tar]) 191181996412SPedro Giffunifor a in $GNUTAR gtar gnutar bsdtar tar; do 191228633775SPedro Giffuni $a --version 2> /dev/null | $EGREP "GNU|libarchive" 2>&1 > /dev/null 1913cdf0e10cSrcweir if test $? -eq 0; then 1914cdf0e10cSrcweir GNUTAR=$a 1915cdf0e10cSrcweir break 1916cdf0e10cSrcweir fi 1917cdf0e10cSrcweirdone 1918cdf0e10cSrcweirAC_MSG_RESULT($GNUTAR) 1919cdf0e10cSrcweirif test -z "$GNUTAR"; then 1920cdf0e10cSrcweir AC_MSG_ERROR([not found. install GNU tar.]) 1921cdf0e10cSrcweirfi 1922cdf0e10cSrcweir 1923cdf0e10cSrcweirAC_SUBST(GNUTAR) 1924cdf0e10cSrcweir 1925cdf0e10cSrcweirdnl =================================================================== 1926cdf0e10cSrcweirdnl Test the solaris compiler version 1927cdf0e10cSrcweirdnl =================================================================== 1928cdf0e10cSrcweirif test "$_os" = "SunOS"; then 1929cdf0e10cSrcweir if test "$CC" = "cc"; then 1930cdf0e10cSrcweir AC_PATH_PROGS(_cc, cc) 1931cdf0e10cSrcweir COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` 1932cdf0e10cSrcweir AC_MSG_CHECKING([the SunStudio C/C++ compiler version]) 1933cdf0e10cSrcweir dnl cc -V outputs to standard error!!!! 193428633775SPedro Giffuni _sunstudio_string=`$CC -V 2>&1 | $GREP '^cc' | sed -e 's/.* C //'` 1935cdf0e10cSrcweir _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` 1936cdf0e10cSrcweir _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` 1937cdf0e10cSrcweir if test "$_sunstudio_major" != "5"; then 1938cdf0e10cSrcweir AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) 1939cdf0e10cSrcweir else 1940cdf0e10cSrcweir _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" }'` 1941cdf0e10cSrcweir if test "$_sunstudio_minor" = "false"; then 1942cdf0e10cSrcweir AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) 1943cdf0e10cSrcweir else 1944cdf0e10cSrcweir dnl compiler will do 1945cdf0e10cSrcweir AC_MSG_RESULT([checked]) 1946cdf0e10cSrcweir fi 1947cdf0e10cSrcweir fi 1948cdf0e10cSrcweir fi 1949cdf0e10cSrcweirfi 1950cdf0e10cSrcweir 1951cdf0e10cSrcweirif test "$GCC" = "yes"; then 1952cdf0e10cSrcweir AC_MSG_CHECKING( for --hash-style=both linker support ) 1953cdf0e10cSrcweir hash_style_ldflags_save=$LDFLAGS 1954cdf0e10cSrcweir LDFLAGS="$LDFLAGS -Wl,--hash-style=both" 1955cdf0e10cSrcweir AC_LINK_IFELSE([AC_LANG_PROGRAM([ 1956cdf0e10cSrcweir #include <stdio.h> 1957cdf0e10cSrcweir ],[ 1958cdf0e10cSrcweir printf ("hello world\n"); 1959cdf0e10cSrcweir ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE) 1960cdf0e10cSrcweir if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then 1961cdf0e10cSrcweir AC_MSG_RESULT( found ) 1962cdf0e10cSrcweir else 1963cdf0e10cSrcweir AC_MSG_RESULT( not found ) 1964cdf0e10cSrcweir fi 1965cdf0e10cSrcweir LDFLAGS=$hash_style_ldflags_save 1966cdf0e10cSrcweirfi 1967cdf0e10cSrcweirAC_SUBST(HAVE_LD_HASH_STYLE) 1968cdf0e10cSrcweir 1969cdf0e10cSrcweirdnl =================================================================== 1970cdf0e10cSrcweirdnl Test the Compaq compiler for OSF1 1971cdf0e10cSrcweirdnl =================================================================== 1972cdf0e10cSrcweirif test "$_os" = "OSF1"; then 1973cdf0e10cSrcweir if test "$CC" = "cc"; then 1974cdf0e10cSrcweir AC_PATH_PROGS(_cc, cc) 1975cdf0e10cSrcweir COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` 1976cdf0e10cSrcweir AC_MSG_WARN([******* $_cc , $COMPATH]) 1977cdf0e10cSrcweir AC_MSG_CHECKING([the Compaq C compiler version]) 1978cdf0e10cSrcweir dnl cc -V outputs to standard error!!!! 1979cdf0e10cSrcweir _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'` 1980cdf0e10cSrcweir _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` 1981cdf0e10cSrcweir if test "$_compaqc_major" != "T6"; then 1982cdf0e10cSrcweir AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler]) 1983cdf0e10cSrcweir else 1984cdf0e10cSrcweir dnl compiler will do 1985cdf0e10cSrcweir AC_MSG_RESULT([checked]) 1986cdf0e10cSrcweir fi 1987cdf0e10cSrcweir fi 1988cdf0e10cSrcweirfi 1989cdf0e10cSrcweir 1990cdf0e10cSrcweirdnl =================================================================== 1991cdf0e10cSrcweirdnl Check whether there's a Perl version available. 1992cdf0e10cSrcweirdnl =================================================================== 1993cdf0e10cSrcweirif test -z "$with_perl_home"; then 1994cdf0e10cSrcweir AC_PATH_PROG(PERL, perl) 1995cdf0e10cSrcweirelse 1996cdf0e10cSrcweir if test "$_os" = "WINNT"; then 1997cdf0e10cSrcweir with_perl_home=`cygpath -u "$with_perl_home"` 1998cdf0e10cSrcweir fi 1999cdf0e10cSrcweir _perl_path="$with_perl_home/bin/perl" 2000cdf0e10cSrcweir if test -x "$_perl_path"; then 2001cdf0e10cSrcweir PERL=$_perl_path 2002cdf0e10cSrcweir else 2003cdf0e10cSrcweir AC_MSG_ERROR([$_perl_path not found]) 2004cdf0e10cSrcweir fi 2005cdf0e10cSrcweirfi 2006cdf0e10cSrcweir 2007cdf0e10cSrcweirdnl =================================================================== 2008cdf0e10cSrcweirdnl Testing for Perl version 5 or greater. 2009cdf0e10cSrcweirdnl $] is the perl version variable, it is returned as an integer 2010cdf0e10cSrcweirdnl =================================================================== 2011cdf0e10cSrcweirif test "$PERL"; then 2012cdf0e10cSrcweir AC_MSG_CHECKING([the Perl version]) 2013cdf0e10cSrcweir ${PERL} -e "exit($]);" 2014cdf0e10cSrcweir _perl_version=$? 2015cdf0e10cSrcweir if test "$_perl_version" -lt 5; then 2016cdf0e10cSrcweir AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl]) 2017cdf0e10cSrcweir fi 2018cdf0e10cSrcweir AC_MSG_RESULT([checked (perl $_perl_version)]) 2019cdf0e10cSrcweirelse 2020cdf0e10cSrcweir AC_MSG_ERROR([Perl not found, install version 5 of Perl]) 2021cdf0e10cSrcweirfi 2022cdf0e10cSrcweirAC_SUBST(PERL) 2023cdf0e10cSrcweir 2024cdf0e10cSrcweirdnl =================================================================== 2025cdf0e10cSrcweirdnl Testing for required Perl modules 2026e6e5b0b8SAndre Fischerdnl The list of required Perl modules is documented here: 2027e6e5b0b8SAndre Fischerdnl http://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO#General_Build_Requirements 2028cdf0e10cSrcweirdnl =================================================================== 2029cdf0e10cSrcweirAC_MSG_CHECKING([for required Perl modules]) 20309b3da915SDamjan Jovanovicif `$PERL -e 'use Archive::Zip; 20319b3da915SDamjan Jovanovic use LWP::UserAgent; 20329b3da915SDamjan Jovanovic use XML::Parser; 20339b3da915SDamjan Jovanovic use Digest::SHA; 20349b3da915SDamjan Jovanovic use Digest::MD5; 20359b3da915SDamjan Jovanovic use LWP::Protocol::https;'>/dev/null 2>&1`; then 2036cdf0e10cSrcweir AC_MSG_RESULT([all modules found]) 2037cdf0e10cSrcweirelse 2038e6e5b0b8SAndre Fischer # Find out which modules are missing. 2039e6e5b0b8SAndre Fischer missing_perl_modules= 2040e6e5b0b8SAndre Fischer if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then 2041e6e5b0b8SAndre Fischer missing_perl_modules=Archive::Zip 2042e6e5b0b8SAndre Fischer fi 2043e6e5b0b8SAndre Fischer if ! `$PERL -e 'use LWP::UserAgent;'>/dev/null 2>&1`; then 2044e6e5b0b8SAndre Fischer missing_perl_modules="$missing_perl_modules LWP::UserAgent" 2045e6e5b0b8SAndre Fischer fi 2046e6e5b0b8SAndre Fischer if ! `$PERL -e 'use XML::Parser;'>/dev/null 2>&1`; then 2047e6e5b0b8SAndre Fischer missing_perl_modules="$missing_perl_modules XML::Parser" 2048fec5e19eSarielch fi 2049fec5e19eSarielch if ! `$PERL -e 'use Digest::SHA;'>/dev/null 2>&1`; then 2050fec5e19eSarielch missing_perl_modules="$missing_perl_modules Digest::SHA" 2051fec5e19eSarielch fi 2052fec5e19eSarielch if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then 2053fec5e19eSarielch missing_perl_modules="$missing_perl_modules Digest::MD5" 2054fec5e19eSarielch fi 2055fec5e19eSarielch if ! `$PERL -e 'use LWP::Protocol::https;'>/dev/null 2>&1`; then 2056fec5e19eSarielch missing_perl_modules="$missing_perl_modules LWP::Protocol::https" 2057e6e5b0b8SAndre Fischer fi 2058e6e5b0b8SAndre Fischer AC_MSG_ERROR([ 2059e6e5b0b8SAndre Fischer The missing Perl modules are: $missing_perl_modules 2060e6e5b0b8SAndre Fischer Install them as superuser/administrator with "cpan -i $missing_perl_modules"]) 2061cdf0e10cSrcweirfi 2062cdf0e10cSrcweir 2063cdf0e10cSrcweirdnl =================================================================== 2064cdf0e10cSrcweirdnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT 2065cdf0e10cSrcweirdnl =================================================================== 2066cdf0e10cSrcweirif test "$_os" = "WINNT"; then 2067cdf0e10cSrcweir if test "$WITH_MINGWIN" != "yes"; then 2068cdf0e10cSrcweir AC_MSG_CHECKING([for friendly registry keys]) 2069cdf0e10cSrcweir # VS.Net 2003, VS.Net 2005 2070cdf0e10cSrcweir if test -z "$with_cl_home"; then 2071cdf0e10cSrcweir vctest=`./oowintool --msvc-productdir`; 2072cdf0e10cSrcweir if test -x "$vctest/bin/cl.exe"; then 2073cdf0e10cSrcweir with_cl_home=$vctest; 2074cdf0e10cSrcweir fi 2075cdf0e10cSrcweir else 2076cdf0e10cSrcweir with_cl_home=`cygpath -u "$with_cl_home"` 2077cdf0e10cSrcweir fi 2078cdf0e10cSrcweir AC_MSG_RESULT([done]) 2079cdf0e10cSrcweir 2080cdf0e10cSrcweir dnl =========================================================== 2081cdf0e10cSrcweir dnl Check for mspdb71.dll/mspdb80.dll 2082cdf0e10cSrcweir dnl =========================================================== 2083cdf0e10cSrcweir dnl .NET 2003/5/8 Compiler 2084cdf0e10cSrcweir if test -n "$with_mspdb_path";then 2085cdf0e10cSrcweir with_mspdb_path=`cygpath -u "$with_mspdb_path"` 2086cdf0e10cSrcweir fi 2087cdf0e10cSrcweir if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then 2088cdf0e10cSrcweir MSPDB_PATH="$with_mspdb_path" 2089cdf0e10cSrcweir fi 2090cdf0e10cSrcweir dnl .NET 2003 case 2091cdf0e10cSrcweir if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then 2092cdf0e10cSrcweir MSPDB_PATH="$with_cl_home/../Common7/IDE" 2093cdf0e10cSrcweir fi 2094cdf0e10cSrcweir dnl .NET 2005/2008 case 2095cdf0e10cSrcweir if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then 2096cdf0e10cSrcweir MSPDB_PATH="$with_cl_home/../Common7/IDE" 2097cdf0e10cSrcweir fi 2098cdf0e10cSrcweir dnl Windows SDK 6.0 case 2099cdf0e10cSrcweir if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then 2100cdf0e10cSrcweir MSPDB_PATH="$with_cl_home/bin" 2101cdf0e10cSrcweir fi 2102cdf0e10cSrcweir 2103cdf0e10cSrcweir if test -z "$MSPDB_PATH";then 2104cdf0e10cSrcweir dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty 2105cdf0e10cSrcweir AC_PATH_PROG(MSPDB_PATH, mspdb80.dll) 2106cdf0e10cSrcweir AC_PATH_PROG(MSPDB_PATH, mspdb71.dll) 2107cdf0e10cSrcweir MSPDB_PATH=`dirname "$MSPDB_PATH"` 2108cdf0e10cSrcweir fi 2109cdf0e10cSrcweir 2110cdf0e10cSrcweir if test -z "$MSPDB_PATH"; then 2111cdf0e10cSrcweir AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path]) 2112cdf0e10cSrcweir fi 2113cdf0e10cSrcweir MSPDB_PATH=`cygpath -d "$MSPDB_PATH"` 2114cdf0e10cSrcweir MSPDB_PATH=`cygpath -u "$MSPDB_PATH"` 2115cdf0e10cSrcweir dnl The path needs to be added before cl is called 2116cdf0e10cSrcweir PATH="$MSPDB_PATH:$PATH" 2117cdf0e10cSrcweir 2118cdf0e10cSrcweir AC_MSG_CHECKING([the Microsoft C/C++ Compiler]) 2119cdf0e10cSrcweir if test -x "$with_cl_home/bin/cl.exe"; then 2120cdf0e10cSrcweir CC="$with_cl_home/bin/cl.exe" 2121cdf0e10cSrcweir else 2122cdf0e10cSrcweir AC_PATH_PROG(CC, cl.exe) 2123cdf0e10cSrcweir fi 2124cdf0e10cSrcweir if test -e "$CC"; then 2125cdf0e10cSrcweir # This gives us a posix path with 8.3 filename restrictions 2126cdf0e10cSrcweir CC=`cygpath -d "$CC"` 2127cdf0e10cSrcweir CC=`cygpath -u "$CC"` 2128cdf0e10cSrcweir # Remove /cl.exe from CC case insensitive 2129cdf0e10cSrcweir AC_MSG_RESULT([found ($CC)]) 2130cdf0e10cSrcweir COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'` 2131cdf0e10cSrcweir export INCLUDE=`cygpath -d "$COMPATH/Include"` 2132cdf0e10cSrcweir dnl Check which Microsoft C/C++ compiler is found 2133cdf0e10cSrcweir AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler]) 2134cdf0e10cSrcweirdnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out. 21352c2ad1e6SHerbert Dürr CCTXTVER=`$CC 2>&1 | head -n1` 21362c2ad1e6SHerbert Dürr CCNUMVER=`echo $CCTXTVER | $AWK "/Microsoft/ && /..\\...\\...../ { 2137cdf0e10cSrcweir x = match( \\\$0, /..\\...\\...../ ) 2138cdf0e10cSrcweir CCversion = substr( \\\$0, RSTART, RLENGTH) 2139cdf0e10cSrcweir tokencount = split (CCversion,vertoken,\".\") 2140cdf0e10cSrcweir for ( i = 1 ; i <= tokencount ; i++ ) { 2141cdf0e10cSrcweir printf (\"%04d\",vertoken[[i]] ) 2142cdf0e10cSrcweir } 2143cdf0e10cSrcweir }"` 21442c2ad1e6SHerbert Dürr AC_MSG_RESULT([found Compiler version $CCNUMVER in \"$CCTXTVER\"]) 2145cdf0e10cSrcweir if test "$CCNUMVER" -ge "001500000000"; then 2146cdf0e10cSrcweir COMEX=12 2147cdf0e10cSrcweir MSVSVER=2008 2148cdf0e10cSrcweir AC_MSG_RESULT([found .NET 2008 / VS 9.0.]) 2149cdf0e10cSrcweir else 21502c2ad1e6SHerbert Dürr AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2008.]) 2151cdf0e10cSrcweir fi 2152cdf0e10cSrcweir else 2153cdf0e10cSrcweir AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.]) 2154cdf0e10cSrcweir fi 2155cdf0e10cSrcweir else 2156cdf0e10cSrcweir AC_MSG_CHECKING([the Mingwin32 C++ Compiler]) 2157cdf0e10cSrcweir if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then 2158cdf0e10cSrcweir AC_MSG_RESULT([found.]) 215928633775SPedro Giffuni if $CC -dumpspecs | $GREP -q "mno-cygwin"; then 2160cdf0e10cSrcweir USE_MINGW="cygwin" 2161cdf0e10cSrcweir else 2162cdf0e10cSrcweir USE_MINGW="pure-mingw" 2163cdf0e10cSrcweir fi 2164cdf0e10cSrcweir else 2165cdf0e10cSrcweir AC_MSG_ERROR([Mingwin32 C++ Compiler not found.]) 2166cdf0e10cSrcweir fi 2167cdf0e10cSrcweir fi 2168cdf0e10cSrcweirfi 2169cdf0e10cSrcweirAC_SUBST(COMEX) 2170cdf0e10cSrcweirAC_SUBST(MSPDB_PATH) 2171cdf0e10cSrcweirAC_SUBST(USE_MINGW) 2172cdf0e10cSrcweir 2173cdf0e10cSrcweirdnl =================================================================== 2174cdf0e10cSrcweirdnl .NET needs special treatment 2175cdf0e10cSrcweirdnl =================================================================== 2176cdf0e10cSrcweirif test "$_os" = "WINNT"; then 2177cdf0e10cSrcweirif test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then 2178cdf0e10cSrcweir dnl Check midl.exe 2179cdf0e10cSrcweir AC_PATH_PROG(MIDL_PATH, midl.exe) 2180cdf0e10cSrcweir if test -n "$MIDL_PATH";then 2181cdf0e10cSrcweir MIDL_PATH=`dirname "$MIDL_PATH"` 2182cdf0e10cSrcweir fi 2183cdf0e10cSrcweir if test -n "$with_midl_path";then 2184cdf0e10cSrcweir with_midl_path=`cygpath -u "$with_midl_path"` 2185cdf0e10cSrcweir fi 2186cdf0e10cSrcweir if test -x "$with_midl_path/midl.exe"; then 2187cdf0e10cSrcweir MIDL_PATH="$with_midl_path" 2188cdf0e10cSrcweir fi 2189cdf0e10cSrcweir if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then 2190cdf0e10cSrcweir MIDL_PATH="$with_cl_home/../Common7/Tools/Bin" 2191cdf0e10cSrcweir fi 2192cdf0e10cSrcweir if test -z "$MIDL_PATH" ; then 2193cdf0e10cSrcweir vstest=`./oowintool --msvs-productdir`; 2194cdf0e10cSrcweir if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then 2195cdf0e10cSrcweir MIDL_PATH="$vstest/Common7/Tools/Bin" 2196cdf0e10cSrcweir fi 2197cdf0e10cSrcweir fi 2198cdf0e10cSrcweir if test -z "$MIDL_PATH" ; then 2199cdf0e10cSrcweir psdktest=`./oowintool --psdk-home` 2200cdf0e10cSrcweir if test -x "$psdktest/Bin/midl.exe" ; then 2201cdf0e10cSrcweir MIDL_PATH="$psdktest/Bin" 2202cdf0e10cSrcweir fi 2203cdf0e10cSrcweir fi 2204cdf0e10cSrcweir if test ! -x "$MIDL_PATH/midl.exe"; then 2205cdf0e10cSrcweir AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path]) 2206cdf0e10cSrcweir fi 2207cdf0e10cSrcweir # Convert to posix path with 8.3 filename restrictions ( No spaces ) 2208cdf0e10cSrcweir MIDL_PATH=`cygpath -d "$MIDL_PATH"` 2209cdf0e10cSrcweir MIDL_PATH=`cygpath -u "$MIDL_PATH"` 2210cdf0e10cSrcweir 2211cdf0e10cSrcweir dnl Check csc.exe 2212cdf0e10cSrcweir AC_PATH_PROG(CSC_PATH, csc.exe) 2213cdf0e10cSrcweir if test -n "$CSC_PATH";then 2214cdf0e10cSrcweir CSC_PATH=`dirname "$CSC_PATH"` 2215cdf0e10cSrcweir fi 2216cdf0e10cSrcweir if test -n "$with_csc_path";then 2217cdf0e10cSrcweir with_csc_path=`cygpath -u "$with_csc_path"` 2218cdf0e10cSrcweir fi 2219cdf0e10cSrcweir if test -x "$with_csc_path/csc.exe"; then 2220cdf0e10cSrcweir CSC_PATH="$with_csc_path" 2221cdf0e10cSrcweir else 2222cdf0e10cSrcweir csctest=`./oowintool --csc-compilerdir`; 2223cdf0e10cSrcweir if test -x "$csctest/csc.exe"; then 2224cdf0e10cSrcweir CSC_PATH="$csctest" 2225cdf0e10cSrcweir fi 2226cdf0e10cSrcweir fi 2227cdf0e10cSrcweir if test ! -x "$CSC_PATH/csc.exe"; then 2228cdf0e10cSrcweir AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path]) 2229cdf0e10cSrcweir fi 2230cdf0e10cSrcweir # Convert to posix path with 8.3 filename restrictions ( No spaces ) 2231cdf0e10cSrcweir CSC_PATH=`cygpath -d "$CSC_PATH"` 2232cdf0e10cSrcweir CSC_PATH=`cygpath -u "$CSC_PATH"` 2233cdf0e10cSrcweir 2234cdf0e10cSrcweir dnl Check mscoree.lib / .NET Frameworks dir 2235cdf0e10cSrcweir dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib. 2236cdf0e10cSrcweir AC_MSG_CHECKING(.NET Framework) 2237cdf0e10cSrcweir if test -n "$with_frame_home"; then 2238cdf0e10cSrcweir with_frame_home=`cygpath -u "$with_frame_home"` 2239cdf0e10cSrcweir fi 2240cdf0e10cSrcweir if test -f "$with_frame_home/lib/mscoree.lib"; then 2241cdf0e10cSrcweir FRAME_HOME="$with_frame_home" 2242cdf0e10cSrcweir fi 2243cdf0e10cSrcweir if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then 2244cdf0e10cSrcweir FRAME_HOME="$with_cl_home/../SDK/v1.1" 2245cdf0e10cSrcweir fi 2246cdf0e10cSrcweir if test -z "$FRAME_HOME" ; then 2247cdf0e10cSrcweir frametest=`./oowintool --dotnetsdk-dir` 2248cdf0e10cSrcweir if test -f "$frametest/lib/mscoree.lib"; then 2249cdf0e10cSrcweir FRAME_HOME="$frametest" 2250cdf0e10cSrcweir else 2251cdf0e10cSrcweir frametest=`./oowintool --psdk-home` 2252cdf0e10cSrcweir if test -f "$frametest/lib/mscoree.lib"; then 2253cdf0e10cSrcweir FRAME_HOME="$frametest" 2254cdf0e10cSrcweir fi 2255cdf0e10cSrcweir fi 2256cdf0e10cSrcweir fi 2257cdf0e10cSrcweir if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then 2258cdf0e10cSrcweir AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home]) 2259cdf0e10cSrcweir fi 2260cdf0e10cSrcweir AC_MSG_RESULT(found) 2261cdf0e10cSrcweir # Convert to posix path with 8.3 filename restrictions ( No spaces ) 2262cdf0e10cSrcweir FRAME_HOME=`cygpath -d "$FRAME_HOME"` 2263cdf0e10cSrcweir FRAME_HOME=`cygpath -u "$FRAME_HOME"` 2264cdf0e10cSrcweirfi 2265cdf0e10cSrcweirAC_SUBST(MIDL_PATH) 2266cdf0e10cSrcweirAC_SUBST(CSC_PATH) 2267cdf0e10cSrcweirAC_SUBST(FRAME_HOME) 2268cdf0e10cSrcweirfi 2269cdf0e10cSrcweir 2270cdf0e10cSrcweirdnl =================================================================== 2271cdf0e10cSrcweirdnl Check if stdc headers are available excluding windows. 2272cdf0e10cSrcweirdnl =================================================================== 2273cdf0e10cSrcweirif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 2274cdf0e10cSrcweir AC_HEADER_STDC 2275cdf0e10cSrcweirfi 2276cdf0e10cSrcweir 2277cdf0e10cSrcweirdnl =================================================================== 2278cdf0e10cSrcweirdnl Find pre-processors. 2279cdf0e10cSrcweirdnl =================================================================== 2280cdf0e10cSrcweirif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 2281cdf0e10cSrcweir AC_PROG_CXXCPP 2282cdf0e10cSrcweir 2283cdf0e10cSrcweirdnl Check whether there's a C pre-processor. 2284cdf0e10cSrcweirdnl =================================================================== 2285cdf0e10cSrcweirdnl When using SunStudio compiler, there is a bug with the cc 2286cdf0e10cSrcweirdnl preprocessor, so use CC preprocessor as the cc preprocessor 2287cdf0e10cSrcweirdnl See Issuezilla #445. 2288cdf0e10cSrcweirdnl =================================================================== 2289cdf0e10cSrcweir if test "$_os" = "SunOS"; then 2290cdf0e10cSrcweir CPP=$CXXCPP 2291cdf0e10cSrcweir else 2292cdf0e10cSrcweir AC_PROG_CPP 2293cdf0e10cSrcweir fi 2294cdf0e10cSrcweirfi 2295cdf0e10cSrcweir 2296cdf0e10cSrcweirAC_CHECK_SIZEOF(long) 2297cdf0e10cSrcweirSIZEOF_LONG=$ac_cv_sizeof_long 2298cdf0e10cSrcweirAC_SUBST(SIZEOF_LONG) 2299cdf0e10cSrcweirAC_C_BIGENDIAN 2300cdf0e10cSrcweirWORDS_BIGENDIAN=$ac_cv_c_bigendian 2301cdf0e10cSrcweirAC_SUBST(WORDS_BIGENDIAN) 2302cdf0e10cSrcweir 2303cdf0e10cSrcweirdnl Check for large file support 2304cdf0e10cSrcweirAC_SYS_LARGEFILE 2305cdf0e10cSrcweirif test -n "$ac_cv_sys_file_offset_bits"; then 2306cdf0e10cSrcweir LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" 2307cdf0e10cSrcweirfi 2308cdf0e10cSrcweirif test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then 2309cdf0e10cSrcweir LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" 2310cdf0e10cSrcweirfi 2311cdf0e10cSrcweirAC_SUBST(LFS_CFLAGS) 2312cdf0e10cSrcweir 2313cdf0e10cSrcweirdnl =================================================================== 2314cdf0e10cSrcweirdnl Check if valgrind.h is available 2315cdf0e10cSrcweirdnl =================================================================== 2316cdf0e10cSrcweirif test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then 2317cdf0e10cSrcweir dnl Test $prefix (currently only testing for /usr and /usr/local) 2318cdf0e10cSrcweir dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind 2319cdf0e10cSrcweir VALGRIND_CFLAGS="" 2320cdf0e10cSrcweir prev_cppflags=$CPPFLAGS 2321cdf0e10cSrcweir if test -z "$VALGRIND_CFLAGS"; then 2322cdf0e10cSrcweir CPPFLAGS="-I/usr/include/valgrind" 2323cdf0e10cSrcweir AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h]) 2324cdf0e10cSrcweir fi 2325cdf0e10cSrcweir if test -z "$VALGRIND_CFLAGS"; then 2326cdf0e10cSrcweir CPPFLAGS="-I/usr/local/include/valgrind" 2327cdf0e10cSrcweir AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], []) 2328cdf0e10cSrcweir fi 2329cdf0e10cSrcweir if test -n "$VALGRIND_CFLAGS"; then 2330cdf0e10cSrcweir CPPFLAGS=$VALGRIND_CFLAGS 2331cdf0e10cSrcweir AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""]) 2332cdf0e10cSrcweir fi 2333cdf0e10cSrcweir CPPFLAGS=$prev_cppflags 2334cdf0e10cSrcweirfi 2335cdf0e10cSrcweirAC_SUBST([VALGRIND_CFLAGS]) 2336cdf0e10cSrcweir 2337cdf0e10cSrcweirdnl =================================================================== 2338cdf0e10cSrcweirdnl Check if cups/cups.h is available 2339cdf0e10cSrcweirdnl =================================================================== 2340cdf0e10cSrcweirif test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then 2341cdf0e10cSrcweir AC_CHECK_HEADER(cups/cups.h, [], 2342cdf0e10cSrcweir [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], []) 2343cdf0e10cSrcweirfi 2344cdf0e10cSrcweir 2345cdf0e10cSrcweirdnl =================================================================== 2346cdf0e10cSrcweirdnl Check if PAM/pam_appl.h is available on Linux or FreeBSD 2347cdf0e10cSrcweirdnl =================================================================== 2348cdf0e10cSrcweirif test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then 2349cdf0e10cSrcweir AC_MSG_CHECKING([whether to enable pam support]) 2350cdf0e10cSrcweir if test -z "$enable_pam" || test "$enable_pam" != "no"; then 2351cdf0e10cSrcweir AC_MSG_RESULT([yes]) 2352cdf0e10cSrcweir PAM=YES 2353cdf0e10cSrcweir AC_CHECK_HEADER(security/pam_appl.h, [], 2354cdf0e10cSrcweir [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], []) 2355cdf0e10cSrcweir AC_MSG_CHECKING([whether to link to libpam]) 2356cdf0e10cSrcweir if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then 2357cdf0e10cSrcweir AC_MSG_RESULT([yes]) 2358cdf0e10cSrcweir PAM_LINK=YES 2359cdf0e10cSrcweir AC_CHECK_LIB(pam, pam_start, [], 2360cdf0e10cSrcweir [AC_MSG_ERROR(libpam not found or functional)], []) 2361cdf0e10cSrcweir else 2362cdf0e10cSrcweir AC_MSG_RESULT([no, dynamically open it]) 2363cdf0e10cSrcweir PAM_LINK=NO 2364cdf0e10cSrcweir fi 2365cdf0e10cSrcweir else 2366cdf0e10cSrcweir AC_MSG_RESULT([no]) 2367cdf0e10cSrcweir PAM=NO 2368cdf0e10cSrcweir PAM_LINK=NO 2369cdf0e10cSrcweir dnl check getspnam_r for needed args (4 or 5) 2370cdf0e10cSrcweir AX_FUNC_WHICH_GETSPNAM_R 2371cdf0e10cSrcweir fi 2372cdf0e10cSrcweirfi 2373cdf0e10cSrcweirAC_SUBST(PAM) 2374cdf0e10cSrcweirAC_SUBST(NEW_SHADOW_API) 2375cdf0e10cSrcweirAC_SUBST(PAM_LINK) 2376cdf0e10cSrcweir 2377cdf0e10cSrcweirif test "$_os" = "Linux"; then 2378cdf0e10cSrcweir AC_MSG_CHECKING([whether to link to libcrypt]) 2379cdf0e10cSrcweir if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then 2380cdf0e10cSrcweir AC_MSG_RESULT([yes]) 2381cdf0e10cSrcweir CRYPT_LINK=YES 2382cdf0e10cSrcweir AC_CHECK_LIB(crypt, crypt, [], 2383cdf0e10cSrcweir [AC_MSG_ERROR(libcrypt not found or functional)], []) 2384cdf0e10cSrcweir else 2385cdf0e10cSrcweir AC_MSG_RESULT([no, dynamically open it]) 2386cdf0e10cSrcweir CRYPT_LINK=NO 2387cdf0e10cSrcweir fi 2388cdf0e10cSrcweirfi 2389cdf0e10cSrcweirAC_SUBST(CRYPT_LINK) 2390cdf0e10cSrcweir 2391cdf0e10cSrcweirdnl =================================================================== 2392cdf0e10cSrcweirdnl Testing for c++ compiler and version... 2393cdf0e10cSrcweirdnl =================================================================== 2394cdf0e10cSrcweirif test -n "$with_gcc_home"; then 2395cdf0e10cSrcweir if test -z "$CXX"; then 2396cdf0e10cSrcweir CXX="$with_gcc_home/bin/g++" 2397cdf0e10cSrcweir fi 2398cdf0e10cSrcweirfi 2399cdf0e10cSrcweir 2400cdf0e10cSrcweirif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 2401cdf0e10cSrcweir if test -e "$CC"; then 2402cdf0e10cSrcweir CXX="$CC" 2403cdf0e10cSrcweir fi 2404cdf0e10cSrcweirfi 2405cdf0e10cSrcweir 2406cdf0e10cSrcweirdnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't! 2407cdf0e10cSrcweirif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 2408cdf0e10cSrcweir AC_PROG_CXX 2409cdf0e10cSrcweirfi 2410cdf0e10cSrcweir 2411cdf0e10cSrcweirdnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk) 2412cdf0e10cSrcweirif test "$GXX" = "yes"; then 2413cdf0e10cSrcweir AC_MSG_CHECKING([the GNU C++ compiler version]) 2414cdf0e10cSrcweir 2415cdf0e10cSrcweir _gpp_version=`$CXX -dumpversion` 2416cdf0e10cSrcweir _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` 2417cdf0e10cSrcweir 24181e1ac450SHerbert Dürr AC_MSG_RESULT([checked (g++ $_gpp_version)]) 2419cdf0e10cSrcweir 2420cdf0e10cSrcweir if test "$_gpp_majmin" = "304"; then 2421cdf0e10cSrcweir AC_MSG_CHECKING([whether $CXX has the enum bug]) 2422cdf0e10cSrcweirAC_TRY_RUN([ 2423cdf0e10cSrcweirextern "C" void abort (void); 2424cdf0e10cSrcweirextern "C" void exit (int status); 2425cdf0e10cSrcweir 2426cdf0e10cSrcweirenum E { E0, E1, E2, E3, E4, E5 }; 2427cdf0e10cSrcweir 2428cdf0e10cSrcweirvoid 2429cdf0e10cSrcweirtest (enum E e) 2430cdf0e10cSrcweir{ 2431cdf0e10cSrcweir if (e == E2 || e == E3 || e == E1) 2432cdf0e10cSrcweir exit (1); 2433cdf0e10cSrcweir} 2434cdf0e10cSrcweir 2435cdf0e10cSrcweirint 2436cdf0e10cSrcweirmain (void) 2437cdf0e10cSrcweir{ 2438cdf0e10cSrcweir test (E4); 2439cdf0e10cSrcweir test (E5); 2440cdf0e10cSrcweir test (E0); 2441cdf0e10cSrcweir return 0; 2442cdf0e10cSrcweir} 2443c4266413SHerbert Dürr],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents Apache OpenOffice from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])], [AC_MSG_RESULT([no])]) 2444cdf0e10cSrcweir fi 2445cdf0e10cSrcweirfi 2446cdf0e10cSrcweir 2447cdf0e10cSrcweirdnl =================================================================== 2448cdf0e10cSrcweirdnl Set the mingw runtime library include directories 2449cdf0e10cSrcweirdnl =================================================================== 2450cdf0e10cSrcweirif test "$WITH_MINGWIN" = "yes"; then 2451cdf0e10cSrcweir AC_MSG_CHECKING([for mingwin runtime include path]) 2452cdf0e10cSrcweir cat >conftest.$ac_ext <<_ACEOF 2453cdf0e10cSrcweir#include <stddef.h> 2454cdf0e10cSrcweir#include <bits/c++config.h> 2455cdf0e10cSrcweir_ACEOF 2456cdf0e10cSrcweir _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` 2457cdf0e10cSrcweir rm conftest.$ac_ext 2458cdf0e10cSrcweir if test -n "$_mingw_lib_include_path"; then 2459cdf0e10cSrcweir _temp="" 2460cdf0e10cSrcweir for a in $_mingw_lib_include_path 2461cdf0e10cSrcweir do 2462cdf0e10cSrcweir a=`cygpath -d "$a"` 2463cdf0e10cSrcweir _temp="$_temp "`cygpath -u "$a"` 2464cdf0e10cSrcweir done 2465cdf0e10cSrcweir _mingw_lib_include_path=$_temp 2466cdf0e10cSrcweir fi 2467cdf0e10cSrcweir if test -z "$_mingw_lib_include_path"; then 2468cdf0e10cSrcweir _mingw_lib_include_path="NO_LIB_INCLUDE" 2469cdf0e10cSrcweir AC_MSG_RESULT([no mingwin runtime includes]) 2470cdf0e10cSrcweir else 2471cdf0e10cSrcweir AC_MSG_RESULT([$_mingw_lib_include_path]) 2472cdf0e10cSrcweir fi 2473cdf0e10cSrcweir MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" 2474cdf0e10cSrcweir AC_SUBST(MINGW_LIB_INCLUDE_PATH) 2475cdf0e10cSrcweirdnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map 2476cdf0e10cSrcweir AC_MSG_CHECKING([for mingwin c++ backward include path]) 2477cdf0e10cSrcweir cat >conftest.$ac_ext <<_ACEOF 2478cdf0e10cSrcweir#include <hash_set> 2479cdf0e10cSrcweir_ACEOF 2480cdf0e10cSrcweir _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` 2481cdf0e10cSrcweir rm conftest.$ac_ext 2482cdf0e10cSrcweir if test -n "$_mingw_backward_include_path"; then 2483cdf0e10cSrcweir _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` 2484cdf0e10cSrcweir _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` 2485cdf0e10cSrcweir AC_MSG_RESULT([$_mingw_backward_include_path]) 2486cdf0e10cSrcweir else 2487cdf0e10cSrcweir _mingw_backward_include_path="NO_BACKWARD_INCLUDE" 2488cdf0e10cSrcweir AC_MSG_RESULT([no mingwin c++ backward includes]) 2489cdf0e10cSrcweir fi 2490cdf0e10cSrcweir MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" 2491cdf0e10cSrcweir AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH) 2492cdf0e10cSrcweir mingw_crtbegin=`$CC -print-file-name=crtbegin.o` 2493cdf0e10cSrcweir MINGW_CLIB_DIR=`dirname $mingw_crtbegin` 2494cdf0e10cSrcweir AC_MSG_CHECKING([whether to use dynamic libgcc]) 2495cdf0e10cSrcweir if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then 2496cdf0e10cSrcweir AC_MSG_CHECKING([dynamic libgcc name]) 2497cdf0e10cSrcweir 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'` 2498cdf0e10cSrcweir MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` 2499cdf0e10cSrcweir if test -n "$MINGW_GCCDLL"; then 2500cdf0e10cSrcweir MINGW_SHARED_GCCLIB=YES 2501cdf0e10cSrcweir AC_MSG_RESULT([use $MINGW_GCCDLL]) 2502cdf0e10cSrcweir else 2503cdf0e10cSrcweir AC_MSG_RESULT([no]) 2504cdf0e10cSrcweir fi 2505cdf0e10cSrcweir else 2506cdf0e10cSrcweir AC_MSG_RESULT([no]) 2507cdf0e10cSrcweir fi 2508cdf0e10cSrcweir if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then 2509cdf0e10cSrcweir MINGW_GCCLIB_EH=YES 2510cdf0e10cSrcweir fi 2511cdf0e10cSrcweir AC_MSG_CHECKING([whether to use dynamic libstdc++]) 2512cdf0e10cSrcweir MINGW_SHARED_LIBSTDCPP= 2513cdf0e10cSrcweir if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then 2514cdf0e10cSrcweir MINGW_SHARED_LIBSTDCPP=stdc++_s 2515cdf0e10cSrcweir fi 2516cdf0e10cSrcweir if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then 2517cdf0e10cSrcweir MINGW_SHARED_LIBSTDCPP=stdc++.dll 2518cdf0e10cSrcweir fi 2519cdf0e10cSrcweir if test -n "$MINGW_SHARED_LIBSTDCPP" ; then 2520cdf0e10cSrcweir AC_MSG_CHECKING([dynamic libstdc++ name]) 2521cdf0e10cSrcweir 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'` 2522cdf0e10cSrcweir MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` 2523cdf0e10cSrcweir if test -n "$MINGW_GXXDLL"; then 2524cdf0e10cSrcweir MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP 2525cdf0e10cSrcweir MINGW_SHARED_GXXLIB=YES 2526cdf0e10cSrcweir AC_MSG_RESULT([use $MINGW_GXXDLL]) 2527cdf0e10cSrcweir else 2528cdf0e10cSrcweir MINGW_SHARED_LIBSTDCPP= 2529cdf0e10cSrcweir AC_MSG_RESULT([no]) 2530cdf0e10cSrcweir fi 2531cdf0e10cSrcweir else 2532cdf0e10cSrcweir AC_MSG_RESULT([no]) 2533cdf0e10cSrcweir fi 2534cdf0e10cSrcweir MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` 2535cdf0e10cSrcweir AC_SUBST(MINGW_CLIB_DIR) 2536cdf0e10cSrcweir AC_SUBST(MINGW_SHARED_GCCLIB) 2537cdf0e10cSrcweir AC_SUBST(MINGW_GCCLIB_EH) 2538cdf0e10cSrcweir AC_SUBST(MINGW_SHARED_GXXLIB) 2539cdf0e10cSrcweir AC_SUBST(MINGW_SHARED_LIBSTDCPP) 2540cdf0e10cSrcweir AC_SUBST(MINGW_GCCDLL) 2541cdf0e10cSrcweir AC_SUBST(MINGW_GXXDLL) 2542cdf0e10cSrcweirfi 2543cdf0e10cSrcweir 2544cdf0e10cSrcweirdnl =================================================================== 2545cdf0e10cSrcweirdnl Extra checking for the SUN OS compiler 2546cdf0e10cSrcweirdnl =================================================================== 2547cdf0e10cSrcweirif test "$_os" = "SunOS"; then 2548cdf0e10cSrcweir dnl SunStudio C++ compiler packaged with SunStudio C compiler 2549cdf0e10cSrcweir if test "$CC" = "cc"; then 2550cdf0e10cSrcweir AC_MSG_CHECKING([SunStudio C++ Compiler]) 2551cdf0e10cSrcweir if test "$CXX" != "CC"; then 2552cdf0e10cSrcweir AC_MSG_WARN([SunStudio C++ was not found]) 2553cdf0e10cSrcweir echo "SunStudio C++ was not found" >> warn 2554cdf0e10cSrcweir else 2555cdf0e10cSrcweir AC_MSG_RESULT([checked]) 2556cdf0e10cSrcweir fi 2557cdf0e10cSrcweir fi 2558cdf0e10cSrcweirfi 2559cdf0e10cSrcweirdnl =================================================================== 2560cdf0e10cSrcweirdnl Extra checking for the OSF compiler 2561cdf0e10cSrcweirdnl =================================================================== 2562cdf0e10cSrcweirif test "$_os" = "OSF1"; then 2563cdf0e10cSrcweir AC_MSG_CHECKING([Compaq C++ compiler version]) 2564cdf0e10cSrcweir dnl cxx -V outputs to standard error!!!! 2565cdf0e10cSrcweir _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` 2566cdf0e10cSrcweir _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'` 2567cdf0e10cSrcweir if test "$_compaqcxx_major" != "V6"; then 2568cdf0e10cSrcweir AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler]) 2569cdf0e10cSrcweir echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn 2570cdf0e10cSrcweir else 2571cdf0e10cSrcweir dnl compiler will do 2572cdf0e10cSrcweir AC_MSG_RESULT([checked]) 2573cdf0e10cSrcweir fi 2574cdf0e10cSrcweirfi 2575cdf0e10cSrcweir 2576cdf0e10cSrcweirdnl ************************************************************* 2577cdf0e10cSrcweirdnl Testing for exception handling - dwarf2 or sjlj exceptions... 2578cdf0e10cSrcweirdnl ************************************************************* 2579cdf0e10cSrcweirAC_MSG_CHECKING([exception type]) 2580cdf0e10cSrcweirAC_LANG_PUSH([C++]) 2581cdf0e10cSrcweirif test "$WITH_MINGWIN" = "yes"; then 2582cdf0e10cSrcweir AC_TRY_LINK( 2583cdf0e10cSrcweir [#include <iostream> 2584cdf0e10cSrcweir 2585cdf0e10cSrcweirextern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__)); 2586cdf0e10cSrcweir 2587cdf0e10cSrcweir ], 2588cdf0e10cSrcweir [_Unwind_SjLj_RaiseException() ], 2589cdf0e10cSrcweir [exceptions_type="sjlj"], 2590cdf0e10cSrcweir [exceptions_type="dwarf2"] 2591cdf0e10cSrcweir ) 2592cdf0e10cSrcweirfi 2593cdf0e10cSrcweir 2594cdf0e10cSrcweirAC_MSG_RESULT($exceptions_type) 2595cdf0e10cSrcweirAC_LANG_POP([C++]) 2596cdf0e10cSrcweirEXCEPTIONS="$exceptions_type" 2597cdf0e10cSrcweirAC_SUBST(EXCEPTIONS) 2598cdf0e10cSrcweir 2599cdf0e10cSrcweirdnl =================================================================== 2600cdf0e10cSrcweirdnl Checks for what the default STL should be 2601cdf0e10cSrcweirdnl =================================================================== 2602cdf0e10cSrcweir AC_MSG_CHECKING([what the default STL should be]) 2603212f9143SJan Iversen DEFAULT_TO_STLPORT="no" 2604212f9143SJan Iversenif test "$WITH_STLPORT" != "no"; then 2605b597708bSHerbert Dürr AC_MSG_ERROR([Option --with-stlport is no longer available.]) 2606b597708bSHerbert Dürrelse 2607b597708bSHerbert Dürr USE_SYSTEM_STL="YES" 2608cdf0e10cSrcweirfi 2609b597708bSHerbert Dürr 2610cdf0e10cSrcweirAC_SUBST(USE_SYSTEM_STL) 2611cdf0e10cSrcweir 2612cdf0e10cSrcweirdnl =================================================================== 2613cdf0e10cSrcweirdnl visibility feature 2614cdf0e10cSrcweirdnl =================================================================== 2615cdf0e10cSrcweirif test "$GCC" = "yes"; then 2616cdf0e10cSrcweir AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) 2617cdf0e10cSrcweir save_CFLAGS=$CFLAGS 2618cdf0e10cSrcweir CFLAGS="$CFLAGS -fvisibility=hidden" 2619cdf0e10cSrcweir AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], []) 2620cdf0e10cSrcweir CFLAGS=$save_CFLAGS 2621cdf0e10cSrcweir if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 2622cdf0e10cSrcweir AC_MSG_RESULT([yes]) 2623cdf0e10cSrcweir else 2624cdf0e10cSrcweir AC_MSG_RESULT([no]) 2625cdf0e10cSrcweir fi 2626cdf0e10cSrcweirfi 2627cdf0e10cSrcweir 2628cdf0e10cSrcweir# =================================================================== 2629cdf0e10cSrcweir# use --ccache-skip? 2630cdf0e10cSrcweir# =================================================================== 2631cdf0e10cSrcweirdnl used to escape compiler options for ccache that otherwise prevent 2632cdf0e10cSrcweirdnl caching of the results (like "-x objective-c++" for Mac) 2633cdf0e10cSrcweirAC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip]) 2634cdf0e10cSrcweirif test "$_os" != "Darwin" ; then 2635cdf0e10cSrcweir AC_MSG_RESULT([only used on Mac currently, skipping]) 2636cdf0e10cSrcweirelif test "$enable_ccache_skip" = "no" ; then 2637cdf0e10cSrcweir AC_MSG_RESULT([no - diabled explicitly]) 2638cdf0e10cSrcweirelif test "$enable_ccache_skip" = "yes" ; then 2639cdf0e10cSrcweir AC_MSG_RESULT([yes - enabled explicitly, skipping checks]) 2640cdf0e10cSrcweir AC_SUBST([USE_CCACHE], [YES]) 2641cdf0e10cSrcweirelif test "$enable_ccache_skip" = "auto" ; then 2642cdf0e10cSrcweir # checking for ccache presence/version 2643cdf0e10cSrcweir AC_MSG_RESULT([probing...]) 2644cdf0e10cSrcweir AC_PATH_PROG([CCACHE],[ccache],[not_found]) 2645cdf0e10cSrcweir if test "$CCACHE" = "not_found" ; then 2646cdf0e10cSrcweir AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)]) 2647cdf0e10cSrcweir else 2648cdf0e10cSrcweir # check ccache version 2649cdf0e10cSrcweir AC_MSG_CHECKING([whether version of ccache is suitable]) 2650cdf0e10cSrcweir CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` 2651cdf0e10cSrcweir if test "$CCACHE_VERSION" = "2.4_OOo"; then 2652cdf0e10cSrcweir AC_MSG_RESULT([yes]) 2653cdf0e10cSrcweir AC_MSG_CHECKING([whether ccache is actually used for the build]) 2654cdf0e10cSrcweir AC_LANG_PUSH([C++]) 2655cdf0e10cSrcweir save_CXXFLAGS=$CXXFLAGS 2656cdf0e10cSrcweir CXXFLAGS="$CXXFLAGS --ccache-skip -O2" 2657cdf0e10cSrcweir dnl an empty program will do, we're checking the compiler flags 26587f413237SHerbert Dürr AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], 2659cdf0e10cSrcweir [use_ccache=yes], [use_ccache=no]) 2660cdf0e10cSrcweir if test $use_ccache = yes ; then 2661cdf0e10cSrcweir AC_MSG_RESULT([yes, will enable --ccache-skip]) 2662cdf0e10cSrcweir AC_SUBST([USE_CCACHE], [YES]) 2663cdf0e10cSrcweir else 2664cdf0e10cSrcweir AC_MSG_RESULT([no, will not enable --ccache-skip]) 2665cdf0e10cSrcweir fi 2666cdf0e10cSrcweir CXXFLAGS=$save_CXXFLAGS 2667cdf0e10cSrcweir AC_LANG_POP([C++]) 2668cdf0e10cSrcweir else 2669cdf0e10cSrcweir AC_MSG_RESULT([no]) 2670cdf0e10cSrcweir AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip]) 2671cdf0e10cSrcweir fi 2672cdf0e10cSrcweir fi 2673cdf0e10cSrcweirelse 2674cdf0e10cSrcweir AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"]) 2675cdf0e10cSrcweirfi 2676cdf0e10cSrcweir 2677cdf0e10cSrcweirdnl =================================================================== 2678cdf0e10cSrcweirdnl system stl sanity tests 2679cdf0e10cSrcweirdnl =================================================================== 2680b597708bSHerbert Dürrif false ; then # TODO: update TR1 compliant STLs 2681cdf0e10cSrcweirif test "$USE_SYSTEM_STL" = "YES"; then 2682d5aa83e5SHerbert Dürr AC_MSG_CHECKING([system stl sanity]) 2683cdf0e10cSrcweir AC_LANG_PUSH([C++]) 2684cdf0e10cSrcweir 2685cdf0e10cSrcweir if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 2686cdf0e10cSrcweir AC_MSG_CHECKING([if STL headers are visibility safe]) 2687cdf0e10cSrcweir AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no) 2688cdf0e10cSrcweir AC_MSG_RESULT([$stlvisok]) 2689cdf0e10cSrcweir if test "$stlvisok" = "no"; then 2690cdf0e10cSrcweir AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility]) 2691cdf0e10cSrcweir echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn 2692cdf0e10cSrcweir unset HAVE_GCC_VISIBILITY_FEATURE 2693cdf0e10cSrcweir fi 2694cdf0e10cSrcweir fi 2695cdf0e10cSrcweir 2696cdf0e10cSrcweir if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 2697cdf0e10cSrcweir sharedlink_ldflags_save=$LDFLAGS 2698cdf0e10cSrcweir LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" 2699cdf0e10cSrcweir 2700cdf0e10cSrcweir AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers]) 2701cdf0e10cSrcweir AC_TRY_LINK([#include <sstream> 2702cdf0e10cSrcweirusing namespace std; 2703cdf0e10cSrcweir],[istringstream strm( "test" ); return 0;], 2704cdf0e10cSrcweir $EGREP -q unresolvable conftest.err; 2705cdf0e10cSrcweir if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi, 2706cdf0e10cSrcweir gccvisok=no) 2707cdf0e10cSrcweir AC_MSG_RESULT([$gccvisok]) 2708cdf0e10cSrcweir if test "$gccvisok" = "no"; then 2709cdf0e10cSrcweir AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility]) 2710cdf0e10cSrcweir echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn 2711cdf0e10cSrcweir unset HAVE_GCC_VISIBILITY_FEATURE 2712cdf0e10cSrcweir fi 2713cdf0e10cSrcweir 2714cdf0e10cSrcweir LDFLAGS=$sharedlink_ldflags_save 2715cdf0e10cSrcweir fi 2716cdf0e10cSrcweir 2717cdf0e10cSrcweir if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 2718cdf0e10cSrcweir AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) 2719cdf0e10cSrcweir cat >visibility.cxx <<_ACEOF 2720cdf0e10cSrcweir#pragma GCC visibility push(hidden) 2721cdf0e10cSrcweirstruct __attribute__ ((visibility ("default"))) TestStruct { 2722cdf0e10cSrcweir static void Init(); 2723cdf0e10cSrcweir}; 2724cdf0e10cSrcweir__attribute__ ((visibility ("default"))) void TestFunc() { 2725cdf0e10cSrcweir TestStruct::Init(); 2726cdf0e10cSrcweir} 2727cdf0e10cSrcweir_ACEOF 2728cdf0e10cSrcweir if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then 2729cdf0e10cSrcweir gccvisbroken=yes 2730cdf0e10cSrcweir else 2731cdf0e10cSrcweir case "$build_cpu" in 2732cdf0e10cSrcweir i?86|x86_64) 2733cdf0e10cSrcweir if $EGREP -q '@PLT' visibility.s; then 2734cdf0e10cSrcweir gccvisbroken=no 2735cdf0e10cSrcweir else 2736cdf0e10cSrcweir gccvisbroken=yes 2737cdf0e10cSrcweir fi 2738cdf0e10cSrcweir ;; 2739cdf0e10cSrcweir *) 2740cdf0e10cSrcweir gccvisbroken=no 2741cdf0e10cSrcweir ;; 2742cdf0e10cSrcweir esac 2743cdf0e10cSrcweir fi 2744f07aa446SHerbert Dürr rm -f visibility.s visibility.cxx 2745cdf0e10cSrcweir 2746cdf0e10cSrcweir AC_MSG_RESULT([$gccvisbroken]) 2747cdf0e10cSrcweir if test "$gccvisbroken" = "yes"; then 2748cdf0e10cSrcweir AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility]) 2749cdf0e10cSrcweir echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn 2750cdf0e10cSrcweir unset HAVE_GCC_VISIBILITY_FEATURE 2751cdf0e10cSrcweir fi 2752cdf0e10cSrcweir fi 2753cdf0e10cSrcweir 2754cdf0e10cSrcweir AC_LANG_POP([C++]) 2755cdf0e10cSrcweirfi 2756b597708bSHerbert Dürrfi # endof TODO: update TR1 compliant STLs 2757cdf0e10cSrcweir 2758cdf0e10cSrcweirAC_SUBST(HAVE_GCC_VISIBILITY_FEATURE) 2759cdf0e10cSrcweir 2760cdf0e10cSrcweirdnl =================================================================== 2761cdf0e10cSrcweirdnl allocator 2762cdf0e10cSrcweirdnl =================================================================== 2763cdf0e10cSrcweirAC_MSG_CHECKING([which memory allocator to use]) 2764cdf0e10cSrcweirif test "$with_alloc" = "system"; then 2765cdf0e10cSrcweir AC_MSG_RESULT([system]) 2766cdf0e10cSrcweir ALLOC="SYS_ALLOC"; 2767cdf0e10cSrcweir AC_CHECK_FUNCS([malloc realloc calloc free]) 2768cdf0e10cSrcweirfi 2769cdf0e10cSrcweirif test "$with_alloc" = "tcmalloc"; then 2770cdf0e10cSrcweir AC_MSG_RESULT(tcmalloc) 277128633775SPedro Giffuni if ! echo $build_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then 2772cdf0e10cSrcweir AC_MSG_ERROR([tcmalloc only available/usable on ix86]) 2773cdf0e10cSrcweir fi 2774cdf0e10cSrcweir AC_CHECK_LIB(tcmalloc, malloc, [], 2775cdf0e10cSrcweir [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], []) 2776cdf0e10cSrcweir ALLOC="TCMALLOC"; 2777cdf0e10cSrcweirfi 2778cdf0e10cSrcweirif test "$with_alloc" = "jemalloc"; then 2779cdf0e10cSrcweir if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then 2780cdf0e10cSrcweir AC_MSG_RESULT(jemalloc) 2781cdf0e10cSrcweir save_CFLAGS=$CFLAGS 2782cdf0e10cSrcweir CFLAGS="$CFLAGS -pthread" 2783cdf0e10cSrcweir AC_CHECK_LIB(jemalloc, malloc, [], 2784cdf0e10cSrcweir [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], []) 2785cdf0e10cSrcweir ALLOC="JEMALLOC"; 2786cdf0e10cSrcweir CFLAGS=$save_CFLAGS 2787cdf0e10cSrcweir else 2788cdf0e10cSrcweir AC_MSG_RESULT([system]) 2789cdf0e10cSrcweir ALLOC="SYS_ALLOC"; 2790cdf0e10cSrcweir AC_CHECK_FUNCS([malloc realloc calloc free]) 2791cdf0e10cSrcweir fi 2792cdf0e10cSrcweirfi 2793cdf0e10cSrcweirif test "$with_alloc" = "internal" -o -z "$with_alloc"; then 2794cdf0e10cSrcweir AC_MSG_RESULT([internal]) 2795cdf0e10cSrcweirfi 2796cdf0e10cSrcweirAC_SUBST(ALLOC) 2797cdf0e10cSrcweir 2798cdf0e10cSrcweirdnl =================================================================== 2799cdf0e10cSrcweirdnl Custom build version 2800cdf0e10cSrcweirdnl =================================================================== 2801cdf0e10cSrcweir 2802cdf0e10cSrcweirAC_MSG_CHECKING([whether to add custom build version]) 2803cdf0e10cSrcweirif test "z$with_build_version" != "z"; then 2804cdf0e10cSrcweir BUILD_VER_STRING=$with_build_version 2805cdf0e10cSrcweir AC_MSG_RESULT([yes, $BUILD_VER_STRING]) 2806cdf0e10cSrcweirelse 28073ee2ad5bSpfg BUILD_VER_STRING= 2808cdf0e10cSrcweir AC_MSG_RESULT([no]) 2809cdf0e10cSrcweirfi 2810cdf0e10cSrcweirAC_SUBST(BUILD_VER_STRING) 2811cdf0e10cSrcweir 2812cdf0e10cSrcweirdnl =================================================================== 2813cdf0e10cSrcweirdnl Java support enable 2814cdf0e10cSrcweirdnl =================================================================== 2815cdf0e10cSrcweirAC_MSG_CHECKING([whether to build with Java support]) 2816cdf0e10cSrcweirif test "$WITH_JAVA" != "no"; then 2817cdf0e10cSrcweir AC_MSG_RESULT([yes]) 2818cdf0e10cSrcweir SOLAR_JAVA="TRUE" 2819cdf0e10cSrcweirelse 2820cdf0e10cSrcweir AC_MSG_RESULT([no]) 2821cdf0e10cSrcweir SOLAR_JAVA="" 2822cdf0e10cSrcweir 2823cdf0e10cSrcweir AC_MSG_WARN([building without java will mean some features will not be available]) 2824cdf0e10cSrcweir echo "building without java will mean some features will not be available" >>warn 2825cdf0e10cSrcweirfi 2826cdf0e10cSrcweirAC_SUBST(SOLAR_JAVA) 2827cdf0e10cSrcweir 2828cdf0e10cSrcweirif test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then 2829cdf0e10cSrcweir # IBMs JDK needs this... 2830cdf0e10cSrcweir JITC_PROCESSOR_TYPE=6 2831cdf0e10cSrcweir export JITC_PROCESSOR_TYPE 2832cdf0e10cSrcweirfi 2833cdf0e10cSrcweir 2834cdf0e10cSrcweirif test "$_os" = "WINNT"; then 2835cdf0e10cSrcweir if test -z "$with_jdk_home"; then 2836cdf0e10cSrcweir _jdk_home=`./oowintool --jdk-home` 2837cdf0e10cSrcweir if test -d "$_jdk_home"; then 2838cdf0e10cSrcweir with_jdk_home="$_jdk_home" 2839cdf0e10cSrcweir fi 2840cdf0e10cSrcweir else 2841cdf0e10cSrcweir with_jdk_home=`cygpath -u "$with_jdk_home"` 2842cdf0e10cSrcweir fi 2843cdf0e10cSrcweirfi 2844cdf0e10cSrcweir 2845cdf0e10cSrcweirdnl =================================================================== 2846cdf0e10cSrcweirdnl Checks for java 2847cdf0e10cSrcweirdnl =================================================================== 2848cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 2849cdf0e10cSrcweir JAVA_HOME=; export JAVA_HOME 2850cdf0e10cSrcweir if test -z "$with_jdk_home"; then 2851cdf0e10cSrcweir AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA) 2852cdf0e10cSrcweir else 2853cdf0e10cSrcweir _java_path="$with_jdk_home/bin/$WITH_JAVA" 2854cdf0e10cSrcweir dnl Check if there is a java interpreter at all. 2855cdf0e10cSrcweir if test -x "$_java_path"; then 2856cdf0e10cSrcweir JAVAINTERPRETER=$_java_path 2857cdf0e10cSrcweir else 2858897adb27SJürgen Schmidt AC_MSG_ERROR([$_java_path not found, please use --with-jdk-home]) 2859cdf0e10cSrcweir fi 2860cdf0e10cSrcweir fi 2861cdf0e10cSrcweir if test "$_os" = "WINNT"; then 286228633775SPedro Giffuni if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then 2863cdf0e10cSrcweir JAVAINTERPRETER="${JAVAINTERPRETER}.exe" 2864cdf0e10cSrcweir fi 2865cdf0e10cSrcweir JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` 2866cdf0e10cSrcweir JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` 2867cdf0e10cSrcweir elif test "$_os" = "Darwin"; then 2868b12514e1SHerbert Dürr JAVAIFLAGS="" 2869cdf0e10cSrcweir fi 2870cdf0e10cSrcweirfi 2871cdf0e10cSrcweir 2872cdf0e10cSrcweirdnl =================================================================== 2873cdf0e10cSrcweirdnl Checks for JDK. 2874cdf0e10cSrcweirdnl =================================================================== 2875cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 2876cdf0e10cSrcweir _gij_longver=0 2877cdf0e10cSrcweir AC_MSG_CHECKING([the installed JDK]) 2878cdf0e10cSrcweir if test -n "$JAVAINTERPRETER"; then 2879cdf0e10cSrcweir dnl java -version sends output to stderr! 288028633775SPedro Giffuni if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then 2881cdf0e10cSrcweir AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) 2882cdf0e10cSrcweir# dnl Kaffe specific tests 2883cdf0e10cSrcweir# KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` 2884cdf0e10cSrcweir# if test -z "$KAFFE_VER"; then 2885cdf0e10cSrcweir# AC_MSG_ERROR([looks like Kaffe but version detection failed]) 2886cdf0e10cSrcweir# fi 2887cdf0e10cSrcweir# _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 2888cdf0e10cSrcweir# if test "$_kaffe_ver" -lt 10100; then 2889cdf0e10cSrcweir# AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0]) 2890cdf0e10cSrcweir# fi 2891cdf0e10cSrcweir# JDK=kaffe 2892cdf0e10cSrcweir# 2893cdf0e10cSrcweir# dnl TODO: define some project exclusion variables 2894cdf0e10cSrcweir# 2895cdf0e10cSrcweir# AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)]) 2896cdf0e10cSrcweir# AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile]) 2897cdf0e10cSrcweir# echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn 2898cdf0e10cSrcweir# JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` 289928633775SPedro Giffuni elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then 2900cdf0e10cSrcweir JDK=gcj 2901cdf0e10cSrcweir AC_MSG_RESULT([checked (gcj)]) 290228633775SPedro Giffuni _gij_version=`$JAVAINTERPRETER --version | $GREP GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 2903cdf0e10cSrcweir _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 2904cdf0e10cSrcweir 290528633775SPedro Giffuni elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | $GREP -c "BEA"` -gt 0; then 2906cdf0e10cSrcweir AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) 2907cdf0e10cSrcweir# JDK=bea 2908cdf0e10cSrcweir# 2909cdf0e10cSrcweir# dnl BEA JDK specific tests 2910cdf0e10cSrcweir# _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 2911cdf0e10cSrcweir# _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 2912cdf0e10cSrcweir# 2913cdf0e10cSrcweir# if test "$_jdk_ver" -lt 10500; then 2914cdf0e10cSrcweir# AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0]) 2915cdf0e10cSrcweir# fi 2916cdf0e10cSrcweir# 2917cdf0e10cSrcweir# AC_MSG_RESULT([checked (BEA JDK $_jdk)]) 2918cdf0e10cSrcweir# 2919cdf0e10cSrcweir# if test "$with_jdk_home" = ""; then 2920c4266413SHerbert Dürr# AC_MSG_ERROR([In order to successfully build Apache OpenOffice using the BEA JDK, 2921cdf0e10cSrcweir#you must use the "--with-jdk-home" configure option explicitly]) 2922cdf0e10cSrcweir# fi 2923cdf0e10cSrcweir# 2924cdf0e10cSrcweir# AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules]) 2925cdf0e10cSrcweir# echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn 2926cdf0e10cSrcweir# 2927cdf0e10cSrcweir# JAVA_HOME=$with_jdk_home 2928cdf0e10cSrcweir# 292928633775SPedro Giffuni elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | $GREP -c "IBM"` -gt 0; then 2930cdf0e10cSrcweir JDK=ibm 2931cdf0e10cSrcweir 2932cdf0e10cSrcweir dnl IBM JDK specific tests 2933cdf0e10cSrcweir _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 2934cdf0e10cSrcweir _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 2935cdf0e10cSrcweir 2936cdf0e10cSrcweir if test "$_jdk_ver" -lt 10500; then 2937cdf0e10cSrcweir AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5]) 2938cdf0e10cSrcweir fi 2939cdf0e10cSrcweir 2940cdf0e10cSrcweir AC_MSG_RESULT([checked (IBM JDK $_jdk)]) 2941cdf0e10cSrcweir 2942cdf0e10cSrcweir if test "$with_jdk_home" = ""; then 2943c4266413SHerbert Dürr AC_MSG_ERROR([In order to successfully build Apache OpenOffice using the IBM JDK, 2944cdf0e10cSrcweiryou must use the "--with-jdk-home" configure option explicitly]) 2945cdf0e10cSrcweir fi 2946cdf0e10cSrcweir 2947cdf0e10cSrcweir JAVA_HOME=$with_jdk_home 2948cdf0e10cSrcweir 2949cdf0e10cSrcweir else 2950cdf0e10cSrcweir JDK=sun 2951cdf0e10cSrcweir 2952cdf0e10cSrcweir dnl SUN JDK specific tests 2953cdf0e10cSrcweir _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 2954cdf0e10cSrcweir _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 2955cdf0e10cSrcweir 2956cdf0e10cSrcweir if test "$_jdk_ver" -lt 10500; then 2957cdf0e10cSrcweir AC_MSG_ERROR([JDK is too old, you need at least 1.5]) 2958cdf0e10cSrcweir fi 2959cdf0e10cSrcweir AC_MSG_RESULT([checked (JDK $_jdk)]) 2960cdf0e10cSrcweir JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` 2961cdf0e10cSrcweir if test "$_os" = "WINNT"; then 2962cdf0e10cSrcweir JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` 2963cdf0e10cSrcweir fi 2964cdf0e10cSrcweir if test "$_os" = "OS2"; then 2965cdf0e10cSrcweir JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` 2966cdf0e10cSrcweir fi 2967cdf0e10cSrcweir fi 2968cdf0e10cSrcweir else 2969cdf0e10cSrcweir AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4]) 2970cdf0e10cSrcweir fi 2971cdf0e10cSrcweirelse 2972cdf0e10cSrcweir dnl Java disabled 2973cdf0e10cSrcweir JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME 2974cdf0e10cSrcweirfi 2975cdf0e10cSrcweir 2976cdf0e10cSrcweirdnl =================================================================== 2977cdf0e10cSrcweirdnl Checks for javac 2978cdf0e10cSrcweirdnl =================================================================== 2979cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 2980cdf0e10cSrcweir if test "$JDK" = "gcj"; then 2981cdf0e10cSrcweir javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"` 2982cdf0e10cSrcweir else 2983cdf0e10cSrcweir javacompiler="javac" 2984cdf0e10cSrcweir fi 2985cdf0e10cSrcweir if test "$_os" = "OS2"; then 298628633775SPedro Giffuni if test x`echo "$javacompiler" | $GREP -i '\.exe$'` = x; then 2987cdf0e10cSrcweir javacompiler="${javacompiler}.exe" 2988cdf0e10cSrcweir fi 2989cdf0e10cSrcweir fi 2990cdf0e10cSrcweir if test -z "$with_jdk_home"; then 2991cdf0e10cSrcweir AC_PATH_PROG(JAVACOMPILER, $javacompiler) 2992cdf0e10cSrcweir else 2993cdf0e10cSrcweir _javac_path="$with_jdk_home/bin/$javacompiler" 2994cdf0e10cSrcweir dnl Check if there is a java compiler at all. 2995cdf0e10cSrcweir if test -x "$_javac_path"; then 2996cdf0e10cSrcweir JAVACOMPILER=$_javac_path 2997cdf0e10cSrcweir fi 2998cdf0e10cSrcweir fi 2999cdf0e10cSrcweir if test -z "$JAVACOMPILER"; then 3000897adb27SJürgen Schmidt AC_MSG_ERROR([$javacompiler not found, please use --with-jdk-home]) 3001cdf0e10cSrcweir fi 3002cdf0e10cSrcweir if test "$_os" = "WINNT"; then 300328633775SPedro Giffuni if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then 3004cdf0e10cSrcweir JAVACOMPILER="${JAVACOMPILER}.exe" 3005cdf0e10cSrcweir fi 3006cdf0e10cSrcweir JAVACOMPILER=`cygpath -d "$JAVACOMPILER"` 3007cdf0e10cSrcweir JAVACOMPILER=`cygpath -u "$JAVACOMPILER"` 3008cdf0e10cSrcweir fi 3009cdf0e10cSrcweir if test "$_os" = "OS2"; then 301028633775SPedro Giffuni if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then 3011cdf0e10cSrcweir JAVACOMPILER="${JAVACOMPILER}.exe" 3012cdf0e10cSrcweir fi 3013cdf0e10cSrcweir fi 3014cdf0e10cSrcweir 301528633775SPedro Giffuni if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Eclipse Java Compiler"` -gt 0; then 3016cdf0e10cSrcweir AC_MSG_CHECKING([re-checking JDK]) 3017cdf0e10cSrcweir JDK=gcj 3018cdf0e10cSrcweir AC_MSG_RESULT([checked (ecj)]) 3019cdf0e10cSrcweir #TODO: what's to do here? some switch to do 1.5 compiling? 3020cdf0e10cSrcweir JAVAFLAGS="-source 1.5 -target 1.5" 3021cdf0e10cSrcweir _gij_longver="40200" 3022cdf0e10cSrcweir fi 3023cdf0e10cSrcweirfi 3024cdf0e10cSrcweir 3025cdf0e10cSrcweirJAVACISGCJ="" 3026cdf0e10cSrcweirdnl =================================================================== 3027cdf0e10cSrcweirdnl Checks that javac is gcj 3028cdf0e10cSrcweirdnl =================================================================== 3029cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 303028633775SPedro Giffuni if test `$JAVACOMPILER --version 2>&1 | $GREP -c "GCC"` -gt 0; then 3031cdf0e10cSrcweir JAVACISGCJ="yes" 3032cdf0e10cSrcweir fi 3033cdf0e10cSrcweirfi 3034cdf0e10cSrcweirAC_SUBST(JAVACISGCJ) 3035cdf0e10cSrcweir 3036cdf0e10cSrcweirdnl =================================================================== 3037cdf0e10cSrcweirdnl Checks for javadoc 3038cdf0e10cSrcweirdnl =================================================================== 3039cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 3040cdf0e10cSrcweir if test -z "$with_jdk_home"; then 3041cdf0e10cSrcweir AC_PATH_PROG(JAVADOC, javadoc) 3042cdf0e10cSrcweir else 3043cdf0e10cSrcweir _javadoc_path="$with_jdk_home/bin/javadoc" 3044cdf0e10cSrcweir if test "$_os" = "OS2"; then 304528633775SPedro Giffuni if test x`echo "$_javadoc_path" | $GREP -i '\.exe$'` = x; then 3046cdf0e10cSrcweir _javadoc_path="${_javadoc_path}.exe" 3047cdf0e10cSrcweir fi 3048cdf0e10cSrcweir fi 3049cdf0e10cSrcweir dnl Check if there is a javadoc at all. 3050cdf0e10cSrcweir if test -x "$_javadoc_path"; then 3051cdf0e10cSrcweir JAVADOC=$_javadoc_path 3052cdf0e10cSrcweir else 3053cdf0e10cSrcweir AC_PATH_PROG(JAVADOC, javadoc) 3054cdf0e10cSrcweir fi 3055cdf0e10cSrcweir fi 3056cdf0e10cSrcweir if test -z "$JAVADOC"; then 3057897adb27SJürgen Schmidt AC_MSG_ERROR([$_javadoc_path not found, please use --with-jdk-home]) 3058cdf0e10cSrcweir fi 3059cdf0e10cSrcweir if test "$_os" = "WINNT"; then 306028633775SPedro Giffuni if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then 3061cdf0e10cSrcweir JAVADOC="${JAVADOC}.exe" 3062cdf0e10cSrcweir fi 3063cdf0e10cSrcweir JAVADOC=`cygpath -d "$JAVADOC"` 3064cdf0e10cSrcweir JAVADOC=`cygpath -u "$JAVADOC"` 3065cdf0e10cSrcweir fi 3066cdf0e10cSrcweir if test "$_os" = "OS2"; then 306728633775SPedro Giffuni if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then 3068cdf0e10cSrcweir JAVADOC="${JAVADOC}.exe" 3069cdf0e10cSrcweir fi 3070cdf0e10cSrcweir fi 3071cdf0e10cSrcweirfi 3072cdf0e10cSrcweir 3073cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 3074cdf0e10cSrcweir dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij 3075cdf0e10cSrcweir if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then 3076cdf0e10cSrcweir if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then 3077cdf0e10cSrcweir cat > findhome.java <<_ACEOF 3078cdf0e10cSrcweir[import java.io.File; 3079cdf0e10cSrcweir 3080cdf0e10cSrcweirclass findhome 3081cdf0e10cSrcweir{ 3082cdf0e10cSrcweir public static void main(String args[]) 3083cdf0e10cSrcweir { 3084cdf0e10cSrcweir String jrelocation = System.getProperty("java.home"); 3085cdf0e10cSrcweir File jre = new File(jrelocation); 3086cdf0e10cSrcweir System.out.println(jre.getParent()); 3087cdf0e10cSrcweir } 3088cdf0e10cSrcweir}] 3089cdf0e10cSrcweir_ACEOF 3090cdf0e10cSrcweir AC_MSG_CHECKING([if javac works]) 3091cdf0e10cSrcweir javac_cmd="$JAVACOMPILER findhome.java 1>&2" 3092cdf0e10cSrcweir AC_TRY_EVAL(javac_cmd) 3093cdf0e10cSrcweir if test $? = 0 && test -f ./findhome.class ; then 3094cdf0e10cSrcweir AC_MSG_RESULT([javac works]) 3095cdf0e10cSrcweir else 3096cdf0e10cSrcweir echo "configure: javac test failed" >&5 3097cdf0e10cSrcweir cat findhome.java >&5 3098cdf0e10cSrcweir AC_MSG_ERROR([javac does not work - java projects will not build!]) 3099cdf0e10cSrcweir fi 3100cdf0e10cSrcweir 3101cdf0e10cSrcweir AC_MSG_CHECKING([if gij knows its java.home]) 3102cdf0e10cSrcweir JAVA_HOME=`$JAVAINTERPRETER findhome` 3103cdf0e10cSrcweir if test $? = 0 && test "$JAVA_HOME" != "" ; then 3104cdf0e10cSrcweir AC_MSG_RESULT([$JAVA_HOME]) 3105cdf0e10cSrcweir else 3106cdf0e10cSrcweir echo "configure: java test failed" >&5 3107cdf0e10cSrcweir cat findhome.java >&5 3108cdf0e10cSrcweir AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home]) 3109cdf0e10cSrcweir fi 3110cdf0e10cSrcweir else 3111cdf0e10cSrcweir JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"` 3112cdf0e10cSrcweir fi 3113cdf0e10cSrcweir fi 3114cdf0e10cSrcweir 3115cdf0e10cSrcweir dnl second sanity check JAVA_HOME if possible 3116cdf0e10cSrcweir if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then 3117cdf0e10cSrcweir # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr 3118cdf0e10cSrcweir if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then 3119cdf0e10cSrcweir javac_link_f=`readlink -f "$JAVACOMPILER" 2>/dev/null` 3120cdf0e10cSrcweir if test $? == 0 && test "$JAVACOMPILER" != "$javac_link_f"; then 3121cdf0e10cSrcweir # try to recover first by looking whether we have a alternatives 3122cdf0e10cSrcweir # system as in Debian or newer SuSEs where following /usr/bin/javac 3123cdf0e10cSrcweir # over /etc/alternatives/javac leads to the right bindir where we 3124cdf0e10cSrcweir # just need to strip a bit away to get a valid JAVA_HOME 3125cdf0e10cSrcweir # Solaris 11 is even worse, because target is relative, so use -f 3126cdf0e10cSrcweir JAVA_HOME="$javac_link_f" 3127cdf0e10cSrcweir elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then 3128cdf0e10cSrcweir # Darwin readlink(1) is so primitive it doesn't even support -f 3129cdf0e10cSrcweir # maybe only one level of symlink (e.g. on Mac) 3130cdf0e10cSrcweir JAVA_HOME=`readlink $JAVACOMPILER` 3131cdf0e10cSrcweir else 3132cdf0e10cSrcweir # else warn 3133cdf0e10cSrcweir AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect]) 3134cdf0e10cSrcweir AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home]) 3135cdf0e10cSrcweir echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn 3136cdf0e10cSrcweir echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn 3137cdf0e10cSrcweir fi 3138cdf0e10cSrcweir dnl now that we have the path to the real javac, make a JAVA_HOME out of it.. 3139cdf0e10cSrcweir if test "$JAVA_HOME" != "/usr"; then 3140cdf0e10cSrcweir if test "$_os" = "Darwin"; then 3141cdf0e10cSrcweir dnl Leopard returns a non-suitable path with readlink - points to "Current" only 3142cdf0e10cSrcweir JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,) 3143cdf0e10cSrcweir dnl Tiger already returns a JDK path.. 3144cdf0e10cSrcweir JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,) 3145cdf0e10cSrcweir else 3146cdf0e10cSrcweir JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,) 3147cdf0e10cSrcweir fi 3148cdf0e10cSrcweir fi 3149cdf0e10cSrcweir fi 3150cdf0e10cSrcweir # now check if $JAVA_HOME is really valid 3151cdf0e10cSrcweir if test "$_os" = "Darwin"; then 3152cdf0e10cSrcweir if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then 3153cdf0e10cSrcweir JAVA_HOME_OK="NO" 3154cdf0e10cSrcweir fi 3155cdf0e10cSrcweir elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then 3156cdf0e10cSrcweir JAVA_HOME_OK="NO" 3157cdf0e10cSrcweir fi 3158cdf0e10cSrcweir if test "$JAVA_HOME_OK" = "NO"; then 3159cdf0e10cSrcweir AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script]) 3160cdf0e10cSrcweir AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed]) 3161cdf0e10cSrcweir AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly]) 3162cdf0e10cSrcweir echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn 3163cdf0e10cSrcweir echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn 3164cdf0e10cSrcweir echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn 3165cdf0e10cSrcweir# if test "$JDK" = "gcj"; then 3166cdf0e10cSrcweir# 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 3167cdf0e10cSrcweir# fi 3168cdf0e10cSrcweir fi 3169cdf0e10cSrcweir fi 3170cdf0e10cSrcweirfi 3171cdf0e10cSrcweir 3172cdf0e10cSrcweirAWTLIB= 3173cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 3174cdf0e10cSrcweir AC_MSG_CHECKING([for jawt lib name]) 3175cdf0e10cSrcweir if test "$JDK" = "gcj"; then 3176cdf0e10cSrcweir save_CFLAGS=$CFLAGS 3177cdf0e10cSrcweir save_LDFLAGS=$LDFLAGS 3178cdf0e10cSrcweir CFLAGS="$CFLAGS -I$JAVA_HOME/include" 3179cdf0e10cSrcweir LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" 3180cdf0e10cSrcweir exec 6>/dev/null # no output 3181cdf0e10cSrcweir AC_CHECK_HEADER(jni.h, [], 3182cdf0e10cSrcweir [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], []) 3183cdf0e10cSrcweir AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] ) 3184cdf0e10cSrcweir exec 6>&1 # output on again 3185cdf0e10cSrcweir CFLAGS=$save_CFLAGS 3186cdf0e10cSrcweir LDFLAGS=$save_LDFLAGS 3187cdf0e10cSrcweir fi 3188cdf0e10cSrcweir # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols. 3189cdf0e10cSrcweir # A workaround is to link also against libpmawt.so 3190cdf0e10cSrcweir if test "$JDK" = "ibm" ; then 3191cdf0e10cSrcweir save_CFLAGS=$CFLAGS 3192cdf0e10cSrcweir save_LDFLAGS=$LDFLAGS 3193cdf0e10cSrcweir save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH 3194cdf0e10cSrcweir CFLAGS="$CFLAGS -I$JAVA_HOME/include" 3195cdf0e10cSrcweir LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin" 3196cdf0e10cSrcweir LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH 3197cdf0e10cSrcweir export LD_LIBRARY_PATH 3198cdf0e10cSrcweir exec 6>/dev/null # no output 3199cdf0e10cSrcweir AC_CHECK_HEADER(jni.h, [], 3200cdf0e10cSrcweir [AC_MSG_ERROR([jni.h could not be found.])], []) 3201cdf0e10cSrcweir AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] ) 3202cdf0e10cSrcweir if test -z "$AWTLIB"; then 3203cdf0e10cSrcweir LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" 3204cdf0e10cSrcweir AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"]) 3205cdf0e10cSrcweir fi 3206cdf0e10cSrcweir exec 6>&1 # output on again 3207cdf0e10cSrcweir CFLAGS=$save_CFLAGS 3208cdf0e10cSrcweir LDFLAGS=$save_LDFLAGS 3209cdf0e10cSrcweir LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH 3210cdf0e10cSrcweir fi 3211cdf0e10cSrcweir if test -z "$AWTLIB"; then 3212cdf0e10cSrcweir AWTLIB=-ljawt 3213cdf0e10cSrcweir fi 3214cdf0e10cSrcweir AC_MSG_RESULT([$AWTLIB]) 3215cdf0e10cSrcweir AC_SUBST(AWTLIB) 3216cdf0e10cSrcweirfi 3217cdf0e10cSrcweir 3218cdf0e10cSrcweirdnl =================================================================== 3219cdf0e10cSrcweirdnl Check for optional gcj for AOT 3220cdf0e10cSrcweirdnl =================================================================== 3221cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 3222cdf0e10cSrcweir AC_MSG_CHECKING([whether to enable gcj aot compilation]) 3223cdf0e10cSrcweir if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then 3224cdf0e10cSrcweir AC_MSG_RESULT([yes]) 322528633775SPedro Giffuni if test `echo $WITH_JAVA | $GREP -c "gij"` -eq 0; then 3226cdf0e10cSrcweir gcjaot="gcj" 3227cdf0e10cSrcweir else 3228cdf0e10cSrcweir gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"` 3229cdf0e10cSrcweir fi 3230cdf0e10cSrcweir AC_MSG_RESULT([$gcjaot]) 3231cdf0e10cSrcweir if test -n "$with_jdk_home"; then 3232cdf0e10cSrcweir _javac_path="$with_jdk_home/bin/$gcjaot" 3233cdf0e10cSrcweir dnl Check if there is a gcj at all. 3234cdf0e10cSrcweir if test -x "$_javac_path"; then 3235cdf0e10cSrcweir JAVAAOTCOMPILER=$_javac_path 3236cdf0e10cSrcweir fi 3237cdf0e10cSrcweir fi 3238cdf0e10cSrcweir if test -z "$JAVAAOTCOMPILER"; then 3239cdf0e10cSrcweir AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot) 3240cdf0e10cSrcweir fi 3241cdf0e10cSrcweir if test -z "$JAVAAOTCOMPILER"; then 3242897adb27SJürgen Schmidt AC_MSG_WARN([$gcjaot not found, please use --with-jdk-home]) 3243cdf0e10cSrcweir fi 3244cdf0e10cSrcweir else 3245cdf0e10cSrcweir AC_MSG_RESULT([no]) 3246cdf0e10cSrcweir fi 3247cdf0e10cSrcweirfi 3248cdf0e10cSrcweir 3249cdf0e10cSrcweirAC_SUBST(JAVA_HOME) 3250cdf0e10cSrcweirAC_SUBST(JDK) 3251cdf0e10cSrcweirAC_SUBST(JAVAFLAGS) 3252cdf0e10cSrcweirAC_SUBST(JAVAINTERPRETER) 3253cdf0e10cSrcweirAC_SUBST(JAVAIFLAGS) 3254cdf0e10cSrcweirAC_SUBST(JAVACOMPILER) 3255cdf0e10cSrcweirAC_SUBST(JAVAAOTCOMPILER) 3256cdf0e10cSrcweirAC_SUBST(JAVADOC) 3257cdf0e10cSrcweir 3258cdf0e10cSrcweirdnl =================================================================== 3259cdf0e10cSrcweirdnl Checks for specific files. 3260cdf0e10cSrcweirdnl =================================================================== 3261cdf0e10cSrcweir 3262cdf0e10cSrcweirdnl =================================================================== 3263cdf0e10cSrcweirdnl Checks for programs. 3264cdf0e10cSrcweirdnl =================================================================== 3265cdf0e10cSrcweir 3266cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable EPM for packing]) 3267cdf0e10cSrcweirif test "$enable_epm" = "yes"; then 3268cdf0e10cSrcweir AC_MSG_RESULT([yes]) 3269cdf0e10cSrcweir dnl =================================================================== 3270cdf0e10cSrcweir dnl Check for epm - not needed for windows 3271cdf0e10cSrcweir dnl =================================================================== 3272cdf0e10cSrcweir if test "$_os" != "WINNT"; then 3273cdf0e10cSrcweir if test -n "$with_epm"; then 3274cdf0e10cSrcweir EPM=$with_epm 3275cdf0e10cSrcweir else 3276cdf0e10cSrcweir AC_PATH_PROG(EPM, epm, no) 3277cdf0e10cSrcweir fi 327844a214f4SJürgen Schmidt 327919ce5e0bSAndrea Pescetti # Override system epm and --with-epm if --with-epm-url is used. 328019ce5e0bSAndrea Pescetti if test -n "$with_epm_url" ; then 328144a214f4SJürgen Schmidt # At this moment we can not verify the URL or the content that we want to download. 328244a214f4SJürgen Schmidt EPM_URL=$with_epm_url 328344a214f4SJürgen Schmidt AC_MSG_RESULT([epm will be downloaded and compiled in bootstrap]) 328444a214f4SJürgen Schmidt EPM= 3285cdf0e10cSrcweir echo "EPM will be built." 3286cdf0e10cSrcweir BUILD_EPM=YES 3287cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE EPM" 3288cdf0e10cSrcweir else 328944a214f4SJürgen Schmidt if test "$EPM" = "no" ; then 3290f14519e3SAndrea Pescetti AC_MSG_ERROR([no. Install ESP Package Manager (http://www.msweet.org/projects.php?Z2) and/or specify the path to the right epm (--with-epm). Or specify an URL to an epm-3.7 source package (--with-epm-url); run configure with the --help option for a list of possible URLs.]) 3291cdf0e10cSrcweir else 329244a214f4SJürgen Schmidt # Gentoo has some epm which is something different... 329344a214f4SJürgen Schmidt AC_MSG_CHECKING([whether the found epm is the right epm]) 329428633775SPedro Giffuni if $EPM | $GREP "ESP Package Manager" >/dev/null 2>/dev/null; then 329544a214f4SJürgen Schmidt AC_MSG_RESULT([yes]) 329644a214f4SJürgen Schmidt else 32976849fadbSAndrea Pescetti AC_MSG_ERROR([no. Install ESP Package Manager (http://www.msweet.org/projects.php?Z2) and/or specify the path to the right epm (--with-epm). Or specify an URL to an epm-3.7 source package (--with-epm-url); run configure with the --help option for a list of possible URLs.]) 329844a214f4SJürgen Schmidt fi 329944a214f4SJürgen Schmidt AC_MSG_CHECKING([epm version]) 330028633775SPedro Giffuni EPM_VERSION=`$EPM | $GREP 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` 330144a214f4SJürgen Schmidt if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ 330244a214f4SJürgen Schmidt test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then 330344a214f4SJürgen Schmidt AC_MSG_RESULT([OK, >= 3.7]) 330444a214f4SJürgen Schmidt BUILD_EPM=NO 330544a214f4SJürgen Schmidt if test "$_os" = "Darwin"; then 33062e39503fSjim _osxpkgbuild='no' 3307b48104e3Sjim AC_MSG_CHECKING([checking if OS X pkgbuild is supported]) 3308b48104e3Sjim if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "4" || \ 3309b48104e3Sjim test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "4" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "3"; then 3310b48104e3Sjim AC_MSG_RESULT([OK, >= 4.3]) 33112e39503fSjim _osxpkgbuild='yes' 3312b48104e3Sjim else 331344a214f4SJürgen Schmidt AC_MSG_CHECKING([which PackageMaker EPM thinks to use]) 3314b48104e3Sjim _pm=`strings $EPM | $GREP PackageMaker | cut -d" " -f1` 3315b48104e3Sjim if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then 3316b48104e3Sjim AC_MSG_ERROR([$_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker)]) 3317b48104e3Sjim elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then 3318b48104e3Sjim AC_MSG_RESULT([$_pm, ok]) 3319b48104e3Sjim else # we never should get here, but go safe 3320b48104e3Sjim AC_MSG_ERROR([$_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker)]) 3321b48104e3Sjim fi 3322b48104e3Sjim fi 332344a214f4SJürgen Schmidt fi 332444a214f4SJürgen Schmidt else 332544a214f4SJürgen Schmidt AC_MSG_ERROR([too old. epm >= 3.7 is required.]) 332644a214f4SJürgen Schmidt fi 332744a214f4SJürgen Schmidt fi 3328cdf0e10cSrcweir fi 3329cdf0e10cSrcweir fi 3330cdf0e10cSrcweir 3331cdf0e10cSrcweir # test which package format to use 3332cdf0e10cSrcweir AC_MSG_CHECKING([which package format to use]) 3333cdf0e10cSrcweir 3334cdf0e10cSrcweir # defaults 3335cdf0e10cSrcweir case "$_os" in 3336cdf0e10cSrcweir OS2) 3337cdf0e10cSrcweir PKGFORMAT=native 3338cdf0e10cSrcweir ;; 3339cdf0e10cSrcweir Darwin) 3340cdf0e10cSrcweir PKGFORMAT=dmg 3341cdf0e10cSrcweir ;; 3342cdf0e10cSrcweir SunOS) 3343cdf0e10cSrcweir PKGFORMAT=pkg 3344cdf0e10cSrcweir ;; 3345cdf0e10cSrcweir Linux) 3346cdf0e10cSrcweir # if building on Debian, default should be deb... 3347cdf0e10cSrcweir if test -e /etc/debian_version; then 3348cdf0e10cSrcweir PKGFORMAT=deb 3349cdf0e10cSrcweir else 3350cdf0e10cSrcweir PKGFORMAT=rpm 3351cdf0e10cSrcweir fi 3352cdf0e10cSrcweir ;; 3353cdf0e10cSrcweir AIX) 3354cdf0e10cSrcweir PKGFORMAT=aix 3355cdf0e10cSrcweir ;; 3356cdf0e10cSrcweir *BSD) 3357cdf0e10cSrcweir PKGFORMAT=bsd 3358cdf0e10cSrcweir ;; 3359cdf0e10cSrcweir OSF1) 3360cdf0e10cSrcweir PKGFORMAT=setld 3361cdf0e10cSrcweir ;; 3362cdf0e10cSrcweir WINNT) 3363cdf0e10cSrcweir PKGFORMAT=msi 3364cdf0e10cSrcweir ;; 33659d1669aeSMatthias Seidel # we never should get here since we check the architecture/os at the beginning, 3366cdf0e10cSrcweir # but go sure... 3367cdf0e10cSrcweir *) 3368cdf0e10cSrcweir AC_MSG_ERROR([unknown system]) 3369cdf0e10cSrcweir esac 3370cdf0e10cSrcweir if test -n "$with_package_format"; then 3371cdf0e10cSrcweir for i in $with_package_format; do 3372cdf0e10cSrcweir case "$i" in 3373cdf0e10cSrcweir aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi) 3374cdf0e10cSrcweir ;; 3375cdf0e10cSrcweir *) 3376cdf0e10cSrcweir AC_MSG_ERROR([unsupported format $i. Supported by EPM are: 3377cdf0e10cSrcweiraix - AIX software distribution 3378cdf0e10cSrcweirbsd - FreeBSD, NetBSD, or OpenBSD software distribution 3379cdf0e10cSrcweirdepot or swinstall - HP-UX software distribution 3380cdf0e10cSrcweirdeb - Debian software distribution 3381cdf0e10cSrcweirinst or tardist - IRIX software distribution 3382cdf0e10cSrcweirosx - MacOS X software distribution 3383cdf0e10cSrcweirpkg - Solaris software distribution 3384cdf0e10cSrcweirrpm - RedHat software distribution 3385cdf0e10cSrcweirsetld - Tru64 (setld) software distribution 3386cdf0e10cSrcweirnative - "Native" software distribution for the platform 3387cdf0e10cSrcweirportable - Portable software distribution 3388cdf0e10cSrcweirOOo additionally supports: 3389cdf0e10cSrcweirarchive - .tar.gz or .zip 3390cdf0e10cSrcweirdmg - Mac OS X .dmg 3391cdf0e10cSrcweirinstalled - installation tree 3392cdf0e10cSrcweirmsi - Windows .msi 3393cdf0e10cSrcweir ]) 3394cdf0e10cSrcweir ;; 3395cdf0e10cSrcweir esac 3396cdf0e10cSrcweir done 3397cdf0e10cSrcweir PKGFORMAT="$with_package_format" 3398cdf0e10cSrcweir fi 3399cdf0e10cSrcweir AC_MSG_RESULT([$PKGFORMAT]) 3400cdf0e10cSrcweir if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then 3401cdf0e10cSrcweir AC_MSG_CHECKING([for rpm]) 3402cdf0e10cSrcweir for a in "$RPM" rpmbuild rpm; do 3403cdf0e10cSrcweir $a --usage >/dev/null 2> /dev/null 3404cdf0e10cSrcweir if test $? -eq 0; then 3405cdf0e10cSrcweir RPM=$a 3406cdf0e10cSrcweir break 3407cdf0e10cSrcweir else 3408cdf0e10cSrcweir $a --version >/dev/null 2> /dev/null 3409cdf0e10cSrcweir if test $? -eq 0; then 3410cdf0e10cSrcweir RPM=$a 3411cdf0e10cSrcweir break 3412cdf0e10cSrcweir fi 3413cdf0e10cSrcweir fi 3414cdf0e10cSrcweir done 3415cdf0e10cSrcweir if test -z "$RPM" ; then 3416cdf0e10cSrcweir AC_MSG_ERROR([not found]) 3417cdf0e10cSrcweir elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then 3418cdf0e10cSrcweir RPM_PATH=`which $RPM` 3419cdf0e10cSrcweir AC_MSG_RESULT([$RPM_PATH]) 3420cdf0e10cSrcweir else 3421cdf0e10cSrcweir AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.]) 3422cdf0e10cSrcweir fi 3423cdf0e10cSrcweir fi 3424cdf0e10cSrcweir if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then 3425cdf0e10cSrcweir AC_PATH_PROG(DPKG, dpkg, no) 3426cdf0e10cSrcweir if test "$DPKG" = "no"; then 3427cdf0e10cSrcweir AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.]) 3428cdf0e10cSrcweir fi 3429cdf0e10cSrcweir fi 3430f3c306a7SAndre Fischer if echo "$PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then 3431cdf0e10cSrcweir if test "$_os" = "Darwin"; then 34322e39503fSjim if test "$_osxpkgbuild" = "no"; then 34332e39503fSjim AC_MSG_CHECKING([for PackageMaker availability]) 34342e39503fSjim if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then 34352e39503fSjim AC_MSG_ERROR([not installed. Please install Apples Dev Tools]) 34362e39503fSjim else 34372e39503fSjim AC_MSG_RESULT([ok]) 34382e39503fSjim fi 3439cdf0e10cSrcweir fi 3440cdf0e10cSrcweir else 3441cdf0e10cSrcweir AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...]) 3442cdf0e10cSrcweir fi 3443cdf0e10cSrcweir fi 3444cdf0e10cSrcweir if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \ 3445cdf0e10cSrcweir echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then 3446cdf0e10cSrcweir if test "$EPM" != "no" && test "$EPM" != "internal"; then 3447cdf0e10cSrcweir if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then 3448cdf0e10cSrcweir AC_MSG_CHECKING([whether epm is patched for OOos needs]) 344928633775SPedro Giffuni if $GREP "Patched for Apache OpenOffice" $EPM >/dev/null 2>/dev/null; then 3450cdf0e10cSrcweir AC_MSG_RESULT([yes]) 3451cdf0e10cSrcweir else 3452cdf0e10cSrcweir AC_MSG_RESULT([no]) 345328633775SPedro Giffuni if echo "$PKGFORMAT" | $GREP -q rpm; then 3454cdf0e10cSrcweir _pt="rpm" 3455cdf0e10cSrcweir AC_MSG_WARN([the rpms will need to be installed with --nodeps]) 3456cdf0e10cSrcweir echo "the rpms will need to be installed with --nodeps" >> warn 3457cdf0e10cSrcweir else 3458cdf0e10cSrcweir _pt="pkg" 3459cdf0e10cSrcweir fi 3460cdf0e10cSrcweir AC_MSG_WARN([the ${_pt}s will not be relocateable]) 3461cdf0e10cSrcweir echo "the ${_pt}s will not be relocateable" >> warn 3462cdf0e10cSrcweir AC_MSG_WARN([if you want to make sure installation without --nodeps and 3463cdf0e10cSrcweir relocation will work, you need to patch your epm with the 3464cdf0e10cSrcweir patch in epm/epm-3.7.patch or build with 3465cdf0e10cSrcweir --with-epm=internal which will build a suitable epm]) 3466cdf0e10cSrcweir fi 3467cdf0e10cSrcweir fi 3468cdf0e10cSrcweir fi 3469cdf0e10cSrcweir fi 3470cdf0e10cSrcweir if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then 3471cdf0e10cSrcweir AC_PATH_PROG(PKGMK, pkgmk, no) 3472cdf0e10cSrcweir if test "$PKGMK" = "no"; then 3473cdf0e10cSrcweir AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.]) 3474cdf0e10cSrcweir fi 3475cdf0e10cSrcweir fi 3476cdf0e10cSrcweir AC_SUBST(RPM) 3477cdf0e10cSrcweir AC_SUBST(DPKG) 3478cdf0e10cSrcweir AC_SUBST(PKGMK) 3479cdf0e10cSrcweirelse 3480cdf0e10cSrcweir AC_MSG_RESULT([no]) 348144a214f4SJürgen Schmidt BUILD_EPM=NO 3482cdf0e10cSrcweir EPM=NO 3483cdf0e10cSrcweir PKGFORMAT=native 3484cdf0e10cSrcweirfi 348544a214f4SJürgen SchmidtAC_SUBST(BUILD_EPM) 348644a214f4SJürgen SchmidtAC_SUBST(EPM_URL) 3487cdf0e10cSrcweirAC_SUBST(EPM) 3488cdf0e10cSrcweirAC_SUBST(PKGFORMAT) 3489cdf0e10cSrcweir 3490cdf0e10cSrcweirdnl =================================================================== 3491cdf0e10cSrcweirdnl Check for gperf 3492cdf0e10cSrcweirdnl =================================================================== 3493cdf0e10cSrcweirAC_PATH_PROG(GPERF, gperf) 349410e8ff58SPedro Giffuniif test -z "$with_gperf"; then 349510e8ff58SPedro Giffuni AC_PATH_PROG(GPERF, gperf) 349610e8ff58SPedro Giffuni if test -z "$GPERF"; then 349710e8ff58SPedro Giffuni AC_MSG_ERROR([gperf not found but needed. Install it and/or specify --with-gperf=/path/to/it.]) 349810e8ff58SPedro Giffuni fi 349910e8ff58SPedro Giffunielse 350010e8ff58SPedro Giffuni if test -x "$with_gperf"; then 350110e8ff58SPedro Giffuni GPERF=$with_gperf 350210e8ff58SPedro Giffuni else 350310e8ff58SPedro Giffuni AC_MSG_ERROR([--with-gperf did not point to an executable]) 350410e8ff58SPedro Giffuni fi 3505cdf0e10cSrcweirfi 3506cdf0e10cSrcweirAC_MSG_CHECKING([gperf version]) 3507cdf0e10cSrcweirif test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then 3508cdf0e10cSrcweir AC_MSG_RESULT([OK]) 350910e8ff58SPedro Giffuni GPERF=$GPERF 3510cdf0e10cSrcweirelse 3511cdf0e10cSrcweir AC_MSG_ERROR([too old, you need at least 3.0.0]) 3512cdf0e10cSrcweirfi 351310e8ff58SPedro GiffuniAC_SUBST(GPERF) 3514cdf0e10cSrcweir 3515cdf0e10cSrcweirdnl =================================================================== 3516cdf0e10cSrcweirdnl Check for building stax 3517cdf0e10cSrcweirdnl =================================================================== 3518cdf0e10cSrcweirAC_MSG_CHECKING([whether to build the stax]) 3519b266cbf2SPedro Giffuniif test -f "./stax/download/stax-1.2.0.jar"; then 3520cdf0e10cSrcweir BUILD_STAX=NO 3521b266cbf2SPedro Giffuni AC_MSG_RESULT([no, will use the prebuilt stax/download/stax-1.2.0.jar]) 3522cdf0e10cSrcweirelse 3523cdf0e10cSrcweir BUILD_STAX=YES 3524cdf0e10cSrcweir AC_MSG_RESULT([yes]) 3525cdf0e10cSrcweirfi 3526cdf0e10cSrcweirAC_SUBST(BUILD_STAX) 3527cdf0e10cSrcweir 3528cdf0e10cSrcweirdnl =================================================================== 3529cdf0e10cSrcweirdnl Check for building ODK 3530cdf0e10cSrcweirdnl =================================================================== 3531cdf0e10cSrcweirAC_MSG_CHECKING([whether to build the ODK]) 3532cdf0e10cSrcweirif test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then 3533cdf0e10cSrcweir AC_MSG_RESULT([yes]) 3534cdf0e10cSrcweir if test "$WITH_JAVA" != "no"; then 3535cdf0e10cSrcweir AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll]) 3536cdf0e10cSrcweir if ! test -f "./external/unowinreg/unowinreg.dll"; then 3537cdf0e10cSrcweir HAVE_UNOWINREG_DLL=no 3538cdf0e10cSrcweir else 3539cdf0e10cSrcweir HAVE_UNOWINREG_DLL=yes 3540cdf0e10cSrcweir fi 3541cdf0e10cSrcweir if test "$HAVE_UNOWINREG_DLL" = "yes"; then 3542cdf0e10cSrcweir AC_MSG_RESULT([found]) 3543cdf0e10cSrcweir BUILD_UNOWINREG=NO 3544cdf0e10cSrcweir else 3545cdf0e10cSrcweir if test "$_os" = "WINNT"; then 3546cdf0e10cSrcweir AC_MSG_RESULT([not found, will be built]) 3547cdf0e10cSrcweir else 3548cdf0e10cSrcweir AC_MSG_WARN([not found, will be cross-built using mingw32]) 3549cdf0e10cSrcweir fi 3550cdf0e10cSrcweir BUILD_UNOWINREG=YES 3551cdf0e10cSrcweir fi 3552cdf0e10cSrcweir if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then 3553cdf0e10cSrcweir if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then 3554cdf0e10cSrcweir AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler. 3555cdf0e10cSrcweir Specify mingw32 g++ executable name with --with-mingwin. 3556cdf0e10cSrcweir Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and 3557f040151fSAndrea Pescetti put it into external/unowinreg using your browser or a command equivalent to: 3558f040151fSAndrea Pescetti wget -O external/unowinreg/unowinreg.dll http://www.openoffice.org/tools/unowinreg_prebuild/680/unowinreg.dll]) 3559cdf0e10cSrcweir fi 3560cdf0e10cSrcweir if echo "$WITH_MINGWIN" | $EGREP -q "/"; then 3561cdf0e10cSrcweir if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi 3562cdf0e10cSrcweir else 3563cdf0e10cSrcweir AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false) 3564cdf0e10cSrcweir fi 3565cdf0e10cSrcweir if test "$MINGWCXX" = "false"; then 3566cdf0e10cSrcweir AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.) 3567cdf0e10cSrcweir fi 3568cdf0e10cSrcweir AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler) 356928633775SPedro Giffuni if ! echo "`$MINGWCXX -dumpmachine`" | $GREP -q mingw32; then 3570cdf0e10cSrcweir AC_MSG_ERROR(no) 3571cdf0e10cSrcweir else 3572cdf0e10cSrcweir AC_MSG_RESULT(yes) 3573cdf0e10cSrcweir fi 3574cdf0e10cSrcweir if echo "$WITH_MINGWIN" | $EGREP -q "/"; then 3575b63233d8Sdamjan 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 3576cdf0e10cSrcweir else 3577cdf0e10cSrcweir AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`, false) 3578cdf0e10cSrcweir fi 3579cdf0e10cSrcweir if test "$MINGWSTRIP" = "false"; then 3580cdf0e10cSrcweir AC_MSG_ERROR(MinGW32 binutils needed. Install them.) 3581cdf0e10cSrcweir fi 3582cdf0e10cSrcweir AC_LANG_PUSH([C++]) 3583cdf0e10cSrcweir save_CXX=$CXX 3584cdf0e10cSrcweir save_CXXCPP=$CXXCPP 3585cdf0e10cSrcweir CXX=$MINGWCXX 3586cdf0e10cSrcweir CXXCPP="$MINGWCXX -E" 3587cdf0e10cSrcweir save_CXXFLAGS=$CXXFLAGS 3588cdf0e10cSrcweir save_CPPFLAGS=$CPPFLAGS 3589cdf0e10cSrcweir CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include" 3590cdf0e10cSrcweir CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include" 359107a3d7f1SPedro Giffuni # LIBS contains -lcrypt etc due to the AC_CHECK_LIBS which obviously 3592cdf0e10cSrcweir # do not make sense here (and 'd make the check fail) 3593cdf0e10cSrcweir save_LIBS=$LIBS 3594cdf0e10cSrcweir LIBS="" 3595cdf0e10cSrcweir AC_HAVE_LIBRARY(kernel32) 3596cdf0e10cSrcweir AC_HAVE_LIBRARY(advapi32) 3597cdf0e10cSrcweir AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])]) 3598cdf0e10cSrcweir CXXFLAGS=$save_CXXFLAGS 3599cdf0e10cSrcweir CPPFLAGS=$save_CPPFLAGS 3600cdf0e10cSrcweir CXX=$save_CXX 3601cdf0e10cSrcweir CXXCPP=$save_CXXCPP 3602cdf0e10cSrcweir LIBS=$save_LIBS 3603cdf0e10cSrcweir AC_LANG_POP([C++]) 3604cdf0e10cSrcweir fi 3605cdf0e10cSrcweir fi 3606cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE ODK" 3607cdf0e10cSrcweirelse 3608cdf0e10cSrcweir AC_MSG_RESULT([no]) 3609cdf0e10cSrcweir BUILD_UNOWINREG=NO 3610cdf0e10cSrcweirfi 3611cdf0e10cSrcweirAC_SUBST(BUILD_UNOWINREG) 3612cdf0e10cSrcweirAC_SUBST(MINGWCXX) 3613cdf0e10cSrcweirAC_SUBST(MINGWSTRIP) 3614cdf0e10cSrcweir 3615cdf0e10cSrcweirdnl =================================================================== 3616cdf0e10cSrcweirdnl Check for system stdlibs 3617cdf0e10cSrcweirdnl =================================================================== 3618cdf0e10cSrcweirAC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset]) 3619cdf0e10cSrcweirif test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ 3620cdf0e10cSrcweir test "$with_system_stdlibs" != "no"; then 3621cdf0e10cSrcweir AC_MSG_RESULT([no]) 3622cdf0e10cSrcweir SYSTEM_STDLIBS=YES 3623cdf0e10cSrcweirelse 3624cdf0e10cSrcweir AC_MSG_RESULT([yes]) 3625cdf0e10cSrcweir SYSTEM_STDLIBS=NO 3626cdf0e10cSrcweirfi 3627cdf0e10cSrcweirAC_SUBST(SYSTEM_STDLIBS) 3628cdf0e10cSrcweir 3629cdf0e10cSrcweirdnl =================================================================== 3630cdf0e10cSrcweirdnl Check for system zlib 3631cdf0e10cSrcweirdnl =================================================================== 3632cdf0e10cSrcweirif test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then 3633cdf0e10cSrcweir with_system_zlib=yes 3634cdf0e10cSrcweirfi 3635cdf0e10cSrcweirAC_MSG_CHECKING([which zlib to use]) 3636cdf0e10cSrcweirif test -n "$with_system_zlib" -o -n "$with_system_libs" && \ 3637cdf0e10cSrcweir test "$with_system_zlib" != "no"; then 3638cdf0e10cSrcweir AC_MSG_RESULT([external]) 3639cdf0e10cSrcweir SYSTEM_ZLIB=YES 3640cdf0e10cSrcweir AC_CHECK_HEADER(zlib.h, [], 3641cdf0e10cSrcweir [AC_MSG_ERROR(zlib.h not found. install zlib)], []) 3642cdf0e10cSrcweir AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ], 3643cdf0e10cSrcweir [AC_MSG_ERROR(zlib not found or functional)], []) 3644cdf0e10cSrcweirelse 3645cdf0e10cSrcweir AC_MSG_RESULT([internal]) 3646cdf0e10cSrcweir SYSTEM_ZLIB=NO 3647cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE ZLIB" 3648cdf0e10cSrcweirfi 3649cdf0e10cSrcweirAC_SUBST(SYSTEM_ZLIB) 3650cdf0e10cSrcweir 3651cdf0e10cSrcweirdnl =================================================================== 3652cdf0e10cSrcweirdnl Check for system jpeg 3653cdf0e10cSrcweirdnl =================================================================== 3654cdf0e10cSrcweirAC_MSG_CHECKING([which jpeg to use]) 3655cdf0e10cSrcweirif test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ 3656cdf0e10cSrcweir test "$with_system_jpeg" != "no"; then 3657cdf0e10cSrcweir AC_MSG_RESULT([external]) 3658cdf0e10cSrcweir SYSTEM_JPEG=YES 3659cdf0e10cSrcweir AC_CHECK_HEADER(jpeglib.h, [], 3660cdf0e10cSrcweir [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], []) 3661cdf0e10cSrcweir AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ], 3662cdf0e10cSrcweir [AC_MSG_CHECKING(jpeg library not found or fuctional)], []) 3663cdf0e10cSrcweirelse 3664cdf0e10cSrcweir AC_MSG_RESULT([internal]) 3665cdf0e10cSrcweir SYSTEM_JPEG=NO 3666cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE JPEG" 3667cdf0e10cSrcweirfi 3668cdf0e10cSrcweirAC_SUBST(SYSTEM_JPEG) 3669cdf0e10cSrcweir 3670cdf0e10cSrcweirdnl =================================================================== 3671cdf0e10cSrcweirdnl Check for system expat 3672cdf0e10cSrcweirdnl =================================================================== 3673cdf0e10cSrcweirAC_MSG_CHECKING([which expat to use]) 3674cdf0e10cSrcweirif test -n "$with_system_expat" -o -n "$with_system_libs" && \ 3675cdf0e10cSrcweir test "$with_system_expat" != "no"; then 3676cdf0e10cSrcweir AC_MSG_RESULT([external]) 3677cdf0e10cSrcweir SYSTEM_EXPAT=YES 3678cdf0e10cSrcweir AC_CHECK_HEADER(expat.h, [], 3679cdf0e10cSrcweir [AC_MSG_ERROR(expat.h not found. install expat)], []) 3680cdf0e10cSrcweir AC_CHECK_LIB(expat, XML_ParserCreate, [], 3681cdf0e10cSrcweir [AC_MSG_RESULT(expat library not found or functional.)], []) 3682cdf0e10cSrcweirelse 3683cdf0e10cSrcweir AC_MSG_RESULT([internal]) 3684cdf0e10cSrcweir SYSTEM_EXPAT=NO 3685cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE EXPAT" 3686cdf0e10cSrcweirfi 3687cdf0e10cSrcweirAC_SUBST(SYSTEM_EXPAT) 3688cdf0e10cSrcweir 3689cdf0e10cSrcweirdnl =================================================================== 3690cdf0e10cSrcweirdnl Check whether freetype is available 3691cdf0e10cSrcweirdnl =================================================================== 3692cdf0e10cSrcweirif test "$test_freetype" = "yes"; then 3693cdf0e10cSrcweir AC_MSG_CHECKING([whether freetype is available]) 3694cdf0e10cSrcweir PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 ) 3695cdf0e10cSrcweirfi 3696cdf0e10cSrcweirAC_SUBST(FREETYPE_CFLAGS) 3697cdf0e10cSrcweirAC_SUBST(FREETYPE_LIBS) 3698cdf0e10cSrcweir 3699cdf0e10cSrcweirdnl =================================================================== 3700cdf0e10cSrcweirdnl Check whether freetype2 supports emboldening 3701cdf0e10cSrcweirdnl =================================================================== 3702cdf0e10cSrcweirif test "$test_freetype" = "yes"; then 3703cdf0e10cSrcweir save_CPPFLAGS="$CPPFLAGS" 3704cdf0e10cSrcweir save_LDFLAGS="$LDFLAGS" 3705cdf0e10cSrcweir save_LIBS="$LIBS" 3706cdf0e10cSrcweir CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" 3707cdf0e10cSrcweir LDFLAGS="$LDFLAGS $FREETYPE_LIBS" 3708cdf0e10cSrcweir AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden, 3709cdf0e10cSrcweir [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], []) 3710cdf0e10cSrcweir LDFLAGS="$save_LDFLAGS" 3711cdf0e10cSrcweir CPPFLAGS="$save_CPPFLAGS" 3712cdf0e10cSrcweir LIBS="$save_LIBS" 3713cdf0e10cSrcweirfi 3714cdf0e10cSrcweirAC_SUBST(USE_FT_EMBOLDEN) 3715cdf0e10cSrcweir 3716cdf0e10cSrcweirif test -n "$with_system_libxslt" -o -n "$with_system_libs" && \ 3717cdf0e10cSrcweir test "$with_system_libxslt" != "no"; then 3718cdf0e10cSrcweir if test -z "$with_system_libxml" -a -z "$with_system_libs" || \ 3719cdf0e10cSrcweir test "$with_system_libxml" = "no"; then 3720cdf0e10cSrcweir # somehow AC_MSG_WARN won't work... 3721cdf0e10cSrcweir echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" 3722cdf0e10cSrcweir echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn 3723cdf0e10cSrcweir with_system_libxml=yes 3724cdf0e10cSrcweir fi 3725cdf0e10cSrcweirfi 3726cdf0e10cSrcweirif test -n "$with_system_libxml" -o -n "$with_system_libs" && \ 3727cdf0e10cSrcweir test "$with_system_libxml" != "no"; then 3728cdf0e10cSrcweir if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \ 3729cdf0e10cSrcweir test "$with_system_libxslt" = "no"; then 3730cdf0e10cSrcweir # somehow AC_MSG_WARN won't work... 3731cdf0e10cSrcweir echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" 3732cdf0e10cSrcweir echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn 3733cdf0e10cSrcweir with_system_libxslt=yes 3734cdf0e10cSrcweir fi 3735cdf0e10cSrcweirfi 3736cdf0e10cSrcweir 3737cdf0e10cSrcweirdnl =================================================================== 3738cdf0e10cSrcweirdnl Check for system libxslt 3739cdf0e10cSrcweirdnl =================================================================== 3740cdf0e10cSrcweirAC_MSG_CHECKING([which libxslt to use]) 3741cdf0e10cSrcweirif test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \ 3742cdf0e10cSrcweir "$_os" = "Darwin" && \ 3743cdf0e10cSrcweir test "$with_system_libxslt" != "no"; then 3744cdf0e10cSrcweir AC_MSG_RESULT([external]) 3745cdf0e10cSrcweir SYSTEM_LIBXSLT=YES 3746cdf0e10cSrcweir 37478ba2f6f7SHerbert Dürr if test "$_os" != "Darwin"; then 37488ba2f6f7SHerbert Dürr PKG_CHECK_MODULES(LIBXSLT, libxslt) 37498ba2f6f7SHerbert Dürr else 37508ba2f6f7SHerbert Dürr LIBXSLT_CFLAGS=`xslt-config --cflags` 375139ddf648SHerbert Dürr LIBXSLT_LIBS=`xslt-config --libs` 37528ba2f6f7SHerbert Dürr fi 3753cdf0e10cSrcweir 3754cdf0e10cSrcweir dnl Check for xsltproc 3755cdf0e10cSrcweir AC_PATH_PROG(XSLTPROC, xsltproc, no) 3756cdf0e10cSrcweir if test "$XSLTPROC" = "no"; then 3757cdf0e10cSrcweir AC_MSG_ERROR([xsltproc is required]) 3758cdf0e10cSrcweir fi 3759cdf0e10cSrcweirelse 3760cdf0e10cSrcweir AC_MSG_RESULT([internal]) 3761cdf0e10cSrcweir SYSTEM_LIBXSLT=NO 3762cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE LIBXSLT" 3763cdf0e10cSrcweirfi 3764cdf0e10cSrcweirAC_SUBST(SYSTEM_LIBXSLT) 3765cdf0e10cSrcweirAC_SUBST(LIBXSLT_CFLAGS) 3766cdf0e10cSrcweirAC_SUBST(LIBXSLT_LIBS) 3767cdf0e10cSrcweir 3768cdf0e10cSrcweir 3769cdf0e10cSrcweirdnl =================================================================== 3770cdf0e10cSrcweirdnl Check for system libxml 3771cdf0e10cSrcweirdnl =================================================================== 3772cdf0e10cSrcweirAC_MSG_CHECKING([which libxml to use]) 3773cdf0e10cSrcweirif test -n "$with_system_libxml" -o -n "$with_system_libs" -o \ 3774cdf0e10cSrcweir "$_os" = "Darwin" && \ 3775cdf0e10cSrcweir test "$with_system_libxml" != "no"; then 3776cdf0e10cSrcweir AC_MSG_RESULT([external]) 3777cdf0e10cSrcweir SYSTEM_LIBXML=YES 3778cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" 37798ba2f6f7SHerbert Dürr 37808ba2f6f7SHerbert Dürr if test "$_os" != "Darwin"; then 37818ba2f6f7SHerbert Dürr PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0) 37828ba2f6f7SHerbert Dürr else 37838ba2f6f7SHerbert Dürr LIBXML_CFLAGS=`xml2-config --cflags` 378439ddf648SHerbert Dürr LIBXML_LIBS=`xml2-config --libs` 37858ba2f6f7SHerbert Dürr fi 3786cdf0e10cSrcweirelse 3787cdf0e10cSrcweir AC_MSG_RESULT([internal]) 3788cdf0e10cSrcweir SYSTEM_LIBXML=NO 3789cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" 3790cdf0e10cSrcweirfi 3791cdf0e10cSrcweirAC_SUBST(SYSTEM_LIBXML) 3792cdf0e10cSrcweirAC_SUBST(LIBXML_CFLAGS) 3793cdf0e10cSrcweirAC_SUBST(LIBXML_LIBS) 3794cdf0e10cSrcweir 379561a3a0ffSHerbert Dürr 379661a3a0ffSHerbert Dürrdnl =================================================================== 379763fbc773SJim Jagielskidnl Checks for a MacOS platform SDK compatible with an OSX 10.7 deployment target 379861a3a0ffSHerbert Dürrdnl =================================================================== 379961a3a0ffSHerbert Dürrif test "$_os" = "Darwin"; then 38000d16e2e7SJim Jagielski sdk_target=$with_macosx_target 380107a3d7f1SPedro Giffuni AC_MSG_CHECKING([checking SDK compatibility with OSX $sdk_target]) 380261a3a0ffSHerbert Dürr 380363ad6360SHerbert Dürr sdk_minor=`echo $sdk_target | cut -d"." -f2` 380461a3a0ffSHerbert Dürr 380563fbc773SJim Jagielski if test "$sdk_minor" -lt "7"; then 380663fbc773SJim Jagielski AC_MSG_ERROR([SDK version < 10.7 is not longer supported]) 380761a3a0ffSHerbert Dürr else 380863ad6360SHerbert Dürr MACOSX_DEPLOYMENT_TARGET=$sdk_target 380963ad6360SHerbert Dürr 3810c235b4bcSJim Jagielski dnl Why not MacOSX10.9.sdk? It lacks Python.h (!?) 38114fa6b83dSJim Jagielski sdk_found=`xcodebuild -showsdks | $EGREP "sdk macosx10.(7|8|10|11)" | sed -e "s/.*sdk //" | tail -n1` 381263ad6360SHerbert Dürr if test -z "$sdk_found"; then 381363ad6360SHerbert Dürr AC_MSG_ERROR([No SDK with OSX $sdk_target compatibility found]) 3814e4db7d0fSHerbert Dürr else 3815e4db7d0fSHerbert Dürr AC_MSG_RESULT([yes, by using SDK $sdk_found]) 381661a3a0ffSHerbert Dürr fi 381761a3a0ffSHerbert Dürr 381863ad6360SHerbert Dürr sdk_path=`xcodebuild -version -sdk ${sdk_found} Path` 381961a3a0ffSHerbert Dürr AC_MSG_CHECKING([for $sdk_path]) 382061a3a0ffSHerbert Dürr if test -d "$sdk_path"; then 382161a3a0ffSHerbert Dürr AC_MSG_RESULT([yes]) 382261a3a0ffSHerbert Dürr else 3823e4db7d0fSHerbert Dürr AC_MSG_ERROR([not found!]) 382461a3a0ffSHerbert Dürr fi 382561a3a0ffSHerbert Dürr 382661a3a0ffSHerbert Dürr MACOSX_SDK_PATH=$sdk_path 382761a3a0ffSHerbert Dürr fi 382861a3a0ffSHerbert Dürr 382961a3a0ffSHerbert Dürrfi 383061a3a0ffSHerbert DürrAC_SUBST(MACOSX_DEPLOYMENT_TARGET) 383161a3a0ffSHerbert DürrAC_SUBST(MACOSX_SDK_PATH) 383261a3a0ffSHerbert Dürr 383361a3a0ffSHerbert Dürr 3834cdf0e10cSrcweirdnl =================================================================== 3835cdf0e10cSrcweirdnl Check for system python 3836cdf0e10cSrcweirdnl =================================================================== 3837cdf0e10cSrcweirAC_MSG_CHECKING([which python to use]) 3838cdf0e10cSrcweirif test "$_os" = "Darwin" && test "$with_system_python" != "no"; then 3839cdf0e10cSrcweir with_system_python=yes 3840d1c42586SJürgen Schmidt 3841d1c42586SJürgen Schmidt _python="/Library/Frameworks/Python.framework/Versions/Current/bin/python" 384264ada325SJürgen Schmidt if test ! -f $_python; then 384364ada325SJürgen Schmidt _python="/usr/bin/python" 384464ada325SJürgen Schmidt fi 384564ada325SJürgen Schmidt AC_MSG_RESULT([compiling against system python ($_python)]) 384664ada325SJürgen Schmidt 38471fb03631SHerbert Dürr _python_hexversion=`$_python -c "import sys; print(sys.hexversion);"` 384864ada325SJürgen Schmidt 3849b9b58fdaSJürgen Schmidt dnl hex version of Python 2.7.1 = 34013680 3850434ea190SJürgen Schmidt if test $_python_hexversion -ge 34013680 ; then 38511e1ac450SHerbert Dürr _python_version=`$_python -c "import sys; print sys.version;" | head -c 3` 3852d1c42586SJürgen Schmidt AC_MSG_RESULT([compiling against system python (version $_python_version)]) 3853d1c42586SJürgen Schmidt 3854d1c42586SJürgen Schmidt _python_ver=`$_python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"` 3855d1c42586SJürgen Schmidt 385664ada325SJürgen Schmidt if test -d "/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"; then 385764ada325SJürgen Schmidt PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver" 385861a3a0ffSHerbert Dürr elif test -d "$MACOSX_SDK_PATH/usr/include/python$_python_ver"; then 385961a3a0ffSHerbert Dürr PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/python$_python_ver" 386064ada325SJürgen Schmidt else 386161a3a0ffSHerbert Dürr PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver" 386264ada325SJürgen Schmidt fi 3863d1c42586SJürgen Schmidt else 3864b9b58fdaSJürgen Schmidt AC_MSG_ERROR([Python 2.7.1 or higher is required]) 3865d1c42586SJürgen Schmidt fi 3866d1c42586SJürgen Schmidt 3867cdf0e10cSrcweir PYTHON_LIBS="-framework Python" 3868cdf0e10cSrcweirelif test -n "$with_system_python" -o -n "$with_system_libs" && \ 3869cdf0e10cSrcweir test "$with_system_python" != "no"; then 3870cdf0e10cSrcweir with_system_python=yes 3871cdf0e10cSrcweir AC_MSG_RESULT([external]) 38721e1ac450SHerbert Dürr AM_PATH_PYTHON([2.7]) 3873cdf0e10cSrcweir 3874e038f100SPedro Giffuni python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"` 3875e038f100SPedro Giffuni python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"` 3876cdf0e10cSrcweir PYTHON_CFLAGS="-I$python_include" 3877cdf0e10cSrcweir PYTHON_LIBS="-lpython$python_version" 3878cdf0e10cSrcweirfi 3879cdf0e10cSrcweirif test "$with_system_python" = "yes" ; then 3880cdf0e10cSrcweir SYSTEM_PYTHON=YES 3881cdf0e10cSrcweir dnl check if the headers really work: 3882cdf0e10cSrcweir save_CPPFLAGS="$CPPFLAGS" 3883cdf0e10cSrcweir CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" 3884cdf0e10cSrcweir AC_CHECK_HEADER(Python.h, [], 3885cdf0e10cSrcweir [AC_MSG_ERROR(Python headers not found)], []) 3886cdf0e10cSrcweir CPPFLAGS="$save_CPPFLAGS" 3887cdf0e10cSrcweirelse 3888cdf0e10cSrcweir SYSTEM_PYTHON=NO 3889cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE PYTHON" 3890cdf0e10cSrcweir AC_MSG_RESULT([internal]) 3891cdf0e10cSrcweir # Embedded python dies without Home set 3892cdf0e10cSrcweir if test "z$HOME" = "z"; then 3893cdf0e10cSrcweir export HOME=""; 3894cdf0e10cSrcweir fi 3895cdf0e10cSrcweir # bz2 tarball and bzip2 is not standard 3896cdf0e10cSrcweir if test -z "$BZIP2"; then 3897cdf0e10cSrcweir AC_PATH_PROG( BZIP2, bzip2) 3898cdf0e10cSrcweir if test -z "$BZIP2"; then 3899cdf0e10cSrcweir AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2]) 3900cdf0e10cSrcweir fi 3901cdf0e10cSrcweir fi 3902cdf0e10cSrcweirfi 3903cdf0e10cSrcweirAC_SUBST(SYSTEM_PYTHON) 3904cdf0e10cSrcweirAC_SUBST(PYTHON_CFLAGS) 3905cdf0e10cSrcweirAC_SUBST(PYTHON_LIBS) 3906cdf0e10cSrcweirHOME=`echo $HOME | sed 's:\\\\:/:g'` 3907cdf0e10cSrcweirAC_SUBST(HOME) 3908cdf0e10cSrcweir 3909cdf0e10cSrcweirdnl =================================================================== 3910cdf0e10cSrcweirdnl Check for system lucene 3911cdf0e10cSrcweirdnl =================================================================== 3912cdf0e10cSrcweirAC_MSG_CHECKING([which lucene to use]) 3913cdf0e10cSrcweirif test -n "$with_system_lucene" -o -n "$with_system_libs" && \ 3914cdf0e10cSrcweir test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then 3915cdf0e10cSrcweir AC_MSG_RESULT([external]) 3916cdf0e10cSrcweir SYSTEM_LUCENE=YES 3917cdf0e10cSrcweir if test -z $LUCENE_CORE_JAR; then 3918ca7d9e04SPedro Giffuni AC_CHECK_FILE(/usr/share/java/lucene-core-2.9.4.jar, 3919ca7d9e04SPedro Giffuni [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.9.4.jar ], 3920cdf0e10cSrcweir [ 3921cdf0e10cSrcweir AC_CHECK_FILE(/usr/share/java/lucene-core.jar, 3922cdf0e10cSrcweir [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ], 3923cdf0e10cSrcweir [ AC_CHECK_FILE(/usr/share/java/lucene.jar, 3924cdf0e10cSrcweir [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ], 3925cdf0e10cSrcweir [ AC_MSG_ERROR(lucene-core.jar replacement not found)] 3926cdf0e10cSrcweir ) 3927cdf0e10cSrcweir ] 3928cdf0e10cSrcweir ) 3929cdf0e10cSrcweir ] 3930cdf0e10cSrcweir ) 3931cdf0e10cSrcweir else 3932cdf0e10cSrcweir AC_CHECK_FILE($LUCENE_CORE_JAR, [], 3933cdf0e10cSrcweir [AC_MSG_ERROR(lucene-core.jar not found.)], []) 3934cdf0e10cSrcweir fi 3935cdf0e10cSrcweir 3936cdf0e10cSrcweir if test -z $LUCENE_ANALYZERS_JAR; then 3937cdf0e10cSrcweir AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar, 3938cdf0e10cSrcweir [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ], 3939cdf0e10cSrcweir [ 3940cdf0e10cSrcweir AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar, 3941cdf0e10cSrcweir [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ], 3942cdf0e10cSrcweir [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)] 3943cdf0e10cSrcweir ) 3944cdf0e10cSrcweir ] 3945cdf0e10cSrcweir ) 3946cdf0e10cSrcweir else 3947cdf0e10cSrcweir AC_CHECK_FILE($LUCENE_CORE_JAR, [], 3948cdf0e10cSrcweir [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], []) 3949cdf0e10cSrcweir fi 3950cdf0e10cSrcweir AC_MSG_CHECKING([whether lucene is version 2.x]) 3951cdf0e10cSrcweir export LUCENE_CORE_JAR 3952cdf0e10cSrcweir if $PERL -e 'use Archive::Zip; 3953cdf0e10cSrcweir my $file = "$ENV{'LUCENE_CORE_JAR'}"; 3954cdf0e10cSrcweir my $zip = Archive::Zip->new( $file ); 3955cdf0e10cSrcweir my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 3956cdf0e10cSrcweir if ( $mf =~ m/Specification-Version: 2.*/ ) { 3957cdf0e10cSrcweir exit 0; 3958cdf0e10cSrcweir } else { 3959cdf0e10cSrcweir exit 1; 3960cdf0e10cSrcweir }'; then 3961cdf0e10cSrcweir AC_MSG_RESULT([yes]) 3962cdf0e10cSrcweir else 39637fb4469bSPedro Giffuni AC_MSG_RESULT([no]) 39647fb4469bSPedro Giffuni AC_MSG_CHECKING([whether lucene is version 3.x]) 39657fb4469bSPedro Giffuni 39667fb4469bSPedro Giffuni if $PERL -e 'use Archive::Zip; 39677fb4469bSPedro Giffuni my $file = "$ENV{'LUCENE_CORE_JAR'}"; 39687fb4469bSPedro Giffuni my $zip = Archive::Zip->new( $file ); 39697fb4469bSPedro Giffuni my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 39707fb4469bSPedro Giffuni if ( $mf =~ m/Specification-Version: 3.*/ ) { 39717fb4469bSPedro Giffuni exit 0; 39727fb4469bSPedro Giffuni } else { 39737fb4469bSPedro Giffuni exit 1; 39747fb4469bSPedro Giffuni }'; then 39757fb4469bSPedro Giffuni AC_MSG_RESULT([yes]) 39767fb4469bSPedro Giffuni else 39777fb4469bSPedro Giffuni AC_MSG_ERROR([no, you need lucene 2 or 3]) 39787fb4469bSPedro Giffuni fi 3979cdf0e10cSrcweir fi 3980cdf0e10cSrcweir 3981cdf0e10cSrcweirelse 3982cdf0e10cSrcweir AC_MSG_RESULT([internal]) 3983cdf0e10cSrcweir SYSTEM_LUCENE=NO 3984cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE LUCENE" 3985cdf0e10cSrcweirfi 3986cdf0e10cSrcweirAC_SUBST(SYSTEM_LUCENE) 3987cdf0e10cSrcweirAC_SUBST(LUCENE_CORE_JAR) 3988cdf0e10cSrcweirAC_SUBST(LUCENE_ANALYZERS_JAR) 3989cdf0e10cSrcweir 3990cdf0e10cSrcweirAC_MSG_CHECKING([whether to build the MySQL Connector extension]) 3991cdf0e10cSrcweirif test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then 3992cdf0e10cSrcweir AC_MSG_RESULT([yes]) 3993cdf0e10cSrcweir ENABLE_MYSQLC=YES 3994cdf0e10cSrcweir AC_MSG_CHECKING([for mysqlc module]) 3995cdf0e10cSrcweir if test -d mysqlc; then 3996cdf0e10cSrcweir AC_MSG_RESULT([OK]) 3997cdf0e10cSrcweir else 3998cdf0e10cSrcweir AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 3999cdf0e10cSrcweir fi 4000cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE MYSQLC" 4001cdf0e10cSrcweirelse 4002cdf0e10cSrcweir AC_MSG_RESULT([no]) 4003cdf0e10cSrcweir ENABLE_MYSQLC=NO 4004cdf0e10cSrcweirfi 4005cdf0e10cSrcweirAC_SUBST(ENABLE_MYSQLC) 4006cdf0e10cSrcweir 4007cdf0e10cSrcweirif test "$ENABLE_MYSQLC" = "YES"; then 4008cdf0e10cSrcweirdnl =================================================================== 4009cdf0e10cSrcweirdnl Check for system MySQL 4010cdf0e10cSrcweirdnl =================================================================== 4011cdf0e10cSrcweirAC_MSG_CHECKING([for mysql pre-requisites]) 4012cdf0e10cSrcweirif test -n "$with_system_mysql" -o -n "$with_system_libs" && \ 4013cdf0e10cSrcweir test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then 4014cdf0e10cSrcweir AC_MSG_RESULT([external MySQL]) 4015cdf0e10cSrcweir SYSTEM_MYSQL=YES 4016cdf0e10cSrcweir AC_PATH_PROG( MYSQLCONFIG, mysql_config) 4017cdf0e10cSrcweir AC_MSG_CHECKING([MySQL version]) 401824687b4cSJürgen Schmidt if test -z "$MYSQLCONFIG" -o ! -x "$MYSQLCONFIG" ; then 401924687b4cSJürgen Schmidt AC_MSG_ERROR([can not find/execute mysql_config]); 402024687b4cSJürgen Schmidt fi 4021cdf0e10cSrcweir MYSQL_VERSION=`$MYSQLCONFIG --version` 4022cdf0e10cSrcweir MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1` 4023cdf0e10cSrcweir if test "$MYSQL_MAJOR" -ge "5"; then 4024cdf0e10cSrcweir AC_MSG_RESULT([OK]) 4025cdf0e10cSrcweir else 4026cdf0e10cSrcweir AC_MSG_ERROR([too old, use 5.0.x or 5.1.x]) 4027cdf0e10cSrcweir fi 4028cdf0e10cSrcweir AC_MSG_CHECKING([for MySQL Client library]) 4029cdf0e10cSrcweir MYSQL_INC=`$MYSQLCONFIG --include` 4030cdf0e10cSrcweir MYSQL_LIB=`$MYSQLCONFIG --libs` 4031cdf0e10cSrcweir MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,` 4032cdf0e10cSrcweir AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB]) 4033cdf0e10cSrcweirelse 4034cdf0e10cSrcweir SYSTEM_MYSQL=NO 4035cdf0e10cSrcweir if test -n "$with_libmysql_path"; then 4036cdf0e10cSrcweir AC_MSG_RESULT([external Connector/C (libmysql)]) 4037cdf0e10cSrcweir LIBMYSQL=libmysql.so 4038cdf0e10cSrcweir if test "$_os" = "Darwin"; then 4039cdf0e10cSrcweir LIBMYSQL=libmysql.dylib 4040cdf0e10cSrcweir elif test "$_os" = "WINNT"; then 4041cdf0e10cSrcweir LIBMYSQL=libmysql.dll 4042cdf0e10cSrcweir fi 4043cdf0e10cSrcweir AC_MSG_CHECKING([for $LIBMYSQL]) 4044cdf0e10cSrcweir if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then 4045cdf0e10cSrcweir AC_MSG_RESULT([found.]) 4046cdf0e10cSrcweir LIBMYSQL_PATH=$with_libmysql_path 4047cdf0e10cSrcweir else 4048cdf0e10cSrcweir AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.]) 4049cdf0e10cSrcweir fi 4050cdf0e10cSrcweir else 4051cdf0e10cSrcweir AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path]) 4052cdf0e10cSrcweir fi 4053cdf0e10cSrcweirfi 4054cdf0e10cSrcweirAC_SUBST(SYSTEM_MYSQL) 4055cdf0e10cSrcweirAC_SUBST(MYSQL_INC) 4056cdf0e10cSrcweirAC_SUBST(MYSQL_LIB) 4057cdf0e10cSrcweirAC_SUBST(MYSQL_DEFINES) 4058cdf0e10cSrcweirAC_SUBST(LIBMYSQL_PATH) 4059cdf0e10cSrcweir 4060cdf0e10cSrcweirAC_LANG_PUSH([C++]) 4061cdf0e10cSrcweirdnl =================================================================== 4062cdf0e10cSrcweirdnl Check for system MySQL C++ Connector 4063cdf0e10cSrcweirdnl =================================================================== 4064cdf0e10cSrcweir# FIXME! 4065cdf0e10cSrcweir# who thought this too-generic cppconn dir was a good idea? 4066cdf0e10cSrcweirAC_MSG_CHECKING([MySQL Connector/C++]) 4067cdf0e10cSrcweirif test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ 4068cdf0e10cSrcweir test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then 4069cdf0e10cSrcweir AC_MSG_RESULT([external]) 4070cdf0e10cSrcweir SYSTEM_MYSQL_CPPCONN=YES 4071cdf0e10cSrcweir AC_LANG_PUSH([C++]) 4072cdf0e10cSrcweir AC_CHECK_HEADER(mysql_driver.h, [], 4073cdf0e10cSrcweir [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], []) 4074cdf0e10cSrcweir AC_CHECK_LIB(mysqlcppconn, main, [], 4075cdf0e10cSrcweir [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], []) 4076cdf0e10cSrcweir AC_MSG_CHECKING([version]) 4077cdf0e10cSrcweir AC_TRY_RUN([ 4078cdf0e10cSrcweir#include <mysql_driver.h> 4079cdf0e10cSrcweir 4080cdf0e10cSrcweirint main(int argc, char **argv) { 4081cdf0e10cSrcweir sql::Driver *driver; 4082cdf0e10cSrcweir driver = get_driver_instance(); 4083cdf0e10cSrcweir if (driver->getMajorVersion() > 1 || \ 4084cdf0e10cSrcweir (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \ 4085cdf0e10cSrcweir (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6)) 4086cdf0e10cSrcweir return 0; 4087cdf0e10cSrcweir else 4088cdf0e10cSrcweir return 1; 4089cdf0e10cSrcweir} 4090cdf0e10cSrcweir ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])]) 4091cdf0e10cSrcweir AC_LANG_POP([C++]) 4092cdf0e10cSrcweir 4093cdf0e10cSrcweirelse 409424687b4cSJürgen Schmidt AC_MSG_RESULT([no]) 409524687b4cSJürgen Schmidt SYSTEM_MYSQL_CPPCONN= 4096cdf0e10cSrcweirfi 4097cdf0e10cSrcweirAC_LANG_POP([C++]) 4098cdf0e10cSrcweirAC_SUBST(SYSTEM_MYSQL_CPPCONN) 4099cdf0e10cSrcweirfi 4100cdf0e10cSrcweir 4101cdf0e10cSrcweirdnl =================================================================== 4102cdf0e10cSrcweirdnl Check for system hsqldb 4103cdf0e10cSrcweirdnl =================================================================== 4104cdf0e10cSrcweirAC_MSG_CHECKING([which hsqldb to use]) 4105cdf0e10cSrcweirif test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ 4106cdf0e10cSrcweir test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then 4107cdf0e10cSrcweir AC_MSG_RESULT([external]) 4108cdf0e10cSrcweir SYSTEM_HSQLDB=YES 4109cdf0e10cSrcweir if test -z $HSQLDB_JAR; then 4110cdf0e10cSrcweir HSQLDB_JAR=/usr/share/java/hsqldb.jar 4111cdf0e10cSrcweir fi 4112cdf0e10cSrcweir AC_CHECK_FILE($HSQLDB_JAR, [], 4113cdf0e10cSrcweir [AC_MSG_ERROR(hsqldb.jar not found.)], []) 4114cdf0e10cSrcweir AC_MSG_CHECKING([whether hsqldb is 1.8.0.x]) 4115cdf0e10cSrcweir export HSQLDB_JAR 4116cdf0e10cSrcweir if $PERL -e 'use Archive::Zip; 4117cdf0e10cSrcweir my $file = "$ENV{'HSQLDB_JAR'}"; 4118cdf0e10cSrcweir my $zip = Archive::Zip->new( $file ); 4119cdf0e10cSrcweir my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 4120cdf0e10cSrcweir if ( $mf =~ m/Specification-Version: 1.8.*/ ) { 4121cdf0e10cSrcweir push @l, split(/\n/, $mf); 4122cdf0e10cSrcweir foreach my $line (@l) { 4123cdf0e10cSrcweir if ($line =~ m/Specification-Version:/) { 4124cdf0e10cSrcweir ($t, $version) = split (/:/,$line); 4125cdf0e10cSrcweir $version =~ s/^\s//; 4126cdf0e10cSrcweir ($a, $b, $c, $d) = split (/\./,$version); 4127cdf0e10cSrcweir if ($c == "0" && $d > "8") { 4128cdf0e10cSrcweir exit 0; 4129cdf0e10cSrcweir } else { 4130cdf0e10cSrcweir exit 1; 4131cdf0e10cSrcweir } 4132cdf0e10cSrcweir } 4133cdf0e10cSrcweir } 4134cdf0e10cSrcweir } else { 4135cdf0e10cSrcweir exit 1; 4136cdf0e10cSrcweir }'; then 4137cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4138cdf0e10cSrcweir else 4139cdf0e10cSrcweir AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1]) 4140cdf0e10cSrcweir fi 4141cdf0e10cSrcweirelse 4142cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4143cdf0e10cSrcweir SYSTEM_HSQLDB=NO 4144cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE HSQLDB" 4145cdf0e10cSrcweirfi 4146cdf0e10cSrcweirAC_SUBST(SYSTEM_HSQLDB) 4147cdf0e10cSrcweirAC_SUBST(HSQLDB_JAR) 4148cdf0e10cSrcweir 4149cdf0e10cSrcweirdnl =================================================================== 4150cdf0e10cSrcweirdnl Check for system beanshell 4151cdf0e10cSrcweirdnl =================================================================== 41529ef65f0eSAndre FischerENABLE_BEANSHELL=YES 4153cdf0e10cSrcweirAC_MSG_CHECKING([which beanshell to use]) 4154cdf0e10cSrcweirif test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ 4155cdf0e10cSrcweir test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then 4156cdf0e10cSrcweir AC_MSG_RESULT([external]) 4157cdf0e10cSrcweir SYSTEM_BSH=YES 4158cdf0e10cSrcweir if test -z $BSH_JAR; then 4159cdf0e10cSrcweir BSH_JAR=/usr/share/java/bsh.jar 4160cdf0e10cSrcweir fi 4161cdf0e10cSrcweir AC_CHECK_FILE($BSH_JAR, [], 4162cdf0e10cSrcweir [AC_MSG_ERROR(bsh.jar not found.)], []) 41639ef65f0eSAndre Fischerelif test "x$enable_beanshell" = "xyes"; then 4164cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4165cdf0e10cSrcweir SYSTEM_BSH=NO 4166cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE BSH" 41679ef65f0eSAndre Fischerelse 41689ef65f0eSAndre Fischer AC_MSG_RESULT([none (disabled)]) 41699ef65f0eSAndre Fischer SYSTEM_BSH=NO 41709ef65f0eSAndre Fischer ENABLE_BEANSHELL=NO 4171cdf0e10cSrcweirfi 4172cdf0e10cSrcweirAC_SUBST(SYSTEM_BSH) 4173cdf0e10cSrcweirAC_SUBST(BSH_JAR) 41749ef65f0eSAndre FischerAC_SUBST(ENABLE_BEANSHELL) 4175cdf0e10cSrcweir 4176cdf0e10cSrcweir 4177cdf0e10cSrcweirdnl =================================================================== 41789ef65f0eSAndre Fischerdnl Check for saxon. It can come from two different places: 41799ef65f0eSAndre Fischerdnl - pre-installed on the system. This is checked when the --with-system-saxon 41809ef65f0eSAndre Fischerdnl option is given to configure. 41819ef65f0eSAndre Fischerdnl The exact place can be specified with the --with-saxon-jar=<path> option. 41829ef65f0eSAndre Fischerdnl - From the saxon tar ball in ext_sources/. This is used when --enable-saxon 41839ef65f0eSAndre Fischerdnl is given to configure but not any of --with-system-saxon or --with-saxon-jar. 4184cdf0e10cSrcweirdnl =================================================================== 41859ef65f0eSAndre FischerDISABLE_SAXON= 4186cdf0e10cSrcweirAC_MSG_CHECKING([which saxon to use]) 4187cdf0e10cSrcweirif test -n "$with_system_saxon" -o -n "$with_system_libs" && \ 4188cdf0e10cSrcweir test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then 4189cdf0e10cSrcweir AC_MSG_RESULT([external]) 4190cdf0e10cSrcweir SYSTEM_SAXON=YES 4191cdf0e10cSrcweir if test -z $SAXON_JAR; then 4192cdf0e10cSrcweir AC_CHECK_FILE(/usr/share/java/saxon9.jar, 4193cdf0e10cSrcweir [ SAXON_JAR=/usr/share/java/saxon9.jar ], 4194cdf0e10cSrcweir [ 4195cdf0e10cSrcweir AC_CHECK_FILE(/usr/share/java/saxon.jar, 4196cdf0e10cSrcweir [ SAXON_JAR=/usr/share/java/saxon.jar ], 4197cdf0e10cSrcweir [ AC_CHECK_FILE(/usr/share/java/saxon9.jar, 4198cdf0e10cSrcweir [ SAXON_JAR=/usr/share/java/saxon9.jar ], 4199cdf0e10cSrcweir [ AC_MSG_ERROR(saxon.jar replacement not found)] 4200cdf0e10cSrcweir ) 4201cdf0e10cSrcweir ] 4202cdf0e10cSrcweir ) 4203cdf0e10cSrcweir ] 4204cdf0e10cSrcweir ) 4205cdf0e10cSrcweir else 4206cdf0e10cSrcweir AC_CHECK_FILE($SAXON_JAR, [], 4207cdf0e10cSrcweir [AC_MSG_ERROR(saxon.jar replacement not found.)], []) 4208cdf0e10cSrcweir fi 4209cdf0e10cSrcweir if test -n "$SERIALIZER_JAR"; then 4210cdf0e10cSrcweir AC_CHECK_FILE($SERIALIZER_JAR, [], 4211cdf0e10cSrcweir [AC_MSG_ERROR(serializer.jar not found.)], []) 4212cdf0e10cSrcweir AC_SUBST(SERIALIZER_JAR) 4213cdf0e10cSrcweir fi 4214cdf0e10cSrcweir 4215cdf0e10cSrcweirdnl Saxon comes in two practically available versions, the out-of-date saxonb which 4216cdf0e10cSrcweirdnl supports the java extensions that OOo uses, and the up-to-date saxon he 4217cdf0e10cSrcweirdnl "home edition" version, which is crippled to not support those java extensions. 4218cdf0e10cSrcweirdnl And as an aside the he one also needs to be tweaked to include 4219cdf0e10cSrcweirdnl a META-INF/services to broadcast that it supports the jaxp transform factory 4220cdf0e10cSrcweir 4221cdf0e10cSrcweir AC_MSG_CHECKING([if saxon works]) 4222cdf0e10cSrcweir cat > saxontest.java <<_ACEOF 4223cdf0e10cSrcweir[import javax.xml.transform.TransformerFactory; 4224cdf0e10cSrcweirimport javax.xml.transform.Transformer; 4225cdf0e10cSrcweirimport javax.xml.transform.stream.StreamSource; 4226cdf0e10cSrcweirimport java.io.*; 4227cdf0e10cSrcweir 4228cdf0e10cSrcweirimport net.sf.saxon.FeatureKeys; 4229cdf0e10cSrcweir 4230cdf0e10cSrcweirclass saxontest { 4231cdf0e10cSrcweir public static void main(String[] args) { 4232cdf0e10cSrcweir System.setProperty("javax.xml.transform.TransformerFactory", 4233cdf0e10cSrcweir "net.sf.saxon.TransformerFactoryImpl"); 4234cdf0e10cSrcweir try { 4235cdf0e10cSrcweir TransformerFactory tfactory = TransformerFactory.newInstance(); 4236cdf0e10cSrcweir // some external saxons (Debian, Ubuntu, ...) have this disabled 4237cdf0e10cSrcweir // per default 4238cdf0e10cSrcweir tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true)); 4239cdf0e10cSrcweir System.out.println("TransformerFactory is" + 4240cdf0e10cSrcweir tfactory.getClass().getName()); 4241cdf0e10cSrcweir Transformer transformer = tfactory.newTransformer( 4242cdf0e10cSrcweir new StreamSource(new File(args[0]))); 4243cdf0e10cSrcweir } catch(Exception e){ 4244cdf0e10cSrcweir e.printStackTrace(System.err); 4245cdf0e10cSrcweir System.exit(-1); 4246cdf0e10cSrcweir } 4247cdf0e10cSrcweir System.exit(0); 4248cdf0e10cSrcweir } 4249cdf0e10cSrcweir} 4250cdf0e10cSrcweir] 4251cdf0e10cSrcweir_ACEOF 4252cdf0e10cSrcweir cat > saxontest.xsl<<_ACEOF 4253cdf0e10cSrcweir[<?xml version="1.0" encoding="UTF-8"?> 4254cdf0e10cSrcweir<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 4255cdf0e10cSrcweir <xsl:template match="/"> 4256cdf0e10cSrcweir <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/> 4257cdf0e10cSrcweir </xsl:template> 4258cdf0e10cSrcweir</xsl:stylesheet> 4259cdf0e10cSrcweir] 4260cdf0e10cSrcweir_ACEOF 4261cdf0e10cSrcweir javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2" 4262cdf0e10cSrcweir AC_TRY_EVAL(javac_cmd) 4263cdf0e10cSrcweir if test $? = 0 && test -f ./saxontest.class ; then 4264cdf0e10cSrcweir java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" 4265cdf0e10cSrcweir AC_TRY_EVAL(java_cmd) 4266cdf0e10cSrcweir if test $? = 0; then 4267cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4268cdf0e10cSrcweir else 4269cdf0e10cSrcweir cat saxontest.java >&5 4270cdf0e10cSrcweir AC_MSG_RESULT([no]) 4271cdf0e10cSrcweir AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb]) 4272cdf0e10cSrcweir fi 4273cdf0e10cSrcweir else 4274cdf0e10cSrcweir AC_MSG_RESULT([no]) 4275cdf0e10cSrcweir cat saxontest.java >&5 4276cdf0e10cSrcweir AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar]) 4277cdf0e10cSrcweir fi 42789ef65f0eSAndre Fischerelif test "x$enable_saxon" = "xyes"; then 4279cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4280cdf0e10cSrcweir SYSTEM_SAXON=NO 42819ef65f0eSAndre Fischer BUILD_TYPE="$BUILD_TYPE SAXON" 42829ef65f0eSAndre Fischerelse 42839ef65f0eSAndre Fischer AC_MSG_RESULT([none (disabled)]) 42849ef65f0eSAndre Fischer SYSTEM_SAXON=NO 42859ef65f0eSAndre Fischer DISABLE_SAXON=YES 4286cdf0e10cSrcweirfi 4287cdf0e10cSrcweirAC_SUBST(SYSTEM_SAXON) 4288cdf0e10cSrcweirAC_SUBST(SAXON_JAR) 42899ef65f0eSAndre FischerAC_SUBST(DISABLE_SAXON) 4290cdf0e10cSrcweir 42919ef65f0eSAndre Fischer 42929ef65f0eSAndre Fischerdnl =================================================================== 42939ef65f0eSAndre Fischerdnl Check for rhino 42949ef65f0eSAndre Fischerdnl =================================================================== 42959ef65f0eSAndre FischerENABLE_JAVASCRIPT= 42969ef65f0eSAndre FischerAC_MSG_CHECKING([whether to enable support for JavaScript]) 42979ef65f0eSAndre Fischerif test "x$enable_javascript" = "xyes"; then 42989ef65f0eSAndre Fischer BUILD_TYPE="$BUILD_TYPE RHINO" 42999ef65f0eSAndre Fischer AC_MSG_RESULT([yes]) 43009ef65f0eSAndre Fischer ENABLE_JAVASCRIPT=YES 43019ef65f0eSAndre Fischerelse 43029ef65f0eSAndre Fischer AC_MSG_RESULT([no]) 43039ef65f0eSAndre Fischer ENABLE_JAVASCRIPT=NO 43040ea1a209SEike Rathkefi 43059ef65f0eSAndre FischerAC_SUBST(ENABLE_JAVASCRIPT) 43069ef65f0eSAndre Fischer 4307cdf0e10cSrcweir 4308fdf35928SAndre Fischerdnl =================================================================== 4309fdf35928SAndre Fischerdnl Check for system apr 4310fdf35928SAndre Fischerdnl =================================================================== 4311fdf35928SAndre FischerSYSTEM_APR=NO 4312fdf35928SAndre FischerAPR_CFLAGS= 4313fdf35928SAndre FischerAPR_LIBS= 4314fdf35928SAndre FischerAC_MSG_CHECKING([which libapr to use]) 4315fdf35928SAndre Fischerif test "x$with_system_apr" = "xyes" -o -n "$with_system_libs"; then 4316fdf35928SAndre Fischer AC_MSG_RESULT([system]) 4317fdf35928SAndre Fischer PKG_CHECK_MODULES([APR], [apr-1 >= 1.0]) 4318fdf35928SAndre Fischer SYSTEM_APR=YES 4319fdf35928SAndre Fischerelse 4320fdf35928SAndre Fischer AC_MSG_RESULT([internal]) 4321fdf35928SAndre Fischer SYSTEM_APR=NO 4322fdf35928SAndre Fischer BUILD_TYPE="$BUILD_TYPE APR" 4323fdf35928SAndre Fischerfi 4324fdf35928SAndre FischerAC_SUBST(SYSTEM_APR) 4325fdf35928SAndre FischerAC_SUBST(APR_CFLAGS) 4326fdf35928SAndre FischerAC_SUBST(APR_LIBS) 4327fdf35928SAndre Fischer 4328fdf35928SAndre Fischer 4329fdf35928SAndre Fischerdnl =================================================================== 4330fdf35928SAndre Fischerdnl Check for system apr-util 4331fdf35928SAndre Fischerdnl =================================================================== 433258b02f87SAndre FischerSYSTEM_APR_UTIL=NO 433358b02f87SAndre FischerAPR_UTIL_CFLAGS= 433458b02f87SAndre FischerAPR_UTIL_LIBS= 4335fdf35928SAndre FischerAC_MSG_CHECKING([which libapr-util to use]) 4336fdf35928SAndre Fischerif test "x$with_system_apr_util" = "xyes" -o -n "$with_system_libs"; then 4337fdf35928SAndre Fischer AC_MSG_RESULT([system]) 433858b02f87SAndre Fischer PKG_CHECK_MODULES([APR_UTIL], [apr-util-1 >= 1.0]) 433958b02f87SAndre Fischer SYSTEM_APR_UTIL=YES 4340fdf35928SAndre Fischerelse 4341fdf35928SAndre Fischer AC_MSG_RESULT([internal]) 434258b02f87SAndre Fischer SYSTEM_APR_UTIL=NO 4343fdf35928SAndre Fischer BUILD_TYPE="$BUILD_TYPE APR_UTIL" 4344fdf35928SAndre Fischerfi 434558b02f87SAndre FischerAC_SUBST(SYSTEM_APR_UTIL) 434658b02f87SAndre FischerAC_SUBST(APR_UTIL_CFLAGS) 434758b02f87SAndre FischerAC_SUBST(APR_UTIL_LIBS) 4348fdf35928SAndre Fischer 4349fdf35928SAndre Fischer 4350fdf35928SAndre Fischerdnl =================================================================== 4351fdf35928SAndre Fischerdnl Check for system serf 4352fdf35928SAndre Fischerdnl =================================================================== 4353fdf35928SAndre FischerSYSTEM_SERF=NO 4354fdf35928SAndre FischerSERF_CFLAGS= 4355fdf35928SAndre FischerSERF_LIBS= 4356fdf35928SAndre FischerAC_MSG_CHECKING([which libserf to use]) 4357cfd1b5f7SAndrea Pescettiif test -n "$with_system_serf" -o -n "$with_system_libs" && \ 4358cfd1b5f7SAndrea Pescetti test "$with_system_serf" != "no"; then 4359fdf35928SAndre Fischer AC_MSG_RESULT([system]) 4360fdf35928SAndre Fischer PKG_CHECK_MODULES([SERF], [serf-1 >= 1.1]) 4361fdf35928SAndre Fischer SYSTEM_SERF=YES 4362fdf35928SAndre Fischerelse 4363fdf35928SAndre Fischer AC_MSG_RESULT([internal]) 4364fdf35928SAndre Fischer SYSTEM_SERF=NO 4365fdf35928SAndre Fischer BUILD_TYPE="$BUILD_TYPE SERF" 4366fdf35928SAndre Fischerfi 4367fdf35928SAndre FischerAC_SUBST(SYSTEM_SERF) 4368fdf35928SAndre FischerAC_SUBST(SERF_CFLAGS) 4369fdf35928SAndre FischerAC_SUBST(SERF_LIBS) 4370fdf35928SAndre Fischer 4371fdf35928SAndre Fischer 437227b2fc91SAndre Fischerdnl =================================================================== 437327b2fc91SAndre Fischerdnl Check for CoinMP 437427b2fc91SAndre Fischerdnl =================================================================== 437527b2fc91SAndre FischerENABLE_COINMP= 4376fdf35928SAndre FischerSYSTEM_COINMP=NO 4377fdf35928SAndre FischerCOINMP_CFLAGS= 4378fdf35928SAndre FischerCOINMP_LIBS= 437927b2fc91SAndre FischerAC_MSG_CHECKING([whether to enable support for CoinMP]) 438027b2fc91SAndre Fischerif test "x$enable_coinmp" = "xyes"; then 4381fdf35928SAndre Fischer BUILD_TYPE="$BUILD_TYPE COINMP" 4382fdf35928SAndre Fischer AC_MSG_RESULT([yes]) 4383fdf35928SAndre Fischer ENABLE_COINMP=YES 4384fdf35928SAndre Fischer 4385fdf35928SAndre Fischer dnl Check wether to use system or internal CoinMP 4386fdf35928SAndre Fischer AC_MSG_CHECKING([which coinmp to use]) 4387fdf35928SAndre Fischer if test "x$with_system_coinmp" = "xyes" -o -n "$with_system_libs"; then 4388fdf35928SAndre Fischer AC_MSG_RESULT([system]) 4389fdf35928SAndre Fischer PKG_CHECK_MODULES([COINMP], [coinmp]) 4390fdf35928SAndre Fischer SYSTEM_COINMP=YES 4391fdf35928SAndre Fischer # some systems need this. Like Ubuntu.... 4392fdf35928SAndre Fischer AC_CHECK_LIB(m, floor) 4393fdf35928SAndre Fischer AC_CHECK_LIB(dl, dlopen) 4394fdf35928SAndre Fischer else 4395fdf35928SAndre Fischer AC_MSG_RESULT([internal]) 4396fdf35928SAndre Fischer SYSTEM_COINMP=NO 4397fdf35928SAndre Fischer BUILD_TYPE="$BUILD_TYPE COINMP" 4398fdf35928SAndre Fischer fi 439927b2fc91SAndre Fischerelse 4400fdf35928SAndre Fischer AC_MSG_RESULT([no]) 4401fdf35928SAndre Fischer ENABLE_COINMP=NO 440227b2fc91SAndre Fischerfi 440327b2fc91SAndre FischerAC_SUBST(ENABLE_COINMP) 4404fdf35928SAndre FischerAC_SUBST(SYSTEM_COINMP) 4405fdf35928SAndre FischerAC_SUBST(COINMP_CFLAGS) 4406fdf35928SAndre FischerAC_SUBST(COINMP_LIBS) 440727b2fc91SAndre Fischer 440827b2fc91SAndre Fischer 4409cdf0e10cSrcweirdnl =================================================================== 4410cdf0e10cSrcweirdnl Check for system curl 4411cdf0e10cSrcweirdnl =================================================================== 4412cdf0e10cSrcweirif test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then 4413cdf0e10cSrcweir with_system_curl=yes 4414cdf0e10cSrcweirfi 4415cdf0e10cSrcweirAC_MSG_CHECKING([which curl to use]) 4416cdf0e10cSrcweirif test -n "$with_system_curl" -o -n "$with_system_libs" && \ 4417cdf0e10cSrcweir test "$with_system_curl" != "no"; then 4418cdf0e10cSrcweir AC_MSG_RESULT([external]) 4419cdf0e10cSrcweir SYSTEM_CURL=YES 4420cdf0e10cSrcweir 4421cdf0e10cSrcweir AC_PATH_PROG( CURLCONFIG, curl-config) 4422cdf0e10cSrcweir if test -z "$CURLCONFIG"; then 4423cdf0e10cSrcweir AC_MSG_ERROR([install curl to run this script]) 4424cdf0e10cSrcweir fi 4425cdf0e10cSrcweir 4426cdf0e10cSrcweir # check curl version 4427cdf0e10cSrcweir AC_MSG_CHECKING([whether curl is >= 7.13.1]) 4428cdf0e10cSrcweir if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \ 4429cdf0e10cSrcweir "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \ 4430cdf0e10cSrcweir "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then 4431cdf0e10cSrcweir AC_MSG_ERROR([no, you need at least curl 7.13,1]) 4432cdf0e10cSrcweir else 4433cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4434cdf0e10cSrcweir fi 4435cdf0e10cSrcweir CURL_LIBS=`$CURLCONFIG --libs` 4436cdf0e10cSrcweir CURL_CFLAGS=`$CURLCONFIG --cflags` 4437cdf0e10cSrcweirelse 4438cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4439cdf0e10cSrcweir SYSTEM_CURL=NO 4440cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE CURL" 4441cdf0e10cSrcweirfi 4442cdf0e10cSrcweirAC_SUBST(SYSTEM_CURL) 4443cdf0e10cSrcweirAC_SUBST(CURL_CFLAGS) 4444cdf0e10cSrcweirAC_SUBST(CURL_LIBS) 4445cdf0e10cSrcweir 4446cdf0e10cSrcweirdnl =================================================================== 4447cdf0e10cSrcweirdnl Check for system mdds 4448cdf0e10cSrcweirdnl =================================================================== 4449cdf0e10cSrcweirAC_MSG_CHECKING([which mdds to use]) 4450cdf0e10cSrcweirif test -n "$with_system_mdds" -o -n "$with_system_headers" && \ 4451cdf0e10cSrcweir test "$with_system_mdds" != "no"; then 4452cdf0e10cSrcweir AC_MSG_RESULT([external]) 4453cdf0e10cSrcweir SYSTEM_MDDS=YES 4454cdf0e10cSrcweir AC_LANG_PUSH([C++]) 4455cdf0e10cSrcweir AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [], 4456cdf0e10cSrcweir [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], []) 4457cdf0e10cSrcweir AC_LANG_POP([C++]) 4458cdf0e10cSrcweirelse 4459cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4460cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE MDDS" 4461cdf0e10cSrcweir SYSTEM_MDDS=NO 4462cdf0e10cSrcweirfi 4463cdf0e10cSrcweirAC_SUBST(SYSTEM_MDDS) 4464cdf0e10cSrcweir 4465cdf0e10cSrcweirdnl =================================================================== 4466cdf0e10cSrcweirdnl Check for system boost 4467cdf0e10cSrcweirdnl =================================================================== 4468cdf0e10cSrcweirAC_MSG_CHECKING([which boost to use]) 4469cdf0e10cSrcweirif test -n "$with_system_boost" -o -n "$with_system_headers" && \ 4470cdf0e10cSrcweir test "$with_system_boost" != "no"; then 4471cdf0e10cSrcweir AC_MSG_RESULT([external]) 4472cdf0e10cSrcweir SYSTEM_BOOST=YES 4473cdf0e10cSrcweir AC_LANG_PUSH([C++]) 4474cdf0e10cSrcweir AC_CHECK_HEADER(boost/shared_ptr.hpp, [], 4475cdf0e10cSrcweir [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], []) 4476cdf0e10cSrcweir AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [], 4477cdf0e10cSrcweir [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], []) 4478cdf0e10cSrcweir AC_CHECK_HEADER(boost/function.hpp, [], 4479cdf0e10cSrcweir [AC_MSG_ERROR(boost/function.hpp not found. install boost)], []) 4480cdf0e10cSrcweir 4481cdf0e10cSrcweir save_CXXFLAGS=$CXXFLAGS 4482cdf0e10cSrcweir CXXFLAGS="$CXXFLAGS -fno-exceptions" 4483cdf0e10cSrcweir AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions]) 4484cdf0e10cSrcweir AC_TRY_COMPILE([#include <boost/function.hpp> 4485cdf0e10cSrcweir], [], 4486cdf0e10cSrcweir ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes) 4487cdf0e10cSrcweir 4488cdf0e10cSrcweir if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then 4489cdf0e10cSrcweir AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131]) 4490cdf0e10cSrcweir else 4491cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4492cdf0e10cSrcweir fi 4493cdf0e10cSrcweir CXXFLAGS=$save_CXXFLAGS 4494cdf0e10cSrcweir AC_LANG_POP([C++]) 4495cdf0e10cSrcweirelse 4496cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4497cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE BOOST" 4498cdf0e10cSrcweir SYSTEM_BOOST=NO 4499cdf0e10cSrcweirfi 4500cdf0e10cSrcweirAC_SUBST(SYSTEM_BOOST) 4501cdf0e10cSrcweir 4502cdf0e10cSrcweirdnl =================================================================== 4503cdf0e10cSrcweirdnl Check for system vigra 4504cdf0e10cSrcweirdnl =================================================================== 4505cdf0e10cSrcweirAC_MSG_CHECKING([which vigra to use]) 4506cdf0e10cSrcweirif test -n "$with_system_vigra" -o -n "$with_system_headers" && \ 4507cdf0e10cSrcweir test "$with_system_vigra" != "no"; then 4508cdf0e10cSrcweir AC_MSG_RESULT([external]) 4509cdf0e10cSrcweir SYSTEM_VIGRA=YES 4510cdf0e10cSrcweir AC_LANG_PUSH([C++]) 4511cdf0e10cSrcweir AC_CHECK_HEADER(vigra/copyimage.hxx, [], 4512cdf0e10cSrcweir [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], []) 4513cdf0e10cSrcweir AC_LANG_POP([C++]) 4514cdf0e10cSrcweirelse 4515cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4516cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE VIGRA" 4517cdf0e10cSrcweir SYSTEM_VIGRA=NO 4518cdf0e10cSrcweirfi 4519cdf0e10cSrcweirAC_SUBST(SYSTEM_VIGRA) 4520cdf0e10cSrcweir 4521cdf0e10cSrcweirdnl =================================================================== 4522cdf0e10cSrcweirdnl Check for system odbc 4523cdf0e10cSrcweirdnl =================================================================== 4524cdf0e10cSrcweirAC_MSG_CHECKING([which odbc headers to use]) 4525cdf0e10cSrcweirif test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \ 4526cdf0e10cSrcweir test "$with_system_odbc_headers" != "no"; then 4527cdf0e10cSrcweir AC_MSG_RESULT([external]) 4528cdf0e10cSrcweir SYSTEM_ODBC_HEADERS=YES 4529cdf0e10cSrcweir 4530cdf0e10cSrcweir AC_CHECK_HEADER(sqlext.h, [], 4531cdf0e10cSrcweir [AC_MSG_ERROR(odbc not found. install odbc)], []) 4532cdf0e10cSrcweirelse 4533cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4534cdf0e10cSrcweir SYSTEM_ODBC_HEADERS=NO 4535cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE UNIXODBC" 4536cdf0e10cSrcweirfi 4537cdf0e10cSrcweirAC_SUBST(SYSTEM_ODBC_HEADERS) 4538cdf0e10cSrcweir 4539cdf0e10cSrcweirAC_MSG_CHECKING([whether to build XML Security support]) 454006f2ef55SHerbert Dürrif test "$enable_nss_module" = "no"; then 454106f2ef55SHerbert Dürr AC_MSG_RESULT([no, since NSS disabled but needed]) 4542cdf0e10cSrcweirelse 4543cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4544cdf0e10cSrcweirfi 4545cdf0e10cSrcweir 4546cdf0e10cSrcweirAC_MSG_CHECKING([whether to build LDAP configuration backend]) 4547cdf0e10cSrcweirif test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then 454806f2ef55SHerbert Dürr if test "$with_openldap" = "yes"; then 4549cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4550cdf0e10cSrcweir WITH_LDAP=YES 4551cdf0e10cSrcweir else 4552cdf0e10cSrcweir WITH_LDAP=NO 4553cdf0e10cSrcweir fi 4554cdf0e10cSrcweirelse 4555cdf0e10cSrcweir AC_MSG_RESULT([no]) 4556cdf0e10cSrcweir WITH_LDAP=NO 4557cdf0e10cSrcweirfi 4558cdf0e10cSrcweir 4559cdf0e10cSrcweirif test "$WITH_LDAP" = "YES"; then 4560cdf0e10cSrcweir dnl =================================================================== 456106f2ef55SHerbert Dürr dnl Test whether we want to use the OpenLDAP LDAP SDK 4562cdf0e10cSrcweir dnl =================================================================== 4563cdf0e10cSrcweir AC_MSG_CHECKING([which LDAP SDK to use]) 4564cdf0e10cSrcweir if test -n "$with_openldap" && test "$with_openldap" != "no"; then 4565cdf0e10cSrcweir AC_MSG_RESULT([OpenLDAP]) 4566cdf0e10cSrcweir WITH_OPENLDAP=YES 4567cdf0e10cSrcweir AC_CHECK_HEADERS(ldap.h, [], 4568cdf0e10cSrcweir [AC_MSG_ERROR(ldap.h not found. install openldap libs)], []) 4569cdf0e10cSrcweir AC_CHECK_LIB(ldap, ldap_simple_bind_s, [], 4570cdf0e10cSrcweir [AC_MSG_ERROR(openldap lib not found or functional)], []) 4571cdf0e10cSrcweir # rumours say that OpenLDAP doesn't have that function. I looked and 4572cdf0e10cSrcweir # it has it. Test for it to be sure 4573cdf0e10cSrcweir AC_CHECK_LIB(ldap, ldap_set_option, [], 4574cdf0e10cSrcweir [AC_MSG_ERROR(openldap lib not found or functional)], []) 4575cdf0e10cSrcweir fi 4576cdf0e10cSrcweirfi 4577cdf0e10cSrcweirAC_SUBST(WITH_LDAP) 4578cdf0e10cSrcweirAC_SUBST(WITH_OPENLDAP) 4579cdf0e10cSrcweir 45806f8e4455SHerbert DürrAC_MSG_CHECKING([whether to build the internal NSS module]) 4581cdf0e10cSrcweirif test "$enable_nss_module" != "no"; then 4582cdf0e10cSrcweir ENABLE_NSS_MODULE="YES" 4583cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE NSS" 4584cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4585cdf0e10cSrcweir if test "$_os" = "WINNT"; then 4586cdf0e10cSrcweir AC_MSG_CHECKING([for Mozilla build tooling]) 4587cdf0e10cSrcweir if test -z "$MOZILLABUILD" ; then 45886f8e4455SHerbert DürrAC_MSG_ERROR([ 45896f8e4455SHerbert DürrMozilla build tooling not found! 45906f8e4455SHerbert Dürr It is required for NSS that is needed for AOO's security facilities. 45916f8e4455SHerbert Dürr Either disable NSS using the option --disable-nss-module 45926f8e4455SHerbert Dürr or use the --with-mozilla-build option after installing the tool obtained 45939d1669aeSMatthias Seidel from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/]) 4594cdf0e10cSrcweir else 4595cdf0e10cSrcweir if test \( "$WITH_MINGWIN" = "yes" \) ; then 4596cdf0e10cSrcweir if test ! -d "$MOZILLABUILD" ; then 4597cdf0e10cSrcweirAC_MSG_ERROR([Mozilla build tooling incomplete!]) 4598cdf0e10cSrcweir else 4599cdf0e10cSrcweir AC_MSG_RESULT([ok]) 4600cdf0e10cSrcweir fi 4601cdf0e10cSrcweir else 4602cdf0e10cSrcweir if test ! -d "$MOZILLABUILD/moztools" \ 4603cdf0e10cSrcweir -o ! -d "$MOZILLABUILD/msys" ; then 4604cdf0e10cSrcweirAC_MSG_ERROR([Mozilla build tooling incomplete!]) 4605cdf0e10cSrcweir else 4606cdf0e10cSrcweir AC_MSG_RESULT([ok]) 4607cdf0e10cSrcweir fi 4608cdf0e10cSrcweir fi 4609cdf0e10cSrcweir fi 4610cdf0e10cSrcweir fi 4611cdf0e10cSrcweirelse 4612cdf0e10cSrcweir ENABLE_NSS_MODULE="NO" 4613cdf0e10cSrcweir AC_MSG_RESULT([no]) 4614cdf0e10cSrcweirfi 4615cdf0e10cSrcweir 4616cdf0e10cSrcweirAC_SUBST(ENABLE_NSS_MODULE) 4617cdf0e10cSrcweirAC_SUBST(MOZILLABUILD) 4618cdf0e10cSrcweirAC_SUBST(MOZ_INC) 4619cdf0e10cSrcweir 4620cdf0e10cSrcweirdnl =================================================================== 4621cdf0e10cSrcweirdnl Check for system sane 4622cdf0e10cSrcweirdnl =================================================================== 4623cdf0e10cSrcweirAC_MSG_CHECKING([which sane header to use]) 4624cdf0e10cSrcweirif test -n "$with_system_sane_header" -o -n "$with_system_headers" && \ 4625cdf0e10cSrcweir test "$with_system_sane_header" != "no"; then 4626cdf0e10cSrcweir AC_MSG_RESULT([external]) 4627cdf0e10cSrcweir SYSTEM_SANE_HEADER=YES 4628cdf0e10cSrcweir AC_CHECK_HEADER(sane/sane.h, [], 4629cdf0e10cSrcweir [AC_MSG_ERROR(sane not found. install sane)], []) 4630cdf0e10cSrcweirelse 4631cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4632cdf0e10cSrcweir SYSTEM_SANE_HEADER=NO 4633cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE SANE" 4634cdf0e10cSrcweirfi 4635cdf0e10cSrcweirAC_SUBST(SYSTEM_SANE_HEADER) 4636cdf0e10cSrcweir 4637cdf0e10cSrcweirdnl =================================================================== 4638cdf0e10cSrcweirdnl Check for system icu 4639cdf0e10cSrcweirdnl =================================================================== 4640cdf0e10cSrcweirAC_MSG_CHECKING([which icu to use]) 4641cdf0e10cSrcweirif test -n "$with_system_icu" -o -n "$with_system_libs" && \ 4642cdf0e10cSrcweir test "$with_system_icu" != "no"; then 4643cdf0e10cSrcweir AC_MSG_RESULT([external]) 4644cdf0e10cSrcweir SYSTEM_ICU=YES 4645cdf0e10cSrcweir AC_LANG_PUSH([C++]) 4646cdf0e10cSrcweir AC_MSG_CHECKING([for unicode/rbbi.h]) 4647cdf0e10cSrcweir AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.])) 4648cdf0e10cSrcweir AC_LANG_POP([C++]) 4649cdf0e10cSrcweir AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin]) 4650cdf0e10cSrcweir if test -z "$SYSTEM_GENBRK"; then 4651cdf0e10cSrcweir AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\]) 4652cdf0e10cSrcweir fi 4653cdf0e10cSrcweir AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin]) 4654cdf0e10cSrcweir if test -z "$SYSTEM_GENCCODE"; then 4655cdf0e10cSrcweir AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\]) 4656cdf0e10cSrcweir fi 4657cdf0e10cSrcweir AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin]) 4658cdf0e10cSrcweir if test -z "$SYSTEM_GENCMN"; then 4659cdf0e10cSrcweir AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\]) 4660cdf0e10cSrcweir fi 4661cdf0e10cSrcweir 4662cdf0e10cSrcweir AC_PATH_PROG( ICUCONFIG, icu-config) 4663cdf0e10cSrcweir AC_MSG_CHECKING([ICU version]) 466486bbd642SYuri Dario if test "$_os" = "OS2"; then 466586bbd642SYuri Dario ICU_MAJOR=4 466686bbd642SYuri Dario else 466786bbd642SYuri Dario ICU_VERSION=`$ICUCONFIG --version` 466886bbd642SYuri Dario ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` 466986bbd642SYuri Dario ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` 467086bbd642SYuri Dario ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` 467186bbd642SYuri Dario fi 4672cdf0e10cSrcweir 4673cdf0e10cSrcweir if test "$ICU_MAJOR" -ge "4"; then 4674cdf0e10cSrcweir AC_MSG_RESULT([OK]) 4675cdf0e10cSrcweir else 4676cdf0e10cSrcweir AC_MSG_ERROR([not suitable, only >= 4.0 supported currently]) 4677cdf0e10cSrcweir fi 4678cdf0e10cSrcweir 4679cdf0e10cSrcweirelse 4680cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4681cdf0e10cSrcweir SYSTEM_ICU=NO 4682cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE ICU" 4683cdf0e10cSrcweirfi 4684cdf0e10cSrcweirAC_SUBST(SYSTEM_ICU) 4685cdf0e10cSrcweirAC_SUBST(SYSTEM_GENBRK) 4686cdf0e10cSrcweirAC_SUBST(SYSTEM_GENCCODE) 4687cdf0e10cSrcweirAC_SUBST(SYSTEM_GENCMN) 4688cdf0e10cSrcweirAC_SUBST(ICU_MAJOR) 4689cdf0e10cSrcweirAC_SUBST(ICU_MINOR) 4690cdf0e10cSrcweirAC_SUBST(ICU_MICRO) 4691cdf0e10cSrcweir 4692cdf0e10cSrcweirdnl =================================================================== 4693cdf0e10cSrcweirdnl Graphite 4694cdf0e10cSrcweirdnl =================================================================== 4695cdf0e10cSrcweir 46969ef65f0eSAndre FischerENABLE_GRAPHITE="FALSE" 4697cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable graphite support]) 4698539e46a3SPedro Giffuniif test "x$enable_graphite" = "xyes" -a \( "$_os" = "WINNT" -o "$_os" = "Linux" -o "$_os" = "FreeBSD" \) ; then 4699cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4700cdf0e10cSrcweir ENABLE_GRAPHITE="TRUE" 4701cdf0e10cSrcweir AC_MSG_CHECKING([which graphite to use]) 4702cdf0e10cSrcweir if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ 4703cdf0e10cSrcweir test "$with_system_graphite" != "no"; then 4704cdf0e10cSrcweir AC_MSG_RESULT([external]) 4705cdf0e10cSrcweir SYSTEM_GRAPHITE=YES 4706cdf0e10cSrcweir PKG_CHECK_MODULES( GRAPHITE, silgraphite ) 4707cdf0e10cSrcweir else 4708cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4709cdf0e10cSrcweir SYSTEM_GRAPHITE=NO 4710cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE GRAPHITE" 4711cdf0e10cSrcweir fi 4712cdf0e10cSrcweirelse 4713cdf0e10cSrcweir AC_MSG_RESULT([no]) 47149ef65f0eSAndre Fischer ENABLE_GRAPHITE="FALSE" 4715cdf0e10cSrcweirfi 4716cdf0e10cSrcweirAC_SUBST(ENABLE_GRAPHITE) 4717cdf0e10cSrcweirAC_SUBST(SYSTEM_GRAPHITE) 4718cdf0e10cSrcweirAC_SUBST(GRAPHITE_LIBS) 4719cdf0e10cSrcweirAC_SUBST(GRAPHITE_CFLAGS) 4720cdf0e10cSrcweir 472161a3a0ffSHerbert Dürr 4722cdf0e10cSrcweirdnl =================================================================== 4723cdf0e10cSrcweirdnl Checks for libraries. 4724cdf0e10cSrcweirdnl =================================================================== 4725cdf0e10cSrcweirdnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported 4726cdf0e10cSrcweirdnl See if we have the AppKit framework for building with Quartz graphics. 4727cdf0e10cSrcweir 4728cdf0e10cSrcweirif test "$_os" = "Darwin"; then 4729cdf0e10cSrcweir if test "x$with_x" = "xyes"; then 4730cdf0e10cSrcweir AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build]) 4731cdf0e10cSrcweir else 4732cdf0e10cSrcweir AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework]) 4733cdf0e10cSrcweir if test -d "/System/Library/Frameworks/AppKit.framework/"; then 4734cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4735cdf0e10cSrcweir x_includes="no_x_includes" 4736cdf0e10cSrcweir x_libraries="no_x_libraries" 4737cdf0e10cSrcweir dnl disable some things used on other Unix versions but not on the aqua build 4738cdf0e10cSrcweir enable_gtk=no 4739cdf0e10cSrcweir enable_cups=no 4740cdf0e10cSrcweir ENABLE_CUPS="" 4741cdf0e10cSrcweir AC_SUBST(ENABLE_CUPS) 4742cdf0e10cSrcweir else 4743cdf0e10cSrcweir AC_MSG_ERROR([No AppKit.framewrok found]) 4744cdf0e10cSrcweir fi 4745cdf0e10cSrcweir fi 4746cdf0e10cSrcweirfi 4747cdf0e10cSrcweir 4748cdf0e10cSrcweirdnl *************************************** 4749cdf0e10cSrcweirdnl testing for X libraries and includes... 4750cdf0e10cSrcweirdnl *************************************** 4751cdf0e10cSrcweirif test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then 4752cdf0e10cSrcweir echo "Do Nothing for _os = Darwin" 4753cdf0e10cSrcweir dnl Mac OS X using Aqua graphics. Don't check for X11. 4754cdf0e10cSrcweir : 4755cdf0e10cSrcweirelif test "$_os" = "OS2" ; then 4756cdf0e10cSrcweir echo "Do Nothing for _os = OS2. Don't check for X11." 4757cdf0e10cSrcweir dnl OS/2 uses native graphics. Don't check for X11. 4758cdf0e10cSrcweir : 4759cdf0e10cSrcweirelif test "$_os" != "WINNT" ; then 4760cdf0e10cSrcweir AC_PATH_X 4761cdf0e10cSrcweir AC_PATH_XTRA 4762cdf0e10cSrcweir CPPFLAGS="$CPPFLAGS $X_CFLAGS" 4763cdf0e10cSrcweir 4764cdf0e10cSrcweir if test "x$x_includes" = "x"; then 4765cdf0e10cSrcweir x_includes="default_x_includes" 4766cdf0e10cSrcweir fi 4767cdf0e10cSrcweir if test "x$x_libraries" = "x"; then 4768cdf0e10cSrcweir x_libraries="default_x_libraries" 4769cdf0e10cSrcweir fi 4770cdf0e10cSrcweir dnl The variables $x_libraries and $x_includes are set. 4771cdf0e10cSrcweir if test -z "$x_libraries"; then 4772cdf0e10cSrcweir AC_MSG_ERROR([No X libraries found]) # Exit 4773cdf0e10cSrcweir fi 4774cdf0e10cSrcweir if test -z "$x_includes"; then 4775cdf0e10cSrcweir AC_MSG_ERROR([No X includes found]) # Exit 4776cdf0e10cSrcweir fi 4777cdf0e10cSrcweir CFLAGS=$X_CFLAGS 4778cdf0e10cSrcweir LDFLAGS="$X_LDFLAGS $X_LIBS" 4779cdf0e10cSrcweir AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])]) 4780cdf0e10cSrcweir dnl Check if the XauDisposeAuth symbol is provided by libXau. 4781cdf0e10cSrcweir AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", []) 4782cdf0e10cSrcweirelse 4783cdf0e10cSrcweir x_includes="no_x_includes" 4784cdf0e10cSrcweir x_libraries="no_x_libraries" 4785cdf0e10cSrcweirfi 4786cdf0e10cSrcweirif test -z "$x_includes"; then 4787cdf0e10cSrcweir x_includes="no_x_includes" 4788cdf0e10cSrcweirfi 4789cdf0e10cSrcweirif test -z "$x_libraries"; then 4790cdf0e10cSrcweir x_libraries="no_x_libraries" 4791cdf0e10cSrcweirfi 4792cdf0e10cSrcweirif test "$x_includes" = "default_x_includes"; then 4793cdf0e10cSrcweir XINC="/usr/include" 4794cdf0e10cSrcweirelse 4795cdf0e10cSrcweir XINC="$x_includes" 4796cdf0e10cSrcweirfi 4797cdf0e10cSrcweirAC_SUBST(XINC) 4798cdf0e10cSrcweirif test "$x_libraries" = "default_x_libraries"; then 4799cdf0e10cSrcweir XLIB=`$PKG_CONFIG --variable=libdir x11` 4800cdf0e10cSrcweir if test "x$XLIB" = x; then 4801cdf0e10cSrcweir XLIB="/usr/lib" 4802cdf0e10cSrcweir fi 4803cdf0e10cSrcweirelse 4804cdf0e10cSrcweir XLIB="$x_libraries" 4805cdf0e10cSrcweirfi 4806cdf0e10cSrcweirAC_SUBST(XLIB) 4807cdf0e10cSrcweirAC_SUBST(XAU_LIBS) 4808cdf0e10cSrcweir 4809cdf0e10cSrcweirdnl =================================================================== 4810cdf0e10cSrcweirdnl Check if fontconfig/fontconfig.h is available 4811cdf0e10cSrcweirdnl =================================================================== 4812cdf0e10cSrcweirif test "$ENABLE_FONTCONFIG" = "TRUE" ; then 4813cdf0e10cSrcweir AC_CHECK_HEADER(fontconfig/fontconfig.h, [], 4814cdf0e10cSrcweir [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], []) 4815cdf0e10cSrcweir AC_MSG_CHECKING([whether fontconfig is >= 2.2.0]) 4816cdf0e10cSrcweir AC_TRY_RUN([ 4817cdf0e10cSrcweir#include <fontconfig/fontconfig.h> 4818cdf0e10cSrcweir 4819cdf0e10cSrcweirint main(int argc, char **argv) { 4820cdf0e10cSrcweir if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0; 4821cdf0e10cSrcweir else return 1; 4822cdf0e10cSrcweir} 4823cdf0e10cSrcweir], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])]) 4824cdf0e10cSrcweirfi 4825cdf0e10cSrcweir 4826cdf0e10cSrcweirdnl =================================================================== 4827cdf0e10cSrcweirdnl Check for system Xrender 4828cdf0e10cSrcweirdnl =================================================================== 4829cdf0e10cSrcweirAC_MSG_CHECKING([whether to link to Xrender]) 4830cdf0e10cSrcweirif test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then 4831cdf0e10cSrcweir AC_MSG_RESULT([yes]) 4832cdf0e10cSrcweir XRENDER_LINK=YES 4833cdf0e10cSrcweir with_system_xrender_headers=yes 4834cdf0e10cSrcweirelse 4835cdf0e10cSrcweir AC_MSG_RESULT([no, dynamically open it]) 4836cdf0e10cSrcweir XRENDER_LINK=NO 4837cdf0e10cSrcweirfi 4838cdf0e10cSrcweirAC_MSG_CHECKING([which Xrender headers to use]) 4839cdf0e10cSrcweirif test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \ 4840cdf0e10cSrcweir test "$with_system_xrender_headers" != "no"; then 4841cdf0e10cSrcweir AC_MSG_RESULT([external]) 4842cdf0e10cSrcweir SYSTEM_XRENDER_HEADERS=YES 4843cdf0e10cSrcweir AC_CHECK_HEADER(X11/extensions/Xrender.h, [], 4844cdf0e10cSrcweir [AC_MSG_ERROR(Xrender not found. install X)], []) 4845cdf0e10cSrcweirelse 4846cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4847cdf0e10cSrcweir SYSTEM_XRENDER_HEADERS=NO 4848cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" 4849cdf0e10cSrcweirfi 4850cdf0e10cSrcweirif test "$XRENDER_LINK" = "YES"; then 4851cdf0e10cSrcweir AC_CHECK_LIB(Xrender, XRenderQueryVersion, [], 4852cdf0e10cSrcweir [AC_MSG_ERROR(libXrender not found or functional)], []) 4853cdf0e10cSrcweirfi 4854cdf0e10cSrcweirAC_SUBST(SYSTEM_XRENDER_HEADERS) 4855cdf0e10cSrcweirAC_SUBST(XRENDER_LINK) 4856cdf0e10cSrcweir 4857cdf0e10cSrcweirdnl =================================================================== 4858cdf0e10cSrcweirdnl Check for XRandr 4859cdf0e10cSrcweirdnl =================================================================== 4860cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable RandR support]) 4861cdf0e10cSrcweirif test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then 4862cdf0e10cSrcweir if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then 4863cdf0e10cSrcweir XRANDR_DLOPEN="TRUE" 4864cdf0e10cSrcweir AC_MSG_RESULT([resorting to dlopen libXrandr at runtime]) 4865cdf0e10cSrcweir else 4866cdf0e10cSrcweir XRANDR_DLOPEN="FALSE" 4867cdf0e10cSrcweir PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="") 4868cdf0e10cSrcweir if test "$ENABLE_RANDR" != "TRUE"; then 4869cdf0e10cSrcweir AC_CHECK_HEADER(X11/extensions/Xrandr.h, [], 4870cdf0e10cSrcweir [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], []) 4871cdf0e10cSrcweir XRANDR_CFLAGS=" " 4872cdf0e10cSrcweir AC_CHECK_LIB(Xrandr, XRRQueryExtension, [], 4873cdf0e10cSrcweir [ AC_MSG_ERROR(libXrandr not found or functional) ], []) 4874cdf0e10cSrcweir XRANDR_LIBS="-lXrandr " 4875cdf0e10cSrcweir ENABLE_RANDR="TRUE" 4876cdf0e10cSrcweir AC_MSG_RESULT([enabling RandR support]) 4877cdf0e10cSrcweir fi 4878cdf0e10cSrcweir fi 4879cdf0e10cSrcweirelse 4880cdf0e10cSrcweir ENABLE_RANDR="" 4881cdf0e10cSrcweir AC_MSG_RESULT([no]) 4882cdf0e10cSrcweirfi 4883cdf0e10cSrcweirAC_SUBST(XRANDR_DLOPEN) 4884cdf0e10cSrcweirAC_SUBST(XRANDR_CFLAGS) 4885cdf0e10cSrcweirAC_SUBST(XRANDR_LIBS) 4886cdf0e10cSrcweirAC_SUBST(ENABLE_RANDR) 4887cdf0e10cSrcweir 48880021cf80SHerbert Dürrdnl =================================================================== 48890021cf80SHerbert Dürrdnl Check for system nss 48900021cf80SHerbert Dürrdnl =================================================================== 48910021cf80SHerbert DürrAC_MSG_CHECKING([which libnss to use]) 48920021cf80SHerbert Dürrif test -n "$with_system_nss" -o -n "$with_system_libs" && test "$with_system_nss" != "no"; then 48930021cf80SHerbert Dürr AC_MSG_RESULT([external]) 48940021cf80SHerbert Dürr PKG_CHECK_MODULES( NSS, nss ) 48950021cf80SHerbert Dürr SYSTEM_NSS=YES 48960021cf80SHerbert Dürrelse 48970021cf80SHerbert Dürr AC_MSG_RESULT([internal]) 48980021cf80SHerbert Dürr SYSTEM_NSS=NO 48990021cf80SHerbert Dürr BUILD_TYPE="$BUILD_TYPE NSS" 49000021cf80SHerbert Dürrfi 49010021cf80SHerbert DürrAC_SUBST(SYSTEM_NSS) 49020021cf80SHerbert DürrAC_SUBST(NSS_CFLAGS) 49030021cf80SHerbert DürrAC_SUBST(NSS_LIBS) 49040021cf80SHerbert Dürr 4905cdf0e10cSrcweirdnl =================================================================== 4906cdf0e10cSrcweirdnl Check for system openssl 4907cdf0e10cSrcweirdnl =================================================================== 4908cdf0e10cSrcweirif test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then 4909cdf0e10cSrcweir with_system_openssl=yes 4910cdf0e10cSrcweirfi 4911cdf0e10cSrcweirAC_MSG_CHECKING([which libssl to use]) 4912cdf0e10cSrcweirif test -n "$with_system_openssl" -o -n "$with_system_libs" && \ 4913cdf0e10cSrcweir test "$with_system_openssl" != "no"; then 4914cdf0e10cSrcweir AC_MSG_RESULT([external]) 4915cdf0e10cSrcweir # Mac OS builds should get out without extra stuff is the Mac porters' 4916cdf0e10cSrcweir # wish. And pkg-config is although Xcode ships a .pc for openssl 49175424bb20SMichael Stahl if test "$_os" = "Darwin" -o "$_os" = "FreeBSD"; then 4918cdf0e10cSrcweir OPENSSL_CFLAGS= 4919cdf0e10cSrcweir OPENSSL_LIBS="-lssl -lcrypto" 4920cdf0e10cSrcweir else 4921cdf0e10cSrcweir PKG_CHECK_MODULES( OPENSSL, openssl ) 4922cdf0e10cSrcweir fi 4923cdf0e10cSrcweir SYSTEM_OPENSSL=YES 4924cdf0e10cSrcweirelse 4925cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4926cdf0e10cSrcweir SYSTEM_OPENSSL=NO 4927cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE OPENSSL" 4928cdf0e10cSrcweirfi 4929cdf0e10cSrcweirAC_SUBST(SYSTEM_OPENSSL) 4930cdf0e10cSrcweirAC_SUBST(OPENSSL_CFLAGS) 4931cdf0e10cSrcweirAC_SUBST(OPENSSL_LIBS) 4932cdf0e10cSrcweir 4933cdf0e10cSrcweirdnl =================================================================== 4934cdf0e10cSrcweirdnl Check for system redland 4935cdf0e10cSrcweirdnl =================================================================== 4936cdf0e10cSrcweirAC_MSG_CHECKING([which redland library to use]) 4937cdf0e10cSrcweirif test -n "$with_system_redland" -o -n "$with_system_libs" && \ 4938cdf0e10cSrcweir test "$with_system_redland" != "no"; then 4939cdf0e10cSrcweir AC_MSG_RESULT([external]) 4940cdf0e10cSrcweir SYSTEM_REDLAND=YES 4941cdf0e10cSrcweir dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base) 4942cdf0e10cSrcweir PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8) 4943cdf0e10cSrcweirelse 4944cdf0e10cSrcweir AC_MSG_RESULT([internal]) 4945cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE REDLAND" 4946cdf0e10cSrcweir SYSTEM_REDLAND=NO 4947cdf0e10cSrcweirfi 4948cdf0e10cSrcweirAC_SUBST(SYSTEM_REDLAND) 4949cdf0e10cSrcweirAC_SUBST(REDLAND_CFLAGS) 4950cdf0e10cSrcweirAC_SUBST(REDLAND_LIBS) 4951cdf0e10cSrcweir 4952cdf0e10cSrcweirdnl =================================================================== 4953a44fea77SAriel Constenla-Hailednl Check for hunspell 4954cdf0e10cSrcweirdnl =================================================================== 4955a44fea77SAriel Constenla-HaileAC_MSG_CHECKING([whether to build the Spell Checking component]) 4956a44fea77SAriel Constenla-HaileENABLE_HUNSPELL= 49570ea1a209SEike Rathke 4958a44fea77SAriel Constenla-Haileif test "x$enable_hunspell" != "xno" ; then 4959a44fea77SAriel Constenla-Haile AC_MSG_CHECKING([which libhunspell to use]) 4960a44fea77SAriel Constenla-Haile if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ 4961a44fea77SAriel Constenla-Haile test "$with_system_hunspell" != "no"; then 4962a44fea77SAriel Constenla-Haile AC_MSG_RESULT([external]) 4963a44fea77SAriel Constenla-Haile SYSTEM_HUNSPELL=YES 4964a44fea77SAriel Constenla-Haile AC_LANG_PUSH([C++]) 4965a44fea77SAriel Constenla-Haile PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" ) 4966a44fea77SAriel Constenla-Haile if test "$HUNSPELL_PC" != "TRUE"; then 4967a44fea77SAriel Constenla-Haile AC_CHECK_HEADER(hunspell.hxx, [], 4968a44fea77SAriel Constenla-Haile [AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ], 4969a44fea77SAriel Constenla-Haile [AC_MSG_ERROR(hunspell headers not found.)], []) 4970a44fea77SAriel Constenla-Haile ], []) 4971a44fea77SAriel Constenla-Haile AC_CHECK_LIB(hunspell, main, [], 4972a44fea77SAriel Constenla-Haile [ AC_MSG_ERROR(hunspell library not found.) ], []) 4973a44fea77SAriel Constenla-Haile HUNSPELL_LIBS=-lhunspell 4974a44fea77SAriel Constenla-Haile fi 4975a44fea77SAriel Constenla-Haile AC_LANG_POP([C++]) 4976a44fea77SAriel Constenla-Haile else 4977a44fea77SAriel Constenla-Haile AC_MSG_RESULT([internal]) 4978a44fea77SAriel Constenla-Haile SYSTEM_HUNSPELL=NO 4979a44fea77SAriel Constenla-Haile BUILD_TYPE="$BUILD_TYPE HUNSPELL" 4980a44fea77SAriel Constenla-Haile fi 4981a44fea77SAriel Constenla-Haile ENABLE_HUNSPELL=YES 4982a44fea77SAriel Constenla-Haile AC_SUBST(SYSTEM_HUNSPELL) 4983a44fea77SAriel Constenla-Haile AC_SUBST(HUNSPELL_CFLAGS) 4984a44fea77SAriel Constenla-Haile AC_SUBST(HUNSPELL_LIBS) 4985cdf0e10cSrcweirelse 4986a44fea77SAriel Constenla-Haile AC_MSG_RESULT([no]) 4987cdf0e10cSrcweirfi 4988a44fea77SAriel Constenla-HaileAC_SUBST(ENABLE_HUNSPELL) 4989cdf0e10cSrcweir 4990cdf0e10cSrcweirdnl =================================================================== 4991a44fea77SAriel Constenla-Hailednl Checking for libhyphen 4992cdf0e10cSrcweirdnl =================================================================== 4993a44fea77SAriel Constenla-HaileAC_MSG_CHECKING([whether to build the Hyphenator component]) 4994a44fea77SAriel Constenla-HaileENABLE_HYPHEN= 4995a44fea77SAriel Constenla-Haile 4996a44fea77SAriel Constenla-Haileif test "x$enable_hyphen" != "xno" ; then 4997a44fea77SAriel Constenla-Haile AC_MSG_CHECKING([which libhyphen to use]) 4998a44fea77SAriel Constenla-Haile if test -n "$with_system_hyphen" -o -n "$with_system_libs" && \ 4999a44fea77SAriel Constenla-Haile test "$with_system_hyphen" != "no"; then 5000a44fea77SAriel Constenla-Haile AC_MSG_RESULT([external]) 5001a44fea77SAriel Constenla-Haile SYSTEM_HYPH=YES 5002a44fea77SAriel Constenla-Haile AC_CHECK_HEADER(hyphen.h, [], 5003a44fea77SAriel Constenla-Haile [ AC_MSG_ERROR(libhyphen headers not found.)], []) 5004a44fea77SAriel Constenla-Haile AC_CHECK_MEMBER(struct _HyphenDict.cset, [], 5005a44fea77SAriel Constenla-Haile [ AC_MSG_ERROR(no. You are sure you have libhyphen headers?)], 5006a44fea77SAriel Constenla-Haile [#include <hyphen.h>]) 5007a44fea77SAriel Constenla-Haile AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen], 5008a44fea77SAriel Constenla-Haile [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 5009a44fea77SAriel Constenla-Haile if test -z "$HYPHEN_LIB"; then 5010a44fea77SAriel Constenla-Haile AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph], 5011a44fea77SAriel Constenla-Haile [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 5012a44fea77SAriel Constenla-Haile fi 5013a44fea77SAriel Constenla-Haile if test -z "$HYPHEN_LIB"; then 5014a44fea77SAriel Constenla-Haile AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj], 5015a44fea77SAriel Constenla-Haile [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 5016a44fea77SAriel Constenla-Haile fi 5017a44fea77SAriel Constenla-Haile else 5018a44fea77SAriel Constenla-Haile AC_MSG_RESULT([internal]) 5019a44fea77SAriel Constenla-Haile SYSTEM_HYPH=NO 5020a44fea77SAriel Constenla-Haile BUILD_TYPE="$BUILD_TYPE HYPHEN" 5021cdf0e10cSrcweir fi 5022a44fea77SAriel Constenla-Haile ENABLE_HYPHEN=YES 5023a44fea77SAriel Constenla-Haile AC_SUBST(SYSTEM_HYPH) 5024a44fea77SAriel Constenla-Haile AC_SUBST(HYPHEN_LIB) 5025cdf0e10cSrcweirelse 5026a44fea77SAriel Constenla-Haile AC_MSG_RESULT([no]) 5027cdf0e10cSrcweirfi 5028a44fea77SAriel Constenla-HaileAC_SUBST(ENABLE_HYPHEN) 5029cdf0e10cSrcweir 5030764319a5SAndre Fischer 5031764319a5SAndre Fischer#dnl =================================================================== 5032764319a5SAndre Fischer#dnl Check whether we are allowed to bundle dictionaries and whether 5033764319a5SAndre Fischer#dnl hunspell is available. 5034764319a5SAndre Fischer#dnl =================================================================== 5035764319a5SAndre FischerENABLE_BUNDLED_DICTIONARIES= 5036764319a5SAndre Fischerif test "x$enable_bundled_dictionaries" != "xno" -a "x$ENABLE_HUNSPELL" = "xYES"; then 5037764319a5SAndre Fischer ENABLE_BUNDLED_DICTIONARIES=YES 5038764319a5SAndre Fischerfi 5039764319a5SAndre FischerAC_SUBST(ENABLE_BUNDLED_DICTIONARIES) 5040764319a5SAndre Fischer 5041764319a5SAndre Fischer 5042764319a5SAndre Fischer 5043cdf0e10cSrcweirdnl =================================================================== 5044cdf0e10cSrcweirdnl Checking for mythes 5045cdf0e10cSrcweirdnl =================================================================== 5046cdf0e10cSrcweirAC_MSG_CHECKING([which mythes to use]) 504735266ad7SPedro Giffuniif test -n "$with_system_mythes" -o -n "$with_system_libs" && \ 504835266ad7SPedro Giffuni test "$with_system_mythes" != "no"; then 5049cdf0e10cSrcweir AC_MSG_RESULT([external]) 5050cdf0e10cSrcweir SYSTEM_MYTHES=YES 5051cdf0e10cSrcweir AC_LANG_PUSH([C++]) 5052cdf0e10cSrcweir PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no) 5053cdf0e10cSrcweir if test "$MYTHES_PKGCONFIG" = "no"; then 5054cdf0e10cSrcweir AC_CHECK_HEADER(mythes.hxx, [], 5055cdf0e10cSrcweir [ AC_MSG_ERROR(mythes.hxx headers not found.)], []) 5056cdf0e10cSrcweir AC_CHECK_LIB(mythes-1.2, main, [], 5057cdf0e10cSrcweir [ MYTHES_FOUND=no], []) 5058cdf0e10cSrcweir if test "$MYTHES_FOUND" = "no"; then 5059cdf0e10cSrcweir AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes], 5060cdf0e10cSrcweir [ MYTHES_FOUND=no], []) 5061cdf0e10cSrcweir fi 5062cdf0e10cSrcweir if test "$MYTHES_FOUND" = "no"; then 5063cdf0e10cSrcweir AC_MSG_ERROR([mythes library not found!.]) 5064cdf0e10cSrcweir fi 5065cdf0e10cSrcweir fi 5066cdf0e10cSrcweir AC_LANG_POP([C++]) 5067cdf0e10cSrcweirelse 5068cdf0e10cSrcweir AC_MSG_RESULT([internal]) 5069cdf0e10cSrcweir SYSTEM_MYTHES=NO 5070cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE MYTHES" 5071cdf0e10cSrcweirfi 5072cdf0e10cSrcweirAC_SUBST(SYSTEM_MYTHES) 5073cdf0e10cSrcweirAC_SUBST(MYTHES_CFLAGS) 5074cdf0e10cSrcweirAC_SUBST(MYTHES_LIBS) 5075cdf0e10cSrcweir 50760ea1a209SEike Rathke 5077cdf0e10cSrcweirdnl =================================================================== 5078cdf0e10cSrcweirdnl Checking for libtextcat 5079cdf0e10cSrcweirdnl =================================================================== 5080cdf0e10cSrcweirAC_MSG_CHECKING([which libtextcat to use]) 5081cdf0e10cSrcweirif test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then 5082cdf0e10cSrcweir AC_MSG_RESULT([external]) 5083cdf0e10cSrcweir SYSTEM_LIBTEXTCAT=YES 5084cdf0e10cSrcweir AC_CHECK_HEADER(libtextcat/textcat.h, [], 5085cdf0e10cSrcweir [ AC_MSG_ERROR(libtextcat headers not found.)], []) 5086cdf0e10cSrcweir AC_CHECK_LIB(textcat, special_textcat_Init, , 5087cdf0e10cSrcweir [ AC_MSG_ERROR(libtextcat library not found or not suitable. libtextcat typically needs to be patched)], []) 5088cdf0e10cSrcweirelse 5089cdf0e10cSrcweir AC_MSG_RESULT([internal]) 5090cdf0e10cSrcweir SYSTEM_LIBTEXTCAT=NO 5091cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" 5092cdf0e10cSrcweirfi 5093cdf0e10cSrcweirAC_SUBST(SYSTEM_LIBTEXTCAT) 5094cdf0e10cSrcweir 5095cdf0e10cSrcweirAC_MSG_CHECKING([which libtextcat data directory to use]) 5096cdf0e10cSrcweirif test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then 5097cdf0e10cSrcweir if test "$with_system_libtextcat_data" = "yes"; then 5098cdf0e10cSrcweir SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat 5099cdf0e10cSrcweir else 5100cdf0e10cSrcweir SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data 5101cdf0e10cSrcweir fi 5102cdf0e10cSrcweir AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA]) 5103cdf0e10cSrcweirelse 5104cdf0e10cSrcweir AC_MSG_RESULT([internal]) 5105cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" 5106cdf0e10cSrcweirfi 5107cdf0e10cSrcweirAC_SUBST(SYSTEM_LIBTEXTCAT_DATA) 5108cdf0e10cSrcweir 5109cdf0e10cSrcweirdnl *************************************** 5110cdf0e10cSrcweirdnl testing libc version for Linux... 5111cdf0e10cSrcweirdnl *************************************** 5112cdf0e10cSrcweirif test "$_os" = "Linux"; then 5113cdf0e10cSrcweir AC_MSG_CHECKING([whether libc is >= 2.1.1]) 5114cdf0e10cSrcweir exec 6>/dev/null # no output 5115cdf0e10cSrcweir AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC) 5116cdf0e10cSrcweir exec 6>&1 # output on again 5117cdf0e10cSrcweir if test "$HAVE_LIBC"; then 5118cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5119cdf0e10cSrcweir else 5120cdf0e10cSrcweir AC_MSG_ERROR([no, upgrade libc]) 5121cdf0e10cSrcweir fi 5122cdf0e10cSrcweirfi 5123cdf0e10cSrcweir 5124cdf0e10cSrcweirif test "$_os" != "WNT"; then 5125cdf0e10cSrcweir AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO]) 5126cdf0e10cSrcweir AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO]) 5127cdf0e10cSrcweir if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then 5128cdf0e10cSrcweir SYSTEM_LIBC=YES 5129cdf0e10cSrcweir fi 5130cdf0e10cSrcweirelse 5131cdf0e10cSrcweir HAVE_GETOPT=NO 5132cdf0e10cSrcweir HAVE_READDIR_R=NO 5133cdf0e10cSrcweir SYSTEM_LIBC=YES 5134cdf0e10cSrcweirfi 5135cdf0e10cSrcweirAC_SUBST(HAVE_GETOPT) 5136cdf0e10cSrcweirAC_SUBST(HAVE_READDIR_R) 5137cdf0e10cSrcweirAC_SUBST(SYSTEM_LIBC) 5138cdf0e10cSrcweir 5139cdf0e10cSrcweirdnl ========================================= 5140cdf0e10cSrcweirdnl Check for the Microsoft Platform SDK. 5141cdf0e10cSrcweirdnl ========================================= 5142cdf0e10cSrcweirdnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better, 5143cdf0e10cSrcweirdnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then 5144cdf0e10cSrcweirif test \( "$_os" = "WINNT" \) ; then 5145cdf0e10cSrcweir AC_MSG_CHECKING([for PSDK files]) 5146cdf0e10cSrcweir if test -z "$with_psdk_home"; then 5147cdf0e10cSrcweir # This first line will detect a February 2003 Microsoft Platform SDK 5148cdf0e10cSrcweir PSDK_HOME=`./oowintool --psdk-home` 5149cdf0e10cSrcweir # But there might be also an April 2005 PSDK, unfortunately MS changed 5150cdf0e10cSrcweir # the registry entry. (we prefer the old version!?) 5151cdf0e10cSrcweir if test -z "$PSDK_HOME"; then 5152cdf0e10cSrcweir PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1` 5153cdf0e10cSrcweir fi 5154cdf0e10cSrcweir # normalize if found 5155cdf0e10cSrcweir if test -n "$PSDK_HOME"; then 5156cdf0e10cSrcweir PSDK_HOME=`cygpath -d "$PSDK_HOME"` 5157cdf0e10cSrcweir PSDK_HOME=`cygpath -u "$PSDK_HOME"` 5158cdf0e10cSrcweir fi 5159cdf0e10cSrcweir else 5160cdf0e10cSrcweir PSDK_HOME=`cygpath -u "$with_psdk_home"` 5161cdf0e10cSrcweir fi 5162cdf0e10cSrcweir # Remove a possible trailing backslash 5163cdf0e10cSrcweir PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'` 5164cdf0e10cSrcweir # Problem with current PSDK (iz 49865) 5165cdf0e10cSrcweir if test -f "$PSDK_HOME/Lib/libcp.lib"; then 5166cdf0e10cSrcweir AC_MSG_ERROR([ 5167cdf0e10cSrcweir 5168cdf0e10cSrcweirSome modules do not build correctly with MS Platform SDK - April 2005 5169cdf0e10cSrcweirEdition if the library ($PSDK_HOME/Lib/libcp.lib) is found. 5170cdf0e10cSrcweirRemove/rename/backup that file and restart configure. Details about this 5171cdf0e10cSrcweirproblem can be found in issue 49856.]) 5172cdf0e10cSrcweir fi 5173cdf0e10cSrcweir# WIndows SDK has different headers 5174cdf0e10cSrcweir if test \( -f "$PSDK_HOME/Include/adoint.h" \) \ 5175cdf0e10cSrcweir -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \ 5176cdf0e10cSrcweir -a \( -f "$PSDK_HOME/Include/usp10.h" \); then 5177cdf0e10cSrcweir HAVE_PSDK_H="yes" 5178cdf0e10cSrcweir else 5179cdf0e10cSrcweir HAVE_PSDK_H="no" 5180cdf0e10cSrcweir fi 5181cdf0e10cSrcweir if test -f "$PSDK_HOME/lib/unicows.lib"; then 5182cdf0e10cSrcweir HAVE_PSDK_LIB="yes" 5183cdf0e10cSrcweir else 5184cdf0e10cSrcweir HAVE_PSDK_LIB="no" 5185cdf0e10cSrcweir fi 5186cdf0e10cSrcweir if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then 5187cdf0e10cSrcweir AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs 5188cdf0e10cSrcweirare installed or use --with-psdk-home .]) 5189cdf0e10cSrcweir fi 5190cdf0e10cSrcweir if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \ 5191cdf0e10cSrcweir -o ! -x "$PSDK_HOME/bin/msidb.exe" \ 5192cdf0e10cSrcweir -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \ 5193cdf0e10cSrcweir -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then 5194cdf0e10cSrcweir AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.]) 5195cdf0e10cSrcweir fi 5196cdf0e10cSrcweir AC_MSG_RESULT([SDK files found ...)]) 5197cdf0e10cSrcweirdnl Check if this is the right SDK. 519828633775SPedro Giffuni if echo $PSDK_HOME | $GREP "v6.1" >/dev/null 2>/dev/null; then 5199cdf0e10cSrcweir AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)]) 5200cdf0e10cSrcweir WINDOWS_VISTA_PSDK=TRUE 520128633775SPedro Giffuni elif echo $PSDK_HOME | $GREP "v6.0" >/dev/null 2>/dev/null; then 5202cdf0e10cSrcweir AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)]) 5203cdf0e10cSrcweir WINDOWS_VISTA_PSDK=TRUE 520428633775SPedro Giffuni elif echo $PSDK_HOME | $GREP "v7.0" >/dev/null 2>/dev/null; then 52058e162c1bSOliver-Rainer Wittmann AC_MSG_RESULT([Found Windows SDK 7.0 ($PSDK_HOME)]) 52068e162c1bSOliver-Rainer Wittmann WINDOWS_VISTA_PSDK=TRUE 5207cdf0e10cSrcweir else 5208cdf0e10cSrcweir AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)]) 5209cdf0e10cSrcweir fi 5210cdf0e10cSrcweirfi 5211cdf0e10cSrcweirAC_SUBST(PSDK_HOME) 5212cdf0e10cSrcweirAC_SUBST(WINDOWS_VISTA_PSDK) 5213cdf0e10cSrcweir 5214cdf0e10cSrcweirdnl ========================================= 5215cdf0e10cSrcweirdnl Check for the Microsoft DirectX SDK. 5216cdf0e10cSrcweirdnl ========================================= 5217cdf0e10cSrcweirif test \( "$_os" = "WINNT" \) ; then 5218cdf0e10cSrcweir AC_MSG_CHECKING([for DirectX SDK files]) 5219cdf0e10cSrcweir if test -z "$with_directx_home"; then 5220cdf0e10cSrcweir dnl A standard installation of the DirectX SDK sets $DXSDK_DIR 5221cdf0e10cSrcweir if test -n "$DXSDK_DIR"; then 5222cdf0e10cSrcweir DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"` 5223cdf0e10cSrcweir DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"` 5224cdf0e10cSrcweir fi 5225cdf0e10cSrcweir # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to 5226cdf0e10cSrcweir # the "DirectX SDK files not found" error later 5227cdf0e10cSrcweir else 5228cdf0e10cSrcweir DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"` 5229cdf0e10cSrcweir fi 5230cdf0e10cSrcweir # Remove a possible trailing backslash 5231cdf0e10cSrcweir DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'` 5232cdf0e10cSrcweir 5233cdf0e10cSrcweir if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then 5234549fe914SJürgen Schmidt HAVE_DIRECTDRAW_H="yes" 5235549fe914SJürgen Schmidt else 5236549fe914SJürgen Schmidt HAVE_DIRECTDRAW_H="no" 5237549fe914SJürgen Schmidt fi 5238549fe914SJürgen Schmidt if test -f "$DIRECTXSDK_HOME/Include/d3d9.h" ; then 5239cdf0e10cSrcweir HAVE_DIRECTXSDK_H="yes" 5240cdf0e10cSrcweir else 5241cdf0e10cSrcweir HAVE_DIRECTXSDK_H="no" 5242cdf0e10cSrcweir fi 5243549fe914SJürgen Schmidt 5244cdf0e10cSrcweir # MS changed the location of the libraries with dec 2004 directx sdk 5245cdf0e10cSrcweir if test -d "$DIRECTXSDK_HOME/lib/x86" ; then 5246cdf0e10cSrcweir DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86" 5247cdf0e10cSrcweir else 5248cdf0e10cSrcweir DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib" 5249cdf0e10cSrcweir fi 5250cdf0e10cSrcweir if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then 5251549fe914SJürgen Schmidt HAVE_DIRECTDRAW_LIB="yes" 5252549fe914SJürgen Schmidt else 5253549fe914SJürgen Schmidt HAVE_DIRECTDRAW_LIB="no" 5254549fe914SJürgen Schmidt fi 5255549fe914SJürgen Schmidt if test -f "$DIRECTXSDK_LIB/d3d9.lib" ; then 5256cdf0e10cSrcweir HAVE_DIRECTXSDK_LIB="yes" 5257cdf0e10cSrcweir else 5258cdf0e10cSrcweir HAVE_DIRECTXSDK_LIB="no" 5259cdf0e10cSrcweir fi 5260549fe914SJürgen Schmidt 5261549fe914SJürgen Schmidt if test "$HAVE_DIRECTDRAW_H" = "yes" -a "$HAVE_DIRECTDRAW_LIB" = "yes" ; then 5262549fe914SJürgen Schmidt ENABLE_DIRECT_DRAW="TRUE" 5263549fe914SJürgen Schmidt fi 5264549fe914SJürgen Schmidt if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes" ; then 5265549fe914SJürgen Schmidt HAVE_DIRECTXSDK="yes" 5266549fe914SJürgen Schmidt else 5267549fe914SJürgen Schmidt HAVE_DIRECTXSDK="no" 5268549fe914SJürgen Schmidt fi 5269549fe914SJürgen Schmidt 5270cdf0e10cSrcweir if test -n "$ENABLE_DIRECTX"; then 5271549fe914SJürgen Schmidt if test "$HAVE_DIRECTDRAW" = "yes" -o "$HAVE_DIRECTXSDK" = "yes" ; then 5272cdf0e10cSrcweir AC_MSG_RESULT([found]) 5273cdf0e10cSrcweir else 52747f413237SHerbert Dürr AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or --disable-directx.]) 5275cdf0e10cSrcweir fi 5276cdf0e10cSrcweir else 5277cdf0e10cSrcweir DIRECTXSDK_HOME="" 5278cdf0e10cSrcweir AC_MSG_RESULT([disabled]) 5279cdf0e10cSrcweir fi 5280cdf0e10cSrcweirfi 5281549fe914SJürgen SchmidtAC_SUBST(ENABLE_DIRECT_DRAW) 5282cdf0e10cSrcweirAC_SUBST(DIRECTXSDK_HOME) 5283cdf0e10cSrcweirAC_SUBST(DIRECTXSDK_LIB) 5284cdf0e10cSrcweir 52858e8da03fSAriel Constenla-Haile 52868e8da03fSAriel Constenla-Hailednl ============================================ 52878e8da03fSAriel Constenla-Hailednl Check for ATL and MFC 52888e8da03fSAriel Constenla-Hailednl ============================================ 52898e8da03fSAriel Constenla-Haileif test \( "$_os" = "WINNT" \) ; then 52908e8da03fSAriel Constenla-Haile AC_MSG_CHECKING([for ATL and MFC]) 52910fd36615SAriel Constenla-Haile if test "$DISABLE_ATL" = "TRUE"; then 52920fd36615SAriel Constenla-Haile AC_MSG_RESULT([ATL is disabled, nothing to check]) 52938e8da03fSAriel Constenla-Haile else 52948e8da03fSAriel Constenla-Haile AC_MSG_NOTICE([testing ATL/MFC libs and includes]) 52958e8da03fSAriel Constenla-Haile if test -z "$with_atl_include_dir"; then 52968e8da03fSAriel Constenla-Haile ATL_INCLUDE=$COMPATH/atlmfc/include 52978e8da03fSAriel Constenla-Haile else 52988e8da03fSAriel Constenla-Haile ATL_INCLUDE=`cygpath -u "$with_atl_include_dir"` 52998e8da03fSAriel Constenla-Haile fi 53008e8da03fSAriel Constenla-Haile if test -z "$with_atl_lib_dir"; then 53018e8da03fSAriel Constenla-Haile ATL_LIB=$COMPATH/atlmfc/lib 530233605542SJürgen Schmidt ATL_LIB_X64=$COMPATH/atlmfc/lib/amd64 53038e8da03fSAriel Constenla-Haile else 53048e8da03fSAriel Constenla-Haile ATL_LIB=`cygpath -u "$with_atl_lib_dir"` 530533605542SJürgen Schmidt ATL_LIB_X64=$ATL_LIB/../amd64 53068e8da03fSAriel Constenla-Haile fi 53078e8da03fSAriel Constenla-Haile if test -z "$with_mfc_include_dir"; then 53088e8da03fSAriel Constenla-Haile MFC_INCLUDE=$COMPATH/atlmfc/include 53098e8da03fSAriel Constenla-Haile else 53108e8da03fSAriel Constenla-Haile MFC_INCLUDE=`cygpath -u "$with_mfc_include_dir"` 53118e8da03fSAriel Constenla-Haile fi 53128e8da03fSAriel Constenla-Haile if test -z "$with_mfc_lib_dir"; then 53138e8da03fSAriel Constenla-Haile MFC_LIB=$COMPATH/atlmfc/lib 53148e8da03fSAriel Constenla-Haile else 53158e8da03fSAriel Constenla-Haile MFC_LIB=`cygpath -u "$with_mfc_lib_dir"` 53168e8da03fSAriel Constenla-Haile fi 53178e8da03fSAriel Constenla-Haile 53188e8da03fSAriel Constenla-Haile ATL_INCLUDE=`echo $ATL_INCLUDE | $SED 's/\/$//'` 53198e8da03fSAriel Constenla-Haile ATL_LIB=`echo $ATL_LIB | $SED 's/\/$//'` 532033605542SJürgen Schmidt ATL_LIB_X64=`echo $ATL_LIB_X64 | $SED 's/\/$//'` 53218e8da03fSAriel Constenla-Haile MFC_INCLUDE=`echo $MFC_INCLUDE | $SED 's/\/$//'` 53228e8da03fSAriel Constenla-Haile MFC_LIB=`echo $MFC_LIB | $SED 's/\/$//'` 53238e8da03fSAriel Constenla-Haile 53241706e35bSAriel Constenla-Haile AC_MSG_NOTICE([looking for atlbase.h in "$ATL_INCLUDE"]) 53251706e35bSAriel Constenla-Haile if test -f "$ATL_INCLUDE/atlbase.h"; then 53268e8da03fSAriel Constenla-Haile HAVE_ATL_H="yes" 53278e8da03fSAriel Constenla-Haile else 53281706e35bSAriel Constenla-Haile HAVE_ATL_H="no" 53298e8da03fSAriel Constenla-Haile fi 53301706e35bSAriel Constenla-Haile AC_MSG_NOTICE([found atlbase.h in "$ATL_INCLUDE"? "$HAVE_ATL_H"]) 53311706e35bSAriel Constenla-Haile 53321706e35bSAriel Constenla-Haile AC_MSG_NOTICE([looking for afx.h in "$MFC_INCLUDE"]) 53338e8da03fSAriel Constenla-Haile if test -f "$MFC_INCLUDE/afx.h"; then 53348e8da03fSAriel Constenla-Haile HAVE_MFC_H="yes" 53358e8da03fSAriel Constenla-Haile else 53361706e35bSAriel Constenla-Haile HAVE_MFC_H="no" 53378e8da03fSAriel Constenla-Haile fi 53381706e35bSAriel Constenla-Haile AC_MSG_NOTICE([found afx.h in "$MFC_INCLUDE"? "$HAVE_MFC_H"]) 53391706e35bSAriel Constenla-Haile 53401706e35bSAriel Constenla-Haile AC_MSG_NOTICE([looking for atls.lib in "$ATL_LIB"]) 53418e8da03fSAriel Constenla-Haile if test -f "$ATL_LIB/atls.lib"; then 53428e8da03fSAriel Constenla-Haile HAVE_ATL_LIB="yes" 53431706e35bSAriel Constenla-Haile AC_MSG_NOTICE([looking for atlthunk.lib in "$ATL_LIB"]) 53448e8da03fSAriel Constenla-Haile if test -f "$ATL_LIB/atlthunk.lib"; then 53458e8da03fSAriel Constenla-Haile HAVE_ATLTHUNK="YES" 53468e8da03fSAriel Constenla-Haile else 53478e8da03fSAriel Constenla-Haile HAVE_ATLTHUNK="NO" 53488e8da03fSAriel Constenla-Haile fi 53491706e35bSAriel Constenla-Haile AC_MSG_NOTICE([found atlthunk.lib in "$ATL_LIB"? "$HAVE_ATLTHUNK"]) 53508e8da03fSAriel Constenla-Haile else 53518e8da03fSAriel Constenla-Haile HAVE_ATL_LIB="no" 53528e8da03fSAriel Constenla-Haile fi 53531706e35bSAriel Constenla-Haile AC_MSG_NOTICE([found atls.lib in "$ATL_LIB"? "$HAVE_ATL_LIB"]) 53548e8da03fSAriel Constenla-Haile 535507a3d7f1SPedro Giffuni dnl TODO check also MFC libraries, they seem to have different names 53568e8da03fSAriel Constenla-Haile dnl mfc42.lib mfc90.lib 53578e8da03fSAriel Constenla-Haile if test -d "$MFC_LIB"; then 53588e8da03fSAriel Constenla-Haile HAVE_MFC_LIB="yes" 53598e8da03fSAriel Constenla-Haile else 53608e8da03fSAriel Constenla-Haile HAVE_MFC_LIB="no" 53618e8da03fSAriel Constenla-Haile fi 53628e8da03fSAriel Constenla-Haile 53638e8da03fSAriel Constenla-Haile if test "$HAVE_ATL_H" = "no" -o "$HAVE_MFC_H" = "no" -o "$HAVE_ATL_LIB" = "no" -o "$HAVE_MFC_LIB" = "no"; then 53648e8da03fSAriel Constenla-Haile ATL_INCLUDE= 53658e8da03fSAriel Constenla-Haile ATL_LIB= 536633605542SJürgen Schmidt ATL_LIB_X64= 53678e8da03fSAriel Constenla-Haile MFC_INCLUDE= 53688e8da03fSAriel Constenla-Haile MFC_LIB= 53698e8da03fSAriel Constenla-Haile HAVE_ATL_LIB= 53708e8da03fSAriel Constenla-Haile dnl TODO shouldn't this be an error? 53718e8da03fSAriel Constenla-Haile DISABLE_ACTIVEX="TRUE" 53728e8da03fSAriel Constenla-Haile DISABLE_ATL="TRUE" 53738e8da03fSAriel Constenla-Haile AC_MSG_RESULT([ATL/MFC disabled]) 53748e8da03fSAriel Constenla-Haile else 53758e8da03fSAriel Constenla-Haile ATL_INCLUDE=`cygpath -dm "$ATL_INCLUDE"` 53768e8da03fSAriel Constenla-Haile ATL_LIB=`cygpath -dm "$ATL_LIB"` 537733605542SJürgen Schmidt ATL_LIB_X64=`cygpath -dm "$ATL_LIB_X64"` 53788e8da03fSAriel Constenla-Haile MFC_INCLUDE=`cygpath -dm "$MFC_INCLUDE"` 53798e8da03fSAriel Constenla-Haile MFC_LIB=`cygpath -dm "$MFC_LIB"` 53808e8da03fSAriel Constenla-Haile AC_MSG_RESULT([ATL/MFC enabled]) 53818e8da03fSAriel Constenla-Haile fi 53828e8da03fSAriel Constenla-Haile fi 53838e8da03fSAriel Constenla-Hailefi 53848e8da03fSAriel Constenla-HaileAC_SUBST(ATL_INCLUDE) 53858e8da03fSAriel Constenla-HaileAC_SUBST(ATL_LIB) 538633605542SJürgen SchmidtAC_SUBST(ATL_LIB_X64) 53878e8da03fSAriel Constenla-HaileAC_SUBST(HAVE_ATLTHUNK) 53888e8da03fSAriel Constenla-HaileAC_SUBST(MFC_INCLUDE) 53898e8da03fSAriel Constenla-HaileAC_SUBST(MFC_LIB) 53908e8da03fSAriel Constenla-Haile 53918e8da03fSAriel Constenla-Haile 5392cdf0e10cSrcweirdnl ============================================ 5393cdf0e10cSrcweirdnl Check for Nullsoft Scriptable Install System 5394cdf0e10cSrcweirdnl ============================================ 5395cdf0e10cSrcweirNSIS_PATH="" 5396cdf0e10cSrcweirif test "$_os" = "WINNT" ; then 5397cdf0e10cSrcweir AC_MSG_CHECKING([for NSIS]) 5398cdf0e10cSrcweir AC_PATH_PROG(NSIS_PATH, nsis.exe) 5399cdf0e10cSrcweir if test -n "$NSIS_PATH"; then 5400cdf0e10cSrcweir NSIS_PATH=`dirname "$NSIS_PATH"` 5401cdf0e10cSrcweir fi 5402cdf0e10cSrcweir if test -n "$with_nsis_path"; then 5403cdf0e10cSrcweir with_nsis_path=`cygpath -u "$with_nsis_path"` 5404cdf0e10cSrcweir fi 5405cdf0e10cSrcweir if test -e "$with_nsis_path/nsis.exe"; then 5406cdf0e10cSrcweir NSIS_PATH="$with_nsis_path" 5407cdf0e10cSrcweir fi 5408cdf0e10cSrcweir nsistest=`./oowintool --nsis-dir`; 5409cdf0e10cSrcweir if test -x "$nsistest/nsis.exe"; then 5410cdf0e10cSrcweir NSIS_PATH="$nsistest" 5411cdf0e10cSrcweir fi 5412cdf0e10cSrcweir if test -z "$NSIS_PATH"; then 5413cdf0e10cSrcweir AC_MSG_WARN([NSIS not found, no self contained installer will be build.]) 5414cdf0e10cSrcweir echo "NSIS not found, no self contained installer will be build." >> warn 5415cdf0e10cSrcweir else 5416cdf0e10cSrcweir NSIS_PATH=`cygpath -d "$NSIS_PATH"` 5417cdf0e10cSrcweir NSIS_PATH=`cygpath -u "$NSIS_PATH"` 5418cdf0e10cSrcweir AC_MSG_RESULT([found ($NSIS_PATH)]) 5419b871de36Sarielch AC_MSG_CHECKING([whether NSIS version is >= 3.*]) 5420b871de36Sarielch nsis_version_string=`"$NSIS_PATH/makensis.exe" /VERSION | $SED -e s/^v//i` 5421b871de36Sarielch nsis_version_major=`echo $nsis_version_string | cut -d. -f1` 5422b871de36Sarielch nsis_version_minor=`echo $nsis_version_string | cut -d. -f2` 5423b871de36Sarielch if test "$nsis_version_major" -ge "3"; then 5424b871de36Sarielch AC_MSG_RESULT([found NSIS $nsis_version_major.$nsis_version_minor >= 3.*]) 5425b871de36Sarielch AC_MSG_CHECKING([whether NSIS was compiled with Unicode support]) 5426b871de36Sarielch if echo `"$NSIS_PATH/makensis.exe" /HDRINFO` | $EGREP "\bNSIS_UNICODE_MAKENSIS\b" 2>&1 >/dev/null; then 5427b871de36Sarielch AC_MSG_RESULT([NSIS version compiled with Unicode support.]) 5428b871de36Sarielch else 5429b871de36Sarielch NSIS_PATH="" 5430b871de36Sarielch AC_MSG_WARN([NSIS version compiled without Unicode support, no self contained installer will be build.]) 5431b871de36Sarielch fi 5432b871de36Sarielch else 5433b871de36Sarielch NSIS_PATH="" 5434b871de36Sarielch AC_MSG_WARN([NSIS version found is < 3.*, no self contained installer will be build.]) 5435b871de36Sarielch fi 5436cdf0e10cSrcweir fi 5437cdf0e10cSrcweirfi 5438cdf0e10cSrcweirAC_SUBST(NSIS_PATH) 5439cdf0e10cSrcweir 5440cdf0e10cSrcweirdnl *************************************** 5441cdf0e10cSrcweirdnl testing bison and flex exist 5442cdf0e10cSrcweirdnl *************************************** 5443cdf0e10cSrcweirAC_PATH_PROG(BISON, bison) 5444cdf0e10cSrcweirif test -z "$BISON"; then 5445cdf0e10cSrcweir AC_MSG_ERROR([no bison found in \$PATH, install bison]) 5446cdf0e10cSrcweirelse 5447cdf0e10cSrcweir AC_MSG_CHECKING([the bison version]) 544828633775SPedro Giffuni _bison_version=`$BISON --version | $GREP GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 5449cdf0e10cSrcweir _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` 5450cdf0e10cSrcweir # Accept newer than 1.875 or older(equal) than 1.75 5451cdf0e10cSrcweir if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then 5452cdf0e10cSrcweir if test "$_bison_version" = "1.875" ; then 5453cdf0e10cSrcweir AC_MSG_WARN([suspect ($BISON $_bison_version)]) 5454cdf0e10cSrcweir echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn 5455cdf0e10cSrcweir else 5456cdf0e10cSrcweir AC_MSG_RESULT([checked ($BISON $_bison_version)]) 5457cdf0e10cSrcweir fi 5458cdf0e10cSrcweir else 5459cdf0e10cSrcweir AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))]) 5460cdf0e10cSrcweir fi 5461cdf0e10cSrcweirfi 5462cdf0e10cSrcweirAC_PATH_PROG(FLEX, flex) 5463cdf0e10cSrcweirif test -z "$FLEX"; then 5464cdf0e10cSrcweir AC_MSG_ERROR([no flex found in \$PATH, install flex]) 5465cdf0e10cSrcweirfi 5466cdf0e10cSrcweirdnl *************************************** 5467cdf0e10cSrcweirdnl testing that patch exists 5468cdf0e10cSrcweirdnl *************************************** 5469cdf0e10cSrcweirAC_PATH_PROG(PATCH, patch) 5470cdf0e10cSrcweirif test -z "$PATCH"; then 5471cdf0e10cSrcweir AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\]) 5472cdf0e10cSrcweirfi 5473cdf0e10cSrcweir 5474cdf0e10cSrcweirdnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used 5475cdf0e10cSrcweirif test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then 5476cdf0e10cSrcweir if test -z "$with_gnu_patch"; then 5477cdf0e10cSrcweir GNUPATCH=$PATCH 5478cdf0e10cSrcweir else 5479cdf0e10cSrcweir if test -x "$with_gnu_patch"; then 5480cdf0e10cSrcweir GNUPATCH=$with_gnu_patch 5481cdf0e10cSrcweir else 5482cdf0e10cSrcweir AC_MSG_ERROR([--with-gnu-patch did not point to an executable]) 5483cdf0e10cSrcweir fi 5484cdf0e10cSrcweir fi 5485cdf0e10cSrcweir 5486cdf0e10cSrcweir AC_MSG_CHECKING([whether $GNUPATCH is GNU patch]) 548728633775SPedro Giffuni if $GNUPATCH --version | $GREP "Free Software Foundation" >/dev/null 2>/dev/null; then 5488cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5489cdf0e10cSrcweir else 5490cdf0e10cSrcweir AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it]) 5491cdf0e10cSrcweir fi 5492cdf0e10cSrcweirfi 5493cdf0e10cSrcweir 5494cdf0e10cSrcweirdnl We also need to check for --with-gnu-cp 5495cdf0e10cSrcweir 5496cdf0e10cSrcweirif test -z "$with_gnu_cp"; then 549762840caaSPedro Giffuni # check the place where the GNU stuff is hidden on Solaris... 5498cdf0e10cSrcweir if test -x /usr/gnu/bin/cp; then 5499cdf0e10cSrcweir GNUCP=/usr/gnu/bin/cp 5500cdf0e10cSrcweir else 5501cdf0e10cSrcweir AC_PATH_PROGS(GNUCP, gnucp cp) 5502cdf0e10cSrcweir fi 5503cdf0e10cSrcweir if test -z $GNUCP; then 5504cdf0e10cSrcweir AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it]) 5505cdf0e10cSrcweir fi 5506cdf0e10cSrcweirelse 5507cdf0e10cSrcweir if test -x "$with_gnu_cp"; then 5508cdf0e10cSrcweir GNUCP=$with_gnu_cp 5509cdf0e10cSrcweir else 5510cdf0e10cSrcweir AC_MSG_ERROR([--with-gnu-cp did not point to an executable]) 5511cdf0e10cSrcweir fi 5512cdf0e10cSrcweirfi 5513cdf0e10cSrcweir 5514cdf0e10cSrcweirAC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support]) 551528633775SPedro Giffuniif $GNUCP --version 2>/dev/null | $GREP "coreutils" >/dev/null 2>/dev/null; then 5516cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5517cdf0e10cSrcweirelse 5518cdf0e10cSrcweir AC_MSG_RESULT([no]) 5519cdf0e10cSrcweir GNUCP='' 5520cdf0e10cSrcweirfi 5521cdf0e10cSrcweir 5522cdf0e10cSrcweirif test -z "$GNUCP"; then 552362840caaSPedro Giffuni if test "$_os" = "SunOS"; then 5524cdf0e10cSrcweir AC_MSG_ERROR([no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it]) 5525cdf0e10cSrcweir else 5526cdf0e10cSrcweir AC_MSG_RESULT([no GNU cp from coreutils found - using the system's cp command]) 5527cdf0e10cSrcweir fi 5528cdf0e10cSrcweirfi 5529cdf0e10cSrcweir 5530cdf0e10cSrcweirAC_SUBST(GNUPATCH) 5531cdf0e10cSrcweirAC_SUBST(GNUCP) 5532cdf0e10cSrcweir 5533cdf0e10cSrcweirdnl *************************************** 5534cdf0e10cSrcweirdnl testing bash tools path on Windows 5535cdf0e10cSrcweirdnl *************************************** 5536cdf0e10cSrcweirif test "$_os" = "WINNT"; then 5537cdf0e10cSrcweir CYGWIN_PATH="" 5538cdf0e10cSrcweir AC_PATH_PROG(CYGWIN_PATH, bash) 5539cdf0e10cSrcweir CYGWIN_PATH=`dirname "$CYGWIN_PATH"` 5540cdf0e10cSrcweirfi 5541cdf0e10cSrcweirif test -z "$CYGWIN_PATH"; then 5542cdf0e10cSrcweir CYGWIN_PATH="NO_CYGWIN" 5543cdf0e10cSrcweirfi 5544cdf0e10cSrcweirAC_SUBST(CYGWIN_PATH) 5545cdf0e10cSrcweir 5546cdf0e10cSrcweirdnl *************************************** 5547cdf0e10cSrcweirdnl testing ml.exe assembler path 5548cdf0e10cSrcweirdnl *************************************** 5549cdf0e10cSrcweirif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 5550cdf0e10cSrcweir AC_MSG_CHECKING([ml.exe assembler path]) 5551cdf0e10cSrcweir if test -n "$with_asm_home"; then 5552cdf0e10cSrcweir with_asm_home=`cygpath -u "$with_asm_home"` 5553cdf0e10cSrcweir fi 5554cdf0e10cSrcweir if test ! -x "$with_asm_home/ml.exe"; then 5555cdf0e10cSrcweir AC_PATH_PROG(ML_EXE, ml.exe) 5556cdf0e10cSrcweir if test -z "$ML_EXE"; then 5557cdf0e10cSrcweir if test -x "$with_cl_home/bin/ml.exe"; then 5558cdf0e10cSrcweir with_asm_home=$with_cl_home/bin 5559cdf0e10cSrcweir AC_MSG_RESULT([found ($with_asm_home)]) 5560cdf0e10cSrcweir else 5561cdf0e10cSrcweir AC_MSG_ERROR([Configure did not find ml.exe assembler.]) 5562cdf0e10cSrcweir fi 5563cdf0e10cSrcweir else 5564cdf0e10cSrcweir with_asm_home="ASM_IN_PATH" 5565cdf0e10cSrcweir fi 5566cdf0e10cSrcweir fi 5567cdf0e10cSrcweir AC_MSG_RESULT([$ASM_HOME]) 5568cdf0e10cSrcweirelse 5569cdf0e10cSrcweir with_asm_home="NO_ASM_HOME" 5570cdf0e10cSrcweirfi 5571cdf0e10cSrcweirASM_HOME="$with_asm_home" 5572cdf0e10cSrcweirAC_SUBST(ASM_HOME) 5573cdf0e10cSrcweir 5574ad35682bStruckmandnl *************************************** 5575ad35682bStruckmandnl testing nasm.exe assembler path 5576ad35682bStruckmandnl *************************************** 5577ad35682bStruckmanif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes" -a "$SYSTEM_OPENSSL" = "NO"; then 5578ad35682bStruckman AC_MSG_CHECKING([nasm.exe assembler path]) 5579ad35682bStruckman if test -n "$with_nasm_home"; then 5580ad35682bStruckman with_nasm_home=`cygpath -u "$with_nasm_home"` 5581ad35682bStruckman fi 5582ad35682bStruckman if test ! -x "$with_nasm_home/nasm.exe"; then 5583ad35682bStruckman AC_PATH_PROG(NASM_EXE, nasm.exe) 5584ad35682bStruckman if test -z "$NASM_EXE"; then 5585ad35682bStruckman with_nasm_home="NO_NASM_HOME" 5586ad35682bStruckman else 5587ad35682bStruckman with_nasm_home="NASM_IN_PATH" 5588ad35682bStruckman fi 5589ad35682bStruckman fi 5590ad35682bStruckman AC_MSG_RESULT([$NASM_HOME]) 5591ad35682bStruckmanelse 5592ad35682bStruckman with_nasm_home="NO_NASM_HOME" 5593ad35682bStruckmanfi 5594ad35682bStruckmanNASM_HOME="$with_nasm_home" 5595ad35682bStruckmanAC_SUBST(NASM_HOME) 5596ad35682bStruckman 5597cdf0e10cSrcweirdnl =================================================================== 5598cdf0e10cSrcweirdnl testing handle deprecated unzip switch 5599cdf0e10cSrcweirdnl =================================================================== 5600cdf0e10cSrcweirif test -z "$with_zip_home"; then 5601cdf0e10cSrcweir with_zip_home="$with_unzip_home" 5602cdf0e10cSrcweirfi 5603cdf0e10cSrcweirdnl =================================================================== 5604cdf0e10cSrcweirdnl Zip will be found where you tell me to find it 5605cdf0e10cSrcweirdnl =================================================================== 5606cdf0e10cSrcweirif test -n "$with_zip_home" ; then 5607cdf0e10cSrcweir if test "$_os" = "WINNT"; then 5608cdf0e10cSrcweir with_zip_home=`cygpath -u "$with_zip_home"` 5609cdf0e10cSrcweir fi 5610cdf0e10cSrcweir ZIP="$with_zip_home/zip" 5611cdf0e10cSrcweir UNZIP="$with_zip_home/unzip" 5612cdf0e10cSrcweir ZIP_HOME="$with_zip_home" 5613cdf0e10cSrcweirelse 5614cdf0e10cSrcweir AC_PATH_PROG(ZIP, zip) 5615cdf0e10cSrcweir AC_PATH_PROG(UNZIP, unzip) 5616cdf0e10cSrcweir ZIP_HOME=`dirname "$ZIP"` 5617cdf0e10cSrcweirfi 5618cdf0e10cSrcweirdnl =================================================================== 5619cdf0e10cSrcweirdnl Zip must be available or else it is an error, all platforms 5620cdf0e10cSrcweirdnl =================================================================== 5621cdf0e10cSrcweirif test -z "$ZIP" -o -z "$UNZIP"; then 5622cdf0e10cSrcweir AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,) 5623cdf0e10cSrcweirfi 5624b63233d8Sdamjanif "$ZIP" -FS < /dev/null 2>&1 | $EGREP "no such option: S" > /dev/null; then 5625b63233d8Sdamjan AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,) 5626b63233d8Sdamjanfi 5627cdf0e10cSrcweir 5628cdf0e10cSrcweirdnl =================================================================== 5629cdf0e10cSrcweirdnl Zip must be a specific type for different build types. 5630cdf0e10cSrcweirdnl =================================================================== 5631cdf0e10cSrcweirif test "$_os" = "WINNT"; then 563228633775SPedro Giffuni if test -n "`$ZIP -h | $GREP -i WinNT`" ; then 5633cdf0e10cSrcweirAC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.]) 5634cdf0e10cSrcweir fi 5635cdf0e10cSrcweirfi 5636cdf0e10cSrcweirAC_SUBST(ZIP_HOME) 5637cdf0e10cSrcweir 5638cdf0e10cSrcweirdnl =================================================================== 5639cdf0e10cSrcweirdnl Windows builds need dbghelp.dll in external/dbghelp/ 5640cdf0e10cSrcweirdnl =================================================================== 5641cdf0e10cSrcweirif test "$_os" = "WINNT"; then 5642cdf0e10cSrcweir AC_MSG_CHECKING([for dbghelp.dll]) 5643cdf0e10cSrcweir if test -x ./external/dbghelp/dbghelp.dll; then 56447f413237SHerbert Dürr AC_MSG_RESULT([found and executable]) 5645cdf0e10cSrcweir else 5646cdf0e10cSrcweir AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/. 5647cdf0e10cSrcweirGet it from the Microsoft site and put it into external/dbghelp. 5648cdf0e10cSrcweir(Note: Microsoft seems to enjoy changing the exact location of this file. You 5649cdf0e10cSrcweirmay have to search Microsoft's website.) Last time it was seen at: 5650cdf0e10cSrcweir<http://www.microsoft.com/downloads/release.asp?releaseid=30682>.]) 5651cdf0e10cSrcweir fi 5652cdf0e10cSrcweirfi 5653cdf0e10cSrcweir 56543edd2c3eSJürgen Schmidtdnl =================================================================== 56553edd2c3eSJürgen Schmidtdnl Windows builds need vcredist_x*.exe in external/vcredist/ 56563edd2c3eSJürgen Schmidtdnl =================================================================== 56573edd2c3eSJürgen SchmidtWITH_VC_REDIST="" 56583edd2c3eSJürgen Schmidt 56593edd2c3eSJürgen Schmidtif test "$_os" = "WINNT"; then 56603edd2c3eSJürgen Schmidt AC_MSG_CHECKING([for vcredist_x86.exe]) 56613edd2c3eSJürgen Schmidt if test -x ./external/vcredist/vcredist_x86.exe; then 56623edd2c3eSJürgen Schmidt AC_MSG_RESULT([found and executable]) 56633edd2c3eSJürgen Schmidt else 56643edd2c3eSJürgen Schmidt AC_MSG_ERROR([ vcredist_x86.exe is missing in external/vcredist/. 56653edd2c3eSJürgen SchmidtGet it from the Microsoft site and put it into external/vcredist. You can try 56663edd2c3eSJürgen Schmidtto download it from http://www.microsoft.com/download/en/search.aspx?q=redistributable%20package.]) 56673edd2c3eSJürgen Schmidt fi 56683edd2c3eSJürgen Schmidt AC_MSG_CHECKING([for vcredist_x64.exe]) 56693edd2c3eSJürgen Schmidt if test -x ./external/vcredist/vcredist_x64.exe; then 56703edd2c3eSJürgen Schmidt AC_MSG_RESULT([found and executable]) 56713edd2c3eSJürgen Schmidt else 56723edd2c3eSJürgen Schmidt AC_MSG_ERROR([ vcredist_x64.exe is missing in external/vcredist/. 56733edd2c3eSJürgen SchmidtGet it from the Microsoft site and put it into external/vcredist. You can try 56743edd2c3eSJürgen Schmidtto download it from http://www.microsoft.com/download/en/search.aspx?q=redistributable%20package.]) 56753edd2c3eSJürgen Schmidt fi 56763edd2c3eSJürgen Schmidt WITH_VC_REDIST=YES 56773edd2c3eSJürgen Schmidt AC_SUBST(WITH_VC_REDIST) 56783edd2c3eSJürgen Schmidtfi 56793edd2c3eSJürgen Schmidt 5680cdf0e10cSrcweirdnl =================================================================== 5681cdf0e10cSrcweirdnl Windows builds - use oowintool to copy CRT dlls and manifest 5682cdf0e10cSrcweirdnl =================================================================== 5683cdf0e10cSrcweirif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 5684cdf0e10cSrcweir if ./oowintool --msvc-copy-dlls ./external/msvcp ; then 5685cdf0e10cSrcweir : 5686cdf0e10cSrcweir else 5687cdf0e10cSrcweir AC_MSG_ERROR([oowintool failed to copy CRT]) 5688cdf0e10cSrcweir fi 5689cdf0e10cSrcweirfi 5690cdf0e10cSrcweir 5691cdf0e10cSrcweirdnl =================================================================== 5692cdf0e10cSrcweirdnl Windows builds need gdiplus.dll in external/gdiplus/ 5693cdf0e10cSrcweirdnl =================================================================== 5694cdf0e10cSrcweirif test "$_os" = "WINNT"; then 5695cdf0e10cSrcweir AC_MSG_CHECKING([for gdiplus.dll]) 5696cdf0e10cSrcweir if test -x ./external/gdiplus/gdiplus.dll; then 56977f413237SHerbert Dürr AC_MSG_RESULT([found and executable]) 5698cdf0e10cSrcweir else 5699cdf0e10cSrcweir AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/. 5700cdf0e10cSrcweirGet it from the Microsoft site and put it into external/gdiplus. 5701cdf0e10cSrcweirYou may have to search Microsoft's website. Last time it was seen at: 5702cdf0e10cSrcweir<http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.]) 5703cdf0e10cSrcweir fi 5704cdf0e10cSrcweirfi 5705cdf0e10cSrcweir 570685e23226SAriel Constenla-Hailednl =================================================================== 570785e23226SAriel Constenla-Hailednl Windows builds need msvcr100.dll in external/msvcp100/ 570885e23226SAriel Constenla-Hailednl =================================================================== 570985e23226SAriel Constenla-Haileif test "$_os" = "WINNT"; then 571085e23226SAriel Constenla-Haile AC_MSG_CHECKING([for msvcr100.dll]) 571185e23226SAriel Constenla-Haile if test -x ./external/msvcp100/msvcr100.dll; then 571285e23226SAriel Constenla-Haile AC_MSG_RESULT([found and executable]) 571385e23226SAriel Constenla-Haile else 571485e23226SAriel Constenla-Haile AC_MSG_ERROR([msvcr100.dll is missing in external/msvcp100/. 571585e23226SAriel Constenla-HaileGet it from the Microsoft Visual C++ 2010 Redistributable Package (x86), 571685e23226SAriel Constenla-Hailefrom the Microsoft site and put it into external/msvcp100. 571785e23226SAriel Constenla-HaileYou may have to search Microsoft's website. Last time it was seen at: 571885e23226SAriel Constenla-Haile<http://www.microsoft.com/en-us/download/search.aspx?q=Microsoft+Visual+C%2b%2b+2010+Redistributable>.]) 571985e23226SAriel Constenla-Haile fi 572085e23226SAriel Constenla-Hailefi 572185e23226SAriel Constenla-Haile 5722cdf0e10cSrcweirdnl =================================================================== 5723cdf0e10cSrcweirdnl Test which vclplugs have to be built. 5724cdf0e10cSrcweirdnl =================================================================== 5725cdf0e10cSrcweirAC_MSG_CHECKING([which VCLplugs shall be built]) 5726cdf0e10cSrcweirENABLE_GTK="" 5727cdf0e10cSrcweirif test "x$enable_gtk" = "xyes"; then 5728cdf0e10cSrcweir ENABLE_GTK="TRUE" 5729cdf0e10cSrcweir R="gtk" 5730cdf0e10cSrcweirfi 5731cdf0e10cSrcweirAC_SUBST(ENABLE_GTK) 5732cdf0e10cSrcweir 5733cdf0e10cSrcweirENABLE_KDE="" 5734cdf0e10cSrcweirif test "x$enable_kde" = "xyes"; then 5735cdf0e10cSrcweir ENABLE_KDE="TRUE" 5736cdf0e10cSrcweir R="$R kde" 5737cdf0e10cSrcweirfi 5738cdf0e10cSrcweirAC_SUBST(ENABLE_KDE) 5739cdf0e10cSrcweir 5740cdf0e10cSrcweirENABLE_KDE4="" 5741cdf0e10cSrcweirif test "x$enable_kde4" = "xyes"; then 5742cdf0e10cSrcweir ENABLE_KDE4="TRUE" 5743cdf0e10cSrcweir R="$R kde4" 5744cdf0e10cSrcweirfi 5745cdf0e10cSrcweirAC_SUBST(ENABLE_KDE4) 5746cdf0e10cSrcweir 5747cdf0e10cSrcweirif test -z "$R"; then 5748cdf0e10cSrcweir AC_MSG_RESULT([none]) 5749cdf0e10cSrcweirelse 5750cdf0e10cSrcweir AC_MSG_RESULT([$R]) 5751cdf0e10cSrcweirfi 5752cdf0e10cSrcweir 5753cdf0e10cSrcweirdnl =================================================================== 5754cdf0e10cSrcweirdnl GCONF check 5755cdf0e10cSrcweirdnl =================================================================== 5756cdf0e10cSrcweir 5757cdf0e10cSrcweirENABLE_GCONF="" 5758cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable GConf support]) 5759cdf0e10cSrcweirif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then 5760cdf0e10cSrcweir ENABLE_GCONF="TRUE" 5761cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5762cdf0e10cSrcweir PKG_CHECK_MODULES( GCONF, gconf-2.0 ) 5763cdf0e10cSrcweirelse 5764cdf0e10cSrcweir AC_MSG_RESULT([no]) 5765cdf0e10cSrcweirfi 5766cdf0e10cSrcweirAC_SUBST(ENABLE_GCONF) 5767cdf0e10cSrcweir 5768cdf0e10cSrcweirdnl =================================================================== 5769cdf0e10cSrcweirdnl Gnome VFS check 5770cdf0e10cSrcweirdnl =================================================================== 5771cdf0e10cSrcweir 5772cdf0e10cSrcweirENABLE_GNOMEVFS="" 5773cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable GNOME VFS support]) 5774cdf0e10cSrcweirif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then 5775cdf0e10cSrcweir ENABLE_GNOMEVFS="TRUE" 5776cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5777cdf0e10cSrcweir PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 ) 5778cdf0e10cSrcweir if test "$ENABLE_GCONF" != "TRUE"; then 5779cdf0e10cSrcweir PKG_CHECK_MODULES( GCONF, gconf-2.0 ) 5780cdf0e10cSrcweir fi 5781cdf0e10cSrcweirelse 5782cdf0e10cSrcweir AC_MSG_RESULT([no]) 5783cdf0e10cSrcweirfi 5784cdf0e10cSrcweirAC_SUBST(ENABLE_GNOMEVFS) 5785cdf0e10cSrcweir 5786cdf0e10cSrcweirdnl =================================================================== 5787cdf0e10cSrcweirdnl Check whether the gtk 2.0 libraries are available. 5788cdf0e10cSrcweirdnl =================================================================== 5789cdf0e10cSrcweir 5790cdf0e10cSrcweirGTK_CFLAGS="" 5791cdf0e10cSrcweirGTK_LIBS="" 5792cdf0e10cSrcweirENABLE_SYSTRAY_GTK="" 5793cdf0e10cSrcweirENABLE_DBUS="" 5794cdf0e10cSrcweirif test "$test_gtk" = "yes"; then 5795cdf0e10cSrcweir 5796cdf0e10cSrcweir if test "$ENABLE_GTK" = "TRUE" ; then 5797cdf0e10cSrcweir 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])) 5798cdf0e10cSrcweir 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])) 5799cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE GTK" 5800cdf0e10cSrcweir 5801cdf0e10cSrcweir if test "x$enable_systray" = "xyes"; then 5802595ead2bSAriel Constenla-Haile PKG_CHECK_MODULES(GTK_2_10,gtk+-2.0 >= 2.10.0, 58032ad018beSPedro Giffuni [ENABLE_SYSTRAY_GTK="TRUE" 58042ad018beSPedro Giffuni BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"], 58052ad018beSPedro Giffuni [ENABLE_SYSTRAY_GTK=""]) 5806cdf0e10cSrcweir fi 5807cdf0e10cSrcweir 5808cdf0e10cSrcweir AC_MSG_CHECKING([whether to enable DBUS support]) 5809cdf0e10cSrcweir if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then 5810cdf0e10cSrcweir ENABLE_DBUS="TRUE" 5811cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5812cdf0e10cSrcweir PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 ) 5813cdf0e10cSrcweir else 5814cdf0e10cSrcweir AC_MSG_RESULT([no]) 5815cdf0e10cSrcweir fi 5816cdf0e10cSrcweir 5817cdf0e10cSrcweir AC_MSG_CHECKING([whether to enable GIO support]) 5818cdf0e10cSrcweir if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then 5819cdf0e10cSrcweir if test "$ENABLE_GNOMEVFS" = "TRUE" ; then 5820cdf0e10cSrcweir AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.]) 5821cdf0e10cSrcweir fi 5822cdf0e10cSrcweir ENABLE_GIO="TRUE" 5823cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5824cdf0e10cSrcweir PKG_CHECK_MODULES( GIO, gio-2.0 ) 5825cdf0e10cSrcweir else 5826cdf0e10cSrcweir AC_MSG_RESULT([no]) 5827cdf0e10cSrcweir fi 5828cdf0e10cSrcweir 5829cdf0e10cSrcweir fi 5830cdf0e10cSrcweir 5831cdf0e10cSrcweirfi 5832cdf0e10cSrcweirAC_SUBST(ENABLE_GIO) 5833cdf0e10cSrcweirAC_SUBST(ENABLE_DBUS) 5834cdf0e10cSrcweirAC_SUBST(ENABLE_SYSTRAY_GTK) 5835cdf0e10cSrcweirAC_SUBST(GTK_CFLAGS) 5836cdf0e10cSrcweirAC_SUBST(GTK_LIBS) 5837cdf0e10cSrcweirAC_SUBST(GTHREAD_CFLAGS) 5838cdf0e10cSrcweirAC_SUBST(GTHREAD_LIBS) 5839cdf0e10cSrcweir 5840cdf0e10cSrcweirdnl =================================================================== 5841cdf0e10cSrcweirdnl Check whether the GStreamer libraries are available. 5842cdf0e10cSrcweirdnl =================================================================== 5843cdf0e10cSrcweir 5844cdf0e10cSrcweirGSTREAMER_CFLAGS="" 5845cdf0e10cSrcweirGSTREAMER_LIBS="" 5846cdf0e10cSrcweirENABLE_GSTREAMER="" 5847cdf0e10cSrcweir 5848cdf0e10cSrcweirif test "$test_gstreamer" = "yes"; then 5849cdf0e10cSrcweir AC_MSG_CHECKING([whether to build the GStreamer media backend]) 5850cdf0e10cSrcweir if test "x$enable_gstreamer" != "xno" ; then 5851b6e71573SDamjan Jovanovic 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])) 5852cdf0e10cSrcweir ENABLE_GSTREAMER="TRUE" 5853cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5854cdf0e10cSrcweir else 5855cdf0e10cSrcweir AC_MSG_RESULT([no]) 5856cdf0e10cSrcweir fi 5857cdf0e10cSrcweirfi 5858cdf0e10cSrcweirAC_SUBST(ENABLE_GSTREAMER) 5859cdf0e10cSrcweirAC_SUBST(GSTREAMER_CFLAGS) 5860cdf0e10cSrcweirAC_SUBST(GSTREAMER_LIBS) 5861cdf0e10cSrcweir 58621309f2c9SPedro Giffunidnl =================================================================== 58631309f2c9SPedro Giffunidnl Check the ARM target 58641309f2c9SPedro Giffunidnl =================================================================== 58651309f2c9SPedro Giffuni 5866a5232f55Spfgif echo "$build_cpu" | $GREP -q arm; then 58671309f2c9SPedro Giffuni # default value 58681309f2c9SPedro Giffuni ARM_TARGET=ARMV4T 58691309f2c9SPedro Giffuni AC_MSG_CHECKING([which ARM processor optimization to use]) 58701309f2c9SPedro Giffuni if test "$with_arm_target" -lt "6"; then 58711309f2c9SPedro Giffuni ARM_TARGET=ARMV4T 58721309f2c9SPedro Giffuni elif test "$with_arm_target" = "6"; then 58731309f2c9SPedro Giffuni ARM_TARGET=ARMV6 58741309f2c9SPedro Giffuni elif test "$with_arm_target" -gt "6"; then 58751309f2c9SPedro Giffuni ARM_TARGET=ARMV7 58761309f2c9SPedro Giffuni fi 58771309f2c9SPedro Giffuni AC_MSG_RESULT([$ARM_TARGET]) 58781309f2c9SPedro Giffuni AC_SUBST(ARM_TARGET) 58791309f2c9SPedro Giffunifi 5880cdf0e10cSrcweir 5881cdf0e10cSrcweirdnl =================================================================== 5882cdf0e10cSrcweirdnl Check whether the Cairo libraries are available. 5883cdf0e10cSrcweirdnl =================================================================== 5884cdf0e10cSrcweir 5885cdf0e10cSrcweirENABLE_CAIRO="" 5886cdf0e10cSrcweirBUILD_PIXMAN="" 5887cdf0e10cSrcweirSYSTEM_CAIRO="" 5888cdf0e10cSrcweir 5889cdf0e10cSrcweirif test "$test_cairo" = "yes"; then 5890cdf0e10cSrcweir 5891cdf0e10cSrcweir AC_MSG_CHECKING([whether to use cairo]) 5892cdf0e10cSrcweir if test "x$enable_cairo" != "xno" ; then 5893cdf0e10cSrcweir ENABLE_CAIRO="TRUE" 5894cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5895cdf0e10cSrcweir AC_MSG_CHECKING([which cairo to use]) 5896cdf0e10cSrcweir if test -n "$with_system_cairo" -o -n "$with_system_libs" && \ 5897cdf0e10cSrcweir test "$with_system_cairo" != "no"; then 5898cdf0e10cSrcweir AC_MSG_RESULT([external]) 5899cdf0e10cSrcweir SYSTEM_CAIRO=YES 5900cdf0e10cSrcweir 5901cdf0e10cSrcweir PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 ) 5902cdf0e10cSrcweir if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then 5903cdf0e10cSrcweir AC_MSG_ERROR([Cairo library requires fontconfig.]) 5904cdf0e10cSrcweir fi 5905cdf0e10cSrcweir if test "$with_system_xrender_headers" = "yes"; then 5906cdf0e10cSrcweir AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8]) 5907cdf0e10cSrcweir AC_TRY_RUN([ 5908cdf0e10cSrcweir#include <X11/extensions/Xrender.h> 5909cdf0e10cSrcweir 5910cdf0e10cSrcweirint main(int argc, char **argv) { 5911cdf0e10cSrcweir#ifdef PictStandardA8 5912cdf0e10cSrcweir return 0; 5913cdf0e10cSrcweir#else 5914cdf0e10cSrcweir return 1; 5915cdf0e10cSrcweir#endif 5916cdf0e10cSrcweir} 5917cdf0e10cSrcweir ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])]) 5918cdf0e10cSrcweir fi 5919cdf0e10cSrcweir else 5920cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE CAIRO" 5921cdf0e10cSrcweir dnl === compiler fails on pixman with 64bit architectures...=== 5922cdf0e10cSrcweir if test "$build_cpu" != "x86_64"; then 5923cdf0e10cSrcweir BUILD_PIXMAN=YES 5924cdf0e10cSrcweir fi 5925cdf0e10cSrcweir AC_MSG_RESULT([internal]) 5926cdf0e10cSrcweir fi 5927cdf0e10cSrcweir else 5928cdf0e10cSrcweir AC_MSG_RESULT([no]) 5929cdf0e10cSrcweir fi 5930cdf0e10cSrcweirfi 5931cdf0e10cSrcweir 5932cdf0e10cSrcweirAC_SUBST(ENABLE_CAIRO) 5933cdf0e10cSrcweirAC_SUBST(BUILD_PIXMAN) 5934cdf0e10cSrcweirAC_SUBST(SYSTEM_CAIRO) 5935cdf0e10cSrcweirAC_SUBST(CAIRO_CFLAGS) 5936cdf0e10cSrcweirAC_SUBST(CAIRO_LIBS) 5937cdf0e10cSrcweir 593846dacce6SMichael StahlENABLE_CAIRO_CANVAS="FALSE" 593946dacce6SMichael Stahlif test "$enable_cairo_canvas" = "yes" -a "$ENABLE_CAIRO" = "TRUE" ; then 594046dacce6SMichael Stahl ENABLE_CAIRO_CANVAS="TRUE" 594146dacce6SMichael Stahlfi 594246dacce6SMichael StahlAC_SUBST(ENABLE_CAIRO_CANVAS) 594346dacce6SMichael Stahl 5944cdf0e10cSrcweirdnl =================================================================== 5945cdf0e10cSrcweirdnl Check whether the OpenGL libraries are available 5946cdf0e10cSrcweirdnl =================================================================== 5947cdf0e10cSrcweir 5948cdf0e10cSrcweirAC_MSG_CHECKING([whether to build the OpenGL Transitions component]) 5949cdf0e10cSrcweirENABLE_OPENGL= 5950cdf0e10cSrcweir 5951cdf0e10cSrcweirif test "x$enable_opengl" != "xno" ; then 5952cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5953cdf0e10cSrcweir AC_CHECK_HEADER(GL/gl.h, [], 5954cdf0e10cSrcweir [AC_MSG_ERROR([OpenGL headers not found])], []) 5955cdf0e10cSrcweir AC_CHECK_LIB(GL, main, [], 5956cdf0e10cSrcweir [AC_MSG_ERROR(libGL not installed or functional)], []) 5957cdf0e10cSrcweir AC_CHECK_LIB(GLU, main, [], 5958cdf0e10cSrcweir [AC_MSG_ERROR(libGLU not installed or functional)], []) 5959cdf0e10cSrcweir ENABLE_OPENGL=TRUE 5960cdf0e10cSrcweirelse 5961cdf0e10cSrcweir AC_MSG_RESULT([no]) 5962cdf0e10cSrcweirfi 5963cdf0e10cSrcweir 5964cdf0e10cSrcweirAC_SUBST(ENABLE_OPENGL) 5965cdf0e10cSrcweir 5966cdf0e10cSrcweir 5967cdf0e10cSrcweirAC_MSG_CHECKING([whether to build the PDF Import extension]) 5968cdf0e10cSrcweirif test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then 5969cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5970cdf0e10cSrcweir ENABLE_PDFIMPORT=YES 5971cdf0e10cSrcweir 5972cdf0e10cSrcweir dnl =================================================================== 5973cdf0e10cSrcweir dnl Check for system poppler 5974cdf0e10cSrcweir dnl =================================================================== 59757afab28fSJürgen Schmidt AC_MSG_CHECKING([whether to use system pdf backend]) 5976cdf0e10cSrcweir if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ 5977cdf0e10cSrcweir test "$with_system_poppler" != "no"; then 5978cdf0e10cSrcweir AC_MSG_RESULT([external]) 5979cdf0e10cSrcweir SYSTEM_POPPLER=YES 5980cdf0e10cSrcweir PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 ) 5981cdf0e10cSrcweir else 59827afab28fSJürgen Schmidt AC_MSG_RESULT([no]) 5983cdf0e10cSrcweir SYSTEM_POPPLER=NO 59847afab28fSJürgen Schmidt ENABLE_PDFIMPORT=NO 5985cdf0e10cSrcweir fi 5986cdf0e10cSrcweirelse 5987cdf0e10cSrcweir AC_MSG_RESULT([no]) 5988cdf0e10cSrcweir ENABLE_PDFIMPORT=NO 5989cdf0e10cSrcweirfi 5990cdf0e10cSrcweirAC_SUBST(ENABLE_PDFIMPORT) 5991cdf0e10cSrcweirAC_SUBST(SYSTEM_POPPLER) 5992cdf0e10cSrcweirAC_SUBST(POPPLER_CFLAGS) 5993cdf0e10cSrcweirAC_SUBST(POPPLER_LIBS) 5994cdf0e10cSrcweir 5995cdf0e10cSrcweirAC_MSG_CHECKING([whether to build the Wiki Publisher extension]) 5996cdf0e10cSrcweirif test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then 5997cdf0e10cSrcweir AC_MSG_RESULT([yes]) 5998cdf0e10cSrcweir AC_MSG_CHECKING([for swext module]) 5999cdf0e10cSrcweir if test -d ./swext; then 6000cdf0e10cSrcweir AC_MSG_RESULT([OK]) 6001cdf0e10cSrcweir else 6002cdf0e10cSrcweir AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 6003cdf0e10cSrcweir fi 6004cdf0e10cSrcweir ENABLE_MEDIAWIKI=YES 6005cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE SWEXT" 6006cdf0e10cSrcweirelse 6007cdf0e10cSrcweir AC_MSG_RESULT([no]) 6008cdf0e10cSrcweir ENABLE_MEDIAWIKI=NO 6009cdf0e10cSrcweirfi 6010cdf0e10cSrcweirAC_SUBST(ENABLE_MEDIAWIKI) 6011cdf0e10cSrcweir 6012cdf0e10cSrcweirif test "$ENABLE_MEDIAWIKI" = "YES"; then 6013cdf0e10cSrcweir AC_MSG_CHECKING([which Servlet API Jar to use]) 6014cdf0e10cSrcweir if test -n "$with_system_servlet_api"; then 6015cdf0e10cSrcweir AC_MSG_RESULT([external]) 6016cdf0e10cSrcweir SYSTEM_SERVLETAPI=YES 6017cdf0e10cSrcweir if test -z "$SERVLETAPI_JAR"; then 6018cdf0e10cSrcweir SERVLETAPI_JAR=/usr/share/java/servlet-api.jar 6019cdf0e10cSrcweir fi 6020cdf0e10cSrcweir AC_CHECK_FILE($SERVLETAPI_JAR, [], 6021cdf0e10cSrcweir [AC_MSG_ERROR(servlet-api.jar not found.)], []) 6022cdf0e10cSrcweir else 6023cdf0e10cSrcweir AC_MSG_RESULT([internal]) 6024cdf0e10cSrcweir SYSTEM_SERVLETAPI=NO 6025cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE TOMCAT" 6026cdf0e10cSrcweir fi 6027cdf0e10cSrcweirfi 6028cdf0e10cSrcweirAC_SUBST(SYSTEM_SERVLETAPI) 6029cdf0e10cSrcweirAC_SUBST(SERVLETAPI_JAR) 6030cdf0e10cSrcweir 6031cdf0e10cSrcweirAC_MSG_CHECKING([whether to build the Report Builder extension]) 6032cdf0e10cSrcweirif test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then 6033cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6034cdf0e10cSrcweir ENABLE_REPORTBUILDER=YES 603557f49b00SOliver-Rainer Wittmann SYSTEM_JFREEREPORT=YES 6036cdf0e10cSrcweir AC_MSG_CHECKING([for reportbuilder module]) 6037cdf0e10cSrcweir if test -d ./reportbuilder; then 6038cdf0e10cSrcweir AC_MSG_RESULT([OK]) 6039cdf0e10cSrcweir else 6040cdf0e10cSrcweir AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 6041cdf0e10cSrcweir fi 604224fe865aSOliver-Rainer Wittmann AC_MSG_CHECKING([which jfreereport libs to use (for Report Builder extension)]) 604324fe865aSOliver-Rainer Wittmann AC_MSG_RESULT([external]) 604424fe865aSOliver-Rainer Wittmann if test -z $SAC_JAR; then 604524fe865aSOliver-Rainer Wittmann SAC_JAR=/usr/share/java/sac.jar 604624fe865aSOliver-Rainer Wittmann fi 604724fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($SAC_JAR, [], 604824fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(sac.jar not found.)], []) 604924fe865aSOliver-Rainer Wittmann 605024fe865aSOliver-Rainer Wittmann if test -z $LIBXML_JAR; then 605124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar, 605224fe865aSOliver-Rainer Wittmann [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ], 605324fe865aSOliver-Rainer Wittmann [ 605424fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libxml.jar, 605524fe865aSOliver-Rainer Wittmann [ LIBXML_JAR=/usr/share/java/libxml.jar ], 605624fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libxml.jar replacement not found.)] 6057cdf0e10cSrcweir ) 605824fe865aSOliver-Rainer Wittmann ] 605924fe865aSOliver-Rainer Wittmann ) 606024fe865aSOliver-Rainer Wittmann else 606124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($LIBXML_JAR, [], 606224fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libxml.jar not found.)], []) 606324fe865aSOliver-Rainer Wittmann fi 6064cdf0e10cSrcweir 606524fe865aSOliver-Rainer Wittmann if test -z $FLUTE_JAR; then 606624fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar, 606724fe865aSOliver-Rainer Wittmann [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ], 606824fe865aSOliver-Rainer Wittmann [ 606924fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/flute.jar, 607024fe865aSOliver-Rainer Wittmann [ FLUTE_JAR=/usr/share/java/flute.jar ], 607124fe865aSOliver-Rainer Wittmann [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)] 6072cdf0e10cSrcweir ) 607324fe865aSOliver-Rainer Wittmann ] 607424fe865aSOliver-Rainer Wittmann ) 607524fe865aSOliver-Rainer Wittmann else 607624fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($FLUTE_JAR, [], 607724fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(flute-1.3.0.jar not found.)], []) 607824fe865aSOliver-Rainer Wittmann fi 6079cdf0e10cSrcweir 608024fe865aSOliver-Rainer Wittmann if test -z $JFREEREPORT_JAR; then 608124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar, 608224fe865aSOliver-Rainer Wittmann [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ], 608324fe865aSOliver-Rainer Wittmann [ 608424fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/flow-engine.jar, 608524fe865aSOliver-Rainer Wittmann [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ], 608624fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(jfreereport.jar replacement not found.)] 6087cdf0e10cSrcweir ) 608824fe865aSOliver-Rainer Wittmann ] 608924fe865aSOliver-Rainer Wittmann ) 609024fe865aSOliver-Rainer Wittmann else 609124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($JFREEREPORT_JAR, [], 609224fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(jfreereport.jar not found.)], []) 609324fe865aSOliver-Rainer Wittmann fi 6094cdf0e10cSrcweir 609524fe865aSOliver-Rainer Wittmann if test -z $LIBLAYOUT_JAR; then 609624fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar, 609724fe865aSOliver-Rainer Wittmann [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ], 609824fe865aSOliver-Rainer Wittmann [ 609924fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/liblayout.jar, 610024fe865aSOliver-Rainer Wittmann [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ], 610124fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(liblayout.jar replacement not found.)] 6102cdf0e10cSrcweir ) 610324fe865aSOliver-Rainer Wittmann ] 610424fe865aSOliver-Rainer Wittmann ) 610524fe865aSOliver-Rainer Wittmann else 610624fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($LIBLAYOUT_JAR, [], 610724fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(liblayout.jar not found.)], []) 610824fe865aSOliver-Rainer Wittmann fi 6109cdf0e10cSrcweir 611024fe865aSOliver-Rainer Wittmann if test -z $LIBLOADER_JAR; then 611124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar, 611224fe865aSOliver-Rainer Wittmann [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ], 611324fe865aSOliver-Rainer Wittmann [ 611424fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libloader.jar, 611524fe865aSOliver-Rainer Wittmann [ LIBLOADER_JAR=/usr/share/java/libloader.jar ], 611624fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libloader.jar replacement not found.)] 6117cdf0e10cSrcweir ) 611824fe865aSOliver-Rainer Wittmann ] 611924fe865aSOliver-Rainer Wittmann ) 612024fe865aSOliver-Rainer Wittmann else 612124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($LIBLOADER_JAR, [], 612224fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libloader.jar not found.)], []) 612324fe865aSOliver-Rainer Wittmann fi 6124cdf0e10cSrcweir 612524fe865aSOliver-Rainer Wittmann if test -z $LIBFORMULA_JAR; then 612624fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar, 612724fe865aSOliver-Rainer Wittmann [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ], 612824fe865aSOliver-Rainer Wittmann [ 612924fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libformula.jar, 613024fe865aSOliver-Rainer Wittmann [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ], 613124fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libformula.jar replacement not found.)] 6132cdf0e10cSrcweir ) 613324fe865aSOliver-Rainer Wittmann ] 613424fe865aSOliver-Rainer Wittmann ) 613524fe865aSOliver-Rainer Wittmann else 613624fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($LIBFORMULA_JAR, [], 613724fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libformula.jar not found.)], []) 613824fe865aSOliver-Rainer Wittmann fi 6139cdf0e10cSrcweir 614024fe865aSOliver-Rainer Wittmann if test -z $LIBREPOSITORY_JAR; then 614124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar, 614224fe865aSOliver-Rainer Wittmann [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ], 614324fe865aSOliver-Rainer Wittmann [ 614424fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/librepository.jar, 614524fe865aSOliver-Rainer Wittmann [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ], 614624fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(librepository.jar replacement not found.)] 6147cdf0e10cSrcweir ) 614824fe865aSOliver-Rainer Wittmann ] 614924fe865aSOliver-Rainer Wittmann ) 615024fe865aSOliver-Rainer Wittmann else 615124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($LIBREPOSITORY_JAR, [], 615224fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(librepository.jar not found.)], []) 615324fe865aSOliver-Rainer Wittmann fi 6154cdf0e10cSrcweir 615524fe865aSOliver-Rainer Wittmann if test -z $LIBFONTS_JAR; then 615624fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar, 615724fe865aSOliver-Rainer Wittmann [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ], 615824fe865aSOliver-Rainer Wittmann [ 615924fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libfonts.jar, 616024fe865aSOliver-Rainer Wittmann [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ], 616124fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libfonts.jar replacement not found.)] 6162cdf0e10cSrcweir ) 616324fe865aSOliver-Rainer Wittmann ] 616424fe865aSOliver-Rainer Wittmann ) 616524fe865aSOliver-Rainer Wittmann else 616624fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($LIBFONTS_JAR, [], 616724fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libfonts.jar not found.)], []) 616824fe865aSOliver-Rainer Wittmann fi 6169cdf0e10cSrcweir 617024fe865aSOliver-Rainer Wittmann if test -z $LIBSERIALIZER_JAR; then 617124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar, 617224fe865aSOliver-Rainer Wittmann [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ], 617324fe865aSOliver-Rainer Wittmann [ 617424fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libserializer.jar, 617524fe865aSOliver-Rainer Wittmann [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ], 617624fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libserializer.jar replacement not found.)] 6177cdf0e10cSrcweir ) 617824fe865aSOliver-Rainer Wittmann ] 617924fe865aSOliver-Rainer Wittmann ) 618024fe865aSOliver-Rainer Wittmann else 618124fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($LIBSERIALIZER_JAR, [], 618224fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libserializer.jar not found.)], []) 618324fe865aSOliver-Rainer Wittmann fi 6184cdf0e10cSrcweir 6185cdf0e10cSrcweir 618624fe865aSOliver-Rainer Wittmann if test -z $LIBBASE_JAR; then 618724fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar, 618824fe865aSOliver-Rainer Wittmann [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ], 618924fe865aSOliver-Rainer Wittmann [ 619024fe865aSOliver-Rainer Wittmann AC_CHECK_FILE(/usr/share/java/libbase.jar, 619124fe865aSOliver-Rainer Wittmann [ LIBBASE_JAR=/usr/share/java/libbase.jar ], 619224fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libbase.jar replacement not found.)] 6193cdf0e10cSrcweir ) 619424fe865aSOliver-Rainer Wittmann ] 619524fe865aSOliver-Rainer Wittmann ) 6196cdf0e10cSrcweir else 619724fe865aSOliver-Rainer Wittmann AC_CHECK_FILE($LIBBASE_JAR, [], 619824fe865aSOliver-Rainer Wittmann [AC_MSG_ERROR(libbase.jar not found.)], []) 6199cdf0e10cSrcweir fi 6200cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" 6201cdf0e10cSrcweirelse 6202cdf0e10cSrcweir AC_MSG_RESULT([no]) 6203cdf0e10cSrcweir ENABLE_REPORTBUILDER=NO 6204cdf0e10cSrcweirfi 6205cdf0e10cSrcweirAC_SUBST(ENABLE_REPORTBUILDER) 620657f49b00SOliver-Rainer WittmannAC_SUBST(SYSTEM_JFREEREPORT) 6207cdf0e10cSrcweirAC_SUBST(SAC_JAR) 6208cdf0e10cSrcweirAC_SUBST(LIBXML_JAR) 6209cdf0e10cSrcweirAC_SUBST(FLUTE_JAR) 6210cdf0e10cSrcweirAC_SUBST(JFREEREPORT_JAR) 6211cdf0e10cSrcweirAC_SUBST(LIBBASE_JAR) 6212cdf0e10cSrcweirAC_SUBST(LIBLAYOUT_JAR) 6213cdf0e10cSrcweirAC_SUBST(LIBLOADER_JAR) 6214cdf0e10cSrcweirAC_SUBST(LIBFORMULA_JAR) 6215cdf0e10cSrcweirAC_SUBST(LIBREPOSITORY_JAR) 6216cdf0e10cSrcweirAC_SUBST(LIBFONTS_JAR) 6217cdf0e10cSrcweirAC_SUBST(LIBSERIALIZER_JAR) 6218cdf0e10cSrcweir 6219cdf0e10cSrcweir# this has to be here because both the wiki publisher and the SRB use 62203c5114b8SDamjan Jovanovic# commons-logging, while the non-optional PostgreSQL connector uses 62213c5114b8SDamjan Jovanovic# commons-lang. 62223c5114b8SDamjan JovanovicAC_MSG_CHECKING([which Apache commons-* libs to use]) 62233c5114b8SDamjan Jovanovicif test "$with_system_apache_commons" = "yes"; then 62243c5114b8SDamjan Jovanovic SYSTEM_APACHE_COMMONS=YES 62253c5114b8SDamjan Jovanovic AC_MSG_RESULT([external]) 6226cdf0e10cSrcweir 62273c5114b8SDamjan Jovanovic if test -z $COMMONS_LANG_JAR; then 62283c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-lang3-3.3.jar, 62293c5114b8SDamjan Jovanovic [ COMMONS_LANG_JAR=/usr/share/java/commons-lang3-3.3.jar ], 62303c5114b8SDamjan Jovanovic [ 62313c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-lang.jar, 62323c5114b8SDamjan Jovanovic [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ], 62333c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-lang.jar replacement not found.)] 6234cdf0e10cSrcweir ) 62353c5114b8SDamjan Jovanovic ] 62363c5114b8SDamjan Jovanovic ) 62373c5114b8SDamjan Jovanovic else 62383c5114b8SDamjan Jovanovic AC_CHECK_FILE($COMMONS_LANG_JAR, [], 62393c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-lang.jar not found.)], []) 62403c5114b8SDamjan Jovanovic fi 62413c5114b8SDamjan Jovanovic AC_MSG_CHECKING([whether commons-lang is version 3.x]) 62423c5114b8SDamjan Jovanovic export COMMONS_LANG_JAR 62433c5114b8SDamjan Jovanovic if $PERL -e 'use Archive::Zip; 62443c5114b8SDamjan Jovanovic my $file = "$ENV{'COMMONS_LANG_JAR'}"; 62453c5114b8SDamjan Jovanovic my $zip = Archive::Zip->new( $file ); 62463c5114b8SDamjan Jovanovic my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 62473c5114b8SDamjan Jovanovic if ( $mf =~ m/Specification-Version: 3.*/ ) { 62483c5114b8SDamjan Jovanovic exit 0; 62493c5114b8SDamjan Jovanovic } else { 62503c5114b8SDamjan Jovanovic exit 1; 62513c5114b8SDamjan Jovanovic }'; then 62523c5114b8SDamjan Jovanovic AC_MSG_RESULT([yes]) 62533c5114b8SDamjan Jovanovic else 62543c5114b8SDamjan Jovanovic AC_MSG_ERROR([no, you need Apache Commons Lang 3.x]) 62553c5114b8SDamjan Jovanovic fi 6256cdf0e10cSrcweir 62573c5114b8SDamjan Jovanovic if test "$ENABLE_MEDIAWIKI" = "YES"; then 62583c5114b8SDamjan Jovanovic if test -z $COMMONS_CODEC_JAR; then 62593c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-codec-1.9.jar, 62603c5114b8SDamjan Jovanovic [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.9.jar ], 62613c5114b8SDamjan Jovanovic [ 62623c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-codec.jar, 62633c5114b8SDamjan Jovanovic [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ], 62643c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-codec.jar replacement not found.)] 62653c5114b8SDamjan Jovanovic ) 62663c5114b8SDamjan Jovanovic ] 62673c5114b8SDamjan Jovanovic ) 62683c5114b8SDamjan Jovanovic else 62693c5114b8SDamjan Jovanovic AC_CHECK_FILE($COMMONS_CODEC_JAR, [], 62703c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-codec.jar not found.)], []) 6271cdf0e10cSrcweir fi 62723c5114b8SDamjan Jovanovic 62733c5114b8SDamjan Jovanovic if test -z $COMMONS_HTTPCLIENT_JAR; then 62743c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar, 62753c5114b8SDamjan Jovanovic [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ], 62763c5114b8SDamjan Jovanovic [ 62773c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar, 62783c5114b8SDamjan Jovanovic [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ], 62793c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)] 62803c5114b8SDamjan Jovanovic ) 62813c5114b8SDamjan Jovanovic ] 62823c5114b8SDamjan Jovanovic ) 62833c5114b8SDamjan Jovanovic else 62843c5114b8SDamjan Jovanovic AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [], 62853c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-httpclient.jar not found.)], []) 6286cdf0e10cSrcweir fi 6287cdf0e10cSrcweir fi 62883c5114b8SDamjan Jovanovic if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then 62893c5114b8SDamjan Jovanovic if test -z $COMMONS_LOGGING_JAR; then 62903c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.3.jar, 62913c5114b8SDamjan Jovanovic [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.3.jar ], 62923c5114b8SDamjan Jovanovic [ 62933c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-logging.jar, 62943c5114b8SDamjan Jovanovic [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ], 62953c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-logging.jar replacement not found.)] 62963c5114b8SDamjan Jovanovic ) 62973c5114b8SDamjan Jovanovic ] 62983c5114b8SDamjan Jovanovic ) 62993c5114b8SDamjan Jovanovic else 63003c5114b8SDamjan Jovanovic AC_CHECK_FILE($COMMONS_LOGGING_JAR, [], 63013c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-logging.jar not found.)], []) 63023c5114b8SDamjan Jovanovic fi 63033c5114b8SDamjan Jovanovic fi 63043c5114b8SDamjan Jovanovicelse 63053c5114b8SDamjan Jovanovic AC_MSG_RESULT([internal]) 63063c5114b8SDamjan Jovanovic SYSTEM_APACHE_COMMONS=NO 63073c5114b8SDamjan Jovanovic BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" 6308cdf0e10cSrcweirfi 6309cdf0e10cSrcweirAC_SUBST(SYSTEM_APACHE_COMMONS) 6310cdf0e10cSrcweirAC_SUBST(COMMONS_CODEC_JAR) 6311cdf0e10cSrcweirAC_SUBST(COMMONS_LANG_JAR) 6312cdf0e10cSrcweirAC_SUBST(COMMONS_HTTPCLIENT_JAR) 6313cdf0e10cSrcweirAC_SUBST(COMMONS_LOGGING_JAR) 6314cdf0e10cSrcweir 6315cdf0e10cSrcweirdnl =================================================================== 6316cdf0e10cSrcweirdnl Check whether the Qt and KDE libraries are available. 6317cdf0e10cSrcweirdnl =================================================================== 6318cdf0e10cSrcweir 6319cdf0e10cSrcweirKDE_CFLAGS="" 6320cdf0e10cSrcweirKDE_LIBS="" 6321cdf0e10cSrcweirMOC="moc" 6322cdf0e10cSrcweirif test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then 6323cdf0e10cSrcweir dnl Search paths for Qt and KDE 6324cdf0e10cSrcweir if test "$build_cpu" != "x86_64" ; then 6325cdf0e10cSrcweir 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" 6326cdf0e10cSrcweir 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" 6327cdf0e10cSrcweir else 6328cdf0e10cSrcweir 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" 6329cdf0e10cSrcweir 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" 6330cdf0e10cSrcweir fi 6331cdf0e10cSrcweir if test -n "$QTDIR" ; then 6332cdf0e10cSrcweir qt_incdirs="$QTDIR/include $qt_incdirs" 6333cdf0e10cSrcweir if test "$build_cpu" != "x86_64" ; then 6334cdf0e10cSrcweir qt_libdirs="$QTDIR/lib $qt_libdirs" 6335cdf0e10cSrcweir else 6336cdf0e10cSrcweir qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs" 6337cdf0e10cSrcweir fi 6338cdf0e10cSrcweir fi 6339cdf0e10cSrcweir if test "$build_cpu" != "x86_64" ; then 6340cdf0e10cSrcweir 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" 6341cdf0e10cSrcweir 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" 6342cdf0e10cSrcweir else 6343cdf0e10cSrcweir 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" 6344cdf0e10cSrcweir 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" 6345cdf0e10cSrcweir fi 6346cdf0e10cSrcweir if test -n "$KDEDIR" ; then 6347cdf0e10cSrcweir kde_incdirs="$KDEDIR/include $kde_incdirs" 6348cdf0e10cSrcweir if test "$build_cpu" != "x86_64" ; then 6349cdf0e10cSrcweir kde_libdirs="$KDEDIR/lib $kde_libdirs" 6350cdf0e10cSrcweir else 6351cdf0e10cSrcweir kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs" 6352cdf0e10cSrcweir fi 6353cdf0e10cSrcweir fi 6354cdf0e10cSrcweir 6355cdf0e10cSrcweir dnl What to test 6356cdf0e10cSrcweir qt_test_include="qstyle.h" 6357cdf0e10cSrcweir qt_test_library="libqt-mt.so" 6358cdf0e10cSrcweir kde_test_include="ksharedptr.h" 6359cdf0e10cSrcweir kde_test_library="libkdeui.so" 6360cdf0e10cSrcweir 6361cdf0e10cSrcweir dnl Check for Qt headers 6362cdf0e10cSrcweir AC_MSG_CHECKING([for Qt headers]) 6363cdf0e10cSrcweir qt_incdir="no" 6364cdf0e10cSrcweir for kde_check in $qt_incdirs ; do 6365cdf0e10cSrcweir if test -r "$kde_check/$qt_test_include" ; then 6366cdf0e10cSrcweir qt_incdir="$kde_check" 6367cdf0e10cSrcweir break 6368cdf0e10cSrcweir fi 6369cdf0e10cSrcweir done 6370cdf0e10cSrcweir AC_MSG_RESULT([$qt_incdir]) 6371cdf0e10cSrcweir if test "x$qt_incdir" = "xno" ; then 6372cdf0e10cSrcweir AC_MSG_ERROR([Qt headers not found. Please specify the root of 6373cdf0e10cSrcweiryour Qt installation by exporting QTDIR before running "configure".]) 6374cdf0e10cSrcweir fi 6375cdf0e10cSrcweir 6376cdf0e10cSrcweir dnl Check for Qt libraries 6377cdf0e10cSrcweir AC_MSG_CHECKING([for Qt libraries]) 6378cdf0e10cSrcweir qt_libdir="no" 6379cdf0e10cSrcweir for qt_check in $qt_libdirs ; do 6380cdf0e10cSrcweir if test -r "$qt_check/$qt_test_library" ; then 6381cdf0e10cSrcweir qt_libdir="$qt_check" 6382cdf0e10cSrcweir break 6383cdf0e10cSrcweir fi 6384cdf0e10cSrcweir done 6385cdf0e10cSrcweir AC_MSG_RESULT([$qt_libdir]) 6386cdf0e10cSrcweir if test "x$qt_libdir" = "xno" ; then 6387cdf0e10cSrcweir AC_MSG_ERROR([Qt libraries not found. Please specify the root of 6388cdf0e10cSrcweiryour Qt installation by exporting QTDIR before running "configure".]) 6389cdf0e10cSrcweir fi 6390cdf0e10cSrcweir 6391cdf0e10cSrcweir dnl Check for Meta Object Compiler 6392cdf0e10cSrcweir AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] ) 6393cdf0e10cSrcweir if test "$MOC" = "no" ; then 6394cdf0e10cSrcweir AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify 6395cdf0e10cSrcweirthe root of your Qt installation by exporting QTDIR before running "configure".]) 6396cdf0e10cSrcweir fi 6397cdf0e10cSrcweir 6398cdf0e10cSrcweir dnl Check for KDE headers 6399cdf0e10cSrcweir AC_MSG_CHECKING([for KDE headers]) 6400cdf0e10cSrcweir kde_incdir="no" 6401cdf0e10cSrcweir for kde_check in $kde_incdirs ; do 6402cdf0e10cSrcweir if test -r "$kde_check/$kde_test_include" ; then 6403cdf0e10cSrcweir kde_incdir="$kde_check" 6404cdf0e10cSrcweir break 6405cdf0e10cSrcweir fi 6406cdf0e10cSrcweir done 6407cdf0e10cSrcweir AC_MSG_RESULT([$kde_incdir]) 6408cdf0e10cSrcweir if test "x$kde_incdir" = "xno" ; then 6409cdf0e10cSrcweir AC_MSG_ERROR([KDE headers not found. Please specify the root of 6410cdf0e10cSrcweiryour KDE installation by exporting KDEDIR before running "configure".]) 6411cdf0e10cSrcweir fi 6412cdf0e10cSrcweir 6413cdf0e10cSrcweir dnl Check for KDE libraries 6414cdf0e10cSrcweir AC_MSG_CHECKING([for KDE libraries]) 6415cdf0e10cSrcweir kde_libdir="no" 6416cdf0e10cSrcweir for kde_check in $kde_libdirs ; do 6417cdf0e10cSrcweir if test -r "$kde_check/$kde_test_library" ; then 6418cdf0e10cSrcweir kde_libdir="$kde_check" 6419cdf0e10cSrcweir break 6420cdf0e10cSrcweir fi 6421cdf0e10cSrcweir done 6422cdf0e10cSrcweir AC_MSG_RESULT([$kde_libdir]) 6423cdf0e10cSrcweir if test "x$kde_libdir" = "xno" ; then 6424cdf0e10cSrcweir AC_MSG_ERROR([KDE libraries not found. Please specify the root of 6425cdf0e10cSrcweiryour KDE installation by exporting KDEDIR before running "configure".]) 6426cdf0e10cSrcweir fi 6427cdf0e10cSrcweir 6428cdf0e10cSrcweir dnl Set the variables 6429cdf0e10cSrcweir KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" 6430cdf0e10cSrcweir KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt" 6431cdf0e10cSrcweirfi 6432cdf0e10cSrcweirAC_SUBST(KDE_CFLAGS) 6433cdf0e10cSrcweirAC_SUBST(KDE_LIBS) 6434cdf0e10cSrcweirAC_SUBST(MOC) 6435cdf0e10cSrcweir 6436cdf0e10cSrcweirdnl =================================================================== 6437cdf0e10cSrcweirdnl KDE4 Integration 6438cdf0e10cSrcweirdnl =================================================================== 6439cdf0e10cSrcweir 6440cdf0e10cSrcweirKDE4_CFLAGS="" 6441cdf0e10cSrcweirKDE4_LIBS="" 6442cdf0e10cSrcweirMOC4="moc" 6443cdf0e10cSrcweirif test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then 6444cdf0e10cSrcweir qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes" 6445cdf0e10cSrcweir qt_libdirs="$QT4LIB /usr/lib $x_libraries" 6446cdf0e10cSrcweir 6447c1d0fc05SHerbert Dürr kde_incdirs="/usr/include /usr/include/kde4 $x_includes" 6448c1d0fc05SHerbert Dürr kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries" 6449cdf0e10cSrcweir 6450cdf0e10cSrcweir if test "$build_cpu" = "x86_64" ; then 6451cdf0e10cSrcweir qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64" 6452c1d0fc05SHerbert Dürr kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel" 6453cdf0e10cSrcweir fi 6454cdf0e10cSrcweir 6455cdf0e10cSrcweir if test -n "$KDE4DIR" ; then 6456cdf0e10cSrcweir kde_incdirs="$KDE4DIR/include $kde_incdirs" 6457cdf0e10cSrcweir if test "$build_cpu" != "x86_64" ; then 6458cdf0e10cSrcweir kde_libdirs="$KDE4DIR/lib $kde_libdirs" 6459cdf0e10cSrcweir else 6460cdf0e10cSrcweir kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs" 6461cdf0e10cSrcweir fi 6462cdf0e10cSrcweir fi 6463cdf0e10cSrcweir 6464cdf0e10cSrcweir qt_test_include="Qt/qobject.h" 6465cdf0e10cSrcweir qt_test_library="libQtCore.so" 6466cdf0e10cSrcweir kde_test_include="ksharedptr.h" 6467cdf0e10cSrcweir kde_test_library="libkdeui.so" 6468cdf0e10cSrcweir 6469cdf0e10cSrcweir AC_MSG_CHECKING([for Qt4 headers]) 6470cdf0e10cSrcweir qt_header_dir="no" 6471cdf0e10cSrcweir for inc_dir in $qt_incdirs ; do 6472cdf0e10cSrcweir if test -r "$inc_dir/$qt_test_include" ; then 6473cdf0e10cSrcweir qt_header_dir="$inc_dir" 6474cdf0e10cSrcweir break 6475cdf0e10cSrcweir fi 6476cdf0e10cSrcweir done 6477cdf0e10cSrcweir 6478cdf0e10cSrcweir AC_MSG_RESULT([$qt_header_dir]) 6479cdf0e10cSrcweir if test "x$qt_header_dir" = "xno" ; then 6480cdf0e10cSrcweir AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) 6481cdf0e10cSrcweir fi 6482cdf0e10cSrcweir 6483cdf0e10cSrcweir AC_MSG_CHECKING([for Qt4 libraries]) 6484cdf0e10cSrcweir qt_lib_dir="no" 6485cdf0e10cSrcweir for lib_dir in $qt_libdirs ; do 6486cdf0e10cSrcweir if test -r "$lib_dir/$qt_test_library" ; then 6487cdf0e10cSrcweir qt_lib_dir="$lib_dir" 6488cdf0e10cSrcweir break 6489cdf0e10cSrcweir fi 6490cdf0e10cSrcweir done 6491cdf0e10cSrcweir 6492cdf0e10cSrcweir AC_MSG_RESULT([$qt_lib_dir]) 6493cdf0e10cSrcweir 6494cdf0e10cSrcweir if test "x$qt_lib_dir" = "xno" ; then 6495cdf0e10cSrcweir AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) 6496cdf0e10cSrcweir fi 6497cdf0e10cSrcweir 6498cdf0e10cSrcweir dnl Check for Meta Object Compiler 6499c1d0fc05SHerbert Dürr AC_PATH_PROG( MOCQT4, moc-qt4, no, [$QT4DIR/bin:$PATH] ) 6500c1d0fc05SHerbert Dürr MOC4="$MOCQT4" 6501cdf0e10cSrcweir if test "$MOC4" = "no" ; then 6502c1d0fc05SHerbert Dürr AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] ) 6503c1d0fc05SHerbert Dürr if test "$MOC4" = "no" ; then 6504c1d0fc05SHerbert Dürr AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT4DIR before running "configure".]) 6505c1d0fc05SHerbert Dürr fi 6506cdf0e10cSrcweir fi 6507cdf0e10cSrcweir 6508cdf0e10cSrcweir dnl Check for KDE4 headers 6509cdf0e10cSrcweir AC_MSG_CHECKING([for KDE4 headers]) 6510cdf0e10cSrcweir kde_incdir="no" 6511cdf0e10cSrcweir for kde_check in $kde_incdirs ; do 6512cdf0e10cSrcweir if test -r "$kde_check/$kde_test_include" ; then 6513cdf0e10cSrcweir kde_incdir="$kde_check" 6514cdf0e10cSrcweir break 6515cdf0e10cSrcweir fi 6516cdf0e10cSrcweir done 6517cdf0e10cSrcweir AC_MSG_RESULT([$kde_incdir]) 6518cdf0e10cSrcweir if test "x$kde_incdir" = "xno" ; then 6519cdf0e10cSrcweir AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) 6520cdf0e10cSrcweir fi 6521cdf0e10cSrcweir 6522cdf0e10cSrcweir dnl Check for KDE4 libraries 6523cdf0e10cSrcweir AC_MSG_CHECKING([for KDE4 libraries]) 6524cdf0e10cSrcweir kde_libdir="no" 6525cdf0e10cSrcweir for kde_check in $kde_libdirs ; do 6526cdf0e10cSrcweir if test -r "$kde_check/$kde_test_library" ; then 6527cdf0e10cSrcweir kde_libdir="$kde_check" 6528cdf0e10cSrcweir break 6529cdf0e10cSrcweir fi 6530cdf0e10cSrcweir done 6531cdf0e10cSrcweir 6532cdf0e10cSrcweir AC_MSG_RESULT([$kde_libdir]) 6533cdf0e10cSrcweir if test "x$kde_libdir" = "xno" ; then 6534cdf0e10cSrcweir AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) 6535cdf0e10cSrcweir fi 6536cdf0e10cSrcweir 6537cdf0e10cSrcweir KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" 6538cdf0e10cSrcweir KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui" 6539cdf0e10cSrcweirfi 6540cdf0e10cSrcweirAC_SUBST(KDE4_CFLAGS) 6541cdf0e10cSrcweirAC_SUBST(KDE4_LIBS) 6542cdf0e10cSrcweirAC_SUBST(MOC4) 6543cdf0e10cSrcweir 6544cdf0e10cSrcweirdnl =================================================================== 6545cdf0e10cSrcweirdnl Test for the enabling the lockdown pieces 6546cdf0e10cSrcweirdnl =================================================================== 6547cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable the lockdown pieces]) 6548cdf0e10cSrcweirENABLE_LOCKDOWN="" 6549cdf0e10cSrcweirif test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then 6550cdf0e10cSrcweir ENABLE_LOCKDOWN=YES 6551cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6552cdf0e10cSrcweirelse 6553cdf0e10cSrcweir AC_MSG_RESULT([no]) 6554cdf0e10cSrcweirfi 6555cdf0e10cSrcweirAC_SUBST(ENABLE_LOCKDOWN) 6556cdf0e10cSrcweir 6557cdf0e10cSrcweirdnl =================================================================== 6558cdf0e10cSrcweirdnl Test whether to include Evolution 2 support 6559cdf0e10cSrcweirdnl =================================================================== 6560cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable evolution 2 support]) 6561cdf0e10cSrcweirif test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then 6562cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6563cdf0e10cSrcweir PKG_CHECK_MODULES(GOBJECT, gobject-2.0) 6564cdf0e10cSrcweir ENABLE_EVOAB2="TRUE" 6565cdf0e10cSrcweirelse 6566cdf0e10cSrcweir ENABLE_EVOAB2="" 6567cdf0e10cSrcweir AC_MSG_RESULT([no]) 6568cdf0e10cSrcweirfi 6569cdf0e10cSrcweirAC_SUBST(ENABLE_EVOAB2) 6570cdf0e10cSrcweirAC_SUBST(GOBJECT_CFLAGS) 6571cdf0e10cSrcweirAC_SUBST(GOBJECT_LIBS) 6572cdf0e10cSrcweir 6573cdf0e10cSrcweirdnl =================================================================== 6574cdf0e10cSrcweirdnl Test whether to include MathMLDTD 6575cdf0e10cSrcweirdnl =================================================================== 6576cdf0e10cSrcweirAC_MSG_CHECKING([whether to include MathMLDTD]) 6577cdf0e10cSrcweirif test -n "$enable_mathmldtd"; then 6578cdf0e10cSrcweir if test "$enable_mathmldtd" = "no"; then 6579cdf0e10cSrcweir AC_MSG_RESULT([no]) 6580cdf0e10cSrcweir SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" 6581cdf0e10cSrcweir else 6582cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6583cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE MATHMLDTD" 6584cdf0e10cSrcweir fi 6585cdf0e10cSrcweirelse 6586cdf0e10cSrcweir AC_MSG_RESULT([no]) 6587cdf0e10cSrcweir SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" 6588cdf0e10cSrcweirfi 6589cdf0e10cSrcweir 6590cdf0e10cSrcweirdnl =================================================================== 65913c6578e9SAndre Fischerdnl Test whether to include category-B fonts 6592cdf0e10cSrcweirdnl =================================================================== 65933c6578e9SAndre FischerWITH_CATB_FONTS= 65943c6578e9SAndre FischerAC_MSG_CHECKING([whether to include category B fonts]) 659509a06707SAndre Fischerif test "x$enable_category_b_fonts" = "xyes" && test "x$with_fonts" != "xno"; then 65963c6578e9SAndre Fischer AC_MSG_RESULT([yes]) 65973c6578e9SAndre Fischer BUILD_TYPE="$BUILD_TYPE CATB_FONTS" 65983c6578e9SAndre Fischer WITH_CATB_FONTS=YES 65993c6578e9SAndre Fischer SCPDEFS="$SCPDEFS -DWITH_CATB_FONTS" 66003c6578e9SAndre Fischerelse 66013c6578e9SAndre Fischer AC_MSG_RESULT([no]) 66023c6578e9SAndre Fischer WITH_CATB_FONTS=NO 66033c6578e9SAndre Fischerfi 66043c6578e9SAndre Fischer 66053c6578e9SAndre Fischerdnl =================================================================== 66063c6578e9SAndre Fischerdnl Test whether to include category-A fonts 66073c6578e9SAndre Fischerdnl =================================================================== 66083c6578e9SAndre FischerWITH_CATA_FONTS= 66093c6578e9SAndre FischerAC_MSG_CHECKING([whether to include category A fonts]) 66103c6578e9SAndre Fischerif test "x$with_fonts" != "xno" ; then 6611cdf0e10cSrcweir AC_MSG_RESULT([yes]) 66123c6578e9SAndre Fischer WITH_CATA_FONTS=YES 66133c6578e9SAndre Fischer SCPDEFS="$SCPDEFS -DWITH_CATA_FONTS" 66143c6578e9SAndre Fischerelse 66153c6578e9SAndre Fischer AC_MSG_RESULT([no]) 66163c6578e9SAndre Fischer WITH_CATA_FONTS=NO 66173c6578e9SAndre Fischer WITH_CATB_FONTS=NO 66183c6578e9SAndre Fischerfi 66193c6578e9SAndre Fischer 66203c6578e9SAndre FischerWITH_FONTS=NO 66213c6578e9SAndre FischerAC_MSG_CHECKING([whether any fonts are included]) 66223c6578e9SAndre Fischerif test "x$WITH_CATA_FONTS" = "xYES" -o "x$WITH_CATB_FONTS" = "xYES"; then 6623cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE MORE_FONTS" 66243c6578e9SAndre Fischer WITH_FONTS=YES 66253c6578e9SAndre Fischer AC_MSG_RESULT([yes]) 6626cdf0e10cSrcweirelse 6627cdf0e10cSrcweir AC_MSG_RESULT([no]) 6628cdf0e10cSrcweirfi 66293c6578e9SAndre Fischer 66303c6578e9SAndre FischerAC_SUBST(WITH_CATA_FONTS) 66313c6578e9SAndre FischerAC_SUBST(WITH_CATB_FONTS) 6632cdf0e10cSrcweirAC_SUBST(WITH_FONTS) 6633cdf0e10cSrcweir 6634cdf0e10cSrcweirdnl =================================================================== 6635cdf0e10cSrcweirdnl Test whether to include ppds 6636cdf0e10cSrcweirdnl =================================================================== 6637cdf0e10cSrcweirAC_MSG_CHECKING([whether to include PPDs]) 6638cdf0e10cSrcweirif test "$with_ppds" != "no"; then 6639cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6640cdf0e10cSrcweirelse 6641cdf0e10cSrcweir AC_MSG_RESULT([no]) 6642cdf0e10cSrcweir WITHOUT_PPDS=YES 6643cdf0e10cSrcweir SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" 6644cdf0e10cSrcweirfi 6645cdf0e10cSrcweirAC_SUBST(WITHOUT_PPDS) 6646cdf0e10cSrcweir 6647cdf0e10cSrcweirdnl =================================================================== 6648cdf0e10cSrcweirdnl Test whether to include afms 6649cdf0e10cSrcweirdnl =================================================================== 6650cdf0e10cSrcweirAC_MSG_CHECKING([whether to include AFMs]) 6651cdf0e10cSrcweirif test "$with_afms" != "no"; then 6652cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6653cdf0e10cSrcweir BUILD_TYPE="$BUILD_TYPE AFMS" 6654cdf0e10cSrcweirelse 6655cdf0e10cSrcweir AC_MSG_RESULT([no]) 6656cdf0e10cSrcweir WITHOUT_AFMS=YES 6657cdf0e10cSrcweir SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" 6658cdf0e10cSrcweirfi 6659cdf0e10cSrcweirAC_SUBST(WITHOUT_AFMS) 6660cdf0e10cSrcweir 6661cdf0e10cSrcweirAC_SUBST(SCPDEFS) 6662cdf0e10cSrcweir 6663cdf0e10cSrcweirAC_MSG_CHECKING([whether and how to use Xinerama]) 6664cdf0e10cSrcweirif test "$_os" = "Darwin"; then 6665cdf0e10cSrcweir USE_XINERAMA=YES 6666cdf0e10cSrcweir XINERAMA_LINK=dynamic 6667cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6668cdf0e10cSrcweirelif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then 6669cdf0e10cSrcweir if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then 6670cdf0e10cSrcweir # we have both versions, let the user decide but use the dynamic one 6671cdf0e10cSrcweir # per default 6672cdf0e10cSrcweir USE_XINERAMA=YES 6673cdf0e10cSrcweir if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then 6674cdf0e10cSrcweir XINERAMA_LINK=dynamic 6675cdf0e10cSrcweir else 6676cdf0e10cSrcweir XINERAMA_LINK=static 6677cdf0e10cSrcweir fi 6678cdf0e10cSrcweir elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then 6679cdf0e10cSrcweir # we have only the dynamic version 6680cdf0e10cSrcweir USE_XINERAMA=YES 6681cdf0e10cSrcweir XINERAMA_LINK=dynamic 6682cdf0e10cSrcweir elif test -e "$XLIB/libXinerama.a"; then 6683cdf0e10cSrcweir # static version 668428633775SPedro Giffuni if echo $build_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then 6685cdf0e10cSrcweir USE_XINERAMA=YES 6686cdf0e10cSrcweir XINERAMA_LINK=static 6687cdf0e10cSrcweir else 6688cdf0e10cSrcweir USE_XINERAMA=NO 6689cdf0e10cSrcweir XINERAMA_LINK=none 6690cdf0e10cSrcweir fi 6691cdf0e10cSrcweir else 6692cdf0e10cSrcweir # no Xinerama 6693cdf0e10cSrcweir USE_XINERAMA=NO 6694cdf0e10cSrcweir XINERAMA_LINK=none 6695cdf0e10cSrcweir fi 6696cdf0e10cSrcweir if test "$USE_XINERAMA" = "YES"; then 6697cdf0e10cSrcweir AC_MSG_RESULT([yes, with $XINERAMA_LINK linking]) 6698cdf0e10cSrcweir AC_CHECK_HEADER(X11/extensions/Xinerama.h, [], 6699cdf0e10cSrcweir [AC_MSG_ERROR(Xinerama header not found.)], []) 6700cdf0e10cSrcweir XINERAMA_EXTRA_LIBS="-L$XLIB -lXext" 6701cdf0e10cSrcweir if test "$_os" = "FreeBSD"; then 6702cdf0e10cSrcweir XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt" 6703cdf0e10cSrcweir fi 6704cdf0e10cSrcweir if test "$_os" = "Linux"; then 6705cdf0e10cSrcweir XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" 6706cdf0e10cSrcweir fi 6707cdf0e10cSrcweir AC_CHECK_LIB(Xinerama, XineramaIsActive, [], 6708cdf0e10cSrcweir [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS]) 6709cdf0e10cSrcweir else 6710cdf0e10cSrcweir AC_MSG_RESULT([no, libXinerama not found or wrong architecture.]) 6711cdf0e10cSrcweir fi 6712cdf0e10cSrcweirelse 6713cdf0e10cSrcweir AC_MSG_RESULT([no]) 6714cdf0e10cSrcweirfi 6715cdf0e10cSrcweirAC_SUBST(USE_XINERAMA) 6716cdf0e10cSrcweirAC_SUBST(XINERAMA_LINK) 6717cdf0e10cSrcweir 6718cdf0e10cSrcweirdnl =================================================================== 6719498ce991SArmin Le Granddnl always rely on the system version of gdk-pixbuf 6720cdf0e10cSrcweirdnl =================================================================== 6721cdf0e10cSrcweir 6722498ce991SArmin Le GrandSYSTEM_GDKPIXBUF=YES 6723cdf0e10cSrcweirAC_SUBST(SYSTEM_GDKPIXBUF) 6724cdf0e10cSrcweir 6725cdf0e10cSrcweirdnl =================================================================== 6726498ce991SArmin Le Granddnl always rely on the system version of glib 6727cdf0e10cSrcweirdnl =================================================================== 6728cdf0e10cSrcweir 6729498ce991SArmin Le GrandSYSTEM_GLIB=YES 6730cdf0e10cSrcweirAC_SUBST(SYSTEM_GLIB) 6731cdf0e10cSrcweir 6732cdf0e10cSrcweirdnl =================================================================== 6733498ce991SArmin Le Granddnl always rely on the system version of gettext 6734cdf0e10cSrcweirdnl =================================================================== 6735cdf0e10cSrcweir 6736498ce991SArmin Le GrandSYSTEM_GETTEXT=YES 6737cdf0e10cSrcweirAC_SUBST(SYSTEM_GETTEXT) 6738cdf0e10cSrcweir 6739c25219e0SPedro Giffuniif test "$_os" = "FreeBSD"; then 6740c25219e0SPedro Giffuni LIBINTL_PREFIX= 6741c25219e0SPedro Giffuni for dir in $CPPFLAGS; do 6742c25219e0SPedro Giffuni if dir=`expr -- $dir : '-I\(.*\)'`; then 6743c25219e0SPedro Giffuni if test -f "$dir/libintl.h" ; then 6744c25219e0SPedro Giffuni LIBINTL_PREFIX=`dirname $dir` 6745c25219e0SPedro Giffuni fi 6746c25219e0SPedro Giffuni fi 6747c25219e0SPedro Giffuni done 6748c25219e0SPedro Giffuni AC_SUBST(LIBINTL_PREFIX) 6749c25219e0SPedro Giffunifi 6750c25219e0SPedro Giffuni 6751cdf0e10cSrcweirdnl =================================================================== 6752498ce991SArmin Le Granddnl always rely on the system version of pango 6753cdf0e10cSrcweirdnl =================================================================== 6754cdf0e10cSrcweir 6755498ce991SArmin Le GrandSYSTEM_PANGO=YES 6756cdf0e10cSrcweirAC_SUBST(SYSTEM_PANGO) 6757cdf0e10cSrcweir 6758cdf0e10cSrcweirdnl =================================================================== 6759cdf0e10cSrcweirdnl Test whether to build libpng or rely on the system version 6760cdf0e10cSrcweirdnl =================================================================== 6761cdf0e10cSrcweirAC_MSG_CHECKING([whether to build own version of libpng]) 6762cdf0e10cSrcweir 6763cdf0e10cSrcweircase "$_os" in 6764cdf0e10cSrcweir WINNT*) # Windows 6765cdf0e10cSrcweir SYSTEM_LIBPNG=NO 6766cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6767cdf0e10cSrcweir ;; 6768cdf0e10cSrcweir Darwin*) 6769cdf0e10cSrcweir SYSTEM_LIBPNG=NO 6770cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6771cdf0e10cSrcweir ;; 6772cdf0e10cSrcweir *) 6773cdf0e10cSrcweir SYSTEM_LIBPNG=YES 6774cdf0e10cSrcweir AC_MSG_RESULT([no]) 6775cdf0e10cSrcweir ;; 6776cdf0e10cSrcweiresac 6777cdf0e10cSrcweirAC_SUBST(SYSTEM_LIBPNG) 6778cdf0e10cSrcweir 6779cdf0e10cSrcweirdnl =================================================================== 6780cdf0e10cSrcweirdnl Test whether to build libjpeg or rely on the system version 6781cdf0e10cSrcweirdnl =================================================================== 6782cdf0e10cSrcweirdnl FIXME: this is currently because we have jpeg-6b for our filters 6783cdf0e10cSrcweirdnl and jpeg-8 as dependency for librsvg 6784cdf0e10cSrcweirdnl this should be unified into using only one version for both 6785cdf0e10cSrcweir 6786cdf0e10cSrcweirAC_MSG_CHECKING([whether to build own version of libjpeg]) 6787cdf0e10cSrcweir 6788e4fb754eSPedro Giffuniif test "$SYSTEM_JPEG" = "YES"; then 6789cdf0e10cSrcweirSYSTEM_LIBJPEG=YES 6790cdf0e10cSrcweirelse 6791cdf0e10cSrcweircase "$_os" in 6792cdf0e10cSrcweir WINNT*) # Windows 6793cdf0e10cSrcweir SYSTEM_LIBJPEG=NO 6794cdf0e10cSrcweir ;; 6795cdf0e10cSrcweir Darwin*) 6796cdf0e10cSrcweir SYSTEM_LIBJPEG=NO 6797cdf0e10cSrcweir ;; 6798cdf0e10cSrcweir *) 67999ef65f0eSAndre Fischer SYSTEM_LIBJPEG=YES 68009ef65f0eSAndre Fischer ;; 6801cdf0e10cSrcweiresac 6802cdf0e10cSrcweirfi 6803cdf0e10cSrcweir 6804e4fb754eSPedro Giffuniif test "$SYSTEM_LIBJPEG" = "YES"; then 6805cdf0e10cSrcweir AC_MSG_RESULT([no]) 6806cdf0e10cSrcweirelse 6807cdf0e10cSrcweir AC_MSG_RESULT([yes]) 6808cdf0e10cSrcweirfi 6809cdf0e10cSrcweirAC_SUBST(SYSTEM_LIBJPEG) 6810cdf0e10cSrcweir 68113d781bd6SAndre Fischerdnl =================================================================== 68123d781bd6SAndre Fischerdnl Test whether rat scan was requested and whether apache-rat is available 68133d781bd6SAndre Fischerdnl =================================================================== 68143d781bd6SAndre FischerRAT_JAR= 68153d781bd6SAndre FischerAC_MSG_CHECKING([whether to trigger rat scan]) 681657d1faa0SMaho NAKATAif test -z "$with_rat_scan" -o "$with_rat_scan" = "no"; then 6817b23cf23bSAriel Constenla-Haile AC_MSG_RESULT([no]) 6818b23cf23bSAriel Constenla-Haileelse 681957d1faa0SMaho NAKATA if test "$WITH_JAVA" = "no"; then 68203d781bd6SAndre Fischer AC_MSG_ERROR([no, java disabled, enable with --with-java]) 682157d1faa0SMaho NAKATA elif test "$enable_saxon" = "no"; then 68223d781bd6SAndre Fischer AC_MSG_ERROR([no, saxon disabled, enable with --enable-category-b]) 682357d1faa0SMaho NAKATA elif test "$with_rat_scan" = "yes"; then 68243d781bd6SAndre Fischer AC_MSG_RESULT([yes, use pre-built library]) 68253d781bd6SAndre Fischer RAT_JAR_HOME="BUILD" 68263d781bd6SAndre Fischer BUILD_TYPE="$BUILD_TYPE RAT" 68273d781bd6SAndre Fischer else 68283d781bd6SAndre Fischer AC_MSG_RESULT([yes, use pre-installed library]) 68293d781bd6SAndre Fischer AC_MSG_CHECKING([whether apache-rat is available]) 68303d781bd6SAndre Fischer if test -d "$with_rat_scan"; then 68313d781bd6SAndre Fischer RAT_JAR_HOME=$with_rat_scan 68323d781bd6SAndre Fischer else 68333d781bd6SAndre Fischer AC_MSG_ERROR([$with_rat_scan is not a directory]) 68343d781bd6SAndre Fischer fi 68353d781bd6SAndre Fischer fi 68363d781bd6SAndre Fischerfi 68373d781bd6SAndre FischerAC_SUBST(RAT_JAR_HOME) 68383d781bd6SAndre Fischer 6839cdf0e10cSrcweir 6840cdf0e10cSrcweirdnl =================================================================== 6841cdf0e10cSrcweirdnl Test for the presence of Ant and that it works 6842cdf0e10cSrcweirdnl =================================================================== 6843cdf0e10cSrcweir 6844cdf0e10cSrcweirif test "$SOLAR_JAVA" != ""; then 6845cdf0e10cSrcweirANT_HOME=; export ANT_HOME 6846cdf0e10cSrcweirWITH_ANT_HOME=; export WITH_ANT_HOME 6847cdf0e10cSrcweirif test -z "$with_ant_home"; then 684861f8b8e8SAndrew Rist if test "$_os" = "OS2"; then 684986bbd642SYuri Dario AC_PATH_PROGS(ANT, ant.cmd) 685061f8b8e8SAndrew Rist else 685161f8b8e8SAndrew Rist AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd]) 685261f8b8e8SAndrew Rist fi 6853cdf0e10cSrcweirelse 6854cdf0e10cSrcweir if test "$_os" = "WINNT"; then 6855cdf0e10cSrcweir with_ant_home=`cygpath -u "$with_ant_home"` 6856cdf0e10cSrcweir fi 685761f8b8e8SAndrew Rist if test "$_os" = "OS2"; then 685886bbd642SYuri Dario AC_PATH_PROGS(ANT, ant.cmd,,$with_ant_home/bin:$PATH) 685961f8b8e8SAndrew Rist else 686061f8b8e8SAndrew Rist AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH) 686161f8b8e8SAndrew Rist fi 6862cdf0e10cSrcweir WITH_ANT_HOME=$with_ant_home 6863cdf0e10cSrcweir ANT_HOME=$with_ant_home 6864cdf0e10cSrcweirfi 6865cdf0e10cSrcweir 6866cdf0e10cSrcweirif test -z "$ANT"; then 6867cdf0e10cSrcweir AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home]) 6868cdf0e10cSrcweirelse 6869cdf0e10cSrcweir # resolve relative or absolute symlink 6870cdf0e10cSrcweir while test -h "$ANT"; do 6871cdf0e10cSrcweir a_cwd=`pwd` 6872cdf0e10cSrcweir a_basename=`basename "$ANT"` 6873cdf0e10cSrcweir a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"` 6874cdf0e10cSrcweir cd "`dirname "$ANT"`" 6875cdf0e10cSrcweir cd "`dirname "$a_script"`" 6876cdf0e10cSrcweir ANT="`pwd`"/"`basename "$a_script"`" 6877cdf0e10cSrcweir cd "$a_cwd" 6878cdf0e10cSrcweir done 6879cdf0e10cSrcweir 6880cdf0e10cSrcweir if test "$_os" = "OS2"; then 6881cdf0e10cSrcweir ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` 6882cdf0e10cSrcweir export ANT_HOME 6883cdf0e10cSrcweir fi 6884cdf0e10cSrcweir 6885cdf0e10cSrcweir AC_MSG_CHECKING([if $ANT works]) 6886cdf0e10cSrcweircat > conftest.java << EOF 6887cdf0e10cSrcweir public class conftest { 6888cdf0e10cSrcweir int testmethod(int a, int b) { 6889cdf0e10cSrcweir return a + b; 6890cdf0e10cSrcweir } 6891cdf0e10cSrcweir } 6892cdf0e10cSrcweirEOF 6893cdf0e10cSrcweir 6894cdf0e10cSrcweircat > conftest.xml << EOF 6895cdf0e10cSrcweir <project name="conftest" default="conftest"> 6896cdf0e10cSrcweir <target name="conftest"> 6897cdf0e10cSrcweir <javac srcdir="." includes="conftest.java"> 6898cdf0e10cSrcweir </javac> 6899cdf0e10cSrcweir </target> 6900cdf0e10cSrcweir </project> 6901cdf0e10cSrcweirEOF 6902cdf0e10cSrcweir oldJAVA_HOME=$JAVA_HOME 6903cdf0e10cSrcweir if test "$JAVACISGCJ" = "yes"; then 6904cdf0e10cSrcweir JAVA_HOME=; export JAVA_HOME 6905cdf0e10cSrcweir ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" 6906cdf0e10cSrcweir else 6907cdf0e10cSrcweir ant_cmd="$ANT -buildfile conftest.xml 1>&2" 6908cdf0e10cSrcweir fi 6909cdf0e10cSrcweir AC_TRY_EVAL(ant_cmd) 6910cdf0e10cSrcweir if test $? = 0 && test -f ./conftest.class ; then 6911cdf0e10cSrcweir AC_MSG_RESULT([Ant works]) 6912cdf0e10cSrcweir if test -z "$WITH_ANT_HOME"; then 6913cdf0e10cSrcweir ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` 6914cdf0e10cSrcweir if test -z "$ANT_HOME"; then 6915cdf0e10cSrcweir ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` 6916cdf0e10cSrcweir fi 6917cdf0e10cSrcweir else 6918cdf0e10cSrcweir ANT_HOME="$WITH_ANT_HOME" 6919cdf0e10cSrcweir fi 6920cdf0e10cSrcweir else 6921cdf0e10cSrcweir echo "configure: Ant test failed" >&5 6922cdf0e10cSrcweir cat conftest.java >&5 6923cdf0e10cSrcweir cat conftest.xml >&5 6924cdf0e10cSrcweir AC_MSG_WARN([Ant does not work - Some Java projects will not build!]) 6925cdf0e10cSrcweir ANT_HOME="" 6926cdf0e10cSrcweir echo "Ant does not work - Some Java projects will not build!" >>warn 6927cdf0e10cSrcweir fi 6928cdf0e10cSrcweir JAVA_HOME=$oldJAVA_HOME 6929cdf0e10cSrcweir rm -f conftest* core core.* *.core 6930cdf0e10cSrcweirfi 6931cdf0e10cSrcweirif test -z "$ANT_HOME"; then 6932cdf0e10cSrcweir ANT_HOME="NO_ANT_HOME" 6933cdf0e10cSrcweirfi 6934cdf0e10cSrcweirAC_SUBST(ANT_HOME) 6935cdf0e10cSrcweir 6936cdf0e10cSrcweirdnl Checking for ant.jar 6937cdf0e10cSrcweirif test "$ANT_HOME" != "NO_ANT_HOME"; then 6938cdf0e10cSrcweir AC_MSG_CHECKING([Ant lib directory]) 6939cdf0e10cSrcweir if test -f $ANT_HOME/lib/ant.jar; then 6940cdf0e10cSrcweir ANT_LIB="$ANT_HOME/lib" 6941cdf0e10cSrcweir else 6942cdf0e10cSrcweir if test -f $ANT_HOME/ant.jar; then 6943cdf0e10cSrcweir ANT_LIB="$ANT_HOME" 6944cdf0e10cSrcweir else 6945cdf0e10cSrcweir if test -f /usr/share/java/ant.jar; then 6946cdf0e10cSrcweir ANT_LIB=/usr/share/java 6947cdf0e10cSrcweir else 6948cdf0e10cSrcweir if test -f /usr/share/ant-core/lib/ant.jar; then 6949cdf0e10cSrcweir ANT_LIB=/usr/share/ant-core/lib 6950cdf0e10cSrcweir else 6951cdf0e10cSrcweir if test -f $ANT_HOME/lib/ant/ant.jar; then 6952cdf0e10cSrcweir ANT_LIB="$ANT_HOME/lib/ant" 6953cdf0e10cSrcweir else 6954cdf0e10cSrcweir if test -f /usr/share/lib/ant/ant.jar; then 6955cdf0e10cSrcweir ANT_LIB=/usr/share/lib/ant 6956cdf0e10cSrcweir else 6957cdf0e10cSrcweir AC_MSG_ERROR([Ant libraries not found!]) 6958cdf0e10cSrcweir fi 6959cdf0e10cSrcweir fi 6960cdf0e10cSrcweir fi 6961cdf0e10cSrcweir fi 6962cdf0e10cSrcweir fi 6963cdf0e10cSrcweir fi 6964cdf0e10cSrcweir AC_MSG_RESULT([Ant lib directory found.]) 6965cdf0e10cSrcweirfi 6966cdf0e10cSrcweirAC_SUBST(ANT_LIB) 6967cdf0e10cSrcweirfi 6968cdf0e10cSrcweir 6969cdf0e10cSrcweirant_minver=1.6.0 6970cdf0e10cSrcweir# update for more extensions... 6971cdf0e10cSrcweirif test "$ENABLE_MEDIAWIKI" = "YES"; then 6972cdf0e10cSrcweir ant_minver=1.7.0 6973cdf0e10cSrcweirfi 6974cdf0e10cSrcweirant_minminor1=`echo $ant_minver | cut -d"." -f2` 6975cdf0e10cSrcweir 6976cdf0e10cSrcweirAC_MSG_CHECKING([whether ant is >= $ant_minver]) 6977cdf0e10cSrcweirant_version=`$ANT -version | $AWK '{ print $4; }'` 6978cdf0e10cSrcweirant_version_major=`echo $ant_version | cut -d. -f1` 6979cdf0e10cSrcweirant_version_minor=`echo $ant_version | cut -d. -f2` 6980cdf0e10cSrcweirecho "configure: ant_version $ant_version " >&5 6981cdf0e10cSrcweirecho "configure: ant_version_major $ant_version_major " >&5 6982cdf0e10cSrcweirecho "configure: ant_version_minor $ant_version_minor " >&5 6983cdf0e10cSrcweirif test "$ant_version_major" -ge "2"; then 6984cdf0e10cSrcweir AC_MSG_RESULT([yes, $ant_version]) 6985cdf0e10cSrcweirelif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then 6986cdf0e10cSrcweir AC_MSG_RESULT([yes, $ant_version]) 6987cdf0e10cSrcweirelse 6988cdf0e10cSrcweir AC_MSG_ERROR([no, you need at least ant >= $ant_minver]) 6989cdf0e10cSrcweirfi 6990cdf0e10cSrcweir 6991cdf0e10cSrcweirif test "$ENABLE_MEDIAWIKI" = "YES"; then 6992cdf0e10cSrcweirAC_MSG_CHECKING([whether ant supports mapper type="regexp"]) 6993cdf0e10cSrcweirrm -rf confdir 6994cdf0e10cSrcweirmkdir confdir 6995cdf0e10cSrcweircat > conftest.java << EOF 6996cdf0e10cSrcweir public class conftest { 6997cdf0e10cSrcweir int testmethod(int a, int b) { 6998cdf0e10cSrcweir return a + b; 6999cdf0e10cSrcweir } 7000cdf0e10cSrcweir } 7001cdf0e10cSrcweirEOF 7002cdf0e10cSrcweir 7003cdf0e10cSrcweircat > conftest.xml << EOF 7004cdf0e10cSrcweir <project name="conftest" default="conftest"> 7005cdf0e10cSrcweir <target name="conftest" depends="copytest"> 7006cdf0e10cSrcweir <javac srcdir="." includes="conftest.java"> 7007cdf0e10cSrcweir </javac> 7008cdf0e10cSrcweir </target> 7009cdf0e10cSrcweir <target name="copytest"> 7010cdf0e10cSrcweir <copy todir="confdir"> 7011cdf0e10cSrcweir <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/> 7012cdf0e10cSrcweir <filterset/> 7013cdf0e10cSrcweir <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/> 7014cdf0e10cSrcweir </copy> 7015cdf0e10cSrcweir </target> 7016cdf0e10cSrcweir </project> 7017cdf0e10cSrcweirEOF 7018cdf0e10cSrcweir if test "$JAVACISGCJ" = "yes"; then 7019cdf0e10cSrcweir JAVA_HOME=; export JAVA_HOME 7020cdf0e10cSrcweir ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" 7021cdf0e10cSrcweir else 7022cdf0e10cSrcweir ant_cmd="$ANT -buildfile conftest.xml 1>&2" 7023cdf0e10cSrcweir fi 7024cdf0e10cSrcweir AC_TRY_EVAL(ant_cmd) 7025cdf0e10cSrcweir if test $? = 0 && test -f ./conftest.class ; then 7026cdf0e10cSrcweir AC_MSG_RESULT([yes]) 7027cdf0e10cSrcweir rm -rf confdir 7028cdf0e10cSrcweir else 7029cdf0e10cSrcweir echo "configure: Ant test failed" >&5 7030cdf0e10cSrcweir cat conftest.java >&5 7031cdf0e10cSrcweir cat conftest.xml >&5 7032cdf0e10cSrcweir rm -rf confdir 7033cdf0e10cSrcweir AC_MSG_ERROR([no. Did you install ant-apache-regexp?]) 7034cdf0e10cSrcweir fi 7035cdf0e10cSrcweirfi 7036cdf0e10cSrcweirrm -f conftest* core core.* *.core 7037cdf0e10cSrcweir 7038cdf0e10cSrcweirOOO_JUNIT_JAR= 7039f0157b90Skschenkif test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then 7040f0157b90Skschenk AC_MSG_CHECKING([for JUnit 4]) 7041e4fb754eSPedro Giffuni if test "$with_junit" = "yes"; then 7042cdf0e10cSrcweir if test -e /usr/share/java/junit4.jar; then 7043cdf0e10cSrcweir OOO_JUNIT_JAR=/usr/share/java/junit4.jar 7044cdf0e10cSrcweir else 7045cdf0e10cSrcweir if test -e /usr/share/lib/java/junit.jar; then 7046cdf0e10cSrcweir OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar 7047cdf0e10cSrcweir else 7048cdf0e10cSrcweir OOO_JUNIT_JAR=/usr/share/java/junit.jar 7049cdf0e10cSrcweir fi 7050cdf0e10cSrcweir fi 7051cdf0e10cSrcweir else 7052cdf0e10cSrcweir OOO_JUNIT_JAR=$with_junit 7053cdf0e10cSrcweir fi 7054cdf0e10cSrcweir if test "$_os" = "WINNT"; then 7055cdf0e10cSrcweir OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"` 7056cdf0e10cSrcweir fi 7057f0157b90Skschenk "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \ 7058f0157b90Skschenk $GREP org/junit/Before.class > /dev/null 2>&5 7059f0157b90Skschenk if test $? -eq 0; then 7060f0157b90Skschenk AC_MSG_RESULT([$OOO_JUNIT_JAR]) 7061cdf0e10cSrcweir else 7062f0157b90Skschenk AC_MSG_RESULT([no]) 7063f0157b90Skschenk AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default 7064f0157b90Skschenklocation (/usr/share/java), specify its pathname via 7065f0157b90Skschenk--with-junit=..., or disable it via --without-junit]) 7066cdf0e10cSrcweir fi 7067cdf0e10cSrcweirfi 7068cdf0e10cSrcweirAC_SUBST(OOO_JUNIT_JAR) 7069cdf0e10cSrcweir 7070947c15fcSDamjan JovanovicHAMCREST_CORE_JAR= 7071947c15fcSDamjan Jovanovicif test "$SOLAR_JAVA" != "" && test "$with_junit" != "no" && test "$with_hamcrest_core" != "no"; then 7072947c15fcSDamjan Jovanovic AC_MSG_CHECKING([for hamcrest-core]) 7073947c15fcSDamjan Jovanovic if test "$with_hamcrest_core" = "yes"; then 7074947c15fcSDamjan Jovanovic if test -e /usr/share/java/hamcrest-core-1.3.jar; then 7075947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core-1.3.jar 7076947c15fcSDamjan Jovanovic else 7077947c15fcSDamjan Jovanovic if test -e /usr/share/lib/java/hamcrest-core.jar; then 7078947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=/usr/share/lib/java/hamcrest-core.jar 7079947c15fcSDamjan Jovanovic else 7080947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core.jar 7081947c15fcSDamjan Jovanovic fi 7082947c15fcSDamjan Jovanovic fi 7083947c15fcSDamjan Jovanovic else 7084947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=$with_hamcrest_core 7085947c15fcSDamjan Jovanovic fi 7086947c15fcSDamjan Jovanovic if test "$_os" = "WINNT"; then 7087947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=`cygpath -m "$HAMCREST_CORE_JAR"` 7088947c15fcSDamjan Jovanovic fi 7089947c15fcSDamjan Jovanovic export HAMCREST_CORE_JAR 7090947c15fcSDamjan Jovanovic "$JAVA_HOME/bin/jar" tf "$HAMCREST_CORE_JAR" 2>&5 | \ 7091947c15fcSDamjan Jovanovic $GREP org/hamcrest/core/AllOf.class > /dev/null 2>&5 7092947c15fcSDamjan Jovanovic if test $? -eq 0; then 709398e4ac81SDamjan Jovanovic AC_MSG_RESULT([$HAMCREST_CORE_JAR]) 7094947c15fcSDamjan Jovanovic else 7095947c15fcSDamjan Jovanovic AC_MSG_ERROR([cannot find hamcrest-core jar; please install one in the 7096947c15fcSDamjan Jovanovicdefault location (/usr/share/java), specify its 7097947c15fcSDamjan Jovanovicpathname via --with-hamcrest-core=..., or disable 7098947c15fcSDamjan Jovanovicit via --without-hamcrest-core]) 7099947c15fcSDamjan Jovanovic fi 7100947c15fcSDamjan Jovanovicfi 7101947c15fcSDamjan JovanovicAC_SUBST(HAMCREST_CORE_JAR) 7102947c15fcSDamjan Jovanovic 7103cdf0e10cSrcweirAC_MSG_CHECKING([which languages to be built]) 7104cdf0e10cSrcweirWITH_LANG="$with_lang" 7105cdf0e10cSrcweirif test -z "$WITH_LANG"; then 7106cdf0e10cSrcweir AC_MSG_RESULT([en-US]) 7107cdf0e10cSrcweirelse 7108cdf0e10cSrcweir AC_MSG_RESULT([$WITH_LANG]) 71093e9d7d56SAndre Fischer ADDITIONAL_REPOSITORIES="$ADDITIONAL_REPOSITORIES ../extras" 71103e9d7d56SAndre Fischer BUILD_TYPE="$BUILD_TYPE L10N" 7111cdf0e10cSrcweirfi 7112cdf0e10cSrcweirAC_SUBST(WITH_LANG) 7113cdf0e10cSrcweir 7114cdf0e10cSrcweirAC_MSG_CHECKING([which languages have poor help localizations]) 7115cdf0e10cSrcweirWITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations" 7116cdf0e10cSrcweirif test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then 7117cdf0e10cSrcweir AC_MSG_RESULT([none]) 7118cdf0e10cSrcweirelse 7119cdf0e10cSrcweir AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS]) 7120cdf0e10cSrcweirfi 7121cdf0e10cSrcweirAC_SUBST(WITH_POOR_HELP_LOCALIZATIONS) 7122cdf0e10cSrcweir 7123cdf0e10cSrcweirAC_MSG_CHECKING([which dictionaries to include]) 7124cdf0e10cSrcweirif test -z "$with_dict"; then 7125cdf0e10cSrcweir WITH_DICT=,ALL, 7126cdf0e10cSrcweir AC_MSG_RESULT([ALL]) 7127cdf0e10cSrcweirelse 7128cdf0e10cSrcweir WITH_DICT=","$with_dict"," 7129cdf0e10cSrcweir AC_MSG_RESULT([$with_dict]) 7130cdf0e10cSrcweirfi 7131cdf0e10cSrcweirAC_SUBST(WITH_DICT) 7132cdf0e10cSrcweir 7133cdf0e10cSrcweirAC_MSG_CHECKING([for additional 'intro' bitmaps]) 7134cdf0e10cSrcweirINTRO_BITMAPS= 7135cdf0e10cSrcweirif test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then 7136cdf0e10cSrcweir INTRO_BITMAPS= 7137cdf0e10cSrcweir AC_MSG_RESULT([none]) 7138cdf0e10cSrcweirelse 7139cdf0e10cSrcweir for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do 7140cdf0e10cSrcweir case "$bitmap" in 7141cdf0e10cSrcweir *.bmp) ;; 7142cdf0e10cSrcweir *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;; 7143cdf0e10cSrcweir esac 7144cdf0e10cSrcweir if test -n "$bitmap" ; then 7145cdf0e10cSrcweir INTRO_BITMAPS="$INTRO_BITMAPS $bitmap" 7146cdf0e10cSrcweir fi 7147cdf0e10cSrcweir done 7148cdf0e10cSrcweir AC_MSG_RESULT([$INTRO_BITMAPS]) 7149cdf0e10cSrcweirfi 7150cdf0e10cSrcweirAC_SUBST(INTRO_BITMAPS) 7151cdf0e10cSrcweir 7152cdf0e10cSrcweirAC_MSG_CHECKING([for additional 'about' bitmaps]) 7153cdf0e10cSrcweirABOUT_BITMAPS= 7154cdf0e10cSrcweirif test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then 7155cdf0e10cSrcweir ABOUT_BITMAPS= 7156cdf0e10cSrcweir AC_MSG_RESULT([none]) 7157cdf0e10cSrcweirelse 7158cdf0e10cSrcweir for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do 7159cdf0e10cSrcweir case "$bitmap" in 7160cdf0e10cSrcweir *.bmp) ;; 7161cdf0e10cSrcweir *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;; 7162cdf0e10cSrcweir esac 7163cdf0e10cSrcweir if test -n "$bitmap" ; then 7164cdf0e10cSrcweir ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap" 7165cdf0e10cSrcweir fi 7166cdf0e10cSrcweir done 7167cdf0e10cSrcweir AC_MSG_RESULT([$ABOUT_BITMAPS]) 7168cdf0e10cSrcweirfi 7169cdf0e10cSrcweirAC_SUBST(ABOUT_BITMAPS) 7170cdf0e10cSrcweir 7171cdf0e10cSrcweirOOO_VENDOR= 7172cdf0e10cSrcweirAC_MSG_CHECKING([for vendor]) 7173cdf0e10cSrcweirif test -z "$with_vendor" -o "$with_vendor" = "no" ; then 7174cdf0e10cSrcweir AC_MSG_RESULT([not set]) 7175cdf0e10cSrcweirelse 7176cdf0e10cSrcweir OOO_VENDOR="$with_vendor" 7177cdf0e10cSrcweir AC_MSG_RESULT([$OOO_VENDOR]) 7178cdf0e10cSrcweirfi 7179cdf0e10cSrcweirAC_SUBST(OOO_VENDOR) 7180cdf0e10cSrcweir 7181cdf0e10cSrcweirUNIXWRAPPERNAME= 7182cdf0e10cSrcweirAC_MSG_CHECKING([for UNIX wrapper name]) 7183cdf0e10cSrcweirif test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then 7184cdf0e10cSrcweir AC_MSG_RESULT([not set]) 7185cdf0e10cSrcweirelse 7186cdf0e10cSrcweir UNIXWRAPPERNAME="$with_unix_wrapper" 7187cdf0e10cSrcweir AC_MSG_RESULT([$UNIXWRAPPERNAME]) 7188cdf0e10cSrcweirfi 7189cdf0e10cSrcweirAC_SUBST(UNIXWRAPPERNAME) 7190cdf0e10cSrcweir 7191cdf0e10cSrcweirAC_MSG_CHECKING([whether to statically link to Gtk]) 7192cdf0e10cSrcweirif test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then 7193cdf0e10cSrcweir ENABLE_STATIC_GTK="TRUE" 7194cdf0e10cSrcweir AC_MSG_RESULT([yes]) 7195cdf0e10cSrcweirelse 7196cdf0e10cSrcweir ENABLE_STATIC_GTK="FALSE" 7197cdf0e10cSrcweir AC_MSG_RESULT([no]) 7198cdf0e10cSrcweirfi 7199cdf0e10cSrcweirAC_SUBST(ENABLE_STATIC_GTK) 7200cdf0e10cSrcweir 7201cdf0e10cSrcweirAC_MSG_CHECKING([whether to use layout dialogs]) 7202cdf0e10cSrcweirif test -n "$enable_layout" && test "$enable_layout" != "no"; then 7203cdf0e10cSrcweir ENABLE_LAYOUT="TRUE" 7204cdf0e10cSrcweir AC_MSG_RESULT([yes]) 7205cdf0e10cSrcweirelse 7206cdf0e10cSrcweir ENABLE_LAYOUT="FALSE" 7207cdf0e10cSrcweir AC_MSG_RESULT([no]) 7208cdf0e10cSrcweirfi 7209cdf0e10cSrcweirAC_SUBST(ENABLE_LAYOUT) 7210cdf0e10cSrcweir 7211cdf0e10cSrcweir# =================================================================== 7212cdf0e10cSrcweir# De- or increase default verbosity of build process 7213cdf0e10cSrcweir# =================================================================== 7214cdf0e10cSrcweirAC_MSG_CHECKING([build verbosity]) 7215cdf0e10cSrcweirif test -n "$enable_verbose"; then 7216cdf0e10cSrcweir if test "$enable_verbose" = "yes"; then 7217cdf0e10cSrcweir VERBOSE="TRUE" 7218cdf0e10cSrcweir AC_MSG_RESULT([high]) 7219cdf0e10cSrcweir fi 7220cdf0e10cSrcweir if test "$enable_verbose" = "no"; then 7221cdf0e10cSrcweir VERBOSE="FALSE" 7222cdf0e10cSrcweir AC_MSG_RESULT([low]) 7223cdf0e10cSrcweir fi 7224cdf0e10cSrcweirelse 7225cdf0e10cSrcweir AC_MSG_RESULT([not set]) 7226cdf0e10cSrcweirfi 7227cdf0e10cSrcweirAC_SUBST(VERBOSE) 7228cdf0e10cSrcweir 7229cdf0e10cSrcweirdnl =================================================================== 7230cdf0e10cSrcweirdnl Hook up OOos nodep environmental variable to automake's equivalent 7231cdf0e10cSrcweirdnl --enable-dependency-tracking configure option 7232cdf0e10cSrcweirdnl =================================================================== 7233cdf0e10cSrcweirAC_MSG_CHECKING([whether to enable dependency tracking]) 7234cdf0e10cSrcweirif test "$enable_dependency_tracking" = "no"; then 7235cdf0e10cSrcweir nodep=TRUE 7236cdf0e10cSrcweir AC_MSG_RESULT([no]) 7237cdf0e10cSrcweirelse 7238cdf0e10cSrcweir AC_MSG_RESULT([yes]) 7239cdf0e10cSrcweirfi 7240cdf0e10cSrcweirAC_SUBST(nodep) 7241cdf0e10cSrcweir 7242cdf0e10cSrcweirdnl =================================================================== 7243cdf0e10cSrcweirdnl Setting up the environment. 7244cdf0e10cSrcweirdnl =================================================================== 7245cdf0e10cSrcweirecho "********************************************************************" 7246cdf0e10cSrcweirecho "* *" 7247cdf0e10cSrcweirecho "* Setting up the build environment variables. *" 7248cdf0e10cSrcweirecho "* *" 7249cdf0e10cSrcweirecho "********************************************************************" 7250cdf0e10cSrcweir 7251cdf0e10cSrcweirif test -z "$COMPATH"; then 7252cdf0e10cSrcweir AC_MSG_ERROR([No compiler found.]) 7253cdf0e10cSrcweirfi 7254cdf0e10cSrcweirAC_SUBST(COMPATH) 72551e1ac450SHerbert DürrAC_SUBST(CC_PATH) 7256cdf0e10cSrcweir 7257cdf0e10cSrcweirAC_MSG_CHECKING([solver path]) 7258cdf0e10cSrcweirif test -z "$with_local_solver"; then 7259cdf0e10cSrcweir LOCAL_SOLVER="DEFAULT" 7260cdf0e10cSrcweir AC_MSG_RESULT([default]) 7261cdf0e10cSrcweirelse 7262cdf0e10cSrcweir LOCAL_SOLVER=$with_local_solver 7263cdf0e10cSrcweir AC_MSG_RESULT([$with_local_solver]) 7264cdf0e10cSrcweirfi 7265cdf0e10cSrcweirAC_SUBST(LOCAL_SOLVER) 7266cdf0e10cSrcweir 7267cdf0e10cSrcweirAC_SUBST(BUILD_TYPE) 7268149f2bc0SAndre FischerAC_SUBST(ADDITIONAL_REPOSITORIES) 7269cdf0e10cSrcweir 7270cdf0e10cSrcweir# make sure config.guess is +x; we execute config.guess, so it has to be so; 7271cdf0e10cSrcweirchmod +x ./config.guess 7272cdf0e10cSrcweir 72739ef65f0eSAndre Fischer# Create files from their *.in templates. 72749ef65f0eSAndre FischerAC_CONFIG_FILES([set_soenv Makefile]) 72759ef65f0eSAndre Fischer 72769ef65f0eSAndre FischerAC_MSG_NOTICE([writing config.status]) 72779ef65f0eSAndre FischerAC_OUTPUT 7278cdf0e10cSrcweir 7279cdf0e10cSrcweirdnl Executing the set_soenv script to setup the environment variables. 7280cdf0e10cSrcweirchmod a+x set_soenv 7281cdf0e10cSrcweirif test -z "$enable_check_only"; then 7282cdf0e10cSrcweir './set_soenv' 7283cdf0e10cSrcweirelse 7284cdf0e10cSrcweir echo 7285cdf0e10cSrcweir echo Test Complete 7286cdf0e10cSrcweir echo No environment file will be generated 7287cdf0e10cSrcweir echo 7288cdf0e10cSrcweir num_warnings=`wc -l warn` 7289cdf0e10cSrcweir _num=`echo $num_warnings | $AWK '{ print $1 }'` 7290cdf0e10cSrcweir if test $_num -gt 0; then 7291cdf0e10cSrcweir echo The following warning\(s\) were generated by configure 7292cdf0e10cSrcweir echo ---------------------------------------------------- 7293cdf0e10cSrcweir echo 7294cdf0e10cSrcweir cat warn 7295cdf0e10cSrcweir echo 7296cdf0e10cSrcweir else 7297cdf0e10cSrcweir echo There were no warnings 7298cdf0e10cSrcweir fi 7299cdf0e10cSrcweir echo 7300cdf0e10cSrcweirfi 7301f0157b90Skschenk 7302