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