1cfc83b6cSPedro Giffunidnl * ************************************************************* 2cfc83b6cSPedro Giffunidnl * 3cfc83b6cSPedro Giffunidnl * Licensed to the Apache Software Foundation (ASF) under one 4cfc83b6cSPedro Giffunidnl * or more contributor license agreements. See the NOTICE file 5cfc83b6cSPedro Giffunidnl * distributed with this work for additional information 6cfc83b6cSPedro Giffunidnl * regarding copyright ownership. The ASF licenses this file 7cfc83b6cSPedro Giffunidnl * to you under the Apache License, Version 2.0 (the 8cfc83b6cSPedro Giffunidnl * "License"); you may not use this file except in compliance 9cfc83b6cSPedro Giffunidnl * with the License. You may obtain a copy of the License at 10cfc83b6cSPedro Giffunidnl * 11cfc83b6cSPedro Giffunidnl * http://www.apache.org/licenses/LICENSE-2.0 12cfc83b6cSPedro Giffunidnl * 13cfc83b6cSPedro Giffunidnl * Unless required by applicable law or agreed to in writing, 14cfc83b6cSPedro Giffunidnl * software distributed under the License is distributed on an 15cfc83b6cSPedro Giffunidnl * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16cfc83b6cSPedro Giffunidnl * KIND, either express or implied. See the License for the 17cfc83b6cSPedro Giffunidnl * specific language governing permissions and limitations 18cfc83b6cSPedro Giffunidnl * under the License. 19cfc83b6cSPedro Giffunidnl * 20cfc83b6cSPedro Giffunidnl * ************************************************************* 210495d53eSpfgAC_REVISION( $Revision$ ) 22cfc83b6cSPedro GiffuniAC_PREREQ(2.50) 23cfc83b6cSPedro GiffuniAC_INIT() 24cfc83b6cSPedro Giffuniecho "$@" >config.parms 25cfc83b6cSPedro GiffuniAC_ARG_WITH(dmake-path, 26cfc83b6cSPedro Giffuni[ --with-dmake-path=<PATH TO EXECUTABLE> Specify the location of dmake ], 27cfc83b6cSPedro Giffuni[ DMAKE_PATH="$withval" 28cfc83b6cSPedro Giffuni]) 29cfc83b6cSPedro GiffuniAC_ARG_WITH(dmake-url, 30cfc83b6cSPedro Giffuni[ --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 32cfc83b6cSPedro Giffuni Note that dmake is under GPL license.], 33cfc83b6cSPedro Giffuni[ DMAKE_URL="$withval" 34cfc83b6cSPedro Giffuni]) 35cfc83b6cSPedro GiffuniAC_ARG_WITH(packager-list, 36cfc83b6cSPedro Giffuni[ --with-packager-list=<PATH TO PACK LIST> Specify a file to drive the packaging process. 37cfc83b6cSPedro Giffuni The file must follow the format explained in 38cfc83b6cSPedro Giffuni instsetoo_native/util/pack.lst 39cfc83b6cSPedro Giffuni],,) 40cfc83b6cSPedro GiffuniAC_ARG_WITH(gnu-patch, 41cfc83b6cSPedro Giffuni[ --with-gnu-patch Specify location of GNU patch on Solaris or FreeBSD 42cfc83b6cSPedro Giffuni],,) 43cfc83b6cSPedro GiffuniAC_ARG_WITH(gnu-cp, 44cfc83b6cSPedro Giffuni[ --with-gnu-cp Specify location of GNU cp on Solaris 45cfc83b6cSPedro Giffuni],,) 46cfc83b6cSPedro GiffuniAC_ARG_WITH(gperf, 47cfc83b6cSPedro Giffuni[ --with-gperf Specify location of gperf on Solaris or FreeBSD 48cfc83b6cSPedro Giffuni],,) 49cfc83b6cSPedro GiffuniAC_ARG_ENABLE(graphite, 50cfc83b6cSPedro Giffuni[ --enable-graphite Enables the compilation of Graphite smart font rendering 51cfc83b6cSPedro Giffuni],,) 52cfc83b6cSPedro GiffuniAC_ARG_WITH(system-graphite, 53cfc83b6cSPedro Giffuni[ --with-system-graphite use graphite library already installed on system 54cfc83b6cSPedro Giffuni],,) 55cfc83b6cSPedro GiffuniAC_ARG_WITH(system-apache-commons, 56cfc83b6cSPedro Giffuni[ --with-system-apache-commons use apache-commons jar files already installed on system 57cfc83b6cSPedro Giffuni],,) 58cfc83b6cSPedro GiffuniAC_ARG_ENABLE(online-update, 59cfc83b6cSPedro Giffuni[ --disable-online-update Disables the Online Update feature. 60cfc83b6cSPedro Giffuni],,enable_online_update=yes) 61cfc83b6cSPedro GiffuniAC_ARG_ENABLE(unit-tests, 62cfc83b6cSPedro Giffuni[ --disable-unit-tests Disables default unit tests (eg. unit tests using Google test, ...). 63cfc83b6cSPedro Giffuni],,enable_unit_tests=yes) 64cfc83b6cSPedro GiffuniAC_ARG_ENABLE(ldap, 65cfc83b6cSPedro Giffuni[ --disable-ldap Disables the use of LDAP backend via OpenLDAP 66cfc83b6cSPedro Giffuni],,) 67cfc83b6cSPedro GiffuniAC_ARG_ENABLE(fetch-external, 68cfc83b6cSPedro Giffuni[ --disable-fetch-external Disables fetching external tarballs from web sources. 69cfc83b6cSPedro Giffuni],,) 70cfc83b6cSPedro GiffuniAC_ARG_WITH(external-tar, 71cfc83b6cSPedro Giffuni[ --with-external-tar=<TARFILE PATH> Specify path to tarfiles manually ], 72cfc83b6cSPedro Giffuni[ TARFILE_LOCATION="$withval" 73cfc83b6cSPedro Giffuni]) 74cfc83b6cSPedro GiffuniAC_ARG_WITH(openldap, 75cfc83b6cSPedro Giffuni[ --with-openldap Enables the use of the OpenLDAP 76cfc83b6cSPedro Giffuni],,) 77cfc83b6cSPedro GiffuniAC_ARG_ENABLE(lockdown, 78cfc83b6cSPedro Giffuni[ --enable-lockdown Enables the gconf integration work in OOo 79cfc83b6cSPedro Giffuni],,) 80cfc83b6cSPedro GiffuniAC_ARG_ENABLE(vba, 81cfc83b6cSPedro Giffuni[ --disable-vba disables the vba compatibility feature 82cfc83b6cSPedro Giffuni],,) 83cfc83b6cSPedro GiffuniAC_ARG_WITH(vba-package-format, 84cfc83b6cSPedro Giffuni[ --with-vba-package-format specify package format for vba compatibility api. 85cfc83b6cSPedro Giffuni Specifying "builtin" means the api component and 86cfc83b6cSPedro Giffuni associated type library are part of the installation set. 87cfc83b6cSPedro Giffuni Specifying "extn" creates an uno extension that is 88cfc83b6cSPedro Giffuni part of the installation set ( located in the program 89cfc83b6cSPedro Giffuni directory ) that MUST be optionly registered using 90cfc83b6cSPedro Giffuni either the unopkg executeable or the extension manager 91cfc83b6cSPedro Giffuni gui. 92cfc83b6cSPedro Giffuni 93cfc83b6cSPedro Giffuni Note: "builtin" is the default, "extn" can cause 94cfc83b6cSPedro Giffuni problems. 95cfc83b6cSPedro Giffuni Usage: --with-vba-package-format="builtin" or 96cfc83b6cSPedro Giffuni --with-vba-package-format="extn" 97cfc83b6cSPedro Giffuni],,) 98cfc83b6cSPedro GiffuniAC_ARG_ENABLE(pch, 99cfc83b6cSPedro Giffuni[ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++. 100cfc83b6cSPedro Giffuni],,) 101cfc83b6cSPedro GiffuniAC_ARG_WITH(fonts, 102cfc83b6cSPedro Giffuni[ --without-fonts OOo includes some third-party fonts to provide a reliable 103cfc83b6cSPedro Giffuni basis for help content, templates, samples, etc. 104cfc83b6cSPedro Giffuni When these fonts are already known to be available on the 105cfc83b6cSPedro Giffuni system then you should use this option. 106cfc83b6cSPedro Giffuni],,) 107cfc83b6cSPedro GiffuniAC_ARG_WITH(ppds, 108cfc83b6cSPedro Giffuni[ --without-ppds Removes Postscript Printer definition files from 109cfc83b6cSPedro Giffuni Apache Openoffice installation set, for people building 110cfc83b6cSPedro Giffuni for specific distributions where PPDs are known to be 111cfc83b6cSPedro Giffuni already available (every recent distro with CUPS 112cfc83b6cSPedro Giffuni backend) 113cfc83b6cSPedro Giffuni],,) 114cfc83b6cSPedro GiffuniAC_ARG_WITH(afms, 115cfc83b6cSPedro Giffuni[ --without-afms Removes bitmap font files from Apache Openoffice 116cfc83b6cSPedro Giffuni installation set, for people building for specific 117cfc83b6cSPedro Giffuni distributions where AFM files or TrueType Fonts 118cfc83b6cSPedro Giffuni are known to be available. 119cfc83b6cSPedro Giffuni],,) 120cfc83b6cSPedro GiffuniAC_ARG_ENABLE(epm, 121cfc83b6cSPedro Giffuni[ --disable-epm AOO includes self-packaging code, that requires 122cfc83b6cSPedro Giffuni epm, however epm is useless for large scale 123cfc83b6cSPedro Giffuni package building. 124cfc83b6cSPedro Giffuni],,enable_epm="yes") 125cfc83b6cSPedro GiffuniAC_ARG_WITH(epm, 126cfc83b6cSPedro Giffuni[ --with-epm Decides which epm to use. Default is to use 127cfc83b6cSPedro Giffuni the one from the system if one is built. When 128cfc83b6cSPedro Giffuni either this is not there or you say =internal 129cfc83b6cSPedro Giffuni epm will be built. 130cfc83b6cSPedro Giffuni],,) 131cfc83b6cSPedro GiffuniAC_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 134cfc83b6cSPedro Giffuni 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. 137cfc83b6cSPedro Giffuni],[ EPM_URL="$withval" 138cfc83b6cSPedro Giffuni]) 139cfc83b6cSPedro GiffuniAC_ARG_WITH(package-format, 140cfc83b6cSPedro Giffuni[ --with-package-format specify package format(s) for OOo installsets. 141cfc83b6cSPedro Giffuni Default is "normal" one of the OS/Distribution. 142cfc83b6cSPedro Giffuni 143cfc83b6cSPedro Giffuni Usage: --with-package-format="foo bar" 144cfc83b6cSPedro Giffuni],,) 145cfc83b6cSPedro GiffuniAC_ARG_ENABLE(odk, 146c4211d71SMatthias Seidel[ --disable-odk AOO includes an ODK, office development kit 147c4211d71SMatthias Seidel which some packagers may want to build without 148cfc83b6cSPedro Giffuni],,enable_odk="yes") 149cfc83b6cSPedro GiffuniAC_ARG_ENABLE(mathmldtd, 150cfc83b6cSPedro Giffuni[ --disable-mathmldtd disable mathmldtd 151cfc83b6cSPedro Giffuni (useful for distributions that want to avoid packaging 152cfc83b6cSPedro Giffuni it) 153cfc83b6cSPedro Giffuni],,enable_mathmldtd="yes") 154cfc83b6cSPedro GiffuniAC_ARG_ENABLE(evolution2, 155cfc83b6cSPedro Giffuni[ --enable-evolution2 Allows the built-in evolution 2 addressbook 156cfc83b6cSPedro Giffuni connectivity build to be enabled. 157cfc83b6cSPedro Giffuni],,) 158cfc83b6cSPedro GiffuniAC_ARG_WITH(system-stdlibs, 159cfc83b6cSPedro Giffuni[ --with-system-stdlibs use libstdc++/libgcc_s already on system 160cfc83b6cSPedro Giffuni],,) 161cfc83b6cSPedro GiffuniAC_ARG_ENABLE(cups, 162cfc83b6cSPedro Giffuni[ --disable-cups disable CUPS support (for printing on UNIX) 163cfc83b6cSPedro Giffuni],,enable_cups=yes) 164cfc83b6cSPedro GiffuniAC_ARG_ENABLE(fontconfig, 165cfc83b6cSPedro Giffuni[ --disable-fontconfig disable support for the fontconfig library 166cfc83b6cSPedro Giffuni],,enable_fontconfig=yes) 167cfc83b6cSPedro GiffuniAC_ARG_ENABLE(directx, 168cfc83b6cSPedro Giffuni[ --disable-directx Remove DirectX implementation for the new XCanvas 169cfc83b6cSPedro Giffuni interface. The DirectX support requires more stuff 170cfc83b6cSPedro Giffuni installed on Windows to compile. 171cfc83b6cSPedro Giffuni (DirectX SDK, GDI+ libs) 172cfc83b6cSPedro Giffuni],,enable_directx=yes) 173cfc83b6cSPedro GiffuniAC_ARG_ENABLE(activex, 174cfc83b6cSPedro Giffuni[ --disable-activex Disable the use of ActiveX for windows build. 175cfc83b6cSPedro Giffuni This switch is mandatory when using VC++ 2005/2008 Express. 176cfc83b6cSPedro Giffuni Alternatively you can use the Windows Driver Kit (WDK) and 177cfc83b6cSPedro Giffuni configure with the following switches: 178cfc83b6cSPedro Giffuni --with-atl-include-dir=$WDK_HOME\inc\atl71 179cfc83b6cSPedro Giffuni --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 180cfc83b6cSPedro Giffuni --with-mfc-include-dir=$WDK_HOME\inc\mfc42 181cfc83b6cSPedro Giffuni --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 182cfc83b6cSPedro Giffuni],,) 183cfc83b6cSPedro Giffuni 184cfc83b6cSPedro GiffuniAC_ARG_ENABLE(atl, 185cfc83b6cSPedro Giffuni[ --disable-atl Disable the use of ATL for windows build. 186cfc83b6cSPedro Giffuni This switch is mandatory when using VC++ 2005/2008 Express. 187cfc83b6cSPedro Giffuni Alternatively you can use the Windows Driver Kit (WDK) and 188cfc83b6cSPedro Giffuni configure with the following switches: 189cfc83b6cSPedro Giffuni --with-atl-include-dir=$WDK_HOME\inc\atl71 190cfc83b6cSPedro Giffuni --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 191cfc83b6cSPedro Giffuni --with-mfc-include-dir=$WDK_HOME\inc\mfc42 192cfc83b6cSPedro Giffuni --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 193cfc83b6cSPedro Giffuni],,) 194cfc83b6cSPedro Giffuni 195cfc83b6cSPedro GiffuniAC_ARG_WITH(atl-include-dir, 196cfc83b6cSPedro Giffuni[ --with-atl-include-dir Path to ATL include directory for windows build. 197cfc83b6cSPedro Giffuni This switch is mandatory when using VC++ 2008 Express 198cfc83b6cSPedro Giffuni and configuring with ATL/ActiveX enabled. 199cfc83b6cSPedro Giffuni You can use the Windows Driver Kit (WDK) and 200cfc83b6cSPedro Giffuni configure with the following switch: 201cfc83b6cSPedro Giffuni --with-atl-include-dir=$WDK_HOME\inc\atl71 202cfc83b6cSPedro Giffuni],,) 203cfc83b6cSPedro Giffuni 204cfc83b6cSPedro GiffuniAC_ARG_WITH(atl-lib-dir, 205cfc83b6cSPedro Giffuni[ --with-atl-lib-dir Path to ATL libraries directory for windows build. 206cfc83b6cSPedro Giffuni This switch is mandatory when using VC++ 2008 Express 207cfc83b6cSPedro Giffuni and configuring with ATL/ActiveX enabled. 208cfc83b6cSPedro Giffuni You can use the Windows Driver Kit (WDK) and 209cfc83b6cSPedro Giffuni configure with the following switch: 210cfc83b6cSPedro Giffuni --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 211cfc83b6cSPedro Giffuni],,) 212cfc83b6cSPedro Giffuni 213cfc83b6cSPedro GiffuniAC_ARG_WITH(mfc-include-dir, 214cfc83b6cSPedro Giffuni[ --with-mfc-include-dir Path to MFC include directory for windows build. 215cfc83b6cSPedro Giffuni This switch is mandatory when using VC++ 2008 Express 216cfc83b6cSPedro Giffuni and configuring with ATL/ActiveX enabled. 217cfc83b6cSPedro Giffuni You can use the Windows Driver Kit (WDK) and 218cfc83b6cSPedro Giffuni configure with the following switch: 219cfc83b6cSPedro Giffuni --with-mfc-include-dir=$WDK_HOME\inc\mfc42 220cfc83b6cSPedro Giffuni],,) 221cfc83b6cSPedro Giffuni 222cfc83b6cSPedro GiffuniAC_ARG_WITH(mfc-lib-dir, 223cfc83b6cSPedro Giffuni[ --with-mfc-lib-dir Path to MFC libraries directory for windows build. 224cfc83b6cSPedro Giffuni This switch is mandatory when using VC++ 2008 Express 225cfc83b6cSPedro Giffuni and configuring with ATL/ActiveX enabled. 226cfc83b6cSPedro Giffuni You can use the Windows Driver Kit (WDK) and 227cfc83b6cSPedro Giffuni configure with the following switch: 228cfc83b6cSPedro Giffuni --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 229cfc83b6cSPedro Giffuni],,) 230cfc83b6cSPedro Giffuni 231cfc83b6cSPedro Giffuni 232cfc83b6cSPedro GiffuniAC_ARG_ENABLE(symbols, 233cfc83b6cSPedro Giffuni[ --enable-symbols Include debugging symbols in output. 234cfc83b6cSPedro Giffuni WARNING - a complete build needs 8 Gb of space and 235cfc83b6cSPedro Giffuni takes much longer. (enables -g compiler flag) 236cfc83b6cSPedro Giffuni 237cfc83b6cSPedro Giffuni --enable-symbols=SMALL sets the gcc -g1 setting 238cfc83b6cSPedro Giffuni which is smaller. 239cfc83b6cSPedro Giffuni 240cfc83b6cSPedro Giffuni Enabling symbols disables the stripping of the solver 241cfc83b6cSPedro Giffuni (--disable-strip-solver). 242cfc83b6cSPedro Giffuni],,) 243cfc83b6cSPedro GiffuniAC_ARG_ENABLE(strip-solver, 244cfc83b6cSPedro Giffuni[ --disable-strip-solver Disable the stripping of the solver. 245cfc83b6cSPedro Giffuni By default the solver is stripped unless a build with 246cfc83b6cSPedro Giffuni debugging symbols (--enable-symbols) is requested. 247cfc83b6cSPedro Giffuni 248cfc83b6cSPedro Giffuni This switch allows to override this setting. 249cfc83b6cSPedro Giffuni],,) 250cfc83b6cSPedro GiffuniAC_ARG_ENABLE(werror, 251cfc83b6cSPedro Giffuni[ --enable-werror Turn warnings to errors. (Has no effect in modules 252cfc83b6cSPedro Giffuni where the treating of warnings as errors is disabled 253cfc83b6cSPedro Giffuni explicitly) 254cfc83b6cSPedro Giffuni],,) 255cfc83b6cSPedro GiffuniAC_ARG_ENABLE(debug, 256cfc83b6cSPedro Giffuni[ --enable-debug Include debugging symbols from --enable-symbols 257cfc83b6cSPedro Giffuni plus extra debugging code. Extra large build! 258cfc83b6cSPedro Giffuni (enables -g compiler flag and dmake debug=true) 259cfc83b6cSPedro Giffuni],,) 260cfc83b6cSPedro GiffuniAC_ARG_ENABLE(dbgutil, 261cfc83b6cSPedro Giffuni[ --enable-dbgutil Include additional debugging utilities, such as 262cfc83b6cSPedro Giffuni assertions, object counting, etc. Larger build. 263cfc83b6cSPedro Giffuni Independent from --enable-debug 264cfc83b6cSPedro Giffuni],,) 265cfc83b6cSPedro GiffuniAC_ARG_ENABLE(crashdump, 266cfc83b6cSPedro Giffuni[ --enable-crashdump Enable the crashdump feature code. 267cfc83b6cSPedro Giffuni],,) 268cfc83b6cSPedro GiffuniAC_ARG_ENABLE(cl-standard, 269cfc83b6cSPedro Giffuni[ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing 270cfc83b6cSPedro Giffuni standard compiler. ( This just disables optimization 271cfc83b6cSPedro Giffuni options and therefore removes a lot of warnings when 272cfc83b6cSPedro Giffuni using the cheaper standard compiler. ) 273cfc83b6cSPedro Giffuni],,) 274cfc83b6cSPedro GiffuniAC_ARG_ENABLE(win-x64-shellext, 275cfc83b6cSPedro Giffuni[ --enable-win-x64-shellext Enable the build/usage of Windows 64bit shell extensions. 276d507b48eSMatthias Seidel These extensions are used for the system integration on 277cfc83b6cSPedro Giffuni Windows 64bit systems. For example supporting the search 278cfc83b6cSPedro Giffuni in ODF files with the standard Windows search feature. 279cfc83b6cSPedro Giffuni],,) 280cfc83b6cSPedro GiffuniAC_ARG_ENABLE(gtk, 281cfc83b6cSPedro Giffuni[ --disable-gtk Determines whether to use Gtk+ vclplug on platforms 282cfc83b6cSPedro Giffuni where Gtk+ is available. 283cfc83b6cSPedro Giffuni],,enable_gtk=yes) 284cfc83b6cSPedro GiffuniAC_ARG_ENABLE(gstreamer, 285cfc83b6cSPedro Giffuni[ --enable-gstreamer Determines whether to use the GStreamer media 286cfc83b6cSPedro Giffuni backend on platforms where GStreamer is available. 287cfc83b6cSPedro Giffuni],,enable_gstreamer=no) 288cfc83b6cSPedro GiffuniAC_ARG_ENABLE(systray, 289cfc83b6cSPedro Giffuni[ --disable-systray Determines whether to build the systray quickstarter. 290cfc83b6cSPedro Giffuni],,enable_systray=yes) 291cfc83b6cSPedro GiffuniAC_ARG_ENABLE(cairo, 292cfc83b6cSPedro Giffuni[ --enable-cairo Determines whether to use Cairo library on 293cfc83b6cSPedro Giffuni platforms where Cairo is available. 294cfc83b6cSPedro Giffuni],,enable_cairo=no) 295cfc83b6cSPedro GiffuniAC_ARG_WITH(system-cairo, 296cfc83b6cSPedro Giffuni[ --with-system-cairo Use Cairo libraries already on system 297cfc83b6cSPedro Giffuni],,) 298cfc83b6cSPedro GiffuniAC_ARG_ENABLE(cairo-canvas, 299cfc83b6cSPedro Giffuni[ --disable-cairo-canvas Determines whether to build the Cairo canvas on 300cfc83b6cSPedro Giffuni platforms where Cairo is available. 301cfc83b6cSPedro Giffuni],,enable_cairo_canvas=yes) 302cfc83b6cSPedro GiffuniAC_ARG_ENABLE(opengl, 303cfc83b6cSPedro Giffuni[ --enable-opengl Determines whether to build the OpenGL 3D slide 304cfc83b6cSPedro Giffuni transitions component 305cfc83b6cSPedro Giffuni],,enable_opengl=no) 306cfc83b6cSPedro GiffuniAC_ARG_ENABLE(dbus, 307cfc83b6cSPedro Giffuni[ --enable-dbus Determines whether to enable presentation mode 308cfc83b6cSPedro Giffuni screensaver control under GNOME via DBUS 309cfc83b6cSPedro Giffuni],,enable_dbus=no) 310cfc83b6cSPedro GiffuniAC_ARG_ENABLE(gconf, 311cfc83b6cSPedro Giffuni[ --disable-gconf Determines whether to use the GConf support 312cfc83b6cSPedro Giffuni],,enable_gconf=yes) 313cfc83b6cSPedro GiffuniAC_ARG_ENABLE(gnome-vfs, 314cfc83b6cSPedro Giffuni[ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing 315cfc83b6cSPedro Giffuni System on platforms where that VFS is available 316ca91c472SDamjan Jovanovic],,enable_gnome_vfs=no) 317cfc83b6cSPedro GiffuniAC_ARG_ENABLE(gio, 318cfc83b6cSPedro Giffuni[ --enable-gio Determines whether to use the GIO support 319ca91c472SDamjan Jovanovic],,enable_gio=yes) 320cfc83b6cSPedro GiffuniAC_ARG_ENABLE(static-gtk, 321cfc83b6cSPedro Giffuni[ --enable-static-gtk Modules that are linked against gtk libraries use 322cfc83b6cSPedro Giffuni the static libraries instead of the dynamic ones. 323cfc83b6cSPedro Giffuni (enables -Bstatic linker flag for gtk libraries) 324cfc83b6cSPedro Giffuni],,) 325cfc83b6cSPedro GiffuniAC_ARG_ENABLE(layout, 326cfc83b6cSPedro Giffuni[ --enable-layout Enable the compilation and use of layout dialogs 327cfc83b6cSPedro Giffuni],,) 328cfc83b6cSPedro GiffuniAC_ARG_ENABLE(nss-module, 329cfc83b6cSPedro Giffuni[ --disable-nss-module Whether to use the NSS module that is used for xml-security 330cfc83b6cSPedro Giffuni],,enable_nss_module=yes) 331cfc83b6cSPedro GiffuniAC_ARG_ENABLE(kde, 332cfc83b6cSPedro Giffuni[ --enable-kde Determines whether to use Qt/KDE vclplug on platforms 333cfc83b6cSPedro Giffuni where Qt and KDE are available. 334cfc83b6cSPedro Giffuni],,) 335cfc83b6cSPedro GiffuniAC_ARG_ENABLE(kde4, 336cfc83b6cSPedro Giffuni[ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms 337cfc83b6cSPedro Giffuni where Qt4 and KDE4 are available. May be used with --enable-kde 338cfc83b6cSPedro Giffuni if you want to support both KDE3 and KDE4. 339cfc83b6cSPedro Giffuni],,) 340cfc83b6cSPedro GiffuniAC_ARG_ENABLE(rpath, 341cfc83b6cSPedro Giffuni[ --disable-rpath Disable the use of relative paths in shared libraries 342cfc83b6cSPedro Giffuni],,) 343cfc83b6cSPedro GiffuniAC_ARG_ENABLE(pam, 344cfc83b6cSPedro Giffuni[ --disable-pam Disable pam support. 345cfc83b6cSPedro Giffuni],,) 346cfc83b6cSPedro GiffuniAC_ARG_ENABLE(pam-link, 347cfc83b6cSPedro Giffuni[ --enable-pam-link link with libpam instead of dynamically open it 348cfc83b6cSPedro Giffuni],,) 349cfc83b6cSPedro GiffuniAC_ARG_ENABLE(crypt-link, 350cfc83b6cSPedro Giffuni[ --disable-crypt-link disable linking with libcrypt instead of dynamically 351cfc83b6cSPedro Giffuni open it (needed for ancient GNU/Linux distributions 352cfc83b6cSPedro Giffuni without crypt()/libcrypt) 353cfc83b6cSPedro Giffuni],,enable_crypt_link=yes) 354cfc83b6cSPedro GiffuniAC_ARG_ENABLE(xrender-link, 355cfc83b6cSPedro Giffuni[ --enable-xrender-link link with libXrender instead of dynamically open it 356cfc83b6cSPedro Giffuni],,) 357cfc83b6cSPedro GiffuniAC_ARG_ENABLE(randr, 358cfc83b6cSPedro Giffuni[ --disable-randr disable RandR support in the vcl project 359cfc83b6cSPedro Giffuni],,enable_randr=yes) 360cfc83b6cSPedro GiffuniAC_ARG_ENABLE(randr-link, 361cfc83b6cSPedro Giffuni[ --disable-randr-link disable linking with libXrandr, instead dynamically 362cfc83b6cSPedro Giffuni open it at runtime 363cfc83b6cSPedro Giffuni],,enable_randr_link=yes) 364cfc83b6cSPedro GiffuniAC_ARG_WITH(bundled-extension-blobs, 365cfc83b6cSPedro Giffuni[ --with-bundled-extension-blobs Whitespace separated list of files in the tarball directory 366cfc83b6cSPedro Giffuni that are to be bundled as-is for installation as extensions 367cfc83b6cSPedro Giffuni at the first program start. Make sure to only bundle extensions 368cfc83b6cSPedro Giffuni which can be installed without requiring a license dialog 369cfc83b6cSPedro Giffuni and comply with their distribution requirements by updating the 370cfc83b6cSPedro Giffuni files LICENSE_aggregated and NOTICE_aggregated accordingly 371cfc83b6cSPedro Giffuni],,) 372cfc83b6cSPedro Giffuni#AC_ARG_WITH(bundled-prereg-extensions, 373cfc83b6cSPedro Giffuni#[ --with-bundled-prereg-extensions Whitespace separated list of files in the tarball directory that 374cfc83b6cSPedro Giffuni# are to be bundled as pre-registered extensions. Make sure to only bundle 375cfc83b6cSPedro Giffuni# extensions which can be installed without requiring a license dialog 376cfc83b6cSPedro Giffuni#],,) 377cfc83b6cSPedro GiffuniAC_ARG_ENABLE(bundled-dictionaries, 378cfc83b6cSPedro Giffuni[ --enable-bundled-dictionaries Download dictionaries (spelling, hyphenation, thesaurus) 379cfc83b6cSPedro Giffuni according to main/extensions.lst and bundle them. Make sure to 380cfc83b6cSPedro Giffuni comply with their distribution requirements and update the 381cfc83b6cSPedro Giffuni files LICENSE_aggregated and NOTICE_aggregated accordingly 382cfc83b6cSPedro Giffuni],,enable_bundled_dictionaries=no) 383cfc83b6cSPedro Giffuni 384cfc83b6cSPedro Giffuni# Remove the following switches when not in release mode. 385cfc83b6cSPedro GiffuniAC_ARG_WITH(system-dicts, 386cfc83b6cSPedro Giffuni[ --with-system-dicts Use dictionaries from system paths- Specify 387cfc83b6cSPedro Giffuni them via --with-{dict,hyph,thes}-path=/path 388cfc83b6cSPedro Giffuni if you want to override the default ones 389cfc83b6cSPedro Giffuni],,) 390cfc83b6cSPedro GiffuniAC_ARG_WITH(external-dict-dir, 391cfc83b6cSPedro Giffuni[ --with-external-dict-dir Specify external dictionary dir 392cfc83b6cSPedro Giffuni],,) 393cfc83b6cSPedro GiffuniAC_ARG_WITH(external-hyph-dir, 394cfc83b6cSPedro Giffuni[ --with-external-hyph-dir Specify external hyphenation pattern dir 395cfc83b6cSPedro Giffuni],,) 396cfc83b6cSPedro GiffuniAC_ARG_WITH(external-thes-dir, 397cfc83b6cSPedro Giffuni[ --with-external-thes-dir Specify external thesaurus dir 398cfc83b6cSPedro Giffuni],,) 399cfc83b6cSPedro Giffuni# End of remove. 400cfc83b6cSPedro Giffuni 401cfc83b6cSPedro Giffuni 402cfc83b6cSPedro GiffuniAC_ARG_WITH(system-libs, 403cfc83b6cSPedro Giffuni[ --with-system-libs Use libs already on system -- enables all 404cfc83b6cSPedro Giffuni --with-system-* flags except 405cfc83b6cSPedro Giffuni odbc/sane/xrender-header(s) 406cfc83b6cSPedro Giffuni],,) 407cfc83b6cSPedro GiffuniAC_ARG_WITH(system-headers, 408cfc83b6cSPedro Giffuni[ --with-system-headers Use headers already on system -- enables all 409cfc83b6cSPedro Giffuni --with-system-* flags for external packages 410cfc83b6cSPedro Giffuni whose headers are the only entities used i.e. 411cfc83b6cSPedro Giffuni boost/vigra/odbc/sane/xrender-header(s) 412cfc83b6cSPedro Giffuni],,) 413cfc83b6cSPedro GiffuniAC_ARG_WITH(system-jars, 414cfc83b6cSPedro Giffuni[ --without-system-jars When building with --with-system-libs, also the 415cfc83b6cSPedro Giffuni needed jars are expected on the system. Use this to 416cfc83b6cSPedro Giffuni disable that. 417cfc83b6cSPedro Giffuni (except for the db case where --with-system-db 418cfc83b6cSPedro Giffuni *has to* imply using the db.jar from there, too) 419cfc83b6cSPedro Giffuni],,) 420cfc83b6cSPedro GiffuniAC_ARG_WITH(system-zlib, 421cfc83b6cSPedro Giffuni[ --with-system-zlib Use zlib already on system 422cfc83b6cSPedro Giffuni],,) 423cfc83b6cSPedro GiffuniAC_ARG_WITH(system-nss, 424cfc83b6cSPedro Giffuni[ --with-system-nss Use NSS already on system 425cfc83b6cSPedro Giffuni],,) 426cfc83b6cSPedro GiffuniAC_ARG_WITH(system-openssl, 427cfc83b6cSPedro Giffuni[ --with-system-openssl Use OpenSSL already on system 428cfc83b6cSPedro Giffuni],,) 429cfc83b6cSPedro GiffuniAC_ARG_WITH(system-jpeg, 430cfc83b6cSPedro Giffuni[ --with-system-jpeg Use jpeg already on system 431cfc83b6cSPedro Giffuni],,) 432cfc83b6cSPedro GiffuniAC_ARG_WITH(system-expat, 433cfc83b6cSPedro Giffuni[ --with-system-expat Use expat already on system 434cfc83b6cSPedro Giffuni],,) 435cfc83b6cSPedro GiffuniAC_ARG_WITH(system-libxml, 436cfc83b6cSPedro Giffuni[ --with-system-libxml Use libxml already on system 437cfc83b6cSPedro Giffuni],,) 438cfc83b6cSPedro GiffuniAC_ARG_WITH(system-python, 439cfc83b6cSPedro Giffuni[ --with-system-python Use python already on system 440cfc83b6cSPedro Giffuni],,) 441cfc83b6cSPedro GiffuniAC_ARG_WITH(system-icu, 442cfc83b6cSPedro Giffuni[ --with-system-icu Use icu already on system 443cfc83b6cSPedro Giffuni],,) 444cfc83b6cSPedro GiffuniAC_ARG_WITH(system-poppler, 445cfc83b6cSPedro Giffuni[ --with-system-poppler Use poppler already on system 446cfc83b6cSPedro Giffuni],,) 447cfc83b6cSPedro GiffuniAC_ARG_WITH(system-lucene, 448cfc83b6cSPedro Giffuni[ --with-system-lucene Use lucene already on system 449cfc83b6cSPedro Giffuni],,) 450cfc83b6cSPedro GiffuniAC_ARG_WITH(lucene-core-jar, 451cfc83b6cSPedro Giffuni[ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ], 452cfc83b6cSPedro Giffuni[ LUCENE_CORE_JAR="$withval" 453cfc83b6cSPedro Giffuni]) 454cfc83b6cSPedro GiffuniAC_ARG_WITH(lucene-analyzers-jar, 455cfc83b6cSPedro Giffuni[ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ], 456cfc83b6cSPedro Giffuni[ LUCENE_ANALYZERS_JAR="$withval" 457cfc83b6cSPedro Giffuni]) 458cfc83b6cSPedro GiffuniAC_ARG_ENABLE(mysql-connector, 459cfc83b6cSPedro Giffuni[ --enable-mysql-connector enables the build of the MySQL Connector/OOo extension. 460cfc83b6cSPedro Giffuni This requires access to the MySQL Connector/C (aka libmysql) to be given, too, with 461cfc83b6cSPedro Giffuni either the --with-system-mysql or --with-libmysql-path option. 462cfc83b6cSPedro Giffuni],,) 463cfc83b6cSPedro GiffuniAC_ARG_WITH(system-mysql, 464cfc83b6cSPedro Giffuni[ --with-system-mysql Use MySQL libraries already on system, for building the MySQL Connector/OOo extension. 465cfc83b6cSPedro Giffuni Requires MYSQLCONFIG to point to the mysql_config executable. 466cfc83b6cSPedro Giffuni],,) 467cfc83b6cSPedro GiffuniAC_ARG_WITH(libmysql-path, 468cfc83b6cSPedro Giffuni[ --with-libmysql-path Use Connector/C (libmysql) installation for building the MySQL Connector/OOo extension. 469cfc83b6cSPedro Giffuni 470cfc83b6cSPedro Giffuni Usage: --with-libmysql-path=<absolute path to your Connector/C installation> 471cfc83b6cSPedro Giffuni],,) 472cfc83b6cSPedro GiffuniAC_ARG_WITH(system-mysql-cppconn, 473cfc83b6cSPedro Giffuni[ --with-system-mysql-cppconn Use MySQL C++ Connector libraries already on system 474cfc83b6cSPedro Giffuni],,) 475cfc83b6cSPedro GiffuniAC_ARG_WITH(system-hsqldb, 476cfc83b6cSPedro Giffuni[ --with-system-hsqldb Use hsqldb already on system 477cfc83b6cSPedro Giffuni],,) 478cfc83b6cSPedro GiffuniAC_ARG_WITH(hsqldb-jar, 479cfc83b6cSPedro Giffuni[ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ], 480cfc83b6cSPedro Giffuni[ HSQLDB_JAR="$withval" 481cfc83b6cSPedro Giffuni]) 482cfc83b6cSPedro GiffuniAC_ARG_WITH(system-beanshell, 483cfc83b6cSPedro Giffuni[ --with-system-beanshell Use beanshell already on system (default) 484cfc83b6cSPedro Giffuni],,) 485cfc83b6cSPedro GiffuniAC_ARG_ENABLE(beanshell, 486cfc83b6cSPedro Giffuni[ --disable-beanshell Disable the use of beanshell. 487cfc83b6cSPedro Giffuni],,) 488cfc83b6cSPedro GiffuniAC_ARG_WITH(beanshell-jar, 489cfc83b6cSPedro Giffuni[ --with-beanshell-jar=JARFILE Specify path to jarfile manually ], 490cfc83b6cSPedro Giffuni[ BSH_JAR="$withval" 491cfc83b6cSPedro Giffuni]) 492cfc83b6cSPedro GiffuniAC_ARG_ENABLE(pdfimport, 493cfc83b6cSPedro Giffuni[ --enable-pdfimport enables the build of the PDF Import extension 494cfc83b6cSPedro Giffuni],,) 495cfc83b6cSPedro GiffuniAC_ARG_ENABLE(wiki-publisher, 496cfc83b6cSPedro Giffuni[ --enable-wiki-publisher enables the build of the Wiki Publisher extension 497cfc83b6cSPedro Giffuni],,) 498cfc83b6cSPedro GiffuniAC_ARG_WITH(commons-codec-jar, 499cfc83b6cSPedro Giffuni[ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ], 500cfc83b6cSPedro Giffuni[ COMMONS_CODEC_JAR="$withval" 501cfc83b6cSPedro Giffuni]) 502cfc83b6cSPedro GiffuniAC_ARG_WITH(commons-lang-jar, 503cfc83b6cSPedro Giffuni[ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ], 504cfc83b6cSPedro Giffuni[ COMMONS_LANG_JAR="$withval" 505cfc83b6cSPedro Giffuni]) 506cfc83b6cSPedro GiffuniAC_ARG_WITH(commons-httpclient-jar, 507cfc83b6cSPedro Giffuni[ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ], 508cfc83b6cSPedro Giffuni[ COMMONS_HTTPCLIENT_JAR="$withval" 509cfc83b6cSPedro Giffuni]) 510cfc83b6cSPedro GiffuniAC_ARG_WITH(commons-logging-jar, 511cfc83b6cSPedro Giffuni[ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ], 512cfc83b6cSPedro Giffuni[ COMMONS_LOGGING_JAR="$withval" 513cfc83b6cSPedro Giffuni]) 514cfc83b6cSPedro GiffuniAC_ARG_WITH(servlet-api-jar, 515cfc83b6cSPedro Giffuni[ --servlet-api-jar=JARFILE Specify path to jarfile manually ], 516cfc83b6cSPedro Giffuni[ SERVLETAPI_JAR="$withval" 517cfc83b6cSPedro Giffuni]) 518cfc83b6cSPedro GiffuniAC_ARG_ENABLE(report-builder, 519cfc83b6cSPedro Giffuni[ --enable-report-builder enables the build of the Report Builder extension 520cfc83b6cSPedro Giffuni],,) 521cfc83b6cSPedro GiffuniAC_ARG_WITH(sac-jar, 522cfc83b6cSPedro Giffuni[ --with-sac-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 523cfc83b6cSPedro Giffuni[ SAC_JAR="$withval" 524cfc83b6cSPedro Giffuni]) 525cfc83b6cSPedro GiffuniAC_ARG_WITH(libxml-jar, 526cfc83b6cSPedro Giffuni[ --with-libxml-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 527cfc83b6cSPedro Giffuni[ LIBXML_JAR="$withval" 528cfc83b6cSPedro Giffuni]) 529cfc83b6cSPedro GiffuniAC_ARG_WITH(flute-jar, 530cfc83b6cSPedro Giffuni[ --with-flute-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 531cfc83b6cSPedro Giffuni[ FLUTE_JAR="$withval" 532cfc83b6cSPedro Giffuni]) 533cfc83b6cSPedro GiffuniAC_ARG_WITH(jfreereport-jar, 534cfc83b6cSPedro Giffuni[ --with-jfreereport-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 535cfc83b6cSPedro Giffuni[ JFREEREPORT_JAR="$withval" 536cfc83b6cSPedro Giffuni]) 537cfc83b6cSPedro GiffuniAC_ARG_WITH(liblayout-jar, 538cfc83b6cSPedro Giffuni[ --with-liblayout-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 539cfc83b6cSPedro Giffuni[ LIBLAYOUT_JAR="$withval" 540cfc83b6cSPedro Giffuni]) 541cfc83b6cSPedro GiffuniAC_ARG_WITH(libloader-jar, 542cfc83b6cSPedro Giffuni[ --with-libloader-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 543cfc83b6cSPedro Giffuni[ LIBLOADER_JAR="$withval" 544cfc83b6cSPedro Giffuni]) 545cfc83b6cSPedro GiffuniAC_ARG_WITH(libformula-jar, 546cfc83b6cSPedro Giffuni[ --with-libformula-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 547cfc83b6cSPedro Giffuni[ LIBFORMULA_JAR="$withval" 548cfc83b6cSPedro Giffuni]) 549cfc83b6cSPedro GiffuniAC_ARG_WITH(librepository-jar, 550cfc83b6cSPedro Giffuni[ --with-librepository-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 551cfc83b6cSPedro Giffuni[ LIBREPOSITORY_JAR="$withval" 552cfc83b6cSPedro Giffuni]) 553cfc83b6cSPedro GiffuniAC_ARG_WITH(libfonts-jar, 554cfc83b6cSPedro Giffuni[ --with-libfonts-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 555cfc83b6cSPedro Giffuni[ LIBFONTS_JAR="$withval" 556cfc83b6cSPedro Giffuni]) 557cfc83b6cSPedro GiffuniAC_ARG_WITH(libserializer-jar, 558cfc83b6cSPedro Giffuni[ --with-libserializer-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 559cfc83b6cSPedro Giffuni[ LIBSERIALIZER_JAR="$withval" 560cfc83b6cSPedro Giffuni]) 561cfc83b6cSPedro GiffuniAC_ARG_WITH(libbase-jar, 562cfc83b6cSPedro Giffuni[ --with-libbase-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 563cfc83b6cSPedro Giffuni[ LIBBASE_JAR="$withval" 564cfc83b6cSPedro Giffuni]) 565cfc83b6cSPedro GiffuniAC_ARG_WITH(system-saxon, 566cfc83b6cSPedro Giffuni[ --with-system-saxon Use saxon already on system (default) 567cfc83b6cSPedro Giffuni],,) 568cfc83b6cSPedro GiffuniAC_ARG_ENABLE(saxon, 569cfc83b6cSPedro Giffuni[ --disable-saxon Disable use of saxon 570cfc83b6cSPedro Giffuni],,) 571cfc83b6cSPedro GiffuniAC_ARG_WITH(saxon-jar, 572cfc83b6cSPedro Giffuni[ --with-saxon-jar=JARFILE Specify path to jarfile manually. This implies --with-system-saxon ], 573cfc83b6cSPedro Giffuni[ SAXON_JAR="$withval" 574cfc83b6cSPedro Giffuni]) 575cfc83b6cSPedro GiffuniAC_ARG_WITH(system-libxslt, 576cfc83b6cSPedro Giffuni[ --with-system-libxslt Use libxslt already on system 577cfc83b6cSPedro Giffuni],,) 578cfc83b6cSPedro GiffuniAC_ARG_WITH(system-odbc, 579cfc83b6cSPedro Giffuni[ --with-system-odbc-headers Use the odbc headers already on system 580cfc83b6cSPedro Giffuni],,) 581cfc83b6cSPedro GiffuniAC_ARG_WITH(system-sane, 582cfc83b6cSPedro Giffuni[ --with-system-sane-header Use sane.h already on system 583cfc83b6cSPedro Giffuni],,) 584cfc83b6cSPedro GiffuniAC_ARG_WITH(system-xrender, 585cfc83b6cSPedro Giffuni[ --with-system-xrender-headers Use XRender headers already on system 586cfc83b6cSPedro Giffuni],,) 587cfc83b6cSPedro GiffuniAC_ARG_WITH(system-curl, 588cfc83b6cSPedro Giffuni[ --with-system-curl Use curl already on system 589cfc83b6cSPedro Giffuni],,) 590cfc83b6cSPedro GiffuniAC_ARG_WITH(system-boost, 591cfc83b6cSPedro Giffuni[ --with-system-boost Use boost already on system 592cfc83b6cSPedro Giffuni],,) 593cfc83b6cSPedro GiffuniAC_ARG_WITH(system-mdds, 594cfc83b6cSPedro Giffuni[ --with-system-mdds Use mdds already on system 595cfc83b6cSPedro Giffuni],,) 596cfc83b6cSPedro GiffuniAC_ARG_WITH(system-vigra, 597cfc83b6cSPedro Giffuni[ --with-system-vigra Use vigra already on system 598cfc83b6cSPedro Giffuni],,) 599cfc83b6cSPedro GiffuniAC_ARG_ENABLE(hunspell, 600cfc83b6cSPedro Giffuni[ --enable-hunspell Determines whether to enable the Hunspell library. 601cfc83b6cSPedro Giffuni If enabled, the library will be built unless you 602cfc83b6cSPedro Giffuni specify --with-system-hunspell to use the library 603cfc83b6cSPedro Giffuni already present on your system. 604cfc83b6cSPedro Giffuni If disabled, the Spell Checking component will also 605cfc83b6cSPedro Giffuni be disabled. 606cfc83b6cSPedro Giffuni (Default: hunspell disabled) 607cfc83b6cSPedro Giffuni],,enable_hunspell=no) 608cfc83b6cSPedro GiffuniAC_ARG_WITH(system-hunspell, 609cfc83b6cSPedro Giffuni[ --with-system-hunspell Use libhunspell already on system 610cfc83b6cSPedro Giffuni],,) 611cfc83b6cSPedro GiffuniAC_ARG_WITH(system-mythes, 612cfc83b6cSPedro Giffuni[ --with-system-mythes Use mythes already on system 613cfc83b6cSPedro Giffuni],,) 614cfc83b6cSPedro GiffuniAC_ARG_ENABLE(hyphen, 615cfc83b6cSPedro Giffuni[ --enable-hyphen Determines whether to enable the Hyphen library. 616cfc83b6cSPedro Giffuni If enabled, the library will be built unless you 617cfc83b6cSPedro Giffuni specify --with-system-hyphen to use the library 618cfc83b6cSPedro Giffuni already present on your system. 619cfc83b6cSPedro Giffuni If disabled, the Hyphenator component will also 620cfc83b6cSPedro Giffuni be disabled. 621cfc83b6cSPedro Giffuni (Default: hyphen disabled) 622cfc83b6cSPedro Giffuni],,enable_hyphen=no) 623cfc83b6cSPedro GiffuniAC_ARG_WITH(system-hyphen, 624cfc83b6cSPedro Giffuni[ --with-system-hyphen Use libhypeh already on system 625cfc83b6cSPedro Giffuni],,) 626cfc83b6cSPedro GiffuniAC_ARG_WITH(system-libtextcat, 627cfc83b6cSPedro Giffuni[ --with-system-libtextcat Use libtextcat already on system 628cfc83b6cSPedro Giffuni],,) 629cfc83b6cSPedro GiffuniAC_ARG_WITH(external-libtextcat-data, 630cfc83b6cSPedro Giffuni[ --with-system-libtextcat-data Use libtextcat data already on system 631cfc83b6cSPedro Giffuni],,) 632cfc83b6cSPedro GiffuniAC_ARG_WITH(system-redland, 633cfc83b6cSPedro Giffuni[ --with-system-redland Use redland library already on system 634cfc83b6cSPedro Giffuni],,) 635cfc83b6cSPedro GiffuniAC_ARG_WITH(stlport, 636cfc83b6cSPedro Giffuni[ --with-stlport Only building --without-stlport is supported. 637cfc83b6cSPedro Giffuni], WITH_STLPORT=$withval , WITH_STLPORT=no) 638cfc83b6cSPedro GiffuniAC_ARG_WITH(jdk-home, 639cfc83b6cSPedro Giffuni[ --with-jdk-home if you have installed JDK 1.3 or later on your system 640cfc83b6cSPedro Giffuni please supply the path here. 641cfc83b6cSPedro Giffuni Note that this is not the location of the Java binary 642cfc83b6cSPedro Giffuni but the location of the entire distribution. 643cfc83b6cSPedro Giffuni 644cfc83b6cSPedro Giffuni Usage: --with-jdk-home=<absolute path to JDK home> 645cfc83b6cSPedro Giffuni],,) 646cfc83b6cSPedro GiffuniAC_ARG_WITH(gxx_include_path, 647cfc83b6cSPedro Giffuni[ --with-gxx-include-path if you want to override the autodetected g++ include 648cfc83b6cSPedro Giffuni path. 649cfc83b6cSPedro Giffuni 650cfc83b6cSPedro Giffuni Usage: --with-gxx-include-path=<absolute path to g++ include dir> 651cfc83b6cSPedro Giffuni],,) 652cfc83b6cSPedro GiffuniAC_ARG_WITH(java, 653cfc83b6cSPedro Giffuni[ --with-java Build with[[out]] Java support. If you use 654cfc83b6cSPedro Giffuni --without-java/--with-java=no then the build will have 655cfc83b6cSPedro Giffuni no support for Java components, applets, accessibility 656cfc83b6cSPedro Giffuni or XML filters. 657cfc83b6cSPedro Giffuni], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java) 658cfc83b6cSPedro GiffuniAC_ARG_ENABLE(gcjaot, 659cfc83b6cSPedro Giffuni[ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation 660cfc83b6cSPedro Giffuni support to speed up buildsi by compiling the jars also 661cfc83b6cSPedro Giffuni to native code.. 662cfc83b6cSPedro Giffuni --enable-gcjaot is only known to work with bytecode 663cfc83b6cSPedro Giffuni created with gcj or ecj 664cfc83b6cSPedro Giffuni],,) 665cfc83b6cSPedro GiffuniAC_ARG_WITH(ant-home, 666cfc83b6cSPedro Giffuni[ --with-ant-home If you have installed Jakarta Ant on your system, 667cfc83b6cSPedro Giffuni please supply the path here. 668cfc83b6cSPedro Giffuni Note that this is not the location of the Ant binary 669cfc83b6cSPedro Giffuni but the location of the entire distribution. 670cfc83b6cSPedro Giffuni 671cfc83b6cSPedro Giffuni Usage: --with-ant-home=<absolute path to Ant home> 672cfc83b6cSPedro Giffuni],,) 673cfc83b6cSPedro GiffuniAC_ARG_WITH(junit, 674cfc83b6cSPedro Giffuni[ --with-junit Specifies the JUnit 4 jar file to use for JUnit-based 675cfc83b6cSPedro Giffuni tests. --without-junit disables those tests. Not 676f0157b90Skschenk relevant in the --without-java case. 677cfc83b6cSPedro Giffuni 678cfc83b6cSPedro Giffuni Usage: --with-junit=<absolute path to JUnit 4 jar> 679cfc83b6cSPedro Giffuni],,with_junit=yes) 680947c15fcSDamjan JovanovicAC_ARG_WITH(hamcrest-core, 681947c15fcSDamjan Jovanovic[ --with-hamcrest-core Specifies the hamcrest-core jar file to use for 682947c15fcSDamjan Jovanovic JUnit-based tests. --without-junit disables those 683947c15fcSDamjan Jovanovic tests. Not relevant in the --without-java or 684947c15fcSDamjan Jovanovic --without-junit cases, and only needed for recent 685947c15fcSDamjan Jovanovic versions of JUnit. (Default: disabled.) 686947c15fcSDamjan Jovanovic],,with_hamcrest_core=no) 687cfc83b6cSPedro GiffuniAC_ARG_WITH(perl-home, 688cfc83b6cSPedro Giffuni[ --with-perl-home If you have installed the Perl 5 Distribution, on your 689cfc83b6cSPedro Giffuni system, please supply the path here. 690cfc83b6cSPedro Giffuni Note that this is not the location of the Perl binary 691cfc83b6cSPedro Giffuni but the location of the entire distribution. 692cfc83b6cSPedro Giffuni 693cfc83b6cSPedro Giffuni Usage: --with-perl-home=<absolute path to Perl 5 home> 694cfc83b6cSPedro Giffuni],,) 695cfc83b6cSPedro GiffuniAC_ARG_WITH(cl-home, 696cfc83b6cSPedro Giffuni[ --with-cl-home For Windows NT users, please supply the path 697cfc83b6cSPedro Giffuni for the Microsoft C/C++ compiler. 698cfc83b6cSPedro Giffuni Note that this is not the location of the compiler 699cfc83b6cSPedro Giffuni binary but the location of the entire distribution. 700cfc83b6cSPedro Giffuni 701cfc83b6cSPedro Giffuni Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home> 702cfc83b6cSPedro Giffuni],,) 703cfc83b6cSPedro GiffuniAC_ARG_WITH(mspdb-path, 704cfc83b6cSPedro Giffuni[ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the 705cfc83b6cSPedro Giffuni path pointing to the mspdb71.dll (.NET 2003). 706cfc83b6cSPedro Giffuni 707cfc83b6cSPedro Giffuni Usage: --with-mspdb-path=<absolute path to mspdb71.dll> 708cfc83b6cSPedro Giffuni],,) 709cfc83b6cSPedro GiffuniAC_ARG_WITH(midl-path, 710cfc83b6cSPedro Giffuni[ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply 711cfc83b6cSPedro Giffuni the path pointing to the midl.exe. 712cfc83b6cSPedro Giffuni 713cfc83b6cSPedro Giffuni Usage: --with-midl-path=<absolute path to midl.exe> 714cfc83b6cSPedro Giffuni],,) 715cfc83b6cSPedro GiffuniAC_ARG_WITH(csc-path, 716cfc83b6cSPedro Giffuni[ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply 717cfc83b6cSPedro Giffuni the path pointing to the csc.exe. 718cfc83b6cSPedro Giffuni 719cfc83b6cSPedro Giffuni Usage: --with-csc-path=<absolute path to csc.exe> 720cfc83b6cSPedro Giffuni],,) 721cfc83b6cSPedro GiffuniAC_ARG_WITH(nsis-path, 722cfc83b6cSPedro Giffuni[ --with-nsis-path For Windows users, please supply the path to the 723cfc83b6cSPedro Giffuni "Nullsoft Scriptable Install System" (NSIS). If NSIS 724cfc83b6cSPedro Giffuni is found in the path or this option is supplied a self 725cfc83b6cSPedro Giffuni contained executable installer for Apache OpenOffice 726cfc83b6cSPedro Giffuni will be created. 727cfc83b6cSPedro Giffuni 728cfc83b6cSPedro Giffuni Usage: --with-nsis-path=<absolute path to nsis.exe> 729cfc83b6cSPedro Giffuni],,) 730cfc83b6cSPedro GiffuniAC_ARG_WITH(frame-home, 731cfc83b6cSPedro Giffuni[ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply 732cfc83b6cSPedro Giffuni the path pointing to lib/mscoree.lib, usually 733cfc83b6cSPedro Giffuni something like: 734cfc83b6cSPedro Giffuni "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK" 735cfc83b6cSPedro Giffuni 736cfc83b6cSPedro Giffuni MS Visual Toolkit compiler users, please supply the 737cfc83b6cSPedro Giffuni path pointing to lib/msvcrt.lib, usually something 738cfc83b6cSPedro Giffuni like: 739cfc83b6cSPedro Giffuni "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7" 740cfc83b6cSPedro Giffuni 741cfc83b6cSPedro Giffuni Usage: --with-frame-home=<absolute path to Framework SDK [[home]]> 742cfc83b6cSPedro Giffuni],,) 743cfc83b6cSPedro GiffuniAC_ARG_WITH(psdk-home, 744cfc83b6cSPedro Giffuni[ --with-psdk-home For Windows users, please supply the path to the 745cfc83b6cSPedro Giffuni Microsoft Platform SDK. 746cfc83b6cSPedro Giffuni 747cfc83b6cSPedro Giffuni Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK> 748cfc83b6cSPedro Giffuni],,) 749cfc83b6cSPedro GiffuniAC_ARG_WITH(directx-home, 750cfc83b6cSPedro Giffuni[ --with-directx-home For Windows users, please supply the path to the 751cfc83b6cSPedro Giffuni Microsoft DirectX SDK. 752cfc83b6cSPedro Giffuni 753cfc83b6cSPedro Giffuni Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK> 754cfc83b6cSPedro Giffuni],,) 755cfc83b6cSPedro GiffuniAC_ARG_WITH(mozilla-build, 756cfc83b6cSPedro Giffuni[ --with-mozilla-build For Windows users, please supply the path to the 757cfc83b6cSPedro Giffuni mozilla build tools. 758cfc83b6cSPedro Giffuni 759cfc83b6cSPedro Giffuni Usage: --with-mozilla-build=<absolute path to mozilla build tools> 760cfc83b6cSPedro Giffuni 761cfc83b6cSPedro Giffuni At the moment of this writing, an installer for the mozilla build tools 7629d1669aeSMatthias Seidel can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/. 763cfc83b6cSPedro Giffuni],[MOZILLABUILD=$withval],) 764cfc83b6cSPedro GiffuniAC_ARG_WITH(local-solenv, 765cfc83b6cSPedro Giffuni[ --with-local-solenv If you have solenv in a location other than ./solenv, 766cfc83b6cSPedro Giffuni please supply the path here. 767cfc83b6cSPedro Giffuni 768cfc83b6cSPedro Giffuni Usage: --with-local-solenv=<absolute path to solenv> 769cfc83b6cSPedro Giffuni],,) 770cfc83b6cSPedro GiffuniAC_ARG_WITH(local-solver, 771cfc83b6cSPedro Giffuni[ --with-local-solver if you have solver in a location other than ./solver, 772cfc83b6cSPedro Giffuni please supply the path here. 773cfc83b6cSPedro Giffuni 774cfc83b6cSPedro Giffuni Usage: --with-local-solver=<absolute path to solver> 775cfc83b6cSPedro Giffuni],,) 776cfc83b6cSPedro GiffuniAC_ARG_ENABLE(javascript, 777cfc83b6cSPedro Giffuni[ --disable-javascript Disables support for JavaScript macros. 778cfc83b6cSPedro Giffuni],,) 779cfc83b6cSPedro GiffuniAC_ARG_WITH(system-apr, 780cfc83b6cSPedro Giffuni[ --with-system-apr Use apr library already installed on the system 781cfc83b6cSPedro Giffuni],,) 782cfc83b6cSPedro GiffuniAC_ARG_WITH(system-apr-util, 783cfc83b6cSPedro Giffuni[ --with-system-apr-util Use apr-util library already installed on the system 784cfc83b6cSPedro Giffuni],,) 785cfc83b6cSPedro GiffuniAC_ARG_WITH(system-serf, 786cfc83b6cSPedro Giffuni[ --with-system-serf Use serf library already installed on the system 787cfc83b6cSPedro Giffuni],,) 788cfc83b6cSPedro GiffuniAC_ARG_WITH(system-coinmp, 789cfc83b6cSPedro Giffuni[ --with-system-coinmp Use CoinMP library already installed on the system 790cfc83b6cSPedro Giffuni],,) 791cfc83b6cSPedro GiffuniAC_ARG_ENABLE(coinmp, 792cfc83b6cSPedro Giffuni[ --disable-coinmp Do not use CoinMP as the Calc solver. 793cfc83b6cSPedro Giffuni],,) 794cfc83b6cSPedro GiffuniAC_ARG_ENABLE(check-only, 795cfc83b6cSPedro Giffuni[ --enable-check-only Use this option option if you just want to check your 796cfc83b6cSPedro Giffuni environment. This option stops the generation of an 797cfc83b6cSPedro Giffuni ????env.set 798cfc83b6cSPedro Giffuni 799cfc83b6cSPedro Giffuni Usage: --enable-check-only=yes 800cfc83b6cSPedro Giffuni],,) 801cfc83b6cSPedro GiffuniAC_ARG_ENABLE(ccache-skip, 802cfc83b6cSPedro Giffuni[[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to 803cfc83b6cSPedro Giffuni escape compiler flags that would otherwise prevent 804cfc83b6cSPedro Giffuni caching of the result (currently used on Mac only) 805cfc83b6cSPedro Giffuni NOTE: requires patched version because of a bug in 806cfc83b6cSPedro Giffuni ccache (see issue 104567 for details and patch) 807cfc83b6cSPedro Giffuni explicitly enable if your version of ccache does not 808cfc83b6cSPedro Giffuni identify as version 2.4_OOo 809cfc83b6cSPedro Giffuni]],,enable_ccache_skip=auto) 810cfc83b6cSPedro GiffuniAC_ARG_WITH(lang, 811cfc83b6cSPedro Giffuni[ --with-lang Use this option to build Apache OpenOffice with 812cfc83b6cSPedro Giffuni additional language support. English (US) is always 813cfc83b6cSPedro Giffuni included by default. Separate multiple languages with 814cfc83b6cSPedro Giffuni space. For all languages, use --with-lang=ALL. 815cfc83b6cSPedro Giffuni 816cfc83b6cSPedro Giffuni Usage: --with-lang="es sw tu cs sk" 817cfc83b6cSPedro Giffuni],,) 818cfc83b6cSPedro GiffuniAC_ARG_WITH(poor-help-localizations, 819cfc83b6cSPedro Giffuni[ --with-poor-help-localizations 820cfc83b6cSPedro Giffuni Use this option to specify which languages have 821cfc83b6cSPedro Giffuni unusable help localizations. Separate multiple 822cfc83b6cSPedro Giffuni languages with space. 823cfc83b6cSPedro Giffuni 824cfc83b6cSPedro Giffuni Usage: --with-poor-help-localizations="af ar be-BY ca" 825cfc83b6cSPedro Giffuni],,) 826cfc83b6cSPedro GiffuniAC_ARG_WITH(dict, 827cfc83b6cSPedro Giffuni[ --with-dict Use this option to build Apache OpenOffice with 828cfc83b6cSPedro Giffuni dictionary support. ALL dictionaries are always 829cfc83b6cSPedro Giffuni included by default unless overridden with 830cfc83b6cSPedro Giffuni this option. Separate multiple dictionaries with 831cfc83b6cSPedro Giffuni commas. For all dictionaries, use --with-dict=ALL. 832cfc83b6cSPedro Giffuni 833cfc83b6cSPedro Giffuni Usage: --with-dict=ENGB,ENUS,ITIT 834cfc83b6cSPedro Giffuni],,) 835cfc83b6cSPedro GiffuniAC_ARG_WITH(intro-bitmaps, 836cfc83b6cSPedro Giffuni[ --with-intro-bitmaps Prefer the specified intro bitmaps over the 837cfc83b6cSPedro Giffuni the default one. Can be more than one (separated by 838cfc83b6cSPedro Giffuni commas), the order means priority of fallback if the 839cfc83b6cSPedro Giffuni first does not exist (in the installed tree). 840cfc83b6cSPedro Giffuni 841cfc83b6cSPedro Giffuni Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp 842cfc83b6cSPedro Giffuni],,) 843cfc83b6cSPedro GiffuniAC_ARG_WITH(about-bitmaps, 844cfc83b6cSPedro Giffuni[ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows 845cfc83b6cSPedro Giffuni specification of bitmaps for the About box. 846cfc83b6cSPedro Giffuni 847cfc83b6cSPedro Giffuni Usage: --with-about-bitmaps=/path/my_ooo_about.bmp 848cfc83b6cSPedro Giffuni],,) 849cfc83b6cSPedro GiffuniAC_ARG_WITH(vendor, 850cfc83b6cSPedro Giffuni[ --with-vendor Set vendor of the build. 851cfc83b6cSPedro Giffuni 852cfc83b6cSPedro Giffuni Usage: --with-vendor="John the Builder" 853cfc83b6cSPedro Giffuni],,) 854cfc83b6cSPedro GiffuniAC_ARG_WITH(unix-wrapper, 855cfc83b6cSPedro Giffuni[ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used 856cfc83b6cSPedro Giffuni in the desktop files and in the desktop-integration RPMs. 857cfc83b6cSPedro Giffuni 858cfc83b6cSPedro Giffuni Usage: --with-unix-wrapper=ooffice 859cfc83b6cSPedro Giffuni],,) 860cfc83b6cSPedro GiffuniAC_ARG_WITH(asm-home, 861cfc83b6cSPedro Giffuni[ --with-asm-home For Windows users, please supply the path for the 862cfc83b6cSPedro Giffuni ml.exe assembler. 863cfc83b6cSPedro Giffuni 864cfc83b6cSPedro Giffuni Usage: --with-asm-home=<path to ml.exe directory> 865cfc83b6cSPedro Giffuni],,) 866ad35682bStruckmanAC_ARG_WITH(nasm-home, 867ad35682bStruckman[ --with-nasm-home For Windows users, please supply the path for the 868ad35682bStruckman nasm.exe assembler. 869ad35682bStruckman 870ad35682bStruckman Usage: --with-nasm-home=<path to nasm.exe directory> 871ad35682bStruckman],,) 872cfc83b6cSPedro GiffuniAC_ARG_WITH(os-version, 873cfc83b6cSPedro Giffuni[ --with-os-version For FreeBSD users, use this option option to override 874cfc83b6cSPedro Giffuni the detected OSVERSION. 875cfc83b6cSPedro Giffuni 876cfc83b6cSPedro Giffuni Usage: --with-os-version=<OSVERSION> 877cfc83b6cSPedro Giffuni],,) 878cfc83b6cSPedro GiffuniAC_ARG_WITH(unzip-home, 879cfc83b6cSPedro Giffuni[ --with-unzip-home Deprecated: use --with-zip-home instead],,) 880cfc83b6cSPedro GiffuniAC_ARG_WITH(zip-home, 881cfc83b6cSPedro Giffuni[ --with-zip-home If you use a non standard zip, for example windows 882cfc83b6cSPedro Giffuni please supply the path for zip 883cfc83b6cSPedro Giffuni 884cfc83b6cSPedro Giffuni Usage: --with-zip-home=<path to zip executable> 885cfc83b6cSPedro Giffuni],,) 886cfc83b6cSPedro GiffuniAC_ARG_WITH(mingwin, 887cfc83b6cSPedro Giffuni[ --with-mingwin For Windows users, use the mingwin32 compiler within 888cfc83b6cSPedro Giffuni cygwin environment 889cfc83b6cSPedro Giffuni 890cfc83b6cSPedro Giffuni Usage: --with-mingwin=yes 891cfc83b6cSPedro Giffuni 892cfc83b6cSPedro Giffuni For !Windows use, use the mingw32 C++ compiler to 893cfc83b6cSPedro Giffuni (re-) build unowinreg.dll. Specify the MinGW C++ 894cfc83b6cSPedro Giffuni Compilers name. 895cfc83b6cSPedro Giffuni 896cfc83b6cSPedro Giffuni Usage: --with-mingwin=i586-mingw32msvc-g++ 897cfc83b6cSPedro Giffuni],WITH_MINGWIN=$withval,WITH_MINGWIN=0) 898cfc83b6cSPedro GiffuniAC_ARG_WITH(build-version, 899cfc83b6cSPedro Giffuni[ --with-build-version Allows the builder to add a custom version tag 900cfc83b6cSPedro Giffuni that will appear in the Help/About box for QA 901cfc83b6cSPedro Giffuni purposes. 902cfc83b6cSPedro Giffuni 903cfc83b6cSPedro Giffuni Usage: --with-build-version="Built by Jim" 904cfc83b6cSPedro Giffuni],with_build_version=$withval) 905cfc83b6cSPedro GiffuniAC_ARG_WITH(alloc, 906cfc83b6cSPedro Giffuni[ --with-alloc Define which allocator to build with 907cfc83b6cSPedro Giffuni (choices are oo, system, tcmalloc, jemalloc) 908cfc83b6cSPedro Giffuni 909cfc83b6cSPedro Giffuni Note that on FreeBSD/NetBSD system==jemalloc 910cfc83b6cSPedro Giffuni],,) 911cfc83b6cSPedro GiffuniAC_ARG_ENABLE(verbose, 912cfc83b6cSPedro Giffuni[ --enable-verbose Increase build verbosity. 913cfc83b6cSPedro Giffuni --disable-verbose Decrease build verbosity. 914cfc83b6cSPedro Giffuni],,) 915cfc83b6cSPedro GiffuniAC_ARG_ENABLE(dependency-tracking, 916cfc83b6cSPedro Giffuni[ --disable-dependency-tracking Disables generation of dependency information. 917cfc83b6cSPedro Giffuni],,) 918cfc83b6cSPedro GiffuniAC_ARG_ENABLE(category-b, 919cfc83b6cSPedro Giffuni[ --enable-category-b Activate components under a category B license 920cfc83b6cSPedro Giffuni (see http://www.apache.org/legal/3party.html#category-b): 9214c76cf94Spfg MPL (hunspell, hyphen, nss, saxon, rhino), 922cfc83b6cSPedro Giffuni CPL (silgraphite), CPL/EPL (CoinMP), OFL (fonts). 923cfc83b6cSPedro Giffuni Flags for individual libraries override this one. 924cfc83b6cSPedro Giffuni],,) 925cfc83b6cSPedro GiffuniAC_ARG_WITH(arm-target, 926cfc83b6cSPedro Giffuni[ --arm-target The minimal targeted arm processor 927cfc83b6cSPedro Giffuni used for the build environment. 928cfc83b6cSPedro Giffuni Cases : 929cfc83b6cSPedro Giffuni arm-target < 6 : armv4t compatibility 930cfc83b6cSPedro Giffuni arm-target = 6 : exact armv6 compatibility 931cfc83b6cSPedro Giffuni arm-target > 6 : armv7-a compatibility 932cfc83b6cSPedro Giffuni 933cfc83b6cSPedro Giffuni Usage: --with-arm-target=7 934cfc83b6cSPedro Giffuni],with_arm_target=$withval,with_arm_target=4) 9350d16e2e7SJim JagielskiAC_ARG_WITH(macosx-target, 9360d16e2e7SJim Jagielski[ --macosx-target The minimal macOS/OSX deployment and build target 9370d16e2e7SJim Jagielski 938eda86b37SJim Jagielski Usage: --with-macosx-target=10.7 9390d16e2e7SJim Jagielski],with_macosx_target=$withval,with_macosx_target=10.7) 940cfc83b6cSPedro GiffuniAC_ARG_WITH(rat-scan, 941cfc83b6cSPedro Giffuni[ --with-rat-scan Scan source code for license headers. 942cfc83b6cSPedro Giffuni Use as --with-rat-scan to automatically download pre-built Rat binaries. 943cfc83b6cSPedro Giffuni Alternatively use as --with-rat-scan=<path-to-rat-direcetory> to use 944cfc83b6cSPedro Giffuni a separately installed library. 945cfc83b6cSPedro Giffuni],with_rat_scan=$withval,) 946cfc83b6cSPedro Giffuni 947cfc83b6cSPedro GiffuniBUILD_TYPE="OOo" 948cfc83b6cSPedro GiffuniADDITIONAL_REPOSITORIES="../ext_libraries" 949cfc83b6cSPedro GiffuniSCPDEFS="" 950cfc83b6cSPedro Giffuni 951cfc83b6cSPedro Giffunidnl =================================================================== 95231353920Spfgdnl Check configure script vs. configure.ac 953cfc83b6cSPedro Giffunidnl =================================================================== 954cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether configure is up-to-date]) 95531353920Spfgif test "configure" -ot "configure.ac"; then 956cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 957cfc83b6cSPedro Giffuni AC_MSG_ERROR([configure is not up-to-date, run autoconf first!]) 958cfc83b6cSPedro Giffunielse 959cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 960cfc83b6cSPedro Giffunifi 961cfc83b6cSPedro Giffunidnl =================================================================== 962cfc83b6cSPedro Giffunidnl Message. 963cfc83b6cSPedro Giffunidnl =================================================================== 964cfc83b6cSPedro Giffuniecho "********************************************************************" 965cfc83b6cSPedro Giffuniecho "* *" 966cfc83b6cSPedro Giffuniecho "* Apache OpenOffice build configuration. *" 967cfc83b6cSPedro Giffuniecho "* *" 968cfc83b6cSPedro Giffuniecho "* The configure process checks your platform to see whether *" 969cfc83b6cSPedro Giffuniecho "* you can build Apache OpenOffice on it. *" 970cfc83b6cSPedro Giffuniecho "* This process checks all pre-requisites and generates a file *" 971cfc83b6cSPedro Giffuniecho "* containing the necessary environment variables. *" 972cfc83b6cSPedro Giffuniecho "* Source this file after configure has ended successfully. *" 973cfc83b6cSPedro Giffuniecho "* *" 974cfc83b6cSPedro Giffuniecho "* Warnings that are generated during the configure process *" 975cfc83b6cSPedro Giffuniecho "* must be taken into account since it can be a reason for *" 976cfc83b6cSPedro Giffuniecho "* an unsuccessful build of Apache OpenOffice. *" 977cfc83b6cSPedro Giffuniecho "* *" 978cfc83b6cSPedro Giffuniecho "********************************************************************" 979cfc83b6cSPedro Giffuniecho "" 980cfc83b6cSPedro Giffuniecho "********************************************************************" 981cfc83b6cSPedro Giffuniecho "* *" 982cfc83b6cSPedro Giffuniecho "* Checking the platform pre-requisites. *" 983cfc83b6cSPedro Giffuniecho "* *" 984cfc83b6cSPedro Giffuniecho "********************************************************************" 985cfc83b6cSPedro Giffuniecho "" 986cfc83b6cSPedro Giffunidnl =================================================================== 987cfc83b6cSPedro Giffunidnl Configure pre-requisites. 988cfc83b6cSPedro Giffunidnl =================================================================== 989cfc83b6cSPedro Giffunicat /dev/null > warn 990cfc83b6cSPedro Giffuni 991cfc83b6cSPedro GiffuniAC_PROG_EGREP 992308295dbSJim Jagielskiif test -z "$GREP"; then 993308295dbSJim JagielskiGREP=$EGREP 994308295dbSJim Jagielskifi 995cfc83b6cSPedro GiffuniAC_PROG_AWK 996cfc83b6cSPedro GiffuniAC_PATH_PROG( AWK, $AWK) 997cfc83b6cSPedro Giffuniif test -z "$AWK"; then 998cfc83b6cSPedro Giffuni AC_MSG_ERROR([install awk to run this script]) 999cfc83b6cSPedro Giffunifi 1000cfc83b6cSPedro Giffuni 1001cfc83b6cSPedro GiffuniAC_PATH_PROGS(SED, sed ) 1002cfc83b6cSPedro Giffuniif test -z "$SED"; then 1003cfc83b6cSPedro Giffuni AC_MSG_ERROR([install sed to run this script]) 1004cfc83b6cSPedro Giffunifi 1005cfc83b6cSPedro Giffuni 1006cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for solenv environment]) 1007cfc83b6cSPedro Giffuniif test -z "$with_local_solenv"; then 1008cfc83b6cSPedro Giffuni LOCAL_SOLENV="DEFAULT" 1009cfc83b6cSPedro Giffuni AC_MSG_RESULT([default]) 1010cfc83b6cSPedro Giffunielse 1011cfc83b6cSPedro Giffuni LOCAL_SOLENV=$with_local_solenv 1012cfc83b6cSPedro Giffuni AC_MSG_RESULT([$with_local_solenv]) 1013cfc83b6cSPedro Giffunifi 1014cfc83b6cSPedro GiffuniAC_SUBST(LOCAL_SOLENV) 1015cfc83b6cSPedro Giffuni 1016cfc83b6cSPedro Giffuniif test "$LOCAL_SOLENV" = "DEFAULT"; then 1017cfc83b6cSPedro Giffuni _solenv="./solenv" 1018cfc83b6cSPedro Giffunielse 1019cfc83b6cSPedro Giffuni _solenv="$LOCAL_SOLENV" 1020cfc83b6cSPedro Giffunifi 1021cfc83b6cSPedro GiffuniAC_SUBST(_solenv) 1022cfc83b6cSPedro Giffuni 1023cfc83b6cSPedro Giffuniif test -e $_solenv/inc/minor.mk; then 1024cfc83b6cSPedro Giffuni # Get UPD number from ./solenv/inc/minor.mk 102528633775SPedro Giffuni UPD="`$GREP RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" 1026cfc83b6cSPedro Giffuni AC_SUBST(UPD) 102728633775SPedro Giffuni SOURCEVERSION="`$GREP SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" 1028cfc83b6cSPedro Giffuni AC_SUBST(SOURCEVERSION) 1029cfc83b6cSPedro Giffunielse 1030cfc83b6cSPedro Giffuni AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...]) 1031cfc83b6cSPedro Giffunifi 1032cfc83b6cSPedro Giffuni 1033cfc83b6cSPedro Giffuni 1034cfc83b6cSPedro Giffunidnl ================================================================== 1035cfc83b6cSPedro Giffunidnl Checks for custom pack.lst 1036cfc83b6cSPedro Giffunidnl ================================================================== 1037cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for custom pack.lst]) 1038cfc83b6cSPedro GiffuniCUSTOM_PACK_LIST= 1039cfc83b6cSPedro GiffuniUSE_PACKAGER= 1040cfc83b6cSPedro Giffuniif test -n "$with_packager_list" ; then 1041cfc83b6cSPedro Giffuni if test -e $with_packager_list; then 1042cfc83b6cSPedro Giffuni CUSTOM_PACK_LIST=$with_packager_list 1043cfc83b6cSPedro Giffuni USE_PACKAGER=YES 1044cfc83b6cSPedro Giffuni fi 1045cfc83b6cSPedro Giffunifi 1046cfc83b6cSPedro Giffuniif test -n "$CUSTOM_PACK_LIST"; then 1047cfc83b6cSPedro Giffuni AC_MSG_RESULT([$CUSTOM_PACK_LIST]) 1048cfc83b6cSPedro Giffunielse 1049cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1050cfc83b6cSPedro Giffunifi 1051cfc83b6cSPedro GiffuniAC_SUBST(CUSTOM_PACK_LIST) 1052cfc83b6cSPedro GiffuniAC_SUBST(USE_PACKAGER) 1053cfc83b6cSPedro Giffuni 1054cfc83b6cSPedro Giffuni 1055cfc83b6cSPedro Giffunidnl =================================================================== 1056cfc83b6cSPedro Giffunidnl Checks for the operating system and processor. 1057cfc83b6cSPedro Giffunidnl =================================================================== 1058cfc83b6cSPedro GiffuniAC_CANONICAL_SYSTEM 1059cfc83b6cSPedro Giffuniif test "$build" != "$host" -o "$build" != "$target" \ 1060cfc83b6cSPedro Giffuni -o "$host" != "$target"; then 1061cfc83b6cSPedro Giffuni AC_MSG_WARN([cross-compiling by any means is not supported (yet)!]) 1062cfc83b6cSPedro Giffuni echo "cross-compiling by any means is not supported (yet)!" >> warn 1063cfc83b6cSPedro Giffunifi 1064cfc83b6cSPedro Giffuni 106528633775SPedro Giffuniif echo "$build_os" | $GREP cygwin; then 1066cfc83b6cSPedro Giffuni AC_MSG_CHECKING([Cygwin version]) 1067cfc83b6cSPedro Giffuni CygwinVer=`uname -r` 1068cfc83b6cSPedro Giffuni AC_MSG_RESULT([$CygwinVer]) 1069cfc83b6cSPedro Giffuni if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then 1070cfc83b6cSPedro Giffuni AC_MSG_ERROR([You need at least Cygwin V1.5.x]) 1071cfc83b6cSPedro Giffuni fi 1072cfc83b6cSPedro Giffunielse 1073cfc83b6cSPedro Giffuni CygwinVer="false" 1074cfc83b6cSPedro Giffunifi 1075cfc83b6cSPedro Giffuni 1076cfc83b6cSPedro Giffuni# get info about the system provided release/version details 1077cfc83b6cSPedro Giffunihead /etc/*-release 1078cfc83b6cSPedro Giffuniuname -a 1079cfc83b6cSPedro Giffuni 1080cfc83b6cSPedro Giffunidnl =================================================================== 1081cfc83b6cSPedro Giffunidnl The following is a list of supported systems. 1082cfc83b6cSPedro Giffunidnl Sequential to keep the logic very simple 1083cfc83b6cSPedro Giffunidnl These values may be checked and reset later. 1084cfc83b6cSPedro Giffunidnl =================================================================== 1085cfc83b6cSPedro Giffunicase "$build_os" in 1086cfc83b6cSPedro Giffuni solaris*) 1087cfc83b6cSPedro Giffuni test_gtk=yes 1088cfc83b6cSPedro Giffuni test_cairo=yes 1089cfc83b6cSPedro Giffuni test_kde=yes 1090cfc83b6cSPedro Giffuni test_cups=yes 1091cfc83b6cSPedro Giffuni test_randr=yes 1092cfc83b6cSPedro Giffuni test_freetype=yes 1093cfc83b6cSPedro Giffuni test_gstreamer=yes 1094cfc83b6cSPedro Giffuni _os=SunOS 1095cfc83b6cSPedro Giffuni AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin) 1096cfc83b6cSPedro Giffuni if test -z "$GNUTAR"; then 1097cfc83b6cSPedro Giffuni AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).]) 1098cfc83b6cSPedro Giffuni fi 1099cfc83b6cSPedro Giffuni AC_SUBST(GNUTAR) 1100cfc83b6cSPedro Giffuni 1101cfc83b6cSPedro Giffuni dnl =========================================================== 1102cfc83b6cSPedro Giffuni dnl check whether we're using solaris 6,7,8 - sparc or intel. 1103cfc83b6cSPedro Giffuni dnl =========================================================== 1104cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the Solaris operating system release]) 1105cfc83b6cSPedro Giffuni _os_release=`echo $build_os | $SED -e s/solaris2\.//` 1106cfc83b6cSPedro Giffuni if test "$_os_release" -lt "6"; then 1107cfc83b6cSPedro Giffuni AC_MSG_ERROR([use solaris >= 6 to build Apache OpenOffice]) 1108cfc83b6cSPedro Giffuni else 1109cfc83b6cSPedro Giffuni AC_MSG_RESULT([ok ($_os_release)]) 1110cfc83b6cSPedro Giffuni fi 1111cfc83b6cSPedro Giffuni 1112cfc83b6cSPedro Giffuni dnl check whether we're using a sparc or i386 processor 1113cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the processor type]) 1114cfc83b6cSPedro Giffuni if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then 1115cfc83b6cSPedro Giffuni AC_MSG_RESULT([ok ($build_cpu)]) 1116cfc83b6cSPedro Giffuni else 1117cfc83b6cSPedro Giffuni AC_MSG_ERROR([only sparc and i386 processors are supported]) 1118cfc83b6cSPedro Giffuni fi 1119cfc83b6cSPedro Giffuni ;; 1120cfc83b6cSPedro Giffuni linux-gnu*|k*bsd*-gnu*) 1121cfc83b6cSPedro Giffuni test_gtk=yes 1122cfc83b6cSPedro Giffuni test_cairo=yes 1123cfc83b6cSPedro Giffuni test_kde=yes 1124cfc83b6cSPedro Giffuni test_kde4=yes 1125cfc83b6cSPedro Giffuni test_cups=yes 1126cfc83b6cSPedro Giffuni test_randr=yes 1127cfc83b6cSPedro Giffuni test_freetype=yes 1128cfc83b6cSPedro Giffuni test_gstreamer=yes 1129cfc83b6cSPedro Giffuni _os=Linux 1130cfc83b6cSPedro Giffuni ;; 1131cfc83b6cSPedro Giffuni gnu) 1132cfc83b6cSPedro Giffuni test_cups=no 1133cfc83b6cSPedro Giffuni _os=GNU 1134cfc83b6cSPedro Giffuni ;; 1135cfc83b6cSPedro Giffuni cygwin*) # Windows 1136cfc83b6cSPedro Giffuni test_cups=no 1137cfc83b6cSPedro Giffuni test_cairo=yes 1138cfc83b6cSPedro Giffuni test_freetype=no 1139cfc83b6cSPedro Giffuni test_gstreamer=no 1140cfc83b6cSPedro Giffuni _os=WINNT 1141cfc83b6cSPedro Giffuni ;; 1142cfc83b6cSPedro Giffuni darwin*) # Mac OS X 1143cfc83b6cSPedro Giffuni test_cups=yes 1144cfc83b6cSPedro Giffuni test_gtk=yes 1145cfc83b6cSPedro Giffuni test_cairo=yes 1146cfc83b6cSPedro Giffuni test_randr=no 1147cfc83b6cSPedro Giffuni test_freetype=no 1148cfc83b6cSPedro Giffuni test_gstreamer=no 1149cfc83b6cSPedro Giffuni _os=Darwin 1150cfc83b6cSPedro Giffuni if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then 1151cfc83b6cSPedro Giffuni AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray]) 1152cfc83b6cSPedro Giffuni echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn 1153cfc83b6cSPedro Giffuni enable_systray=no 1154cfc83b6cSPedro Giffuni fi 1155cfc83b6cSPedro Giffuni if test ! -n "$CC"; then 1156cfc83b6cSPedro Giffuni CC="`xcrun -f clang` -arch x86_64" 1157cfc83b6cSPedro Giffuni fi 1158cfc83b6cSPedro Giffuni if test ! -n "$CXX"; then 115987bf159bSJim Jagielski CXX="`xcrun -f clang++` -arch x86_64" 1160cfc83b6cSPedro Giffuni fi 1161221de5adSjim # Don't use OSVERSION until we know no conflicts result from it 1162221de5adSjim _darwin_version="`uname -r | $AWK -F . '{ print $1 }'`" 1163221de5adSjim _osx_version="10.`expr $_darwin_version - 4`" 1164221de5adSjim AC_MSG_NOTICE([Detected Darwin version: $_darwin_version ($_osx_version)]) 1165cfc83b6cSPedro Giffuni ;; 1166cfc83b6cSPedro Giffuni os2*) 1167cfc83b6cSPedro Giffuni test_x=no 1168cfc83b6cSPedro Giffuni test_cups=no 1169cfc83b6cSPedro Giffuni test_randr=no 1170cfc83b6cSPedro Giffuni test_gtk=no 1171cfc83b6cSPedro Giffuni test_freetype=no 1172cfc83b6cSPedro Giffuni test_gstreamer=no 1173cfc83b6cSPedro Giffuni _os=OS2 1174cfc83b6cSPedro Giffuni ;; 1175cfc83b6cSPedro Giffuni freebsd*) 1176cfc83b6cSPedro Giffuni test_gtk=yes 1177cfc83b6cSPedro Giffuni test_cairo=yes 1178cfc83b6cSPedro Giffuni test_kde=yes 1179cfc83b6cSPedro Giffuni test_kde4=yes 1180cfc83b6cSPedro Giffuni test_cups=yes 1181cfc83b6cSPedro Giffuni test_randr=yes 1182cfc83b6cSPedro Giffuni test_freetype=yes 1183cfc83b6cSPedro Giffuni test_gstreamer=yes 1184cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the FreeBSD operating system release]) 1185cfc83b6cSPedro Giffuni if test -n "$with_os_version"; then 1186cfc83b6cSPedro Giffuni OSVERSION="$with_os_version" 1187cfc83b6cSPedro Giffuni else 1188cfc83b6cSPedro Giffuni OSVERSION=`/sbin/sysctl -n kern.osreldate` 1189cfc83b6cSPedro Giffuni fi 1190cfc83b6cSPedro Giffuni AC_MSG_RESULT([found OSVERSION=$OSVERSION]) 1191cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which thread library to use]) 1192cfc83b6cSPedro Giffuni if test "$OSVERSION" -lt "500016"; then 1193cfc83b6cSPedro Giffuni PTHREAD_CFLAGS="-D_THREAD_SAFE" 1194cfc83b6cSPedro Giffuni PTHREAD_LIBS="-pthread" 1195cfc83b6cSPedro Giffuni elif test "$OSVERSION" -lt "502102"; then 1196cfc83b6cSPedro Giffuni PTHREAD_CFLAGS="-D_THREAD_SAFE" 1197cfc83b6cSPedro Giffuni PTHREAD_LIBS="-lc_r" 1198cfc83b6cSPedro Giffuni else 1199cfc83b6cSPedro Giffuni PTHREAD_CFLAGS="" 1200cfc83b6cSPedro Giffuni PTHREAD_LIBS="-pthread" 1201cfc83b6cSPedro Giffuni fi 1202cfc83b6cSPedro Giffuni AC_MSG_RESULT([$PTHREAD_LIBS]) 1203cfc83b6cSPedro Giffuni _os=FreeBSD 1204cfc83b6cSPedro Giffuni ;; 1205cfc83b6cSPedro Giffuni osf) 1206cfc83b6cSPedro Giffuni test_cups=no 1207cfc83b6cSPedro Giffuni test_randr=no 1208cfc83b6cSPedro Giffuni _os=OSF1 1209cfc83b6cSPedro Giffuni ;; 1210cfc83b6cSPedro Giffuni netbsd) 1211cfc83b6cSPedro Giffuni test_gtk=yes 1212cfc83b6cSPedro Giffuni test_cairo=yes 1213cfc83b6cSPedro Giffuni test_kde=yes 1214cfc83b6cSPedro Giffuni test_kde4=yes 1215cfc83b6cSPedro Giffuni test_cups=no 1216cfc83b6cSPedro Giffuni test_randr=yes 1217cfc83b6cSPedro Giffuni test_freetype=yes 1218cfc83b6cSPedro Giffuni test_gstreamer=yes 1219cfc83b6cSPedro Giffuni PTHREAD_CFLAGS="-pthread" 1220cfc83b6cSPedro Giffuni PTHREAD_LIBS="-pthread -lpthread" 1221cfc83b6cSPedro Giffuni _os=NetBSD 1222cfc83b6cSPedro Giffuni ;; 1223cfc83b6cSPedro Giffuni aix*) 1224cfc83b6cSPedro Giffuni test_cups=no 1225cfc83b6cSPedro Giffuni test_randr=no 1226cfc83b6cSPedro Giffuni test_freetype=yes 1227cfc83b6cSPedro Giffuni test_gstreamer=yes 1228cfc83b6cSPedro Giffuni PTHREAD_LIBS=-pthread 1229cfc83b6cSPedro Giffuni echo "AIX is an alpha port --- Use at own risk" >> warn 1230cfc83b6cSPedro Giffuni _os=AIX 1231cfc83b6cSPedro Giffuni ;; 1232cfc83b6cSPedro Giffuni *) 1233cfc83b6cSPedro Giffuni AC_MSG_ERROR([$_os operating system is not suitable to build Apache OpenOffice!]) 1234cfc83b6cSPedro Giffuni ;; 1235cfc83b6cSPedro Giffuniesac 1236cfc83b6cSPedro Giffuni 1237cfc83b6cSPedro GiffuniAC_SUBST(OSVERSION) 1238cfc83b6cSPedro GiffuniAC_SUBST(PTHREAD_CFLAGS) 1239cfc83b6cSPedro GiffuniAC_SUBST(PTHREAD_LIBS) 1240cfc83b6cSPedro Giffuni 1241cfc83b6cSPedro Giffuni 1242cfc83b6cSPedro Giffunidnl Ensure pkg-config is initialized before any possible use 1243cfc83b6cSPedro GiffuniPKG_PROG_PKG_CONFIG 1244cfc83b6cSPedro Giffuni 1245cfc83b6cSPedro Giffuni 1246cfc83b6cSPedro Giffunidnl =================================================================== 1247cfc83b6cSPedro Giffunidnl Set the ENABLE_CRASHDUMP variable. 1248cfc83b6cSPedro Giffunidnl =================================================================== 1249cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable crashdump feature]) 1250cfc83b6cSPedro Giffuniif test "$enable_crashdump" = "yes"; then 1251cfc83b6cSPedro Giffuni ENABLE_CRASHDUMP="TRUE" 1252cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE CRASHREP" 1253cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1254cfc83b6cSPedro Giffunielse 1255cfc83b6cSPedro Giffuni ENABLE_CRASHDUMP="" 1256cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1257cfc83b6cSPedro Giffunifi 1258cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_CRASHDUMP) 1259cfc83b6cSPedro Giffuni 1260cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 1261cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE TWAIN" 1262cfc83b6cSPedro Giffunifi 1263cfc83b6cSPedro Giffuni 1264cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 1265cfc83b6cSPedro Giffuni dnl =================================================================== 1266cfc83b6cSPedro Giffuni dnl Set the VC_STANDARD variable. 1267cfc83b6cSPedro Giffuni dnl =================================================================== 1268cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use the standard non-optimizing compiler]) 1269cfc83b6cSPedro Giffuni if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then 1270cfc83b6cSPedro Giffuni VC_STANDARD="" 1271cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1272cfc83b6cSPedro Giffuni else 1273cfc83b6cSPedro Giffuni VC_STANDARD="TRUE" 1274cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1275cfc83b6cSPedro Giffuni fi 1276cfc83b6cSPedro Giffuni AC_SUBST(VC_STANDARD) 1277cfc83b6cSPedro Giffunifi 1278cfc83b6cSPedro Giffuni 1279cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 1280cfc83b6cSPedro Giffuni dnl =================================================================== 1281cfc83b6cSPedro Giffuni dnl Set the BUILD_X64 variable. 1282cfc83b6cSPedro Giffuni dnl =================================================================== 1283cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to build/use the Windows 64bit shell extensions]) 1284cfc83b6cSPedro Giffuni if test "$enable_win_x64_shellext" = "" -o "$enable_win_x64_shellext" = "no"; then 1285cfc83b6cSPedro Giffuni BUILD_X64="" 1286cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1287cfc83b6cSPedro Giffuni else 1288cfc83b6cSPedro Giffuni BUILD_X64="TRUE" 1289cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1290cfc83b6cSPedro Giffuni fi 1291cfc83b6cSPedro Giffuni AC_SUBST(BUILD_X64) 1292cfc83b6cSPedro Giffunifi 1293cfc83b6cSPedro Giffuni 1294cfc83b6cSPedro Giffunidnl =================================================================== 1295cfc83b6cSPedro Giffunidnl Set the ENABLE_WERROR variable. (Activate --enable-werror) 1296cfc83b6cSPedro Giffunidnl =================================================================== 1297cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to turn warnings to errors]) 1298cfc83b6cSPedro Giffuniif test -n "$enable_werror" && test "$enable_werror" != "no"; then 1299cfc83b6cSPedro Giffuni ENABLE_WERROR="TRUE" 1300cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1301cfc83b6cSPedro Giffuni AC_MSG_WARN([Turning warnings to errors has no effect in modules or]) 1302cfc83b6cSPedro Giffuni AC_MSG_WARN([on platforms where it has been disabled explicitely]) 1303cfc83b6cSPedro Giffuni echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn 1304cfc83b6cSPedro Giffunielse 1305cfc83b6cSPedro Giffuni ENABLE_WERROR="FALSE" 1306cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1307cfc83b6cSPedro Giffunifi 1308cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_WERROR) 1309cfc83b6cSPedro Giffuni 1310cfc83b6cSPedro Giffunidnl =================================================================== 1311cfc83b6cSPedro Giffunidnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols) 1312cfc83b6cSPedro Giffunidnl =================================================================== 1313cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to do a debug build]) 1314cfc83b6cSPedro Giffuniif test -n "$enable_debug" && test "$enable_debug" != "no"; then 1315cfc83b6cSPedro Giffuni ENABLE_DEBUG="TRUE" 1316cfc83b6cSPedro Giffuni if test -z "$enable_symbols"; then 1317cfc83b6cSPedro Giffuni enable_symbols="yes" 1318cfc83b6cSPedro Giffuni fi 1319cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1320cfc83b6cSPedro Giffunielse 1321cfc83b6cSPedro Giffuni ENABLE_DEBUG="FALSE" 1322cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1323cfc83b6cSPedro Giffunifi 1324cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_DEBUG) 1325cfc83b6cSPedro Giffuni 1326cfc83b6cSPedro Giffunidnl =================================================================== 1327cfc83b6cSPedro Giffunidnl Set the ENABLE_DBGUTIL variable 1328cfc83b6cSPedro Giffunidnl =================================================================== 1329cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build with additional debug utilities]) 1330cfc83b6cSPedro Giffuniif test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then 1331cfc83b6cSPedro Giffuni PROEXT="" 1332cfc83b6cSPedro Giffuni PRODUCT="" 1333cfc83b6cSPedro Giffuni PROFULLSWITCH="" 1334cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1335cfc83b6cSPedro Giffunielse 1336cfc83b6cSPedro Giffuni PRODUCT="full" 1337cfc83b6cSPedro Giffuni PROFULLSWITCH="product=full" 1338cfc83b6cSPedro Giffuni PROEXT=".pro" 1339cfc83b6cSPedro Giffuni AC_MSG_RESULT([no, full product build]) 1340cfc83b6cSPedro Giffunifi 1341cfc83b6cSPedro GiffuniAC_SUBST(PRODUCT) 1342cfc83b6cSPedro GiffuniAC_SUBST(PROFULLSWITCH) 1343cfc83b6cSPedro GiffuniAC_SUBST(PROEXT) 1344cfc83b6cSPedro Giffuni 1345cfc83b6cSPedro Giffunidnl =================================================================== 1346cfc83b6cSPedro Giffunidnl First setting is whether to include symbols into final build. 1347cfc83b6cSPedro Giffunidnl =================================================================== 1348cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to include symbols into final build]) 1349cfc83b6cSPedro Giffuniif test -n "$enable_symbols" && test "$enable_symbols" != "no"; then 1350cfc83b6cSPedro Giffuni if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then 1351cfc83b6cSPedro Giffuni ENABLE_SYMBOLS="TRUE" 1352cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1353cfc83b6cSPedro Giffuni else 1354cfc83b6cSPedro Giffuni if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then 1355cfc83b6cSPedro Giffuni ENABLE_SYMBOLS="SMALL" 1356cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, small ones]) 1357cfc83b6cSPedro Giffuni else if test "$enable_symbols" != "no" ; then 1358cfc83b6cSPedro Giffuni echo enable symbols is: $enable_symbols 1359cfc83b6cSPedro Giffuni AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.]) 1360cfc83b6cSPedro Giffuni else 1361cfc83b6cSPedro Giffuni ENABLE_SYMBOLS= 1362cfc83b6cSPedro Giffuni fi 1363cfc83b6cSPedro Giffuni fi 1364cfc83b6cSPedro Giffuni fi 1365cfc83b6cSPedro Giffunielse 1366cfc83b6cSPedro Giffuni ENABLE_SYMBOLS= 1367cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1368cfc83b6cSPedro Giffunifi 1369cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_SYMBOLS) 1370cfc83b6cSPedro Giffuni 1371cfc83b6cSPedro Giffunidnl =================================================================== 1372cfc83b6cSPedro Giffunidnl Determine if the solver is to be stripped or not. 1373cfc83b6cSPedro Giffunidnl =================================================================== 1374cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to strip the solver or not.]) 1375cfc83b6cSPedro Giffuniif test -n "$enable_strip_solver"; then 1376cfc83b6cSPedro Giffuni if test "$enable_strip_solver" = "yes"; then 1377cfc83b6cSPedro Giffuni DISABLE_STRIP= 1378cfc83b6cSPedro Giffuni else if test "$enable_strip_solver" = "no"; then 1379cfc83b6cSPedro Giffuni DISABLE_STRIP="TRUE" 1380cfc83b6cSPedro Giffuni else 1381cfc83b6cSPedro Giffuni AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.]) 1382cfc83b6cSPedro Giffuni fi 1383cfc83b6cSPedro Giffuni fi 1384cfc83b6cSPedro Giffunielse 1385cfc83b6cSPedro Giffuni if test -n "$ENABLE_SYMBOLS"; then 1386cfc83b6cSPedro Giffuni DISABLE_STRIP="TRUE" 1387cfc83b6cSPedro Giffuni else 1388cfc83b6cSPedro Giffuni DISABLE_STRIP= 1389cfc83b6cSPedro Giffuni fi 1390cfc83b6cSPedro Giffunifi 1391cfc83b6cSPedro Giffuniif test -z "$DISABLE_STRIP"; then 1392cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1393cfc83b6cSPedro Giffunielse 1394cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1395cfc83b6cSPedro Giffunifi 1396cfc83b6cSPedro GiffuniAC_SUBST(DISABLE_STRIP) 1397cfc83b6cSPedro Giffuni 1398cfc83b6cSPedro Giffunidnl =================================================================== 1399cfc83b6cSPedro Giffunidnl Build options 1400cfc83b6cSPedro Giffunidnl =================================================================== 1401cfc83b6cSPedro Giffuni 1402cfc83b6cSPedro Giffuni# Disable or enable category-B librariets: nss, hunspell, hyphen, saxon, 1403cfc83b6cSPedro Giffuni# rhino, silgraphite. 1404cfc83b6cSPedro Giffuni 1405cfc83b6cSPedro Giffuni# Note that further below they may be enabled or disabled again by 1406cfc83b6cSPedro Giffuni# more specific options. 1407cfc83b6cSPedro Giffuni 1408cfc83b6cSPedro GiffuniENABLE_CATEGORY_B= 1409cfc83b6cSPedro Giffuni 1410cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable category B components]) 1411cfc83b6cSPedro Giffuni# Category B modules (libraries): 1412cfc83b6cSPedro Giffuni# nss (nss) 1413cfc83b6cSPedro Giffuni# hunspell (hunspell) 1414cfc83b6cSPedro Giffuni# hyphen (hyphen) 1415cfc83b6cSPedro Giffuni# saxon (saxon) 1416cfc83b6cSPedro Giffuni# rhino (rhino) 1417cfc83b6cSPedro Giffuni# graphite (silgraphite) 1418cfc83b6cSPedro Giffuniif test "$enable_category_b" = "yes"; then 1419cfc83b6cSPedro Giffuni ENABLE_CATEGORY_B=YES 1420cfc83b6cSPedro Giffuni enable_hunspell="yes" 1421cfc83b6cSPedro Giffuni enable_hyphen="yes" 1422cfc83b6cSPedro Giffuni enable_saxon="yes" 1423cfc83b6cSPedro Giffuni enable_javascript="yes" 1424cfc83b6cSPedro Giffuni enable_graphite="yes" 1425cfc83b6cSPedro Giffuni enable_coinmp="yes" 1426cfc83b6cSPedro Giffuni enable_category_b_fonts="yes" 1427cfc83b6cSPedro Giffuni 1428cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes: allow modules nss, hunspell, hyphen, saxon, rhino, beanshell, graphite, coinmp to be built]) 1429cfc83b6cSPedro Giffunielse 1430cfc83b6cSPedro Giffuni # Disable libraries. 1431cfc83b6cSPedro Giffuni enable_nss_module="no" 1432cfc83b6cSPedro Giffuni enable_hunspell="no" 1433cfc83b6cSPedro Giffuni enable_hyphen="no" 1434cfc83b6cSPedro Giffuni enable_saxon="no" 1435cfc83b6cSPedro Giffuni enable_javascript="no" 1436cfc83b6cSPedro Giffuni enable_graphite="no" 1437cfc83b6cSPedro Giffuni enable_coinmp="no" 1438cfc83b6cSPedro Giffuni enable_category_b_fonts="no" 1439cfc83b6cSPedro Giffuni 1440cfc83b6cSPedro Giffuni AC_MSG_RESULT([no: disabled modules nss, hunspell, hyphen, saxon, rhino, graphite, coinmp]) 1441cfc83b6cSPedro Giffunifi 1442cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_CATEGORY_B) 1443cfc83b6cSPedro Giffuni 1444cfc83b6cSPedro Giffuni# gstreamer is used only via pre-installed libraries: not a problem 1445cfc83b6cSPedro Giffuni 1446cfc83b6cSPedro Giffunidnl =================================================================== 1447cfc83b6cSPedro Giffunidnl Online Update 1448cfc83b6cSPedro Giffunidnl =================================================================== 1449cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable the Online Update support]) 1450cfc83b6cSPedro Giffuniif test "$enable_online_update" = "yes" -o "$enable_online_update" = "TRUE"; then 1451cfc83b6cSPedro Giffuni ENABLE_ONLINE_UPDATE="YES" 1452cfc83b6cSPedro Giffuni SCPDEFS="$SCPDEFS -DENABLE_ONLINE_UPDATE" 1453cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1454cfc83b6cSPedro Giffunielse 1455cfc83b6cSPedro Giffuni ENABLE_ONLINE_UPDATE="" 1456cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1457cfc83b6cSPedro Giffunifi 1458cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_ONLINE_UPDATE) 1459cfc83b6cSPedro Giffuni 1460cfc83b6cSPedro Giffunidnl =================================================================== 1461cfc83b6cSPedro Giffunidnl Unit Tests 1462cfc83b6cSPedro Giffunidnl =================================================================== 1463cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable unit tests]) 1464cfc83b6cSPedro Giffuniif test "$enable_unit_tests" = "yes" -o "$enable_unit_tests" = "TRUE"; then 1465cfc83b6cSPedro Giffuni ENABLE_UNIT_TESTS="YES" 1466cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE GTEST" 1467cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1468cfc83b6cSPedro Giffunielse 1469cfc83b6cSPedro Giffuni ENABLE_UNIT_TESTS="" 1470cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1471cfc83b6cSPedro Giffunifi 1472cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_UNIT_TESTS) 1473cfc83b6cSPedro Giffuni 1474cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable native CUPS support]) 1475cfc83b6cSPedro Giffuniif test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then 1476cfc83b6cSPedro Giffuni ENABLE_CUPS="TRUE" 1477cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1478cfc83b6cSPedro Giffunielse 1479cfc83b6cSPedro Giffuni ENABLE_CUPS="" 1480cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1481cfc83b6cSPedro Giffunifi 1482cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_CUPS) 1483cfc83b6cSPedro Giffuni 1484cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable fontconfig support]) 1485cfc83b6cSPedro Giffuniif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then 1486cfc83b6cSPedro Giffuni ENABLE_FONTCONFIG="TRUE" 1487cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1488cfc83b6cSPedro Giffunielse 1489cfc83b6cSPedro Giffuni ENABLE_FONTCONFIG="" 1490cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1491cfc83b6cSPedro Giffunifi 1492cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_FONTCONFIG) 1493cfc83b6cSPedro Giffuni 1494cfc83b6cSPedro Giffunidnl =================================================================== 1495cfc83b6cSPedro Giffunidnl find external tarballs. 1496cfc83b6cSPedro Giffunidnl =================================================================== 1497cfc83b6cSPedro Giffuniif test -z $TARFILE_LOCATION; then 1498cfc83b6cSPedro Giffuni TARFILE_LOCATION="DEFAULT" 1499cfc83b6cSPedro Giffunifi 1500cfc83b6cSPedro GiffuniAC_SUBST(TARFILE_LOCATION) 1501cfc83b6cSPedro Giffuni 1502cfc83b6cSPedro Giffuniif test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \ 1503cfc83b6cSPedro Giffuni && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then 1504cfc83b6cSPedro Giffuni DO_FETCH_TARBALLS="yes" 1505cfc83b6cSPedro Giffunifi 1506cfc83b6cSPedro GiffuniAC_SUBST(DO_FETCH_TARBALLS) 1507cfc83b6cSPedro Giffuni 1508cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 1509cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use DirectX]) 1510cfc83b6cSPedro Giffuni ENABLE_DIRECT_DRAW="" 1511cfc83b6cSPedro Giffuni if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then 1512cfc83b6cSPedro Giffuni ENABLE_DIRECTX="TRUE" 1513cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1514cfc83b6cSPedro Giffuni else 1515cfc83b6cSPedro Giffuni ENABLE_DIRECTX="" 1516cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1517cfc83b6cSPedro Giffuni fi 1518cfc83b6cSPedro Giffuni AC_SUBST(ENABLE_DIRECTX) 1519cfc83b6cSPedro Giffuni 1520cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use ActiveX]) 1521cfc83b6cSPedro Giffuni if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then 1522cfc83b6cSPedro Giffuni DISABLE_ACTIVEX="" 1523cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1524cfc83b6cSPedro Giffuni else 1525cfc83b6cSPedro Giffuni DISABLE_ACTIVEX="TRUE" 1526cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1527cfc83b6cSPedro Giffuni fi 1528cfc83b6cSPedro Giffuni 1529cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use ATL]) 1530cfc83b6cSPedro Giffuni if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then 1531cfc83b6cSPedro Giffuni DISABLE_ATL="" 1532cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1533cfc83b6cSPedro Giffuni else 1534cfc83b6cSPedro Giffuni DISABLE_ATL="TRUE" 1535cfc83b6cSPedro Giffuni dnl ActiveX depends on ATL, it should be disabled 1536cfc83b6cSPedro Giffuni DISABLE_ACTIVEX="TRUE" 1537cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1538cfc83b6cSPedro Giffuni fi 1539cfc83b6cSPedro Giffuni 1540cfc83b6cSPedro Giffuni AC_SUBST(DISABLE_ATL) 1541cfc83b6cSPedro Giffuni AC_SUBST(DISABLE_ACTIVEX) 1542cfc83b6cSPedro Giffuni 1543cfc83b6cSPedro Giffunifi 1544cfc83b6cSPedro Giffuni 1545cfc83b6cSPedro Giffunidnl =================================================================== 1546cfc83b6cSPedro Giffunidnl Disable rpath in shared libraries? 1547cfc83b6cSPedro Giffunidnl =================================================================== 1548cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to use RPATH in shared libraries]) 1549cfc83b6cSPedro Giffuniif test "$enable_rpath" = "no"; then 1550cfc83b6cSPedro Giffuni ENABLE_RPATH="no" 1551cfc83b6cSPedro Giffunielse 1552cfc83b6cSPedro Giffuni ENABLE_RPATH="yes" 1553cfc83b6cSPedro Giffunifi 1554cfc83b6cSPedro GiffuniAC_MSG_RESULT([$ENABLE_RPATH]) 1555cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_RPATH) 1556cfc83b6cSPedro Giffuni 1557cfc83b6cSPedro Giffunidnl =================================================================== 1558cfc83b6cSPedro Giffunidnl Check extensions to be bundled as literal blobs 1559cfc83b6cSPedro Giffunidnl =================================================================== 1560cfc83b6cSPedro Giffuniif test -n "$with_bundled_extension_blobs"; then 1561cfc83b6cSPedro Giffuni BUNDLED_EXTENSION_BLOBS="$with_bundled_extension_blobs" 1562cfc83b6cSPedro Giffunielse 1563cfc83b6cSPedro Giffuni BUNDLED_EXTENSION_BLOBS= 1564cfc83b6cSPedro Giffunifi 1565cfc83b6cSPedro GiffuniAC_SUBST(BUNDLED_EXTENSION_BLOBS) 1566cfc83b6cSPedro Giffuni 1567cfc83b6cSPedro Giffuni#dnl =================================================================== 1568cfc83b6cSPedro Giffuni#dnl Check extensions that are to be bundled as pre-registerd 1569cfc83b6cSPedro Giffuni#dnl =================================================================== 1570cfc83b6cSPedro Giffuniif test -n "$with_bundled_prereg_extensions"; then 1571cfc83b6cSPedro Giffuni BUNDLED_PREREG_EXTENSIONS="$with_bundled_prereg_extensions" 1572cfc83b6cSPedro Giffunielse 1573cfc83b6cSPedro Giffuni BUNDLED_PREREG_EXTENSIONS= 1574cfc83b6cSPedro Giffunifi 1575cfc83b6cSPedro GiffuniAC_SUBST(BUNDLED_PREREG_EXTENSIONS) 1576cfc83b6cSPedro Giffuni 1577cfc83b6cSPedro Giffunidnl =================================================================== 1578cfc83b6cSPedro Giffunidnl Configure system provided dictionary/hyphenation/thesaurus 1579cfc83b6cSPedro Giffunidnl =================================================================== 1580cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use dicts from external paths]) 1581cfc83b6cSPedro Giffuni if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then 1582cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1583cfc83b6cSPedro Giffuni SYSTEM_DICTS=YES 1584cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for spelling dictionary directory]) 1585cfc83b6cSPedro Giffuni if test -n "$with_external_dict_dir"; then 1586cfc83b6cSPedro Giffuni DICT_SYSTEM_DIR=file://$with_external_dict_dir 1587cfc83b6cSPedro Giffuni else 1588cfc83b6cSPedro Giffuni DICT_SYSTEM_DIR=file:///usr/share/hunspell 1589cfc83b6cSPedro Giffuni fi 1590cfc83b6cSPedro Giffuni AC_MSG_RESULT([$DICT_SYSTEM_DIR]) 1591cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for hyphenation patterns directory]) 1592cfc83b6cSPedro Giffuni if test -n "$with_external_hyph_dir"; then 1593cfc83b6cSPedro Giffuni HYPH_SYSTEM_DIR=file://$with_external_hyph_dir 1594cfc83b6cSPedro Giffuni else 1595cfc83b6cSPedro Giffuni HYPH_SYSTEM_DIR=file:///usr/share/hyphen 1596cfc83b6cSPedro Giffuni fi 1597cfc83b6cSPedro Giffuni AC_MSG_RESULT([$HYPH_SYSTEM_DIR]) 1598cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for thesaurus directory]) 1599cfc83b6cSPedro Giffuni if test -n "$with_external_thes_dir"; then 1600cfc83b6cSPedro Giffuni THES_SYSTEM_DIR=file://$with_external_thes_dir 1601cfc83b6cSPedro Giffuni else 1602cfc83b6cSPedro Giffuni THES_SYSTEM_DIR=file:///usr/share/mythes 1603cfc83b6cSPedro Giffuni fi 1604cfc83b6cSPedro Giffuni AC_MSG_RESULT([$THES_SYSTEM_DIR]) 1605cfc83b6cSPedro Giffuni else 1606cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1607cfc83b6cSPedro Giffuni SYSTEM_DICTS=NO 1608cfc83b6cSPedro Giffuni fi 1609cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_DICTS) 1610cfc83b6cSPedro GiffuniAC_SUBST(DICT_SYSTEM_DIR) 1611cfc83b6cSPedro GiffuniAC_SUBST(HYPH_SYSTEM_DIR) 1612cfc83b6cSPedro GiffuniAC_SUBST(THES_SYSTEM_DIR) 1613cfc83b6cSPedro Giffuni 1614cfc83b6cSPedro Giffuniif test $_os = "WINNT"; then 1615cfc83b6cSPedro Giffuni AC_MSG_CHECKING([Windows build environment sanity]) 1616cfc83b6cSPedro Giffuni dnl =================================================================== 1617cfc83b6cSPedro Giffuni dnl Sanity check! Native windows programs cannot use cygwin symlinks! 1618cfc83b6cSPedro Giffuni dnl =================================================================== 1619cfc83b6cSPedro Giffuni dnl As long as awk instead of $AWK is used somewhere in the sources, 1620cfc83b6cSPedro Giffuni dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin. 1621cfc83b6cSPedro Giffuni if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then 1622cfc83b6cSPedro Giffuni AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink! 1623cfc83b6cSPedro GiffuniNative windows programs cannot use cygwin symlinks. Remove the symbolic 1624cfc83b6cSPedro Giffunilink, and copy the program to the name of the link.]) 1625cfc83b6cSPedro Giffuni fi 1626cfc83b6cSPedro Giffuni dnl =================================================================== 1627cfc83b6cSPedro Giffuni dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to 1628cfc83b6cSPedro Giffuni dnl CC and CXX but the configure checks here assume that guw.exe 1629cfc83b6cSPedro Giffuni dnl (if needed at all) is not yet present. 1630cfc83b6cSPedro Giffuni dnl =================================================================== 1631cfc83b6cSPedro Giffuni CC=`echo $CC | $SED "s/^guw.exe //"` 1632cfc83b6cSPedro Giffuni CXX=`echo $CXX | $SED "s/^guw.exe //"` 1633cfc83b6cSPedro Giffuni dnl =================================================================== 1634cfc83b6cSPedro Giffuni dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable 1635cfc83b6cSPedro Giffuni dnl $WITH_MINGWIN 1636cfc83b6cSPedro Giffuni dnl =================================================================== 1637cfc83b6cSPedro Giffuni if test -n "$CC";then 1638cfc83b6cSPedro Giffuni if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then 1639cfc83b6cSPedro Giffuni WITH_MINGWIN="yes" 1640cfc83b6cSPedro Giffuni fi 1641cfc83b6cSPedro Giffuni fi 1642cfc83b6cSPedro Giffuni dnl =================================================================== 1643cfc83b6cSPedro Giffuni if test "$WITH_MINGWIN" = "yes" ; then 1644cfc83b6cSPedro Giffuni if test -z "$CC"; then 1645cfc83b6cSPedro Giffuni CC="gcc -mno-cygwin" 1646cfc83b6cSPedro Giffuni CXX="g++ -mno-cygwin" 1647cfc83b6cSPedro Giffuni fi 1648cfc83b6cSPedro Giffuni fi 1649cfc83b6cSPedro Giffuni AC_MSG_RESULT([ok]) 1650cfc83b6cSPedro Giffunifi 1651cfc83b6cSPedro GiffuniAC_SUBST(WITH_MINGWIN) 1652cfc83b6cSPedro Giffuni 1653cfc83b6cSPedro Giffunidnl =================================================================== 1654cfc83b6cSPedro Giffunidnl Extra check for Windows. cygwin builds need gcc to build dmake 1655cfc83b6cSPedro Giffunidnl and g++ to build guw.exe although MS cl (or MinGW) is used to 1656cfc83b6cSPedro Giffunidnl build OOo. 1657cfc83b6cSPedro Giffunidnl =================================================================== 1658cfc83b6cSPedro Giffuniif test "$_os" = "WINNT" ; then 1659cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for cygwin gcc/g++]) 1660cfc83b6cSPedro Giffuni if which gcc > /dev/null && which g++ > /dev/null ; then 1661cfc83b6cSPedro Giffuni AC_MSG_RESULT([found]) 1662cfc83b6cSPedro Giffuni else 1663cfc83b6cSPedro Giffuni AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.]) 1664cfc83b6cSPedro Giffuni fi 1665cfc83b6cSPedro Giffunifi 1666cfc83b6cSPedro Giffuni 1667cfc83b6cSPedro Giffuni 1668cfc83b6cSPedro Giffunidnl =================================================================== 1669cfc83b6cSPedro Giffunidnl Check whether the bash shell can be used. 1670cfc83b6cSPedro Giffunidnl =================================================================== 1671cfc83b6cSPedro GiffuniAC_PATH_PROG(SHELLPATH, bash) 1672cfc83b6cSPedro Giffuniif test -z "$SHELLPATH"; then 1673cfc83b6cSPedro Giffuni AC_MSG_ERROR([bash not found in \$PATH]) 1674cfc83b6cSPedro Giffunielse 1675cfc83b6cSPedro Giffuni SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"` 1676cfc83b6cSPedro Giffunifi 1677cfc83b6cSPedro GiffuniAC_SUBST(SHELLPATH) 1678cfc83b6cSPedro Giffuni 1679cfc83b6cSPedro Giffunidnl =================================================================== 1680cfc83b6cSPedro Giffunidnl Checks for c compiler, 1681cfc83b6cSPedro Giffunidnl The check for the c++ compiler is later on. 1682cfc83b6cSPedro Giffunidnl =================================================================== 1683cfc83b6cSPedro GiffuniAC_MSG_CHECKING([gcc home]) 1684cfc83b6cSPedro Giffuniif test -z "$with_gcc_home"; then 1685cfc83b6cSPedro Giffuni GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` 1686cfc83b6cSPedro Giffunielse 1687cfc83b6cSPedro Giffuni GCC_HOME="$with_gcc_home" 1688cfc83b6cSPedro Giffunifi 1689cfc83b6cSPedro GiffuniAC_MSG_RESULT($GCC_HOME) 1690cfc83b6cSPedro GiffuniAC_SUBST(GCC_HOME) 1691cfc83b6cSPedro Giffuni 1692cfc83b6cSPedro Giffunisave_CC=$CC 1693cfc83b6cSPedro Giffunisave_CXX=$CXX 1694cfc83b6cSPedro Giffuni 1695cfc83b6cSPedro Giffuniif test -n "$with_gcc_home"; then 1696cfc83b6cSPedro Giffuni if test -z "$CC"; then 1697cfc83b6cSPedro Giffuni CC="$with_gcc_home/bin/gcc" 1698cfc83b6cSPedro Giffuni fi 1699cfc83b6cSPedro Giffunifi 1700cfc83b6cSPedro Giffuni 1701cfc83b6cSPedro Giffunidnl The following checks for gcc, cc and then cl (if it weren't guarded for win32) 1702cfc83b6cSPedro Giffuniif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 1703cfc83b6cSPedro Giffuni AC_PROG_CC 1704cfc83b6cSPedro Giffunifi 1705cfc83b6cSPedro Giffuni 1706bcc22a4cSDamjan Jovanovicdnl Clang detection on supported platforms 1707bcc22a4cSDamjan Jovanovicif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then 170828633775SPedro Giffuni if $CC --version 2>&1 | $GREP clang > /dev/null ; then 1709cfc83b6cSPedro Giffuni COM_IS=CLANG 1710cfc83b6cSPedro Giffuni else 1711cfc83b6cSPedro Giffuni COM_IS=GCC 1712bcc22a4cSDamjan Jovanovic fi 1713bcc22a4cSDamjan Jovanovic AC_SUBST(COM_IS) 1714bcc22a4cSDamjan Jovanovicfi 1715bcc22a4cSDamjan Jovanovic 1716bcc22a4cSDamjan Jovanovicif test "$_os" = "FreeBSD"; then 1717bcc22a4cSDamjan Jovanovic FBSD_GCC_RPATH= 1718bcc22a4cSDamjan Jovanovic if "$COM_IS" = "GCC"; then 1719cfc83b6cSPedro Giffuni rpath=`$CC --print-file-name libstdc++.so` 1720cfc83b6cSPedro Giffuni rpath=`realpath $rpath` 1721cfc83b6cSPedro Giffuni rpath=`dirname $rpath` 1722cfc83b6cSPedro Giffuni if test "$rpath" != "/usr/lib" ; then 1723cfc83b6cSPedro Giffuni FBSD_GCC_RPATH="-Wl,-rpath=$rpath" 1724cfc83b6cSPedro Giffuni fi 1725cfc83b6cSPedro Giffuni fi 1726cfc83b6cSPedro Giffuni AC_SUBST(FBSD_GCC_RPATH) 1727cfc83b6cSPedro Giffunifi 1728cfc83b6cSPedro Giffuni 1729cfc83b6cSPedro GiffuniCOMPATH=`dirname "$CC"` 1730cfc83b6cSPedro Giffuniif test "$COMPATH" = "." ; then 1731cfc83b6cSPedro Giffuni AC_PATH_PROGS(COMPATH, $CC) 1732cfc83b6cSPedro Giffuni dnl double square bracket to get single because of M4 quote... 1733cfc83b6cSPedro Giffuni COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`; 1734cfc83b6cSPedro Giffunifi 1735cfc83b6cSPedro GiffuniCC_PATH="$COMPATH/" 1736cfc83b6cSPedro GiffuniCOMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`; 1737cfc83b6cSPedro Giffuni 1738cfc83b6cSPedro Giffunidnl =================================================================== 1739cfc83b6cSPedro Giffunidnl Test the gcc version, 3 is OK 1740cfc83b6cSPedro Giffunidnl =================================================================== 1741cfc83b6cSPedro GiffuniGCCVER=20995 1742cfc83b6cSPedro Giffuniif test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then 1743cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the GNU gcc compiler version]) 1744cfc83b6cSPedro Giffuni _gcc_version=`$CC -dumpversion` 1745cfc83b6cSPedro Giffuni _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` 1746cfc83b6cSPedro Giffuni GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 1747cfc83b6cSPedro Giffuni 1748cfc83b6cSPedro Giffuni if test "$_gcc_major" -lt "3"; then 1749cfc83b6cSPedro Giffuni AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler]) 1750cfc83b6cSPedro Giffuni else 1751cfc83b6cSPedro Giffuni if test "$GCCVER" -eq "030203"; then 1752cfc83b6cSPedro Giffuni if test "$ENABLE_SYMBOLS" = "SMALL"; then 1753cfc83b6cSPedro Giffuni AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.]) 1754cfc83b6cSPedro Giffuni fi 1755cfc83b6cSPedro Giffuni fi 1756cfc83b6cSPedro Giffuni fi 1757cfc83b6cSPedro Giffuni if test "$_os" = "Darwin" ; then 1758cfc83b6cSPedro Giffuni AC_MSG_RESULT([implicitly using CC=$CC]) 1759cfc83b6cSPedro Giffuni else 1760cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked (gcc $_gcc_version)]) 1761cfc83b6cSPedro Giffuni fi 1762cfc83b6cSPedro Giffuni if test "$_os" = "SunOS"; then 1763cfc83b6cSPedro Giffuni AC_MSG_CHECKING([gcc linker]) 176428633775SPedro Giffuni if $CC -Wl,--version 2>&1 |head -n 1| $GREP -v GNU > /dev/null;then 1765cfc83b6cSPedro Giffuni AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris]) 1766cfc83b6cSPedro Giffuni fi 1767cfc83b6cSPedro Giffuni AC_MSG_RESULT([ok (GNU ld)]) 1768cfc83b6cSPedro Giffuni fi 1769cfc83b6cSPedro Giffunifi 1770cfc83b6cSPedro GiffuniAC_SUBST(GCCVER) 1771cfc83b6cSPedro Giffuni 1772cfc83b6cSPedro GiffuniHAVE_LD_BSYMBOLIC_FUNCTIONS= 1773cfc83b6cSPedro Giffuniif test "$GCC" = "yes"; then 1774cfc83b6cSPedro Giffuni AC_MSG_CHECKING( for -Bsymbolic-functions linker support ) 1775cfc83b6cSPedro Giffuni bsymbolic_functions_ldflags_save=$LDFLAGS 1776cfc83b6cSPedro Giffuni LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" 1777cfc83b6cSPedro Giffuni AC_LINK_IFELSE([AC_LANG_PROGRAM([ 1778cfc83b6cSPedro Giffuni #include <stdio.h> 1779cfc83b6cSPedro Giffuni ],[ 1780cfc83b6cSPedro Giffuni printf ("hello world\n"); 1781cfc83b6cSPedro Giffuni ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, []) 1782cfc83b6cSPedro Giffuni if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then 1783cfc83b6cSPedro Giffuni AC_MSG_RESULT( found ) 1784cfc83b6cSPedro Giffuni else 1785cfc83b6cSPedro Giffuni AC_MSG_RESULT( not found ) 1786cfc83b6cSPedro Giffuni fi 1787cfc83b6cSPedro Giffuni LDFLAGS=$bsymbolic_functions_ldflags_save 1788cfc83b6cSPedro Giffunifi 1789cfc83b6cSPedro GiffuniAC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS) 1790cfc83b6cSPedro Giffuni 1791cfc83b6cSPedro Giffunidnl =================================================================== 1792cfc83b6cSPedro Giffunidnl Set the ENABLE_PCH variable. (Activate --enable-pch) 1793cfc83b6cSPedro Giffunidnl =================================================================== 1794cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable pch feature]) 1795cfc83b6cSPedro Giffuniif test -n "$enable_pch" && test "$enable_pch" != "no"; then 1796cfc83b6cSPedro Giffuni if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 1797cfc83b6cSPedro Giffuni ENABLE_PCH="TRUE" 1798cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1799cfc83b6cSPedro Giffunidnl There is no PCH support in GCC versions prior to this 1800cfc83b6cSPedro Giffuni elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then 1801cfc83b6cSPedro Giffuni ENABLE_PCH="TRUE" 1802cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1803cfc83b6cSPedro Giffuni else 1804cfc83b6cSPedro Giffuni ENABLE_PCH="" 1805cfc83b6cSPedro Giffuni AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler]) 1806cfc83b6cSPedro Giffuni fi 1807cfc83b6cSPedro Giffunielse 1808cfc83b6cSPedro Giffuni ENABLE_PCH="" 1809cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 1810cfc83b6cSPedro Giffunifi 1811cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_PCH) 1812cfc83b6cSPedro Giffuni 1813cfc83b6cSPedro Giffunidnl =================================================================== 1814cfc83b6cSPedro Giffunidnl Search all the common names for GNU make 1815cfc83b6cSPedro Giffunidnl =================================================================== 1816cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for GNU make]) 1817308295dbSJim Jagielskifor a in "$MAKE" "$GNUMAKE" make gmake gnumake; do 181828633775SPedro Giffuni $a --version 2> /dev/null | $GREP GNU 2>&1 > /dev/null 1819cfc83b6cSPedro Giffuni if test $? -eq 0; then 1820cfc83b6cSPedro Giffuni GNUMAKE=$a 1821cfc83b6cSPedro Giffuni break 1822cfc83b6cSPedro Giffuni fi 1823cfc83b6cSPedro Giffunidone 1824cfc83b6cSPedro GiffuniAC_MSG_RESULT($GNUMAKE) 1825cfc83b6cSPedro Giffuniif test -z "$GNUMAKE"; then 1826cfc83b6cSPedro Giffuni AC_MSG_ERROR([not found. install GNU make.]) 1827cfc83b6cSPedro Giffunifi 1828cfc83b6cSPedro Giffuni 1829cfc83b6cSPedro GiffuniAC_MSG_CHECKING([the GNU make version]) 183028633775SPedro Giffuni_make_version=`$GNUMAKE --version | $GREP GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 1831cfc83b6cSPedro Giffuni_make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 1832cfc83b6cSPedro Giffuniif test "$_make_longver" -ge "038100" ; then 1833cfc83b6cSPedro Giffuni AC_MSG_RESULT([$GNUMAKE $_make_version]) 1834cfc83b6cSPedro Giffunielse 1835cfc83b6cSPedro Giffuni AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed]) 1836cfc83b6cSPedro Giffunifi 1837cfc83b6cSPedro GiffuniAC_SUBST(GNUMAKE) 1838cfc83b6cSPedro Giffuni 1839cfc83b6cSPedro Giffunidnl =================================================================== 1840cfc83b6cSPedro Giffunidnl Search for a pre-installed dmake 1841cfc83b6cSPedro Giffunidnl =================================================================== 1842cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for dmake]) 1843cfc83b6cSPedro GiffuniDMAKE="no" 1844cfc83b6cSPedro Giffuni# Override system dmake if --with-dmake-path or --with-dmake-url is used. 1845cfc83b6cSPedro Giffuniif test -z "$with_dmake_path" && test -z "$with_dmake_url"; then 1846cfc83b6cSPedro Giffuni AC_PATH_PROG(DMAKE, dmake, no) 1847cfc83b6cSPedro Giffuni IS_SYSTEM_DMAKE=NO 1848cfc83b6cSPedro Giffuni if test "$DMAKE" != "no"; then 1849cfc83b6cSPedro Giffuni AC_MSG_RESULT([using system dmake]) 1850cfc83b6cSPedro Giffuni DMAKE_PATH="$DMAKE" 1851cfc83b6cSPedro Giffuni IS_SYSTEM_DMAKE=YES 1852cfc83b6cSPedro Giffuni fi 1853cfc83b6cSPedro Giffunielif test -n "$with_dmake_path" ; then 1854cfc83b6cSPedro Giffuni # Did not find pre-installed dmake. 1855cfc83b6cSPedro Giffuni # Is it at a nonstandard location provided by --with-dmake-path ? 1856cfc83b6cSPedro Giffuni AC_MSG_NOTICE([looking for dmake at $DMAKE_PATH]) 1857cfc83b6cSPedro Giffuni if test -x "$with_dmake_path" ; then 1858cfc83b6cSPedro Giffuni AC_MSG_RESULT([using user provided dmake]) 1859cfc83b6cSPedro Giffuni DMAKE=$with_dmake_path 1860cfc83b6cSPedro Giffuni fi 1861cfc83b6cSPedro Giffunifi 1862cfc83b6cSPedro Giffuni 1863cfc83b6cSPedro GiffuniDMAKE_URL= 1864cfc83b6cSPedro Giffuniif test "$DMAKE" = "no"; then 1865cfc83b6cSPedro Giffuni AC_MSG_NOTICE([no system or user-provided dmake found]) 1866cfc83b6cSPedro Giffuni # Check if a URL was supplied from which we can download the source and compile it. 1867cfc83b6cSPedro Giffuni if test -n "$with_dmake_url" ; then 1868cfc83b6cSPedro Giffuni # At this moment we can not verify the URL or the content that we want to download. 1869cfc83b6cSPedro Giffuni # Neither can we apply the test below for ruling out that it is the SunStudio dmake. 1870cfc83b6cSPedro Giffuni DMAKE_URL=$with_dmake_url 1871cfc83b6cSPedro Giffuni AC_MSG_RESULT([dmake will be downloaded and compiled in bootstrap]) 1872cfc83b6cSPedro Giffuni DMAKE= 1873cfc83b6cSPedro Giffuni else 1874cfc83b6cSPedro Giffuni 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.]) 1875cfc83b6cSPedro Giffuni BUILD_DMAKE=YES 1876cfc83b6cSPedro Giffuni fi 1877cfc83b6cSPedro Giffunielse 1878cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether the found dmake is the right dmake]) 1879cfc83b6cSPedro Giffuni # we need to find out whether that dmake we found is "our" dmake 1880cfc83b6cSPedro Giffuni # or the dmake from Sun's SunStudio Compiler which is something 1881cfc83b6cSPedro Giffuni # different 1882cfc83b6cSPedro Giffuni # This test _should_ work because the one accepts -V (ours) and one 1883cfc83b6cSPedro Giffuni # (the other) not... 188428633775SPedro Giffuni $DMAKE -V 2>/dev/null | $GREP -E 'dmake(.exe)? .* Version .*' >/dev/null 1885cfc83b6cSPedro Giffuni if test $? -eq 0; then 1886cfc83b6cSPedro Giffuni BUILD_DMAKE=NO 1887cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 1888cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the dmake version]) 1889cfc83b6cSPedro Giffuni DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` 1890cfc83b6cSPedro Giffuni if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then 1891cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK, >= 4.11]) 1892cfc83b6cSPedro Giffuni elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ 1893cfc83b6cSPedro Giffuni test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then 1894cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK, >= 4.11]) 1895cfc83b6cSPedro Giffuni else 1896cfc83b6cSPedro Giffuni AC_MSG_ERROR([too old. >= 4.11 is needed]) 1897cfc83b6cSPedro Giffuni DMAKE=no 1898cfc83b6cSPedro Giffuni fi 1899cfc83b6cSPedro Giffuni else 1900cfc83b6cSPedro Giffuni AC_MSG_WARN([no]) 1901cfc83b6cSPedro Giffuni DMAKE=no 1902cfc83b6cSPedro Giffuni fi 1903cfc83b6cSPedro Giffunifi 1904cfc83b6cSPedro Giffuniif test "$DMAKE" = "no"; then 1905cfc83b6cSPedro Giffuni AC_MSG_ERROR([please use --with-dmake-path or --with-dmake-url to specify dmake executable or source]) 1906cfc83b6cSPedro Giffunifi 1907cfc83b6cSPedro GiffuniAC_SUBST(DMAKE_URL) 1908cfc83b6cSPedro GiffuniAC_SUBST(DMAKE_PATH) 1909cfc83b6cSPedro GiffuniAC_SUBST(IS_SYSTEM_DMAKE) 1910cfc83b6cSPedro Giffuni 1911cfc83b6cSPedro Giffuni 1912cfc83b6cSPedro Giffunidnl =================================================================== 1913cfc83b6cSPedro Giffunidnl Search all the common names for GNU or BSD tar 1914cfc83b6cSPedro Giffunidnl =================================================================== 1915cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for GNU or compatible BSD tar]) 1916cfc83b6cSPedro Giffunifor a in $GNUTAR gtar gnutar bsdtar tar; do 191728633775SPedro Giffuni $a --version 2> /dev/null | $EGREP "GNU|libarchive" 2>&1 > /dev/null 1918cfc83b6cSPedro Giffuni if test $? -eq 0; then 1919cfc83b6cSPedro Giffuni GNUTAR=$a 1920cfc83b6cSPedro Giffuni break 1921cfc83b6cSPedro Giffuni fi 1922cfc83b6cSPedro Giffunidone 1923cfc83b6cSPedro GiffuniAC_MSG_RESULT($GNUTAR) 1924cfc83b6cSPedro Giffuniif test -z "$GNUTAR"; then 1925cfc83b6cSPedro Giffuni AC_MSG_ERROR([not found. install GNU tar.]) 1926cfc83b6cSPedro Giffunifi 1927cfc83b6cSPedro Giffuni 1928cfc83b6cSPedro GiffuniAC_SUBST(GNUTAR) 1929cfc83b6cSPedro Giffuni 1930cfc83b6cSPedro Giffunidnl =================================================================== 1931cfc83b6cSPedro Giffunidnl Test the solaris compiler version 1932cfc83b6cSPedro Giffunidnl =================================================================== 1933cfc83b6cSPedro Giffuniif test "$_os" = "SunOS"; then 1934cfc83b6cSPedro Giffuni if test "$CC" = "cc"; then 1935cfc83b6cSPedro Giffuni AC_PATH_PROGS(_cc, cc) 1936cfc83b6cSPedro Giffuni COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` 1937cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the SunStudio C/C++ compiler version]) 1938cfc83b6cSPedro Giffuni dnl cc -V outputs to standard error!!!! 193928633775SPedro Giffuni _sunstudio_string=`$CC -V 2>&1 | $GREP '^cc' | sed -e 's/.* C //'` 1940cfc83b6cSPedro Giffuni _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` 1941cfc83b6cSPedro Giffuni _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` 1942cfc83b6cSPedro Giffuni if test "$_sunstudio_major" != "5"; then 1943cfc83b6cSPedro Giffuni AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) 1944cfc83b6cSPedro Giffuni else 1945cfc83b6cSPedro Giffuni _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" }'` 1946cfc83b6cSPedro Giffuni if test "$_sunstudio_minor" = "false"; then 1947cfc83b6cSPedro Giffuni AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) 1948cfc83b6cSPedro Giffuni else 1949cfc83b6cSPedro Giffuni dnl compiler will do 1950cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked]) 1951cfc83b6cSPedro Giffuni fi 1952cfc83b6cSPedro Giffuni fi 1953cfc83b6cSPedro Giffuni fi 1954cfc83b6cSPedro Giffunifi 1955cfc83b6cSPedro Giffuni 1956cfc83b6cSPedro Giffuniif test "$GCC" = "yes"; then 1957cfc83b6cSPedro Giffuni AC_MSG_CHECKING( for --hash-style=both linker support ) 1958cfc83b6cSPedro Giffuni hash_style_ldflags_save=$LDFLAGS 1959cfc83b6cSPedro Giffuni LDFLAGS="$LDFLAGS -Wl,--hash-style=both" 1960cfc83b6cSPedro Giffuni AC_LINK_IFELSE([AC_LANG_PROGRAM([ 1961cfc83b6cSPedro Giffuni #include <stdio.h> 1962cfc83b6cSPedro Giffuni ],[ 1963cfc83b6cSPedro Giffuni printf ("hello world\n"); 1964cfc83b6cSPedro Giffuni ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE) 1965cfc83b6cSPedro Giffuni if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then 1966cfc83b6cSPedro Giffuni AC_MSG_RESULT( found ) 1967cfc83b6cSPedro Giffuni else 1968cfc83b6cSPedro Giffuni AC_MSG_RESULT( not found ) 1969cfc83b6cSPedro Giffuni fi 1970cfc83b6cSPedro Giffuni LDFLAGS=$hash_style_ldflags_save 1971cfc83b6cSPedro Giffunifi 1972cfc83b6cSPedro GiffuniAC_SUBST(HAVE_LD_HASH_STYLE) 1973cfc83b6cSPedro Giffuni 1974cfc83b6cSPedro Giffunidnl =================================================================== 1975cfc83b6cSPedro Giffunidnl Test the Compaq compiler for OSF1 1976cfc83b6cSPedro Giffunidnl =================================================================== 1977cfc83b6cSPedro Giffuniif test "$_os" = "OSF1"; then 1978cfc83b6cSPedro Giffuni if test "$CC" = "cc"; then 1979cfc83b6cSPedro Giffuni AC_PATH_PROGS(_cc, cc) 1980cfc83b6cSPedro Giffuni COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` 1981cfc83b6cSPedro Giffuni AC_MSG_WARN([******* $_cc , $COMPATH]) 1982cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the Compaq C compiler version]) 1983cfc83b6cSPedro Giffuni dnl cc -V outputs to standard error!!!! 1984cfc83b6cSPedro Giffuni _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'` 1985cfc83b6cSPedro Giffuni _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` 1986cfc83b6cSPedro Giffuni if test "$_compaqc_major" != "T6"; then 1987cfc83b6cSPedro Giffuni AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler]) 1988cfc83b6cSPedro Giffuni else 1989cfc83b6cSPedro Giffuni dnl compiler will do 1990cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked]) 1991cfc83b6cSPedro Giffuni fi 1992cfc83b6cSPedro Giffuni fi 1993cfc83b6cSPedro Giffunifi 1994cfc83b6cSPedro Giffuni 1995cfc83b6cSPedro Giffunidnl =================================================================== 1996cfc83b6cSPedro Giffunidnl Check whether there's a Perl version available. 1997cfc83b6cSPedro Giffunidnl =================================================================== 1998cfc83b6cSPedro Giffuniif test -z "$with_perl_home"; then 1999cfc83b6cSPedro Giffuni AC_PATH_PROG(PERL, perl) 2000cfc83b6cSPedro Giffunielse 2001cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 2002cfc83b6cSPedro Giffuni with_perl_home=`cygpath -u "$with_perl_home"` 2003cfc83b6cSPedro Giffuni fi 2004cfc83b6cSPedro Giffuni _perl_path="$with_perl_home/bin/perl" 2005cfc83b6cSPedro Giffuni if test -x "$_perl_path"; then 2006cfc83b6cSPedro Giffuni PERL=$_perl_path 2007cfc83b6cSPedro Giffuni else 2008cfc83b6cSPedro Giffuni AC_MSG_ERROR([$_perl_path not found]) 2009cfc83b6cSPedro Giffuni fi 2010cfc83b6cSPedro Giffunifi 2011cfc83b6cSPedro Giffuni 2012cfc83b6cSPedro Giffunidnl =================================================================== 2013cfc83b6cSPedro Giffunidnl Testing for Perl version 5 or greater. 2014cfc83b6cSPedro Giffunidnl $] is the perl version variable, it is returned as an integer 2015cfc83b6cSPedro Giffunidnl =================================================================== 2016cfc83b6cSPedro Giffuniif test "$PERL"; then 2017cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the Perl version]) 2018cfc83b6cSPedro Giffuni ${PERL} -e "exit($]);" 2019cfc83b6cSPedro Giffuni _perl_version=$? 2020cfc83b6cSPedro Giffuni if test "$_perl_version" -lt 5; then 2021cfc83b6cSPedro Giffuni AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl]) 2022cfc83b6cSPedro Giffuni fi 2023cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked (perl $_perl_version)]) 2024cfc83b6cSPedro Giffunielse 2025cfc83b6cSPedro Giffuni AC_MSG_ERROR([Perl not found, install version 5 of Perl]) 2026cfc83b6cSPedro Giffunifi 2027cfc83b6cSPedro GiffuniAC_SUBST(PERL) 2028cfc83b6cSPedro Giffuni 2029cfc83b6cSPedro Giffunidnl =================================================================== 2030cfc83b6cSPedro Giffunidnl Testing for required Perl modules 2031cfc83b6cSPedro Giffunidnl The list of required Perl modules is documented here: 2032cfc83b6cSPedro Giffunidnl http://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO#General_Build_Requirements 2033cfc83b6cSPedro Giffunidnl =================================================================== 2034cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for required Perl modules]) 20359b3da915SDamjan Jovanovicif `$PERL -e 'use Archive::Zip; 20369b3da915SDamjan Jovanovic use LWP::UserAgent; 20379b3da915SDamjan Jovanovic use XML::Parser; 20389b3da915SDamjan Jovanovic use Digest::SHA; 20399b3da915SDamjan Jovanovic use Digest::MD5; 20409b3da915SDamjan Jovanovic use LWP::Protocol::https;'>/dev/null 2>&1`; then 2041cfc83b6cSPedro Giffuni AC_MSG_RESULT([all modules found]) 2042cfc83b6cSPedro Giffunielse 2043cfc83b6cSPedro Giffuni # Find out which modules are missing. 2044cfc83b6cSPedro Giffuni missing_perl_modules= 2045cfc83b6cSPedro Giffuni if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then 2046cfc83b6cSPedro Giffuni missing_perl_modules=Archive::Zip 2047cfc83b6cSPedro Giffuni fi 2048cfc83b6cSPedro Giffuni if ! `$PERL -e 'use LWP::UserAgent;'>/dev/null 2>&1`; then 2049cfc83b6cSPedro Giffuni missing_perl_modules="$missing_perl_modules LWP::UserAgent" 2050cfc83b6cSPedro Giffuni fi 2051cfc83b6cSPedro Giffuni if ! `$PERL -e 'use XML::Parser;'>/dev/null 2>&1`; then 2052cfc83b6cSPedro Giffuni missing_perl_modules="$missing_perl_modules XML::Parser" 2053cfc83b6cSPedro Giffuni fi 2054fec5e19eSarielch if ! `$PERL -e 'use Digest::SHA;'>/dev/null 2>&1`; then 2055fec5e19eSarielch missing_perl_modules="$missing_perl_modules Digest::SHA" 2056fec5e19eSarielch fi 2057fec5e19eSarielch if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then 2058fec5e19eSarielch missing_perl_modules="$missing_perl_modules Digest::MD5" 2059fec5e19eSarielch fi 2060fec5e19eSarielch if ! `$PERL -e 'use LWP::Protocol::https;'>/dev/null 2>&1`; then 2061fec5e19eSarielch missing_perl_modules="$missing_perl_modules LWP::Protocol::https" 2062fec5e19eSarielch fi 2063cfc83b6cSPedro Giffuni AC_MSG_ERROR([ 2064cfc83b6cSPedro Giffuni The missing Perl modules are: $missing_perl_modules 2065cfc83b6cSPedro Giffuni Install them as superuser/administrator with "cpan -i $missing_perl_modules"]) 2066cfc83b6cSPedro Giffunifi 2067cfc83b6cSPedro Giffuni 2068cfc83b6cSPedro Giffunidnl =================================================================== 2069cfc83b6cSPedro Giffunidnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT 2070cfc83b6cSPedro Giffunidnl =================================================================== 2071cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 2072cfc83b6cSPedro Giffuni if test "$WITH_MINGWIN" != "yes"; then 2073cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for friendly registry keys]) 2074cfc83b6cSPedro Giffuni # VS.Net 2003, VS.Net 2005 2075cfc83b6cSPedro Giffuni if test -z "$with_cl_home"; then 2076cfc83b6cSPedro Giffuni vctest=`./oowintool --msvc-productdir`; 2077cfc83b6cSPedro Giffuni if test -x "$vctest/bin/cl.exe"; then 2078cfc83b6cSPedro Giffuni with_cl_home=$vctest; 2079cfc83b6cSPedro Giffuni fi 2080cfc83b6cSPedro Giffuni else 2081cfc83b6cSPedro Giffuni with_cl_home=`cygpath -u "$with_cl_home"` 2082cfc83b6cSPedro Giffuni fi 2083cfc83b6cSPedro Giffuni AC_MSG_RESULT([done]) 2084cfc83b6cSPedro Giffuni 2085cfc83b6cSPedro Giffuni dnl =========================================================== 2086cfc83b6cSPedro Giffuni dnl Check for mspdb71.dll/mspdb80.dll 2087cfc83b6cSPedro Giffuni dnl =========================================================== 2088cfc83b6cSPedro Giffuni dnl .NET 2003/5/8 Compiler 2089cfc83b6cSPedro Giffuni if test -n "$with_mspdb_path";then 2090cfc83b6cSPedro Giffuni with_mspdb_path=`cygpath -u "$with_mspdb_path"` 2091cfc83b6cSPedro Giffuni fi 2092cfc83b6cSPedro Giffuni if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then 2093cfc83b6cSPedro Giffuni MSPDB_PATH="$with_mspdb_path" 2094cfc83b6cSPedro Giffuni fi 2095cfc83b6cSPedro Giffuni dnl .NET 2003 case 2096cfc83b6cSPedro Giffuni if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then 2097cfc83b6cSPedro Giffuni MSPDB_PATH="$with_cl_home/../Common7/IDE" 2098cfc83b6cSPedro Giffuni fi 2099cfc83b6cSPedro Giffuni dnl .NET 2005/2008 case 2100cfc83b6cSPedro Giffuni if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then 2101cfc83b6cSPedro Giffuni MSPDB_PATH="$with_cl_home/../Common7/IDE" 2102cfc83b6cSPedro Giffuni fi 2103cfc83b6cSPedro Giffuni dnl Windows SDK 6.0 case 2104cfc83b6cSPedro Giffuni if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then 2105cfc83b6cSPedro Giffuni MSPDB_PATH="$with_cl_home/bin" 2106cfc83b6cSPedro Giffuni fi 2107cfc83b6cSPedro Giffuni 2108cfc83b6cSPedro Giffuni if test -z "$MSPDB_PATH";then 2109cfc83b6cSPedro Giffuni dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty 2110cfc83b6cSPedro Giffuni AC_PATH_PROG(MSPDB_PATH, mspdb80.dll) 2111cfc83b6cSPedro Giffuni AC_PATH_PROG(MSPDB_PATH, mspdb71.dll) 2112cfc83b6cSPedro Giffuni MSPDB_PATH=`dirname "$MSPDB_PATH"` 2113cfc83b6cSPedro Giffuni fi 2114cfc83b6cSPedro Giffuni 2115cfc83b6cSPedro Giffuni if test -z "$MSPDB_PATH"; then 2116cfc83b6cSPedro Giffuni AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path]) 2117cfc83b6cSPedro Giffuni fi 2118cfc83b6cSPedro Giffuni MSPDB_PATH=`cygpath -d "$MSPDB_PATH"` 2119cfc83b6cSPedro Giffuni MSPDB_PATH=`cygpath -u "$MSPDB_PATH"` 2120cfc83b6cSPedro Giffuni dnl The path needs to be added before cl is called 2121cfc83b6cSPedro Giffuni PATH="$MSPDB_PATH:$PATH" 2122cfc83b6cSPedro Giffuni 2123cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the Microsoft C/C++ Compiler]) 2124cfc83b6cSPedro Giffuni if test -x "$with_cl_home/bin/cl.exe"; then 2125cfc83b6cSPedro Giffuni CC="$with_cl_home/bin/cl.exe" 2126cfc83b6cSPedro Giffuni else 2127cfc83b6cSPedro Giffuni AC_PATH_PROG(CC, cl.exe) 2128cfc83b6cSPedro Giffuni fi 2129cfc83b6cSPedro Giffuni if test -e "$CC"; then 2130cfc83b6cSPedro Giffuni # This gives us a posix path with 8.3 filename restrictions 2131cfc83b6cSPedro Giffuni CC=`cygpath -d "$CC"` 2132cfc83b6cSPedro Giffuni CC=`cygpath -u "$CC"` 2133cfc83b6cSPedro Giffuni # Remove /cl.exe from CC case insensitive 2134cfc83b6cSPedro Giffuni AC_MSG_RESULT([found ($CC)]) 2135cfc83b6cSPedro Giffuni COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'` 2136cfc83b6cSPedro Giffuni export INCLUDE=`cygpath -d "$COMPATH/Include"` 2137cfc83b6cSPedro Giffuni dnl Check which Microsoft C/C++ compiler is found 2138cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler]) 2139cfc83b6cSPedro Giffunidnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out. 2140cfc83b6cSPedro Giffuni CCTXTVER=`$CC 2>&1 | head -n1` 2141cfc83b6cSPedro Giffuni CCNUMVER=`echo $CCTXTVER | $AWK "/Microsoft/ && /..\\...\\...../ { 2142cfc83b6cSPedro Giffuni x = match( \\\$0, /..\\...\\...../ ) 2143cfc83b6cSPedro Giffuni CCversion = substr( \\\$0, RSTART, RLENGTH) 2144cfc83b6cSPedro Giffuni tokencount = split (CCversion,vertoken,\".\") 2145cfc83b6cSPedro Giffuni for ( i = 1 ; i <= tokencount ; i++ ) { 2146cfc83b6cSPedro Giffuni printf (\"%04d\",vertoken[[i]] ) 2147cfc83b6cSPedro Giffuni } 2148cfc83b6cSPedro Giffuni }"` 2149cfc83b6cSPedro Giffuni AC_MSG_RESULT([found Compiler version $CCNUMVER in \"$CCTXTVER\"]) 2150cfc83b6cSPedro Giffuni if test "$CCNUMVER" -ge "001500000000"; then 2151cfc83b6cSPedro Giffuni COMEX=12 2152cfc83b6cSPedro Giffuni MSVSVER=2008 2153cfc83b6cSPedro Giffuni AC_MSG_RESULT([found .NET 2008 / VS 9.0.]) 2154cfc83b6cSPedro Giffuni else 2155cfc83b6cSPedro Giffuni AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2008.]) 2156cfc83b6cSPedro Giffuni fi 2157cfc83b6cSPedro Giffuni else 2158cfc83b6cSPedro Giffuni AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.]) 2159cfc83b6cSPedro Giffuni fi 2160cfc83b6cSPedro Giffuni else 2161cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the Mingwin32 C++ Compiler]) 2162cfc83b6cSPedro Giffuni if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then 2163cfc83b6cSPedro Giffuni AC_MSG_RESULT([found.]) 216428633775SPedro Giffuni if $CC -dumpspecs | $GREP -q "mno-cygwin"; then 2165cfc83b6cSPedro Giffuni USE_MINGW="cygwin" 2166cfc83b6cSPedro Giffuni else 2167cfc83b6cSPedro Giffuni USE_MINGW="pure-mingw" 2168cfc83b6cSPedro Giffuni fi 2169cfc83b6cSPedro Giffuni else 2170cfc83b6cSPedro Giffuni AC_MSG_ERROR([Mingwin32 C++ Compiler not found.]) 2171cfc83b6cSPedro Giffuni fi 2172cfc83b6cSPedro Giffuni fi 2173cfc83b6cSPedro Giffunifi 2174cfc83b6cSPedro GiffuniAC_SUBST(COMEX) 2175cfc83b6cSPedro GiffuniAC_SUBST(MSPDB_PATH) 2176cfc83b6cSPedro GiffuniAC_SUBST(USE_MINGW) 2177cfc83b6cSPedro Giffuni 2178cfc83b6cSPedro Giffunidnl =================================================================== 2179cfc83b6cSPedro Giffunidnl .NET needs special treatment 2180cfc83b6cSPedro Giffunidnl =================================================================== 2181cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 2182cfc83b6cSPedro Giffuniif test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then 2183cfc83b6cSPedro Giffuni dnl Check midl.exe 2184cfc83b6cSPedro Giffuni AC_PATH_PROG(MIDL_PATH, midl.exe) 2185cfc83b6cSPedro Giffuni if test -n "$MIDL_PATH";then 2186cfc83b6cSPedro Giffuni MIDL_PATH=`dirname "$MIDL_PATH"` 2187cfc83b6cSPedro Giffuni fi 2188cfc83b6cSPedro Giffuni if test -n "$with_midl_path";then 2189cfc83b6cSPedro Giffuni with_midl_path=`cygpath -u "$with_midl_path"` 2190cfc83b6cSPedro Giffuni fi 2191cfc83b6cSPedro Giffuni if test -x "$with_midl_path/midl.exe"; then 2192cfc83b6cSPedro Giffuni MIDL_PATH="$with_midl_path" 2193cfc83b6cSPedro Giffuni fi 2194cfc83b6cSPedro Giffuni if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then 2195cfc83b6cSPedro Giffuni MIDL_PATH="$with_cl_home/../Common7/Tools/Bin" 2196cfc83b6cSPedro Giffuni fi 2197cfc83b6cSPedro Giffuni if test -z "$MIDL_PATH" ; then 2198cfc83b6cSPedro Giffuni vstest=`./oowintool --msvs-productdir`; 2199cfc83b6cSPedro Giffuni if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then 2200cfc83b6cSPedro Giffuni MIDL_PATH="$vstest/Common7/Tools/Bin" 2201cfc83b6cSPedro Giffuni fi 2202cfc83b6cSPedro Giffuni fi 2203cfc83b6cSPedro Giffuni if test -z "$MIDL_PATH" ; then 2204cfc83b6cSPedro Giffuni psdktest=`./oowintool --psdk-home` 2205cfc83b6cSPedro Giffuni if test -x "$psdktest/Bin/midl.exe" ; then 2206cfc83b6cSPedro Giffuni MIDL_PATH="$psdktest/Bin" 2207cfc83b6cSPedro Giffuni fi 2208cfc83b6cSPedro Giffuni fi 2209cfc83b6cSPedro Giffuni if test ! -x "$MIDL_PATH/midl.exe"; then 2210cfc83b6cSPedro Giffuni AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path]) 2211cfc83b6cSPedro Giffuni fi 2212cfc83b6cSPedro Giffuni # Convert to posix path with 8.3 filename restrictions ( No spaces ) 2213cfc83b6cSPedro Giffuni MIDL_PATH=`cygpath -d "$MIDL_PATH"` 2214cfc83b6cSPedro Giffuni MIDL_PATH=`cygpath -u "$MIDL_PATH"` 2215cfc83b6cSPedro Giffuni 2216cfc83b6cSPedro Giffuni dnl Check csc.exe 2217cfc83b6cSPedro Giffuni AC_PATH_PROG(CSC_PATH, csc.exe) 2218cfc83b6cSPedro Giffuni if test -n "$CSC_PATH";then 2219cfc83b6cSPedro Giffuni CSC_PATH=`dirname "$CSC_PATH"` 2220cfc83b6cSPedro Giffuni fi 2221cfc83b6cSPedro Giffuni if test -n "$with_csc_path";then 2222cfc83b6cSPedro Giffuni with_csc_path=`cygpath -u "$with_csc_path"` 2223cfc83b6cSPedro Giffuni fi 2224cfc83b6cSPedro Giffuni if test -x "$with_csc_path/csc.exe"; then 2225cfc83b6cSPedro Giffuni CSC_PATH="$with_csc_path" 2226cfc83b6cSPedro Giffuni else 2227cfc83b6cSPedro Giffuni csctest=`./oowintool --csc-compilerdir`; 2228cfc83b6cSPedro Giffuni if test -x "$csctest/csc.exe"; then 2229cfc83b6cSPedro Giffuni CSC_PATH="$csctest" 2230cfc83b6cSPedro Giffuni fi 2231cfc83b6cSPedro Giffuni fi 2232cfc83b6cSPedro Giffuni if test ! -x "$CSC_PATH/csc.exe"; then 2233cfc83b6cSPedro Giffuni AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path]) 2234cfc83b6cSPedro Giffuni fi 2235cfc83b6cSPedro Giffuni # Convert to posix path with 8.3 filename restrictions ( No spaces ) 2236cfc83b6cSPedro Giffuni CSC_PATH=`cygpath -d "$CSC_PATH"` 2237cfc83b6cSPedro Giffuni CSC_PATH=`cygpath -u "$CSC_PATH"` 2238cfc83b6cSPedro Giffuni 2239cfc83b6cSPedro Giffuni dnl Check mscoree.lib / .NET Frameworks dir 2240cfc83b6cSPedro Giffuni dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib. 2241cfc83b6cSPedro Giffuni AC_MSG_CHECKING(.NET Framework) 2242cfc83b6cSPedro Giffuni if test -n "$with_frame_home"; then 2243cfc83b6cSPedro Giffuni with_frame_home=`cygpath -u "$with_frame_home"` 2244cfc83b6cSPedro Giffuni fi 2245cfc83b6cSPedro Giffuni if test -f "$with_frame_home/lib/mscoree.lib"; then 2246cfc83b6cSPedro Giffuni FRAME_HOME="$with_frame_home" 2247cfc83b6cSPedro Giffuni fi 2248cfc83b6cSPedro Giffuni if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then 2249cfc83b6cSPedro Giffuni FRAME_HOME="$with_cl_home/../SDK/v1.1" 2250cfc83b6cSPedro Giffuni fi 2251cfc83b6cSPedro Giffuni if test -z "$FRAME_HOME" ; then 2252cfc83b6cSPedro Giffuni frametest=`./oowintool --dotnetsdk-dir` 2253cfc83b6cSPedro Giffuni if test -f "$frametest/lib/mscoree.lib"; then 2254cfc83b6cSPedro Giffuni FRAME_HOME="$frametest" 2255cfc83b6cSPedro Giffuni else 2256cfc83b6cSPedro Giffuni frametest=`./oowintool --psdk-home` 2257cfc83b6cSPedro Giffuni if test -f "$frametest/lib/mscoree.lib"; then 2258cfc83b6cSPedro Giffuni FRAME_HOME="$frametest" 2259cfc83b6cSPedro Giffuni fi 2260cfc83b6cSPedro Giffuni fi 2261cfc83b6cSPedro Giffuni fi 2262cfc83b6cSPedro Giffuni if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then 2263cfc83b6cSPedro Giffuni AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home]) 2264cfc83b6cSPedro Giffuni fi 2265cfc83b6cSPedro Giffuni AC_MSG_RESULT(found) 2266cfc83b6cSPedro Giffuni # Convert to posix path with 8.3 filename restrictions ( No spaces ) 2267cfc83b6cSPedro Giffuni FRAME_HOME=`cygpath -d "$FRAME_HOME"` 2268cfc83b6cSPedro Giffuni FRAME_HOME=`cygpath -u "$FRAME_HOME"` 2269cfc83b6cSPedro Giffunifi 2270cfc83b6cSPedro GiffuniAC_SUBST(MIDL_PATH) 2271cfc83b6cSPedro GiffuniAC_SUBST(CSC_PATH) 2272cfc83b6cSPedro GiffuniAC_SUBST(FRAME_HOME) 2273cfc83b6cSPedro Giffunifi 2274cfc83b6cSPedro Giffuni 2275cfc83b6cSPedro Giffunidnl =================================================================== 2276cfc83b6cSPedro Giffunidnl Check if stdc headers are available excluding windows. 2277cfc83b6cSPedro Giffunidnl =================================================================== 2278cfc83b6cSPedro Giffuniif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 2279cfc83b6cSPedro Giffuni AC_HEADER_STDC 2280cfc83b6cSPedro Giffunifi 2281cfc83b6cSPedro Giffuni 2282cfc83b6cSPedro Giffunidnl =================================================================== 2283cfc83b6cSPedro Giffunidnl Find pre-processors. 2284cfc83b6cSPedro Giffunidnl =================================================================== 2285cfc83b6cSPedro Giffuniif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 2286cfc83b6cSPedro Giffuni AC_PROG_CXXCPP 2287cfc83b6cSPedro Giffuni 2288cfc83b6cSPedro Giffunidnl Check whether there's a C pre-processor. 2289cfc83b6cSPedro Giffunidnl =================================================================== 2290cfc83b6cSPedro Giffunidnl When using SunStudio compiler, there is a bug with the cc 2291cfc83b6cSPedro Giffunidnl preprocessor, so use CC preprocessor as the cc preprocessor 2292cfc83b6cSPedro Giffunidnl See Issuezilla #445. 2293cfc83b6cSPedro Giffunidnl =================================================================== 2294cfc83b6cSPedro Giffuni if test "$_os" = "SunOS"; then 2295cfc83b6cSPedro Giffuni CPP=$CXXCPP 2296cfc83b6cSPedro Giffuni else 2297cfc83b6cSPedro Giffuni AC_PROG_CPP 2298cfc83b6cSPedro Giffuni fi 2299cfc83b6cSPedro Giffunifi 2300cfc83b6cSPedro Giffuni 2301cfc83b6cSPedro GiffuniAC_CHECK_SIZEOF(long) 2302cfc83b6cSPedro GiffuniSIZEOF_LONG=$ac_cv_sizeof_long 2303cfc83b6cSPedro GiffuniAC_SUBST(SIZEOF_LONG) 2304cfc83b6cSPedro GiffuniAC_C_BIGENDIAN 2305cfc83b6cSPedro GiffuniWORDS_BIGENDIAN=$ac_cv_c_bigendian 2306cfc83b6cSPedro GiffuniAC_SUBST(WORDS_BIGENDIAN) 2307cfc83b6cSPedro Giffuni 2308cfc83b6cSPedro Giffunidnl Check for large file support 2309cfc83b6cSPedro GiffuniAC_SYS_LARGEFILE 2310cfc83b6cSPedro Giffuniif test -n "$ac_cv_sys_file_offset_bits"; then 2311cfc83b6cSPedro Giffuni LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" 2312cfc83b6cSPedro Giffunifi 2313cfc83b6cSPedro Giffuniif test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then 2314cfc83b6cSPedro Giffuni LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" 2315cfc83b6cSPedro Giffunifi 2316cfc83b6cSPedro GiffuniAC_SUBST(LFS_CFLAGS) 2317cfc83b6cSPedro Giffuni 2318cfc83b6cSPedro Giffunidnl =================================================================== 2319cfc83b6cSPedro Giffunidnl Check if valgrind.h is available 2320cfc83b6cSPedro Giffunidnl =================================================================== 2321cfc83b6cSPedro Giffuniif test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then 2322cfc83b6cSPedro Giffuni dnl Test $prefix (currently only testing for /usr and /usr/local) 2323cfc83b6cSPedro Giffuni dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind 2324cfc83b6cSPedro Giffuni VALGRIND_CFLAGS="" 2325cfc83b6cSPedro Giffuni prev_cppflags=$CPPFLAGS 2326cfc83b6cSPedro Giffuni if test -z "$VALGRIND_CFLAGS"; then 2327cfc83b6cSPedro Giffuni CPPFLAGS="-I/usr/include/valgrind" 2328cfc83b6cSPedro Giffuni AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h]) 2329cfc83b6cSPedro Giffuni fi 2330cfc83b6cSPedro Giffuni if test -z "$VALGRIND_CFLAGS"; then 2331cfc83b6cSPedro Giffuni CPPFLAGS="-I/usr/local/include/valgrind" 2332cfc83b6cSPedro Giffuni AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], []) 2333cfc83b6cSPedro Giffuni fi 2334cfc83b6cSPedro Giffuni if test -n "$VALGRIND_CFLAGS"; then 2335cfc83b6cSPedro Giffuni CPPFLAGS=$VALGRIND_CFLAGS 2336cfc83b6cSPedro Giffuni AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""]) 2337cfc83b6cSPedro Giffuni fi 2338cfc83b6cSPedro Giffuni CPPFLAGS=$prev_cppflags 2339cfc83b6cSPedro Giffunifi 2340cfc83b6cSPedro GiffuniAC_SUBST([VALGRIND_CFLAGS]) 2341cfc83b6cSPedro Giffuni 2342cfc83b6cSPedro Giffunidnl =================================================================== 2343cfc83b6cSPedro Giffunidnl Check if cups/cups.h is available 2344cfc83b6cSPedro Giffunidnl =================================================================== 2345cfc83b6cSPedro Giffuniif test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then 2346cfc83b6cSPedro Giffuni AC_CHECK_HEADER(cups/cups.h, [], 2347cfc83b6cSPedro Giffuni [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], []) 2348cfc83b6cSPedro Giffunifi 2349cfc83b6cSPedro Giffuni 2350cfc83b6cSPedro Giffunidnl =================================================================== 2351cfc83b6cSPedro Giffunidnl Check if PAM/pam_appl.h is available on Linux or FreeBSD 2352cfc83b6cSPedro Giffunidnl =================================================================== 2353cfc83b6cSPedro Giffuniif test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then 2354cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to enable pam support]) 2355cfc83b6cSPedro Giffuni if test -z "$enable_pam" || test "$enable_pam" != "no"; then 2356cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 2357cfc83b6cSPedro Giffuni PAM=YES 2358cfc83b6cSPedro Giffuni AC_CHECK_HEADER(security/pam_appl.h, [], 2359cfc83b6cSPedro Giffuni [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], []) 2360cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to link to libpam]) 2361cfc83b6cSPedro Giffuni if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then 2362cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 2363cfc83b6cSPedro Giffuni PAM_LINK=YES 2364cfc83b6cSPedro Giffuni AC_CHECK_LIB(pam, pam_start, [], 2365cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libpam not found or functional)], []) 2366cfc83b6cSPedro Giffuni else 2367cfc83b6cSPedro Giffuni AC_MSG_RESULT([no, dynamically open it]) 2368cfc83b6cSPedro Giffuni PAM_LINK=NO 2369cfc83b6cSPedro Giffuni fi 2370cfc83b6cSPedro Giffuni else 2371cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2372cfc83b6cSPedro Giffuni PAM=NO 2373cfc83b6cSPedro Giffuni PAM_LINK=NO 2374cfc83b6cSPedro Giffuni dnl check getspnam_r for needed args (4 or 5) 2375cfc83b6cSPedro Giffuni AX_FUNC_WHICH_GETSPNAM_R 2376cfc83b6cSPedro Giffuni fi 2377cfc83b6cSPedro Giffunifi 2378cfc83b6cSPedro GiffuniAC_SUBST(PAM) 2379cfc83b6cSPedro GiffuniAC_SUBST(NEW_SHADOW_API) 2380cfc83b6cSPedro GiffuniAC_SUBST(PAM_LINK) 2381cfc83b6cSPedro Giffuni 2382cfc83b6cSPedro Giffuniif test "$_os" = "Linux"; then 2383cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to link to libcrypt]) 2384cfc83b6cSPedro Giffuni if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then 2385cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 2386cfc83b6cSPedro Giffuni CRYPT_LINK=YES 2387cfc83b6cSPedro Giffuni AC_CHECK_LIB(crypt, crypt, [], 2388cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libcrypt not found or functional)], []) 2389cfc83b6cSPedro Giffuni else 2390cfc83b6cSPedro Giffuni AC_MSG_RESULT([no, dynamically open it]) 2391cfc83b6cSPedro Giffuni CRYPT_LINK=NO 2392cfc83b6cSPedro Giffuni fi 2393cfc83b6cSPedro Giffunifi 2394cfc83b6cSPedro GiffuniAC_SUBST(CRYPT_LINK) 2395cfc83b6cSPedro Giffuni 2396cfc83b6cSPedro Giffunidnl =================================================================== 2397cfc83b6cSPedro Giffunidnl Testing for c++ compiler and version... 2398cfc83b6cSPedro Giffunidnl =================================================================== 2399cfc83b6cSPedro Giffuniif test -n "$with_gcc_home"; then 2400cfc83b6cSPedro Giffuni if test -z "$CXX"; then 2401cfc83b6cSPedro Giffuni CXX="$with_gcc_home/bin/g++" 2402cfc83b6cSPedro Giffuni fi 2403cfc83b6cSPedro Giffunifi 2404cfc83b6cSPedro Giffuni 2405cfc83b6cSPedro Giffuniif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 2406cfc83b6cSPedro Giffuni if test -e "$CC"; then 2407cfc83b6cSPedro Giffuni CXX="$CC" 2408cfc83b6cSPedro Giffuni fi 2409cfc83b6cSPedro Giffunifi 2410cfc83b6cSPedro Giffuni 2411cfc83b6cSPedro Giffunidnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't! 2412cfc83b6cSPedro Giffuniif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 2413cfc83b6cSPedro Giffuni AC_PROG_CXX 2414cfc83b6cSPedro Giffunifi 2415cfc83b6cSPedro Giffuni 2416cfc83b6cSPedro Giffunidnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk) 2417cfc83b6cSPedro Giffuniif test "$GXX" = "yes"; then 2418cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the GNU C++ compiler version]) 2419cfc83b6cSPedro Giffuni 2420cfc83b6cSPedro Giffuni _gpp_version=`$CXX -dumpversion` 2421cfc83b6cSPedro Giffuni _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` 2422cfc83b6cSPedro Giffuni 2423cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked (g++ $_gpp_version)]) 2424cfc83b6cSPedro Giffuni 2425cfc83b6cSPedro Giffuni if test "$_gpp_majmin" = "304"; then 2426cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether $CXX has the enum bug]) 2427cfc83b6cSPedro GiffuniAC_TRY_RUN([ 2428cfc83b6cSPedro Giffuniextern "C" void abort (void); 2429cfc83b6cSPedro Giffuniextern "C" void exit (int status); 2430cfc83b6cSPedro Giffuni 2431cfc83b6cSPedro Giffunienum E { E0, E1, E2, E3, E4, E5 }; 2432cfc83b6cSPedro Giffuni 2433cfc83b6cSPedro Giffunivoid 2434cfc83b6cSPedro Giffunitest (enum E e) 2435cfc83b6cSPedro Giffuni{ 2436cfc83b6cSPedro Giffuni if (e == E2 || e == E3 || e == E1) 2437cfc83b6cSPedro Giffuni exit (1); 2438cfc83b6cSPedro Giffuni} 2439cfc83b6cSPedro Giffuni 2440cfc83b6cSPedro Giffuniint 2441cfc83b6cSPedro Giffunimain (void) 2442cfc83b6cSPedro Giffuni{ 2443cfc83b6cSPedro Giffuni test (E4); 2444cfc83b6cSPedro Giffuni test (E5); 2445cfc83b6cSPedro Giffuni test (E0); 2446cfc83b6cSPedro Giffuni return 0; 2447cfc83b6cSPedro Giffuni} 2448cfc83b6cSPedro Giffuni],[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])]) 2449cfc83b6cSPedro Giffuni fi 2450cfc83b6cSPedro Giffunifi 2451cfc83b6cSPedro Giffuni 2452cfc83b6cSPedro Giffunidnl =================================================================== 2453cfc83b6cSPedro Giffunidnl Set the gcc/gxx include directories 2454cfc83b6cSPedro Giffunidnl =================================================================== 2455cfc83b6cSPedro Giffuni# Removed the special FreeBSD treatment. The problem was that with_gxx_include_path 2456cfc83b6cSPedro Giffuni# often contains an i386 which is expanded as a macro. 24575532af06SJim Jagielskiif test "$GXX" = "yes" -a "$_os" != "Darwin"; then 2458cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for g++ include path]) 2459cfc83b6cSPedro Giffuni if test -z "$with_gxx_include_path"; then 2460cfc83b6cSPedro Giffuni with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` 2461cfc83b6cSPedro Giffuni if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then 2462cfc83b6cSPedro Giffuni with_gxx_include_path="/usr/include" 2463cfc83b6cSPedro Giffuni fi 2464cfc83b6cSPedro Giffuni if test "$WITH_MINGWIN" = "yes"; then 2465cfc83b6cSPedro Giffuni with_gxx_include_path=`cygpath -d "$with_gxx_include_path"` 2466cfc83b6cSPedro Giffuni with_gxx_include_path=`cygpath -u "$with_gxx_include_path"` 2467cfc83b6cSPedro Giffuni fi 246828633775SPedro Giffuni if echo $with_gxx_include_path | $GREP -q linux; then 2469cfc83b6cSPedro Giffuni # workaround for Mandriva - issue 100049 2470cfc83b6cSPedro Giffuni with_gxx_include_path=`cd $with_gxx_include_path && pwd` 2471cfc83b6cSPedro Giffuni fi 2472cfc83b6cSPedro Giffuni fi 2473cfc83b6cSPedro Giffunifi 2474cfc83b6cSPedro Giffunidnl This is the original code... 247528633775SPedro Giffunidnl with_gxx_include_path=`$CXX -print-search-dirs | $GREP instal |$AWK '{ print \$2 }'`/include 2476cfc83b6cSPedro Giffuniif test -z "$with_gxx_include_path"; then 2477cfc83b6cSPedro Giffuni with_gxx_include_path="NO_GXX_INCLUDE" 2478cfc83b6cSPedro Giffuni AC_MSG_RESULT([no g++ includes]) 2479cfc83b6cSPedro Giffunielse 2480cfc83b6cSPedro Giffuni AC_MSG_RESULT([$with_gxx_include_path]) 2481cfc83b6cSPedro Giffunifi 2482cfc83b6cSPedro GiffuniGXX_INCLUDE_PATH="$with_gxx_include_path" 2483cfc83b6cSPedro GiffuniAC_SUBST(GXX_INCLUDE_PATH) 2484cfc83b6cSPedro Giffuni 2485cfc83b6cSPedro Giffunidnl =================================================================== 2486cfc83b6cSPedro Giffunidnl Set the mingw runtime library include directories 2487cfc83b6cSPedro Giffunidnl =================================================================== 2488cfc83b6cSPedro Giffuniif test "$WITH_MINGWIN" = "yes"; then 2489cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for mingwin runtime include path]) 2490cfc83b6cSPedro Giffuni cat >conftest.$ac_ext <<_ACEOF 2491cfc83b6cSPedro Giffuni#include <stddef.h> 2492cfc83b6cSPedro Giffuni#include <bits/c++config.h> 2493cfc83b6cSPedro Giffuni_ACEOF 2494cfc83b6cSPedro Giffuni _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` 2495cfc83b6cSPedro Giffuni rm conftest.$ac_ext 2496cfc83b6cSPedro Giffuni if test -n "$_mingw_lib_include_path"; then 2497cfc83b6cSPedro Giffuni _temp="" 2498cfc83b6cSPedro Giffuni for a in $_mingw_lib_include_path 2499cfc83b6cSPedro Giffuni do 2500cfc83b6cSPedro Giffuni a=`cygpath -d "$a"` 2501cfc83b6cSPedro Giffuni _temp="$_temp "`cygpath -u "$a"` 2502cfc83b6cSPedro Giffuni done 2503cfc83b6cSPedro Giffuni _mingw_lib_include_path=$_temp 2504cfc83b6cSPedro Giffuni fi 2505cfc83b6cSPedro Giffuni if test -z "$_mingw_lib_include_path"; then 2506cfc83b6cSPedro Giffuni _mingw_lib_include_path="NO_LIB_INCLUDE" 2507cfc83b6cSPedro Giffuni AC_MSG_RESULT([no mingwin runtime includes]) 2508cfc83b6cSPedro Giffuni else 2509cfc83b6cSPedro Giffuni AC_MSG_RESULT([$_mingw_lib_include_path]) 2510cfc83b6cSPedro Giffuni fi 2511cfc83b6cSPedro Giffuni MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" 2512cfc83b6cSPedro Giffuni AC_SUBST(MINGW_LIB_INCLUDE_PATH) 2513cfc83b6cSPedro Giffunidnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map 2514cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for mingwin c++ backward include path]) 2515cfc83b6cSPedro Giffuni cat >conftest.$ac_ext <<_ACEOF 2516cfc83b6cSPedro Giffuni#include <hash_set> 2517cfc83b6cSPedro Giffuni_ACEOF 2518cfc83b6cSPedro Giffuni _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` 2519cfc83b6cSPedro Giffuni rm conftest.$ac_ext 2520cfc83b6cSPedro Giffuni if test -n "$_mingw_backward_include_path"; then 2521cfc83b6cSPedro Giffuni _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` 2522cfc83b6cSPedro Giffuni _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` 2523cfc83b6cSPedro Giffuni AC_MSG_RESULT([$_mingw_backward_include_path]) 2524cfc83b6cSPedro Giffuni else 2525cfc83b6cSPedro Giffuni _mingw_backward_include_path="NO_BACKWARD_INCLUDE" 2526cfc83b6cSPedro Giffuni AC_MSG_RESULT([no mingwin c++ backward includes]) 2527cfc83b6cSPedro Giffuni fi 2528cfc83b6cSPedro Giffuni MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" 2529cfc83b6cSPedro Giffuni AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH) 2530cfc83b6cSPedro Giffuni mingw_crtbegin=`$CC -print-file-name=crtbegin.o` 2531cfc83b6cSPedro Giffuni MINGW_CLIB_DIR=`dirname $mingw_crtbegin` 2532cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use dynamic libgcc]) 2533cfc83b6cSPedro Giffuni if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then 2534cfc83b6cSPedro Giffuni AC_MSG_CHECKING([dynamic libgcc name]) 2535cfc83b6cSPedro Giffuni 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'` 2536cfc83b6cSPedro Giffuni MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` 2537cfc83b6cSPedro Giffuni if test -n "$MINGW_GCCDLL"; then 2538cfc83b6cSPedro Giffuni MINGW_SHARED_GCCLIB=YES 2539cfc83b6cSPedro Giffuni AC_MSG_RESULT([use $MINGW_GCCDLL]) 2540cfc83b6cSPedro Giffuni else 2541cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2542cfc83b6cSPedro Giffuni fi 2543cfc83b6cSPedro Giffuni else 2544cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2545cfc83b6cSPedro Giffuni fi 2546cfc83b6cSPedro Giffuni if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then 2547cfc83b6cSPedro Giffuni MINGW_GCCLIB_EH=YES 2548cfc83b6cSPedro Giffuni fi 2549cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use dynamic libstdc++]) 2550cfc83b6cSPedro Giffuni MINGW_SHARED_LIBSTDCPP= 2551cfc83b6cSPedro Giffuni if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then 2552cfc83b6cSPedro Giffuni MINGW_SHARED_LIBSTDCPP=stdc++_s 2553cfc83b6cSPedro Giffuni fi 2554cfc83b6cSPedro Giffuni if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then 2555cfc83b6cSPedro Giffuni MINGW_SHARED_LIBSTDCPP=stdc++.dll 2556cfc83b6cSPedro Giffuni fi 2557cfc83b6cSPedro Giffuni if test -n "$MINGW_SHARED_LIBSTDCPP" ; then 2558cfc83b6cSPedro Giffuni AC_MSG_CHECKING([dynamic libstdc++ name]) 2559cfc83b6cSPedro Giffuni 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'` 2560cfc83b6cSPedro Giffuni MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` 2561cfc83b6cSPedro Giffuni if test -n "$MINGW_GXXDLL"; then 2562cfc83b6cSPedro Giffuni MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP 2563cfc83b6cSPedro Giffuni MINGW_SHARED_GXXLIB=YES 2564cfc83b6cSPedro Giffuni AC_MSG_RESULT([use $MINGW_GXXDLL]) 2565cfc83b6cSPedro Giffuni else 2566cfc83b6cSPedro Giffuni MINGW_SHARED_LIBSTDCPP= 2567cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2568cfc83b6cSPedro Giffuni fi 2569cfc83b6cSPedro Giffuni else 2570cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2571cfc83b6cSPedro Giffuni fi 2572cfc83b6cSPedro Giffuni MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` 2573cfc83b6cSPedro Giffuni AC_SUBST(MINGW_CLIB_DIR) 2574cfc83b6cSPedro Giffuni AC_SUBST(MINGW_SHARED_GCCLIB) 2575cfc83b6cSPedro Giffuni AC_SUBST(MINGW_GCCLIB_EH) 2576cfc83b6cSPedro Giffuni AC_SUBST(MINGW_SHARED_GXXLIB) 2577cfc83b6cSPedro Giffuni AC_SUBST(MINGW_SHARED_LIBSTDCPP) 2578cfc83b6cSPedro Giffuni AC_SUBST(MINGW_GCCDLL) 2579cfc83b6cSPedro Giffuni AC_SUBST(MINGW_GXXDLL) 2580cfc83b6cSPedro Giffunifi 2581cfc83b6cSPedro Giffuni 2582cfc83b6cSPedro Giffunidnl =================================================================== 2583cfc83b6cSPedro Giffunidnl Extra checking for the SUN OS compiler 2584cfc83b6cSPedro Giffunidnl =================================================================== 2585cfc83b6cSPedro Giffuniif test "$_os" = "SunOS"; then 2586cfc83b6cSPedro Giffuni dnl SunStudio C++ compiler packaged with SunStudio C compiler 2587cfc83b6cSPedro Giffuni if test "$CC" = "cc"; then 2588cfc83b6cSPedro Giffuni AC_MSG_CHECKING([SunStudio C++ Compiler]) 2589cfc83b6cSPedro Giffuni if test "$CXX" != "CC"; then 2590cfc83b6cSPedro Giffuni AC_MSG_WARN([SunStudio C++ was not found]) 2591cfc83b6cSPedro Giffuni echo "SunStudio C++ was not found" >> warn 2592cfc83b6cSPedro Giffuni else 2593cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked]) 2594cfc83b6cSPedro Giffuni fi 2595cfc83b6cSPedro Giffuni fi 2596cfc83b6cSPedro Giffunifi 2597cfc83b6cSPedro Giffunidnl =================================================================== 2598cfc83b6cSPedro Giffunidnl Extra checking for the OSF compiler 2599cfc83b6cSPedro Giffunidnl =================================================================== 2600cfc83b6cSPedro Giffuniif test "$_os" = "OSF1"; then 2601cfc83b6cSPedro Giffuni AC_MSG_CHECKING([Compaq C++ compiler version]) 2602cfc83b6cSPedro Giffuni dnl cxx -V outputs to standard error!!!! 2603cfc83b6cSPedro Giffuni _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` 2604cfc83b6cSPedro Giffuni _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'` 2605cfc83b6cSPedro Giffuni if test "$_compaqcxx_major" != "V6"; then 2606cfc83b6cSPedro Giffuni AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler]) 2607cfc83b6cSPedro Giffuni echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn 2608cfc83b6cSPedro Giffuni else 2609cfc83b6cSPedro Giffuni dnl compiler will do 2610cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked]) 2611cfc83b6cSPedro Giffuni fi 2612cfc83b6cSPedro Giffunifi 2613cfc83b6cSPedro Giffuni 2614cfc83b6cSPedro Giffunidnl ************************************************************* 2615cfc83b6cSPedro Giffunidnl Testing for exception handling - dwarf2 or sjlj exceptions... 2616cfc83b6cSPedro Giffunidnl ************************************************************* 2617cfc83b6cSPedro GiffuniAC_MSG_CHECKING([exception type]) 2618cfc83b6cSPedro GiffuniAC_LANG_PUSH([C++]) 2619cfc83b6cSPedro Giffuniif test "$WITH_MINGWIN" = "yes"; then 2620cfc83b6cSPedro Giffuni AC_TRY_LINK( 2621cfc83b6cSPedro Giffuni [#include <iostream> 2622cfc83b6cSPedro Giffuni 2623cfc83b6cSPedro Giffuniextern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__)); 2624cfc83b6cSPedro Giffuni 2625cfc83b6cSPedro Giffuni ], 2626cfc83b6cSPedro Giffuni [_Unwind_SjLj_RaiseException() ], 2627cfc83b6cSPedro Giffuni [exceptions_type="sjlj"], 2628cfc83b6cSPedro Giffuni [exceptions_type="dwarf2"] 2629cfc83b6cSPedro Giffuni ) 2630cfc83b6cSPedro Giffunifi 2631cfc83b6cSPedro Giffuni 2632cfc83b6cSPedro GiffuniAC_MSG_RESULT($exceptions_type) 2633cfc83b6cSPedro GiffuniAC_LANG_POP([C++]) 2634cfc83b6cSPedro GiffuniEXCEPTIONS="$exceptions_type" 2635cfc83b6cSPedro GiffuniAC_SUBST(EXCEPTIONS) 2636cfc83b6cSPedro Giffuni 2637cfc83b6cSPedro Giffunidnl =================================================================== 2638cfc83b6cSPedro Giffunidnl Checks for what the default STL should be 2639cfc83b6cSPedro Giffunidnl =================================================================== 2640cfc83b6cSPedro Giffuni AC_MSG_CHECKING([what the default STL should be]) 2641cfc83b6cSPedro Giffuni DEFAULT_TO_STLPORT="no" 2642cfc83b6cSPedro Giffuniif test "$WITH_STLPORT" != "no"; then 2643cfc83b6cSPedro Giffuni AC_MSG_ERROR([Option --with-stlport is no longer available.]) 2644cfc83b6cSPedro Giffunielse 2645cfc83b6cSPedro Giffuni USE_SYSTEM_STL="YES" 2646cfc83b6cSPedro Giffunifi 2647cfc83b6cSPedro Giffuni 2648cfc83b6cSPedro GiffuniAC_SUBST(USE_SYSTEM_STL) 2649cfc83b6cSPedro Giffuni 2650cfc83b6cSPedro Giffunidnl =================================================================== 2651cfc83b6cSPedro Giffunidnl visibility feature 2652cfc83b6cSPedro Giffunidnl =================================================================== 2653cfc83b6cSPedro Giffuniif test "$GCC" = "yes"; then 2654cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) 2655cfc83b6cSPedro Giffuni save_CFLAGS=$CFLAGS 2656cfc83b6cSPedro Giffuni CFLAGS="$CFLAGS -fvisibility=hidden" 2657cfc83b6cSPedro Giffuni AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], []) 2658cfc83b6cSPedro Giffuni CFLAGS=$save_CFLAGS 2659cfc83b6cSPedro Giffuni if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 2660cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 2661cfc83b6cSPedro Giffuni else 2662cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2663cfc83b6cSPedro Giffuni fi 2664cfc83b6cSPedro Giffunifi 2665cfc83b6cSPedro Giffuni 2666cfc83b6cSPedro Giffuni# =================================================================== 2667cfc83b6cSPedro Giffuni# use --ccache-skip? 2668cfc83b6cSPedro Giffuni# =================================================================== 2669cfc83b6cSPedro Giffunidnl used to escape compiler options for ccache that otherwise prevent 2670cfc83b6cSPedro Giffunidnl caching of the results (like "-x objective-c++" for Mac) 2671cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip]) 2672cfc83b6cSPedro Giffuniif test "$_os" != "Darwin" ; then 2673cfc83b6cSPedro Giffuni AC_MSG_RESULT([only used on Mac currently, skipping]) 2674cfc83b6cSPedro Giffunielif test "$enable_ccache_skip" = "no" ; then 2675cfc83b6cSPedro Giffuni AC_MSG_RESULT([no - diabled explicitly]) 2676cfc83b6cSPedro Giffunielif test "$enable_ccache_skip" = "yes" ; then 2677cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes - enabled explicitly, skipping checks]) 2678cfc83b6cSPedro Giffuni AC_SUBST([USE_CCACHE], [YES]) 2679cfc83b6cSPedro Giffunielif test "$enable_ccache_skip" = "auto" ; then 2680cfc83b6cSPedro Giffuni # checking for ccache presence/version 2681cfc83b6cSPedro Giffuni AC_MSG_RESULT([probing...]) 2682cfc83b6cSPedro Giffuni AC_PATH_PROG([CCACHE],[ccache],[not_found]) 2683cfc83b6cSPedro Giffuni if test "$CCACHE" = "not_found" ; then 2684cfc83b6cSPedro Giffuni AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)]) 2685cfc83b6cSPedro Giffuni else 2686cfc83b6cSPedro Giffuni # check ccache version 2687cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether version of ccache is suitable]) 2688cfc83b6cSPedro Giffuni CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` 2689cfc83b6cSPedro Giffuni if test "$CCACHE_VERSION" = "2.4_OOo"; then 2690cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 2691cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether ccache is actually used for the build]) 2692cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 2693cfc83b6cSPedro Giffuni save_CXXFLAGS=$CXXFLAGS 2694cfc83b6cSPedro Giffuni CXXFLAGS="$CXXFLAGS --ccache-skip -O2" 2695cfc83b6cSPedro Giffuni dnl an empty program will do, we're checking the compiler flags 2696cfc83b6cSPedro Giffuni AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], 2697cfc83b6cSPedro Giffuni [use_ccache=yes], [use_ccache=no]) 2698cfc83b6cSPedro Giffuni if test $use_ccache = yes ; then 2699cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, will enable --ccache-skip]) 2700cfc83b6cSPedro Giffuni AC_SUBST([USE_CCACHE], [YES]) 2701cfc83b6cSPedro Giffuni else 2702cfc83b6cSPedro Giffuni AC_MSG_RESULT([no, will not enable --ccache-skip]) 2703cfc83b6cSPedro Giffuni fi 2704cfc83b6cSPedro Giffuni CXXFLAGS=$save_CXXFLAGS 2705cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 2706cfc83b6cSPedro Giffuni else 2707cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2708cfc83b6cSPedro Giffuni AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip]) 2709cfc83b6cSPedro Giffuni fi 2710cfc83b6cSPedro Giffuni fi 2711cfc83b6cSPedro Giffunielse 2712cfc83b6cSPedro Giffuni AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"]) 2713cfc83b6cSPedro Giffunifi 2714cfc83b6cSPedro Giffuni 2715cfc83b6cSPedro Giffunidnl =================================================================== 2716cfc83b6cSPedro Giffunidnl system stl sanity tests 2717cfc83b6cSPedro Giffunidnl =================================================================== 2718cfc83b6cSPedro Giffuniif false ; then # TODO: update TR1 compliant STLs 2719cfc83b6cSPedro Giffuniif test "$USE_SYSTEM_STL" = "YES"; then 2720cfc83b6cSPedro Giffuni AC_MSG_CHECKING([system stl sanity]) 2721cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 2722cfc83b6cSPedro Giffuni 2723cfc83b6cSPedro Giffuni if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 2724cfc83b6cSPedro Giffuni AC_MSG_CHECKING([if STL headers are visibility safe]) 2725cfc83b6cSPedro Giffuni AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no) 2726cfc83b6cSPedro Giffuni AC_MSG_RESULT([$stlvisok]) 2727cfc83b6cSPedro Giffuni if test "$stlvisok" = "no"; then 2728cfc83b6cSPedro Giffuni AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility]) 2729cfc83b6cSPedro Giffuni echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn 2730cfc83b6cSPedro Giffuni unset HAVE_GCC_VISIBILITY_FEATURE 2731cfc83b6cSPedro Giffuni fi 2732cfc83b6cSPedro Giffuni fi 2733cfc83b6cSPedro Giffuni 2734cfc83b6cSPedro Giffuni if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 2735cfc83b6cSPedro Giffuni sharedlink_ldflags_save=$LDFLAGS 2736cfc83b6cSPedro Giffuni LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" 2737cfc83b6cSPedro Giffuni 2738cfc83b6cSPedro Giffuni AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers]) 2739cfc83b6cSPedro Giffuni AC_TRY_LINK([#include <sstream> 2740cfc83b6cSPedro Giffuniusing namespace std; 2741cfc83b6cSPedro Giffuni],[istringstream strm( "test" ); return 0;], 2742cfc83b6cSPedro Giffuni $EGREP -q unresolvable conftest.err; 2743cfc83b6cSPedro Giffuni if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi, 2744cfc83b6cSPedro Giffuni gccvisok=no) 2745cfc83b6cSPedro Giffuni AC_MSG_RESULT([$gccvisok]) 2746cfc83b6cSPedro Giffuni if test "$gccvisok" = "no"; then 2747cfc83b6cSPedro Giffuni AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility]) 2748cfc83b6cSPedro Giffuni echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn 2749cfc83b6cSPedro Giffuni unset HAVE_GCC_VISIBILITY_FEATURE 2750cfc83b6cSPedro Giffuni fi 2751cfc83b6cSPedro Giffuni 2752cfc83b6cSPedro Giffuni LDFLAGS=$sharedlink_ldflags_save 2753cfc83b6cSPedro Giffuni fi 2754cfc83b6cSPedro Giffuni 2755cfc83b6cSPedro Giffuni if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 2756cfc83b6cSPedro Giffuni AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) 2757cfc83b6cSPedro Giffuni cat >visibility.cxx <<_ACEOF 2758cfc83b6cSPedro Giffuni#pragma GCC visibility push(hidden) 2759cfc83b6cSPedro Giffunistruct __attribute__ ((visibility ("default"))) TestStruct { 2760cfc83b6cSPedro Giffuni static void Init(); 2761cfc83b6cSPedro Giffuni}; 2762cfc83b6cSPedro Giffuni__attribute__ ((visibility ("default"))) void TestFunc() { 2763cfc83b6cSPedro Giffuni TestStruct::Init(); 2764cfc83b6cSPedro Giffuni} 2765cfc83b6cSPedro Giffuni_ACEOF 2766cfc83b6cSPedro Giffuni if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then 2767cfc83b6cSPedro Giffuni gccvisbroken=yes 2768cfc83b6cSPedro Giffuni else 2769cfc83b6cSPedro Giffuni case "$build_cpu" in 2770cfc83b6cSPedro Giffuni i?86|x86_64) 2771cfc83b6cSPedro Giffuni if $EGREP -q '@PLT' visibility.s; then 2772cfc83b6cSPedro Giffuni gccvisbroken=no 2773cfc83b6cSPedro Giffuni else 2774cfc83b6cSPedro Giffuni gccvisbroken=yes 2775cfc83b6cSPedro Giffuni fi 2776cfc83b6cSPedro Giffuni ;; 2777cfc83b6cSPedro Giffuni *) 2778cfc83b6cSPedro Giffuni gccvisbroken=no 2779cfc83b6cSPedro Giffuni ;; 2780cfc83b6cSPedro Giffuni esac 2781cfc83b6cSPedro Giffuni fi 2782cfc83b6cSPedro Giffuni rm -f visibility.s visibility.cxx 2783cfc83b6cSPedro Giffuni 2784cfc83b6cSPedro Giffuni AC_MSG_RESULT([$gccvisbroken]) 2785cfc83b6cSPedro Giffuni if test "$gccvisbroken" = "yes"; then 2786cfc83b6cSPedro Giffuni AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility]) 2787cfc83b6cSPedro Giffuni echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn 2788cfc83b6cSPedro Giffuni unset HAVE_GCC_VISIBILITY_FEATURE 2789cfc83b6cSPedro Giffuni fi 2790cfc83b6cSPedro Giffuni fi 2791cfc83b6cSPedro Giffuni 2792cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 2793cfc83b6cSPedro Giffunifi 2794cfc83b6cSPedro Giffunifi # endof TODO: update TR1 compliant STLs 2795cfc83b6cSPedro Giffuni 2796cfc83b6cSPedro GiffuniAC_SUBST(HAVE_GCC_VISIBILITY_FEATURE) 2797cfc83b6cSPedro Giffuni 2798cfc83b6cSPedro Giffunidnl =================================================================== 2799cfc83b6cSPedro Giffunidnl allocator 2800cfc83b6cSPedro Giffunidnl =================================================================== 2801cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which memory allocator to use]) 2802cfc83b6cSPedro Giffuniif test "$with_alloc" = "system"; then 2803cfc83b6cSPedro Giffuni AC_MSG_RESULT([system]) 2804cfc83b6cSPedro Giffuni ALLOC="SYS_ALLOC"; 2805cfc83b6cSPedro Giffuni AC_CHECK_FUNCS([malloc realloc calloc free]) 2806cfc83b6cSPedro Giffunifi 2807cfc83b6cSPedro Giffuniif test "$with_alloc" = "tcmalloc"; then 2808cfc83b6cSPedro Giffuni AC_MSG_RESULT(tcmalloc) 280928633775SPedro Giffuni if ! echo $build_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then 2810cfc83b6cSPedro Giffuni AC_MSG_ERROR([tcmalloc only available/usable on ix86]) 2811cfc83b6cSPedro Giffuni fi 2812cfc83b6cSPedro Giffuni AC_CHECK_LIB(tcmalloc, malloc, [], 2813cfc83b6cSPedro Giffuni [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], []) 2814cfc83b6cSPedro Giffuni ALLOC="TCMALLOC"; 2815cfc83b6cSPedro Giffunifi 2816cfc83b6cSPedro Giffuniif test "$with_alloc" = "jemalloc"; then 2817cfc83b6cSPedro Giffuni if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then 2818cfc83b6cSPedro Giffuni AC_MSG_RESULT(jemalloc) 2819cfc83b6cSPedro Giffuni save_CFLAGS=$CFLAGS 2820cfc83b6cSPedro Giffuni CFLAGS="$CFLAGS -pthread" 2821cfc83b6cSPedro Giffuni AC_CHECK_LIB(jemalloc, malloc, [], 2822cfc83b6cSPedro Giffuni [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], []) 2823cfc83b6cSPedro Giffuni ALLOC="JEMALLOC"; 2824cfc83b6cSPedro Giffuni CFLAGS=$save_CFLAGS 2825cfc83b6cSPedro Giffuni else 2826cfc83b6cSPedro Giffuni AC_MSG_RESULT([system]) 2827cfc83b6cSPedro Giffuni ALLOC="SYS_ALLOC"; 2828cfc83b6cSPedro Giffuni AC_CHECK_FUNCS([malloc realloc calloc free]) 2829cfc83b6cSPedro Giffuni fi 2830cfc83b6cSPedro Giffunifi 2831cfc83b6cSPedro Giffuniif test "$with_alloc" = "internal" -o -z "$with_alloc"; then 2832cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 2833cfc83b6cSPedro Giffunifi 2834cfc83b6cSPedro GiffuniAC_SUBST(ALLOC) 2835cfc83b6cSPedro Giffuni 2836cfc83b6cSPedro Giffunidnl =================================================================== 2837cfc83b6cSPedro Giffunidnl Custom build version 2838cfc83b6cSPedro Giffunidnl =================================================================== 2839cfc83b6cSPedro Giffuni 2840cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to add custom build version]) 2841cfc83b6cSPedro Giffuniif test "z$with_build_version" != "z"; then 2842cfc83b6cSPedro Giffuni BUILD_VER_STRING=$with_build_version 2843cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, $BUILD_VER_STRING]) 2844cfc83b6cSPedro Giffunielse 28453ee2ad5bSpfg BUILD_VER_STRING= 2846cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2847cfc83b6cSPedro Giffunifi 2848cfc83b6cSPedro GiffuniAC_SUBST(BUILD_VER_STRING) 2849cfc83b6cSPedro Giffuni 2850cfc83b6cSPedro Giffunidnl =================================================================== 2851cfc83b6cSPedro Giffunidnl Java support enable 2852cfc83b6cSPedro Giffunidnl =================================================================== 2853cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build with Java support]) 2854cfc83b6cSPedro Giffuniif test "$WITH_JAVA" != "no"; then 2855cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 2856cfc83b6cSPedro Giffuni SOLAR_JAVA="TRUE" 2857cfc83b6cSPedro Giffunielse 2858cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 2859cfc83b6cSPedro Giffuni SOLAR_JAVA="" 2860cfc83b6cSPedro Giffuni 2861cfc83b6cSPedro Giffuni AC_MSG_WARN([building without java will mean some features will not be available]) 2862cfc83b6cSPedro Giffuni echo "building without java will mean some features will not be available" >>warn 2863cfc83b6cSPedro Giffunifi 2864cfc83b6cSPedro GiffuniAC_SUBST(SOLAR_JAVA) 2865cfc83b6cSPedro Giffuni 2866cfc83b6cSPedro Giffuniif test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then 2867cfc83b6cSPedro Giffuni # IBMs JDK needs this... 2868cfc83b6cSPedro Giffuni JITC_PROCESSOR_TYPE=6 2869cfc83b6cSPedro Giffuni export JITC_PROCESSOR_TYPE 2870cfc83b6cSPedro Giffunifi 2871cfc83b6cSPedro Giffuni 2872cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 2873cfc83b6cSPedro Giffuni if test -z "$with_jdk_home"; then 2874cfc83b6cSPedro Giffuni _jdk_home=`./oowintool --jdk-home` 2875cfc83b6cSPedro Giffuni if test -d "$_jdk_home"; then 2876cfc83b6cSPedro Giffuni with_jdk_home="$_jdk_home" 2877cfc83b6cSPedro Giffuni fi 2878cfc83b6cSPedro Giffuni else 2879cfc83b6cSPedro Giffuni with_jdk_home=`cygpath -u "$with_jdk_home"` 2880cfc83b6cSPedro Giffuni fi 2881cfc83b6cSPedro Giffunifi 2882cfc83b6cSPedro Giffuni 2883cfc83b6cSPedro Giffunidnl =================================================================== 2884cfc83b6cSPedro Giffunidnl Checks for java 2885cfc83b6cSPedro Giffunidnl =================================================================== 2886cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 2887cfc83b6cSPedro Giffuni JAVA_HOME=; export JAVA_HOME 2888cfc83b6cSPedro Giffuni if test -z "$with_jdk_home"; then 2889cfc83b6cSPedro Giffuni AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA) 2890cfc83b6cSPedro Giffuni else 2891cfc83b6cSPedro Giffuni _java_path="$with_jdk_home/bin/$WITH_JAVA" 2892cfc83b6cSPedro Giffuni dnl Check if there is a java interpreter at all. 2893cfc83b6cSPedro Giffuni if test -x "$_java_path"; then 2894cfc83b6cSPedro Giffuni JAVAINTERPRETER=$_java_path 2895cfc83b6cSPedro Giffuni else 2896cfc83b6cSPedro Giffuni AC_MSG_ERROR([$_java_path not found, please use --with-jdk-home]) 2897cfc83b6cSPedro Giffuni fi 2898cfc83b6cSPedro Giffuni fi 2899cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 290028633775SPedro Giffuni if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then 2901cfc83b6cSPedro Giffuni JAVAINTERPRETER="${JAVAINTERPRETER}.exe" 2902cfc83b6cSPedro Giffuni fi 2903cfc83b6cSPedro Giffuni JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` 2904cfc83b6cSPedro Giffuni JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` 2905cfc83b6cSPedro Giffuni elif test "$_os" = "Darwin"; then 2906cfc83b6cSPedro Giffuni JAVAIFLAGS="" 2907cfc83b6cSPedro Giffuni fi 2908cfc83b6cSPedro Giffunifi 2909cfc83b6cSPedro Giffuni 2910cfc83b6cSPedro Giffunidnl =================================================================== 2911cfc83b6cSPedro Giffunidnl Checks for JDK. 2912cfc83b6cSPedro Giffunidnl =================================================================== 2913cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 2914cfc83b6cSPedro Giffuni _gij_longver=0 2915cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the installed JDK]) 2916cfc83b6cSPedro Giffuni if test -n "$JAVAINTERPRETER"; then 2917cfc83b6cSPedro Giffuni dnl java -version sends output to stderr! 291828633775SPedro Giffuni if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then 2919cfc83b6cSPedro Giffuni AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) 2920cfc83b6cSPedro Giffuni# dnl Kaffe specific tests 2921cfc83b6cSPedro Giffuni# KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` 2922cfc83b6cSPedro Giffuni# if test -z "$KAFFE_VER"; then 2923cfc83b6cSPedro Giffuni# AC_MSG_ERROR([looks like Kaffe but version detection failed]) 2924cfc83b6cSPedro Giffuni# fi 2925cfc83b6cSPedro Giffuni# _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 2926cfc83b6cSPedro Giffuni# if test "$_kaffe_ver" -lt 10100; then 2927cfc83b6cSPedro Giffuni# AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0]) 2928cfc83b6cSPedro Giffuni# fi 2929cfc83b6cSPedro Giffuni# JDK=kaffe 2930cfc83b6cSPedro Giffuni# 2931cfc83b6cSPedro Giffuni# dnl TODO: define some project exclusion variables 2932cfc83b6cSPedro Giffuni# 2933cfc83b6cSPedro Giffuni# AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)]) 2934cfc83b6cSPedro Giffuni# AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile]) 2935cfc83b6cSPedro Giffuni# echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn 2936cfc83b6cSPedro Giffuni# JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` 293728633775SPedro Giffuni elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then 2938cfc83b6cSPedro Giffuni JDK=gcj 2939cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked (gcj)]) 294028633775SPedro Giffuni _gij_version=`$JAVAINTERPRETER --version | $GREP GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 2941cfc83b6cSPedro Giffuni _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 2942cfc83b6cSPedro Giffuni 294328633775SPedro Giffuni elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | $GREP -c "BEA"` -gt 0; then 2944cfc83b6cSPedro Giffuni AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) 2945cfc83b6cSPedro Giffuni# JDK=bea 2946cfc83b6cSPedro Giffuni# 2947cfc83b6cSPedro Giffuni# dnl BEA JDK specific tests 2948cfc83b6cSPedro Giffuni# _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 2949cfc83b6cSPedro Giffuni# _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 2950cfc83b6cSPedro Giffuni# 2951cfc83b6cSPedro Giffuni# if test "$_jdk_ver" -lt 10500; then 2952cfc83b6cSPedro Giffuni# AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0]) 2953cfc83b6cSPedro Giffuni# fi 2954cfc83b6cSPedro Giffuni# 2955cfc83b6cSPedro Giffuni# AC_MSG_RESULT([checked (BEA JDK $_jdk)]) 2956cfc83b6cSPedro Giffuni# 2957cfc83b6cSPedro Giffuni# if test "$with_jdk_home" = ""; then 2958cfc83b6cSPedro Giffuni# AC_MSG_ERROR([In order to successfully build Apache OpenOffice using the BEA JDK, 2959cfc83b6cSPedro Giffuni#you must use the "--with-jdk-home" configure option explicitly]) 2960cfc83b6cSPedro Giffuni# fi 2961cfc83b6cSPedro Giffuni# 2962cfc83b6cSPedro Giffuni# AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules]) 2963cfc83b6cSPedro Giffuni# echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn 2964cfc83b6cSPedro Giffuni# 2965cfc83b6cSPedro Giffuni# JAVA_HOME=$with_jdk_home 2966cfc83b6cSPedro Giffuni# 296728633775SPedro Giffuni elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | $GREP -c "IBM"` -gt 0; then 2968cfc83b6cSPedro Giffuni JDK=ibm 2969cfc83b6cSPedro Giffuni 2970cfc83b6cSPedro Giffuni dnl IBM JDK specific tests 2971cfc83b6cSPedro Giffuni _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 2972cfc83b6cSPedro Giffuni _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 2973cfc83b6cSPedro Giffuni 2974cfc83b6cSPedro Giffuni if test "$_jdk_ver" -lt 10500; then 2975cfc83b6cSPedro Giffuni AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5]) 2976cfc83b6cSPedro Giffuni fi 2977cfc83b6cSPedro Giffuni 2978cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked (IBM JDK $_jdk)]) 2979cfc83b6cSPedro Giffuni 2980cfc83b6cSPedro Giffuni if test "$with_jdk_home" = ""; then 2981cfc83b6cSPedro Giffuni AC_MSG_ERROR([In order to successfully build Apache OpenOffice using the IBM JDK, 2982cfc83b6cSPedro Giffuniyou must use the "--with-jdk-home" configure option explicitly]) 2983cfc83b6cSPedro Giffuni fi 2984cfc83b6cSPedro Giffuni 2985cfc83b6cSPedro Giffuni JAVA_HOME=$with_jdk_home 2986cfc83b6cSPedro Giffuni 2987cfc83b6cSPedro Giffuni else 2988cfc83b6cSPedro Giffuni JDK=sun 2989cfc83b6cSPedro Giffuni 2990cfc83b6cSPedro Giffuni dnl SUN JDK specific tests 2991cfc83b6cSPedro Giffuni _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 2992cfc83b6cSPedro Giffuni _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 2993cfc83b6cSPedro Giffuni 2994cfc83b6cSPedro Giffuni if test "$_jdk_ver" -lt 10500; then 2995cfc83b6cSPedro Giffuni AC_MSG_ERROR([JDK is too old, you need at least 1.5]) 2996cfc83b6cSPedro Giffuni fi 2997cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked (JDK $_jdk)]) 2998cfc83b6cSPedro Giffuni JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` 2999cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 3000cfc83b6cSPedro Giffuni JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` 3001cfc83b6cSPedro Giffuni fi 3002cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 3003cfc83b6cSPedro Giffuni JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` 3004cfc83b6cSPedro Giffuni fi 3005cfc83b6cSPedro Giffuni fi 3006cfc83b6cSPedro Giffuni else 3007cfc83b6cSPedro Giffuni AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4]) 3008cfc83b6cSPedro Giffuni fi 3009cfc83b6cSPedro Giffunielse 3010cfc83b6cSPedro Giffuni dnl Java disabled 3011cfc83b6cSPedro Giffuni JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME 3012cfc83b6cSPedro Giffunifi 3013cfc83b6cSPedro Giffuni 3014cfc83b6cSPedro Giffunidnl =================================================================== 3015cfc83b6cSPedro Giffunidnl Checks for javac 3016cfc83b6cSPedro Giffunidnl =================================================================== 3017cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 3018cfc83b6cSPedro Giffuni if test "$JDK" = "gcj"; then 3019cfc83b6cSPedro Giffuni javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"` 3020cfc83b6cSPedro Giffuni else 3021cfc83b6cSPedro Giffuni javacompiler="javac" 3022cfc83b6cSPedro Giffuni fi 3023cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 302428633775SPedro Giffuni if test x`echo "$javacompiler" | $GREP -i '\.exe$'` = x; then 3025cfc83b6cSPedro Giffuni javacompiler="${javacompiler}.exe" 3026cfc83b6cSPedro Giffuni fi 3027cfc83b6cSPedro Giffuni fi 3028cfc83b6cSPedro Giffuni if test -z "$with_jdk_home"; then 3029cfc83b6cSPedro Giffuni AC_PATH_PROG(JAVACOMPILER, $javacompiler) 3030cfc83b6cSPedro Giffuni else 3031cfc83b6cSPedro Giffuni _javac_path="$with_jdk_home/bin/$javacompiler" 3032cfc83b6cSPedro Giffuni dnl Check if there is a java compiler at all. 3033cfc83b6cSPedro Giffuni if test -x "$_javac_path"; then 3034cfc83b6cSPedro Giffuni JAVACOMPILER=$_javac_path 3035cfc83b6cSPedro Giffuni fi 3036cfc83b6cSPedro Giffuni fi 3037cfc83b6cSPedro Giffuni if test -z "$JAVACOMPILER"; then 3038cfc83b6cSPedro Giffuni AC_MSG_ERROR([$javacompiler not found, please use --with-jdk-home]) 3039cfc83b6cSPedro Giffuni fi 3040cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 304128633775SPedro Giffuni if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then 3042cfc83b6cSPedro Giffuni JAVACOMPILER="${JAVACOMPILER}.exe" 3043cfc83b6cSPedro Giffuni fi 3044cfc83b6cSPedro Giffuni JAVACOMPILER=`cygpath -d "$JAVACOMPILER"` 3045cfc83b6cSPedro Giffuni JAVACOMPILER=`cygpath -u "$JAVACOMPILER"` 3046cfc83b6cSPedro Giffuni fi 3047cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 304828633775SPedro Giffuni if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then 3049cfc83b6cSPedro Giffuni JAVACOMPILER="${JAVACOMPILER}.exe" 3050cfc83b6cSPedro Giffuni fi 3051cfc83b6cSPedro Giffuni fi 3052cfc83b6cSPedro Giffuni 305328633775SPedro Giffuni if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Eclipse Java Compiler"` -gt 0; then 3054cfc83b6cSPedro Giffuni AC_MSG_CHECKING([re-checking JDK]) 3055cfc83b6cSPedro Giffuni JDK=gcj 3056cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked (ecj)]) 3057cfc83b6cSPedro Giffuni #TODO: what's to do here? some switch to do 1.5 compiling? 3058cfc83b6cSPedro Giffuni JAVAFLAGS="-source 1.5 -target 1.5" 3059cfc83b6cSPedro Giffuni _gij_longver="40200" 3060cfc83b6cSPedro Giffuni fi 3061cfc83b6cSPedro Giffunifi 3062cfc83b6cSPedro Giffuni 3063cfc83b6cSPedro GiffuniJAVACISGCJ="" 3064cfc83b6cSPedro Giffunidnl =================================================================== 3065cfc83b6cSPedro Giffunidnl Checks that javac is gcj 3066cfc83b6cSPedro Giffunidnl =================================================================== 3067cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 306828633775SPedro Giffuni if test `$JAVACOMPILER --version 2>&1 | $GREP -c "GCC"` -gt 0; then 3069cfc83b6cSPedro Giffuni JAVACISGCJ="yes" 3070cfc83b6cSPedro Giffuni fi 3071cfc83b6cSPedro Giffunifi 3072cfc83b6cSPedro GiffuniAC_SUBST(JAVACISGCJ) 3073cfc83b6cSPedro Giffuni 3074cfc83b6cSPedro Giffunidnl =================================================================== 3075cfc83b6cSPedro Giffunidnl Checks for javadoc 3076cfc83b6cSPedro Giffunidnl =================================================================== 3077cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 3078cfc83b6cSPedro Giffuni if test -z "$with_jdk_home"; then 3079cfc83b6cSPedro Giffuni AC_PATH_PROG(JAVADOC, javadoc) 3080cfc83b6cSPedro Giffuni else 3081cfc83b6cSPedro Giffuni _javadoc_path="$with_jdk_home/bin/javadoc" 3082cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 308328633775SPedro Giffuni if test x`echo "$_javadoc_path" | $GREP -i '\.exe$'` = x; then 3084cfc83b6cSPedro Giffuni _javadoc_path="${_javadoc_path}.exe" 3085cfc83b6cSPedro Giffuni fi 3086cfc83b6cSPedro Giffuni fi 3087cfc83b6cSPedro Giffuni dnl Check if there is a javadoc at all. 3088cfc83b6cSPedro Giffuni if test -x "$_javadoc_path"; then 3089cfc83b6cSPedro Giffuni JAVADOC=$_javadoc_path 3090cfc83b6cSPedro Giffuni else 3091cfc83b6cSPedro Giffuni AC_PATH_PROG(JAVADOC, javadoc) 3092cfc83b6cSPedro Giffuni fi 3093cfc83b6cSPedro Giffuni fi 3094cfc83b6cSPedro Giffuni if test -z "$JAVADOC"; then 3095cfc83b6cSPedro Giffuni AC_MSG_ERROR([$_javadoc_path not found, please use --with-jdk-home]) 3096cfc83b6cSPedro Giffuni fi 3097cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 309828633775SPedro Giffuni if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then 3099cfc83b6cSPedro Giffuni JAVADOC="${JAVADOC}.exe" 3100cfc83b6cSPedro Giffuni fi 3101cfc83b6cSPedro Giffuni JAVADOC=`cygpath -d "$JAVADOC"` 3102cfc83b6cSPedro Giffuni JAVADOC=`cygpath -u "$JAVADOC"` 3103cfc83b6cSPedro Giffuni fi 3104cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 310528633775SPedro Giffuni if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then 3106cfc83b6cSPedro Giffuni JAVADOC="${JAVADOC}.exe" 3107cfc83b6cSPedro Giffuni fi 3108cfc83b6cSPedro Giffuni fi 3109cfc83b6cSPedro Giffunifi 3110cfc83b6cSPedro Giffuni 3111cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 3112cfc83b6cSPedro Giffuni dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij 3113cfc83b6cSPedro Giffuni if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then 3114cfc83b6cSPedro Giffuni if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then 3115cfc83b6cSPedro Giffuni cat > findhome.java <<_ACEOF 3116cfc83b6cSPedro Giffuni[import java.io.File; 3117cfc83b6cSPedro Giffuni 3118cfc83b6cSPedro Giffuniclass findhome 3119cfc83b6cSPedro Giffuni{ 3120cfc83b6cSPedro Giffuni public static void main(String args[]) 3121cfc83b6cSPedro Giffuni { 3122cfc83b6cSPedro Giffuni String jrelocation = System.getProperty("java.home"); 3123cfc83b6cSPedro Giffuni File jre = new File(jrelocation); 3124cfc83b6cSPedro Giffuni System.out.println(jre.getParent()); 3125cfc83b6cSPedro Giffuni } 3126cfc83b6cSPedro Giffuni}] 3127cfc83b6cSPedro Giffuni_ACEOF 3128cfc83b6cSPedro Giffuni AC_MSG_CHECKING([if javac works]) 3129cfc83b6cSPedro Giffuni javac_cmd="$JAVACOMPILER findhome.java 1>&2" 3130cfc83b6cSPedro Giffuni AC_TRY_EVAL(javac_cmd) 3131cfc83b6cSPedro Giffuni if test $? = 0 && test -f ./findhome.class ; then 3132cfc83b6cSPedro Giffuni AC_MSG_RESULT([javac works]) 3133cfc83b6cSPedro Giffuni else 3134cfc83b6cSPedro Giffuni echo "configure: javac test failed" >&5 3135cfc83b6cSPedro Giffuni cat findhome.java >&5 3136cfc83b6cSPedro Giffuni AC_MSG_ERROR([javac does not work - java projects will not build!]) 3137cfc83b6cSPedro Giffuni fi 3138cfc83b6cSPedro Giffuni 3139cfc83b6cSPedro Giffuni AC_MSG_CHECKING([if gij knows its java.home]) 3140cfc83b6cSPedro Giffuni JAVA_HOME=`$JAVAINTERPRETER findhome` 3141cfc83b6cSPedro Giffuni if test $? = 0 && test "$JAVA_HOME" != "" ; then 3142cfc83b6cSPedro Giffuni AC_MSG_RESULT([$JAVA_HOME]) 3143cfc83b6cSPedro Giffuni else 3144cfc83b6cSPedro Giffuni echo "configure: java test failed" >&5 3145cfc83b6cSPedro Giffuni cat findhome.java >&5 3146cfc83b6cSPedro Giffuni AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home]) 3147cfc83b6cSPedro Giffuni fi 3148cfc83b6cSPedro Giffuni else 3149cfc83b6cSPedro Giffuni JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"` 3150cfc83b6cSPedro Giffuni fi 3151cfc83b6cSPedro Giffuni fi 3152cfc83b6cSPedro Giffuni 3153cfc83b6cSPedro Giffuni dnl second sanity check JAVA_HOME if possible 3154cfc83b6cSPedro Giffuni if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then 3155cfc83b6cSPedro Giffuni # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr 3156cfc83b6cSPedro Giffuni if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then 3157cfc83b6cSPedro Giffuni javac_link_f=`readlink -f "$JAVACOMPILER" 2>/dev/null` 3158cfc83b6cSPedro Giffuni if test $? == 0 && test "$JAVACOMPILER" != "$javac_link_f"; then 3159cfc83b6cSPedro Giffuni # try to recover first by looking whether we have a alternatives 3160cfc83b6cSPedro Giffuni # system as in Debian or newer SuSEs where following /usr/bin/javac 3161cfc83b6cSPedro Giffuni # over /etc/alternatives/javac leads to the right bindir where we 3162cfc83b6cSPedro Giffuni # just need to strip a bit away to get a valid JAVA_HOME 3163cfc83b6cSPedro Giffuni # Solaris 11 is even worse, because target is relative, so use -f 3164cfc83b6cSPedro Giffuni JAVA_HOME="$javac_link_f" 3165cfc83b6cSPedro Giffuni elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then 3166cfc83b6cSPedro Giffuni # Darwin readlink(1) is so primitive it doesn't even support -f 3167cfc83b6cSPedro Giffuni # maybe only one level of symlink (e.g. on Mac) 3168cfc83b6cSPedro Giffuni JAVA_HOME=`readlink $JAVACOMPILER` 3169cfc83b6cSPedro Giffuni else 3170cfc83b6cSPedro Giffuni # else warn 3171cfc83b6cSPedro Giffuni AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect]) 3172cfc83b6cSPedro Giffuni AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home]) 3173cfc83b6cSPedro Giffuni echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn 3174cfc83b6cSPedro Giffuni echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn 3175cfc83b6cSPedro Giffuni fi 3176cfc83b6cSPedro Giffuni dnl now that we have the path to the real javac, make a JAVA_HOME out of it.. 3177cfc83b6cSPedro Giffuni if test "$JAVA_HOME" != "/usr"; then 3178cfc83b6cSPedro Giffuni if test "$_os" = "Darwin"; then 3179cfc83b6cSPedro Giffuni dnl Leopard returns a non-suitable path with readlink - points to "Current" only 3180cfc83b6cSPedro Giffuni JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,) 3181cfc83b6cSPedro Giffuni dnl Tiger already returns a JDK path.. 3182cfc83b6cSPedro Giffuni JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,) 3183cfc83b6cSPedro Giffuni else 3184cfc83b6cSPedro Giffuni JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,) 3185cfc83b6cSPedro Giffuni fi 3186cfc83b6cSPedro Giffuni fi 3187cfc83b6cSPedro Giffuni fi 3188cfc83b6cSPedro Giffuni # now check if $JAVA_HOME is really valid 3189cfc83b6cSPedro Giffuni if test "$_os" = "Darwin"; then 3190cfc83b6cSPedro Giffuni if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then 3191cfc83b6cSPedro Giffuni JAVA_HOME_OK="NO" 3192cfc83b6cSPedro Giffuni fi 3193cfc83b6cSPedro Giffuni elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then 3194cfc83b6cSPedro Giffuni JAVA_HOME_OK="NO" 3195cfc83b6cSPedro Giffuni fi 3196cfc83b6cSPedro Giffuni if test "$JAVA_HOME_OK" = "NO"; then 3197cfc83b6cSPedro Giffuni AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script]) 3198cfc83b6cSPedro Giffuni AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed]) 3199cfc83b6cSPedro Giffuni AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly]) 3200cfc83b6cSPedro Giffuni echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn 3201cfc83b6cSPedro Giffuni echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn 3202cfc83b6cSPedro Giffuni echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn 3203cfc83b6cSPedro Giffuni# if test "$JDK" = "gcj"; then 3204cfc83b6cSPedro Giffuni# 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 3205cfc83b6cSPedro Giffuni# fi 3206cfc83b6cSPedro Giffuni fi 3207cfc83b6cSPedro Giffuni fi 3208cfc83b6cSPedro Giffunifi 3209cfc83b6cSPedro Giffuni 3210cfc83b6cSPedro GiffuniAWTLIB= 3211cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 3212cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for jawt lib name]) 3213cfc83b6cSPedro Giffuni if test "$JDK" = "gcj"; then 3214cfc83b6cSPedro Giffuni save_CFLAGS=$CFLAGS 3215cfc83b6cSPedro Giffuni save_LDFLAGS=$LDFLAGS 3216cfc83b6cSPedro Giffuni CFLAGS="$CFLAGS -I$JAVA_HOME/include" 3217cfc83b6cSPedro Giffuni LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" 3218cfc83b6cSPedro Giffuni exec 6>/dev/null # no output 3219cfc83b6cSPedro Giffuni AC_CHECK_HEADER(jni.h, [], 3220cfc83b6cSPedro Giffuni [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], []) 3221cfc83b6cSPedro Giffuni AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] ) 3222cfc83b6cSPedro Giffuni exec 6>&1 # output on again 3223cfc83b6cSPedro Giffuni CFLAGS=$save_CFLAGS 3224cfc83b6cSPedro Giffuni LDFLAGS=$save_LDFLAGS 3225cfc83b6cSPedro Giffuni fi 3226cfc83b6cSPedro Giffuni # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols. 3227cfc83b6cSPedro Giffuni # A workaround is to link also against libpmawt.so 3228cfc83b6cSPedro Giffuni if test "$JDK" = "ibm" ; then 3229cfc83b6cSPedro Giffuni save_CFLAGS=$CFLAGS 3230cfc83b6cSPedro Giffuni save_LDFLAGS=$LDFLAGS 3231cfc83b6cSPedro Giffuni save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH 3232cfc83b6cSPedro Giffuni CFLAGS="$CFLAGS -I$JAVA_HOME/include" 3233cfc83b6cSPedro Giffuni LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin" 3234cfc83b6cSPedro Giffuni LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH 3235cfc83b6cSPedro Giffuni export LD_LIBRARY_PATH 3236cfc83b6cSPedro Giffuni exec 6>/dev/null # no output 3237cfc83b6cSPedro Giffuni AC_CHECK_HEADER(jni.h, [], 3238cfc83b6cSPedro Giffuni [AC_MSG_ERROR([jni.h could not be found.])], []) 3239cfc83b6cSPedro Giffuni AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] ) 3240cfc83b6cSPedro Giffuni if test -z "$AWTLIB"; then 3241cfc83b6cSPedro Giffuni LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" 3242cfc83b6cSPedro Giffuni AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"]) 3243cfc83b6cSPedro Giffuni fi 3244cfc83b6cSPedro Giffuni exec 6>&1 # output on again 3245cfc83b6cSPedro Giffuni CFLAGS=$save_CFLAGS 3246cfc83b6cSPedro Giffuni LDFLAGS=$save_LDFLAGS 3247cfc83b6cSPedro Giffuni LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH 3248cfc83b6cSPedro Giffuni fi 3249cfc83b6cSPedro Giffuni if test -z "$AWTLIB"; then 3250cfc83b6cSPedro Giffuni AWTLIB=-ljawt 3251cfc83b6cSPedro Giffuni fi 3252cfc83b6cSPedro Giffuni AC_MSG_RESULT([$AWTLIB]) 3253cfc83b6cSPedro Giffuni AC_SUBST(AWTLIB) 3254cfc83b6cSPedro Giffunifi 3255cfc83b6cSPedro Giffuni 3256cfc83b6cSPedro Giffunidnl =================================================================== 3257cfc83b6cSPedro Giffunidnl Check for optional gcj for AOT 3258cfc83b6cSPedro Giffunidnl =================================================================== 3259cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 3260cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to enable gcj aot compilation]) 3261cfc83b6cSPedro Giffuni if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then 3262cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 326328633775SPedro Giffuni if test `echo $WITH_JAVA | $GREP -c "gij"` -eq 0; then 3264cfc83b6cSPedro Giffuni gcjaot="gcj" 3265cfc83b6cSPedro Giffuni else 3266cfc83b6cSPedro Giffuni gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"` 3267cfc83b6cSPedro Giffuni fi 3268cfc83b6cSPedro Giffuni AC_MSG_RESULT([$gcjaot]) 3269cfc83b6cSPedro Giffuni if test -n "$with_jdk_home"; then 3270cfc83b6cSPedro Giffuni _javac_path="$with_jdk_home/bin/$gcjaot" 3271cfc83b6cSPedro Giffuni dnl Check if there is a gcj at all. 3272cfc83b6cSPedro Giffuni if test -x "$_javac_path"; then 3273cfc83b6cSPedro Giffuni JAVAAOTCOMPILER=$_javac_path 3274cfc83b6cSPedro Giffuni fi 3275cfc83b6cSPedro Giffuni fi 3276cfc83b6cSPedro Giffuni if test -z "$JAVAAOTCOMPILER"; then 3277cfc83b6cSPedro Giffuni AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot) 3278cfc83b6cSPedro Giffuni fi 3279cfc83b6cSPedro Giffuni if test -z "$JAVAAOTCOMPILER"; then 3280cfc83b6cSPedro Giffuni AC_MSG_WARN([$gcjaot not found, please use --with-jdk-home]) 3281cfc83b6cSPedro Giffuni fi 3282cfc83b6cSPedro Giffuni else 3283cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 3284cfc83b6cSPedro Giffuni fi 3285cfc83b6cSPedro Giffunifi 3286cfc83b6cSPedro Giffuni 3287cfc83b6cSPedro GiffuniAC_SUBST(JAVA_HOME) 3288cfc83b6cSPedro GiffuniAC_SUBST(JDK) 3289cfc83b6cSPedro GiffuniAC_SUBST(JAVAFLAGS) 3290cfc83b6cSPedro GiffuniAC_SUBST(JAVAINTERPRETER) 3291cfc83b6cSPedro GiffuniAC_SUBST(JAVAIFLAGS) 3292cfc83b6cSPedro GiffuniAC_SUBST(JAVACOMPILER) 3293cfc83b6cSPedro GiffuniAC_SUBST(JAVAAOTCOMPILER) 3294cfc83b6cSPedro GiffuniAC_SUBST(JAVADOC) 3295cfc83b6cSPedro Giffuni 3296cfc83b6cSPedro Giffunidnl =================================================================== 3297cfc83b6cSPedro Giffunidnl Checks for specific files. 3298cfc83b6cSPedro Giffunidnl =================================================================== 3299cfc83b6cSPedro Giffuni 3300cfc83b6cSPedro Giffunidnl =================================================================== 3301cfc83b6cSPedro Giffunidnl Checks for programs. 3302cfc83b6cSPedro Giffunidnl =================================================================== 3303cfc83b6cSPedro Giffuni 3304cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable EPM for packing]) 3305cfc83b6cSPedro Giffuniif test "$enable_epm" = "yes"; then 3306cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 3307cfc83b6cSPedro Giffuni dnl =================================================================== 3308cfc83b6cSPedro Giffuni dnl Check for epm - not needed for windows 3309cfc83b6cSPedro Giffuni dnl =================================================================== 3310cfc83b6cSPedro Giffuni if test "$_os" != "WINNT"; then 3311cfc83b6cSPedro Giffuni if test -n "$with_epm"; then 3312cfc83b6cSPedro Giffuni EPM=$with_epm 3313cfc83b6cSPedro Giffuni else 3314cfc83b6cSPedro Giffuni AC_PATH_PROG(EPM, epm, no) 3315cfc83b6cSPedro Giffuni fi 3316cfc83b6cSPedro Giffuni 3317cfc83b6cSPedro Giffuni # Override system epm and --with-epm if --with-epm-url is used. 3318cfc83b6cSPedro Giffuni if test -n "$with_epm_url" ; then 3319cfc83b6cSPedro Giffuni # At this moment we can not verify the URL or the content that we want to download. 3320cfc83b6cSPedro Giffuni EPM_URL=$with_epm_url 3321cfc83b6cSPedro Giffuni AC_MSG_RESULT([epm will be downloaded and compiled in bootstrap]) 3322cfc83b6cSPedro Giffuni EPM= 3323cfc83b6cSPedro Giffuni echo "EPM will be built." 3324cfc83b6cSPedro Giffuni BUILD_EPM=YES 3325cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE EPM" 3326cfc83b6cSPedro Giffuni else 3327cfc83b6cSPedro Giffuni if test "$EPM" = "no" ; then 3328cfc83b6cSPedro Giffuni 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.]) 3329cfc83b6cSPedro Giffuni else 3330cfc83b6cSPedro Giffuni # Gentoo has some epm which is something different... 3331cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether the found epm is the right epm]) 333228633775SPedro Giffuni if $EPM | $GREP "ESP Package Manager" >/dev/null 2>/dev/null; then 3333cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 3334cfc83b6cSPedro Giffuni else 3335cfc83b6cSPedro Giffuni 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.]) 3336cfc83b6cSPedro Giffuni fi 3337cfc83b6cSPedro Giffuni AC_MSG_CHECKING([epm version]) 333828633775SPedro Giffuni EPM_VERSION=`$EPM | $GREP 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` 3339cfc83b6cSPedro Giffuni if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ 3340cfc83b6cSPedro Giffuni test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then 3341cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK, >= 3.7]) 3342cfc83b6cSPedro Giffuni BUILD_EPM=NO 3343cfc83b6cSPedro Giffuni if test "$_os" = "Darwin"; then 33442e39503fSjim _osxpkgbuild='no' 3345b48104e3Sjim AC_MSG_CHECKING([checking if OS X pkgbuild is supported]) 3346b48104e3Sjim if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "4" || \ 3347b48104e3Sjim test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "4" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "3"; then 3348b48104e3Sjim AC_MSG_RESULT([OK, >= 4.3]) 33492e39503fSjim _osxpkgbuild='yes' 3350b48104e3Sjim else 3351cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which PackageMaker EPM thinks to use]) 335228633775SPedro Giffuni _pm=`strings $EPM | $GREP PackageMaker | cut -d" " -f1` 3353cfc83b6cSPedro Giffuni if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then 3354cfc83b6cSPedro Giffuni 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)]) 3355cfc83b6cSPedro Giffuni elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then 3356cfc83b6cSPedro Giffuni AC_MSG_RESULT([$_pm, ok]) 3357cfc83b6cSPedro Giffuni else # we never should get here, but go safe 3358cfc83b6cSPedro Giffuni 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)]) 3359cfc83b6cSPedro Giffuni fi 3360cfc83b6cSPedro Giffuni fi 3361b48104e3Sjim fi 3362cfc83b6cSPedro Giffuni else 3363cfc83b6cSPedro Giffuni AC_MSG_ERROR([too old. epm >= 3.7 is required.]) 3364cfc83b6cSPedro Giffuni fi 3365cfc83b6cSPedro Giffuni fi 3366cfc83b6cSPedro Giffuni fi 3367cfc83b6cSPedro Giffuni fi 3368cfc83b6cSPedro Giffuni 3369cfc83b6cSPedro Giffuni # test which package format to use 3370cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which package format to use]) 3371cfc83b6cSPedro Giffuni 3372cfc83b6cSPedro Giffuni # defaults 3373cfc83b6cSPedro Giffuni case "$_os" in 3374cfc83b6cSPedro Giffuni OS2) 3375cfc83b6cSPedro Giffuni PKGFORMAT=native 3376cfc83b6cSPedro Giffuni ;; 3377cfc83b6cSPedro Giffuni Darwin) 3378cfc83b6cSPedro Giffuni PKGFORMAT=dmg 3379cfc83b6cSPedro Giffuni ;; 3380cfc83b6cSPedro Giffuni SunOS) 3381cfc83b6cSPedro Giffuni PKGFORMAT=pkg 3382cfc83b6cSPedro Giffuni ;; 3383cfc83b6cSPedro Giffuni Linux) 3384cfc83b6cSPedro Giffuni # if building on Debian, default should be deb... 3385cfc83b6cSPedro Giffuni if test -e /etc/debian_version; then 3386cfc83b6cSPedro Giffuni PKGFORMAT=deb 3387cfc83b6cSPedro Giffuni else 3388cfc83b6cSPedro Giffuni PKGFORMAT=rpm 3389cfc83b6cSPedro Giffuni fi 3390cfc83b6cSPedro Giffuni ;; 3391cfc83b6cSPedro Giffuni AIX) 3392cfc83b6cSPedro Giffuni PKGFORMAT=aix 3393cfc83b6cSPedro Giffuni ;; 3394cfc83b6cSPedro Giffuni *BSD) 3395cfc83b6cSPedro Giffuni PKGFORMAT=bsd 3396cfc83b6cSPedro Giffuni ;; 3397cfc83b6cSPedro Giffuni OSF1) 3398cfc83b6cSPedro Giffuni PKGFORMAT=setld 3399cfc83b6cSPedro Giffuni ;; 3400cfc83b6cSPedro Giffuni WINNT) 3401cfc83b6cSPedro Giffuni PKGFORMAT=msi 3402cfc83b6cSPedro Giffuni ;; 34039d1669aeSMatthias Seidel # we never should get here since we check the architecture/os at the beginning, 3404cfc83b6cSPedro Giffuni # but go sure... 3405cfc83b6cSPedro Giffuni *) 3406cfc83b6cSPedro Giffuni AC_MSG_ERROR([unknown system]) 3407cfc83b6cSPedro Giffuni esac 3408cfc83b6cSPedro Giffuni if test -n "$with_package_format"; then 3409cfc83b6cSPedro Giffuni for i in $with_package_format; do 3410cfc83b6cSPedro Giffuni case "$i" in 3411cfc83b6cSPedro Giffuni aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi) 3412cfc83b6cSPedro Giffuni ;; 3413cfc83b6cSPedro Giffuni *) 3414cfc83b6cSPedro Giffuni AC_MSG_ERROR([unsupported format $i. Supported by EPM are: 3415cfc83b6cSPedro Giffuniaix - AIX software distribution 3416cfc83b6cSPedro Giffunibsd - FreeBSD, NetBSD, or OpenBSD software distribution 3417cfc83b6cSPedro Giffunidepot or swinstall - HP-UX software distribution 3418cfc83b6cSPedro Giffunideb - Debian software distribution 3419cfc83b6cSPedro Giffuniinst or tardist - IRIX software distribution 3420cfc83b6cSPedro Giffuniosx - MacOS X software distribution 3421cfc83b6cSPedro Giffunipkg - Solaris software distribution 3422cfc83b6cSPedro Giffunirpm - RedHat software distribution 3423cfc83b6cSPedro Giffunisetld - Tru64 (setld) software distribution 3424cfc83b6cSPedro Giffuninative - "Native" software distribution for the platform 3425cfc83b6cSPedro Giffuniportable - Portable software distribution 3426cfc83b6cSPedro GiffuniOOo additionally supports: 3427cfc83b6cSPedro Giffuniarchive - .tar.gz or .zip 3428cfc83b6cSPedro Giffunidmg - Mac OS X .dmg 3429cfc83b6cSPedro Giffuniinstalled - installation tree 3430cfc83b6cSPedro Giffunimsi - Windows .msi 3431cfc83b6cSPedro Giffuni ]) 3432cfc83b6cSPedro Giffuni ;; 3433cfc83b6cSPedro Giffuni esac 3434cfc83b6cSPedro Giffuni done 3435cfc83b6cSPedro Giffuni PKGFORMAT="$with_package_format" 3436cfc83b6cSPedro Giffuni fi 3437cfc83b6cSPedro Giffuni AC_MSG_RESULT([$PKGFORMAT]) 3438cfc83b6cSPedro Giffuni if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then 3439cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for rpm]) 3440cfc83b6cSPedro Giffuni for a in "$RPM" rpmbuild rpm; do 3441cfc83b6cSPedro Giffuni $a --usage >/dev/null 2> /dev/null 3442cfc83b6cSPedro Giffuni if test $? -eq 0; then 3443cfc83b6cSPedro Giffuni RPM=$a 3444cfc83b6cSPedro Giffuni break 3445cfc83b6cSPedro Giffuni else 3446cfc83b6cSPedro Giffuni $a --version >/dev/null 2> /dev/null 3447cfc83b6cSPedro Giffuni if test $? -eq 0; then 3448cfc83b6cSPedro Giffuni RPM=$a 3449cfc83b6cSPedro Giffuni break 3450cfc83b6cSPedro Giffuni fi 3451cfc83b6cSPedro Giffuni fi 3452cfc83b6cSPedro Giffuni done 3453cfc83b6cSPedro Giffuni if test -z "$RPM" ; then 3454cfc83b6cSPedro Giffuni AC_MSG_ERROR([not found]) 3455cfc83b6cSPedro Giffuni elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then 3456cfc83b6cSPedro Giffuni RPM_PATH=`which $RPM` 3457cfc83b6cSPedro Giffuni AC_MSG_RESULT([$RPM_PATH]) 3458cfc83b6cSPedro Giffuni else 3459cfc83b6cSPedro Giffuni AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.]) 3460cfc83b6cSPedro Giffuni fi 3461cfc83b6cSPedro Giffuni fi 3462cfc83b6cSPedro Giffuni if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then 3463cfc83b6cSPedro Giffuni AC_PATH_PROG(DPKG, dpkg, no) 3464cfc83b6cSPedro Giffuni if test "$DPKG" = "no"; then 3465cfc83b6cSPedro Giffuni AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.]) 3466cfc83b6cSPedro Giffuni fi 3467cfc83b6cSPedro Giffuni fi 3468cfc83b6cSPedro Giffuni if echo "$PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then 3469cfc83b6cSPedro Giffuni if test "$_os" = "Darwin"; then 34702e39503fSjim if test "$_osxpkgbuild" = "no"; then 3471cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for PackageMaker availability]) 3472cfc83b6cSPedro Giffuni if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then 3473cfc83b6cSPedro Giffuni AC_MSG_ERROR([not installed. Please install Apples Dev Tools]) 3474cfc83b6cSPedro Giffuni else 3475cfc83b6cSPedro Giffuni AC_MSG_RESULT([ok]) 3476cfc83b6cSPedro Giffuni fi 34772e39503fSjim fi 3478cfc83b6cSPedro Giffuni else 3479cfc83b6cSPedro Giffuni AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...]) 3480cfc83b6cSPedro Giffuni fi 3481cfc83b6cSPedro Giffuni fi 3482cfc83b6cSPedro Giffuni if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \ 3483cfc83b6cSPedro Giffuni echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then 3484cfc83b6cSPedro Giffuni if test "$EPM" != "no" && test "$EPM" != "internal"; then 3485cfc83b6cSPedro Giffuni if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then 3486cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether epm is patched for OOos needs]) 348728633775SPedro Giffuni if $GREP "Patched for Apache OpenOffice" $EPM >/dev/null 2>/dev/null; then 3488cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 3489cfc83b6cSPedro Giffuni else 3490cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 349128633775SPedro Giffuni if echo "$PKGFORMAT" | $GREP -q rpm; then 3492cfc83b6cSPedro Giffuni _pt="rpm" 3493cfc83b6cSPedro Giffuni AC_MSG_WARN([the rpms will need to be installed with --nodeps]) 3494cfc83b6cSPedro Giffuni echo "the rpms will need to be installed with --nodeps" >> warn 3495cfc83b6cSPedro Giffuni else 3496cfc83b6cSPedro Giffuni _pt="pkg" 3497cfc83b6cSPedro Giffuni fi 3498cfc83b6cSPedro Giffuni AC_MSG_WARN([the ${_pt}s will not be relocateable]) 3499cfc83b6cSPedro Giffuni echo "the ${_pt}s will not be relocateable" >> warn 3500cfc83b6cSPedro Giffuni AC_MSG_WARN([if you want to make sure installation without --nodeps and 3501cfc83b6cSPedro Giffuni relocation will work, you need to patch your epm with the 3502cfc83b6cSPedro Giffuni patch in epm/epm-3.7.patch or build with 3503cfc83b6cSPedro Giffuni --with-epm=internal which will build a suitable epm]) 3504cfc83b6cSPedro Giffuni fi 3505cfc83b6cSPedro Giffuni fi 3506cfc83b6cSPedro Giffuni fi 3507cfc83b6cSPedro Giffuni fi 3508cfc83b6cSPedro Giffuni if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then 3509cfc83b6cSPedro Giffuni AC_PATH_PROG(PKGMK, pkgmk, no) 3510cfc83b6cSPedro Giffuni if test "$PKGMK" = "no"; then 3511cfc83b6cSPedro Giffuni AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.]) 3512cfc83b6cSPedro Giffuni fi 3513cfc83b6cSPedro Giffuni fi 3514cfc83b6cSPedro Giffuni AC_SUBST(RPM) 3515cfc83b6cSPedro Giffuni AC_SUBST(DPKG) 3516cfc83b6cSPedro Giffuni AC_SUBST(PKGMK) 3517cfc83b6cSPedro Giffunielse 3518cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 3519cfc83b6cSPedro Giffuni BUILD_EPM=NO 3520cfc83b6cSPedro Giffuni EPM=NO 3521cfc83b6cSPedro Giffuni PKGFORMAT=native 3522cfc83b6cSPedro Giffunifi 3523cfc83b6cSPedro GiffuniAC_SUBST(BUILD_EPM) 3524cfc83b6cSPedro GiffuniAC_SUBST(EPM_URL) 3525cfc83b6cSPedro GiffuniAC_SUBST(EPM) 3526cfc83b6cSPedro GiffuniAC_SUBST(PKGFORMAT) 3527cfc83b6cSPedro Giffuni 3528cfc83b6cSPedro Giffunidnl =================================================================== 3529cfc83b6cSPedro Giffunidnl Check for gperf 3530cfc83b6cSPedro Giffunidnl =================================================================== 3531cfc83b6cSPedro GiffuniAC_PATH_PROG(GPERF, gperf) 3532cfc83b6cSPedro Giffuniif test -z "$with_gperf"; then 3533cfc83b6cSPedro Giffuni AC_PATH_PROG(GPERF, gperf) 3534cfc83b6cSPedro Giffuni if test -z "$GPERF"; then 3535cfc83b6cSPedro Giffuni AC_MSG_ERROR([gperf not found but needed. Install it and/or specify --with-gperf=/path/to/it.]) 3536cfc83b6cSPedro Giffuni fi 3537cfc83b6cSPedro Giffunielse 3538cfc83b6cSPedro Giffuni if test -x "$with_gperf"; then 3539cfc83b6cSPedro Giffuni GPERF=$with_gperf 3540cfc83b6cSPedro Giffuni else 3541cfc83b6cSPedro Giffuni AC_MSG_ERROR([--with-gperf did not point to an executable]) 3542cfc83b6cSPedro Giffuni fi 3543cfc83b6cSPedro Giffunifi 3544cfc83b6cSPedro GiffuniAC_MSG_CHECKING([gperf version]) 3545cfc83b6cSPedro Giffuniif test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then 3546cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK]) 3547cfc83b6cSPedro Giffuni GPERF=$GPERF 3548cfc83b6cSPedro Giffunielse 3549cfc83b6cSPedro Giffuni AC_MSG_ERROR([too old, you need at least 3.0.0]) 3550cfc83b6cSPedro Giffunifi 3551cfc83b6cSPedro GiffuniAC_SUBST(GPERF) 3552cfc83b6cSPedro Giffuni 3553cfc83b6cSPedro Giffunidnl =================================================================== 3554cfc83b6cSPedro Giffunidnl Check for building stax 3555cfc83b6cSPedro Giffunidnl =================================================================== 3556cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the stax]) 3557cfc83b6cSPedro Giffuniif test -f "./stax/download/stax-1.2.0.jar"; then 3558cfc83b6cSPedro Giffuni BUILD_STAX=NO 3559cfc83b6cSPedro Giffuni AC_MSG_RESULT([no, will use the prebuilt stax/download/stax-1.2.0.jar]) 3560cfc83b6cSPedro Giffunielse 3561cfc83b6cSPedro Giffuni BUILD_STAX=YES 3562cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 3563cfc83b6cSPedro Giffunifi 3564cfc83b6cSPedro GiffuniAC_SUBST(BUILD_STAX) 3565cfc83b6cSPedro Giffuni 3566cfc83b6cSPedro Giffunidnl =================================================================== 3567cfc83b6cSPedro Giffunidnl Check for building ODK 3568cfc83b6cSPedro Giffunidnl =================================================================== 3569cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the ODK]) 3570cfc83b6cSPedro Giffuniif test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then 3571cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 3572cfc83b6cSPedro Giffuni if test "$WITH_JAVA" != "no"; then 3573cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll]) 3574cfc83b6cSPedro Giffuni if ! test -f "./external/unowinreg/unowinreg.dll"; then 3575cfc83b6cSPedro Giffuni HAVE_UNOWINREG_DLL=no 3576cfc83b6cSPedro Giffuni else 3577cfc83b6cSPedro Giffuni HAVE_UNOWINREG_DLL=yes 3578cfc83b6cSPedro Giffuni fi 3579cfc83b6cSPedro Giffuni if test "$HAVE_UNOWINREG_DLL" = "yes"; then 3580cfc83b6cSPedro Giffuni AC_MSG_RESULT([found]) 3581cfc83b6cSPedro Giffuni BUILD_UNOWINREG=NO 3582cfc83b6cSPedro Giffuni else 3583cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 3584cfc83b6cSPedro Giffuni AC_MSG_RESULT([not found, will be built]) 3585cfc83b6cSPedro Giffuni else 3586cfc83b6cSPedro Giffuni AC_MSG_WARN([not found, will be cross-built using mingw32]) 3587cfc83b6cSPedro Giffuni fi 3588cfc83b6cSPedro Giffuni BUILD_UNOWINREG=YES 3589cfc83b6cSPedro Giffuni fi 3590cfc83b6cSPedro Giffuni if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then 3591cfc83b6cSPedro Giffuni if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then 3592cfc83b6cSPedro Giffuni AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler. 3593cfc83b6cSPedro Giffuni Specify mingw32 g++ executable name with --with-mingwin. 3594cfc83b6cSPedro Giffuni Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and 3595cfc83b6cSPedro Giffuni put it into external/unowinreg using your browser or a command equivalent to: 3596cfc83b6cSPedro Giffuni wget -O external/unowinreg/unowinreg.dll http://www.openoffice.org/tools/unowinreg_prebuild/680/unowinreg.dll]) 3597cfc83b6cSPedro Giffuni fi 3598cfc83b6cSPedro Giffuni if echo "$WITH_MINGWIN" | $EGREP -q "/"; then 3599cfc83b6cSPedro Giffuni if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi 3600cfc83b6cSPedro Giffuni else 3601cfc83b6cSPedro Giffuni AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false) 3602cfc83b6cSPedro Giffuni fi 3603cfc83b6cSPedro Giffuni if test "$MINGWCXX" = "false"; then 3604cfc83b6cSPedro Giffuni AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.) 3605cfc83b6cSPedro Giffuni fi 3606cfc83b6cSPedro Giffuni AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler) 360728633775SPedro Giffuni if ! echo "`$MINGWCXX -dumpmachine`" | $GREP -q mingw32; then 3608cfc83b6cSPedro Giffuni AC_MSG_ERROR(no) 3609cfc83b6cSPedro Giffuni else 3610cfc83b6cSPedro Giffuni AC_MSG_RESULT(yes) 3611cfc83b6cSPedro Giffuni fi 3612cfc83b6cSPedro Giffuni if echo "$WITH_MINGWIN" | $EGREP -q "/"; then 3613b63233d8Sdamjan 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 3614cfc83b6cSPedro Giffuni else 3615cfc83b6cSPedro Giffuni AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`, false) 3616cfc83b6cSPedro Giffuni fi 3617cfc83b6cSPedro Giffuni if test "$MINGWSTRIP" = "false"; then 3618cfc83b6cSPedro Giffuni AC_MSG_ERROR(MinGW32 binutils needed. Install them.) 3619cfc83b6cSPedro Giffuni fi 3620cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 3621cfc83b6cSPedro Giffuni save_CXX=$CXX 3622cfc83b6cSPedro Giffuni save_CXXCPP=$CXXCPP 3623cfc83b6cSPedro Giffuni CXX=$MINGWCXX 3624cfc83b6cSPedro Giffuni CXXCPP="$MINGWCXX -E" 3625cfc83b6cSPedro Giffuni save_CXXFLAGS=$CXXFLAGS 3626cfc83b6cSPedro Giffuni save_CPPFLAGS=$CPPFLAGS 3627cfc83b6cSPedro Giffuni CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include" 3628cfc83b6cSPedro Giffuni CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include" 3629cfc83b6cSPedro Giffuni # LIBS contains -lcrypt etc due to the AC_CHECK_LIBS which obviously 3630cfc83b6cSPedro Giffuni # do not make sense here (and 'd make the check fail) 3631cfc83b6cSPedro Giffuni save_LIBS=$LIBS 3632cfc83b6cSPedro Giffuni LIBS="" 3633cfc83b6cSPedro Giffuni AC_HAVE_LIBRARY(kernel32) 3634cfc83b6cSPedro Giffuni AC_HAVE_LIBRARY(advapi32) 3635cfc83b6cSPedro Giffuni AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])]) 3636cfc83b6cSPedro Giffuni CXXFLAGS=$save_CXXFLAGS 3637cfc83b6cSPedro Giffuni CPPFLAGS=$save_CPPFLAGS 3638cfc83b6cSPedro Giffuni CXX=$save_CXX 3639cfc83b6cSPedro Giffuni CXXCPP=$save_CXXCPP 3640cfc83b6cSPedro Giffuni LIBS=$save_LIBS 3641cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 3642cfc83b6cSPedro Giffuni fi 3643cfc83b6cSPedro Giffuni fi 3644cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE ODK" 3645cfc83b6cSPedro Giffunielse 3646cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 3647cfc83b6cSPedro Giffuni BUILD_UNOWINREG=NO 3648cfc83b6cSPedro Giffunifi 3649cfc83b6cSPedro GiffuniAC_SUBST(BUILD_UNOWINREG) 3650cfc83b6cSPedro GiffuniAC_SUBST(MINGWCXX) 3651cfc83b6cSPedro GiffuniAC_SUBST(MINGWSTRIP) 3652cfc83b6cSPedro Giffuni 3653cfc83b6cSPedro Giffunidnl =================================================================== 3654cfc83b6cSPedro Giffunidnl Check for system stdlibs 3655cfc83b6cSPedro Giffunidnl =================================================================== 3656cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset]) 3657cfc83b6cSPedro Giffuniif test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ 3658cfc83b6cSPedro Giffuni test "$with_system_stdlibs" != "no"; then 3659cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 3660cfc83b6cSPedro Giffuni SYSTEM_STDLIBS=YES 3661cfc83b6cSPedro Giffunielse 3662cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 3663cfc83b6cSPedro Giffuni SYSTEM_STDLIBS=NO 3664cfc83b6cSPedro Giffunifi 3665cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_STDLIBS) 3666cfc83b6cSPedro Giffuni 3667cfc83b6cSPedro Giffunidnl =================================================================== 3668cfc83b6cSPedro Giffunidnl Check for system zlib 3669cfc83b6cSPedro Giffunidnl =================================================================== 3670cfc83b6cSPedro Giffuniif test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then 3671cfc83b6cSPedro Giffuni with_system_zlib=yes 3672cfc83b6cSPedro Giffunifi 3673cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which zlib to use]) 3674cfc83b6cSPedro Giffuniif test -n "$with_system_zlib" -o -n "$with_system_libs" && \ 3675cfc83b6cSPedro Giffuni test "$with_system_zlib" != "no"; then 3676cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 3677cfc83b6cSPedro Giffuni SYSTEM_ZLIB=YES 3678cfc83b6cSPedro Giffuni AC_CHECK_HEADER(zlib.h, [], 3679cfc83b6cSPedro Giffuni [AC_MSG_ERROR(zlib.h not found. install zlib)], []) 3680cfc83b6cSPedro Giffuni AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ], 3681cfc83b6cSPedro Giffuni [AC_MSG_ERROR(zlib not found or functional)], []) 3682cfc83b6cSPedro Giffunielse 3683cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 3684cfc83b6cSPedro Giffuni SYSTEM_ZLIB=NO 3685cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE ZLIB" 3686cfc83b6cSPedro Giffunifi 3687cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_ZLIB) 3688cfc83b6cSPedro Giffuni 3689cfc83b6cSPedro Giffunidnl =================================================================== 3690cfc83b6cSPedro Giffunidnl Check for system jpeg 3691cfc83b6cSPedro Giffunidnl =================================================================== 3692cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which jpeg to use]) 3693cfc83b6cSPedro Giffuniif test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ 3694cfc83b6cSPedro Giffuni test "$with_system_jpeg" != "no"; then 3695cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 3696cfc83b6cSPedro Giffuni SYSTEM_JPEG=YES 3697cfc83b6cSPedro Giffuni AC_CHECK_HEADER(jpeglib.h, [], 3698cfc83b6cSPedro Giffuni [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], []) 3699cfc83b6cSPedro Giffuni AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ], 3700cfc83b6cSPedro Giffuni [AC_MSG_CHECKING(jpeg library not found or fuctional)], []) 3701cfc83b6cSPedro Giffunielse 3702cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 3703cfc83b6cSPedro Giffuni SYSTEM_JPEG=NO 3704cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE JPEG" 3705cfc83b6cSPedro Giffunifi 3706cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_JPEG) 3707cfc83b6cSPedro Giffuni 3708cfc83b6cSPedro Giffunidnl =================================================================== 3709cfc83b6cSPedro Giffunidnl Check for system expat 3710cfc83b6cSPedro Giffunidnl =================================================================== 3711cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which expat to use]) 3712cfc83b6cSPedro Giffuniif test -n "$with_system_expat" -o -n "$with_system_libs" && \ 3713cfc83b6cSPedro Giffuni test "$with_system_expat" != "no"; then 3714cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 3715cfc83b6cSPedro Giffuni SYSTEM_EXPAT=YES 3716cfc83b6cSPedro Giffuni AC_CHECK_HEADER(expat.h, [], 3717cfc83b6cSPedro Giffuni [AC_MSG_ERROR(expat.h not found. install expat)], []) 3718cfc83b6cSPedro Giffuni AC_CHECK_LIB(expat, XML_ParserCreate, [], 3719cfc83b6cSPedro Giffuni [AC_MSG_RESULT(expat library not found or functional.)], []) 3720cfc83b6cSPedro Giffunielse 3721cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 3722cfc83b6cSPedro Giffuni SYSTEM_EXPAT=NO 3723cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE EXPAT" 3724cfc83b6cSPedro Giffunifi 3725cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_EXPAT) 3726cfc83b6cSPedro Giffuni 3727cfc83b6cSPedro Giffunidnl =================================================================== 3728cfc83b6cSPedro Giffunidnl Check whether freetype is available 3729cfc83b6cSPedro Giffunidnl =================================================================== 3730cfc83b6cSPedro Giffuniif test "$test_freetype" = "yes"; then 3731cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether freetype is available]) 3732cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 ) 3733cfc83b6cSPedro Giffunifi 3734cfc83b6cSPedro GiffuniAC_SUBST(FREETYPE_CFLAGS) 3735cfc83b6cSPedro GiffuniAC_SUBST(FREETYPE_LIBS) 3736cfc83b6cSPedro Giffuni 3737cfc83b6cSPedro Giffunidnl =================================================================== 3738cfc83b6cSPedro Giffunidnl Check whether freetype2 supports emboldening 3739cfc83b6cSPedro Giffunidnl =================================================================== 3740cfc83b6cSPedro Giffuniif test "$test_freetype" = "yes"; then 3741cfc83b6cSPedro Giffuni save_CPPFLAGS="$CPPFLAGS" 3742cfc83b6cSPedro Giffuni save_LDFLAGS="$LDFLAGS" 3743cfc83b6cSPedro Giffuni save_LIBS="$LIBS" 3744cfc83b6cSPedro Giffuni CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" 3745cfc83b6cSPedro Giffuni LDFLAGS="$LDFLAGS $FREETYPE_LIBS" 3746cfc83b6cSPedro Giffuni AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden, 3747cfc83b6cSPedro Giffuni [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], []) 3748cfc83b6cSPedro Giffuni LDFLAGS="$save_LDFLAGS" 3749cfc83b6cSPedro Giffuni CPPFLAGS="$save_CPPFLAGS" 3750cfc83b6cSPedro Giffuni LIBS="$save_LIBS" 3751cfc83b6cSPedro Giffunifi 3752cfc83b6cSPedro GiffuniAC_SUBST(USE_FT_EMBOLDEN) 3753cfc83b6cSPedro Giffuni 3754cfc83b6cSPedro Giffuniif test -n "$with_system_libxslt" -o -n "$with_system_libs" && \ 3755cfc83b6cSPedro Giffuni test "$with_system_libxslt" != "no"; then 3756cfc83b6cSPedro Giffuni if test -z "$with_system_libxml" -a -z "$with_system_libs" || \ 3757cfc83b6cSPedro Giffuni test "$with_system_libxml" = "no"; then 3758cfc83b6cSPedro Giffuni # somehow AC_MSG_WARN won't work... 3759cfc83b6cSPedro Giffuni echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" 3760cfc83b6cSPedro Giffuni echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn 3761cfc83b6cSPedro Giffuni with_system_libxml=yes 3762cfc83b6cSPedro Giffuni fi 3763cfc83b6cSPedro Giffunifi 3764cfc83b6cSPedro Giffuniif test -n "$with_system_libxml" -o -n "$with_system_libs" && \ 3765cfc83b6cSPedro Giffuni test "$with_system_libxml" != "no"; then 3766cfc83b6cSPedro Giffuni if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \ 3767cfc83b6cSPedro Giffuni test "$with_system_libxslt" = "no"; then 3768cfc83b6cSPedro Giffuni # somehow AC_MSG_WARN won't work... 3769cfc83b6cSPedro Giffuni echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" 3770cfc83b6cSPedro Giffuni echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn 3771cfc83b6cSPedro Giffuni with_system_libxslt=yes 3772cfc83b6cSPedro Giffuni fi 3773cfc83b6cSPedro Giffunifi 3774cfc83b6cSPedro Giffuni 3775cfc83b6cSPedro Giffunidnl =================================================================== 3776cfc83b6cSPedro Giffunidnl Check for system libxslt 3777cfc83b6cSPedro Giffunidnl =================================================================== 3778cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libxslt to use]) 3779cfc83b6cSPedro Giffuniif test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \ 3780cfc83b6cSPedro Giffuni "$_os" = "Darwin" && \ 3781cfc83b6cSPedro Giffuni test "$with_system_libxslt" != "no"; then 3782cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 3783cfc83b6cSPedro Giffuni SYSTEM_LIBXSLT=YES 3784cfc83b6cSPedro Giffuni 3785cfc83b6cSPedro Giffuni if test "$_os" != "Darwin"; then 3786cfc83b6cSPedro Giffuni PKG_CHECK_MODULES(LIBXSLT, libxslt) 3787cfc83b6cSPedro Giffuni else 3788cfc83b6cSPedro Giffuni LIBXSLT_CFLAGS=`xslt-config --cflags` 3789cfc83b6cSPedro Giffuni LIBXSLT_LIBS=`xslt-config --libs` 3790cfc83b6cSPedro Giffuni fi 3791cfc83b6cSPedro Giffuni 3792cfc83b6cSPedro Giffuni dnl Check for xsltproc 3793cfc83b6cSPedro Giffuni AC_PATH_PROG(XSLTPROC, xsltproc, no) 3794cfc83b6cSPedro Giffuni if test "$XSLTPROC" = "no"; then 3795cfc83b6cSPedro Giffuni AC_MSG_ERROR([xsltproc is required]) 3796cfc83b6cSPedro Giffuni fi 3797cfc83b6cSPedro Giffunielse 3798cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 3799cfc83b6cSPedro Giffuni SYSTEM_LIBXSLT=NO 3800cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE LIBXSLT" 3801cfc83b6cSPedro Giffunifi 3802cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_LIBXSLT) 3803cfc83b6cSPedro GiffuniAC_SUBST(LIBXSLT_CFLAGS) 3804cfc83b6cSPedro GiffuniAC_SUBST(LIBXSLT_LIBS) 3805cfc83b6cSPedro Giffuni 3806cfc83b6cSPedro Giffuni 3807cfc83b6cSPedro Giffunidnl =================================================================== 3808cfc83b6cSPedro Giffunidnl Check for system libxml 3809cfc83b6cSPedro Giffunidnl =================================================================== 3810cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libxml to use]) 3811cfc83b6cSPedro Giffuniif test -n "$with_system_libxml" -o -n "$with_system_libs" -o \ 3812cfc83b6cSPedro Giffuni "$_os" = "Darwin" && \ 3813cfc83b6cSPedro Giffuni test "$with_system_libxml" != "no"; then 3814cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 3815cfc83b6cSPedro Giffuni SYSTEM_LIBXML=YES 3816cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" 3817cfc83b6cSPedro Giffuni 3818cfc83b6cSPedro Giffuni if test "$_os" != "Darwin"; then 3819cfc83b6cSPedro Giffuni PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0) 3820cfc83b6cSPedro Giffuni else 3821cfc83b6cSPedro Giffuni LIBXML_CFLAGS=`xml2-config --cflags` 3822cfc83b6cSPedro Giffuni LIBXML_LIBS=`xml2-config --libs` 3823cfc83b6cSPedro Giffuni fi 3824cfc83b6cSPedro Giffunielse 3825cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 3826cfc83b6cSPedro Giffuni SYSTEM_LIBXML=NO 3827cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" 3828cfc83b6cSPedro Giffunifi 3829cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_LIBXML) 3830cfc83b6cSPedro GiffuniAC_SUBST(LIBXML_CFLAGS) 3831cfc83b6cSPedro GiffuniAC_SUBST(LIBXML_LIBS) 3832cfc83b6cSPedro Giffuni 3833cfc83b6cSPedro Giffuni 3834cfc83b6cSPedro Giffunidnl =================================================================== 383563fbc773SJim Jagielskidnl Checks for a MacOS platform SDK compatible with an OSX 10.7 deployment target 3836cfc83b6cSPedro Giffunidnl =================================================================== 3837cfc83b6cSPedro Giffuniif test "$_os" = "Darwin"; then 38380d16e2e7SJim Jagielski sdk_target=$with_macosx_target 3839cfc83b6cSPedro Giffuni AC_MSG_CHECKING([checking SDK compatibility with OSX $sdk_target]) 3840cfc83b6cSPedro Giffuni 3841cfc83b6cSPedro Giffuni sdk_minor=`echo $sdk_target | cut -d"." -f2` 3842cfc83b6cSPedro Giffuni 384363fbc773SJim Jagielski if test "$sdk_minor" -lt "7"; then 384463fbc773SJim Jagielski AC_MSG_ERROR([SDK version < 10.7 is not longer supported]) 3845cfc83b6cSPedro Giffuni else 3846cfc83b6cSPedro Giffuni MACOSX_DEPLOYMENT_TARGET=$sdk_target 3847cfc83b6cSPedro Giffuni 3848c235b4bcSJim Jagielski dnl Why not MacOSX10.9.sdk? It lacks Python.h (!?) 3849*4fa6b83dSJim Jagielski sdk_found=`xcodebuild -showsdks | $EGREP "sdk macosx10.(7|8|10|11)" | sed -e "s/.*sdk //" | tail -n1` 3850cfc83b6cSPedro Giffuni if test -z "$sdk_found"; then 3851cfc83b6cSPedro Giffuni AC_MSG_ERROR([No SDK with OSX $sdk_target compatibility found]) 3852cfc83b6cSPedro Giffuni else 3853cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, by using SDK $sdk_found]) 3854cfc83b6cSPedro Giffuni fi 3855cfc83b6cSPedro Giffuni 3856cfc83b6cSPedro Giffuni sdk_path=`xcodebuild -version -sdk ${sdk_found} Path` 3857cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for $sdk_path]) 3858cfc83b6cSPedro Giffuni if test -d "$sdk_path"; then 3859cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 3860cfc83b6cSPedro Giffuni else 3861cfc83b6cSPedro Giffuni AC_MSG_ERROR([not found!]) 3862cfc83b6cSPedro Giffuni fi 3863cfc83b6cSPedro Giffuni 3864cfc83b6cSPedro Giffuni MACOSX_SDK_PATH=$sdk_path 3865cfc83b6cSPedro Giffuni fi 3866cfc83b6cSPedro Giffuni 3867cfc83b6cSPedro Giffunifi 3868cfc83b6cSPedro GiffuniAC_SUBST(MACOSX_DEPLOYMENT_TARGET) 3869cfc83b6cSPedro GiffuniAC_SUBST(MACOSX_SDK_PATH) 3870cfc83b6cSPedro Giffuni 3871cfc83b6cSPedro Giffuni 3872cfc83b6cSPedro Giffunidnl =================================================================== 3873cfc83b6cSPedro Giffunidnl Check for system python 3874cfc83b6cSPedro Giffunidnl =================================================================== 3875cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which python to use]) 3876cfc83b6cSPedro Giffuniif test "$_os" = "Darwin" && test "$with_system_python" != "no"; then 3877cfc83b6cSPedro Giffuni with_system_python=yes 3878cfc83b6cSPedro Giffuni 3879cfc83b6cSPedro Giffuni _python="/Library/Frameworks/Python.framework/Versions/Current/bin/python" 3880cfc83b6cSPedro Giffuni if test ! -f $_python; then 3881cfc83b6cSPedro Giffuni _python="/usr/bin/python" 3882cfc83b6cSPedro Giffuni fi 3883cfc83b6cSPedro Giffuni AC_MSG_RESULT([compiling against system python ($_python)]) 3884cfc83b6cSPedro Giffuni 3885cfc83b6cSPedro Giffuni _python_hexversion=`$_python -c "import sys; print(sys.hexversion);"` 3886cfc83b6cSPedro Giffuni 3887cfc83b6cSPedro Giffuni dnl hex version of Python 2.7.1 = 34013680 3888cfc83b6cSPedro Giffuni if test $_python_hexversion -ge 34013680 ; then 3889cfc83b6cSPedro Giffuni _python_version=`$_python -c "import sys; print sys.version;" | head -c 3` 3890cfc83b6cSPedro Giffuni AC_MSG_RESULT([compiling against system python (version $_python_version)]) 3891cfc83b6cSPedro Giffuni 3892cfc83b6cSPedro Giffuni _python_ver=`$_python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"` 3893cfc83b6cSPedro Giffuni 3894cfc83b6cSPedro Giffuni if test -d "/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"; then 3895cfc83b6cSPedro Giffuni PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver" 3896cfc83b6cSPedro Giffuni elif test -d "$MACOSX_SDK_PATH/usr/include/python$_python_ver"; then 3897cfc83b6cSPedro Giffuni PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/python$_python_ver" 3898cfc83b6cSPedro Giffuni else 3899cfc83b6cSPedro Giffuni PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver" 3900cfc83b6cSPedro Giffuni fi 3901cfc83b6cSPedro Giffuni else 3902cfc83b6cSPedro Giffuni AC_MSG_ERROR([Python 2.7.1 or higher is required]) 3903cfc83b6cSPedro Giffuni fi 3904cfc83b6cSPedro Giffuni 3905cfc83b6cSPedro Giffuni PYTHON_LIBS="-framework Python" 3906cfc83b6cSPedro Giffunielif test -n "$with_system_python" -o -n "$with_system_libs" && \ 3907cfc83b6cSPedro Giffuni test "$with_system_python" != "no"; then 3908cfc83b6cSPedro Giffuni with_system_python=yes 3909cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 3910cfc83b6cSPedro Giffuni AM_PATH_PYTHON([2.7]) 3911cfc83b6cSPedro Giffuni 3912cfc83b6cSPedro Giffuni python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"` 3913cfc83b6cSPedro Giffuni python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"` 3914cfc83b6cSPedro Giffuni PYTHON_CFLAGS="-I$python_include" 3915cfc83b6cSPedro Giffuni PYTHON_LIBS="-lpython$python_version" 3916cfc83b6cSPedro Giffunifi 3917cfc83b6cSPedro Giffuniif test "$with_system_python" = "yes" ; then 3918cfc83b6cSPedro Giffuni SYSTEM_PYTHON=YES 3919cfc83b6cSPedro Giffuni dnl check if the headers really work: 3920cfc83b6cSPedro Giffuni save_CPPFLAGS="$CPPFLAGS" 3921cfc83b6cSPedro Giffuni CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" 3922cfc83b6cSPedro Giffuni AC_CHECK_HEADER(Python.h, [], 3923cfc83b6cSPedro Giffuni [AC_MSG_ERROR(Python headers not found)], []) 3924cfc83b6cSPedro Giffuni CPPFLAGS="$save_CPPFLAGS" 3925cfc83b6cSPedro Giffunielse 3926cfc83b6cSPedro Giffuni SYSTEM_PYTHON=NO 3927cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE PYTHON" 3928cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 3929cfc83b6cSPedro Giffuni # Embedded python dies without Home set 3930cfc83b6cSPedro Giffuni if test "z$HOME" = "z"; then 3931cfc83b6cSPedro Giffuni export HOME=""; 3932cfc83b6cSPedro Giffuni fi 3933cfc83b6cSPedro Giffuni # bz2 tarball and bzip2 is not standard 3934cfc83b6cSPedro Giffuni if test -z "$BZIP2"; then 3935cfc83b6cSPedro Giffuni AC_PATH_PROG( BZIP2, bzip2) 3936cfc83b6cSPedro Giffuni if test -z "$BZIP2"; then 3937cfc83b6cSPedro Giffuni AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2]) 3938cfc83b6cSPedro Giffuni fi 3939cfc83b6cSPedro Giffuni fi 3940cfc83b6cSPedro Giffunifi 3941cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_PYTHON) 3942cfc83b6cSPedro GiffuniAC_SUBST(PYTHON_CFLAGS) 3943cfc83b6cSPedro GiffuniAC_SUBST(PYTHON_LIBS) 3944cfc83b6cSPedro GiffuniHOME=`echo $HOME | sed 's:\\\\:/:g'` 3945cfc83b6cSPedro GiffuniAC_SUBST(HOME) 3946cfc83b6cSPedro Giffuni 3947cfc83b6cSPedro Giffunidnl =================================================================== 3948cfc83b6cSPedro Giffunidnl Check for system lucene 3949cfc83b6cSPedro Giffunidnl =================================================================== 3950cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which lucene to use]) 3951cfc83b6cSPedro Giffuniif test -n "$with_system_lucene" -o -n "$with_system_libs" && \ 3952cfc83b6cSPedro Giffuni test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then 3953cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 3954cfc83b6cSPedro Giffuni SYSTEM_LUCENE=YES 3955cfc83b6cSPedro Giffuni if test -z $LUCENE_CORE_JAR; then 3956cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/lucene-core-2.9.4.jar, 3957cfc83b6cSPedro Giffuni [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.9.4.jar ], 3958cfc83b6cSPedro Giffuni [ 3959cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/lucene-core.jar, 3960cfc83b6cSPedro Giffuni [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ], 3961cfc83b6cSPedro Giffuni [ AC_CHECK_FILE(/usr/share/java/lucene.jar, 3962cfc83b6cSPedro Giffuni [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ], 3963cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(lucene-core.jar replacement not found)] 3964cfc83b6cSPedro Giffuni ) 3965cfc83b6cSPedro Giffuni ] 3966cfc83b6cSPedro Giffuni ) 3967cfc83b6cSPedro Giffuni ] 3968cfc83b6cSPedro Giffuni ) 3969cfc83b6cSPedro Giffuni else 3970cfc83b6cSPedro Giffuni AC_CHECK_FILE($LUCENE_CORE_JAR, [], 3971cfc83b6cSPedro Giffuni [AC_MSG_ERROR(lucene-core.jar not found.)], []) 3972cfc83b6cSPedro Giffuni fi 3973cfc83b6cSPedro Giffuni 3974cfc83b6cSPedro Giffuni if test -z $LUCENE_ANALYZERS_JAR; then 3975cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar, 3976cfc83b6cSPedro Giffuni [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ], 3977cfc83b6cSPedro Giffuni [ 3978cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar, 3979cfc83b6cSPedro Giffuni [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ], 3980cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)] 3981cfc83b6cSPedro Giffuni ) 3982cfc83b6cSPedro Giffuni ] 3983cfc83b6cSPedro Giffuni ) 3984cfc83b6cSPedro Giffuni else 3985cfc83b6cSPedro Giffuni AC_CHECK_FILE($LUCENE_CORE_JAR, [], 3986cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], []) 3987cfc83b6cSPedro Giffuni fi 3988cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether lucene is version 2.x]) 3989cfc83b6cSPedro Giffuni export LUCENE_CORE_JAR 3990cfc83b6cSPedro Giffuni if $PERL -e 'use Archive::Zip; 3991cfc83b6cSPedro Giffuni my $file = "$ENV{'LUCENE_CORE_JAR'}"; 3992cfc83b6cSPedro Giffuni my $zip = Archive::Zip->new( $file ); 3993cfc83b6cSPedro Giffuni my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 3994cfc83b6cSPedro Giffuni if ( $mf =~ m/Specification-Version: 2.*/ ) { 3995cfc83b6cSPedro Giffuni exit 0; 3996cfc83b6cSPedro Giffuni } else { 3997cfc83b6cSPedro Giffuni exit 1; 3998cfc83b6cSPedro Giffuni }'; then 3999cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4000cfc83b6cSPedro Giffuni else 4001cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4002cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether lucene is version 3.x]) 4003cfc83b6cSPedro Giffuni 4004cfc83b6cSPedro Giffuni if $PERL -e 'use Archive::Zip; 4005cfc83b6cSPedro Giffuni my $file = "$ENV{'LUCENE_CORE_JAR'}"; 4006cfc83b6cSPedro Giffuni my $zip = Archive::Zip->new( $file ); 4007cfc83b6cSPedro Giffuni my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 4008cfc83b6cSPedro Giffuni if ( $mf =~ m/Specification-Version: 3.*/ ) { 4009cfc83b6cSPedro Giffuni exit 0; 4010cfc83b6cSPedro Giffuni } else { 4011cfc83b6cSPedro Giffuni exit 1; 4012cfc83b6cSPedro Giffuni }'; then 4013cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4014cfc83b6cSPedro Giffuni else 4015cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, you need lucene 2 or 3]) 4016cfc83b6cSPedro Giffuni fi 4017cfc83b6cSPedro Giffuni fi 4018cfc83b6cSPedro Giffuni 4019cfc83b6cSPedro Giffunielse 4020cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4021cfc83b6cSPedro Giffuni SYSTEM_LUCENE=NO 4022cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE LUCENE" 4023cfc83b6cSPedro Giffunifi 4024cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_LUCENE) 4025cfc83b6cSPedro GiffuniAC_SUBST(LUCENE_CORE_JAR) 4026cfc83b6cSPedro GiffuniAC_SUBST(LUCENE_ANALYZERS_JAR) 4027cfc83b6cSPedro Giffuni 4028cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the MySQL Connector extension]) 4029cfc83b6cSPedro Giffuniif test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then 4030cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4031cfc83b6cSPedro Giffuni ENABLE_MYSQLC=YES 4032cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for mysqlc module]) 4033cfc83b6cSPedro Giffuni if test -d mysqlc; then 4034cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK]) 4035cfc83b6cSPedro Giffuni else 4036cfc83b6cSPedro Giffuni AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 4037cfc83b6cSPedro Giffuni fi 4038cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE MYSQLC" 4039cfc83b6cSPedro Giffunielse 4040cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4041cfc83b6cSPedro Giffuni ENABLE_MYSQLC=NO 4042cfc83b6cSPedro Giffunifi 4043cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_MYSQLC) 4044cfc83b6cSPedro Giffuni 4045cfc83b6cSPedro Giffuniif test "$ENABLE_MYSQLC" = "YES"; then 4046cfc83b6cSPedro Giffunidnl =================================================================== 4047cfc83b6cSPedro Giffunidnl Check for system MySQL 4048cfc83b6cSPedro Giffunidnl =================================================================== 4049cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for mysql pre-requisites]) 4050cfc83b6cSPedro Giffuniif test -n "$with_system_mysql" -o -n "$with_system_libs" && \ 4051cfc83b6cSPedro Giffuni test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then 4052cfc83b6cSPedro Giffuni AC_MSG_RESULT([external MySQL]) 4053cfc83b6cSPedro Giffuni SYSTEM_MYSQL=YES 4054cfc83b6cSPedro Giffuni AC_PATH_PROG( MYSQLCONFIG, mysql_config) 4055cfc83b6cSPedro Giffuni AC_MSG_CHECKING([MySQL version]) 4056cfc83b6cSPedro Giffuni if test -z "$MYSQLCONFIG" -o ! -x "$MYSQLCONFIG" ; then 4057cfc83b6cSPedro Giffuni AC_MSG_ERROR([can not find/execute mysql_config]); 4058cfc83b6cSPedro Giffuni fi 4059cfc83b6cSPedro Giffuni MYSQL_VERSION=`$MYSQLCONFIG --version` 4060cfc83b6cSPedro Giffuni MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1` 4061cfc83b6cSPedro Giffuni if test "$MYSQL_MAJOR" -ge "5"; then 4062cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK]) 4063cfc83b6cSPedro Giffuni else 4064cfc83b6cSPedro Giffuni AC_MSG_ERROR([too old, use 5.0.x or 5.1.x]) 4065cfc83b6cSPedro Giffuni fi 4066cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for MySQL Client library]) 4067cfc83b6cSPedro Giffuni MYSQL_INC=`$MYSQLCONFIG --include` 4068cfc83b6cSPedro Giffuni MYSQL_LIB=`$MYSQLCONFIG --libs` 4069cfc83b6cSPedro Giffuni MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,` 4070cfc83b6cSPedro Giffuni AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB]) 4071cfc83b6cSPedro Giffunielse 4072cfc83b6cSPedro Giffuni SYSTEM_MYSQL=NO 4073cfc83b6cSPedro Giffuni if test -n "$with_libmysql_path"; then 4074cfc83b6cSPedro Giffuni AC_MSG_RESULT([external Connector/C (libmysql)]) 4075cfc83b6cSPedro Giffuni LIBMYSQL=libmysql.so 4076cfc83b6cSPedro Giffuni if test "$_os" = "Darwin"; then 4077cfc83b6cSPedro Giffuni LIBMYSQL=libmysql.dylib 4078cfc83b6cSPedro Giffuni elif test "$_os" = "WINNT"; then 4079cfc83b6cSPedro Giffuni LIBMYSQL=libmysql.dll 4080cfc83b6cSPedro Giffuni fi 4081cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for $LIBMYSQL]) 4082cfc83b6cSPedro Giffuni if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then 4083cfc83b6cSPedro Giffuni AC_MSG_RESULT([found.]) 4084cfc83b6cSPedro Giffuni LIBMYSQL_PATH=$with_libmysql_path 4085cfc83b6cSPedro Giffuni else 4086cfc83b6cSPedro Giffuni AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.]) 4087cfc83b6cSPedro Giffuni fi 4088cfc83b6cSPedro Giffuni else 4089cfc83b6cSPedro Giffuni AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path]) 4090cfc83b6cSPedro Giffuni fi 4091cfc83b6cSPedro Giffunifi 4092cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_MYSQL) 4093cfc83b6cSPedro GiffuniAC_SUBST(MYSQL_INC) 4094cfc83b6cSPedro GiffuniAC_SUBST(MYSQL_LIB) 4095cfc83b6cSPedro GiffuniAC_SUBST(MYSQL_DEFINES) 4096cfc83b6cSPedro GiffuniAC_SUBST(LIBMYSQL_PATH) 4097cfc83b6cSPedro Giffuni 4098cfc83b6cSPedro GiffuniAC_LANG_PUSH([C++]) 4099cfc83b6cSPedro Giffunidnl =================================================================== 4100cfc83b6cSPedro Giffunidnl Check for system MySQL C++ Connector 4101cfc83b6cSPedro Giffunidnl =================================================================== 4102cfc83b6cSPedro Giffuni# FIXME! 4103cfc83b6cSPedro Giffuni# who thought this too-generic cppconn dir was a good idea? 4104cfc83b6cSPedro GiffuniAC_MSG_CHECKING([MySQL Connector/C++]) 4105cfc83b6cSPedro Giffuniif test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ 4106cfc83b6cSPedro Giffuni test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then 4107cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4108cfc83b6cSPedro Giffuni SYSTEM_MYSQL_CPPCONN=YES 4109cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 4110cfc83b6cSPedro Giffuni AC_CHECK_HEADER(mysql_driver.h, [], 4111cfc83b6cSPedro Giffuni [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], []) 4112cfc83b6cSPedro Giffuni AC_CHECK_LIB(mysqlcppconn, main, [], 4113cfc83b6cSPedro Giffuni [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], []) 4114cfc83b6cSPedro Giffuni AC_MSG_CHECKING([version]) 4115cfc83b6cSPedro Giffuni AC_TRY_RUN([ 4116cfc83b6cSPedro Giffuni#include <mysql_driver.h> 4117cfc83b6cSPedro Giffuni 4118cfc83b6cSPedro Giffuniint main(int argc, char **argv) { 4119cfc83b6cSPedro Giffuni sql::Driver *driver; 4120cfc83b6cSPedro Giffuni driver = get_driver_instance(); 4121cfc83b6cSPedro Giffuni if (driver->getMajorVersion() > 1 || \ 4122cfc83b6cSPedro Giffuni (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \ 4123cfc83b6cSPedro Giffuni (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6)) 4124cfc83b6cSPedro Giffuni return 0; 4125cfc83b6cSPedro Giffuni else 4126cfc83b6cSPedro Giffuni return 1; 4127cfc83b6cSPedro Giffuni} 4128cfc83b6cSPedro Giffuni ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])]) 4129cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 4130cfc83b6cSPedro Giffuni 4131cfc83b6cSPedro Giffunielse 4132cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4133cfc83b6cSPedro Giffuni SYSTEM_MYSQL_CPPCONN= 4134cfc83b6cSPedro Giffunifi 4135cfc83b6cSPedro GiffuniAC_LANG_POP([C++]) 4136cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_MYSQL_CPPCONN) 4137cfc83b6cSPedro Giffunifi 4138cfc83b6cSPedro Giffuni 4139cfc83b6cSPedro Giffunidnl =================================================================== 4140cfc83b6cSPedro Giffunidnl Check for system hsqldb 4141cfc83b6cSPedro Giffunidnl =================================================================== 4142cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which hsqldb to use]) 4143cfc83b6cSPedro Giffuniif test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ 4144cfc83b6cSPedro Giffuni test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then 4145cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4146cfc83b6cSPedro Giffuni SYSTEM_HSQLDB=YES 4147cfc83b6cSPedro Giffuni if test -z $HSQLDB_JAR; then 4148cfc83b6cSPedro Giffuni HSQLDB_JAR=/usr/share/java/hsqldb.jar 4149cfc83b6cSPedro Giffuni fi 4150cfc83b6cSPedro Giffuni AC_CHECK_FILE($HSQLDB_JAR, [], 4151cfc83b6cSPedro Giffuni [AC_MSG_ERROR(hsqldb.jar not found.)], []) 4152cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether hsqldb is 1.8.0.x]) 4153cfc83b6cSPedro Giffuni export HSQLDB_JAR 4154cfc83b6cSPedro Giffuni if $PERL -e 'use Archive::Zip; 4155cfc83b6cSPedro Giffuni my $file = "$ENV{'HSQLDB_JAR'}"; 4156cfc83b6cSPedro Giffuni my $zip = Archive::Zip->new( $file ); 4157cfc83b6cSPedro Giffuni my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 4158cfc83b6cSPedro Giffuni if ( $mf =~ m/Specification-Version: 1.8.*/ ) { 4159cfc83b6cSPedro Giffuni push @l, split(/\n/, $mf); 4160cfc83b6cSPedro Giffuni foreach my $line (@l) { 4161cfc83b6cSPedro Giffuni if ($line =~ m/Specification-Version:/) { 4162cfc83b6cSPedro Giffuni ($t, $version) = split (/:/,$line); 4163cfc83b6cSPedro Giffuni $version =~ s/^\s//; 4164cfc83b6cSPedro Giffuni ($a, $b, $c, $d) = split (/\./,$version); 4165cfc83b6cSPedro Giffuni if ($c == "0" && $d > "8") { 4166cfc83b6cSPedro Giffuni exit 0; 4167cfc83b6cSPedro Giffuni } else { 4168cfc83b6cSPedro Giffuni exit 1; 4169cfc83b6cSPedro Giffuni } 4170cfc83b6cSPedro Giffuni } 4171cfc83b6cSPedro Giffuni } 4172cfc83b6cSPedro Giffuni } else { 4173cfc83b6cSPedro Giffuni exit 1; 4174cfc83b6cSPedro Giffuni }'; then 4175cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4176cfc83b6cSPedro Giffuni else 4177cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1]) 4178cfc83b6cSPedro Giffuni fi 4179cfc83b6cSPedro Giffunielse 4180cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4181cfc83b6cSPedro Giffuni SYSTEM_HSQLDB=NO 4182cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE HSQLDB" 4183cfc83b6cSPedro Giffunifi 4184cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_HSQLDB) 4185cfc83b6cSPedro GiffuniAC_SUBST(HSQLDB_JAR) 4186cfc83b6cSPedro Giffuni 4187cfc83b6cSPedro Giffunidnl =================================================================== 4188cfc83b6cSPedro Giffunidnl Check for system beanshell 4189cfc83b6cSPedro Giffunidnl =================================================================== 4190cfc83b6cSPedro GiffuniENABLE_BEANSHELL=YES 4191cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which beanshell to use]) 4192cfc83b6cSPedro Giffuniif test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ 4193cfc83b6cSPedro Giffuni test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then 4194cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4195cfc83b6cSPedro Giffuni SYSTEM_BSH=YES 4196cfc83b6cSPedro Giffuni if test -z $BSH_JAR; then 4197cfc83b6cSPedro Giffuni BSH_JAR=/usr/share/java/bsh.jar 4198cfc83b6cSPedro Giffuni fi 4199cfc83b6cSPedro Giffuni AC_CHECK_FILE($BSH_JAR, [], 4200cfc83b6cSPedro Giffuni [AC_MSG_ERROR(bsh.jar not found.)], []) 4201cfc83b6cSPedro Giffunielif test "x$enable_beanshell" = "xyes"; then 4202cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4203cfc83b6cSPedro Giffuni SYSTEM_BSH=NO 4204cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE BSH" 4205cfc83b6cSPedro Giffunielse 4206cfc83b6cSPedro Giffuni AC_MSG_RESULT([none (disabled)]) 4207cfc83b6cSPedro Giffuni SYSTEM_BSH=NO 4208cfc83b6cSPedro Giffuni ENABLE_BEANSHELL=NO 4209cfc83b6cSPedro Giffunifi 4210cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_BSH) 4211cfc83b6cSPedro GiffuniAC_SUBST(BSH_JAR) 4212cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_BEANSHELL) 4213cfc83b6cSPedro Giffuni 4214cfc83b6cSPedro Giffuni 4215cfc83b6cSPedro Giffunidnl =================================================================== 4216cfc83b6cSPedro Giffunidnl Check for saxon. It can come from two different places: 4217cfc83b6cSPedro Giffunidnl - pre-installed on the system. This is checked when the --with-system-saxon 4218cfc83b6cSPedro Giffunidnl option is given to configure. 4219cfc83b6cSPedro Giffunidnl The exact place can be specified with the --with-saxon-jar=<path> option. 4220cfc83b6cSPedro Giffunidnl - From the saxon tar ball in ext_sources/. This is used when --enable-saxon 4221cfc83b6cSPedro Giffunidnl is given to configure but not any of --with-system-saxon or --with-saxon-jar. 4222cfc83b6cSPedro Giffunidnl =================================================================== 4223cfc83b6cSPedro GiffuniDISABLE_SAXON= 4224cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which saxon to use]) 4225cfc83b6cSPedro Giffuniif test -n "$with_system_saxon" -o -n "$with_system_libs" && \ 4226cfc83b6cSPedro Giffuni test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then 4227cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4228cfc83b6cSPedro Giffuni SYSTEM_SAXON=YES 4229cfc83b6cSPedro Giffuni if test -z $SAXON_JAR; then 4230cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/saxon9.jar, 4231cfc83b6cSPedro Giffuni [ SAXON_JAR=/usr/share/java/saxon9.jar ], 4232cfc83b6cSPedro Giffuni [ 4233cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/saxon.jar, 4234cfc83b6cSPedro Giffuni [ SAXON_JAR=/usr/share/java/saxon.jar ], 4235cfc83b6cSPedro Giffuni [ AC_CHECK_FILE(/usr/share/java/saxon9.jar, 4236cfc83b6cSPedro Giffuni [ SAXON_JAR=/usr/share/java/saxon9.jar ], 4237cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(saxon.jar replacement not found)] 4238cfc83b6cSPedro Giffuni ) 4239cfc83b6cSPedro Giffuni ] 4240cfc83b6cSPedro Giffuni ) 4241cfc83b6cSPedro Giffuni ] 4242cfc83b6cSPedro Giffuni ) 4243cfc83b6cSPedro Giffuni else 4244cfc83b6cSPedro Giffuni AC_CHECK_FILE($SAXON_JAR, [], 4245cfc83b6cSPedro Giffuni [AC_MSG_ERROR(saxon.jar replacement not found.)], []) 4246cfc83b6cSPedro Giffuni fi 4247cfc83b6cSPedro Giffuni if test -n "$SERIALIZER_JAR"; then 4248cfc83b6cSPedro Giffuni AC_CHECK_FILE($SERIALIZER_JAR, [], 4249cfc83b6cSPedro Giffuni [AC_MSG_ERROR(serializer.jar not found.)], []) 4250cfc83b6cSPedro Giffuni AC_SUBST(SERIALIZER_JAR) 4251cfc83b6cSPedro Giffuni fi 4252cfc83b6cSPedro Giffuni 4253cfc83b6cSPedro Giffunidnl Saxon comes in two practically available versions, the out-of-date saxonb which 4254cfc83b6cSPedro Giffunidnl supports the java extensions that OOo uses, and the up-to-date saxon he 4255cfc83b6cSPedro Giffunidnl "home edition" version, which is crippled to not support those java extensions. 4256cfc83b6cSPedro Giffunidnl And as an aside the he one also needs to be tweaked to include 4257cfc83b6cSPedro Giffunidnl a META-INF/services to broadcast that it supports the jaxp transform factory 4258cfc83b6cSPedro Giffuni 4259cfc83b6cSPedro Giffuni AC_MSG_CHECKING([if saxon works]) 4260cfc83b6cSPedro Giffuni cat > saxontest.java <<_ACEOF 4261cfc83b6cSPedro Giffuni[import javax.xml.transform.TransformerFactory; 4262cfc83b6cSPedro Giffuniimport javax.xml.transform.Transformer; 4263cfc83b6cSPedro Giffuniimport javax.xml.transform.stream.StreamSource; 4264cfc83b6cSPedro Giffuniimport java.io.*; 4265cfc83b6cSPedro Giffuni 4266cfc83b6cSPedro Giffuniimport net.sf.saxon.FeatureKeys; 4267cfc83b6cSPedro Giffuni 4268cfc83b6cSPedro Giffuniclass saxontest { 4269cfc83b6cSPedro Giffuni public static void main(String[] args) { 4270cfc83b6cSPedro Giffuni System.setProperty("javax.xml.transform.TransformerFactory", 4271cfc83b6cSPedro Giffuni "net.sf.saxon.TransformerFactoryImpl"); 4272cfc83b6cSPedro Giffuni try { 4273cfc83b6cSPedro Giffuni TransformerFactory tfactory = TransformerFactory.newInstance(); 4274cfc83b6cSPedro Giffuni // some external saxons (Debian, Ubuntu, ...) have this disabled 4275cfc83b6cSPedro Giffuni // per default 4276cfc83b6cSPedro Giffuni tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true)); 4277cfc83b6cSPedro Giffuni System.out.println("TransformerFactory is" + 4278cfc83b6cSPedro Giffuni tfactory.getClass().getName()); 4279cfc83b6cSPedro Giffuni Transformer transformer = tfactory.newTransformer( 4280cfc83b6cSPedro Giffuni new StreamSource(new File(args[0]))); 4281cfc83b6cSPedro Giffuni } catch(Exception e){ 4282cfc83b6cSPedro Giffuni e.printStackTrace(System.err); 4283cfc83b6cSPedro Giffuni System.exit(-1); 4284cfc83b6cSPedro Giffuni } 4285cfc83b6cSPedro Giffuni System.exit(0); 4286cfc83b6cSPedro Giffuni } 4287cfc83b6cSPedro Giffuni} 4288cfc83b6cSPedro Giffuni] 4289cfc83b6cSPedro Giffuni_ACEOF 4290cfc83b6cSPedro Giffuni cat > saxontest.xsl<<_ACEOF 4291cfc83b6cSPedro Giffuni[<?xml version="1.0" encoding="UTF-8"?> 4292cfc83b6cSPedro Giffuni<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 4293cfc83b6cSPedro Giffuni <xsl:template match="/"> 4294cfc83b6cSPedro Giffuni <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/> 4295cfc83b6cSPedro Giffuni </xsl:template> 4296cfc83b6cSPedro Giffuni</xsl:stylesheet> 4297cfc83b6cSPedro Giffuni] 4298cfc83b6cSPedro Giffuni_ACEOF 4299cfc83b6cSPedro Giffuni javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2" 4300cfc83b6cSPedro Giffuni AC_TRY_EVAL(javac_cmd) 4301cfc83b6cSPedro Giffuni if test $? = 0 && test -f ./saxontest.class ; then 4302cfc83b6cSPedro Giffuni java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" 4303cfc83b6cSPedro Giffuni AC_TRY_EVAL(java_cmd) 4304cfc83b6cSPedro Giffuni if test $? = 0; then 4305cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4306cfc83b6cSPedro Giffuni else 4307cfc83b6cSPedro Giffuni cat saxontest.java >&5 4308cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4309cfc83b6cSPedro Giffuni AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb]) 4310cfc83b6cSPedro Giffuni fi 4311cfc83b6cSPedro Giffuni else 4312cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4313cfc83b6cSPedro Giffuni cat saxontest.java >&5 4314cfc83b6cSPedro Giffuni AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar]) 4315cfc83b6cSPedro Giffuni fi 4316cfc83b6cSPedro Giffunielif test "x$enable_saxon" = "xyes"; then 4317cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4318cfc83b6cSPedro Giffuni SYSTEM_SAXON=NO 4319cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE SAXON" 4320cfc83b6cSPedro Giffunielse 4321cfc83b6cSPedro Giffuni AC_MSG_RESULT([none (disabled)]) 4322cfc83b6cSPedro Giffuni SYSTEM_SAXON=NO 4323cfc83b6cSPedro Giffuni DISABLE_SAXON=YES 4324cfc83b6cSPedro Giffunifi 4325cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_SAXON) 4326cfc83b6cSPedro GiffuniAC_SUBST(SAXON_JAR) 4327cfc83b6cSPedro GiffuniAC_SUBST(DISABLE_SAXON) 4328cfc83b6cSPedro Giffuni 4329cfc83b6cSPedro Giffuni 4330cfc83b6cSPedro Giffunidnl =================================================================== 4331cfc83b6cSPedro Giffunidnl Check for rhino 4332cfc83b6cSPedro Giffunidnl =================================================================== 4333cfc83b6cSPedro GiffuniENABLE_JAVASCRIPT= 4334cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable support for JavaScript]) 4335cfc83b6cSPedro Giffuniif test "x$enable_javascript" = "xyes"; then 4336cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE RHINO" 4337cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4338cfc83b6cSPedro Giffuni ENABLE_JAVASCRIPT=YES 4339cfc83b6cSPedro Giffunielse 4340cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4341cfc83b6cSPedro Giffuni ENABLE_JAVASCRIPT=NO 4342cfc83b6cSPedro Giffunifi 4343cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_JAVASCRIPT) 4344cfc83b6cSPedro Giffuni 4345cfc83b6cSPedro Giffuni 4346cfc83b6cSPedro Giffunidnl =================================================================== 4347cfc83b6cSPedro Giffunidnl Check for system apr 4348cfc83b6cSPedro Giffunidnl =================================================================== 4349cfc83b6cSPedro GiffuniSYSTEM_APR=NO 4350cfc83b6cSPedro GiffuniAPR_CFLAGS= 4351cfc83b6cSPedro GiffuniAPR_LIBS= 4352cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libapr to use]) 4353cfc83b6cSPedro Giffuniif test "x$with_system_apr" = "xyes" -o -n "$with_system_libs"; then 4354cfc83b6cSPedro Giffuni AC_MSG_RESULT([system]) 4355cfc83b6cSPedro Giffuni PKG_CHECK_MODULES([APR], [apr-1 >= 1.0]) 4356cfc83b6cSPedro Giffuni SYSTEM_APR=YES 4357cfc83b6cSPedro Giffunielse 4358cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4359cfc83b6cSPedro Giffuni SYSTEM_APR=NO 4360cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE APR" 4361cfc83b6cSPedro Giffunifi 4362cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_APR) 4363cfc83b6cSPedro GiffuniAC_SUBST(APR_CFLAGS) 4364cfc83b6cSPedro GiffuniAC_SUBST(APR_LIBS) 4365cfc83b6cSPedro Giffuni 4366cfc83b6cSPedro Giffuni 4367cfc83b6cSPedro Giffunidnl =================================================================== 4368cfc83b6cSPedro Giffunidnl Check for system apr-util 4369cfc83b6cSPedro Giffunidnl =================================================================== 4370cfc83b6cSPedro GiffuniSYSTEM_APR_UTIL=NO 4371cfc83b6cSPedro GiffuniAPR_UTIL_CFLAGS= 4372cfc83b6cSPedro GiffuniAPR_UTIL_LIBS= 4373cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libapr-util to use]) 4374cfc83b6cSPedro Giffuniif test "x$with_system_apr_util" = "xyes" -o -n "$with_system_libs"; then 4375cfc83b6cSPedro Giffuni AC_MSG_RESULT([system]) 4376cfc83b6cSPedro Giffuni PKG_CHECK_MODULES([APR_UTIL], [apr-util-1 >= 1.0]) 4377cfc83b6cSPedro Giffuni SYSTEM_APR_UTIL=YES 4378cfc83b6cSPedro Giffunielse 4379cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4380cfc83b6cSPedro Giffuni SYSTEM_APR_UTIL=NO 4381cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE APR_UTIL" 4382cfc83b6cSPedro Giffunifi 4383cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_APR_UTIL) 4384cfc83b6cSPedro GiffuniAC_SUBST(APR_UTIL_CFLAGS) 4385cfc83b6cSPedro GiffuniAC_SUBST(APR_UTIL_LIBS) 4386cfc83b6cSPedro Giffuni 4387cfc83b6cSPedro Giffuni 4388cfc83b6cSPedro Giffunidnl =================================================================== 4389cfc83b6cSPedro Giffunidnl Check for system serf 4390cfc83b6cSPedro Giffunidnl =================================================================== 4391cfc83b6cSPedro GiffuniSYSTEM_SERF=NO 4392cfc83b6cSPedro GiffuniSERF_CFLAGS= 4393cfc83b6cSPedro GiffuniSERF_LIBS= 4394cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libserf to use]) 4395cfc83b6cSPedro Giffuniif test -n "$with_system_serf" -o -n "$with_system_libs" && \ 4396cfc83b6cSPedro Giffuni test "$with_system_serf" != "no"; then 4397cfc83b6cSPedro Giffuni AC_MSG_RESULT([system]) 4398cfc83b6cSPedro Giffuni PKG_CHECK_MODULES([SERF], [serf-1 >= 1.1]) 4399cfc83b6cSPedro Giffuni SYSTEM_SERF=YES 4400cfc83b6cSPedro Giffunielse 4401cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4402cfc83b6cSPedro Giffuni SYSTEM_SERF=NO 4403cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE SERF" 4404cfc83b6cSPedro Giffunifi 4405cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_SERF) 4406cfc83b6cSPedro GiffuniAC_SUBST(SERF_CFLAGS) 4407cfc83b6cSPedro GiffuniAC_SUBST(SERF_LIBS) 4408cfc83b6cSPedro Giffuni 4409cfc83b6cSPedro Giffuni 4410cfc83b6cSPedro Giffunidnl =================================================================== 4411cfc83b6cSPedro Giffunidnl Check for CoinMP 4412cfc83b6cSPedro Giffunidnl =================================================================== 4413cfc83b6cSPedro GiffuniENABLE_COINMP= 4414cfc83b6cSPedro GiffuniSYSTEM_COINMP=NO 4415cfc83b6cSPedro GiffuniCOINMP_CFLAGS= 4416cfc83b6cSPedro GiffuniCOINMP_LIBS= 4417cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable support for CoinMP]) 4418cfc83b6cSPedro Giffuniif test "x$enable_coinmp" = "xyes"; then 4419cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE COINMP" 4420cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4421cfc83b6cSPedro Giffuni ENABLE_COINMP=YES 4422cfc83b6cSPedro Giffuni 4423cfc83b6cSPedro Giffuni dnl Check wether to use system or internal CoinMP 4424cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which coinmp to use]) 4425cfc83b6cSPedro Giffuni if test "x$with_system_coinmp" = "xyes" -o -n "$with_system_libs"; then 4426cfc83b6cSPedro Giffuni AC_MSG_RESULT([system]) 4427cfc83b6cSPedro Giffuni PKG_CHECK_MODULES([COINMP], [coinmp]) 4428cfc83b6cSPedro Giffuni SYSTEM_COINMP=YES 4429cfc83b6cSPedro Giffuni # some systems need this. Like Ubuntu.... 4430cfc83b6cSPedro Giffuni AC_CHECK_LIB(m, floor) 4431cfc83b6cSPedro Giffuni AC_CHECK_LIB(dl, dlopen) 4432cfc83b6cSPedro Giffuni else 4433cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4434cfc83b6cSPedro Giffuni SYSTEM_COINMP=NO 4435cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE COINMP" 4436cfc83b6cSPedro Giffuni fi 4437cfc83b6cSPedro Giffunielse 4438cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4439cfc83b6cSPedro Giffuni ENABLE_COINMP=NO 4440cfc83b6cSPedro Giffunifi 4441cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_COINMP) 4442cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_COINMP) 4443cfc83b6cSPedro GiffuniAC_SUBST(COINMP_CFLAGS) 4444cfc83b6cSPedro GiffuniAC_SUBST(COINMP_LIBS) 4445cfc83b6cSPedro Giffuni 4446cfc83b6cSPedro Giffuni 4447cfc83b6cSPedro Giffunidnl =================================================================== 4448cfc83b6cSPedro Giffunidnl Check for system curl 4449cfc83b6cSPedro Giffunidnl =================================================================== 4450cfc83b6cSPedro Giffuniif test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then 4451cfc83b6cSPedro Giffuni with_system_curl=yes 4452cfc83b6cSPedro Giffunifi 4453cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which curl to use]) 4454cfc83b6cSPedro Giffuniif test -n "$with_system_curl" -o -n "$with_system_libs" && \ 4455cfc83b6cSPedro Giffuni test "$with_system_curl" != "no"; then 4456cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4457cfc83b6cSPedro Giffuni SYSTEM_CURL=YES 4458cfc83b6cSPedro Giffuni 4459cfc83b6cSPedro Giffuni AC_PATH_PROG( CURLCONFIG, curl-config) 4460cfc83b6cSPedro Giffuni if test -z "$CURLCONFIG"; then 4461cfc83b6cSPedro Giffuni AC_MSG_ERROR([install curl to run this script]) 4462cfc83b6cSPedro Giffuni fi 4463cfc83b6cSPedro Giffuni 4464cfc83b6cSPedro Giffuni # check curl version 4465cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether curl is >= 7.13.1]) 4466cfc83b6cSPedro Giffuni if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \ 4467cfc83b6cSPedro Giffuni "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \ 4468cfc83b6cSPedro Giffuni "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then 4469cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, you need at least curl 7.13,1]) 4470cfc83b6cSPedro Giffuni else 4471cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4472cfc83b6cSPedro Giffuni fi 4473cfc83b6cSPedro Giffuni CURL_LIBS=`$CURLCONFIG --libs` 4474cfc83b6cSPedro Giffuni CURL_CFLAGS=`$CURLCONFIG --cflags` 4475cfc83b6cSPedro Giffunielse 4476cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4477cfc83b6cSPedro Giffuni SYSTEM_CURL=NO 4478cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE CURL" 4479cfc83b6cSPedro Giffunifi 4480cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_CURL) 4481cfc83b6cSPedro GiffuniAC_SUBST(CURL_CFLAGS) 4482cfc83b6cSPedro GiffuniAC_SUBST(CURL_LIBS) 4483cfc83b6cSPedro Giffuni 4484cfc83b6cSPedro Giffunidnl =================================================================== 4485cfc83b6cSPedro Giffunidnl Check for system mdds 4486cfc83b6cSPedro Giffunidnl =================================================================== 4487cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which mdds to use]) 4488cfc83b6cSPedro Giffuniif test -n "$with_system_mdds" -o -n "$with_system_headers" && \ 4489cfc83b6cSPedro Giffuni test "$with_system_mdds" != "no"; then 4490cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4491cfc83b6cSPedro Giffuni SYSTEM_MDDS=YES 4492cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 4493cfc83b6cSPedro Giffuni AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [], 4494cfc83b6cSPedro Giffuni [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], []) 4495cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 4496cfc83b6cSPedro Giffunielse 4497cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4498cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE MDDS" 4499cfc83b6cSPedro Giffuni SYSTEM_MDDS=NO 4500cfc83b6cSPedro Giffunifi 4501cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_MDDS) 4502cfc83b6cSPedro Giffuni 4503cfc83b6cSPedro Giffunidnl =================================================================== 4504cfc83b6cSPedro Giffunidnl Check for system boost 4505cfc83b6cSPedro Giffunidnl =================================================================== 4506cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which boost to use]) 4507cfc83b6cSPedro Giffuniif test -n "$with_system_boost" -o -n "$with_system_headers" && \ 4508cfc83b6cSPedro Giffuni test "$with_system_boost" != "no"; then 4509cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4510cfc83b6cSPedro Giffuni SYSTEM_BOOST=YES 4511cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 4512cfc83b6cSPedro Giffuni AC_CHECK_HEADER(boost/shared_ptr.hpp, [], 4513cfc83b6cSPedro Giffuni [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], []) 4514cfc83b6cSPedro Giffuni AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [], 4515cfc83b6cSPedro Giffuni [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], []) 4516cfc83b6cSPedro Giffuni AC_CHECK_HEADER(boost/function.hpp, [], 4517cfc83b6cSPedro Giffuni [AC_MSG_ERROR(boost/function.hpp not found. install boost)], []) 4518cfc83b6cSPedro Giffuni 4519cfc83b6cSPedro Giffuni save_CXXFLAGS=$CXXFLAGS 4520cfc83b6cSPedro Giffuni CXXFLAGS="$CXXFLAGS -fno-exceptions" 4521cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions]) 4522cfc83b6cSPedro Giffuni AC_TRY_COMPILE([#include <boost/function.hpp> 4523cfc83b6cSPedro Giffuni], [], 4524cfc83b6cSPedro Giffuni ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes) 4525cfc83b6cSPedro Giffuni 4526cfc83b6cSPedro Giffuni if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then 4527cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131]) 4528cfc83b6cSPedro Giffuni else 4529cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4530cfc83b6cSPedro Giffuni fi 4531cfc83b6cSPedro Giffuni CXXFLAGS=$save_CXXFLAGS 4532cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 4533cfc83b6cSPedro Giffunielse 4534cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4535cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE BOOST" 4536cfc83b6cSPedro Giffuni SYSTEM_BOOST=NO 4537cfc83b6cSPedro Giffunifi 4538cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_BOOST) 4539cfc83b6cSPedro Giffuni 4540cfc83b6cSPedro Giffunidnl =================================================================== 4541cfc83b6cSPedro Giffunidnl Check for system vigra 4542cfc83b6cSPedro Giffunidnl =================================================================== 4543cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which vigra to use]) 4544cfc83b6cSPedro Giffuniif test -n "$with_system_vigra" -o -n "$with_system_headers" && \ 4545cfc83b6cSPedro Giffuni test "$with_system_vigra" != "no"; then 4546cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4547cfc83b6cSPedro Giffuni SYSTEM_VIGRA=YES 4548cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 4549cfc83b6cSPedro Giffuni AC_CHECK_HEADER(vigra/copyimage.hxx, [], 4550cfc83b6cSPedro Giffuni [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], []) 4551cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 4552cfc83b6cSPedro Giffunielse 4553cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4554cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE VIGRA" 4555cfc83b6cSPedro Giffuni SYSTEM_VIGRA=NO 4556cfc83b6cSPedro Giffunifi 4557cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_VIGRA) 4558cfc83b6cSPedro Giffuni 4559cfc83b6cSPedro Giffunidnl =================================================================== 4560cfc83b6cSPedro Giffunidnl Check for system odbc 4561cfc83b6cSPedro Giffunidnl =================================================================== 4562cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which odbc headers to use]) 4563cfc83b6cSPedro Giffuniif test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \ 4564cfc83b6cSPedro Giffuni test "$with_system_odbc_headers" != "no"; then 4565cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4566cfc83b6cSPedro Giffuni SYSTEM_ODBC_HEADERS=YES 4567cfc83b6cSPedro Giffuni 4568cfc83b6cSPedro Giffuni AC_CHECK_HEADER(sqlext.h, [], 4569cfc83b6cSPedro Giffuni [AC_MSG_ERROR(odbc not found. install odbc)], []) 4570cfc83b6cSPedro Giffunielse 4571cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4572cfc83b6cSPedro Giffuni SYSTEM_ODBC_HEADERS=NO 4573cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE UNIXODBC" 4574cfc83b6cSPedro Giffunifi 4575cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_ODBC_HEADERS) 4576cfc83b6cSPedro Giffuni 4577cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build XML Security support]) 4578cfc83b6cSPedro Giffuniif test "$enable_nss_module" = "no"; then 4579cfc83b6cSPedro Giffuni AC_MSG_RESULT([no, since NSS disabled but needed]) 4580cfc83b6cSPedro Giffunielse 4581cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4582cfc83b6cSPedro Giffunifi 4583cfc83b6cSPedro Giffuni 4584cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build LDAP configuration backend]) 4585cfc83b6cSPedro Giffuniif test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then 4586cfc83b6cSPedro Giffuni if test "$with_openldap" = "yes"; then 4587cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4588cfc83b6cSPedro Giffuni WITH_LDAP=YES 4589cfc83b6cSPedro Giffuni else 4590cfc83b6cSPedro Giffuni WITH_LDAP=NO 4591cfc83b6cSPedro Giffuni fi 4592cfc83b6cSPedro Giffunielse 4593cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4594cfc83b6cSPedro Giffuni WITH_LDAP=NO 4595cfc83b6cSPedro Giffunifi 4596cfc83b6cSPedro Giffuni 4597cfc83b6cSPedro Giffuniif test "$WITH_LDAP" = "YES"; then 4598cfc83b6cSPedro Giffuni dnl =================================================================== 4599cfc83b6cSPedro Giffuni dnl Test whether we want to use the OpenLDAP LDAP SDK 4600cfc83b6cSPedro Giffuni dnl =================================================================== 4601cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which LDAP SDK to use]) 4602cfc83b6cSPedro Giffuni if test -n "$with_openldap" && test "$with_openldap" != "no"; then 4603cfc83b6cSPedro Giffuni AC_MSG_RESULT([OpenLDAP]) 4604cfc83b6cSPedro Giffuni WITH_OPENLDAP=YES 4605cfc83b6cSPedro Giffuni AC_CHECK_HEADERS(ldap.h, [], 4606cfc83b6cSPedro Giffuni [AC_MSG_ERROR(ldap.h not found. install openldap libs)], []) 4607cfc83b6cSPedro Giffuni AC_CHECK_LIB(ldap, ldap_simple_bind_s, [], 4608cfc83b6cSPedro Giffuni [AC_MSG_ERROR(openldap lib not found or functional)], []) 4609cfc83b6cSPedro Giffuni # rumours say that OpenLDAP doesn't have that function. I looked and 4610cfc83b6cSPedro Giffuni # it has it. Test for it to be sure 4611cfc83b6cSPedro Giffuni AC_CHECK_LIB(ldap, ldap_set_option, [], 4612cfc83b6cSPedro Giffuni [AC_MSG_ERROR(openldap lib not found or functional)], []) 4613cfc83b6cSPedro Giffuni fi 4614cfc83b6cSPedro Giffunifi 4615cfc83b6cSPedro GiffuniAC_SUBST(WITH_LDAP) 4616cfc83b6cSPedro GiffuniAC_SUBST(WITH_OPENLDAP) 4617cfc83b6cSPedro Giffuni 4618cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the internal NSS module]) 4619cfc83b6cSPedro Giffuniif test "$enable_nss_module" != "no"; then 4620cfc83b6cSPedro Giffuni ENABLE_NSS_MODULE="YES" 4621cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE NSS" 4622cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4623cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 4624cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for Mozilla build tooling]) 4625cfc83b6cSPedro Giffuni if test -z "$MOZILLABUILD" ; then 4626cfc83b6cSPedro GiffuniAC_MSG_ERROR([ 4627cfc83b6cSPedro GiffuniMozilla build tooling not found! 4628cfc83b6cSPedro Giffuni It is required for NSS that is needed for AOO's security facilities. 4629cfc83b6cSPedro Giffuni Either disable NSS using the option --disable-nss-module 4630cfc83b6cSPedro Giffuni or use the --with-mozilla-build option after installing the tool obtained 46319d1669aeSMatthias Seidel from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/]) 4632cfc83b6cSPedro Giffuni else 4633cfc83b6cSPedro Giffuni if test \( "$WITH_MINGWIN" = "yes" \) ; then 4634cfc83b6cSPedro Giffuni if test ! -d "$MOZILLABUILD" ; then 4635cfc83b6cSPedro GiffuniAC_MSG_ERROR([Mozilla build tooling incomplete!]) 4636cfc83b6cSPedro Giffuni else 4637cfc83b6cSPedro Giffuni AC_MSG_RESULT([ok]) 4638cfc83b6cSPedro Giffuni fi 4639cfc83b6cSPedro Giffuni else 4640cfc83b6cSPedro Giffuni if test ! -d "$MOZILLABUILD/moztools" \ 4641cfc83b6cSPedro Giffuni -o ! -d "$MOZILLABUILD/msys" ; then 4642cfc83b6cSPedro GiffuniAC_MSG_ERROR([Mozilla build tooling incomplete!]) 4643cfc83b6cSPedro Giffuni else 4644cfc83b6cSPedro Giffuni AC_MSG_RESULT([ok]) 4645cfc83b6cSPedro Giffuni fi 4646cfc83b6cSPedro Giffuni fi 4647cfc83b6cSPedro Giffuni fi 4648cfc83b6cSPedro Giffuni fi 4649cfc83b6cSPedro Giffunielse 4650cfc83b6cSPedro Giffuni ENABLE_NSS_MODULE="NO" 4651cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4652cfc83b6cSPedro Giffunifi 4653cfc83b6cSPedro Giffuni 4654cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_NSS_MODULE) 4655cfc83b6cSPedro GiffuniAC_SUBST(MOZILLABUILD) 4656cfc83b6cSPedro GiffuniAC_SUBST(MOZ_INC) 4657cfc83b6cSPedro Giffuni 4658cfc83b6cSPedro Giffunidnl =================================================================== 4659cfc83b6cSPedro Giffunidnl Check for system sane 4660cfc83b6cSPedro Giffunidnl =================================================================== 4661cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which sane header to use]) 4662cfc83b6cSPedro Giffuniif test -n "$with_system_sane_header" -o -n "$with_system_headers" && \ 4663cfc83b6cSPedro Giffuni test "$with_system_sane_header" != "no"; then 4664cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4665cfc83b6cSPedro Giffuni SYSTEM_SANE_HEADER=YES 4666cfc83b6cSPedro Giffuni AC_CHECK_HEADER(sane/sane.h, [], 4667cfc83b6cSPedro Giffuni [AC_MSG_ERROR(sane not found. install sane)], []) 4668cfc83b6cSPedro Giffunielse 4669cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4670cfc83b6cSPedro Giffuni SYSTEM_SANE_HEADER=NO 4671cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE SANE" 4672cfc83b6cSPedro Giffunifi 4673cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_SANE_HEADER) 4674cfc83b6cSPedro Giffuni 4675cfc83b6cSPedro Giffunidnl =================================================================== 4676cfc83b6cSPedro Giffunidnl Check for system icu 4677cfc83b6cSPedro Giffunidnl =================================================================== 4678cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which icu to use]) 4679cfc83b6cSPedro Giffuniif test -n "$with_system_icu" -o -n "$with_system_libs" && \ 4680cfc83b6cSPedro Giffuni test "$with_system_icu" != "no"; then 4681cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4682cfc83b6cSPedro Giffuni SYSTEM_ICU=YES 4683cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 4684cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for unicode/rbbi.h]) 4685cfc83b6cSPedro Giffuni AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.])) 4686cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 4687cfc83b6cSPedro Giffuni AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin]) 4688cfc83b6cSPedro Giffuni if test -z "$SYSTEM_GENBRK"; then 4689cfc83b6cSPedro Giffuni AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\]) 4690cfc83b6cSPedro Giffuni fi 4691cfc83b6cSPedro Giffuni AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin]) 4692cfc83b6cSPedro Giffuni if test -z "$SYSTEM_GENCCODE"; then 4693cfc83b6cSPedro Giffuni AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\]) 4694cfc83b6cSPedro Giffuni fi 4695cfc83b6cSPedro Giffuni AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin]) 4696cfc83b6cSPedro Giffuni if test -z "$SYSTEM_GENCMN"; then 4697cfc83b6cSPedro Giffuni AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\]) 4698cfc83b6cSPedro Giffuni fi 4699cfc83b6cSPedro Giffuni 4700cfc83b6cSPedro Giffuni AC_PATH_PROG( ICUCONFIG, icu-config) 4701cfc83b6cSPedro Giffuni AC_MSG_CHECKING([ICU version]) 4702cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 4703cfc83b6cSPedro Giffuni ICU_MAJOR=4 4704cfc83b6cSPedro Giffuni else 4705cfc83b6cSPedro Giffuni ICU_VERSION=`$ICUCONFIG --version` 4706cfc83b6cSPedro Giffuni ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` 4707cfc83b6cSPedro Giffuni ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` 4708cfc83b6cSPedro Giffuni ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` 4709cfc83b6cSPedro Giffuni fi 4710cfc83b6cSPedro Giffuni 4711cfc83b6cSPedro Giffuni if test "$ICU_MAJOR" -ge "4"; then 4712cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK]) 4713cfc83b6cSPedro Giffuni else 4714cfc83b6cSPedro Giffuni AC_MSG_ERROR([not suitable, only >= 4.0 supported currently]) 4715cfc83b6cSPedro Giffuni fi 4716cfc83b6cSPedro Giffuni 4717cfc83b6cSPedro Giffunielse 4718cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4719cfc83b6cSPedro Giffuni SYSTEM_ICU=NO 4720cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE ICU" 4721cfc83b6cSPedro Giffunifi 4722cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_ICU) 4723cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_GENBRK) 4724cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_GENCCODE) 4725cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_GENCMN) 4726cfc83b6cSPedro GiffuniAC_SUBST(ICU_MAJOR) 4727cfc83b6cSPedro GiffuniAC_SUBST(ICU_MINOR) 4728cfc83b6cSPedro GiffuniAC_SUBST(ICU_MICRO) 4729cfc83b6cSPedro Giffuni 4730cfc83b6cSPedro Giffunidnl =================================================================== 4731cfc83b6cSPedro Giffunidnl Graphite 4732cfc83b6cSPedro Giffunidnl =================================================================== 4733cfc83b6cSPedro Giffuni 4734cfc83b6cSPedro GiffuniENABLE_GRAPHITE="FALSE" 4735cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable graphite support]) 4736cfc83b6cSPedro Giffuniif test "x$enable_graphite" = "xyes" -a \( "$_os" = "WINNT" -o "$_os" = "Linux" -o "$_os" = "FreeBSD" \) ; then 4737cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4738cfc83b6cSPedro Giffuni ENABLE_GRAPHITE="TRUE" 4739cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which graphite to use]) 4740cfc83b6cSPedro Giffuni if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ 4741cfc83b6cSPedro Giffuni test "$with_system_graphite" != "no"; then 4742cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4743cfc83b6cSPedro Giffuni SYSTEM_GRAPHITE=YES 4744cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( GRAPHITE, silgraphite ) 4745cfc83b6cSPedro Giffuni else 4746cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4747cfc83b6cSPedro Giffuni SYSTEM_GRAPHITE=NO 4748cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE GRAPHITE" 4749cfc83b6cSPedro Giffuni fi 4750cfc83b6cSPedro Giffunielse 4751cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4752cfc83b6cSPedro Giffuni ENABLE_GRAPHITE="FALSE" 4753cfc83b6cSPedro Giffunifi 4754cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_GRAPHITE) 4755cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_GRAPHITE) 4756cfc83b6cSPedro GiffuniAC_SUBST(GRAPHITE_LIBS) 4757cfc83b6cSPedro GiffuniAC_SUBST(GRAPHITE_CFLAGS) 4758cfc83b6cSPedro Giffuni 4759cfc83b6cSPedro Giffuni 4760cfc83b6cSPedro Giffunidnl =================================================================== 4761cfc83b6cSPedro Giffunidnl Checks for libraries. 4762cfc83b6cSPedro Giffunidnl =================================================================== 4763cfc83b6cSPedro Giffunidnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported 4764cfc83b6cSPedro Giffunidnl See if we have the AppKit framework for building with Quartz graphics. 4765cfc83b6cSPedro Giffuni 4766cfc83b6cSPedro Giffuniif test "$_os" = "Darwin"; then 4767cfc83b6cSPedro Giffuni if test "x$with_x" = "xyes"; then 4768cfc83b6cSPedro Giffuni AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build]) 4769cfc83b6cSPedro Giffuni else 4770cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework]) 4771cfc83b6cSPedro Giffuni if test -d "/System/Library/Frameworks/AppKit.framework/"; then 4772cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4773cfc83b6cSPedro Giffuni x_includes="no_x_includes" 4774cfc83b6cSPedro Giffuni x_libraries="no_x_libraries" 4775cfc83b6cSPedro Giffuni dnl disable some things used on other Unix versions but not on the aqua build 4776cfc83b6cSPedro Giffuni enable_gtk=no 4777cfc83b6cSPedro Giffuni enable_cups=no 4778cfc83b6cSPedro Giffuni ENABLE_CUPS="" 4779cfc83b6cSPedro Giffuni AC_SUBST(ENABLE_CUPS) 4780cfc83b6cSPedro Giffuni else 4781cfc83b6cSPedro Giffuni AC_MSG_ERROR([No AppKit.framewrok found]) 4782cfc83b6cSPedro Giffuni fi 4783cfc83b6cSPedro Giffuni fi 4784cfc83b6cSPedro Giffunifi 4785cfc83b6cSPedro Giffuni 4786cfc83b6cSPedro Giffunidnl *************************************** 4787cfc83b6cSPedro Giffunidnl testing for X libraries and includes... 4788cfc83b6cSPedro Giffunidnl *************************************** 4789cfc83b6cSPedro Giffuniif test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then 4790cfc83b6cSPedro Giffuni echo "Do Nothing for _os = Darwin" 4791cfc83b6cSPedro Giffuni dnl Mac OS X using Aqua graphics. Don't check for X11. 4792cfc83b6cSPedro Giffuni : 4793cfc83b6cSPedro Giffunielif test "$_os" = "OS2" ; then 4794cfc83b6cSPedro Giffuni echo "Do Nothing for _os = OS2. Don't check for X11." 4795cfc83b6cSPedro Giffuni dnl OS/2 uses native graphics. Don't check for X11. 4796cfc83b6cSPedro Giffuni : 4797cfc83b6cSPedro Giffunielif test "$_os" != "WINNT" ; then 4798cfc83b6cSPedro Giffuni AC_PATH_X 4799cfc83b6cSPedro Giffuni AC_PATH_XTRA 4800cfc83b6cSPedro Giffuni CPPFLAGS="$CPPFLAGS $X_CFLAGS" 4801cfc83b6cSPedro Giffuni 4802cfc83b6cSPedro Giffuni if test "x$x_includes" = "x"; then 4803cfc83b6cSPedro Giffuni x_includes="default_x_includes" 4804cfc83b6cSPedro Giffuni fi 4805cfc83b6cSPedro Giffuni if test "x$x_libraries" = "x"; then 4806cfc83b6cSPedro Giffuni x_libraries="default_x_libraries" 4807cfc83b6cSPedro Giffuni fi 4808cfc83b6cSPedro Giffuni dnl The variables $x_libraries and $x_includes are set. 4809cfc83b6cSPedro Giffuni if test -z "$x_libraries"; then 4810cfc83b6cSPedro Giffuni AC_MSG_ERROR([No X libraries found]) # Exit 4811cfc83b6cSPedro Giffuni fi 4812cfc83b6cSPedro Giffuni if test -z "$x_includes"; then 4813cfc83b6cSPedro Giffuni AC_MSG_ERROR([No X includes found]) # Exit 4814cfc83b6cSPedro Giffuni fi 4815cfc83b6cSPedro Giffuni CFLAGS=$X_CFLAGS 4816cfc83b6cSPedro Giffuni LDFLAGS="$X_LDFLAGS $X_LIBS" 4817cfc83b6cSPedro Giffuni AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])]) 4818cfc83b6cSPedro Giffuni dnl Check if the XauDisposeAuth symbol is provided by libXau. 4819cfc83b6cSPedro Giffuni AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", []) 4820cfc83b6cSPedro Giffunielse 4821cfc83b6cSPedro Giffuni x_includes="no_x_includes" 4822cfc83b6cSPedro Giffuni x_libraries="no_x_libraries" 4823cfc83b6cSPedro Giffunifi 4824cfc83b6cSPedro Giffuniif test -z "$x_includes"; then 4825cfc83b6cSPedro Giffuni x_includes="no_x_includes" 4826cfc83b6cSPedro Giffunifi 4827cfc83b6cSPedro Giffuniif test -z "$x_libraries"; then 4828cfc83b6cSPedro Giffuni x_libraries="no_x_libraries" 4829cfc83b6cSPedro Giffunifi 4830cfc83b6cSPedro Giffuniif test "$x_includes" = "default_x_includes"; then 4831cfc83b6cSPedro Giffuni XINC="/usr/include" 4832cfc83b6cSPedro Giffunielse 4833cfc83b6cSPedro Giffuni XINC="$x_includes" 4834cfc83b6cSPedro Giffunifi 4835cfc83b6cSPedro GiffuniAC_SUBST(XINC) 4836cfc83b6cSPedro Giffuniif test "$x_libraries" = "default_x_libraries"; then 4837cfc83b6cSPedro Giffuni XLIB=`$PKG_CONFIG --variable=libdir x11` 4838cfc83b6cSPedro Giffuni if test "x$XLIB" = x; then 4839cfc83b6cSPedro Giffuni XLIB="/usr/lib" 4840cfc83b6cSPedro Giffuni fi 4841cfc83b6cSPedro Giffunielse 4842cfc83b6cSPedro Giffuni XLIB="$x_libraries" 4843cfc83b6cSPedro Giffunifi 4844cfc83b6cSPedro GiffuniAC_SUBST(XLIB) 4845cfc83b6cSPedro GiffuniAC_SUBST(XAU_LIBS) 4846cfc83b6cSPedro Giffuni 4847cfc83b6cSPedro Giffunidnl =================================================================== 4848cfc83b6cSPedro Giffunidnl Check if fontconfig/fontconfig.h is available 4849cfc83b6cSPedro Giffunidnl =================================================================== 4850cfc83b6cSPedro Giffuniif test "$ENABLE_FONTCONFIG" = "TRUE" ; then 4851cfc83b6cSPedro Giffuni AC_CHECK_HEADER(fontconfig/fontconfig.h, [], 4852cfc83b6cSPedro Giffuni [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], []) 4853cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether fontconfig is >= 2.2.0]) 4854cfc83b6cSPedro Giffuni AC_TRY_RUN([ 4855cfc83b6cSPedro Giffuni#include <fontconfig/fontconfig.h> 4856cfc83b6cSPedro Giffuni 4857cfc83b6cSPedro Giffuniint main(int argc, char **argv) { 4858cfc83b6cSPedro Giffuni if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0; 4859cfc83b6cSPedro Giffuni else return 1; 4860cfc83b6cSPedro Giffuni} 4861cfc83b6cSPedro Giffuni], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])]) 4862cfc83b6cSPedro Giffunifi 4863cfc83b6cSPedro Giffuni 4864cfc83b6cSPedro Giffunidnl =================================================================== 4865cfc83b6cSPedro Giffunidnl Check for system Xrender 4866cfc83b6cSPedro Giffunidnl =================================================================== 4867cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to link to Xrender]) 4868cfc83b6cSPedro Giffuniif test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then 4869cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 4870cfc83b6cSPedro Giffuni XRENDER_LINK=YES 4871cfc83b6cSPedro Giffuni with_system_xrender_headers=yes 4872cfc83b6cSPedro Giffunielse 4873cfc83b6cSPedro Giffuni AC_MSG_RESULT([no, dynamically open it]) 4874cfc83b6cSPedro Giffuni XRENDER_LINK=NO 4875cfc83b6cSPedro Giffunifi 4876cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which Xrender headers to use]) 4877cfc83b6cSPedro Giffuniif test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \ 4878cfc83b6cSPedro Giffuni test "$with_system_xrender_headers" != "no"; then 4879cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4880cfc83b6cSPedro Giffuni SYSTEM_XRENDER_HEADERS=YES 4881cfc83b6cSPedro Giffuni AC_CHECK_HEADER(X11/extensions/Xrender.h, [], 4882cfc83b6cSPedro Giffuni [AC_MSG_ERROR(Xrender not found. install X)], []) 4883cfc83b6cSPedro Giffunielse 4884cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4885cfc83b6cSPedro Giffuni SYSTEM_XRENDER_HEADERS=NO 4886cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" 4887cfc83b6cSPedro Giffunifi 4888cfc83b6cSPedro Giffuniif test "$XRENDER_LINK" = "YES"; then 4889cfc83b6cSPedro Giffuni AC_CHECK_LIB(Xrender, XRenderQueryVersion, [], 4890cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libXrender not found or functional)], []) 4891cfc83b6cSPedro Giffunifi 4892cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_XRENDER_HEADERS) 4893cfc83b6cSPedro GiffuniAC_SUBST(XRENDER_LINK) 4894cfc83b6cSPedro Giffuni 4895cfc83b6cSPedro Giffunidnl =================================================================== 4896cfc83b6cSPedro Giffunidnl Check for XRandr 4897cfc83b6cSPedro Giffunidnl =================================================================== 4898cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable RandR support]) 4899cfc83b6cSPedro Giffuniif test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then 4900cfc83b6cSPedro Giffuni if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then 4901cfc83b6cSPedro Giffuni XRANDR_DLOPEN="TRUE" 4902cfc83b6cSPedro Giffuni AC_MSG_RESULT([resorting to dlopen libXrandr at runtime]) 4903cfc83b6cSPedro Giffuni else 4904cfc83b6cSPedro Giffuni XRANDR_DLOPEN="FALSE" 4905cfc83b6cSPedro Giffuni PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="") 4906cfc83b6cSPedro Giffuni if test "$ENABLE_RANDR" != "TRUE"; then 4907cfc83b6cSPedro Giffuni AC_CHECK_HEADER(X11/extensions/Xrandr.h, [], 4908cfc83b6cSPedro Giffuni [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], []) 4909cfc83b6cSPedro Giffuni XRANDR_CFLAGS=" " 4910cfc83b6cSPedro Giffuni AC_CHECK_LIB(Xrandr, XRRQueryExtension, [], 4911cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(libXrandr not found or functional) ], []) 4912cfc83b6cSPedro Giffuni XRANDR_LIBS="-lXrandr " 4913cfc83b6cSPedro Giffuni ENABLE_RANDR="TRUE" 4914cfc83b6cSPedro Giffuni AC_MSG_RESULT([enabling RandR support]) 4915cfc83b6cSPedro Giffuni fi 4916cfc83b6cSPedro Giffuni fi 4917cfc83b6cSPedro Giffunielse 4918cfc83b6cSPedro Giffuni ENABLE_RANDR="" 4919cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 4920cfc83b6cSPedro Giffunifi 4921cfc83b6cSPedro GiffuniAC_SUBST(XRANDR_DLOPEN) 4922cfc83b6cSPedro GiffuniAC_SUBST(XRANDR_CFLAGS) 4923cfc83b6cSPedro GiffuniAC_SUBST(XRANDR_LIBS) 4924cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_RANDR) 4925cfc83b6cSPedro Giffuni 4926cfc83b6cSPedro Giffunidnl =================================================================== 4927cfc83b6cSPedro Giffunidnl Check for system nss 4928cfc83b6cSPedro Giffunidnl =================================================================== 4929cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libnss to use]) 4930cfc83b6cSPedro Giffuniif test -n "$with_system_nss" -o -n "$with_system_libs" && test "$with_system_nss" != "no"; then 4931cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4932cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( NSS, nss ) 4933cfc83b6cSPedro Giffuni SYSTEM_NSS=YES 4934cfc83b6cSPedro Giffunielse 4935cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4936cfc83b6cSPedro Giffuni SYSTEM_NSS=NO 4937cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE NSS" 4938cfc83b6cSPedro Giffunifi 4939cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_NSS) 4940cfc83b6cSPedro GiffuniAC_SUBST(NSS_CFLAGS) 4941cfc83b6cSPedro GiffuniAC_SUBST(NSS_LIBS) 4942cfc83b6cSPedro Giffuni 4943cfc83b6cSPedro Giffunidnl =================================================================== 4944cfc83b6cSPedro Giffunidnl Check for system openssl 4945cfc83b6cSPedro Giffunidnl =================================================================== 4946cfc83b6cSPedro Giffuniif test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then 4947cfc83b6cSPedro Giffuni with_system_openssl=yes 4948cfc83b6cSPedro Giffunifi 4949cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libssl to use]) 4950cfc83b6cSPedro Giffuniif test -n "$with_system_openssl" -o -n "$with_system_libs" && \ 4951cfc83b6cSPedro Giffuni test "$with_system_openssl" != "no"; then 4952cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4953cfc83b6cSPedro Giffuni # Mac OS builds should get out without extra stuff is the Mac porters' 4954cfc83b6cSPedro Giffuni # wish. And pkg-config is although Xcode ships a .pc for openssl 4955cfc83b6cSPedro Giffuni if test "$_os" = "Darwin" -o "$_os" = "FreeBSD"; then 4956cfc83b6cSPedro Giffuni OPENSSL_CFLAGS= 4957cfc83b6cSPedro Giffuni OPENSSL_LIBS="-lssl -lcrypto" 4958cfc83b6cSPedro Giffuni else 4959cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( OPENSSL, openssl ) 4960cfc83b6cSPedro Giffuni fi 4961cfc83b6cSPedro Giffuni SYSTEM_OPENSSL=YES 4962cfc83b6cSPedro Giffunielse 4963cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4964cfc83b6cSPedro Giffuni SYSTEM_OPENSSL=NO 4965cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE OPENSSL" 4966cfc83b6cSPedro Giffunifi 4967cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_OPENSSL) 4968cfc83b6cSPedro GiffuniAC_SUBST(OPENSSL_CFLAGS) 4969cfc83b6cSPedro GiffuniAC_SUBST(OPENSSL_LIBS) 4970cfc83b6cSPedro Giffuni 4971cfc83b6cSPedro Giffunidnl =================================================================== 4972cfc83b6cSPedro Giffunidnl Check for system redland 4973cfc83b6cSPedro Giffunidnl =================================================================== 4974cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which redland library to use]) 4975cfc83b6cSPedro Giffuniif test -n "$with_system_redland" -o -n "$with_system_libs" && \ 4976cfc83b6cSPedro Giffuni test "$with_system_redland" != "no"; then 4977cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 4978cfc83b6cSPedro Giffuni SYSTEM_REDLAND=YES 4979cfc83b6cSPedro Giffuni dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base) 4980cfc83b6cSPedro Giffuni PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8) 4981cfc83b6cSPedro Giffunielse 4982cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 4983cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE REDLAND" 4984cfc83b6cSPedro Giffuni SYSTEM_REDLAND=NO 4985cfc83b6cSPedro Giffunifi 4986cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_REDLAND) 4987cfc83b6cSPedro GiffuniAC_SUBST(REDLAND_CFLAGS) 4988cfc83b6cSPedro GiffuniAC_SUBST(REDLAND_LIBS) 4989cfc83b6cSPedro Giffuni 4990cfc83b6cSPedro Giffunidnl =================================================================== 4991cfc83b6cSPedro Giffunidnl Check for hunspell 4992cfc83b6cSPedro Giffunidnl =================================================================== 4993cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the Spell Checking component]) 4994cfc83b6cSPedro GiffuniENABLE_HUNSPELL= 4995cfc83b6cSPedro Giffuni 4996cfc83b6cSPedro Giffuniif test "x$enable_hunspell" != "xno" ; then 4997cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which libhunspell to use]) 4998cfc83b6cSPedro Giffuni if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ 4999cfc83b6cSPedro Giffuni test "$with_system_hunspell" != "no"; then 5000cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 5001cfc83b6cSPedro Giffuni SYSTEM_HUNSPELL=YES 5002cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 5003cfc83b6cSPedro Giffuni PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" ) 5004cfc83b6cSPedro Giffuni if test "$HUNSPELL_PC" != "TRUE"; then 5005cfc83b6cSPedro Giffuni AC_CHECK_HEADER(hunspell.hxx, [], 5006cfc83b6cSPedro Giffuni [AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ], 5007cfc83b6cSPedro Giffuni [AC_MSG_ERROR(hunspell headers not found.)], []) 5008cfc83b6cSPedro Giffuni ], []) 5009cfc83b6cSPedro Giffuni AC_CHECK_LIB(hunspell, main, [], 5010cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(hunspell library not found.) ], []) 5011cfc83b6cSPedro Giffuni HUNSPELL_LIBS=-lhunspell 5012cfc83b6cSPedro Giffuni fi 5013cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 5014cfc83b6cSPedro Giffuni else 5015cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 5016cfc83b6cSPedro Giffuni SYSTEM_HUNSPELL=NO 5017cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE HUNSPELL" 5018cfc83b6cSPedro Giffuni fi 5019cfc83b6cSPedro Giffuni ENABLE_HUNSPELL=YES 5020cfc83b6cSPedro Giffuni AC_SUBST(SYSTEM_HUNSPELL) 5021cfc83b6cSPedro Giffuni AC_SUBST(HUNSPELL_CFLAGS) 5022cfc83b6cSPedro Giffuni AC_SUBST(HUNSPELL_LIBS) 5023cfc83b6cSPedro Giffunielse 5024cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5025cfc83b6cSPedro Giffunifi 5026cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_HUNSPELL) 5027cfc83b6cSPedro Giffuni 5028cfc83b6cSPedro Giffunidnl =================================================================== 5029cfc83b6cSPedro Giffunidnl Checking for libhyphen 5030cfc83b6cSPedro Giffunidnl =================================================================== 5031cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the Hyphenator component]) 5032cfc83b6cSPedro GiffuniENABLE_HYPHEN= 5033cfc83b6cSPedro Giffuni 5034cfc83b6cSPedro Giffuniif test "x$enable_hyphen" != "xno" ; then 5035cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which libhyphen to use]) 5036cfc83b6cSPedro Giffuni if test -n "$with_system_hyphen" -o -n "$with_system_libs" && \ 5037cfc83b6cSPedro Giffuni test "$with_system_hyphen" != "no"; then 5038cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 5039cfc83b6cSPedro Giffuni SYSTEM_HYPH=YES 5040cfc83b6cSPedro Giffuni AC_CHECK_HEADER(hyphen.h, [], 5041cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(libhyphen headers not found.)], []) 5042cfc83b6cSPedro Giffuni AC_CHECK_MEMBER(struct _HyphenDict.cset, [], 5043cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(no. You are sure you have libhyphen headers?)], 5044cfc83b6cSPedro Giffuni [#include <hyphen.h>]) 5045cfc83b6cSPedro Giffuni AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen], 5046cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 5047cfc83b6cSPedro Giffuni if test -z "$HYPHEN_LIB"; then 5048cfc83b6cSPedro Giffuni AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph], 5049cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 5050cfc83b6cSPedro Giffuni fi 5051cfc83b6cSPedro Giffuni if test -z "$HYPHEN_LIB"; then 5052cfc83b6cSPedro Giffuni AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj], 5053cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 5054cfc83b6cSPedro Giffuni fi 5055cfc83b6cSPedro Giffuni else 5056cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 5057cfc83b6cSPedro Giffuni SYSTEM_HYPH=NO 5058cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE HYPHEN" 5059cfc83b6cSPedro Giffuni fi 5060cfc83b6cSPedro Giffuni ENABLE_HYPHEN=YES 5061cfc83b6cSPedro Giffuni AC_SUBST(SYSTEM_HYPH) 5062cfc83b6cSPedro Giffuni AC_SUBST(HYPHEN_LIB) 5063cfc83b6cSPedro Giffunielse 5064cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5065cfc83b6cSPedro Giffunifi 5066cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_HYPHEN) 5067cfc83b6cSPedro Giffuni 5068cfc83b6cSPedro Giffuni 5069cfc83b6cSPedro Giffuni#dnl =================================================================== 5070cfc83b6cSPedro Giffuni#dnl Check whether we are allowed to bundle dictionaries and whether 5071cfc83b6cSPedro Giffuni#dnl hunspell is available. 5072cfc83b6cSPedro Giffuni#dnl =================================================================== 5073cfc83b6cSPedro GiffuniENABLE_BUNDLED_DICTIONARIES= 5074cfc83b6cSPedro Giffuniif test "x$enable_bundled_dictionaries" != "xno" -a "x$ENABLE_HUNSPELL" = "xYES"; then 5075cfc83b6cSPedro Giffuni ENABLE_BUNDLED_DICTIONARIES=YES 5076cfc83b6cSPedro Giffunifi 5077cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_BUNDLED_DICTIONARIES) 5078cfc83b6cSPedro Giffuni 5079cfc83b6cSPedro Giffuni 5080cfc83b6cSPedro Giffuni 5081cfc83b6cSPedro Giffunidnl =================================================================== 5082cfc83b6cSPedro Giffunidnl Checking for mythes 5083cfc83b6cSPedro Giffunidnl =================================================================== 5084cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which mythes to use]) 5085cfc83b6cSPedro Giffuniif test -n "$with_system_mythes" -o -n "$with_system_libs" && \ 5086cfc83b6cSPedro Giffuni test "$with_system_mythes" != "no"; then 5087cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 5088cfc83b6cSPedro Giffuni SYSTEM_MYTHES=YES 5089cfc83b6cSPedro Giffuni AC_LANG_PUSH([C++]) 5090cfc83b6cSPedro Giffuni PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no) 5091cfc83b6cSPedro Giffuni if test "$MYTHES_PKGCONFIG" = "no"; then 5092cfc83b6cSPedro Giffuni AC_CHECK_HEADER(mythes.hxx, [], 5093cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(mythes.hxx headers not found.)], []) 5094cfc83b6cSPedro Giffuni AC_CHECK_LIB(mythes-1.2, main, [], 5095cfc83b6cSPedro Giffuni [ MYTHES_FOUND=no], []) 5096cfc83b6cSPedro Giffuni if test "$MYTHES_FOUND" = "no"; then 5097cfc83b6cSPedro Giffuni AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes], 5098cfc83b6cSPedro Giffuni [ MYTHES_FOUND=no], []) 5099cfc83b6cSPedro Giffuni fi 5100cfc83b6cSPedro Giffuni if test "$MYTHES_FOUND" = "no"; then 5101cfc83b6cSPedro Giffuni AC_MSG_ERROR([mythes library not found!.]) 5102cfc83b6cSPedro Giffuni fi 5103cfc83b6cSPedro Giffuni fi 5104cfc83b6cSPedro Giffuni AC_LANG_POP([C++]) 5105cfc83b6cSPedro Giffunielse 5106cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 5107cfc83b6cSPedro Giffuni SYSTEM_MYTHES=NO 5108cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE MYTHES" 5109cfc83b6cSPedro Giffunifi 5110cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_MYTHES) 5111cfc83b6cSPedro GiffuniAC_SUBST(MYTHES_CFLAGS) 5112cfc83b6cSPedro GiffuniAC_SUBST(MYTHES_LIBS) 5113cfc83b6cSPedro Giffuni 5114cfc83b6cSPedro Giffuni 5115cfc83b6cSPedro Giffunidnl =================================================================== 5116cfc83b6cSPedro Giffunidnl Checking for libtextcat 5117cfc83b6cSPedro Giffunidnl =================================================================== 5118cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libtextcat to use]) 5119cfc83b6cSPedro Giffuniif test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then 5120cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 5121cfc83b6cSPedro Giffuni SYSTEM_LIBTEXTCAT=YES 5122cfc83b6cSPedro Giffuni AC_CHECK_HEADER(libtextcat/textcat.h, [], 5123cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(libtextcat headers not found.)], []) 5124cfc83b6cSPedro Giffuni AC_CHECK_LIB(textcat, special_textcat_Init, , 5125cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(libtextcat library not found or not suitable. libtextcat typically needs to be patched)], []) 5126cfc83b6cSPedro Giffunielse 5127cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 5128cfc83b6cSPedro Giffuni SYSTEM_LIBTEXTCAT=NO 5129cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" 5130cfc83b6cSPedro Giffunifi 5131cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_LIBTEXTCAT) 5132cfc83b6cSPedro Giffuni 5133cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which libtextcat data directory to use]) 5134cfc83b6cSPedro Giffuniif test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then 5135cfc83b6cSPedro Giffuni if test "$with_system_libtextcat_data" = "yes"; then 5136cfc83b6cSPedro Giffuni SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat 5137cfc83b6cSPedro Giffuni else 5138cfc83b6cSPedro Giffuni SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data 5139cfc83b6cSPedro Giffuni fi 5140cfc83b6cSPedro Giffuni AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA]) 5141cfc83b6cSPedro Giffunielse 5142cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 5143cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" 5144cfc83b6cSPedro Giffunifi 5145cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_LIBTEXTCAT_DATA) 5146cfc83b6cSPedro Giffuni 5147cfc83b6cSPedro Giffunidnl *************************************** 5148cfc83b6cSPedro Giffunidnl testing libc version for Linux... 5149cfc83b6cSPedro Giffunidnl *************************************** 5150cfc83b6cSPedro Giffuniif test "$_os" = "Linux"; then 5151cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether libc is >= 2.1.1]) 5152cfc83b6cSPedro Giffuni exec 6>/dev/null # no output 5153cfc83b6cSPedro Giffuni AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC) 5154cfc83b6cSPedro Giffuni exec 6>&1 # output on again 5155cfc83b6cSPedro Giffuni if test "$HAVE_LIBC"; then 5156cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5157cfc83b6cSPedro Giffuni else 5158cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, upgrade libc]) 5159cfc83b6cSPedro Giffuni fi 5160cfc83b6cSPedro Giffunifi 5161cfc83b6cSPedro Giffuni 5162cfc83b6cSPedro Giffuniif test "$_os" != "WNT"; then 5163cfc83b6cSPedro Giffuni AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO]) 5164cfc83b6cSPedro Giffuni AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO]) 5165cfc83b6cSPedro Giffuni if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then 5166cfc83b6cSPedro Giffuni SYSTEM_LIBC=YES 5167cfc83b6cSPedro Giffuni fi 5168cfc83b6cSPedro Giffunielse 5169cfc83b6cSPedro Giffuni HAVE_GETOPT=NO 5170cfc83b6cSPedro Giffuni HAVE_READDIR_R=NO 5171cfc83b6cSPedro Giffuni SYSTEM_LIBC=YES 5172cfc83b6cSPedro Giffunifi 5173cfc83b6cSPedro GiffuniAC_SUBST(HAVE_GETOPT) 5174cfc83b6cSPedro GiffuniAC_SUBST(HAVE_READDIR_R) 5175cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_LIBC) 5176cfc83b6cSPedro Giffuni 5177cfc83b6cSPedro Giffunidnl ========================================= 5178cfc83b6cSPedro Giffunidnl Check for the Microsoft Platform SDK. 5179cfc83b6cSPedro Giffunidnl ========================================= 5180cfc83b6cSPedro Giffunidnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better, 5181cfc83b6cSPedro Giffunidnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then 5182cfc83b6cSPedro Giffuniif test \( "$_os" = "WINNT" \) ; then 5183cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for PSDK files]) 5184cfc83b6cSPedro Giffuni if test -z "$with_psdk_home"; then 5185cfc83b6cSPedro Giffuni # This first line will detect a February 2003 Microsoft Platform SDK 5186cfc83b6cSPedro Giffuni PSDK_HOME=`./oowintool --psdk-home` 5187cfc83b6cSPedro Giffuni # But there might be also an April 2005 PSDK, unfortunately MS changed 5188cfc83b6cSPedro Giffuni # the registry entry. (we prefer the old version!?) 5189cfc83b6cSPedro Giffuni if test -z "$PSDK_HOME"; then 5190cfc83b6cSPedro Giffuni PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1` 5191cfc83b6cSPedro Giffuni fi 5192cfc83b6cSPedro Giffuni # normalize if found 5193cfc83b6cSPedro Giffuni if test -n "$PSDK_HOME"; then 5194cfc83b6cSPedro Giffuni PSDK_HOME=`cygpath -d "$PSDK_HOME"` 5195cfc83b6cSPedro Giffuni PSDK_HOME=`cygpath -u "$PSDK_HOME"` 5196cfc83b6cSPedro Giffuni fi 5197cfc83b6cSPedro Giffuni else 5198cfc83b6cSPedro Giffuni PSDK_HOME=`cygpath -u "$with_psdk_home"` 5199cfc83b6cSPedro Giffuni fi 5200cfc83b6cSPedro Giffuni # Remove a possible trailing backslash 5201cfc83b6cSPedro Giffuni PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'` 5202cfc83b6cSPedro Giffuni # Problem with current PSDK (iz 49865) 5203cfc83b6cSPedro Giffuni if test -f "$PSDK_HOME/Lib/libcp.lib"; then 5204cfc83b6cSPedro Giffuni AC_MSG_ERROR([ 5205cfc83b6cSPedro Giffuni 5206cfc83b6cSPedro GiffuniSome modules do not build correctly with MS Platform SDK - April 2005 5207cfc83b6cSPedro GiffuniEdition if the library ($PSDK_HOME/Lib/libcp.lib) is found. 5208cfc83b6cSPedro GiffuniRemove/rename/backup that file and restart configure. Details about this 5209cfc83b6cSPedro Giffuniproblem can be found in issue 49856.]) 5210cfc83b6cSPedro Giffuni fi 5211cfc83b6cSPedro Giffuni# WIndows SDK has different headers 5212cfc83b6cSPedro Giffuni if test \( -f "$PSDK_HOME/Include/adoint.h" \) \ 5213cfc83b6cSPedro Giffuni -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \ 5214cfc83b6cSPedro Giffuni -a \( -f "$PSDK_HOME/Include/usp10.h" \); then 5215cfc83b6cSPedro Giffuni HAVE_PSDK_H="yes" 5216cfc83b6cSPedro Giffuni else 5217cfc83b6cSPedro Giffuni HAVE_PSDK_H="no" 5218cfc83b6cSPedro Giffuni fi 5219cfc83b6cSPedro Giffuni if test -f "$PSDK_HOME/lib/unicows.lib"; then 5220cfc83b6cSPedro Giffuni HAVE_PSDK_LIB="yes" 5221cfc83b6cSPedro Giffuni else 5222cfc83b6cSPedro Giffuni HAVE_PSDK_LIB="no" 5223cfc83b6cSPedro Giffuni fi 5224cfc83b6cSPedro Giffuni if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then 5225cfc83b6cSPedro Giffuni AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs 5226cfc83b6cSPedro Giffuniare installed or use --with-psdk-home .]) 5227cfc83b6cSPedro Giffuni fi 5228cfc83b6cSPedro Giffuni if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \ 5229cfc83b6cSPedro Giffuni -o ! -x "$PSDK_HOME/bin/msidb.exe" \ 5230cfc83b6cSPedro Giffuni -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \ 5231cfc83b6cSPedro Giffuni -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then 5232cfc83b6cSPedro Giffuni AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.]) 5233cfc83b6cSPedro Giffuni fi 5234cfc83b6cSPedro Giffuni AC_MSG_RESULT([SDK files found ...)]) 5235cfc83b6cSPedro Giffunidnl Check if this is the right SDK. 523628633775SPedro Giffuni if echo $PSDK_HOME | $GREP "v6.1" >/dev/null 2>/dev/null; then 5237cfc83b6cSPedro Giffuni AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)]) 5238cfc83b6cSPedro Giffuni WINDOWS_VISTA_PSDK=TRUE 523928633775SPedro Giffuni elif echo $PSDK_HOME | $GREP "v6.0" >/dev/null 2>/dev/null; then 5240cfc83b6cSPedro Giffuni AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)]) 5241cfc83b6cSPedro Giffuni WINDOWS_VISTA_PSDK=TRUE 524228633775SPedro Giffuni elif echo $PSDK_HOME | $GREP "v7.0" >/dev/null 2>/dev/null; then 5243cfc83b6cSPedro Giffuni AC_MSG_RESULT([Found Windows SDK 7.0 ($PSDK_HOME)]) 5244cfc83b6cSPedro Giffuni WINDOWS_VISTA_PSDK=TRUE 5245cfc83b6cSPedro Giffuni else 5246cfc83b6cSPedro Giffuni AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)]) 5247cfc83b6cSPedro Giffuni fi 5248cfc83b6cSPedro Giffunifi 5249cfc83b6cSPedro GiffuniAC_SUBST(PSDK_HOME) 5250cfc83b6cSPedro GiffuniAC_SUBST(WINDOWS_VISTA_PSDK) 5251cfc83b6cSPedro Giffuni 5252cfc83b6cSPedro Giffunidnl ========================================= 5253cfc83b6cSPedro Giffunidnl Check for the Microsoft DirectX SDK. 5254cfc83b6cSPedro Giffunidnl ========================================= 5255cfc83b6cSPedro Giffuniif test \( "$_os" = "WINNT" \) ; then 5256cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for DirectX SDK files]) 5257cfc83b6cSPedro Giffuni if test -z "$with_directx_home"; then 5258cfc83b6cSPedro Giffuni dnl A standard installation of the DirectX SDK sets $DXSDK_DIR 5259cfc83b6cSPedro Giffuni if test -n "$DXSDK_DIR"; then 5260cfc83b6cSPedro Giffuni DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"` 5261cfc83b6cSPedro Giffuni DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"` 5262cfc83b6cSPedro Giffuni fi 5263cfc83b6cSPedro Giffuni # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to 5264cfc83b6cSPedro Giffuni # the "DirectX SDK files not found" error later 5265cfc83b6cSPedro Giffuni else 5266cfc83b6cSPedro Giffuni DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"` 5267cfc83b6cSPedro Giffuni fi 5268cfc83b6cSPedro Giffuni # Remove a possible trailing backslash 5269cfc83b6cSPedro Giffuni DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'` 5270cfc83b6cSPedro Giffuni 5271cfc83b6cSPedro Giffuni if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then 5272cfc83b6cSPedro Giffuni HAVE_DIRECTDRAW_H="yes" 5273cfc83b6cSPedro Giffuni else 5274cfc83b6cSPedro Giffuni HAVE_DIRECTDRAW_H="no" 5275cfc83b6cSPedro Giffuni fi 5276cfc83b6cSPedro Giffuni if test -f "$DIRECTXSDK_HOME/Include/d3d9.h" ; then 5277cfc83b6cSPedro Giffuni HAVE_DIRECTXSDK_H="yes" 5278cfc83b6cSPedro Giffuni else 5279cfc83b6cSPedro Giffuni HAVE_DIRECTXSDK_H="no" 5280cfc83b6cSPedro Giffuni fi 5281cfc83b6cSPedro Giffuni 5282cfc83b6cSPedro Giffuni # MS changed the location of the libraries with dec 2004 directx sdk 5283cfc83b6cSPedro Giffuni if test -d "$DIRECTXSDK_HOME/lib/x86" ; then 5284cfc83b6cSPedro Giffuni DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86" 5285cfc83b6cSPedro Giffuni else 5286cfc83b6cSPedro Giffuni DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib" 5287cfc83b6cSPedro Giffuni fi 5288cfc83b6cSPedro Giffuni if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then 5289cfc83b6cSPedro Giffuni HAVE_DIRECTDRAW_LIB="yes" 5290cfc83b6cSPedro Giffuni else 5291cfc83b6cSPedro Giffuni HAVE_DIRECTDRAW_LIB="no" 5292cfc83b6cSPedro Giffuni fi 5293cfc83b6cSPedro Giffuni if test -f "$DIRECTXSDK_LIB/d3d9.lib" ; then 5294cfc83b6cSPedro Giffuni HAVE_DIRECTXSDK_LIB="yes" 5295cfc83b6cSPedro Giffuni else 5296cfc83b6cSPedro Giffuni HAVE_DIRECTXSDK_LIB="no" 5297cfc83b6cSPedro Giffuni fi 5298cfc83b6cSPedro Giffuni 5299cfc83b6cSPedro Giffuni if test "$HAVE_DIRECTDRAW_H" = "yes" -a "$HAVE_DIRECTDRAW_LIB" = "yes" ; then 5300cfc83b6cSPedro Giffuni ENABLE_DIRECT_DRAW="TRUE" 5301cfc83b6cSPedro Giffuni fi 5302cfc83b6cSPedro Giffuni if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes" ; then 5303cfc83b6cSPedro Giffuni HAVE_DIRECTXSDK="yes" 5304cfc83b6cSPedro Giffuni else 5305cfc83b6cSPedro Giffuni HAVE_DIRECTXSDK="no" 5306cfc83b6cSPedro Giffuni fi 5307cfc83b6cSPedro Giffuni 5308cfc83b6cSPedro Giffuni if test -n "$ENABLE_DIRECTX"; then 5309cfc83b6cSPedro Giffuni if test "$HAVE_DIRECTDRAW" = "yes" -o "$HAVE_DIRECTXSDK" = "yes" ; then 5310cfc83b6cSPedro Giffuni AC_MSG_RESULT([found]) 5311cfc83b6cSPedro Giffuni else 5312cfc83b6cSPedro Giffuni AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or --disable-directx.]) 5313cfc83b6cSPedro Giffuni fi 5314cfc83b6cSPedro Giffuni else 5315cfc83b6cSPedro Giffuni DIRECTXSDK_HOME="" 5316cfc83b6cSPedro Giffuni AC_MSG_RESULT([disabled]) 5317cfc83b6cSPedro Giffuni fi 5318cfc83b6cSPedro Giffunifi 5319cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_DIRECT_DRAW) 5320cfc83b6cSPedro GiffuniAC_SUBST(DIRECTXSDK_HOME) 5321cfc83b6cSPedro GiffuniAC_SUBST(DIRECTXSDK_LIB) 5322cfc83b6cSPedro Giffuni 5323cfc83b6cSPedro Giffuni 5324cfc83b6cSPedro Giffunidnl ============================================ 5325cfc83b6cSPedro Giffunidnl Check for ATL and MFC 5326cfc83b6cSPedro Giffunidnl ============================================ 5327cfc83b6cSPedro Giffuniif test \( "$_os" = "WINNT" \) ; then 5328cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for ATL and MFC]) 5329cfc83b6cSPedro Giffuni if test "$DISABLE_ATL" = "TRUE"; then 5330cfc83b6cSPedro Giffuni AC_MSG_RESULT([ATL is disabled, nothing to check]) 5331cfc83b6cSPedro Giffuni else 5332cfc83b6cSPedro Giffuni AC_MSG_NOTICE([testing ATL/MFC libs and includes]) 5333cfc83b6cSPedro Giffuni if test -z "$with_atl_include_dir"; then 5334cfc83b6cSPedro Giffuni ATL_INCLUDE=$COMPATH/atlmfc/include 5335cfc83b6cSPedro Giffuni else 5336cfc83b6cSPedro Giffuni ATL_INCLUDE=`cygpath -u "$with_atl_include_dir"` 5337cfc83b6cSPedro Giffuni fi 5338cfc83b6cSPedro Giffuni if test -z "$with_atl_lib_dir"; then 5339cfc83b6cSPedro Giffuni ATL_LIB=$COMPATH/atlmfc/lib 5340cfc83b6cSPedro Giffuni ATL_LIB_X64=$COMPATH/atlmfc/lib/amd64 5341cfc83b6cSPedro Giffuni else 5342cfc83b6cSPedro Giffuni ATL_LIB=`cygpath -u "$with_atl_lib_dir"` 5343cfc83b6cSPedro Giffuni ATL_LIB_X64=$ATL_LIB/../amd64 5344cfc83b6cSPedro Giffuni fi 5345cfc83b6cSPedro Giffuni if test -z "$with_mfc_include_dir"; then 5346cfc83b6cSPedro Giffuni MFC_INCLUDE=$COMPATH/atlmfc/include 5347cfc83b6cSPedro Giffuni else 5348cfc83b6cSPedro Giffuni MFC_INCLUDE=`cygpath -u "$with_mfc_include_dir"` 5349cfc83b6cSPedro Giffuni fi 5350cfc83b6cSPedro Giffuni if test -z "$with_mfc_lib_dir"; then 5351cfc83b6cSPedro Giffuni MFC_LIB=$COMPATH/atlmfc/lib 5352cfc83b6cSPedro Giffuni else 5353cfc83b6cSPedro Giffuni MFC_LIB=`cygpath -u "$with_mfc_lib_dir"` 5354cfc83b6cSPedro Giffuni fi 5355cfc83b6cSPedro Giffuni 5356cfc83b6cSPedro Giffuni ATL_INCLUDE=`echo $ATL_INCLUDE | $SED 's/\/$//'` 5357cfc83b6cSPedro Giffuni ATL_LIB=`echo $ATL_LIB | $SED 's/\/$//'` 5358cfc83b6cSPedro Giffuni ATL_LIB_X64=`echo $ATL_LIB_X64 | $SED 's/\/$//'` 5359cfc83b6cSPedro Giffuni MFC_INCLUDE=`echo $MFC_INCLUDE | $SED 's/\/$//'` 5360cfc83b6cSPedro Giffuni MFC_LIB=`echo $MFC_LIB | $SED 's/\/$//'` 5361cfc83b6cSPedro Giffuni 5362cfc83b6cSPedro Giffuni AC_MSG_NOTICE([looking for atlbase.h in "$ATL_INCLUDE"]) 5363cfc83b6cSPedro Giffuni if test -f "$ATL_INCLUDE/atlbase.h"; then 5364cfc83b6cSPedro Giffuni HAVE_ATL_H="yes" 5365cfc83b6cSPedro Giffuni else 5366cfc83b6cSPedro Giffuni HAVE_ATL_H="no" 5367cfc83b6cSPedro Giffuni fi 5368cfc83b6cSPedro Giffuni AC_MSG_NOTICE([found atlbase.h in "$ATL_INCLUDE"? "$HAVE_ATL_H"]) 5369cfc83b6cSPedro Giffuni 5370cfc83b6cSPedro Giffuni AC_MSG_NOTICE([looking for afx.h in "$MFC_INCLUDE"]) 5371cfc83b6cSPedro Giffuni if test -f "$MFC_INCLUDE/afx.h"; then 5372cfc83b6cSPedro Giffuni HAVE_MFC_H="yes" 5373cfc83b6cSPedro Giffuni else 5374cfc83b6cSPedro Giffuni HAVE_MFC_H="no" 5375cfc83b6cSPedro Giffuni fi 5376cfc83b6cSPedro Giffuni AC_MSG_NOTICE([found afx.h in "$MFC_INCLUDE"? "$HAVE_MFC_H"]) 5377cfc83b6cSPedro Giffuni 5378cfc83b6cSPedro Giffuni AC_MSG_NOTICE([looking for atls.lib in "$ATL_LIB"]) 5379cfc83b6cSPedro Giffuni if test -f "$ATL_LIB/atls.lib"; then 5380cfc83b6cSPedro Giffuni HAVE_ATL_LIB="yes" 5381cfc83b6cSPedro Giffuni AC_MSG_NOTICE([looking for atlthunk.lib in "$ATL_LIB"]) 5382cfc83b6cSPedro Giffuni if test -f "$ATL_LIB/atlthunk.lib"; then 5383cfc83b6cSPedro Giffuni HAVE_ATLTHUNK="YES" 5384cfc83b6cSPedro Giffuni else 5385cfc83b6cSPedro Giffuni HAVE_ATLTHUNK="NO" 5386cfc83b6cSPedro Giffuni fi 5387cfc83b6cSPedro Giffuni AC_MSG_NOTICE([found atlthunk.lib in "$ATL_LIB"? "$HAVE_ATLTHUNK"]) 5388cfc83b6cSPedro Giffuni else 5389cfc83b6cSPedro Giffuni HAVE_ATL_LIB="no" 5390cfc83b6cSPedro Giffuni fi 5391cfc83b6cSPedro Giffuni AC_MSG_NOTICE([found atls.lib in "$ATL_LIB"? "$HAVE_ATL_LIB"]) 5392cfc83b6cSPedro Giffuni 5393cfc83b6cSPedro Giffuni dnl TODO check also MFC libraries, they seem to have different names 5394cfc83b6cSPedro Giffuni dnl mfc42.lib mfc90.lib 5395cfc83b6cSPedro Giffuni if test -d "$MFC_LIB"; then 5396cfc83b6cSPedro Giffuni HAVE_MFC_LIB="yes" 5397cfc83b6cSPedro Giffuni else 5398cfc83b6cSPedro Giffuni HAVE_MFC_LIB="no" 5399cfc83b6cSPedro Giffuni fi 5400cfc83b6cSPedro Giffuni 5401cfc83b6cSPedro Giffuni if test "$HAVE_ATL_H" = "no" -o "$HAVE_MFC_H" = "no" -o "$HAVE_ATL_LIB" = "no" -o "$HAVE_MFC_LIB" = "no"; then 5402cfc83b6cSPedro Giffuni ATL_INCLUDE= 5403cfc83b6cSPedro Giffuni ATL_LIB= 5404cfc83b6cSPedro Giffuni ATL_LIB_X64= 5405cfc83b6cSPedro Giffuni MFC_INCLUDE= 5406cfc83b6cSPedro Giffuni MFC_LIB= 5407cfc83b6cSPedro Giffuni HAVE_ATL_LIB= 5408cfc83b6cSPedro Giffuni dnl TODO shouldn't this be an error? 5409cfc83b6cSPedro Giffuni DISABLE_ACTIVEX="TRUE" 5410cfc83b6cSPedro Giffuni DISABLE_ATL="TRUE" 5411cfc83b6cSPedro Giffuni AC_MSG_RESULT([ATL/MFC disabled]) 5412cfc83b6cSPedro Giffuni else 5413cfc83b6cSPedro Giffuni ATL_INCLUDE=`cygpath -dm "$ATL_INCLUDE"` 5414cfc83b6cSPedro Giffuni ATL_LIB=`cygpath -dm "$ATL_LIB"` 5415cfc83b6cSPedro Giffuni ATL_LIB_X64=`cygpath -dm "$ATL_LIB_X64"` 5416cfc83b6cSPedro Giffuni MFC_INCLUDE=`cygpath -dm "$MFC_INCLUDE"` 5417cfc83b6cSPedro Giffuni MFC_LIB=`cygpath -dm "$MFC_LIB"` 5418cfc83b6cSPedro Giffuni AC_MSG_RESULT([ATL/MFC enabled]) 5419cfc83b6cSPedro Giffuni fi 5420cfc83b6cSPedro Giffuni fi 5421cfc83b6cSPedro Giffunifi 5422cfc83b6cSPedro GiffuniAC_SUBST(ATL_INCLUDE) 5423cfc83b6cSPedro GiffuniAC_SUBST(ATL_LIB) 5424cfc83b6cSPedro GiffuniAC_SUBST(ATL_LIB_X64) 5425cfc83b6cSPedro GiffuniAC_SUBST(HAVE_ATLTHUNK) 5426cfc83b6cSPedro GiffuniAC_SUBST(MFC_INCLUDE) 5427cfc83b6cSPedro GiffuniAC_SUBST(MFC_LIB) 5428cfc83b6cSPedro Giffuni 5429cfc83b6cSPedro Giffuni 5430cfc83b6cSPedro Giffunidnl ============================================ 5431cfc83b6cSPedro Giffunidnl Check for Nullsoft Scriptable Install System 5432cfc83b6cSPedro Giffunidnl ============================================ 5433cfc83b6cSPedro GiffuniNSIS_PATH="" 5434cfc83b6cSPedro Giffuniif test "$_os" = "WINNT" ; then 5435cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for NSIS]) 5436cfc83b6cSPedro Giffuni AC_PATH_PROG(NSIS_PATH, nsis.exe) 5437cfc83b6cSPedro Giffuni if test -n "$NSIS_PATH"; then 5438cfc83b6cSPedro Giffuni NSIS_PATH=`dirname "$NSIS_PATH"` 5439cfc83b6cSPedro Giffuni fi 5440cfc83b6cSPedro Giffuni if test -n "$with_nsis_path"; then 5441cfc83b6cSPedro Giffuni with_nsis_path=`cygpath -u "$with_nsis_path"` 5442cfc83b6cSPedro Giffuni fi 5443cfc83b6cSPedro Giffuni if test -e "$with_nsis_path/nsis.exe"; then 5444cfc83b6cSPedro Giffuni NSIS_PATH="$with_nsis_path" 5445cfc83b6cSPedro Giffuni fi 5446cfc83b6cSPedro Giffuni nsistest=`./oowintool --nsis-dir`; 5447cfc83b6cSPedro Giffuni if test -x "$nsistest/nsis.exe"; then 5448cfc83b6cSPedro Giffuni NSIS_PATH="$nsistest" 5449cfc83b6cSPedro Giffuni fi 5450cfc83b6cSPedro Giffuni if test -z "$NSIS_PATH"; then 5451cfc83b6cSPedro Giffuni AC_MSG_WARN([NSIS not found, no self contained installer will be build.]) 5452cfc83b6cSPedro Giffuni echo "NSIS not found, no self contained installer will be build." >> warn 5453cfc83b6cSPedro Giffuni else 5454cfc83b6cSPedro Giffuni NSIS_PATH=`cygpath -d "$NSIS_PATH"` 5455cfc83b6cSPedro Giffuni NSIS_PATH=`cygpath -u "$NSIS_PATH"` 5456cfc83b6cSPedro Giffuni AC_MSG_RESULT([found ($NSIS_PATH)]) 5457b871de36Sarielch AC_MSG_CHECKING([whether NSIS version is >= 3.*]) 5458b871de36Sarielch nsis_version_string=`"$NSIS_PATH/makensis.exe" /VERSION | $SED -e s/^v//i` 5459b871de36Sarielch nsis_version_major=`echo $nsis_version_string | cut -d. -f1` 5460b871de36Sarielch nsis_version_minor=`echo $nsis_version_string | cut -d. -f2` 5461b871de36Sarielch if test "$nsis_version_major" -ge "3"; then 5462b871de36Sarielch AC_MSG_RESULT([found NSIS $nsis_version_major.$nsis_version_minor >= 3.*]) 5463b871de36Sarielch AC_MSG_CHECKING([whether NSIS was compiled with Unicode support]) 5464b871de36Sarielch if echo `"$NSIS_PATH/makensis.exe" /HDRINFO` | $EGREP "\bNSIS_UNICODE_MAKENSIS\b" 2>&1 >/dev/null; then 5465b871de36Sarielch AC_MSG_RESULT([NSIS version compiled with Unicode support.]) 5466b871de36Sarielch else 5467b871de36Sarielch NSIS_PATH="" 5468b871de36Sarielch AC_MSG_WARN([NSIS version compiled without Unicode support, no self contained installer will be build.]) 5469b871de36Sarielch fi 5470b871de36Sarielch else 5471b871de36Sarielch NSIS_PATH="" 5472b871de36Sarielch AC_MSG_WARN([NSIS version found is < 3.*, no self contained installer will be build.]) 5473b871de36Sarielch fi 5474cfc83b6cSPedro Giffuni fi 5475cfc83b6cSPedro Giffunifi 5476cfc83b6cSPedro GiffuniAC_SUBST(NSIS_PATH) 5477cfc83b6cSPedro Giffuni 5478cfc83b6cSPedro Giffunidnl *************************************** 5479cfc83b6cSPedro Giffunidnl testing bison and flex exist 5480cfc83b6cSPedro Giffunidnl *************************************** 5481cfc83b6cSPedro GiffuniAC_PATH_PROG(BISON, bison) 5482cfc83b6cSPedro Giffuniif test -z "$BISON"; then 5483cfc83b6cSPedro Giffuni AC_MSG_ERROR([no bison found in \$PATH, install bison]) 5484cfc83b6cSPedro Giffunielse 5485cfc83b6cSPedro Giffuni AC_MSG_CHECKING([the bison version]) 548628633775SPedro Giffuni _bison_version=`$BISON --version | $GREP GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 5487cfc83b6cSPedro Giffuni _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` 5488cfc83b6cSPedro Giffuni # Accept newer than 1.875 or older(equal) than 1.75 5489cfc83b6cSPedro Giffuni if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then 5490cfc83b6cSPedro Giffuni if test "$_bison_version" = "1.875" ; then 5491cfc83b6cSPedro Giffuni AC_MSG_WARN([suspect ($BISON $_bison_version)]) 5492cfc83b6cSPedro Giffuni echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn 5493cfc83b6cSPedro Giffuni else 5494cfc83b6cSPedro Giffuni AC_MSG_RESULT([checked ($BISON $_bison_version)]) 5495cfc83b6cSPedro Giffuni fi 5496cfc83b6cSPedro Giffuni else 5497cfc83b6cSPedro Giffuni AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))]) 5498cfc83b6cSPedro Giffuni fi 5499cfc83b6cSPedro Giffunifi 5500cfc83b6cSPedro GiffuniAC_PATH_PROG(FLEX, flex) 5501cfc83b6cSPedro Giffuniif test -z "$FLEX"; then 5502cfc83b6cSPedro Giffuni AC_MSG_ERROR([no flex found in \$PATH, install flex]) 5503cfc83b6cSPedro Giffunifi 5504cfc83b6cSPedro Giffunidnl *************************************** 5505cfc83b6cSPedro Giffunidnl testing that patch exists 5506cfc83b6cSPedro Giffunidnl *************************************** 5507cfc83b6cSPedro GiffuniAC_PATH_PROG(PATCH, patch) 5508cfc83b6cSPedro Giffuniif test -z "$PATCH"; then 5509cfc83b6cSPedro Giffuni AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\]) 5510cfc83b6cSPedro Giffunifi 5511cfc83b6cSPedro Giffuni 5512cfc83b6cSPedro Giffunidnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used 5513cfc83b6cSPedro Giffuniif test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then 5514cfc83b6cSPedro Giffuni if test -z "$with_gnu_patch"; then 5515cfc83b6cSPedro Giffuni GNUPATCH=$PATCH 5516cfc83b6cSPedro Giffuni else 5517cfc83b6cSPedro Giffuni if test -x "$with_gnu_patch"; then 5518cfc83b6cSPedro Giffuni GNUPATCH=$with_gnu_patch 5519cfc83b6cSPedro Giffuni else 5520cfc83b6cSPedro Giffuni AC_MSG_ERROR([--with-gnu-patch did not point to an executable]) 5521cfc83b6cSPedro Giffuni fi 5522cfc83b6cSPedro Giffuni fi 5523cfc83b6cSPedro Giffuni 5524cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether $GNUPATCH is GNU patch]) 552528633775SPedro Giffuni if $GNUPATCH --version | $GREP "Free Software Foundation" >/dev/null 2>/dev/null; then 5526cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5527cfc83b6cSPedro Giffuni else 5528cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it]) 5529cfc83b6cSPedro Giffuni fi 5530cfc83b6cSPedro Giffunifi 5531cfc83b6cSPedro Giffuni 5532cfc83b6cSPedro Giffunidnl We also need to check for --with-gnu-cp 5533cfc83b6cSPedro Giffuni 5534cfc83b6cSPedro Giffuniif test -z "$with_gnu_cp"; then 5535cfc83b6cSPedro Giffuni # check the place where the GNU stuff is hidden on Solaris... 5536cfc83b6cSPedro Giffuni if test -x /usr/gnu/bin/cp; then 5537cfc83b6cSPedro Giffuni GNUCP=/usr/gnu/bin/cp 5538cfc83b6cSPedro Giffuni else 5539cfc83b6cSPedro Giffuni AC_PATH_PROGS(GNUCP, gnucp cp) 5540cfc83b6cSPedro Giffuni fi 5541cfc83b6cSPedro Giffuni if test -z $GNUCP; then 5542cfc83b6cSPedro Giffuni AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it]) 5543cfc83b6cSPedro Giffuni fi 5544cfc83b6cSPedro Giffunielse 5545cfc83b6cSPedro Giffuni if test -x "$with_gnu_cp"; then 5546cfc83b6cSPedro Giffuni GNUCP=$with_gnu_cp 5547cfc83b6cSPedro Giffuni else 5548cfc83b6cSPedro Giffuni AC_MSG_ERROR([--with-gnu-cp did not point to an executable]) 5549cfc83b6cSPedro Giffuni fi 5550cfc83b6cSPedro Giffunifi 5551cfc83b6cSPedro Giffuni 5552cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support]) 555328633775SPedro Giffuniif $GNUCP --version 2>/dev/null | $GREP "coreutils" >/dev/null 2>/dev/null; then 5554cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5555cfc83b6cSPedro Giffunielse 5556cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5557cfc83b6cSPedro Giffuni GNUCP='' 5558cfc83b6cSPedro Giffunifi 5559cfc83b6cSPedro Giffuni 5560cfc83b6cSPedro Giffuniif test -z "$GNUCP"; then 5561cfc83b6cSPedro Giffuni if test "$_os" = "SunOS"; then 5562cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it]) 5563cfc83b6cSPedro Giffuni else 5564cfc83b6cSPedro Giffuni AC_MSG_RESULT([no GNU cp from coreutils found - using the system's cp command]) 5565cfc83b6cSPedro Giffuni fi 5566cfc83b6cSPedro Giffunifi 5567cfc83b6cSPedro Giffuni 5568cfc83b6cSPedro GiffuniAC_SUBST(GNUPATCH) 5569cfc83b6cSPedro GiffuniAC_SUBST(GNUCP) 5570cfc83b6cSPedro Giffuni 5571cfc83b6cSPedro Giffunidnl *************************************** 5572cfc83b6cSPedro Giffunidnl testing bash tools path on Windows 5573cfc83b6cSPedro Giffunidnl *************************************** 5574cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 5575cfc83b6cSPedro Giffuni CYGWIN_PATH="" 5576cfc83b6cSPedro Giffuni AC_PATH_PROG(CYGWIN_PATH, bash) 5577cfc83b6cSPedro Giffuni CYGWIN_PATH=`dirname "$CYGWIN_PATH"` 5578cfc83b6cSPedro Giffunifi 5579cfc83b6cSPedro Giffuniif test -z "$CYGWIN_PATH"; then 5580cfc83b6cSPedro Giffuni CYGWIN_PATH="NO_CYGWIN" 5581cfc83b6cSPedro Giffunifi 5582cfc83b6cSPedro GiffuniAC_SUBST(CYGWIN_PATH) 5583cfc83b6cSPedro Giffuni 5584cfc83b6cSPedro Giffunidnl *************************************** 5585cfc83b6cSPedro Giffunidnl testing ml.exe assembler path 5586cfc83b6cSPedro Giffunidnl *************************************** 5587cfc83b6cSPedro Giffuniif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 5588cfc83b6cSPedro Giffuni AC_MSG_CHECKING([ml.exe assembler path]) 5589cfc83b6cSPedro Giffuni if test -n "$with_asm_home"; then 5590cfc83b6cSPedro Giffuni with_asm_home=`cygpath -u "$with_asm_home"` 5591cfc83b6cSPedro Giffuni fi 5592cfc83b6cSPedro Giffuni if test ! -x "$with_asm_home/ml.exe"; then 5593cfc83b6cSPedro Giffuni AC_PATH_PROG(ML_EXE, ml.exe) 5594cfc83b6cSPedro Giffuni if test -z "$ML_EXE"; then 5595cfc83b6cSPedro Giffuni if test -x "$with_cl_home/bin/ml.exe"; then 5596cfc83b6cSPedro Giffuni with_asm_home=$with_cl_home/bin 5597cfc83b6cSPedro Giffuni AC_MSG_RESULT([found ($with_asm_home)]) 5598cfc83b6cSPedro Giffuni else 5599cfc83b6cSPedro Giffuni AC_MSG_ERROR([Configure did not find ml.exe assembler.]) 5600cfc83b6cSPedro Giffuni fi 5601cfc83b6cSPedro Giffuni else 5602cfc83b6cSPedro Giffuni with_asm_home="ASM_IN_PATH" 5603cfc83b6cSPedro Giffuni fi 5604cfc83b6cSPedro Giffuni fi 5605cfc83b6cSPedro Giffuni AC_MSG_RESULT([$ASM_HOME]) 5606cfc83b6cSPedro Giffunielse 5607cfc83b6cSPedro Giffuni with_asm_home="NO_ASM_HOME" 5608cfc83b6cSPedro Giffunifi 5609cfc83b6cSPedro GiffuniASM_HOME="$with_asm_home" 5610cfc83b6cSPedro GiffuniAC_SUBST(ASM_HOME) 5611cfc83b6cSPedro Giffuni 5612ad35682bStruckmandnl *************************************** 5613ad35682bStruckmandnl testing nasm.exe assembler path 5614ad35682bStruckmandnl *************************************** 5615ad35682bStruckmanif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes" -a "$SYSTEM_OPENSSL" = "NO"; then 5616ad35682bStruckman AC_MSG_CHECKING([nasm.exe assembler path]) 5617ad35682bStruckman if test -n "$with_nasm_home"; then 5618ad35682bStruckman with_nasm_home=`cygpath -u "$with_nasm_home"` 5619ad35682bStruckman fi 5620ad35682bStruckman if test ! -x "$with_nasm_home/nasm.exe"; then 5621ad35682bStruckman AC_PATH_PROG(NASM_EXE, nasm.exe) 5622ad35682bStruckman if test -z "$NASM_EXE"; then 5623ad35682bStruckman with_nasm_home="NO_NASM_HOME" 5624ad35682bStruckman else 5625ad35682bStruckman with_nasm_home="NASM_IN_PATH" 5626ad35682bStruckman fi 5627ad35682bStruckman fi 5628ad35682bStruckman AC_MSG_RESULT([$NASM_HOME]) 5629ad35682bStruckmanelse 5630ad35682bStruckman with_nasm_home="NO_NASM_HOME" 5631ad35682bStruckmanfi 5632ad35682bStruckmanNASM_HOME="$with_nasm_home" 5633ad35682bStruckmanAC_SUBST(NASM_HOME) 5634ad35682bStruckman 5635cfc83b6cSPedro Giffunidnl =================================================================== 5636cfc83b6cSPedro Giffunidnl testing handle deprecated unzip switch 5637cfc83b6cSPedro Giffunidnl =================================================================== 5638cfc83b6cSPedro Giffuniif test -z "$with_zip_home"; then 5639cfc83b6cSPedro Giffuni with_zip_home="$with_unzip_home" 5640cfc83b6cSPedro Giffunifi 5641cfc83b6cSPedro Giffunidnl =================================================================== 5642cfc83b6cSPedro Giffunidnl Zip will be found where you tell me to find it 5643cfc83b6cSPedro Giffunidnl =================================================================== 5644cfc83b6cSPedro Giffuniif test -n "$with_zip_home" ; then 5645cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 5646cfc83b6cSPedro Giffuni with_zip_home=`cygpath -u "$with_zip_home"` 5647cfc83b6cSPedro Giffuni fi 5648cfc83b6cSPedro Giffuni ZIP="$with_zip_home/zip" 5649cfc83b6cSPedro Giffuni UNZIP="$with_zip_home/unzip" 5650cfc83b6cSPedro Giffuni ZIP_HOME="$with_zip_home" 5651cfc83b6cSPedro Giffunielse 5652cfc83b6cSPedro Giffuni AC_PATH_PROG(ZIP, zip) 5653cfc83b6cSPedro Giffuni AC_PATH_PROG(UNZIP, unzip) 5654cfc83b6cSPedro Giffuni ZIP_HOME=`dirname "$ZIP"` 5655cfc83b6cSPedro Giffunifi 5656cfc83b6cSPedro Giffunidnl =================================================================== 5657cfc83b6cSPedro Giffunidnl Zip must be available or else it is an error, all platforms 5658cfc83b6cSPedro Giffunidnl =================================================================== 5659cfc83b6cSPedro Giffuniif test -z "$ZIP" -o -z "$UNZIP"; then 5660cfc83b6cSPedro Giffuni AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,) 5661cfc83b6cSPedro Giffunifi 5662b63233d8Sdamjanif "$ZIP" -FS < /dev/null 2>&1 | $EGREP "no such option: S" > /dev/null; then 5663b63233d8Sdamjan AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,) 5664b63233d8Sdamjanfi 5665cfc83b6cSPedro Giffuni 5666cfc83b6cSPedro Giffunidnl =================================================================== 5667cfc83b6cSPedro Giffunidnl Zip must be a specific type for different build types. 5668cfc83b6cSPedro Giffunidnl =================================================================== 5669cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 567028633775SPedro Giffuni if test -n "`$ZIP -h | $GREP -i WinNT`" ; then 5671cfc83b6cSPedro GiffuniAC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.]) 5672cfc83b6cSPedro Giffuni fi 5673cfc83b6cSPedro Giffunifi 5674cfc83b6cSPedro GiffuniAC_SUBST(ZIP_HOME) 5675cfc83b6cSPedro Giffuni 5676cfc83b6cSPedro Giffunidnl =================================================================== 5677cfc83b6cSPedro Giffunidnl Windows builds need dbghelp.dll in external/dbghelp/ 5678cfc83b6cSPedro Giffunidnl =================================================================== 5679cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 5680cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for dbghelp.dll]) 5681cfc83b6cSPedro Giffuni if test -x ./external/dbghelp/dbghelp.dll; then 5682cfc83b6cSPedro Giffuni AC_MSG_RESULT([found and executable]) 5683cfc83b6cSPedro Giffuni else 5684cfc83b6cSPedro Giffuni AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/. 5685cfc83b6cSPedro GiffuniGet it from the Microsoft site and put it into external/dbghelp. 5686cfc83b6cSPedro Giffuni(Note: Microsoft seems to enjoy changing the exact location of this file. You 5687cfc83b6cSPedro Giffunimay have to search Microsoft's website.) Last time it was seen at: 5688cfc83b6cSPedro Giffuni<http://www.microsoft.com/downloads/release.asp?releaseid=30682>.]) 5689cfc83b6cSPedro Giffuni fi 5690cfc83b6cSPedro Giffunifi 5691cfc83b6cSPedro Giffuni 5692cfc83b6cSPedro Giffunidnl =================================================================== 5693cfc83b6cSPedro Giffunidnl Windows builds need vcredist_x*.exe in external/vcredist/ 5694cfc83b6cSPedro Giffunidnl =================================================================== 5695cfc83b6cSPedro GiffuniWITH_VC_REDIST="" 5696cfc83b6cSPedro Giffuni 5697cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 5698cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for vcredist_x86.exe]) 5699cfc83b6cSPedro Giffuni if test -x ./external/vcredist/vcredist_x86.exe; then 5700cfc83b6cSPedro Giffuni AC_MSG_RESULT([found and executable]) 5701cfc83b6cSPedro Giffuni else 5702cfc83b6cSPedro Giffuni AC_MSG_ERROR([ vcredist_x86.exe is missing in external/vcredist/. 5703cfc83b6cSPedro GiffuniGet it from the Microsoft site and put it into external/vcredist. You can try 5704cfc83b6cSPedro Giffunito download it from http://www.microsoft.com/download/en/search.aspx?q=redistributable%20package.]) 5705cfc83b6cSPedro Giffuni fi 5706cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for vcredist_x64.exe]) 5707cfc83b6cSPedro Giffuni if test -x ./external/vcredist/vcredist_x64.exe; then 5708cfc83b6cSPedro Giffuni AC_MSG_RESULT([found and executable]) 5709cfc83b6cSPedro Giffuni else 5710cfc83b6cSPedro Giffuni AC_MSG_ERROR([ vcredist_x64.exe is missing in external/vcredist/. 5711cfc83b6cSPedro GiffuniGet it from the Microsoft site and put it into external/vcredist. You can try 5712cfc83b6cSPedro Giffunito download it from http://www.microsoft.com/download/en/search.aspx?q=redistributable%20package.]) 5713cfc83b6cSPedro Giffuni fi 5714cfc83b6cSPedro Giffuni WITH_VC_REDIST=YES 5715cfc83b6cSPedro Giffuni AC_SUBST(WITH_VC_REDIST) 5716cfc83b6cSPedro Giffunifi 5717cfc83b6cSPedro Giffuni 5718cfc83b6cSPedro Giffunidnl =================================================================== 5719cfc83b6cSPedro Giffunidnl Windows builds - use oowintool to copy CRT dlls and manifest 5720cfc83b6cSPedro Giffunidnl =================================================================== 5721cfc83b6cSPedro Giffuniif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 5722cfc83b6cSPedro Giffuni if ./oowintool --msvc-copy-dlls ./external/msvcp ; then 5723cfc83b6cSPedro Giffuni : 5724cfc83b6cSPedro Giffuni else 5725cfc83b6cSPedro Giffuni AC_MSG_ERROR([oowintool failed to copy CRT]) 5726cfc83b6cSPedro Giffuni fi 5727cfc83b6cSPedro Giffunifi 5728cfc83b6cSPedro Giffuni 5729cfc83b6cSPedro Giffunidnl =================================================================== 5730cfc83b6cSPedro Giffunidnl Windows builds need gdiplus.dll in external/gdiplus/ 5731cfc83b6cSPedro Giffunidnl =================================================================== 5732cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 5733cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for gdiplus.dll]) 5734cfc83b6cSPedro Giffuni if test -x ./external/gdiplus/gdiplus.dll; then 5735cfc83b6cSPedro Giffuni AC_MSG_RESULT([found and executable]) 5736cfc83b6cSPedro Giffuni else 5737cfc83b6cSPedro Giffuni AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/. 5738cfc83b6cSPedro GiffuniGet it from the Microsoft site and put it into external/gdiplus. 5739cfc83b6cSPedro GiffuniYou may have to search Microsoft's website. Last time it was seen at: 5740cfc83b6cSPedro Giffuni<http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.]) 5741cfc83b6cSPedro Giffuni fi 5742cfc83b6cSPedro Giffunifi 5743cfc83b6cSPedro Giffuni 5744cfc83b6cSPedro Giffunidnl =================================================================== 5745cfc83b6cSPedro Giffunidnl Windows builds need msvcr100.dll in external/msvcp100/ 5746cfc83b6cSPedro Giffunidnl =================================================================== 5747cfc83b6cSPedro Giffuniif test "$_os" = "WINNT"; then 5748cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for msvcr100.dll]) 5749cfc83b6cSPedro Giffuni if test -x ./external/msvcp100/msvcr100.dll; then 5750cfc83b6cSPedro Giffuni AC_MSG_RESULT([found and executable]) 5751cfc83b6cSPedro Giffuni else 5752cfc83b6cSPedro Giffuni AC_MSG_ERROR([msvcr100.dll is missing in external/msvcp100/. 5753cfc83b6cSPedro GiffuniGet it from the Microsoft Visual C++ 2010 Redistributable Package (x86), 5754cfc83b6cSPedro Giffunifrom the Microsoft site and put it into external/msvcp100. 5755cfc83b6cSPedro GiffuniYou may have to search Microsoft's website. Last time it was seen at: 5756cfc83b6cSPedro Giffuni<http://www.microsoft.com/en-us/download/search.aspx?q=Microsoft+Visual+C%2b%2b+2010+Redistributable>.]) 5757cfc83b6cSPedro Giffuni fi 5758cfc83b6cSPedro Giffunifi 5759cfc83b6cSPedro Giffuni 5760cfc83b6cSPedro Giffunidnl =================================================================== 5761cfc83b6cSPedro Giffunidnl Test which vclplugs have to be built. 5762cfc83b6cSPedro Giffunidnl =================================================================== 5763cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which VCLplugs shall be built]) 5764cfc83b6cSPedro GiffuniENABLE_GTK="" 5765cfc83b6cSPedro Giffuniif test "x$enable_gtk" = "xyes"; then 5766cfc83b6cSPedro Giffuni ENABLE_GTK="TRUE" 5767cfc83b6cSPedro Giffuni R="gtk" 5768cfc83b6cSPedro Giffunifi 5769cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_GTK) 5770cfc83b6cSPedro Giffuni 5771cfc83b6cSPedro GiffuniENABLE_KDE="" 5772cfc83b6cSPedro Giffuniif test "x$enable_kde" = "xyes"; then 5773cfc83b6cSPedro Giffuni ENABLE_KDE="TRUE" 5774cfc83b6cSPedro Giffuni R="$R kde" 5775cfc83b6cSPedro Giffunifi 5776cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_KDE) 5777cfc83b6cSPedro Giffuni 5778cfc83b6cSPedro GiffuniENABLE_KDE4="" 5779cfc83b6cSPedro Giffuniif test "x$enable_kde4" = "xyes"; then 5780cfc83b6cSPedro Giffuni ENABLE_KDE4="TRUE" 5781cfc83b6cSPedro Giffuni R="$R kde4" 5782cfc83b6cSPedro Giffunifi 5783cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_KDE4) 5784cfc83b6cSPedro Giffuni 5785cfc83b6cSPedro Giffuniif test -z "$R"; then 5786cfc83b6cSPedro Giffuni AC_MSG_RESULT([none]) 5787cfc83b6cSPedro Giffunielse 5788cfc83b6cSPedro Giffuni AC_MSG_RESULT([$R]) 5789cfc83b6cSPedro Giffunifi 5790cfc83b6cSPedro Giffuni 5791cfc83b6cSPedro Giffunidnl =================================================================== 5792cfc83b6cSPedro Giffunidnl GCONF check 5793cfc83b6cSPedro Giffunidnl =================================================================== 5794cfc83b6cSPedro Giffuni 5795cfc83b6cSPedro GiffuniENABLE_GCONF="" 5796cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable GConf support]) 5797cfc83b6cSPedro Giffuniif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then 5798cfc83b6cSPedro Giffuni ENABLE_GCONF="TRUE" 5799cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5800cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( GCONF, gconf-2.0 ) 5801cfc83b6cSPedro Giffunielse 5802cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5803cfc83b6cSPedro Giffunifi 5804cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_GCONF) 5805cfc83b6cSPedro Giffuni 5806cfc83b6cSPedro Giffunidnl =================================================================== 5807cfc83b6cSPedro Giffunidnl Gnome VFS check 5808cfc83b6cSPedro Giffunidnl =================================================================== 5809cfc83b6cSPedro Giffuni 5810cfc83b6cSPedro GiffuniENABLE_GNOMEVFS="" 5811cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable GNOME VFS support]) 5812cfc83b6cSPedro Giffuniif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then 5813cfc83b6cSPedro Giffuni ENABLE_GNOMEVFS="TRUE" 5814cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5815cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 ) 5816cfc83b6cSPedro Giffuni if test "$ENABLE_GCONF" != "TRUE"; then 5817cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( GCONF, gconf-2.0 ) 5818cfc83b6cSPedro Giffuni fi 5819cfc83b6cSPedro Giffunielse 5820cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5821cfc83b6cSPedro Giffunifi 5822cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_GNOMEVFS) 5823cfc83b6cSPedro Giffuni 5824cfc83b6cSPedro Giffunidnl =================================================================== 5825cfc83b6cSPedro Giffunidnl Check whether the gtk 2.0 libraries are available. 5826cfc83b6cSPedro Giffunidnl =================================================================== 5827cfc83b6cSPedro Giffuni 5828cfc83b6cSPedro GiffuniGTK_CFLAGS="" 5829cfc83b6cSPedro GiffuniGTK_LIBS="" 5830cfc83b6cSPedro GiffuniENABLE_SYSTRAY_GTK="" 5831cfc83b6cSPedro GiffuniENABLE_DBUS="" 5832cfc83b6cSPedro Giffuniif test "$test_gtk" = "yes"; then 5833cfc83b6cSPedro Giffuni 5834cfc83b6cSPedro Giffuni if test "$ENABLE_GTK" = "TRUE" ; then 5835cfc83b6cSPedro Giffuni 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])) 5836cfc83b6cSPedro Giffuni 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])) 5837cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE GTK" 5838cfc83b6cSPedro Giffuni 5839cfc83b6cSPedro Giffuni if test "x$enable_systray" = "xyes"; then 5840cfc83b6cSPedro Giffuni PKG_CHECK_MODULES(GTK_2_10,gtk+-2.0 >= 2.10.0, 5841cfc83b6cSPedro Giffuni [ENABLE_SYSTRAY_GTK="TRUE" 5842cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"], 5843cfc83b6cSPedro Giffuni [ENABLE_SYSTRAY_GTK=""]) 5844cfc83b6cSPedro Giffuni fi 5845cfc83b6cSPedro Giffuni 5846cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to enable DBUS support]) 5847cfc83b6cSPedro Giffuni if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then 5848cfc83b6cSPedro Giffuni ENABLE_DBUS="TRUE" 5849cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5850cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 ) 5851cfc83b6cSPedro Giffuni else 5852cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5853cfc83b6cSPedro Giffuni fi 5854cfc83b6cSPedro Giffuni 5855cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to enable GIO support]) 5856cfc83b6cSPedro Giffuni if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then 5857cfc83b6cSPedro Giffuni if test "$ENABLE_GNOMEVFS" = "TRUE" ; then 5858cfc83b6cSPedro Giffuni AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.]) 5859cfc83b6cSPedro Giffuni fi 5860cfc83b6cSPedro Giffuni ENABLE_GIO="TRUE" 5861cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5862cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( GIO, gio-2.0 ) 5863cfc83b6cSPedro Giffuni else 5864cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5865cfc83b6cSPedro Giffuni fi 5866cfc83b6cSPedro Giffuni 5867cfc83b6cSPedro Giffuni fi 5868cfc83b6cSPedro Giffuni 5869cfc83b6cSPedro Giffunifi 5870cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_GIO) 5871cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_DBUS) 5872cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_SYSTRAY_GTK) 5873cfc83b6cSPedro GiffuniAC_SUBST(GTK_CFLAGS) 5874cfc83b6cSPedro GiffuniAC_SUBST(GTK_LIBS) 5875cfc83b6cSPedro GiffuniAC_SUBST(GTHREAD_CFLAGS) 5876cfc83b6cSPedro GiffuniAC_SUBST(GTHREAD_LIBS) 5877cfc83b6cSPedro Giffuni 5878cfc83b6cSPedro Giffunidnl =================================================================== 5879cfc83b6cSPedro Giffunidnl Check whether the GStreamer libraries are available. 5880cfc83b6cSPedro Giffunidnl =================================================================== 5881cfc83b6cSPedro Giffuni 5882cfc83b6cSPedro GiffuniGSTREAMER_CFLAGS="" 5883cfc83b6cSPedro GiffuniGSTREAMER_LIBS="" 5884cfc83b6cSPedro GiffuniENABLE_GSTREAMER="" 5885cfc83b6cSPedro Giffuni 5886cfc83b6cSPedro Giffuniif test "$test_gstreamer" = "yes"; then 5887cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to build the GStreamer media backend]) 5888cfc83b6cSPedro Giffuni if test "x$enable_gstreamer" != "xno" ; then 5889cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( GSTREAMER, gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ,,AC_MSG_ERROR([requirements to build the GStreamer media backend not met. Do not use --enable-gstreamer or install the missing packages])) 5890cfc83b6cSPedro Giffuni ENABLE_GSTREAMER="TRUE" 5891cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5892cfc83b6cSPedro Giffuni else 5893cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5894cfc83b6cSPedro Giffuni fi 5895cfc83b6cSPedro Giffunifi 5896cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_GSTREAMER) 5897cfc83b6cSPedro GiffuniAC_SUBST(GSTREAMER_CFLAGS) 5898cfc83b6cSPedro GiffuniAC_SUBST(GSTREAMER_LIBS) 5899cfc83b6cSPedro Giffuni 5900cfc83b6cSPedro Giffunidnl =================================================================== 5901cfc83b6cSPedro Giffunidnl Check the ARM target 5902cfc83b6cSPedro Giffunidnl =================================================================== 5903cfc83b6cSPedro Giffuni 5904a5232f55Spfgif echo "$build_cpu" | $GREP -q arm; then 5905cfc83b6cSPedro Giffuni # default value 5906cfc83b6cSPedro Giffuni ARM_TARGET=ARMV4T 5907cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which ARM processor optimization to use]) 5908cfc83b6cSPedro Giffuni if test "$with_arm_target" -lt "6"; then 5909cfc83b6cSPedro Giffuni ARM_TARGET=ARMV4T 5910cfc83b6cSPedro Giffuni elif test "$with_arm_target" = "6"; then 5911cfc83b6cSPedro Giffuni ARM_TARGET=ARMV6 5912cfc83b6cSPedro Giffuni elif test "$with_arm_target" -gt "6"; then 5913cfc83b6cSPedro Giffuni ARM_TARGET=ARMV7 5914cfc83b6cSPedro Giffuni fi 5915cfc83b6cSPedro Giffuni AC_MSG_RESULT([$ARM_TARGET]) 5916cfc83b6cSPedro Giffuni AC_SUBST(ARM_TARGET) 5917cfc83b6cSPedro Giffunifi 5918cfc83b6cSPedro Giffuni 5919cfc83b6cSPedro Giffunidnl =================================================================== 5920cfc83b6cSPedro Giffunidnl Check whether the Cairo libraries are available. 5921cfc83b6cSPedro Giffunidnl =================================================================== 5922cfc83b6cSPedro Giffuni 5923cfc83b6cSPedro GiffuniENABLE_CAIRO="" 5924cfc83b6cSPedro GiffuniBUILD_PIXMAN="" 5925cfc83b6cSPedro GiffuniSYSTEM_CAIRO="" 5926cfc83b6cSPedro Giffuni 5927cfc83b6cSPedro Giffuniif test "$test_cairo" = "yes"; then 5928cfc83b6cSPedro Giffuni 5929cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use cairo]) 5930cfc83b6cSPedro Giffuni if test "x$enable_cairo" != "xno" ; then 5931cfc83b6cSPedro Giffuni ENABLE_CAIRO="TRUE" 5932cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5933cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which cairo to use]) 5934cfc83b6cSPedro Giffuni if test -n "$with_system_cairo" -o -n "$with_system_libs" && \ 5935cfc83b6cSPedro Giffuni test "$with_system_cairo" != "no"; then 5936cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 5937cfc83b6cSPedro Giffuni SYSTEM_CAIRO=YES 5938cfc83b6cSPedro Giffuni 5939cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 ) 5940cfc83b6cSPedro Giffuni if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then 5941cfc83b6cSPedro Giffuni AC_MSG_ERROR([Cairo library requires fontconfig.]) 5942cfc83b6cSPedro Giffuni fi 5943cfc83b6cSPedro Giffuni if test "$with_system_xrender_headers" = "yes"; then 5944cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8]) 5945cfc83b6cSPedro Giffuni AC_TRY_RUN([ 5946cfc83b6cSPedro Giffuni#include <X11/extensions/Xrender.h> 5947cfc83b6cSPedro Giffuni 5948cfc83b6cSPedro Giffuniint main(int argc, char **argv) { 5949cfc83b6cSPedro Giffuni#ifdef PictStandardA8 5950cfc83b6cSPedro Giffuni return 0; 5951cfc83b6cSPedro Giffuni#else 5952cfc83b6cSPedro Giffuni return 1; 5953cfc83b6cSPedro Giffuni#endif 5954cfc83b6cSPedro Giffuni} 5955cfc83b6cSPedro Giffuni ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])]) 5956cfc83b6cSPedro Giffuni fi 5957cfc83b6cSPedro Giffuni else 5958cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE CAIRO" 5959cfc83b6cSPedro Giffuni dnl === compiler fails on pixman with 64bit architectures...=== 5960cfc83b6cSPedro Giffuni if test "$build_cpu" != "x86_64"; then 5961cfc83b6cSPedro Giffuni BUILD_PIXMAN=YES 5962cfc83b6cSPedro Giffuni fi 5963cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 5964cfc83b6cSPedro Giffuni fi 5965cfc83b6cSPedro Giffuni else 5966cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 5967cfc83b6cSPedro Giffuni fi 5968cfc83b6cSPedro Giffunifi 5969cfc83b6cSPedro Giffuni 5970cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_CAIRO) 5971cfc83b6cSPedro GiffuniAC_SUBST(BUILD_PIXMAN) 5972cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_CAIRO) 5973cfc83b6cSPedro GiffuniAC_SUBST(CAIRO_CFLAGS) 5974cfc83b6cSPedro GiffuniAC_SUBST(CAIRO_LIBS) 5975cfc83b6cSPedro Giffuni 5976cfc83b6cSPedro GiffuniENABLE_CAIRO_CANVAS="FALSE" 5977cfc83b6cSPedro Giffuniif test "$enable_cairo_canvas" = "yes" -a "$ENABLE_CAIRO" = "TRUE" ; then 5978cfc83b6cSPedro Giffuni ENABLE_CAIRO_CANVAS="TRUE" 5979cfc83b6cSPedro Giffunifi 5980cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_CAIRO_CANVAS) 5981cfc83b6cSPedro Giffuni 5982cfc83b6cSPedro Giffunidnl =================================================================== 5983cfc83b6cSPedro Giffunidnl Check whether the OpenGL libraries are available 5984cfc83b6cSPedro Giffunidnl =================================================================== 5985cfc83b6cSPedro Giffuni 5986cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the OpenGL Transitions component]) 5987cfc83b6cSPedro GiffuniENABLE_OPENGL= 5988cfc83b6cSPedro Giffuni 5989cfc83b6cSPedro Giffuniif test "x$enable_opengl" != "xno" ; then 5990cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 5991cfc83b6cSPedro Giffuni AC_CHECK_HEADER(GL/gl.h, [], 5992cfc83b6cSPedro Giffuni [AC_MSG_ERROR([OpenGL headers not found])], []) 5993cfc83b6cSPedro Giffuni AC_CHECK_LIB(GL, main, [], 5994cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libGL not installed or functional)], []) 5995cfc83b6cSPedro Giffuni AC_CHECK_LIB(GLU, main, [], 5996cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libGLU not installed or functional)], []) 5997cfc83b6cSPedro Giffuni ENABLE_OPENGL=TRUE 5998cfc83b6cSPedro Giffunielse 5999cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6000cfc83b6cSPedro Giffunifi 6001cfc83b6cSPedro Giffuni 6002cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_OPENGL) 6003cfc83b6cSPedro Giffuni 6004cfc83b6cSPedro Giffuni 6005cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the PDF Import extension]) 6006cfc83b6cSPedro Giffuniif test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then 6007cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6008cfc83b6cSPedro Giffuni ENABLE_PDFIMPORT=YES 6009cfc83b6cSPedro Giffuni 6010cfc83b6cSPedro Giffuni dnl =================================================================== 6011cfc83b6cSPedro Giffuni dnl Check for system poppler 6012cfc83b6cSPedro Giffuni dnl =================================================================== 6013cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether to use system pdf backend]) 6014cfc83b6cSPedro Giffuni if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ 6015cfc83b6cSPedro Giffuni test "$with_system_poppler" != "no"; then 6016cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 6017cfc83b6cSPedro Giffuni SYSTEM_POPPLER=YES 6018cfc83b6cSPedro Giffuni PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 ) 6019cfc83b6cSPedro Giffuni else 6020cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6021cfc83b6cSPedro Giffuni SYSTEM_POPPLER=NO 6022cfc83b6cSPedro Giffuni ENABLE_PDFIMPORT=NO 6023cfc83b6cSPedro Giffuni fi 6024cfc83b6cSPedro Giffunielse 6025cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6026cfc83b6cSPedro Giffuni ENABLE_PDFIMPORT=NO 6027cfc83b6cSPedro Giffunifi 6028cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_PDFIMPORT) 6029cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_POPPLER) 6030cfc83b6cSPedro GiffuniAC_SUBST(POPPLER_CFLAGS) 6031cfc83b6cSPedro GiffuniAC_SUBST(POPPLER_LIBS) 6032cfc83b6cSPedro Giffuni 6033cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the Wiki Publisher extension]) 6034cfc83b6cSPedro Giffuniif test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then 6035cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6036cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for swext module]) 6037cfc83b6cSPedro Giffuni if test -d ./swext; then 6038cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK]) 6039cfc83b6cSPedro Giffuni else 6040cfc83b6cSPedro Giffuni AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 6041cfc83b6cSPedro Giffuni fi 6042cfc83b6cSPedro Giffuni ENABLE_MEDIAWIKI=YES 6043cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE SWEXT" 6044cfc83b6cSPedro Giffunielse 6045cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6046cfc83b6cSPedro Giffuni ENABLE_MEDIAWIKI=NO 6047cfc83b6cSPedro Giffunifi 6048cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_MEDIAWIKI) 6049cfc83b6cSPedro Giffuni 6050cfc83b6cSPedro Giffuniif test "$ENABLE_MEDIAWIKI" = "YES"; then 6051cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which Servlet API Jar to use]) 6052cfc83b6cSPedro Giffuni if test -n "$with_system_servlet_api"; then 6053cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 6054cfc83b6cSPedro Giffuni SYSTEM_SERVLETAPI=YES 6055cfc83b6cSPedro Giffuni if test -z "$SERVLETAPI_JAR"; then 6056cfc83b6cSPedro Giffuni SERVLETAPI_JAR=/usr/share/java/servlet-api.jar 6057cfc83b6cSPedro Giffuni fi 6058cfc83b6cSPedro Giffuni AC_CHECK_FILE($SERVLETAPI_JAR, [], 6059cfc83b6cSPedro Giffuni [AC_MSG_ERROR(servlet-api.jar not found.)], []) 6060cfc83b6cSPedro Giffuni else 6061cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 6062cfc83b6cSPedro Giffuni SYSTEM_SERVLETAPI=NO 6063cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE TOMCAT" 6064cfc83b6cSPedro Giffuni fi 6065cfc83b6cSPedro Giffunifi 6066cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_SERVLETAPI) 6067cfc83b6cSPedro GiffuniAC_SUBST(SERVLETAPI_JAR) 6068cfc83b6cSPedro Giffuni 6069cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build the Report Builder extension]) 6070cfc83b6cSPedro Giffuniif test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then 6071cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6072cfc83b6cSPedro Giffuni ENABLE_REPORTBUILDER=YES 6073cfc83b6cSPedro Giffuni SYSTEM_JFREEREPORT=YES 6074cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for reportbuilder module]) 6075cfc83b6cSPedro Giffuni if test -d ./reportbuilder; then 6076cfc83b6cSPedro Giffuni AC_MSG_RESULT([OK]) 6077cfc83b6cSPedro Giffuni else 6078cfc83b6cSPedro Giffuni AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 6079cfc83b6cSPedro Giffuni fi 6080cfc83b6cSPedro Giffuni AC_MSG_CHECKING([which jfreereport libs to use (for Report Builder extension)]) 6081cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 6082cfc83b6cSPedro Giffuni if test -z $SAC_JAR; then 6083cfc83b6cSPedro Giffuni SAC_JAR=/usr/share/java/sac.jar 6084cfc83b6cSPedro Giffuni fi 6085cfc83b6cSPedro Giffuni AC_CHECK_FILE($SAC_JAR, [], 6086cfc83b6cSPedro Giffuni [AC_MSG_ERROR(sac.jar not found.)], []) 6087cfc83b6cSPedro Giffuni 6088cfc83b6cSPedro Giffuni if test -z $LIBXML_JAR; then 6089cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar, 6090cfc83b6cSPedro Giffuni [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ], 6091cfc83b6cSPedro Giffuni [ 6092cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libxml.jar, 6093cfc83b6cSPedro Giffuni [ LIBXML_JAR=/usr/share/java/libxml.jar ], 6094cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libxml.jar replacement not found.)] 6095cfc83b6cSPedro Giffuni ) 6096cfc83b6cSPedro Giffuni ] 6097cfc83b6cSPedro Giffuni ) 6098cfc83b6cSPedro Giffuni else 6099cfc83b6cSPedro Giffuni AC_CHECK_FILE($LIBXML_JAR, [], 6100cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libxml.jar not found.)], []) 6101cfc83b6cSPedro Giffuni fi 6102cfc83b6cSPedro Giffuni 6103cfc83b6cSPedro Giffuni if test -z $FLUTE_JAR; then 6104cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar, 6105cfc83b6cSPedro Giffuni [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ], 6106cfc83b6cSPedro Giffuni [ 6107cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/flute.jar, 6108cfc83b6cSPedro Giffuni [ FLUTE_JAR=/usr/share/java/flute.jar ], 6109cfc83b6cSPedro Giffuni [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)] 6110cfc83b6cSPedro Giffuni ) 6111cfc83b6cSPedro Giffuni ] 6112cfc83b6cSPedro Giffuni ) 6113cfc83b6cSPedro Giffuni else 6114cfc83b6cSPedro Giffuni AC_CHECK_FILE($FLUTE_JAR, [], 6115cfc83b6cSPedro Giffuni [AC_MSG_ERROR(flute-1.3.0.jar not found.)], []) 6116cfc83b6cSPedro Giffuni fi 6117cfc83b6cSPedro Giffuni 6118cfc83b6cSPedro Giffuni if test -z $JFREEREPORT_JAR; then 6119cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar, 6120cfc83b6cSPedro Giffuni [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ], 6121cfc83b6cSPedro Giffuni [ 6122cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/flow-engine.jar, 6123cfc83b6cSPedro Giffuni [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ], 6124cfc83b6cSPedro Giffuni [AC_MSG_ERROR(jfreereport.jar replacement not found.)] 6125cfc83b6cSPedro Giffuni ) 6126cfc83b6cSPedro Giffuni ] 6127cfc83b6cSPedro Giffuni ) 6128cfc83b6cSPedro Giffuni else 6129cfc83b6cSPedro Giffuni AC_CHECK_FILE($JFREEREPORT_JAR, [], 6130cfc83b6cSPedro Giffuni [AC_MSG_ERROR(jfreereport.jar not found.)], []) 6131cfc83b6cSPedro Giffuni fi 6132cfc83b6cSPedro Giffuni 6133cfc83b6cSPedro Giffuni if test -z $LIBLAYOUT_JAR; then 6134cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar, 6135cfc83b6cSPedro Giffuni [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ], 6136cfc83b6cSPedro Giffuni [ 6137cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/liblayout.jar, 6138cfc83b6cSPedro Giffuni [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ], 6139cfc83b6cSPedro Giffuni [AC_MSG_ERROR(liblayout.jar replacement not found.)] 6140cfc83b6cSPedro Giffuni ) 6141cfc83b6cSPedro Giffuni ] 6142cfc83b6cSPedro Giffuni ) 6143cfc83b6cSPedro Giffuni else 6144cfc83b6cSPedro Giffuni AC_CHECK_FILE($LIBLAYOUT_JAR, [], 6145cfc83b6cSPedro Giffuni [AC_MSG_ERROR(liblayout.jar not found.)], []) 6146cfc83b6cSPedro Giffuni fi 6147cfc83b6cSPedro Giffuni 6148cfc83b6cSPedro Giffuni if test -z $LIBLOADER_JAR; then 6149cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar, 6150cfc83b6cSPedro Giffuni [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ], 6151cfc83b6cSPedro Giffuni [ 6152cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libloader.jar, 6153cfc83b6cSPedro Giffuni [ LIBLOADER_JAR=/usr/share/java/libloader.jar ], 6154cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libloader.jar replacement not found.)] 6155cfc83b6cSPedro Giffuni ) 6156cfc83b6cSPedro Giffuni ] 6157cfc83b6cSPedro Giffuni ) 6158cfc83b6cSPedro Giffuni else 6159cfc83b6cSPedro Giffuni AC_CHECK_FILE($LIBLOADER_JAR, [], 6160cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libloader.jar not found.)], []) 6161cfc83b6cSPedro Giffuni fi 6162cfc83b6cSPedro Giffuni 6163cfc83b6cSPedro Giffuni if test -z $LIBFORMULA_JAR; then 6164cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar, 6165cfc83b6cSPedro Giffuni [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ], 6166cfc83b6cSPedro Giffuni [ 6167cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libformula.jar, 6168cfc83b6cSPedro Giffuni [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ], 6169cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libformula.jar replacement not found.)] 6170cfc83b6cSPedro Giffuni ) 6171cfc83b6cSPedro Giffuni ] 6172cfc83b6cSPedro Giffuni ) 6173cfc83b6cSPedro Giffuni else 6174cfc83b6cSPedro Giffuni AC_CHECK_FILE($LIBFORMULA_JAR, [], 6175cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libformula.jar not found.)], []) 6176cfc83b6cSPedro Giffuni fi 6177cfc83b6cSPedro Giffuni 6178cfc83b6cSPedro Giffuni if test -z $LIBREPOSITORY_JAR; then 6179cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar, 6180cfc83b6cSPedro Giffuni [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ], 6181cfc83b6cSPedro Giffuni [ 6182cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/librepository.jar, 6183cfc83b6cSPedro Giffuni [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ], 6184cfc83b6cSPedro Giffuni [AC_MSG_ERROR(librepository.jar replacement not found.)] 6185cfc83b6cSPedro Giffuni ) 6186cfc83b6cSPedro Giffuni ] 6187cfc83b6cSPedro Giffuni ) 6188cfc83b6cSPedro Giffuni else 6189cfc83b6cSPedro Giffuni AC_CHECK_FILE($LIBREPOSITORY_JAR, [], 6190cfc83b6cSPedro Giffuni [AC_MSG_ERROR(librepository.jar not found.)], []) 6191cfc83b6cSPedro Giffuni fi 6192cfc83b6cSPedro Giffuni 6193cfc83b6cSPedro Giffuni if test -z $LIBFONTS_JAR; then 6194cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar, 6195cfc83b6cSPedro Giffuni [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ], 6196cfc83b6cSPedro Giffuni [ 6197cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libfonts.jar, 6198cfc83b6cSPedro Giffuni [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ], 6199cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libfonts.jar replacement not found.)] 6200cfc83b6cSPedro Giffuni ) 6201cfc83b6cSPedro Giffuni ] 6202cfc83b6cSPedro Giffuni ) 6203cfc83b6cSPedro Giffuni else 6204cfc83b6cSPedro Giffuni AC_CHECK_FILE($LIBFONTS_JAR, [], 6205cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libfonts.jar not found.)], []) 6206cfc83b6cSPedro Giffuni fi 6207cfc83b6cSPedro Giffuni 6208cfc83b6cSPedro Giffuni if test -z $LIBSERIALIZER_JAR; then 6209cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar, 6210cfc83b6cSPedro Giffuni [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ], 6211cfc83b6cSPedro Giffuni [ 6212cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libserializer.jar, 6213cfc83b6cSPedro Giffuni [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ], 6214cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libserializer.jar replacement not found.)] 6215cfc83b6cSPedro Giffuni ) 6216cfc83b6cSPedro Giffuni ] 6217cfc83b6cSPedro Giffuni ) 6218cfc83b6cSPedro Giffuni else 6219cfc83b6cSPedro Giffuni AC_CHECK_FILE($LIBSERIALIZER_JAR, [], 6220cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libserializer.jar not found.)], []) 6221cfc83b6cSPedro Giffuni fi 6222cfc83b6cSPedro Giffuni 6223cfc83b6cSPedro Giffuni 6224cfc83b6cSPedro Giffuni if test -z $LIBBASE_JAR; then 6225cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar, 6226cfc83b6cSPedro Giffuni [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ], 6227cfc83b6cSPedro Giffuni [ 6228cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/libbase.jar, 6229cfc83b6cSPedro Giffuni [ LIBBASE_JAR=/usr/share/java/libbase.jar ], 6230cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libbase.jar replacement not found.)] 6231cfc83b6cSPedro Giffuni ) 6232cfc83b6cSPedro Giffuni ] 6233cfc83b6cSPedro Giffuni ) 6234cfc83b6cSPedro Giffuni else 6235cfc83b6cSPedro Giffuni AC_CHECK_FILE($LIBBASE_JAR, [], 6236cfc83b6cSPedro Giffuni [AC_MSG_ERROR(libbase.jar not found.)], []) 6237cfc83b6cSPedro Giffuni fi 6238cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" 6239cfc83b6cSPedro Giffunielse 6240cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6241cfc83b6cSPedro Giffuni ENABLE_REPORTBUILDER=NO 6242cfc83b6cSPedro Giffunifi 6243cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_REPORTBUILDER) 6244cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_JFREEREPORT) 6245cfc83b6cSPedro GiffuniAC_SUBST(SAC_JAR) 6246cfc83b6cSPedro GiffuniAC_SUBST(LIBXML_JAR) 6247cfc83b6cSPedro GiffuniAC_SUBST(FLUTE_JAR) 6248cfc83b6cSPedro GiffuniAC_SUBST(JFREEREPORT_JAR) 6249cfc83b6cSPedro GiffuniAC_SUBST(LIBBASE_JAR) 6250cfc83b6cSPedro GiffuniAC_SUBST(LIBLAYOUT_JAR) 6251cfc83b6cSPedro GiffuniAC_SUBST(LIBLOADER_JAR) 6252cfc83b6cSPedro GiffuniAC_SUBST(LIBFORMULA_JAR) 6253cfc83b6cSPedro GiffuniAC_SUBST(LIBREPOSITORY_JAR) 6254cfc83b6cSPedro GiffuniAC_SUBST(LIBFONTS_JAR) 6255cfc83b6cSPedro GiffuniAC_SUBST(LIBSERIALIZER_JAR) 6256cfc83b6cSPedro Giffuni 6257cfc83b6cSPedro Giffuni# this has to be here because both the wiki publisher and the SRB use 62583c5114b8SDamjan Jovanovic# commons-logging, while the non-optional PostgreSQL connector uses 62593c5114b8SDamjan Jovanovic# commons-lang. 6260cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which Apache commons-* libs to use]) 6261cfc83b6cSPedro Giffuniif test "$with_system_apache_commons" = "yes"; then 6262cfc83b6cSPedro Giffuni SYSTEM_APACHE_COMMONS=YES 6263cfc83b6cSPedro Giffuni AC_MSG_RESULT([external]) 6264cfc83b6cSPedro Giffuni 6265cfc83b6cSPedro Giffuni if test -z $COMMONS_LANG_JAR; then 6266cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/commons-lang3-3.3.jar, 6267cfc83b6cSPedro Giffuni [ COMMONS_LANG_JAR=/usr/share/java/commons-lang3-3.3.jar ], 6268cfc83b6cSPedro Giffuni [ 6269cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/commons-lang.jar, 6270cfc83b6cSPedro Giffuni [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ], 6271cfc83b6cSPedro Giffuni [AC_MSG_ERROR(commons-lang.jar replacement not found.)] 6272cfc83b6cSPedro Giffuni ) 6273cfc83b6cSPedro Giffuni ] 6274cfc83b6cSPedro Giffuni ) 6275cfc83b6cSPedro Giffuni else 6276cfc83b6cSPedro Giffuni AC_CHECK_FILE($COMMONS_LANG_JAR, [], 6277cfc83b6cSPedro Giffuni [AC_MSG_ERROR(commons-lang.jar not found.)], []) 6278cfc83b6cSPedro Giffuni fi 6279160c442cSDamjan Jovanovic AC_MSG_CHECKING([whether commons-lang is version 3.x]) 6280160c442cSDamjan Jovanovic export COMMONS_LANG_JAR 6281160c442cSDamjan Jovanovic if $PERL -e 'use Archive::Zip; 6282160c442cSDamjan Jovanovic my $file = "$ENV{'COMMONS_LANG_JAR'}"; 6283160c442cSDamjan Jovanovic my $zip = Archive::Zip->new( $file ); 6284160c442cSDamjan Jovanovic my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 6285160c442cSDamjan Jovanovic if ( $mf =~ m/Specification-Version: 3.*/ ) { 6286160c442cSDamjan Jovanovic exit 0; 6287160c442cSDamjan Jovanovic } else { 6288160c442cSDamjan Jovanovic exit 1; 6289160c442cSDamjan Jovanovic }'; then 6290160c442cSDamjan Jovanovic AC_MSG_RESULT([yes]) 6291160c442cSDamjan Jovanovic else 6292160c442cSDamjan Jovanovic AC_MSG_ERROR([no, you need Apache Commons Lang 3.x]) 6293160c442cSDamjan Jovanovic fi 6294cfc83b6cSPedro Giffuni 62953c5114b8SDamjan Jovanovic if test "$ENABLE_MEDIAWIKI" = "YES"; then 62963c5114b8SDamjan Jovanovic if test -z $COMMONS_CODEC_JAR; then 62973c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-codec-1.9.jar, 62983c5114b8SDamjan Jovanovic [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.9.jar ], 62993c5114b8SDamjan Jovanovic [ 63003c5114b8SDamjan Jovanovic AC_CHECK_FILE(/usr/share/java/commons-codec.jar, 63013c5114b8SDamjan Jovanovic [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ], 63023c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-codec.jar replacement not found.)] 63033c5114b8SDamjan Jovanovic ) 63043c5114b8SDamjan Jovanovic ] 63053c5114b8SDamjan Jovanovic ) 63063c5114b8SDamjan Jovanovic else 63073c5114b8SDamjan Jovanovic AC_CHECK_FILE($COMMONS_CODEC_JAR, [], 63083c5114b8SDamjan Jovanovic [AC_MSG_ERROR(commons-codec.jar not found.)], []) 63093c5114b8SDamjan Jovanovic fi 63103c5114b8SDamjan Jovanovic 6311cfc83b6cSPedro Giffuni if test -z $COMMONS_HTTPCLIENT_JAR; then 6312cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar, 6313cfc83b6cSPedro Giffuni [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ], 6314cfc83b6cSPedro Giffuni [ 6315cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar, 6316cfc83b6cSPedro Giffuni [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ], 6317cfc83b6cSPedro Giffuni [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)] 6318cfc83b6cSPedro Giffuni ) 6319cfc83b6cSPedro Giffuni ] 6320cfc83b6cSPedro Giffuni ) 6321cfc83b6cSPedro Giffuni else 6322cfc83b6cSPedro Giffuni AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [], 6323cfc83b6cSPedro Giffuni [AC_MSG_ERROR(commons-httpclient.jar not found.)], []) 6324cfc83b6cSPedro Giffuni fi 6325cfc83b6cSPedro Giffuni fi 6326cfc83b6cSPedro Giffuni if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then 6327cfc83b6cSPedro Giffuni if test -z $COMMONS_LOGGING_JAR; then 6328cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.3.jar, 6329cfc83b6cSPedro Giffuni [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.3.jar ], 6330cfc83b6cSPedro Giffuni [ 6331cfc83b6cSPedro Giffuni AC_CHECK_FILE(/usr/share/java/commons-logging.jar, 6332cfc83b6cSPedro Giffuni [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ], 6333cfc83b6cSPedro Giffuni [AC_MSG_ERROR(commons-logging.jar replacement not found.)] 6334cfc83b6cSPedro Giffuni ) 6335cfc83b6cSPedro Giffuni ] 6336cfc83b6cSPedro Giffuni ) 6337cfc83b6cSPedro Giffuni else 6338cfc83b6cSPedro Giffuni AC_CHECK_FILE($COMMONS_LOGGING_JAR, [], 6339cfc83b6cSPedro Giffuni [AC_MSG_ERROR(commons-logging.jar not found.)], []) 6340cfc83b6cSPedro Giffuni fi 6341cfc83b6cSPedro Giffuni fi 6342cfc83b6cSPedro Giffunielse 6343cfc83b6cSPedro Giffuni AC_MSG_RESULT([internal]) 6344cfc83b6cSPedro Giffuni SYSTEM_APACHE_COMMONS=NO 6345cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" 6346cfc83b6cSPedro Giffunifi 6347cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_APACHE_COMMONS) 6348cfc83b6cSPedro GiffuniAC_SUBST(COMMONS_CODEC_JAR) 6349cfc83b6cSPedro GiffuniAC_SUBST(COMMONS_LANG_JAR) 6350cfc83b6cSPedro GiffuniAC_SUBST(COMMONS_HTTPCLIENT_JAR) 6351cfc83b6cSPedro GiffuniAC_SUBST(COMMONS_LOGGING_JAR) 6352cfc83b6cSPedro Giffuni 6353cfc83b6cSPedro Giffunidnl =================================================================== 6354cfc83b6cSPedro Giffunidnl Check whether the Qt and KDE libraries are available. 6355cfc83b6cSPedro Giffunidnl =================================================================== 6356cfc83b6cSPedro Giffuni 6357cfc83b6cSPedro GiffuniKDE_CFLAGS="" 6358cfc83b6cSPedro GiffuniKDE_LIBS="" 6359cfc83b6cSPedro GiffuniMOC="moc" 6360cfc83b6cSPedro Giffuniif test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then 6361cfc83b6cSPedro Giffuni dnl Search paths for Qt and KDE 6362cfc83b6cSPedro Giffuni if test "$build_cpu" != "x86_64" ; then 6363cfc83b6cSPedro Giffuni 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" 6364cfc83b6cSPedro Giffuni 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" 6365cfc83b6cSPedro Giffuni else 6366cfc83b6cSPedro Giffuni 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" 6367cfc83b6cSPedro Giffuni 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" 6368cfc83b6cSPedro Giffuni fi 6369cfc83b6cSPedro Giffuni if test -n "$QTDIR" ; then 6370cfc83b6cSPedro Giffuni qt_incdirs="$QTDIR/include $qt_incdirs" 6371cfc83b6cSPedro Giffuni if test "$build_cpu" != "x86_64" ; then 6372cfc83b6cSPedro Giffuni qt_libdirs="$QTDIR/lib $qt_libdirs" 6373cfc83b6cSPedro Giffuni else 6374cfc83b6cSPedro Giffuni qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs" 6375cfc83b6cSPedro Giffuni fi 6376cfc83b6cSPedro Giffuni fi 6377cfc83b6cSPedro Giffuni if test "$build_cpu" != "x86_64" ; then 6378cfc83b6cSPedro Giffuni 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" 6379cfc83b6cSPedro Giffuni 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" 6380cfc83b6cSPedro Giffuni else 6381cfc83b6cSPedro Giffuni 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" 6382cfc83b6cSPedro Giffuni 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" 6383cfc83b6cSPedro Giffuni fi 6384cfc83b6cSPedro Giffuni if test -n "$KDEDIR" ; then 6385cfc83b6cSPedro Giffuni kde_incdirs="$KDEDIR/include $kde_incdirs" 6386cfc83b6cSPedro Giffuni if test "$build_cpu" != "x86_64" ; then 6387cfc83b6cSPedro Giffuni kde_libdirs="$KDEDIR/lib $kde_libdirs" 6388cfc83b6cSPedro Giffuni else 6389cfc83b6cSPedro Giffuni kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs" 6390cfc83b6cSPedro Giffuni fi 6391cfc83b6cSPedro Giffuni fi 6392cfc83b6cSPedro Giffuni 6393cfc83b6cSPedro Giffuni dnl What to test 6394cfc83b6cSPedro Giffuni qt_test_include="qstyle.h" 6395cfc83b6cSPedro Giffuni qt_test_library="libqt-mt.so" 6396cfc83b6cSPedro Giffuni kde_test_include="ksharedptr.h" 6397cfc83b6cSPedro Giffuni kde_test_library="libkdeui.so" 6398cfc83b6cSPedro Giffuni 6399cfc83b6cSPedro Giffuni dnl Check for Qt headers 6400cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for Qt headers]) 6401cfc83b6cSPedro Giffuni qt_incdir="no" 6402cfc83b6cSPedro Giffuni for kde_check in $qt_incdirs ; do 6403cfc83b6cSPedro Giffuni if test -r "$kde_check/$qt_test_include" ; then 6404cfc83b6cSPedro Giffuni qt_incdir="$kde_check" 6405cfc83b6cSPedro Giffuni break 6406cfc83b6cSPedro Giffuni fi 6407cfc83b6cSPedro Giffuni done 6408cfc83b6cSPedro Giffuni AC_MSG_RESULT([$qt_incdir]) 6409cfc83b6cSPedro Giffuni if test "x$qt_incdir" = "xno" ; then 6410cfc83b6cSPedro Giffuni AC_MSG_ERROR([Qt headers not found. Please specify the root of 6411cfc83b6cSPedro Giffuniyour Qt installation by exporting QTDIR before running "configure".]) 6412cfc83b6cSPedro Giffuni fi 6413cfc83b6cSPedro Giffuni 6414cfc83b6cSPedro Giffuni dnl Check for Qt libraries 6415cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for Qt libraries]) 6416cfc83b6cSPedro Giffuni qt_libdir="no" 6417cfc83b6cSPedro Giffuni for qt_check in $qt_libdirs ; do 6418cfc83b6cSPedro Giffuni if test -r "$qt_check/$qt_test_library" ; then 6419cfc83b6cSPedro Giffuni qt_libdir="$qt_check" 6420cfc83b6cSPedro Giffuni break 6421cfc83b6cSPedro Giffuni fi 6422cfc83b6cSPedro Giffuni done 6423cfc83b6cSPedro Giffuni AC_MSG_RESULT([$qt_libdir]) 6424cfc83b6cSPedro Giffuni if test "x$qt_libdir" = "xno" ; then 6425cfc83b6cSPedro Giffuni AC_MSG_ERROR([Qt libraries not found. Please specify the root of 6426cfc83b6cSPedro Giffuniyour Qt installation by exporting QTDIR before running "configure".]) 6427cfc83b6cSPedro Giffuni fi 6428cfc83b6cSPedro Giffuni 6429cfc83b6cSPedro Giffuni dnl Check for Meta Object Compiler 6430cfc83b6cSPedro Giffuni AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] ) 6431cfc83b6cSPedro Giffuni if test "$MOC" = "no" ; then 6432cfc83b6cSPedro Giffuni AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify 6433cfc83b6cSPedro Giffunithe root of your Qt installation by exporting QTDIR before running "configure".]) 6434cfc83b6cSPedro Giffuni fi 6435cfc83b6cSPedro Giffuni 6436cfc83b6cSPedro Giffuni dnl Check for KDE headers 6437cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for KDE headers]) 6438cfc83b6cSPedro Giffuni kde_incdir="no" 6439cfc83b6cSPedro Giffuni for kde_check in $kde_incdirs ; do 6440cfc83b6cSPedro Giffuni if test -r "$kde_check/$kde_test_include" ; then 6441cfc83b6cSPedro Giffuni kde_incdir="$kde_check" 6442cfc83b6cSPedro Giffuni break 6443cfc83b6cSPedro Giffuni fi 6444cfc83b6cSPedro Giffuni done 6445cfc83b6cSPedro Giffuni AC_MSG_RESULT([$kde_incdir]) 6446cfc83b6cSPedro Giffuni if test "x$kde_incdir" = "xno" ; then 6447cfc83b6cSPedro Giffuni AC_MSG_ERROR([KDE headers not found. Please specify the root of 6448cfc83b6cSPedro Giffuniyour KDE installation by exporting KDEDIR before running "configure".]) 6449cfc83b6cSPedro Giffuni fi 6450cfc83b6cSPedro Giffuni 6451cfc83b6cSPedro Giffuni dnl Check for KDE libraries 6452cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for KDE libraries]) 6453cfc83b6cSPedro Giffuni kde_libdir="no" 6454cfc83b6cSPedro Giffuni for kde_check in $kde_libdirs ; do 6455cfc83b6cSPedro Giffuni if test -r "$kde_check/$kde_test_library" ; then 6456cfc83b6cSPedro Giffuni kde_libdir="$kde_check" 6457cfc83b6cSPedro Giffuni break 6458cfc83b6cSPedro Giffuni fi 6459cfc83b6cSPedro Giffuni done 6460cfc83b6cSPedro Giffuni AC_MSG_RESULT([$kde_libdir]) 6461cfc83b6cSPedro Giffuni if test "x$kde_libdir" = "xno" ; then 6462cfc83b6cSPedro Giffuni AC_MSG_ERROR([KDE libraries not found. Please specify the root of 6463cfc83b6cSPedro Giffuniyour KDE installation by exporting KDEDIR before running "configure".]) 6464cfc83b6cSPedro Giffuni fi 6465cfc83b6cSPedro Giffuni 6466cfc83b6cSPedro Giffuni dnl Set the variables 6467cfc83b6cSPedro Giffuni KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" 6468cfc83b6cSPedro Giffuni KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt" 6469cfc83b6cSPedro Giffunifi 6470cfc83b6cSPedro GiffuniAC_SUBST(KDE_CFLAGS) 6471cfc83b6cSPedro GiffuniAC_SUBST(KDE_LIBS) 6472cfc83b6cSPedro GiffuniAC_SUBST(MOC) 6473cfc83b6cSPedro Giffuni 6474cfc83b6cSPedro Giffunidnl =================================================================== 6475cfc83b6cSPedro Giffunidnl KDE4 Integration 6476cfc83b6cSPedro Giffunidnl =================================================================== 6477cfc83b6cSPedro Giffuni 6478cfc83b6cSPedro GiffuniKDE4_CFLAGS="" 6479cfc83b6cSPedro GiffuniKDE4_LIBS="" 6480cfc83b6cSPedro GiffuniMOC4="moc" 6481cfc83b6cSPedro Giffuniif test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then 6482cfc83b6cSPedro Giffuni qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes" 6483cfc83b6cSPedro Giffuni qt_libdirs="$QT4LIB /usr/lib $x_libraries" 6484cfc83b6cSPedro Giffuni 6485cfc83b6cSPedro Giffuni kde_incdirs="/usr/include /usr/include/kde4 $x_includes" 6486cfc83b6cSPedro Giffuni kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries" 6487cfc83b6cSPedro Giffuni 6488cfc83b6cSPedro Giffuni if test "$build_cpu" = "x86_64" ; then 6489cfc83b6cSPedro Giffuni qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64" 6490cfc83b6cSPedro Giffuni kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel" 6491cfc83b6cSPedro Giffuni fi 6492cfc83b6cSPedro Giffuni 6493cfc83b6cSPedro Giffuni if test -n "$KDE4DIR" ; then 6494cfc83b6cSPedro Giffuni kde_incdirs="$KDE4DIR/include $kde_incdirs" 6495cfc83b6cSPedro Giffuni if test "$build_cpu" != "x86_64" ; then 6496cfc83b6cSPedro Giffuni kde_libdirs="$KDE4DIR/lib $kde_libdirs" 6497cfc83b6cSPedro Giffuni else 6498cfc83b6cSPedro Giffuni kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs" 6499cfc83b6cSPedro Giffuni fi 6500cfc83b6cSPedro Giffuni fi 6501cfc83b6cSPedro Giffuni 6502cfc83b6cSPedro Giffuni qt_test_include="Qt/qobject.h" 6503cfc83b6cSPedro Giffuni qt_test_library="libQtCore.so" 6504cfc83b6cSPedro Giffuni kde_test_include="ksharedptr.h" 6505cfc83b6cSPedro Giffuni kde_test_library="libkdeui.so" 6506cfc83b6cSPedro Giffuni 6507cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for Qt4 headers]) 6508cfc83b6cSPedro Giffuni qt_header_dir="no" 6509cfc83b6cSPedro Giffuni for inc_dir in $qt_incdirs ; do 6510cfc83b6cSPedro Giffuni if test -r "$inc_dir/$qt_test_include" ; then 6511cfc83b6cSPedro Giffuni qt_header_dir="$inc_dir" 6512cfc83b6cSPedro Giffuni break 6513cfc83b6cSPedro Giffuni fi 6514cfc83b6cSPedro Giffuni done 6515cfc83b6cSPedro Giffuni 6516cfc83b6cSPedro Giffuni AC_MSG_RESULT([$qt_header_dir]) 6517cfc83b6cSPedro Giffuni if test "x$qt_header_dir" = "xno" ; then 6518cfc83b6cSPedro Giffuni AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) 6519cfc83b6cSPedro Giffuni fi 6520cfc83b6cSPedro Giffuni 6521cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for Qt4 libraries]) 6522cfc83b6cSPedro Giffuni qt_lib_dir="no" 6523cfc83b6cSPedro Giffuni for lib_dir in $qt_libdirs ; do 6524cfc83b6cSPedro Giffuni if test -r "$lib_dir/$qt_test_library" ; then 6525cfc83b6cSPedro Giffuni qt_lib_dir="$lib_dir" 6526cfc83b6cSPedro Giffuni break 6527cfc83b6cSPedro Giffuni fi 6528cfc83b6cSPedro Giffuni done 6529cfc83b6cSPedro Giffuni 6530cfc83b6cSPedro Giffuni AC_MSG_RESULT([$qt_lib_dir]) 6531cfc83b6cSPedro Giffuni 6532cfc83b6cSPedro Giffuni if test "x$qt_lib_dir" = "xno" ; then 6533cfc83b6cSPedro Giffuni AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) 6534cfc83b6cSPedro Giffuni fi 6535cfc83b6cSPedro Giffuni 6536cfc83b6cSPedro Giffuni dnl Check for Meta Object Compiler 6537cfc83b6cSPedro Giffuni AC_PATH_PROG( MOCQT4, moc-qt4, no, [$QT4DIR/bin:$PATH] ) 6538cfc83b6cSPedro Giffuni MOC4="$MOCQT4" 6539cfc83b6cSPedro Giffuni if test "$MOC4" = "no" ; then 6540cfc83b6cSPedro Giffuni AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] ) 6541cfc83b6cSPedro Giffuni if test "$MOC4" = "no" ; then 6542cfc83b6cSPedro Giffuni AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT4DIR before running "configure".]) 6543cfc83b6cSPedro Giffuni fi 6544cfc83b6cSPedro Giffuni fi 6545cfc83b6cSPedro Giffuni 6546cfc83b6cSPedro Giffuni dnl Check for KDE4 headers 6547cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for KDE4 headers]) 6548cfc83b6cSPedro Giffuni kde_incdir="no" 6549cfc83b6cSPedro Giffuni for kde_check in $kde_incdirs ; do 6550cfc83b6cSPedro Giffuni if test -r "$kde_check/$kde_test_include" ; then 6551cfc83b6cSPedro Giffuni kde_incdir="$kde_check" 6552cfc83b6cSPedro Giffuni break 6553cfc83b6cSPedro Giffuni fi 6554cfc83b6cSPedro Giffuni done 6555cfc83b6cSPedro Giffuni AC_MSG_RESULT([$kde_incdir]) 6556cfc83b6cSPedro Giffuni if test "x$kde_incdir" = "xno" ; then 6557cfc83b6cSPedro Giffuni AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) 6558cfc83b6cSPedro Giffuni fi 6559cfc83b6cSPedro Giffuni 6560cfc83b6cSPedro Giffuni dnl Check for KDE4 libraries 6561cfc83b6cSPedro Giffuni AC_MSG_CHECKING([for KDE4 libraries]) 6562cfc83b6cSPedro Giffuni kde_libdir="no" 6563cfc83b6cSPedro Giffuni for kde_check in $kde_libdirs ; do 6564cfc83b6cSPedro Giffuni if test -r "$kde_check/$kde_test_library" ; then 6565cfc83b6cSPedro Giffuni kde_libdir="$kde_check" 6566cfc83b6cSPedro Giffuni break 6567cfc83b6cSPedro Giffuni fi 6568cfc83b6cSPedro Giffuni done 6569cfc83b6cSPedro Giffuni 6570cfc83b6cSPedro Giffuni AC_MSG_RESULT([$kde_libdir]) 6571cfc83b6cSPedro Giffuni if test "x$kde_libdir" = "xno" ; then 6572cfc83b6cSPedro Giffuni AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) 6573cfc83b6cSPedro Giffuni fi 6574cfc83b6cSPedro Giffuni 6575cfc83b6cSPedro Giffuni KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" 6576cfc83b6cSPedro Giffuni KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui" 6577cfc83b6cSPedro Giffunifi 6578cfc83b6cSPedro GiffuniAC_SUBST(KDE4_CFLAGS) 6579cfc83b6cSPedro GiffuniAC_SUBST(KDE4_LIBS) 6580cfc83b6cSPedro GiffuniAC_SUBST(MOC4) 6581cfc83b6cSPedro Giffuni 6582cfc83b6cSPedro Giffunidnl =================================================================== 6583cfc83b6cSPedro Giffunidnl Test for the enabling the lockdown pieces 6584cfc83b6cSPedro Giffunidnl =================================================================== 6585cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable the lockdown pieces]) 6586cfc83b6cSPedro GiffuniENABLE_LOCKDOWN="" 6587cfc83b6cSPedro Giffuniif test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then 6588cfc83b6cSPedro Giffuni ENABLE_LOCKDOWN=YES 6589cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6590cfc83b6cSPedro Giffunielse 6591cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6592cfc83b6cSPedro Giffunifi 6593cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_LOCKDOWN) 6594cfc83b6cSPedro Giffuni 6595cfc83b6cSPedro Giffunidnl =================================================================== 6596cfc83b6cSPedro Giffunidnl Test whether to include Evolution 2 support 6597cfc83b6cSPedro Giffunidnl =================================================================== 6598cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable evolution 2 support]) 6599cfc83b6cSPedro Giffuniif test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then 6600cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6601cfc83b6cSPedro Giffuni PKG_CHECK_MODULES(GOBJECT, gobject-2.0) 6602cfc83b6cSPedro Giffuni ENABLE_EVOAB2="TRUE" 6603cfc83b6cSPedro Giffunielse 6604cfc83b6cSPedro Giffuni ENABLE_EVOAB2="" 6605cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6606cfc83b6cSPedro Giffunifi 6607cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_EVOAB2) 6608cfc83b6cSPedro GiffuniAC_SUBST(GOBJECT_CFLAGS) 6609cfc83b6cSPedro GiffuniAC_SUBST(GOBJECT_LIBS) 6610cfc83b6cSPedro Giffuni 6611cfc83b6cSPedro Giffunidnl =================================================================== 6612cfc83b6cSPedro Giffunidnl Test whether to include MathMLDTD 6613cfc83b6cSPedro Giffunidnl =================================================================== 6614cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to include MathMLDTD]) 6615cfc83b6cSPedro Giffuniif test -n "$enable_mathmldtd"; then 6616cfc83b6cSPedro Giffuni if test "$enable_mathmldtd" = "no"; then 6617cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6618cfc83b6cSPedro Giffuni SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" 6619cfc83b6cSPedro Giffuni else 6620cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6621cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE MATHMLDTD" 6622cfc83b6cSPedro Giffuni fi 6623cfc83b6cSPedro Giffunielse 6624cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6625cfc83b6cSPedro Giffuni SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" 6626cfc83b6cSPedro Giffunifi 6627cfc83b6cSPedro Giffuni 6628cfc83b6cSPedro Giffunidnl =================================================================== 6629cfc83b6cSPedro Giffunidnl Test whether to include category-B fonts 6630cfc83b6cSPedro Giffunidnl =================================================================== 6631cfc83b6cSPedro GiffuniWITH_CATB_FONTS= 6632cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to include category B fonts]) 6633cfc83b6cSPedro Giffuniif test "x$enable_category_b_fonts" = "xyes" && test "x$with_fonts" != "xno"; then 6634cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6635cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE CATB_FONTS" 6636cfc83b6cSPedro Giffuni WITH_CATB_FONTS=YES 6637cfc83b6cSPedro Giffuni SCPDEFS="$SCPDEFS -DWITH_CATB_FONTS" 6638cfc83b6cSPedro Giffunielse 6639cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6640cfc83b6cSPedro Giffuni WITH_CATB_FONTS=NO 6641cfc83b6cSPedro Giffunifi 6642cfc83b6cSPedro Giffuni 6643cfc83b6cSPedro Giffunidnl =================================================================== 6644cfc83b6cSPedro Giffunidnl Test whether to include category-A fonts 6645cfc83b6cSPedro Giffunidnl =================================================================== 6646cfc83b6cSPedro GiffuniWITH_CATA_FONTS= 6647cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to include category A fonts]) 6648cfc83b6cSPedro Giffuniif test "x$with_fonts" != "xno" ; then 6649cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6650cfc83b6cSPedro Giffuni WITH_CATA_FONTS=YES 6651cfc83b6cSPedro Giffuni SCPDEFS="$SCPDEFS -DWITH_CATA_FONTS" 6652cfc83b6cSPedro Giffunielse 6653cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6654cfc83b6cSPedro Giffuni WITH_CATA_FONTS=NO 6655cfc83b6cSPedro Giffuni WITH_CATB_FONTS=NO 6656cfc83b6cSPedro Giffunifi 6657cfc83b6cSPedro Giffuni 6658cfc83b6cSPedro GiffuniWITH_FONTS=NO 6659cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether any fonts are included]) 6660cfc83b6cSPedro Giffuniif test "x$WITH_CATA_FONTS" = "xYES" -o "x$WITH_CATB_FONTS" = "xYES"; then 6661cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE MORE_FONTS" 6662cfc83b6cSPedro Giffuni WITH_FONTS=YES 6663cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6664cfc83b6cSPedro Giffunielse 6665cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6666cfc83b6cSPedro Giffunifi 6667cfc83b6cSPedro Giffuni 6668cfc83b6cSPedro GiffuniAC_SUBST(WITH_CATA_FONTS) 6669cfc83b6cSPedro GiffuniAC_SUBST(WITH_CATB_FONTS) 6670cfc83b6cSPedro GiffuniAC_SUBST(WITH_FONTS) 6671cfc83b6cSPedro Giffuni 6672cfc83b6cSPedro Giffunidnl =================================================================== 6673cfc83b6cSPedro Giffunidnl Test whether to include ppds 6674cfc83b6cSPedro Giffunidnl =================================================================== 6675cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to include PPDs]) 6676cfc83b6cSPedro Giffuniif test "$with_ppds" != "no"; then 6677cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6678cfc83b6cSPedro Giffunielse 6679cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6680cfc83b6cSPedro Giffuni WITHOUT_PPDS=YES 6681cfc83b6cSPedro Giffuni SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" 6682cfc83b6cSPedro Giffunifi 6683cfc83b6cSPedro GiffuniAC_SUBST(WITHOUT_PPDS) 6684cfc83b6cSPedro Giffuni 6685cfc83b6cSPedro Giffunidnl =================================================================== 6686cfc83b6cSPedro Giffunidnl Test whether to include afms 6687cfc83b6cSPedro Giffunidnl =================================================================== 6688cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to include AFMs]) 6689cfc83b6cSPedro Giffuniif test "$with_afms" != "no"; then 6690cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6691cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE AFMS" 6692cfc83b6cSPedro Giffunielse 6693cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6694cfc83b6cSPedro Giffuni WITHOUT_AFMS=YES 6695cfc83b6cSPedro Giffuni SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" 6696cfc83b6cSPedro Giffunifi 6697cfc83b6cSPedro GiffuniAC_SUBST(WITHOUT_AFMS) 6698cfc83b6cSPedro Giffuni 6699cfc83b6cSPedro GiffuniAC_SUBST(SCPDEFS) 6700cfc83b6cSPedro Giffuni 6701cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether and how to use Xinerama]) 6702cfc83b6cSPedro Giffuniif test "$_os" = "Darwin"; then 6703cfc83b6cSPedro Giffuni USE_XINERAMA=YES 6704cfc83b6cSPedro Giffuni XINERAMA_LINK=dynamic 6705cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6706cfc83b6cSPedro Giffunielif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then 6707cfc83b6cSPedro Giffuni if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then 6708cfc83b6cSPedro Giffuni # we have both versions, let the user decide but use the dynamic one 6709cfc83b6cSPedro Giffuni # per default 6710cfc83b6cSPedro Giffuni USE_XINERAMA=YES 6711cfc83b6cSPedro Giffuni if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then 6712cfc83b6cSPedro Giffuni XINERAMA_LINK=dynamic 6713cfc83b6cSPedro Giffuni else 6714cfc83b6cSPedro Giffuni XINERAMA_LINK=static 6715cfc83b6cSPedro Giffuni fi 6716cfc83b6cSPedro Giffuni elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then 6717cfc83b6cSPedro Giffuni # we have only the dynamic version 6718cfc83b6cSPedro Giffuni USE_XINERAMA=YES 6719cfc83b6cSPedro Giffuni XINERAMA_LINK=dynamic 6720cfc83b6cSPedro Giffuni elif test -e "$XLIB/libXinerama.a"; then 6721cfc83b6cSPedro Giffuni # static version 672228633775SPedro Giffuni if echo $build_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then 6723cfc83b6cSPedro Giffuni USE_XINERAMA=YES 6724cfc83b6cSPedro Giffuni XINERAMA_LINK=static 6725cfc83b6cSPedro Giffuni else 6726cfc83b6cSPedro Giffuni USE_XINERAMA=NO 6727cfc83b6cSPedro Giffuni XINERAMA_LINK=none 6728cfc83b6cSPedro Giffuni fi 6729cfc83b6cSPedro Giffuni else 6730cfc83b6cSPedro Giffuni # no Xinerama 6731cfc83b6cSPedro Giffuni USE_XINERAMA=NO 6732cfc83b6cSPedro Giffuni XINERAMA_LINK=none 6733cfc83b6cSPedro Giffuni fi 6734cfc83b6cSPedro Giffuni if test "$USE_XINERAMA" = "YES"; then 6735cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, with $XINERAMA_LINK linking]) 6736cfc83b6cSPedro Giffuni AC_CHECK_HEADER(X11/extensions/Xinerama.h, [], 6737cfc83b6cSPedro Giffuni [AC_MSG_ERROR(Xinerama header not found.)], []) 6738cfc83b6cSPedro Giffuni XINERAMA_EXTRA_LIBS="-L$XLIB -lXext" 6739cfc83b6cSPedro Giffuni if test "$_os" = "FreeBSD"; then 6740cfc83b6cSPedro Giffuni XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt" 6741cfc83b6cSPedro Giffuni fi 6742cfc83b6cSPedro Giffuni if test "$_os" = "Linux"; then 6743cfc83b6cSPedro Giffuni XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" 6744cfc83b6cSPedro Giffuni fi 6745cfc83b6cSPedro Giffuni AC_CHECK_LIB(Xinerama, XineramaIsActive, [], 6746cfc83b6cSPedro Giffuni [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS]) 6747cfc83b6cSPedro Giffuni else 6748cfc83b6cSPedro Giffuni AC_MSG_RESULT([no, libXinerama not found or wrong architecture.]) 6749cfc83b6cSPedro Giffuni fi 6750cfc83b6cSPedro Giffunielse 6751cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6752cfc83b6cSPedro Giffunifi 6753cfc83b6cSPedro GiffuniAC_SUBST(USE_XINERAMA) 6754cfc83b6cSPedro GiffuniAC_SUBST(XINERAMA_LINK) 6755cfc83b6cSPedro Giffuni 6756cfc83b6cSPedro Giffunidnl =================================================================== 6757cfc83b6cSPedro Giffunidnl always rely on the system version of gdk-pixbuf 6758cfc83b6cSPedro Giffunidnl =================================================================== 6759cfc83b6cSPedro Giffuni 6760cfc83b6cSPedro GiffuniSYSTEM_GDKPIXBUF=YES 6761cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_GDKPIXBUF) 6762cfc83b6cSPedro Giffuni 6763cfc83b6cSPedro Giffunidnl =================================================================== 6764cfc83b6cSPedro Giffunidnl always rely on the system version of glib 6765cfc83b6cSPedro Giffunidnl =================================================================== 6766cfc83b6cSPedro Giffuni 6767cfc83b6cSPedro GiffuniSYSTEM_GLIB=YES 6768cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_GLIB) 6769cfc83b6cSPedro Giffuni 6770cfc83b6cSPedro Giffunidnl =================================================================== 6771cfc83b6cSPedro Giffunidnl always rely on the system version of gettext 6772cfc83b6cSPedro Giffunidnl =================================================================== 6773cfc83b6cSPedro Giffuni 6774cfc83b6cSPedro GiffuniSYSTEM_GETTEXT=YES 6775cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_GETTEXT) 6776cfc83b6cSPedro Giffuni 6777cfc83b6cSPedro Giffuniif test "$_os" = "FreeBSD"; then 6778cfc83b6cSPedro Giffuni LIBINTL_PREFIX= 6779cfc83b6cSPedro Giffuni for dir in $CPPFLAGS; do 6780cfc83b6cSPedro Giffuni if dir=`expr -- $dir : '-I\(.*\)'`; then 6781cfc83b6cSPedro Giffuni if test -f "$dir/libintl.h" ; then 6782cfc83b6cSPedro Giffuni LIBINTL_PREFIX=`dirname $dir` 6783cfc83b6cSPedro Giffuni fi 6784cfc83b6cSPedro Giffuni fi 6785cfc83b6cSPedro Giffuni done 6786cfc83b6cSPedro Giffuni AC_SUBST(LIBINTL_PREFIX) 6787cfc83b6cSPedro Giffunifi 6788cfc83b6cSPedro Giffuni 6789cfc83b6cSPedro Giffunidnl =================================================================== 6790cfc83b6cSPedro Giffunidnl always rely on the system version of pango 6791cfc83b6cSPedro Giffunidnl =================================================================== 6792cfc83b6cSPedro Giffuni 6793cfc83b6cSPedro GiffuniSYSTEM_PANGO=YES 6794cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_PANGO) 6795cfc83b6cSPedro Giffuni 6796cfc83b6cSPedro Giffunidnl =================================================================== 6797cfc83b6cSPedro Giffunidnl Test whether to build libpng or rely on the system version 6798cfc83b6cSPedro Giffunidnl =================================================================== 6799cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build own version of libpng]) 6800cfc83b6cSPedro Giffuni 6801cfc83b6cSPedro Giffunicase "$_os" in 6802cfc83b6cSPedro Giffuni WINNT*) # Windows 6803cfc83b6cSPedro Giffuni SYSTEM_LIBPNG=NO 6804cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6805cfc83b6cSPedro Giffuni ;; 6806cfc83b6cSPedro Giffuni Darwin*) 6807cfc83b6cSPedro Giffuni SYSTEM_LIBPNG=NO 6808cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6809cfc83b6cSPedro Giffuni ;; 6810cfc83b6cSPedro Giffuni *) 6811cfc83b6cSPedro Giffuni SYSTEM_LIBPNG=YES 6812cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6813cfc83b6cSPedro Giffuni ;; 6814cfc83b6cSPedro Giffuniesac 6815cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_LIBPNG) 6816cfc83b6cSPedro Giffuni 6817cfc83b6cSPedro Giffunidnl =================================================================== 6818cfc83b6cSPedro Giffunidnl Test whether to build libjpeg or rely on the system version 6819cfc83b6cSPedro Giffunidnl =================================================================== 6820cfc83b6cSPedro Giffunidnl FIXME: this is currently because we have jpeg-6b for our filters 6821cfc83b6cSPedro Giffunidnl and jpeg-8 as dependency for librsvg 6822cfc83b6cSPedro Giffunidnl this should be unified into using only one version for both 6823cfc83b6cSPedro Giffuni 6824cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to build own version of libjpeg]) 6825cfc83b6cSPedro Giffuni 6826cfc83b6cSPedro Giffuniif test "$SYSTEM_JPEG" = "YES"; then 6827cfc83b6cSPedro GiffuniSYSTEM_LIBJPEG=YES 6828cfc83b6cSPedro Giffunielse 6829cfc83b6cSPedro Giffunicase "$_os" in 6830cfc83b6cSPedro Giffuni WINNT*) # Windows 6831cfc83b6cSPedro Giffuni SYSTEM_LIBJPEG=NO 6832cfc83b6cSPedro Giffuni ;; 6833cfc83b6cSPedro Giffuni Darwin*) 6834cfc83b6cSPedro Giffuni SYSTEM_LIBJPEG=NO 6835cfc83b6cSPedro Giffuni ;; 6836cfc83b6cSPedro Giffuni *) 6837cfc83b6cSPedro Giffuni SYSTEM_LIBJPEG=YES 6838cfc83b6cSPedro Giffuni ;; 6839cfc83b6cSPedro Giffuniesac 6840cfc83b6cSPedro Giffunifi 6841cfc83b6cSPedro Giffuni 6842cfc83b6cSPedro Giffuniif test "$SYSTEM_LIBJPEG" = "YES"; then 6843cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6844cfc83b6cSPedro Giffunielse 6845cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 6846cfc83b6cSPedro Giffunifi 6847cfc83b6cSPedro GiffuniAC_SUBST(SYSTEM_LIBJPEG) 6848cfc83b6cSPedro Giffuni 6849cfc83b6cSPedro Giffunidnl =================================================================== 6850cfc83b6cSPedro Giffunidnl Test whether rat scan was requested and whether apache-rat is available 6851cfc83b6cSPedro Giffunidnl =================================================================== 6852cfc83b6cSPedro GiffuniRAT_JAR= 6853cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to trigger rat scan]) 6854cfc83b6cSPedro Giffuniif test -z "$with_rat_scan" -o "$with_rat_scan" = "no"; then 6855cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 6856cfc83b6cSPedro Giffunielse 6857cfc83b6cSPedro Giffuni if test "$WITH_JAVA" = "no"; then 6858cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, java disabled, enable with --with-java]) 6859cfc83b6cSPedro Giffuni elif test "$enable_saxon" = "no"; then 6860cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, saxon disabled, enable with --enable-category-b]) 6861cfc83b6cSPedro Giffuni elif test "$with_rat_scan" = "yes"; then 6862cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, use pre-built library]) 6863cfc83b6cSPedro Giffuni RAT_JAR_HOME="BUILD" 6864cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE RAT" 6865cfc83b6cSPedro Giffuni else 6866cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, use pre-installed library]) 6867cfc83b6cSPedro Giffuni AC_MSG_CHECKING([whether apache-rat is available]) 6868cfc83b6cSPedro Giffuni if test -d "$with_rat_scan"; then 6869cfc83b6cSPedro Giffuni RAT_JAR_HOME=$with_rat_scan 6870cfc83b6cSPedro Giffuni else 6871cfc83b6cSPedro Giffuni AC_MSG_ERROR([$with_rat_scan is not a directory]) 6872cfc83b6cSPedro Giffuni fi 6873cfc83b6cSPedro Giffuni fi 6874cfc83b6cSPedro Giffunifi 6875cfc83b6cSPedro GiffuniAC_SUBST(RAT_JAR_HOME) 6876cfc83b6cSPedro Giffuni 6877cfc83b6cSPedro Giffuni 6878cfc83b6cSPedro Giffunidnl =================================================================== 6879cfc83b6cSPedro Giffunidnl Test for the presence of Ant and that it works 6880cfc83b6cSPedro Giffunidnl =================================================================== 6881cfc83b6cSPedro Giffuni 6882cfc83b6cSPedro Giffuniif test "$SOLAR_JAVA" != ""; then 6883cfc83b6cSPedro GiffuniANT_HOME=; export ANT_HOME 6884cfc83b6cSPedro GiffuniWITH_ANT_HOME=; export WITH_ANT_HOME 6885cfc83b6cSPedro Giffuniif test -z "$with_ant_home"; then 6886cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 6887cfc83b6cSPedro Giffuni AC_PATH_PROGS(ANT, ant.cmd) 6888cfc83b6cSPedro Giffuni else 6889cfc83b6cSPedro Giffuni AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd]) 6890cfc83b6cSPedro Giffuni fi 6891cfc83b6cSPedro Giffunielse 6892cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 6893cfc83b6cSPedro Giffuni with_ant_home=`cygpath -u "$with_ant_home"` 6894cfc83b6cSPedro Giffuni fi 6895cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 6896cfc83b6cSPedro Giffuni AC_PATH_PROGS(ANT, ant.cmd,,$with_ant_home/bin:$PATH) 6897cfc83b6cSPedro Giffuni else 6898cfc83b6cSPedro Giffuni AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH) 6899cfc83b6cSPedro Giffuni fi 6900cfc83b6cSPedro Giffuni WITH_ANT_HOME=$with_ant_home 6901cfc83b6cSPedro Giffuni ANT_HOME=$with_ant_home 6902cfc83b6cSPedro Giffunifi 6903cfc83b6cSPedro Giffuni 6904cfc83b6cSPedro Giffuniif test -z "$ANT"; then 6905cfc83b6cSPedro Giffuni AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home]) 6906cfc83b6cSPedro Giffunielse 6907cfc83b6cSPedro Giffuni # resolve relative or absolute symlink 6908cfc83b6cSPedro Giffuni while test -h "$ANT"; do 6909cfc83b6cSPedro Giffuni a_cwd=`pwd` 6910cfc83b6cSPedro Giffuni a_basename=`basename "$ANT"` 6911cfc83b6cSPedro Giffuni a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"` 6912cfc83b6cSPedro Giffuni cd "`dirname "$ANT"`" 6913cfc83b6cSPedro Giffuni cd "`dirname "$a_script"`" 6914cfc83b6cSPedro Giffuni ANT="`pwd`"/"`basename "$a_script"`" 6915cfc83b6cSPedro Giffuni cd "$a_cwd" 6916cfc83b6cSPedro Giffuni done 6917cfc83b6cSPedro Giffuni 6918cfc83b6cSPedro Giffuni if test "$_os" = "OS2"; then 6919cfc83b6cSPedro Giffuni ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` 6920cfc83b6cSPedro Giffuni export ANT_HOME 6921cfc83b6cSPedro Giffuni fi 6922cfc83b6cSPedro Giffuni 6923cfc83b6cSPedro Giffuni AC_MSG_CHECKING([if $ANT works]) 6924cfc83b6cSPedro Giffunicat > conftest.java << EOF 6925cfc83b6cSPedro Giffuni public class conftest { 6926cfc83b6cSPedro Giffuni int testmethod(int a, int b) { 6927cfc83b6cSPedro Giffuni return a + b; 6928cfc83b6cSPedro Giffuni } 6929cfc83b6cSPedro Giffuni } 6930cfc83b6cSPedro GiffuniEOF 6931cfc83b6cSPedro Giffuni 6932cfc83b6cSPedro Giffunicat > conftest.xml << EOF 6933cfc83b6cSPedro Giffuni <project name="conftest" default="conftest"> 6934cfc83b6cSPedro Giffuni <target name="conftest"> 6935cfc83b6cSPedro Giffuni <javac srcdir="." includes="conftest.java"> 6936cfc83b6cSPedro Giffuni </javac> 6937cfc83b6cSPedro Giffuni </target> 6938cfc83b6cSPedro Giffuni </project> 6939cfc83b6cSPedro GiffuniEOF 6940cfc83b6cSPedro Giffuni oldJAVA_HOME=$JAVA_HOME 6941cfc83b6cSPedro Giffuni if test "$JAVACISGCJ" = "yes"; then 6942cfc83b6cSPedro Giffuni JAVA_HOME=; export JAVA_HOME 6943cfc83b6cSPedro Giffuni ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" 6944cfc83b6cSPedro Giffuni else 6945cfc83b6cSPedro Giffuni ant_cmd="$ANT -buildfile conftest.xml 1>&2" 6946cfc83b6cSPedro Giffuni fi 6947cfc83b6cSPedro Giffuni AC_TRY_EVAL(ant_cmd) 6948cfc83b6cSPedro Giffuni if test $? = 0 && test -f ./conftest.class ; then 6949cfc83b6cSPedro Giffuni AC_MSG_RESULT([Ant works]) 6950cfc83b6cSPedro Giffuni if test -z "$WITH_ANT_HOME"; then 6951cfc83b6cSPedro Giffuni ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` 6952cfc83b6cSPedro Giffuni if test -z "$ANT_HOME"; then 6953cfc83b6cSPedro Giffuni ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` 6954cfc83b6cSPedro Giffuni fi 6955cfc83b6cSPedro Giffuni else 6956cfc83b6cSPedro Giffuni ANT_HOME="$WITH_ANT_HOME" 6957cfc83b6cSPedro Giffuni fi 6958cfc83b6cSPedro Giffuni else 6959cfc83b6cSPedro Giffuni echo "configure: Ant test failed" >&5 6960cfc83b6cSPedro Giffuni cat conftest.java >&5 6961cfc83b6cSPedro Giffuni cat conftest.xml >&5 6962cfc83b6cSPedro Giffuni AC_MSG_WARN([Ant does not work - Some Java projects will not build!]) 6963cfc83b6cSPedro Giffuni ANT_HOME="" 6964cfc83b6cSPedro Giffuni echo "Ant does not work - Some Java projects will not build!" >>warn 6965cfc83b6cSPedro Giffuni fi 6966cfc83b6cSPedro Giffuni JAVA_HOME=$oldJAVA_HOME 6967cfc83b6cSPedro Giffuni rm -f conftest* core core.* *.core 6968cfc83b6cSPedro Giffunifi 6969cfc83b6cSPedro Giffuniif test -z "$ANT_HOME"; then 6970cfc83b6cSPedro Giffuni ANT_HOME="NO_ANT_HOME" 6971cfc83b6cSPedro Giffunifi 6972cfc83b6cSPedro GiffuniAC_SUBST(ANT_HOME) 6973cfc83b6cSPedro Giffuni 6974cfc83b6cSPedro Giffunidnl Checking for ant.jar 6975cfc83b6cSPedro Giffuniif test "$ANT_HOME" != "NO_ANT_HOME"; then 6976cfc83b6cSPedro Giffuni AC_MSG_CHECKING([Ant lib directory]) 6977cfc83b6cSPedro Giffuni if test -f $ANT_HOME/lib/ant.jar; then 6978cfc83b6cSPedro Giffuni ANT_LIB="$ANT_HOME/lib" 6979cfc83b6cSPedro Giffuni else 6980cfc83b6cSPedro Giffuni if test -f $ANT_HOME/ant.jar; then 6981cfc83b6cSPedro Giffuni ANT_LIB="$ANT_HOME" 6982cfc83b6cSPedro Giffuni else 6983cfc83b6cSPedro Giffuni if test -f /usr/share/java/ant.jar; then 6984cfc83b6cSPedro Giffuni ANT_LIB=/usr/share/java 6985cfc83b6cSPedro Giffuni else 6986cfc83b6cSPedro Giffuni if test -f /usr/share/ant-core/lib/ant.jar; then 6987cfc83b6cSPedro Giffuni ANT_LIB=/usr/share/ant-core/lib 6988cfc83b6cSPedro Giffuni else 6989cfc83b6cSPedro Giffuni if test -f $ANT_HOME/lib/ant/ant.jar; then 6990cfc83b6cSPedro Giffuni ANT_LIB="$ANT_HOME/lib/ant" 6991cfc83b6cSPedro Giffuni else 6992cfc83b6cSPedro Giffuni if test -f /usr/share/lib/ant/ant.jar; then 6993cfc83b6cSPedro Giffuni ANT_LIB=/usr/share/lib/ant 6994cfc83b6cSPedro Giffuni else 6995cfc83b6cSPedro Giffuni AC_MSG_ERROR([Ant libraries not found!]) 6996cfc83b6cSPedro Giffuni fi 6997cfc83b6cSPedro Giffuni fi 6998cfc83b6cSPedro Giffuni fi 6999cfc83b6cSPedro Giffuni fi 7000cfc83b6cSPedro Giffuni fi 7001cfc83b6cSPedro Giffuni fi 7002cfc83b6cSPedro Giffuni AC_MSG_RESULT([Ant lib directory found.]) 7003cfc83b6cSPedro Giffunifi 7004cfc83b6cSPedro GiffuniAC_SUBST(ANT_LIB) 7005cfc83b6cSPedro Giffunifi 7006cfc83b6cSPedro Giffuni 7007cfc83b6cSPedro Giffuniant_minver=1.6.0 7008cfc83b6cSPedro Giffuni# update for more extensions... 7009cfc83b6cSPedro Giffuniif test "$ENABLE_MEDIAWIKI" = "YES"; then 7010cfc83b6cSPedro Giffuni ant_minver=1.7.0 7011cfc83b6cSPedro Giffunifi 7012cfc83b6cSPedro Giffuniant_minminor1=`echo $ant_minver | cut -d"." -f2` 7013cfc83b6cSPedro Giffuni 7014cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether ant is >= $ant_minver]) 7015cfc83b6cSPedro Giffuniant_version=`$ANT -version | $AWK '{ print $4; }'` 7016cfc83b6cSPedro Giffuniant_version_major=`echo $ant_version | cut -d. -f1` 7017cfc83b6cSPedro Giffuniant_version_minor=`echo $ant_version | cut -d. -f2` 7018cfc83b6cSPedro Giffuniecho "configure: ant_version $ant_version " >&5 7019cfc83b6cSPedro Giffuniecho "configure: ant_version_major $ant_version_major " >&5 7020cfc83b6cSPedro Giffuniecho "configure: ant_version_minor $ant_version_minor " >&5 7021cfc83b6cSPedro Giffuniif test "$ant_version_major" -ge "2"; then 7022cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, $ant_version]) 7023cfc83b6cSPedro Giffunielif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then 7024cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes, $ant_version]) 7025cfc83b6cSPedro Giffunielse 7026cfc83b6cSPedro Giffuni AC_MSG_ERROR([no, you need at least ant >= $ant_minver]) 7027cfc83b6cSPedro Giffunifi 7028cfc83b6cSPedro Giffuni 7029cfc83b6cSPedro Giffuniif test "$ENABLE_MEDIAWIKI" = "YES"; then 7030cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether ant supports mapper type="regexp"]) 7031cfc83b6cSPedro Giffunirm -rf confdir 7032cfc83b6cSPedro Giffunimkdir confdir 7033cfc83b6cSPedro Giffunicat > conftest.java << EOF 7034cfc83b6cSPedro Giffuni public class conftest { 7035cfc83b6cSPedro Giffuni int testmethod(int a, int b) { 7036cfc83b6cSPedro Giffuni return a + b; 7037cfc83b6cSPedro Giffuni } 7038cfc83b6cSPedro Giffuni } 7039cfc83b6cSPedro GiffuniEOF 7040cfc83b6cSPedro Giffuni 7041cfc83b6cSPedro Giffunicat > conftest.xml << EOF 7042cfc83b6cSPedro Giffuni <project name="conftest" default="conftest"> 7043cfc83b6cSPedro Giffuni <target name="conftest" depends="copytest"> 7044cfc83b6cSPedro Giffuni <javac srcdir="." includes="conftest.java"> 7045cfc83b6cSPedro Giffuni </javac> 7046cfc83b6cSPedro Giffuni </target> 7047cfc83b6cSPedro Giffuni <target name="copytest"> 7048cfc83b6cSPedro Giffuni <copy todir="confdir"> 7049cfc83b6cSPedro Giffuni <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/> 7050cfc83b6cSPedro Giffuni <filterset/> 7051cfc83b6cSPedro Giffuni <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/> 7052cfc83b6cSPedro Giffuni </copy> 7053cfc83b6cSPedro Giffuni </target> 7054cfc83b6cSPedro Giffuni </project> 7055cfc83b6cSPedro GiffuniEOF 7056cfc83b6cSPedro Giffuni if test "$JAVACISGCJ" = "yes"; then 7057cfc83b6cSPedro Giffuni JAVA_HOME=; export JAVA_HOME 7058cfc83b6cSPedro Giffuni ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" 7059cfc83b6cSPedro Giffuni else 7060cfc83b6cSPedro Giffuni ant_cmd="$ANT -buildfile conftest.xml 1>&2" 7061cfc83b6cSPedro Giffuni fi 7062cfc83b6cSPedro Giffuni AC_TRY_EVAL(ant_cmd) 7063cfc83b6cSPedro Giffuni if test $? = 0 && test -f ./conftest.class ; then 7064cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 7065cfc83b6cSPedro Giffuni rm -rf confdir 7066cfc83b6cSPedro Giffuni else 7067cfc83b6cSPedro Giffuni echo "configure: Ant test failed" >&5 7068cfc83b6cSPedro Giffuni cat conftest.java >&5 7069cfc83b6cSPedro Giffuni cat conftest.xml >&5 7070cfc83b6cSPedro Giffuni rm -rf confdir 7071cfc83b6cSPedro Giffuni AC_MSG_ERROR([no. Did you install ant-apache-regexp?]) 7072cfc83b6cSPedro Giffuni fi 7073cfc83b6cSPedro Giffunifi 7074cfc83b6cSPedro Giffunirm -f conftest* core core.* *.core 7075cfc83b6cSPedro Giffuni 7076cfc83b6cSPedro GiffuniOOO_JUNIT_JAR= 7077f0157b90Skschenkif test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then 7078f0157b90Skschenk AC_MSG_CHECKING([for JUnit 4]) 7079cfc83b6cSPedro Giffuni if test "$with_junit" = "yes"; then 7080cfc83b6cSPedro Giffuni if test -e /usr/share/java/junit4.jar; then 7081cfc83b6cSPedro Giffuni OOO_JUNIT_JAR=/usr/share/java/junit4.jar 7082cfc83b6cSPedro Giffuni else 7083cfc83b6cSPedro Giffuni if test -e /usr/share/lib/java/junit.jar; then 7084cfc83b6cSPedro Giffuni OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar 7085cfc83b6cSPedro Giffuni else 7086cfc83b6cSPedro Giffuni OOO_JUNIT_JAR=/usr/share/java/junit.jar 7087cfc83b6cSPedro Giffuni fi 7088cfc83b6cSPedro Giffuni fi 7089cfc83b6cSPedro Giffuni else 7090cfc83b6cSPedro Giffuni OOO_JUNIT_JAR=$with_junit 7091cfc83b6cSPedro Giffuni fi 7092cfc83b6cSPedro Giffuni if test "$_os" = "WINNT"; then 7093cfc83b6cSPedro Giffuni OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"` 7094cfc83b6cSPedro Giffuni fi 7095f0157b90Skschenk "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \ 7096f0157b90Skschenk $GREP org/junit/Before.class > /dev/null 2>&5 7097f0157b90Skschenk if test $? -eq 0; then 7098cfc83b6cSPedro Giffuni AC_MSG_RESULT([$OOO_JUNIT_JAR]) 7099cfc83b6cSPedro Giffuni else 7100cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 7101f0157b90Skschenk AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default 7102f0157b90Skschenklocation (/usr/share/java), specify its pathname via 7103f0157b90Skschenk--with-junit=..., or disable it via --without-junit]) 7104cfc83b6cSPedro Giffuni fi 7105cfc83b6cSPedro Giffunifi 7106cfc83b6cSPedro GiffuniAC_SUBST(OOO_JUNIT_JAR) 7107cfc83b6cSPedro Giffuni 7108947c15fcSDamjan JovanovicHAMCREST_CORE_JAR= 7109947c15fcSDamjan Jovanovicif test "$SOLAR_JAVA" != "" && test "$with_junit" != "no" && test "$with_hamcrest_core" != "no"; then 7110947c15fcSDamjan Jovanovic AC_MSG_CHECKING([for hamcrest-core]) 7111947c15fcSDamjan Jovanovic if test "$with_hamcrest_core" = "yes"; then 7112947c15fcSDamjan Jovanovic if test -e /usr/share/java/hamcrest-core-1.3.jar; then 7113947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core-1.3.jar 7114947c15fcSDamjan Jovanovic else 7115947c15fcSDamjan Jovanovic if test -e /usr/share/lib/java/hamcrest-core.jar; then 7116947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=/usr/share/lib/java/hamcrest-core.jar 7117947c15fcSDamjan Jovanovic else 7118947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core.jar 7119947c15fcSDamjan Jovanovic fi 7120947c15fcSDamjan Jovanovic fi 7121947c15fcSDamjan Jovanovic else 7122947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=$with_hamcrest_core 7123947c15fcSDamjan Jovanovic fi 7124947c15fcSDamjan Jovanovic if test "$_os" = "WINNT"; then 7125947c15fcSDamjan Jovanovic HAMCREST_CORE_JAR=`cygpath -m "$HAMCREST_CORE_JAR"` 7126947c15fcSDamjan Jovanovic fi 7127947c15fcSDamjan Jovanovic export HAMCREST_CORE_JAR 7128947c15fcSDamjan Jovanovic "$JAVA_HOME/bin/jar" tf "$HAMCREST_CORE_JAR" 2>&5 | \ 7129947c15fcSDamjan Jovanovic $GREP org/hamcrest/core/AllOf.class > /dev/null 2>&5 7130947c15fcSDamjan Jovanovic if test $? -eq 0; then 713198e4ac81SDamjan Jovanovic AC_MSG_RESULT([$HAMCREST_CORE_JAR]) 7132947c15fcSDamjan Jovanovic else 7133947c15fcSDamjan Jovanovic AC_MSG_ERROR([cannot find hamcrest-core jar; please install one in the 7134947c15fcSDamjan Jovanovicdefault location (/usr/share/java), specify its 7135947c15fcSDamjan Jovanovicpathname via --with-hamcrest-core=..., or disable 7136947c15fcSDamjan Jovanovicit via --without-hamcrest-core]) 7137947c15fcSDamjan Jovanovic fi 7138947c15fcSDamjan Jovanovicfi 7139947c15fcSDamjan JovanovicAC_SUBST(HAMCREST_CORE_JAR) 7140947c15fcSDamjan Jovanovic 7141cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which languages to be built]) 7142cfc83b6cSPedro GiffuniWITH_LANG="$with_lang" 7143cfc83b6cSPedro Giffuniif test -z "$WITH_LANG"; then 7144cfc83b6cSPedro Giffuni AC_MSG_RESULT([en-US]) 7145cfc83b6cSPedro Giffunielse 7146cfc83b6cSPedro Giffuni AC_MSG_RESULT([$WITH_LANG]) 7147cfc83b6cSPedro Giffuni ADDITIONAL_REPOSITORIES="$ADDITIONAL_REPOSITORIES ../extras" 7148cfc83b6cSPedro Giffuni BUILD_TYPE="$BUILD_TYPE L10N" 7149cfc83b6cSPedro Giffunifi 7150cfc83b6cSPedro GiffuniAC_SUBST(WITH_LANG) 7151cfc83b6cSPedro Giffuni 7152cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which languages have poor help localizations]) 7153cfc83b6cSPedro GiffuniWITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations" 7154cfc83b6cSPedro Giffuniif test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then 7155cfc83b6cSPedro Giffuni AC_MSG_RESULT([none]) 7156cfc83b6cSPedro Giffunielse 7157cfc83b6cSPedro Giffuni AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS]) 7158cfc83b6cSPedro Giffunifi 7159cfc83b6cSPedro GiffuniAC_SUBST(WITH_POOR_HELP_LOCALIZATIONS) 7160cfc83b6cSPedro Giffuni 7161cfc83b6cSPedro GiffuniAC_MSG_CHECKING([which dictionaries to include]) 7162cfc83b6cSPedro Giffuniif test -z "$with_dict"; then 7163cfc83b6cSPedro Giffuni WITH_DICT=,ALL, 7164cfc83b6cSPedro Giffuni AC_MSG_RESULT([ALL]) 7165cfc83b6cSPedro Giffunielse 7166cfc83b6cSPedro Giffuni WITH_DICT=","$with_dict"," 7167cfc83b6cSPedro Giffuni AC_MSG_RESULT([$with_dict]) 7168cfc83b6cSPedro Giffunifi 7169cfc83b6cSPedro GiffuniAC_SUBST(WITH_DICT) 7170cfc83b6cSPedro Giffuni 7171cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for additional 'intro' bitmaps]) 7172cfc83b6cSPedro GiffuniINTRO_BITMAPS= 7173cfc83b6cSPedro Giffuniif test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then 7174cfc83b6cSPedro Giffuni INTRO_BITMAPS= 7175cfc83b6cSPedro Giffuni AC_MSG_RESULT([none]) 7176cfc83b6cSPedro Giffunielse 7177cfc83b6cSPedro Giffuni for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do 7178cfc83b6cSPedro Giffuni case "$bitmap" in 7179cfc83b6cSPedro Giffuni *.bmp) ;; 7180cfc83b6cSPedro Giffuni *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;; 7181cfc83b6cSPedro Giffuni esac 7182cfc83b6cSPedro Giffuni if test -n "$bitmap" ; then 7183cfc83b6cSPedro Giffuni INTRO_BITMAPS="$INTRO_BITMAPS $bitmap" 7184cfc83b6cSPedro Giffuni fi 7185cfc83b6cSPedro Giffuni done 7186cfc83b6cSPedro Giffuni AC_MSG_RESULT([$INTRO_BITMAPS]) 7187cfc83b6cSPedro Giffunifi 7188cfc83b6cSPedro GiffuniAC_SUBST(INTRO_BITMAPS) 7189cfc83b6cSPedro Giffuni 7190cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for additional 'about' bitmaps]) 7191cfc83b6cSPedro GiffuniABOUT_BITMAPS= 7192cfc83b6cSPedro Giffuniif test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then 7193cfc83b6cSPedro Giffuni ABOUT_BITMAPS= 7194cfc83b6cSPedro Giffuni AC_MSG_RESULT([none]) 7195cfc83b6cSPedro Giffunielse 7196cfc83b6cSPedro Giffuni for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do 7197cfc83b6cSPedro Giffuni case "$bitmap" in 7198cfc83b6cSPedro Giffuni *.bmp) ;; 7199cfc83b6cSPedro Giffuni *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;; 7200cfc83b6cSPedro Giffuni esac 7201cfc83b6cSPedro Giffuni if test -n "$bitmap" ; then 7202cfc83b6cSPedro Giffuni ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap" 7203cfc83b6cSPedro Giffuni fi 7204cfc83b6cSPedro Giffuni done 7205cfc83b6cSPedro Giffuni AC_MSG_RESULT([$ABOUT_BITMAPS]) 7206cfc83b6cSPedro Giffunifi 7207cfc83b6cSPedro GiffuniAC_SUBST(ABOUT_BITMAPS) 7208cfc83b6cSPedro Giffuni 7209cfc83b6cSPedro GiffuniOOO_VENDOR= 7210cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for vendor]) 7211cfc83b6cSPedro Giffuniif test -z "$with_vendor" -o "$with_vendor" = "no" ; then 7212cfc83b6cSPedro Giffuni AC_MSG_RESULT([not set]) 7213cfc83b6cSPedro Giffunielse 7214cfc83b6cSPedro Giffuni OOO_VENDOR="$with_vendor" 7215cfc83b6cSPedro Giffuni AC_MSG_RESULT([$OOO_VENDOR]) 7216cfc83b6cSPedro Giffunifi 7217cfc83b6cSPedro GiffuniAC_SUBST(OOO_VENDOR) 7218cfc83b6cSPedro Giffuni 7219cfc83b6cSPedro GiffuniUNIXWRAPPERNAME= 7220cfc83b6cSPedro GiffuniAC_MSG_CHECKING([for UNIX wrapper name]) 7221cfc83b6cSPedro Giffuniif test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then 7222cfc83b6cSPedro Giffuni AC_MSG_RESULT([not set]) 7223cfc83b6cSPedro Giffunielse 7224cfc83b6cSPedro Giffuni UNIXWRAPPERNAME="$with_unix_wrapper" 7225cfc83b6cSPedro Giffuni AC_MSG_RESULT([$UNIXWRAPPERNAME]) 7226cfc83b6cSPedro Giffunifi 7227cfc83b6cSPedro GiffuniAC_SUBST(UNIXWRAPPERNAME) 7228cfc83b6cSPedro Giffuni 7229cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to statically link to Gtk]) 7230cfc83b6cSPedro Giffuniif test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then 7231cfc83b6cSPedro Giffuni ENABLE_STATIC_GTK="TRUE" 7232cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 7233cfc83b6cSPedro Giffunielse 7234cfc83b6cSPedro Giffuni ENABLE_STATIC_GTK="FALSE" 7235cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 7236cfc83b6cSPedro Giffunifi 7237cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_STATIC_GTK) 7238cfc83b6cSPedro Giffuni 7239cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to use layout dialogs]) 7240cfc83b6cSPedro Giffuniif test -n "$enable_layout" && test "$enable_layout" != "no"; then 7241cfc83b6cSPedro Giffuni ENABLE_LAYOUT="TRUE" 7242cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 7243cfc83b6cSPedro Giffunielse 7244cfc83b6cSPedro Giffuni ENABLE_LAYOUT="FALSE" 7245cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 7246cfc83b6cSPedro Giffunifi 7247cfc83b6cSPedro GiffuniAC_SUBST(ENABLE_LAYOUT) 7248cfc83b6cSPedro Giffuni 7249cfc83b6cSPedro Giffuni# =================================================================== 7250cfc83b6cSPedro Giffuni# De- or increase default verbosity of build process 7251cfc83b6cSPedro Giffuni# =================================================================== 7252cfc83b6cSPedro GiffuniAC_MSG_CHECKING([build verbosity]) 7253cfc83b6cSPedro Giffuniif test -n "$enable_verbose"; then 7254cfc83b6cSPedro Giffuni if test "$enable_verbose" = "yes"; then 7255cfc83b6cSPedro Giffuni VERBOSE="TRUE" 7256cfc83b6cSPedro Giffuni AC_MSG_RESULT([high]) 7257cfc83b6cSPedro Giffuni fi 7258cfc83b6cSPedro Giffuni if test "$enable_verbose" = "no"; then 7259cfc83b6cSPedro Giffuni VERBOSE="FALSE" 7260cfc83b6cSPedro Giffuni AC_MSG_RESULT([low]) 7261cfc83b6cSPedro Giffuni fi 7262cfc83b6cSPedro Giffunielse 7263cfc83b6cSPedro Giffuni AC_MSG_RESULT([not set]) 7264cfc83b6cSPedro Giffunifi 7265cfc83b6cSPedro GiffuniAC_SUBST(VERBOSE) 7266cfc83b6cSPedro Giffuni 7267cfc83b6cSPedro Giffunidnl =================================================================== 7268cfc83b6cSPedro Giffunidnl Hook up OOos nodep environmental variable to automake's equivalent 7269cfc83b6cSPedro Giffunidnl --enable-dependency-tracking configure option 7270cfc83b6cSPedro Giffunidnl =================================================================== 7271cfc83b6cSPedro GiffuniAC_MSG_CHECKING([whether to enable dependency tracking]) 7272cfc83b6cSPedro Giffuniif test "$enable_dependency_tracking" = "no"; then 7273cfc83b6cSPedro Giffuni nodep=TRUE 7274cfc83b6cSPedro Giffuni AC_MSG_RESULT([no]) 7275cfc83b6cSPedro Giffunielse 7276cfc83b6cSPedro Giffuni AC_MSG_RESULT([yes]) 7277cfc83b6cSPedro Giffunifi 7278cfc83b6cSPedro GiffuniAC_SUBST(nodep) 7279cfc83b6cSPedro Giffuni 7280cfc83b6cSPedro Giffunidnl =================================================================== 7281cfc83b6cSPedro Giffunidnl Setting up the environment. 7282cfc83b6cSPedro Giffunidnl =================================================================== 7283cfc83b6cSPedro Giffuniecho "********************************************************************" 7284cfc83b6cSPedro Giffuniecho "* *" 7285cfc83b6cSPedro Giffuniecho "* Setting up the build environment variables. *" 7286cfc83b6cSPedro Giffuniecho "* *" 7287cfc83b6cSPedro Giffuniecho "********************************************************************" 7288cfc83b6cSPedro Giffuni 7289cfc83b6cSPedro Giffuniif test -z "$COMPATH"; then 7290cfc83b6cSPedro Giffuni AC_MSG_ERROR([No compiler found.]) 7291cfc83b6cSPedro Giffunifi 7292cfc83b6cSPedro GiffuniAC_SUBST(COMPATH) 7293cfc83b6cSPedro GiffuniAC_SUBST(CC_PATH) 7294cfc83b6cSPedro Giffuni 7295cfc83b6cSPedro GiffuniAC_MSG_CHECKING([solver path]) 7296cfc83b6cSPedro Giffuniif test -z "$with_local_solver"; then 7297cfc83b6cSPedro Giffuni LOCAL_SOLVER="DEFAULT" 7298cfc83b6cSPedro Giffuni AC_MSG_RESULT([default]) 7299cfc83b6cSPedro Giffunielse 7300cfc83b6cSPedro Giffuni LOCAL_SOLVER=$with_local_solver 7301cfc83b6cSPedro Giffuni AC_MSG_RESULT([$with_local_solver]) 7302cfc83b6cSPedro Giffunifi 7303cfc83b6cSPedro GiffuniAC_SUBST(LOCAL_SOLVER) 7304cfc83b6cSPedro Giffuni 7305cfc83b6cSPedro GiffuniAC_SUBST(BUILD_TYPE) 7306cfc83b6cSPedro GiffuniAC_SUBST(ADDITIONAL_REPOSITORIES) 7307cfc83b6cSPedro Giffuni 7308cfc83b6cSPedro Giffuni# make sure config.guess is +x; we execute config.guess, so it has to be so; 7309cfc83b6cSPedro Giffunichmod +x ./config.guess 7310cfc83b6cSPedro Giffuni 7311cfc83b6cSPedro Giffuni# Create files from their *.in templates. 7312cfc83b6cSPedro GiffuniAC_CONFIG_FILES([set_soenv Makefile]) 7313cfc83b6cSPedro Giffuni 7314cfc83b6cSPedro GiffuniAC_MSG_NOTICE([writing config.status]) 7315cfc83b6cSPedro GiffuniAC_OUTPUT 7316cfc83b6cSPedro Giffuni 7317cfc83b6cSPedro Giffunidnl Executing the set_soenv script to setup the environment variables. 7318cfc83b6cSPedro Giffunichmod a+x set_soenv 7319cfc83b6cSPedro Giffuniif test -z "$enable_check_only"; then 7320cfc83b6cSPedro Giffuni './set_soenv' 7321cfc83b6cSPedro Giffunielse 7322cfc83b6cSPedro Giffuni echo 7323cfc83b6cSPedro Giffuni echo Test Complete 7324cfc83b6cSPedro Giffuni echo No environment file will be generated 7325cfc83b6cSPedro Giffuni echo 7326cfc83b6cSPedro Giffuni num_warnings=`wc -l warn` 7327cfc83b6cSPedro Giffuni _num=`echo $num_warnings | $AWK '{ print $1 }'` 7328cfc83b6cSPedro Giffuni if test $_num -gt 0; then 7329cfc83b6cSPedro Giffuni echo The following warning\(s\) were generated by configure 7330cfc83b6cSPedro Giffuni echo ---------------------------------------------------- 7331cfc83b6cSPedro Giffuni echo 7332cfc83b6cSPedro Giffuni cat warn 7333cfc83b6cSPedro Giffuni echo 7334cfc83b6cSPedro Giffuni else 7335cfc83b6cSPedro Giffuni echo There were no warnings 7336cfc83b6cSPedro Giffuni fi 7337cfc83b6cSPedro Giffuni echo 7338cfc83b6cSPedro Giffunifi 7339f0157b90Skschenk 7340