17aa0a607SDon Lewisdnl * ************************************************************* 27aa0a607SDon Lewisdnl * 37aa0a607SDon Lewisdnl * Licensed to the Apache Software Foundation (ASF) under one 47aa0a607SDon Lewisdnl * or more contributor license agreements. See the NOTICE file 57aa0a607SDon Lewisdnl * distributed with this work for additional information 67aa0a607SDon Lewisdnl * regarding copyright ownership. The ASF licenses this file 77aa0a607SDon Lewisdnl * to you under the Apache License, Version 2.0 (the 87aa0a607SDon Lewisdnl * "License"); you may not use this file except in compliance 97aa0a607SDon Lewisdnl * with the License. You may obtain a copy of the License at 107aa0a607SDon Lewisdnl * 117aa0a607SDon Lewisdnl * http://www.apache.org/licenses/LICENSE-2.0 127aa0a607SDon Lewisdnl * 137aa0a607SDon Lewisdnl * Unless required by applicable law or agreed to in writing, 147aa0a607SDon Lewisdnl * software distributed under the License is distributed on an 157aa0a607SDon Lewisdnl * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 167aa0a607SDon Lewisdnl * KIND, either express or implied. See the License for the 177aa0a607SDon Lewisdnl * specific language governing permissions and limitations 187aa0a607SDon Lewisdnl * under the License. 197aa0a607SDon Lewisdnl * 207aa0a607SDon Lewisdnl * ************************************************************* 217aa0a607SDon LewisAC_REVISION( $Revision: 1.290 $ ) 227aa0a607SDon LewisAC_PREREQ(2.50) 237aa0a607SDon LewisAC_INIT() 247aa0a607SDon Lewisecho "$@" >config.parms 257aa0a607SDon LewisAC_ARG_WITH(dmake-path, 267aa0a607SDon Lewis[ --with-dmake-path=<PATH TO EXECUTABLE> Specify the location of dmake ], 277aa0a607SDon Lewis[ DMAKE_PATH="$withval" 287aa0a607SDon Lewis]) 297aa0a607SDon LewisAC_ARG_WITH(dmake-url, 307aa0a607SDon Lewis[ --with-dmake-url=<URL> Specify the location of downloadable dmake source code. For example: 317aa0a607SDon Lewis http://sourceforge.net/projects/oooextras.mirror/files/dmake-4.12.tar.bz2 327aa0a607SDon Lewis Note that dmake is under GPL license.], 337aa0a607SDon Lewis[ DMAKE_URL="$withval" 347aa0a607SDon Lewis]) 357aa0a607SDon LewisAC_ARG_WITH(packager-list, 367aa0a607SDon Lewis[ --with-packager-list=<PATH TO PACK LIST> Specify a file to drive the packaging process. 377aa0a607SDon Lewis The file must follow the format explained in 387aa0a607SDon Lewis instsetoo_native/util/pack.lst 397aa0a607SDon Lewis],,) 407aa0a607SDon LewisAC_ARG_WITH(gnu-patch, 417aa0a607SDon Lewis[ --with-gnu-patch Specify location of GNU patch on Solaris or FreeBSD 427aa0a607SDon Lewis],,) 437aa0a607SDon LewisAC_ARG_WITH(gnu-cp, 447aa0a607SDon Lewis[ --with-gnu-cp Specify location of GNU cp on Solaris 457aa0a607SDon Lewis],,) 467aa0a607SDon LewisAC_ARG_WITH(gperf, 477aa0a607SDon Lewis[ --with-gperf Specify location of gperf on Solaris or FreeBSD 487aa0a607SDon Lewis],,) 497aa0a607SDon LewisAC_ARG_ENABLE(graphite, 507aa0a607SDon Lewis[ --enable-graphite Enables the compilation of Graphite smart font rendering 517aa0a607SDon Lewis],,) 527aa0a607SDon LewisAC_ARG_WITH(system-graphite, 537aa0a607SDon Lewis[ --with-system-graphite use graphite library already installed on system 547aa0a607SDon Lewis],,) 557aa0a607SDon LewisAC_ARG_WITH(system-apache-commons, 567aa0a607SDon Lewis[ --with-system-apache-commons use apache-commons jar files already installed on system 577aa0a607SDon Lewis],,) 587aa0a607SDon LewisAC_ARG_ENABLE(online-update, 597aa0a607SDon Lewis[ --disable-online-update Disables the Online Update feature. 607aa0a607SDon Lewis],,enable_online_update=yes) 617aa0a607SDon LewisAC_ARG_ENABLE(ldap, 627aa0a607SDon Lewis[ --disable-ldap Disables the use of LDAP backend via OpenLDAP 637aa0a607SDon Lewis],,) 647aa0a607SDon LewisAC_ARG_ENABLE(fetch-external, 657aa0a607SDon Lewis[ --disable-fetch-external Disables fetching external tarballs from web sources. 667aa0a607SDon Lewis],,) 677aa0a607SDon LewisAC_ARG_WITH(external-tar, 687aa0a607SDon Lewis[ --with-external-tar=<TARFILE PATH> Specify path to tarfiles manually ], 697aa0a607SDon Lewis[ TARFILE_LOCATION="$withval" 707aa0a607SDon Lewis]) 717aa0a607SDon LewisAC_ARG_WITH(openldap, 727aa0a607SDon Lewis[ --with-openldap Enables the use of the OpenLDAP 737aa0a607SDon Lewis],,) 747aa0a607SDon LewisAC_ARG_ENABLE(lockdown, 757aa0a607SDon Lewis[ --enable-lockdown Enables the gconf integration work in OOo 767aa0a607SDon Lewis],,) 777aa0a607SDon LewisAC_ARG_ENABLE(vba, 787aa0a607SDon Lewis[ --disable-vba disables the vba compatibility feature 797aa0a607SDon Lewis],,) 807aa0a607SDon LewisAC_ARG_WITH(vba-package-format, 817aa0a607SDon Lewis[ --with-vba-package-format specify package format for vba compatibility api. 827aa0a607SDon Lewis Specifying "builtin" means the api component and 837aa0a607SDon Lewis associated type library are part of the installation set. 847aa0a607SDon Lewis Specifying "extn" creates an uno extension that is 857aa0a607SDon Lewis part of the installation set ( located in the program 867aa0a607SDon Lewis directory ) that MUST be optionly registered using 877aa0a607SDon Lewis either the unopkg executeable or the extension manager 887aa0a607SDon Lewis gui. 897aa0a607SDon Lewis 907aa0a607SDon Lewis Note: "builtin" is the default, "extn" can cause 917aa0a607SDon Lewis problems. 927aa0a607SDon Lewis Usage: --with-vba-package-format="builtin" or 937aa0a607SDon Lewis --with-vba-package-format="extn" 947aa0a607SDon Lewis],,) 957aa0a607SDon LewisAC_ARG_ENABLE(pch, 967aa0a607SDon Lewis[ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++. 977aa0a607SDon Lewis],,) 987aa0a607SDon LewisAC_ARG_WITH(fonts, 997aa0a607SDon Lewis[ --without-fonts OOo includes some third-party fonts to provide a reliable 1007aa0a607SDon Lewis basis for help content, templates, samples, etc. 1017aa0a607SDon Lewis When these fonts are already known to be available on the 1027aa0a607SDon Lewis system then you should use this option. 1037aa0a607SDon Lewis],,) 1047aa0a607SDon LewisAC_ARG_WITH(ppds, 1057aa0a607SDon Lewis[ --without-ppds Removes Postscript Printer definition files from 1067aa0a607SDon Lewis Apache Openoffice installation set, for people building 1077aa0a607SDon Lewis for specific distributions where PPDs are known to be 1087aa0a607SDon Lewis already available (every recent distro with CUPS 1097aa0a607SDon Lewis backend) 1107aa0a607SDon Lewis],,) 1117aa0a607SDon LewisAC_ARG_WITH(afms, 1127aa0a607SDon Lewis[ --without-afms Removes bitmap font files from Apache Openoffice 1137aa0a607SDon Lewis installation set, for people building for specific 1147aa0a607SDon Lewis distributions where AFM files or TrueType Fonts 1157aa0a607SDon Lewis are known to be available. 1167aa0a607SDon Lewis],,) 1177aa0a607SDon LewisAC_ARG_ENABLE(epm, 1187aa0a607SDon Lewis[ --disable-epm AOO includes self-packaging code, that requires 1197aa0a607SDon Lewis epm, however epm is useless for large scale 1207aa0a607SDon Lewis package building. 1217aa0a607SDon Lewis],,enable_epm="yes") 1227aa0a607SDon LewisAC_ARG_WITH(epm, 1237aa0a607SDon Lewis[ --with-epm Decides which epm to use. Default is to use 1247aa0a607SDon Lewis the one from the system if one is built. When 1257aa0a607SDon Lewis either this is not there or you say =internal 1267aa0a607SDon Lewis epm will be built. 1277aa0a607SDon Lewis],,) 1287aa0a607SDon LewisAC_ARG_WITH(epm-url, 1297aa0a607SDon Lewis[ --with-epm-url=<URL> Specify the location of downloadable epm 3.7 source code. For example: 1307aa0a607SDon Lewis https://sourceforge.net/projects/oooextras.mirror/files/epm-3.7.tar.gz 1317aa0a607SDon Lewis Note that epm is under GPL license. 1327aa0a607SDon Lewis],[ EPM_URL="$withval" 1337aa0a607SDon Lewis]) 1347aa0a607SDon LewisAC_ARG_WITH(package-format, 1357aa0a607SDon Lewis[ --with-package-format specify package format(s) for OOo installsets. 1367aa0a607SDon Lewis Default is "normal" one of the OS/Distribution. 1377aa0a607SDon Lewis 1387aa0a607SDon Lewis Usage: --with-package-format="foo bar" 1397aa0a607SDon Lewis],,) 1407aa0a607SDon LewisAC_ARG_ENABLE(odk, 1417aa0a607SDon Lewis[ --disable-odk OO.o includes an ODK, office development kit 1427aa0a607SDon Lewis which some packagers may with to build without 1437aa0a607SDon Lewis],,enable_odk="yes") 1447aa0a607SDon LewisAC_ARG_ENABLE(mathmldtd, 1457aa0a607SDon Lewis[ --disable-mathmldtd disable mathmldtd 1467aa0a607SDon Lewis (useful for distributions that want to avoid packaging 1477aa0a607SDon Lewis it) 1487aa0a607SDon Lewis],,enable_mathmldtd="yes") 1497aa0a607SDon LewisAC_ARG_ENABLE(evolution2, 1507aa0a607SDon Lewis[ --enable-evolution2 Allows the built-in evolution 2 addressbook 1517aa0a607SDon Lewis connectivity build to be enabled. 1527aa0a607SDon Lewis],,) 1537aa0a607SDon LewisAC_ARG_WITH(system-stdlibs, 1547aa0a607SDon Lewis[ --with-system-stdlibs use libstdc++/libgcc_s already on system 1557aa0a607SDon Lewis],,) 1567aa0a607SDon LewisAC_ARG_ENABLE(cups, 1577aa0a607SDon Lewis[ --disable-cups disable CUPS support (for printing on UNIX) 1587aa0a607SDon Lewis],,enable_cups=yes) 1597aa0a607SDon LewisAC_ARG_ENABLE(fontconfig, 1607aa0a607SDon Lewis[ --disable-fontconfig disable support for the fontconfig library 1617aa0a607SDon Lewis],,enable_fontconfig=yes) 1627aa0a607SDon LewisAC_ARG_ENABLE(directx, 1637aa0a607SDon Lewis[ --disable-directx Remove DirectX implementation for the new XCanvas 1647aa0a607SDon Lewis interface. The DirectX support requires more stuff 1657aa0a607SDon Lewis installed on Windows to compile. 1667aa0a607SDon Lewis (DirectX SDK, GDI+ libs) 1677aa0a607SDon Lewis],,enable_directx=yes) 1687aa0a607SDon LewisAC_ARG_ENABLE(activex, 1697aa0a607SDon Lewis[ --disable-activex Disable the use of ActiveX for windows build. 1707aa0a607SDon Lewis This switch is mandatory when using VC++ 2005/2008 Express. 1717aa0a607SDon Lewis Alternatively you can use the Windows Driver Kit (WDK) and 1727aa0a607SDon Lewis configure with the following switches: 1737aa0a607SDon Lewis --with-atl-include-dir=$WDK_HOME\inc\atl71 1747aa0a607SDon Lewis --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 1757aa0a607SDon Lewis --with-mfc-include-dir=$WDK_HOME\inc\mfc42 1767aa0a607SDon Lewis --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 1777aa0a607SDon Lewis],,) 1787aa0a607SDon Lewis 1797aa0a607SDon LewisAC_ARG_ENABLE(atl, 1807aa0a607SDon Lewis[ --disable-atl Disable the use of ATL for windows build. 1817aa0a607SDon Lewis This switch is mandatory when using VC++ 2005/2008 Express. 1827aa0a607SDon Lewis Alternatively you can use the Windows Driver Kit (WDK) and 1837aa0a607SDon Lewis configure with the following switches: 1847aa0a607SDon Lewis --with-atl-include-dir=$WDK_HOME\inc\atl71 1857aa0a607SDon Lewis --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 1867aa0a607SDon Lewis --with-mfc-include-dir=$WDK_HOME\inc\mfc42 1877aa0a607SDon Lewis --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 1887aa0a607SDon Lewis],,) 1897aa0a607SDon Lewis 1907aa0a607SDon LewisAC_ARG_WITH(atl-include-dir, 1917aa0a607SDon Lewis[ --with-atl-include-dir Path to ATL include directory for windows build. 1927aa0a607SDon Lewis This switch is mandatory when using VC++ 2008 Express 1937aa0a607SDon Lewis and configuring with ATL/ActiveX enabled. 1947aa0a607SDon Lewis You can use the Windows Driver Kit (WDK) and 1957aa0a607SDon Lewis configure with the following switch: 1967aa0a607SDon Lewis --with-atl-include-dir=$WDK_HOME\inc\atl71 1977aa0a607SDon Lewis],,) 1987aa0a607SDon Lewis 1997aa0a607SDon LewisAC_ARG_WITH(atl-lib-dir, 2007aa0a607SDon Lewis[ --with-atl-lib-dir Path to ATL libraries directory for windows build. 2017aa0a607SDon Lewis This switch is mandatory when using VC++ 2008 Express 2027aa0a607SDon Lewis and configuring with ATL/ActiveX enabled. 2037aa0a607SDon Lewis You can use the Windows Driver Kit (WDK) and 2047aa0a607SDon Lewis configure with the following switch: 2057aa0a607SDon Lewis --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386 2067aa0a607SDon Lewis],,) 2077aa0a607SDon Lewis 2087aa0a607SDon LewisAC_ARG_WITH(mfc-include-dir, 2097aa0a607SDon Lewis[ --with-mfc-include-dir Path to MFC include directory for windows build. 2107aa0a607SDon Lewis This switch is mandatory when using VC++ 2008 Express 2117aa0a607SDon Lewis and configuring with ATL/ActiveX enabled. 2127aa0a607SDon Lewis You can use the Windows Driver Kit (WDK) and 2137aa0a607SDon Lewis configure with the following switch: 2147aa0a607SDon Lewis --with-mfc-include-dir=$WDK_HOME\inc\mfc42 2157aa0a607SDon Lewis],,) 2167aa0a607SDon Lewis 2177aa0a607SDon LewisAC_ARG_WITH(mfc-lib-dir, 2187aa0a607SDon Lewis[ --with-mfc-lib-dir Path to MFC libraries directory for windows build. 2197aa0a607SDon Lewis This switch is mandatory when using VC++ 2008 Express 2207aa0a607SDon Lewis and configuring with ATL/ActiveX enabled. 2217aa0a607SDon Lewis You can use the Windows Driver Kit (WDK) and 2227aa0a607SDon Lewis configure with the following switch: 2237aa0a607SDon Lewis --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386 2247aa0a607SDon Lewis],,) 2257aa0a607SDon Lewis 2267aa0a607SDon Lewis 2277aa0a607SDon LewisAC_ARG_ENABLE(symbols, 2287aa0a607SDon Lewis[ --enable-symbols Include debugging symbols in output. 2297aa0a607SDon Lewis WARNING - a complete build needs 8 Gb of space and 2307aa0a607SDon Lewis takes much longer. (enables -g compiler flag) 2317aa0a607SDon Lewis 2327aa0a607SDon Lewis --enable-symbols=SMALL sets the gcc -g1 setting 2337aa0a607SDon Lewis which is smaller. 2347aa0a607SDon Lewis 2357aa0a607SDon Lewis Enabling symbols disables the stripping of the solver 2367aa0a607SDon Lewis (--disable-strip-solver). 2377aa0a607SDon Lewis],,) 2387aa0a607SDon LewisAC_ARG_ENABLE(strip-solver, 2397aa0a607SDon Lewis[ --disable-strip-solver Disable the stripping of the solver. 2407aa0a607SDon Lewis By default the solver is stripped unless a build with 2417aa0a607SDon Lewis debugging symbols (--enable-symbols) is requested. 2427aa0a607SDon Lewis 2437aa0a607SDon Lewis This switch allows to override this setting. 2447aa0a607SDon Lewis],,) 2457aa0a607SDon LewisAC_ARG_ENABLE(werror, 2467aa0a607SDon Lewis[ --enable-werror Turn warnings to errors. (Has no effect in modules 2477aa0a607SDon Lewis where the treating of warnings as errors is disabled 2487aa0a607SDon Lewis explicitly) 2497aa0a607SDon Lewis],,) 2507aa0a607SDon LewisAC_ARG_ENABLE(debug, 2517aa0a607SDon Lewis[ --enable-debug Include debugging symbols from --enable-symbols 2527aa0a607SDon Lewis plus extra debugging code. Extra large build! 2537aa0a607SDon Lewis (enables -g compiler flag and dmake debug=true) 2547aa0a607SDon Lewis],,) 2557aa0a607SDon LewisAC_ARG_ENABLE(dbgutil, 2567aa0a607SDon Lewis[ --enable-dbgutil Include additional debugging utilities, such as 2577aa0a607SDon Lewis assertions, object counting, etc. Larger build. 2587aa0a607SDon Lewis Independent from --enable-debug 2597aa0a607SDon Lewis],,) 2607aa0a607SDon LewisAC_ARG_ENABLE(crashdump, 2617aa0a607SDon Lewis[ --enable-crashdump Enable the crashdump feature code. 2627aa0a607SDon Lewis],,) 2637aa0a607SDon LewisAC_ARG_ENABLE(cl-standard, 2647aa0a607SDon Lewis[ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing 2657aa0a607SDon Lewis standard compiler. ( This just disables optimization 2667aa0a607SDon Lewis options and therefore removes a lot of warnings when 2677aa0a607SDon Lewis using the cheaper standard compiler. ) 2687aa0a607SDon Lewis],,) 2697aa0a607SDon LewisAC_ARG_ENABLE(win-x64-shellext, 2707aa0a607SDon Lewis[ --enable-win-x64-shellext Enable the build/usage of Windows 64bit shell extensions. 2717aa0a607SDon Lewis These extension are used for the system integration on a 2727aa0a607SDon Lewis Windows 64bit systems. For example supporting the search 2737aa0a607SDon Lewis in ODF files with the standard Windows search feature. 2747aa0a607SDon Lewis],,) 2757aa0a607SDon LewisAC_ARG_ENABLE(gtk, 2767aa0a607SDon Lewis[ --disable-gtk Determines whether to use Gtk+ vclplug on platforms 2777aa0a607SDon Lewis where Gtk+ is available. 2787aa0a607SDon Lewis],,enable_gtk=yes) 2797aa0a607SDon LewisAC_ARG_ENABLE(gstreamer, 2807aa0a607SDon Lewis[ --enable-gstreamer Determines whether to use the GStreamer media 2817aa0a607SDon Lewis backend on platforms where GStreamer is available. 2827aa0a607SDon Lewis],,enable_gstreamer=no) 2837aa0a607SDon LewisAC_ARG_ENABLE(systray, 2847aa0a607SDon Lewis[ --disable-systray Determines whether to build the systray quickstarter. 2857aa0a607SDon Lewis],,enable_systray=yes) 2867aa0a607SDon LewisAC_ARG_ENABLE(cairo, 2877aa0a607SDon Lewis[ --enable-cairo Determines whether to use Cairo library on 2887aa0a607SDon Lewis platforms where Cairo is available. 2897aa0a607SDon Lewis],,enable_cairo=no) 2907aa0a607SDon LewisAC_ARG_WITH(system-cairo, 2917aa0a607SDon Lewis[ --with-system-cairo Use Cairo libraries already on system 2927aa0a607SDon Lewis],,) 2937aa0a607SDon LewisAC_ARG_ENABLE(cairo-canvas, 2947aa0a607SDon Lewis[ --disable-cairo-canvas Determines whether to build the Cairo canvas on 2957aa0a607SDon Lewis platforms where Cairo is available. 2967aa0a607SDon Lewis],,enable_cairo_canvas=yes) 2977aa0a607SDon LewisAC_ARG_ENABLE(opengl, 2987aa0a607SDon Lewis[ --enable-opengl Determines whether to build the OpenGL 3D slide 2997aa0a607SDon Lewis transitions component 3007aa0a607SDon Lewis],,enable_opengl=no) 3017aa0a607SDon LewisAC_ARG_ENABLE(dbus, 3027aa0a607SDon Lewis[ --enable-dbus Determines whether to enable presentation mode 3037aa0a607SDon Lewis screensaver control under GNOME via DBUS 3047aa0a607SDon Lewis],,enable_dbus=no) 3057aa0a607SDon LewisAC_ARG_ENABLE(gconf, 3067aa0a607SDon Lewis[ --disable-gconf Determines whether to use the GConf support 3077aa0a607SDon Lewis],,enable_gconf=yes) 3087aa0a607SDon LewisAC_ARG_ENABLE(gnome-vfs, 3097aa0a607SDon Lewis[ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing 3107aa0a607SDon Lewis System on platforms where that VFS is available 31116f572bfSDamjan Jovanovic],,enable_gnome_vfs=no) 3127aa0a607SDon LewisAC_ARG_ENABLE(gio, 3137aa0a607SDon Lewis[ --enable-gio Determines whether to use the GIO support 31416f572bfSDamjan Jovanovic],,enable_gio=yes) 3157aa0a607SDon LewisAC_ARG_ENABLE(static-gtk, 3167aa0a607SDon Lewis[ --enable-static-gtk Modules that are linked against gtk libraries use 3177aa0a607SDon Lewis the static libraries instead of the dynamic ones. 3187aa0a607SDon Lewis (enables -Bstatic linker flag for gtk libraries) 3197aa0a607SDon Lewis],,) 3207aa0a607SDon LewisAC_ARG_ENABLE(layout, 3217aa0a607SDon Lewis[ --enable-layout Enable the compilation and use of layout dialogs 3227aa0a607SDon Lewis],,) 3237aa0a607SDon LewisAC_ARG_ENABLE(nss-module, 3247aa0a607SDon Lewis[ --disable-nss-module Whether to use the NSS module that is used for xml-security 3257aa0a607SDon Lewis],,enable_nss_module=yes) 3267aa0a607SDon LewisAC_ARG_ENABLE(kde, 3277aa0a607SDon Lewis[ --enable-kde Determines whether to use Qt/KDE vclplug on platforms 3287aa0a607SDon Lewis where Qt and KDE are available. 3297aa0a607SDon Lewis],,) 3307aa0a607SDon LewisAC_ARG_ENABLE(kdeab, 3317aa0a607SDon Lewis[ --disable-kdeab Disable the KDE address book support 3327aa0a607SDon Lewis],,if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi) 3337aa0a607SDon LewisAC_ARG_ENABLE(kde4, 3347aa0a607SDon Lewis[ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms 3357aa0a607SDon Lewis where Qt4 and KDE4 are available. May be used with --enable-kde 3367aa0a607SDon Lewis if you want to support both KDE3 and KDE4. 3377aa0a607SDon Lewis],,) 3387aa0a607SDon LewisAC_ARG_ENABLE(rpath, 3397aa0a607SDon Lewis[ --disable-rpath Disable the use of relative paths in shared libraries 3407aa0a607SDon Lewis],,) 3417aa0a607SDon LewisAC_ARG_ENABLE(pam, 3427aa0a607SDon Lewis[ --disable-pam Disable pam support. 3437aa0a607SDon Lewis],,) 3447aa0a607SDon LewisAC_ARG_ENABLE(pam-link, 3457aa0a607SDon Lewis[ --enable-pam-link link with libpam instead of dynamically open it 3467aa0a607SDon Lewis],,) 3477aa0a607SDon LewisAC_ARG_ENABLE(crypt-link, 3487aa0a607SDon Lewis[ --disable-crypt-link disable linking with libcrypt instead of dynamically 3497aa0a607SDon Lewis open it (needed for ancient GNU/Linux distributions 3507aa0a607SDon Lewis without crypt()/libcrypt) 3517aa0a607SDon Lewis],,enable_crypt_link=yes) 3527aa0a607SDon LewisAC_ARG_ENABLE(xrender-link, 3537aa0a607SDon Lewis[ --enable-xrender-link link with libXrender instead of dynamically open it 3547aa0a607SDon Lewis],,) 3557aa0a607SDon LewisAC_ARG_ENABLE(randr, 3567aa0a607SDon Lewis[ --disable-randr disable RandR support in the vcl project 3577aa0a607SDon Lewis],,enable_randr=yes) 3587aa0a607SDon LewisAC_ARG_ENABLE(randr-link, 3597aa0a607SDon Lewis[ --disable-randr-link disable linking with libXrandr, instead dynamically 3607aa0a607SDon Lewis open it at runtime 3617aa0a607SDon Lewis],,enable_randr_link=yes) 3627aa0a607SDon LewisAC_ARG_WITH(bundled-extension-blobs, 3637aa0a607SDon Lewis[ --with-bundled-extension-blobs Whitespace seperated list of files in the tarball directory 3647aa0a607SDon Lewis that are to be bundled as-is for installation as extensions 3657aa0a607SDon Lewis at the first program start. Make sure to only bundle extensions 3667aa0a607SDon Lewis which can be installed without requiring a license dialog 3677aa0a607SDon Lewis and comply with their distribution requirements by updating the 3687aa0a607SDon Lewis files LICENSE_aggregated and NOTICE_aggregated accordingly 3697aa0a607SDon Lewis],,) 3707aa0a607SDon Lewis#AC_ARG_WITH(bundled-prereg-extensions, 3717aa0a607SDon Lewis#[ --with-bundled-prereg-extensions Whitespace seperated list of files in the tarball directory that 3727aa0a607SDon Lewis# are to be bundled as pre-registered extensions. Make sure to only bundle 3737aa0a607SDon Lewis# extensions which can be installed without requiring a license dialog 3747aa0a607SDon Lewis#],,) 3757aa0a607SDon LewisAC_ARG_ENABLE(bundled-dictionaries, 3767aa0a607SDon Lewis[ --enable-bundled-dictionaries Download dictionaries (spelling, hyphenation, thesaurus) 3777aa0a607SDon Lewis according to main/extensions.lst and bundle them. Make sure to 3787aa0a607SDon Lewis comply with their distribution requirements and update the 3797aa0a607SDon Lewis files LICENSE_aggregated and NOTICE_aggregated accordingly 3807aa0a607SDon Lewis],,enable_bundled_dictionaries=no) 3817aa0a607SDon Lewis 3827aa0a607SDon Lewis# Remove the following switches when not in release mode. 3837aa0a607SDon LewisAC_ARG_WITH(system-dicts, 3847aa0a607SDon Lewis[ --with-system-dicts Use dictionaries from system paths- Specify 3857aa0a607SDon Lewis them via --with-{dict,hyph,thes}-path=/path 3867aa0a607SDon Lewis if you want to override the default ones 3877aa0a607SDon Lewis],,) 3887aa0a607SDon LewisAC_ARG_WITH(external-dict-dir, 3897aa0a607SDon Lewis[ --with-external-dict-dir Specify external dictionary dir 3907aa0a607SDon Lewis],,) 3917aa0a607SDon LewisAC_ARG_WITH(external-hyph-dir, 3927aa0a607SDon Lewis[ --with-external-hyph-dir Specify external hyphenation pattern dir 3937aa0a607SDon Lewis],,) 3947aa0a607SDon LewisAC_ARG_WITH(external-thes-dir, 3957aa0a607SDon Lewis[ --with-external-thes-dir Specify external thesaurus dir 3967aa0a607SDon Lewis],,) 3977aa0a607SDon Lewis# End of remove. 3987aa0a607SDon Lewis 3997aa0a607SDon Lewis 4007aa0a607SDon LewisAC_ARG_WITH(system-libs, 4017aa0a607SDon Lewis[ --with-system-libs Use libs already on system -- enables all 4027aa0a607SDon Lewis --with-system-* flags except 4037aa0a607SDon Lewis odbc/sane/xrender-header(s) 4047aa0a607SDon Lewis],,) 4057aa0a607SDon LewisAC_ARG_WITH(system-headers, 4067aa0a607SDon Lewis[ --with-system-headers Use headers already on system -- enables all 4077aa0a607SDon Lewis --with-system-* flags for external packages 4087aa0a607SDon Lewis whose headers are the only entities used i.e. 4097aa0a607SDon Lewis boost/vigra/odbc/sane/xrender-header(s) 4107aa0a607SDon Lewis],,) 4117aa0a607SDon LewisAC_ARG_WITH(system-jars, 4127aa0a607SDon Lewis[ --without-system-jars When building with --with-system-libs, also the 4137aa0a607SDon Lewis needed jars are expected on the system. Use this to 4147aa0a607SDon Lewis disable that. 4157aa0a607SDon Lewis (except for the db case where --with-system-db 4167aa0a607SDon Lewis *has to* imply using the db.jar from there, too) 4177aa0a607SDon Lewis],,) 4187aa0a607SDon LewisAC_ARG_WITH(system-zlib, 4197aa0a607SDon Lewis[ --with-system-zlib Use zlib already on system 4207aa0a607SDon Lewis],,) 4217aa0a607SDon LewisAC_ARG_WITH(system-nss, 4227aa0a607SDon Lewis[ --with-system-nss Use NSS already on system 4237aa0a607SDon Lewis],,) 4247aa0a607SDon LewisAC_ARG_WITH(system-openssl, 4257aa0a607SDon Lewis[ --with-system-openssl Use OpenSSL already on system 4267aa0a607SDon Lewis],,) 4277aa0a607SDon LewisAC_ARG_WITH(system-jpeg, 4287aa0a607SDon Lewis[ --with-system-jpeg Use jpeg already on system 4297aa0a607SDon Lewis],,) 4307aa0a607SDon LewisAC_ARG_WITH(system-expat, 4317aa0a607SDon Lewis[ --with-system-expat Use expat already on system 4327aa0a607SDon Lewis],,) 4337aa0a607SDon LewisAC_ARG_WITH(system-libxml, 4347aa0a607SDon Lewis[ --with-system-libxml Use libxml already on system 4357aa0a607SDon Lewis],,) 4367aa0a607SDon LewisAC_ARG_WITH(system-python, 4377aa0a607SDon Lewis[ --with-system-python Use python already on system 4387aa0a607SDon Lewis],,) 4397aa0a607SDon LewisAC_ARG_WITH(system-icu, 4407aa0a607SDon Lewis[ --with-system-icu Use icu already on system 4417aa0a607SDon Lewis],,) 4427aa0a607SDon LewisAC_ARG_WITH(system-poppler, 4437aa0a607SDon Lewis[ --with-system-poppler Use poppler already on system 4447aa0a607SDon Lewis],,) 4457aa0a607SDon LewisAC_ARG_WITH(system-lucene, 4467aa0a607SDon Lewis[ --with-system-lucene Use lucene already on system 4477aa0a607SDon Lewis],,) 4487aa0a607SDon LewisAC_ARG_WITH(lucene-core-jar, 4497aa0a607SDon Lewis[ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ], 4507aa0a607SDon Lewis[ LUCENE_CORE_JAR="$withval" 4517aa0a607SDon Lewis]) 4527aa0a607SDon LewisAC_ARG_WITH(lucene-analyzers-jar, 4537aa0a607SDon Lewis[ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ], 4547aa0a607SDon Lewis[ LUCENE_ANALYZERS_JAR="$withval" 4557aa0a607SDon Lewis]) 4567aa0a607SDon LewisAC_ARG_ENABLE(mysql-connector, 4577aa0a607SDon Lewis[ --enable-mysql-connector enables the build of the MySQL Connector/OOo extension. 4587aa0a607SDon Lewis This requires access to the MySQL Connector/C (aka libmysql) to be given, too, with 4597aa0a607SDon Lewis either the --with-system-mysql or --with-libmysql-path option. 4607aa0a607SDon Lewis],,) 4617aa0a607SDon LewisAC_ARG_WITH(system-mysql, 4627aa0a607SDon Lewis[ --with-system-mysql Use MySQL libraries already on system, for building the MySQL Connector/OOo extension. 4637aa0a607SDon Lewis Requires MYSQLCONFIG to point to the mysql_config executable. 4647aa0a607SDon Lewis],,) 4657aa0a607SDon LewisAC_ARG_WITH(libmysql-path, 4667aa0a607SDon Lewis[ --with-libmysql-path Use Connector/C (libmysql) installation for building the MySQL Connector/OOo extension. 4677aa0a607SDon Lewis 4687aa0a607SDon Lewis Usage: --with-libmysql-path=<absolute path to your Connector/C installation> 4697aa0a607SDon Lewis],,) 4707aa0a607SDon LewisAC_ARG_WITH(system-mysql-cppconn, 4717aa0a607SDon Lewis[ --with-system-mysql-cppconn Use MySQL C++ Connector libraries already on system 4727aa0a607SDon Lewis],,) 4737aa0a607SDon LewisAC_ARG_WITH(system-hsqldb, 4747aa0a607SDon Lewis[ --with-system-hsqldb Use hsqldb already on system 4757aa0a607SDon Lewis],,) 4767aa0a607SDon LewisAC_ARG_WITH(hsqldb-jar, 4777aa0a607SDon Lewis[ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ], 4787aa0a607SDon Lewis[ HSQLDB_JAR="$withval" 4797aa0a607SDon Lewis]) 4807aa0a607SDon LewisAC_ARG_WITH(system-beanshell, 4817aa0a607SDon Lewis[ --with-system-beanshell Use beanshell already on system (default) 4827aa0a607SDon Lewis],,) 4837aa0a607SDon LewisAC_ARG_ENABLE(beanshell, 4847aa0a607SDon Lewis[ --disable-beanshell Disable the use of beanshell. 4857aa0a607SDon Lewis],,) 4867aa0a607SDon LewisAC_ARG_WITH(beanshell-jar, 4877aa0a607SDon Lewis[ --with-beanshell-jar=JARFILE Specify path to jarfile manually ], 4887aa0a607SDon Lewis[ BSH_JAR="$withval" 4897aa0a607SDon Lewis]) 4907aa0a607SDon LewisAC_ARG_ENABLE(pdfimport, 4917aa0a607SDon Lewis[ --enable-pdfimport enables the build of the PDF Import extension 4927aa0a607SDon Lewis],,) 4937aa0a607SDon LewisAC_ARG_ENABLE(wiki-publisher, 4947aa0a607SDon Lewis[ --enable-wiki-publisher enables the build of the Wiki Publisher extension 4957aa0a607SDon Lewis],,) 4967aa0a607SDon LewisAC_ARG_WITH(commons-codec-jar, 4977aa0a607SDon Lewis[ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ], 4987aa0a607SDon Lewis[ COMMONS_CODEC_JAR="$withval" 4997aa0a607SDon Lewis]) 5007aa0a607SDon LewisAC_ARG_WITH(commons-lang-jar, 5017aa0a607SDon Lewis[ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ], 5027aa0a607SDon Lewis[ COMMONS_LANG_JAR="$withval" 5037aa0a607SDon Lewis]) 5047aa0a607SDon LewisAC_ARG_WITH(commons-httpclient-jar, 5057aa0a607SDon Lewis[ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ], 5067aa0a607SDon Lewis[ COMMONS_HTTPCLIENT_JAR="$withval" 5077aa0a607SDon Lewis]) 5087aa0a607SDon LewisAC_ARG_WITH(commons-logging-jar, 5097aa0a607SDon Lewis[ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ], 5107aa0a607SDon Lewis[ COMMONS_LOGGING_JAR="$withval" 5117aa0a607SDon Lewis]) 5127aa0a607SDon LewisAC_ARG_WITH(servlet-api-jar, 5137aa0a607SDon Lewis[ --servlet-api-jar=JARFILE Specify path to jarfile manually ], 5147aa0a607SDon Lewis[ SERVLETAPI_JAR="$withval" 5157aa0a607SDon Lewis]) 5167aa0a607SDon LewisAC_ARG_ENABLE(report-builder, 5177aa0a607SDon Lewis[ --enable-report-builder enables the build of the Report Builder extension 5187aa0a607SDon Lewis],,) 5197aa0a607SDon LewisAC_ARG_WITH(sac-jar, 5207aa0a607SDon Lewis[ --with-sac-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5217aa0a607SDon Lewis[ SAC_JAR="$withval" 5227aa0a607SDon Lewis]) 5237aa0a607SDon LewisAC_ARG_WITH(libxml-jar, 5247aa0a607SDon Lewis[ --with-libxml-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5257aa0a607SDon Lewis[ LIBXML_JAR="$withval" 5267aa0a607SDon Lewis]) 5277aa0a607SDon LewisAC_ARG_WITH(flute-jar, 5287aa0a607SDon Lewis[ --with-flute-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5297aa0a607SDon Lewis[ FLUTE_JAR="$withval" 5307aa0a607SDon Lewis]) 5317aa0a607SDon LewisAC_ARG_WITH(jfreereport-jar, 5327aa0a607SDon Lewis[ --with-jfreereport-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5337aa0a607SDon Lewis[ JFREEREPORT_JAR="$withval" 5347aa0a607SDon Lewis]) 5357aa0a607SDon LewisAC_ARG_WITH(liblayout-jar, 5367aa0a607SDon Lewis[ --with-liblayout-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5377aa0a607SDon Lewis[ LIBLAYOUT_JAR="$withval" 5387aa0a607SDon Lewis]) 5397aa0a607SDon LewisAC_ARG_WITH(libloader-jar, 5407aa0a607SDon Lewis[ --with-libloader-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5417aa0a607SDon Lewis[ LIBLOADER_JAR="$withval" 5427aa0a607SDon Lewis]) 5437aa0a607SDon LewisAC_ARG_WITH(libloader-jar, 5447aa0a607SDon Lewis[ --with-libloader-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5457aa0a607SDon Lewis[ LIBLOADER_JAR="$withval" 5467aa0a607SDon Lewis]) 5477aa0a607SDon LewisAC_ARG_WITH(libformula-jar, 5487aa0a607SDon Lewis[ --with-libformula-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5497aa0a607SDon Lewis[ LIBFORMULA_JAR="$withval" 5507aa0a607SDon Lewis]) 5517aa0a607SDon LewisAC_ARG_WITH(librepository-jar, 5527aa0a607SDon Lewis[ --with-librepository-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5537aa0a607SDon Lewis[ LIBREPOSITORY_JAR="$withval" 5547aa0a607SDon Lewis]) 5557aa0a607SDon LewisAC_ARG_WITH(libfonts-jar, 5567aa0a607SDon Lewis[ --with-libfonts-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5577aa0a607SDon Lewis[ LIBFONTS_JAR="$withval" 5587aa0a607SDon Lewis]) 5597aa0a607SDon LewisAC_ARG_WITH(libserializer-jar, 5607aa0a607SDon Lewis[ --with-libserializer-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5617aa0a607SDon Lewis[ LIBSERIALIZER_JAR="$withval" 5627aa0a607SDon Lewis]) 5637aa0a607SDon LewisAC_ARG_WITH(libbase-jar, 5647aa0a607SDon Lewis[ --with-libbase-jar=JARFILE Specify path to jarfile manually (for Report Builder extension) ], 5657aa0a607SDon Lewis[ LIBBASE_JAR="$withval" 5667aa0a607SDon Lewis]) 5677aa0a607SDon LewisAC_ARG_WITH(system-saxon, 5687aa0a607SDon Lewis[ --with-system-saxon Use saxon already on system (default) 5697aa0a607SDon Lewis],,) 5707aa0a607SDon LewisAC_ARG_ENABLE(saxon, 5717aa0a607SDon Lewis[ --disable-saxon Disable use of saxon 5727aa0a607SDon Lewis],,) 5737aa0a607SDon LewisAC_ARG_WITH(saxon-jar, 5747aa0a607SDon Lewis[ --with-saxon-jar=JARFILE Specify path to jarfile manually. This implies --with-system-saxon ], 5757aa0a607SDon Lewis[ SAXON_JAR="$withval" 5767aa0a607SDon Lewis]) 5777aa0a607SDon LewisAC_ARG_WITH(system-libxslt, 5787aa0a607SDon Lewis[ --with-system-libxslt Use libxslt already on system 5797aa0a607SDon Lewis],,) 5807aa0a607SDon LewisAC_ARG_WITH(system-odbc, 5817aa0a607SDon Lewis[ --with-system-odbc-headers Use the odbc headers already on system 5827aa0a607SDon Lewis],,) 5837aa0a607SDon LewisAC_ARG_WITH(system-sane, 5847aa0a607SDon Lewis[ --with-system-sane-header Use sane.h already on system 5857aa0a607SDon Lewis],,) 5867aa0a607SDon LewisAC_ARG_WITH(system-xrender, 5877aa0a607SDon Lewis[ --with-system-xrender-headers Use XRender headers already on system 5887aa0a607SDon Lewis],,) 5897aa0a607SDon LewisAC_ARG_WITH(system-curl, 5907aa0a607SDon Lewis[ --with-system-curl Use curl already on system 5917aa0a607SDon Lewis],,) 5927aa0a607SDon LewisAC_ARG_WITH(system-boost, 5937aa0a607SDon Lewis[ --with-system-boost Use boost already on system 5947aa0a607SDon Lewis],,) 5957aa0a607SDon LewisAC_ARG_WITH(system-mdds, 5967aa0a607SDon Lewis[ --with-system-mdds Use mdds already on system 5977aa0a607SDon Lewis],,) 5987aa0a607SDon LewisAC_ARG_WITH(system-vigra, 5997aa0a607SDon Lewis[ --with-system-vigra Use vigra already on system 6007aa0a607SDon Lewis],,) 6017aa0a607SDon LewisAC_ARG_ENABLE(hunspell, 6027aa0a607SDon Lewis[ --enable-hunspell Determines whether to enable the Hunspell library. 6037aa0a607SDon Lewis If enabled, the library will be built unless you 6047aa0a607SDon Lewis specify --with-system-hunspell to use the library 6057aa0a607SDon Lewis already present on your system. 6067aa0a607SDon Lewis If disabled, the Spell Checking component will also 6077aa0a607SDon Lewis be disabled. 6087aa0a607SDon Lewis (Default: hunspell disabled) 6097aa0a607SDon Lewis],,enable_hunspell=no) 6107aa0a607SDon LewisAC_ARG_WITH(system-hunspell, 6117aa0a607SDon Lewis[ --with-system-hunspell Use libhunspell already on system 6127aa0a607SDon Lewis],,) 6137aa0a607SDon LewisAC_ARG_WITH(system-mythes, 6147aa0a607SDon Lewis[ --with-system-mythes Use mythes already on system 6157aa0a607SDon Lewis],,) 6167aa0a607SDon LewisAC_ARG_ENABLE(hyphen, 6177aa0a607SDon Lewis[ --enable-hyphen Determines whether to enable the Hyphen library. 6187aa0a607SDon Lewis If enabled, the library will be built unless you 6197aa0a607SDon Lewis specify --with-system-hyphen to use the library 6207aa0a607SDon Lewis already present on your system. 6217aa0a607SDon Lewis If disabled, the Hyphenator component will also 6227aa0a607SDon Lewis be disabled. 6237aa0a607SDon Lewis (Default: hyphen disabled) 6247aa0a607SDon Lewis],,enable_hyphen=no) 6257aa0a607SDon LewisAC_ARG_WITH(system-hyphen, 6267aa0a607SDon Lewis[ --with-system-hyphen Use libhypeh already on system 6277aa0a607SDon Lewis],,) 6287aa0a607SDon LewisAC_ARG_WITH(system-libtextcat, 6297aa0a607SDon Lewis[ --with-system-libtextcat Use libtextcat already on system 6307aa0a607SDon Lewis],,) 6317aa0a607SDon LewisAC_ARG_WITH(external-libtextcat-data, 6327aa0a607SDon Lewis[ --with-system-libtextcat-data Use libtextcat data already on system 6337aa0a607SDon Lewis],,) 6347aa0a607SDon LewisAC_ARG_WITH(system-cppunit, 6357aa0a607SDon Lewis[ --with-system-cppunit Use cppunit already on system 6367aa0a607SDon Lewis],,) 6377aa0a607SDon LewisAC_ARG_WITH(system-redland, 6387aa0a607SDon Lewis[ --with-system-redland Use redland library already on system 6397aa0a607SDon Lewis],,) 6407aa0a607SDon LewisAC_ARG_WITH(stlport, 6417aa0a607SDon Lewis[ --with-stlport Only building --without-stlport is supported. 6427aa0a607SDon Lewis], WITH_STLPORT=$withval , WITH_STLPORT=no) 6437aa0a607SDon LewisAC_ARG_WITH(jdk-home, 6447aa0a607SDon Lewis[ --with-jdk-home if you have installed JDK 1.3 or later on your system 6457aa0a607SDon Lewis please supply the path here. 6467aa0a607SDon Lewis Note that this is not the location of the Java binary 6477aa0a607SDon Lewis but the location of the entire distribution. 6487aa0a607SDon Lewis 6497aa0a607SDon Lewis Usage: --with-jdk-home=<absolute path to JDK home> 6507aa0a607SDon Lewis],,) 6517aa0a607SDon LewisAC_ARG_WITH(gxx_include_path, 6527aa0a607SDon Lewis[ --with-gxx-include-path if you want to override the autodetected g++ include 6537aa0a607SDon Lewis path. 6547aa0a607SDon Lewis 6557aa0a607SDon Lewis Usage: --with-gxx-include-path=<absolute path to g++ include dir> 6567aa0a607SDon Lewis],,) 6577aa0a607SDon LewisAC_ARG_WITH(java, 6587aa0a607SDon Lewis[ --with-java Build with[[out]] Java support. If you use 6597aa0a607SDon Lewis --without-java/--with-java=no then the build will have 6607aa0a607SDon Lewis no support for Java components, applets, accessibility 6617aa0a607SDon Lewis or XML filters. 6627aa0a607SDon Lewis], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java) 6637aa0a607SDon LewisAC_ARG_ENABLE(gcjaot, 6647aa0a607SDon Lewis[ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation 6657aa0a607SDon Lewis support to speed up buildsi by compiling the jars also 6667aa0a607SDon Lewis to native code.. 6677aa0a607SDon Lewis --enable-gcjaot is only known to work with bytecode 6687aa0a607SDon Lewis created with gcj or ecj 6697aa0a607SDon Lewis],,) 6707aa0a607SDon LewisAC_ARG_WITH(ant-home, 6717aa0a607SDon Lewis[ --with-ant-home If you have installed Jakarta Ant on your system, 6727aa0a607SDon Lewis please supply the path here. 6737aa0a607SDon Lewis Note that this is not the location of the Ant binary 6747aa0a607SDon Lewis but the location of the entire distribution. 6757aa0a607SDon Lewis 6767aa0a607SDon Lewis Usage: --with-ant-home=<absolute path to Ant home> 6777aa0a607SDon Lewis],,) 6787aa0a607SDon LewisAC_ARG_WITH(junit, 6797aa0a607SDon Lewis[ --with-junit Specifies the JUnit 4 jar file to use for JUnit-based 6807aa0a607SDon Lewis tests. --without-junit disables those tests. Not 6817aa0a607SDon Lewis relevant in the --without-java case. 6827aa0a607SDon Lewis 6837aa0a607SDon Lewis Usage: --with-junit=<absolute path to JUnit 4 jar> 6847aa0a607SDon Lewis],,with_junit=yes) 6857aa0a607SDon LewisAC_ARG_WITH(perl-home, 6867aa0a607SDon Lewis[ --with-perl-home If you have installed the Perl 5 Distribution, on your 6877aa0a607SDon Lewis system, please supply the path here. 6887aa0a607SDon Lewis Note that this is not the location of the Perl binary 6897aa0a607SDon Lewis but the location of the entire distribution. 6907aa0a607SDon Lewis 6917aa0a607SDon Lewis Usage: --with-perl-home=<absolute path to Perl 5 home> 6927aa0a607SDon Lewis],,) 6937aa0a607SDon LewisAC_ARG_WITH(cl-home, 6947aa0a607SDon Lewis[ --with-cl-home For Windows NT users, please supply the path 6957aa0a607SDon Lewis for the Microsoft C/C++ compiler. 6967aa0a607SDon Lewis Note that this is not the location of the compiler 6977aa0a607SDon Lewis binary but the location of the entire distribution. 6987aa0a607SDon Lewis 6997aa0a607SDon Lewis Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home> 7007aa0a607SDon Lewis],,) 7017aa0a607SDon LewisAC_ARG_WITH(mspdb-path, 7027aa0a607SDon Lewis[ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the 7037aa0a607SDon Lewis path pointing to the mspdb71.dll (.NET 2003). 7047aa0a607SDon Lewis 7057aa0a607SDon Lewis Usage: --with-mspdb-path=<absolute path to mspdb71.dll> 7067aa0a607SDon Lewis],,) 7077aa0a607SDon LewisAC_ARG_WITH(midl-path, 7087aa0a607SDon Lewis[ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply 7097aa0a607SDon Lewis the path pointing to the midl.exe. 7107aa0a607SDon Lewis 7117aa0a607SDon Lewis Usage: --with-midl-path=<absolute path to midl.exe> 7127aa0a607SDon Lewis],,) 7137aa0a607SDon LewisAC_ARG_WITH(csc-path, 7147aa0a607SDon Lewis[ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply 7157aa0a607SDon Lewis the path pointing to the csc.exe. 7167aa0a607SDon Lewis 7177aa0a607SDon Lewis Usage: --with-csc-path=<absolute path to csc.exe> 7187aa0a607SDon Lewis],,) 7197aa0a607SDon LewisAC_ARG_WITH(nsis-path, 7207aa0a607SDon Lewis[ --with-nsis-path For Windows users, please supply the path to the 7217aa0a607SDon Lewis "Nullsoft Scriptable Install System" (NSIS). If NSIS 7227aa0a607SDon Lewis is found in the path or this option is supplied a self 7237aa0a607SDon Lewis contained executable installer for Apache OpenOffice 7247aa0a607SDon Lewis will be created. 7257aa0a607SDon Lewis 7267aa0a607SDon Lewis Usage: --with-nsis-path=<absolute path to nsis.exe> 7277aa0a607SDon Lewis],,) 7287aa0a607SDon LewisAC_ARG_WITH(frame-home, 7297aa0a607SDon Lewis[ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply 7307aa0a607SDon Lewis the path pointing to lib/mscoree.lib, usually 7317aa0a607SDon Lewis something like: 7327aa0a607SDon Lewis "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK" 7337aa0a607SDon Lewis 7347aa0a607SDon Lewis MS Visual Toolkit compiler users, please supply the 7357aa0a607SDon Lewis path pointing to lib/msvcrt.lib, usually something 7367aa0a607SDon Lewis like: 7377aa0a607SDon Lewis "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7" 7387aa0a607SDon Lewis 7397aa0a607SDon Lewis Usage: --with-frame-home=<absolute path to Framework SDK [[home]]> 7407aa0a607SDon Lewis],,) 7417aa0a607SDon LewisAC_ARG_WITH(psdk-home, 7427aa0a607SDon Lewis[ --with-psdk-home For Windows users, please supply the path to the 7437aa0a607SDon Lewis Microsoft Platform SDK. 7447aa0a607SDon Lewis 7457aa0a607SDon Lewis Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK> 7467aa0a607SDon Lewis],,) 7477aa0a607SDon LewisAC_ARG_WITH(directx-home, 7487aa0a607SDon Lewis[ --with-directx-home For Windows users, please supply the path to the 7497aa0a607SDon Lewis Microsoft DirectX SDK. 7507aa0a607SDon Lewis 7517aa0a607SDon Lewis Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK> 7527aa0a607SDon Lewis],,) 7537aa0a607SDon LewisAC_ARG_WITH(mozilla-build, 7547aa0a607SDon Lewis[ --with-mozilla-build For Windows users, please supply the path to the 7557aa0a607SDon Lewis mozilla build tools. 7567aa0a607SDon Lewis 7577aa0a607SDon Lewis Usage: --with-mozilla-build=<absolute path to mozilla build tools> 7587aa0a607SDon Lewis 7597aa0a607SDon Lewis At the moment of this writing, an installer for the mozilla build tools 7607aa0a607SDon Lewis can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32. 7617aa0a607SDon Lewis],[MOZILLABUILD=$withval],) 7627aa0a607SDon LewisAC_ARG_WITH(local-solenv, 7637aa0a607SDon Lewis[ --with-local-solenv If you have solenv in a location other than ./solenv, 7647aa0a607SDon Lewis please supply the path here. 7657aa0a607SDon Lewis 7667aa0a607SDon Lewis Usage: --with-local-solenv=<absolute path to solenv> 7677aa0a607SDon Lewis],,) 7687aa0a607SDon LewisAC_ARG_WITH(local-solver, 7697aa0a607SDon Lewis[ --with-local-solver if you have solver in a location other than ./solver, 7707aa0a607SDon Lewis please supply the path here. 7717aa0a607SDon Lewis 7727aa0a607SDon Lewis Usage: --with-local-solver=<absolute path to solver> 7737aa0a607SDon Lewis],,) 7747aa0a607SDon LewisAC_ARG_ENABLE(javascript, 7757aa0a607SDon Lewis[ --disable-javascript Disables support for JavaScript macros. 7767aa0a607SDon Lewis],,) 7777aa0a607SDon LewisAC_ARG_WITH(system-apr, 7787aa0a607SDon Lewis[ --with-system-apr Use apr library already installed on the system 7797aa0a607SDon Lewis],,) 7807aa0a607SDon LewisAC_ARG_WITH(system-apr-util, 7817aa0a607SDon Lewis[ --with-system-apr-util Use apr-util library already installed on the system 7827aa0a607SDon Lewis],,) 7837aa0a607SDon LewisAC_ARG_WITH(system-serf, 7847aa0a607SDon Lewis[ --with-system-serf Use serf library already installed on the system 7857aa0a607SDon Lewis],,) 7867aa0a607SDon LewisAC_ARG_WITH(system-coinmp, 7877aa0a607SDon Lewis[ --with-system-coinmp Use CoinMP library already installed on the system 7887aa0a607SDon Lewis],,) 7897aa0a607SDon LewisAC_ARG_ENABLE(coinmp, 7907aa0a607SDon Lewis[ --disable-coinmp Do not use CoinMP as the Calc solver. 7917aa0a607SDon Lewis],,) 7927aa0a607SDon LewisAC_ARG_ENABLE(check-only, 7937aa0a607SDon Lewis[ --enable-check-only Use this option option if you just want to check your 7947aa0a607SDon Lewis environment. This option stops the generation of an 7957aa0a607SDon Lewis ????env.set 7967aa0a607SDon Lewis 7977aa0a607SDon Lewis Usage: --enable-check-only=yes 7987aa0a607SDon Lewis],,) 7997aa0a607SDon LewisAC_ARG_ENABLE(ccache-skip, 8007aa0a607SDon Lewis[[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to 8017aa0a607SDon Lewis escape compiler flags that would otherwise prevent 8027aa0a607SDon Lewis caching of the result (currently used on Mac only) 8037aa0a607SDon Lewis NOTE: requires patched version because of a bug in 8047aa0a607SDon Lewis ccache (see issue 104567 for details and patch) 8057aa0a607SDon Lewis explicitly enable if your version of ccache does not 8067aa0a607SDon Lewis identify as version 2.4_OOo 8077aa0a607SDon Lewis]],,enable_ccache_skip=auto) 8087aa0a607SDon LewisAC_ARG_WITH(lang, 8097aa0a607SDon Lewis[ --with-lang Use this option to build Apache OpenOffice with 8107aa0a607SDon Lewis additional language support. English (US) is always 8117aa0a607SDon Lewis included by default. Separate multiple languages with 8127aa0a607SDon Lewis space. For all languages, use --with-lang=ALL. 8137aa0a607SDon Lewis 8147aa0a607SDon Lewis Usage: --with-lang="es sw tu cs sk" 8157aa0a607SDon Lewis],,) 8167aa0a607SDon LewisAC_ARG_WITH(poor-help-localizations, 8177aa0a607SDon Lewis[ --with-poor-help-localizations 8187aa0a607SDon Lewis Use this option to specify which languages have 8197aa0a607SDon Lewis unusable help localizations. Separate multiple 8207aa0a607SDon Lewis languages with space. 8217aa0a607SDon Lewis 8227aa0a607SDon Lewis Usage: --with-poor-help-localizations="af ar be-BY ca" 8237aa0a607SDon Lewis],,) 8247aa0a607SDon LewisAC_ARG_WITH(dict, 8257aa0a607SDon Lewis[ --with-dict Use this option to build Apache OpenOffice with 8267aa0a607SDon Lewis dictionary support. ALL dictionaries are always 8277aa0a607SDon Lewis included by default unless overridden with 8287aa0a607SDon Lewis this option. Separate multiple dictionaries with 8297aa0a607SDon Lewis commas. For all dictionaries, use --with-dict=ALL. 8307aa0a607SDon Lewis 8317aa0a607SDon Lewis Usage: --with-dict=ENGB,ENUS,ITIT 8327aa0a607SDon Lewis],,) 8337aa0a607SDon LewisAC_ARG_WITH(intro-bitmaps, 8347aa0a607SDon Lewis[ --with-intro-bitmaps Prefer the specified intro bitmaps over the 8357aa0a607SDon Lewis the default one. Can be more than one (separated by 8367aa0a607SDon Lewis commas), the order means priority of fallback if the 8377aa0a607SDon Lewis first does not exist (in the installed tree). 8387aa0a607SDon Lewis 8397aa0a607SDon Lewis Usage: --with-intro-bitmaps=/path/my_ooo_intro.png 8407aa0a607SDon Lewis],,) 8417aa0a607SDon LewisAC_ARG_WITH(about-bitmaps, 8427aa0a607SDon Lewis[ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows 8437aa0a607SDon Lewis specification of bitmaps for the About box. 8447aa0a607SDon Lewis 8457aa0a607SDon Lewis Usage: --with-about-bitmaps=/path/my_ooo_about.png 8467aa0a607SDon Lewis],,) 8477aa0a607SDon LewisAC_ARG_WITH(vendor, 8487aa0a607SDon Lewis[ --with-vendor Set vendor of the build. 8497aa0a607SDon Lewis 8507aa0a607SDon Lewis Usage: --with-vendor="John the Builder" 8517aa0a607SDon Lewis],,) 8527aa0a607SDon LewisAC_ARG_WITH(unix-wrapper, 8537aa0a607SDon Lewis[ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used 8547aa0a607SDon Lewis in the desktop files and in the desktop-integration RPMs. 8557aa0a607SDon Lewis 8567aa0a607SDon Lewis Usage: --with-unix-wrapper=ooffice 8577aa0a607SDon Lewis],,) 8587aa0a607SDon LewisAC_ARG_WITH(asm-home, 8597aa0a607SDon Lewis[ --with-asm-home For Windows users, please supply the path for the 8607aa0a607SDon Lewis ml.exe assembler. 8617aa0a607SDon Lewis 8627aa0a607SDon Lewis Usage: --with-asm-home=<path to ml.exe directory> 8637aa0a607SDon Lewis],,) 8647aa0a607SDon LewisAC_ARG_WITH(nasm-home, 8657aa0a607SDon Lewis[ --with-nasm-home For Windows users, please supply the path for the 8667aa0a607SDon Lewis nasm.exe assembler. 8677aa0a607SDon Lewis 8687aa0a607SDon Lewis Usage: --with-nasm-home=<path to nasm.exe directory> 8697aa0a607SDon Lewis],,) 8707aa0a607SDon LewisAC_ARG_WITH(os-version, 8717aa0a607SDon Lewis[ --with-os-version For FreeBSD users, use this option option to override 8727aa0a607SDon Lewis the detected OSVERSION. 8737aa0a607SDon Lewis 8747aa0a607SDon Lewis Usage: --with-os-version=<OSVERSION> 8757aa0a607SDon Lewis],,) 8767aa0a607SDon LewisAC_ARG_WITH(unzip-home, 8777aa0a607SDon Lewis[ --with-unzip-home Deprecated: use --with-zip-home instead],,) 8787aa0a607SDon LewisAC_ARG_WITH(zip-home, 8797aa0a607SDon Lewis[ --with-zip-home If you use a non standard zip, for example windows 8807aa0a607SDon Lewis please supply the path for zip 8817aa0a607SDon Lewis 8827aa0a607SDon Lewis Usage: --with-zip-home=<path to zip executable> 8837aa0a607SDon Lewis],,) 8847aa0a607SDon LewisAC_ARG_WITH(mingwin, 8857aa0a607SDon Lewis[ --with-mingwin For Windows users, use the mingwin32 compiler within 8867aa0a607SDon Lewis cygwin environment 8877aa0a607SDon Lewis 8887aa0a607SDon Lewis Usage: --with-mingwin=yes 8897aa0a607SDon Lewis 8907aa0a607SDon Lewis For !Windows use, use the mingw32 C++ compiler to 8917aa0a607SDon Lewis (re-) build unowinreg.dll. Specify the MinGW C++ 8927aa0a607SDon Lewis Compilers name. 8937aa0a607SDon Lewis 8947aa0a607SDon Lewis Usage: --with-mingwin=i586-mingw32msvc-g++ 8957aa0a607SDon Lewis],WITH_MINGWIN=$withval,WITH_MINGWIN=0) 8967aa0a607SDon LewisAC_ARG_WITH(build-version, 8977aa0a607SDon Lewis[ --with-build-version Allows the builder to add a custom version tag 8987aa0a607SDon Lewis that will appear in the Help/About box for QA 8997aa0a607SDon Lewis purposes. 9007aa0a607SDon Lewis 9017aa0a607SDon Lewis Usage: --with-build-version="Built by Jim" 9027aa0a607SDon Lewis],with_build_version=$withval) 9037aa0a607SDon LewisAC_ARG_WITH(alloc, 9047aa0a607SDon Lewis[ --with-alloc Define which allocator to build with 9057aa0a607SDon Lewis (choices are oo, system, tcmalloc, jemalloc) 9067aa0a607SDon Lewis 9077aa0a607SDon Lewis Note that on FreeBSD/NetBSD system==jemalloc 9087aa0a607SDon Lewis],,) 9097aa0a607SDon LewisAC_ARG_ENABLE(verbose, 9107aa0a607SDon Lewis[ --enable-verbose Increase build verbosity. 9117aa0a607SDon Lewis --disable-verbose Decrease build verbosity. 9127aa0a607SDon Lewis],,) 9137aa0a607SDon LewisAC_ARG_ENABLE(dependency-tracking, 9147aa0a607SDon Lewis[ --disable-dependency-tracking Disables generation of dependency information. 9157aa0a607SDon Lewis],,) 9167aa0a607SDon LewisAC_ARG_ENABLE(category-b, 9177aa0a607SDon Lewis[ --enable-category-b Activate components under a category B license 9187aa0a607SDon Lewis (see http://www.apache.org/legal/3party.html#category-b): 9197aa0a607SDon Lewis MPL (seamonkey, hunspell, hyphen, nss, saxon, rhino), 9207aa0a607SDon Lewis CPL (silgraphite), CPL/EPL (CoinMP), SPL (beanshell), 9217aa0a607SDon Lewis OFL (fonts). 9227aa0a607SDon Lewis Flags for individual libraries override this one. 9237aa0a607SDon Lewis],,) 9247aa0a607SDon LewisAC_ARG_WITH(arm-target, 9257aa0a607SDon Lewis[ --arm-target The minimal targeted arm processor 9267aa0a607SDon Lewis used for the build environment. 9277aa0a607SDon Lewis Cases : 9287aa0a607SDon Lewis arm-target < 6 : armv4t compatibility 9297aa0a607SDon Lewis arm-target = 6 : exact armv6 compatibility 9307aa0a607SDon Lewis arm-target > 6 : armv7-a compatibility 9317aa0a607SDon Lewis 9327aa0a607SDon Lewis Usage: --with-arm-target=7 9337aa0a607SDon Lewis],with_arm_target=$withval,with_arm_target=4) 9347aa0a607SDon LewisAC_ARG_WITH(rat-scan, 9357aa0a607SDon Lewis[ --with-rat-scan Scan source code for license headers. 9367aa0a607SDon Lewis Use as --with-rat-scan to automatically download pre-built Rat binaries. 9377aa0a607SDon Lewis Alternatively use as --with-rat-scan=<path-to-rat-direcetory> to use 9387aa0a607SDon Lewis a separately installed library. 9397aa0a607SDon Lewis],with_rat_scan=$withval,) 9407aa0a607SDon Lewis 9417aa0a607SDon LewisBUILD_TYPE="OOo" 9427aa0a607SDon LewisADDITIONAL_REPOSITORIES="../ext_libraries" 9437aa0a607SDon LewisSCPDEFS="" 9447aa0a607SDon Lewis 9457aa0a607SDon Lewisdnl =================================================================== 9467aa0a607SDon Lewisdnl Check configure script vs. configure.in 9477aa0a607SDon Lewisdnl =================================================================== 9487aa0a607SDon LewisAC_MSG_CHECKING([whether configure is up-to-date]) 9497aa0a607SDon Lewisif test "configure" -ot "configure.in"; then 9507aa0a607SDon Lewis AC_MSG_RESULT([no]) 9517aa0a607SDon Lewis AC_MSG_ERROR([configure is not up-to-date, run autoconf first!]) 9527aa0a607SDon Lewiselse 9537aa0a607SDon Lewis AC_MSG_RESULT([yes]) 9547aa0a607SDon Lewisfi 9557aa0a607SDon Lewisdnl =================================================================== 9567aa0a607SDon Lewisdnl Message. 9577aa0a607SDon Lewisdnl =================================================================== 9587aa0a607SDon Lewisecho "********************************************************************" 9597aa0a607SDon Lewisecho "* *" 9607aa0a607SDon Lewisecho "* Apache OpenOffice build configuration. *" 9617aa0a607SDon Lewisecho "* *" 9627aa0a607SDon Lewisecho "* The configure process checks your platform to see whether *" 9637aa0a607SDon Lewisecho "* you can build Apache OpenOffice on it. *" 9647aa0a607SDon Lewisecho "* This process checks all pre-requisites and generates a file *" 9657aa0a607SDon Lewisecho "* containing the necessary environment variables. *" 9667aa0a607SDon Lewisecho "* Source this file after configure has ended successfully. *" 9677aa0a607SDon Lewisecho "* *" 9687aa0a607SDon Lewisecho "* Warnings that are generated during the configure process *" 9697aa0a607SDon Lewisecho "* must be taken into account since it can be a reason for *" 9707aa0a607SDon Lewisecho "* an unsuccessful build of Apache OpenOffice. *" 9717aa0a607SDon Lewisecho "* *" 9727aa0a607SDon Lewisecho "********************************************************************" 9737aa0a607SDon Lewisecho "" 9747aa0a607SDon Lewisecho "********************************************************************" 9757aa0a607SDon Lewisecho "* *" 9767aa0a607SDon Lewisecho "* Checking the platform pre-requisites. *" 9777aa0a607SDon Lewisecho "* *" 9787aa0a607SDon Lewisecho "********************************************************************" 9797aa0a607SDon Lewisecho "" 9807aa0a607SDon Lewisdnl =================================================================== 9817aa0a607SDon Lewisdnl Configure pre-requisites. 9827aa0a607SDon Lewisdnl =================================================================== 9837aa0a607SDon Lewiscat /dev/null > warn 9847aa0a607SDon Lewis 9857aa0a607SDon LewisAC_PROG_EGREP 9867aa0a607SDon LewisAC_PROG_AWK 9877aa0a607SDon LewisAC_PATH_PROG( AWK, $AWK) 9887aa0a607SDon Lewisif test -z "$AWK"; then 9897aa0a607SDon Lewis AC_MSG_ERROR([install awk to run this script]) 9907aa0a607SDon Lewisfi 9917aa0a607SDon Lewis 9927aa0a607SDon LewisAC_PATH_PROGS(SED, sed ) 9937aa0a607SDon Lewisif test -z "$SED"; then 9947aa0a607SDon Lewis AC_MSG_ERROR([install sed to run this script]) 9957aa0a607SDon Lewisfi 9967aa0a607SDon Lewis 9977aa0a607SDon LewisAC_MSG_CHECKING([for solenv environment]) 9987aa0a607SDon Lewisif test -z "$with_local_solenv"; then 9997aa0a607SDon Lewis LOCAL_SOLENV="DEFAULT" 10007aa0a607SDon Lewis AC_MSG_RESULT([default]) 10017aa0a607SDon Lewiselse 10027aa0a607SDon Lewis LOCAL_SOLENV=$with_local_solenv 10037aa0a607SDon Lewis AC_MSG_RESULT([$with_local_solenv]) 10047aa0a607SDon Lewisfi 10057aa0a607SDon LewisAC_SUBST(LOCAL_SOLENV) 10067aa0a607SDon Lewis 10077aa0a607SDon Lewisif test "$LOCAL_SOLENV" = "DEFAULT"; then 10087aa0a607SDon Lewis _solenv="./solenv" 10097aa0a607SDon Lewiselse 10107aa0a607SDon Lewis _solenv="$LOCAL_SOLENV" 10117aa0a607SDon Lewisfi 10127aa0a607SDon LewisAC_SUBST(_solenv) 10137aa0a607SDon Lewis 10147aa0a607SDon Lewisif test -e $_solenv/inc/minor.mk; then 10157aa0a607SDon Lewis # Get UPD number from ./solenv/inc/minor.mk 10167aa0a607SDon Lewis UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" 10177aa0a607SDon Lewis AC_SUBST(UPD) 10187aa0a607SDon Lewis SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" 10197aa0a607SDon Lewis AC_SUBST(SOURCEVERSION) 10207aa0a607SDon Lewiselse 10217aa0a607SDon Lewis AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...]) 10227aa0a607SDon Lewisfi 10237aa0a607SDon Lewis 10247aa0a607SDon Lewis 10257aa0a607SDon Lewisdnl ================================================================== 10267aa0a607SDon Lewisdnl Checks for custom pack.lst 10277aa0a607SDon Lewisdnl ================================================================== 10287aa0a607SDon LewisAC_MSG_CHECKING([for custom pack.lst]) 10297aa0a607SDon LewisCUSTOM_PACK_LIST= 10307aa0a607SDon LewisUSE_PACKAGER= 10317aa0a607SDon Lewisif test -n "$with_packager_list" ; then 10327aa0a607SDon Lewis if test -e $with_packager_list; then 10337aa0a607SDon Lewis CUSTOM_PACK_LIST=$with_packager_list 10347aa0a607SDon Lewis USE_PACKAGER=YES 10357aa0a607SDon Lewis fi 10367aa0a607SDon Lewisfi 10377aa0a607SDon Lewisif test -n "$CUSTOM_PACK_LIST"; then 10387aa0a607SDon Lewis AC_MSG_RESULT([$CUSTOM_PACK_LIST]) 10397aa0a607SDon Lewiselse 10407aa0a607SDon Lewis AC_MSG_RESULT([no]) 10417aa0a607SDon Lewisfi 10427aa0a607SDon LewisAC_SUBST(CUSTOM_PACK_LIST) 10437aa0a607SDon LewisAC_SUBST(USE_PACKAGER) 10447aa0a607SDon Lewis 10457aa0a607SDon Lewis 10467aa0a607SDon Lewisdnl =================================================================== 10477aa0a607SDon Lewisdnl Checks for the operating system and processor. 10487aa0a607SDon Lewisdnl =================================================================== 10497aa0a607SDon LewisAC_CANONICAL_SYSTEM 10507aa0a607SDon Lewisif test "$build" != "$host" -o "$build" != "$target" \ 10517aa0a607SDon Lewis -o "$host" != "$target"; then 10527aa0a607SDon Lewis AC_MSG_WARN([cross-compiling by any means is not supported (yet)!]) 10537aa0a607SDon Lewis echo "cross-compiling by any means is not supported (yet)!" >> warn 10547aa0a607SDon Lewisfi 10557aa0a607SDon Lewis 10567aa0a607SDon Lewisif echo "$build_os" | grep cygwin; then 10577aa0a607SDon Lewis AC_MSG_CHECKING([Cygwin version]) 10587aa0a607SDon Lewis CygwinVer=`uname -r` 10597aa0a607SDon Lewis AC_MSG_RESULT([$CygwinVer]) 10607aa0a607SDon Lewis if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then 10617aa0a607SDon Lewis AC_MSG_ERROR([You need at least Cygwin V1.5.x]) 10627aa0a607SDon Lewis fi 10637aa0a607SDon Lewiselse 10647aa0a607SDon Lewis CygwinVer="false" 10657aa0a607SDon Lewisfi 10667aa0a607SDon Lewis 10677aa0a607SDon Lewis# get info about the system provided release/version details 10687aa0a607SDon Lewishead /etc/*-release 10697aa0a607SDon Lewisuname -a 10707aa0a607SDon Lewis 10717aa0a607SDon Lewisdnl =================================================================== 10727aa0a607SDon Lewisdnl The following is a list of supported systems. 10737aa0a607SDon Lewisdnl Sequential to keep the logic very simple 10747aa0a607SDon Lewisdnl These values may be checked and reset later. 10757aa0a607SDon Lewisdnl =================================================================== 10767aa0a607SDon Lewiscase "$build_os" in 10777aa0a607SDon Lewis solaris*) 10787aa0a607SDon Lewis test_gtk=yes 10797aa0a607SDon Lewis test_cairo=yes 10807aa0a607SDon Lewis test_kde=yes 10817aa0a607SDon Lewis test_cups=yes 10827aa0a607SDon Lewis test_randr=yes 10837aa0a607SDon Lewis test_freetype=yes 10847aa0a607SDon Lewis test_gstreamer=yes 10857aa0a607SDon Lewis _os=SunOS 10867aa0a607SDon Lewis AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin) 10877aa0a607SDon Lewis if test -z "$GNUTAR"; then 10887aa0a607SDon Lewis AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).]) 10897aa0a607SDon Lewis fi 10907aa0a607SDon Lewis AC_SUBST(GNUTAR) 10917aa0a607SDon Lewis 10927aa0a607SDon Lewis dnl =========================================================== 10937aa0a607SDon Lewis dnl check whether we're using solaris 6,7,8 - sparc or intel. 10947aa0a607SDon Lewis dnl =========================================================== 10957aa0a607SDon Lewis AC_MSG_CHECKING([the Solaris operating system release]) 10967aa0a607SDon Lewis _os_release=`echo $build_os | $SED -e s/solaris2\.//` 10977aa0a607SDon Lewis if test "$_os_release" -lt "6"; then 10987aa0a607SDon Lewis AC_MSG_ERROR([use solaris >= 6 to build Apache OpenOffice]) 10997aa0a607SDon Lewis else 11007aa0a607SDon Lewis AC_MSG_RESULT([ok ($_os_release)]) 11017aa0a607SDon Lewis fi 11027aa0a607SDon Lewis 11037aa0a607SDon Lewis dnl check whether we're using a sparc or i386 processor 11047aa0a607SDon Lewis AC_MSG_CHECKING([the processor type]) 11057aa0a607SDon Lewis if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then 11067aa0a607SDon Lewis AC_MSG_RESULT([ok ($build_cpu)]) 11077aa0a607SDon Lewis else 11087aa0a607SDon Lewis AC_MSG_ERROR([only sparc and i386 processors are supported]) 11097aa0a607SDon Lewis fi 11107aa0a607SDon Lewis ;; 11117aa0a607SDon Lewis linux-gnu*|k*bsd*-gnu*) 11127aa0a607SDon Lewis test_gtk=yes 11137aa0a607SDon Lewis test_cairo=yes 11147aa0a607SDon Lewis test_kde=yes 11157aa0a607SDon Lewis test_kde4=yes 11167aa0a607SDon Lewis test_cups=yes 11177aa0a607SDon Lewis test_randr=yes 11187aa0a607SDon Lewis test_freetype=yes 11197aa0a607SDon Lewis test_gstreamer=yes 11207aa0a607SDon Lewis _os=Linux 11217aa0a607SDon Lewis ;; 11227aa0a607SDon Lewis gnu) 11237aa0a607SDon Lewis test_cups=no 11247aa0a607SDon Lewis _os=GNU 11257aa0a607SDon Lewis ;; 11267aa0a607SDon Lewis cygwin*) # Windows 11277aa0a607SDon Lewis test_cups=no 11287aa0a607SDon Lewis test_cairo=yes 11297aa0a607SDon Lewis test_freetype=no 11307aa0a607SDon Lewis test_gstreamer=no 11317aa0a607SDon Lewis _os=WINNT 11327aa0a607SDon Lewis ;; 11337aa0a607SDon Lewis darwin*) # Mac OS X 11347aa0a607SDon Lewis test_cups=yes 11357aa0a607SDon Lewis test_gtk=yes 11367aa0a607SDon Lewis test_cairo=yes 11377aa0a607SDon Lewis test_randr=no 11387aa0a607SDon Lewis test_freetype=no 11397aa0a607SDon Lewis test_gstreamer=no 11407aa0a607SDon Lewis _os=Darwin 11417aa0a607SDon Lewis if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then 11427aa0a607SDon Lewis AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray]) 11437aa0a607SDon Lewis echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn 11447aa0a607SDon Lewis enable_systray=no 11457aa0a607SDon Lewis fi 11467aa0a607SDon Lewis if test ! -n "$CC"; then 11477aa0a607SDon Lewis CC="`xcrun -f clang` -arch x86_64" 11487aa0a607SDon Lewis fi 11497aa0a607SDon Lewis if test ! -n "$CXX"; then 1150746748b1SJim Jagielski CXX="`xcrun -f clang++` -arch x86_64 -std=c++11" 11517aa0a607SDon Lewis fi 11527aa0a607SDon Lewis ;; 11537aa0a607SDon Lewis os2*) 11547aa0a607SDon Lewis test_x=no 11557aa0a607SDon Lewis test_cups=no 11567aa0a607SDon Lewis test_randr=no 11577aa0a607SDon Lewis test_gtk=no 11587aa0a607SDon Lewis test_freetype=no 11597aa0a607SDon Lewis test_gstreamer=no 11607aa0a607SDon Lewis _os=OS2 11617aa0a607SDon Lewis ;; 11627aa0a607SDon Lewis freebsd*) 11637aa0a607SDon Lewis test_gtk=yes 11647aa0a607SDon Lewis test_cairo=yes 11657aa0a607SDon Lewis test_kde=yes 11667aa0a607SDon Lewis test_kde4=yes 11677aa0a607SDon Lewis test_cups=yes 11687aa0a607SDon Lewis test_randr=yes 11697aa0a607SDon Lewis test_freetype=yes 11707aa0a607SDon Lewis test_gstreamer=yes 11717aa0a607SDon Lewis AC_MSG_CHECKING([the FreeBSD operating system release]) 11727aa0a607SDon Lewis if test -n "$with_os_version"; then 11737aa0a607SDon Lewis OSVERSION="$with_os_version" 11747aa0a607SDon Lewis else 11757aa0a607SDon Lewis OSVERSION=`/sbin/sysctl -n kern.osreldate` 11767aa0a607SDon Lewis fi 11777aa0a607SDon Lewis AC_MSG_RESULT([found OSVERSION=$OSVERSION]) 11787aa0a607SDon Lewis AC_MSG_CHECKING([which thread library to use]) 11797aa0a607SDon Lewis if test "$OSVERSION" -lt "500016"; then 11807aa0a607SDon Lewis PTHREAD_CFLAGS="-D_THREAD_SAFE" 11817aa0a607SDon Lewis PTHREAD_LIBS="-pthread" 11827aa0a607SDon Lewis elif test "$OSVERSION" -lt "502102"; then 11837aa0a607SDon Lewis PTHREAD_CFLAGS="-D_THREAD_SAFE" 11847aa0a607SDon Lewis PTHREAD_LIBS="-lc_r" 11857aa0a607SDon Lewis else 11867aa0a607SDon Lewis PTHREAD_CFLAGS="" 11877aa0a607SDon Lewis PTHREAD_LIBS="-pthread" 11887aa0a607SDon Lewis fi 11897aa0a607SDon Lewis AC_MSG_RESULT([$PTHREAD_LIBS]) 11907aa0a607SDon Lewis _os=FreeBSD 11917aa0a607SDon Lewis ;; 11927aa0a607SDon Lewis osf) 11937aa0a607SDon Lewis test_cups=no 11947aa0a607SDon Lewis test_randr=no 11957aa0a607SDon Lewis _os=OSF1 11967aa0a607SDon Lewis ;; 11977aa0a607SDon Lewis netbsd) 11987aa0a607SDon Lewis test_gtk=yes 11997aa0a607SDon Lewis test_cairo=yes 12007aa0a607SDon Lewis test_kde=yes 12017aa0a607SDon Lewis test_kde4=yes 12027aa0a607SDon Lewis test_cups=no 12037aa0a607SDon Lewis test_randr=yes 12047aa0a607SDon Lewis test_freetype=yes 12057aa0a607SDon Lewis test_gstreamer=yes 12067aa0a607SDon Lewis PTHREAD_CFLAGS="-pthread" 12077aa0a607SDon Lewis PTHREAD_LIBS="-pthread -lpthread" 12087aa0a607SDon Lewis _os=NetBSD 12097aa0a607SDon Lewis ;; 12107aa0a607SDon Lewis aix*) 12117aa0a607SDon Lewis test_cups=no 12127aa0a607SDon Lewis test_randr=no 12137aa0a607SDon Lewis test_freetype=yes 12147aa0a607SDon Lewis test_gstreamer=yes 12157aa0a607SDon Lewis PTHREAD_LIBS=-pthread 12167aa0a607SDon Lewis echo "AIX is an alpha port --- Use at own risk" >> warn 12177aa0a607SDon Lewis _os=AIX 12187aa0a607SDon Lewis ;; 12197aa0a607SDon Lewis *) 12207aa0a607SDon Lewis AC_MSG_ERROR([$_os operating system is not suitable to build Apache OpenOffice!]) 12217aa0a607SDon Lewis ;; 12227aa0a607SDon Lewisesac 12237aa0a607SDon Lewis 12247aa0a607SDon LewisAC_SUBST(OSVERSION) 12257aa0a607SDon LewisAC_SUBST(PTHREAD_CFLAGS) 12267aa0a607SDon LewisAC_SUBST(PTHREAD_LIBS) 12277aa0a607SDon Lewis 12287aa0a607SDon Lewis 12297aa0a607SDon Lewisdnl Ensure pkg-config is initialized before any possible use 12307aa0a607SDon LewisPKG_PROG_PKG_CONFIG 12317aa0a607SDon Lewis 12327aa0a607SDon Lewis 12337aa0a607SDon Lewisdnl =================================================================== 12347aa0a607SDon Lewisdnl Set the ENABLE_CRASHDUMP variable. 12357aa0a607SDon Lewisdnl =================================================================== 12367aa0a607SDon LewisAC_MSG_CHECKING([whether to enable crashdump feature]) 12377aa0a607SDon Lewisif test "$enable_crashdump" = "yes"; then 12387aa0a607SDon Lewis ENABLE_CRASHDUMP="TRUE" 12397aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE CRASHREP" 12407aa0a607SDon Lewis AC_MSG_RESULT([yes]) 12417aa0a607SDon Lewiselse 12427aa0a607SDon Lewis ENABLE_CRASHDUMP="" 12437aa0a607SDon Lewis AC_MSG_RESULT([no]) 12447aa0a607SDon Lewisfi 12457aa0a607SDon LewisAC_SUBST(ENABLE_CRASHDUMP) 12467aa0a607SDon Lewis 12477aa0a607SDon Lewisif test "$_os" = "WINNT"; then 12487aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE TWAIN" 12497aa0a607SDon Lewisfi 12507aa0a607SDon Lewis 12517aa0a607SDon Lewisif test "$_os" = "WINNT"; then 12527aa0a607SDon Lewis dnl =================================================================== 12537aa0a607SDon Lewis dnl Set the VC_STANDARD variable. 12547aa0a607SDon Lewis dnl =================================================================== 12557aa0a607SDon Lewis AC_MSG_CHECKING([whether to use the standard non-optimizing compiler]) 12567aa0a607SDon Lewis if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then 12577aa0a607SDon Lewis VC_STANDARD="" 12587aa0a607SDon Lewis AC_MSG_RESULT([no]) 12597aa0a607SDon Lewis else 12607aa0a607SDon Lewis VC_STANDARD="TRUE" 12617aa0a607SDon Lewis AC_MSG_RESULT([yes]) 12627aa0a607SDon Lewis fi 12637aa0a607SDon Lewis AC_SUBST(VC_STANDARD) 12647aa0a607SDon Lewisfi 12657aa0a607SDon Lewis 12667aa0a607SDon Lewisif test "$_os" = "WINNT"; then 12677aa0a607SDon Lewis dnl =================================================================== 12687aa0a607SDon Lewis dnl Set the BUILD_X64 variable. 12697aa0a607SDon Lewis dnl =================================================================== 12707aa0a607SDon Lewis AC_MSG_CHECKING([whether to build/use the Windows 64bit shell extensions]) 12717aa0a607SDon Lewis if test "$enable_win_x64_shellext" = "" -o "$enable_win_x64_shellext" = "no"; then 12727aa0a607SDon Lewis BUILD_X64="" 12737aa0a607SDon Lewis AC_MSG_RESULT([no]) 12747aa0a607SDon Lewis else 12757aa0a607SDon Lewis BUILD_X64="TRUE" 12767aa0a607SDon Lewis AC_MSG_RESULT([yes]) 12777aa0a607SDon Lewis fi 12787aa0a607SDon Lewis AC_SUBST(BUILD_X64) 12797aa0a607SDon Lewisfi 12807aa0a607SDon Lewis 12817aa0a607SDon Lewisdnl =================================================================== 12827aa0a607SDon Lewisdnl Set the ENABLE_WERROR variable. (Activate --enable-werror) 12837aa0a607SDon Lewisdnl =================================================================== 12847aa0a607SDon LewisAC_MSG_CHECKING([whether to turn warnings to errors]) 12857aa0a607SDon Lewisif test -n "$enable_werror" && test "$enable_werror" != "no"; then 12867aa0a607SDon Lewis ENABLE_WERROR="TRUE" 12877aa0a607SDon Lewis AC_MSG_RESULT([yes]) 12887aa0a607SDon Lewis AC_MSG_WARN([Turning warnings to errors has no effect in modules or]) 12897aa0a607SDon Lewis AC_MSG_WARN([on platforms where it has been disabled explicitely]) 12907aa0a607SDon Lewis echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn 12917aa0a607SDon Lewiselse 12927aa0a607SDon Lewis ENABLE_WERROR="FALSE" 12937aa0a607SDon Lewis AC_MSG_RESULT([no]) 12947aa0a607SDon Lewisfi 12957aa0a607SDon LewisAC_SUBST(ENABLE_WERROR) 12967aa0a607SDon Lewis 12977aa0a607SDon Lewisdnl =================================================================== 12987aa0a607SDon Lewisdnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols) 12997aa0a607SDon Lewisdnl =================================================================== 13007aa0a607SDon LewisAC_MSG_CHECKING([whether to do a debug build]) 13017aa0a607SDon Lewisif test -n "$enable_debug" && test "$enable_debug" != "no"; then 13027aa0a607SDon Lewis ENABLE_DEBUG="TRUE" 13037aa0a607SDon Lewis if test -z "$enable_symbols"; then 13047aa0a607SDon Lewis enable_symbols="yes" 13057aa0a607SDon Lewis fi 13067aa0a607SDon Lewis AC_MSG_RESULT([yes]) 13077aa0a607SDon Lewiselse 13087aa0a607SDon Lewis ENABLE_DEBUG="FALSE" 13097aa0a607SDon Lewis AC_MSG_RESULT([no]) 13107aa0a607SDon Lewisfi 13117aa0a607SDon LewisAC_SUBST(ENABLE_DEBUG) 13127aa0a607SDon Lewis 13137aa0a607SDon Lewisdnl =================================================================== 13147aa0a607SDon Lewisdnl Set the ENABLE_DBGUTIL variable 13157aa0a607SDon Lewisdnl =================================================================== 13167aa0a607SDon LewisAC_MSG_CHECKING([whether to build with additional debug utilities]) 13177aa0a607SDon Lewisif test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then 13187aa0a607SDon Lewis PROEXT="" 13197aa0a607SDon Lewis PRODUCT="" 13207aa0a607SDon Lewis PROFULLSWITCH="" 13217aa0a607SDon Lewis AC_MSG_RESULT([yes]) 13227aa0a607SDon Lewiselse 13237aa0a607SDon Lewis PRODUCT="full" 13247aa0a607SDon Lewis PROFULLSWITCH="product=full" 13257aa0a607SDon Lewis PROEXT=".pro" 13267aa0a607SDon Lewis AC_MSG_RESULT([no, full product build]) 13277aa0a607SDon Lewisfi 13287aa0a607SDon LewisAC_SUBST(PRODUCT) 13297aa0a607SDon LewisAC_SUBST(PROFULLSWITCH) 13307aa0a607SDon LewisAC_SUBST(PROEXT) 13317aa0a607SDon Lewis 13327aa0a607SDon Lewisdnl =================================================================== 13337aa0a607SDon Lewisdnl First setting is whether to include symbols into final build. 13347aa0a607SDon Lewisdnl =================================================================== 13357aa0a607SDon LewisAC_MSG_CHECKING([whether to include symbols into final build]) 13367aa0a607SDon Lewisif test -n "$enable_symbols" && test "$enable_symbols" != "no"; then 13377aa0a607SDon Lewis if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then 13387aa0a607SDon Lewis ENABLE_SYMBOLS="TRUE" 13397aa0a607SDon Lewis AC_MSG_RESULT([yes]) 13407aa0a607SDon Lewis else 13417aa0a607SDon Lewis if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then 13427aa0a607SDon Lewis ENABLE_SYMBOLS="SMALL" 13437aa0a607SDon Lewis AC_MSG_RESULT([yes, small ones]) 13447aa0a607SDon Lewis else if test "$enable_symbols" != "no" ; then 13457aa0a607SDon Lewis echo enable symbols is: $enable_symbols 13467aa0a607SDon Lewis AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.]) 13477aa0a607SDon Lewis else 13487aa0a607SDon Lewis ENABLE_SYMBOLS= 13497aa0a607SDon Lewis fi 13507aa0a607SDon Lewis fi 13517aa0a607SDon Lewis fi 13527aa0a607SDon Lewiselse 13537aa0a607SDon Lewis ENABLE_SYMBOLS= 13547aa0a607SDon Lewis AC_MSG_RESULT([no]) 13557aa0a607SDon Lewisfi 13567aa0a607SDon LewisAC_SUBST(ENABLE_SYMBOLS) 13577aa0a607SDon Lewis 13587aa0a607SDon Lewisdnl =================================================================== 13597aa0a607SDon Lewisdnl Determine if the solver is to be stripped or not. 13607aa0a607SDon Lewisdnl =================================================================== 13617aa0a607SDon LewisAC_MSG_CHECKING([whether to strip the solver or not.]) 13627aa0a607SDon Lewisif test -n "$enable_strip_solver"; then 13637aa0a607SDon Lewis if test "$enable_strip_solver" = "yes"; then 13647aa0a607SDon Lewis DISABLE_STRIP= 13657aa0a607SDon Lewis else if test "$enable_strip_solver" = "no"; then 13667aa0a607SDon Lewis DISABLE_STRIP="TRUE" 13677aa0a607SDon Lewis else 13687aa0a607SDon Lewis AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.]) 13697aa0a607SDon Lewis fi 13707aa0a607SDon Lewis fi 13717aa0a607SDon Lewiselse 13727aa0a607SDon Lewis if test -n "$ENABLE_SYMBOLS"; then 13737aa0a607SDon Lewis DISABLE_STRIP="TRUE" 13747aa0a607SDon Lewis else 13757aa0a607SDon Lewis DISABLE_STRIP= 13767aa0a607SDon Lewis fi 13777aa0a607SDon Lewisfi 13787aa0a607SDon Lewisif test -z "$DISABLE_STRIP"; then 13797aa0a607SDon Lewis AC_MSG_RESULT([yes]) 13807aa0a607SDon Lewiselse 13817aa0a607SDon Lewis AC_MSG_RESULT([no]) 13827aa0a607SDon Lewisfi 13837aa0a607SDon LewisAC_SUBST(DISABLE_STRIP) 13847aa0a607SDon Lewis 13857aa0a607SDon Lewisdnl =================================================================== 13867aa0a607SDon Lewisdnl Build options 13877aa0a607SDon Lewisdnl =================================================================== 13887aa0a607SDon Lewis 13897aa0a607SDon Lewis# Disable or enable category-B librariets: nss, hunspell, hyphen, saxon, 13907aa0a607SDon Lewis# rhino, silgraphite, beanshell. 13917aa0a607SDon Lewis 13927aa0a607SDon Lewis# Note that further below they may be enabled or disabled again by 13937aa0a607SDon Lewis# more specific options. 13947aa0a607SDon Lewis 13957aa0a607SDon LewisENABLE_CATEGORY_B= 13967aa0a607SDon Lewis 13977aa0a607SDon LewisAC_MSG_CHECKING([whether to enable category B components]) 13987aa0a607SDon Lewis# Category B modules (libraries): 13997aa0a607SDon Lewis# nss (nss) 14007aa0a607SDon Lewis# hunspell (hunspell) 14017aa0a607SDon Lewis# hyphen (hyphen) 14027aa0a607SDon Lewis# saxon (saxon) 14037aa0a607SDon Lewis# rhino (rhino) 14047aa0a607SDon Lewis# beanshell (beanshell) 14057aa0a607SDon Lewis# graphite (silgraphite) 14067aa0a607SDon Lewisif test "$enable_category_b" = "yes"; then 14077aa0a607SDon Lewis ENABLE_CATEGORY_B=YES 14087aa0a607SDon Lewis enable_hunspell="yes" 14097aa0a607SDon Lewis enable_hyphen="yes" 14107aa0a607SDon Lewis enable_saxon="yes" 14117aa0a607SDon Lewis enable_javascript="yes" 14127aa0a607SDon Lewis enable_beanshell="yes" 14137aa0a607SDon Lewis enable_graphite="yes" 14147aa0a607SDon Lewis enable_coinmp="yes" 14157aa0a607SDon Lewis enable_category_b_fonts="yes" 14167aa0a607SDon Lewis 14177aa0a607SDon Lewis AC_MSG_RESULT([yes: allow modules nss, hunspell, hyphen, saxon, rhino, beanshell, graphite, coinmp to be built]) 14187aa0a607SDon Lewiselse 14197aa0a607SDon Lewis # Disable libaries. 14207aa0a607SDon Lewis enable_nss_module="no" 14217aa0a607SDon Lewis enable_hunspell="no" 14227aa0a607SDon Lewis enable_hyphen="no" 14237aa0a607SDon Lewis enable_saxon="no" 14247aa0a607SDon Lewis enable_javascript="no" 14257aa0a607SDon Lewis enable_beanshell="no" 14267aa0a607SDon Lewis enable_graphite="no" 14277aa0a607SDon Lewis enable_coinmp="no" 14287aa0a607SDon Lewis enable_category_b_fonts="no" 14297aa0a607SDon Lewis 14307aa0a607SDon Lewis AC_MSG_RESULT([no: disabled modules nss, hunspell, hyphen, saxon, rhino, beanshell, graphite, coinmp]) 14317aa0a607SDon Lewisfi 14327aa0a607SDon LewisAC_SUBST(ENABLE_CATEGORY_B) 14337aa0a607SDon Lewis 14347aa0a607SDon Lewis# gstreamer is used only via pre-installed libraries: not a problem 14357aa0a607SDon Lewis 14367aa0a607SDon Lewisdnl =================================================================== 14377aa0a607SDon Lewisdnl Online Update 14387aa0a607SDon Lewisdnl =================================================================== 14397aa0a607SDon LewisAC_MSG_CHECKING([whether to enable the Online Update support]) 14407aa0a607SDon Lewisif test "$enable_online_update" = "yes" -o "$enable_online_update" = "TRUE"; then 14417aa0a607SDon Lewis ENABLE_ONLINE_UPDATE="YES" 14427aa0a607SDon Lewis SCPDEFS="$SCPDEFS -DENABLE_ONLINE_UPDATE" 14437aa0a607SDon Lewis AC_MSG_RESULT([yes]) 14447aa0a607SDon Lewiselse 14457aa0a607SDon Lewis ENABLE_ONLINE_UPDATE="" 14467aa0a607SDon Lewis AC_MSG_RESULT([no]) 14477aa0a607SDon Lewisfi 14487aa0a607SDon LewisAC_SUBST(ENABLE_ONLINE_UPDATE) 14497aa0a607SDon Lewis 14507aa0a607SDon Lewis 14517aa0a607SDon LewisAC_MSG_CHECKING([whether to enable native CUPS support]) 14527aa0a607SDon Lewisif test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then 14537aa0a607SDon Lewis ENABLE_CUPS="TRUE" 14547aa0a607SDon Lewis AC_MSG_RESULT([yes]) 14557aa0a607SDon Lewiselse 14567aa0a607SDon Lewis ENABLE_CUPS="" 14577aa0a607SDon Lewis AC_MSG_RESULT([no]) 14587aa0a607SDon Lewisfi 14597aa0a607SDon LewisAC_SUBST(ENABLE_CUPS) 14607aa0a607SDon Lewis 14617aa0a607SDon LewisAC_MSG_CHECKING([whether to enable fontconfig support]) 14627aa0a607SDon Lewisif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then 14637aa0a607SDon Lewis ENABLE_FONTCONFIG="TRUE" 14647aa0a607SDon Lewis AC_MSG_RESULT([yes]) 14657aa0a607SDon Lewiselse 14667aa0a607SDon Lewis ENABLE_FONTCONFIG="" 14677aa0a607SDon Lewis AC_MSG_RESULT([no]) 14687aa0a607SDon Lewisfi 14697aa0a607SDon LewisAC_SUBST(ENABLE_FONTCONFIG) 14707aa0a607SDon Lewis 14717aa0a607SDon Lewisdnl =================================================================== 14727aa0a607SDon Lewisdnl find external tarballs. 14737aa0a607SDon Lewisdnl =================================================================== 14747aa0a607SDon Lewisif test -z $TARFILE_LOCATION; then 14757aa0a607SDon Lewis TARFILE_LOCATION="DEFAULT" 14767aa0a607SDon Lewisfi 14777aa0a607SDon LewisAC_SUBST(TARFILE_LOCATION) 14787aa0a607SDon Lewis 14797aa0a607SDon Lewisif test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \ 14807aa0a607SDon Lewis && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then 14817aa0a607SDon Lewis DO_FETCH_TARBALLS="yes" 14827aa0a607SDon Lewisfi 14837aa0a607SDon LewisAC_SUBST(DO_FETCH_TARBALLS) 14847aa0a607SDon Lewis 14857aa0a607SDon Lewisif test "$_os" = "WINNT"; then 14867aa0a607SDon Lewis AC_MSG_CHECKING([whether to use DirectX]) 14877aa0a607SDon Lewis ENABLE_DIRECT_DRAW="" 14887aa0a607SDon Lewis if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then 14897aa0a607SDon Lewis ENABLE_DIRECTX="TRUE" 14907aa0a607SDon Lewis AC_MSG_RESULT([yes]) 14917aa0a607SDon Lewis else 14927aa0a607SDon Lewis ENABLE_DIRECTX="" 14937aa0a607SDon Lewis AC_MSG_RESULT([no]) 14947aa0a607SDon Lewis fi 14957aa0a607SDon Lewis AC_SUBST(ENABLE_DIRECTX) 14967aa0a607SDon Lewis 14977aa0a607SDon Lewis AC_MSG_CHECKING([whether to use ActiveX]) 14987aa0a607SDon Lewis if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then 14997aa0a607SDon Lewis DISABLE_ACTIVEX="" 15007aa0a607SDon Lewis AC_MSG_RESULT([yes]) 15017aa0a607SDon Lewis else 15027aa0a607SDon Lewis DISABLE_ACTIVEX="TRUE" 15037aa0a607SDon Lewis AC_MSG_RESULT([no]) 15047aa0a607SDon Lewis fi 15057aa0a607SDon Lewis 15067aa0a607SDon Lewis AC_MSG_CHECKING([whether to use ATL]) 15077aa0a607SDon Lewis if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then 15087aa0a607SDon Lewis DISABLE_ATL="" 15097aa0a607SDon Lewis AC_MSG_RESULT([yes]) 15107aa0a607SDon Lewis else 15117aa0a607SDon Lewis DISABLE_ATL="TRUE" 15127aa0a607SDon Lewis dnl ActiveX depends on ATL, it should be disabled 15137aa0a607SDon Lewis DISABLE_ACTIVEX="TRUE" 15147aa0a607SDon Lewis AC_MSG_RESULT([no]) 15157aa0a607SDon Lewis fi 15167aa0a607SDon Lewis 15177aa0a607SDon Lewis AC_SUBST(DISABLE_ATL) 15187aa0a607SDon Lewis AC_SUBST(DISABLE_ACTIVEX) 15197aa0a607SDon Lewis 15207aa0a607SDon Lewisfi 15217aa0a607SDon Lewis 15227aa0a607SDon Lewisdnl =================================================================== 15237aa0a607SDon Lewisdnl Disable rpath in shared libraries? 15247aa0a607SDon Lewisdnl =================================================================== 15257aa0a607SDon LewisAC_MSG_CHECKING([whether to use RPATH in shared libraries]) 15267aa0a607SDon Lewisif test "$enable_rpath" = "no"; then 15277aa0a607SDon Lewis ENABLE_RPATH="no" 15287aa0a607SDon Lewiselse 15297aa0a607SDon Lewis ENABLE_RPATH="yes" 15307aa0a607SDon Lewisfi 15317aa0a607SDon LewisAC_MSG_RESULT([$ENABLE_RPATH]) 15327aa0a607SDon LewisAC_SUBST(ENABLE_RPATH) 15337aa0a607SDon Lewis 15347aa0a607SDon Lewisdnl =================================================================== 15357aa0a607SDon Lewisdnl Check extensions to be bundled as literal blobs 15367aa0a607SDon Lewisdnl =================================================================== 15377aa0a607SDon Lewisif test -n "$with_bundled_extension_blobs"; then 15387aa0a607SDon Lewis BUNDLED_EXTENSION_BLOBS="$with_bundled_extension_blobs" 15397aa0a607SDon Lewiselse 15407aa0a607SDon Lewis BUNDLED_EXTENSION_BLOBS= 15417aa0a607SDon Lewisfi 15427aa0a607SDon LewisAC_SUBST(BUNDLED_EXTENSION_BLOBS) 15437aa0a607SDon Lewis 15447aa0a607SDon Lewis#dnl =================================================================== 15457aa0a607SDon Lewis#dnl Check extensions that are to be bundled as pre-registerd 15467aa0a607SDon Lewis#dnl =================================================================== 15477aa0a607SDon Lewisif test -n "$with_bundled_prereg_extensions"; then 15487aa0a607SDon Lewis BUNDLED_PREREG_EXTENSIONS="$with_bundled_prereg_extensions" 15497aa0a607SDon Lewiselse 15507aa0a607SDon Lewis BUNDLED_PREREG_EXTENSIONS= 15517aa0a607SDon Lewisfi 15527aa0a607SDon LewisAC_SUBST(BUNDLED_PREREG_EXTENSIONS) 15537aa0a607SDon Lewis 15547aa0a607SDon Lewisdnl =================================================================== 15557aa0a607SDon Lewisdnl Configure system provided dictionary/hyphenation/thesaurus 15567aa0a607SDon Lewisdnl =================================================================== 15577aa0a607SDon Lewis AC_MSG_CHECKING([whether to use dicts from external paths]) 15587aa0a607SDon Lewis if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then 15597aa0a607SDon Lewis AC_MSG_RESULT([yes]) 15607aa0a607SDon Lewis SYSTEM_DICTS=YES 15617aa0a607SDon Lewis AC_MSG_CHECKING([for spelling dictionary directory]) 15627aa0a607SDon Lewis if test -n "$with_external_dict_dir"; then 15637aa0a607SDon Lewis DICT_SYSTEM_DIR=file://$with_external_dict_dir 15647aa0a607SDon Lewis else 15657aa0a607SDon Lewis DICT_SYSTEM_DIR=file:///usr/share/hunspell 15667aa0a607SDon Lewis fi 15677aa0a607SDon Lewis AC_MSG_RESULT([$DICT_SYSTEM_DIR]) 15687aa0a607SDon Lewis AC_MSG_CHECKING([for hyphenation patterns directory]) 15697aa0a607SDon Lewis if test -n "$with_external_hyph_dir"; then 15707aa0a607SDon Lewis HYPH_SYSTEM_DIR=file://$with_external_hyph_dir 15717aa0a607SDon Lewis else 15727aa0a607SDon Lewis HYPH_SYSTEM_DIR=file:///usr/share/hyphen 15737aa0a607SDon Lewis fi 15747aa0a607SDon Lewis AC_MSG_RESULT([$HYPH_SYSTEM_DIR]) 15757aa0a607SDon Lewis AC_MSG_CHECKING([for thesaurus directory]) 15767aa0a607SDon Lewis if test -n "$with_external_thes_dir"; then 15777aa0a607SDon Lewis THES_SYSTEM_DIR=file://$with_external_thes_dir 15787aa0a607SDon Lewis else 15797aa0a607SDon Lewis THES_SYSTEM_DIR=file:///usr/share/mythes 15807aa0a607SDon Lewis fi 15817aa0a607SDon Lewis AC_MSG_RESULT([$THES_SYSTEM_DIR]) 15827aa0a607SDon Lewis else 15837aa0a607SDon Lewis AC_MSG_RESULT([no]) 15847aa0a607SDon Lewis SYSTEM_DICTS=NO 15857aa0a607SDon Lewis fi 15867aa0a607SDon LewisAC_SUBST(SYSTEM_DICTS) 15877aa0a607SDon LewisAC_SUBST(DICT_SYSTEM_DIR) 15887aa0a607SDon LewisAC_SUBST(HYPH_SYSTEM_DIR) 15897aa0a607SDon LewisAC_SUBST(THES_SYSTEM_DIR) 15907aa0a607SDon Lewis 15917aa0a607SDon Lewisif test $_os = "WINNT"; then 15927aa0a607SDon Lewis AC_MSG_CHECKING([Windows build environment sanity]) 15937aa0a607SDon Lewis dnl =================================================================== 15947aa0a607SDon Lewis dnl Sanity check! Native windows programs cannot use cygwin symlinks! 15957aa0a607SDon Lewis dnl =================================================================== 15967aa0a607SDon Lewis dnl As long as awk instead of $AWK is used somewhere in the sources, 15977aa0a607SDon Lewis dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin. 15987aa0a607SDon Lewis if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then 15997aa0a607SDon Lewis AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink! 16007aa0a607SDon LewisNative windows programs cannot use cygwin symlinks. Remove the symbolic 16017aa0a607SDon Lewislink, and copy the program to the name of the link.]) 16027aa0a607SDon Lewis fi 16037aa0a607SDon Lewis dnl =================================================================== 16047aa0a607SDon Lewis dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to 16057aa0a607SDon Lewis dnl CC and CXX but the configure checks here assume that guw.exe 16067aa0a607SDon Lewis dnl (if needed at all) is not yet present. 16077aa0a607SDon Lewis dnl =================================================================== 16087aa0a607SDon Lewis CC=`echo $CC | $SED "s/^guw.exe //"` 16097aa0a607SDon Lewis CXX=`echo $CXX | $SED "s/^guw.exe //"` 16107aa0a607SDon Lewis dnl =================================================================== 16117aa0a607SDon Lewis dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable 16127aa0a607SDon Lewis dnl $WITH_MINGWIN 16137aa0a607SDon Lewis dnl =================================================================== 16147aa0a607SDon Lewis if test -n "$CC";then 16157aa0a607SDon Lewis if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then 16167aa0a607SDon Lewis WITH_MINGWIN="yes" 16177aa0a607SDon Lewis fi 16187aa0a607SDon Lewis fi 16197aa0a607SDon Lewis dnl =================================================================== 16207aa0a607SDon Lewis if test "$WITH_MINGWIN" = "yes" ; then 16217aa0a607SDon Lewis if test -z "$CC"; then 16227aa0a607SDon Lewis CC="gcc -mno-cygwin" 16237aa0a607SDon Lewis CXX="g++ -mno-cygwin" 16247aa0a607SDon Lewis fi 16257aa0a607SDon Lewis fi 16267aa0a607SDon Lewis AC_MSG_RESULT([ok]) 16277aa0a607SDon Lewisfi 16287aa0a607SDon LewisAC_SUBST(WITH_MINGWIN) 16297aa0a607SDon Lewis 16307aa0a607SDon Lewisdnl =================================================================== 16317aa0a607SDon Lewisdnl Extra check for Windows. cygwin builds need gcc to build dmake 16327aa0a607SDon Lewisdnl and g++ to build guw.exe although MS cl (or MinGW) is used to 16337aa0a607SDon Lewisdnl build OOo. 16347aa0a607SDon Lewisdnl =================================================================== 16357aa0a607SDon Lewisif test "$_os" = "WINNT" ; then 16367aa0a607SDon Lewis AC_MSG_CHECKING([for cygwin gcc/g++]) 16377aa0a607SDon Lewis if which gcc > /dev/null && which g++ > /dev/null ; then 16387aa0a607SDon Lewis AC_MSG_RESULT([found]) 16397aa0a607SDon Lewis else 16407aa0a607SDon Lewis AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.]) 16417aa0a607SDon Lewis fi 16427aa0a607SDon Lewisfi 16437aa0a607SDon Lewis 16447aa0a607SDon Lewis 16457aa0a607SDon Lewisdnl =================================================================== 16467aa0a607SDon Lewisdnl Check whether the bash shell can be used. 16477aa0a607SDon Lewisdnl =================================================================== 16487aa0a607SDon LewisAC_PATH_PROG(SHELLPATH, bash) 16497aa0a607SDon Lewisif test -z "$SHELLPATH"; then 16507aa0a607SDon Lewis AC_MSG_ERROR([bash not found in \$PATH]) 16517aa0a607SDon Lewiselse 16527aa0a607SDon Lewis SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"` 16537aa0a607SDon Lewisfi 16547aa0a607SDon LewisAC_SUBST(SHELLPATH) 16557aa0a607SDon Lewis 16567aa0a607SDon Lewisdnl =================================================================== 16577aa0a607SDon Lewisdnl Checks for c compiler, 16587aa0a607SDon Lewisdnl The check for the c++ compiler is later on. 16597aa0a607SDon Lewisdnl =================================================================== 16607aa0a607SDon LewisAC_MSG_CHECKING([gcc home]) 16617aa0a607SDon Lewisif test -z "$with_gcc_home"; then 16627aa0a607SDon Lewis GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` 16637aa0a607SDon Lewiselse 16647aa0a607SDon Lewis GCC_HOME="$with_gcc_home" 16657aa0a607SDon Lewisfi 16667aa0a607SDon LewisAC_MSG_RESULT($GCC_HOME) 16677aa0a607SDon LewisAC_SUBST(GCC_HOME) 16687aa0a607SDon Lewis 16697aa0a607SDon Lewissave_CC=$CC 16707aa0a607SDon Lewissave_CXX=$CXX 16717aa0a607SDon Lewis 16727aa0a607SDon Lewisif test -n "$with_gcc_home"; then 16737aa0a607SDon Lewis if test -z "$CC"; then 16747aa0a607SDon Lewis CC="$with_gcc_home/bin/gcc" 16757aa0a607SDon Lewis fi 16767aa0a607SDon Lewisfi 16777aa0a607SDon Lewis 16787aa0a607SDon Lewisdnl The following checks for gcc, cc and then cl (if it weren't guarded for win32) 16797aa0a607SDon Lewisif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 16807aa0a607SDon Lewis AC_PROG_CC 16817aa0a607SDon Lewisfi 16827aa0a607SDon Lewis 16837aa0a607SDon Lewisif test "$_os" = "FreeBSD"; then 16847aa0a607SDon Lewis FBSD_GCC_RPATH= 16857aa0a607SDon Lewis if $CC --version 2>&1 | grep clang > /dev/null ; then 16867aa0a607SDon Lewis COM_IS=CLANG 16877aa0a607SDon Lewis else 16887aa0a607SDon Lewis COM_IS=GCC 16897aa0a607SDon Lewis rpath=`$CC --print-file-name libstdc++.so` 16907aa0a607SDon Lewis rpath=`realpath $rpath` 16917aa0a607SDon Lewis rpath=`dirname $rpath` 16927aa0a607SDon Lewis if test "$rpath" != "/usr/lib" ; then 16937aa0a607SDon Lewis FBSD_GCC_RPATH="-Wl,-rpath=$rpath" 16947aa0a607SDon Lewis fi 16957aa0a607SDon Lewis fi 16967aa0a607SDon Lewis AC_SUBST(COM_IS) 16977aa0a607SDon Lewis AC_SUBST(FBSD_GCC_RPATH) 16987aa0a607SDon Lewisfi 16997aa0a607SDon Lewis 17007aa0a607SDon LewisCOMPATH=`dirname "$CC"` 17017aa0a607SDon Lewisif test "$COMPATH" = "." ; then 17027aa0a607SDon Lewis AC_PATH_PROGS(COMPATH, $CC) 17037aa0a607SDon Lewis dnl double square bracket to get single because of M4 quote... 17047aa0a607SDon Lewis COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`; 17057aa0a607SDon Lewisfi 17067aa0a607SDon LewisCC_PATH="$COMPATH/" 17077aa0a607SDon LewisCOMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`; 17087aa0a607SDon Lewis 17097aa0a607SDon Lewisdnl =================================================================== 17107aa0a607SDon Lewisdnl Test the gcc version, 3 is OK 17117aa0a607SDon Lewisdnl =================================================================== 17127aa0a607SDon LewisGCCVER=20995 17137aa0a607SDon Lewisif test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then 17147aa0a607SDon Lewis AC_MSG_CHECKING([the GNU gcc compiler version]) 17157aa0a607SDon Lewis _gcc_version=`$CC -dumpversion` 17167aa0a607SDon Lewis _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` 17177aa0a607SDon Lewis GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 17187aa0a607SDon Lewis 17197aa0a607SDon Lewis if test "$_gcc_major" -lt "3"; then 17207aa0a607SDon Lewis AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler]) 17217aa0a607SDon Lewis else 17227aa0a607SDon Lewis if test "$GCCVER" -eq "030203"; then 17237aa0a607SDon Lewis if test "$ENABLE_SYMBOLS" = "SMALL"; then 17247aa0a607SDon Lewis AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.]) 17257aa0a607SDon Lewis fi 17267aa0a607SDon Lewis fi 17277aa0a607SDon Lewis fi 17287aa0a607SDon Lewis if test "$_os" = "Darwin" ; then 17297aa0a607SDon Lewis AC_MSG_RESULT([implicitly using CC=$CC]) 17307aa0a607SDon Lewis else 17317aa0a607SDon Lewis AC_MSG_RESULT([checked (gcc $_gcc_version)]) 17327aa0a607SDon Lewis fi 17337aa0a607SDon Lewis if test "$_os" = "SunOS"; then 17347aa0a607SDon Lewis AC_MSG_CHECKING([gcc linker]) 17357aa0a607SDon Lewis if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then 17367aa0a607SDon Lewis AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris]) 17377aa0a607SDon Lewis fi 17387aa0a607SDon Lewis AC_MSG_RESULT([ok (GNU ld)]) 17397aa0a607SDon Lewis fi 17407aa0a607SDon Lewisfi 17417aa0a607SDon LewisAC_SUBST(GCCVER) 17427aa0a607SDon Lewis 17437aa0a607SDon LewisHAVE_LD_BSYMBOLIC_FUNCTIONS= 17447aa0a607SDon Lewisif test "$GCC" = "yes"; then 17457aa0a607SDon Lewis AC_MSG_CHECKING( for -Bsymbolic-functions linker support ) 17467aa0a607SDon Lewis bsymbolic_functions_ldflags_save=$LDFLAGS 17477aa0a607SDon Lewis LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" 17487aa0a607SDon Lewis AC_LINK_IFELSE([AC_LANG_PROGRAM([ 17497aa0a607SDon Lewis #include <stdio.h> 17507aa0a607SDon Lewis ],[ 17517aa0a607SDon Lewis printf ("hello world\n"); 17527aa0a607SDon Lewis ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, []) 17537aa0a607SDon Lewis if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then 17547aa0a607SDon Lewis AC_MSG_RESULT( found ) 17557aa0a607SDon Lewis else 17567aa0a607SDon Lewis AC_MSG_RESULT( not found ) 17577aa0a607SDon Lewis fi 17587aa0a607SDon Lewis LDFLAGS=$bsymbolic_functions_ldflags_save 17597aa0a607SDon Lewisfi 17607aa0a607SDon LewisAC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS) 17617aa0a607SDon Lewis 17627aa0a607SDon Lewisdnl =================================================================== 17637aa0a607SDon Lewisdnl Set the ENABLE_PCH variable. (Activate --enable-pch) 17647aa0a607SDon Lewisdnl =================================================================== 17657aa0a607SDon LewisAC_MSG_CHECKING([whether to enable pch feature]) 17667aa0a607SDon Lewisif test -n "$enable_pch" && test "$enable_pch" != "no"; then 17677aa0a607SDon Lewis if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 17687aa0a607SDon Lewis ENABLE_PCH="TRUE" 17697aa0a607SDon Lewis AC_MSG_RESULT([yes]) 17707aa0a607SDon Lewisdnl There is no PCH support in GCC versions prior to this 17717aa0a607SDon Lewis elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then 17727aa0a607SDon Lewis ENABLE_PCH="TRUE" 17737aa0a607SDon Lewis AC_MSG_RESULT([yes]) 17747aa0a607SDon Lewis else 17757aa0a607SDon Lewis ENABLE_PCH="" 17767aa0a607SDon Lewis AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler]) 17777aa0a607SDon Lewis fi 17787aa0a607SDon Lewiselse 17797aa0a607SDon Lewis ENABLE_PCH="" 17807aa0a607SDon Lewis AC_MSG_RESULT([no]) 17817aa0a607SDon Lewisfi 17827aa0a607SDon LewisAC_SUBST(ENABLE_PCH) 17837aa0a607SDon Lewis 17847aa0a607SDon Lewisdnl =================================================================== 17857aa0a607SDon Lewisdnl Search all the common names for GNU make 17867aa0a607SDon Lewisdnl =================================================================== 17877aa0a607SDon LewisAC_MSG_CHECKING([for GNU make]) 17887aa0a607SDon Lewisfor a in "$MAKE" $GNUMAKE make gmake gnumake; do 17897aa0a607SDon Lewis $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null 17907aa0a607SDon Lewis if test $? -eq 0; then 17917aa0a607SDon Lewis GNUMAKE=$a 17927aa0a607SDon Lewis break 17937aa0a607SDon Lewis fi 17947aa0a607SDon Lewisdone 17957aa0a607SDon LewisAC_MSG_RESULT($GNUMAKE) 17967aa0a607SDon Lewisif test -z "$GNUMAKE"; then 17977aa0a607SDon Lewis AC_MSG_ERROR([not found. install GNU make.]) 17987aa0a607SDon Lewisfi 17997aa0a607SDon Lewis 18007aa0a607SDon LewisAC_MSG_CHECKING([the GNU make version]) 18017aa0a607SDon Lewis_make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 18027aa0a607SDon Lewis_make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 18037aa0a607SDon Lewisif test "$_make_longver" -ge "038100" ; then 18047aa0a607SDon Lewis AC_MSG_RESULT([$GNUMAKE $_make_version]) 18057aa0a607SDon Lewiselse 18067aa0a607SDon Lewis AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed]) 18077aa0a607SDon Lewisfi 18087aa0a607SDon LewisAC_SUBST(GNUMAKE) 18097aa0a607SDon Lewis 18107aa0a607SDon Lewisdnl =================================================================== 18117aa0a607SDon Lewisdnl Search for a pre-installed dmake 18127aa0a607SDon Lewisdnl =================================================================== 18137aa0a607SDon LewisAC_MSG_CHECKING([for dmake]) 18147aa0a607SDon LewisDMAKE="no" 18157aa0a607SDon Lewis# Override system dmake if --with-dmake-path or --with-dmake-url is used. 18167aa0a607SDon Lewisif test -z "$with_dmake_path" && test -z "$with_dmake_url"; then 18177aa0a607SDon Lewis AC_PATH_PROG(DMAKE, dmake, no) 18187aa0a607SDon Lewis IS_SYSTEM_DMAKE=NO 18197aa0a607SDon Lewis if test "$DMAKE" != "no"; then 18207aa0a607SDon Lewis AC_MSG_RESULT([using system dmake]) 18217aa0a607SDon Lewis DMAKE_PATH="$DMAKE" 18227aa0a607SDon Lewis IS_SYSTEM_DMAKE=YES 18237aa0a607SDon Lewis fi 18247aa0a607SDon Lewiselif test -n "$with_dmake_path" ; then 18257aa0a607SDon Lewis # Did not find pre-installed dmake. 18267aa0a607SDon Lewis # Is it at a nonstandard location provided by --with-dmake-path ? 18277aa0a607SDon Lewis AC_MSG_NOTICE([looking for dmake at $DMAKE_PATH]) 18287aa0a607SDon Lewis if test -x "$with_dmake_path" ; then 18297aa0a607SDon Lewis AC_MSG_RESULT([using user provided dmake]) 18307aa0a607SDon Lewis DMAKE=$with_dmake_path 18317aa0a607SDon Lewis fi 18327aa0a607SDon Lewisfi 18337aa0a607SDon Lewis 18347aa0a607SDon LewisDMAKE_URL= 18357aa0a607SDon Lewisif test "$DMAKE" = "no"; then 18367aa0a607SDon Lewis AC_MSG_NOTICE([no system or user-provided dmake found]) 18377aa0a607SDon Lewis # Check if a URL was supplied from which we can download the source and compile it. 18387aa0a607SDon Lewis if test -n "$with_dmake_url" ; then 18397aa0a607SDon Lewis # At this moment we can not verify the URL or the content that we want to download. 18407aa0a607SDon Lewis # Neither can we apply the test below for ruling out that it is the SunStudio dmake. 18417aa0a607SDon Lewis DMAKE_URL=$with_dmake_url 18427aa0a607SDon Lewis AC_MSG_RESULT([dmake will be downloaded and compiled in bootstrap]) 18437aa0a607SDon Lewis DMAKE= 18447aa0a607SDon Lewis else 18457aa0a607SDon Lewis 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.]) 18467aa0a607SDon Lewis BUILD_DMAKE=YES 18477aa0a607SDon Lewis fi 18487aa0a607SDon Lewiselse 18497aa0a607SDon Lewis AC_MSG_CHECKING([whether the found dmake is the right dmake]) 18507aa0a607SDon Lewis # we need to find out whether that dmake we found is "our" dmake 18517aa0a607SDon Lewis # or the dmake from Sun's SunStudio Compiler which is something 18527aa0a607SDon Lewis # different 18537aa0a607SDon Lewis # This test _should_ work because the one accepts -V (ours) and one 18547aa0a607SDon Lewis # (the other) not... 18557aa0a607SDon Lewis $DMAKE -V 2>/dev/null | grep -E 'dmake(.exe)? .* Version .*' >/dev/null 18567aa0a607SDon Lewis if test $? -eq 0; then 18577aa0a607SDon Lewis BUILD_DMAKE=NO 18587aa0a607SDon Lewis AC_MSG_RESULT([yes]) 18597aa0a607SDon Lewis AC_MSG_CHECKING([the dmake version]) 18607aa0a607SDon Lewis DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` 18617aa0a607SDon Lewis if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then 18627aa0a607SDon Lewis AC_MSG_RESULT([OK, >= 4.11]) 18637aa0a607SDon Lewis elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ 18647aa0a607SDon Lewis test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then 18657aa0a607SDon Lewis AC_MSG_RESULT([OK, >= 4.11]) 18667aa0a607SDon Lewis else 18677aa0a607SDon Lewis AC_MSG_ERROR([too old. >= 4.11 is needed]) 18687aa0a607SDon Lewis DMAKE=no 18697aa0a607SDon Lewis fi 18707aa0a607SDon Lewis else 18717aa0a607SDon Lewis AC_MSG_WARN([no]) 18727aa0a607SDon Lewis DMAKE=no 18737aa0a607SDon Lewis fi 18747aa0a607SDon Lewisfi 18757aa0a607SDon Lewisif test "$DMAKE" = "no"; then 18767aa0a607SDon Lewis AC_MSG_ERROR([please use --with-dmake-path or --with-dmake-url to specify dmake executable or source]) 18777aa0a607SDon Lewisfi 18787aa0a607SDon LewisAC_SUBST(DMAKE_URL) 18797aa0a607SDon LewisAC_SUBST(DMAKE_PATH) 18807aa0a607SDon LewisAC_SUBST(IS_SYSTEM_DMAKE) 18817aa0a607SDon Lewis 18827aa0a607SDon Lewis 18837aa0a607SDon Lewisdnl =================================================================== 18847aa0a607SDon Lewisdnl Search all the common names for GNU or BSD tar 18857aa0a607SDon Lewisdnl =================================================================== 18867aa0a607SDon LewisAC_MSG_CHECKING([for GNU or compatible BSD tar]) 18877aa0a607SDon Lewisfor a in $GNUTAR gtar gnutar bsdtar tar; do 18887aa0a607SDon Lewis $a --version 2> /dev/null | egrep "GNU|libarchive" 2>&1 > /dev/null 18897aa0a607SDon Lewis if test $? -eq 0; then 18907aa0a607SDon Lewis GNUTAR=$a 18917aa0a607SDon Lewis break 18927aa0a607SDon Lewis fi 18937aa0a607SDon Lewisdone 18947aa0a607SDon LewisAC_MSG_RESULT($GNUTAR) 18957aa0a607SDon Lewisif test -z "$GNUTAR"; then 18967aa0a607SDon Lewis AC_MSG_ERROR([not found. install GNU tar.]) 18977aa0a607SDon Lewisfi 18987aa0a607SDon Lewis 18997aa0a607SDon LewisAC_SUBST(GNUTAR) 19007aa0a607SDon Lewis 19017aa0a607SDon Lewisdnl =================================================================== 19027aa0a607SDon Lewisdnl Test the solaris compiler version 19037aa0a607SDon Lewisdnl =================================================================== 19047aa0a607SDon Lewisif test "$_os" = "SunOS"; then 19057aa0a607SDon Lewis if test "$CC" = "cc"; then 19067aa0a607SDon Lewis AC_PATH_PROGS(_cc, cc) 19077aa0a607SDon Lewis COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` 19087aa0a607SDon Lewis AC_MSG_CHECKING([the SunStudio C/C++ compiler version]) 19097aa0a607SDon Lewis dnl cc -V outputs to standard error!!!! 19107aa0a607SDon Lewis _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'` 19117aa0a607SDon Lewis _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` 19127aa0a607SDon Lewis _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` 19137aa0a607SDon Lewis if test "$_sunstudio_major" != "5"; then 19147aa0a607SDon Lewis AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) 19157aa0a607SDon Lewis else 19167aa0a607SDon Lewis _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" }'` 19177aa0a607SDon Lewis if test "$_sunstudio_minor" = "false"; then 19187aa0a607SDon Lewis AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) 19197aa0a607SDon Lewis else 19207aa0a607SDon Lewis dnl compiler will do 19217aa0a607SDon Lewis AC_MSG_RESULT([checked]) 19227aa0a607SDon Lewis fi 19237aa0a607SDon Lewis fi 19247aa0a607SDon Lewis fi 19257aa0a607SDon Lewisfi 19267aa0a607SDon Lewis 19277aa0a607SDon Lewisif test "$GCC" = "yes"; then 19287aa0a607SDon Lewis AC_MSG_CHECKING( for --hash-style=both linker support ) 19297aa0a607SDon Lewis hash_style_ldflags_save=$LDFLAGS 19307aa0a607SDon Lewis LDFLAGS="$LDFLAGS -Wl,--hash-style=both" 19317aa0a607SDon Lewis AC_LINK_IFELSE([AC_LANG_PROGRAM([ 19327aa0a607SDon Lewis #include <stdio.h> 19337aa0a607SDon Lewis ],[ 19347aa0a607SDon Lewis printf ("hello world\n"); 19357aa0a607SDon Lewis ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE) 19367aa0a607SDon Lewis if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then 19377aa0a607SDon Lewis AC_MSG_RESULT( found ) 19387aa0a607SDon Lewis else 19397aa0a607SDon Lewis AC_MSG_RESULT( not found ) 19407aa0a607SDon Lewis fi 19417aa0a607SDon Lewis LDFLAGS=$hash_style_ldflags_save 19427aa0a607SDon Lewisfi 19437aa0a607SDon LewisAC_SUBST(HAVE_LD_HASH_STYLE) 19447aa0a607SDon Lewis 19457aa0a607SDon Lewisdnl =================================================================== 19467aa0a607SDon Lewisdnl Test the Compaq compiler for OSF1 19477aa0a607SDon Lewisdnl =================================================================== 19487aa0a607SDon Lewisif test "$_os" = "OSF1"; then 19497aa0a607SDon Lewis if test "$CC" = "cc"; then 19507aa0a607SDon Lewis AC_PATH_PROGS(_cc, cc) 19517aa0a607SDon Lewis COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` 19527aa0a607SDon Lewis AC_MSG_WARN([******* $_cc , $COMPATH]) 19537aa0a607SDon Lewis AC_MSG_CHECKING([the Compaq C compiler version]) 19547aa0a607SDon Lewis dnl cc -V outputs to standard error!!!! 19557aa0a607SDon Lewis _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'` 19567aa0a607SDon Lewis _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` 19577aa0a607SDon Lewis if test "$_compaqc_major" != "T6"; then 19587aa0a607SDon Lewis AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler]) 19597aa0a607SDon Lewis else 19607aa0a607SDon Lewis dnl compiler will do 19617aa0a607SDon Lewis AC_MSG_RESULT([checked]) 19627aa0a607SDon Lewis fi 19637aa0a607SDon Lewis fi 19647aa0a607SDon Lewisfi 19657aa0a607SDon Lewis 19667aa0a607SDon Lewisdnl =================================================================== 19677aa0a607SDon Lewisdnl Check whether there's a Perl version available. 19687aa0a607SDon Lewisdnl =================================================================== 19697aa0a607SDon Lewisif test -z "$with_perl_home"; then 19707aa0a607SDon Lewis AC_PATH_PROG(PERL, perl) 19717aa0a607SDon Lewiselse 19727aa0a607SDon Lewis if test "$_os" = "WINNT"; then 19737aa0a607SDon Lewis with_perl_home=`cygpath -u "$with_perl_home"` 19747aa0a607SDon Lewis fi 19757aa0a607SDon Lewis _perl_path="$with_perl_home/bin/perl" 19767aa0a607SDon Lewis if test -x "$_perl_path"; then 19777aa0a607SDon Lewis PERL=$_perl_path 19787aa0a607SDon Lewis else 19797aa0a607SDon Lewis AC_MSG_ERROR([$_perl_path not found]) 19807aa0a607SDon Lewis fi 19817aa0a607SDon Lewisfi 19827aa0a607SDon Lewis 19837aa0a607SDon Lewisdnl =================================================================== 19847aa0a607SDon Lewisdnl Testing for Perl version 5 or greater. 19857aa0a607SDon Lewisdnl $] is the perl version variable, it is returned as an integer 19867aa0a607SDon Lewisdnl =================================================================== 19877aa0a607SDon Lewisif test "$PERL"; then 19887aa0a607SDon Lewis AC_MSG_CHECKING([the Perl version]) 19897aa0a607SDon Lewis ${PERL} -e "exit($]);" 19907aa0a607SDon Lewis _perl_version=$? 19917aa0a607SDon Lewis if test "$_perl_version" -lt 5; then 19927aa0a607SDon Lewis AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl]) 19937aa0a607SDon Lewis fi 19947aa0a607SDon Lewis AC_MSG_RESULT([checked (perl $_perl_version)]) 19957aa0a607SDon Lewiselse 19967aa0a607SDon Lewis AC_MSG_ERROR([Perl not found, install version 5 of Perl]) 19977aa0a607SDon Lewisfi 19987aa0a607SDon LewisAC_SUBST(PERL) 19997aa0a607SDon Lewis 20007aa0a607SDon Lewisdnl =================================================================== 20017aa0a607SDon Lewisdnl Testing for required Perl modules 20027aa0a607SDon Lewisdnl The list of required Perl modules is documented here: 20037aa0a607SDon Lewisdnl http://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO#General_Build_Requirements 20047aa0a607SDon Lewisdnl =================================================================== 20057aa0a607SDon LewisAC_MSG_CHECKING([for required Perl modules]) 20067aa0a607SDon Lewisif `$PERL -e 'use Archive::Zip; use XML::Parser; use LWP::UserAgent; use Digest::SHA; use Digest::MD5; use LWP::Protocol::https;'>/dev/null 2>&1`; then 20077aa0a607SDon Lewis AC_MSG_RESULT([all modules found]) 20087aa0a607SDon Lewiselse 20097aa0a607SDon Lewis # Find out which modules are missing. 20107aa0a607SDon Lewis missing_perl_modules= 20117aa0a607SDon Lewis if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then 20127aa0a607SDon Lewis missing_perl_modules=Archive::Zip 20137aa0a607SDon Lewis fi 20147aa0a607SDon Lewis if ! `$PERL -e 'use LWP::UserAgent;'>/dev/null 2>&1`; then 20157aa0a607SDon Lewis missing_perl_modules="$missing_perl_modules LWP::UserAgent" 20167aa0a607SDon Lewis fi 20177aa0a607SDon Lewis if ! `$PERL -e 'use XML::Parser;'>/dev/null 2>&1`; then 20187aa0a607SDon Lewis missing_perl_modules="$missing_perl_modules XML::Parser" 20197aa0a607SDon Lewis fi 20207aa0a607SDon Lewis if ! `$PERL -e 'use Digest::SHA;'>/dev/null 2>&1`; then 20217aa0a607SDon Lewis missing_perl_modules="$missing_perl_modules Digest::SHA" 20227aa0a607SDon Lewis fi 20237aa0a607SDon Lewis if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then 20247aa0a607SDon Lewis missing_perl_modules="$missing_perl_modules Digest::MD5" 20257aa0a607SDon Lewis fi 20267aa0a607SDon Lewis if ! `$PERL -e 'use LWP::Protocol::https;'>/dev/null 2>&1`; then 20277aa0a607SDon Lewis missing_perl_modules="$missing_perl_modules LWP::Protocol::https" 20287aa0a607SDon Lewis fi 20297aa0a607SDon Lewis AC_MSG_ERROR([ 20307aa0a607SDon Lewis The missing Perl modules are: $missing_perl_modules 20317aa0a607SDon Lewis Install them with your package manager (the name of the package depends on your system); 20327aa0a607SDon Lewis or, as last resort, run the following command as superuser/administrator: "cpan -i $missing_perl_modules"]) 20337aa0a607SDon Lewisfi 20347aa0a607SDon Lewis 20357aa0a607SDon Lewisdnl =================================================================== 20367aa0a607SDon Lewisdnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT 20377aa0a607SDon Lewisdnl =================================================================== 20387aa0a607SDon Lewisif test "$_os" = "WINNT"; then 20397aa0a607SDon Lewis if test "$WITH_MINGWIN" != "yes"; then 20407aa0a607SDon Lewis AC_MSG_CHECKING([for friendly registry keys]) 20417aa0a607SDon Lewis # VS.Net 2003, VS.Net 2005 20427aa0a607SDon Lewis if test -z "$with_cl_home"; then 20437aa0a607SDon Lewis vctest=`./oowintool --msvc-productdir`; 20447aa0a607SDon Lewis if test -x "$vctest/bin/cl.exe"; then 20457aa0a607SDon Lewis with_cl_home=$vctest; 20467aa0a607SDon Lewis fi 20477aa0a607SDon Lewis else 20487aa0a607SDon Lewis with_cl_home=`cygpath -u "$with_cl_home"` 20497aa0a607SDon Lewis fi 20507aa0a607SDon Lewis AC_MSG_RESULT([done]) 20517aa0a607SDon Lewis 20527aa0a607SDon Lewis dnl =========================================================== 20537aa0a607SDon Lewis dnl Check for mspdb71.dll/mspdb80.dll 20547aa0a607SDon Lewis dnl =========================================================== 20557aa0a607SDon Lewis dnl .NET 2003/5/8 Compiler 20567aa0a607SDon Lewis if test -n "$with_mspdb_path";then 20577aa0a607SDon Lewis with_mspdb_path=`cygpath -u "$with_mspdb_path"` 20587aa0a607SDon Lewis fi 20597aa0a607SDon Lewis if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then 20607aa0a607SDon Lewis MSPDB_PATH="$with_mspdb_path" 20617aa0a607SDon Lewis fi 20627aa0a607SDon Lewis dnl .NET 2003 case 20637aa0a607SDon Lewis if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then 20647aa0a607SDon Lewis MSPDB_PATH="$with_cl_home/../Common7/IDE" 20657aa0a607SDon Lewis fi 20667aa0a607SDon Lewis dnl .NET 2005/2008 case 20677aa0a607SDon Lewis if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then 20687aa0a607SDon Lewis MSPDB_PATH="$with_cl_home/../Common7/IDE" 20697aa0a607SDon Lewis fi 20707aa0a607SDon Lewis dnl Windows SDK 6.0 case 20717aa0a607SDon Lewis if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then 20727aa0a607SDon Lewis MSPDB_PATH="$with_cl_home/bin" 20737aa0a607SDon Lewis fi 20747aa0a607SDon Lewis 20757aa0a607SDon Lewis if test -z "$MSPDB_PATH";then 20767aa0a607SDon Lewis dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty 20777aa0a607SDon Lewis AC_PATH_PROG(MSPDB_PATH, mspdb80.dll) 20787aa0a607SDon Lewis AC_PATH_PROG(MSPDB_PATH, mspdb71.dll) 20797aa0a607SDon Lewis MSPDB_PATH=`dirname "$MSPDB_PATH"` 20807aa0a607SDon Lewis fi 20817aa0a607SDon Lewis 20827aa0a607SDon Lewis if test -z "$MSPDB_PATH"; then 20837aa0a607SDon Lewis AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path]) 20847aa0a607SDon Lewis fi 20857aa0a607SDon Lewis MSPDB_PATH=`cygpath -d "$MSPDB_PATH"` 20867aa0a607SDon Lewis MSPDB_PATH=`cygpath -u "$MSPDB_PATH"` 20877aa0a607SDon Lewis dnl The path needs to be added before cl is called 20887aa0a607SDon Lewis PATH="$MSPDB_PATH:$PATH" 20897aa0a607SDon Lewis 20907aa0a607SDon Lewis AC_MSG_CHECKING([the Microsoft C/C++ Compiler]) 20917aa0a607SDon Lewis if test -x "$with_cl_home/bin/cl.exe"; then 20927aa0a607SDon Lewis CC="$with_cl_home/bin/cl.exe" 20937aa0a607SDon Lewis else 20947aa0a607SDon Lewis AC_PATH_PROG(CC, cl.exe) 20957aa0a607SDon Lewis fi 20967aa0a607SDon Lewis if test -e "$CC"; then 20977aa0a607SDon Lewis # This gives us a posix path with 8.3 filename restrictions 20987aa0a607SDon Lewis CC=`cygpath -d "$CC"` 20997aa0a607SDon Lewis CC=`cygpath -u "$CC"` 21007aa0a607SDon Lewis # Remove /cl.exe from CC case insensitive 21017aa0a607SDon Lewis AC_MSG_RESULT([found ($CC)]) 21027aa0a607SDon Lewis COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'` 21037aa0a607SDon Lewis export INCLUDE=`cygpath -d "$COMPATH/Include"` 21047aa0a607SDon Lewis dnl Check which Microsoft C/C++ compiler is found 21057aa0a607SDon Lewis AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler]) 21067aa0a607SDon Lewisdnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out. 21077aa0a607SDon Lewis CCTXTVER=`$CC 2>&1 | head -n1` 21087aa0a607SDon Lewis CCNUMVER=`echo $CCTXTVER | $AWK "/Microsoft/ && /..\\...\\...../ { 21097aa0a607SDon Lewis x = match( \\\$0, /..\\...\\...../ ) 21107aa0a607SDon Lewis CCversion = substr( \\\$0, RSTART, RLENGTH) 21117aa0a607SDon Lewis tokencount = split (CCversion,vertoken,\".\") 21127aa0a607SDon Lewis for ( i = 1 ; i <= tokencount ; i++ ) { 21137aa0a607SDon Lewis printf (\"%04d\",vertoken[[i]] ) 21147aa0a607SDon Lewis } 21157aa0a607SDon Lewis }"` 21167aa0a607SDon Lewis AC_MSG_RESULT([found Compiler version $CCNUMVER in \"$CCTXTVER\"]) 21177aa0a607SDon Lewis if test "$CCNUMVER" -ge "001500000000"; then 21187aa0a607SDon Lewis COMEX=12 21197aa0a607SDon Lewis MSVSVER=2008 21207aa0a607SDon Lewis AC_MSG_RESULT([found .NET 2008 / VS 9.0.]) 21217aa0a607SDon Lewis else 21227aa0a607SDon Lewis AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2008.]) 21237aa0a607SDon Lewis fi 21247aa0a607SDon Lewis else 21257aa0a607SDon Lewis AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.]) 21267aa0a607SDon Lewis fi 21277aa0a607SDon Lewis else 21287aa0a607SDon Lewis AC_MSG_CHECKING([the Mingwin32 C++ Compiler]) 21297aa0a607SDon Lewis if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then 21307aa0a607SDon Lewis AC_MSG_RESULT([found.]) 21317aa0a607SDon Lewis if $CC -dumpspecs | grep -q "mno-cygwin"; then 21327aa0a607SDon Lewis USE_MINGW="cygwin" 21337aa0a607SDon Lewis else 21347aa0a607SDon Lewis USE_MINGW="pure-mingw" 21357aa0a607SDon Lewis fi 21367aa0a607SDon Lewis else 21377aa0a607SDon Lewis AC_MSG_ERROR([Mingwin32 C++ Compiler not found.]) 21387aa0a607SDon Lewis fi 21397aa0a607SDon Lewis fi 21407aa0a607SDon Lewisfi 21417aa0a607SDon LewisAC_SUBST(COMEX) 21427aa0a607SDon LewisAC_SUBST(MSPDB_PATH) 21437aa0a607SDon LewisAC_SUBST(USE_MINGW) 21447aa0a607SDon Lewis 21457aa0a607SDon Lewisdnl =================================================================== 21467aa0a607SDon Lewisdnl .NET needs special treatment 21477aa0a607SDon Lewisdnl =================================================================== 21487aa0a607SDon Lewisif test "$_os" = "WINNT"; then 21497aa0a607SDon Lewisif test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then 21507aa0a607SDon Lewis dnl Check midl.exe 21517aa0a607SDon Lewis AC_PATH_PROG(MIDL_PATH, midl.exe) 21527aa0a607SDon Lewis if test -n "$MIDL_PATH";then 21537aa0a607SDon Lewis MIDL_PATH=`dirname "$MIDL_PATH"` 21547aa0a607SDon Lewis fi 21557aa0a607SDon Lewis if test -n "$with_midl_path";then 21567aa0a607SDon Lewis with_midl_path=`cygpath -u "$with_midl_path"` 21577aa0a607SDon Lewis fi 21587aa0a607SDon Lewis if test -x "$with_midl_path/midl.exe"; then 21597aa0a607SDon Lewis MIDL_PATH="$with_midl_path" 21607aa0a607SDon Lewis fi 21617aa0a607SDon Lewis if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then 21627aa0a607SDon Lewis MIDL_PATH="$with_cl_home/../Common7/Tools/Bin" 21637aa0a607SDon Lewis fi 21647aa0a607SDon Lewis if test -z "$MIDL_PATH" ; then 21657aa0a607SDon Lewis vstest=`./oowintool --msvs-productdir`; 21667aa0a607SDon Lewis if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then 21677aa0a607SDon Lewis MIDL_PATH="$vstest/Common7/Tools/Bin" 21687aa0a607SDon Lewis fi 21697aa0a607SDon Lewis fi 21707aa0a607SDon Lewis if test -z "$MIDL_PATH" ; then 21717aa0a607SDon Lewis psdktest=`./oowintool --psdk-home` 21727aa0a607SDon Lewis if test -x "$psdktest/Bin/midl.exe" ; then 21737aa0a607SDon Lewis MIDL_PATH="$psdktest/Bin" 21747aa0a607SDon Lewis fi 21757aa0a607SDon Lewis fi 21767aa0a607SDon Lewis if test ! -x "$MIDL_PATH/midl.exe"; then 21777aa0a607SDon Lewis AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path]) 21787aa0a607SDon Lewis fi 21797aa0a607SDon Lewis # Convert to posix path with 8.3 filename restrictions ( No spaces ) 21807aa0a607SDon Lewis MIDL_PATH=`cygpath -d "$MIDL_PATH"` 21817aa0a607SDon Lewis MIDL_PATH=`cygpath -u "$MIDL_PATH"` 21827aa0a607SDon Lewis 21837aa0a607SDon Lewis dnl Check csc.exe 21847aa0a607SDon Lewis AC_PATH_PROG(CSC_PATH, csc.exe) 21857aa0a607SDon Lewis if test -n "$CSC_PATH";then 21867aa0a607SDon Lewis CSC_PATH=`dirname "$CSC_PATH"` 21877aa0a607SDon Lewis fi 21887aa0a607SDon Lewis if test -n "$with_csc_path";then 21897aa0a607SDon Lewis with_csc_path=`cygpath -u "$with_csc_path"` 21907aa0a607SDon Lewis fi 21917aa0a607SDon Lewis if test -x "$with_csc_path/csc.exe"; then 21927aa0a607SDon Lewis CSC_PATH="$with_csc_path" 21937aa0a607SDon Lewis else 21947aa0a607SDon Lewis csctest=`./oowintool --csc-compilerdir`; 21957aa0a607SDon Lewis if test -x "$csctest/csc.exe"; then 21967aa0a607SDon Lewis CSC_PATH="$csctest" 21977aa0a607SDon Lewis fi 21987aa0a607SDon Lewis fi 21997aa0a607SDon Lewis if test ! -x "$CSC_PATH/csc.exe"; then 22007aa0a607SDon Lewis AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path]) 22017aa0a607SDon Lewis fi 22027aa0a607SDon Lewis # Convert to posix path with 8.3 filename restrictions ( No spaces ) 22037aa0a607SDon Lewis CSC_PATH=`cygpath -d "$CSC_PATH"` 22047aa0a607SDon Lewis CSC_PATH=`cygpath -u "$CSC_PATH"` 22057aa0a607SDon Lewis 22067aa0a607SDon Lewis dnl Check mscoree.lib / .NET Frameworks dir 22077aa0a607SDon Lewis dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib. 22087aa0a607SDon Lewis AC_MSG_CHECKING(.NET Framework) 22097aa0a607SDon Lewis if test -n "$with_frame_home"; then 22107aa0a607SDon Lewis with_frame_home=`cygpath -u "$with_frame_home"` 22117aa0a607SDon Lewis fi 22127aa0a607SDon Lewis if test -f "$with_frame_home/lib/mscoree.lib"; then 22137aa0a607SDon Lewis FRAME_HOME="$with_frame_home" 22147aa0a607SDon Lewis fi 22157aa0a607SDon Lewis if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then 22167aa0a607SDon Lewis FRAME_HOME="$with_cl_home/../SDK/v1.1" 22177aa0a607SDon Lewis fi 22187aa0a607SDon Lewis if test -z "$FRAME_HOME" ; then 22197aa0a607SDon Lewis frametest=`./oowintool --dotnetsdk-dir` 22207aa0a607SDon Lewis if test -f "$frametest/lib/mscoree.lib"; then 22217aa0a607SDon Lewis FRAME_HOME="$frametest" 22227aa0a607SDon Lewis else 22237aa0a607SDon Lewis frametest=`./oowintool --psdk-home` 22247aa0a607SDon Lewis if test -f "$frametest/lib/mscoree.lib"; then 22257aa0a607SDon Lewis FRAME_HOME="$frametest" 22267aa0a607SDon Lewis fi 22277aa0a607SDon Lewis fi 22287aa0a607SDon Lewis fi 22297aa0a607SDon Lewis if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then 22307aa0a607SDon Lewis AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home]) 22317aa0a607SDon Lewis fi 22327aa0a607SDon Lewis AC_MSG_RESULT(found) 22337aa0a607SDon Lewis # Convert to posix path with 8.3 filename restrictions ( No spaces ) 22347aa0a607SDon Lewis FRAME_HOME=`cygpath -d "$FRAME_HOME"` 22357aa0a607SDon Lewis FRAME_HOME=`cygpath -u "$FRAME_HOME"` 22367aa0a607SDon Lewisfi 22377aa0a607SDon LewisAC_SUBST(MIDL_PATH) 22387aa0a607SDon LewisAC_SUBST(CSC_PATH) 22397aa0a607SDon LewisAC_SUBST(FRAME_HOME) 22407aa0a607SDon Lewisfi 22417aa0a607SDon Lewis 22427aa0a607SDon Lewisdnl =================================================================== 22437aa0a607SDon Lewisdnl Check if stdc headers are available excluding windows. 22447aa0a607SDon Lewisdnl =================================================================== 22457aa0a607SDon Lewisif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 22467aa0a607SDon Lewis AC_HEADER_STDC 22477aa0a607SDon Lewisfi 22487aa0a607SDon Lewis 22497aa0a607SDon Lewisdnl =================================================================== 22507aa0a607SDon Lewisdnl Find pre-processors. 22517aa0a607SDon Lewisdnl =================================================================== 22527aa0a607SDon Lewisif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 22537aa0a607SDon Lewis AC_PROG_CXXCPP 22547aa0a607SDon Lewis 22557aa0a607SDon Lewisdnl Check whether there's a C pre-processor. 22567aa0a607SDon Lewisdnl =================================================================== 22577aa0a607SDon Lewisdnl When using SunStudio compiler, there is a bug with the cc 22587aa0a607SDon Lewisdnl preprocessor, so use CC preprocessor as the cc preprocessor 22597aa0a607SDon Lewisdnl See Issuezilla #445. 22607aa0a607SDon Lewisdnl =================================================================== 22617aa0a607SDon Lewis if test "$_os" = "SunOS"; then 22627aa0a607SDon Lewis CPP=$CXXCPP 22637aa0a607SDon Lewis else 22647aa0a607SDon Lewis AC_PROG_CPP 22657aa0a607SDon Lewis fi 22667aa0a607SDon Lewisfi 22677aa0a607SDon Lewis 22687aa0a607SDon LewisAC_CHECK_SIZEOF(long) 22697aa0a607SDon LewisSIZEOF_LONG=$ac_cv_sizeof_long 22707aa0a607SDon LewisAC_SUBST(SIZEOF_LONG) 22717aa0a607SDon LewisAC_C_BIGENDIAN 22727aa0a607SDon LewisWORDS_BIGENDIAN=$ac_cv_c_bigendian 22737aa0a607SDon LewisAC_SUBST(WORDS_BIGENDIAN) 22747aa0a607SDon Lewis 22757aa0a607SDon Lewisdnl Check for large file support 22767aa0a607SDon LewisAC_SYS_LARGEFILE 22777aa0a607SDon Lewisif test -n "$ac_cv_sys_file_offset_bits"; then 22787aa0a607SDon Lewis LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" 22797aa0a607SDon Lewisfi 22807aa0a607SDon Lewisif test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then 22817aa0a607SDon Lewis LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" 22827aa0a607SDon Lewisfi 22837aa0a607SDon LewisAC_SUBST(LFS_CFLAGS) 22847aa0a607SDon Lewis 22857aa0a607SDon Lewisdnl =================================================================== 22867aa0a607SDon Lewisdnl Check if valgrind.h is available 22877aa0a607SDon Lewisdnl =================================================================== 22887aa0a607SDon Lewisif test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then 22897aa0a607SDon Lewis dnl Test $prefix (currently only testing for /usr and /usr/local) 22907aa0a607SDon Lewis dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind 22917aa0a607SDon Lewis VALGRIND_CFLAGS="" 22927aa0a607SDon Lewis prev_cppflags=$CPPFLAGS 22937aa0a607SDon Lewis if test -z "$VALGRIND_CFLAGS"; then 22947aa0a607SDon Lewis CPPFLAGS="-I/usr/include/valgrind" 22957aa0a607SDon Lewis AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h]) 22967aa0a607SDon Lewis fi 22977aa0a607SDon Lewis if test -z "$VALGRIND_CFLAGS"; then 22987aa0a607SDon Lewis CPPFLAGS="-I/usr/local/include/valgrind" 22997aa0a607SDon Lewis AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], []) 23007aa0a607SDon Lewis fi 23017aa0a607SDon Lewis if test -n "$VALGRIND_CFLAGS"; then 23027aa0a607SDon Lewis CPPFLAGS=$VALGRIND_CFLAGS 23037aa0a607SDon Lewis AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""]) 23047aa0a607SDon Lewis fi 23057aa0a607SDon Lewis CPPFLAGS=$prev_cppflags 23067aa0a607SDon Lewisfi 23077aa0a607SDon LewisAC_SUBST([VALGRIND_CFLAGS]) 23087aa0a607SDon Lewis 23097aa0a607SDon Lewisdnl =================================================================== 23107aa0a607SDon Lewisdnl Check if cups/cups.h is available 23117aa0a607SDon Lewisdnl =================================================================== 23127aa0a607SDon Lewisif test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then 23137aa0a607SDon Lewis AC_CHECK_HEADER(cups/cups.h, [], 23147aa0a607SDon Lewis [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], []) 23157aa0a607SDon Lewisfi 23167aa0a607SDon Lewis 23177aa0a607SDon Lewisdnl =================================================================== 23187aa0a607SDon Lewisdnl Check if PAM/pam_appl.h is available on Linux or FreeBSD 23197aa0a607SDon Lewisdnl =================================================================== 23207aa0a607SDon Lewisif test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then 23217aa0a607SDon Lewis AC_MSG_CHECKING([whether to enable pam support]) 23227aa0a607SDon Lewis if test -z "$enable_pam" || test "$enable_pam" != "no"; then 23237aa0a607SDon Lewis AC_MSG_RESULT([yes]) 23247aa0a607SDon Lewis PAM=YES 23257aa0a607SDon Lewis AC_CHECK_HEADER(security/pam_appl.h, [], 23267aa0a607SDon Lewis [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], []) 23277aa0a607SDon Lewis AC_MSG_CHECKING([whether to link to libpam]) 23287aa0a607SDon Lewis if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then 23297aa0a607SDon Lewis AC_MSG_RESULT([yes]) 23307aa0a607SDon Lewis PAM_LINK=YES 23317aa0a607SDon Lewis AC_CHECK_LIB(pam, pam_start, [], 23327aa0a607SDon Lewis [AC_MSG_ERROR(libpam not found or functional)], []) 23337aa0a607SDon Lewis else 23347aa0a607SDon Lewis AC_MSG_RESULT([no, dynamically open it]) 23357aa0a607SDon Lewis PAM_LINK=NO 23367aa0a607SDon Lewis fi 23377aa0a607SDon Lewis else 23387aa0a607SDon Lewis AC_MSG_RESULT([no]) 23397aa0a607SDon Lewis PAM=NO 23407aa0a607SDon Lewis PAM_LINK=NO 23417aa0a607SDon Lewis dnl check getspnam_r for needed args (4 or 5) 23427aa0a607SDon Lewis AX_FUNC_WHICH_GETSPNAM_R 23437aa0a607SDon Lewis fi 23447aa0a607SDon Lewisfi 23457aa0a607SDon LewisAC_SUBST(PAM) 23467aa0a607SDon LewisAC_SUBST(NEW_SHADOW_API) 23477aa0a607SDon LewisAC_SUBST(PAM_LINK) 23487aa0a607SDon Lewis 23497aa0a607SDon Lewisif test "$_os" = "Linux"; then 23507aa0a607SDon Lewis AC_MSG_CHECKING([whether to link to libcrypt]) 23517aa0a607SDon Lewis if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then 23527aa0a607SDon Lewis AC_MSG_RESULT([yes]) 23537aa0a607SDon Lewis CRYPT_LINK=YES 23547aa0a607SDon Lewis AC_CHECK_LIB(crypt, crypt, [], 23557aa0a607SDon Lewis [AC_MSG_ERROR(libcrypt not found or functional)], []) 23567aa0a607SDon Lewis else 23577aa0a607SDon Lewis AC_MSG_RESULT([no, dynamically open it]) 23587aa0a607SDon Lewis CRYPT_LINK=NO 23597aa0a607SDon Lewis fi 23607aa0a607SDon Lewisfi 23617aa0a607SDon LewisAC_SUBST(CRYPT_LINK) 23627aa0a607SDon Lewis 23637aa0a607SDon Lewisdnl =================================================================== 23647aa0a607SDon Lewisdnl Testing for c++ compiler and version... 23657aa0a607SDon Lewisdnl =================================================================== 23667aa0a607SDon Lewisif test -n "$with_gcc_home"; then 23677aa0a607SDon Lewis if test -z "$CXX"; then 23687aa0a607SDon Lewis CXX="$with_gcc_home/bin/g++" 23697aa0a607SDon Lewis fi 23707aa0a607SDon Lewisfi 23717aa0a607SDon Lewis 23727aa0a607SDon Lewisif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 23737aa0a607SDon Lewis if test -e "$CC"; then 23747aa0a607SDon Lewis CXX="$CC" 23757aa0a607SDon Lewis fi 23767aa0a607SDon Lewisfi 23777aa0a607SDon Lewis 23787aa0a607SDon Lewisdnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't! 23797aa0a607SDon Lewisif test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then 23807aa0a607SDon Lewis AC_PROG_CXX 23817aa0a607SDon Lewisfi 23827aa0a607SDon Lewis 23837aa0a607SDon Lewisdnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk) 23847aa0a607SDon Lewisif test "$GXX" = "yes"; then 23857aa0a607SDon Lewis AC_MSG_CHECKING([the GNU C++ compiler version]) 23867aa0a607SDon Lewis 23877aa0a607SDon Lewis _gpp_version=`$CXX -dumpversion` 23887aa0a607SDon Lewis _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` 23897aa0a607SDon Lewis 23907aa0a607SDon Lewis AC_MSG_RESULT([checked (g++ $_gpp_version)]) 23917aa0a607SDon Lewis 23927aa0a607SDon Lewis if test "$_gpp_majmin" = "304"; then 23937aa0a607SDon Lewis AC_MSG_CHECKING([whether $CXX has the enum bug]) 23947aa0a607SDon LewisAC_TRY_RUN([ 23957aa0a607SDon Lewisextern "C" void abort (void); 23967aa0a607SDon Lewisextern "C" void exit (int status); 23977aa0a607SDon Lewis 23987aa0a607SDon Lewisenum E { E0, E1, E2, E3, E4, E5 }; 23997aa0a607SDon Lewis 24007aa0a607SDon Lewisvoid 24017aa0a607SDon Lewistest (enum E e) 24027aa0a607SDon Lewis{ 24037aa0a607SDon Lewis if (e == E2 || e == E3 || e == E1) 24047aa0a607SDon Lewis exit (1); 24057aa0a607SDon Lewis} 24067aa0a607SDon Lewis 24077aa0a607SDon Lewisint 24087aa0a607SDon Lewismain (void) 24097aa0a607SDon Lewis{ 24107aa0a607SDon Lewis test (E4); 24117aa0a607SDon Lewis test (E5); 24127aa0a607SDon Lewis test (E0); 24137aa0a607SDon Lewis return 0; 24147aa0a607SDon Lewis} 24157aa0a607SDon Lewis],[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])]) 24167aa0a607SDon Lewis fi 24177aa0a607SDon Lewisfi 24187aa0a607SDon Lewis 24197aa0a607SDon Lewisdnl =================================================================== 24207aa0a607SDon Lewisdnl Set the gcc/gxx include directories 24217aa0a607SDon Lewisdnl =================================================================== 24227aa0a607SDon Lewis# Removed the special FreeBSD treatment. The problem was that with_gxx_include_path 24237aa0a607SDon Lewis# often contains an i386 which is expanded as a macro. 24247aa0a607SDon Lewisif test "$GXX" = "yes"; then 24257aa0a607SDon Lewis AC_MSG_CHECKING([for g++ include path]) 24267aa0a607SDon Lewis if test -z "$with_gxx_include_path"; then 24277aa0a607SDon Lewis with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` 24287aa0a607SDon Lewis if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then 24297aa0a607SDon Lewis with_gxx_include_path="/usr/include" 24307aa0a607SDon Lewis fi 24317aa0a607SDon Lewis if test "$WITH_MINGWIN" = "yes"; then 24327aa0a607SDon Lewis with_gxx_include_path=`cygpath -d "$with_gxx_include_path"` 24337aa0a607SDon Lewis with_gxx_include_path=`cygpath -u "$with_gxx_include_path"` 24347aa0a607SDon Lewis fi 24357aa0a607SDon Lewis if echo $with_gxx_include_path | grep -q linux; then 24367aa0a607SDon Lewis # workaround for Mandriva - issue 100049 24377aa0a607SDon Lewis with_gxx_include_path=`cd $with_gxx_include_path && pwd` 24387aa0a607SDon Lewis fi 24397aa0a607SDon Lewis fi 24407aa0a607SDon Lewisfi 24417aa0a607SDon Lewisdnl This is the original code... 24427aa0a607SDon Lewisdnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include 24437aa0a607SDon Lewisif test -z "$with_gxx_include_path"; then 24447aa0a607SDon Lewis with_gxx_include_path="NO_GXX_INCLUDE" 24457aa0a607SDon Lewis AC_MSG_RESULT([no g++ includes]) 24467aa0a607SDon Lewiselse 24477aa0a607SDon Lewis AC_MSG_RESULT([$with_gxx_include_path]) 24487aa0a607SDon Lewisfi 24497aa0a607SDon LewisGXX_INCLUDE_PATH="$with_gxx_include_path" 24507aa0a607SDon LewisAC_SUBST(GXX_INCLUDE_PATH) 24517aa0a607SDon Lewis 24527aa0a607SDon Lewisdnl =================================================================== 24537aa0a607SDon Lewisdnl Set the mingw runtime library include directories 24547aa0a607SDon Lewisdnl =================================================================== 24557aa0a607SDon Lewisif test "$WITH_MINGWIN" = "yes"; then 24567aa0a607SDon Lewis AC_MSG_CHECKING([for mingwin runtime include path]) 24577aa0a607SDon Lewis cat >conftest.$ac_ext <<_ACEOF 24587aa0a607SDon Lewis#include <stddef.h> 24597aa0a607SDon Lewis#include <bits/c++config.h> 24607aa0a607SDon Lewis_ACEOF 24617aa0a607SDon Lewis _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` 24627aa0a607SDon Lewis rm conftest.$ac_ext 24637aa0a607SDon Lewis if test -n "$_mingw_lib_include_path"; then 24647aa0a607SDon Lewis _temp="" 24657aa0a607SDon Lewis for a in $_mingw_lib_include_path 24667aa0a607SDon Lewis do 24677aa0a607SDon Lewis a=`cygpath -d "$a"` 24687aa0a607SDon Lewis _temp="$_temp "`cygpath -u "$a"` 24697aa0a607SDon Lewis done 24707aa0a607SDon Lewis _mingw_lib_include_path=$_temp 24717aa0a607SDon Lewis fi 24727aa0a607SDon Lewis if test -z "$_mingw_lib_include_path"; then 24737aa0a607SDon Lewis _mingw_lib_include_path="NO_LIB_INCLUDE" 24747aa0a607SDon Lewis AC_MSG_RESULT([no mingwin runtime includes]) 24757aa0a607SDon Lewis else 24767aa0a607SDon Lewis AC_MSG_RESULT([$_mingw_lib_include_path]) 24777aa0a607SDon Lewis fi 24787aa0a607SDon Lewis MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" 24797aa0a607SDon Lewis AC_SUBST(MINGW_LIB_INCLUDE_PATH) 24807aa0a607SDon Lewisdnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map 24817aa0a607SDon Lewis AC_MSG_CHECKING([for mingwin c++ backward include path]) 24827aa0a607SDon Lewis cat >conftest.$ac_ext <<_ACEOF 24837aa0a607SDon Lewis#include <hash_set> 24847aa0a607SDon Lewis_ACEOF 24857aa0a607SDon Lewis _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` 24867aa0a607SDon Lewis rm conftest.$ac_ext 24877aa0a607SDon Lewis if test -n "$_mingw_backward_include_path"; then 24887aa0a607SDon Lewis _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` 24897aa0a607SDon Lewis _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` 24907aa0a607SDon Lewis AC_MSG_RESULT([$_mingw_backward_include_path]) 24917aa0a607SDon Lewis else 24927aa0a607SDon Lewis _mingw_backward_include_path="NO_BACKWARD_INCLUDE" 24937aa0a607SDon Lewis AC_MSG_RESULT([no mingwin c++ backward includes]) 24947aa0a607SDon Lewis fi 24957aa0a607SDon Lewis MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" 24967aa0a607SDon Lewis AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH) 24977aa0a607SDon Lewis mingw_crtbegin=`$CC -print-file-name=crtbegin.o` 24987aa0a607SDon Lewis MINGW_CLIB_DIR=`dirname $mingw_crtbegin` 24997aa0a607SDon Lewis AC_MSG_CHECKING([whether to use dynamic libgcc]) 25007aa0a607SDon Lewis if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then 25017aa0a607SDon Lewis AC_MSG_CHECKING([dynamic libgcc name]) 25027aa0a607SDon Lewis 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'` 25037aa0a607SDon Lewis MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` 25047aa0a607SDon Lewis if test -n "$MINGW_GCCDLL"; then 25057aa0a607SDon Lewis MINGW_SHARED_GCCLIB=YES 25067aa0a607SDon Lewis AC_MSG_RESULT([use $MINGW_GCCDLL]) 25077aa0a607SDon Lewis else 25087aa0a607SDon Lewis AC_MSG_RESULT([no]) 25097aa0a607SDon Lewis fi 25107aa0a607SDon Lewis else 25117aa0a607SDon Lewis AC_MSG_RESULT([no]) 25127aa0a607SDon Lewis fi 25137aa0a607SDon Lewis if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then 25147aa0a607SDon Lewis MINGW_GCCLIB_EH=YES 25157aa0a607SDon Lewis fi 25167aa0a607SDon Lewis AC_MSG_CHECKING([whether to use dynamic libstdc++]) 25177aa0a607SDon Lewis MINGW_SHARED_LIBSTDCPP= 25187aa0a607SDon Lewis if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then 25197aa0a607SDon Lewis MINGW_SHARED_LIBSTDCPP=stdc++_s 25207aa0a607SDon Lewis fi 25217aa0a607SDon Lewis if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then 25227aa0a607SDon Lewis MINGW_SHARED_LIBSTDCPP=stdc++.dll 25237aa0a607SDon Lewis fi 25247aa0a607SDon Lewis if test -n "$MINGW_SHARED_LIBSTDCPP" ; then 25257aa0a607SDon Lewis AC_MSG_CHECKING([dynamic libstdc++ name]) 25267aa0a607SDon Lewis 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'` 25277aa0a607SDon Lewis MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` 25287aa0a607SDon Lewis if test -n "$MINGW_GXXDLL"; then 25297aa0a607SDon Lewis MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP 25307aa0a607SDon Lewis MINGW_SHARED_GXXLIB=YES 25317aa0a607SDon Lewis AC_MSG_RESULT([use $MINGW_GXXDLL]) 25327aa0a607SDon Lewis else 25337aa0a607SDon Lewis MINGW_SHARED_LIBSTDCPP= 25347aa0a607SDon Lewis AC_MSG_RESULT([no]) 25357aa0a607SDon Lewis fi 25367aa0a607SDon Lewis else 25377aa0a607SDon Lewis AC_MSG_RESULT([no]) 25387aa0a607SDon Lewis fi 25397aa0a607SDon Lewis MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` 25407aa0a607SDon Lewis AC_SUBST(MINGW_CLIB_DIR) 25417aa0a607SDon Lewis AC_SUBST(MINGW_SHARED_GCCLIB) 25427aa0a607SDon Lewis AC_SUBST(MINGW_GCCLIB_EH) 25437aa0a607SDon Lewis AC_SUBST(MINGW_SHARED_GXXLIB) 25447aa0a607SDon Lewis AC_SUBST(MINGW_SHARED_LIBSTDCPP) 25457aa0a607SDon Lewis AC_SUBST(MINGW_GCCDLL) 25467aa0a607SDon Lewis AC_SUBST(MINGW_GXXDLL) 25477aa0a607SDon Lewisfi 25487aa0a607SDon Lewis 25497aa0a607SDon Lewisdnl =================================================================== 25507aa0a607SDon Lewisdnl Extra checking for the SUN OS compiler 25517aa0a607SDon Lewisdnl =================================================================== 25527aa0a607SDon Lewisif test "$_os" = "SunOS"; then 25537aa0a607SDon Lewis dnl SunStudio C++ compiler packaged with SunStudio C compiler 25547aa0a607SDon Lewis if test "$CC" = "cc"; then 25557aa0a607SDon Lewis AC_MSG_CHECKING([SunStudio C++ Compiler]) 25567aa0a607SDon Lewis if test "$CXX" != "CC"; then 25577aa0a607SDon Lewis AC_MSG_WARN([SunStudio C++ was not found]) 25587aa0a607SDon Lewis echo "SunStudio C++ was not found" >> warn 25597aa0a607SDon Lewis else 25607aa0a607SDon Lewis AC_MSG_RESULT([checked]) 25617aa0a607SDon Lewis fi 25627aa0a607SDon Lewis fi 25637aa0a607SDon Lewisfi 25647aa0a607SDon Lewisdnl =================================================================== 25657aa0a607SDon Lewisdnl Extra checking for the OSF compiler 25667aa0a607SDon Lewisdnl =================================================================== 25677aa0a607SDon Lewisif test "$_os" = "OSF1"; then 25687aa0a607SDon Lewis AC_MSG_CHECKING([Compaq C++ compiler version]) 25697aa0a607SDon Lewis dnl cxx -V outputs to standard error!!!! 25707aa0a607SDon Lewis _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` 25717aa0a607SDon Lewis _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'` 25727aa0a607SDon Lewis if test "$_compaqcxx_major" != "V6"; then 25737aa0a607SDon Lewis AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler]) 25747aa0a607SDon Lewis echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn 25757aa0a607SDon Lewis else 25767aa0a607SDon Lewis dnl compiler will do 25777aa0a607SDon Lewis AC_MSG_RESULT([checked]) 25787aa0a607SDon Lewis fi 25797aa0a607SDon Lewisfi 25807aa0a607SDon Lewis 25817aa0a607SDon Lewisdnl ************************************************************* 25827aa0a607SDon Lewisdnl Testing for exception handling - dwarf2 or sjlj exceptions... 25837aa0a607SDon Lewisdnl ************************************************************* 25847aa0a607SDon LewisAC_MSG_CHECKING([exception type]) 25857aa0a607SDon LewisAC_LANG_PUSH([C++]) 25867aa0a607SDon Lewisif test "$WITH_MINGWIN" = "yes"; then 25877aa0a607SDon Lewis AC_TRY_LINK( 25887aa0a607SDon Lewis [#include <iostream> 25897aa0a607SDon Lewis 25907aa0a607SDon Lewisextern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__)); 25917aa0a607SDon Lewis 25927aa0a607SDon Lewis ], 25937aa0a607SDon Lewis [_Unwind_SjLj_RaiseException() ], 25947aa0a607SDon Lewis [exceptions_type="sjlj"], 25957aa0a607SDon Lewis [exceptions_type="dwarf2"] 25967aa0a607SDon Lewis ) 25977aa0a607SDon Lewisfi 25987aa0a607SDon Lewis 25997aa0a607SDon LewisAC_MSG_RESULT($exceptions_type) 26007aa0a607SDon LewisAC_LANG_POP([C++]) 26017aa0a607SDon LewisEXCEPTIONS="$exceptions_type" 26027aa0a607SDon LewisAC_SUBST(EXCEPTIONS) 26037aa0a607SDon Lewis 26047aa0a607SDon Lewisdnl ************************************************************** 26057aa0a607SDon Lewisdnl Testing for required Solaris and SunStudio compiler patches... 26067aa0a607SDon Lewisdnl ************************************************************** 26077aa0a607SDon Lewisdnl Check whether the OS is SunOS. 26087aa0a607SDon Lewisif test "$_os" = "SunOS"; then 26097aa0a607SDon Lewis _temp=`showrev -p | $AWK -F" " '{ print $2 }'` 26107aa0a607SDon Lewis if test "$_os_release" = "7"; then 26117aa0a607SDon Lewis dnl *************** 26127aa0a607SDon Lewis dnl patch 106327-06 26137aa0a607SDon Lewis dnl *************** 26147aa0a607SDon Lewis AC_MSG_CHECKING([for patch 106327-06 or greater]) 26157aa0a607SDon Lewis _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'` 26167aa0a607SDon Lewis _patch="false" 26177aa0a607SDon Lewis for i in $_temp 26187aa0a607SDon Lewis do 26197aa0a607SDon Lewis _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'` 26207aa0a607SDon Lewis if test "$_patch_major" = "106327"; then 26217aa0a607SDon Lewis _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'` 26227aa0a607SDon Lewis if test "$_patch_rev" -ge "6"; then 26237aa0a607SDon Lewis _patch="found" 26247aa0a607SDon Lewis fi 26257aa0a607SDon Lewis fi 26267aa0a607SDon Lewis done 26277aa0a607SDon Lewis if test "$_patch" = "found"; then 26287aa0a607SDon Lewis AC_MSG_RESULT([found]) 26297aa0a607SDon Lewis else 26307aa0a607SDon Lewis AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater]) 26317aa0a607SDon Lewis echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn 26327aa0a607SDon Lewis fi 26337aa0a607SDon Lewis dnl *************** 26347aa0a607SDon Lewis dnl patch 106950-11 26357aa0a607SDon Lewis dnl *************** 26367aa0a607SDon Lewis AC_MSG_CHECKING([for patch 106950-11 or greater]) 26377aa0a607SDon Lewis _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'` 26387aa0a607SDon Lewis _patch="false" 26397aa0a607SDon Lewis for i in $_temp 26407aa0a607SDon Lewis do 26417aa0a607SDon Lewis _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'` 26427aa0a607SDon Lewis if test "$_patch_major" = "106950"; then 26437aa0a607SDon Lewis _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'` 26447aa0a607SDon Lewis if test "$_patch_rev" -ge "11"; then 26457aa0a607SDon Lewis _patch="found" 26467aa0a607SDon Lewis fi 26477aa0a607SDon Lewis fi 26487aa0a607SDon Lewis done 26497aa0a607SDon Lewis if test "$_patch" = "found"; then 26507aa0a607SDon Lewis AC_MSG_RESULT([found]) 26517aa0a607SDon Lewis else 26527aa0a607SDon Lewis AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater]) 26537aa0a607SDon Lewis echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn 26547aa0a607SDon Lewis fi 26557aa0a607SDon Lewis else 26567aa0a607SDon Lewis if test "$_os_release" = "6"; then 26577aa0a607SDon Lewis dnl *************** 26587aa0a607SDon Lewis dnl patch 105591-09 26597aa0a607SDon Lewis dnl *************** 26607aa0a607SDon Lewis AC_MSG_CHECKING([for patch 105591-09 or greater]) 26617aa0a607SDon Lewis _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'` 26627aa0a607SDon Lewis _patch="false" 26637aa0a607SDon Lewis for i in $_temp 26647aa0a607SDon Lewis do 26657aa0a607SDon Lewis _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'` 26667aa0a607SDon Lewis if test "$_patch_major" = "105591"; then 26677aa0a607SDon Lewis _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'` 26687aa0a607SDon Lewis if test "$_patch_rev" -ge "9"; then 26697aa0a607SDon Lewis _patch="found" 26707aa0a607SDon Lewis fi 26717aa0a607SDon Lewis fi 26727aa0a607SDon Lewis done 26737aa0a607SDon Lewis if test "$_patch" = "found"; then 26747aa0a607SDon Lewis AC_MSG_RESULT([found]) 26757aa0a607SDon Lewis else 26767aa0a607SDon Lewis AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater]) 26777aa0a607SDon Lewis echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn 26787aa0a607SDon Lewis fi 26797aa0a607SDon Lewis dnl *************** 26807aa0a607SDon Lewis dnl patch 107733-08 26817aa0a607SDon Lewis dnl *************** 26827aa0a607SDon Lewis AC_MSG_CHECKING([for patch 107733-08 or greater]) 26837aa0a607SDon Lewis _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'` 26847aa0a607SDon Lewis _patch="false" 26857aa0a607SDon Lewis for i in $_temp 26867aa0a607SDon Lewis do 26877aa0a607SDon Lewis _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'` 26887aa0a607SDon Lewis if test "$_patch_major" = "107733"; then 26897aa0a607SDon Lewis _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'` 26907aa0a607SDon Lewis if test "$_patch_rev" -ge "8"; then 26917aa0a607SDon Lewis _patch="found" 26927aa0a607SDon Lewis fi 26937aa0a607SDon Lewis fi 26947aa0a607SDon Lewis done 26957aa0a607SDon Lewis if test "$_patch" = "found"; then 26967aa0a607SDon Lewis AC_MSG_RESULT([found]) 26977aa0a607SDon Lewis else 26987aa0a607SDon Lewis AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater]) 26997aa0a607SDon Lewis echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn 27007aa0a607SDon Lewis fi 27017aa0a607SDon Lewis fi 27027aa0a607SDon Lewis fi 27037aa0a607SDon Lewisfi 27047aa0a607SDon Lewis 27057aa0a607SDon Lewisdnl =================================================================== 27067aa0a607SDon Lewisdnl Checks for what the default STL should be 27077aa0a607SDon Lewisdnl =================================================================== 27087aa0a607SDon Lewis AC_MSG_CHECKING([what the default STL should be]) 27097aa0a607SDon Lewis DEFAULT_TO_STLPORT="no" 27107aa0a607SDon Lewisif test "$WITH_STLPORT" != "no"; then 27117aa0a607SDon Lewis AC_MSG_ERROR([Option --with-stlport is no longer available.]) 27127aa0a607SDon Lewiselse 27137aa0a607SDon Lewis USE_SYSTEM_STL="YES" 27147aa0a607SDon Lewisfi 27157aa0a607SDon Lewis 27167aa0a607SDon LewisAC_SUBST(USE_SYSTEM_STL) 27177aa0a607SDon Lewis 27187aa0a607SDon Lewisdnl =================================================================== 27197aa0a607SDon Lewisdnl visibility feature 27207aa0a607SDon Lewisdnl =================================================================== 27217aa0a607SDon Lewisif test "$GCC" = "yes"; then 27227aa0a607SDon Lewis AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) 27237aa0a607SDon Lewis save_CFLAGS=$CFLAGS 27247aa0a607SDon Lewis CFLAGS="$CFLAGS -fvisibility=hidden" 27257aa0a607SDon Lewis AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], []) 27267aa0a607SDon Lewis CFLAGS=$save_CFLAGS 27277aa0a607SDon Lewis if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 27287aa0a607SDon Lewis AC_MSG_RESULT([yes]) 27297aa0a607SDon Lewis else 27307aa0a607SDon Lewis AC_MSG_RESULT([no]) 27317aa0a607SDon Lewis fi 27327aa0a607SDon Lewisfi 27337aa0a607SDon Lewis 27347aa0a607SDon Lewis# =================================================================== 27357aa0a607SDon Lewis# use --ccache-skip? 27367aa0a607SDon Lewis# =================================================================== 27377aa0a607SDon Lewisdnl used to escape compiler options for ccache that otherwise prevent 27387aa0a607SDon Lewisdnl caching of the results (like "-x objective-c++" for Mac) 27397aa0a607SDon LewisAC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip]) 27407aa0a607SDon Lewisif test "$_os" != "Darwin" ; then 27417aa0a607SDon Lewis AC_MSG_RESULT([only used on Mac currently, skipping]) 27427aa0a607SDon Lewiselif test "$enable_ccache_skip" = "no" ; then 27437aa0a607SDon Lewis AC_MSG_RESULT([no - diabled explicitly]) 27447aa0a607SDon Lewiselif test "$enable_ccache_skip" = "yes" ; then 27457aa0a607SDon Lewis AC_MSG_RESULT([yes - enabled explicitly, skipping checks]) 27467aa0a607SDon Lewis AC_SUBST([USE_CCACHE], [YES]) 27477aa0a607SDon Lewiselif test "$enable_ccache_skip" = "auto" ; then 27487aa0a607SDon Lewis # checking for ccache presence/version 27497aa0a607SDon Lewis AC_MSG_RESULT([probing...]) 27507aa0a607SDon Lewis AC_PATH_PROG([CCACHE],[ccache],[not_found]) 27517aa0a607SDon Lewis if test "$CCACHE" = "not_found" ; then 27527aa0a607SDon Lewis AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)]) 27537aa0a607SDon Lewis else 27547aa0a607SDon Lewis # check ccache version 27557aa0a607SDon Lewis AC_MSG_CHECKING([whether version of ccache is suitable]) 27567aa0a607SDon Lewis CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` 27577aa0a607SDon Lewis if test "$CCACHE_VERSION" = "2.4_OOo"; then 27587aa0a607SDon Lewis AC_MSG_RESULT([yes]) 27597aa0a607SDon Lewis AC_MSG_CHECKING([whether ccache is actually used for the build]) 27607aa0a607SDon Lewis AC_LANG_PUSH([C++]) 27617aa0a607SDon Lewis save_CXXFLAGS=$CXXFLAGS 27627aa0a607SDon Lewis CXXFLAGS="$CXXFLAGS --ccache-skip -O2" 27637aa0a607SDon Lewis dnl an empty program will do, we're checking the compiler flags 27647aa0a607SDon Lewis AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], 27657aa0a607SDon Lewis [use_ccache=yes], [use_ccache=no]) 27667aa0a607SDon Lewis if test $use_ccache = yes ; then 27677aa0a607SDon Lewis AC_MSG_RESULT([yes, will enable --ccache-skip]) 27687aa0a607SDon Lewis AC_SUBST([USE_CCACHE], [YES]) 27697aa0a607SDon Lewis else 27707aa0a607SDon Lewis AC_MSG_RESULT([no, will not enable --ccache-skip]) 27717aa0a607SDon Lewis fi 27727aa0a607SDon Lewis CXXFLAGS=$save_CXXFLAGS 27737aa0a607SDon Lewis AC_LANG_POP([C++]) 27747aa0a607SDon Lewis else 27757aa0a607SDon Lewis AC_MSG_RESULT([no]) 27767aa0a607SDon Lewis AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip]) 27777aa0a607SDon Lewis fi 27787aa0a607SDon Lewis fi 27797aa0a607SDon Lewiselse 27807aa0a607SDon Lewis AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"]) 27817aa0a607SDon Lewisfi 27827aa0a607SDon Lewis 27837aa0a607SDon Lewisdnl =================================================================== 27847aa0a607SDon Lewisdnl system stl sanity tests 27857aa0a607SDon Lewisdnl =================================================================== 27867aa0a607SDon Lewisif false ; then # TODO: update TR1 compliant STLs 27877aa0a607SDon Lewisif test "$USE_SYSTEM_STL" = "YES"; then 27887aa0a607SDon Lewis AC_MSG_CHECKING([system stl sanity]) 27897aa0a607SDon Lewis AC_LANG_PUSH([C++]) 27907aa0a607SDon Lewis 27917aa0a607SDon Lewis if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 27927aa0a607SDon Lewis AC_MSG_CHECKING([if STL headers are visibility safe]) 27937aa0a607SDon Lewis AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no) 27947aa0a607SDon Lewis AC_MSG_RESULT([$stlvisok]) 27957aa0a607SDon Lewis if test "$stlvisok" = "no"; then 27967aa0a607SDon Lewis AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility]) 27977aa0a607SDon Lewis echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn 27987aa0a607SDon Lewis unset HAVE_GCC_VISIBILITY_FEATURE 27997aa0a607SDon Lewis fi 28007aa0a607SDon Lewis fi 28017aa0a607SDon Lewis 28027aa0a607SDon Lewis if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 28037aa0a607SDon Lewis sharedlink_ldflags_save=$LDFLAGS 28047aa0a607SDon Lewis LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" 28057aa0a607SDon Lewis 28067aa0a607SDon Lewis AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers]) 28077aa0a607SDon Lewis AC_TRY_LINK([#include <sstream> 28087aa0a607SDon Lewisusing namespace std; 28097aa0a607SDon Lewis],[istringstream strm( "test" ); return 0;], 28107aa0a607SDon Lewis $EGREP -q unresolvable conftest.err; 28117aa0a607SDon Lewis if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi, 28127aa0a607SDon Lewis gccvisok=no) 28137aa0a607SDon Lewis AC_MSG_RESULT([$gccvisok]) 28147aa0a607SDon Lewis if test "$gccvisok" = "no"; then 28157aa0a607SDon Lewis AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility]) 28167aa0a607SDon Lewis echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn 28177aa0a607SDon Lewis unset HAVE_GCC_VISIBILITY_FEATURE 28187aa0a607SDon Lewis fi 28197aa0a607SDon Lewis 28207aa0a607SDon Lewis LDFLAGS=$sharedlink_ldflags_save 28217aa0a607SDon Lewis fi 28227aa0a607SDon Lewis 28237aa0a607SDon Lewis if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then 28247aa0a607SDon Lewis AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) 28257aa0a607SDon Lewis cat >visibility.cxx <<_ACEOF 28267aa0a607SDon Lewis#pragma GCC visibility push(hidden) 28277aa0a607SDon Lewisstruct __attribute__ ((visibility ("default"))) TestStruct { 28287aa0a607SDon Lewis static void Init(); 28297aa0a607SDon Lewis}; 28307aa0a607SDon Lewis__attribute__ ((visibility ("default"))) void TestFunc() { 28317aa0a607SDon Lewis TestStruct::Init(); 28327aa0a607SDon Lewis} 28337aa0a607SDon Lewis_ACEOF 28347aa0a607SDon Lewis if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then 28357aa0a607SDon Lewis gccvisbroken=yes 28367aa0a607SDon Lewis else 28377aa0a607SDon Lewis case "$build_cpu" in 28387aa0a607SDon Lewis i?86|x86_64) 28397aa0a607SDon Lewis if $EGREP -q '@PLT' visibility.s; then 28407aa0a607SDon Lewis gccvisbroken=no 28417aa0a607SDon Lewis else 28427aa0a607SDon Lewis gccvisbroken=yes 28437aa0a607SDon Lewis fi 28447aa0a607SDon Lewis ;; 28457aa0a607SDon Lewis *) 28467aa0a607SDon Lewis gccvisbroken=no 28477aa0a607SDon Lewis ;; 28487aa0a607SDon Lewis esac 28497aa0a607SDon Lewis fi 28507aa0a607SDon Lewis rm -f visibility.s visibility.cxx 28517aa0a607SDon Lewis 28527aa0a607SDon Lewis AC_MSG_RESULT([$gccvisbroken]) 28537aa0a607SDon Lewis if test "$gccvisbroken" = "yes"; then 28547aa0a607SDon Lewis AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility]) 28557aa0a607SDon Lewis echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn 28567aa0a607SDon Lewis unset HAVE_GCC_VISIBILITY_FEATURE 28577aa0a607SDon Lewis fi 28587aa0a607SDon Lewis fi 28597aa0a607SDon Lewis 28607aa0a607SDon Lewis AC_LANG_POP([C++]) 28617aa0a607SDon Lewisfi 28627aa0a607SDon Lewisfi # endof TODO: update TR1 compliant STLs 28637aa0a607SDon Lewis 28647aa0a607SDon LewisAC_SUBST(HAVE_GCC_VISIBILITY_FEATURE) 28657aa0a607SDon Lewis 28667aa0a607SDon Lewisdnl =================================================================== 28677aa0a607SDon Lewisdnl allocator 28687aa0a607SDon Lewisdnl =================================================================== 28697aa0a607SDon LewisAC_MSG_CHECKING([which memory allocator to use]) 28707aa0a607SDon Lewisif test "$with_alloc" = "system"; then 28717aa0a607SDon Lewis AC_MSG_RESULT([system]) 28727aa0a607SDon Lewis ALLOC="SYS_ALLOC"; 28737aa0a607SDon Lewis AC_CHECK_FUNCS([malloc realloc calloc free]) 28747aa0a607SDon Lewisfi 28757aa0a607SDon Lewisif test "$with_alloc" = "tcmalloc"; then 28767aa0a607SDon Lewis AC_MSG_RESULT(tcmalloc) 28777aa0a607SDon Lewis if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then 28787aa0a607SDon Lewis AC_MSG_ERROR([tcmalloc only available/usable on ix86]) 28797aa0a607SDon Lewis fi 28807aa0a607SDon Lewis AC_CHECK_LIB(tcmalloc, malloc, [], 28817aa0a607SDon Lewis [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], []) 28827aa0a607SDon Lewis ALLOC="TCMALLOC"; 28837aa0a607SDon Lewisfi 28847aa0a607SDon Lewisif test "$with_alloc" = "jemalloc"; then 28857aa0a607SDon Lewis if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then 28867aa0a607SDon Lewis AC_MSG_RESULT(jemalloc) 28877aa0a607SDon Lewis save_CFLAGS=$CFLAGS 28887aa0a607SDon Lewis CFLAGS="$CFLAGS -pthread" 28897aa0a607SDon Lewis AC_CHECK_LIB(jemalloc, malloc, [], 28907aa0a607SDon Lewis [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], []) 28917aa0a607SDon Lewis ALLOC="JEMALLOC"; 28927aa0a607SDon Lewis CFLAGS=$save_CFLAGS 28937aa0a607SDon Lewis else 28947aa0a607SDon Lewis AC_MSG_RESULT([system]) 28957aa0a607SDon Lewis ALLOC="SYS_ALLOC"; 28967aa0a607SDon Lewis AC_CHECK_FUNCS([malloc realloc calloc free]) 28977aa0a607SDon Lewis fi 28987aa0a607SDon Lewisfi 28997aa0a607SDon Lewisif test "$with_alloc" = "internal" -o -z "$with_alloc"; then 29007aa0a607SDon Lewis AC_MSG_RESULT([internal]) 29017aa0a607SDon Lewisfi 29027aa0a607SDon LewisAC_SUBST(ALLOC) 29037aa0a607SDon Lewis 29047aa0a607SDon Lewisdnl =================================================================== 29057aa0a607SDon Lewisdnl Custom build version 29067aa0a607SDon Lewisdnl =================================================================== 29077aa0a607SDon Lewis 29087aa0a607SDon LewisAC_MSG_CHECKING([whether to add custom build version]) 29097aa0a607SDon Lewisif test "z$with_build_version" != "z"; then 29107aa0a607SDon Lewis BUILD_VER_STRING=$with_build_version 29117aa0a607SDon Lewis AC_MSG_RESULT([yes, $BUILD_VER_STRING]) 29127aa0a607SDon Lewiselse 291317435e9bSJuergen Schmidt BUILD_VER_STRING=`date +"%Y-%m-%d %H:%M:%S (%a, %d %b %Y)"` 29147aa0a607SDon Lewis AC_MSG_RESULT([no]) 29157aa0a607SDon Lewisfi 29167aa0a607SDon LewisAC_SUBST(BUILD_VER_STRING) 29177aa0a607SDon Lewis 29187aa0a607SDon Lewisdnl =================================================================== 29197aa0a607SDon Lewisdnl Java support enable 29207aa0a607SDon Lewisdnl =================================================================== 29217aa0a607SDon LewisAC_MSG_CHECKING([whether to build with Java support]) 29227aa0a607SDon Lewisif test "$WITH_JAVA" != "no"; then 29237aa0a607SDon Lewis AC_MSG_RESULT([yes]) 29247aa0a607SDon Lewis SOLAR_JAVA="TRUE" 29257aa0a607SDon Lewiselse 29267aa0a607SDon Lewis AC_MSG_RESULT([no]) 29277aa0a607SDon Lewis SOLAR_JAVA="" 29287aa0a607SDon Lewis 29297aa0a607SDon Lewis AC_MSG_WARN([building without java will mean some features will not be available]) 29307aa0a607SDon Lewis echo "building without java will mean some features will not be available" >>warn 29317aa0a607SDon Lewisfi 29327aa0a607SDon LewisAC_SUBST(SOLAR_JAVA) 29337aa0a607SDon Lewis 29347aa0a607SDon Lewisif test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then 29357aa0a607SDon Lewis # IBMs JDK needs this... 29367aa0a607SDon Lewis JITC_PROCESSOR_TYPE=6 29377aa0a607SDon Lewis export JITC_PROCESSOR_TYPE 29387aa0a607SDon Lewisfi 29397aa0a607SDon Lewis 29407aa0a607SDon Lewisif test "$_os" = "WINNT"; then 29417aa0a607SDon Lewis if test -z "$with_jdk_home"; then 29427aa0a607SDon Lewis _jdk_home=`./oowintool --jdk-home` 29437aa0a607SDon Lewis if test -d "$_jdk_home"; then 29447aa0a607SDon Lewis with_jdk_home="$_jdk_home" 29457aa0a607SDon Lewis fi 29467aa0a607SDon Lewis else 29477aa0a607SDon Lewis with_jdk_home=`cygpath -u "$with_jdk_home"` 29487aa0a607SDon Lewis fi 29497aa0a607SDon Lewisfi 29507aa0a607SDon Lewis 29517aa0a607SDon Lewisdnl =================================================================== 29527aa0a607SDon Lewisdnl Checks for java 29537aa0a607SDon Lewisdnl =================================================================== 29547aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 29557aa0a607SDon Lewis JAVA_HOME=; export JAVA_HOME 29567aa0a607SDon Lewis if test -z "$with_jdk_home"; then 29577aa0a607SDon Lewis AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA) 29587aa0a607SDon Lewis else 29597aa0a607SDon Lewis _java_path="$with_jdk_home/bin/$WITH_JAVA" 29607aa0a607SDon Lewis dnl Check if there is a java interpreter at all. 29617aa0a607SDon Lewis if test -x "$_java_path"; then 29627aa0a607SDon Lewis JAVAINTERPRETER=$_java_path 29637aa0a607SDon Lewis else 29647aa0a607SDon Lewis AC_MSG_ERROR([$_java_path not found, please use --with-jdk-home]) 29657aa0a607SDon Lewis fi 29667aa0a607SDon Lewis fi 29677aa0a607SDon Lewis if test "$_os" = "WINNT"; then 29687aa0a607SDon Lewis if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then 29697aa0a607SDon Lewis JAVAINTERPRETER="${JAVAINTERPRETER}.exe" 29707aa0a607SDon Lewis fi 29717aa0a607SDon Lewis JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` 29727aa0a607SDon Lewis JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` 29737aa0a607SDon Lewis elif test "$_os" = "Darwin"; then 29747aa0a607SDon Lewis JAVAIFLAGS="" 29757aa0a607SDon Lewis fi 29767aa0a607SDon Lewisfi 29777aa0a607SDon Lewis 29787aa0a607SDon Lewisdnl =================================================================== 29797aa0a607SDon Lewisdnl Checks for JDK. 29807aa0a607SDon Lewisdnl =================================================================== 29817aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 29827aa0a607SDon Lewis _gij_longver=0 29837aa0a607SDon Lewis AC_MSG_CHECKING([the installed JDK]) 29847aa0a607SDon Lewis if test -n "$JAVAINTERPRETER"; then 29857aa0a607SDon Lewis dnl java -version sends output to stderr! 29867aa0a607SDon Lewis if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then 29877aa0a607SDon Lewis AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) 29887aa0a607SDon Lewis# dnl Kaffe specific tests 29897aa0a607SDon Lewis# KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` 29907aa0a607SDon Lewis# if test -z "$KAFFE_VER"; then 29917aa0a607SDon Lewis# AC_MSG_ERROR([looks like Kaffe but version detection failed]) 29927aa0a607SDon Lewis# fi 29937aa0a607SDon Lewis# _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 29947aa0a607SDon Lewis# if test "$_kaffe_ver" -lt 10100; then 29957aa0a607SDon Lewis# AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0]) 29967aa0a607SDon Lewis# fi 29977aa0a607SDon Lewis# JDK=kaffe 29987aa0a607SDon Lewis# 29997aa0a607SDon Lewis# dnl TODO: define some project exclusion variables 30007aa0a607SDon Lewis# 30017aa0a607SDon Lewis# AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)]) 30027aa0a607SDon Lewis# AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile]) 30037aa0a607SDon Lewis# echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn 30047aa0a607SDon Lewis# JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` 30057aa0a607SDon Lewis elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then 30067aa0a607SDon Lewis JDK=gcj 30077aa0a607SDon Lewis AC_MSG_RESULT([checked (gcj)]) 30087aa0a607SDon Lewis _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 30097aa0a607SDon Lewis _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` 30107aa0a607SDon Lewis 30117aa0a607SDon Lewis elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then 30127aa0a607SDon Lewis AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) 30137aa0a607SDon Lewis# JDK=bea 30147aa0a607SDon Lewis# 30157aa0a607SDon Lewis# dnl BEA JDK specific tests 30167aa0a607SDon Lewis# _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 30177aa0a607SDon Lewis# _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 30187aa0a607SDon Lewis# 30197aa0a607SDon Lewis# if test "$_jdk_ver" -lt 10500; then 30207aa0a607SDon Lewis# AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0]) 30217aa0a607SDon Lewis# fi 30227aa0a607SDon Lewis# 30237aa0a607SDon Lewis# AC_MSG_RESULT([checked (BEA JDK $_jdk)]) 30247aa0a607SDon Lewis# 30257aa0a607SDon Lewis# if test "$with_jdk_home" = ""; then 30267aa0a607SDon Lewis# AC_MSG_ERROR([In order to successfully build Apache OpenOffice using the BEA JDK, 30277aa0a607SDon Lewis#you must use the "--with-jdk-home" configure option explicitly]) 30287aa0a607SDon Lewis# fi 30297aa0a607SDon Lewis# 30307aa0a607SDon Lewis# AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules]) 30317aa0a607SDon Lewis# echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn 30327aa0a607SDon Lewis# 30337aa0a607SDon Lewis# JAVA_HOME=$with_jdk_home 30347aa0a607SDon Lewis# 30357aa0a607SDon Lewis elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then 30367aa0a607SDon Lewis JDK=ibm 30377aa0a607SDon Lewis 30387aa0a607SDon Lewis dnl IBM JDK specific tests 30397aa0a607SDon Lewis _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 30407aa0a607SDon Lewis _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 30417aa0a607SDon Lewis 30427aa0a607SDon Lewis if test "$_jdk_ver" -lt 10500; then 30437aa0a607SDon Lewis AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5]) 30447aa0a607SDon Lewis fi 30457aa0a607SDon Lewis 30467aa0a607SDon Lewis AC_MSG_RESULT([checked (IBM JDK $_jdk)]) 30477aa0a607SDon Lewis 30487aa0a607SDon Lewis if test "$with_jdk_home" = ""; then 30497aa0a607SDon Lewis AC_MSG_ERROR([In order to successfully build Apache OpenOffice using the IBM JDK, 30507aa0a607SDon Lewisyou must use the "--with-jdk-home" configure option explicitly]) 30517aa0a607SDon Lewis fi 30527aa0a607SDon Lewis 30537aa0a607SDon Lewis JAVA_HOME=$with_jdk_home 30547aa0a607SDon Lewis 30557aa0a607SDon Lewis else 30567aa0a607SDon Lewis JDK=sun 30577aa0a607SDon Lewis 30587aa0a607SDon Lewis dnl SUN JDK specific tests 30597aa0a607SDon Lewis _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` 30607aa0a607SDon Lewis _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` 30617aa0a607SDon Lewis 30627aa0a607SDon Lewis if test "$_jdk_ver" -lt 10500; then 30637aa0a607SDon Lewis AC_MSG_ERROR([JDK is too old, you need at least 1.5]) 30647aa0a607SDon Lewis fi 30657aa0a607SDon Lewis AC_MSG_RESULT([checked (JDK $_jdk)]) 3066c19b8f98SDon Lewis JAVAFLAGS="-source 1.5 -target 1.5" 30677aa0a607SDon Lewis JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` 30687aa0a607SDon Lewis if test "$_os" = "WINNT"; then 30697aa0a607SDon Lewis JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` 30707aa0a607SDon Lewis fi 30717aa0a607SDon Lewis if test "$_os" = "OS2"; then 30727aa0a607SDon Lewis JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` 30737aa0a607SDon Lewis fi 30747aa0a607SDon Lewis fi 30757aa0a607SDon Lewis else 30767aa0a607SDon Lewis AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4]) 30777aa0a607SDon Lewis fi 30787aa0a607SDon Lewiselse 30797aa0a607SDon Lewis dnl Java disabled 30807aa0a607SDon Lewis JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME 30817aa0a607SDon Lewisfi 30827aa0a607SDon Lewis 30837aa0a607SDon Lewisdnl =================================================================== 30847aa0a607SDon Lewisdnl Checks for javac 30857aa0a607SDon Lewisdnl =================================================================== 30867aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 30877aa0a607SDon Lewis if test "$JDK" = "gcj"; then 30887aa0a607SDon Lewis javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"` 30897aa0a607SDon Lewis else 30907aa0a607SDon Lewis javacompiler="javac" 30917aa0a607SDon Lewis fi 30927aa0a607SDon Lewis if test "$_os" = "OS2"; then 30937aa0a607SDon Lewis if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then 30947aa0a607SDon Lewis javacompiler="${javacompiler}.exe" 30957aa0a607SDon Lewis fi 30967aa0a607SDon Lewis fi 30977aa0a607SDon Lewis if test -z "$with_jdk_home"; then 30987aa0a607SDon Lewis AC_PATH_PROG(JAVACOMPILER, $javacompiler) 30997aa0a607SDon Lewis else 31007aa0a607SDon Lewis _javac_path="$with_jdk_home/bin/$javacompiler" 31017aa0a607SDon Lewis dnl Check if there is a java compiler at all. 31027aa0a607SDon Lewis if test -x "$_javac_path"; then 31037aa0a607SDon Lewis JAVACOMPILER=$_javac_path 31047aa0a607SDon Lewis fi 31057aa0a607SDon Lewis fi 31067aa0a607SDon Lewis if test -z "$JAVACOMPILER"; then 31077aa0a607SDon Lewis AC_MSG_ERROR([$javacompiler not found, please use --with-jdk-home]) 31087aa0a607SDon Lewis fi 31097aa0a607SDon Lewis if test "$_os" = "WINNT"; then 31107aa0a607SDon Lewis if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then 31117aa0a607SDon Lewis JAVACOMPILER="${JAVACOMPILER}.exe" 31127aa0a607SDon Lewis fi 31137aa0a607SDon Lewis JAVACOMPILER=`cygpath -d "$JAVACOMPILER"` 31147aa0a607SDon Lewis JAVACOMPILER=`cygpath -u "$JAVACOMPILER"` 3115c19b8f98SDon Lewis JAVAFLAGS="-source 1.5 -target 1.5" 31167aa0a607SDon Lewis fi 31177aa0a607SDon Lewis if test "$_os" = "OS2"; then 31187aa0a607SDon Lewis if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then 31197aa0a607SDon Lewis JAVACOMPILER="${JAVACOMPILER}.exe" 31207aa0a607SDon Lewis fi 31217aa0a607SDon Lewis fi 31227aa0a607SDon Lewis 31237aa0a607SDon Lewis if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then 31247aa0a607SDon Lewis AC_MSG_CHECKING([re-checking JDK]) 31257aa0a607SDon Lewis JDK=gcj 31267aa0a607SDon Lewis AC_MSG_RESULT([checked (ecj)]) 31277aa0a607SDon Lewis #TODO: what's to do here? some switch to do 1.5 compiling? 31287aa0a607SDon Lewis JAVAFLAGS="-source 1.5 -target 1.5" 31297aa0a607SDon Lewis _gij_longver="40200" 31307aa0a607SDon Lewis fi 31317aa0a607SDon Lewisfi 31327aa0a607SDon Lewis 31337aa0a607SDon LewisJAVACISGCJ="" 31347aa0a607SDon Lewisdnl =================================================================== 31357aa0a607SDon Lewisdnl Checks that javac is gcj 31367aa0a607SDon Lewisdnl =================================================================== 31377aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 31387aa0a607SDon Lewis if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then 31397aa0a607SDon Lewis JAVACISGCJ="yes" 31407aa0a607SDon Lewis fi 31417aa0a607SDon Lewisfi 31427aa0a607SDon LewisAC_SUBST(JAVACISGCJ) 31437aa0a607SDon Lewis 31447aa0a607SDon Lewisdnl =================================================================== 31457aa0a607SDon Lewisdnl Checks for javadoc 31467aa0a607SDon Lewisdnl =================================================================== 31477aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 31487aa0a607SDon Lewis if test -z "$with_jdk_home"; then 31497aa0a607SDon Lewis AC_PATH_PROG(JAVADOC, javadoc) 31507aa0a607SDon Lewis else 31517aa0a607SDon Lewis _javadoc_path="$with_jdk_home/bin/javadoc" 31527aa0a607SDon Lewis if test "$_os" = "OS2"; then 31537aa0a607SDon Lewis if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then 31547aa0a607SDon Lewis _javadoc_path="${_javadoc_path}.exe" 31557aa0a607SDon Lewis fi 31567aa0a607SDon Lewis fi 31577aa0a607SDon Lewis dnl Check if there is a javadoc at all. 31587aa0a607SDon Lewis if test -x "$_javadoc_path"; then 31597aa0a607SDon Lewis JAVADOC=$_javadoc_path 31607aa0a607SDon Lewis else 31617aa0a607SDon Lewis AC_PATH_PROG(JAVADOC, javadoc) 31627aa0a607SDon Lewis fi 31637aa0a607SDon Lewis fi 31647aa0a607SDon Lewis if test -z "$JAVADOC"; then 31657aa0a607SDon Lewis AC_MSG_ERROR([$_javadoc_path not found, please use --with-jdk-home]) 31667aa0a607SDon Lewis fi 31677aa0a607SDon Lewis if test "$_os" = "WINNT"; then 31687aa0a607SDon Lewis if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then 31697aa0a607SDon Lewis JAVADOC="${JAVADOC}.exe" 31707aa0a607SDon Lewis fi 31717aa0a607SDon Lewis JAVADOC=`cygpath -d "$JAVADOC"` 31727aa0a607SDon Lewis JAVADOC=`cygpath -u "$JAVADOC"` 31737aa0a607SDon Lewis fi 31747aa0a607SDon Lewis if test "$_os" = "OS2"; then 31757aa0a607SDon Lewis if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then 31767aa0a607SDon Lewis JAVADOC="${JAVADOC}.exe" 31777aa0a607SDon Lewis fi 31787aa0a607SDon Lewis fi 31797aa0a607SDon Lewisfi 31807aa0a607SDon Lewis 31817aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 31827aa0a607SDon Lewis dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij 31837aa0a607SDon Lewis if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then 31847aa0a607SDon Lewis if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then 31857aa0a607SDon Lewis cat > findhome.java <<_ACEOF 31867aa0a607SDon Lewis[import java.io.File; 31877aa0a607SDon Lewis 31887aa0a607SDon Lewisclass findhome 31897aa0a607SDon Lewis{ 31907aa0a607SDon Lewis public static void main(String args[]) 31917aa0a607SDon Lewis { 31927aa0a607SDon Lewis String jrelocation = System.getProperty("java.home"); 31937aa0a607SDon Lewis File jre = new File(jrelocation); 31947aa0a607SDon Lewis System.out.println(jre.getParent()); 31957aa0a607SDon Lewis } 31967aa0a607SDon Lewis}] 31977aa0a607SDon Lewis_ACEOF 31987aa0a607SDon Lewis AC_MSG_CHECKING([if javac works]) 31997aa0a607SDon Lewis javac_cmd="$JAVACOMPILER findhome.java 1>&2" 32007aa0a607SDon Lewis AC_TRY_EVAL(javac_cmd) 32017aa0a607SDon Lewis if test $? = 0 && test -f ./findhome.class ; then 32027aa0a607SDon Lewis AC_MSG_RESULT([javac works]) 32037aa0a607SDon Lewis else 32047aa0a607SDon Lewis echo "configure: javac test failed" >&5 32057aa0a607SDon Lewis cat findhome.java >&5 32067aa0a607SDon Lewis AC_MSG_ERROR([javac does not work - java projects will not build!]) 32077aa0a607SDon Lewis fi 32087aa0a607SDon Lewis 32097aa0a607SDon Lewis AC_MSG_CHECKING([if gij knows its java.home]) 32107aa0a607SDon Lewis JAVA_HOME=`$JAVAINTERPRETER findhome` 32117aa0a607SDon Lewis if test $? = 0 && test "$JAVA_HOME" != "" ; then 32127aa0a607SDon Lewis AC_MSG_RESULT([$JAVA_HOME]) 32137aa0a607SDon Lewis else 32147aa0a607SDon Lewis echo "configure: java test failed" >&5 32157aa0a607SDon Lewis cat findhome.java >&5 32167aa0a607SDon Lewis AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home]) 32177aa0a607SDon Lewis fi 32187aa0a607SDon Lewis else 32197aa0a607SDon Lewis JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"` 32207aa0a607SDon Lewis fi 32217aa0a607SDon Lewis fi 32227aa0a607SDon Lewis 32237aa0a607SDon Lewis dnl second sanity check JAVA_HOME if possible 32247aa0a607SDon Lewis if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then 32257aa0a607SDon Lewis # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr 32267aa0a607SDon Lewis if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then 32277aa0a607SDon Lewis javac_link_f=`readlink -f "$JAVACOMPILER" 2>/dev/null` 32287aa0a607SDon Lewis if test $? == 0 && test "$JAVACOMPILER" != "$javac_link_f"; then 32297aa0a607SDon Lewis # try to recover first by looking whether we have a alternatives 32307aa0a607SDon Lewis # system as in Debian or newer SuSEs where following /usr/bin/javac 32317aa0a607SDon Lewis # over /etc/alternatives/javac leads to the right bindir where we 32327aa0a607SDon Lewis # just need to strip a bit away to get a valid JAVA_HOME 32337aa0a607SDon Lewis # Solaris 11 is even worse, because target is relative, so use -f 32347aa0a607SDon Lewis JAVA_HOME="$javac_link_f" 32357aa0a607SDon Lewis elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then 32367aa0a607SDon Lewis # Darwin readlink(1) is so primitive it doesn't even support -f 32377aa0a607SDon Lewis # maybe only one level of symlink (e.g. on Mac) 32387aa0a607SDon Lewis JAVA_HOME=`readlink $JAVACOMPILER` 32397aa0a607SDon Lewis else 32407aa0a607SDon Lewis # else warn 32417aa0a607SDon Lewis AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect]) 32427aa0a607SDon Lewis AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home]) 32437aa0a607SDon Lewis echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn 32447aa0a607SDon Lewis echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn 32457aa0a607SDon Lewis fi 32467aa0a607SDon Lewis dnl now that we have the path to the real javac, make a JAVA_HOME out of it.. 32477aa0a607SDon Lewis if test "$JAVA_HOME" != "/usr"; then 32487aa0a607SDon Lewis if test "$_os" = "Darwin"; then 32497aa0a607SDon Lewis dnl Leopard returns a non-suitable path with readlink - points to "Current" only 32507aa0a607SDon Lewis JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,) 32517aa0a607SDon Lewis dnl Tiger already returns a JDK path.. 32527aa0a607SDon Lewis JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,) 32537aa0a607SDon Lewis else 32547aa0a607SDon Lewis JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,) 32557aa0a607SDon Lewis fi 32567aa0a607SDon Lewis fi 32577aa0a607SDon Lewis fi 32587aa0a607SDon Lewis # now check if $JAVA_HOME is really valid 32597aa0a607SDon Lewis if test "$_os" = "Darwin"; then 32607aa0a607SDon Lewis if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then 32617aa0a607SDon Lewis JAVA_HOME_OK="NO" 32627aa0a607SDon Lewis fi 32637aa0a607SDon Lewis elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then 32647aa0a607SDon Lewis JAVA_HOME_OK="NO" 32657aa0a607SDon Lewis fi 32667aa0a607SDon Lewis if test "$JAVA_HOME_OK" = "NO"; then 32677aa0a607SDon Lewis AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script]) 32687aa0a607SDon Lewis AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed]) 32697aa0a607SDon Lewis AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly]) 32707aa0a607SDon Lewis echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn 32717aa0a607SDon Lewis echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn 32727aa0a607SDon Lewis echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn 32737aa0a607SDon Lewis# if test "$JDK" = "gcj"; then 32747aa0a607SDon Lewis# 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 32757aa0a607SDon Lewis# fi 32767aa0a607SDon Lewis fi 32777aa0a607SDon Lewis fi 32787aa0a607SDon Lewisfi 32797aa0a607SDon Lewis 32807aa0a607SDon LewisAWTLIB= 32817aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 32827aa0a607SDon Lewis AC_MSG_CHECKING([for jawt lib name]) 32837aa0a607SDon Lewis if test "$JDK" = "gcj"; then 32847aa0a607SDon Lewis save_CFLAGS=$CFLAGS 32857aa0a607SDon Lewis save_LDFLAGS=$LDFLAGS 32867aa0a607SDon Lewis CFLAGS="$CFLAGS -I$JAVA_HOME/include" 32877aa0a607SDon Lewis LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" 32887aa0a607SDon Lewis exec 6>/dev/null # no output 32897aa0a607SDon Lewis AC_CHECK_HEADER(jni.h, [], 32907aa0a607SDon Lewis [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], []) 32917aa0a607SDon Lewis AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] ) 32927aa0a607SDon Lewis exec 6>&1 # output on again 32937aa0a607SDon Lewis CFLAGS=$save_CFLAGS 32947aa0a607SDon Lewis LDFLAGS=$save_LDFLAGS 32957aa0a607SDon Lewis fi 32967aa0a607SDon Lewis # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols. 32977aa0a607SDon Lewis # A workaround is to link also against libpmawt.so 32987aa0a607SDon Lewis if test "$JDK" = "ibm" ; then 32997aa0a607SDon Lewis save_CFLAGS=$CFLAGS 33007aa0a607SDon Lewis save_LDFLAGS=$LDFLAGS 33017aa0a607SDon Lewis save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH 33027aa0a607SDon Lewis CFLAGS="$CFLAGS -I$JAVA_HOME/include" 33037aa0a607SDon Lewis LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin" 33047aa0a607SDon Lewis LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH 33057aa0a607SDon Lewis export LD_LIBRARY_PATH 33067aa0a607SDon Lewis exec 6>/dev/null # no output 33077aa0a607SDon Lewis AC_CHECK_HEADER(jni.h, [], 33087aa0a607SDon Lewis [AC_MSG_ERROR([jni.h could not be found.])], []) 33097aa0a607SDon Lewis AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] ) 33107aa0a607SDon Lewis if test -z "$AWTLIB"; then 33117aa0a607SDon Lewis LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" 33127aa0a607SDon Lewis AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"]) 33137aa0a607SDon Lewis fi 33147aa0a607SDon Lewis exec 6>&1 # output on again 33157aa0a607SDon Lewis CFLAGS=$save_CFLAGS 33167aa0a607SDon Lewis LDFLAGS=$save_LDFLAGS 33177aa0a607SDon Lewis LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH 33187aa0a607SDon Lewis fi 33197aa0a607SDon Lewis if test -z "$AWTLIB"; then 33207aa0a607SDon Lewis AWTLIB=-ljawt 33217aa0a607SDon Lewis fi 33227aa0a607SDon Lewis AC_MSG_RESULT([$AWTLIB]) 33237aa0a607SDon Lewis AC_SUBST(AWTLIB) 33247aa0a607SDon Lewisfi 33257aa0a607SDon Lewis 33267aa0a607SDon Lewisdnl =================================================================== 33277aa0a607SDon Lewisdnl Check for optional gcj for AOT 33287aa0a607SDon Lewisdnl =================================================================== 33297aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 33307aa0a607SDon Lewis AC_MSG_CHECKING([whether to enable gcj aot compilation]) 33317aa0a607SDon Lewis if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then 33327aa0a607SDon Lewis AC_MSG_RESULT([yes]) 33337aa0a607SDon Lewis if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then 33347aa0a607SDon Lewis gcjaot="gcj" 33357aa0a607SDon Lewis else 33367aa0a607SDon Lewis gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"` 33377aa0a607SDon Lewis fi 33387aa0a607SDon Lewis AC_MSG_RESULT([$gcjaot]) 33397aa0a607SDon Lewis if test -n "$with_jdk_home"; then 33407aa0a607SDon Lewis _javac_path="$with_jdk_home/bin/$gcjaot" 33417aa0a607SDon Lewis dnl Check if there is a gcj at all. 33427aa0a607SDon Lewis if test -x "$_javac_path"; then 33437aa0a607SDon Lewis JAVAAOTCOMPILER=$_javac_path 33447aa0a607SDon Lewis fi 33457aa0a607SDon Lewis fi 33467aa0a607SDon Lewis if test -z "$JAVAAOTCOMPILER"; then 33477aa0a607SDon Lewis AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot) 33487aa0a607SDon Lewis fi 33497aa0a607SDon Lewis if test -z "$JAVAAOTCOMPILER"; then 33507aa0a607SDon Lewis AC_MSG_WARN([$gcjaot not found, please use --with-jdk-home]) 33517aa0a607SDon Lewis fi 33527aa0a607SDon Lewis else 33537aa0a607SDon Lewis AC_MSG_RESULT([no]) 33547aa0a607SDon Lewis fi 33557aa0a607SDon Lewisfi 33567aa0a607SDon Lewis 33577aa0a607SDon LewisAC_SUBST(JAVA_HOME) 33587aa0a607SDon LewisAC_SUBST(JDK) 33597aa0a607SDon LewisAC_SUBST(JAVAFLAGS) 33607aa0a607SDon LewisAC_SUBST(JAVAINTERPRETER) 33617aa0a607SDon LewisAC_SUBST(JAVAIFLAGS) 33627aa0a607SDon LewisAC_SUBST(JAVACOMPILER) 33637aa0a607SDon LewisAC_SUBST(JAVAAOTCOMPILER) 33647aa0a607SDon LewisAC_SUBST(JAVADOC) 33657aa0a607SDon Lewis 33667aa0a607SDon Lewisdnl =================================================================== 33677aa0a607SDon Lewisdnl Checks for specific files. 33687aa0a607SDon Lewisdnl =================================================================== 33697aa0a607SDon Lewis 33707aa0a607SDon Lewisdnl =================================================================== 33717aa0a607SDon Lewisdnl Checks for programs. 33727aa0a607SDon Lewisdnl =================================================================== 33737aa0a607SDon Lewis 33747aa0a607SDon LewisAC_MSG_CHECKING([whether to enable EPM for packing]) 33757aa0a607SDon Lewisif test "$enable_epm" = "yes"; then 33767aa0a607SDon Lewis AC_MSG_RESULT([yes]) 33777aa0a607SDon Lewis dnl =================================================================== 3378*e1db62a2SDon Lewis dnl Check for epm - not needed for Windows or building archive format 33797aa0a607SDon Lewis dnl =================================================================== 3380*e1db62a2SDon Lewis if test "$_os" != "WINNT" -a "$with_package_format" != "archive"; then 33817aa0a607SDon Lewis if test -n "$with_epm"; then 33827aa0a607SDon Lewis EPM=$with_epm 33837aa0a607SDon Lewis else 33847aa0a607SDon Lewis AC_PATH_PROG(EPM, epm, no) 33857aa0a607SDon Lewis fi 33867aa0a607SDon Lewis 33877aa0a607SDon Lewis # Override system epm and --with-epm if --with-epm-url is used. 33887aa0a607SDon Lewis if test -n "$with_epm_url" ; then 33897aa0a607SDon Lewis # At this moment we can not verify the URL or the content that we want to download. 33907aa0a607SDon Lewis EPM_URL=$with_epm_url 33917aa0a607SDon Lewis AC_MSG_RESULT([epm will be downloaded and compiled in bootstrap]) 33927aa0a607SDon Lewis EPM= 33937aa0a607SDon Lewis echo "EPM will be built." 33947aa0a607SDon Lewis BUILD_EPM=YES 33957aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE EPM" 33967aa0a607SDon Lewis else 33977aa0a607SDon Lewis if test "$EPM" = "no" ; then 33987aa0a607SDon Lewis 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.]) 33997aa0a607SDon Lewis else 34007aa0a607SDon Lewis # Gentoo has some epm which is something different... 34017aa0a607SDon Lewis AC_MSG_CHECKING([whether the found epm is the right epm]) 34027aa0a607SDon Lewis if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then 34037aa0a607SDon Lewis AC_MSG_RESULT([yes]) 34047aa0a607SDon Lewis else 34057aa0a607SDon Lewis 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.]) 34067aa0a607SDon Lewis fi 34077aa0a607SDon Lewis AC_MSG_CHECKING([epm version]) 34087aa0a607SDon Lewis EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` 34097aa0a607SDon Lewis if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ 34107aa0a607SDon Lewis test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then 34117aa0a607SDon Lewis AC_MSG_RESULT([OK, >= 3.7]) 34127aa0a607SDon Lewis BUILD_EPM=NO 34137aa0a607SDon Lewis else 34147aa0a607SDon Lewis AC_MSG_ERROR([too old. epm >= 3.7 is required.]) 34157aa0a607SDon Lewis fi 34167aa0a607SDon Lewis fi 34177aa0a607SDon Lewis fi 34187aa0a607SDon Lewis fi 34197aa0a607SDon Lewis 34207aa0a607SDon Lewis # test which package format to use 34217aa0a607SDon Lewis AC_MSG_CHECKING([which package format to use]) 34227aa0a607SDon Lewis 34237aa0a607SDon Lewis # defaults 34247aa0a607SDon Lewis case "$_os" in 34257aa0a607SDon Lewis OS2) 34267aa0a607SDon Lewis PKGFORMAT=native 34277aa0a607SDon Lewis ;; 34287aa0a607SDon Lewis Darwin) 34297aa0a607SDon Lewis PKGFORMAT=dmg 34307aa0a607SDon Lewis ;; 34317aa0a607SDon Lewis SunOS) 34327aa0a607SDon Lewis PKGFORMAT=pkg 34337aa0a607SDon Lewis ;; 34347aa0a607SDon Lewis Linux) 34357aa0a607SDon Lewis # if building on Debian, default should be deb... 34367aa0a607SDon Lewis if test -e /etc/debian_version; then 34377aa0a607SDon Lewis PKGFORMAT=deb 34387aa0a607SDon Lewis else 34397aa0a607SDon Lewis PKGFORMAT=rpm 34407aa0a607SDon Lewis fi 34417aa0a607SDon Lewis ;; 34427aa0a607SDon Lewis AIX) 34437aa0a607SDon Lewis PKGFORMAT=aix 34447aa0a607SDon Lewis ;; 34457aa0a607SDon Lewis *BSD) 34467aa0a607SDon Lewis PKGFORMAT=bsd 34477aa0a607SDon Lewis ;; 34487aa0a607SDon Lewis OSF1) 34497aa0a607SDon Lewis PKGFORMAT=setld 34507aa0a607SDon Lewis ;; 34517aa0a607SDon Lewis WINNT) 34527aa0a607SDon Lewis PKGFORMAT=msi 34537aa0a607SDon Lewis ;; 34547aa0a607SDon Lewis # we never should get here since we check the arciecture/os at the beginning, 34557aa0a607SDon Lewis # but go sure... 34567aa0a607SDon Lewis *) 34577aa0a607SDon Lewis AC_MSG_ERROR([unknown system]) 34587aa0a607SDon Lewis esac 34597aa0a607SDon Lewis if test -n "$with_package_format"; then 34607aa0a607SDon Lewis for i in $with_package_format; do 34617aa0a607SDon Lewis case "$i" in 34627aa0a607SDon Lewis aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi) 34637aa0a607SDon Lewis ;; 34647aa0a607SDon Lewis *) 34657aa0a607SDon Lewis AC_MSG_ERROR([unsupported format $i. Supported by EPM are: 34667aa0a607SDon Lewisaix - AIX software distribution 34677aa0a607SDon Lewisbsd - FreeBSD, NetBSD, or OpenBSD software distribution 34687aa0a607SDon Lewisdepot or swinstall - HP-UX software distribution 34697aa0a607SDon Lewisdeb - Debian software distribution 34707aa0a607SDon Lewisinst or tardist - IRIX software distribution 34717aa0a607SDon Lewisosx - MacOS X software distribution 34727aa0a607SDon Lewispkg - Solaris software distribution 34737aa0a607SDon Lewisrpm - RedHat software distribution 34747aa0a607SDon Lewissetld - Tru64 (setld) software distribution 34757aa0a607SDon Lewisnative - "Native" software distribution for the platform 34767aa0a607SDon Lewisportable - Portable software distribution 34777aa0a607SDon LewisOOo additionally supports: 34787aa0a607SDon Lewisarchive - .tar.gz or .zip 34797aa0a607SDon Lewisdmg - Mac OS X .dmg 34807aa0a607SDon Lewisinstalled - installation tree 34817aa0a607SDon Lewismsi - Windows .msi 34827aa0a607SDon Lewis ]) 34837aa0a607SDon Lewis ;; 34847aa0a607SDon Lewis esac 34857aa0a607SDon Lewis done 34867aa0a607SDon Lewis PKGFORMAT="$with_package_format" 34877aa0a607SDon Lewis fi 34887aa0a607SDon Lewis AC_MSG_RESULT([$PKGFORMAT]) 34897aa0a607SDon Lewis if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then 34907aa0a607SDon Lewis AC_MSG_CHECKING([for rpm]) 34917aa0a607SDon Lewis for a in "$RPM" rpmbuild rpm; do 34927aa0a607SDon Lewis $a --usage >/dev/null 2> /dev/null 34937aa0a607SDon Lewis if test $? -eq 0; then 34947aa0a607SDon Lewis RPM=$a 34957aa0a607SDon Lewis break 34967aa0a607SDon Lewis else 34977aa0a607SDon Lewis $a --version >/dev/null 2> /dev/null 34987aa0a607SDon Lewis if test $? -eq 0; then 34997aa0a607SDon Lewis RPM=$a 35007aa0a607SDon Lewis break 35017aa0a607SDon Lewis fi 35027aa0a607SDon Lewis fi 35037aa0a607SDon Lewis done 35047aa0a607SDon Lewis if test -z "$RPM" ; then 35057aa0a607SDon Lewis AC_MSG_ERROR([not found]) 35067aa0a607SDon Lewis elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then 35077aa0a607SDon Lewis RPM_PATH=`which $RPM` 35087aa0a607SDon Lewis AC_MSG_RESULT([$RPM_PATH]) 35097aa0a607SDon Lewis else 35107aa0a607SDon Lewis AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.]) 35117aa0a607SDon Lewis fi 35127aa0a607SDon Lewis fi 35137aa0a607SDon Lewis if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then 35147aa0a607SDon Lewis AC_PATH_PROG(DPKG, dpkg, no) 35157aa0a607SDon Lewis if test "$DPKG" = "no"; then 35167aa0a607SDon Lewis AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.]) 35177aa0a607SDon Lewis fi 3518c1144642SJim Jagielski AC_PATH_PROG(FAKEROOT, fakeroot, no) 3519c1144642SJim Jagielski if test "$FAKEROOT" = "no"; then 35204975252cSJim Jagielski AC_MSG_ERROR([fakeroot needed for deb creation. Install fakeroot.]) 35217aa0a607SDon Lewis fi 35221ba498edSJim Jagielski fi 35231ba498edSJim Jagielski if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \ 35247aa0a607SDon Lewis echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then 35257aa0a607SDon Lewis if test "$EPM" != "no" && test "$EPM" != "internal"; then 35267aa0a607SDon Lewis if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then 35277aa0a607SDon Lewis AC_MSG_CHECKING([whether epm is patched for OOos needs]) 35287aa0a607SDon Lewis if grep "Patched for Apache OpenOffice" $EPM >/dev/null 2>/dev/null; then 35297aa0a607SDon Lewis AC_MSG_RESULT([yes]) 35307aa0a607SDon Lewis else 35317aa0a607SDon Lewis AC_MSG_RESULT([no]) 35327aa0a607SDon Lewis if echo "$PKGFORMAT" | grep -q rpm; then 35337aa0a607SDon Lewis _pt="rpm" 35347aa0a607SDon Lewis AC_MSG_WARN([the rpms will need to be installed with --nodeps]) 35357aa0a607SDon Lewis echo "the rpms will need to be installed with --nodeps" >> warn 35367aa0a607SDon Lewis else 35377aa0a607SDon Lewis _pt="pkg" 35387aa0a607SDon Lewis fi 35397aa0a607SDon Lewis AC_MSG_WARN([the ${_pt}s will not be relocateable]) 35407aa0a607SDon Lewis echo "the ${_pt}s will not be relocateable" >> warn 35417aa0a607SDon Lewis AC_MSG_WARN([if you want to make sure installation without --nodeps and 35427aa0a607SDon Lewis relocation will work, you need to patch your epm with the 35437aa0a607SDon Lewis patch in epm/epm-3.7.patch or build with 35447aa0a607SDon Lewis --with-epm=internal which will build a suitable epm]) 35457aa0a607SDon Lewis fi 35467aa0a607SDon Lewis fi 35477aa0a607SDon Lewis fi 35487aa0a607SDon Lewis fi 35497aa0a607SDon Lewis if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then 35507aa0a607SDon Lewis AC_PATH_PROG(PKGMK, pkgmk, no) 35517aa0a607SDon Lewis if test "$PKGMK" = "no"; then 35527aa0a607SDon Lewis AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.]) 35537aa0a607SDon Lewis fi 35547aa0a607SDon Lewis fi 35557aa0a607SDon Lewis AC_SUBST(RPM) 35567aa0a607SDon Lewis AC_SUBST(DPKG) 35577aa0a607SDon Lewis AC_SUBST(FAKEROOT) 35587aa0a607SDon Lewis AC_SUBST(PKGMK) 35597aa0a607SDon Lewiselse 35607aa0a607SDon Lewis AC_MSG_RESULT([no]) 35617aa0a607SDon Lewis BUILD_EPM=NO 35627aa0a607SDon Lewis EPM=NO 35637aa0a607SDon Lewis PKGFORMAT=native 35647aa0a607SDon Lewisfi 35657aa0a607SDon LewisAC_SUBST(BUILD_EPM) 35667aa0a607SDon LewisAC_SUBST(EPM_URL) 35677aa0a607SDon LewisAC_SUBST(EPM) 35687aa0a607SDon LewisAC_SUBST(PKGFORMAT) 35697aa0a607SDon Lewis 35707aa0a607SDon Lewisdnl =================================================================== 35717aa0a607SDon Lewisdnl Check for gperf 35727aa0a607SDon Lewisdnl =================================================================== 35737aa0a607SDon LewisAC_PATH_PROG(GPERF, gperf) 35747aa0a607SDon Lewisif test -z "$with_gperf"; then 35757aa0a607SDon Lewis AC_PATH_PROG(GPERF, gperf) 35767aa0a607SDon Lewis if test -z "$GPERF"; then 35777aa0a607SDon Lewis AC_MSG_ERROR([gperf not found but needed. Install it and/or specify --with-gperf=/path/to/it.]) 35787aa0a607SDon Lewis fi 35797aa0a607SDon Lewiselse 35807aa0a607SDon Lewis if test -x "$with_gperf"; then 35817aa0a607SDon Lewis GPERF=$with_gperf 35827aa0a607SDon Lewis else 35837aa0a607SDon Lewis AC_MSG_ERROR([--with-gperf did not point to an executable]) 35847aa0a607SDon Lewis fi 35857aa0a607SDon Lewisfi 35867aa0a607SDon LewisAC_MSG_CHECKING([gperf version]) 35877aa0a607SDon Lewisif test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then 35887aa0a607SDon Lewis AC_MSG_RESULT([OK]) 35897aa0a607SDon Lewis GPERF=$GPERF 35907aa0a607SDon Lewiselse 35917aa0a607SDon Lewis AC_MSG_ERROR([too old, you need at least 3.0.0]) 35927aa0a607SDon Lewisfi 35937aa0a607SDon LewisAC_SUBST(GPERF) 35947aa0a607SDon Lewis 35957aa0a607SDon Lewisdnl =================================================================== 35967aa0a607SDon Lewisdnl Check for building stax 35977aa0a607SDon Lewisdnl =================================================================== 35987aa0a607SDon LewisAC_MSG_CHECKING([whether to build the stax]) 35997aa0a607SDon Lewisif test -f "./stax/download/stax-1.2.0.jar"; then 36007aa0a607SDon Lewis BUILD_STAX=NO 36017aa0a607SDon Lewis AC_MSG_RESULT([no, will use the prebuilt stax/download/stax-1.2.0.jar]) 36027aa0a607SDon Lewiselse 36037aa0a607SDon Lewis BUILD_STAX=YES 36047aa0a607SDon Lewis AC_MSG_RESULT([yes]) 36057aa0a607SDon Lewisfi 36067aa0a607SDon LewisAC_SUBST(BUILD_STAX) 36077aa0a607SDon Lewis 36087aa0a607SDon Lewisdnl =================================================================== 36097aa0a607SDon Lewisdnl Check for building ODK 36107aa0a607SDon Lewisdnl =================================================================== 36117aa0a607SDon LewisAC_MSG_CHECKING([whether to build the ODK]) 36127aa0a607SDon Lewisif test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then 36137aa0a607SDon Lewis AC_MSG_RESULT([yes]) 36147aa0a607SDon Lewis if test "$WITH_JAVA" != "no"; then 36157aa0a607SDon Lewis AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll]) 36167aa0a607SDon Lewis if ! test -f "./external/unowinreg/unowinreg.dll"; then 36177aa0a607SDon Lewis HAVE_UNOWINREG_DLL=no 36187aa0a607SDon Lewis else 36197aa0a607SDon Lewis HAVE_UNOWINREG_DLL=yes 36207aa0a607SDon Lewis fi 36217aa0a607SDon Lewis if test "$HAVE_UNOWINREG_DLL" = "yes"; then 36227aa0a607SDon Lewis AC_MSG_RESULT([found]) 36237aa0a607SDon Lewis BUILD_UNOWINREG=NO 36247aa0a607SDon Lewis else 36257aa0a607SDon Lewis if test "$_os" = "WINNT"; then 36267aa0a607SDon Lewis AC_MSG_RESULT([not found, will be built]) 36277aa0a607SDon Lewis else 36287aa0a607SDon Lewis AC_MSG_WARN([not found, will be cross-built using mingw32]) 36297aa0a607SDon Lewis fi 36307aa0a607SDon Lewis BUILD_UNOWINREG=YES 36317aa0a607SDon Lewis fi 36327aa0a607SDon Lewis if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then 36337aa0a607SDon Lewis if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then 36347aa0a607SDon Lewis AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler. 36357aa0a607SDon Lewis Specify mingw32 g++ executable name with --with-mingwin. 36367aa0a607SDon Lewis Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and 36377aa0a607SDon Lewis put it into external/unowinreg using your browser or a command equivalent to: 36387aa0a607SDon Lewis wget -O external/unowinreg/unowinreg.dll http://www.openoffice.org/tools/unowinreg_prebuild/680/unowinreg.dll]) 36397aa0a607SDon Lewis fi 36407aa0a607SDon Lewis if echo "$WITH_MINGWIN" | $EGREP -q "/"; then 36417aa0a607SDon Lewis if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi 36427aa0a607SDon Lewis else 36437aa0a607SDon Lewis AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false) 36447aa0a607SDon Lewis fi 36457aa0a607SDon Lewis if test "$MINGWCXX" = "false"; then 36467aa0a607SDon Lewis AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.) 36477aa0a607SDon Lewis fi 36487aa0a607SDon Lewis AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler) 36497aa0a607SDon Lewis if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then 36507aa0a607SDon Lewis AC_MSG_ERROR(no) 36517aa0a607SDon Lewis else 36527aa0a607SDon Lewis AC_MSG_RESULT(yes) 36537aa0a607SDon Lewis fi 36547aa0a607SDon Lewis if echo "$WITH_MINGWIN" | $EGREP -q "/"; then 36557aa0a607SDon Lewis if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi 36567aa0a607SDon Lewis else 36577aa0a607SDon Lewis AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`, false) 36587aa0a607SDon Lewis fi 36597aa0a607SDon Lewis if test "$MINGWSTRIP" = "false"; then 36607aa0a607SDon Lewis AC_MSG_ERROR(MinGW32 binutils needed. Install them.) 36617aa0a607SDon Lewis fi 36627aa0a607SDon Lewis AC_LANG_PUSH([C++]) 36637aa0a607SDon Lewis save_CXX=$CXX 36647aa0a607SDon Lewis save_CXXCPP=$CXXCPP 36657aa0a607SDon Lewis CXX=$MINGWCXX 36667aa0a607SDon Lewis CXXCPP="$MINGWCXX -E" 36677aa0a607SDon Lewis save_CXXFLAGS=$CXXFLAGS 36687aa0a607SDon Lewis save_CPPFLAGS=$CPPFLAGS 36697aa0a607SDon Lewis CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include" 36707aa0a607SDon Lewis CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include" 36717aa0a607SDon Lewis # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously 36727aa0a607SDon Lewis # do not make sense here (and 'd make the check fail) 36737aa0a607SDon Lewis save_LIBS=$LIBS 36747aa0a607SDon Lewis LIBS="" 36757aa0a607SDon Lewis AC_HAVE_LIBRARY(kernel32) 36767aa0a607SDon Lewis AC_HAVE_LIBRARY(advapi32) 36777aa0a607SDon Lewis AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])]) 36787aa0a607SDon Lewis CXXFLAGS=$save_CXXFLAGS 36797aa0a607SDon Lewis CPPFLAGS=$save_CPPFLAGS 36807aa0a607SDon Lewis CXX=$save_CXX 36817aa0a607SDon Lewis CXXCPP=$save_CXXCPP 36827aa0a607SDon Lewis LIBS=$save_LIBS 36837aa0a607SDon Lewis AC_LANG_POP([C++]) 36847aa0a607SDon Lewis fi 36857aa0a607SDon Lewis fi 36867aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE ODK" 36877aa0a607SDon Lewiselse 36887aa0a607SDon Lewis AC_MSG_RESULT([no]) 36897aa0a607SDon Lewis BUILD_UNOWINREG=NO 36907aa0a607SDon Lewisfi 36917aa0a607SDon LewisAC_SUBST(BUILD_UNOWINREG) 36927aa0a607SDon LewisAC_SUBST(MINGWCXX) 36937aa0a607SDon LewisAC_SUBST(MINGWSTRIP) 36947aa0a607SDon Lewis 36957aa0a607SDon Lewisdnl =================================================================== 36967aa0a607SDon Lewisdnl Check for system stdlibs 36977aa0a607SDon Lewisdnl =================================================================== 36987aa0a607SDon LewisAC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset]) 36997aa0a607SDon Lewisif test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ 37007aa0a607SDon Lewis test "$with_system_stdlibs" != "no"; then 37017aa0a607SDon Lewis AC_MSG_RESULT([no]) 37027aa0a607SDon Lewis SYSTEM_STDLIBS=YES 37037aa0a607SDon Lewiselse 37047aa0a607SDon Lewis AC_MSG_RESULT([yes]) 37057aa0a607SDon Lewis SYSTEM_STDLIBS=NO 37067aa0a607SDon Lewisfi 37077aa0a607SDon LewisAC_SUBST(SYSTEM_STDLIBS) 37087aa0a607SDon Lewis 37097aa0a607SDon Lewisdnl =================================================================== 37107aa0a607SDon Lewisdnl Check for system zlib 37117aa0a607SDon Lewisdnl =================================================================== 37127aa0a607SDon Lewisif test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then 37137aa0a607SDon Lewis with_system_zlib=yes 37147aa0a607SDon Lewisfi 37157aa0a607SDon LewisAC_MSG_CHECKING([which zlib to use]) 37167aa0a607SDon Lewisif test -n "$with_system_zlib" -o -n "$with_system_libs" && \ 37177aa0a607SDon Lewis test "$with_system_zlib" != "no"; then 37187aa0a607SDon Lewis AC_MSG_RESULT([external]) 37197aa0a607SDon Lewis SYSTEM_ZLIB=YES 37207aa0a607SDon Lewis AC_CHECK_HEADER(zlib.h, [], 37217aa0a607SDon Lewis [AC_MSG_ERROR(zlib.h not found. install zlib)], []) 37227aa0a607SDon Lewis AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ], 37237aa0a607SDon Lewis [AC_MSG_ERROR(zlib not found or functional)], []) 37247aa0a607SDon Lewiselse 37257aa0a607SDon Lewis AC_MSG_RESULT([internal]) 37267aa0a607SDon Lewis SYSTEM_ZLIB=NO 37277aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE ZLIB" 37287aa0a607SDon Lewisfi 37297aa0a607SDon LewisAC_SUBST(SYSTEM_ZLIB) 37307aa0a607SDon Lewis 37317aa0a607SDon Lewisdnl =================================================================== 37327aa0a607SDon Lewisdnl Check for system jpeg 37337aa0a607SDon Lewisdnl =================================================================== 37347aa0a607SDon LewisAC_MSG_CHECKING([which jpeg to use]) 37357aa0a607SDon Lewisif test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ 37367aa0a607SDon Lewis test "$with_system_jpeg" != "no"; then 37377aa0a607SDon Lewis AC_MSG_RESULT([external]) 37387aa0a607SDon Lewis SYSTEM_JPEG=YES 37397aa0a607SDon Lewis AC_CHECK_HEADER(jpeglib.h, [], 37407aa0a607SDon Lewis [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], []) 37417aa0a607SDon Lewis AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ], 37427aa0a607SDon Lewis [AC_MSG_CHECKING(jpeg library not found or fuctional)], []) 37437aa0a607SDon Lewiselse 37447aa0a607SDon Lewis AC_MSG_RESULT([internal]) 37457aa0a607SDon Lewis SYSTEM_JPEG=NO 37467aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE JPEG" 37477aa0a607SDon Lewisfi 37487aa0a607SDon LewisAC_SUBST(SYSTEM_JPEG) 37497aa0a607SDon Lewis 37507aa0a607SDon Lewisdnl =================================================================== 37517aa0a607SDon Lewisdnl Check for system expat 37527aa0a607SDon Lewisdnl =================================================================== 37537aa0a607SDon LewisAC_MSG_CHECKING([which expat to use]) 37547aa0a607SDon Lewisif test -n "$with_system_expat" -o -n "$with_system_libs" && \ 37557aa0a607SDon Lewis test "$with_system_expat" != "no"; then 37567aa0a607SDon Lewis AC_MSG_RESULT([external]) 37577aa0a607SDon Lewis SYSTEM_EXPAT=YES 37587aa0a607SDon Lewis AC_CHECK_HEADER(expat.h, [], 37597aa0a607SDon Lewis [AC_MSG_ERROR(expat.h not found. install expat)], []) 37607aa0a607SDon Lewis AC_CHECK_LIB(expat, XML_ParserCreate, [], 37617aa0a607SDon Lewis [AC_MSG_RESULT(expat library not found or functional.)], []) 37627aa0a607SDon Lewiselse 37637aa0a607SDon Lewis AC_MSG_RESULT([internal]) 37647aa0a607SDon Lewis SYSTEM_EXPAT=NO 37657aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE EXPAT" 37667aa0a607SDon Lewisfi 37677aa0a607SDon LewisAC_SUBST(SYSTEM_EXPAT) 37687aa0a607SDon Lewis 37697aa0a607SDon Lewisdnl =================================================================== 37707aa0a607SDon Lewisdnl Check for system cppunit 37717aa0a607SDon Lewisdnl =================================================================== 37727aa0a607SDon LewisWITH_CPPUNIT= 37737aa0a607SDon LewisAC_MSG_CHECKING([which cppunit to use]) 37747aa0a607SDon Lewisif test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ 37757aa0a607SDon Lewis test "$with_system_cppunit" != "no"; then 37767aa0a607SDon Lewis SYSTEM_CPPUNIT=YES 37777aa0a607SDon Lewis # might work for earlier, too but go sure: 37787aa0a607SDon Lewis PKG_CHECK_MODULES( CPPUNIT, 37797aa0a607SDon Lewis cppunit >= 1.12.0, 37807aa0a607SDon Lewis WITH_CPPUNIT="YES", 37817aa0a607SDon Lewis WITH_CPPUNIT="") 37827aa0a607SDon Lewis if test -n "$WITH_CPPUNIT"; then 37837aa0a607SDon Lewis AC_MSG_RESULT([found system cppunit $CPPUNIT]) 37847aa0a607SDon Lewis else 37857aa0a607SDon Lewis AC_MSG_WARN([dit not find system cppunit version 1.12.0 or later]) 37867aa0a607SDon Lewis fi 37877aa0a607SDon Lewis 37887aa0a607SDon Lewiselse 37897aa0a607SDon Lewis AC_MSG_WARN([not using cppunit]) 37907aa0a607SDon Lewis SYSTEM_CPPUNIT=NO 37917aa0a607SDon Lewisfi 37927aa0a607SDon LewisAC_SUBST(SYSTEM_CPPUNIT) 37937aa0a607SDon LewisAC_SUBST(CPPUNIT_CFLAGS) 37947aa0a607SDon LewisAC_SUBST(CPPUNIT_LIBS) 37957aa0a607SDon LewisAC_SUBST(WITH_CPPUNIT) 37967aa0a607SDon Lewis 37977aa0a607SDon Lewisdnl =================================================================== 37987aa0a607SDon Lewisdnl Check whether freetype is available 37997aa0a607SDon Lewisdnl =================================================================== 38007aa0a607SDon Lewisif test "$test_freetype" = "yes"; then 38017aa0a607SDon Lewis AC_MSG_CHECKING([whether freetype is available]) 38027aa0a607SDon Lewis PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 ) 38037aa0a607SDon Lewisfi 38047aa0a607SDon LewisAC_SUBST(FREETYPE_CFLAGS) 38057aa0a607SDon LewisAC_SUBST(FREETYPE_LIBS) 38067aa0a607SDon Lewis 38077aa0a607SDon Lewisdnl =================================================================== 38087aa0a607SDon Lewisdnl Check whether freetype2 supports emboldening 38097aa0a607SDon Lewisdnl =================================================================== 38107aa0a607SDon Lewisif test "$test_freetype" = "yes"; then 38117aa0a607SDon Lewis save_CPPFLAGS="$CPPFLAGS" 38127aa0a607SDon Lewis save_LDFLAGS="$LDFLAGS" 38137aa0a607SDon Lewis save_LIBS="$LIBS" 38147aa0a607SDon Lewis CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" 38157aa0a607SDon Lewis LDFLAGS="$LDFLAGS $FREETYPE_LIBS" 38167aa0a607SDon Lewis AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden, 38177aa0a607SDon Lewis [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], []) 38187aa0a607SDon Lewis LDFLAGS="$save_LDFLAGS" 38197aa0a607SDon Lewis CPPFLAGS="$save_CPPFLAGS" 38207aa0a607SDon Lewis LIBS="$save_LIBS" 38217aa0a607SDon Lewisfi 38227aa0a607SDon LewisAC_SUBST(USE_FT_EMBOLDEN) 38237aa0a607SDon Lewis 38247aa0a607SDon Lewisif test -n "$with_system_libxslt" -o -n "$with_system_libs" && \ 38257aa0a607SDon Lewis test "$with_system_libxslt" != "no"; then 38267aa0a607SDon Lewis if test -z "$with_system_libxml" -a -z "$with_system_libs" || \ 38277aa0a607SDon Lewis test "$with_system_libxml" = "no"; then 38287aa0a607SDon Lewis # somehow AC_MSG_WARN won't work... 38297aa0a607SDon Lewis echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" 38307aa0a607SDon Lewis echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn 38317aa0a607SDon Lewis with_system_libxml=yes 38327aa0a607SDon Lewis fi 38337aa0a607SDon Lewisfi 38347aa0a607SDon Lewisif test -n "$with_system_libxml" -o -n "$with_system_libs" && \ 38357aa0a607SDon Lewis test "$with_system_libxml" != "no"; then 38367aa0a607SDon Lewis if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \ 38377aa0a607SDon Lewis test "$with_system_libxslt" = "no"; then 38387aa0a607SDon Lewis # somehow AC_MSG_WARN won't work... 38397aa0a607SDon Lewis echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" 38407aa0a607SDon Lewis echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn 38417aa0a607SDon Lewis with_system_libxslt=yes 38427aa0a607SDon Lewis fi 38437aa0a607SDon Lewisfi 38447aa0a607SDon Lewis 38457aa0a607SDon Lewisdnl =================================================================== 38467aa0a607SDon Lewisdnl Check for system libxslt 38477aa0a607SDon Lewisdnl =================================================================== 38487aa0a607SDon LewisAC_MSG_CHECKING([which libxslt to use]) 38497aa0a607SDon Lewisif test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \ 38507aa0a607SDon Lewis "$_os" = "Darwin" && \ 38517aa0a607SDon Lewis test "$with_system_libxslt" != "no"; then 38527aa0a607SDon Lewis AC_MSG_RESULT([external]) 38537aa0a607SDon Lewis SYSTEM_LIBXSLT=YES 38547aa0a607SDon Lewis 38557aa0a607SDon Lewis if test "$_os" != "Darwin"; then 38567aa0a607SDon Lewis PKG_CHECK_MODULES(LIBXSLT, libxslt) 38577aa0a607SDon Lewis else 38587aa0a607SDon Lewis LIBXSLT_CFLAGS=`xslt-config --cflags` 38597aa0a607SDon Lewis LIBXSLT_LIBS=`xslt-config --libs` 38607aa0a607SDon Lewis fi 38617aa0a607SDon Lewis 38627aa0a607SDon Lewis dnl Check for xsltproc 38637aa0a607SDon Lewis AC_PATH_PROG(XSLTPROC, xsltproc, no) 38647aa0a607SDon Lewis if test "$XSLTPROC" = "no"; then 38657aa0a607SDon Lewis AC_MSG_ERROR([xsltproc is required]) 38667aa0a607SDon Lewis fi 38677aa0a607SDon Lewiselse 38687aa0a607SDon Lewis AC_MSG_RESULT([internal]) 38697aa0a607SDon Lewis SYSTEM_LIBXSLT=NO 38707aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE LIBXSLT" 38717aa0a607SDon Lewisfi 38727aa0a607SDon LewisAC_SUBST(SYSTEM_LIBXSLT) 38737aa0a607SDon LewisAC_SUBST(LIBXSLT_CFLAGS) 38747aa0a607SDon LewisAC_SUBST(LIBXSLT_LIBS) 38757aa0a607SDon Lewis 38767aa0a607SDon Lewis 38777aa0a607SDon Lewisdnl =================================================================== 38787aa0a607SDon Lewisdnl Check for system libxml 38797aa0a607SDon Lewisdnl =================================================================== 38807aa0a607SDon LewisAC_MSG_CHECKING([which libxml to use]) 38817aa0a607SDon Lewisif test -n "$with_system_libxml" -o -n "$with_system_libs" -o \ 38827aa0a607SDon Lewis "$_os" = "Darwin" && \ 38837aa0a607SDon Lewis test "$with_system_libxml" != "no"; then 38847aa0a607SDon Lewis AC_MSG_RESULT([external]) 38857aa0a607SDon Lewis SYSTEM_LIBXML=YES 38867aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" 38877aa0a607SDon Lewis 38887aa0a607SDon Lewis if test "$_os" != "Darwin"; then 38897aa0a607SDon Lewis PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0) 38907aa0a607SDon Lewis else 38917aa0a607SDon Lewis LIBXML_CFLAGS=`xml2-config --cflags` 38927aa0a607SDon Lewis LIBXML_LIBS=`xml2-config --libs` 38937aa0a607SDon Lewis fi 38947aa0a607SDon Lewiselse 38957aa0a607SDon Lewis AC_MSG_RESULT([internal]) 38967aa0a607SDon Lewis SYSTEM_LIBXML=NO 38977aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" 38987aa0a607SDon Lewisfi 38997aa0a607SDon LewisAC_SUBST(SYSTEM_LIBXML) 39007aa0a607SDon LewisAC_SUBST(LIBXML_CFLAGS) 39017aa0a607SDon LewisAC_SUBST(LIBXML_LIBS) 39027aa0a607SDon Lewis 39037aa0a607SDon Lewis 39047aa0a607SDon Lewisdnl =================================================================== 39057aa0a607SDon Lewisdnl Checks for a MacOS platform SDK compatible with an OSX 10.7 deployment target 39067aa0a607SDon Lewisdnl =================================================================== 39077aa0a607SDon Lewisif test "$_os" = "Darwin"; then 3908746748b1SJim Jagielski sdk_target=10.7 3909a46ef990SJim Jagielski AC_MSG_CHECKING([checking SDK compatibility with OSX $sdk_target]) 39107aa0a607SDon Lewis 39117aa0a607SDon Lewis sdk_minor=`echo $sdk_target | cut -d"." -f2` 39127aa0a607SDon Lewis 3913746748b1SJim Jagielski if test "$sdk_minor" -lt "7"; then 39147aa0a607SDon Lewis AC_MSG_ERROR([SDK version < 10.7 is not longer supported]) 39157aa0a607SDon Lewis else 39167aa0a607SDon Lewis MACOSX_DEPLOYMENT_TARGET=$sdk_target 39177aa0a607SDon Lewis 39183a8d6f30SJim Jagielski sdk_found=`xcodebuild -showsdks | $EGREP "sdk macosx10.(7|8|9|10|11)" | sed -e "s/.*sdk //" | tail -n1` 39197aa0a607SDon Lewis if test -z "$sdk_found"; then 39207aa0a607SDon Lewis AC_MSG_ERROR([No SDK with OSX $sdk_target compatibility found]) 39217aa0a607SDon Lewis else 39227aa0a607SDon Lewis AC_MSG_RESULT([yes, by using SDK $sdk_found]) 39237aa0a607SDon Lewis fi 39247aa0a607SDon Lewis 39257aa0a607SDon Lewis sdk_path=`xcodebuild -version -sdk ${sdk_found} Path` 39267aa0a607SDon Lewis AC_MSG_CHECKING([for $sdk_path]) 39277aa0a607SDon Lewis if test -d "$sdk_path"; then 39287aa0a607SDon Lewis AC_MSG_RESULT([yes]) 39297aa0a607SDon Lewis else 39307aa0a607SDon Lewis AC_MSG_ERROR([not found!]) 39317aa0a607SDon Lewis fi 39327aa0a607SDon Lewis 39337aa0a607SDon Lewis MACOSX_SDK_PATH=$sdk_path 39347aa0a607SDon Lewis fi 39357aa0a607SDon Lewis 39367aa0a607SDon Lewisfi 39377aa0a607SDon LewisAC_SUBST(MACOSX_DEPLOYMENT_TARGET) 39387aa0a607SDon LewisAC_SUBST(MACOSX_SDK_PATH) 39397aa0a607SDon Lewis 39407aa0a607SDon Lewis 39417aa0a607SDon Lewisdnl =================================================================== 39427aa0a607SDon Lewisdnl Check for system python 39437aa0a607SDon Lewisdnl =================================================================== 39447aa0a607SDon LewisAC_MSG_CHECKING([which python to use]) 39457aa0a607SDon Lewisif test "$_os" = "Darwin" && test "$with_system_python" != "no"; then 39467aa0a607SDon Lewis with_system_python=yes 39477aa0a607SDon Lewis 39487aa0a607SDon Lewis _python="/Library/Frameworks/Python.framework/Versions/Current/bin/python" 39497aa0a607SDon Lewis if test ! -f $_python; then 39507aa0a607SDon Lewis _python="/usr/bin/python" 39517aa0a607SDon Lewis fi 39527aa0a607SDon Lewis AC_MSG_RESULT([compiling against system python ($_python)]) 39537aa0a607SDon Lewis 39547aa0a607SDon Lewis _python_hexversion=`$_python -c "import sys; print(sys.hexversion);"` 39557aa0a607SDon Lewis 39567aa0a607SDon Lewis dnl hex version of Python 2.7.1 = 34013680 39577aa0a607SDon Lewis if test $_python_hexversion -ge 34013680 ; then 39587aa0a607SDon Lewis _python_version=`$_python -c "import sys; print sys.version;" | head -c 3` 39597aa0a607SDon Lewis AC_MSG_RESULT([compiling against system python (version $_python_version)]) 39607aa0a607SDon Lewis 39617aa0a607SDon Lewis _python_ver=`$_python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"` 39627aa0a607SDon Lewis 39637aa0a607SDon Lewis if test -d "/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"; then 39647aa0a607SDon Lewis PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver" 39657aa0a607SDon Lewis elif test -d "$MACOSX_SDK_PATH/usr/include/python$_python_ver"; then 39667aa0a607SDon Lewis PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/python$_python_ver" 39677aa0a607SDon Lewis else 39687aa0a607SDon Lewis PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver" 39697aa0a607SDon Lewis fi 39707aa0a607SDon Lewis else 39717aa0a607SDon Lewis AC_MSG_ERROR([Python 2.7.1 or higher is required]) 39727aa0a607SDon Lewis fi 39737aa0a607SDon Lewis 39747aa0a607SDon Lewis PYTHON_LIBS="-framework Python" 39757aa0a607SDon Lewiselif test -n "$with_system_python" -o -n "$with_system_libs" && \ 39767aa0a607SDon Lewis test "$with_system_python" != "no"; then 39777aa0a607SDon Lewis with_system_python=yes 39787aa0a607SDon Lewis AC_MSG_RESULT([external]) 39797aa0a607SDon Lewis AM_PATH_PYTHON([2.7]) 39807aa0a607SDon Lewis 39817aa0a607SDon Lewis python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"` 39827aa0a607SDon Lewis python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"` 39837aa0a607SDon Lewis PYTHON_CFLAGS="-I$python_include" 39847aa0a607SDon Lewis PYTHON_LIBS="-lpython$python_version" 39857aa0a607SDon Lewisfi 39867aa0a607SDon Lewisif test "$with_system_python" = "yes" ; then 39877aa0a607SDon Lewis SYSTEM_PYTHON=YES 39887aa0a607SDon Lewis dnl check if the headers really work: 39897aa0a607SDon Lewis save_CPPFLAGS="$CPPFLAGS" 39907aa0a607SDon Lewis CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" 39917aa0a607SDon Lewis AC_CHECK_HEADER(Python.h, [], 39927aa0a607SDon Lewis [AC_MSG_ERROR(Python headers not found)], []) 39937aa0a607SDon Lewis CPPFLAGS="$save_CPPFLAGS" 39947aa0a607SDon Lewiselse 39957aa0a607SDon Lewis SYSTEM_PYTHON=NO 39967aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE PYTHON" 39977aa0a607SDon Lewis AC_MSG_RESULT([internal]) 39987aa0a607SDon Lewis # Embedded python dies without Home set 39997aa0a607SDon Lewis if test "z$HOME" = "z"; then 40007aa0a607SDon Lewis export HOME=""; 40017aa0a607SDon Lewis fi 40027aa0a607SDon Lewis # bz2 tarball and bzip2 is not standard 40037aa0a607SDon Lewis if test -z "$BZIP2"; then 40047aa0a607SDon Lewis AC_PATH_PROG( BZIP2, bzip2) 40057aa0a607SDon Lewis if test -z "$BZIP2"; then 40067aa0a607SDon Lewis AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2]) 40077aa0a607SDon Lewis fi 40087aa0a607SDon Lewis fi 40097aa0a607SDon Lewisfi 40107aa0a607SDon LewisAC_SUBST(SYSTEM_PYTHON) 40117aa0a607SDon LewisAC_SUBST(PYTHON_CFLAGS) 40127aa0a607SDon LewisAC_SUBST(PYTHON_LIBS) 40137aa0a607SDon LewisHOME=`echo $HOME | sed 's:\\\\:/:g'` 40147aa0a607SDon LewisAC_SUBST(HOME) 40157aa0a607SDon Lewis 40167aa0a607SDon Lewisdnl =================================================================== 40177aa0a607SDon Lewisdnl Check for system lucene 40187aa0a607SDon Lewisdnl =================================================================== 40197aa0a607SDon LewisAC_MSG_CHECKING([which lucene to use]) 40207aa0a607SDon Lewisif test -n "$with_system_lucene" -o -n "$with_system_libs" && \ 40217aa0a607SDon Lewis test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then 40227aa0a607SDon Lewis AC_MSG_RESULT([external]) 40237aa0a607SDon Lewis SYSTEM_LUCENE=YES 40247aa0a607SDon Lewis if test -z $LUCENE_CORE_JAR; then 40257aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/lucene-core-2.9.4.jar, 40267aa0a607SDon Lewis [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.9.4.jar ], 40277aa0a607SDon Lewis [ 40287aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/lucene-core.jar, 40297aa0a607SDon Lewis [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ], 40307aa0a607SDon Lewis [ AC_CHECK_FILE(/usr/share/java/lucene.jar, 40317aa0a607SDon Lewis [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ], 40327aa0a607SDon Lewis [ AC_MSG_ERROR(lucene-core.jar replacement not found)] 40337aa0a607SDon Lewis ) 40347aa0a607SDon Lewis ] 40357aa0a607SDon Lewis ) 40367aa0a607SDon Lewis ] 40377aa0a607SDon Lewis ) 40387aa0a607SDon Lewis else 40397aa0a607SDon Lewis AC_CHECK_FILE($LUCENE_CORE_JAR, [], 40407aa0a607SDon Lewis [AC_MSG_ERROR(lucene-core.jar not found.)], []) 40417aa0a607SDon Lewis fi 40427aa0a607SDon Lewis 40437aa0a607SDon Lewis if test -z $LUCENE_ANALYZERS_JAR; then 40447aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar, 40457aa0a607SDon Lewis [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ], 40467aa0a607SDon Lewis [ 40477aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar, 40487aa0a607SDon Lewis [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ], 40497aa0a607SDon Lewis [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)] 40507aa0a607SDon Lewis ) 40517aa0a607SDon Lewis ] 40527aa0a607SDon Lewis ) 40537aa0a607SDon Lewis else 40547aa0a607SDon Lewis AC_CHECK_FILE($LUCENE_CORE_JAR, [], 40557aa0a607SDon Lewis [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], []) 40567aa0a607SDon Lewis fi 40577aa0a607SDon Lewis AC_MSG_CHECKING([whether lucene is version 2.x]) 40587aa0a607SDon Lewis export LUCENE_CORE_JAR 40597aa0a607SDon Lewis if $PERL -e 'use Archive::Zip; 40607aa0a607SDon Lewis my $file = "$ENV{'LUCENE_CORE_JAR'}"; 40617aa0a607SDon Lewis my $zip = Archive::Zip->new( $file ); 40627aa0a607SDon Lewis my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 40637aa0a607SDon Lewis if ( $mf =~ m/Specification-Version: 2.*/ ) { 40647aa0a607SDon Lewis exit 0; 40657aa0a607SDon Lewis } else { 40667aa0a607SDon Lewis exit 1; 40677aa0a607SDon Lewis }'; then 40687aa0a607SDon Lewis AC_MSG_RESULT([yes]) 40697aa0a607SDon Lewis else 40707aa0a607SDon Lewis AC_MSG_RESULT([no]) 40717aa0a607SDon Lewis AC_MSG_CHECKING([whether lucene is version 3.x]) 40727aa0a607SDon Lewis 40737aa0a607SDon Lewis if $PERL -e 'use Archive::Zip; 40747aa0a607SDon Lewis my $file = "$ENV{'LUCENE_CORE_JAR'}"; 40757aa0a607SDon Lewis my $zip = Archive::Zip->new( $file ); 40767aa0a607SDon Lewis my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 40777aa0a607SDon Lewis if ( $mf =~ m/Specification-Version: 3.*/ ) { 40787aa0a607SDon Lewis exit 0; 40797aa0a607SDon Lewis } else { 40807aa0a607SDon Lewis exit 1; 40817aa0a607SDon Lewis }'; then 40827aa0a607SDon Lewis AC_MSG_RESULT([yes]) 40837aa0a607SDon Lewis else 40847aa0a607SDon Lewis AC_MSG_ERROR([no, you need lucene 2 or 3]) 40857aa0a607SDon Lewis fi 40867aa0a607SDon Lewis fi 40877aa0a607SDon Lewis 40887aa0a607SDon Lewiselse 40897aa0a607SDon Lewis AC_MSG_RESULT([internal]) 40907aa0a607SDon Lewis SYSTEM_LUCENE=NO 40917aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE LUCENE" 40927aa0a607SDon Lewisfi 40937aa0a607SDon LewisAC_SUBST(SYSTEM_LUCENE) 40947aa0a607SDon LewisAC_SUBST(LUCENE_CORE_JAR) 40957aa0a607SDon LewisAC_SUBST(LUCENE_ANALYZERS_JAR) 40967aa0a607SDon Lewis 40977aa0a607SDon LewisAC_MSG_CHECKING([whether to build the MySQL Connector extension]) 40987aa0a607SDon Lewisif test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then 40997aa0a607SDon Lewis AC_MSG_RESULT([yes]) 41007aa0a607SDon Lewis ENABLE_MYSQLC=YES 41017aa0a607SDon Lewis AC_MSG_CHECKING([for mysqlc module]) 41027aa0a607SDon Lewis if test -d mysqlc; then 41037aa0a607SDon Lewis AC_MSG_RESULT([OK]) 41047aa0a607SDon Lewis else 41057aa0a607SDon Lewis AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 41067aa0a607SDon Lewis fi 41077aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE MYSQLC" 41087aa0a607SDon Lewiselse 41097aa0a607SDon Lewis AC_MSG_RESULT([no]) 41107aa0a607SDon Lewis ENABLE_MYSQLC=NO 41117aa0a607SDon Lewisfi 41127aa0a607SDon LewisAC_SUBST(ENABLE_MYSQLC) 41137aa0a607SDon Lewis 41147aa0a607SDon Lewisif test "$ENABLE_MYSQLC" = "YES"; then 41157aa0a607SDon Lewisdnl =================================================================== 41167aa0a607SDon Lewisdnl Check for system MySQL 41177aa0a607SDon Lewisdnl =================================================================== 41187aa0a607SDon LewisAC_MSG_CHECKING([for mysql pre-requisites]) 41197aa0a607SDon Lewisif test -n "$with_system_mysql" -o -n "$with_system_libs" && \ 41207aa0a607SDon Lewis test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then 41217aa0a607SDon Lewis AC_MSG_RESULT([external MySQL]) 41227aa0a607SDon Lewis SYSTEM_MYSQL=YES 41237aa0a607SDon Lewis AC_PATH_PROG( MYSQLCONFIG, mysql_config) 41247aa0a607SDon Lewis AC_MSG_CHECKING([MySQL version]) 41257aa0a607SDon Lewis if test -z "$MYSQLCONFIG" -o ! -x "$MYSQLCONFIG" ; then 41267aa0a607SDon Lewis AC_MSG_ERROR([can not find/execute mysql_config]); 41277aa0a607SDon Lewis fi 41287aa0a607SDon Lewis MYSQL_VERSION=`$MYSQLCONFIG --version` 41297aa0a607SDon Lewis MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1` 41307aa0a607SDon Lewis if test "$MYSQL_MAJOR" -ge "5"; then 41317aa0a607SDon Lewis AC_MSG_RESULT([OK]) 41327aa0a607SDon Lewis else 41337aa0a607SDon Lewis AC_MSG_ERROR([too old, use 5.0.x or 5.1.x]) 41347aa0a607SDon Lewis fi 41357aa0a607SDon Lewis AC_MSG_CHECKING([for MySQL Client library]) 41367aa0a607SDon Lewis MYSQL_INC=`$MYSQLCONFIG --include` 41377aa0a607SDon Lewis MYSQL_LIB=`$MYSQLCONFIG --libs` 41387aa0a607SDon Lewis MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,` 41397aa0a607SDon Lewis AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB]) 41407aa0a607SDon Lewiselse 41417aa0a607SDon Lewis SYSTEM_MYSQL=NO 41427aa0a607SDon Lewis if test -n "$with_libmysql_path"; then 41437aa0a607SDon Lewis AC_MSG_RESULT([external Connector/C (libmysql)]) 41447aa0a607SDon Lewis LIBMYSQL=libmysql.so 41457aa0a607SDon Lewis if test "$_os" = "Darwin"; then 41467aa0a607SDon Lewis LIBMYSQL=libmysql.dylib 41477aa0a607SDon Lewis elif test "$_os" = "WINNT"; then 41487aa0a607SDon Lewis LIBMYSQL=libmysql.dll 41497aa0a607SDon Lewis fi 41507aa0a607SDon Lewis AC_MSG_CHECKING([for $LIBMYSQL]) 41517aa0a607SDon Lewis if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then 41527aa0a607SDon Lewis AC_MSG_RESULT([found.]) 41537aa0a607SDon Lewis LIBMYSQL_PATH=$with_libmysql_path 41547aa0a607SDon Lewis else 41557aa0a607SDon Lewis AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.]) 41567aa0a607SDon Lewis fi 41577aa0a607SDon Lewis else 41587aa0a607SDon Lewis AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path]) 41597aa0a607SDon Lewis fi 41607aa0a607SDon Lewisfi 41617aa0a607SDon LewisAC_SUBST(SYSTEM_MYSQL) 41627aa0a607SDon LewisAC_SUBST(MYSQL_INC) 41637aa0a607SDon LewisAC_SUBST(MYSQL_LIB) 41647aa0a607SDon LewisAC_SUBST(MYSQL_DEFINES) 41657aa0a607SDon LewisAC_SUBST(LIBMYSQL_PATH) 41667aa0a607SDon Lewis 41677aa0a607SDon LewisAC_LANG_PUSH([C++]) 41687aa0a607SDon Lewisdnl =================================================================== 41697aa0a607SDon Lewisdnl Check for system MySQL C++ Connector 41707aa0a607SDon Lewisdnl =================================================================== 41717aa0a607SDon Lewis# FIXME! 41727aa0a607SDon Lewis# who thought this too-generic cppconn dir was a good idea? 41737aa0a607SDon LewisAC_MSG_CHECKING([MySQL Connector/C++]) 41747aa0a607SDon Lewisif test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ 41757aa0a607SDon Lewis test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then 41767aa0a607SDon Lewis AC_MSG_RESULT([external]) 41777aa0a607SDon Lewis SYSTEM_MYSQL_CPPCONN=YES 41787aa0a607SDon Lewis AC_LANG_PUSH([C++]) 41797aa0a607SDon Lewis AC_CHECK_HEADER(mysql_driver.h, [], 41807aa0a607SDon Lewis [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], []) 41817aa0a607SDon Lewis AC_CHECK_LIB(mysqlcppconn, main, [], 41827aa0a607SDon Lewis [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], []) 41837aa0a607SDon Lewis AC_MSG_CHECKING([version]) 41847aa0a607SDon Lewis AC_TRY_RUN([ 41857aa0a607SDon Lewis#include <mysql_driver.h> 41867aa0a607SDon Lewis 41877aa0a607SDon Lewisint main(int argc, char **argv) { 41887aa0a607SDon Lewis sql::Driver *driver; 41897aa0a607SDon Lewis driver = get_driver_instance(); 41907aa0a607SDon Lewis if (driver->getMajorVersion() > 1 || \ 41917aa0a607SDon Lewis (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \ 41927aa0a607SDon Lewis (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6)) 41937aa0a607SDon Lewis return 0; 41947aa0a607SDon Lewis else 41957aa0a607SDon Lewis return 1; 41967aa0a607SDon Lewis} 41977aa0a607SDon Lewis ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])]) 41987aa0a607SDon Lewis AC_LANG_POP([C++]) 41997aa0a607SDon Lewis 42007aa0a607SDon Lewiselse 42017aa0a607SDon Lewis AC_MSG_RESULT([no]) 42027aa0a607SDon Lewis SYSTEM_MYSQL_CPPCONN= 42037aa0a607SDon Lewisfi 42047aa0a607SDon LewisAC_LANG_POP([C++]) 42057aa0a607SDon LewisAC_SUBST(SYSTEM_MYSQL_CPPCONN) 42067aa0a607SDon Lewisfi 42077aa0a607SDon Lewis 42087aa0a607SDon Lewisdnl =================================================================== 42097aa0a607SDon Lewisdnl Check for system hsqldb 42107aa0a607SDon Lewisdnl =================================================================== 42117aa0a607SDon LewisAC_MSG_CHECKING([which hsqldb to use]) 42127aa0a607SDon Lewisif test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ 42137aa0a607SDon Lewis test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then 42147aa0a607SDon Lewis AC_MSG_RESULT([external]) 42157aa0a607SDon Lewis SYSTEM_HSQLDB=YES 42167aa0a607SDon Lewis if test -z $HSQLDB_JAR; then 42177aa0a607SDon Lewis HSQLDB_JAR=/usr/share/java/hsqldb.jar 42187aa0a607SDon Lewis fi 42197aa0a607SDon Lewis AC_CHECK_FILE($HSQLDB_JAR, [], 42207aa0a607SDon Lewis [AC_MSG_ERROR(hsqldb.jar not found.)], []) 42217aa0a607SDon Lewis AC_MSG_CHECKING([whether hsqldb is 1.8.0.x]) 42227aa0a607SDon Lewis export HSQLDB_JAR 42237aa0a607SDon Lewis if $PERL -e 'use Archive::Zip; 42247aa0a607SDon Lewis my $file = "$ENV{'HSQLDB_JAR'}"; 42257aa0a607SDon Lewis my $zip = Archive::Zip->new( $file ); 42267aa0a607SDon Lewis my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 42277aa0a607SDon Lewis if ( $mf =~ m/Specification-Version: 1.8.*/ ) { 42287aa0a607SDon Lewis push @l, split(/\n/, $mf); 42297aa0a607SDon Lewis foreach my $line (@l) { 42307aa0a607SDon Lewis if ($line =~ m/Specification-Version:/) { 42317aa0a607SDon Lewis ($t, $version) = split (/:/,$line); 42327aa0a607SDon Lewis $version =~ s/^\s//; 42337aa0a607SDon Lewis ($a, $b, $c, $d) = split (/\./,$version); 42347aa0a607SDon Lewis if ($c == "0" && $d > "8") { 42357aa0a607SDon Lewis exit 0; 42367aa0a607SDon Lewis } else { 42377aa0a607SDon Lewis exit 1; 42387aa0a607SDon Lewis } 42397aa0a607SDon Lewis } 42407aa0a607SDon Lewis } 42417aa0a607SDon Lewis } else { 42427aa0a607SDon Lewis exit 1; 42437aa0a607SDon Lewis }'; then 42447aa0a607SDon Lewis AC_MSG_RESULT([yes]) 42457aa0a607SDon Lewis else 42467aa0a607SDon Lewis AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1]) 42477aa0a607SDon Lewis fi 42487aa0a607SDon Lewiselse 42497aa0a607SDon Lewis AC_MSG_RESULT([internal]) 42507aa0a607SDon Lewis SYSTEM_HSQLDB=NO 42517aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE HSQLDB" 42527aa0a607SDon Lewisfi 42537aa0a607SDon LewisAC_SUBST(SYSTEM_HSQLDB) 42547aa0a607SDon LewisAC_SUBST(HSQLDB_JAR) 42557aa0a607SDon Lewis 42567aa0a607SDon Lewisdnl =================================================================== 42577aa0a607SDon Lewisdnl Check for system beanshell 42587aa0a607SDon Lewisdnl =================================================================== 42597aa0a607SDon LewisENABLE_BEANSHELL=YES 42607aa0a607SDon LewisAC_MSG_CHECKING([which beanshell to use]) 42617aa0a607SDon Lewisif test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ 42627aa0a607SDon Lewis test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then 42637aa0a607SDon Lewis AC_MSG_RESULT([external]) 42647aa0a607SDon Lewis SYSTEM_BSH=YES 42657aa0a607SDon Lewis if test -z $BSH_JAR; then 42667aa0a607SDon Lewis BSH_JAR=/usr/share/java/bsh.jar 42677aa0a607SDon Lewis fi 42687aa0a607SDon Lewis AC_CHECK_FILE($BSH_JAR, [], 42697aa0a607SDon Lewis [AC_MSG_ERROR(bsh.jar not found.)], []) 42707aa0a607SDon Lewiselif test "x$enable_beanshell" = "xyes"; then 42717aa0a607SDon Lewis AC_MSG_RESULT([internal]) 42727aa0a607SDon Lewis SYSTEM_BSH=NO 42737aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE BSH" 42747aa0a607SDon Lewiselse 42757aa0a607SDon Lewis AC_MSG_RESULT([none (disabled)]) 42767aa0a607SDon Lewis SYSTEM_BSH=NO 42777aa0a607SDon Lewis ENABLE_BEANSHELL=NO 42787aa0a607SDon Lewisfi 42797aa0a607SDon LewisAC_SUBST(SYSTEM_BSH) 42807aa0a607SDon LewisAC_SUBST(BSH_JAR) 42817aa0a607SDon LewisAC_SUBST(ENABLE_BEANSHELL) 42827aa0a607SDon Lewis 42837aa0a607SDon Lewis 42847aa0a607SDon Lewisdnl =================================================================== 42857aa0a607SDon Lewisdnl Check for saxon. It can come from two different places: 42867aa0a607SDon Lewisdnl - pre-installed on the system. This is checked when the --with-system-saxon 42877aa0a607SDon Lewisdnl option is given to configure. 42887aa0a607SDon Lewisdnl The exact place can be specified with the --with-saxon-jar=<path> option. 42897aa0a607SDon Lewisdnl - From the saxon tar ball in ext_sources/. This is used when --enable-saxon 42907aa0a607SDon Lewisdnl is given to configure but not any of --with-system-saxon or --with-saxon-jar. 42917aa0a607SDon Lewisdnl =================================================================== 42927aa0a607SDon LewisDISABLE_SAXON= 42937aa0a607SDon LewisAC_MSG_CHECKING([which saxon to use]) 42947aa0a607SDon Lewisif test -n "$with_system_saxon" -o -n "$with_system_libs" && \ 42957aa0a607SDon Lewis test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then 42967aa0a607SDon Lewis AC_MSG_RESULT([external]) 42977aa0a607SDon Lewis SYSTEM_SAXON=YES 42987aa0a607SDon Lewis if test -z $SAXON_JAR; then 42997aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/saxon9.jar, 43007aa0a607SDon Lewis [ SAXON_JAR=/usr/share/java/saxon9.jar ], 43017aa0a607SDon Lewis [ 43027aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/saxon.jar, 43037aa0a607SDon Lewis [ SAXON_JAR=/usr/share/java/saxon.jar ], 43047aa0a607SDon Lewis [ AC_CHECK_FILE(/usr/share/java/saxon9.jar, 43057aa0a607SDon Lewis [ SAXON_JAR=/usr/share/java/saxon9.jar ], 43067aa0a607SDon Lewis [ AC_MSG_ERROR(saxon.jar replacement not found)] 43077aa0a607SDon Lewis ) 43087aa0a607SDon Lewis ] 43097aa0a607SDon Lewis ) 43107aa0a607SDon Lewis ] 43117aa0a607SDon Lewis ) 43127aa0a607SDon Lewis else 43137aa0a607SDon Lewis AC_CHECK_FILE($SAXON_JAR, [], 43147aa0a607SDon Lewis [AC_MSG_ERROR(saxon.jar replacement not found.)], []) 43157aa0a607SDon Lewis fi 43167aa0a607SDon Lewis if test -n "$SERIALIZER_JAR"; then 43177aa0a607SDon Lewis AC_CHECK_FILE($SERIALIZER_JAR, [], 43187aa0a607SDon Lewis [AC_MSG_ERROR(serializer.jar not found.)], []) 43197aa0a607SDon Lewis AC_SUBST(SERIALIZER_JAR) 43207aa0a607SDon Lewis fi 43217aa0a607SDon Lewis 43227aa0a607SDon Lewisdnl Saxon comes in two practically available versions, the out-of-date saxonb which 43237aa0a607SDon Lewisdnl supports the java extensions that OOo uses, and the up-to-date saxon he 43247aa0a607SDon Lewisdnl "home edition" version, which is crippled to not support those java extensions. 43257aa0a607SDon Lewisdnl And as an aside the he one also needs to be tweaked to include 43267aa0a607SDon Lewisdnl a META-INF/services to broadcast that it supports the jaxp transform factory 43277aa0a607SDon Lewis 43287aa0a607SDon Lewis AC_MSG_CHECKING([if saxon works]) 43297aa0a607SDon Lewis cat > saxontest.java <<_ACEOF 43307aa0a607SDon Lewis[import javax.xml.transform.TransformerFactory; 43317aa0a607SDon Lewisimport javax.xml.transform.Transformer; 43327aa0a607SDon Lewisimport javax.xml.transform.stream.StreamSource; 43337aa0a607SDon Lewisimport java.io.*; 43347aa0a607SDon Lewis 43357aa0a607SDon Lewisimport net.sf.saxon.FeatureKeys; 43367aa0a607SDon Lewis 43377aa0a607SDon Lewisclass saxontest { 43387aa0a607SDon Lewis public static void main(String[] args) { 43397aa0a607SDon Lewis System.setProperty("javax.xml.transform.TransformerFactory", 43407aa0a607SDon Lewis "net.sf.saxon.TransformerFactoryImpl"); 43417aa0a607SDon Lewis try { 43427aa0a607SDon Lewis TransformerFactory tfactory = TransformerFactory.newInstance(); 43437aa0a607SDon Lewis // some external saxons (Debian, Ubuntu, ...) have this disabled 43447aa0a607SDon Lewis // per default 43457aa0a607SDon Lewis tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true)); 43467aa0a607SDon Lewis System.out.println("TransformerFactory is" + 43477aa0a607SDon Lewis tfactory.getClass().getName()); 43487aa0a607SDon Lewis Transformer transformer = tfactory.newTransformer( 43497aa0a607SDon Lewis new StreamSource(new File(args[0]))); 43507aa0a607SDon Lewis } catch(Exception e){ 43517aa0a607SDon Lewis e.printStackTrace(System.err); 43527aa0a607SDon Lewis System.exit(-1); 43537aa0a607SDon Lewis } 43547aa0a607SDon Lewis System.exit(0); 43557aa0a607SDon Lewis } 43567aa0a607SDon Lewis} 43577aa0a607SDon Lewis] 43587aa0a607SDon Lewis_ACEOF 43597aa0a607SDon Lewis cat > saxontest.xsl<<_ACEOF 43607aa0a607SDon Lewis[<?xml version="1.0" encoding="UTF-8"?> 43617aa0a607SDon Lewis<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 43627aa0a607SDon Lewis <xsl:template match="/"> 43637aa0a607SDon Lewis <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/> 43647aa0a607SDon Lewis </xsl:template> 43657aa0a607SDon Lewis</xsl:stylesheet> 43667aa0a607SDon Lewis] 43677aa0a607SDon Lewis_ACEOF 43687aa0a607SDon Lewis javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2" 43697aa0a607SDon Lewis AC_TRY_EVAL(javac_cmd) 43707aa0a607SDon Lewis if test $? = 0 && test -f ./saxontest.class ; then 43717aa0a607SDon Lewis java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" 43727aa0a607SDon Lewis AC_TRY_EVAL(java_cmd) 43737aa0a607SDon Lewis if test $? = 0; then 43747aa0a607SDon Lewis AC_MSG_RESULT([yes]) 43757aa0a607SDon Lewis else 43767aa0a607SDon Lewis cat saxontest.java >&5 43777aa0a607SDon Lewis AC_MSG_RESULT([no]) 43787aa0a607SDon Lewis AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb]) 43797aa0a607SDon Lewis fi 43807aa0a607SDon Lewis else 43817aa0a607SDon Lewis AC_MSG_RESULT([no]) 43827aa0a607SDon Lewis cat saxontest.java >&5 43837aa0a607SDon Lewis AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar]) 43847aa0a607SDon Lewis fi 43857aa0a607SDon Lewiselif test "x$enable_saxon" = "xyes"; then 43867aa0a607SDon Lewis AC_MSG_RESULT([internal]) 43877aa0a607SDon Lewis SYSTEM_SAXON=NO 43887aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE SAXON" 43897aa0a607SDon Lewiselse 43907aa0a607SDon Lewis AC_MSG_RESULT([none (disabled)]) 43917aa0a607SDon Lewis SYSTEM_SAXON=NO 43927aa0a607SDon Lewis DISABLE_SAXON=YES 43937aa0a607SDon Lewisfi 43947aa0a607SDon LewisAC_SUBST(SYSTEM_SAXON) 43957aa0a607SDon LewisAC_SUBST(SAXON_JAR) 43967aa0a607SDon LewisAC_SUBST(DISABLE_SAXON) 43977aa0a607SDon Lewis 43987aa0a607SDon Lewis 43997aa0a607SDon Lewisdnl =================================================================== 44007aa0a607SDon Lewisdnl Check for rhino 44017aa0a607SDon Lewisdnl =================================================================== 44027aa0a607SDon LewisENABLE_JAVASCRIPT= 44037aa0a607SDon LewisAC_MSG_CHECKING([whether to enable support for JavaScript]) 44047aa0a607SDon Lewisif test "x$enable_javascript" = "xyes"; then 44057aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE RHINO" 44067aa0a607SDon Lewis AC_MSG_RESULT([yes]) 44077aa0a607SDon Lewis ENABLE_JAVASCRIPT=YES 44087aa0a607SDon Lewiselse 44097aa0a607SDon Lewis AC_MSG_RESULT([no]) 44107aa0a607SDon Lewis ENABLE_JAVASCRIPT=NO 44117aa0a607SDon Lewisfi 44127aa0a607SDon LewisAC_SUBST(ENABLE_JAVASCRIPT) 44137aa0a607SDon Lewis 44147aa0a607SDon Lewis 44157aa0a607SDon Lewisdnl =================================================================== 44167aa0a607SDon Lewisdnl Check for system apr 44177aa0a607SDon Lewisdnl =================================================================== 44187aa0a607SDon LewisSYSTEM_APR=NO 44197aa0a607SDon LewisAPR_CFLAGS= 44207aa0a607SDon LewisAPR_LIBS= 44217aa0a607SDon LewisAC_MSG_CHECKING([which libapr to use]) 44227aa0a607SDon Lewisif test "x$with_system_apr" = "xyes" -o -n "$with_system_libs"; then 44237aa0a607SDon Lewis AC_MSG_RESULT([system]) 44247aa0a607SDon Lewis PKG_CHECK_MODULES([APR], [apr-1 >= 1.0]) 44257aa0a607SDon Lewis SYSTEM_APR=YES 44267aa0a607SDon Lewiselse 44277aa0a607SDon Lewis AC_MSG_RESULT([internal]) 44287aa0a607SDon Lewis SYSTEM_APR=NO 44297aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE APR" 44307aa0a607SDon Lewisfi 44317aa0a607SDon LewisAC_SUBST(SYSTEM_APR) 44327aa0a607SDon LewisAC_SUBST(APR_CFLAGS) 44337aa0a607SDon LewisAC_SUBST(APR_LIBS) 44347aa0a607SDon Lewis 44357aa0a607SDon Lewis 44367aa0a607SDon Lewisdnl =================================================================== 44377aa0a607SDon Lewisdnl Check for system apr-util 44387aa0a607SDon Lewisdnl =================================================================== 44397aa0a607SDon LewisSYSTEM_APR_UTIL=NO 44407aa0a607SDon LewisAPR_UTIL_CFLAGS= 44417aa0a607SDon LewisAPR_UTIL_LIBS= 44427aa0a607SDon LewisAC_MSG_CHECKING([which libapr-util to use]) 44437aa0a607SDon Lewisif test "x$with_system_apr_util" = "xyes" -o -n "$with_system_libs"; then 44447aa0a607SDon Lewis AC_MSG_RESULT([system]) 44457aa0a607SDon Lewis PKG_CHECK_MODULES([APR_UTIL], [apr-util-1 >= 1.0]) 44467aa0a607SDon Lewis SYSTEM_APR_UTIL=YES 44477aa0a607SDon Lewiselse 44487aa0a607SDon Lewis AC_MSG_RESULT([internal]) 44497aa0a607SDon Lewis SYSTEM_APR_UTIL=NO 44507aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE APR_UTIL" 44517aa0a607SDon Lewisfi 44527aa0a607SDon LewisAC_SUBST(SYSTEM_APR_UTIL) 44537aa0a607SDon LewisAC_SUBST(APR_UTIL_CFLAGS) 44547aa0a607SDon LewisAC_SUBST(APR_UTIL_LIBS) 44557aa0a607SDon Lewis 44567aa0a607SDon Lewis 44577aa0a607SDon Lewisdnl =================================================================== 44587aa0a607SDon Lewisdnl Check for system serf 44597aa0a607SDon Lewisdnl =================================================================== 44607aa0a607SDon LewisSYSTEM_SERF=NO 44617aa0a607SDon LewisSERF_CFLAGS= 44627aa0a607SDon LewisSERF_LIBS= 44637aa0a607SDon LewisAC_MSG_CHECKING([which libserf to use]) 44647aa0a607SDon Lewisif test -n "$with_system_serf" -o -n "$with_system_libs" && \ 44657aa0a607SDon Lewis test "$with_system_serf" != "no"; then 44667aa0a607SDon Lewis AC_MSG_RESULT([system]) 44677aa0a607SDon Lewis PKG_CHECK_MODULES([SERF], [serf-1 >= 1.1]) 44687aa0a607SDon Lewis SYSTEM_SERF=YES 44697aa0a607SDon Lewiselse 44707aa0a607SDon Lewis AC_MSG_RESULT([internal]) 44717aa0a607SDon Lewis SYSTEM_SERF=NO 44727aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE SERF" 44737aa0a607SDon Lewisfi 44747aa0a607SDon LewisAC_SUBST(SYSTEM_SERF) 44757aa0a607SDon LewisAC_SUBST(SERF_CFLAGS) 44767aa0a607SDon LewisAC_SUBST(SERF_LIBS) 44777aa0a607SDon Lewis 44787aa0a607SDon Lewis 44797aa0a607SDon Lewisdnl =================================================================== 44807aa0a607SDon Lewisdnl Check for CoinMP 44817aa0a607SDon Lewisdnl =================================================================== 44827aa0a607SDon LewisENABLE_COINMP= 44837aa0a607SDon LewisSYSTEM_COINMP=NO 44847aa0a607SDon LewisCOINMP_CFLAGS= 44857aa0a607SDon LewisCOINMP_LIBS= 44867aa0a607SDon LewisAC_MSG_CHECKING([whether to enable support for CoinMP]) 44877aa0a607SDon Lewisif test "x$enable_coinmp" = "xyes"; then 44887aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE COINMP" 44897aa0a607SDon Lewis AC_MSG_RESULT([yes]) 44907aa0a607SDon Lewis ENABLE_COINMP=YES 44917aa0a607SDon Lewis 44927aa0a607SDon Lewis dnl Check wether to use system or internal CoinMP 44937aa0a607SDon Lewis AC_MSG_CHECKING([which coinmp to use]) 44947aa0a607SDon Lewis if test "x$with_system_coinmp" = "xyes" -o -n "$with_system_libs"; then 44957aa0a607SDon Lewis AC_MSG_RESULT([system]) 44967aa0a607SDon Lewis PKG_CHECK_MODULES([COINMP], [coinmp]) 44977aa0a607SDon Lewis SYSTEM_COINMP=YES 44987aa0a607SDon Lewis # some systems need this. Like Ubuntu.... 44997aa0a607SDon Lewis AC_CHECK_LIB(m, floor) 45007aa0a607SDon Lewis AC_CHECK_LIB(dl, dlopen) 45017aa0a607SDon Lewis else 45027aa0a607SDon Lewis AC_MSG_RESULT([internal]) 45037aa0a607SDon Lewis SYSTEM_COINMP=NO 45047aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE COINMP" 45057aa0a607SDon Lewis fi 45067aa0a607SDon Lewiselse 45077aa0a607SDon Lewis AC_MSG_RESULT([no]) 45087aa0a607SDon Lewis ENABLE_COINMP=NO 45097aa0a607SDon Lewisfi 45107aa0a607SDon LewisAC_SUBST(ENABLE_COINMP) 45117aa0a607SDon LewisAC_SUBST(SYSTEM_COINMP) 45127aa0a607SDon LewisAC_SUBST(COINMP_CFLAGS) 45137aa0a607SDon LewisAC_SUBST(COINMP_LIBS) 45147aa0a607SDon Lewis 45157aa0a607SDon Lewis 45167aa0a607SDon Lewisdnl =================================================================== 45177aa0a607SDon Lewisdnl Check for system curl 45187aa0a607SDon Lewisdnl =================================================================== 45197aa0a607SDon Lewisif test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then 45207aa0a607SDon Lewis with_system_curl=yes 45217aa0a607SDon Lewisfi 45227aa0a607SDon LewisAC_MSG_CHECKING([which curl to use]) 45237aa0a607SDon Lewisif test -n "$with_system_curl" -o -n "$with_system_libs" && \ 45247aa0a607SDon Lewis test "$with_system_curl" != "no"; then 45257aa0a607SDon Lewis AC_MSG_RESULT([external]) 45267aa0a607SDon Lewis SYSTEM_CURL=YES 45277aa0a607SDon Lewis 45287aa0a607SDon Lewis AC_PATH_PROG( CURLCONFIG, curl-config) 45297aa0a607SDon Lewis if test -z "$CURLCONFIG"; then 45307aa0a607SDon Lewis AC_MSG_ERROR([install curl to run this script]) 45317aa0a607SDon Lewis fi 45327aa0a607SDon Lewis 45337aa0a607SDon Lewis # check curl version 45347aa0a607SDon Lewis AC_MSG_CHECKING([whether curl is >= 7.13.1]) 45357aa0a607SDon Lewis if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \ 45367aa0a607SDon Lewis "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \ 45377aa0a607SDon Lewis "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then 45387aa0a607SDon Lewis AC_MSG_ERROR([no, you need at least curl 7.13,1]) 45397aa0a607SDon Lewis else 45407aa0a607SDon Lewis AC_MSG_RESULT([yes]) 45417aa0a607SDon Lewis fi 45427aa0a607SDon Lewis CURL_LIBS=`$CURLCONFIG --libs` 45437aa0a607SDon Lewis CURL_CFLAGS=`$CURLCONFIG --cflags` 45447aa0a607SDon Lewiselse 45457aa0a607SDon Lewis AC_MSG_RESULT([internal]) 45467aa0a607SDon Lewis SYSTEM_CURL=NO 45477aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE CURL" 45487aa0a607SDon Lewisfi 45497aa0a607SDon LewisAC_SUBST(SYSTEM_CURL) 45507aa0a607SDon LewisAC_SUBST(CURL_CFLAGS) 45517aa0a607SDon LewisAC_SUBST(CURL_LIBS) 45527aa0a607SDon Lewis 45537aa0a607SDon Lewisdnl =================================================================== 45547aa0a607SDon Lewisdnl Check for system mdds 45557aa0a607SDon Lewisdnl =================================================================== 45567aa0a607SDon LewisAC_MSG_CHECKING([which mdds to use]) 45577aa0a607SDon Lewisif test -n "$with_system_mdds" -o -n "$with_system_headers" && \ 45587aa0a607SDon Lewis test "$with_system_mdds" != "no"; then 45597aa0a607SDon Lewis AC_MSG_RESULT([external]) 45607aa0a607SDon Lewis SYSTEM_MDDS=YES 45617aa0a607SDon Lewis AC_LANG_PUSH([C++]) 45627aa0a607SDon Lewis AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [], 45637aa0a607SDon Lewis [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], []) 45647aa0a607SDon Lewis AC_LANG_POP([C++]) 45657aa0a607SDon Lewiselse 45667aa0a607SDon Lewis AC_MSG_RESULT([internal]) 45677aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE MDDS" 45687aa0a607SDon Lewis SYSTEM_MDDS=NO 45697aa0a607SDon Lewisfi 45707aa0a607SDon LewisAC_SUBST(SYSTEM_MDDS) 45717aa0a607SDon Lewis 45727aa0a607SDon Lewisdnl =================================================================== 45737aa0a607SDon Lewisdnl Check for system boost 45747aa0a607SDon Lewisdnl =================================================================== 45757aa0a607SDon LewisAC_MSG_CHECKING([which boost to use]) 45767aa0a607SDon Lewisif test -n "$with_system_boost" -o -n "$with_system_headers" && \ 45777aa0a607SDon Lewis test "$with_system_boost" != "no"; then 45787aa0a607SDon Lewis AC_MSG_RESULT([external]) 45797aa0a607SDon Lewis SYSTEM_BOOST=YES 45807aa0a607SDon Lewis AC_LANG_PUSH([C++]) 45817aa0a607SDon Lewis AC_CHECK_HEADER(boost/shared_ptr.hpp, [], 45827aa0a607SDon Lewis [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], []) 45837aa0a607SDon Lewis AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [], 45847aa0a607SDon Lewis [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], []) 45857aa0a607SDon Lewis AC_CHECK_HEADER(boost/function.hpp, [], 45867aa0a607SDon Lewis [AC_MSG_ERROR(boost/function.hpp not found. install boost)], []) 45877aa0a607SDon Lewis 45887aa0a607SDon Lewis save_CXXFLAGS=$CXXFLAGS 45897aa0a607SDon Lewis CXXFLAGS="$CXXFLAGS -fno-exceptions" 45907aa0a607SDon Lewis AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions]) 45917aa0a607SDon Lewis AC_TRY_COMPILE([#include <boost/function.hpp> 45927aa0a607SDon Lewis], [], 45937aa0a607SDon Lewis ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes) 45947aa0a607SDon Lewis 45957aa0a607SDon Lewis if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then 45967aa0a607SDon Lewis AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131]) 45977aa0a607SDon Lewis else 45987aa0a607SDon Lewis AC_MSG_RESULT([yes]) 45997aa0a607SDon Lewis fi 46007aa0a607SDon Lewis CXXFLAGS=$save_CXXFLAGS 46017aa0a607SDon Lewis AC_LANG_POP([C++]) 46027aa0a607SDon Lewiselse 46037aa0a607SDon Lewis AC_MSG_RESULT([internal]) 46047aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE BOOST" 46057aa0a607SDon Lewis SYSTEM_BOOST=NO 46067aa0a607SDon Lewisfi 46077aa0a607SDon LewisAC_SUBST(SYSTEM_BOOST) 46087aa0a607SDon Lewis 46097aa0a607SDon Lewisdnl =================================================================== 46107aa0a607SDon Lewisdnl Check for system vigra 46117aa0a607SDon Lewisdnl =================================================================== 46127aa0a607SDon LewisAC_MSG_CHECKING([which vigra to use]) 46137aa0a607SDon Lewisif test -n "$with_system_vigra" -o -n "$with_system_headers" && \ 46147aa0a607SDon Lewis test "$with_system_vigra" != "no"; then 46157aa0a607SDon Lewis AC_MSG_RESULT([external]) 46167aa0a607SDon Lewis SYSTEM_VIGRA=YES 46177aa0a607SDon Lewis AC_LANG_PUSH([C++]) 46187aa0a607SDon Lewis AC_CHECK_HEADER(vigra/copyimage.hxx, [], 46197aa0a607SDon Lewis [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], []) 46207aa0a607SDon Lewis AC_LANG_POP([C++]) 46217aa0a607SDon Lewiselse 46227aa0a607SDon Lewis AC_MSG_RESULT([internal]) 46237aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE VIGRA" 46247aa0a607SDon Lewis SYSTEM_VIGRA=NO 46257aa0a607SDon Lewisfi 46267aa0a607SDon LewisAC_SUBST(SYSTEM_VIGRA) 46277aa0a607SDon Lewis 46287aa0a607SDon Lewisdnl =================================================================== 46297aa0a607SDon Lewisdnl Check for system odbc 46307aa0a607SDon Lewisdnl =================================================================== 46317aa0a607SDon LewisAC_MSG_CHECKING([which odbc headers to use]) 46327aa0a607SDon Lewisif test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \ 46337aa0a607SDon Lewis test "$with_system_odbc_headers" != "no"; then 46347aa0a607SDon Lewis AC_MSG_RESULT([external]) 46357aa0a607SDon Lewis SYSTEM_ODBC_HEADERS=YES 46367aa0a607SDon Lewis 46377aa0a607SDon Lewis AC_CHECK_HEADER(sqlext.h, [], 46387aa0a607SDon Lewis [AC_MSG_ERROR(odbc not found. install odbc)], []) 46397aa0a607SDon Lewiselse 46407aa0a607SDon Lewis AC_MSG_RESULT([internal]) 46417aa0a607SDon Lewis SYSTEM_ODBC_HEADERS=NO 46427aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE UNIXODBC" 46437aa0a607SDon Lewisfi 46447aa0a607SDon LewisAC_SUBST(SYSTEM_ODBC_HEADERS) 46457aa0a607SDon Lewis 46467aa0a607SDon LewisAC_MSG_CHECKING([whether to build XML Security support]) 46477aa0a607SDon Lewisif test "$enable_nss_module" = "no"; then 46487aa0a607SDon Lewis AC_MSG_RESULT([no, since NSS disabled but needed]) 46497aa0a607SDon Lewiselse 46507aa0a607SDon Lewis AC_MSG_RESULT([yes]) 46517aa0a607SDon Lewisfi 46527aa0a607SDon Lewis 46537aa0a607SDon LewisAC_MSG_CHECKING([whether to build LDAP configuration backend]) 46547aa0a607SDon Lewisif test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then 46557aa0a607SDon Lewis if test "$with_openldap" = "yes"; then 46567aa0a607SDon Lewis AC_MSG_RESULT([yes]) 46577aa0a607SDon Lewis WITH_LDAP=YES 46587aa0a607SDon Lewis else 46597aa0a607SDon Lewis WITH_LDAP=NO 46607aa0a607SDon Lewis fi 46617aa0a607SDon Lewiselse 46627aa0a607SDon Lewis AC_MSG_RESULT([no]) 46637aa0a607SDon Lewis WITH_LDAP=NO 46647aa0a607SDon Lewisfi 46657aa0a607SDon Lewis 46667aa0a607SDon Lewisif test "$WITH_LDAP" = "YES"; then 46677aa0a607SDon Lewis dnl =================================================================== 46687aa0a607SDon Lewis dnl Test whether we want to use the OpenLDAP LDAP SDK 46697aa0a607SDon Lewis dnl =================================================================== 46707aa0a607SDon Lewis AC_MSG_CHECKING([which LDAP SDK to use]) 46717aa0a607SDon Lewis if test -n "$with_openldap" && test "$with_openldap" != "no"; then 46727aa0a607SDon Lewis AC_MSG_RESULT([OpenLDAP]) 46737aa0a607SDon Lewis WITH_OPENLDAP=YES 46747aa0a607SDon Lewis AC_CHECK_HEADERS(ldap.h, [], 46757aa0a607SDon Lewis [AC_MSG_ERROR(ldap.h not found. install openldap libs)], []) 46767aa0a607SDon Lewis AC_CHECK_LIB(ldap, ldap_simple_bind_s, [], 46777aa0a607SDon Lewis [AC_MSG_ERROR(openldap lib not found or functional)], []) 46787aa0a607SDon Lewis # rumours say that OpenLDAP doesn't have that function. I looked and 46797aa0a607SDon Lewis # it has it. Test for it to be sure 46807aa0a607SDon Lewis AC_CHECK_LIB(ldap, ldap_set_option, [], 46817aa0a607SDon Lewis [AC_MSG_ERROR(openldap lib not found or functional)], []) 46827aa0a607SDon Lewis fi 46837aa0a607SDon Lewisfi 46847aa0a607SDon LewisAC_SUBST(WITH_LDAP) 46857aa0a607SDon LewisAC_SUBST(WITH_OPENLDAP) 46867aa0a607SDon Lewis 46877aa0a607SDon LewisAC_MSG_CHECKING([whether to build the internal NSS module]) 46887aa0a607SDon Lewisif test "$enable_nss_module" != "no"; then 46897aa0a607SDon Lewis ENABLE_NSS_MODULE="YES" 46907aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE NSS" 46917aa0a607SDon Lewis AC_MSG_RESULT([yes]) 46927aa0a607SDon Lewis if test "$_os" = "WINNT"; then 46937aa0a607SDon Lewis AC_MSG_CHECKING([for Mozilla build tooling]) 46947aa0a607SDon Lewis if test -z "$MOZILLABUILD" ; then 46957aa0a607SDon LewisAC_MSG_ERROR([ 46967aa0a607SDon LewisMozilla build tooling not found! 46977aa0a607SDon Lewis It is required for NSS that is needed for AOO's security facilities. 46987aa0a607SDon Lewis Either disable NSS using the option --disable-nss-module 46997aa0a607SDon Lewis or use the --with-mozilla-build option after installing the tool obtained 47007aa0a607SDon Lewis from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32]) 47017aa0a607SDon Lewis else 47027aa0a607SDon Lewis if test \( "$WITH_MINGWIN" = "yes" \) ; then 47037aa0a607SDon Lewis if test ! -d "$MOZILLABUILD" ; then 47047aa0a607SDon LewisAC_MSG_ERROR([Mozilla build tooling incomplete!]) 47057aa0a607SDon Lewis else 47067aa0a607SDon Lewis AC_MSG_RESULT([ok]) 47077aa0a607SDon Lewis fi 47087aa0a607SDon Lewis else 470918079e30SMatthias Seidel if test ! -d "$MOZILLABUILD/msys" ; then 47107aa0a607SDon LewisAC_MSG_ERROR([Mozilla build tooling incomplete!]) 47117aa0a607SDon Lewis else 47127aa0a607SDon Lewis AC_MSG_RESULT([ok]) 47137aa0a607SDon Lewis fi 47147aa0a607SDon Lewis fi 47157aa0a607SDon Lewis fi 47167aa0a607SDon Lewis fi 47177aa0a607SDon Lewiselse 47187aa0a607SDon Lewis ENABLE_NSS_MODULE="NO" 47197aa0a607SDon Lewis AC_MSG_RESULT([no]) 47207aa0a607SDon Lewisfi 47217aa0a607SDon Lewis 47227aa0a607SDon LewisAC_SUBST(ENABLE_NSS_MODULE) 47237aa0a607SDon LewisAC_SUBST(MOZILLABUILD) 47247aa0a607SDon LewisAC_SUBST(MOZ_INC) 47257aa0a607SDon Lewis 47267aa0a607SDon Lewisdnl =================================================================== 47277aa0a607SDon Lewisdnl Check for system sane 47287aa0a607SDon Lewisdnl =================================================================== 47297aa0a607SDon LewisAC_MSG_CHECKING([which sane header to use]) 47307aa0a607SDon Lewisif test -n "$with_system_sane_header" -o -n "$with_system_headers" && \ 47317aa0a607SDon Lewis test "$with_system_sane_header" != "no"; then 47327aa0a607SDon Lewis AC_MSG_RESULT([external]) 47337aa0a607SDon Lewis SYSTEM_SANE_HEADER=YES 47347aa0a607SDon Lewis AC_CHECK_HEADER(sane/sane.h, [], 47357aa0a607SDon Lewis [AC_MSG_ERROR(sane not found. install sane)], []) 47367aa0a607SDon Lewiselse 47377aa0a607SDon Lewis AC_MSG_RESULT([internal]) 47387aa0a607SDon Lewis SYSTEM_SANE_HEADER=NO 47397aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE SANE" 47407aa0a607SDon Lewisfi 47417aa0a607SDon LewisAC_SUBST(SYSTEM_SANE_HEADER) 47427aa0a607SDon Lewis 47437aa0a607SDon Lewisdnl =================================================================== 47447aa0a607SDon Lewisdnl Check for system icu 47457aa0a607SDon Lewisdnl =================================================================== 47467aa0a607SDon LewisAC_MSG_CHECKING([which icu to use]) 47477aa0a607SDon Lewisif test -n "$with_system_icu" -o -n "$with_system_libs" && \ 47487aa0a607SDon Lewis test "$with_system_icu" != "no"; then 47497aa0a607SDon Lewis AC_MSG_RESULT([external]) 47507aa0a607SDon Lewis SYSTEM_ICU=YES 47517aa0a607SDon Lewis AC_LANG_PUSH([C++]) 47527aa0a607SDon Lewis AC_MSG_CHECKING([for unicode/rbbi.h]) 47537aa0a607SDon Lewis AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.])) 47547aa0a607SDon Lewis AC_LANG_POP([C++]) 47557aa0a607SDon Lewis AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin]) 47567aa0a607SDon Lewis if test -z "$SYSTEM_GENBRK"; then 47577aa0a607SDon Lewis AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\]) 47587aa0a607SDon Lewis fi 47597aa0a607SDon Lewis AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin]) 47607aa0a607SDon Lewis if test -z "$SYSTEM_GENCCODE"; then 47617aa0a607SDon Lewis AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\]) 47627aa0a607SDon Lewis fi 47637aa0a607SDon Lewis AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin]) 47647aa0a607SDon Lewis if test -z "$SYSTEM_GENCMN"; then 47657aa0a607SDon Lewis AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\]) 47667aa0a607SDon Lewis fi 47677aa0a607SDon Lewis 47687aa0a607SDon Lewis AC_PATH_PROG( ICUCONFIG, icu-config) 47697aa0a607SDon Lewis AC_MSG_CHECKING([ICU version]) 47707aa0a607SDon Lewis if test "$_os" = "OS2"; then 47717aa0a607SDon Lewis ICU_MAJOR=4 47727aa0a607SDon Lewis else 47737aa0a607SDon Lewis ICU_VERSION=`$ICUCONFIG --version` 47747aa0a607SDon Lewis ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` 47757aa0a607SDon Lewis ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` 47767aa0a607SDon Lewis ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` 47777aa0a607SDon Lewis fi 47787aa0a607SDon Lewis 47797aa0a607SDon Lewis if test "$ICU_MAJOR" -ge "4"; then 47807aa0a607SDon Lewis AC_MSG_RESULT([OK]) 47817aa0a607SDon Lewis else 47827aa0a607SDon Lewis AC_MSG_ERROR([not suitable, only >= 4.0 supported currently]) 47837aa0a607SDon Lewis fi 47847aa0a607SDon Lewis 47857aa0a607SDon Lewiselse 47867aa0a607SDon Lewis AC_MSG_RESULT([internal]) 47877aa0a607SDon Lewis SYSTEM_ICU=NO 47887aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE ICU" 47897aa0a607SDon Lewisfi 47907aa0a607SDon LewisAC_SUBST(SYSTEM_ICU) 47917aa0a607SDon LewisAC_SUBST(SYSTEM_GENBRK) 47927aa0a607SDon LewisAC_SUBST(SYSTEM_GENCCODE) 47937aa0a607SDon LewisAC_SUBST(SYSTEM_GENCMN) 47947aa0a607SDon LewisAC_SUBST(ICU_MAJOR) 47957aa0a607SDon LewisAC_SUBST(ICU_MINOR) 47967aa0a607SDon LewisAC_SUBST(ICU_MICRO) 47977aa0a607SDon Lewis 47987aa0a607SDon Lewisdnl =================================================================== 47997aa0a607SDon Lewisdnl Graphite 48007aa0a607SDon Lewisdnl =================================================================== 48017aa0a607SDon Lewis 48027aa0a607SDon LewisENABLE_GRAPHITE="FALSE" 48037aa0a607SDon LewisAC_MSG_CHECKING([whether to enable graphite support]) 48047aa0a607SDon Lewisif test "x$enable_graphite" = "xyes" -a \( "$_os" = "WINNT" -o "$_os" = "Linux" -o "$_os" = "FreeBSD" \) ; then 48057aa0a607SDon Lewis AC_MSG_RESULT([yes]) 48067aa0a607SDon Lewis ENABLE_GRAPHITE="TRUE" 48077aa0a607SDon Lewis AC_MSG_CHECKING([which graphite to use]) 48087aa0a607SDon Lewis if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ 48097aa0a607SDon Lewis test "$with_system_graphite" != "no"; then 48107aa0a607SDon Lewis AC_MSG_RESULT([external]) 48117aa0a607SDon Lewis SYSTEM_GRAPHITE=YES 48127aa0a607SDon Lewis PKG_CHECK_MODULES( GRAPHITE, silgraphite ) 48137aa0a607SDon Lewis else 48147aa0a607SDon Lewis AC_MSG_RESULT([internal]) 48157aa0a607SDon Lewis SYSTEM_GRAPHITE=NO 48167aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE GRAPHITE" 48177aa0a607SDon Lewis fi 48187aa0a607SDon Lewiselse 48197aa0a607SDon Lewis AC_MSG_RESULT([no]) 48207aa0a607SDon Lewis ENABLE_GRAPHITE="FALSE" 48217aa0a607SDon Lewisfi 48227aa0a607SDon LewisAC_SUBST(ENABLE_GRAPHITE) 48237aa0a607SDon LewisAC_SUBST(SYSTEM_GRAPHITE) 48247aa0a607SDon LewisAC_SUBST(GRAPHITE_LIBS) 48257aa0a607SDon LewisAC_SUBST(GRAPHITE_CFLAGS) 48267aa0a607SDon Lewis 48277aa0a607SDon Lewis 48287aa0a607SDon Lewisdnl =================================================================== 48297aa0a607SDon Lewisdnl Checks for libraries. 48307aa0a607SDon Lewisdnl =================================================================== 48317aa0a607SDon Lewisdnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported 48327aa0a607SDon Lewisdnl See if we have the AppKit framework for building with Quartz graphics. 48337aa0a607SDon Lewis 48347aa0a607SDon Lewisif test "$_os" = "Darwin"; then 48357aa0a607SDon Lewis if test "x$with_x" = "xyes"; then 48367aa0a607SDon Lewis AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build]) 48377aa0a607SDon Lewis else 48387aa0a607SDon Lewis AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework]) 48397aa0a607SDon Lewis if test -d "/System/Library/Frameworks/AppKit.framework/"; then 48407aa0a607SDon Lewis AC_MSG_RESULT([yes]) 48417aa0a607SDon Lewis x_includes="no_x_includes" 48427aa0a607SDon Lewis x_libraries="no_x_libraries" 48437aa0a607SDon Lewis dnl disable some things used on other Unix versions but not on the aqua build 48447aa0a607SDon Lewis enable_gtk=no 48457aa0a607SDon Lewis enable_cups=no 48467aa0a607SDon Lewis ENABLE_CUPS="" 48477aa0a607SDon Lewis AC_SUBST(ENABLE_CUPS) 48487aa0a607SDon Lewis else 48497aa0a607SDon Lewis AC_MSG_ERROR([No AppKit.framewrok found]) 48507aa0a607SDon Lewis fi 48517aa0a607SDon Lewis fi 48527aa0a607SDon Lewisfi 48537aa0a607SDon Lewis 48547aa0a607SDon Lewisdnl *************************************** 48557aa0a607SDon Lewisdnl testing for X libraries and includes... 48567aa0a607SDon Lewisdnl *************************************** 48577aa0a607SDon Lewisif test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then 48587aa0a607SDon Lewis echo "Do Nothing for _os = Darwin" 48597aa0a607SDon Lewis dnl Mac OS X using Aqua graphics. Don't check for X11. 48607aa0a607SDon Lewis : 48617aa0a607SDon Lewiselif test "$_os" = "OS2" ; then 48627aa0a607SDon Lewis echo "Do Nothing for _os = OS2. Don't check for X11." 48637aa0a607SDon Lewis dnl OS/2 uses native graphics. Don't check for X11. 48647aa0a607SDon Lewis : 48657aa0a607SDon Lewiselif test "$_os" != "WINNT" ; then 48667aa0a607SDon Lewis AC_PATH_X 48677aa0a607SDon Lewis AC_PATH_XTRA 48687aa0a607SDon Lewis CPPFLAGS="$CPPFLAGS $X_CFLAGS" 48697aa0a607SDon Lewis 48707aa0a607SDon Lewis if test "x$x_includes" = "x"; then 48717aa0a607SDon Lewis x_includes="default_x_includes" 48727aa0a607SDon Lewis fi 48737aa0a607SDon Lewis if test "x$x_libraries" = "x"; then 48747aa0a607SDon Lewis x_libraries="default_x_libraries" 48757aa0a607SDon Lewis fi 48767aa0a607SDon Lewis dnl The variables $x_libraries and $x_includes are set. 48777aa0a607SDon Lewis if test -z "$x_libraries"; then 48787aa0a607SDon Lewis AC_MSG_ERROR([No X libraries found]) # Exit 48797aa0a607SDon Lewis fi 48807aa0a607SDon Lewis if test -z "$x_includes"; then 48817aa0a607SDon Lewis AC_MSG_ERROR([No X includes found]) # Exit 48827aa0a607SDon Lewis fi 48837aa0a607SDon Lewis CFLAGS=$X_CFLAGS 48847aa0a607SDon Lewis LDFLAGS="$X_LDFLAGS $X_LIBS" 48857aa0a607SDon Lewis AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])]) 48867aa0a607SDon Lewis dnl Check if the XauDisposeAuth symbol is provided by libXau. 48877aa0a607SDon Lewis AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", []) 48887aa0a607SDon Lewiselse 48897aa0a607SDon Lewis x_includes="no_x_includes" 48907aa0a607SDon Lewis x_libraries="no_x_libraries" 48917aa0a607SDon Lewisfi 48927aa0a607SDon Lewisif test -z "$x_includes"; then 48937aa0a607SDon Lewis x_includes="no_x_includes" 48947aa0a607SDon Lewisfi 48957aa0a607SDon Lewisif test -z "$x_libraries"; then 48967aa0a607SDon Lewis x_libraries="no_x_libraries" 48977aa0a607SDon Lewisfi 48987aa0a607SDon Lewisif test "$x_includes" = "default_x_includes"; then 48997aa0a607SDon Lewis XINC="/usr/include" 49007aa0a607SDon Lewiselse 49017aa0a607SDon Lewis XINC="$x_includes" 49027aa0a607SDon Lewisfi 49037aa0a607SDon LewisAC_SUBST(XINC) 49047aa0a607SDon Lewisif test "$x_libraries" = "default_x_libraries"; then 49057aa0a607SDon Lewis XLIB=`$PKG_CONFIG --variable=libdir x11` 49067aa0a607SDon Lewis if test "x$XLIB" = x; then 49077aa0a607SDon Lewis XLIB="/usr/lib" 49087aa0a607SDon Lewis fi 49097aa0a607SDon Lewiselse 49107aa0a607SDon Lewis XLIB="$x_libraries" 49117aa0a607SDon Lewisfi 49127aa0a607SDon LewisAC_SUBST(XLIB) 49137aa0a607SDon LewisAC_SUBST(XAU_LIBS) 49147aa0a607SDon Lewis 49157aa0a607SDon Lewisdnl =================================================================== 49167aa0a607SDon Lewisdnl Check if fontconfig/fontconfig.h is available 49177aa0a607SDon Lewisdnl =================================================================== 49187aa0a607SDon Lewisif test "$ENABLE_FONTCONFIG" = "TRUE" ; then 49197aa0a607SDon Lewis AC_CHECK_HEADER(fontconfig/fontconfig.h, [], 49207aa0a607SDon Lewis [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], []) 49217aa0a607SDon Lewis AC_MSG_CHECKING([whether fontconfig is >= 2.2.0]) 49227aa0a607SDon Lewis AC_TRY_RUN([ 49237aa0a607SDon Lewis#include <fontconfig/fontconfig.h> 49247aa0a607SDon Lewis 49257aa0a607SDon Lewisint main(int argc, char **argv) { 49267aa0a607SDon Lewis if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0; 49277aa0a607SDon Lewis else return 1; 49287aa0a607SDon Lewis} 49297aa0a607SDon Lewis], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])]) 49307aa0a607SDon Lewisfi 49317aa0a607SDon Lewis 49327aa0a607SDon Lewisdnl =================================================================== 49337aa0a607SDon Lewisdnl Check for system Xrender 49347aa0a607SDon Lewisdnl =================================================================== 49357aa0a607SDon LewisAC_MSG_CHECKING([whether to link to Xrender]) 49367aa0a607SDon Lewisif test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then 49377aa0a607SDon Lewis AC_MSG_RESULT([yes]) 49387aa0a607SDon Lewis XRENDER_LINK=YES 49397aa0a607SDon Lewis with_system_xrender_headers=yes 49407aa0a607SDon Lewiselse 49417aa0a607SDon Lewis AC_MSG_RESULT([no, dynamically open it]) 49427aa0a607SDon Lewis XRENDER_LINK=NO 49437aa0a607SDon Lewisfi 49447aa0a607SDon LewisAC_MSG_CHECKING([which Xrender headers to use]) 49457aa0a607SDon Lewisif test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \ 49467aa0a607SDon Lewis test "$with_system_xrender_headers" != "no"; then 49477aa0a607SDon Lewis AC_MSG_RESULT([external]) 49487aa0a607SDon Lewis SYSTEM_XRENDER_HEADERS=YES 49497aa0a607SDon Lewis AC_CHECK_HEADER(X11/extensions/Xrender.h, [], 49507aa0a607SDon Lewis [AC_MSG_ERROR(Xrender not found. install X)], []) 49517aa0a607SDon Lewiselse 49527aa0a607SDon Lewis AC_MSG_RESULT([internal]) 49537aa0a607SDon Lewis SYSTEM_XRENDER_HEADERS=NO 49547aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" 49557aa0a607SDon Lewisfi 49567aa0a607SDon Lewisif test "$XRENDER_LINK" = "YES"; then 49577aa0a607SDon Lewis AC_CHECK_LIB(Xrender, XRenderQueryVersion, [], 49587aa0a607SDon Lewis [AC_MSG_ERROR(libXrender not found or functional)], []) 49597aa0a607SDon Lewisfi 49607aa0a607SDon LewisAC_SUBST(SYSTEM_XRENDER_HEADERS) 49617aa0a607SDon LewisAC_SUBST(XRENDER_LINK) 49627aa0a607SDon Lewis 49637aa0a607SDon Lewisdnl =================================================================== 49647aa0a607SDon Lewisdnl Check for XRandr 49657aa0a607SDon Lewisdnl =================================================================== 49667aa0a607SDon LewisAC_MSG_CHECKING([whether to enable RandR support]) 49677aa0a607SDon Lewisif test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then 49687aa0a607SDon Lewis if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then 49697aa0a607SDon Lewis XRANDR_DLOPEN="TRUE" 49707aa0a607SDon Lewis AC_MSG_RESULT([resorting to dlopen libXrandr at runtime]) 49717aa0a607SDon Lewis else 49727aa0a607SDon Lewis XRANDR_DLOPEN="FALSE" 49737aa0a607SDon Lewis PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="") 49747aa0a607SDon Lewis if test "$ENABLE_RANDR" != "TRUE"; then 49757aa0a607SDon Lewis AC_CHECK_HEADER(X11/extensions/Xrandr.h, [], 49767aa0a607SDon Lewis [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], []) 49777aa0a607SDon Lewis XRANDR_CFLAGS=" " 49787aa0a607SDon Lewis AC_CHECK_LIB(Xrandr, XRRQueryExtension, [], 49797aa0a607SDon Lewis [ AC_MSG_ERROR(libXrandr not found or functional) ], []) 49807aa0a607SDon Lewis XRANDR_LIBS="-lXrandr " 49817aa0a607SDon Lewis ENABLE_RANDR="TRUE" 49827aa0a607SDon Lewis AC_MSG_RESULT([enabling RandR support]) 49837aa0a607SDon Lewis fi 49847aa0a607SDon Lewis fi 49857aa0a607SDon Lewiselse 49867aa0a607SDon Lewis ENABLE_RANDR="" 49877aa0a607SDon Lewis AC_MSG_RESULT([no]) 49887aa0a607SDon Lewisfi 49897aa0a607SDon LewisAC_SUBST(XRANDR_DLOPEN) 49907aa0a607SDon LewisAC_SUBST(XRANDR_CFLAGS) 49917aa0a607SDon LewisAC_SUBST(XRANDR_LIBS) 49927aa0a607SDon LewisAC_SUBST(ENABLE_RANDR) 49937aa0a607SDon Lewis 49947aa0a607SDon Lewisdnl =================================================================== 49957aa0a607SDon Lewisdnl Check for system nss 49967aa0a607SDon Lewisdnl =================================================================== 49977aa0a607SDon LewisAC_MSG_CHECKING([which libnss to use]) 49987aa0a607SDon Lewisif test -n "$with_system_nss" -o -n "$with_system_libs" && test "$with_system_nss" != "no"; then 49997aa0a607SDon Lewis AC_MSG_RESULT([external]) 50007aa0a607SDon Lewis PKG_CHECK_MODULES( NSS, nss ) 50017aa0a607SDon Lewis SYSTEM_NSS=YES 50027aa0a607SDon Lewiselse 50037aa0a607SDon Lewis AC_MSG_RESULT([internal]) 50047aa0a607SDon Lewis SYSTEM_NSS=NO 50057aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE NSS" 50067aa0a607SDon Lewisfi 50077aa0a607SDon LewisAC_SUBST(SYSTEM_NSS) 50087aa0a607SDon LewisAC_SUBST(NSS_CFLAGS) 50097aa0a607SDon LewisAC_SUBST(NSS_LIBS) 50107aa0a607SDon Lewis 50117aa0a607SDon Lewisdnl =================================================================== 50127aa0a607SDon Lewisdnl Check for system openssl 50137aa0a607SDon Lewisdnl =================================================================== 50147aa0a607SDon Lewisif test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then 50157aa0a607SDon Lewis with_system_openssl=yes 50167aa0a607SDon Lewisfi 50177aa0a607SDon LewisAC_MSG_CHECKING([which libssl to use]) 50187aa0a607SDon Lewisif test -n "$with_system_openssl" -o -n "$with_system_libs" && \ 50197aa0a607SDon Lewis test "$with_system_openssl" != "no"; then 50207aa0a607SDon Lewis AC_MSG_RESULT([external]) 50210986a24cSArrigo Marchiori if test "$_os" = "FreeBSD"; then 50227aa0a607SDon Lewis OPENSSL_CFLAGS= 50237aa0a607SDon Lewis OPENSSL_LIBS="-lssl -lcrypto" 50247aa0a607SDon Lewis else 50257aa0a607SDon Lewis PKG_CHECK_MODULES( OPENSSL, openssl ) 50267aa0a607SDon Lewis fi 50277aa0a607SDon Lewis SYSTEM_OPENSSL=YES 50287aa0a607SDon Lewiselse 50297aa0a607SDon Lewis AC_MSG_RESULT([internal]) 50307aa0a607SDon Lewis SYSTEM_OPENSSL=NO 50317aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE OPENSSL" 50327aa0a607SDon Lewisfi 50337aa0a607SDon LewisAC_SUBST(SYSTEM_OPENSSL) 50347aa0a607SDon LewisAC_SUBST(OPENSSL_CFLAGS) 50357aa0a607SDon LewisAC_SUBST(OPENSSL_LIBS) 50367aa0a607SDon Lewis 50377aa0a607SDon Lewisdnl =================================================================== 50387aa0a607SDon Lewisdnl Check for system redland 50397aa0a607SDon Lewisdnl =================================================================== 50407aa0a607SDon LewisAC_MSG_CHECKING([which redland library to use]) 50417aa0a607SDon Lewisif test -n "$with_system_redland" -o -n "$with_system_libs" && \ 50427aa0a607SDon Lewis test "$with_system_redland" != "no"; then 50437aa0a607SDon Lewis AC_MSG_RESULT([external]) 50447aa0a607SDon Lewis SYSTEM_REDLAND=YES 50457aa0a607SDon Lewis dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base) 50467aa0a607SDon Lewis PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8) 50477aa0a607SDon Lewiselse 50487aa0a607SDon Lewis AC_MSG_RESULT([internal]) 50497aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE REDLAND" 50507aa0a607SDon Lewis SYSTEM_REDLAND=NO 50517aa0a607SDon Lewisfi 50527aa0a607SDon LewisAC_SUBST(SYSTEM_REDLAND) 50537aa0a607SDon LewisAC_SUBST(REDLAND_CFLAGS) 50547aa0a607SDon LewisAC_SUBST(REDLAND_LIBS) 50557aa0a607SDon Lewis 50567aa0a607SDon Lewisdnl =================================================================== 50577aa0a607SDon Lewisdnl Check for hunspell 50587aa0a607SDon Lewisdnl =================================================================== 50597aa0a607SDon LewisAC_MSG_CHECKING([whether to build the Spell Checking component]) 50607aa0a607SDon LewisENABLE_HUNSPELL= 50617aa0a607SDon Lewis 50627aa0a607SDon Lewisif test "x$enable_hunspell" != "xno" ; then 50637aa0a607SDon Lewis AC_MSG_CHECKING([which libhunspell to use]) 50647aa0a607SDon Lewis if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ 50657aa0a607SDon Lewis test "$with_system_hunspell" != "no"; then 50667aa0a607SDon Lewis AC_MSG_RESULT([external]) 50677aa0a607SDon Lewis SYSTEM_HUNSPELL=YES 50687aa0a607SDon Lewis AC_LANG_PUSH([C++]) 50697aa0a607SDon Lewis PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" ) 50707aa0a607SDon Lewis if test "$HUNSPELL_PC" != "TRUE"; then 50717aa0a607SDon Lewis AC_CHECK_HEADER(hunspell.hxx, [], 50727aa0a607SDon Lewis [AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ], 50737aa0a607SDon Lewis [AC_MSG_ERROR(hunspell headers not found.)], []) 50747aa0a607SDon Lewis ], []) 50757aa0a607SDon Lewis AC_CHECK_LIB(hunspell, main, [], 50767aa0a607SDon Lewis [ AC_MSG_ERROR(hunspell library not found.) ], []) 50777aa0a607SDon Lewis HUNSPELL_LIBS=-lhunspell 50787aa0a607SDon Lewis fi 50797aa0a607SDon Lewis AC_LANG_POP([C++]) 50807aa0a607SDon Lewis else 50817aa0a607SDon Lewis AC_MSG_RESULT([internal]) 50827aa0a607SDon Lewis SYSTEM_HUNSPELL=NO 50837aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE HUNSPELL" 50847aa0a607SDon Lewis fi 50857aa0a607SDon Lewis ENABLE_HUNSPELL=YES 50867aa0a607SDon Lewis AC_SUBST(SYSTEM_HUNSPELL) 50877aa0a607SDon Lewis AC_SUBST(HUNSPELL_CFLAGS) 50887aa0a607SDon Lewis AC_SUBST(HUNSPELL_LIBS) 50897aa0a607SDon Lewiselse 50907aa0a607SDon Lewis AC_MSG_RESULT([no]) 50917aa0a607SDon Lewisfi 50927aa0a607SDon LewisAC_SUBST(ENABLE_HUNSPELL) 50937aa0a607SDon Lewis 50947aa0a607SDon Lewisdnl =================================================================== 50957aa0a607SDon Lewisdnl Checking for libhyphen 50967aa0a607SDon Lewisdnl =================================================================== 50977aa0a607SDon LewisAC_MSG_CHECKING([whether to build the Hyphenator component]) 50987aa0a607SDon LewisENABLE_HYPHEN= 50997aa0a607SDon Lewis 51007aa0a607SDon Lewisif test "x$enable_hyphen" != "xno" ; then 51017aa0a607SDon Lewis AC_MSG_CHECKING([which libhyphen to use]) 51027aa0a607SDon Lewis if test -n "$with_system_hyphen" -o -n "$with_system_libs" && \ 51037aa0a607SDon Lewis test "$with_system_hyphen" != "no"; then 51047aa0a607SDon Lewis AC_MSG_RESULT([external]) 51057aa0a607SDon Lewis SYSTEM_HYPH=YES 51067aa0a607SDon Lewis AC_CHECK_HEADER(hyphen.h, [], 51077aa0a607SDon Lewis [ AC_MSG_ERROR(libhyphen headers not found.)], []) 51087aa0a607SDon Lewis AC_CHECK_MEMBER(struct _HyphenDict.cset, [], 51097aa0a607SDon Lewis [ AC_MSG_ERROR(no. You are sure you have libhyphen headers?)], 51107aa0a607SDon Lewis [#include <hyphen.h>]) 51117aa0a607SDon Lewis AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen], 51127aa0a607SDon Lewis [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 51137aa0a607SDon Lewis if test -z "$HYPHEN_LIB"; then 51147aa0a607SDon Lewis AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph], 51157aa0a607SDon Lewis [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 51167aa0a607SDon Lewis fi 51177aa0a607SDon Lewis if test -z "$HYPHEN_LIB"; then 51187aa0a607SDon Lewis AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj], 51197aa0a607SDon Lewis [ AC_MSG_ERROR(libhyphen not found or too old.)], []) 51207aa0a607SDon Lewis fi 51217aa0a607SDon Lewis else 51227aa0a607SDon Lewis AC_MSG_RESULT([internal]) 51237aa0a607SDon Lewis SYSTEM_HYPH=NO 51247aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE HYPHEN" 51257aa0a607SDon Lewis fi 51267aa0a607SDon Lewis ENABLE_HYPHEN=YES 51277aa0a607SDon Lewis AC_SUBST(SYSTEM_HYPH) 51287aa0a607SDon Lewis AC_SUBST(HYPHEN_LIB) 51297aa0a607SDon Lewiselse 51307aa0a607SDon Lewis AC_MSG_RESULT([no]) 51317aa0a607SDon Lewisfi 51327aa0a607SDon LewisAC_SUBST(ENABLE_HYPHEN) 51337aa0a607SDon Lewis 51347aa0a607SDon Lewis 51357aa0a607SDon Lewis#dnl =================================================================== 51367aa0a607SDon Lewis#dnl Check whether we are allowed to bundle dictionaries and whether 51377aa0a607SDon Lewis#dnl hunspell is available. 51387aa0a607SDon Lewis#dnl =================================================================== 51397aa0a607SDon LewisENABLE_BUNDLED_DICTIONARIES= 51407aa0a607SDon Lewisif test "x$enable_bundled_dictionaries" != "xno" -a "x$ENABLE_HUNSPELL" = "xYES"; then 51417aa0a607SDon Lewis ENABLE_BUNDLED_DICTIONARIES=YES 51427aa0a607SDon Lewisfi 51437aa0a607SDon LewisAC_SUBST(ENABLE_BUNDLED_DICTIONARIES) 51447aa0a607SDon Lewis 51457aa0a607SDon Lewis 51467aa0a607SDon Lewis 51477aa0a607SDon Lewisdnl =================================================================== 51487aa0a607SDon Lewisdnl Checking for mythes 51497aa0a607SDon Lewisdnl =================================================================== 51507aa0a607SDon LewisAC_MSG_CHECKING([which mythes to use]) 51517aa0a607SDon Lewisif test -n "$with_system_mythes" -o -n "$with_system_libs" && \ 51527aa0a607SDon Lewis test "$with_system_mythes" != "no"; then 51537aa0a607SDon Lewis AC_MSG_RESULT([external]) 51547aa0a607SDon Lewis SYSTEM_MYTHES=YES 51557aa0a607SDon Lewis AC_LANG_PUSH([C++]) 51567aa0a607SDon Lewis PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no) 51577aa0a607SDon Lewis if test "$MYTHES_PKGCONFIG" = "no"; then 51587aa0a607SDon Lewis AC_CHECK_HEADER(mythes.hxx, [], 51597aa0a607SDon Lewis [ AC_MSG_ERROR(mythes.hxx headers not found.)], []) 51607aa0a607SDon Lewis AC_CHECK_LIB(mythes-1.2, main, [], 51617aa0a607SDon Lewis [ MYTHES_FOUND=no], []) 51627aa0a607SDon Lewis if test "$MYTHES_FOUND" = "no"; then 51637aa0a607SDon Lewis AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes], 51647aa0a607SDon Lewis [ MYTHES_FOUND=no], []) 51657aa0a607SDon Lewis fi 51667aa0a607SDon Lewis if test "$MYTHES_FOUND" = "no"; then 51677aa0a607SDon Lewis AC_MSG_ERROR([mythes library not found!.]) 51687aa0a607SDon Lewis fi 51697aa0a607SDon Lewis fi 51707aa0a607SDon Lewis AC_LANG_POP([C++]) 51717aa0a607SDon Lewiselse 51727aa0a607SDon Lewis AC_MSG_RESULT([internal]) 51737aa0a607SDon Lewis SYSTEM_MYTHES=NO 51747aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE MYTHES" 51757aa0a607SDon Lewisfi 51767aa0a607SDon LewisAC_SUBST(SYSTEM_MYTHES) 51777aa0a607SDon LewisAC_SUBST(MYTHES_CFLAGS) 51787aa0a607SDon LewisAC_SUBST(MYTHES_LIBS) 51797aa0a607SDon Lewis 51807aa0a607SDon Lewis 51817aa0a607SDon Lewisdnl =================================================================== 51827aa0a607SDon Lewisdnl Checking for libtextcat 51837aa0a607SDon Lewisdnl =================================================================== 51847aa0a607SDon LewisAC_MSG_CHECKING([which libtextcat to use]) 51857aa0a607SDon Lewisif test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then 51867aa0a607SDon Lewis AC_MSG_RESULT([external]) 51877aa0a607SDon Lewis SYSTEM_LIBTEXTCAT=YES 51887aa0a607SDon Lewis AC_CHECK_HEADER(libtextcat/textcat.h, [], 51897aa0a607SDon Lewis [ AC_MSG_ERROR(libtextcat headers not found.)], []) 51907aa0a607SDon Lewis AC_CHECK_LIB(textcat, special_textcat_Init, , 51917aa0a607SDon Lewis [ AC_MSG_ERROR(libtextcat library not found or not suitable. libtextcat typically needs to be patched)], []) 51927aa0a607SDon Lewiselse 51937aa0a607SDon Lewis AC_MSG_RESULT([internal]) 51947aa0a607SDon Lewis SYSTEM_LIBTEXTCAT=NO 51957aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" 51967aa0a607SDon Lewisfi 51977aa0a607SDon LewisAC_SUBST(SYSTEM_LIBTEXTCAT) 51987aa0a607SDon Lewis 51997aa0a607SDon LewisAC_MSG_CHECKING([which libtextcat data directory to use]) 52007aa0a607SDon Lewisif test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then 52017aa0a607SDon Lewis if test "$with_system_libtextcat_data" = "yes"; then 52027aa0a607SDon Lewis SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat 52037aa0a607SDon Lewis else 52047aa0a607SDon Lewis SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data 52057aa0a607SDon Lewis fi 52067aa0a607SDon Lewis AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA]) 52077aa0a607SDon Lewiselse 52087aa0a607SDon Lewis AC_MSG_RESULT([internal]) 52097aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" 52107aa0a607SDon Lewisfi 52117aa0a607SDon LewisAC_SUBST(SYSTEM_LIBTEXTCAT_DATA) 52127aa0a607SDon Lewis 52137aa0a607SDon Lewisdnl *************************************** 52147aa0a607SDon Lewisdnl testing libc version for Linux... 52157aa0a607SDon Lewisdnl *************************************** 52167aa0a607SDon Lewisif test "$_os" = "Linux"; then 52177aa0a607SDon Lewis AC_MSG_CHECKING([whether libc is >= 2.1.1]) 52187aa0a607SDon Lewis exec 6>/dev/null # no output 52197aa0a607SDon Lewis AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC) 52207aa0a607SDon Lewis exec 6>&1 # output on again 52217aa0a607SDon Lewis if test "$HAVE_LIBC"; then 52227aa0a607SDon Lewis AC_MSG_RESULT([yes]) 52237aa0a607SDon Lewis else 52247aa0a607SDon Lewis AC_MSG_ERROR([no, upgrade libc]) 52257aa0a607SDon Lewis fi 52267aa0a607SDon Lewisfi 52277aa0a607SDon Lewis 52287aa0a607SDon Lewisif test "$_os" != "WNT"; then 52297aa0a607SDon Lewis AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO]) 52307aa0a607SDon Lewis AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO]) 52317aa0a607SDon Lewis if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then 52327aa0a607SDon Lewis SYSTEM_LIBC=YES 52337aa0a607SDon Lewis fi 52347aa0a607SDon Lewiselse 52357aa0a607SDon Lewis HAVE_GETOPT=NO 52367aa0a607SDon Lewis HAVE_READDIR_R=NO 52377aa0a607SDon Lewis SYSTEM_LIBC=YES 52387aa0a607SDon Lewisfi 52397aa0a607SDon LewisAC_SUBST(HAVE_GETOPT) 52407aa0a607SDon LewisAC_SUBST(HAVE_READDIR_R) 52417aa0a607SDon LewisAC_SUBST(SYSTEM_LIBC) 52427aa0a607SDon Lewis 52437aa0a607SDon Lewisdnl ========================================= 52447aa0a607SDon Lewisdnl Check for the Microsoft Platform SDK. 52457aa0a607SDon Lewisdnl ========================================= 52467aa0a607SDon Lewisdnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better, 52477aa0a607SDon Lewisdnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then 52487aa0a607SDon Lewisif test \( "$_os" = "WINNT" \) ; then 52497aa0a607SDon Lewis AC_MSG_CHECKING([for PSDK files]) 52507aa0a607SDon Lewis if test -z "$with_psdk_home"; then 52517aa0a607SDon Lewis # This first line will detect a February 2003 Microsoft Platform SDK 52527aa0a607SDon Lewis PSDK_HOME=`./oowintool --psdk-home` 52537aa0a607SDon Lewis # But there might be also an April 2005 PSDK, unfortunately MS changed 52547aa0a607SDon Lewis # the registry entry. (we prefer the old version!?) 52557aa0a607SDon Lewis if test -z "$PSDK_HOME"; then 52567aa0a607SDon Lewis PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1` 52577aa0a607SDon Lewis fi 52587aa0a607SDon Lewis # normalize if found 52597aa0a607SDon Lewis if test -n "$PSDK_HOME"; then 52607aa0a607SDon Lewis PSDK_HOME=`cygpath -d "$PSDK_HOME"` 52617aa0a607SDon Lewis PSDK_HOME=`cygpath -u "$PSDK_HOME"` 52627aa0a607SDon Lewis fi 52637aa0a607SDon Lewis else 52647aa0a607SDon Lewis PSDK_HOME=`cygpath -u "$with_psdk_home"` 52657aa0a607SDon Lewis fi 52667aa0a607SDon Lewis # Remove a possible trailing backslash 52677aa0a607SDon Lewis PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'` 52687aa0a607SDon Lewis # Problem with current PSDK (iz 49865) 52697aa0a607SDon Lewis if test -f "$PSDK_HOME/Lib/libcp.lib"; then 52707aa0a607SDon Lewis AC_MSG_ERROR([ 52717aa0a607SDon Lewis 52727aa0a607SDon LewisSome modules do not build correctly with MS Platform SDK - April 2005 52737aa0a607SDon LewisEdition if the library ($PSDK_HOME/Lib/libcp.lib) is found. 52747aa0a607SDon LewisRemove/rename/backup that file and restart configure. Details about this 52757aa0a607SDon Lewisproblem can be found in issue 49856.]) 52767aa0a607SDon Lewis fi 52777aa0a607SDon Lewis# WIndows SDK has different headers 52787aa0a607SDon Lewis if test \( -f "$PSDK_HOME/Include/adoint.h" \) \ 52797aa0a607SDon Lewis -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \ 52807aa0a607SDon Lewis -a \( -f "$PSDK_HOME/Include/usp10.h" \); then 52817aa0a607SDon Lewis HAVE_PSDK_H="yes" 52827aa0a607SDon Lewis else 52837aa0a607SDon Lewis HAVE_PSDK_H="no" 52847aa0a607SDon Lewis fi 52857aa0a607SDon Lewis if test -f "$PSDK_HOME/lib/unicows.lib"; then 52867aa0a607SDon Lewis HAVE_PSDK_LIB="yes" 52877aa0a607SDon Lewis else 52887aa0a607SDon Lewis HAVE_PSDK_LIB="no" 52897aa0a607SDon Lewis fi 52907aa0a607SDon Lewis if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then 52917aa0a607SDon Lewis AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs 52927aa0a607SDon Lewisare installed or use --with-psdk-home .]) 52937aa0a607SDon Lewis fi 52947aa0a607SDon Lewis if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \ 52957aa0a607SDon Lewis -o ! -x "$PSDK_HOME/bin/msidb.exe" \ 52967aa0a607SDon Lewis -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \ 52977aa0a607SDon Lewis -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then 52987aa0a607SDon Lewis AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.]) 52997aa0a607SDon Lewis fi 53007aa0a607SDon Lewis AC_MSG_RESULT([SDK files found ...)]) 53017aa0a607SDon Lewisdnl Check if this is the right SDK. 53027aa0a607SDon Lewis if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then 53037aa0a607SDon Lewis AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)]) 53047aa0a607SDon Lewis WINDOWS_VISTA_PSDK=TRUE 53057aa0a607SDon Lewis elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then 53067aa0a607SDon Lewis AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)]) 53077aa0a607SDon Lewis WINDOWS_VISTA_PSDK=TRUE 53087aa0a607SDon Lewis elif echo $PSDK_HOME | grep "v7.0" >/dev/null 2>/dev/null; then 53097aa0a607SDon Lewis AC_MSG_RESULT([Found Windows SDK 7.0 ($PSDK_HOME)]) 53107aa0a607SDon Lewis WINDOWS_VISTA_PSDK=TRUE 53117aa0a607SDon Lewis else 53127aa0a607SDon Lewis AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)]) 53137aa0a607SDon Lewis fi 53147aa0a607SDon Lewisfi 53157aa0a607SDon LewisAC_SUBST(PSDK_HOME) 53167aa0a607SDon LewisAC_SUBST(WINDOWS_VISTA_PSDK) 53177aa0a607SDon Lewis 53187aa0a607SDon Lewisdnl ========================================= 53197aa0a607SDon Lewisdnl Check for the Microsoft DirectX SDK. 53207aa0a607SDon Lewisdnl ========================================= 53217aa0a607SDon Lewisif test \( "$_os" = "WINNT" \) ; then 53227aa0a607SDon Lewis AC_MSG_CHECKING([for DirectX SDK files]) 53237aa0a607SDon Lewis if test -z "$with_directx_home"; then 53247aa0a607SDon Lewis dnl A standard installation of the DirectX SDK sets $DXSDK_DIR 53257aa0a607SDon Lewis if test -n "$DXSDK_DIR"; then 53267aa0a607SDon Lewis DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"` 53277aa0a607SDon Lewis DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"` 53287aa0a607SDon Lewis fi 53297aa0a607SDon Lewis # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to 53307aa0a607SDon Lewis # the "DirectX SDK files not found" error later 53317aa0a607SDon Lewis else 53327aa0a607SDon Lewis DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"` 53337aa0a607SDon Lewis fi 53347aa0a607SDon Lewis # Remove a possible trailing backslash 53357aa0a607SDon Lewis DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'` 53367aa0a607SDon Lewis 53377aa0a607SDon Lewis if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then 53387aa0a607SDon Lewis HAVE_DIRECTDRAW_H="yes" 53397aa0a607SDon Lewis else 53407aa0a607SDon Lewis HAVE_DIRECTDRAW_H="no" 53417aa0a607SDon Lewis fi 53427aa0a607SDon Lewis if test -f "$DIRECTXSDK_HOME/Include/d3d9.h" ; then 53437aa0a607SDon Lewis HAVE_DIRECTXSDK_H="yes" 53447aa0a607SDon Lewis else 53457aa0a607SDon Lewis HAVE_DIRECTXSDK_H="no" 53467aa0a607SDon Lewis fi 53477aa0a607SDon Lewis 53487aa0a607SDon Lewis # MS changed the location of the libraries with dec 2004 directx sdk 53497aa0a607SDon Lewis if test -d "$DIRECTXSDK_HOME/lib/x86" ; then 53507aa0a607SDon Lewis DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86" 53517aa0a607SDon Lewis else 53527aa0a607SDon Lewis DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib" 53537aa0a607SDon Lewis fi 53547aa0a607SDon Lewis if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then 53557aa0a607SDon Lewis HAVE_DIRECTDRAW_LIB="yes" 53567aa0a607SDon Lewis else 53577aa0a607SDon Lewis HAVE_DIRECTDRAW_LIB="no" 53587aa0a607SDon Lewis fi 53597aa0a607SDon Lewis if test -f "$DIRECTXSDK_LIB/d3d9.lib" ; then 53607aa0a607SDon Lewis HAVE_DIRECTXSDK_LIB="yes" 53617aa0a607SDon Lewis else 53627aa0a607SDon Lewis HAVE_DIRECTXSDK_LIB="no" 53637aa0a607SDon Lewis fi 53647aa0a607SDon Lewis 53657aa0a607SDon Lewis if test "$HAVE_DIRECTDRAW_H" = "yes" -a "$HAVE_DIRECTDRAW_LIB" = "yes" ; then 53667aa0a607SDon Lewis ENABLE_DIRECT_DRAW="TRUE" 53677aa0a607SDon Lewis fi 53687aa0a607SDon Lewis if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes" ; then 53697aa0a607SDon Lewis HAVE_DIRECTXSDK="yes" 53707aa0a607SDon Lewis else 53717aa0a607SDon Lewis HAVE_DIRECTXSDK="no" 53727aa0a607SDon Lewis fi 53737aa0a607SDon Lewis 53747aa0a607SDon Lewis if test -n "$ENABLE_DIRECTX"; then 53757aa0a607SDon Lewis if test "$HAVE_DIRECTDRAW" = "yes" -o "$HAVE_DIRECTXSDK" = "yes" ; then 53767aa0a607SDon Lewis AC_MSG_RESULT([found]) 53777aa0a607SDon Lewis else 53787aa0a607SDon Lewis AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or --disable-directx.]) 53797aa0a607SDon Lewis fi 53807aa0a607SDon Lewis else 53817aa0a607SDon Lewis DIRECTXSDK_HOME="" 53827aa0a607SDon Lewis AC_MSG_RESULT([disabled]) 53837aa0a607SDon Lewis fi 53847aa0a607SDon Lewisfi 53857aa0a607SDon LewisAC_SUBST(ENABLE_DIRECT_DRAW) 53867aa0a607SDon LewisAC_SUBST(DIRECTXSDK_HOME) 53877aa0a607SDon LewisAC_SUBST(DIRECTXSDK_LIB) 53887aa0a607SDon Lewis 53897aa0a607SDon Lewis 53907aa0a607SDon Lewisdnl ============================================ 53917aa0a607SDon Lewisdnl Check for ATL and MFC 53927aa0a607SDon Lewisdnl ============================================ 53937aa0a607SDon Lewisif test \( "$_os" = "WINNT" \) ; then 53947aa0a607SDon Lewis AC_MSG_CHECKING([for ATL and MFC]) 53957aa0a607SDon Lewis if test "$DISABLE_ATL" = "TRUE"; then 53967aa0a607SDon Lewis AC_MSG_RESULT([ATL is disabled, nothing to check]) 53977aa0a607SDon Lewis else 53987aa0a607SDon Lewis AC_MSG_NOTICE([testing ATL/MFC libs and includes]) 53997aa0a607SDon Lewis if test -z "$with_atl_include_dir"; then 54007aa0a607SDon Lewis ATL_INCLUDE=$COMPATH/atlmfc/include 54017aa0a607SDon Lewis else 54027aa0a607SDon Lewis ATL_INCLUDE=`cygpath -u "$with_atl_include_dir"` 54037aa0a607SDon Lewis fi 54047aa0a607SDon Lewis if test -z "$with_atl_lib_dir"; then 54057aa0a607SDon Lewis ATL_LIB=$COMPATH/atlmfc/lib 54067aa0a607SDon Lewis ATL_LIB_X64=$COMPATH/atlmfc/lib/amd64 54077aa0a607SDon Lewis else 54087aa0a607SDon Lewis ATL_LIB=`cygpath -u "$with_atl_lib_dir"` 54097aa0a607SDon Lewis ATL_LIB_X64=$ATL_LIB/../amd64 54107aa0a607SDon Lewis fi 54117aa0a607SDon Lewis if test -z "$with_mfc_include_dir"; then 54127aa0a607SDon Lewis MFC_INCLUDE=$COMPATH/atlmfc/include 54137aa0a607SDon Lewis else 54147aa0a607SDon Lewis MFC_INCLUDE=`cygpath -u "$with_mfc_include_dir"` 54157aa0a607SDon Lewis fi 54167aa0a607SDon Lewis if test -z "$with_mfc_lib_dir"; then 54177aa0a607SDon Lewis MFC_LIB=$COMPATH/atlmfc/lib 54187aa0a607SDon Lewis else 54197aa0a607SDon Lewis MFC_LIB=`cygpath -u "$with_mfc_lib_dir"` 54207aa0a607SDon Lewis fi 54217aa0a607SDon Lewis 54227aa0a607SDon Lewis ATL_INCLUDE=`echo $ATL_INCLUDE | $SED 's/\/$//'` 54237aa0a607SDon Lewis ATL_LIB=`echo $ATL_LIB | $SED 's/\/$//'` 54247aa0a607SDon Lewis ATL_LIB_X64=`echo $ATL_LIB_X64 | $SED 's/\/$//'` 54257aa0a607SDon Lewis MFC_INCLUDE=`echo $MFC_INCLUDE | $SED 's/\/$//'` 54267aa0a607SDon Lewis MFC_LIB=`echo $MFC_LIB | $SED 's/\/$//'` 54277aa0a607SDon Lewis 54287aa0a607SDon Lewis AC_MSG_NOTICE([looking for atlbase.h in "$ATL_INCLUDE"]) 54297aa0a607SDon Lewis if test -f "$ATL_INCLUDE/atlbase.h"; then 54307aa0a607SDon Lewis HAVE_ATL_H="yes" 54317aa0a607SDon Lewis else 54327aa0a607SDon Lewis HAVE_ATL_H="no" 54337aa0a607SDon Lewis fi 54347aa0a607SDon Lewis AC_MSG_NOTICE([found atlbase.h in "$ATL_INCLUDE"? "$HAVE_ATL_H"]) 54357aa0a607SDon Lewis 54367aa0a607SDon Lewis AC_MSG_NOTICE([looking for afx.h in "$MFC_INCLUDE"]) 54377aa0a607SDon Lewis if test -f "$MFC_INCLUDE/afx.h"; then 54387aa0a607SDon Lewis HAVE_MFC_H="yes" 54397aa0a607SDon Lewis else 54407aa0a607SDon Lewis HAVE_MFC_H="no" 54417aa0a607SDon Lewis fi 54427aa0a607SDon Lewis AC_MSG_NOTICE([found afx.h in "$MFC_INCLUDE"? "$HAVE_MFC_H"]) 54437aa0a607SDon Lewis 54447aa0a607SDon Lewis AC_MSG_NOTICE([looking for atls.lib in "$ATL_LIB"]) 54457aa0a607SDon Lewis if test -f "$ATL_LIB/atls.lib"; then 54467aa0a607SDon Lewis HAVE_ATL_LIB="yes" 54477aa0a607SDon Lewis AC_MSG_NOTICE([looking for atlthunk.lib in "$ATL_LIB"]) 54487aa0a607SDon Lewis if test -f "$ATL_LIB/atlthunk.lib"; then 54497aa0a607SDon Lewis HAVE_ATLTHUNK="YES" 54507aa0a607SDon Lewis else 54517aa0a607SDon Lewis HAVE_ATLTHUNK="NO" 54527aa0a607SDon Lewis fi 54537aa0a607SDon Lewis AC_MSG_NOTICE([found atlthunk.lib in "$ATL_LIB"? "$HAVE_ATLTHUNK"]) 54547aa0a607SDon Lewis else 54557aa0a607SDon Lewis HAVE_ATL_LIB="no" 54567aa0a607SDon Lewis fi 54577aa0a607SDon Lewis AC_MSG_NOTICE([found atls.lib in "$ATL_LIB"? "$HAVE_ATL_LIB"]) 54587aa0a607SDon Lewis 54597aa0a607SDon Lewis dnl TODO check also MFC libraries, they seem to have diferent names 54607aa0a607SDon Lewis dnl mfc42.lib mfc90.lib 54617aa0a607SDon Lewis if test -d "$MFC_LIB"; then 54627aa0a607SDon Lewis HAVE_MFC_LIB="yes" 54637aa0a607SDon Lewis else 54647aa0a607SDon Lewis HAVE_MFC_LIB="no" 54657aa0a607SDon Lewis fi 54667aa0a607SDon Lewis 54677aa0a607SDon Lewis if test "$HAVE_ATL_H" = "no" -o "$HAVE_MFC_H" = "no" -o "$HAVE_ATL_LIB" = "no" -o "$HAVE_MFC_LIB" = "no"; then 54687aa0a607SDon Lewis ATL_INCLUDE= 54697aa0a607SDon Lewis ATL_LIB= 54707aa0a607SDon Lewis ATL_LIB_X64= 54717aa0a607SDon Lewis MFC_INCLUDE= 54727aa0a607SDon Lewis MFC_LIB= 54737aa0a607SDon Lewis HAVE_ATL_LIB= 54747aa0a607SDon Lewis dnl TODO shouldn't this be an error? 54757aa0a607SDon Lewis DISABLE_ACTIVEX="TRUE" 54767aa0a607SDon Lewis DISABLE_ATL="TRUE" 54777aa0a607SDon Lewis AC_MSG_RESULT([ATL/MFC disabled]) 54787aa0a607SDon Lewis else 54797aa0a607SDon Lewis ATL_INCLUDE=`cygpath -dm "$ATL_INCLUDE"` 54807aa0a607SDon Lewis ATL_LIB=`cygpath -dm "$ATL_LIB"` 54817aa0a607SDon Lewis ATL_LIB_X64=`cygpath -dm "$ATL_LIB_X64"` 54827aa0a607SDon Lewis MFC_INCLUDE=`cygpath -dm "$MFC_INCLUDE"` 54837aa0a607SDon Lewis MFC_LIB=`cygpath -dm "$MFC_LIB"` 54847aa0a607SDon Lewis AC_MSG_RESULT([ATL/MFC enabled]) 54857aa0a607SDon Lewis fi 54867aa0a607SDon Lewis fi 54877aa0a607SDon Lewisfi 54887aa0a607SDon LewisAC_SUBST(ATL_INCLUDE) 54897aa0a607SDon LewisAC_SUBST(ATL_LIB) 54907aa0a607SDon LewisAC_SUBST(ATL_LIB_X64) 54917aa0a607SDon LewisAC_SUBST(HAVE_ATLTHUNK) 54927aa0a607SDon LewisAC_SUBST(MFC_INCLUDE) 54937aa0a607SDon LewisAC_SUBST(MFC_LIB) 54947aa0a607SDon Lewis 54957aa0a607SDon Lewis 54967aa0a607SDon Lewisdnl ============================================ 54977aa0a607SDon Lewisdnl Check for Nullsoft Scriptable Install System 54987aa0a607SDon Lewisdnl ============================================ 54997aa0a607SDon LewisNSIS_PATH="" 55007aa0a607SDon Lewisif test "$_os" = "WINNT" ; then 55017aa0a607SDon Lewis AC_MSG_CHECKING([for NSIS]) 55027aa0a607SDon Lewis AC_PATH_PROG(NSIS_PATH, nsis.exe) 55037aa0a607SDon Lewis if test -n "$NSIS_PATH"; then 55047aa0a607SDon Lewis NSIS_PATH=`dirname "$NSIS_PATH"` 55057aa0a607SDon Lewis fi 55067aa0a607SDon Lewis if test -n "$with_nsis_path"; then 55077aa0a607SDon Lewis with_nsis_path=`cygpath -u "$with_nsis_path"` 55087aa0a607SDon Lewis fi 55097aa0a607SDon Lewis if test -e "$with_nsis_path/nsis.exe"; then 55107aa0a607SDon Lewis NSIS_PATH="$with_nsis_path" 55117aa0a607SDon Lewis fi 55127aa0a607SDon Lewis nsistest=`./oowintool --nsis-dir`; 55137aa0a607SDon Lewis if test -x "$nsistest/nsis.exe"; then 55147aa0a607SDon Lewis NSIS_PATH="$nsistest" 55157aa0a607SDon Lewis fi 55167aa0a607SDon Lewis if test -z "$NSIS_PATH"; then 55177aa0a607SDon Lewis AC_MSG_WARN([NSIS not found, no self contained installer will be build.]) 55187aa0a607SDon Lewis echo "NSIS not found, no self contained installer will be build." >> warn 55197aa0a607SDon Lewis else 55207aa0a607SDon Lewis NSIS_PATH=`cygpath -d "$NSIS_PATH"` 55217aa0a607SDon Lewis NSIS_PATH=`cygpath -u "$NSIS_PATH"` 55227aa0a607SDon Lewis AC_MSG_RESULT([found ($NSIS_PATH)]) 55237aa0a607SDon Lewis AC_MSG_CHECKING([whether NSIS version is >= 3.*]) 55247aa0a607SDon Lewis nsis_version_string=`"$NSIS_PATH/makensis.exe" /VERSION | $SED -e s/^v//i` 55257aa0a607SDon Lewis nsis_version_major=`echo $nsis_version_string | cut -d. -f1` 55267aa0a607SDon Lewis nsis_version_minor=`echo $nsis_version_string | cut -d. -f2` 55277aa0a607SDon Lewis if test "$nsis_version_major" -ge "3"; then 55287aa0a607SDon Lewis AC_MSG_RESULT([found NSIS $nsis_version_major.$nsis_version_minor >= 3.*]) 55297aa0a607SDon Lewis AC_MSG_CHECKING([whether NSIS was compiled with Unicode support]) 55307aa0a607SDon Lewis if echo `"$NSIS_PATH/makensis.exe" /HDRINFO` | $EGREP "\bNSIS_UNICODE_MAKENSIS\b" 2>&1 >/dev/null; then 55317aa0a607SDon Lewis AC_MSG_RESULT([NSIS version compiled with Unicode support.]) 55327aa0a607SDon Lewis else 55337aa0a607SDon Lewis NSIS_PATH="" 55347aa0a607SDon Lewis AC_MSG_WARN([NSIS version compiled without Unicode support, no self contained installer will be build.]) 55357aa0a607SDon Lewis fi 55367aa0a607SDon Lewis else 55377aa0a607SDon Lewis NSIS_PATH="" 55387aa0a607SDon Lewis AC_MSG_WARN([NSIS version found is < 3.*, no self contained installer will be build.]) 55397aa0a607SDon Lewis fi 55407aa0a607SDon Lewis fi 55417aa0a607SDon Lewisfi 55427aa0a607SDon LewisAC_SUBST(NSIS_PATH) 55437aa0a607SDon Lewis 55447aa0a607SDon Lewisdnl *************************************** 55457aa0a607SDon Lewisdnl testing bison and flex exist 55467aa0a607SDon Lewisdnl *************************************** 55477aa0a607SDon LewisAC_PATH_PROG(BISON, bison) 55487aa0a607SDon Lewisif test -z "$BISON"; then 55497aa0a607SDon Lewis AC_MSG_ERROR([no bison found in \$PATH, install bison]) 55507aa0a607SDon Lewiselse 55517aa0a607SDon Lewis AC_MSG_CHECKING([the bison version]) 55527aa0a607SDon Lewis _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; 55537aa0a607SDon Lewis _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` 55547aa0a607SDon Lewis # Accept newer than 1.875 or older(equal) than 1.75 55557aa0a607SDon Lewis if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then 55567aa0a607SDon Lewis if test "$_bison_version" = "1.875" ; then 55577aa0a607SDon Lewis AC_MSG_WARN([suspect ($BISON $_bison_version)]) 55587aa0a607SDon Lewis echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn 55597aa0a607SDon Lewis else 55607aa0a607SDon Lewis AC_MSG_RESULT([checked ($BISON $_bison_version)]) 55617aa0a607SDon Lewis fi 55627aa0a607SDon Lewis else 55637aa0a607SDon Lewis AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))]) 55647aa0a607SDon Lewis fi 55657aa0a607SDon Lewisfi 55667aa0a607SDon LewisAC_PATH_PROG(FLEX, flex) 55677aa0a607SDon Lewisif test -z "$FLEX"; then 55687aa0a607SDon Lewis AC_MSG_ERROR([no flex found in \$PATH, install flex]) 55697aa0a607SDon Lewisfi 55707aa0a607SDon Lewisdnl *************************************** 55717aa0a607SDon Lewisdnl testing that patch exists 55727aa0a607SDon Lewisdnl *************************************** 55737aa0a607SDon LewisAC_PATH_PROG(PATCH, patch) 55747aa0a607SDon Lewisif test -z "$PATCH"; then 55757aa0a607SDon Lewis AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\]) 55767aa0a607SDon Lewisfi 55777aa0a607SDon Lewis 55787aa0a607SDon Lewisdnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used 55797aa0a607SDon Lewisif test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then 55807aa0a607SDon Lewis if test -z "$with_gnu_patch"; then 55817aa0a607SDon Lewis GNUPATCH=$PATCH 55827aa0a607SDon Lewis else 55837aa0a607SDon Lewis if test -x "$with_gnu_patch"; then 55847aa0a607SDon Lewis GNUPATCH=$with_gnu_patch 55857aa0a607SDon Lewis else 55867aa0a607SDon Lewis AC_MSG_ERROR([--with-gnu-patch did not point to an executable]) 55877aa0a607SDon Lewis fi 55887aa0a607SDon Lewis fi 55897aa0a607SDon Lewis 55907aa0a607SDon Lewis AC_MSG_CHECKING([whether $GNUPATCH is GNU patch]) 55917aa0a607SDon Lewis if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then 55927aa0a607SDon Lewis AC_MSG_RESULT([yes]) 55937aa0a607SDon Lewis else 55947aa0a607SDon Lewis AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it]) 55957aa0a607SDon Lewis fi 55967aa0a607SDon Lewisfi 55977aa0a607SDon Lewis 55987aa0a607SDon Lewisdnl We also need to check for --with-gnu-cp 55997aa0a607SDon Lewis 56007aa0a607SDon Lewisif test -z "$with_gnu_cp"; then 56017aa0a607SDon Lewis # check the place where the GNU stuff is hidden on Solaris... 56027aa0a607SDon Lewis if test -x /usr/gnu/bin/cp; then 56037aa0a607SDon Lewis GNUCP=/usr/gnu/bin/cp 56047aa0a607SDon Lewis else 56057aa0a607SDon Lewis AC_PATH_PROGS(GNUCP, gnucp cp) 56067aa0a607SDon Lewis fi 56077aa0a607SDon Lewis if test -z $GNUCP; then 56087aa0a607SDon Lewis AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it]) 56097aa0a607SDon Lewis fi 56107aa0a607SDon Lewiselse 56117aa0a607SDon Lewis if test -x "$with_gnu_cp"; then 56127aa0a607SDon Lewis GNUCP=$with_gnu_cp 56137aa0a607SDon Lewis else 56147aa0a607SDon Lewis AC_MSG_ERROR([--with-gnu-cp did not point to an executable]) 56157aa0a607SDon Lewis fi 56167aa0a607SDon Lewisfi 56177aa0a607SDon Lewis 56187aa0a607SDon LewisAC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support]) 56197aa0a607SDon Lewisif $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then 56207aa0a607SDon Lewis AC_MSG_RESULT([yes]) 56217aa0a607SDon Lewiselse 56227aa0a607SDon Lewis AC_MSG_RESULT([no]) 56237aa0a607SDon Lewis GNUCP='' 56247aa0a607SDon Lewisfi 56257aa0a607SDon Lewis 56267aa0a607SDon Lewisif test -z "$GNUCP"; then 56277aa0a607SDon Lewis if test "$_os" = "SunOS"; then 56287aa0a607SDon Lewis AC_MSG_ERROR([no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it]) 56297aa0a607SDon Lewis else 56307aa0a607SDon Lewis AC_MSG_RESULT([no GNU cp from coreutils found - using the system's cp command]) 56317aa0a607SDon Lewis fi 56327aa0a607SDon Lewisfi 56337aa0a607SDon Lewis 56347aa0a607SDon LewisAC_SUBST(GNUPATCH) 56357aa0a607SDon LewisAC_SUBST(GNUCP) 56367aa0a607SDon Lewis 56377aa0a607SDon Lewisdnl *************************************** 56387aa0a607SDon Lewisdnl testing bash tools path on Windows 56397aa0a607SDon Lewisdnl *************************************** 56407aa0a607SDon Lewisif test "$_os" = "WINNT"; then 56417aa0a607SDon Lewis CYGWIN_PATH="" 56427aa0a607SDon Lewis AC_PATH_PROG(CYGWIN_PATH, bash) 56437aa0a607SDon Lewis CYGWIN_PATH=`dirname "$CYGWIN_PATH"` 56447aa0a607SDon Lewisfi 56457aa0a607SDon Lewisif test -z "$CYGWIN_PATH"; then 56467aa0a607SDon Lewis CYGWIN_PATH="NO_CYGWIN" 56477aa0a607SDon Lewisfi 56487aa0a607SDon LewisAC_SUBST(CYGWIN_PATH) 56497aa0a607SDon Lewis 56507aa0a607SDon Lewisdnl *************************************** 56517aa0a607SDon Lewisdnl testing ml.exe assembler path 56527aa0a607SDon Lewisdnl *************************************** 56537aa0a607SDon Lewisif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 56547aa0a607SDon Lewis AC_MSG_CHECKING([ml.exe assembler path]) 56557aa0a607SDon Lewis if test -n "$with_asm_home"; then 56567aa0a607SDon Lewis with_asm_home=`cygpath -u "$with_asm_home"` 56577aa0a607SDon Lewis fi 56587aa0a607SDon Lewis if test ! -x "$with_asm_home/ml.exe"; then 56597aa0a607SDon Lewis AC_PATH_PROG(ML_EXE, ml.exe) 56607aa0a607SDon Lewis if test -z "$ML_EXE"; then 56617aa0a607SDon Lewis if test -x "$with_cl_home/bin/ml.exe"; then 56627aa0a607SDon Lewis with_asm_home=$with_cl_home/bin 56637aa0a607SDon Lewis AC_MSG_RESULT([found ($with_asm_home)]) 56647aa0a607SDon Lewis else 56657aa0a607SDon Lewis AC_MSG_ERROR([Configure did not find ml.exe assembler.]) 56667aa0a607SDon Lewis fi 56677aa0a607SDon Lewis else 56687aa0a607SDon Lewis with_asm_home="ASM_IN_PATH" 56697aa0a607SDon Lewis fi 56707aa0a607SDon Lewis fi 56717aa0a607SDon Lewis AC_MSG_RESULT([$ASM_HOME]) 56727aa0a607SDon Lewiselse 56737aa0a607SDon Lewis with_asm_home="NO_ASM_HOME" 56747aa0a607SDon Lewisfi 56757aa0a607SDon LewisASM_HOME="$with_asm_home" 56767aa0a607SDon LewisAC_SUBST(ASM_HOME) 56777aa0a607SDon Lewis 56787aa0a607SDon Lewisdnl *************************************** 56797aa0a607SDon Lewisdnl testing nasm.exe assembler path 56807aa0a607SDon Lewisdnl *************************************** 56817aa0a607SDon Lewisif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes" -a "$SYSTEM_OPENSSL" = "NO"; then 56827aa0a607SDon Lewis AC_MSG_CHECKING([nasm.exe assembler path]) 56837aa0a607SDon Lewis if test -n "$with_nasm_home"; then 56847aa0a607SDon Lewis with_nasm_home=`cygpath -u "$with_nasm_home"` 56857aa0a607SDon Lewis fi 56867aa0a607SDon Lewis if test ! -x "$with_nasm_home/nasm.exe"; then 56877aa0a607SDon Lewis AC_PATH_PROG(NASM_EXE, nasm.exe) 56887aa0a607SDon Lewis if test -z "$NASM_EXE"; then 56897aa0a607SDon Lewis with_nasm_home="NO_NASM_HOME" 56907aa0a607SDon Lewis AC_MSG_ERROR([NASM is required to build on Windows, please install or use --with-nasm-home],,) 56917aa0a607SDon Lewis else 56927aa0a607SDon Lewis with_nasm_home="NASM_IN_PATH" 56937aa0a607SDon Lewis fi 56947aa0a607SDon Lewis fi 56957aa0a607SDon Lewis AC_MSG_RESULT([$NASM_HOME]) 56967aa0a607SDon Lewiselse 56977aa0a607SDon Lewis with_nasm_home="NO_NASM_HOME" 56987aa0a607SDon Lewisfi 56997aa0a607SDon LewisNASM_HOME="$with_nasm_home" 57007aa0a607SDon LewisAC_SUBST(NASM_HOME) 57017aa0a607SDon Lewis 57027aa0a607SDon Lewisdnl =================================================================== 57037aa0a607SDon Lewisdnl testing handle deprecated unzip switch 57047aa0a607SDon Lewisdnl =================================================================== 57057aa0a607SDon Lewisif test -z "$with_zip_home"; then 57067aa0a607SDon Lewis with_zip_home="$with_unzip_home" 57077aa0a607SDon Lewisfi 57087aa0a607SDon Lewisdnl =================================================================== 57097aa0a607SDon Lewisdnl Zip will be found where you tell me to find it 57107aa0a607SDon Lewisdnl =================================================================== 57117aa0a607SDon Lewisif test -n "$with_zip_home" ; then 57127aa0a607SDon Lewis if test "$_os" = "WINNT"; then 57137aa0a607SDon Lewis with_zip_home=`cygpath -u "$with_zip_home"` 57147aa0a607SDon Lewis fi 57157aa0a607SDon Lewis ZIP="$with_zip_home/zip" 57167aa0a607SDon Lewis UNZIP="$with_zip_home/unzip" 57177aa0a607SDon Lewis ZIP_HOME="$with_zip_home" 57187aa0a607SDon Lewiselse 57197aa0a607SDon Lewis AC_PATH_PROG(ZIP, zip) 57207aa0a607SDon Lewis AC_PATH_PROG(UNZIP, unzip) 57217aa0a607SDon Lewis ZIP_HOME=`dirname "$ZIP"` 57227aa0a607SDon Lewisfi 57237aa0a607SDon Lewisdnl =================================================================== 57247aa0a607SDon Lewisdnl Zip must be available or else it is an error, all platforms 57257aa0a607SDon Lewisdnl =================================================================== 57267aa0a607SDon Lewisif test -z "$ZIP" -o -z "$UNZIP"; then 57277aa0a607SDon Lewis AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,) 57287aa0a607SDon Lewisfi 57297aa0a607SDon Lewis 57307aa0a607SDon Lewisdnl =================================================================== 57317aa0a607SDon Lewisdnl Zip must be a specific type for different build types. 57327aa0a607SDon Lewisdnl =================================================================== 57337aa0a607SDon Lewisif test "$_os" = "WINNT"; then 57347aa0a607SDon Lewis if test -n "`$ZIP -h | grep -i WinNT`" ; then 57357aa0a607SDon LewisAC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.]) 57367aa0a607SDon Lewis fi 57377aa0a607SDon Lewisfi 57387aa0a607SDon LewisAC_SUBST(ZIP_HOME) 57397aa0a607SDon Lewis 57407aa0a607SDon Lewisdnl =================================================================== 57417aa0a607SDon Lewisdnl Windows builds need dbghelp.dll in external/dbghelp/ 57427aa0a607SDon Lewisdnl =================================================================== 57437aa0a607SDon Lewisif test "$_os" = "WINNT"; then 57447aa0a607SDon Lewis AC_MSG_CHECKING([for dbghelp.dll]) 57457aa0a607SDon Lewis if test -x ./external/dbghelp/dbghelp.dll; then 57467aa0a607SDon Lewis AC_MSG_RESULT([found and executable]) 57477aa0a607SDon Lewis else 57487aa0a607SDon Lewis AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/. 57497aa0a607SDon LewisGet it from the Microsoft site and put it into external/dbghelp. 57507aa0a607SDon Lewis(Note: Microsoft seems to enjoy changing the exact location of this file. You 57517aa0a607SDon Lewismay have to search Microsoft's website.) Last time it was seen at: 57527aa0a607SDon Lewis<http://www.microsoft.com/downloads/release.asp?releaseid=30682>.]) 57537aa0a607SDon Lewis fi 57547aa0a607SDon Lewisfi 57557aa0a607SDon Lewis 57567aa0a607SDon Lewisdnl =================================================================== 57577aa0a607SDon Lewisdnl Windows builds need vcredist_x*.exe in external/vcredist/ 57587aa0a607SDon Lewisdnl =================================================================== 57597aa0a607SDon LewisWITH_VC_REDIST="" 57607aa0a607SDon Lewis 57617aa0a607SDon Lewisif test "$_os" = "WINNT"; then 57627aa0a607SDon Lewis AC_MSG_CHECKING([for vcredist_x86.exe]) 57637aa0a607SDon Lewis if test -x ./external/vcredist/vcredist_x86.exe; then 57647aa0a607SDon Lewis AC_MSG_RESULT([found and executable]) 57657aa0a607SDon Lewis else 57667aa0a607SDon Lewis AC_MSG_ERROR([ vcredist_x86.exe is missing in external/vcredist/. 57677aa0a607SDon LewisGet it from the Microsoft site and put it into external/vcredist. You can try 57687aa0a607SDon Lewisto download it from http://www.microsoft.com/download/en/search.aspx?q=redistributable%20package.]) 57697aa0a607SDon Lewis fi 57707aa0a607SDon Lewis AC_MSG_CHECKING([for vcredist_x64.exe]) 57717aa0a607SDon Lewis if test -x ./external/vcredist/vcredist_x64.exe; then 57727aa0a607SDon Lewis AC_MSG_RESULT([found and executable]) 57737aa0a607SDon Lewis else 57747aa0a607SDon Lewis AC_MSG_ERROR([ vcredist_x64.exe is missing in external/vcredist/. 57757aa0a607SDon LewisGet it from the Microsoft site and put it into external/vcredist. You can try 57767aa0a607SDon Lewisto download it from http://www.microsoft.com/download/en/search.aspx?q=redistributable%20package.]) 57777aa0a607SDon Lewis fi 57787aa0a607SDon Lewis WITH_VC_REDIST=YES 57797aa0a607SDon Lewis AC_SUBST(WITH_VC_REDIST) 57807aa0a607SDon Lewisfi 57817aa0a607SDon Lewis 57827aa0a607SDon Lewisdnl =================================================================== 57837aa0a607SDon Lewisdnl Windows builds - use oowintool to copy CRT dlls and manifest 57847aa0a607SDon Lewisdnl =================================================================== 57857aa0a607SDon Lewisif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then 57867aa0a607SDon Lewis if ./oowintool --msvc-copy-dlls ./external/msvcp ; then 57877aa0a607SDon Lewis : 57887aa0a607SDon Lewis else 57897aa0a607SDon Lewis AC_MSG_ERROR([oowintool failed to copy CRT]) 57907aa0a607SDon Lewis fi 57917aa0a607SDon Lewisfi 57927aa0a607SDon Lewis 57937aa0a607SDon Lewisdnl =================================================================== 57947aa0a607SDon Lewisdnl Windows builds need gdiplus.dll in external/gdiplus/ 57957aa0a607SDon Lewisdnl =================================================================== 57967aa0a607SDon Lewisif test "$_os" = "WINNT"; then 57977aa0a607SDon Lewis AC_MSG_CHECKING([for gdiplus.dll]) 57987aa0a607SDon Lewis if test -x ./external/gdiplus/gdiplus.dll; then 57997aa0a607SDon Lewis AC_MSG_RESULT([found and executable]) 58007aa0a607SDon Lewis else 58017aa0a607SDon Lewis AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/. 58027aa0a607SDon LewisGet it from the Microsoft site and put it into external/gdiplus. 58037aa0a607SDon LewisYou may have to search Microsoft's website. Last time it was seen at: 58047aa0a607SDon Lewis<http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.]) 58057aa0a607SDon Lewis fi 58067aa0a607SDon Lewisfi 58077aa0a607SDon Lewis 58087aa0a607SDon Lewisdnl =================================================================== 58097aa0a607SDon Lewisdnl Windows builds need msvcr100.dll in external/msvcp100/ 58107aa0a607SDon Lewisdnl =================================================================== 58117aa0a607SDon Lewisif test "$_os" = "WINNT"; then 58127aa0a607SDon Lewis AC_MSG_CHECKING([for msvcr100.dll]) 58137aa0a607SDon Lewis if test -x ./external/msvcp100/msvcr100.dll; then 58147aa0a607SDon Lewis AC_MSG_RESULT([found and executable]) 58157aa0a607SDon Lewis else 58167aa0a607SDon Lewis AC_MSG_ERROR([msvcr100.dll is missing in external/msvcp100/. 58177aa0a607SDon LewisGet it from the Microsoft Visual C++ 2010 Redistributable Package (x86), 58187aa0a607SDon Lewisfrom the Microsoft site and put it into external/msvcp100. 58197aa0a607SDon LewisYou may have to search Microsoft's website. Last time it was seen at: 58207aa0a607SDon Lewis<http://www.microsoft.com/en-us/download/search.aspx?q=Microsoft+Visual+C%2b%2b+2010+Redistributable>.]) 58217aa0a607SDon Lewis fi 58227aa0a607SDon Lewisfi 58237aa0a607SDon Lewis 58247aa0a607SDon Lewisdnl =================================================================== 58257aa0a607SDon Lewisdnl Test which vclplugs have to be built. 58267aa0a607SDon Lewisdnl =================================================================== 58277aa0a607SDon LewisAC_MSG_CHECKING([which VCLplugs shall be built]) 58287aa0a607SDon LewisENABLE_GTK="" 58297aa0a607SDon Lewisif test "x$enable_gtk" = "xyes"; then 58307aa0a607SDon Lewis ENABLE_GTK="TRUE" 58317aa0a607SDon Lewis R="gtk" 58327aa0a607SDon Lewisfi 58337aa0a607SDon LewisAC_SUBST(ENABLE_GTK) 58347aa0a607SDon Lewis 58357aa0a607SDon LewisENABLE_KDE="" 58367aa0a607SDon Lewisif test "x$enable_kde" = "xyes"; then 58377aa0a607SDon Lewis ENABLE_KDE="TRUE" 58387aa0a607SDon Lewis R="$R kde" 58397aa0a607SDon Lewisfi 58407aa0a607SDon LewisAC_SUBST(ENABLE_KDE) 58417aa0a607SDon Lewis 58427aa0a607SDon LewisENABLE_KDE4="" 58437aa0a607SDon Lewisif test "x$enable_kde4" = "xyes"; then 58447aa0a607SDon Lewis ENABLE_KDE4="TRUE" 58457aa0a607SDon Lewis R="$R kde4" 58467aa0a607SDon Lewisfi 58477aa0a607SDon LewisAC_SUBST(ENABLE_KDE4) 58487aa0a607SDon Lewis 58497aa0a607SDon Lewisif test -z "$R"; then 58507aa0a607SDon Lewis AC_MSG_RESULT([none]) 58517aa0a607SDon Lewiselse 58527aa0a607SDon Lewis AC_MSG_RESULT([$R]) 58537aa0a607SDon Lewisfi 58547aa0a607SDon Lewis 58557aa0a607SDon Lewisdnl =================================================================== 58567aa0a607SDon Lewisdnl GCONF check 58577aa0a607SDon Lewisdnl =================================================================== 58587aa0a607SDon Lewis 58597aa0a607SDon LewisENABLE_GCONF="" 58607aa0a607SDon LewisAC_MSG_CHECKING([whether to enable GConf support]) 58617aa0a607SDon Lewisif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then 58627aa0a607SDon Lewis ENABLE_GCONF="TRUE" 58637aa0a607SDon Lewis AC_MSG_RESULT([yes]) 58647aa0a607SDon Lewis PKG_CHECK_MODULES( GCONF, gconf-2.0 ) 58657aa0a607SDon Lewiselse 58667aa0a607SDon Lewis AC_MSG_RESULT([no]) 58677aa0a607SDon Lewisfi 58687aa0a607SDon LewisAC_SUBST(ENABLE_GCONF) 58697aa0a607SDon Lewis 58707aa0a607SDon Lewisdnl =================================================================== 58717aa0a607SDon Lewisdnl Gnome VFS check 58727aa0a607SDon Lewisdnl =================================================================== 58737aa0a607SDon Lewis 58747aa0a607SDon LewisENABLE_GNOMEVFS="" 58757aa0a607SDon LewisAC_MSG_CHECKING([whether to enable GNOME VFS support]) 58767aa0a607SDon Lewisif test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then 58777aa0a607SDon Lewis ENABLE_GNOMEVFS="TRUE" 58787aa0a607SDon Lewis AC_MSG_RESULT([yes]) 58797aa0a607SDon Lewis PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 ) 58807aa0a607SDon Lewis if test "$ENABLE_GCONF" != "TRUE"; then 58817aa0a607SDon Lewis PKG_CHECK_MODULES( GCONF, gconf-2.0 ) 58827aa0a607SDon Lewis fi 58837aa0a607SDon Lewiselse 58847aa0a607SDon Lewis AC_MSG_RESULT([no]) 58857aa0a607SDon Lewisfi 58867aa0a607SDon LewisAC_SUBST(ENABLE_GNOMEVFS) 58877aa0a607SDon Lewis 58887aa0a607SDon Lewisdnl =================================================================== 58897aa0a607SDon Lewisdnl Check whether the gtk 2.0 libraries are available. 58907aa0a607SDon Lewisdnl =================================================================== 58917aa0a607SDon Lewis 58927aa0a607SDon LewisGTK_CFLAGS="" 58937aa0a607SDon LewisGTK_LIBS="" 58947aa0a607SDon LewisENABLE_SYSTRAY_GTK="" 58957aa0a607SDon LewisENABLE_DBUS="" 58967aa0a607SDon Lewisif test "$test_gtk" = "yes"; then 58977aa0a607SDon Lewis 58987aa0a607SDon Lewis if test "$ENABLE_GTK" = "TRUE" ; then 58997aa0a607SDon Lewis 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])) 59007aa0a607SDon Lewis 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])) 59017aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE GTK" 59027aa0a607SDon Lewis 59037aa0a607SDon Lewis if test "x$enable_systray" = "xyes"; then 59047aa0a607SDon Lewis PKG_CHECK_MODULES(GTK_2_10,gtk+-2.0 >= 2.10.0, 59057aa0a607SDon Lewis [ENABLE_SYSTRAY_GTK="TRUE" 59067aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"], 59077aa0a607SDon Lewis [ENABLE_SYSTRAY_GTK=""]) 59087aa0a607SDon Lewis fi 59097aa0a607SDon Lewis 59107aa0a607SDon Lewis AC_MSG_CHECKING([whether to enable DBUS support]) 59117aa0a607SDon Lewis if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then 59127aa0a607SDon Lewis ENABLE_DBUS="TRUE" 59137aa0a607SDon Lewis AC_MSG_RESULT([yes]) 59147aa0a607SDon Lewis PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 ) 59157aa0a607SDon Lewis else 59167aa0a607SDon Lewis AC_MSG_RESULT([no]) 59177aa0a607SDon Lewis fi 59187aa0a607SDon Lewis 59197aa0a607SDon Lewis AC_MSG_CHECKING([whether to enable GIO support]) 59207aa0a607SDon Lewis if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then 59217aa0a607SDon Lewis if test "$ENABLE_GNOMEVFS" = "TRUE" ; then 59227aa0a607SDon Lewis AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.]) 59237aa0a607SDon Lewis fi 59247aa0a607SDon Lewis ENABLE_GIO="TRUE" 59257aa0a607SDon Lewis AC_MSG_RESULT([yes]) 59267aa0a607SDon Lewis PKG_CHECK_MODULES( GIO, gio-2.0 ) 59277aa0a607SDon Lewis else 59287aa0a607SDon Lewis AC_MSG_RESULT([no]) 59297aa0a607SDon Lewis fi 59307aa0a607SDon Lewis 59317aa0a607SDon Lewis fi 59327aa0a607SDon Lewis 59337aa0a607SDon Lewisfi 59347aa0a607SDon LewisAC_SUBST(ENABLE_GIO) 59357aa0a607SDon LewisAC_SUBST(ENABLE_DBUS) 59367aa0a607SDon LewisAC_SUBST(ENABLE_SYSTRAY_GTK) 59377aa0a607SDon LewisAC_SUBST(GTK_CFLAGS) 59387aa0a607SDon LewisAC_SUBST(GTK_LIBS) 59397aa0a607SDon LewisAC_SUBST(GTHREAD_CFLAGS) 59407aa0a607SDon LewisAC_SUBST(GTHREAD_LIBS) 59417aa0a607SDon Lewis 59427aa0a607SDon Lewisdnl =================================================================== 59437aa0a607SDon Lewisdnl Check whether the GStreamer libraries are available. 59447aa0a607SDon Lewisdnl =================================================================== 59457aa0a607SDon Lewis 59467aa0a607SDon LewisGSTREAMER_CFLAGS="" 59477aa0a607SDon LewisGSTREAMER_LIBS="" 59487aa0a607SDon LewisENABLE_GSTREAMER="" 59497aa0a607SDon Lewis 59507aa0a607SDon Lewisif test "$test_gstreamer" = "yes"; then 59517aa0a607SDon Lewis AC_MSG_CHECKING([whether to build the GStreamer media backend]) 59527aa0a607SDon Lewis if test "x$enable_gstreamer" != "xno" ; then 59537aa0a607SDon Lewis 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])) 59547aa0a607SDon Lewis ENABLE_GSTREAMER="TRUE" 59557aa0a607SDon Lewis AC_MSG_RESULT([yes]) 59567aa0a607SDon Lewis else 59577aa0a607SDon Lewis AC_MSG_RESULT([no]) 59587aa0a607SDon Lewis fi 59597aa0a607SDon Lewisfi 59607aa0a607SDon LewisAC_SUBST(ENABLE_GSTREAMER) 59617aa0a607SDon LewisAC_SUBST(GSTREAMER_CFLAGS) 59627aa0a607SDon LewisAC_SUBST(GSTREAMER_LIBS) 59637aa0a607SDon Lewis 59647aa0a607SDon Lewisdnl =================================================================== 59657aa0a607SDon Lewisdnl Check the ARM target 59667aa0a607SDon Lewisdnl =================================================================== 59677aa0a607SDon Lewis 59687aa0a607SDon Lewisif test "$_os" = "Linux" && echo "$build_cpu" | $GREP -q arm; then 59697aa0a607SDon Lewis # default value 59707aa0a607SDon Lewis ARM_TARGET=ARMV4T 59717aa0a607SDon Lewis AC_MSG_CHECKING([which ARM processor optimization to use]) 59727aa0a607SDon Lewis if test "$with_arm_target" -lt "6"; then 59737aa0a607SDon Lewis ARM_TARGET=ARMV4T 59747aa0a607SDon Lewis elif test "$with_arm_target" = "6"; then 59757aa0a607SDon Lewis ARM_TARGET=ARMV6 59767aa0a607SDon Lewis elif test "$with_arm_target" -gt "6"; then 59777aa0a607SDon Lewis ARM_TARGET=ARMV7 59787aa0a607SDon Lewis fi 59797aa0a607SDon Lewis AC_MSG_RESULT([$ARM_TARGET]) 59807aa0a607SDon Lewis AC_SUBST(ARM_TARGET) 59817aa0a607SDon Lewisfi 59827aa0a607SDon Lewis 59837aa0a607SDon Lewisdnl =================================================================== 59847aa0a607SDon Lewisdnl Check whether the Cairo libraries are available. 59857aa0a607SDon Lewisdnl =================================================================== 59867aa0a607SDon Lewis 59877aa0a607SDon LewisENABLE_CAIRO="" 59887aa0a607SDon LewisBUILD_PIXMAN="" 59897aa0a607SDon LewisSYSTEM_CAIRO="" 59907aa0a607SDon Lewis 59917aa0a607SDon Lewisif test "$test_cairo" = "yes"; then 59927aa0a607SDon Lewis 59937aa0a607SDon Lewis AC_MSG_CHECKING([whether to use cairo]) 59947aa0a607SDon Lewis if test "x$enable_cairo" != "xno" ; then 59957aa0a607SDon Lewis ENABLE_CAIRO="TRUE" 59967aa0a607SDon Lewis AC_MSG_RESULT([yes]) 59977aa0a607SDon Lewis AC_MSG_CHECKING([which cairo to use]) 59987aa0a607SDon Lewis if test -n "$with_system_cairo" -o -n "$with_system_libs" && \ 59997aa0a607SDon Lewis test "$with_system_cairo" != "no"; then 60007aa0a607SDon Lewis AC_MSG_RESULT([external]) 60017aa0a607SDon Lewis SYSTEM_CAIRO=YES 60027aa0a607SDon Lewis 60037aa0a607SDon Lewis PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 ) 60047aa0a607SDon Lewis if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then 60057aa0a607SDon Lewis AC_MSG_ERROR([Cairo library requires fontconfig.]) 60067aa0a607SDon Lewis fi 60077aa0a607SDon Lewis if test "$with_system_xrender_headers" = "yes"; then 60087aa0a607SDon Lewis AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8]) 60097aa0a607SDon Lewis AC_TRY_RUN([ 60107aa0a607SDon Lewis#include <X11/extensions/Xrender.h> 60117aa0a607SDon Lewis 60127aa0a607SDon Lewisint main(int argc, char **argv) { 60137aa0a607SDon Lewis#ifdef PictStandardA8 60147aa0a607SDon Lewis return 0; 60157aa0a607SDon Lewis#else 60167aa0a607SDon Lewis return 1; 60177aa0a607SDon Lewis#endif 60187aa0a607SDon Lewis} 60197aa0a607SDon Lewis ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])]) 60207aa0a607SDon Lewis fi 60217aa0a607SDon Lewis else 60227aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE CAIRO" 60237aa0a607SDon Lewis dnl === compiler fails on pixman with 64bit architectures...=== 60247aa0a607SDon Lewis if test "$build_cpu" != "x86_64"; then 60257aa0a607SDon Lewis BUILD_PIXMAN=YES 60267aa0a607SDon Lewis fi 60277aa0a607SDon Lewis AC_MSG_RESULT([internal]) 60287aa0a607SDon Lewis fi 60297aa0a607SDon Lewis else 60307aa0a607SDon Lewis AC_MSG_RESULT([no]) 60317aa0a607SDon Lewis fi 60327aa0a607SDon Lewisfi 60337aa0a607SDon Lewis 60347aa0a607SDon LewisAC_SUBST(ENABLE_CAIRO) 60357aa0a607SDon LewisAC_SUBST(BUILD_PIXMAN) 60367aa0a607SDon LewisAC_SUBST(SYSTEM_CAIRO) 60377aa0a607SDon LewisAC_SUBST(CAIRO_CFLAGS) 60387aa0a607SDon LewisAC_SUBST(CAIRO_LIBS) 60397aa0a607SDon Lewis 60407aa0a607SDon LewisENABLE_CAIRO_CANVAS="FALSE" 60417aa0a607SDon Lewisif test "$enable_cairo_canvas" = "yes" -a "$ENABLE_CAIRO" = "TRUE" ; then 60427aa0a607SDon Lewis ENABLE_CAIRO_CANVAS="TRUE" 60437aa0a607SDon Lewisfi 60447aa0a607SDon LewisAC_SUBST(ENABLE_CAIRO_CANVAS) 60457aa0a607SDon Lewis 60467aa0a607SDon Lewisdnl =================================================================== 60477aa0a607SDon Lewisdnl Check whether the OpenGL libraries are available 60487aa0a607SDon Lewisdnl =================================================================== 60497aa0a607SDon Lewis 60507aa0a607SDon LewisAC_MSG_CHECKING([whether to build the OpenGL Transitions component]) 60517aa0a607SDon LewisENABLE_OPENGL= 60527aa0a607SDon Lewis 60537aa0a607SDon Lewisif test "x$enable_opengl" != "xno" ; then 60547aa0a607SDon Lewis AC_MSG_RESULT([yes]) 60557aa0a607SDon Lewis AC_CHECK_HEADER(GL/gl.h, [], 60567aa0a607SDon Lewis [AC_MSG_ERROR([OpenGL headers not found])], []) 60577aa0a607SDon Lewis AC_CHECK_LIB(GL, main, [], 60587aa0a607SDon Lewis [AC_MSG_ERROR(libGL not installed or functional)], []) 60597aa0a607SDon Lewis AC_CHECK_LIB(GLU, main, [], 60607aa0a607SDon Lewis [AC_MSG_ERROR(libGLU not installed or functional)], []) 60617aa0a607SDon Lewis ENABLE_OPENGL=TRUE 60627aa0a607SDon Lewiselse 60637aa0a607SDon Lewis AC_MSG_RESULT([no]) 60647aa0a607SDon Lewisfi 60657aa0a607SDon Lewis 60667aa0a607SDon LewisAC_SUBST(ENABLE_OPENGL) 60677aa0a607SDon Lewis 60687aa0a607SDon Lewis 60697aa0a607SDon LewisAC_MSG_CHECKING([whether to build the PDF Import extension]) 60707aa0a607SDon Lewisif test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then 60717aa0a607SDon Lewis AC_MSG_RESULT([yes]) 60727aa0a607SDon Lewis ENABLE_PDFIMPORT=YES 60737aa0a607SDon Lewis 60747aa0a607SDon Lewis dnl =================================================================== 60757aa0a607SDon Lewis dnl Check for system poppler 60767aa0a607SDon Lewis dnl =================================================================== 60777aa0a607SDon Lewis AC_MSG_CHECKING([whether to use system pdf backend]) 60787aa0a607SDon Lewis if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ 60797aa0a607SDon Lewis test "$with_system_poppler" != "no"; then 60807aa0a607SDon Lewis AC_MSG_RESULT([external]) 60817aa0a607SDon Lewis SYSTEM_POPPLER=YES 60827aa0a607SDon Lewis PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 ) 60837aa0a607SDon Lewis else 60847aa0a607SDon Lewis AC_MSG_RESULT([no]) 60857aa0a607SDon Lewis SYSTEM_POPPLER=NO 60867aa0a607SDon Lewis ENABLE_PDFIMPORT=NO 60877aa0a607SDon Lewis fi 60887aa0a607SDon Lewiselse 60897aa0a607SDon Lewis AC_MSG_RESULT([no]) 60907aa0a607SDon Lewis ENABLE_PDFIMPORT=NO 60917aa0a607SDon Lewisfi 60927aa0a607SDon LewisAC_SUBST(ENABLE_PDFIMPORT) 60937aa0a607SDon LewisAC_SUBST(SYSTEM_POPPLER) 60947aa0a607SDon LewisAC_SUBST(POPPLER_CFLAGS) 60957aa0a607SDon LewisAC_SUBST(POPPLER_LIBS) 60967aa0a607SDon Lewis 60977aa0a607SDon LewisAC_MSG_CHECKING([whether to build the Wiki Publisher extension]) 60987aa0a607SDon Lewisif test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then 60997aa0a607SDon Lewis AC_MSG_RESULT([yes]) 61007aa0a607SDon Lewis AC_MSG_CHECKING([for swext module]) 61017aa0a607SDon Lewis if test -d ./swext; then 61027aa0a607SDon Lewis AC_MSG_RESULT([OK]) 61037aa0a607SDon Lewis else 61047aa0a607SDon Lewis AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 61057aa0a607SDon Lewis fi 61067aa0a607SDon Lewis ENABLE_MEDIAWIKI=YES 61077aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE SWEXT" 61087aa0a607SDon Lewiselse 61097aa0a607SDon Lewis AC_MSG_RESULT([no]) 61107aa0a607SDon Lewis ENABLE_MEDIAWIKI=NO 61117aa0a607SDon Lewisfi 61127aa0a607SDon LewisAC_SUBST(ENABLE_MEDIAWIKI) 61137aa0a607SDon Lewis 61147aa0a607SDon Lewisif test "$ENABLE_MEDIAWIKI" = "YES"; then 61157aa0a607SDon Lewis AC_MSG_CHECKING([which Servlet API Jar to use]) 61167aa0a607SDon Lewis if test -n "$with_system_servlet_api"; then 61177aa0a607SDon Lewis AC_MSG_RESULT([external]) 61187aa0a607SDon Lewis SYSTEM_SERVLETAPI=YES 61197aa0a607SDon Lewis if test -z "$SERVLETAPI_JAR"; then 61207aa0a607SDon Lewis SERVLETAPI_JAR=/usr/share/java/servlet-api.jar 61217aa0a607SDon Lewis fi 61227aa0a607SDon Lewis AC_CHECK_FILE($SERVLETAPI_JAR, [], 61237aa0a607SDon Lewis [AC_MSG_ERROR(servlet-api.jar not found.)], []) 61247aa0a607SDon Lewis else 61257aa0a607SDon Lewis AC_MSG_RESULT([internal]) 61267aa0a607SDon Lewis SYSTEM_SERVLETAPI=NO 61277aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE TOMCAT" 61287aa0a607SDon Lewis fi 61297aa0a607SDon Lewisfi 61307aa0a607SDon LewisAC_SUBST(SYSTEM_SERVLETAPI) 61317aa0a607SDon LewisAC_SUBST(SERVLETAPI_JAR) 61327aa0a607SDon Lewis 61337aa0a607SDon LewisAC_MSG_CHECKING([whether to build the Report Builder extension]) 61347aa0a607SDon Lewisif test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then 61357aa0a607SDon Lewis AC_MSG_RESULT([yes]) 61367aa0a607SDon Lewis ENABLE_REPORTBUILDER=YES 61377aa0a607SDon Lewis SYSTEM_JFREEREPORT=YES 61387aa0a607SDon Lewis AC_MSG_CHECKING([for reportbuilder module]) 61397aa0a607SDon Lewis if test -d ./reportbuilder; then 61407aa0a607SDon Lewis AC_MSG_RESULT([OK]) 61417aa0a607SDon Lewis else 61427aa0a607SDon Lewis AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) 61437aa0a607SDon Lewis fi 61447aa0a607SDon Lewis AC_MSG_CHECKING([which jfreereport libs to use (for Report Builder extension)]) 61457aa0a607SDon Lewis AC_MSG_RESULT([external]) 61467aa0a607SDon Lewis if test -z $SAC_JAR; then 61477aa0a607SDon Lewis SAC_JAR=/usr/share/java/sac.jar 61487aa0a607SDon Lewis fi 61497aa0a607SDon Lewis AC_CHECK_FILE($SAC_JAR, [], 61507aa0a607SDon Lewis [AC_MSG_ERROR(sac.jar not found.)], []) 61517aa0a607SDon Lewis 61527aa0a607SDon Lewis if test -z $LIBXML_JAR; then 61537aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar, 61547aa0a607SDon Lewis [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ], 61557aa0a607SDon Lewis [ 61567aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libxml.jar, 61577aa0a607SDon Lewis [ LIBXML_JAR=/usr/share/java/libxml.jar ], 61587aa0a607SDon Lewis [AC_MSG_ERROR(libxml.jar replacement not found.)] 61597aa0a607SDon Lewis ) 61607aa0a607SDon Lewis ] 61617aa0a607SDon Lewis ) 61627aa0a607SDon Lewis else 61637aa0a607SDon Lewis AC_CHECK_FILE($LIBXML_JAR, [], 61647aa0a607SDon Lewis [AC_MSG_ERROR(libxml.jar not found.)], []) 61657aa0a607SDon Lewis fi 61667aa0a607SDon Lewis 61677aa0a607SDon Lewis if test -z $FLUTE_JAR; then 61687aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar, 61697aa0a607SDon Lewis [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ], 61707aa0a607SDon Lewis [ 61717aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/flute.jar, 61727aa0a607SDon Lewis [ FLUTE_JAR=/usr/share/java/flute.jar ], 61737aa0a607SDon Lewis [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)] 61747aa0a607SDon Lewis ) 61757aa0a607SDon Lewis ] 61767aa0a607SDon Lewis ) 61777aa0a607SDon Lewis else 61787aa0a607SDon Lewis AC_CHECK_FILE($FLUTE_JAR, [], 61797aa0a607SDon Lewis [AC_MSG_ERROR(flute-1.3.0.jar not found.)], []) 61807aa0a607SDon Lewis fi 61817aa0a607SDon Lewis 61827aa0a607SDon Lewis if test -z $JFREEREPORT_JAR; then 61837aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar, 61847aa0a607SDon Lewis [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ], 61857aa0a607SDon Lewis [ 61867aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/flow-engine.jar, 61877aa0a607SDon Lewis [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ], 61887aa0a607SDon Lewis [AC_MSG_ERROR(jfreereport.jar replacement not found.)] 61897aa0a607SDon Lewis ) 61907aa0a607SDon Lewis ] 61917aa0a607SDon Lewis ) 61927aa0a607SDon Lewis else 61937aa0a607SDon Lewis AC_CHECK_FILE($JFREEREPORT_JAR, [], 61947aa0a607SDon Lewis [AC_MSG_ERROR(jfreereport.jar not found.)], []) 61957aa0a607SDon Lewis fi 61967aa0a607SDon Lewis 61977aa0a607SDon Lewis if test -z $LIBLAYOUT_JAR; then 61987aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar, 61997aa0a607SDon Lewis [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ], 62007aa0a607SDon Lewis [ 62017aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/liblayout.jar, 62027aa0a607SDon Lewis [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ], 62037aa0a607SDon Lewis [AC_MSG_ERROR(liblayout.jar replacement not found.)] 62047aa0a607SDon Lewis ) 62057aa0a607SDon Lewis ] 62067aa0a607SDon Lewis ) 62077aa0a607SDon Lewis else 62087aa0a607SDon Lewis AC_CHECK_FILE($LIBLAYOUT_JAR, [], 62097aa0a607SDon Lewis [AC_MSG_ERROR(liblayout.jar not found.)], []) 62107aa0a607SDon Lewis fi 62117aa0a607SDon Lewis 62127aa0a607SDon Lewis if test -z $LIBLOADER_JAR; then 62137aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar, 62147aa0a607SDon Lewis [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ], 62157aa0a607SDon Lewis [ 62167aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libloader.jar, 62177aa0a607SDon Lewis [ LIBLOADER_JAR=/usr/share/java/libloader.jar ], 62187aa0a607SDon Lewis [AC_MSG_ERROR(libloader.jar replacement not found.)] 62197aa0a607SDon Lewis ) 62207aa0a607SDon Lewis ] 62217aa0a607SDon Lewis ) 62227aa0a607SDon Lewis else 62237aa0a607SDon Lewis AC_CHECK_FILE($LIBLOADER_JAR, [], 62247aa0a607SDon Lewis [AC_MSG_ERROR(libloader.jar not found.)], []) 62257aa0a607SDon Lewis fi 62267aa0a607SDon Lewis 62277aa0a607SDon Lewis if test -z $LIBFORMULA_JAR; then 62287aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar, 62297aa0a607SDon Lewis [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ], 62307aa0a607SDon Lewis [ 62317aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libformula.jar, 62327aa0a607SDon Lewis [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ], 62337aa0a607SDon Lewis [AC_MSG_ERROR(libformula.jar replacement not found.)] 62347aa0a607SDon Lewis ) 62357aa0a607SDon Lewis ] 62367aa0a607SDon Lewis ) 62377aa0a607SDon Lewis else 62387aa0a607SDon Lewis AC_CHECK_FILE($LIBFORMULA_JAR, [], 62397aa0a607SDon Lewis [AC_MSG_ERROR(libformula.jar not found.)], []) 62407aa0a607SDon Lewis fi 62417aa0a607SDon Lewis 62427aa0a607SDon Lewis if test -z $LIBREPOSITORY_JAR; then 62437aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar, 62447aa0a607SDon Lewis [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ], 62457aa0a607SDon Lewis [ 62467aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/librepository.jar, 62477aa0a607SDon Lewis [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ], 62487aa0a607SDon Lewis [AC_MSG_ERROR(librepository.jar replacement not found.)] 62497aa0a607SDon Lewis ) 62507aa0a607SDon Lewis ] 62517aa0a607SDon Lewis ) 62527aa0a607SDon Lewis else 62537aa0a607SDon Lewis AC_CHECK_FILE($LIBREPOSITORY_JAR, [], 62547aa0a607SDon Lewis [AC_MSG_ERROR(librepository.jar not found.)], []) 62557aa0a607SDon Lewis fi 62567aa0a607SDon Lewis 62577aa0a607SDon Lewis if test -z $LIBFONTS_JAR; then 62587aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar, 62597aa0a607SDon Lewis [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ], 62607aa0a607SDon Lewis [ 62617aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libfonts.jar, 62627aa0a607SDon Lewis [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ], 62637aa0a607SDon Lewis [AC_MSG_ERROR(libfonts.jar replacement not found.)] 62647aa0a607SDon Lewis ) 62657aa0a607SDon Lewis ] 62667aa0a607SDon Lewis ) 62677aa0a607SDon Lewis else 62687aa0a607SDon Lewis AC_CHECK_FILE($LIBFONTS_JAR, [], 62697aa0a607SDon Lewis [AC_MSG_ERROR(libfonts.jar not found.)], []) 62707aa0a607SDon Lewis fi 62717aa0a607SDon Lewis 62727aa0a607SDon Lewis if test -z $LIBSERIALIZER_JAR; then 62737aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar, 62747aa0a607SDon Lewis [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ], 62757aa0a607SDon Lewis [ 62767aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libserializer.jar, 62777aa0a607SDon Lewis [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ], 62787aa0a607SDon Lewis [AC_MSG_ERROR(libserializer.jar replacement not found.)] 62797aa0a607SDon Lewis ) 62807aa0a607SDon Lewis ] 62817aa0a607SDon Lewis ) 62827aa0a607SDon Lewis else 62837aa0a607SDon Lewis AC_CHECK_FILE($LIBSERIALIZER_JAR, [], 62847aa0a607SDon Lewis [AC_MSG_ERROR(libserializer.jar not found.)], []) 62857aa0a607SDon Lewis fi 62867aa0a607SDon Lewis 62877aa0a607SDon Lewis 62887aa0a607SDon Lewis if test -z $LIBBASE_JAR; then 62897aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar, 62907aa0a607SDon Lewis [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ], 62917aa0a607SDon Lewis [ 62927aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/libbase.jar, 62937aa0a607SDon Lewis [ LIBBASE_JAR=/usr/share/java/libbase.jar ], 62947aa0a607SDon Lewis [AC_MSG_ERROR(libbase.jar replacement not found.)] 62957aa0a607SDon Lewis ) 62967aa0a607SDon Lewis ] 62977aa0a607SDon Lewis ) 62987aa0a607SDon Lewis else 62997aa0a607SDon Lewis AC_CHECK_FILE($LIBBASE_JAR, [], 63007aa0a607SDon Lewis [AC_MSG_ERROR(libbase.jar not found.)], []) 63017aa0a607SDon Lewis fi 63027aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" 63037aa0a607SDon Lewiselse 63047aa0a607SDon Lewis AC_MSG_RESULT([no]) 63057aa0a607SDon Lewis ENABLE_REPORTBUILDER=NO 63067aa0a607SDon Lewisfi 63077aa0a607SDon LewisAC_SUBST(ENABLE_REPORTBUILDER) 63087aa0a607SDon LewisAC_SUBST(SYSTEM_JFREEREPORT) 63097aa0a607SDon LewisAC_SUBST(SAC_JAR) 63107aa0a607SDon LewisAC_SUBST(LIBXML_JAR) 63117aa0a607SDon LewisAC_SUBST(FLUTE_JAR) 63127aa0a607SDon LewisAC_SUBST(JFREEREPORT_JAR) 63137aa0a607SDon LewisAC_SUBST(LIBBASE_JAR) 63147aa0a607SDon LewisAC_SUBST(LIBLAYOUT_JAR) 63157aa0a607SDon LewisAC_SUBST(LIBLOADER_JAR) 63167aa0a607SDon LewisAC_SUBST(LIBFORMULA_JAR) 63177aa0a607SDon LewisAC_SUBST(LIBREPOSITORY_JAR) 63187aa0a607SDon LewisAC_SUBST(LIBFONTS_JAR) 63197aa0a607SDon LewisAC_SUBST(LIBSERIALIZER_JAR) 63207aa0a607SDon Lewis 63217aa0a607SDon Lewis# this has to be here because both the wiki publisher and the SRB use 63227aa0a607SDon Lewis# commons-logging 63237aa0a607SDon Lewisif test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then 63247aa0a607SDon Lewis AC_MSG_CHECKING([which Apache commons-* libs to use]) 63257aa0a607SDon Lewis if test "$with_system_apache_commons" = "yes"; then 63267aa0a607SDon Lewis SYSTEM_APACHE_COMMONS=YES 63277aa0a607SDon Lewis AC_MSG_RESULT([external]) 63287aa0a607SDon Lewis if test "$ENABLE_MEDIAWIKI" = "YES"; then 63297aa0a607SDon Lewis if test -z $COMMONS_CODEC_JAR; then 633017435e9bSJuergen Schmidt AC_CHECK_FILE(/usr/share/java/commons-codec-1.9.jar, 633117435e9bSJuergen Schmidt [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.9.jar ], 63327aa0a607SDon Lewis [ 63337aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/commons-codec.jar, 63347aa0a607SDon Lewis [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ], 63357aa0a607SDon Lewis [AC_MSG_ERROR(commons-codec.jar replacement not found.)] 63367aa0a607SDon Lewis ) 63377aa0a607SDon Lewis ] 63387aa0a607SDon Lewis ) 63397aa0a607SDon Lewis else 63407aa0a607SDon Lewis AC_CHECK_FILE($COMMONS_CODEC_JAR, [], 63417aa0a607SDon Lewis [AC_MSG_ERROR(commons-codec.jar not found.)], []) 63427aa0a607SDon Lewis fi 63437aa0a607SDon Lewis 63447aa0a607SDon Lewis if test -z $COMMONS_LANG_JAR; then 634517435e9bSJuergen Schmidt AC_CHECK_FILE(/usr/share/java/commons-lang3-3.3.jar, 634617435e9bSJuergen Schmidt [ COMMONS_LANG_JAR=/usr/share/java/commons-lang3-3.3.jar ], 63477aa0a607SDon Lewis [ 63487aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/commons-lang.jar, 63497aa0a607SDon Lewis [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ], 63507aa0a607SDon Lewis [AC_MSG_ERROR(commons-lang.jar replacement not found.)] 63517aa0a607SDon Lewis ) 63527aa0a607SDon Lewis ] 63537aa0a607SDon Lewis ) 63547aa0a607SDon Lewis else 63557aa0a607SDon Lewis AC_CHECK_FILE($COMMONS_LANG_JAR, [], 63567aa0a607SDon Lewis [AC_MSG_ERROR(commons-lang.jar not found.)], []) 63577aa0a607SDon Lewis fi 63587aa0a607SDon Lewis 63597aa0a607SDon Lewis if test -z $COMMONS_HTTPCLIENT_JAR; then 63607aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar, 63617aa0a607SDon Lewis [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ], 63627aa0a607SDon Lewis [ 63637aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar, 63647aa0a607SDon Lewis [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ], 63657aa0a607SDon Lewis [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)] 63667aa0a607SDon Lewis ) 63677aa0a607SDon Lewis ] 63687aa0a607SDon Lewis ) 63697aa0a607SDon Lewis else 63707aa0a607SDon Lewis AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [], 63717aa0a607SDon Lewis [AC_MSG_ERROR(commons-httpclient.jar not found.)], []) 63727aa0a607SDon Lewis fi 63737aa0a607SDon Lewis fi 63747aa0a607SDon Lewis if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then 63757aa0a607SDon Lewis if test -z $COMMONS_LOGGING_JAR; then 637617435e9bSJuergen Schmidt AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.3.jar, 637717435e9bSJuergen Schmidt [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.3.jar ], 63787aa0a607SDon Lewis [ 63797aa0a607SDon Lewis AC_CHECK_FILE(/usr/share/java/commons-logging.jar, 63807aa0a607SDon Lewis [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ], 63817aa0a607SDon Lewis [AC_MSG_ERROR(commons-logging.jar replacement not found.)] 63827aa0a607SDon Lewis ) 63837aa0a607SDon Lewis ] 63847aa0a607SDon Lewis ) 63857aa0a607SDon Lewis else 63867aa0a607SDon Lewis AC_CHECK_FILE($COMMONS_LOGGING_JAR, [], 63877aa0a607SDon Lewis [AC_MSG_ERROR(commons-logging.jar not found.)], []) 63887aa0a607SDon Lewis fi 63897aa0a607SDon Lewis fi 63907aa0a607SDon Lewis else 63917aa0a607SDon Lewis AC_MSG_RESULT([internal]) 63927aa0a607SDon Lewis SYSTEM_APACHE_COMMONS=NO 63937aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" 63947aa0a607SDon Lewis fi 63957aa0a607SDon Lewisfi 63967aa0a607SDon LewisAC_SUBST(SYSTEM_APACHE_COMMONS) 63977aa0a607SDon LewisAC_SUBST(COMMONS_CODEC_JAR) 63987aa0a607SDon LewisAC_SUBST(COMMONS_LANG_JAR) 63997aa0a607SDon LewisAC_SUBST(COMMONS_HTTPCLIENT_JAR) 64007aa0a607SDon LewisAC_SUBST(COMMONS_LOGGING_JAR) 64017aa0a607SDon Lewis 64027aa0a607SDon Lewisdnl =================================================================== 64037aa0a607SDon Lewisdnl Check whether the Qt and KDE libraries are available. 64047aa0a607SDon Lewisdnl =================================================================== 64057aa0a607SDon Lewis 64067aa0a607SDon LewisKDE_CFLAGS="" 64077aa0a607SDon LewisKDE_LIBS="" 64087aa0a607SDon LewisMOC="moc" 64097aa0a607SDon Lewisif test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then 64107aa0a607SDon Lewis dnl Search paths for Qt and KDE 64117aa0a607SDon Lewis if test "$build_cpu" != "x86_64" ; then 64127aa0a607SDon Lewis 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" 64137aa0a607SDon Lewis 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" 64147aa0a607SDon Lewis else 64157aa0a607SDon Lewis 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" 64167aa0a607SDon Lewis 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" 64177aa0a607SDon Lewis fi 64187aa0a607SDon Lewis if test -n "$QTDIR" ; then 64197aa0a607SDon Lewis qt_incdirs="$QTDIR/include $qt_incdirs" 64207aa0a607SDon Lewis if test "$build_cpu" != "x86_64" ; then 64217aa0a607SDon Lewis qt_libdirs="$QTDIR/lib $qt_libdirs" 64227aa0a607SDon Lewis else 64237aa0a607SDon Lewis qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs" 64247aa0a607SDon Lewis fi 64257aa0a607SDon Lewis fi 64267aa0a607SDon Lewis if test "$build_cpu" != "x86_64" ; then 64277aa0a607SDon Lewis 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" 64287aa0a607SDon Lewis 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" 64297aa0a607SDon Lewis else 64307aa0a607SDon Lewis 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" 64317aa0a607SDon Lewis 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" 64327aa0a607SDon Lewis fi 64337aa0a607SDon Lewis if test -n "$KDEDIR" ; then 64347aa0a607SDon Lewis kde_incdirs="$KDEDIR/include $kde_incdirs" 64357aa0a607SDon Lewis if test "$build_cpu" != "x86_64" ; then 64367aa0a607SDon Lewis kde_libdirs="$KDEDIR/lib $kde_libdirs" 64377aa0a607SDon Lewis else 64387aa0a607SDon Lewis kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs" 64397aa0a607SDon Lewis fi 64407aa0a607SDon Lewis fi 64417aa0a607SDon Lewis 64427aa0a607SDon Lewis dnl What to test 64437aa0a607SDon Lewis qt_test_include="qstyle.h" 64447aa0a607SDon Lewis qt_test_library="libqt-mt.so" 64457aa0a607SDon Lewis kde_test_include="ksharedptr.h" 64467aa0a607SDon Lewis kde_test_library="libkdeui.so" 64477aa0a607SDon Lewis 64487aa0a607SDon Lewis dnl Check for Qt headers 64497aa0a607SDon Lewis AC_MSG_CHECKING([for Qt headers]) 64507aa0a607SDon Lewis qt_incdir="no" 64517aa0a607SDon Lewis for kde_check in $qt_incdirs ; do 64527aa0a607SDon Lewis if test -r "$kde_check/$qt_test_include" ; then 64537aa0a607SDon Lewis qt_incdir="$kde_check" 64547aa0a607SDon Lewis break 64557aa0a607SDon Lewis fi 64567aa0a607SDon Lewis done 64577aa0a607SDon Lewis AC_MSG_RESULT([$qt_incdir]) 64587aa0a607SDon Lewis if test "x$qt_incdir" = "xno" ; then 64597aa0a607SDon Lewis AC_MSG_ERROR([Qt headers not found. Please specify the root of 64607aa0a607SDon Lewisyour Qt installation by exporting QTDIR before running "configure".]) 64617aa0a607SDon Lewis fi 64627aa0a607SDon Lewis 64637aa0a607SDon Lewis dnl Check for Qt libraries 64647aa0a607SDon Lewis AC_MSG_CHECKING([for Qt libraries]) 64657aa0a607SDon Lewis qt_libdir="no" 64667aa0a607SDon Lewis for qt_check in $qt_libdirs ; do 64677aa0a607SDon Lewis if test -r "$qt_check/$qt_test_library" ; then 64687aa0a607SDon Lewis qt_libdir="$qt_check" 64697aa0a607SDon Lewis break 64707aa0a607SDon Lewis fi 64717aa0a607SDon Lewis done 64727aa0a607SDon Lewis AC_MSG_RESULT([$qt_libdir]) 64737aa0a607SDon Lewis if test "x$qt_libdir" = "xno" ; then 64747aa0a607SDon Lewis AC_MSG_ERROR([Qt libraries not found. Please specify the root of 64757aa0a607SDon Lewisyour Qt installation by exporting QTDIR before running "configure".]) 64767aa0a607SDon Lewis fi 64777aa0a607SDon Lewis 64787aa0a607SDon Lewis dnl Check for Meta Object Compiler 64797aa0a607SDon Lewis AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] ) 64807aa0a607SDon Lewis if test "$MOC" = "no" ; then 64817aa0a607SDon Lewis AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify 64827aa0a607SDon Lewisthe root of your Qt installation by exporting QTDIR before running "configure".]) 64837aa0a607SDon Lewis fi 64847aa0a607SDon Lewis 64857aa0a607SDon Lewis dnl Check for KDE headers 64867aa0a607SDon Lewis AC_MSG_CHECKING([for KDE headers]) 64877aa0a607SDon Lewis kde_incdir="no" 64887aa0a607SDon Lewis for kde_check in $kde_incdirs ; do 64897aa0a607SDon Lewis if test -r "$kde_check/$kde_test_include" ; then 64907aa0a607SDon Lewis kde_incdir="$kde_check" 64917aa0a607SDon Lewis break 64927aa0a607SDon Lewis fi 64937aa0a607SDon Lewis done 64947aa0a607SDon Lewis AC_MSG_RESULT([$kde_incdir]) 64957aa0a607SDon Lewis if test "x$kde_incdir" = "xno" ; then 64967aa0a607SDon Lewis AC_MSG_ERROR([KDE headers not found. Please specify the root of 64977aa0a607SDon Lewisyour KDE installation by exporting KDEDIR before running "configure".]) 64987aa0a607SDon Lewis fi 64997aa0a607SDon Lewis 65007aa0a607SDon Lewis dnl Check for KDE libraries 65017aa0a607SDon Lewis AC_MSG_CHECKING([for KDE libraries]) 65027aa0a607SDon Lewis kde_libdir="no" 65037aa0a607SDon Lewis for kde_check in $kde_libdirs ; do 65047aa0a607SDon Lewis if test -r "$kde_check/$kde_test_library" ; then 65057aa0a607SDon Lewis kde_libdir="$kde_check" 65067aa0a607SDon Lewis break 65077aa0a607SDon Lewis fi 65087aa0a607SDon Lewis done 65097aa0a607SDon Lewis AC_MSG_RESULT([$kde_libdir]) 65107aa0a607SDon Lewis if test "x$kde_libdir" = "xno" ; then 65117aa0a607SDon Lewis AC_MSG_ERROR([KDE libraries not found. Please specify the root of 65127aa0a607SDon Lewisyour KDE installation by exporting KDEDIR before running "configure".]) 65137aa0a607SDon Lewis fi 65147aa0a607SDon Lewis 65157aa0a607SDon Lewis dnl Set the variables 65167aa0a607SDon Lewis KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" 65177aa0a607SDon Lewis KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt" 65187aa0a607SDon Lewisfi 65197aa0a607SDon LewisAC_SUBST(KDE_CFLAGS) 65207aa0a607SDon LewisAC_SUBST(KDE_LIBS) 65217aa0a607SDon LewisAC_SUBST(MOC) 65227aa0a607SDon Lewis 65237aa0a607SDon Lewisdnl =================================================================== 65247aa0a607SDon Lewisdnl KDE4 Integration 65257aa0a607SDon Lewisdnl =================================================================== 65267aa0a607SDon Lewis 65277aa0a607SDon LewisKDE4_CFLAGS="" 65287aa0a607SDon LewisKDE4_LIBS="" 65297aa0a607SDon LewisMOC4="moc" 65307aa0a607SDon Lewisif test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then 65317aa0a607SDon Lewis qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes" 65327aa0a607SDon Lewis qt_libdirs="$QT4LIB /usr/lib $x_libraries" 65337aa0a607SDon Lewis 65347aa0a607SDon Lewis kde_incdirs="/usr/include /usr/include/kde4 $x_includes" 65357aa0a607SDon Lewis kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries" 65367aa0a607SDon Lewis 65377aa0a607SDon Lewis if test "$build_cpu" = "x86_64" ; then 65387aa0a607SDon Lewis qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64" 65397aa0a607SDon Lewis kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel" 65407aa0a607SDon Lewis fi 65417aa0a607SDon Lewis 65427aa0a607SDon Lewis if test -n "$KDE4DIR" ; then 65437aa0a607SDon Lewis kde_incdirs="$KDE4DIR/include $kde_incdirs" 65447aa0a607SDon Lewis if test "$build_cpu" != "x86_64" ; then 65457aa0a607SDon Lewis kde_libdirs="$KDE4DIR/lib $kde_libdirs" 65467aa0a607SDon Lewis else 65477aa0a607SDon Lewis kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs" 65487aa0a607SDon Lewis fi 65497aa0a607SDon Lewis fi 65507aa0a607SDon Lewis 65517aa0a607SDon Lewis qt_test_include="Qt/qobject.h" 65527aa0a607SDon Lewis qt_test_library="libQtCore.so" 65537aa0a607SDon Lewis kde_test_include="ksharedptr.h" 65547aa0a607SDon Lewis kde_test_library="libkdeui.so" 65557aa0a607SDon Lewis 65567aa0a607SDon Lewis AC_MSG_CHECKING([for Qt4 headers]) 65577aa0a607SDon Lewis qt_header_dir="no" 65587aa0a607SDon Lewis for inc_dir in $qt_incdirs ; do 65597aa0a607SDon Lewis if test -r "$inc_dir/$qt_test_include" ; then 65607aa0a607SDon Lewis qt_header_dir="$inc_dir" 65617aa0a607SDon Lewis break 65627aa0a607SDon Lewis fi 65637aa0a607SDon Lewis done 65647aa0a607SDon Lewis 65657aa0a607SDon Lewis AC_MSG_RESULT([$qt_header_dir]) 65667aa0a607SDon Lewis if test "x$qt_header_dir" = "xno" ; then 65677aa0a607SDon Lewis AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) 65687aa0a607SDon Lewis fi 65697aa0a607SDon Lewis 65707aa0a607SDon Lewis AC_MSG_CHECKING([for Qt4 libraries]) 65717aa0a607SDon Lewis qt_lib_dir="no" 65727aa0a607SDon Lewis for lib_dir in $qt_libdirs ; do 65737aa0a607SDon Lewis if test -r "$lib_dir/$qt_test_library" ; then 65747aa0a607SDon Lewis qt_lib_dir="$lib_dir" 65757aa0a607SDon Lewis break 65767aa0a607SDon Lewis fi 65777aa0a607SDon Lewis done 65787aa0a607SDon Lewis 65797aa0a607SDon Lewis AC_MSG_RESULT([$qt_lib_dir]) 65807aa0a607SDon Lewis 65817aa0a607SDon Lewis if test "x$qt_lib_dir" = "xno" ; then 65827aa0a607SDon Lewis AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) 65837aa0a607SDon Lewis fi 65847aa0a607SDon Lewis 65857aa0a607SDon Lewis dnl Check for Meta Object Compiler 65867aa0a607SDon Lewis AC_PATH_PROG( MOCQT4, moc-qt4, no, [$QT4DIR/bin:$PATH] ) 65877aa0a607SDon Lewis MOC4="$MOCQT4" 65887aa0a607SDon Lewis if test "$MOC4" = "no" ; then 65897aa0a607SDon Lewis AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] ) 65907aa0a607SDon Lewis if test "$MOC4" = "no" ; then 65917aa0a607SDon Lewis AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT4DIR before running "configure".]) 65927aa0a607SDon Lewis fi 65937aa0a607SDon Lewis fi 65947aa0a607SDon Lewis 65957aa0a607SDon Lewis dnl Check for KDE4 headers 65967aa0a607SDon Lewis AC_MSG_CHECKING([for KDE4 headers]) 65977aa0a607SDon Lewis kde_incdir="no" 65987aa0a607SDon Lewis for kde_check in $kde_incdirs ; do 65997aa0a607SDon Lewis if test -r "$kde_check/$kde_test_include" ; then 66007aa0a607SDon Lewis kde_incdir="$kde_check" 66017aa0a607SDon Lewis break 66027aa0a607SDon Lewis fi 66037aa0a607SDon Lewis done 66047aa0a607SDon Lewis AC_MSG_RESULT([$kde_incdir]) 66057aa0a607SDon Lewis if test "x$kde_incdir" = "xno" ; then 66067aa0a607SDon Lewis AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) 66077aa0a607SDon Lewis fi 66087aa0a607SDon Lewis 66097aa0a607SDon Lewis dnl Check for KDE4 libraries 66107aa0a607SDon Lewis AC_MSG_CHECKING([for KDE4 libraries]) 66117aa0a607SDon Lewis kde_libdir="no" 66127aa0a607SDon Lewis for kde_check in $kde_libdirs ; do 66137aa0a607SDon Lewis if test -r "$kde_check/$kde_test_library" ; then 66147aa0a607SDon Lewis kde_libdir="$kde_check" 66157aa0a607SDon Lewis break 66167aa0a607SDon Lewis fi 66177aa0a607SDon Lewis done 66187aa0a607SDon Lewis 66197aa0a607SDon Lewis AC_MSG_RESULT([$kde_libdir]) 66207aa0a607SDon Lewis if test "x$kde_libdir" = "xno" ; then 66217aa0a607SDon Lewis AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) 66227aa0a607SDon Lewis fi 66237aa0a607SDon Lewis 66247aa0a607SDon Lewis KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" 66257aa0a607SDon Lewis KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui" 66267aa0a607SDon Lewisfi 66277aa0a607SDon LewisAC_SUBST(KDE4_CFLAGS) 66287aa0a607SDon LewisAC_SUBST(KDE4_LIBS) 66297aa0a607SDon LewisAC_SUBST(MOC4) 66307aa0a607SDon Lewis 66317aa0a607SDon Lewisdnl =================================================================== 66327aa0a607SDon Lewisdnl Test for the enabling the lockdown pieces 66337aa0a607SDon Lewisdnl =================================================================== 66347aa0a607SDon LewisAC_MSG_CHECKING([whether to enable the lockdown pieces]) 66357aa0a607SDon LewisENABLE_LOCKDOWN="" 66367aa0a607SDon Lewisif test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then 66377aa0a607SDon Lewis ENABLE_LOCKDOWN=YES 66387aa0a607SDon Lewis AC_MSG_RESULT([yes]) 66397aa0a607SDon Lewiselse 66407aa0a607SDon Lewis AC_MSG_RESULT([no]) 66417aa0a607SDon Lewisfi 66427aa0a607SDon LewisAC_SUBST(ENABLE_LOCKDOWN) 66437aa0a607SDon Lewis 66447aa0a607SDon Lewisdnl =================================================================== 66457aa0a607SDon Lewisdnl Test whether to include Evolution 2 support 66467aa0a607SDon Lewisdnl =================================================================== 66477aa0a607SDon LewisAC_MSG_CHECKING([whether to enable evolution 2 support]) 66487aa0a607SDon Lewisif test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then 66497aa0a607SDon Lewis AC_MSG_RESULT([yes]) 66507aa0a607SDon Lewis PKG_CHECK_MODULES(GOBJECT, gobject-2.0) 66517aa0a607SDon Lewis ENABLE_EVOAB2="TRUE" 66527aa0a607SDon Lewiselse 66537aa0a607SDon Lewis ENABLE_EVOAB2="" 66547aa0a607SDon Lewis AC_MSG_RESULT([no]) 66557aa0a607SDon Lewisfi 66567aa0a607SDon LewisAC_SUBST(ENABLE_EVOAB2) 66577aa0a607SDon LewisAC_SUBST(GOBJECT_CFLAGS) 66587aa0a607SDon LewisAC_SUBST(GOBJECT_LIBS) 66597aa0a607SDon Lewis 66607aa0a607SDon Lewisdnl =================================================================== 66617aa0a607SDon Lewisdnl Test whether to include KDE AB support 66627aa0a607SDon Lewisdnl =================================================================== 66637aa0a607SDon LewisAC_MSG_CHECKING([whether to enable KDE address book support]) 66647aa0a607SDon Lewisif test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then 66657aa0a607SDon Lewis AC_MSG_RESULT([yes]) 66667aa0a607SDon Lewis AC_LANG_PUSH([C++]) 66677aa0a607SDon Lewis save_CXXFLAGS=$CXXFLAGS 66687aa0a607SDon Lewis CXXFLAGS="$CXXFLAGS $KDE_CFLAGS" 66697aa0a607SDon Lewis AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6]) 66707aa0a607SDon Lewis AC_TRY_RUN([ 66717aa0a607SDon Lewis#include <kdeversion.h> 66727aa0a607SDon Lewis 66737aa0a607SDon Lewisint main(int argc, char **argv) { 66747aa0a607SDon Lewis if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0; 66757aa0a607SDon Lewis else return 1; 66767aa0a607SDon Lewis} 66777aa0a607SDon Lewis ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([KDE version too old or too recent, please use another version of KDE or disable KDE address book support])]) 66787aa0a607SDon Lewis CXXFLAGS=$save_CXXFLAGS 66797aa0a607SDon Lewis AC_LANG_POP([C++]) 66807aa0a607SDon Lewis ENABLE_KAB=TRUE 66817aa0a607SDon Lewiselse 66827aa0a607SDon Lewis AC_MSG_RESULT([no]) 66837aa0a607SDon Lewis ENABLE_KAB= 66847aa0a607SDon Lewisfi 66857aa0a607SDon LewisAC_SUBST(ENABLE_KAB) 66867aa0a607SDon Lewis 66877aa0a607SDon Lewisdnl =================================================================== 66887aa0a607SDon Lewisdnl Test whether to include MathMLDTD 66897aa0a607SDon Lewisdnl =================================================================== 66907aa0a607SDon LewisAC_MSG_CHECKING([whether to include MathMLDTD]) 66917aa0a607SDon Lewisif test -n "$enable_mathmldtd"; then 66927aa0a607SDon Lewis if test "$enable_mathmldtd" = "no"; then 66937aa0a607SDon Lewis AC_MSG_RESULT([no]) 66947aa0a607SDon Lewis SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" 66957aa0a607SDon Lewis else 66967aa0a607SDon Lewis AC_MSG_RESULT([yes]) 66977aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE MATHMLDTD" 66987aa0a607SDon Lewis fi 66997aa0a607SDon Lewiselse 67007aa0a607SDon Lewis AC_MSG_RESULT([no]) 67017aa0a607SDon Lewis SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" 67027aa0a607SDon Lewisfi 67037aa0a607SDon Lewis 67047aa0a607SDon Lewisdnl =================================================================== 67057aa0a607SDon Lewisdnl Test whether to include category-B fonts 67067aa0a607SDon Lewisdnl =================================================================== 67077aa0a607SDon LewisWITH_CATB_FONTS= 67087aa0a607SDon LewisAC_MSG_CHECKING([whether to include category B fonts]) 67097aa0a607SDon Lewisif test "x$enable_category_b_fonts" = "xyes" && test "x$with_fonts" != "xno"; then 67107aa0a607SDon Lewis AC_MSG_RESULT([yes]) 67117aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE CATB_FONTS" 67127aa0a607SDon Lewis WITH_CATB_FONTS=YES 67137aa0a607SDon Lewis SCPDEFS="$SCPDEFS -DWITH_CATB_FONTS" 67147aa0a607SDon Lewiselse 67157aa0a607SDon Lewis AC_MSG_RESULT([no]) 67167aa0a607SDon Lewis WITH_CATB_FONTS=NO 67177aa0a607SDon Lewisfi 67187aa0a607SDon Lewis 67197aa0a607SDon Lewisdnl =================================================================== 67207aa0a607SDon Lewisdnl Test whether to include category-A fonts 67217aa0a607SDon Lewisdnl =================================================================== 67227aa0a607SDon LewisWITH_CATA_FONTS= 67237aa0a607SDon LewisAC_MSG_CHECKING([whether to include category A fonts]) 67247aa0a607SDon Lewisif test "x$with_fonts" != "xno" ; then 67257aa0a607SDon Lewis AC_MSG_RESULT([yes]) 67267aa0a607SDon Lewis WITH_CATA_FONTS=YES 67277aa0a607SDon Lewis SCPDEFS="$SCPDEFS -DWITH_CATA_FONTS" 67287aa0a607SDon Lewiselse 67297aa0a607SDon Lewis AC_MSG_RESULT([no]) 67307aa0a607SDon Lewis WITH_CATA_FONTS=NO 67317aa0a607SDon Lewis WITH_CATB_FONTS=NO 67327aa0a607SDon Lewisfi 67337aa0a607SDon Lewis 67347aa0a607SDon LewisWITH_FONTS=NO 67357aa0a607SDon LewisAC_MSG_CHECKING([whether any fonts are included]) 67367aa0a607SDon Lewisif test "x$WITH_CATA_FONTS" = "xYES" -o "x$WITH_CATB_FONTS" = "xYES"; then 67377aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE MORE_FONTS" 67387aa0a607SDon Lewis WITH_FONTS=YES 67397aa0a607SDon Lewis AC_MSG_RESULT([yes]) 67407aa0a607SDon Lewiselse 67417aa0a607SDon Lewis AC_MSG_RESULT([no]) 67427aa0a607SDon Lewisfi 67437aa0a607SDon Lewis 67447aa0a607SDon LewisAC_SUBST(WITH_CATA_FONTS) 67457aa0a607SDon LewisAC_SUBST(WITH_CATB_FONTS) 67467aa0a607SDon LewisAC_SUBST(WITH_FONTS) 67477aa0a607SDon Lewis 67487aa0a607SDon Lewisdnl =================================================================== 67497aa0a607SDon Lewisdnl Test whether to include ppds 67507aa0a607SDon Lewisdnl =================================================================== 67517aa0a607SDon LewisAC_MSG_CHECKING([whether to include PPDs]) 67527aa0a607SDon Lewisif test "$with_ppds" != "no"; then 67537aa0a607SDon Lewis AC_MSG_RESULT([yes]) 67547aa0a607SDon Lewiselse 67557aa0a607SDon Lewis AC_MSG_RESULT([no]) 67567aa0a607SDon Lewis WITHOUT_PPDS=YES 67577aa0a607SDon Lewis SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" 67587aa0a607SDon Lewisfi 67597aa0a607SDon LewisAC_SUBST(WITHOUT_PPDS) 67607aa0a607SDon Lewis 67617aa0a607SDon Lewisdnl =================================================================== 67627aa0a607SDon Lewisdnl Test whether to include afms 67637aa0a607SDon Lewisdnl =================================================================== 67647aa0a607SDon LewisAC_MSG_CHECKING([whether to include AFMs]) 67657aa0a607SDon Lewisif test "$with_afms" != "no"; then 67667aa0a607SDon Lewis AC_MSG_RESULT([yes]) 67677aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE AFMS" 67687aa0a607SDon Lewiselse 67697aa0a607SDon Lewis AC_MSG_RESULT([no]) 67707aa0a607SDon Lewis WITHOUT_AFMS=YES 67717aa0a607SDon Lewis SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" 67727aa0a607SDon Lewisfi 67737aa0a607SDon LewisAC_SUBST(WITHOUT_AFMS) 67747aa0a607SDon Lewis 67757aa0a607SDon LewisAC_SUBST(SCPDEFS) 67767aa0a607SDon Lewis 67777aa0a607SDon LewisAC_MSG_CHECKING([whether and how to use Xinerama]) 67787aa0a607SDon Lewisif test "$_os" = "Darwin"; then 67797aa0a607SDon Lewis USE_XINERAMA=YES 67807aa0a607SDon Lewis XINERAMA_LINK=dynamic 67817aa0a607SDon Lewis AC_MSG_RESULT([yes]) 67827aa0a607SDon Lewiselif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then 67837aa0a607SDon Lewis if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then 67847aa0a607SDon Lewis # we have both versions, let the user decide but use the dynamic one 67857aa0a607SDon Lewis # per default 67867aa0a607SDon Lewis USE_XINERAMA=YES 67877aa0a607SDon Lewis if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then 67887aa0a607SDon Lewis XINERAMA_LINK=dynamic 67897aa0a607SDon Lewis else 67907aa0a607SDon Lewis XINERAMA_LINK=static 67917aa0a607SDon Lewis fi 67927aa0a607SDon Lewis elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then 67937aa0a607SDon Lewis # we have only the dynamic version 67947aa0a607SDon Lewis USE_XINERAMA=YES 67957aa0a607SDon Lewis XINERAMA_LINK=dynamic 67967aa0a607SDon Lewis elif test -e "$XLIB/libXinerama.a"; then 67977aa0a607SDon Lewis # static version 67987aa0a607SDon Lewis if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then 67997aa0a607SDon Lewis USE_XINERAMA=YES 68007aa0a607SDon Lewis XINERAMA_LINK=static 68017aa0a607SDon Lewis else 68027aa0a607SDon Lewis USE_XINERAMA=NO 68037aa0a607SDon Lewis XINERAMA_LINK=none 68047aa0a607SDon Lewis fi 68057aa0a607SDon Lewis else 68067aa0a607SDon Lewis # no Xinerama 68077aa0a607SDon Lewis USE_XINERAMA=NO 68087aa0a607SDon Lewis XINERAMA_LINK=none 68097aa0a607SDon Lewis fi 68107aa0a607SDon Lewis if test "$USE_XINERAMA" = "YES"; then 68117aa0a607SDon Lewis AC_MSG_RESULT([yes, with $XINERAMA_LINK linking]) 68127aa0a607SDon Lewis AC_CHECK_HEADER(X11/extensions/Xinerama.h, [], 68137aa0a607SDon Lewis [AC_MSG_ERROR(Xinerama header not found.)], []) 68147aa0a607SDon Lewis XINERAMA_EXTRA_LIBS="-L$XLIB -lXext" 68157aa0a607SDon Lewis if test "$_os" = "FreeBSD"; then 68167aa0a607SDon Lewis XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt" 68177aa0a607SDon Lewis fi 68187aa0a607SDon Lewis if test "$_os" = "Linux"; then 68197aa0a607SDon Lewis XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" 68207aa0a607SDon Lewis fi 68217aa0a607SDon Lewis AC_CHECK_LIB(Xinerama, XineramaIsActive, [], 68227aa0a607SDon Lewis [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS]) 68237aa0a607SDon Lewis else 68247aa0a607SDon Lewis AC_MSG_RESULT([no, libXinerama not found or wrong architecture.]) 68257aa0a607SDon Lewis fi 68267aa0a607SDon Lewiselse 68277aa0a607SDon Lewis AC_MSG_RESULT([no]) 68287aa0a607SDon Lewisfi 68297aa0a607SDon LewisAC_SUBST(USE_XINERAMA) 68307aa0a607SDon LewisAC_SUBST(XINERAMA_LINK) 68317aa0a607SDon Lewis 68327aa0a607SDon Lewisdnl =================================================================== 68337aa0a607SDon Lewisdnl always rely on the system version of gdk-pixbuf 68347aa0a607SDon Lewisdnl =================================================================== 68357aa0a607SDon Lewis 68367aa0a607SDon LewisSYSTEM_GDKPIXBUF=YES 68377aa0a607SDon LewisAC_SUBST(SYSTEM_GDKPIXBUF) 68387aa0a607SDon Lewis 68397aa0a607SDon Lewisdnl =================================================================== 68407aa0a607SDon Lewisdnl always rely on the system version of glib 68417aa0a607SDon Lewisdnl =================================================================== 68427aa0a607SDon Lewis 68437aa0a607SDon LewisSYSTEM_GLIB=YES 68447aa0a607SDon LewisAC_SUBST(SYSTEM_GLIB) 68457aa0a607SDon Lewis 68467aa0a607SDon Lewisdnl =================================================================== 68477aa0a607SDon Lewisdnl always rely on the system version of gettext 68487aa0a607SDon Lewisdnl =================================================================== 68497aa0a607SDon Lewis 68507aa0a607SDon LewisSYSTEM_GETTEXT=YES 68517aa0a607SDon LewisAC_SUBST(SYSTEM_GETTEXT) 68527aa0a607SDon Lewis 68537aa0a607SDon Lewisif test "$_os" = "FreeBSD"; then 68547aa0a607SDon Lewis LIBINTL_PREFIX= 68557aa0a607SDon Lewis for dir in $CPPFLAGS; do 68567aa0a607SDon Lewis if dir=`expr -- $dir : '-I\(.*\)'`; then 68577aa0a607SDon Lewis if test -f "$dir/libintl.h" ; then 68587aa0a607SDon Lewis LIBINTL_PREFIX=`dirname $dir` 68597aa0a607SDon Lewis fi 68607aa0a607SDon Lewis fi 68617aa0a607SDon Lewis done 68627aa0a607SDon Lewis AC_SUBST(LIBINTL_PREFIX) 68637aa0a607SDon Lewisfi 68647aa0a607SDon Lewis 68657aa0a607SDon Lewisdnl =================================================================== 68667aa0a607SDon Lewisdnl always rely on the system version of pango 68677aa0a607SDon Lewisdnl =================================================================== 68687aa0a607SDon Lewis 68697aa0a607SDon LewisSYSTEM_PANGO=YES 68707aa0a607SDon LewisAC_SUBST(SYSTEM_PANGO) 68717aa0a607SDon Lewis 68727aa0a607SDon Lewisdnl =================================================================== 68737aa0a607SDon Lewisdnl Test whether to build libpng or rely on the system version 68747aa0a607SDon Lewisdnl =================================================================== 68757aa0a607SDon LewisAC_MSG_CHECKING([whether to build own version of libpng]) 68767aa0a607SDon Lewis 68777aa0a607SDon Lewiscase "$_os" in 68787aa0a607SDon Lewis WINNT*) # Windows 68797aa0a607SDon Lewis SYSTEM_LIBPNG=NO 68807aa0a607SDon Lewis AC_MSG_RESULT([yes]) 68817aa0a607SDon Lewis ;; 68827aa0a607SDon Lewis Darwin*) 68837aa0a607SDon Lewis SYSTEM_LIBPNG=NO 68847aa0a607SDon Lewis AC_MSG_RESULT([yes]) 68857aa0a607SDon Lewis ;; 68867aa0a607SDon Lewis *) 68877aa0a607SDon Lewis SYSTEM_LIBPNG=YES 68887aa0a607SDon Lewis AC_MSG_RESULT([no]) 68897aa0a607SDon Lewis ;; 68907aa0a607SDon Lewisesac 68917aa0a607SDon LewisAC_SUBST(SYSTEM_LIBPNG) 68927aa0a607SDon Lewis 68937aa0a607SDon Lewisdnl =================================================================== 68947aa0a607SDon Lewisdnl Test whether to build libjpeg or rely on the system version 68957aa0a607SDon Lewisdnl =================================================================== 68967aa0a607SDon Lewisdnl FIXME: this is currently because we have jpeg-6b for our filters 68977aa0a607SDon Lewisdnl and jpeg-8 as dependency for librsvg 68987aa0a607SDon Lewisdnl this should be unified into using only one version for both 68997aa0a607SDon Lewis 69007aa0a607SDon LewisAC_MSG_CHECKING([whether to build own version of libjpeg]) 69017aa0a607SDon Lewis 69027aa0a607SDon Lewisif test "$SYSTEM_JPEG" = "YES"; then 69037aa0a607SDon LewisSYSTEM_LIBJPEG=YES 69047aa0a607SDon Lewiselse 69057aa0a607SDon Lewiscase "$_os" in 69067aa0a607SDon Lewis WINNT*) # Windows 69077aa0a607SDon Lewis SYSTEM_LIBJPEG=NO 69087aa0a607SDon Lewis ;; 69097aa0a607SDon Lewis Darwin*) 69107aa0a607SDon Lewis SYSTEM_LIBJPEG=NO 69117aa0a607SDon Lewis ;; 69127aa0a607SDon Lewis *) 69137aa0a607SDon Lewis SYSTEM_LIBJPEG=YES 69147aa0a607SDon Lewis ;; 69157aa0a607SDon Lewisesac 69167aa0a607SDon Lewisfi 69177aa0a607SDon Lewis 69187aa0a607SDon Lewisif test "$SYSTEM_LIBJPEG" = "YES"; then 69197aa0a607SDon Lewis AC_MSG_RESULT([no]) 69207aa0a607SDon Lewiselse 69217aa0a607SDon Lewis AC_MSG_RESULT([yes]) 69227aa0a607SDon Lewisfi 69237aa0a607SDon LewisAC_SUBST(SYSTEM_LIBJPEG) 69247aa0a607SDon Lewis 69257aa0a607SDon Lewisdnl =================================================================== 69267aa0a607SDon Lewisdnl Test whether rat scan was requested and whether apache-rat is available 69277aa0a607SDon Lewisdnl =================================================================== 69287aa0a607SDon LewisRAT_JAR= 69297aa0a607SDon LewisAC_MSG_CHECKING([whether to trigger rat scan]) 69307aa0a607SDon Lewisif test -z "$with_rat_scan" -o "$with_rat_scan" = "no"; then 69317aa0a607SDon Lewis AC_MSG_RESULT([no]) 69327aa0a607SDon Lewiselse 69337aa0a607SDon Lewis if test "$WITH_JAVA" = "no"; then 69347aa0a607SDon Lewis AC_MSG_ERROR([no, java disabled, enable with --with-java]) 69357aa0a607SDon Lewis elif test "$enable_saxon" = "no"; then 69367aa0a607SDon Lewis AC_MSG_ERROR([no, saxon disabled, enable with --enable-category-b]) 69377aa0a607SDon Lewis elif test "$with_rat_scan" = "yes"; then 69387aa0a607SDon Lewis AC_MSG_RESULT([yes, use pre-built library]) 69397aa0a607SDon Lewis RAT_JAR_HOME="BUILD" 69407aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE RAT" 69417aa0a607SDon Lewis else 69427aa0a607SDon Lewis AC_MSG_RESULT([yes, use pre-installed library]) 69437aa0a607SDon Lewis AC_MSG_CHECKING([whether apache-rat is available]) 69447aa0a607SDon Lewis if test -d "$with_rat_scan"; then 69457aa0a607SDon Lewis RAT_JAR_HOME=$with_rat_scan 69467aa0a607SDon Lewis else 69477aa0a607SDon Lewis AC_MSG_ERROR([$with_rat_scan is not a directory]) 69487aa0a607SDon Lewis fi 69497aa0a607SDon Lewis fi 69507aa0a607SDon Lewisfi 69517aa0a607SDon LewisAC_SUBST(RAT_JAR_HOME) 69527aa0a607SDon Lewis 69537aa0a607SDon Lewis 69547aa0a607SDon Lewisdnl =================================================================== 69557aa0a607SDon Lewisdnl Test for the presence of Ant and that it works 69567aa0a607SDon Lewisdnl =================================================================== 69577aa0a607SDon Lewis 69587aa0a607SDon Lewisif test "$SOLAR_JAVA" != ""; then 69597aa0a607SDon LewisANT_HOME=; export ANT_HOME 69607aa0a607SDon LewisWITH_ANT_HOME=; export WITH_ANT_HOME 69617aa0a607SDon Lewisif test -z "$with_ant_home"; then 69627aa0a607SDon Lewis if test "$_os" = "OS2"; then 69637aa0a607SDon Lewis AC_PATH_PROGS(ANT, ant.cmd) 69647aa0a607SDon Lewis else 69657aa0a607SDon Lewis AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd]) 69667aa0a607SDon Lewis fi 69677aa0a607SDon Lewiselse 69687aa0a607SDon Lewis if test "$_os" = "WINNT"; then 69697aa0a607SDon Lewis with_ant_home=`cygpath -u "$with_ant_home"` 69707aa0a607SDon Lewis fi 69717aa0a607SDon Lewis if test "$_os" = "OS2"; then 69727aa0a607SDon Lewis AC_PATH_PROGS(ANT, ant.cmd,,$with_ant_home/bin:$PATH) 69737aa0a607SDon Lewis else 69747aa0a607SDon Lewis AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH) 69757aa0a607SDon Lewis fi 69767aa0a607SDon Lewis WITH_ANT_HOME=$with_ant_home 69777aa0a607SDon Lewis ANT_HOME=$with_ant_home 69787aa0a607SDon Lewisfi 69797aa0a607SDon Lewis 69807aa0a607SDon Lewisif test -z "$ANT"; then 69817aa0a607SDon Lewis AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home]) 69827aa0a607SDon Lewiselse 69837aa0a607SDon Lewis # resolve relative or absolute symlink 69847aa0a607SDon Lewis while test -h "$ANT"; do 69857aa0a607SDon Lewis a_cwd=`pwd` 69867aa0a607SDon Lewis a_basename=`basename "$ANT"` 69877aa0a607SDon Lewis a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"` 69887aa0a607SDon Lewis cd "`dirname "$ANT"`" 69897aa0a607SDon Lewis cd "`dirname "$a_script"`" 69907aa0a607SDon Lewis ANT="`pwd`"/"`basename "$a_script"`" 69917aa0a607SDon Lewis cd "$a_cwd" 69927aa0a607SDon Lewis done 69937aa0a607SDon Lewis 69947aa0a607SDon Lewis if test "$_os" = "OS2"; then 69957aa0a607SDon Lewis ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` 69967aa0a607SDon Lewis export ANT_HOME 69977aa0a607SDon Lewis fi 69987aa0a607SDon Lewis 69997aa0a607SDon Lewis AC_MSG_CHECKING([if $ANT works]) 70007aa0a607SDon Lewiscat > conftest.java << EOF 70017aa0a607SDon Lewis public class conftest { 70027aa0a607SDon Lewis int testmethod(int a, int b) { 70037aa0a607SDon Lewis return a + b; 70047aa0a607SDon Lewis } 70057aa0a607SDon Lewis } 70067aa0a607SDon LewisEOF 70077aa0a607SDon Lewis 70087aa0a607SDon Lewiscat > conftest.xml << EOF 70097aa0a607SDon Lewis <project name="conftest" default="conftest"> 70107aa0a607SDon Lewis <target name="conftest"> 70117aa0a607SDon Lewis <javac srcdir="." includes="conftest.java"> 70127aa0a607SDon Lewis </javac> 70137aa0a607SDon Lewis </target> 70147aa0a607SDon Lewis </project> 70157aa0a607SDon LewisEOF 70167aa0a607SDon Lewis oldJAVA_HOME=$JAVA_HOME 70177aa0a607SDon Lewis if test "$JAVACISGCJ" = "yes"; then 70187aa0a607SDon Lewis JAVA_HOME=; export JAVA_HOME 70197aa0a607SDon Lewis ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" 70207aa0a607SDon Lewis else 70217aa0a607SDon Lewis ant_cmd="$ANT -buildfile conftest.xml 1>&2" 70227aa0a607SDon Lewis fi 70237aa0a607SDon Lewis AC_TRY_EVAL(ant_cmd) 70247aa0a607SDon Lewis if test $? = 0 && test -f ./conftest.class ; then 70257aa0a607SDon Lewis AC_MSG_RESULT([Ant works]) 70267aa0a607SDon Lewis if test -z "$WITH_ANT_HOME"; then 70277aa0a607SDon Lewis ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` 70287aa0a607SDon Lewis if test -z "$ANT_HOME"; then 70297aa0a607SDon Lewis ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` 70307aa0a607SDon Lewis fi 70317aa0a607SDon Lewis else 70327aa0a607SDon Lewis ANT_HOME="$WITH_ANT_HOME" 70337aa0a607SDon Lewis fi 70347aa0a607SDon Lewis else 70357aa0a607SDon Lewis echo "configure: Ant test failed" >&5 70367aa0a607SDon Lewis cat conftest.java >&5 70377aa0a607SDon Lewis cat conftest.xml >&5 70387aa0a607SDon Lewis AC_MSG_WARN([Ant does not work - Some Java projects will not build!]) 70397aa0a607SDon Lewis ANT_HOME="" 70407aa0a607SDon Lewis echo "Ant does not work - Some Java projects will not build!" >>warn 70417aa0a607SDon Lewis fi 70427aa0a607SDon Lewis JAVA_HOME=$oldJAVA_HOME 70437aa0a607SDon Lewis rm -f conftest* core core.* *.core 70447aa0a607SDon Lewisfi 70457aa0a607SDon Lewisif test -z "$ANT_HOME"; then 70467aa0a607SDon Lewis ANT_HOME="NO_ANT_HOME" 70477aa0a607SDon Lewisfi 70487aa0a607SDon LewisAC_SUBST(ANT_HOME) 70497aa0a607SDon Lewis 70507aa0a607SDon Lewisdnl Checking for ant.jar 70517aa0a607SDon Lewisif test "$ANT_HOME" != "NO_ANT_HOME"; then 70527aa0a607SDon Lewis AC_MSG_CHECKING([Ant lib directory]) 70537aa0a607SDon Lewis if test -f $ANT_HOME/lib/ant.jar; then 70547aa0a607SDon Lewis ANT_LIB="$ANT_HOME/lib" 70557aa0a607SDon Lewis else 70567aa0a607SDon Lewis if test -f $ANT_HOME/ant.jar; then 70577aa0a607SDon Lewis ANT_LIB="$ANT_HOME" 70587aa0a607SDon Lewis else 70597aa0a607SDon Lewis if test -f /usr/share/java/ant.jar; then 70607aa0a607SDon Lewis ANT_LIB=/usr/share/java 70617aa0a607SDon Lewis else 70627aa0a607SDon Lewis if test -f /usr/share/ant-core/lib/ant.jar; then 70637aa0a607SDon Lewis ANT_LIB=/usr/share/ant-core/lib 70647aa0a607SDon Lewis else 70657aa0a607SDon Lewis if test -f $ANT_HOME/lib/ant/ant.jar; then 70667aa0a607SDon Lewis ANT_LIB="$ANT_HOME/lib/ant" 70677aa0a607SDon Lewis else 70687aa0a607SDon Lewis if test -f /usr/share/lib/ant/ant.jar; then 70697aa0a607SDon Lewis ANT_LIB=/usr/share/lib/ant 70707aa0a607SDon Lewis else 70717aa0a607SDon Lewis AC_MSG_ERROR([Ant libraries not found!]) 70727aa0a607SDon Lewis fi 70737aa0a607SDon Lewis fi 70747aa0a607SDon Lewis fi 70757aa0a607SDon Lewis fi 70767aa0a607SDon Lewis fi 70777aa0a607SDon Lewis fi 70787aa0a607SDon Lewis AC_MSG_RESULT([Ant lib directory found.]) 70797aa0a607SDon Lewisfi 70807aa0a607SDon LewisAC_SUBST(ANT_LIB) 70817aa0a607SDon Lewisfi 70827aa0a607SDon Lewis 70837aa0a607SDon Lewisant_minver=1.6.0 70847aa0a607SDon Lewis# update for more extensions... 70857aa0a607SDon Lewisif test "$ENABLE_MEDIAWIKI" = "YES"; then 70867aa0a607SDon Lewis ant_minver=1.7.0 70877aa0a607SDon Lewisfi 70887aa0a607SDon Lewisant_minminor1=`echo $ant_minver | cut -d"." -f2` 70897aa0a607SDon Lewis 70907aa0a607SDon LewisAC_MSG_CHECKING([whether ant is >= $ant_minver]) 70917aa0a607SDon Lewisant_version=`$ANT -version | $AWK '{ print $4; }'` 70927aa0a607SDon Lewisant_version_major=`echo $ant_version | cut -d. -f1` 70937aa0a607SDon Lewisant_version_minor=`echo $ant_version | cut -d. -f2` 70947aa0a607SDon Lewisecho "configure: ant_version $ant_version " >&5 70957aa0a607SDon Lewisecho "configure: ant_version_major $ant_version_major " >&5 70967aa0a607SDon Lewisecho "configure: ant_version_minor $ant_version_minor " >&5 70977aa0a607SDon Lewisif test "$ant_version_major" -ge "2"; then 70987aa0a607SDon Lewis AC_MSG_RESULT([yes, $ant_version]) 70997aa0a607SDon Lewiselif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then 71007aa0a607SDon Lewis AC_MSG_RESULT([yes, $ant_version]) 71017aa0a607SDon Lewiselse 71027aa0a607SDon Lewis AC_MSG_ERROR([no, you need at least ant >= $ant_minver]) 71037aa0a607SDon Lewisfi 71047aa0a607SDon Lewis 71057aa0a607SDon Lewisif test "$ENABLE_MEDIAWIKI" = "YES"; then 71067aa0a607SDon LewisAC_MSG_CHECKING([whether ant supports mapper type="regexp"]) 71077aa0a607SDon Lewisrm -rf confdir 71087aa0a607SDon Lewismkdir confdir 71097aa0a607SDon Lewiscat > conftest.java << EOF 71107aa0a607SDon Lewis public class conftest { 71117aa0a607SDon Lewis int testmethod(int a, int b) { 71127aa0a607SDon Lewis return a + b; 71137aa0a607SDon Lewis } 71147aa0a607SDon Lewis } 71157aa0a607SDon LewisEOF 71167aa0a607SDon Lewis 71177aa0a607SDon Lewiscat > conftest.xml << EOF 71187aa0a607SDon Lewis <project name="conftest" default="conftest"> 71197aa0a607SDon Lewis <target name="conftest" depends="copytest"> 71207aa0a607SDon Lewis <javac srcdir="." includes="conftest.java"> 71217aa0a607SDon Lewis </javac> 71227aa0a607SDon Lewis </target> 71237aa0a607SDon Lewis <target name="copytest"> 71247aa0a607SDon Lewis <copy todir="confdir"> 71257aa0a607SDon Lewis <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/> 71267aa0a607SDon Lewis <filterset/> 71277aa0a607SDon Lewis <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/> 71287aa0a607SDon Lewis </copy> 71297aa0a607SDon Lewis </target> 71307aa0a607SDon Lewis </project> 71317aa0a607SDon LewisEOF 71327aa0a607SDon Lewis if test "$JAVACISGCJ" = "yes"; then 71337aa0a607SDon Lewis JAVA_HOME=; export JAVA_HOME 71347aa0a607SDon Lewis ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" 71357aa0a607SDon Lewis else 71367aa0a607SDon Lewis ant_cmd="$ANT -buildfile conftest.xml 1>&2" 71377aa0a607SDon Lewis fi 71387aa0a607SDon Lewis AC_TRY_EVAL(ant_cmd) 71397aa0a607SDon Lewis if test $? = 0 && test -f ./conftest.class ; then 71407aa0a607SDon Lewis AC_MSG_RESULT([yes]) 71417aa0a607SDon Lewis rm -rf confdir 71427aa0a607SDon Lewis else 71437aa0a607SDon Lewis echo "configure: Ant test failed" >&5 71447aa0a607SDon Lewis cat conftest.java >&5 71457aa0a607SDon Lewis cat conftest.xml >&5 71467aa0a607SDon Lewis rm -rf confdir 71477aa0a607SDon Lewis AC_MSG_ERROR([no. Did you install ant-apache-regexp?]) 71487aa0a607SDon Lewis fi 71497aa0a607SDon Lewisfi 71507aa0a607SDon Lewisrm -f conftest* core core.* *.core 71517aa0a607SDon Lewis 71527aa0a607SDon LewisOOO_JUNIT_JAR= 71537aa0a607SDon Lewisif test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then 71547aa0a607SDon Lewis AC_MSG_CHECKING([for JUnit 4]) 71557aa0a607SDon Lewis if test "$with_junit" = "yes"; then 71567aa0a607SDon Lewis if test -e /usr/share/java/junit4.jar; then 71577aa0a607SDon Lewis OOO_JUNIT_JAR=/usr/share/java/junit4.jar 71587aa0a607SDon Lewis else 71597aa0a607SDon Lewis if test -e /usr/share/lib/java/junit.jar; then 71607aa0a607SDon Lewis OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar 71617aa0a607SDon Lewis else 71627aa0a607SDon Lewis OOO_JUNIT_JAR=/usr/share/java/junit.jar 71637aa0a607SDon Lewis fi 71647aa0a607SDon Lewis fi 71657aa0a607SDon Lewis else 71667aa0a607SDon Lewis OOO_JUNIT_JAR=$with_junit 71677aa0a607SDon Lewis fi 71687aa0a607SDon Lewis if test "$_os" = "WINNT"; then 71697aa0a607SDon Lewis OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"` 71707aa0a607SDon Lewis fi 71717aa0a607SDon Lewis "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \ 71727aa0a607SDon Lewis grep org/junit/Before.class > /dev/null 2>&5 71737aa0a607SDon Lewis if test $? -eq 0; then 71747aa0a607SDon Lewis AC_MSG_RESULT([$OOO_JUNIT_JAR]) 71757aa0a607SDon Lewis else 71767aa0a607SDon Lewis AC_MSG_RESULT([no]) 71777aa0a607SDon Lewis AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default 71787aa0a607SDon Lewislocation (/usr/share/java), specify its pathname via 71797aa0a607SDon Lewis--with-junit=..., or disable it via --without-junit]) 71807aa0a607SDon Lewis fi 71817aa0a607SDon Lewisfi 71827aa0a607SDon LewisAC_SUBST(OOO_JUNIT_JAR) 71837aa0a607SDon Lewis 71847aa0a607SDon LewisAC_MSG_CHECKING([which languages to be built]) 71857aa0a607SDon LewisWITH_LANG="$with_lang" 71867aa0a607SDon Lewisif test -z "$WITH_LANG"; then 71877aa0a607SDon Lewis AC_MSG_RESULT([en-US]) 71887aa0a607SDon Lewiselse 71897aa0a607SDon Lewis AC_MSG_RESULT([$WITH_LANG]) 71907aa0a607SDon Lewis ADDITIONAL_REPOSITORIES="$ADDITIONAL_REPOSITORIES ../extras" 71917aa0a607SDon Lewis BUILD_TYPE="$BUILD_TYPE L10N" 71927aa0a607SDon Lewisfi 71937aa0a607SDon LewisAC_SUBST(WITH_LANG) 71947aa0a607SDon Lewis 71957aa0a607SDon LewisAC_MSG_CHECKING([which languages have poor help localizations]) 71967aa0a607SDon LewisWITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations" 71977aa0a607SDon Lewisif test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then 71987aa0a607SDon Lewis AC_MSG_RESULT([none]) 71997aa0a607SDon Lewiselse 72007aa0a607SDon Lewis AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS]) 72017aa0a607SDon Lewisfi 72027aa0a607SDon LewisAC_SUBST(WITH_POOR_HELP_LOCALIZATIONS) 72037aa0a607SDon Lewis 72047aa0a607SDon LewisAC_MSG_CHECKING([which dictionaries to include]) 72057aa0a607SDon Lewisif test -z "$with_dict"; then 72067aa0a607SDon Lewis WITH_DICT=,ALL, 72077aa0a607SDon Lewis AC_MSG_RESULT([ALL]) 72087aa0a607SDon Lewiselse 72097aa0a607SDon Lewis WITH_DICT=","$with_dict"," 72107aa0a607SDon Lewis AC_MSG_RESULT([$with_dict]) 72117aa0a607SDon Lewisfi 72127aa0a607SDon LewisAC_SUBST(WITH_DICT) 72137aa0a607SDon Lewis 72147aa0a607SDon LewisAC_MSG_CHECKING([for additional 'intro' bitmaps]) 72157aa0a607SDon LewisINTRO_BITMAPS= 72167aa0a607SDon Lewisif test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then 72177aa0a607SDon Lewis INTRO_BITMAPS= 72187aa0a607SDon Lewis AC_MSG_RESULT([none]) 72197aa0a607SDon Lewiselse 72207aa0a607SDon Lewis for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do 72217aa0a607SDon Lewis case "$bitmap" in 72227aa0a607SDon Lewis *.png) ;; 72237aa0a607SDon Lewis *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .png files!]) ;; 72247aa0a607SDon Lewis esac 72257aa0a607SDon Lewis if test -n "$bitmap" ; then 72267aa0a607SDon Lewis INTRO_BITMAPS="$INTRO_BITMAPS $bitmap" 72277aa0a607SDon Lewis fi 72287aa0a607SDon Lewis done 72297aa0a607SDon Lewis AC_MSG_RESULT([$INTRO_BITMAPS]) 72307aa0a607SDon Lewisfi 72317aa0a607SDon LewisAC_SUBST(INTRO_BITMAPS) 72327aa0a607SDon Lewis 72337aa0a607SDon LewisAC_MSG_CHECKING([for additional 'about' bitmaps]) 72347aa0a607SDon LewisABOUT_BITMAPS= 72357aa0a607SDon Lewisif test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then 72367aa0a607SDon Lewis ABOUT_BITMAPS= 72377aa0a607SDon Lewis AC_MSG_RESULT([none]) 72387aa0a607SDon Lewiselse 72397aa0a607SDon Lewis for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do 72407aa0a607SDon Lewis case "$bitmap" in 72417aa0a607SDon Lewis *.png) ;; 72427aa0a607SDon Lewis *) bitmap= ; AC_MSG_WARN([About bitmaps should be .png files!]) ;; 72437aa0a607SDon Lewis esac 72447aa0a607SDon Lewis if test -n "$bitmap" ; then 72457aa0a607SDon Lewis ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap" 72467aa0a607SDon Lewis fi 72477aa0a607SDon Lewis done 72487aa0a607SDon Lewis AC_MSG_RESULT([$ABOUT_BITMAPS]) 72497aa0a607SDon Lewisfi 72507aa0a607SDon LewisAC_SUBST(ABOUT_BITMAPS) 72517aa0a607SDon Lewis 72527aa0a607SDon LewisOOO_VENDOR= 72537aa0a607SDon LewisAC_MSG_CHECKING([for vendor]) 72547aa0a607SDon Lewisif test -z "$with_vendor" -o "$with_vendor" = "no" ; then 72557aa0a607SDon Lewis AC_MSG_RESULT([not set]) 72567aa0a607SDon Lewiselse 72577aa0a607SDon Lewis OOO_VENDOR="$with_vendor" 72587aa0a607SDon Lewis AC_MSG_RESULT([$OOO_VENDOR]) 72597aa0a607SDon Lewisfi 72607aa0a607SDon LewisAC_SUBST(OOO_VENDOR) 72617aa0a607SDon Lewis 72627aa0a607SDon LewisUNIXWRAPPERNAME= 72637aa0a607SDon LewisAC_MSG_CHECKING([for UNIX wrapper name]) 72647aa0a607SDon Lewisif test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then 72657aa0a607SDon Lewis AC_MSG_RESULT([not set]) 72667aa0a607SDon Lewiselse 72677aa0a607SDon Lewis UNIXWRAPPERNAME="$with_unix_wrapper" 72687aa0a607SDon Lewis AC_MSG_RESULT([$UNIXWRAPPERNAME]) 72697aa0a607SDon Lewisfi 72707aa0a607SDon LewisAC_SUBST(UNIXWRAPPERNAME) 72717aa0a607SDon Lewis 72727aa0a607SDon LewisAC_MSG_CHECKING([whether to statically link to Gtk]) 72737aa0a607SDon Lewisif test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then 72747aa0a607SDon Lewis ENABLE_STATIC_GTK="TRUE" 72757aa0a607SDon Lewis AC_MSG_RESULT([yes]) 72767aa0a607SDon Lewiselse 72777aa0a607SDon Lewis ENABLE_STATIC_GTK="FALSE" 72787aa0a607SDon Lewis AC_MSG_RESULT([no]) 72797aa0a607SDon Lewisfi 72807aa0a607SDon LewisAC_SUBST(ENABLE_STATIC_GTK) 72817aa0a607SDon Lewis 72827aa0a607SDon LewisAC_MSG_CHECKING([whether to use layout dialogs]) 72837aa0a607SDon Lewisif test -n "$enable_layout" && test "$enable_layout" != "no"; then 72847aa0a607SDon Lewis ENABLE_LAYOUT="TRUE" 72857aa0a607SDon Lewis AC_MSG_RESULT([yes]) 72867aa0a607SDon Lewiselse 72877aa0a607SDon Lewis ENABLE_LAYOUT="FALSE" 72887aa0a607SDon Lewis AC_MSG_RESULT([no]) 72897aa0a607SDon Lewisfi 72907aa0a607SDon LewisAC_SUBST(ENABLE_LAYOUT) 72917aa0a607SDon Lewis 72927aa0a607SDon Lewis# =================================================================== 72937aa0a607SDon Lewis# De- or increase default verbosity of build process 72947aa0a607SDon Lewis# =================================================================== 72957aa0a607SDon LewisAC_MSG_CHECKING([build verbosity]) 72967aa0a607SDon Lewisif test -n "$enable_verbose"; then 72977aa0a607SDon Lewis if test "$enable_verbose" = "yes"; then 72987aa0a607SDon Lewis VERBOSE="TRUE" 72997aa0a607SDon Lewis AC_MSG_RESULT([high]) 73007aa0a607SDon Lewis fi 73017aa0a607SDon Lewis if test "$enable_verbose" = "no"; then 73027aa0a607SDon Lewis VERBOSE="FALSE" 73037aa0a607SDon Lewis AC_MSG_RESULT([low]) 73047aa0a607SDon Lewis fi 73057aa0a607SDon Lewiselse 73067aa0a607SDon Lewis AC_MSG_RESULT([not set]) 73077aa0a607SDon Lewisfi 73087aa0a607SDon LewisAC_SUBST(VERBOSE) 73097aa0a607SDon Lewis 73107aa0a607SDon Lewisdnl =================================================================== 73117aa0a607SDon Lewisdnl Hook up OOos nodep environmental variable to automake's equivalent 73127aa0a607SDon Lewisdnl --enable-dependency-tracking configure option 73137aa0a607SDon Lewisdnl =================================================================== 73147aa0a607SDon LewisAC_MSG_CHECKING([whether to enable dependency tracking]) 73157aa0a607SDon Lewisif test "$enable_dependency_tracking" = "no"; then 73167aa0a607SDon Lewis nodep=TRUE 73177aa0a607SDon Lewis AC_MSG_RESULT([no]) 73187aa0a607SDon Lewiselse 73197aa0a607SDon Lewis AC_MSG_RESULT([yes]) 73207aa0a607SDon Lewisfi 73217aa0a607SDon LewisAC_SUBST(nodep) 73227aa0a607SDon Lewis 73237aa0a607SDon Lewisdnl =================================================================== 73247aa0a607SDon Lewisdnl Setting up the environment. 73257aa0a607SDon Lewisdnl =================================================================== 73267aa0a607SDon Lewisecho "********************************************************************" 73277aa0a607SDon Lewisecho "* *" 73287aa0a607SDon Lewisecho "* Setting up the build environment variables. *" 73297aa0a607SDon Lewisecho "* *" 73307aa0a607SDon Lewisecho "********************************************************************" 73317aa0a607SDon Lewis 73327aa0a607SDon Lewisif test -z "$COMPATH"; then 73337aa0a607SDon Lewis AC_MSG_ERROR([No compiler found.]) 73347aa0a607SDon Lewisfi 73357aa0a607SDon LewisAC_SUBST(COMPATH) 73367aa0a607SDon LewisAC_SUBST(CC_PATH) 73377aa0a607SDon Lewis 73387aa0a607SDon LewisAC_MSG_CHECKING([solver path]) 73397aa0a607SDon Lewisif test -z "$with_local_solver"; then 73407aa0a607SDon Lewis LOCAL_SOLVER="DEFAULT" 73417aa0a607SDon Lewis AC_MSG_RESULT([default]) 73427aa0a607SDon Lewiselse 73437aa0a607SDon Lewis LOCAL_SOLVER=$with_local_solver 73447aa0a607SDon Lewis AC_MSG_RESULT([$with_local_solver]) 73457aa0a607SDon Lewisfi 73467aa0a607SDon LewisAC_SUBST(LOCAL_SOLVER) 73477aa0a607SDon Lewis 73487aa0a607SDon LewisAC_SUBST(BUILD_TYPE) 73497aa0a607SDon LewisAC_SUBST(ADDITIONAL_REPOSITORIES) 73507aa0a607SDon Lewis 73517aa0a607SDon Lewis# make sure config.guess is +x; we execute config.guess, so it has to be so; 73527aa0a607SDon Lewischmod +x ./config.guess 73537aa0a607SDon Lewis 73547aa0a607SDon Lewis# Create files from their *.in templates. 73557aa0a607SDon LewisAC_CONFIG_FILES([set_soenv Makefile]) 73567aa0a607SDon Lewis 73577aa0a607SDon LewisAC_MSG_NOTICE([writing config.status]) 73587aa0a607SDon LewisAC_OUTPUT 73597aa0a607SDon Lewis 73607aa0a607SDon Lewisdnl Executing the set_soenv script to setup the environment variables. 73617aa0a607SDon Lewischmod a+x set_soenv 73627aa0a607SDon Lewisif test -z "$enable_check_only"; then 73637aa0a607SDon Lewis './set_soenv' 73647aa0a607SDon Lewiselse 73657aa0a607SDon Lewis echo 73667aa0a607SDon Lewis echo Test Complete 73677aa0a607SDon Lewis echo No environment file will be generated 73687aa0a607SDon Lewis echo 73697aa0a607SDon Lewis num_warnings=`wc -l warn` 73707aa0a607SDon Lewis _num=`echo $num_warnings | $AWK '{ print $1 }'` 73717aa0a607SDon Lewis if test $_num -gt 0; then 73727aa0a607SDon Lewis echo The following warning\(s\) were generated by configure 73737aa0a607SDon Lewis echo ---------------------------------------------------- 73747aa0a607SDon Lewis echo 73757aa0a607SDon Lewis cat warn 73767aa0a607SDon Lewis echo 73777aa0a607SDon Lewis else 73787aa0a607SDon Lewis echo There were no warnings 73797aa0a607SDon Lewis fi 73807aa0a607SDon Lewis echo 73817aa0a607SDon Lewisfi 7382