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