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