1 dnl /******************************************************************
2 dnl * vi:set sw=3 ts=3 et:
4 dnl * Name: configure.in
5 dnl * Auth: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems Ireland
6 dnl * Date: $Date: 2008-09-08 07:38:40 $
8 dnl * Desc: This file serves as input for the GNU autoconf package
9 dnl * in order to create a configure script.
10 dnl * In this stage configure just checks the pre-requisites
11 dnl * necessary to build OpenOffice.org
14 dnl ******************************************************************/
15 AC_REVISION( $Revision: 1.290 $ )
18 echo "$@" >config.parms
19 AC_ARG_WITH(gnu-patch,
20 [ --with-gnu-patch Specify location of GNU patch on Solaris or FreeBSD
23 [ --without-agg Disable the use of agg altogether
26 [ --with-gnu-cp Specify location of GNU cp on Solaris or FreeBSD
28 AC_ARG_ENABLE(graphite,
29 [ --enable-graphite Enables the compilation of Graphite smart font rendering
31 AC_ARG_WITH(system-graphite,
32 [ --with-system-graphite use graphite library already installed on system
35 [ --disable-ldap Disables the use of LDAP backend via Netscape/Mozilla
38 AC_ARG_ENABLE(fetch-external,
39 [ --disable-fetch-external Disables fetching external tarballs from web sources.
41 AC_ARG_WITH(external-tar,
42 [ --with-external-tar=<TARFILE PATH> Specify path to tarfiles manually ],
43 [ TARFILE_LOCATION="$withval"
46 [ --with-openldap Enables the use of the OpenLDAP LDAP SDK instead
47 of the Netscape/Mozilla one
49 AC_ARG_ENABLE(lockdown,
50 [ --enable-lockdown Enables the gconf integration work in OOo
53 [ --disable-vba disables the vba compatibility feature
55 AC_ARG_WITH(vba-package-format,
56 [ --with-vba-package-format specify package format for vba compatibility api.
57 Specifying "builtin" means the api component and
58 associated type library are part of the installation set.
59 Specifying "extn" creates an uno extension that is
60 part of the installation set ( located in the program
61 directory ) that MUST be optionly registered using
62 either the unopkg executeable or the extension manager
65 Note: "builtin" is the default, "extn" can cause
67 Usage: --with-vba-package-format="builtin" or
68 --with-vba-package-format="extn"
71 [ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++.
73 AC_ARG_ENABLE(mozilla,
74 [ --disable-mozilla OO.o usually includes a strangely hacked up mozilla
75 binary for your platform, to build without this
76 version, use this option.
77 ],,enable_mozilla="yes")
79 [ --without-fonts OOo includes some third-party fonts to provide a reliable
80 basis for help content, templates, samples, etc.
81 When these fonts are already known to be available on the
82 system then you should use this option.
85 [ --without-ppds Removes Postscript Printer definition files from
86 openoffice.org installation set, for people building
87 for specific distributions where PPDs are known to be
88 already available (every recent distro with CUPS
92 [ --without-afms Removes bitmap font files from openoffice.org
93 installation set, for people building for specific
94 distributions where AFM files or TrueType Fonts
95 are known to be available.
98 [ --disable-epm OO.o includes self-packaging code, that requires
99 epm, however epm is useless for large scale
103 [ --with-epm Decides which epm to use. Default is to use
104 the one from the system if one is built. When
105 either this is not there or you say =internal
108 AC_ARG_WITH(package-format,
109 [ --with-package-format specify package format(s) for OOo installsets.
110 Default is "normal" one of the OS/Distribution.
112 Usage: --with-package-format="foo bar"
115 [ --disable-odk OO.o includes an ODK, office development kit
116 which some packagers may with to build without
118 AC_ARG_ENABLE(mathmldtd,
119 [ --disable-mathmldtd disable mathmldtd
120 (useful for distributions that want to avoid packaging
122 ],,enable_mathmldtd="yes")
123 AC_ARG_ENABLE(evolution2,
124 [ --enable-evolution2 Allows the built-in evolution 2 addressbook
125 connectivity build to be enabled.
127 AC_ARG_WITH(system-stdlibs,
128 [ --with-system-stdlibs use libstdc++/libgcc_s already on system
131 [ --disable-cups disable cups support in the psprint project
133 AC_ARG_ENABLE(fontconfig,
134 [ --disable-fontconfig disable support for the fontconfig library
135 ],,enable_fontconfig=yes)
136 AC_ARG_ENABLE(directx,
137 [ --disable-directx Remove DirectX implementation for the new XCanvas
138 interface. The DirectX support requires more stuff
139 installed on Windows to compile.
140 (DirectX SDK, GDI+ libs)
141 ],,enable_directx=yes)
142 AC_ARG_ENABLE(activex,
143 [ --disable-activex Disable the use of ActiveX for windows build.
144 This switch is mandatory when using VC++ 2005/2008 Express.
148 [ --disable-atl Disable the use of ATL for windows build.
149 This switch is mandatory when using VC++ 2005/2008 Express.
152 AC_ARG_ENABLE(symbols,
153 [ --enable-symbols Include debugging symbols in output.
154 WARNING - a complete build needs 8 Gb of space and
155 takes much longer. (enables -g compiler flag)
157 --enable-symbols=SMALL sets the gcc -g1 setting
160 Enabling symbols disables the stripping of the solver
161 (--disable-strip-solver).
163 AC_ARG_ENABLE(strip-solver,
164 [ --disable-strip-solver Disable the stripping of the solver.
165 By default the solver is stripped unless a build with
166 debugging symbols (--enable-symbols) is requested.
168 This switch allows to override this setting.
170 AC_ARG_ENABLE(werror,
171 [ --enable-werror Turn warnings to errors. (Has no effect in modules
172 where the treating of warnings as errors is disabled
176 [ --enable-debug Include debugging symbols from --enable-symbols
177 plus extra debugging code. Extra large build!
178 (enables -g compiler flag and dmake debug=true)
180 AC_ARG_ENABLE(dbgutil,
181 [ --enable-dbgutil Include additional debugging utilities, such as
182 assertions, object counting, etc. Larger build.
183 Independent from --enable-debug
185 AC_ARG_ENABLE(crashdump,
186 [ --enable-crashdump Enable the crashdump feature code.
188 AC_ARG_ENABLE(cl-standard,
189 [ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing
190 standard compiler. ( This just disavles optimization
191 options and therefore removes a lot of warnings when
192 using the cheaper standard compiler. )
195 [ --disable-gtk Determines whether to use Gtk+ vclplug on platforms
196 where Gtk+ is available.
198 AC_ARG_ENABLE(gstreamer,
199 [ --disable-gstreamer Determines whether to use the GStreamer media
200 backend on platforms where GStreamer is available.
201 ],,enable_gstreamer=yes)
202 AC_ARG_ENABLE(systray,
203 [ --disable-systray Determines whether to build the systray quickstarter.
204 ],,enable_systray=yes)
206 [ --enable-cairo Determines whether to use Cairo library on
207 platforms where Cairo is available.
209 AC_ARG_WITH(system-cairo,
210 [ --with-system-cairo Use Cairo libraries already on system
212 AC_ARG_ENABLE(opengl,
213 [ --enable-opengl Determines whether to build the OpenGL 3D slide
214 transitions component
217 [ --enable-dbus Determines whether to enable presentation mode
218 screensaver control under GNOME via DBUS
221 [ --disable-gconf Determines whether to use the GConf support
223 AC_ARG_ENABLE(gnome-vfs,
224 [ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing
225 System on platforms where that VFS is available
226 ],,enable_gnome_vfs=yes)
228 [ --enable-gio Determines whether to use the GIO support
230 AC_ARG_ENABLE(static-gtk,
231 [ --enable-static-gtk Modules that are linked against gtk libraries use
232 the static libraries instead of the dynamic ones.
233 (enables -Bstatic linker flag for gtk libraries)
235 AC_ARG_ENABLE(layout,
236 [ --enable-layout Enable the compilation and use of layout dialogs
238 AC_ARG_ENABLE(build-mozilla,
239 [ --disable-build-mozilla Use this option if you do not want to build the
240 mozilla components from the mozilla source code but
241 take precompiled zips
243 AC_ARG_WITH(mozilla-version,
244 [ --with-mozilla-version Choose which version of mozilla to use while building
245 mozilla. Default: 1.7.5.
246 Note that not all versions are supported.
248 AC_ARG_WITH(mozilla-toolkit,
249 [ --with-mozilla-toolkit Choose which GUI toolkit to use while building mozilla
250 components. Default: gtk2
252 AC_ARG_ENABLE(nss_module,
253 [ --disable-nss-module Whether to use provided NSS module
254 ],,enable_nss_module=yes)
256 [ --enable-kde Determines whether to use Qt/KDE vclplug on platforms
257 where Qt and KDE are available.
260 [ --disable-kdeab Disable the KDE address book support
261 ],,if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi)
263 [ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms
264 where Qt4 and KDE4 are available. May be used with --enable-kde
265 if you want to support both KDE3 and KDE4.
267 AC_ARG_ENABLE(binfilter,
268 [ --disable-binfilter Disable legacy binary file formats filters
269 ],,if ! test -d ./binfilter; then enable_binfilter=no; fi)
271 [ --disable-rpath Disable the use of relative paths in shared libraries
274 [ --disable-pam Disable pam support.
276 AC_ARG_ENABLE(pam-link,
277 [ --enable-pam-link link with libpam instead of dynamically open it
279 AC_ARG_ENABLE(crypt-link,
280 [ --disable-crypt-link disable linking with libcrypt instead of dynamically
281 open it (needed for ancient GNU/Linux distributions
282 without crypt()/libcrypt)
283 ],,enable_crypt_link=yes)
284 AC_ARG_ENABLE(xrender-link,
285 [ --enable-xrender-link link with libXrender instead of dynamically open it
288 [ --disable-randr disable RandR support in the vcl project
290 AC_ARG_ENABLE(randr-link,
291 [ --disable-randr-link disable linking with libXrandr, instead dynamically
293 ],,enable_randr_link=yes)
294 AC_ARG_WITH(myspell-dicts,
295 [ --without-myspell-dicts Removes myspell dictionaries from openoffice.org
296 installation set, for people building for specific
297 distributions where the myspell dictionaries are
298 installed from other sources
300 AC_ARG_WITH(system-dicts,
301 [ --with-system-dicts Use dictionaries from system paths- Specify
302 them via --with-{dict,hyph,thes}-path=/path
303 if you want to override the default ones
305 AC_ARG_WITH(external-dict-dir,
306 [ --with-external-dict-dir Specify external dictionary dir
308 AC_ARG_WITH(external-hyph-dir,
309 [ --with-external-hyph-dir Specify external hyphenation pattern dir
311 AC_ARG_WITH(external-thes-dir,
312 [ --with-external-thes-dir Specify external thesaurus dir
314 AC_ARG_WITH(system-libs,
315 [ --with-system-libs Use libs already on system -- enables all
316 --with-system-* flags except mozilla and
317 odbc/sane/xrender-header(s)
319 AC_ARG_WITH(system-headers,
320 [ --with-system-headers Use headers already on system -- enables all
321 --with-system-* flags for external packages
322 whose headers are the only entities used i.e.
323 boost/vigra/odbc/sane/xrender-header(s)
325 AC_ARG_WITH(system-jars,
326 [ --without-system-jars When building with --with-system-libs, also the
327 needed jars are expected on the system. Use this to
329 (except for the db case where --with-system-db
330 *has to* imply using the db.jar from there, too)
332 AC_ARG_WITH(system-zlib,
333 [ --with-system-zlib Use zlib already on system
335 AC_ARG_WITH(system-openssl,
336 [ --with-system-openssl Use OpenSSL already on system
338 AC_ARG_WITH(system-jpeg,
339 [ --with-system-jpeg Use jpeg already on system
341 AC_ARG_WITH(system-expat,
342 [ --with-system-expat Use expat already on system
344 AC_ARG_WITH(system-libwpd,
345 [ --with-system-libwpd Use libwpd already on system
347 AC_ARG_WITH(system-libxml,
348 [ --with-system-libxml Use libxml already on system
350 AC_ARG_WITH(system-python,
351 [ --with-system-python Use python already on system
353 AC_ARG_WITH(system-icu,
354 [ --with-system-icu Use icu already on system
356 AC_ARG_WITH(system-poppler,
357 [ --with-system-poppler Use poppler already on system
359 AC_ARG_WITH(system-db,
360 [ --with-system-db Use berkeley db already on system
362 AC_ARG_WITH(system-lucene,
363 [ --with-system-lucene Use lucene already on system
365 AC_ARG_WITH(lucene-core-jar,
366 [ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ],
367 [ LUCENE_CORE_JAR="$withval"
369 AC_ARG_WITH(lucene-analyzers-jar,
370 [ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ],
371 [ LUCENE_ANALYZERS_JAR="$withval"
373 AC_ARG_ENABLE(mysql-connector,
374 [ --enable-mysql-connector enables the build of the MySQL Connector/OOo extension.
375 This requires access to the MySQL Connector/C (aka libmysql) to be given, too, with
376 either the --with-system-mysql or --with-libmysql-path option.
378 AC_ARG_WITH(system-mysql,
379 [ --with-system-mysql Use MySQL libraries already on system, for building the MySQL Connector/OOo extension.
380 Requires MYSQLCONFIG to point to the mysql_config executable.
382 AC_ARG_WITH(libmysql-path,
383 [ --with-libmysql-path Use Connector/C (libmysql) installation for building the MySQL Connector/OOo extension.
385 Usage: --with-libmysql-path=<absolute path to your Connector/C installation>
387 AC_ARG_WITH(system-mysql-cppconn,
388 [ --with-system-mysql-cppconn Use MySQL C++ Connector libraries already on system
390 AC_ARG_WITH(system-hsqldb,
391 [ --with-system-hsqldb Use hsqldb already on system
393 AC_ARG_WITH(hsqldb-jar,
394 [ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ],
395 [ HSQLDB_JAR="$withval"
397 AC_ARG_WITH(system-beanshell,
398 [ --with-system-beanshell Use beanshell already on system
400 AC_ARG_WITH(beanshell-jar,
401 [ --with-beanshell-jar=JARFILE Specify path to jarfile manually ],
404 AC_ARG_ENABLE(presenter-extra-ui,
405 [ --enable-presenter-extra-ui enables extra functionality during slideshow,
406 e.g. selecting pen color, erasing drawings etc.
407 ],,enable_presenter_extra_ui=no)
408 AC_ARG_ENABLE(minimizer,
409 [ --enable-minimizer enables the build of the Presentation Minimizer extension
411 AC_ARG_ENABLE(presenter-console,
412 [ --enable-presenter-console enables the build of the Presenter Console extension
414 AC_ARG_ENABLE(pdfimport,
415 [ --enable-pdfimport enables the build of the PDF Import extension and xpdf
417 AC_ARG_ENABLE(wiki-publisher,
418 [ --enable-wiki-publisher enables the build of the Wiki Publisher extension
420 AC_ARG_WITH(commons-codec-jar,
421 [ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ],
422 [ COMMONS_CODEC_JAR="$withval"
424 AC_ARG_WITH(commons-lang-jar,
425 [ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ],
426 [ COMMONS_LANG_JAR="$withval"
428 AC_ARG_WITH(commons-httpclient-jar,
429 [ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ],
430 [ COMMONS_HTTPCLIENT_JAR="$withval"
432 AC_ARG_WITH(commons-logging-jar,
433 [ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ],
434 [ COMMONS_LOGGING_JAR="$withval"
436 AC_ARG_WITH(servlet-api-jar,
437 [ --servlet-api-jar=JARFILE Specify path to jarfile manually ],
438 [ SERVLETAPI_JAR="$withval"
440 AC_ARG_ENABLE(report-builder,
441 [ --enable-report-builder enables the build of the Report Builder extension
443 AC_ARG_WITH(system-jfreereport,
444 [ --with-system-jfreereport Use JFreeReport already on system
447 [ --with-sac-jar=JARFILE Specify path to jarfile manually ],
450 AC_ARG_WITH(libxml-jar,
451 [ --with-libxml-jar=JARFILE Specify path to jarfile manually ],
452 [ LIBXML_JAR="$withval"
454 AC_ARG_WITH(flute-jar,
455 [ --with-flute-jar=JARFILE Specify path to jarfile manually ],
456 [ FLUTE_JAR="$withval"
458 AC_ARG_WITH(jfreereport-jar,
459 [ --with-jfreereport-jar=JARFILE Specify path to jarfile manually ],
460 [ JFREEREPORT_JAR="$withval"
462 AC_ARG_WITH(liblayout-jar,
463 [ --with-liblayout-jar=JARFILE Specify path to jarfile manually ],
464 [ LIBLAYOUT_JAR="$withval"
466 AC_ARG_WITH(libloader-jar,
467 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
468 [ LIBLOADER_JAR="$withval"
470 AC_ARG_WITH(libloader-jar,
471 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
472 [ LIBLOADER_JAR="$withval"
474 AC_ARG_WITH(libformula-jar,
475 [ --with-libformula-jar=JARFILE Specify path to jarfile manually ],
476 [ LIBFORMULA_JAR="$withval"
478 AC_ARG_WITH(librepository-jar,
479 [ --with-librepository-jar=JARFILE Specify path to jarfile manually ],
480 [ LIBREPOSITORY_JAR="$withval"
482 AC_ARG_WITH(libfonts-jar,
483 [ --with-libfonts-jar=JARFILE Specify path to jarfile manually ],
484 [ LIBFONTS_JAR="$withval"
486 AC_ARG_WITH(libserializer-jar,
487 [ --with-libserializer-jar=JARFILE Specify path to jarfile manually ],
488 [ LIBSERIALIZER_JAR="$withval"
490 AC_ARG_WITH(libbase-jar,
491 [ --with-libbase-jar=JARFILE Specify path to jarfile manually ],
492 [ LIBBASE_JAR="$withval"
494 AC_ARG_WITH(system-saxon,
495 [ --with-system-saxon Use saxon already on system
497 AC_ARG_WITH(saxon-jar,
498 [ --with-saxon-jar=JARFILE Specify path to jarfile manually ],
499 [ SAXON_JAR="$withval"
501 AC_ARG_WITH(system-libxslt,
502 [ --with-system-libxslt Use libxslt already on system
504 AC_ARG_WITH(system-odbc,
505 [ --with-system-odbc-headers Use the odbc headers already on system
507 AC_ARG_WITH(system-sane,
508 [ --with-system-sane-header Use sane.h already on system
510 AC_ARG_WITH(system-xrender,
511 [ --with-system-xrender-headers Use XRender headers already on system
513 AC_ARG_WITH(system-curl,
514 [ --with-system-curl Use curl already on system
516 AC_ARG_WITH(system-boost,
517 [ --with-system-boost Use boost already on system
519 AC_ARG_WITH(system-mdds,
520 [ --with-system-mdds Use mdds already on system
522 AC_ARG_WITH(system-vigra,
523 [ --with-system-vigra Use vigra already on system
526 [ --disable-neon Disable neon and the compilation of webdav binding
529 [ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla
532 AC_ARG_WITH(system-neon,
533 [ --with-system-neon Use neon already on system
535 AC_ARG_WITH(system-agg,
536 [ --with-system-agg Use AGG already on system
538 AC_ARG_WITH(system-hunspell,
539 [ --with-system-hunspell Use libhunspell already on system
541 AC_ARG_WITH(system-mythes,
542 [ --with-system-mythes Use mythes already on system
544 AC_ARG_WITH(system-altlinuxhyph,
545 [ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
547 AC_ARG_WITH(system-lpsolve,
548 [ --with-system-lpsolve Use lpsolve already on system
550 AC_ARG_WITH(system-libtextcat,
551 [ --with-system-libtextcat Use libtextcat already on system
553 AC_ARG_WITH(external-libtextcat-data,
554 [ --with-system-libtextcat-data Use libtextcat data already on system
556 AC_ARG_WITH(system-cppunit,
557 [ --with-system-cppunit Use cppunit already on system
559 AC_ARG_WITH(system-redland,
560 [ --with-system-redland Use redland library already on system
562 AC_ARG_WITH(system-mozilla,
563 [ --with-system-mozilla Use mozilla already on system. Note that some
564 components cannot be built against a contemporary
565 mozilla. The flavour used can be specified by
566 --with-system-mozilla=<flavour>. Supported are:
567 libxul (default), xulrunner, firefox, seamonkey,
569 ], WITH_SYSTEM_MOZILLA=$withval, WITH_SYSTEM_MOZILLA=no)
571 [ --with-stlport The location that STLport is installed in. The STL
572 header files are assumed to be in
573 stlport-home/stlport and the STLPort library in
576 Usage: --with-stlport=<absolute path to stlport home>
578 Warning!!, disabling using --without-stlport or
579 enabling using --with-stlport on a platform that
580 defaults to the opposite will break ABI compatability
581 ], WITH_STLPORT=$withval , WITH_STLPORT=auto)
582 AC_ARG_WITH(jdk-home,
583 [ --with-jdk-home if you have installed JDK 1.3 or later on your system
584 please supply the path here.
585 Note that this is not the location of the Java binary
586 but the location of the entire distribution.
588 Usage: --with-jdk-home=<absolute path to JDK home>
590 AC_ARG_WITH(gxx_include_path,
591 [ --with-gxx-include-path if you want to override the autodetected g++ include
594 Usage: --with-gxx-include-path=<absolute path to g++ include dir>
597 [ --with-java Build with[[out]] Java support. If you use
598 --without-java/--with-java=no then the build will have
599 no support for Java components, applets, accessibility
601 ], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java)
602 AC_ARG_ENABLE(gcjaot,
603 [ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation
604 support to speed up buildsi by compiling the jars also
606 --enable-gcjaot is only known to work with bytecode
607 created with gcj or ecj
609 AC_ARG_WITH(ant-home,
610 [ --with-ant-home If you have installed Jakarta Ant on your system,
611 please supply the path here.
612 Note that this is not the location of the Ant binary
613 but the location of the entire distribution.
615 Usage: --with-ant-home=<absolute path to Ant home>
618 [ --with-junit Specifies the JUnit 4 jar file to use for JUnit-based
619 tests. --without-junit disables those tests. Not
620 relevant in the --without-java case.
622 Usage: --with-junit=<absolute path to JUnit 4 jar>
624 AC_ARG_WITH(perl-home,
625 [ --with-perl-home If you have installed the Perl 5 Distribution, on your
626 system, please supply the path here.
627 Note that this is not the location of the Perl binary
628 but the location of the entire distribution.
630 Usage: --with-perl-home=<absolute path to Perl 5 home>
633 [ --with-cl-home For Windows NT users, please supply the path
634 for the Microsoft C/C++ compiler.
635 Note that this is not the location of the compiler
636 binary but the location of the entire distribution.
638 Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>
640 AC_ARG_WITH(mspdb-path,
641 [ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the
642 path pointing to the mspdb71.dll (.NET 2003).
644 Usage: --with-mspdb-path=<absolute path to mspdb71.dll>
646 AC_ARG_WITH(midl-path,
647 [ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply
648 the path pointing to the midl.exe.
650 Usage: --with-midl-path=<absolute path to midl.exe>
652 AC_ARG_WITH(csc-path,
653 [ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply
654 the path pointing to the csc.exe.
656 Usage: --with-csc-path=<absolute path to csc.exe>
658 AC_ARG_WITH(nsis-path,
659 [ --with-nsis-path For Windows users, please supply the path to the
660 "Nullsoft Scriptable Install System" (NSIS). If NSIS
661 is found in the path or this option is supplied a self
662 contained executable installer for OpenOffice.org will
665 Usage: --with-nsis-path=<absolute path to nsis.exe>
667 AC_ARG_WITH(frame-home,
668 [ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply
669 the path pointing to lib/mscoree.lib, usually
671 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"
673 MS Visual Toolkit compiler users, please supply the
674 path pointing to lib/msvcrt.lib, usually something
676 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"
678 Usage: --with-frame-home=<absolute path to Framework SDK [[home]]>
680 AC_ARG_WITH(psdk-home,
681 [ --with-psdk-home For Windows users, please supply the path to the
682 Microsoft Platform SDK.
684 Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>
686 AC_ARG_WITH(directx-home,
687 [ --with-directx-home For Windows users, please supply the path to the
688 Microsoft DirectX SDK.
690 Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
692 AC_ARG_WITH(mozilla-build,
693 [ --with-mozilla-build For Windows users, please supply the path to the
696 Usage: --with-mozilla-build=<absolute path to mozilla build tools>
698 At the moment of this writing, an installer for the mozilla build tools
699 can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
700 ],[MOZILLABUILD=$withval],)
701 AC_ARG_WITH(local-solenv,
702 [ --with-local-solenv If you have solenv in a location other than ./solenv,
703 please supply the path here.
705 Usage: --with-local-solenv=<absolute path to solenv>
707 AC_ARG_WITH(local-solver,
708 [ --with-local-solver if you have solver in a location other than ./solver,
709 please supply the path here.
711 Usage: --with-local-solver=<absolute path to solver>
713 AC_ARG_ENABLE(check-only,
714 [ --enable-check-only Use this option option if you just want to check your
715 environment. This option stops the generation of an
718 Usage: --enable-check-only=yes
720 AC_ARG_ENABLE(ccache-skip,
721 [[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to
722 escape compiler flags that would otherwise prevent
723 caching of the result (currently used on Mac only)
724 NOTE: requires patched version because of a bug in
725 ccache (see issue 104567 for details and patch)
726 explicitly enable if your version of ccache doesn't
727 identify as version 2.4_OOo
728 ]],,enable_ccache_skip=auto)
730 [ --with-lang Use this option to build OpenOffice.org with
731 additional language support. English (US) is always
732 included by default. Separate multiple languages with
733 space. For all languages, use --with-lang=ALL.
735 Usage: --with-lang="es sw tu cs sk"
737 AC_ARG_WITH(poor-help-localizations,
738 [ --with-poor-help-localizations
739 Use this option to specify which languages have
740 unusable help localizations. Separate multiple
741 languages with space.
743 Usage: --with-poor-help-localizations="af ar be-BY ca"
746 [ --with-dict Use this option to build OpenOffice.org with
747 dictionary support. ALL dictionaries are always
748 included by default unless overridden with
749 this option. Separate multiple dictionaries with
750 commas. For all dictionaries, use --with-dict=ALL.
752 Usage: --with-dict=ENGB,ENUS,ITIT
754 AC_ARG_WITH(intro-bitmaps,
755 [ --with-intro-bitmaps Prefer the specified intro bitmaps over the
756 the default one. Can be more than one (separated by
757 commas), the order means priority of fallback if the
758 first does not exist (in the installed tree).
760 Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
762 AC_ARG_WITH(about-bitmaps,
763 [ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
764 specification of bitmaps for the About box.
766 Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
769 [ --with-vendor Set vendor of the build.
771 Usage: --with-vendor="John the Builder"
773 AC_ARG_WITH(unix-wrapper,
774 [ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
775 in the desktop files and in the desktop-integration RPMs.
777 Usage: --with-unix-wrapper=ooffice
779 AC_ARG_WITH(asm-home,
780 [ --with-asm-home For Windows users, please supply the path for the
783 Usage: --with-asm-home=<path to ml.exe directory>
785 AC_ARG_WITH(os-version,
786 [ --with-os-version For FreeBSD users, use this option option to override
787 the detected OSVERSION.
789 Usage: --with-os-version=<OSVERSION>
791 AC_ARG_WITH(unzip-home,
792 [ --with-unzip-home Deprecated: use --with-zip-home instead],,)
793 AC_ARG_WITH(zip-home,
794 [ --with-zip-home If you use a non standard zip, for example windows
795 please supply the path for zip
797 Usage: --with-zip-home=<path to zip executable>
800 [ --with-mingwin For Windows users, use the mingwin32 compiler within
803 Usage: --with-mingwin=yes
805 For !Windows use, use the mingw32 C++ compiler to
806 (re-) build unowinreg.dll. Specify the MinGW C++
809 Usage: --with-mingwin=i586-mingw32msvc-g++
810 ],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
811 AC_ARG_WITH(build-version,
812 [ --with-build-version Allows the builder to add a custom version tag
813 that will appear in the Help/About box for QA
816 Usage: --with-build-version="Built by Jim"
817 ],with_build_version=$withval)
819 [ --with-alloc Define which allocator to build with
820 (choices are oo, system, tcmalloc, jemalloc)
822 Note that on FreeBSD/NetBSD system==jemalloc
824 AC_ARG_ENABLE(verbose,
825 [ --enable-verbose Increase build verbosity.
826 --disable-verbose Decrease build verbosity.
828 AC_ARG_ENABLE(dependency-tracking,
829 [ --disable-dependency-tracking Disables generation of dependency information.
834 dnl ===================================================================
836 dnl ===================================================================
837 echo "********************************************************************"
839 echo "* OpenOffice.org build configuration. *"
841 echo "* The configure process checks your platform to see whether *"
842 echo "* you can build OpenOffice.org on it. *"
843 echo "* This process checks all pre-requisites and generates a file *"
844 echo "* containing the necessary environment variables. *"
845 echo "* Source this file after configure has ended successfully. *"
847 echo "* Any warning that is generated during the configure process *"
848 echo "* must be taken into account since it can be a reason for *"
849 echo "* an unsuccessful build of OpenOffice.org *"
851 echo "********************************************************************"
853 echo "********************************************************************"
855 echo "* Checking the platform pre-requisites. *"
857 echo "********************************************************************"
859 dnl ===================================================================
860 dnl Configure pre-requisites.
861 dnl ===================================================================
865 AC_PATH_PROG( AWK, $AWK)
866 if test -z "$AWK"; then
867 AC_MSG_ERROR([install awk to run this script])
870 AC_PATH_PROGS(SED, sed )
871 if test -z "$SED"; then
872 AC_MSG_ERROR([install sed to run this script])
875 AC_MSG_CHECKING([for solenv environment])
876 if test -z "$with_local_solenv"; then
877 LOCAL_SOLENV="DEFAULT"
878 AC_MSG_RESULT([default])
880 LOCAL_SOLENV=$with_local_solenv
881 AC_MSG_RESULT([$with_local_solenv])
883 AC_SUBST(LOCAL_SOLENV)
885 if test "$LOCAL_SOLENV" = "DEFAULT"; then
888 _solenv="$LOCAL_SOLENV"
892 if test -e $_solenv/inc/minor.mk; then
893 # Get UPD number from ./solenv/inc/minor.mk
894 UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
896 SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
897 AC_SUBST(SOURCEVERSION)
899 AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
902 dnl ===================================================================
903 dnl Checks for the operating system and processor.
904 dnl ===================================================================
906 if test "$build" != "$host" -o "$build" != "$target" \
907 -o "$host" != "$target"; then
908 AC_MSG_WARN([cross-compiling by any means is not supported (yet)!])
909 echo "cross-compiling by any means is not supported (yet)!" >> warn
912 if echo "$build_os" | grep cygwin; then
913 AC_MSG_CHECKING([Cygwin version])
915 AC_MSG_RESULT([$CygwinVer])
916 if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
917 AC_MSG_ERROR([You need at least Cygwin V1.5.x])
923 dnl ===================================================================
924 dnl The following is a list of supported systems.
925 dnl Sequential to keep the logic very simple
926 dnl These values may be checked and reset later.
927 dnl ===================================================================
938 AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
939 if test -z "$GNUTAR"; then
940 AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).])
944 dnl ===========================================================
945 dnl check whether we're using solaris 6,7,8 - sparc or intel.
946 dnl ===========================================================
947 AC_MSG_CHECKING([the Solaris operating system release])
948 _os_release=`echo $build_os | $SED -e s/solaris2\.//`
949 if test "$_os_release" -lt "6"; then
950 AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
952 AC_MSG_RESULT([ok ($_os_release)])
955 dnl check whether we're using a sparc or i386 processor
956 AC_MSG_CHECKING([the processor type])
957 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
958 AC_MSG_RESULT([ok ($build_cpu)])
960 AC_MSG_ERROR([only sparc and i386 processors are supported])
963 linux-gnu*|k*bsd*-gnu*)
993 if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
994 AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
995 echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
1017 AC_MSG_CHECKING([the FreeBSD operating system release])
1018 if test -n "$with_os_version"; then
1019 OSVERSION="$with_os_version"
1021 OSVERSION=`/sbin/sysctl -n kern.osreldate`
1023 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
1024 AC_MSG_CHECKING([which thread library to use])
1025 if test "$OSVERSION" -lt "500016"; then
1026 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1027 PTHREAD_LIBS="-pthread"
1028 elif test "$OSVERSION" -lt "502102"; then
1029 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1030 PTHREAD_LIBS="-lc_r"
1033 PTHREAD_LIBS="-pthread"
1035 AC_MSG_RESULT([$PTHREAD_LIBS])
1052 PTHREAD_CFLAGS="-pthread"
1053 PTHREAD_LIBS="-pthread -lpthread"
1061 PTHREAD_LIBS=-pthread
1062 echo "AIX is an alpha port --- Use at own risk" >> warn
1066 AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
1071 AC_SUBST(PTHREAD_CFLAGS)
1072 AC_SUBST(PTHREAD_LIBS)
1074 dnl ===================================================================
1075 dnl Set the ENABLE_CRASHDUMP variable.
1076 dnl ===================================================================
1077 AC_MSG_CHECKING([whether to enable crashdump feature])
1078 if test "$enable_crashdump" = "yes"; then
1079 ENABLE_CRASHDUMP="TRUE"
1080 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1081 AC_MSG_RESULT([yes])
1086 AC_SUBST(ENABLE_CRASHDUMP)
1088 if test "$_os" = "WINNT"; then
1089 BUILD_TYPE="$BUILD_TYPE TWAIN"
1092 if test "$_os" = "WINNT"; then
1093 dnl ===================================================================
1094 dnl Set the VC_STANDARD variable.
1095 dnl ===================================================================
1096 AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
1097 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
1102 AC_MSG_RESULT([yes])
1104 AC_SUBST(VC_STANDARD)
1107 dnl ===================================================================
1108 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
1109 dnl ===================================================================
1110 AC_MSG_CHECKING([whether to turn warnings to errors])
1111 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
1112 ENABLE_WERROR="TRUE"
1113 AC_MSG_RESULT([yes])
1114 AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
1115 AC_MSG_WARN([on platforms where it has been disabled explicitely])
1116 echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
1118 ENABLE_WERROR="FALSE"
1121 AC_SUBST(ENABLE_WERROR)
1123 dnl ===================================================================
1124 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
1125 dnl ===================================================================
1126 AC_MSG_CHECKING([whether to do a debug build])
1127 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
1129 if test -z "$enable_symbols"; then
1130 enable_symbols="yes"
1132 AC_MSG_RESULT([yes])
1134 ENABLE_DEBUG="FALSE"
1137 AC_SUBST(ENABLE_DEBUG)
1139 dnl ===================================================================
1140 dnl Set the ENABLE_DBGUTIL variable
1141 dnl ===================================================================
1142 AC_MSG_CHECKING([whether to build with additional debug utilities])
1143 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1147 AC_MSG_RESULT([yes])
1150 PROFULLSWITCH="product=full"
1152 AC_MSG_RESULT([no, full product build])
1155 AC_SUBST(PROFULLSWITCH)
1158 dnl ===================================================================
1159 dnl First setting is whether to include symbols into final build.
1160 dnl ===================================================================
1161 AC_MSG_CHECKING([whether to include symbols into final build])
1162 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
1163 if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
1164 ENABLE_SYMBOLS="TRUE"
1165 AC_MSG_RESULT([yes])
1167 if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
1168 ENABLE_SYMBOLS="SMALL"
1169 AC_MSG_RESULT([yes, small ones])
1170 else if test "$enable_symbols" != "no" ; then
1171 echo enable symbols is: $enable_symbols
1172 AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
1182 AC_SUBST(ENABLE_SYMBOLS)
1184 dnl ===================================================================
1185 dnl Determine if the solver is to be stripped or not.
1186 dnl ===================================================================
1187 AC_MSG_CHECKING([whether to strip the solver or not.])
1188 if test -n "$enable_strip_solver"; then
1189 if test "$enable_strip_solver" = "yes"; then
1191 else if test "$enable_strip_solver" = "no"; then
1192 DISABLE_STRIP="TRUE"
1194 AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
1198 if test -n "$ENABLE_SYMBOLS"; then
1199 DISABLE_STRIP="TRUE"
1204 AC_SUBST(DISABLE_STRIP)
1206 dnl ===================================================================
1208 dnl ===================================================================
1209 AC_MSG_CHECKING([whether to enable native CUPS support])
1210 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
1212 AC_MSG_RESULT([yes])
1217 AC_SUBST(ENABLE_CUPS)
1219 AC_MSG_CHECKING([whether to enable fontconfig support])
1220 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
1221 ENABLE_FONTCONFIG="TRUE"
1222 AC_MSG_RESULT([yes])
1224 ENABLE_FONTCONFIG=""
1227 AC_SUBST(ENABLE_FONTCONFIG)
1229 dnl ===================================================================
1230 dnl find external tarballs.
1231 dnl ===================================================================
1232 if test -z $TARFILE_LOCATION; then
1233 TARFILE_LOCATION="DEFAULT"
1235 AC_SUBST(TARFILE_LOCATION)
1237 if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \
1238 && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then
1239 DO_FETCH_TARBALLS="yes"
1241 AC_SUBST(DO_FETCH_TARBALLS)
1243 dnl ===================================================================
1244 dnl Disable legacy binary file formats filters
1245 dnl ===================================================================
1246 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
1247 if test "$enable_binfilter" = "no"; then
1251 WITH_BINFILTER="YES"
1252 BUILD_TYPE="$BUILD_TYPE BINFILTER"
1253 AC_MSG_RESULT([yes])
1255 AC_SUBST(WITH_BINFILTER)
1257 if test "$_os" = "WINNT"; then
1258 AC_MSG_CHECKING([whether to use DirectX])
1259 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
1260 ENABLE_DIRECTX="TRUE"
1261 AC_MSG_RESULT([yes])
1266 AC_SUBST(ENABLE_DIRECTX)
1268 AC_MSG_CHECKING([whether to use ActiveX])
1269 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
1271 AC_MSG_RESULT([yes])
1273 DISABLE_ACTIVEX="TRUE"
1276 AC_SUBST(DISABLE_ACTIVEX)
1278 AC_MSG_CHECKING([whether to use ATL])
1279 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
1281 AC_MSG_RESULT([yes])
1286 AC_SUBST(DISABLE_ATL)
1290 dnl ===================================================================
1291 dnl Disable rpath in shared libraries?
1292 dnl ===================================================================
1293 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
1294 if test "$enable_rpath" = "no"; then
1299 AC_MSG_RESULT([$ENABLE_RPATH])
1300 AC_SUBST(ENABLE_RPATH)
1302 dnl Test whether to include MySpell dictionaries
1303 dnl ===================================================================
1304 AC_MSG_CHECKING([whether to include MySpell dictionaries])
1305 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
1306 AC_MSG_RESULT([yes])
1307 WITH_MYSPELL_DICTS=YES
1308 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
1311 WITH_MYSPELL_DICTS=NO
1313 AC_SUBST(WITH_MYSPELL_DICTS)
1315 if test "$WITH_MYSPELL_DICTS" = "NO"; then
1316 AC_MSG_CHECKING([whether to use dicts from external paths])
1317 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
1318 AC_MSG_RESULT([yes])
1320 AC_MSG_CHECKING([for spelling dictionary directory])
1321 if test -n "$with_external_dict_dir"; then
1322 DICT_SYSTEM_DIR=file://$with_external_dict_dir
1324 DICT_SYSTEM_DIR=file:///usr/share/hunspell
1326 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
1327 AC_MSG_CHECKING([for hyphenation patterns directory])
1328 if test -n "$with_external_hyph_dir"; then
1329 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
1331 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
1333 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
1334 AC_MSG_CHECKING([for thesaurus directory])
1335 if test -n "$with_external_thes_dir"; then
1336 THES_SYSTEM_DIR=file://$with_external_thes_dir
1338 THES_SYSTEM_DIR=file:///usr/share/mythes
1340 AC_MSG_RESULT([$THES_SYSTEM_DIR])
1346 AC_SUBST(SYSTEM_DICTS)
1347 AC_SUBST(DICT_SYSTEM_DIR)
1348 AC_SUBST(HYPH_SYSTEM_DIR)
1349 AC_SUBST(THES_SYSTEM_DIR)
1351 if test $_os = "WINNT"; then
1352 AC_MSG_CHECKING([Windows build environment sanity])
1353 dnl ===================================================================
1354 dnl Sanity check! Native windows programs cannot use cygwin symlinks!
1355 dnl ===================================================================
1356 dnl As long as awk instead of $AWK is used somewhere in the sources,
1357 dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
1358 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
1359 AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
1360 Native windows programs cannot use cygwin symlinks. Remove the symbolic
1361 link, and copy the program to the name of the link.])
1363 dnl ===================================================================
1364 dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
1365 dnl CC and CXX but the configure checks here assume that guw.exe
1366 dnl (if needed at all) is not yet present.
1367 dnl ===================================================================
1368 CC=`echo $CC | $SED "s/^guw.exe //"`
1369 CXX=`echo $CXX | $SED "s/^guw.exe //"`
1370 dnl ===================================================================
1371 dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
1373 dnl ===================================================================
1374 if test -n "$CC";then
1375 if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
1379 dnl ===================================================================
1380 if test "$WITH_MINGWIN" = "yes" ; then
1381 if test -z "$CC"; then
1382 CC="gcc -mno-cygwin"
1383 CXX="g++ -mno-cygwin"
1388 AC_SUBST(WITH_MINGWIN)
1390 dnl ===================================================================
1391 dnl Extra check for Windows. cygwin builds need gcc to build dmake
1392 dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
1394 dnl ===================================================================
1395 if test "$_os" = "WINNT" ; then
1396 AC_MSG_CHECKING([for cygwin gcc/g++])
1397 if which gcc > /dev/null && which g++ > /dev/null ; then
1398 AC_MSG_RESULT([found])
1400 AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
1405 dnl ===================================================================
1406 dnl Check whether the bash shell can be used.
1407 dnl ===================================================================
1408 AC_PATH_PROG(SHELLPATH, bash)
1409 if test -z "$SHELLPATH"; then
1410 AC_MSG_ERROR([bash not found in \$PATH])
1412 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
1416 dnl ===================================================================
1417 dnl Checks for c compiler,
1418 dnl The check for the c++ compiler is later on.
1419 dnl ===================================================================
1420 AC_MSG_CHECKING([gcc home])
1421 if test -z "$with_gcc_home"; then
1422 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1424 GCC_HOME="$with_gcc_home"
1426 AC_MSG_RESULT($GCC_HOME)
1432 if test -n "$with_gcc_home"; then
1433 if test -z "$CC"; then
1434 CC="$with_gcc_home/bin/gcc"
1438 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1439 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1443 COMPATH=`dirname "$CC"`
1444 if test "$COMPATH" = "." ; then
1445 AC_PATH_PROGS(COMPATH, $CC)
1446 dnl double square bracket to get single because of M4 quote...
1447 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1449 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
1451 dnl ===================================================================
1452 dnl Test the gcc version, 3 is OK
1453 dnl ===================================================================
1455 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1456 AC_MSG_CHECKING([the GNU gcc compiler version])
1457 _gcc_version=`$CC -dumpversion`
1458 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
1459 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1461 if test "$_gcc_major" -lt "3"; then
1462 AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
1464 if test "$GCCVER" -eq "030203"; then
1465 if test "$ENABLE_SYMBOLS" = "SMALL"; then
1466 AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
1470 if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then
1471 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
1472 export CC=$GCC_HOME/bin/gcc-4.0
1473 dnl export CC to have it available in set_soenv -> config.guess
1474 GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1475 if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
1479 if test "$GCCVER" -ge "040100" ; then
1480 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])
1482 AC_MSG_RESULT([implicitly using CC=$CC])
1485 AC_MSG_RESULT([checked (gcc $_gcc_version)])
1487 if test "$_os" = "SunOS"; then
1488 AC_MSG_CHECKING([gcc linker])
1489 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
1490 AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
1492 AC_MSG_RESULT([ok (GNU ld)])
1497 HAVE_LD_BSYMBOLIC_FUNCTIONS=
1498 if test "$GCC" = "yes"; then
1499 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
1500 bsymbolic_functions_ldflags_save=$LDFLAGS
1501 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
1502 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1505 printf ("hello world\n");
1506 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
1507 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
1508 AC_MSG_RESULT( found )
1510 AC_MSG_RESULT( not found )
1512 LDFLAGS=$bsymbolic_functions_ldflags_save
1514 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
1516 dnl ===================================================================
1517 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
1518 dnl ===================================================================
1519 AC_MSG_CHECKING([whether to enable pch feature])
1520 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
1521 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
1523 AC_MSG_RESULT([yes])
1524 dnl There is no PCH support in GCC versions prior to this
1525 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
1527 AC_MSG_RESULT([yes])
1530 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
1536 AC_SUBST(ENABLE_PCH)
1538 dnl ===================================================================
1539 dnl Search all the common names for GNU make
1540 dnl ===================================================================
1541 AC_MSG_CHECKING([for GNU make])
1542 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
1543 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1544 if test $? -eq 0; then
1549 AC_MSG_RESULT($GNUMAKE)
1550 if test -z "$GNUMAKE"; then
1551 AC_MSG_ERROR([not found. install GNU make.])
1554 AC_MSG_CHECKING([the GNU make version])
1555 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
1556 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1557 if test "$_make_longver" -ge "038100" ; then
1558 AC_MSG_RESULT([$GNUMAKE $_make_version])
1560 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
1564 dnl ===================================================================
1565 dnl Search all the common names for GNU tar
1566 dnl ===================================================================
1567 AC_MSG_CHECKING([for GNU tar])
1568 for a in $GNUTAR gtar gnutar tar; do
1569 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1570 if test $? -eq 0; then
1575 AC_MSG_RESULT($GNUTAR)
1576 if test -z "$GNUTAR"; then
1577 AC_MSG_ERROR([not found. install GNU tar.])
1582 dnl ===================================================================
1583 dnl Test the solaris compiler version
1584 dnl ===================================================================
1585 if test "$_os" = "SunOS"; then
1586 if test "$CC" = "cc"; then
1587 AC_PATH_PROGS(_cc, cc)
1588 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
1589 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
1590 dnl cc -V outputs to standard error!!!!
1591 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
1592 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
1593 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
1594 if test "$_sunstudio_major" != "5"; then
1595 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1597 _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" }'`
1598 if test "$_sunstudio_minor" = "false"; then
1599 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1601 dnl compiler will do
1602 AC_MSG_RESULT([checked])
1608 if test "$GCC" = "yes"; then
1609 AC_MSG_CHECKING( for --hash-style=both linker support )
1610 hash_style_ldflags_save=$LDFLAGS
1611 LDFLAGS="$LDFLAGS -Wl,--hash-style=both"
1612 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1615 printf ("hello world\n");
1616 ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
1617 if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
1618 AC_MSG_RESULT( found )
1620 AC_MSG_RESULT( not found )
1622 LDFLAGS=$hash_style_ldflags_save
1624 AC_SUBST(HAVE_LD_HASH_STYLE)
1626 dnl ===================================================================
1627 dnl Test the Compaq compiler for OSF1
1628 dnl ===================================================================
1629 if test "$_os" = "OSF1"; then
1630 if test "$CC" = "cc"; then
1631 AC_PATH_PROGS(_cc, cc)
1632 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
1633 AC_MSG_WARN([******* $_cc , $COMPATH])
1634 AC_MSG_CHECKING([the Compaq C compiler version])
1635 dnl cc -V outputs to standard error!!!!
1636 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
1637 _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
1638 if test "$_compaqc_major" != "T6"; then
1639 AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
1641 dnl compiler will do
1642 AC_MSG_RESULT([checked])
1647 dnl ===================================================================
1648 dnl Check whether there's a Perl version available.
1649 dnl ===================================================================
1650 if test -z "$with_perl_home"; then
1651 AC_PATH_PROG(PERL, perl)
1653 if test "$_os" = "WINNT"; then
1654 with_perl_home=`cygpath -u "$with_perl_home"`
1656 _perl_path="$with_perl_home/bin/perl"
1657 if test -x "$_perl_path"; then
1660 AC_MSG_ERROR([$_perl_path not found])
1664 dnl ===================================================================
1665 dnl Testing for Perl version 5 or greater.
1666 dnl $] is the perl version variable, it is returned as an integer
1667 dnl ===================================================================
1668 if test "$PERL"; then
1669 AC_MSG_CHECKING([the Perl version])
1670 ${PERL} -e "exit($]);"
1672 if test "$_perl_version" -lt 5; then
1673 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
1675 AC_MSG_RESULT([checked (perl $_perl_version)])
1677 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
1681 dnl ===================================================================
1682 dnl Testing for required Perl modules
1683 dnl ===================================================================
1684 AC_MSG_CHECKING([for required Perl modules])
1685 if `$PERL -e 'use Archive::Zip;'`; then
1686 AC_MSG_RESULT([all modules found])
1688 AC_MSG_ERROR([Failed to find some modules])
1691 dnl ===================================================================
1692 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
1693 dnl ===================================================================
1694 if test "$_os" = "WINNT"; then
1695 if test "$WITH_MINGWIN" != "yes"; then
1696 AC_MSG_CHECKING([for friendly registry keys])
1697 # VS.Net 2003, VS.Net 2005
1698 if test -z "$with_cl_home"; then
1699 vctest=`./oowintool --msvc-productdir`;
1700 if test -x "$vctest/bin/cl.exe"; then
1701 with_cl_home=$vctest;
1704 with_cl_home=`cygpath -u "$with_cl_home"`
1706 AC_MSG_RESULT([done])
1708 dnl ===========================================================
1709 dnl Check for mspdb71.dll/mspdb80.dll
1710 dnl ===========================================================
1711 dnl .NET 2003/5/8 Compiler
1712 if test -n "$with_mspdb_path";then
1713 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
1715 if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
1716 MSPDB_PATH="$with_mspdb_path"
1719 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
1720 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1722 dnl .NET 2005/2008 case
1723 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
1724 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1726 dnl Windows SDK 6.0 case
1727 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
1728 MSPDB_PATH="$with_cl_home/bin"
1731 if test -z "$MSPDB_PATH";then
1732 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
1733 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
1734 AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
1735 MSPDB_PATH=`dirname "$MSPDB_PATH"`
1738 if test -z "$MSPDB_PATH"; then
1739 AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
1741 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
1742 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
1743 dnl The path needs to be added before cl is called
1744 PATH="$MSPDB_PATH:$PATH"
1746 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
1747 if test -x "$with_cl_home/bin/cl.exe"; then
1748 CC="$with_cl_home/bin/cl.exe"
1750 AC_PATH_PROG(CC, cl.exe)
1752 if test -e "$CC"; then
1753 # This gives us a posix path with 8.3 filename restrictions
1754 CC=`cygpath -d "$CC"`
1755 CC=`cygpath -u "$CC"`
1756 # Remove /cl.exe from CC case insensitive
1757 AC_MSG_RESULT([found ($CC)])
1758 COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
1759 export INCLUDE=`cygpath -d "$COMPATH/Include"`
1760 dnl Check which Microsoft C/C++ compiler is found
1761 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
1762 dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
1763 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
1764 x = match( \\\$0, /..\\...\\...../ )
1765 CCversion = substr( \\\$0, RSTART, RLENGTH)
1766 tokencount = split (CCversion,vertoken,\".\")
1767 for ( i = 1 ; i <= tokencount ; i++ ) {
1768 printf (\"%04d\",vertoken[[i]] )
1771 AC_MSG_RESULT([found Compiler version $CCNUMVER.])
1772 if test "$CCNUMVER" -ge "001500000000"; then
1775 AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
1776 elif test "$CCNUMVER" -ge "001400000000"; then
1779 AC_MSG_RESULT([found .NET 2005.])
1780 elif test "$CCNUMVER" -ge "001300102240"; then
1783 AC_MSG_RESULT([found .NET 2003.])
1785 AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
1788 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
1791 AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
1792 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
1793 AC_MSG_RESULT([found.])
1794 if $CC -dumpspecs | grep -q "mno-cygwin"; then
1797 USE_MINGW="pure-mingw"
1800 AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
1805 AC_SUBST(MSPDB_PATH)
1808 dnl ===================================================================
1809 dnl .NET needs special treatment
1810 dnl ===================================================================
1811 if test "$_os" = "WINNT"; then
1812 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
1814 AC_PATH_PROG(MIDL_PATH, midl.exe)
1815 if test -n "$MIDL_PATH";then
1816 MIDL_PATH=`dirname "$MIDL_PATH"`
1818 if test -n "$with_midl_path";then
1819 with_midl_path=`cygpath -u "$with_midl_path"`
1821 if test -x "$with_midl_path/midl.exe"; then
1822 MIDL_PATH="$with_midl_path"
1824 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
1825 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
1827 if test -z "$MIDL_PATH" ; then
1828 vstest=`./oowintool --msvs-productdir`;
1829 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
1830 MIDL_PATH="$vstest/Common7/Tools/Bin"
1833 if test -z "$MIDL_PATH" ; then
1834 psdktest=`./oowintool --psdk-home`
1835 if test -x "$psdktest/Bin/midl.exe" ; then
1836 MIDL_PATH="$psdktest/Bin"
1839 if test ! -x "$MIDL_PATH/midl.exe"; then
1840 AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
1842 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1843 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
1844 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
1847 AC_PATH_PROG(CSC_PATH, csc.exe)
1848 if test -n "$CSC_PATH";then
1849 CSC_PATH=`dirname "$CSC_PATH"`
1851 if test -n "$with_csc_path";then
1852 with_csc_path=`cygpath -u "$with_csc_path"`
1854 if test -x "$with_csc_path/csc.exe"; then
1855 CSC_PATH="$with_csc_path"
1857 csctest=`./oowintool --csc-compilerdir`;
1858 if test -x "$csctest/csc.exe"; then
1862 if test ! -x "$CSC_PATH/csc.exe"; then
1863 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
1865 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1866 CSC_PATH=`cygpath -d "$CSC_PATH"`
1867 CSC_PATH=`cygpath -u "$CSC_PATH"`
1869 dnl Check mscoree.lib / .NET Frameworks dir
1870 dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
1871 AC_MSG_CHECKING(.NET Framework)
1872 if test -n "$with_frame_home"; then
1873 with_frame_home=`cygpath -u "$with_frame_home"`
1875 if test -f "$with_frame_home/lib/mscoree.lib"; then
1876 FRAME_HOME="$with_frame_home"
1878 if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
1879 FRAME_HOME="$with_cl_home/../SDK/v1.1"
1881 if test -z "$FRAME_HOME" ; then
1882 frametest=`./oowintool --dotnetsdk-dir`
1883 if test -f "$frametest/lib/mscoree.lib"; then
1884 FRAME_HOME="$frametest"
1886 frametest=`./oowintool --psdk-home`
1887 if test -f "$frametest/lib/mscoree.lib"; then
1888 FRAME_HOME="$frametest"
1892 if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
1893 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
1895 AC_MSG_RESULT(found)
1896 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1897 FRAME_HOME=`cygpath -d "$FRAME_HOME"`
1898 FRAME_HOME=`cygpath -u "$FRAME_HOME"`
1902 AC_SUBST(FRAME_HOME)
1905 dnl ===================================================================
1906 dnl Check if stdc headers are available excluding windows.
1907 dnl ===================================================================
1908 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1912 dnl ===================================================================
1913 dnl Find pre-processors.
1914 dnl ===================================================================
1915 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1918 dnl Check whether there's a C pre-processor.
1919 dnl ===================================================================
1920 dnl When using SunStudio compiler, there is a bug with the cc
1921 dnl preprocessor, so use CC preprocessor as the cc preprocessor
1922 dnl See Issuezilla #445.
1923 dnl ===================================================================
1924 if test "$_os" = "SunOS"; then
1931 AC_CHECK_SIZEOF(long)
1932 SIZEOF_LONG=$ac_cv_sizeof_long
1933 AC_SUBST(SIZEOF_LONG)
1935 WORDS_BIGENDIAN=$ac_cv_c_bigendian
1936 AC_SUBST(WORDS_BIGENDIAN)
1938 dnl Check for large file support
1940 if test -n "$ac_cv_sys_file_offset_bits"; then
1941 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1943 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
1944 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
1946 AC_SUBST(LFS_CFLAGS)
1948 dnl ===================================================================
1949 dnl Check if valgrind.h is available
1950 dnl ===================================================================
1951 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1952 dnl Test $prefix (currently only testing for /usr and /usr/local)
1953 dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind
1955 prev_cppflags=$CPPFLAGS
1956 if test -z "$VALGRIND_CFLAGS"; then
1957 CPPFLAGS="-I/usr/include/valgrind"
1958 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h])
1960 if test -z "$VALGRIND_CFLAGS"; then
1961 CPPFLAGS="-I/usr/local/include/valgrind"
1962 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [])
1964 if test -n "$VALGRIND_CFLAGS"; then
1965 CPPFLAGS=$VALGRIND_CFLAGS
1966 AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""])
1968 CPPFLAGS=$prev_cppflags
1970 AC_SUBST([VALGRIND_CFLAGS])
1972 dnl ===================================================================
1973 dnl Check if cups/cups.h is available
1974 dnl ===================================================================
1975 if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
1976 AC_CHECK_HEADER(cups/cups.h, [],
1977 [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
1980 dnl ===================================================================
1981 dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
1982 dnl ===================================================================
1983 if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
1984 AC_MSG_CHECKING([whether to enable pam support])
1985 if test -z "$enable_pam" || test "$enable_pam" != "no"; then
1986 AC_MSG_RESULT([yes])
1988 AC_CHECK_HEADER(security/pam_appl.h, [],
1989 [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
1990 AC_MSG_CHECKING([whether to link to libpam])
1991 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
1992 AC_MSG_RESULT([yes])
1994 AC_CHECK_LIB(pam, pam_start, [],
1995 [AC_MSG_ERROR(libpam not found or functional)], [])
1997 AC_MSG_RESULT([no, dynamically open it])
2004 dnl check getspnam_r for needed args (4 or 5)
2005 AX_FUNC_WHICH_GETSPNAM_R
2009 AC_SUBST(NEW_SHADOW_API)
2012 if test "$_os" = "Linux"; then
2013 AC_MSG_CHECKING([whether to link to libcrypt])
2014 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
2015 AC_MSG_RESULT([yes])
2017 AC_CHECK_LIB(crypt, crypt, [],
2018 [AC_MSG_ERROR(libcrypt not found or functional)], [])
2020 AC_MSG_RESULT([no, dynamically open it])
2024 AC_SUBST(CRYPT_LINK)
2026 dnl ===================================================================
2027 dnl Testing for c++ compiler and version...
2028 dnl ===================================================================
2029 if test -n "$with_gcc_home"; then
2030 if test -z "$CXX"; then
2031 CXX="$with_gcc_home/bin/g++"
2035 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2036 if test -e "$CC"; then
2041 dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
2042 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2046 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
2047 if test "$GXX" = "yes"; then
2048 AC_MSG_CHECKING([the GNU C++ compiler version])
2050 _gpp_version=`$CXX -dumpversion`
2051 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
2053 if test "$_os" = "Darwin" -a "$_gpp_majmin" -ge "401" ; then
2054 if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
2055 CXX=$GCC_HOME/bin/g++-4.0
2056 _gpp_majmin_2=`"$CXX" -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
2057 if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
2058 _gpp_majmin=$_gpp_majmin_2
2061 if test "$_gpp_majmin" -ge "401" ; then
2062 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])
2064 AC_MSG_RESULT([implicitly using CXX=$CXX])
2067 AC_MSG_RESULT([checked (g++ $_gpp_version)])
2070 if test "$_gpp_majmin" = "304"; then
2071 AC_MSG_CHECKING([whether $CXX has the enum bug])
2073 extern "C" void abort (void);
2074 extern "C" void exit (int status);
2076 enum E { E0, E1, E2, E3, E4, E5 };
2081 if (e == E2 || e == E3 || e == E1)
2093 ],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])], [AC_MSG_RESULT([no])])
2097 dnl ===================================================================
2098 dnl Set the gcc/gxx include directories
2099 dnl ===================================================================
2100 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
2101 # often contains an i386 which is expanded as a macro. Solved in stlport.
2102 if test "$GXX" = "yes"; then
2103 AC_MSG_CHECKING([for g++ include path])
2104 if test -z "$with_gxx_include_path"; then
2105 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
2106 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
2107 with_gxx_include_path="/usr/include"
2109 if test "$WITH_MINGWIN" = "yes"; then
2110 with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
2111 with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
2113 if echo $with_gxx_include_path | grep -q linux; then
2114 # workaround for Mandriva - issue 100049
2115 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
2119 dnl This is the original code...
2120 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
2121 if test -z "$with_gxx_include_path"; then
2122 with_gxx_include_path="NO_GXX_INCLUDE"
2123 AC_MSG_RESULT([no g++ includes])
2125 AC_MSG_RESULT([$with_gxx_include_path])
2127 GXX_INCLUDE_PATH="$with_gxx_include_path"
2128 AC_SUBST(GXX_INCLUDE_PATH)
2130 dnl ===================================================================
2131 dnl Set the mingw runtime library include directories
2132 dnl ===================================================================
2133 if test "$WITH_MINGWIN" = "yes"; then
2134 AC_MSG_CHECKING([for mingwin runtime include path])
2135 cat >conftest.$ac_ext <<_ACEOF
2137 #include <bits/c++config.h>
2139 _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`
2141 if test -n "$_mingw_lib_include_path"; then
2143 for a in $_mingw_lib_include_path
2146 _temp="$_temp "`cygpath -u "$a"`
2148 _mingw_lib_include_path=$_temp
2150 if test -z "$_mingw_lib_include_path"; then
2151 _mingw_lib_include_path="NO_LIB_INCLUDE"
2152 AC_MSG_RESULT([no mingwin runtime includes])
2154 AC_MSG_RESULT([$_mingw_lib_include_path])
2156 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
2157 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
2158 dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map
2159 AC_MSG_CHECKING([for mingwin c++ backward include path])
2160 cat >conftest.$ac_ext <<_ACEOF
2163 _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`
2165 if test -n "$_mingw_backward_include_path"; then
2166 _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path`
2167 _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path`
2168 AC_MSG_RESULT([$_mingw_backward_include_path])
2170 _mingw_backward_include_path="NO_BACKWARD_INCLUDE"
2171 AC_MSG_RESULT([no mingwin c++ backward includes])
2173 MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path"
2174 AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH)
2175 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
2176 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
2177 AC_MSG_CHECKING([whether to use dynamic libgcc])
2178 if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then
2179 AC_MSG_CHECKING([dynamic libgcc name])
2180 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'`
2181 MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null`
2182 if test -n "$MINGW_GCCDLL"; then
2183 MINGW_SHARED_GCCLIB=YES
2184 AC_MSG_RESULT([use $MINGW_GCCDLL])
2191 if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then
2194 AC_MSG_CHECKING([whether to use dynamic libstdc++])
2195 MINGW_SHARED_LIBSTDCPP=
2196 if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then
2197 MINGW_SHARED_LIBSTDCPP=stdc++_s
2199 if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then
2200 MINGW_SHARED_LIBSTDCPP=stdc++.dll
2202 if test -n "$MINGW_SHARED_LIBSTDCPP" ; then
2203 AC_MSG_CHECKING([dynamic libstdc++ name])
2204 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'`
2205 MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null`
2206 if test -n "$MINGW_GXXDLL"; then
2207 MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP
2208 MINGW_SHARED_GXXLIB=YES
2209 AC_MSG_RESULT([use $MINGW_GXXDLL])
2211 MINGW_SHARED_LIBSTDCPP=
2217 MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR`
2218 AC_SUBST(MINGW_CLIB_DIR)
2219 AC_SUBST(MINGW_SHARED_GCCLIB)
2220 AC_SUBST(MINGW_GCCLIB_EH)
2221 AC_SUBST(MINGW_SHARED_GXXLIB)
2222 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
2223 AC_SUBST(MINGW_GCCDLL)
2224 AC_SUBST(MINGW_GXXDLL)
2227 dnl ===================================================================
2228 dnl Extra checking for the SUN OS compiler
2229 dnl ===================================================================
2230 if test "$_os" = "SunOS"; then
2231 dnl SunStudio C++ compiler packaged with SunStudio C compiler
2232 if test "$CC" = "cc"; then
2233 AC_MSG_CHECKING([SunStudio C++ Compiler])
2234 if test "$CXX" != "CC"; then
2235 AC_MSG_WARN([SunStudio C++ was not found])
2236 echo "SunStudio C++ was not found" >> warn
2238 AC_MSG_RESULT([checked])
2242 dnl ===================================================================
2243 dnl Extra checking for the OSF compiler
2244 dnl ===================================================================
2245 if test "$_os" = "OSF1"; then
2246 AC_MSG_CHECKING([Compaq C++ compiler version])
2247 dnl cxx -V outputs to standard error!!!!
2248 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
2249 _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
2250 if test "$_compaqcxx_major" != "V6"; then
2251 AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
2252 echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
2254 dnl compiler will do
2255 AC_MSG_RESULT([checked])
2259 dnl *************************************************************
2260 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
2261 dnl *************************************************************
2262 AC_MSG_CHECKING([exception type])
2264 if test "$WITH_MINGWIN" = "yes"; then
2266 [#include <iostream>
2268 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
2271 [_Unwind_SjLj_RaiseException() ],
2272 [exceptions_type="sjlj"],
2273 [exceptions_type="dwarf2"]
2277 AC_MSG_RESULT($exceptions_type)
2279 EXCEPTIONS="$exceptions_type"
2280 AC_SUBST(EXCEPTIONS)
2282 dnl **************************************************************
2283 dnl Testing for required Solaris and SunStudio compiler patches...
2284 dnl **************************************************************
2285 dnl Check whether the OS is SunOS.
2286 if test "$_os" = "SunOS"; then
2287 _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
2288 if test "$_os_release" = "7"; then
2292 AC_MSG_CHECKING([for patch 106327-06 or greater])
2293 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
2297 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2298 if test "$_patch_major" = "106327"; then
2299 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2300 if test "$_patch_rev" -ge "6"; then
2305 if test "$_patch" = "found"; then
2306 AC_MSG_RESULT([found])
2308 AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
2309 echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
2314 AC_MSG_CHECKING([for patch 106950-11 or greater])
2315 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
2319 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2320 if test "$_patch_major" = "106950"; then
2321 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2322 if test "$_patch_rev" -ge "11"; then
2327 if test "$_patch" = "found"; then
2328 AC_MSG_RESULT([found])
2330 AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
2331 echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
2334 if test "$_os_release" = "6"; then
2338 AC_MSG_CHECKING([for patch 105591-09 or greater])
2339 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
2343 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2344 if test "$_patch_major" = "105591"; then
2345 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2346 if test "$_patch_rev" -ge "9"; then
2351 if test "$_patch" = "found"; then
2352 AC_MSG_RESULT([found])
2354 AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
2355 echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
2360 AC_MSG_CHECKING([for patch 107733-08 or greater])
2361 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
2365 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2366 if test "$_patch_major" = "107733"; then
2367 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2368 if test "$_patch_rev" -ge "8"; then
2373 if test "$_patch" = "found"; then
2374 AC_MSG_RESULT([found])
2376 AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
2377 echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
2383 dnl ===================================================================
2384 dnl Checks for what the default STL should be
2385 dnl ===================================================================
2386 AC_MSG_CHECKING([what the default STL should be])
2387 DEFAULT_TO_STLPORT="no"
2388 if test "$_os" = "Linux"; then
2389 case "$build_cpu" in
2391 case "$build_os" in k*bsd*-gnu*)
2392 DEFAULT_TO_STLPORT="no"
2395 DEFAULT_TO_STLPORT="yes"
2400 DEFAULT_TO_STLPORT="no"
2403 elif test "$_os" = "SunOS"; then
2404 DEFAULT_TO_STLPORT="yes"
2405 elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2406 DEFAULT_TO_STLPORT="yes"
2407 elif test "$_os" = "OS2"; then
2408 DEFAULT_TO_STLPORT="yes"
2409 elif test "$_os" = "FreeBSD"; then
2410 DEFAULT_TO_STLPORT="yes"
2412 if test "$DEFAULT_TO_STLPORT" = "yes"; then
2413 AC_MSG_RESULT([stlport])
2415 AC_MSG_RESULT([system])
2417 if test "$WITH_STLPORT" = "auto"; then
2418 WITH_STLPORT=$DEFAULT_TO_STLPORT
2421 dnl ===================================================================
2422 dnl Checks for STLPORT
2423 dnl ===================================================================
2424 AC_MSG_CHECKING([for STL providing headers])
2427 if test "$WITH_STLPORT" = "yes"; then
2428 AC_MSG_RESULT([using internal stlport.])
2429 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2430 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2431 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2433 elif test "$WITH_STLPORT" = "no"; then
2434 AC_MSG_RESULT([using system STL])
2435 USE_SYSTEM_STL="YES"
2436 if test "$DEFAULT_TO_STLPORT" != "no"; then
2437 AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
2438 echo "using system STL. Warning, breaks your ABI compatability!" >>warn
2441 STLPORT4=$WITH_STLPORT
2442 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2443 AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
2445 dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
2446 if test -f "$STLPORT4/stlport/hash_map"; then
2447 AC_MSG_RESULT([checked.])
2449 AC_MSG_ERROR([STLport headers not found.])
2452 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2453 AC_MSG_CHECKING([for STLport libraries])
2454 if test "$_os" = "SunOS"; then
2455 if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
2456 AC_MSG_RESULT([checked])
2457 elif test -f "$STLPORT4/lib/libstlport.so"; then
2458 AC_MSG_RESULT([checked])
2461 AC_MSG_ERROR([STLport libraries not found])
2463 elif test "$_os" = "Darwin"; then
2464 if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
2465 AC_MSG_RESULT([checked])
2466 elif test -f "$STLPORT4/lib/libstlport.dylib"; then
2467 AC_MSG_RESULT([checked])
2470 AC_MSG_ERROR([STLport libraries not found])
2473 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2474 AC_MSG_RESULT([checked])
2475 elif test -f "$STLPORT4/lib/libstlport.so"; then
2476 AC_MSG_RESULT([checked])
2479 AC_MSG_ERROR([STLport libraries not found])
2483 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2484 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2485 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2489 if test -z "$STLPORT4"; then
2490 STLPORT4="NO_STLPORT4"
2492 if test -z "$STLPORT_VER"; then
2496 AC_SUBST(STLPORT_VER)
2497 AC_SUBST(USE_SYSTEM_STL)
2499 dnl ===================================================================
2500 dnl visibility feature
2501 dnl ===================================================================
2502 if test "$GCC" = "yes"; then
2503 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
2505 CFLAGS="$CFLAGS -fvisibility=hidden"
2506 AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
2508 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2509 AC_MSG_RESULT([yes])
2515 # ===================================================================
2516 # use --ccache-skip?
2517 # ===================================================================
2518 dnl used to escape compiler options for ccache that otherwise prevent
2519 dnl caching of the results (like "-x objective-c++" for Mac)
2520 AC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip])
2521 if test "$_os" != "Darwin" ; then
2522 AC_MSG_RESULT([only used on Mac currently, skipping])
2523 elif test "$enable_ccache_skip" = "no" ; then
2524 AC_MSG_RESULT([no - diabled explicitly])
2525 elif test "$enable_ccache_skip" = "yes" ; then
2526 AC_MSG_RESULT([yes - enabled explicitly, skipping checks])
2527 AC_SUBST([USE_CCACHE], [YES])
2528 elif test "$enable_ccache_skip" = "auto" ; then
2529 # checking for ccache presence/version
2530 AC_MSG_RESULT([probing...])
2531 AC_PATH_PROG([CCACHE],[ccache],[not_found])
2532 if test "$CCACHE" = "not_found" ; then
2533 AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)])
2535 # check ccache version
2536 AC_MSG_CHECKING([whether version of ccache is suitable])
2537 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2538 if test "$CCACHE_VERSION" = "2.4_OOo"; then
2539 AC_MSG_RESULT([yes])
2540 AC_MSG_CHECKING([whether ccache is actually used for the build])
2542 save_CXXFLAGS=$CXXFLAGS
2543 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
2544 dnl an empty program will do, we're checking the compiler flags
2545 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),
2546 [use_ccache=yes], [use_ccache=no])
2547 if test $use_ccache = yes ; then
2548 AC_MSG_RESULT([yes, will enable --ccache-skip])
2549 AC_SUBST([USE_CCACHE], [YES])
2551 AC_MSG_RESULT([no, will not enable --ccache-skip])
2553 CXXFLAGS=$save_CXXFLAGS
2557 AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip])
2561 AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"])
2564 dnl ===================================================================
2565 dnl system stl sanity tests
2566 dnl ===================================================================
2567 if test "$USE_SYSTEM_STL" = "YES"; then
2568 AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
2571 AC_TRY_COMPILE([#include <ext/hash_map>
2572 using namespace __gnu_cxx;
2573 ],[hash_map<int, int> t; return 0;],
2574 ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
2576 if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
2577 AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
2579 AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
2582 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2583 AC_MSG_CHECKING([if STL headers are visibility safe])
2584 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
2585 AC_MSG_RESULT([$stlvisok])
2586 if test "$stlvisok" = "no"; then
2587 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
2588 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
2589 unset HAVE_GCC_VISIBILITY_FEATURE
2593 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2594 sharedlink_ldflags_save=$LDFLAGS
2595 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
2597 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
2598 AC_TRY_LINK([#include <sstream>
2599 using namespace std;
2600 ],[istringstream strm( "test" ); return 0;],
2601 $EGREP -q unresolvable conftest.err;
2602 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
2604 AC_MSG_RESULT([$gccvisok])
2605 if test "$gccvisok" = "no"; then
2606 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility])
2607 echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn
2608 unset HAVE_GCC_VISIBILITY_FEATURE
2611 LDFLAGS=$sharedlink_ldflags_save
2614 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2615 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
2616 cat >visibility.cxx <<_ACEOF
2617 #pragma GCC visibility push(hidden)
2618 struct __attribute__ ((visibility ("default"))) TestStruct {
2621 __attribute__ ((visibility ("default"))) void TestFunc() {
2625 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
2628 case "$build_cpu" in
2630 if $EGREP -q '@PLT' visibility.s; then
2643 AC_MSG_RESULT([$gccvisbroken])
2644 if test "$gccvisbroken" = "yes"; then
2645 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
2646 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
2647 unset HAVE_GCC_VISIBILITY_FEATURE
2654 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
2656 dnl ===================================================================
2658 dnl ===================================================================
2659 AC_MSG_CHECKING([which memory allocator to use])
2660 if test "$with_alloc" = "system"; then
2661 AC_MSG_RESULT([system])
2663 AC_CHECK_FUNCS([malloc realloc calloc free])
2665 if test "$with_alloc" = "tcmalloc"; then
2666 AC_MSG_RESULT(tcmalloc)
2667 if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
2668 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
2670 AC_CHECK_LIB(tcmalloc, malloc, [],
2671 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
2674 if test "$with_alloc" = "jemalloc"; then
2675 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
2676 AC_MSG_RESULT(jemalloc)
2678 CFLAGS="$CFLAGS -pthread"
2679 AC_CHECK_LIB(jemalloc, malloc, [],
2680 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
2684 AC_MSG_RESULT([system])
2686 AC_CHECK_FUNCS([malloc realloc calloc free])
2689 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
2690 AC_MSG_RESULT([internal])
2694 dnl ===================================================================
2695 dnl Custom build version
2696 dnl ===================================================================
2698 AC_MSG_CHECKING([whether to add custom build version])
2699 if test "z$with_build_version" != "z"; then
2700 BUILD_VER_STRING=$with_build_version
2701 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
2706 AC_SUBST(BUILD_VER_STRING)
2708 dnl ===================================================================
2709 dnl Java support enable
2710 dnl ===================================================================
2711 AC_MSG_CHECKING([whether to build with Java support])
2712 if test "$WITH_JAVA" != "no"; then
2713 AC_MSG_RESULT([yes])
2719 AC_MSG_WARN([building without java will mean some features will not be available])
2720 echo "building without java will mean some features will not be available" >>warn
2722 AC_SUBST(SOLAR_JAVA)
2724 if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
2725 # IBMs JDK needs this...
2726 JITC_PROCESSOR_TYPE=6
2727 export JITC_PROCESSOR_TYPE
2730 if test "$_os" = "WINNT"; then
2731 if test -z "$with_jdk_home"; then
2732 _jdk_home=`./oowintool --jdk-home`
2733 if test -d "$_jdk_home"; then
2734 with_jdk_home="$_jdk_home"
2737 with_jdk_home=`cygpath -u "$with_jdk_home"`
2741 dnl ===================================================================
2743 dnl ===================================================================
2744 if test "$SOLAR_JAVA" != ""; then
2745 JAVA_HOME=; export JAVA_HOME
2746 if test -z "$with_jdk_home"; then
2747 AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
2749 _java_path="$with_jdk_home/bin/$WITH_JAVA"
2750 dnl Check if there is a java interpreter at all.
2751 if test -x "$_java_path"; then
2752 JAVAINTERPRETER=$_java_path
2754 AC_MSG_ERROR([$_java_path not found set with_jdk_home])
2757 if test "$_os" = "WINNT"; then
2758 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
2759 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
2761 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
2762 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
2763 elif test "$_os" = "Darwin"; then
2764 dnl HACK: There currently is only a 32 bit version of OOo for Mac OS X,
2765 dnl and Tiger java complains about -d32 while Snow Leopard java needs it
2766 dnl to run in 32 bit mode and be able to load OOo jnilibs:
2767 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
2768 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
2769 AC_MSG_RESULT([yes])
2777 dnl ===================================================================
2779 dnl ===================================================================
2780 if test "$SOLAR_JAVA" != ""; then
2782 AC_MSG_CHECKING([the installed JDK])
2783 if test -n "$JAVAINTERPRETER"; then
2784 dnl java -version sends output to stderr!
2785 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2786 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2787 # dnl Kaffe specific tests
2788 # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
2789 # if test -z "$KAFFE_VER"; then
2790 # AC_MSG_ERROR([looks like Kaffe but version detection failed])
2792 # _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2793 # if test "$_kaffe_ver" -lt 10100; then
2794 # AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
2798 # dnl TODO: define some project exclusion variables
2800 # AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
2801 # AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
2802 # echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
2803 # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2804 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
2806 AC_MSG_RESULT([checked (gcj)])
2807 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2808 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2810 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
2811 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2814 # dnl BEA JDK specific tests
2815 # _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2816 # _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2818 # if test "$_jdk_ver" -lt 10500; then
2819 # AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0])
2822 # AC_MSG_RESULT([checked (BEA JDK $_jdk)])
2824 # if test "$with_jdk_home" = ""; then
2825 # AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
2826 #you must use the "--with-jdk-home" configure option explicitly])
2829 # AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
2830 # echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
2832 # JAVA_HOME=$with_jdk_home
2834 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
2837 dnl IBM JDK specific tests
2838 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2839 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2841 if test "$_jdk_ver" -lt 10500; then
2842 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
2845 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
2847 if test "$with_jdk_home" = ""; then
2848 AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
2849 you must use the "--with-jdk-home" configure option explicitly])
2852 JAVA_HOME=$with_jdk_home
2857 dnl SUN JDK specific tests
2858 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2859 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2861 if test "$_jdk_ver" -lt 10500; then
2862 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
2864 AC_MSG_RESULT([checked (JDK $_jdk)])
2865 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2866 if test "$_os" = "WINNT"; then
2867 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2869 if test "$_os" = "OS2"; then
2870 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2874 AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
2878 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
2881 dnl ===================================================================
2882 dnl Checks for javac
2883 dnl ===================================================================
2884 if test "$SOLAR_JAVA" != ""; then
2885 if test "$JDK" = "gcj"; then
2886 javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
2888 javacompiler="javac"
2890 if test "$_os" = "OS2"; then
2891 if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
2892 javacompiler="${javacompiler}.exe"
2895 if test -z "$with_jdk_home"; then
2896 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
2898 _javac_path="$with_jdk_home/bin/$javacompiler"
2899 dnl Check if there is a java compiler at all.
2900 if test -x "$_javac_path"; then
2901 JAVACOMPILER=$_javac_path
2904 if test -z "$JAVACOMPILER"; then
2905 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
2907 if test "$_os" = "WINNT"; then
2908 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2909 JAVACOMPILER="${JAVACOMPILER}.exe"
2911 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
2912 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
2914 if test "$_os" = "OS2"; then
2915 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2916 JAVACOMPILER="${JAVACOMPILER}.exe"
2920 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
2921 AC_MSG_CHECKING([re-checking JDK])
2923 AC_MSG_RESULT([checked (ecj)])
2924 #TODO: what's to do here? some switch to do 1.5 compiling?
2925 JAVAFLAGS="-source 1.5 -target 1.5"
2926 _gij_longver="40200"
2931 dnl ===================================================================
2932 dnl Checks that javac is gcj
2933 dnl ===================================================================
2934 if test "$SOLAR_JAVA" != ""; then
2935 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
2939 AC_SUBST(JAVACISGCJ)
2941 dnl ===================================================================
2942 dnl Checks for javadoc
2943 dnl ===================================================================
2944 if test "$SOLAR_JAVA" != ""; then
2945 if test -z "$with_jdk_home"; then
2946 AC_PATH_PROG(JAVADOC, javadoc)
2948 _javadoc_path="$with_jdk_home/bin/javadoc"
2949 if test "$_os" = "OS2"; then
2950 if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
2951 _javadoc_path="${_javadoc_path}.exe"
2954 dnl Check if there is a javadoc at all.
2955 if test -x "$_javadoc_path"; then
2956 JAVADOC=$_javadoc_path
2958 AC_PATH_PROG(JAVADOC, javadoc)
2961 if test -z "$JAVADOC"; then
2962 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
2964 if test "$_os" = "WINNT"; then
2965 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2966 JAVADOC="${JAVADOC}.exe"
2968 JAVADOC=`cygpath -d "$JAVADOC"`
2969 JAVADOC=`cygpath -u "$JAVADOC"`
2971 if test "$_os" = "OS2"; then
2972 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2973 JAVADOC="${JAVADOC}.exe"
2978 if test "$SOLAR_JAVA" != ""; then
2979 dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
2980 if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then
2981 if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then
2982 cat > findhome.java <<_ACEOF
2983 [import java.io.File;
2987 public static void main(String args[])
2989 String jrelocation = System.getProperty("java.home");
2990 File jre = new File(jrelocation);
2991 System.out.println(jre.getParent());
2995 AC_MSG_CHECKING([if javac works])
2996 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
2997 AC_TRY_EVAL(javac_cmd)
2998 if test $? = 0 && test -f ./findhome.class ; then
2999 AC_MSG_RESULT([javac works])
3001 echo "configure: javac test failed" >&5
3002 cat findhome.java >&5
3003 AC_MSG_ERROR([javac does not work - java projects will not build!])
3006 AC_MSG_CHECKING([if gij knows its java.home])
3007 JAVA_HOME=`$JAVAINTERPRETER findhome`
3008 if test $? = 0 && test "$JAVA_HOME" != "" ; then
3009 AC_MSG_RESULT([$JAVA_HOME])
3011 echo "configure: java test failed" >&5
3012 cat findhome.java >&5
3013 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
3016 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
3020 dnl second sanity check JAVA_HOME if possible
3021 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
3022 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
3023 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
3025 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
3026 # try to recover first by looking whether we have a alternatives
3027 # system as in Debian or newer SuSEs where following /usr/bin/javac
3028 # over /etc/alternatives/javac leads to the right bindir where we
3029 # just need to strip a bit away to get a valid JAVA_HOME
3030 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
3031 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
3032 # maybe only one level of symlink (e.g. on Mac)
3033 JAVA_HOME=$(readlink $JAVACOMPILER)
3036 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
3037 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
3038 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
3039 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
3041 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
3042 if test "$JAVA_HOME" != "/usr"; then
3043 if test "$_os" = "Darwin"; then
3044 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
3045 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
3046 dnl Tiger already returns a JDK path..
3047 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
3049 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
3053 # now check if $JAVA_HOME is really valid
3054 if test "$_os" = "Darwin"; then
3055 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
3058 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
3061 if test "$JAVA_HOME_OK" = "NO"; then
3062 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
3063 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
3064 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
3065 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
3066 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
3067 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
3068 # if test "$JDK" = "gcj"; then
3069 # 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
3076 if test "$SOLAR_JAVA" != ""; then
3077 AC_MSG_CHECKING([for jawt lib name])
3078 if test "$JDK" = "gcj"; then
3080 save_LDFLAGS=$LDFLAGS
3081 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3082 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
3083 exec 6>/dev/null # no output
3084 AC_CHECK_HEADER(jni.h, [],
3085 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
3086 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
3087 exec 6>&1 # output on again
3089 LDFLAGS=$save_LDFLAGS
3091 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
3092 # A workaround is to link also against libpmawt.so
3093 if test "$JDK" = "ibm" ; then
3095 save_LDFLAGS=$LDFLAGS
3096 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
3097 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3098 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
3099 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
3100 export LD_LIBRARY_PATH
3101 exec 6>/dev/null # no output
3102 AC_CHECK_HEADER(jni.h, [],
3103 [AC_MSG_ERROR([jni.h could not be found.])], [])
3104 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
3105 if test -z "$AWTLIB"; then
3106 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
3107 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
3109 exec 6>&1 # output on again
3111 LDFLAGS=$save_LDFLAGS
3112 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
3114 if test -z "$AWTLIB"; then
3117 AC_MSG_RESULT([$AWTLIB])
3121 dnl ===================================================================
3122 dnl Check for optional gcj for AOT
3123 dnl ===================================================================
3124 if test "$SOLAR_JAVA" != ""; then
3125 AC_MSG_CHECKING([whether to enable gcj aot compilation])
3126 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
3127 AC_MSG_RESULT([yes])
3128 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
3131 gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
3133 AC_MSG_RESULT([$gcjaot])
3134 if test -n "$with_jdk_home"; then
3135 _javac_path="$with_jdk_home/bin/$gcjaot"
3136 dnl Check if there is a gcj at all.
3137 if test -x "$_javac_path"; then
3138 JAVAAOTCOMPILER=$_javac_path
3141 if test -z "$JAVAAOTCOMPILER"; then
3142 AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
3144 if test -z "$JAVAAOTCOMPILER"; then
3145 AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
3155 AC_SUBST(JAVAINTERPRETER)
3156 AC_SUBST(JAVAIFLAGS)
3157 AC_SUBST(JAVACOMPILER)
3158 AC_SUBST(JAVAAOTCOMPILER)
3161 dnl ===================================================================
3162 dnl Checks for specific files.
3163 dnl ===================================================================
3165 dnl ===================================================================
3166 dnl Checks for programs.
3167 dnl ===================================================================
3169 dnl ===================================================================
3170 dnl Check whether we already have dmake
3171 dnl ===================================================================
3172 AC_PATH_PROG(DMAKE, dmake, no)
3173 if test "$DMAKE" = "no"; then
3175 echo "dmake will be built on ./bootstrap"
3177 AC_MSG_CHECKING([whether the found dmake is the right dmake])
3178 # we need to find out whether that dmake we found is "our" dmake
3179 # or the dmake from Sun's SunStudio Compiler which is something
3181 # This test _should_ work because the one accepts -V (ours) and one
3182 # (the other) not...
3183 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3184 if test $? -eq 0; then
3186 AC_MSG_RESULT([yes])
3187 AC_MSG_CHECKING([the dmake version])
3188 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3189 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3190 AC_MSG_RESULT([OK, >= 4.11])
3191 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3192 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3193 AC_MSG_RESULT([OK, >= 4.11])
3195 AC_MSG_RESULT([too old. >= 4.11 is needed])
3196 echo "A newer dmake will be built on ./bootstrap"
3201 echo "dmake will be built on ./bootstrap"
3205 AC_SUBST(BUILD_DMAKE)
3207 AC_MSG_CHECKING([whether to enable EPM for packing])
3208 if test "$enable_epm" = "yes"; then
3209 AC_MSG_RESULT([yes])
3210 dnl ===================================================================
3211 dnl Check for epm - not needed for windows
3212 dnl ===================================================================
3213 if test "$_os" != "WINNT"; then
3214 if test -n "$with_epm"; then
3217 AC_PATH_PROG(EPM, epm, no)
3219 if test "$EPM" = "no" || test "$EPM" = "internal"; then
3220 echo "EPM will be built."
3222 BUILD_TYPE="$BUILD_TYPE EPM"
3224 # Gentoo has some epm which is something different...
3225 AC_MSG_CHECKING([whether the found epm is the right epm])
3226 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
3227 AC_MSG_RESULT([yes])
3229 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
3231 AC_MSG_CHECKING([epm version])
3232 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
3233 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
3234 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
3235 AC_MSG_RESULT([OK, >= 3.7])
3237 if test "$_os" = "Darwin"; then
3238 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
3239 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
3240 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3241 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) or use internal patched epm (--with-epm=internal)])
3242 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3243 AC_MSG_RESULT([$_pm, ok])
3244 else # we never should get here, but go safe
3245 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) or use internal patched epm (--with-epm=internal)])
3249 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
3250 echo "EPM will be built."
3252 BUILD_TYPE="$BUILD_TYPE EPM"
3257 # test which package format to use
3258 AC_MSG_CHECKING([which package format to use])
3272 # if building on Debian, default should be deb...
3273 if test -e /etc/debian_version; then
3291 # we never should get here since we check the arciecture/os at the beginning,
3294 AC_MSG_ERROR([unknown system])
3296 if test -n "$with_package_format"; then
3297 for i in $with_package_format; do
3299 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
3302 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
3303 aix - AIX software distribution
3304 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3305 depot or swinstall - HP-UX software distribution
3306 deb - Debian software distribution
3307 inst or tardist - IRIX software distribution
3308 osx - MacOS X software distribution
3309 pkg - Solaris software distribution
3310 rpm - RedHat software distribution
3311 setld - Tru64 (setld) software distribution
3312 native - "Native" software distribution for the platform
3313 portable - Portable software distribution
3314 OOo additionally supports:
3315 archive - .tar.gz or .zip
3317 installed - installation tree
3323 PKGFORMAT="$with_package_format"
3325 AC_MSG_RESULT([$PKGFORMAT])
3326 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
3327 AC_MSG_CHECKING([for rpm])
3328 for a in "$RPM" rpmbuild rpm; do
3329 $a --usage >/dev/null 2> /dev/null
3330 if test $? -eq 0; then
3334 $a --version >/dev/null 2> /dev/null
3335 if test $? -eq 0; then
3341 if test -z "$RPM" ; then
3342 AC_MSG_ERROR([not found])
3343 elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then
3344 RPM_PATH=`which $RPM`
3345 AC_MSG_RESULT([$RPM_PATH])
3347 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
3350 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
3351 AC_PATH_PROG(DPKG, dpkg, no)
3352 if test "$DPKG" = "no"; then
3353 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
3356 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
3357 if test "$_os" = "Darwin"; then
3358 AC_MSG_CHECKING([for PackageMaker availability])
3359 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
3360 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
3365 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
3368 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
3369 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3370 if test "$EPM" != "no" && test "$EPM" != "internal"; then
3371 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
3372 AC_MSG_CHECKING([whether epm is patched for OOos needs])
3373 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
3374 AC_MSG_RESULT([yes])
3377 if echo "$PKGFORMAT" | grep -q rpm; then
3379 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
3380 echo "the rpms will need to be installed with --nodeps" >> warn
3384 AC_MSG_WARN([the ${_pt}s will not be relocateable])
3385 echo "the ${_pt}s will not be relocateable" >> warn
3386 AC_MSG_WARN([if you want to make sure installation without --nodeps and
3387 relocation will work, you need to patch your epm with the
3388 patch in epm/epm-3.7.patch or build with
3389 --with-epm=internal which will build a suitable epm])
3394 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3395 AC_PATH_PROG(PKGMK, pkgmk, no)
3396 if test "$PKGMK" = "no"; then
3397 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
3412 dnl ===================================================================
3414 dnl ===================================================================
3415 AC_PATH_PROG(GPERF, gperf)
3416 if test -z "$GPERF"; then
3417 AC_MSG_ERROR([gperf not found but needed. Install it.])
3419 AC_MSG_CHECKING([gperf version])
3420 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
3423 AC_MSG_ERROR([too old, you need at least 3.0.0])
3426 dnl ===================================================================
3427 dnl Check for building stax
3428 dnl ===================================================================
3429 AC_MSG_CHECKING([whether to build the stax])
3430 if test -f "./stax/download/jsr173_1.0_api.jar"; then
3432 AC_MSG_RESULT([no, will use the prebuilt stax/download/jsr173_1.0_api.jar])
3435 AC_MSG_RESULT([yes])
3437 AC_SUBST(BUILD_STAX)
3439 dnl ===================================================================
3440 dnl Check for building ODK
3441 dnl ===================================================================
3442 AC_MSG_CHECKING([whether to build the ODK])
3443 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
3444 AC_MSG_RESULT([yes])
3445 if test "$WITH_JAVA" != "no"; then
3446 AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
3447 if ! test -f "./external/unowinreg/unowinreg.dll"; then
3448 HAVE_UNOWINREG_DLL=no
3450 HAVE_UNOWINREG_DLL=yes
3452 if test "$HAVE_UNOWINREG_DLL" = "yes"; then
3453 AC_MSG_RESULT([found])
3456 if test "$_os" = "WINNT"; then
3457 AC_MSG_RESULT([not found, will be built])
3459 AC_MSG_WARN([not found, will be cross-built using mingw32])
3463 if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
3464 if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
3465 AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
3466 Specify mingw32 g++ executable name with --with-mingwin.
3467 Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
3468 put it into external/unowinreg])
3470 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3471 if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
3473 AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
3475 if test "$MINGWCXX" = "false"; then
3476 AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
3478 AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
3479 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
3484 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3485 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
3487 AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`, false)
3489 if test "$MINGWSTRIP" = "false"; then
3490 AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
3496 CXXCPP="$MINGWCXX -E"
3497 save_CXXFLAGS=$CXXFLAGS
3498 save_CPPFLAGS=$CPPFLAGS
3499 CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
3500 CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
3501 # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
3502 # do not make sense here (and 'd make the check fail)
3505 AC_HAVE_LIBRARY(kernel32)
3506 AC_HAVE_LIBRARY(advapi32)
3507 AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
3508 CXXFLAGS=$save_CXXFLAGS
3509 CPPFLAGS=$save_CPPFLAGS
3516 BUILD_TYPE="$BUILD_TYPE ODK"
3521 AC_SUBST(BUILD_UNOWINREG)
3523 AC_SUBST(MINGWSTRIP)
3525 dnl ===================================================================
3526 dnl Check for system stdlibs
3527 dnl ===================================================================
3528 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
3529 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
3530 test "$with_system_stdlibs" != "no"; then
3534 AC_MSG_RESULT([yes])
3537 AC_SUBST(SYSTEM_STDLIBS)
3539 dnl ===================================================================
3540 dnl Check for system zlib
3541 dnl ===================================================================
3542 if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
3543 with_system_zlib=yes
3545 AC_MSG_CHECKING([which zlib to use])
3546 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
3547 test "$with_system_zlib" != "no"; then
3548 AC_MSG_RESULT([external])
3550 AC_CHECK_HEADER(zlib.h, [],
3551 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
3552 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
3553 [AC_MSG_ERROR(zlib not found or functional)], [])
3555 AC_MSG_RESULT([internal])
3557 BUILD_TYPE="$BUILD_TYPE ZLIB"
3559 AC_SUBST(SYSTEM_ZLIB)
3561 dnl ===================================================================
3562 dnl Check for system jpeg
3563 dnl ===================================================================
3564 AC_MSG_CHECKING([which jpeg to use])
3565 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
3566 test "$with_system_jpeg" != "no"; then
3567 AC_MSG_RESULT([external])
3569 AC_CHECK_HEADER(jpeglib.h, [],
3570 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
3571 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
3572 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
3574 AC_MSG_RESULT([internal])
3576 BUILD_TYPE="$BUILD_TYPE JPEG"
3578 AC_SUBST(SYSTEM_JPEG)
3580 dnl ===================================================================
3581 dnl Check for system expat
3582 dnl ===================================================================
3583 AC_MSG_CHECKING([which expat to use])
3584 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
3585 test "$with_system_expat" != "no"; then
3586 AC_MSG_RESULT([external])
3588 AC_CHECK_HEADER(expat.h, [],
3589 [AC_MSG_ERROR(expat.h not found. install expat)], [])
3590 AC_CHECK_LIB(expat, XML_ParserCreate, [],
3591 [AC_MSG_RESULT(expat library not found or functional.)], [])
3593 AC_MSG_RESULT([internal])
3595 BUILD_TYPE="$BUILD_TYPE EXPAT"
3597 AC_SUBST(SYSTEM_EXPAT)
3599 dnl ===================================================================
3600 dnl Check for system libwpd
3601 dnl ===================================================================
3602 AC_MSG_CHECKING([which libwpd to use])
3603 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
3604 test "$with_system_libwpd" != "no"; then
3605 AC_MSG_RESULT([external])
3607 PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
3609 AC_MSG_RESULT([internal])
3611 BUILD_TYPE="$BUILD_TYPE LIBWPD"
3613 AC_SUBST(SYSTEM_LIBWPD)
3614 AC_SUBST(LIBWPD_CFLAGS)
3615 AC_SUBST(LIBWPD_LIBS)
3617 dnl ===================================================================
3618 dnl Check for system cppunit
3619 dnl ===================================================================
3620 AC_MSG_CHECKING([which cppunit to use])
3621 if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
3622 test "$with_system_cppunit" != "no"; then
3623 AC_MSG_RESULT([external])
3625 # might work for earlier, too but go sure:
3626 PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.0 )
3628 AC_MSG_RESULT([internal])
3630 BUILD_TYPE="$BUILD_TYPE CPPUNIT"
3632 AC_SUBST(SYSTEM_CPPUNIT)
3633 AC_SUBST(CPPUNIT_CFLAGS)
3634 AC_SUBST(CPPUNIT_LIBS)
3636 dnl ===================================================================
3637 dnl Check whether freetype is available
3638 dnl ===================================================================
3639 if test "$test_freetype" = "yes"; then
3640 AC_MSG_CHECKING([whether freetype is available])
3641 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
3643 AC_SUBST(FREETYPE_CFLAGS)
3644 AC_SUBST(FREETYPE_LIBS)
3646 dnl ===================================================================
3647 dnl Check whether freetype2 supports emboldening
3648 dnl ===================================================================
3649 if test "$test_freetype" = "yes"; then
3650 save_CPPFLAGS="$CPPFLAGS"
3651 save_LDFLAGS="$LDFLAGS"
3653 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
3654 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
3655 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
3656 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
3657 LDFLAGS="$save_LDFLAGS"
3658 CPPFLAGS="$save_CPPFLAGS"
3661 AC_SUBST(USE_FT_EMBOLDEN)
3663 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
3664 test "$with_system_libxslt" != "no"; then
3665 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
3666 test "$with_system_libxml" = "no"; then
3667 # somehow AC_MSG_WARN won't work...
3668 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
3669 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
3670 with_system_libxml=yes
3673 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
3674 test "$with_system_libxml" != "no"; then
3675 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
3676 test "$with_system_libxslt" = "no"; then
3677 # somehow AC_MSG_WARN won't work...
3678 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
3679 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
3680 with_system_libxslt=yes
3684 dnl ===================================================================
3685 dnl Check for system libxslt
3686 dnl ===================================================================
3687 AC_MSG_CHECKING([which libxslt to use])
3688 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
3689 "$_os" = "Darwin" && \
3690 test "$with_system_libxslt" != "no"; then
3691 AC_MSG_RESULT([external])
3694 PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
3696 dnl Check for xsltproc
3697 AC_PATH_PROG(XSLTPROC, xsltproc, no)
3698 if test "$XSLTPROC" = "no"; then
3699 AC_MSG_ERROR([xsltproc is required])
3702 AC_MSG_RESULT([internal])
3704 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
3706 AC_SUBST(SYSTEM_LIBXSLT)
3707 AC_SUBST(LIBXSLT_CFLAGS)
3708 AC_SUBST(LIBXSLT_LIBS)
3711 dnl ===================================================================
3712 dnl Check for system libxml
3713 dnl ===================================================================
3714 AC_MSG_CHECKING([which libxml to use])
3715 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
3716 "$_os" = "Darwin" && \
3717 test "$with_system_libxml" != "no"; then
3718 AC_MSG_RESULT([external])
3720 PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
3721 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
3723 AC_MSG_RESULT([internal])
3725 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
3727 AC_SUBST(SYSTEM_LIBXML)
3728 AC_SUBST(LIBXML_CFLAGS)
3729 AC_SUBST(LIBXML_LIBS)
3731 dnl ===================================================================
3732 dnl Check for system python
3733 dnl ===================================================================
3734 AC_MSG_CHECKING([which python to use])
3735 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
3736 with_system_python=yes
3737 AC_MSG_RESULT([compiling against MacOSX10.4u.sdk (python version 2.3)])
3738 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
3739 PYTHON_LIBS="-framework Python"
3740 elif test -n "$with_system_python" -o -n "$with_system_libs" && \
3741 test "$with_system_python" != "no"; then
3742 with_system_python=yes
3743 AC_MSG_RESULT([external])
3744 AM_PATH_PYTHON([2.2])
3746 python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
3747 python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
3748 PYTHON_CFLAGS="-I$python_include"
3749 PYTHON_LIBS="-lpython$python_version"
3751 if test "$with_system_python" = "yes" ; then
3753 dnl check if the headers really work:
3754 save_CPPFLAGS="$CPPFLAGS"
3755 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
3756 AC_CHECK_HEADER(Python.h, [],
3757 [AC_MSG_ERROR(Python headers not found)], [])
3758 CPPFLAGS="$save_CPPFLAGS"
3761 BUILD_TYPE="$BUILD_TYPE PYTHON"
3762 AC_MSG_RESULT([internal])
3763 # Embedded python dies without Home set
3764 if test "z$HOME" = "z"; then
3767 # bz2 tarball and bzip2 is not standard
3768 if test -z "$BZIP2"; then
3769 AC_PATH_PROG( BZIP2, bzip2)
3770 if test -z "$BZIP2"; then
3771 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
3775 AC_SUBST(SYSTEM_PYTHON)
3776 AC_SUBST(PYTHON_CFLAGS)
3777 AC_SUBST(PYTHON_LIBS)
3778 HOME=`echo $HOME | sed 's:\\\\:/:g'`
3781 dnl ===================================================================
3782 dnl Check for system berkley db
3783 dnl ===================================================================
3784 AC_MSG_CHECKING([which db to use])
3785 if test -n "$with_system_db" -o -n "$with_system_libs" && \
3786 test "$with_system_db" != "no"; then
3788 AC_MSG_RESULT([external])
3789 AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
3791 CFLAGS=-I/usr/include/db4
3792 AC_CHECK_HEADER(db4/db.h,
3793 [ DB_INCLUDES=/usr/include/db4 ],
3794 [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
3797 AC_MSG_CHECKING([whether db is at least 4.1])
3801 int main(int argc, char **argv) {
3802 if(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) return 0;
3805 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
3806 AC_HAVE_LIBRARY(db, [],
3807 [AC_MSG_ERROR([db not installed or functional])], [])
3808 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
3810 AC_MSG_RESULT([internal])
3812 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
3815 AC_SUBST(DB_VERSION)
3816 AC_SUBST(DB_INCLUDES)
3819 dnl ===================================================================
3820 dnl Check for system lucene
3821 dnl ===================================================================
3822 AC_MSG_CHECKING([which lucene to use])
3823 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
3824 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
3825 AC_MSG_RESULT([external])
3827 if test -z $LUCENE_CORE_JAR; then
3828 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
3829 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
3831 AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
3832 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
3833 [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
3834 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
3835 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
3842 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3843 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
3846 if test -z $LUCENE_ANALYZERS_JAR; then
3847 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
3848 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
3850 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
3851 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
3852 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
3857 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3858 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
3860 AC_MSG_CHECKING([whether lucene is version 2.x])
3861 export LUCENE_CORE_JAR
3862 if $PERL -e 'use Archive::Zip;
3863 my $file = "$ENV{'LUCENE_CORE_JAR'}";
3864 my $zip = Archive::Zip->new( $file );
3865 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
3866 if ( $mf =~ m/Specification-Version: 2.*/ ) {
3871 AC_MSG_RESULT([yes])
3873 AC_MSG_ERROR([no, you need lucene 2])
3877 AC_MSG_RESULT([internal])
3879 BUILD_TYPE="$BUILD_TYPE LUCENE"
3881 AC_SUBST(SYSTEM_LUCENE)
3882 AC_SUBST(LUCENE_CORE_JAR)
3883 AC_SUBST(LUCENE_ANALYZERS_JAR)
3885 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
3886 if test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then
3887 AC_MSG_RESULT([yes])
3889 AC_MSG_CHECKING([for mysqlc module])
3890 if test -d mysqlc; then
3893 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
3895 BUILD_TYPE="$BUILD_TYPE MYSQLC"
3900 AC_SUBST(ENABLE_MYSQLC)
3902 if test "$ENABLE_MYSQLC" = "YES"; then
3903 dnl ===================================================================
3904 dnl Check for system MySQL
3905 dnl ===================================================================
3906 AC_MSG_CHECKING([for mysql pre-requisites])
3907 if test -n "$with_system_mysql" -o -n "$with_system_libs" && \
3908 test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then
3909 AC_MSG_RESULT([external MySQL])
3911 AC_PATH_PROG( MYSQLCONFIG, mysql_config)
3912 AC_MSG_CHECKING([MySQL version])
3913 MYSQL_VERSION=`$MYSQLCONFIG --version`
3914 MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
3915 if test "$MYSQL_MAJOR" -ge "5"; then
3918 AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
3920 AC_MSG_CHECKING([for MySQL Client library])
3921 MYSQL_INC=`$MYSQLCONFIG --include`
3922 MYSQL_LIB=`$MYSQLCONFIG --libs`
3923 MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,`
3924 AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
3927 if test -n "$with_libmysql_path"; then
3928 AC_MSG_RESULT([external Connector/C (libmysql)])
3929 LIBMYSQL=libmysql.so
3930 if test "$_os" = "Darwin"; then
3931 LIBMYSQL=libmysql.dylib
3932 elif test "$_os" = "WINNT"; then
3933 LIBMYSQL=libmysql.dll
3935 AC_MSG_CHECKING([for $LIBMYSQL])
3936 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
3937 AC_MSG_RESULT([found.])
3938 LIBMYSQL_PATH=$with_libmysql_path
3940 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
3943 AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path])
3946 AC_SUBST(SYSTEM_MYSQL)
3949 AC_SUBST(MYSQL_DEFINES)
3950 AC_SUBST(LIBMYSQL_PATH)
3953 dnl ===================================================================
3954 dnl Check for system MySQL C++ Connector
3955 dnl ===================================================================
3957 # who thought this too-generic cppconn dir was a good idea?
3958 AC_MSG_CHECKING([MySQL Connector/C++])
3959 if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \
3960 test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then
3961 AC_MSG_RESULT([external])
3962 SYSTEM_MYSQL_CPPCONN=YES
3964 AC_CHECK_HEADER(mysql_driver.h, [],
3965 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
3966 AC_CHECK_LIB(mysqlcppconn, main, [],
3967 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
3968 AC_MSG_CHECKING([version])
3970 #include <mysql_driver.h>
3972 int main(int argc, char **argv) {
3973 sql::Driver *driver;
3974 driver = get_driver_instance();
3975 if (driver->getMajorVersion() > 1 || \
3976 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
3977 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
3982 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])])
3986 AC_MSG_RESULT([internal])
3987 AC_MSG_CHECKING([for mysqlcppconn module])
3988 if test -d mysqlcppconn; then
3991 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
3993 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
3994 SYSTEM_MYSQL_CPPCONN=NO
3997 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
4000 dnl ===================================================================
4001 dnl Check for system hsqldb
4002 dnl ===================================================================
4003 AC_MSG_CHECKING([which hsqldb to use])
4004 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
4005 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
4006 AC_MSG_RESULT([external])
4008 if test -z $HSQLDB_JAR; then
4009 HSQLDB_JAR=/usr/share/java/hsqldb.jar
4011 AC_CHECK_FILE($HSQLDB_JAR, [],
4012 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
4013 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
4015 if $PERL -e 'use Archive::Zip;
4016 my $file = "$ENV{'HSQLDB_JAR'}";
4017 my $zip = Archive::Zip->new( $file );
4018 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
4019 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
4020 push @l, split(/\n/, $mf);
4021 foreach my $line (@l) {
4022 if ($line =~ m/Specification-Version:/) {
4023 ($t, $version) = split (/:/,$line);
4024 $version =~ s/^\s//;
4025 ($a, $b, $c, $d) = split (/\./,$version);
4026 if ($c == "0" && $d > "8") {
4036 AC_MSG_RESULT([yes])
4038 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
4041 AC_MSG_RESULT([internal])
4043 BUILD_TYPE="$BUILD_TYPE HSQLDB"
4045 AC_SUBST(SYSTEM_HSQLDB)
4046 AC_SUBST(HSQLDB_JAR)
4048 dnl ===================================================================
4049 dnl Check for system beanshell
4050 dnl ===================================================================
4051 AC_MSG_CHECKING([which beanshell to use])
4052 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
4053 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
4054 AC_MSG_RESULT([external])
4056 if test -z $BSH_JAR; then
4057 BSH_JAR=/usr/share/java/bsh.jar
4059 AC_CHECK_FILE($BSH_JAR, [],
4060 [AC_MSG_ERROR(bsh.jar not found.)], [])
4062 AC_MSG_RESULT([internal])
4064 BUILD_TYPE="$BUILD_TYPE BSH"
4066 AC_SUBST(SYSTEM_BSH)
4070 dnl ===================================================================
4071 dnl Check for system saxon
4072 dnl ===================================================================
4073 AC_MSG_CHECKING([which saxon to use])
4074 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
4075 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
4076 AC_MSG_RESULT([external])
4078 if test -z $SAXON_JAR; then
4079 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4080 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4082 AC_CHECK_FILE(/usr/share/java/saxon.jar,
4083 [ SAXON_JAR=/usr/share/java/saxon.jar ],
4084 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4085 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4086 [ AC_MSG_ERROR(saxon.jar replacement not found)]
4093 AC_CHECK_FILE($SAXON_JAR, [],
4094 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
4096 if test -n "$SERIALIZER_JAR"; then
4097 AC_CHECK_FILE($SERIALIZER_JAR, [],
4098 [AC_MSG_ERROR(serializer.jar not found.)], [])
4099 AC_SUBST(SERIALIZER_JAR)
4102 dnl Saxon comes in two practically available versions, the out-of-date saxonb which
4103 dnl supports the java extensions that OOo uses, and the up-to-date saxon he
4104 dnl "home edition" version, which is crippled to not support those java extensions.
4105 dnl And as an aside the he one also needs to be tweaked to include
4106 dnl a META-INF/services to broadcast that it supports the jaxp transform factory
4108 AC_MSG_CHECKING([if saxon works])
4109 cat > saxontest.java <<_ACEOF
4110 [import javax.xml.transform.TransformerFactory;
4111 import javax.xml.transform.Transformer;
4112 import javax.xml.transform.stream.StreamSource;
4115 import net.sf.saxon.FeatureKeys;
4118 public static void main(String[] args) {
4119 System.setProperty("javax.xml.transform.TransformerFactory",
4120 "net.sf.saxon.TransformerFactoryImpl");
4122 TransformerFactory tfactory = TransformerFactory.newInstance();
4123 // some external saxons (Debian, Ubuntu, ...) have this disabled
4125 tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
4126 System.out.println("TransformerFactory is" +
4127 tfactory.getClass().getName());
4128 Transformer transformer = tfactory.newTransformer(
4129 new StreamSource(new File(args[0])));
4130 } catch(Exception e){
4131 e.printStackTrace(System.err);
4139 cat > saxontest.xsl<<_ACEOF
4140 [<?xml version="1.0" encoding="UTF-8"?>
4141 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4142 <xsl:template match="/">
4143 <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/>
4148 javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2"
4149 AC_TRY_EVAL(javac_cmd)
4150 if test $? = 0 && test -f ./saxontest.class ; then
4151 java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2"
4152 AC_TRY_EVAL(java_cmd)
4153 if test $? = 0; then
4154 AC_MSG_RESULT([yes])
4156 cat saxontest.java >&5
4158 AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb])
4162 cat saxontest.java >&5
4163 AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar])
4166 AC_MSG_RESULT([internal])
4170 AC_SUBST(SYSTEM_SAXON)
4173 if test -n "$NEED_SAXON"; then
4174 BUILD_TYPE="$BUILD_TYPE SAXON"
4177 dnl ===================================================================
4178 dnl Check for system curl
4179 dnl ===================================================================
4180 if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
4181 with_system_curl=yes
4183 AC_MSG_CHECKING([which curl to use])
4184 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
4185 test "$with_system_curl" != "no"; then
4186 AC_MSG_RESULT([external])
4189 AC_PATH_PROG( CURLCONFIG, curl-config)
4190 if test -z "$CURLCONFIG"; then
4191 AC_MSG_ERROR([install curl to run this script])
4194 # check curl version
4195 AC_MSG_CHECKING([whether curl is >= 7.13.1])
4196 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
4197 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \
4198 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then
4199 AC_MSG_ERROR([no, you need at least curl 7.13,1])
4201 AC_MSG_RESULT([yes])
4203 CURL_LIBS=`$CURLCONFIG --libs`
4204 CURL_CFLAGS=`$CURLCONFIG --cflags`
4206 AC_MSG_RESULT([internal])
4208 BUILD_TYPE="$BUILD_TYPE CURL"
4210 AC_SUBST(SYSTEM_CURL)
4211 AC_SUBST(CURL_CFLAGS)
4214 dnl ===================================================================
4215 dnl Check for system mdds
4216 dnl ===================================================================
4217 AC_MSG_CHECKING([which mdds to use])
4218 if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
4219 test "$with_system_mdds" != "no"; then
4220 AC_MSG_RESULT([external])
4223 AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
4224 [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
4227 AC_MSG_RESULT([internal])
4228 BUILD_TYPE="$BUILD_TYPE MDDS"
4231 AC_SUBST(SYSTEM_MDDS)
4233 dnl ===================================================================
4234 dnl Check for system boost
4235 dnl ===================================================================
4236 AC_MSG_CHECKING([which boost to use])
4237 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
4238 test "$with_system_boost" != "no"; then
4239 AC_MSG_RESULT([external])
4242 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
4243 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
4244 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
4245 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
4246 AC_CHECK_HEADER(boost/function.hpp, [],
4247 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
4249 save_CXXFLAGS=$CXXFLAGS
4250 CXXFLAGS="$CXXFLAGS -fno-exceptions"
4251 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
4252 AC_TRY_COMPILE([#include <boost/function.hpp>
4254 ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes)
4256 if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then
4257 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
4259 AC_MSG_RESULT([yes])
4261 CXXFLAGS=$save_CXXFLAGS
4264 AC_MSG_RESULT([internal])
4265 BUILD_TYPE="$BUILD_TYPE BOOST"
4268 AC_SUBST(SYSTEM_BOOST)
4270 dnl ===================================================================
4271 dnl Check for system vigra
4272 dnl ===================================================================
4273 AC_MSG_CHECKING([which vigra to use])
4274 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
4275 test "$with_system_vigra" != "no"; then
4276 AC_MSG_RESULT([external])
4279 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
4280 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
4283 AC_MSG_RESULT([internal])
4284 BUILD_TYPE="$BUILD_TYPE VIGRA"
4287 AC_SUBST(SYSTEM_VIGRA)
4289 dnl ===================================================================
4290 dnl Check for system odbc
4291 dnl ===================================================================
4292 AC_MSG_CHECKING([which odbc headers to use])
4293 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
4294 test "$with_system_odbc_headers" != "no"; then
4295 AC_MSG_RESULT([external])
4296 SYSTEM_ODBC_HEADERS=YES
4298 AC_CHECK_HEADER(sqlext.h, [],
4299 [AC_MSG_ERROR(odbc not found. install odbc)], [])
4301 AC_MSG_RESULT([internal])
4302 SYSTEM_ODBC_HEADERS=NO
4303 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
4305 AC_SUBST(SYSTEM_ODBC_HEADERS)
4307 AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components])
4308 if test "$enable_mozilla" = "no"; then
4311 ENABLE_NSS_MODULE=NO
4313 AC_MSG_RESULT([yes])
4316 AC_SUBST(WITH_MOZILLA)
4318 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
4319 if test "$enable_mozilla" = "no"; then
4321 elif test "$with_system_mozilla" = "yes"; then
4322 AC_MSG_RESULT([no, not possible with system-mozilla])
4324 AC_MSG_RESULT([yes])
4327 AC_MSG_CHECKING([whether to build XML Security support])
4328 if test "$enable_mozilla" = "no"; then
4329 AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
4331 AC_MSG_RESULT([yes])
4334 AC_MSG_CHECKING([whether to build LDAP configuration backend])
4335 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
4336 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
4337 AC_MSG_RESULT([yes])
4340 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
4348 if test "$WITH_LDAP" = "YES"; then
4349 dnl ===================================================================
4350 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
4351 dnl ===================================================================
4352 AC_MSG_CHECKING([which LDAP SDK to use])
4353 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
4354 AC_MSG_RESULT([OpenLDAP])
4356 AC_CHECK_HEADERS(ldap.h, [],
4357 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
4358 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
4359 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4360 # rumours say that OpenLDAP doesn't have that function. I looked and
4361 # it has it. Test for it to be sure
4362 AC_CHECK_LIB(ldap, ldap_set_option, [],
4363 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4365 AC_MSG_RESULT([Netscape/Mozilla])
4366 # TODO. Actually do a sanity check and check for
4367 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
4372 AC_SUBST(WITH_OPENLDAP)
4374 dnl ===================================================================
4375 dnl Check for system mozilla
4376 dnl ===================================================================
4377 AC_MSG_CHECKING([which mozilla to use])
4378 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
4379 AC_MSG_RESULT([external])
4381 ENABLE_NSS_MODULE=NO
4382 enable_nss_module=no
4383 AC_MSG_CHECKING([which Mozilla flavour to use])
4384 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
4386 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
4387 MOZ_FLAVOUR=xulrunner
4388 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
4389 MOZ_FLAVOUR=seamonkey
4390 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
4392 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
4397 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
4400 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
4401 if test -z "$STANDALONENSS"; then
4402 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
4404 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
4408 if $PKG_CONFIG --exists nspr ; then
4409 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
4410 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
4413 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
4416 if test "$MOZ_FLAVOUR" != "libxul"; then
4417 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
4418 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
4419 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
4422 if test -z "$HASXPCOM"; then
4423 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
4424 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
4425 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
4426 if ! test -e "$MOZ_LIB/libxul.so"; then
4427 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
4428 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
4429 MOZ_LIB="$MOZ_LIB/sdk/lib"
4434 save_CPPFLAGS="$CPPFLAGS"
4435 save_LDFLAGS="$LDFLAGS"
4437 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
4438 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
4439 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
4440 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
4441 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
4442 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
4443 LDFLAGS="$save_LDFLAGS"
4444 CPPFLAGS="$save_CPPFLAGS"
4447 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
4448 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
4449 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
4450 if test -d "$MOZ_INC/ldap"; then
4451 AC_MSG_RESULT([yes])
4452 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
4455 Could not find LDAP header include files in $MOZ_INC/ldap.
4456 Please recompile $tmp with --enable-ldap or use --with-openldap.])
4460 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
4461 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
4462 if test "$MOZ_FLAVOUR" = "libxul"; then
4463 MOZ_FLAVOUR="mozilla"
4466 elif test "$enable_mozilla" = "no"; then
4467 AC_MSG_RESULT([none])
4469 ENABLE_NSS_MODULE=NO
4470 enable_nss_module=no
4472 AC_MSG_RESULT([internal])
4474 BUILD_TYPE="$BUILD_TYPE MOZ"
4475 if test -z "$with_mozilla_version"; then
4478 AC_MSG_CHECKING([which mozilla version to build])
4479 MOZILLA_VERSION=$with_mozilla_version
4480 enable_build_mozilla=1
4481 AC_MSG_RESULT([$MOZILLA_VERSION])
4484 AC_SUBST(MOZILLA_VERSION)
4486 AC_MSG_CHECKING([for toolkit mozilla should use])
4487 if test -z "$with_mozilla_toolkit"; then
4488 if test "$_os" != "WINNT" ; then
4489 if test "$_os" = "Darwin" ; then
4491 AC_MSG_RESULT([mac])
4493 MOZILLA_TOOLKIT=gtk2
4494 AC_MSG_RESULT([gtk2])
4498 MOZILLA_TOOLKIT=$with_mozilla_toolkit
4499 enable_build_mozilla=1
4500 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
4502 #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then
4503 # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not
4504 # #available using fink, mac (carbon) doesn't work because xcode installs conflicting headers
4505 # AC_MSG_ERROR([Only gtk2 toolkit supported on Mac, sorry.])
4508 AC_SUBST(MOZILLA_TOOLKIT)
4510 # default to enabling build mozilla
4511 if test "$enable_build_mozilla" != "no"; then
4512 enable_build_mozilla=yes
4514 enable_build_mozilla=
4517 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
4518 if test -n "$enable_build_mozilla"; then
4520 AC_MSG_RESULT([yes])
4526 AC_MSG_CHECKING([whether to build provided NSS module])
4527 if test "$enable_nss_module" != "no"; then
4528 ENABLE_NSS_MODULE="YES"
4529 BUILD_TYPE="$BUILD_TYPE NSS"
4530 AC_MSG_RESULT([yes])
4531 if test "$_os" = "WINNT"; then
4532 AC_MSG_CHECKING([for Mozilla build tooling])
4533 if test -z "$MOZILLABUILD" ; then
4534 AC_MSG_ERROR([Mozilla build tooling not found.
4535 Use the --with-mozilla-build option after installling the tools obtained
4536 from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
4538 if test \( "$WITH_MINGWIN" = "yes" \) ; then
4539 if test ! -d "$MOZILLABUILD" ; then
4540 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4545 if test ! -d "$MOZILLABUILD/moztools" \
4546 -o ! -d "$MOZILLABUILD/msys" ; then
4547 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4555 ENABLE_NSS_MODULE="NO"
4559 if test "$BUILD_MOZAB" = "TRUE"; then
4560 if test "$_os" = "WINNT"; then
4561 if test "$WITH_MINGWIN" != "yes"; then
4562 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
4563 if test "$MSVSVER" != "2005"; then
4564 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
4567 AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
4568 echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
4572 if test -z "$MOZILLA_VERSION"; then
4573 MOZILLA_VERSION=1.1.14
4575 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
4576 MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst`
4577 AC_MSG_CHECKING([for mozilla sources])
4578 if test -z "$MOZILLA_FETCH_FILE"; then
4579 AC_MSG_RESULT([not found])
4580 HAVE_MOZILLA_TARBALL=n
4582 AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE])
4583 if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then
4584 if test -z "$DO_FETCH"; then
4585 AC_MSG_RESULT([will be fetched])
4586 HAVE_MOZILLA_TARBALL=y
4588 AC_MSG_RESULT([not found])
4589 HAVE_MOZILLA_TARBALL=n
4592 AC_MSG_RESULT([found])
4593 HAVE_MOZILLA_TARBALL=y
4596 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
4597 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
4598 Use "./fetch_tarballs.sh ooo.lst" to download.])
4600 if test "$_os" = "WINNT"; then
4601 AC_MSG_CHECKING([for moztools binaries])
4602 if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then
4603 AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip
4604 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
4608 elif test "$_os" = "Darwin"; then
4609 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4610 AC_MSG_NOTICE([checking whether mozilla can be built...])
4611 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]))
4613 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
4614 if test -z "$MOZIDL"; then
4615 AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit.])
4619 # Generic Unix/Linux section
4620 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4621 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
4622 if test -z "$MOZGTK"; then
4623 AC_MSG_ERROR([GTK2 is needed to build mozilla.])
4625 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
4626 if test -z "$MOZIDL"; then
4627 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.])
4630 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
4631 if test -z "$MOZGTK"; then
4632 AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.])
4634 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4635 if test -z "$MOZIDL"; then
4636 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4642 AC_SUBST(BUILD_MOZAB)
4645 AC_SUBST(ENABLE_NSS_MODULE)
4646 AC_SUBST(MOZILLABUILD)
4647 AC_SUBST(SYSTEM_MOZILLA)
4648 AC_SUBST(MOZ_FLAVOUR)
4651 AC_SUBST(MOZ_LIB_XPCOM)
4652 AC_SUBST(MOZ_NSPR_CFLAGS)
4653 AC_SUBST(MOZ_NSS_CFLAGS)
4654 AC_SUBST(MOZ_LDAP_CFLAGS)
4656 dnl ===================================================================
4657 dnl Check for system sane
4658 dnl ===================================================================
4659 AC_MSG_CHECKING([which sane header to use])
4660 if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \
4661 test "$with_system_sane_header" != "no"; then
4662 AC_MSG_RESULT([external])
4663 SYSTEM_SANE_HEADER=YES
4664 AC_CHECK_HEADER(sane/sane.h, [],
4665 [AC_MSG_ERROR(sane not found. install sane)], [])
4667 AC_MSG_RESULT([internal])
4668 SYSTEM_SANE_HEADER=NO
4669 BUILD_TYPE="$BUILD_TYPE SANE"
4671 AC_SUBST(SYSTEM_SANE_HEADER)
4673 dnl ===================================================================
4674 dnl Check for system icu
4675 dnl ===================================================================
4676 AC_MSG_CHECKING([which icu to use])
4677 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
4678 test "$with_system_icu" != "no"; then
4679 AC_MSG_RESULT([external])
4682 AC_MSG_CHECKING([for unicode/rbbi.h])
4683 AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
4685 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
4686 if test -z "$SYSTEM_GENBRK"; then
4687 AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
4689 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
4690 if test -z "$SYSTEM_GENCCODE"; then
4691 AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
4693 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
4694 if test -z "$SYSTEM_GENCMN"; then
4695 AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
4698 AC_PATH_PROG( ICUCONFIG, icu-config)
4699 AC_MSG_CHECKING([ICU version])
4700 ICU_VERSION=`$ICUCONFIG --version`
4701 ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1`
4702 ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2`
4703 ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3`
4705 if test "$ICU_MAJOR" -ge "4"; then
4708 AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
4712 AC_MSG_RESULT([internal])
4714 BUILD_TYPE="$BUILD_TYPE ICU"
4716 AC_SUBST(SYSTEM_ICU)
4717 AC_SUBST(SYSTEM_GENBRK)
4718 AC_SUBST(SYSTEM_GENCCODE)
4719 AC_SUBST(SYSTEM_GENCMN)
4724 dnl ===================================================================
4726 dnl ===================================================================
4728 AC_MSG_CHECKING([whether to enable graphite support])
4729 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then
4730 AC_MSG_RESULT([yes])
4731 ENABLE_GRAPHITE="TRUE"
4732 AC_MSG_CHECKING([which graphite to use])
4733 if test -n "$with_system_graphite" -o -n "$with_system_libs" && \
4734 test "$with_system_graphite" != "no"; then
4735 AC_MSG_RESULT([external])
4737 PKG_CHECK_MODULES( GRAPHITE, silgraphite )
4739 AC_MSG_RESULT([internal])
4741 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
4746 AC_SUBST(ENABLE_GRAPHITE)
4747 AC_SUBST(SYSTEM_GRAPHITE)
4748 AC_SUBST(GRAPHITE_LIBS)
4749 AC_SUBST(GRAPHITE_CFLAGS)
4751 dnl ===================================================================
4752 dnl Checks for libraries.
4753 dnl ===================================================================
4754 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
4755 dnl See if we have the AppKit framework for building with Quartz graphics.
4757 if test "$_os" = "Darwin"; then
4758 if test "x$with_x" = "xyes"; then
4759 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
4761 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
4762 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
4763 AC_MSG_RESULT([yes])
4764 x_includes="no_x_includes"
4765 x_libraries="no_x_libraries"
4766 dnl disable some things used on other Unix versions but not on the aqua build
4770 AC_SUBST(ENABLE_CUPS)
4772 AC_MSG_ERROR([No AppKit.framewrok found])
4777 dnl ***************************************
4778 dnl testing for X libraries and includes...
4779 dnl ***************************************
4780 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
4781 echo "Do Nothing for _os = Darwin"
4782 dnl Mac OS X using Aqua graphics. Don't check for X11.
4784 elif test "$_os" = "OS2" ; then
4785 echo "Do Nothing for _os = OS2. Don't check for X11."
4786 dnl OS/2 uses native graphics. Don't check for X11.
4788 elif test "$_os" != "WINNT" ; then
4791 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4793 if test "x$x_includes" = "x"; then
4794 x_includes="default_x_includes"
4796 if test "x$x_libraries" = "x"; then
4797 x_libraries="default_x_libraries"
4799 dnl The variables $x_libraries and $x_includes are set.
4800 if test -z "$x_libraries"; then
4801 AC_MSG_ERROR([No X libraries found]) # Exit
4803 if test -z "$x_includes"; then
4804 AC_MSG_ERROR([No X includes found]) # Exit
4807 LDFLAGS="$X_LDFLAGS $X_LIBS"
4808 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
4809 dnl Check if the XauDisposeAuth symbol is provided by libXau.
4810 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
4812 x_includes="no_x_includes"
4813 x_libraries="no_x_libraries"
4815 if test -z "$x_includes"; then
4816 x_includes="no_x_includes"
4818 if test -z "$x_libraries"; then
4819 x_libraries="no_x_libraries"
4821 if test "$x_includes" = "default_x_includes"; then
4827 if test "$x_libraries" = "default_x_libraries"; then
4828 XLIB=`$PKG_CONFIG --variable=libdir x11`
4829 if test "x$XLIB" = x; then
4838 if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then
4839 dnl ===================================================================
4840 dnl Check for using Xaw
4841 dnl ===================================================================
4842 AC_MSG_CHECKING([whether to use Xaw])
4843 if test "$enable_Xaw" = "no"; then
4846 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt include headers not found])],
4847 [#include <X11/Intrinsic.h>])
4849 AC_MSG_RESULT([yes])
4850 AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])],
4851 [#include <X11/Intrinsic.h>])
4852 AC_CHECK_LIB(Xaw, main, [],
4853 [AC_MSG_ERROR(Xaw library not found or functional)], [])
4856 AC_SUBST(DISABLE_XAW)
4860 dnl ===================================================================
4861 dnl Check if fontconfig/fontconfig.h is available
4862 dnl ===================================================================
4863 if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
4864 AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
4865 [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
4866 AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
4868 #include <fontconfig/fontconfig.h>
4870 int main(int argc, char **argv) {
4871 if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
4874 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
4877 dnl ===================================================================
4878 dnl Check for system Xrender
4879 dnl ===================================================================
4880 AC_MSG_CHECKING([whether to link to Xrender])
4881 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
4882 AC_MSG_RESULT([yes])
4884 with_system_xrender_headers=yes
4886 AC_MSG_RESULT([no, dynamically open it])
4889 AC_MSG_CHECKING([which Xrender headers to use])
4890 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
4891 test "$with_system_xrender_headers" != "no"; then
4892 AC_MSG_RESULT([external])
4893 SYSTEM_XRENDER_HEADERS=YES
4894 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
4895 [AC_MSG_ERROR(Xrender not found. install X)], [])
4897 AC_MSG_RESULT([internal])
4898 SYSTEM_XRENDER_HEADERS=NO
4899 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
4901 if test "$XRENDER_LINK" = "YES"; then
4902 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
4903 [AC_MSG_ERROR(libXrender not found or functional)], [])
4905 AC_SUBST(SYSTEM_XRENDER_HEADERS)
4906 AC_SUBST(XRENDER_LINK)
4908 dnl ===================================================================
4909 dnl Check for XRandr
4910 dnl ===================================================================
4911 AC_MSG_CHECKING([whether to enable RandR support])
4912 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
4913 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
4914 XRANDR_DLOPEN="TRUE"
4915 AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
4917 XRANDR_DLOPEN="FALSE"
4918 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
4919 if test "$ENABLE_RANDR" != "TRUE"; then
4920 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
4921 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
4923 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
4924 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
4925 XRANDR_LIBS="-lXrandr "
4927 AC_MSG_RESULT([enabling RandR support])
4934 AC_SUBST(XRANDR_DLOPEN)
4935 AC_SUBST(XRANDR_CFLAGS)
4936 AC_SUBST(XRANDR_LIBS)
4937 AC_SUBST(ENABLE_RANDR)
4939 dnl ===================================================================
4940 dnl Check for building neon
4941 dnl ===================================================================
4942 AC_MSG_CHECKING([whether to use neon])
4943 if test "$enable_neon" = "no"; then
4946 AC_SUBST(DISABLE_NEON)
4948 AC_MSG_RESULT([yes])
4949 dnl ===================================================================
4950 dnl Check for system neon
4951 dnl ===================================================================
4952 AC_MSG_CHECKING([which neon to use])
4953 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
4954 test "$with_system_neon" != "no"; then
4955 AC_MSG_RESULT([external])
4956 PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
4957 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
4958 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
4961 AC_MSG_RESULT([internal])
4965 BUILD_TYPE="$BUILD_TYPE NEON"
4967 AC_SUBST(SYSTEM_NEON)
4968 AC_SUBST(NEON_VERSION)
4970 AC_SUBST(NEON_CFLAGS)
4973 dnl ===================================================================
4974 dnl Check for system openssl
4975 dnl ===================================================================
4976 if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
4977 with_system_openssl=yes
4979 AC_MSG_CHECKING([which libssl to use])
4980 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
4981 test "$with_system_openssl" != "no"; then
4982 AC_MSG_RESULT([external])
4983 # Mac OS builds should get out without extra stuff is the Mac porters'
4984 # wish. And pkg-config is although Xcode ships a .pc for openssl
4985 if test "$_os" = "Darwin"; then
4987 OPENSSL_LIBS="-lssl -lcrypto"
4989 PKG_CHECK_MODULES( OPENSSL, openssl )
4993 AC_MSG_RESULT([internal])
4995 BUILD_TYPE="$BUILD_TYPE OPENSSL"
4997 AC_SUBST(SYSTEM_OPENSSL)
4998 AC_SUBST(OPENSSL_CFLAGS)
4999 AC_SUBST(OPENSSL_LIBS)
5001 dnl ===================================================================
5002 dnl Test for disabling agg
5003 dnl ===================================================================
5004 AC_MSG_CHECKING([whether to enable agg])
5005 if test "$with_agg" = "no"; then
5008 AC_MSG_RESULT([yes])
5010 AC_SUBST(ENABLE_AGG)
5012 dnl ===================================================================
5013 dnl Check for system AGG
5014 dnl ===================================================================
5015 AC_MSG_CHECKING([which AGG to use])
5016 if test -n "$with_system_agg" -o -n "$with_system_libs" && \
5017 test "$with_system_agg" != "no"; then
5018 AC_MSG_RESULT([external])
5019 PKG_CHECK_MODULES(AGG, libagg >= 2.3)
5020 AC_MSG_CHECKING([agg version])
5021 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
5022 # (/usr/include gets stripped from pkg-config output)
5023 if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
5024 AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
5026 AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
5028 if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
5029 $PKG_CONFIG --modversion libagg | grep -q 2.4; then
5030 # 2.4's libagg.pc.in still contains 2.3 :/
5031 if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
5032 AC_MSG_RESULT([2.4])
5035 AC_MSG_RESULT([2.3])
5040 AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
5043 AC_MSG_RESULT([internal])
5046 BUILD_TYPE="$BUILD_TYPE AGG"
5048 AC_SUBST(SYSTEM_AGG)
5049 AC_SUBST(AGG_VERSION)
5052 dnl ===================================================================
5053 dnl Check for system redland
5054 dnl ===================================================================
5055 AC_MSG_CHECKING([which redland library to use])
5056 if test -n "$with_system_redland" -o -n "$with_system_libs" && \
5057 test "$with_system_redland" != "no"; then
5058 AC_MSG_RESULT([external])
5060 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
5061 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
5063 AC_MSG_RESULT([internal])
5064 BUILD_TYPE="$BUILD_TYPE REDLAND"
5067 AC_SUBST(SYSTEM_REDLAND)
5068 AC_SUBST(REDLAND_CFLAGS)
5069 AC_SUBST(REDLAND_LIBS)
5071 dnl ===================================================================
5072 dnl Check for system hunspell
5073 dnl ===================================================================
5074 AC_MSG_CHECKING([which libhunspell to use])
5075 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
5076 test "$with_system_hunspell" != "no"; then
5077 AC_MSG_RESULT([external])
5080 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
5081 if test "$HUNSPELL_PC" != "TRUE"; then
5082 AC_CHECK_HEADER(hunspell.hxx, [],
5084 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
5085 [AC_MSG_ERROR(hunspell headers not found.)], [])
5087 AC_CHECK_LIB(hunspell, main, [],
5088 [ AC_MSG_ERROR(hunspell library not found.) ], [])
5089 HUNSPELL_LIBS=-lhunspell
5093 AC_MSG_RESULT([internal])
5095 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
5097 AC_SUBST(SYSTEM_HUNSPELL)
5098 AC_SUBST(HUNSPELL_CFLAGS)
5099 AC_SUBST(HUNSPELL_LIBS)
5101 dnl ===================================================================
5102 dnl Checking for altlinuxhyph
5103 dnl ===================================================================
5104 AC_MSG_CHECKING([which altlinuxhyph to use])
5105 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
5106 test "$with_system_altlinuxhyph" != "no"; then
5107 AC_MSG_RESULT([external])
5109 AC_CHECK_HEADER(hyphen.h, [],
5110 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
5111 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
5112 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
5113 [#include <hyphen.h>])
5114 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
5115 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5116 if test -z "$HYPHEN_LIB"; then
5117 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
5118 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5120 if test -z "$HYPHEN_LIB"; then
5121 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
5122 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5125 AC_MSG_RESULT([internal])
5127 BUILD_TYPE="$BUILD_TYPE HYPHEN"
5129 AC_SUBST(SYSTEM_HYPH)
5130 AC_SUBST(HYPHEN_LIB)
5132 dnl ===================================================================
5133 dnl Checking for mythes
5134 dnl ===================================================================
5135 AC_MSG_CHECKING([which mythes to use])
5136 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
5137 AC_MSG_RESULT([external])
5140 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
5141 if test "$MYTHES_PKGCONFIG" = "no"; then
5142 AC_CHECK_HEADER(mythes.hxx, [],
5143 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
5144 AC_CHECK_LIB(mythes-1.2, main, [],
5145 [ MYTHES_FOUND=no], [])
5146 if test "$MYTHES_FOUND" = "no"; then
5147 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
5148 [ MYTHES_FOUND=no], [])
5150 if test "$MYTHES_FOUND" = "no"; then
5151 AC_MSG_ERROR([mythes library not found!.])
5156 AC_MSG_RESULT([internal])
5158 BUILD_TYPE="$BUILD_TYPE MYTHES"
5160 AC_SUBST(SYSTEM_MYTHES)
5161 AC_SUBST(MYTHES_CFLAGS)
5162 AC_SUBST(MYTHES_LIBS)
5164 dnl ===================================================================
5165 dnl Checking for lpsolve
5166 dnl ===================================================================
5167 AC_MSG_CHECKING([which lpsolve to use])
5168 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
5169 test "$with_system_lpsolve" != "no"; then
5170 AC_MSG_RESULT([external])
5172 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
5173 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
5174 # some systems need this. Like Ubuntu....
5175 AC_CHECK_LIB(m, floor)
5176 AC_CHECK_LIB(dl, dlopen)
5177 AC_CHECK_LIB(lpsolve55, make_lp, ,
5178 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
5180 AC_MSG_RESULT([internal])
5182 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
5184 AC_SUBST(SYSTEM_LPSOLVE)
5186 dnl ===================================================================
5187 dnl Checking for libtextcat
5188 dnl ===================================================================
5189 AC_MSG_CHECKING([which libtextcat to use])
5190 if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then
5191 AC_MSG_RESULT([external])
5192 SYSTEM_LIBTEXTCAT=YES
5193 AC_CHECK_HEADER(libtextcat/textcat.h, [],
5194 [ AC_MSG_ERROR(libtextcat headers not found.)], [])
5195 AC_CHECK_LIB(textcat, special_textcat_Init, ,
5196 [ AC_MSG_ERROR(libtextcat library not found or not suitable. libtextcat typically needs to be patched)], [])
5198 AC_MSG_RESULT([internal])
5199 SYSTEM_LIBTEXTCAT=NO
5200 BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT"
5202 AC_SUBST(SYSTEM_LIBTEXTCAT)
5204 AC_MSG_CHECKING([which libtextcat data directory to use])
5205 if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then
5206 if test "$with_system_libtextcat_data" = "yes"; then
5207 SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat
5209 SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data
5211 AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA])
5213 AC_MSG_RESULT([internal])
5214 BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA"
5216 AC_SUBST(SYSTEM_LIBTEXTCAT_DATA)
5218 dnl ***************************************
5219 dnl testing libc version for Linux...
5220 dnl ***************************************
5221 if test "$_os" = "Linux"; then
5222 AC_MSG_CHECKING([whether libc is >= 2.1.1])
5223 exec 6>/dev/null # no output
5224 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
5225 exec 6>&1 # output on again
5226 if test "$HAVE_LIBC"; then
5227 AC_MSG_RESULT([yes])
5229 AC_MSG_ERROR([no, upgrade libc])
5233 if test "$_os" != "WNT"; then
5234 AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
5235 AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
5236 if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
5244 AC_SUBST(HAVE_GETOPT)
5245 AC_SUBST(HAVE_READDIR_R)
5246 AC_SUBST(SYSTEM_LIBC)
5248 dnl =========================================
5249 dnl Check for the Microsoft Platform SDK.
5250 dnl =========================================
5251 dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
5252 dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
5253 if test \( "$_os" = "WINNT" \) ; then
5254 AC_MSG_CHECKING([for PSDK files])
5255 if test -z "$with_psdk_home"; then
5256 # This first line will detect a February 2003 Microsoft Platform SDK
5257 PSDK_HOME=`./oowintool --psdk-home`
5258 # But there might be also an April 2005 PSDK, unfortunately MS changed
5259 # the registry entry. (we prefer the old version!?)
5260 if test -z "$PSDK_HOME"; then
5261 PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
5263 # normalize if found
5264 if test -n "$PSDK_HOME"; then
5265 PSDK_HOME=`cygpath -d "$PSDK_HOME"`
5266 PSDK_HOME=`cygpath -u "$PSDK_HOME"`
5269 PSDK_HOME=`cygpath -u "$with_psdk_home"`
5271 # Remove a possible trailing backslash
5272 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
5273 # Problem with current PSDK (iz 49865)
5274 if test -f "$PSDK_HOME/Lib/libcp.lib"; then
5277 Some modules do not build correctly with MS Platform SDK - April 2005
5278 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
5279 Remove/rename/backup that file and restart configure. Details about this
5280 problem can be found in issue 49856.])
5282 # WIndows SDK has different headers
5283 if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
5284 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
5285 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
5290 if test -f "$PSDK_HOME/lib/unicows.lib"; then
5295 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
5296 AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
5297 are installed or use --with-psdk-home .])
5299 if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
5300 -o ! -x "$PSDK_HOME/bin/msidb.exe" \
5301 -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
5302 -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
5303 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
5305 AC_MSG_RESULT([SDK files found ...)])
5306 dnl Check if this is the right SDK.
5307 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
5308 AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
5309 WINDOWS_VISTA_PSDK=TRUE
5310 elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
5311 AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
5312 WINDOWS_VISTA_PSDK=TRUE
5314 AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
5318 AC_SUBST(WINDOWS_VISTA_PSDK)
5320 dnl =========================================
5321 dnl Check for the Microsoft DirectX SDK.
5322 dnl =========================================
5323 if test \( "$_os" = "WINNT" \) ; then
5324 AC_MSG_CHECKING([for DirectX SDK files])
5325 if test -z "$with_directx_home"; then
5326 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
5327 if test -n "$DXSDK_DIR"; then
5328 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
5329 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
5331 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
5332 # the "DirectX SDK files not found" error later
5334 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
5336 # Remove a possible trailing backslash
5337 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
5339 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
5340 HAVE_DIRECTXSDK_H="yes"
5342 HAVE_DIRECTXSDK_H="no"
5344 # MS changed the location of the libraries with dec 2004 directx sdk
5345 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
5346 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
5348 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
5350 if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
5351 HAVE_DIRECTXSDK_LIB="yes"
5353 HAVE_DIRECTXSDK_LIB="no"
5355 if test -n "$ENABLE_DIRECTX"; then
5356 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
5357 AC_MSG_RESULT([found])
5359 AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
5363 AC_MSG_RESULT([disabled])
5366 AC_SUBST(DIRECTXSDK_HOME)
5367 AC_SUBST(DIRECTXSDK_LIB)
5369 dnl ============================================
5370 dnl Check for Nullsoft Scriptable Install System
5371 dnl ============================================
5373 if test "$_os" = "WINNT" ; then
5374 AC_MSG_CHECKING([for NSIS])
5375 AC_PATH_PROG(NSIS_PATH, nsis.exe)
5376 if test -n "$NSIS_PATH"; then
5377 NSIS_PATH=`dirname "$NSIS_PATH"`
5379 if test -n "$with_nsis_path"; then
5380 with_nsis_path=`cygpath -u "$with_nsis_path"`
5382 if test -e "$with_nsis_path/nsis.exe"; then
5383 NSIS_PATH="$with_nsis_path"
5385 nsistest=`./oowintool --nsis-dir`;
5386 if test -x "$nsistest/nsis.exe"; then
5387 NSIS_PATH="$nsistest"
5389 if test -z "$NSIS_PATH"; then
5390 AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
5391 echo "NSIS not found, no self contained installer will be build." >> warn
5393 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5394 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5395 AC_MSG_RESULT([found ($NSIS_PATH)])
5400 dnl ***************************************
5401 dnl testing bison and flex exist
5402 dnl ***************************************
5403 AC_PATH_PROG(BISON, bison)
5404 if test -z "$BISON"; then
5405 AC_MSG_ERROR([no bison found in \$PATH, install bison])
5407 AC_MSG_CHECKING([the bison version])
5408 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
5409 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
5410 # Accept newer than 1.875 or older(equal) than 1.75
5411 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
5412 if test "$_bison_version" = "1.875" ; then
5413 AC_MSG_WARN([suspect ($BISON $_bison_version)])
5414 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
5416 AC_MSG_RESULT([checked ($BISON $_bison_version)])
5419 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
5422 AC_PATH_PROG(FLEX, flex)
5423 if test -z "$FLEX"; then
5424 AC_MSG_ERROR([no flex found in \$PATH, install flex])
5426 dnl ***************************************
5427 dnl testing that patch exists
5428 dnl ***************************************
5429 AC_PATH_PROG(PATCH, patch)
5430 if test -z "$PATCH"; then
5431 AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
5434 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
5435 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
5436 if test -z "$with_gnu_patch"; then
5439 if test -x "$with_gnu_patch"; then
5440 GNUPATCH=$with_gnu_patch
5442 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
5446 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
5447 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5448 AC_MSG_RESULT([yes])
5450 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
5454 dnl We also need to check for --with-gnu-cp
5456 if test -z "$with_gnu_cp"; then
5457 AC_PATH_PROGS(GNUCP, gnucp cp)
5458 if test -z $GNUCP; then
5459 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
5462 if test -x "$with_gnu_cp"; then
5465 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
5469 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
5470 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
5471 AC_MSG_RESULT([yes])
5477 if test -z "$GNUCP"; then
5478 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then
5479 AC_MSG_ERROR([no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it])
5481 AC_MSG_RESULT([no GNU cp from coreutils found - using the system's cp command])
5488 dnl ***************************************
5489 dnl testing bash tools path on Windows
5490 dnl ***************************************
5491 if test "$_os" = "WINNT"; then
5493 AC_PATH_PROG(CYGWIN_PATH, bash)
5494 CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
5496 if test -z "$CYGWIN_PATH"; then
5497 CYGWIN_PATH="NO_CYGWIN"
5499 AC_SUBST(CYGWIN_PATH)
5501 dnl ***************************************
5502 dnl testing ml.exe assembler path
5503 dnl ***************************************
5504 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5505 AC_MSG_CHECKING([ml.exe assembler path])
5506 if test -n "$with_asm_home"; then
5507 with_asm_home=`cygpath -u "$with_asm_home"`
5509 if test ! -x "$with_asm_home/ml.exe"; then
5510 AC_PATH_PROG(ML_EXE, ml.exe)
5511 if test -z "$ML_EXE"; then
5512 if test -x "$with_cl_home/bin/ml.exe"; then
5513 with_asm_home=$with_cl_home/bin
5514 AC_MSG_RESULT([found ($with_asm_home)])
5516 AC_MSG_ERROR([Configure did not find ml.exe assembler.])
5519 with_asm_home="ASM_IN_PATH"
5522 AC_MSG_RESULT([$ASM_HOME])
5524 with_asm_home="NO_ASM_HOME"
5526 ASM_HOME="$with_asm_home"
5529 dnl ===================================================================
5530 dnl testing handle deprecated unzip switch
5531 dnl ===================================================================
5532 if test -z "$with_zip_home"; then
5533 with_zip_home="$with_unzip_home"
5535 dnl ===================================================================
5536 dnl Zip will be found where you tell me to find it
5537 dnl ===================================================================
5538 if test -n "$with_zip_home" ; then
5539 if test "$_os" = "WINNT"; then
5540 with_zip_home=`cygpath -u "$with_zip_home"`
5542 ZIP="$with_zip_home/zip"
5543 UNZIP="$with_zip_home/unzip"
5544 ZIP_HOME="$with_zip_home"
5546 AC_PATH_PROG(ZIP, zip)
5547 AC_PATH_PROG(UNZIP, unzip)
5548 ZIP_HOME=`dirname "$ZIP"`
5550 dnl ===================================================================
5551 dnl Zip must be available or else it is an error, all platforms
5552 dnl ===================================================================
5553 if test -z "$ZIP" -o -z "$UNZIP"; then
5554 AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
5557 dnl ===================================================================
5558 dnl Zip must be a specific type for different build types.
5559 dnl ===================================================================
5560 if test "$_os" = "WINNT"; then
5561 if test -n "`$ZIP -h | grep -i WinNT`" ; then
5562 AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
5567 dnl ===================================================================
5568 dnl Windows builds need unicows.dll in external/unicows/
5569 dnl ===================================================================
5570 if test "$_os" = "WINNT"; then
5571 AC_MSG_CHECKING([for unicows.dll])
5572 if test -x ./external/unicows/unicows.dll; then
5573 AC_MSG_RESULT([found])
5575 AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
5576 Get it from the Microsoft site and put it into external/unicows.
5577 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5578 may have to search Microsoft's website.) Last time it was seen at:
5579 <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
5583 dnl ===================================================================
5584 dnl Windows builds need dbghelp.dll in external/dbghelp/
5585 dnl ===================================================================
5586 if test "$_os" = "WINNT"; then
5587 AC_MSG_CHECKING([for dbghelp.dll])
5588 if test -x ./external/dbghelp/dbghelp.dll; then
5589 AC_MSG_RESULT([found])
5591 AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
5592 Get it from the Microsoft site and put it into external/dbghelp.
5593 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5594 may have to search Microsoft's website.) Last time it was seen at:
5595 <http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
5599 dnl ===================================================================
5600 dnl Windows builds - use oowintool to copy CRT dlls and manifest
5601 dnl ===================================================================
5602 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5603 if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
5606 AC_MSG_ERROR([oowintool failed to copy CRT])
5610 dnl ===================================================================
5611 dnl Windows builds need gdiplus.dll in external/gdiplus/
5612 dnl ===================================================================
5613 if test "$_os" = "WINNT"; then
5614 AC_MSG_CHECKING([for gdiplus.dll])
5615 if test -x ./external/gdiplus/gdiplus.dll; then
5616 AC_MSG_RESULT([found])
5618 AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
5619 Get it from the Microsoft site and put it into external/gdiplus.
5620 You may have to search Microsoft's website. Last time it was seen at:
5621 <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
5625 dnl ===================================================================
5626 dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
5627 dnl ===================================================================
5628 if test "$_os" = "WINNT"; then
5629 ./oowintool --msvc-copy-instmsi ./external/msi
5632 dnl ===================================================================
5633 dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
5634 dnl ===================================================================
5635 if test "$_os" = "WINNT"; then
5636 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
5637 AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
5638 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
5639 AC_MSG_RESULT([found])
5641 MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1`
5642 MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1`
5643 if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
5644 cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
5645 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
5647 if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
5648 AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
5649 These programs are part of the Visual Studio installation and should be found in a
5650 directory similar to:
5651 "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
5652 As the automatic detection fails please copy the files to external/msi/.])
5654 AC_MSG_RESULT([found and copied])
5660 dnl ===================================================================
5661 dnl Test which vclplugs have to be built.
5662 dnl ===================================================================
5663 AC_MSG_CHECKING([which VCLplugs shall be built])
5665 if test "x$enable_gtk" = "xyes"; then
5669 AC_SUBST(ENABLE_GTK)
5672 if test "x$enable_kde" = "xyes"; then
5676 AC_SUBST(ENABLE_KDE)
5679 if test "x$enable_kde4" = "xyes"; then
5683 AC_SUBST(ENABLE_KDE4)
5685 if test -z "$R"; then
5686 AC_MSG_RESULT([none])
5691 dnl ===================================================================
5693 dnl ===================================================================
5696 AC_MSG_CHECKING([whether to enable GConf support])
5697 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
5699 AC_MSG_RESULT([yes])
5700 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5704 AC_SUBST(ENABLE_GCONF)
5706 dnl ===================================================================
5708 dnl ===================================================================
5711 AC_MSG_CHECKING([whether to enable GNOME VFS support])
5712 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
5713 ENABLE_GNOMEVFS="TRUE"
5714 AC_MSG_RESULT([yes])
5715 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
5716 if test "$ENABLE_GCONF" != "TRUE"; then
5717 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5722 AC_SUBST(ENABLE_GNOMEVFS)
5724 dnl ===================================================================
5725 dnl Check whether the gtk 2.0 libraries are available.
5726 dnl ===================================================================
5730 ENABLE_SYSTRAY_GTK=""
5732 if test "$test_gtk" = "yes"; then
5734 if test "$ENABLE_GTK" = "TRUE" ; then
5735 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]))
5736 BUILD_TYPE="$BUILD_TYPE GTK"
5738 if test "x$enable_systray" = "xyes"; then
5739 ENABLE_SYSTRAY_GTK="TRUE"
5740 BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
5743 AC_MSG_CHECKING([whether to enable DBUS support])
5744 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
5746 AC_MSG_RESULT([yes])
5747 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
5752 AC_MSG_CHECKING([whether to enable GIO support])
5753 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
5754 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
5755 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
5758 AC_MSG_RESULT([yes])
5759 PKG_CHECK_MODULES( GIO, gio-2.0 )
5767 AC_SUBST(ENABLE_GIO)
5768 AC_SUBST(ENABLE_DBUS)
5769 AC_SUBST(ENABLE_SYSTRAY_GTK)
5770 AC_SUBST(GTK_CFLAGS)
5773 dnl ===================================================================
5774 dnl Check whether the GStreamer libraries are available.
5775 dnl ===================================================================
5781 if test "$test_gstreamer" = "yes"; then
5782 AC_MSG_CHECKING([whether to build the GStreamer media backend])
5783 if test "x$enable_gstreamer" != "xno" ; then
5784 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. Use --disable-gstreamer or install the missing packages]))
5785 ENABLE_GSTREAMER="TRUE"
5786 AC_MSG_RESULT([yes])
5791 AC_SUBST(ENABLE_GSTREAMER)
5792 AC_SUBST(GSTREAMER_CFLAGS)
5793 AC_SUBST(GSTREAMER_LIBS)
5796 dnl ===================================================================
5797 dnl Check whether the Cairo libraries are available.
5798 dnl ===================================================================
5804 if test "$test_cairo" = "yes"; then
5806 AC_MSG_CHECKING([whether to use cairo])
5807 if test "x$enable_cairo" != "xno" ; then
5809 AC_MSG_RESULT([yes])
5810 AC_MSG_CHECKING([which cairo to use])
5811 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
5812 test "$with_system_cairo" != "no"; then
5813 AC_MSG_RESULT([external])
5816 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5817 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
5818 AC_MSG_ERROR([Cairo library requires fontconfig.])
5820 if test "$with_system_xrender_headers" = "yes"; then
5821 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
5823 #include <X11/extensions/Xrender.h>
5825 int main(int argc, char **argv) {
5826 #ifdef PictStandardA8
5832 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
5835 BUILD_TYPE="$BUILD_TYPE CAIRO"
5836 dnl === compiler fails on pixman with 64bit architectures...===
5837 if test "$build_cpu" != "x86_64"; then
5840 AC_MSG_RESULT([internal])
5847 AC_SUBST(ENABLE_CAIRO)
5848 AC_SUBST(BUILD_PIXMAN)
5849 AC_SUBST(SYSTEM_CAIRO)
5850 AC_SUBST(CAIRO_CFLAGS)
5851 AC_SUBST(CAIRO_LIBS)
5853 dnl ===================================================================
5854 dnl Check whether the OpenGL libraries are available
5855 dnl ===================================================================
5857 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
5860 if test "x$enable_opengl" != "xno" ; then
5861 AC_MSG_RESULT([yes])
5862 AC_CHECK_HEADER(GL/gl.h, [],
5863 [AC_MSG_ERROR([OpenGL headers not found])], [])
5864 AC_CHECK_LIB(GL, main, [],
5865 [AC_MSG_ERROR(libGL not installed or functional)], [])
5866 AC_CHECK_LIB(GLU, main, [],
5867 [AC_MSG_ERROR(libGLU not installed or functional)], [])
5873 AC_SUBST(ENABLE_OPENGL)
5875 AC_MSG_CHECKING([whether to build extra presenter ui])
5876 if test -n "$enable_presenter_extra_ui" -a "$enable_presenter_extra_ui" != "no"; then
5877 AC_MSG_RESULT([yes])
5878 ENABLE_PRESENTER_EXTRA_UI=YES
5881 ENABLE_PRESENTER_EXTRA_UI=NO
5883 AC_SUBST(ENABLE_PRESENTER_EXTRA_UI)
5885 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
5886 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
5887 AC_MSG_RESULT([yes])
5888 ENABLE_MINIMIZER=YES
5893 AC_SUBST(ENABLE_MINIMIZER)
5895 AC_MSG_CHECKING([whether to build the Presenter Screen extension])
5896 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
5897 AC_MSG_RESULT([yes])
5898 ENABLE_PRESENTER_SCREEN=YES
5901 ENABLE_PRESENTER_SCREEN=NO
5903 AC_SUBST(ENABLE_PRESENTER_SCREEN)
5905 AC_MSG_CHECKING([whether to build the PDF Import extension])
5906 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
5907 AC_MSG_RESULT([yes])
5908 ENABLE_PDFIMPORT=YES
5910 dnl ===================================================================
5911 dnl Check for system poppler
5912 dnl ===================================================================
5913 AC_MSG_CHECKING([which pdf backend to use])
5914 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
5915 test "$with_system_poppler" != "no"; then
5916 AC_MSG_RESULT([external])
5918 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
5920 AC_MSG_RESULT([internal])
5922 BUILD_TYPE="$BUILD_TYPE XPDF"
5923 AC_MSG_CHECKING([for xpdf module])
5924 if test -d ./xpdf; then
5927 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5934 AC_SUBST(ENABLE_PDFIMPORT)
5935 AC_SUBST(SYSTEM_POPPLER)
5936 AC_SUBST(POPPLER_CFLAGS)
5937 AC_SUBST(POPPLER_LIBS)
5939 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
5940 AC_MSG_CHECKING([for sdext module])
5941 if test -d ./sdext; then
5944 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5946 BUILD_TYPE="$BUILD_TYPE SDEXT"
5949 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
5950 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
5951 AC_MSG_RESULT([yes])
5952 AC_MSG_CHECKING([for swext module])
5953 if test -d ./swext; then
5956 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5958 ENABLE_MEDIAWIKI=YES
5959 BUILD_TYPE="$BUILD_TYPE SWEXT"
5964 AC_SUBST(ENABLE_MEDIAWIKI)
5966 if test "$ENABLE_MEDIAWIKI" = "YES"; then
5967 AC_MSG_CHECKING([which Servlet API Jar to use])
5968 if test -n "$with_system_servlet_api"; then
5969 AC_MSG_RESULT([external])
5970 SYSTEM_SERVLETAPI=YES
5971 if test -z "$SERVLETAPI_JAR"; then
5972 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
5974 AC_CHECK_FILE($SERVLETAPI_JAR, [],
5975 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
5977 AC_MSG_RESULT([internal])
5978 SYSTEM_SERVLETAPI=NO
5979 BUILD_TYPE="$BUILD_TYPE TOMCAT"
5982 AC_SUBST(SYSTEM_SERVLETAPI)
5983 AC_SUBST(SERVLETAPI_JAR)
5985 AC_MSG_CHECKING([whether to build the Report Builder extension])
5986 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
5987 AC_MSG_RESULT([yes])
5988 ENABLE_REPORTBUILDER=YES
5989 AC_MSG_CHECKING([for reportbuilder module])
5990 if test -d ./reportbuilder; then
5993 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5995 AC_MSG_CHECKING([which jfreereport libs to use])
5996 if test "$with_system_jfreereport" = "yes"; then
5997 SYSTEM_JFREEREPORT=YES
5998 AC_MSG_RESULT([external])
5999 if test -z $SAC_JAR; then
6000 SAC_JAR=/usr/share/java/sac.jar
6002 AC_CHECK_FILE($SAC_JAR, [],
6003 [AC_MSG_ERROR(sac.jar not found.)], [])
6005 if test -z $LIBXML_JAR; then
6006 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
6007 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
6009 AC_CHECK_FILE(/usr/share/java/libxml.jar,
6010 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
6011 [AC_MSG_ERROR(libxml.jar replacement not found.)]
6016 AC_CHECK_FILE($LIBXML_JAR, [],
6017 [AC_MSG_ERROR(libxml.jar not found.)], [])
6020 if test -z $FLUTE_JAR; then
6021 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
6022 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
6024 AC_CHECK_FILE(/usr/share/java/flute.jar,
6025 [ FLUTE_JAR=/usr/share/java/flute.jar ],
6026 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
6031 AC_CHECK_FILE($FLUTE_JAR, [],
6032 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
6035 if test -z $JFREEREPORT_JAR; then
6036 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
6037 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
6039 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
6040 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
6041 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
6046 AC_CHECK_FILE($JFREEREPORT_JAR, [],
6047 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
6050 if test -z $LIBLAYOUT_JAR; then
6051 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
6052 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
6054 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
6055 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
6056 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
6061 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
6062 [AC_MSG_ERROR(liblayout.jar not found.)], [])
6065 if test -z $LIBLOADER_JAR; then
6066 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
6067 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
6069 AC_CHECK_FILE(/usr/share/java/libloader.jar,
6070 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
6071 [AC_MSG_ERROR(libloader.jar replacement not found.)]
6076 AC_CHECK_FILE($LIBLOADER_JAR, [],
6077 [AC_MSG_ERROR(libloader.jar not found.)], [])
6080 if test -z $LIBFORMULA_JAR; then
6081 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
6082 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
6084 AC_CHECK_FILE(/usr/share/java/libformula.jar,
6085 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
6086 [AC_MSG_ERROR(libformula.jar replacement not found.)]
6091 AC_CHECK_FILE($LIBFORMULA_JAR, [],
6092 [AC_MSG_ERROR(libformula.jar not found.)], [])
6095 if test -z $LIBREPOSITORY_JAR; then
6096 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
6097 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
6099 AC_CHECK_FILE(/usr/share/java/librepository.jar,
6100 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
6101 [AC_MSG_ERROR(librepository.jar replacement not found.)]
6106 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
6107 [AC_MSG_ERROR(librepository.jar not found.)], [])
6110 if test -z $LIBFONTS_JAR; then
6111 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
6112 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
6114 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
6115 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
6116 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
6121 AC_CHECK_FILE($LIBFONTS_JAR, [],
6122 [AC_MSG_ERROR(libfonts.jar not found.)], [])
6125 if test -z $LIBSERIALIZER_JAR; then
6126 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
6127 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
6129 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
6130 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
6131 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
6136 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
6137 [AC_MSG_ERROR(libserializer.jar not found.)], [])
6141 if test -z $LIBBASE_JAR; then
6142 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
6143 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
6145 AC_CHECK_FILE(/usr/share/java/libbase.jar,
6146 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
6147 [AC_MSG_ERROR(libbase.jar replacement not found.)]
6152 AC_CHECK_FILE($LIBBASE_JAR, [],
6153 [AC_MSG_ERROR(libbase.jar not found.)], [])
6157 AC_MSG_RESULT([internal])
6158 AC_MSG_CHECKING([for jfreereport module])
6159 if test -d ./jfreereport; then
6162 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
6164 SYSTEM_JFREEREPORT=NO
6165 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
6167 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
6170 ENABLE_REPORTBUILDER=NO
6171 SYSTEM_JFREEREPORT=NO
6173 AC_SUBST(ENABLE_REPORTBUILDER)
6174 AC_SUBST(SYSTEM_JFREEREPORT)
6176 AC_SUBST(LIBXML_JAR)
6178 AC_SUBST(JFREEREPORT_JAR)
6179 AC_SUBST(LIBBASE_JAR)
6180 AC_SUBST(LIBLAYOUT_JAR)
6181 AC_SUBST(LIBLOADER_JAR)
6182 AC_SUBST(LIBFORMULA_JAR)
6183 AC_SUBST(LIBREPOSITORY_JAR)
6184 AC_SUBST(LIBFONTS_JAR)
6185 AC_SUBST(LIBSERIALIZER_JAR)
6187 # this has to be here because both the wiki publisher and the SRB use
6189 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6190 AC_MSG_CHECKING([which Apache commons-* libs to use])
6191 if test "$with_system_apache_commons" = "yes"; then
6192 SYSTEM_APACHE_COMMONS=YES
6193 AC_MSG_RESULT([external])
6194 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6195 if test -z $COMMONS_CODEC_JAR; then
6196 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
6197 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
6199 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
6200 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
6201 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
6206 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
6207 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
6210 if test -z $COMMONS_LANG_JAR; then
6211 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
6212 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
6214 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
6215 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
6216 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
6221 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
6222 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
6225 if test -z $COMMONS_HTTPCLIENT_JAR; then
6226 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
6227 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
6229 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
6230 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
6231 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
6236 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
6237 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
6240 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6241 if test -z $COMMONS_LOGGING_JAR; then
6242 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
6243 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
6245 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
6246 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
6247 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
6252 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
6253 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
6257 AC_MSG_RESULT([internal])
6258 SYSTEM_APACHE_COMMONS=NO
6259 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
6262 AC_SUBST(SYSTEM_APACHE_COMMONS)
6263 AC_SUBST(COMMONS_CODEC_JAR)
6264 AC_SUBST(COMMONS_LANG_JAR)
6265 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
6266 AC_SUBST(COMMONS_LOGGING_JAR)
6268 dnl ===================================================================
6269 dnl Check whether the Qt and KDE libraries are available.
6270 dnl ===================================================================
6275 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
6276 dnl Search paths for Qt and KDE
6277 if test "$build_cpu" != "x86_64" ; then
6278 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"
6279 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"
6281 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"
6282 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"
6284 if test -n "$QTDIR" ; then
6285 qt_incdirs="$QTDIR/include $qt_incdirs"
6286 if test "$build_cpu" != "x86_64" ; then
6287 qt_libdirs="$QTDIR/lib $qt_libdirs"
6289 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
6292 if test "$build_cpu" != "x86_64" ; then
6293 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"
6294 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"
6296 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"
6297 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"
6299 if test -n "$KDEDIR" ; then
6300 kde_incdirs="$KDEDIR/include $kde_incdirs"
6301 if test "$build_cpu" != "x86_64" ; then
6302 kde_libdirs="$KDEDIR/lib $kde_libdirs"
6304 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
6309 qt_test_include="qstyle.h"
6310 qt_test_library="libqt-mt.so"
6311 kde_test_include="ksharedptr.h"
6312 kde_test_library="libkdeui.so"
6314 dnl Check for Qt headers
6315 AC_MSG_CHECKING([for Qt headers])
6317 for kde_check in $qt_incdirs ; do
6318 if test -r "$kde_check/$qt_test_include" ; then
6319 qt_incdir="$kde_check"
6323 AC_MSG_RESULT([$qt_incdir])
6324 if test "x$qt_incdir" = "xno" ; then
6325 AC_MSG_ERROR([Qt headers not found. Please specify the root of
6326 your Qt installation by exporting QTDIR before running "configure".])
6329 dnl Check for Qt libraries
6330 AC_MSG_CHECKING([for Qt libraries])
6332 for qt_check in $qt_libdirs ; do
6333 if test -r "$qt_check/$qt_test_library" ; then
6334 qt_libdir="$qt_check"
6338 AC_MSG_RESULT([$qt_libdir])
6339 if test "x$qt_libdir" = "xno" ; then
6340 AC_MSG_ERROR([Qt libraries not found. Please specify the root of
6341 your Qt installation by exporting QTDIR before running "configure".])
6344 dnl Check for Meta Object Compiler
6345 AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
6346 if test "$MOC" = "no" ; then
6347 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6348 the root of your Qt installation by exporting QTDIR before running "configure".])
6351 dnl Check for KDE headers
6352 AC_MSG_CHECKING([for KDE headers])
6354 for kde_check in $kde_incdirs ; do
6355 if test -r "$kde_check/$kde_test_include" ; then
6356 kde_incdir="$kde_check"
6360 AC_MSG_RESULT([$kde_incdir])
6361 if test "x$kde_incdir" = "xno" ; then
6362 AC_MSG_ERROR([KDE headers not found. Please specify the root of
6363 your KDE installation by exporting KDEDIR before running "configure".])
6366 dnl Check for KDE libraries
6367 AC_MSG_CHECKING([for KDE libraries])
6369 for kde_check in $kde_libdirs ; do
6370 if test -r "$kde_check/$kde_test_library" ; then
6371 kde_libdir="$kde_check"
6375 AC_MSG_RESULT([$kde_libdir])
6376 if test "x$kde_libdir" = "xno" ; then
6377 AC_MSG_ERROR([KDE libraries not found. Please specify the root of
6378 your KDE installation by exporting KDEDIR before running "configure".])
6381 dnl Set the variables
6382 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6383 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
6385 AC_SUBST(KDE_CFLAGS)
6389 dnl ===================================================================
6390 dnl KDE4 Integration
6391 dnl ===================================================================
6396 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
6397 qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes"
6398 qt_libdirs="$QT4LIB /usr/lib $x_libraries"
6400 kde_incdirs="/usr/include $x_includes"
6401 kde_libdirs="/usr/lib $x_libraries"
6403 if test "$build_cpu" = "x86_64" ; then
6404 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
6405 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
6408 if test -n "$KDE4DIR" ; then
6409 kde_incdirs="$KDE4DIR/include $kde_incdirs"
6410 if test "$build_cpu" != "x86_64" ; then
6411 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
6413 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
6417 qt_test_include="Qt/qobject.h"
6418 qt_test_library="libQtCore.so"
6419 kde_test_include="ksharedptr.h"
6420 kde_test_library="libkdeui.so"
6422 AC_MSG_CHECKING([for Qt4 headers])
6424 for inc_dir in $qt_incdirs ; do
6425 if test -r "$inc_dir/$qt_test_include" ; then
6426 qt_header_dir="$inc_dir"
6431 AC_MSG_RESULT([$qt_header_dir])
6432 if test "x$qt_header_dir" = "xno" ; then
6433 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6436 AC_MSG_CHECKING([for Qt4 libraries])
6438 for lib_dir in $qt_libdirs ; do
6439 if test -r "$lib_dir/$qt_test_library" ; then
6440 qt_lib_dir="$lib_dir"
6445 AC_MSG_RESULT([$qt_lib_dir])
6447 if test "x$qt_lib_dir" = "xno" ; then
6448 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6451 dnl Check for Meta Object Compiler
6452 AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
6453 if test "$MOC4" = "no" ; then
6454 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6455 the root of your Qt installation by exporting QT4DIR before running "configure".])
6458 dnl Check for KDE4 headers
6459 AC_MSG_CHECKING([for KDE4 headers])
6461 for kde_check in $kde_incdirs ; do
6462 if test -r "$kde_check/$kde_test_include" ; then
6463 kde_incdir="$kde_check"
6467 AC_MSG_RESULT([$kde_incdir])
6468 if test "x$kde_incdir" = "xno" ; then
6469 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6472 dnl Check for KDE4 libraries
6473 AC_MSG_CHECKING([for KDE4 libraries])
6475 for kde_check in $kde_libdirs ; do
6476 if test -r "$kde_check/$kde_test_library" ; then
6477 kde_libdir="$kde_check"
6482 AC_MSG_RESULT([$kde_libdir])
6483 if test "x$kde_libdir" = "xno" ; then
6484 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6487 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6488 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
6490 AC_SUBST(KDE4_CFLAGS)
6494 dnl ===================================================================
6495 dnl Test for the enabling the lockdown pieces
6496 dnl ===================================================================
6497 AC_MSG_CHECKING([whether to enable the lockdown pieces])
6499 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
6501 AC_MSG_RESULT([yes])
6505 AC_SUBST(ENABLE_LOCKDOWN)
6507 dnl ===================================================================
6508 dnl Test whether to include Evolution 2 support
6509 dnl ===================================================================
6510 AC_MSG_CHECKING([whether to enable evolution 2 support])
6511 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
6512 AC_MSG_RESULT([yes])
6513 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
6514 ENABLE_EVOAB2="TRUE"
6519 AC_SUBST(ENABLE_EVOAB2)
6520 AC_SUBST(GOBJECT_CFLAGS)
6521 AC_SUBST(GOBJECT_LIBS)
6523 dnl ===================================================================
6524 dnl Test whether to include KDE AB support
6525 dnl ===================================================================
6526 AC_MSG_CHECKING([whether to enable KDE address book support])
6527 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
6528 AC_MSG_RESULT([yes])
6530 save_CXXFLAGS=$CXXFLAGS
6531 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
6532 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
6534 #include <kdeversion.h>
6536 int main(int argc, char **argv) {
6537 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
6540 ], [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])])
6541 CXXFLAGS=$save_CXXFLAGS
6548 AC_SUBST(ENABLE_KAB)
6550 dnl ===================================================================
6551 dnl Test whether to include MathMLDTD
6552 dnl ===================================================================
6553 AC_MSG_CHECKING([whether to include MathMLDTD])
6554 if test -n "$enable_mathmldtd"; then
6555 if test "$enable_mathmldtd" = "no"; then
6557 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6559 AC_MSG_RESULT([yes])
6560 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
6564 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6567 dnl ===================================================================
6568 dnl Test whether to include fonts
6569 dnl ===================================================================
6570 AC_MSG_CHECKING([whether to include third-party fonts])
6571 if test "$with_fonts" != "no" ; then
6572 AC_MSG_RESULT([yes])
6574 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
6578 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
6580 AC_SUBST(WITH_FONTS)
6582 dnl ===================================================================
6583 dnl Test whether to include ppds
6584 dnl ===================================================================
6585 AC_MSG_CHECKING([whether to include PPDs])
6586 if test "$with_ppds" != "no"; then
6587 AC_MSG_RESULT([yes])
6591 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
6593 AC_SUBST(WITHOUT_PPDS)
6595 dnl ===================================================================
6596 dnl Test whether to include afms
6597 dnl ===================================================================
6598 AC_MSG_CHECKING([whether to include AFMs])
6599 if test "$with_afms" != "no"; then
6600 AC_MSG_RESULT([yes])
6601 BUILD_TYPE="$BUILD_TYPE AFMS"
6605 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
6607 AC_SUBST(WITHOUT_AFMS)
6611 AC_MSG_CHECKING([whether and how to use Xinerama])
6612 if test "$_os" = "Darwin"; then
6614 XINERAMA_LINK=dynamic
6615 AC_MSG_RESULT([yes])
6616 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
6617 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
6618 # we have both versions, let the user decide but use the dynamic one
6621 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
6622 XINERAMA_LINK=dynamic
6624 XINERAMA_LINK=static
6626 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
6627 # we have only the dynamic version
6629 XINERAMA_LINK=dynamic
6630 elif test -e "$XLIB/libXinerama.a"; then
6632 if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6634 XINERAMA_LINK=static
6644 if test "$USE_XINERAMA" = "YES"; then
6645 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
6646 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
6647 [AC_MSG_ERROR(Xinerama header not found.)], [])
6648 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
6649 if test "$_os" = "FreeBSD"; then
6650 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
6652 if test "$_os" = "Linux"; then
6653 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
6655 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
6656 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
6658 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
6663 AC_SUBST(USE_XINERAMA)
6664 AC_SUBST(XINERAMA_LINK)
6666 dnl ===================================================================
6667 dnl Test for the presence of Ant and that it works
6668 dnl ===================================================================
6670 if test "$SOLAR_JAVA" != ""; then
6671 ANT_HOME=; export ANT_HOME
6672 WITH_ANT_HOME=; export WITH_ANT_HOME
6673 if test -z "$with_ant_home"; then
6674 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
6676 if test "$_os" = "WINNT"; then
6677 with_ant_home=`cygpath -u "$with_ant_home"`
6679 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
6680 WITH_ANT_HOME=$with_ant_home
6681 ANT_HOME=$with_ant_home
6684 if test -z "$ANT"; then
6685 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
6687 # resolve relative or absolute symlink
6688 while test -h "$ANT"; do
6690 a_basename=`basename "$ANT"`
6691 a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
6692 cd "`dirname "$ANT"`"
6693 cd "`dirname "$a_script"`"
6694 ANT="`pwd`"/"`basename "$a_script"`"
6698 if test "$_os" = "OS2"; then
6699 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6703 AC_MSG_CHECKING([if $ANT works])
6704 cat > conftest.java << EOF
6705 public class conftest {
6706 int testmethod(int a, int b) {
6712 cat > conftest.xml << EOF
6713 <project name="conftest" default="conftest">
6714 <target name="conftest">
6715 <javac srcdir="." includes="conftest.java">
6720 oldJAVA_HOME=$JAVA_HOME
6721 if test "$JAVACISGCJ" = "yes"; then
6722 JAVA_HOME=; export JAVA_HOME
6723 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6725 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6727 AC_TRY_EVAL(ant_cmd)
6728 if test $? = 0 && test -f ./conftest.class ; then
6729 AC_MSG_RESULT([Ant works])
6730 if test -z "$WITH_ANT_HOME"; then
6731 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
6732 if test -z "$ANT_HOME"; then
6733 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6736 ANT_HOME="$WITH_ANT_HOME"
6739 echo "configure: Ant test failed" >&5
6740 cat conftest.java >&5
6741 cat conftest.xml >&5
6742 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
6744 echo "Ant does not work - Some Java projects will not build!" >>warn
6746 JAVA_HOME=$oldJAVA_HOME
6747 rm -f conftest* core core.* *.core
6749 if test -z "$ANT_HOME"; then
6750 ANT_HOME="NO_ANT_HOME"
6754 dnl Checking for ant.jar
6755 if test "$ANT_HOME" != "NO_ANT_HOME"; then
6756 AC_MSG_CHECKING([Ant lib directory])
6757 if test -f $ANT_HOME/lib/ant.jar; then
6758 ANT_LIB="$ANT_HOME/lib"
6760 if test -f $ANT_HOME/ant.jar; then
6763 if test -f /usr/share/java/ant.jar; then
6764 ANT_LIB=/usr/share/java
6766 if test -f /usr/share/ant-core/lib/ant.jar; then
6767 ANT_LIB=/usr/share/ant-core/lib
6769 if test -f $ANT_HOME/lib/ant/ant.jar; then
6770 ANT_LIB="$ANT_HOME/lib/ant"
6772 AC_MSG_ERROR([Ant libraries not found!])
6778 AC_MSG_RESULT([Ant lib directory found.])
6784 # update for more extensions...
6785 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6788 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
6790 AC_MSG_CHECKING([whether ant is >= $ant_minver])
6791 ant_version=`$ANT -version | $AWK '{ print $4; }'`
6792 ant_version_major=`echo $ant_version | cut -d. -f1`
6793 ant_version_minor=`echo $ant_version | cut -d. -f2`
6794 echo "configure: ant_version $ant_version " >&5
6795 echo "configure: ant_version_major $ant_version_major " >&5
6796 echo "configure: ant_version_minor $ant_version_minor " >&5
6797 if test "$ant_version_major" -ge "2"; then
6798 AC_MSG_RESULT([yes, $ant_version])
6799 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
6800 AC_MSG_RESULT([yes, $ant_version])
6802 AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
6805 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6806 AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
6809 cat > conftest.java << EOF
6810 public class conftest {
6811 int testmethod(int a, int b) {
6817 cat > conftest.xml << EOF
6818 <project name="conftest" default="conftest">
6819 <target name="conftest" depends="copytest">
6820 <javac srcdir="." includes="conftest.java">
6823 <target name="copytest">
6824 <copy todir="confdir">
6825 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
6827 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
6832 if test "$JAVACISGCJ" = "yes"; then
6833 JAVA_HOME=; export JAVA_HOME
6834 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6836 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6838 AC_TRY_EVAL(ant_cmd)
6839 if test $? = 0 && test -f ./conftest.class ; then
6840 AC_MSG_RESULT([yes])
6843 echo "configure: Ant test failed" >&5
6844 cat conftest.java >&5
6845 cat conftest.xml >&5
6847 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
6850 rm -f conftest* core core.* *.core
6853 if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
6854 AC_MSG_CHECKING([for JUnit 4])
6855 if test "$with_junit" == "yes"; then
6856 if test -e /usr/share/java/junit4.jar; then
6857 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
6859 OOO_JUNIT_JAR=/usr/share/java/junit.jar
6862 OOO_JUNIT_JAR=$with_junit
6864 if test "$_os" = "WINNT"; then
6865 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
6867 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
6868 grep org/junit/Before.class > /dev/null 2>&5
6869 if test $? -eq 0; then
6870 AC_MSG_RESULT([$OOO_JUNIT_JAR])
6873 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
6874 location (/usr/share/java), specify its pathname via
6875 --with-junit=..., or disable it via --without-junit])
6878 AC_SUBST(OOO_JUNIT_JAR)
6880 AC_MSG_CHECKING([which languages to be built])
6881 WITH_LANG="$with_lang"
6882 if test -z "$WITH_LANG"; then
6883 AC_MSG_RESULT([en-US])
6885 AC_MSG_RESULT([$WITH_LANG])
6889 AC_MSG_CHECKING([which languages have poor help localizations])
6890 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
6891 if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
6892 AC_MSG_RESULT([none])
6894 AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
6896 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
6898 AC_MSG_CHECKING([which dictionaries to include])
6899 if test -z "$with_dict"; then
6901 AC_MSG_RESULT([ALL])
6903 WITH_DICT=","$with_dict","
6904 AC_MSG_RESULT([$with_dict])
6908 AC_MSG_CHECKING([for additional 'intro' bitmaps])
6910 if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
6912 AC_MSG_RESULT([none])
6914 for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
6917 *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
6919 if test -n "$bitmap" ; then
6920 INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
6923 AC_MSG_RESULT([$INTRO_BITMAPS])
6925 AC_SUBST(INTRO_BITMAPS)
6927 AC_MSG_CHECKING([for additional 'about' bitmaps])
6929 if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
6931 AC_MSG_RESULT([none])
6933 for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
6936 *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
6938 if test -n "$bitmap" ; then
6939 ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
6942 AC_MSG_RESULT([$ABOUT_BITMAPS])
6944 AC_SUBST(ABOUT_BITMAPS)
6947 AC_MSG_CHECKING([for vendor])
6948 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
6949 AC_MSG_RESULT([not set])
6951 OOO_VENDOR="$with_vendor"
6952 AC_MSG_RESULT([$OOO_VENDOR])
6954 AC_SUBST(OOO_VENDOR)
6957 AC_MSG_CHECKING([for UNIX wrapper name])
6958 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
6959 AC_MSG_RESULT([not set])
6961 UNIXWRAPPERNAME="$with_unix_wrapper"
6962 AC_MSG_RESULT([$UNIXWRAPPERNAME])
6964 AC_SUBST(UNIXWRAPPERNAME)
6966 AC_MSG_CHECKING([whether to statically link to Gtk])
6967 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
6968 ENABLE_STATIC_GTK="TRUE"
6969 AC_MSG_RESULT([yes])
6971 ENABLE_STATIC_GTK="FALSE"
6974 AC_SUBST(ENABLE_STATIC_GTK)
6976 AC_MSG_CHECKING([whether to use layout dialogs])
6977 if test -n "$enable_layout" && test "$enable_layout" != "no"; then
6978 ENABLE_LAYOUT="TRUE"
6979 AC_MSG_RESULT([yes])
6981 ENABLE_LAYOUT="FALSE"
6984 AC_SUBST(ENABLE_LAYOUT)
6986 # ===================================================================
6987 # De- or increase default verbosity of build process
6988 # ===================================================================
6989 AC_MSG_CHECKING([build verbosity])
6990 if test -n "$enable_verbose"; then
6991 if test "$enable_verbose" = "yes"; then
6993 AC_MSG_RESULT([high])
6995 if test "$enable_verbose" = "no"; then
6997 AC_MSG_RESULT([low])
7000 AC_MSG_RESULT([not set])
7004 dnl ===================================================================
7005 dnl Hook up OOos nodep environmental variable to automake's equivalent
7006 dnl --enable-dependency-tracking configure option
7007 dnl ===================================================================
7008 AC_MSG_CHECKING([whether to enable dependency tracking])
7009 if test "$enable_dependency_tracking" = "no"; then
7013 AC_MSG_RESULT([yes])
7017 dnl ===================================================================
7018 dnl Setting up the environment.
7019 dnl ===================================================================
7020 echo "********************************************************************"
7022 echo "* Setting up the build environment variables. *"
7024 echo "********************************************************************"
7026 if test -z "$COMPATH"; then
7027 AC_MSG_ERROR([No compiler found.])
7031 AC_MSG_CHECKING([solver path])
7032 if test -z "$with_local_solver"; then
7033 LOCAL_SOLVER="DEFAULT"
7034 AC_MSG_RESULT([default])
7036 LOCAL_SOLVER=$with_local_solver
7037 AC_MSG_RESULT([$with_local_solver])
7039 AC_SUBST(LOCAL_SOLVER)
7041 AC_SUBST(BUILD_TYPE)
7043 # make sure config.guess is +x; we execute config.guess, so it has to be so;
7044 chmod +x ./config.guess
7046 AC_OUTPUT([set_soenv Makefile])
7048 dnl Executing the set_soenv script to setup the environment variables.
7050 if test -z "$enable_check_only"; then
7055 echo No environment file will be generated
7057 num_warnings=`wc -l warn`
7058 _num=`echo $num_warnings | $AWK '{ print $1 }'`
7059 if test $_num -gt 0; then
7060 echo The following warning\(s\) were generated by configure
7061 echo ----------------------------------------------------
7066 echo There were no warnings