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
39 [ --enable-mono Enables the compilation of the Mono bindings
42 [ --with-openldap Enables the use of the OpenLDAP LDAP SDK instead
43 of the Netscape/Mozilla one
45 AC_ARG_ENABLE(lockdown,
46 [ --enable-lockdown Enables the gconf integration work in OOo
49 [ --disable-vba disables the vba compatibility feature
51 AC_ARG_WITH(vba-package-format,
52 [ --with-vba-package-format specify package format for vba compatibility api.
53 Specifying "builtin" means the api component and
54 associated type library are part of the installation set.
55 Specifying "extn" creates an uno extension that is
56 part of the installation set ( located in the program
57 directory ) that MUST be optionly registered using
58 either the unopkg executeable or the extension manager
61 Note: "builtin" is the default, "extn" can cause
63 Usage: --with-vba-package-format="builtin" or
64 --with-vba-package-format="extn"
67 [ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++.
70 [ --enable-hids Enables generation of HelpId lists.
72 AC_ARG_ENABLE(mozilla,
73 [ --disable-mozilla OO.o usually includes a strangely hacked up mozilla
74 binary for your platform, to build without this
75 version, use this option.
76 ],,enable_mozilla="yes")
78 [ --without-fonts Removes Bitstream Vera fonts from
79 openoffice.org installation set, for people building
80 for specific distributions where the fonts are known
81 to be already available
84 [ --without-ppds Removes Postscript Printer definition files from
85 openoffice.org installation set, for people building
86 for specific distributions where PPDs are known to be
87 already available (every recent distro with CUPS
91 [ --without-afms Removes bitmap font files from openoffice.org
92 installation set, for people building for specific
93 distributions where AFM files or TrueType Fonts
94 are known to be available.
96 AC_ARG_WITH(agfa-monotype-fonts,
97 [ --without-agfa-monotype-fonts Remove proprietary Agfa Monotype fonts
98 (even if present) in the openoffice.org installation
100 ],,with_agfa_monotype_fonts="yes")
102 [ --disable-epm OO.o includes self-packaging code, that requires
103 epm, however epm is useless for large scale
107 [ --with-epm Decides which epm to use. Default is to use
108 the one from the system if one is built. When
109 either this is not there or you say =internal
112 AC_ARG_WITH(package-format,
113 [ --with-package-format specify package format(s) for OOo installsets.
114 Default is "normal" one of the OS/Distribution.
116 Usage: --with-package-format="foo bar"
119 [ --disable-odk OO.o includes an ODK, office development kit
120 which some packagers may with to build without
122 AC_ARG_ENABLE(qadevooo,
123 [ --disable-qadevooo OO.o includes some qa testsuites which some
124 packagers may wish to build without
125 ],,enable_qadevooo="yes")
126 AC_ARG_ENABLE(fontooo,
127 [ --disable-fontooo disable FontOOo
128 (useful for distributions using fontconfig for OOo)
129 ],,enable_fontooo="yes")
130 AC_ARG_ENABLE(mathmldtd,
131 [ --disable-mathmldtd disable mathmldtd
132 (useful for distributions that want to avoid packaging
134 ],,enable_mathmldtd="yes")
135 AC_ARG_ENABLE(evolution2,
136 [ --enable-evolution2 Allows the built-in evolution 2 addressbook
137 connectivity build to be enabled.
139 AC_ARG_WITH(system-stdlibs,
140 [ --with-system-stdlibs use libstdc++/libgcc_s already on system
141 ],,checkforprelink=yes)
142 AC_ARG_WITH(system-mspack,
143 [ --with-system-mspack use libmspack already installed on system
146 [ --disable-cups disable cups support in the psprint project
148 AC_ARG_ENABLE(fontconfig,
149 [ --disable-fontconfig disable support for the fontconfig library
150 ],,enable_fontconfig=yes)
151 AC_ARG_ENABLE(directx,
152 [ --disable-directx Remove DirectX implementation for the new XCanvas
153 interface. The DirectX support requires more stuff
154 installed on Windows to compile.
155 (DirectX SDK, GDI+ libs)
156 ],,enable_directx=yes)
157 AC_ARG_ENABLE(activex,
158 [ --disable-activex Disable the use of ActiveX for windows build.
159 This switch is mandatory when using VC++ 2005/2008 Express.
163 [ --disable-atl Disable the use of ATL for windows build.
164 This switch is mandatory when using VC++ 2005/2008 Express.
167 AC_ARG_ENABLE(symbols,
168 [ --enable-symbols Include debugging symbols in output.
169 WARNING - a complete build needs 8 Gb of space and
170 takes much longer. (enables -g compiler flag)
172 --enable-symbols=SMALL sets the gcc -g1 setting
175 Enabling symbols disables the stripping of the solver
176 (--disable-strip-solver).
178 AC_ARG_ENABLE(strip-solver,
179 [ --disable-strip-solver Disable the stripping of the solver.
180 By default the solver is stripped unless a build with
181 debugging symbols (--enable-symbols) is requested.
183 This switch allows to override this setting.
185 AC_ARG_ENABLE(werror,
186 [ --enable-werror Turn warnings to errors. (Has no effect in modules
187 where the treating of warnings as errors is disabled
191 [ --enable-debug Include debugging symbols from --enable-symbols
192 plus extra debugging code. Extra large build!
193 (enables -g compiler flag and dmake debug=true)
195 AC_ARG_ENABLE(dbgutil,
196 [ --enable-dbgutil Include additional debugging utilities, such as
197 assertions, object counting, etc. Larger build.
198 Independent from --enable-debug
200 AC_ARG_ENABLE(crashdump,
201 [[ --enable-crashdump[=yes|TRUE|STATIC|no]
202 Enable (disable) the crashdump feature code.
204 ]],,enable_crashdump=no)
205 AC_ARG_ENABLE(cl-standard,
206 [ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing
207 standard compiler. ( This just disavles optimization
208 options and therefore removes a lot of warnings when
209 using the cheaper standard compiler. )
212 [ --disable-gtk Determines whether to use Gtk+ vclplug on platforms
213 where Gtk+ is available.
215 AC_ARG_ENABLE(systray,
216 [ --disable-systray Determines whether to build the systray quickstarter.
217 ],,enable_systray=yes)
219 [ --enable-cairo Determines whether to use Cairo library on
220 platforms where Cairo is available.
222 AC_ARG_WITH(system-cairo,
223 [ --with-system-cairo Use Cairo libraries already on system
225 AC_ARG_ENABLE(opengl,
226 [ --enable-opengl Determines whether to build the OpenGL 3D slide
227 transitions component
230 [ --enable-dbus Determines whether to enable presentation mode
231 screensaver control under GNOME via DBUS
234 [ --disable-gconf Determines whether to use the GConf support
236 AC_ARG_ENABLE(gnome-vfs,
237 [ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing
238 System on platforms where that VFS is available
239 ],,enable_gnome_vfs=yes)
241 [ --enable-gio Determines whether to use the GIO support
243 AC_ARG_ENABLE(static-gtk,
244 [ --enable-static-gtk Modules that are linked against gtk libraries use
245 the static libraries instead of the dynamic ones.
246 (enables -Bstatic linker flag for gtk libraries)
248 AC_ARG_ENABLE(layout,
249 [ --enable-layout Enable the compilation and use of layout dialogs
251 AC_ARG_ENABLE(build-mozilla,
252 [ --disable-build-mozilla Use this option if you do not want to build the
253 mozilla components from the mozilla source code but
254 take precompiled zips
256 AC_ARG_WITH(mozilla-version,
257 [ --with-mozilla-version Choose which version of mozilla to use while building
258 mozilla. Default: 1.7.5.
259 Note that not all versions are supported.
261 AC_ARG_WITH(mozilla-toolkit,
262 [ --with-mozilla-toolkit Choose which GUI toolkit to use while building mozilla
263 components. Default: gtk2
265 AC_ARG_ENABLE(nss_module,
266 [ --disable-nss-module Whether to use provided NSS module
267 ],,enable_nss_module=yes)
269 [ --enable-kde Determines whether to use Qt/KDE vclplug on platforms
270 where Qt and KDE are available.
273 [ --disable-kdeab Disable the KDE address book support
274 ],,if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi)
276 [ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms
277 where Qt4 and KDE4 are available. May be used with --enable-kde
278 if you want to support both KDE3 and KDE4.
280 AC_ARG_ENABLE(binfilter,
281 [ --disable-binfilter Disable legacy binary file formats filters
282 ],,if ! test -d ./binfilter; then enable_binfilter=no; fi)
284 [ --disable-rpath Disable the use of relative paths in shared libraries
287 [ --disable-pam Disable pam support.
289 AC_ARG_ENABLE(pam-link,
290 [ --enable-pam-link link with libpam instead of dynamically open it
292 AC_ARG_ENABLE(crypt-link,
293 [ --disable-crypt-link disable linking with libcrypt instead of dynamically
294 open it (needed for ancient GNU/Linux distributions
295 without crypt()/libcrypt)
296 ],,enable_crypt_link=yes)
297 AC_ARG_ENABLE(xrender-link,
298 [ --enable-xrender-link link with libXrender instead of dynamically open it
301 [ --disable-randr disable RandR support in the vcl project
303 AC_ARG_ENABLE(randr-link,
304 [ --disable-randr-link disable linking with libXrandr, instead dynamically
306 ],,enable_randr_link=yes)
307 AC_ARG_WITH(myspell-dicts,
308 [ --without-myspell-dicts Removes myspell dictionaries from openoffice.org
309 installation set, for people building for specific
310 distributions where the myspell dictionaries are
311 installed from other sources
313 AC_ARG_WITH(system-dicts,
314 [ --with-system-dicts Use dictionaries from system paths- Specify
315 them via --with-{dict,hyph,thes}-path=/path
316 if you want to override the default ones
318 AC_ARG_WITH(external-dict-dir,
319 [ --with-external-dict-dir Specify external dictionary dir
321 AC_ARG_WITH(external-hyph-dir,
322 [ --with-external-hyph-dir Specify external hyphenation pattern dir
324 AC_ARG_WITH(external-thes-dir,
325 [ --with-external-thes-dir Specify external thesaurus dir
327 AC_ARG_WITH(system-libs,
328 [ --with-system-libs Use libs already on system -- enables all
329 --with-system-* flags except mozilla and
330 odbc/sane/xrender-header(s)
332 AC_ARG_WITH(system-headers,
333 [ --with-system-headers Use headers already on system -- enables all
334 --with-system-* flags for external packages
335 whose headers are the only entities used i.e.
336 boost/vigra/odbc/sane/xrender-header(s)
338 AC_ARG_WITH(system-jars,
339 [ --without-system-jars When building with --with-system-libs, also the
340 needed jars are expected on the system. Use this to
342 (except for the db case where --with-system-db
343 *has to* imply using the db.jar from there, too)
345 AC_ARG_WITH(system-zlib,
346 [ --with-system-zlib Use zlib already on system
348 AC_ARG_WITH(system-openssl,
349 [ --with-system-openssl Use OpenSSL already on system
351 AC_ARG_WITH(system-jpeg,
352 [ --with-system-jpeg Use jpeg already on system
354 AC_ARG_WITH(system-expat,
355 [ --with-system-expat Use expat already on system
357 AC_ARG_WITH(system-libwpd,
358 [ --with-system-libwpd Use libwpd already on system
360 AC_ARG_WITH(system-libwps,
361 [ --with-system-libwps Use libwps already on system
363 AC_ARG_WITH(system-libwpg,
364 [ --with-system-libwpg Use libwpg already on system
366 AC_ARG_WITH(system-libxml,
367 [ --with-system-libxml Use libxml already on system
369 AC_ARG_WITH(system-python,
370 [ --with-system-python Use python already on system
372 AC_ARG_WITH(system-icu,
373 [ --with-system-icu Use icu already on system
375 AC_ARG_WITH(system-poppler,
376 [ --with-system-poppler Use poppler already on system
378 AC_ARG_WITH(system-db,
379 [ --with-system-db Use berkeley db already on system
381 AC_ARG_WITH(system-lucene,
382 [ --with-system-lucene Use lucene already on system
384 AC_ARG_WITH(lucene-core-jar,
385 [ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ],
386 [ LUCENE_CORE_JAR="$withval"
388 AC_ARG_WITH(lucene-analyzers-jar,
389 [ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ],
390 [ LUCENE_ANALYZERS_JAR="$withval"
392 AC_ARG_WITH(system-hsqldb,
393 [ --with-system-hsqldb Use hsqldb already on system
395 AC_ARG_WITH(hsqldb-jar,
396 [ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ],
397 [ HSQLDB_JAR="$withval"
399 AC_ARG_WITH(system-beanshell,
400 [ --with-system-beanshell Use beanshell already on system
402 AC_ARG_WITH(beanshell-jar,
403 [ --with-beanshell-jar=JARFILE Specify path to jarfile manually ],
406 AC_ARG_ENABLE(minimizer,
407 [ --enable-minimizer enables the build of the Presentation Minimizer extension
409 AC_ARG_ENABLE(presenter-console,
410 [ --enable-presenter-console enables the build of the Presenter Console extension
412 AC_ARG_ENABLE(pdfimport,
413 [ --enable-pdfimport enables the build of the PDF Import extension and xpdf
415 AC_ARG_ENABLE(wiki-publisher,
416 [ --enable-wiki-publisher enables the build of the Wiki Publisher extension
418 AC_ARG_WITH(commons-codec-jar,
419 [ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ],
420 [ COMMONS_CODEC_JAR="$withval"
422 AC_ARG_WITH(commons-lang-jar,
423 [ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ],
424 [ COMMONS_LANG_JAR="$withval"
426 AC_ARG_WITH(commons-httpclient-jar,
427 [ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ],
428 [ COMMONS_HTTPCLIENT_JAR="$withval"
430 AC_ARG_WITH(commons-logging-jar,
431 [ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ],
432 [ COMMONS_LOGGING_JAR="$withval"
434 AC_ARG_WITH(servlet-api-jar,
435 [ --servlet-api-jar=JARFILE Specify path to jarfile manually ],
436 [ SERVLETAPI_JAR="$withval"
438 AC_ARG_ENABLE(report-builder,
439 [ --enable-report-builder enables the build of the Report Builder extension
441 AC_ARG_WITH(system-jfreereport,
442 [ --with-system-jfreereport Use JFreeReport already on system
445 [ --with-sac-jar=JARFILE Specify path to jarfile manually ],
448 AC_ARG_WITH(libxml-jar,
449 [ --with-libxml-jar=JARFILE Specify path to jarfile manually ],
450 [ LIBXML_JAR="$withval"
452 AC_ARG_WITH(flute-jar,
453 [ --with-flute-jar=JARFILE Specify path to jarfile manually ],
454 [ FLUTE_JAR="$withval"
456 AC_ARG_WITH(jfreereport-jar,
457 [ --with-jfreereport-jar=JARFILE Specify path to jarfile manually ],
458 [ JFREEREPORT_JAR="$withval"
460 AC_ARG_WITH(liblayout-jar,
461 [ --with-liblayout-jar=JARFILE Specify path to jarfile manually ],
462 [ LIBLAYOUT_JAR="$withval"
464 AC_ARG_WITH(libloader-jar,
465 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
466 [ LIBLOADER_JAR="$withval"
468 AC_ARG_WITH(libloader-jar,
469 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
470 [ LIBLOADER_JAR="$withval"
472 AC_ARG_WITH(libformula-jar,
473 [ --with-libformula-jar=JARFILE Specify path to jarfile manually ],
474 [ LIBFORMULA_JAR="$withval"
476 AC_ARG_WITH(librepository-jar,
477 [ --with-librepository-jar=JARFILE Specify path to jarfile manually ],
478 [ LIBREPOSITORY_JAR="$withval"
480 AC_ARG_WITH(libfonts-jar,
481 [ --with-libfonts-jar=JARFILE Specify path to jarfile manually ],
482 [ LIBFONTS_JAR="$withval"
484 AC_ARG_WITH(libserializer-jar,
485 [ --with-libserializer-jar=JARFILE Specify path to jarfile manually ],
486 [ LIBSERIALIZER_JAR="$withval"
488 AC_ARG_WITH(libbase-jar,
489 [ --with-libbase-jar=JARFILE Specify path to jarfile manually ],
490 [ LIBBASE_JAR="$withval"
492 AC_ARG_WITH(system-saxon,
493 [ --with-system-saxon Use saxon already on system
495 AC_ARG_WITH(saxon-jar,
496 [ --with-saxon-jar=JARFILE Specify path to jarfile manually ],
497 [ SAXON_JAR="$withval"
499 AC_ARG_WITH(system-libxslt,
500 [ --with-system-libxslt Use libxslt already on system
502 AC_ARG_WITH(system-odbc,
503 [ --with-system-odbc-headers Use the odbc headers already on system
505 AC_ARG_WITH(system-sane,
506 [ --with-system-sane-header Use sane.h already on system
508 AC_ARG_WITH(system-xrender,
509 [ --with-system-xrender-headers Use XRender headers already on system
511 AC_ARG_WITH(system-mesa-headers,
512 [ --with-system-mesa-headers Use Mesa headers already on system
514 AC_ARG_WITH(system-curl,
515 [ --with-system-curl Use curl already on system
517 AC_ARG_WITH(system-boost,
518 [ --with-system-boost Use boost already on system
520 AC_ARG_WITH(system-vigra,
521 [ --with-system-vigra Use vigra already on system
524 [ --disable-neon Disable neon and the compilation of webdav binding
527 [ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla
530 AC_ARG_WITH(system-neon,
531 [ --with-system-neon Use neon already on system
533 AC_ARG_WITH(system-agg,
534 [ --with-system-agg Use AGG already on system
536 AC_ARG_WITH(system-hunspell,
537 [ --with-system-hunspell Use libhunspell already on system
539 AC_ARG_WITH(system-mythes,
540 [ --with-system-mythes Use mythes already on system
542 AC_ARG_WITH(system-altlinuxhyph,
543 [ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
545 AC_ARG_WITH(system-lpsolve,
546 [ --with-system-lpsolve Use lpsolve already on system
548 AC_ARG_WITH(system-mozilla,
549 [ --with-system-mozilla Use mozilla already on system. Note that some
550 components cannot be built against a contemporary
551 mozilla. The flavour used can be specified by
552 --with-system-mozilla=<flavour>. Supported are:
553 libxul (default), xulrunner, firefox, seamonkey,
555 ], WITH_SYSTEM_MOZILLA=$withval, WITH_SYSTEM_MOZILLA=no)
556 AC_ARG_WITH(linker-hash-style,
557 [ --with-linker-hash-style
558 ], WITH_LINKER_HASH_STYLE=$withval, WITH_LINKER_HASH_STYLE=gnu)
560 [ --with-stlport The location that STLport is installed in. The STL
561 header files are assumed to be in
562 stlport-home/stlport and the STLPort library in
565 Usage: --with-stlport=<absolute path to stlport home>
567 Warning!!, disabling using --without-stlport or
568 enabling using --with-stlport on a platform that
569 defaults to the opposite will break ABI compatability
570 ], WITH_STLPORT=$withval , WITH_STLPORT=auto)
571 AC_ARG_WITH(jdk-home,
572 [ --with-jdk-home if you have installed JDK 1.3 or later on your system
573 please supply the path here.
574 Note that this is not the location of the Java binary
575 but the location of the entire distribution.
577 Usage: --with-jdk-home=<absolute path to JDK home>
579 AC_ARG_WITH(gxx_include_path,
580 [ --with-gxx-include-path if you want to override the autodetected g++ include
583 Usage: --with-gxx-include-path=<absolute path to g++ include dir>
586 [ --with-java Build with[[out]] Java support. If you use
587 --without-java/--with-java=no then the build will have
588 no support for Java components, applets, accessibility
590 ], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java)
591 AC_ARG_WITH(java_target_version,
592 [ --with-java-target-version Generate class files that will work on JVMs with
593 the specified version. For example, use
594 --with-java-target-version=1.4 to make sure that the
595 application will work with JVM 1.4 even when compiled
598 This option is ignored when you compile with gcj/gij.
600 Usage: --with-java-target-version=<jvm version>
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>
617 AC_ARG_WITH(perl-home,
618 [ --with-perl-home If you have installed the Perl 5 Distribution, on your
619 system, please supply the path here.
620 Note that this is not the location of the Perl binary
621 but the location of the entire distribution.
623 Usage: --with-perl-home=<absolute path to Perl 5 home>
626 [ --with-cl-home For Windows NT users, please supply the path
627 for the Microsoft C/C++ compiler.
628 Note that this is not the location of the compiler
629 binary but the location of the entire distribution.
631 Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>
633 AC_ARG_WITH(mspdb-path,
634 [ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the
635 path pointing to the mspdb71.dll (.NET 2003).
637 Usage: --with-mspdb-path=<absolute path to mspdb71.dll>
639 AC_ARG_WITH(midl-path,
640 [ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply
641 the path pointing to the midl.exe.
643 Usage: --with-midl-path=<absolute path to midl.exe>
645 AC_ARG_WITH(csc-path,
646 [ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply
647 the path pointing to the csc.exe.
649 Usage: --with-csc-path=<absolute path to csc.exe>
651 AC_ARG_WITH(nsis-path,
652 [ --with-nsis-path For Windows users, please supply the path to the
653 "Nullsoft Scriptable Install System" (NSIS). If NSIS
654 is found in the path or this option is supplied a self
655 contained executable installer for OpenOffice.org will
658 Usage: --with-nsis-path=<absolute path to nsis.exe>
660 AC_ARG_WITH(frame-home,
661 [ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply
662 the path pointing to lib/mscoree.lib, usually
664 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"
666 MS Visual Toolkit compiler users, please supply the
667 path pointing to lib/msvcrt.lib, usually something
669 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"
671 Usage: --with-frame-home=<absolute path to Framework SDK [[home]]>
673 AC_ARG_WITH(psdk-home,
674 [ --with-psdk-home For Windows users, please supply the path to the
675 Microsoft Platform SDK.
677 Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>
679 AC_ARG_WITH(directx-home,
680 [ --with-directx-home For Windows users, please supply the path to the
681 Microsoft DirectX SDK.
683 Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
685 AC_ARG_WITH(mozilla-build,
686 [ --with-mozilla-build For Windows users, please supply the path to the
689 Usage: --with-mozilla-build=<absolute path to mozilla build tools>
690 ],[MOZILLABUILD=$withval],)
691 AC_ARG_WITH(local-solenv,
692 [ --with-local-solenv If you have solenv in a location other than ./solenv,
693 please supply the path here.
695 Usage: --with-local-solenv=<absolute path to solenv>
697 AC_ARG_WITH(local-solver,
698 [ --with-local-solver if you have solver in a location other than ./solver,
699 please supply the path here.
701 Usage: --with-local-solver=<absolute path to solver>
703 AC_ARG_ENABLE(check-only,
704 [ --enable-check-only Use this option option if you just want to check your
705 environment. This option stops the generation of an
708 Usage: --enable-check-only=yes
711 [ --with-lang Use this option to build OpenOffice.org with
712 additional language support. English (US) is always
713 included by default. Separate multiple languages with
714 space. For all languages, use --with-lang=ALL.
716 Usage: --with-lang="es sw tu cs sk"
718 AC_ARG_WITH(poor-help-localizations,
719 [ --with-poor-help-localizations
720 Use this option to specify which languages have
721 unusable help localizations. Separate multiple
722 languages with space.
724 Usage: --with-poor-help-localizations="af ar be-BY ca"
727 [ --with-dict Use this option to build OpenOffice.org with
728 dictionary support. ALL dictionaries are always
729 included by default unless overridden with
730 this option. Separate multiple dictionaries with
731 commas. For all dictionaries, use --with-dict=ALL.
733 Usage: --with-dict=ENGB,ENUS,ITIT
735 AC_ARG_WITH(intro-bitmaps,
736 [ --with-intro-bitmaps Prefer the specified intro bitmaps over the
737 the default one. Can be more than one (separated by
738 commas), the order means priority of fallback if the
739 first does not exist (in the installed tree).
741 Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
743 AC_ARG_WITH(about-bitmaps,
744 [ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
745 specification of bitmaps for the About box.
747 Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
750 [ --with-vendor Set vendor of the build.
752 Usage: --with-vendor="John the Builder"
754 AC_ARG_WITH(unix-wrapper,
755 [ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
756 in the desktop files and in the desktop-integration RPMs.
758 Usage: --with-unix-wrapper=ooffice
760 AC_ARG_WITH(asm-home,
761 [ --with-asm-home For Windows users, please supply the path for the
764 Usage: --with-asm-home=<path to ml.exe directory>
766 AC_ARG_WITH(os-version,
767 [ --with-os-version For FreeBSD users, use this option option to override
768 the detected OSVERSION.
770 Usage: --with-os-version=<OSVERSION>
772 AC_ARG_WITH(unzip-home,
773 [ --with-unzip-home Deprecated: use --with-zip-home instead],,)
774 AC_ARG_WITH(zip-home,
775 [ --with-zip-home If you use a non standard zip, for example windows
776 please supply the path for zip
778 Usage: --with-zip-home=<path to zip executable>
781 [ --with-mingwin For Windows users, use the mingwin32 compiler within
782 cygwin environment, this implies --with-use-shell=tcsh
784 Usage: --with-mingwin=yes
786 For !Windows use, use the mingw32 C++ compiler to
787 (re-) build unowinreg.dll. Specify the MinGW C++
790 Usage: --with-mingwin=i586-mingw32msvc-g++
791 ],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
792 AC_ARG_WITH(use-shell,
793 [ --with-use-shell Use this option to override the default shell to be
794 used for the build environment.
800 Usage: --with-use-shell=tcsh|bash|4nt
801 ],with_use_shell=$withval,with_use_shell="tcsh")
802 AC_ARG_WITH(build-version,
803 [ --with-build-version Allows the builder to add a custom version tag
804 that will appear in the Help/About box for QA
807 Usage: --with-build-version="Built by Jim"
808 ],with_build_version=$withval)
809 AC_ARG_ENABLE(sgistl,
810 [ --enable-sgistl for IRIX users, use this option option to build
811 OpenOffice.org using SGI's STL.
813 Usage: --enable-sgistl=yes
816 [ --with-alloc Define which allocator to build with
817 (choices are oo, system, tcmalloc)
819 AC_ARG_ENABLE(verbose,
820 [ --enable-verbose Increase build verbosity.
821 --disable-verbose Decrease build verbosity.
826 dnl ===================================================================
828 dnl ===================================================================
829 echo "********************************************************************"
831 echo "* OpenOffice.org build configuration. *"
833 echo "* The configure process checks your platform to see whether *"
834 echo "* you can build OpenOffice.org on it. *"
835 echo "* This process checks all pre-requisites and generates a file *"
836 echo "* containing the necessary environment variables. *"
837 echo "* Source this file after configure has ended successfully. *"
839 echo "* Any warning that is generated during the configure process *"
840 echo "* must be taken into account since it can be a reason for *"
841 echo "* an unsuccessful build of OpenOffice.org *"
843 echo "********************************************************************"
845 echo "********************************************************************"
847 echo "* Checking the platform pre-requisites. *"
849 echo "********************************************************************"
851 dnl ===================================================================
852 dnl Configure pre-requisites.
853 dnl ===================================================================
857 AC_PATH_PROG( AWK, $AWK)
858 if test -z "$AWK"; then
859 AC_MSG_ERROR([install awk to run this script])
862 AC_PATH_PROGS(SED, sed )
863 if test -z "$SED"; then
864 AC_MSG_ERROR([install sed to run this script])
867 AC_MSG_CHECKING([for solenv environment])
868 if test -z "$with_local_solenv"; then
869 LOCAL_SOLENV="DEFAULT"
870 AC_MSG_RESULT([default])
872 LOCAL_SOLENV=$with_local_solenv
873 AC_MSG_RESULT([$with_local_solenv])
875 AC_SUBST(LOCAL_SOLENV)
877 if test "$LOCAL_SOLENV" = "DEFAULT"; then
880 _solenv="$LOCAL_SOLENV"
884 if test -e $_solenv/inc/minor.mk; then
885 # Get UPD number from ./solenv/inc/minor.mk
886 UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
888 SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
889 AC_SUBST(SOURCEVERSION)
891 AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
894 dnl ===================================================================
895 dnl Checks for the operating system and processor.
896 dnl ===================================================================
898 if test "$build" != "$host" -o "$build" != "$target" \
899 -o "$host" != "$target"; then
900 AC_MSG_WARN([cross-compiling by any means is not supported (yet)!])
901 echo "cross-compiling by any means is not supported (yet)!" >> warn
904 if echo "$build_os" | grep cygwin; then
905 AC_MSG_CHECKING([Cygwin version])
907 AC_MSG_RESULT([$CygwinVer])
908 if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
909 AC_MSG_ERROR([You need at least Cygwin V1.5.x])
915 dnl ===================================================================
916 dnl The following is a list of supported systems.
917 dnl Sequential to keep the logic very simple
918 dnl These values may be checked and reset later.
919 dnl ===================================================================
930 AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
931 if test -z "$GNUTAR"; then
932 AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).])
936 dnl ===========================================================
937 dnl check whether we're using solaris 6,7,8 - sparc or intel.
938 dnl ===========================================================
939 AC_MSG_CHECKING([the Solaris operating system release])
940 _os_release=`echo $build_os | $SED -e s/solaris2\.//`
941 if test "$_os_release" -lt "6"; then
942 AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
944 AC_MSG_RESULT([ok ($_os_release)])
947 dnl check whether we're using a sparc or i386 processor
948 AC_MSG_CHECKING([the processor type])
949 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
950 AC_MSG_RESULT([ok ($build_cpu)])
952 AC_MSG_ERROR([only sparc and i386 processors are supported])
964 if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then
965 PTHREAD_CFLAGS="-DNPTL"
973 cygwin*|interix*) # Windows
986 if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
987 AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
988 echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
1009 AC_MSG_CHECKING([the FreeBSD operating system release])
1010 if test -n "$with_os_version"; then
1011 OSVERSION="$with_os_version"
1013 OSVERSION=`/sbin/sysctl -n kern.osreldate`
1015 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
1016 AC_MSG_CHECKING([which thread library to use])
1017 if test "$OSVERSION" -lt "500016"; then
1018 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1019 PTHREAD_LIBS="-pthread"
1020 elif test "$OSVERSION" -lt "502102"; then
1021 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1022 PTHREAD_LIBS="-lc_r"
1025 PTHREAD_LIBS="-pthread"
1027 AC_MSG_RESULT([$PTHREAD_LIBS])
1044 PTHREAD_CFLAGS="-pthread"
1045 PTHREAD_LIBS="-pthread -lpthread"
1058 PTHREAD_LIBS=-pthread
1059 echo "AIX is an alpha port --- Use at own risk" >> warn
1063 AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
1068 AC_SUBST(PTHREAD_CFLAGS)
1069 AC_SUBST(PTHREAD_LIBS)
1071 dnl ===================================================================
1072 dnl Set the ENABLE_CRASHDUMP variable.
1073 dnl ===================================================================
1074 AC_MSG_CHECKING([whether to enable crashdump feature])
1075 if test "$enable_crashdump" = "yes" -o "$enable_crashdump" = "TRUE"; then
1076 ENABLE_CRASHDUMP="TRUE"
1077 AC_MSG_RESULT([yes])
1078 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1080 if test "$enable_crashdump" = "STATIC"; then
1081 ENABLE_CRASHDUMP="STATIC"
1082 AC_MSG_RESULT([yes, STATIC])
1083 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1085 if test "$enable_crashdump" = "" -o "$enable_crashdump" = "no"; then
1089 AC_MSG_ERROR([--enable-crashdump only accepts yes, no, TRUE or STATIC as parameter.])
1093 AC_SUBST(ENABLE_CRASHDUMP)
1095 if test "$_os" = "WINNT"; then
1096 BUILD_TYPE="$BUILD_TYPE TWAIN"
1099 if test "$_os" = "WINNT"; then
1100 dnl ===================================================================
1101 dnl Set the VC_STANDARD variable.
1102 dnl ===================================================================
1103 AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
1104 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
1109 AC_MSG_RESULT([yes])
1111 AC_SUBST(VC_STANDARD)
1114 dnl ===================================================================
1115 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
1116 dnl ===================================================================
1117 AC_MSG_CHECKING([whether to turn warnings to errors])
1118 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
1119 ENABLE_WERROR="TRUE"
1120 AC_MSG_RESULT([yes])
1121 AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
1122 AC_MSG_WARN([on platforms where it has been disabled explicitely])
1123 echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
1125 ENABLE_WERROR="FALSE"
1128 AC_SUBST(ENABLE_WERROR)
1130 dnl ===================================================================
1131 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
1132 dnl ===================================================================
1133 AC_MSG_CHECKING([whether to do a debug build])
1134 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
1136 if test -z "$enable_symbols"; then
1137 enable_symbols="yes"
1139 AC_MSG_RESULT([yes])
1141 ENABLE_DEBUG="FALSE"
1144 AC_SUBST(ENABLE_DEBUG)
1146 dnl ===================================================================
1147 dnl Set the ENABLE_DBGUTIL variable
1148 dnl ===================================================================
1149 AC_MSG_CHECKING([whether to build with additional debug utilities])
1150 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1154 AC_MSG_RESULT([yes])
1157 PROFULLSWITCH="product=full"
1159 AC_MSG_RESULT([no, full product build])
1162 AC_SUBST(PROFULLSWITCH)
1165 dnl ===================================================================
1166 dnl First setting is whether to include symbols into final build.
1167 dnl ===================================================================
1168 AC_MSG_CHECKING([whether to include symbols into final build])
1169 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
1170 if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
1171 ENABLE_SYMBOLS="TRUE"
1172 AC_MSG_RESULT([yes])
1174 if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
1175 ENABLE_SYMBOLS="SMALL"
1176 AC_MSG_RESULT([yes, small ones])
1177 else if test "$enable_symbols" != "no" ; then
1178 echo enable symbols is: $enable_symbols
1179 AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
1189 AC_SUBST(ENABLE_SYMBOLS)
1191 dnl ===================================================================
1192 dnl Determine if the solver is to be stripped or not.
1193 dnl ===================================================================
1194 AC_MSG_CHECKING([whether to strip the solver or not.])
1195 if test -n "$enable_strip_solver"; then
1196 if test "$enable_strip_solver" = "yes"; then
1198 else if test "$enable_strip_solver" = "no"; then
1199 DISABLE_STRIP="TRUE"
1201 AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
1205 if test -n "$ENABLE_SYMBOLS"; then
1206 DISABLE_STRIP="TRUE"
1211 AC_SUBST(DISABLE_STRIP)
1213 dnl ===================================================================
1215 dnl ===================================================================
1216 AC_MSG_CHECKING([whether to enable native CUPS support])
1217 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
1219 AC_MSG_RESULT([yes])
1224 AC_SUBST(ENABLE_CUPS)
1226 AC_MSG_CHECKING([whether to enable fontconfig support])
1227 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
1228 ENABLE_FONTCONFIG="TRUE"
1229 AC_MSG_RESULT([yes])
1231 ENABLE_FONTCONFIG=""
1234 AC_SUBST(ENABLE_FONTCONFIG)
1237 dnl ===================================================================
1238 dnl Disable legacy binary file formats filters
1239 dnl ===================================================================
1240 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
1241 if test "$enable_binfilter" = "no"; then
1245 WITH_BINFILTER="YES"
1246 BUILD_TYPE="$BUILD_TYPE BINFILTER"
1247 AC_MSG_RESULT([yes])
1249 AC_SUBST(WITH_BINFILTER)
1251 if test "$_os" = "WINNT"; then
1252 AC_MSG_CHECKING([whether to use DirectX])
1253 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
1254 ENABLE_DIRECTX="TRUE"
1255 AC_MSG_RESULT([yes])
1260 AC_SUBST(ENABLE_DIRECTX)
1262 AC_MSG_CHECKING([whether to use ActiveX])
1263 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
1265 AC_MSG_RESULT([yes])
1267 DISABLE_ACTIVEX="TRUE"
1270 AC_SUBST(DISABLE_ACTIVEX)
1272 AC_MSG_CHECKING([whether to use ATL])
1273 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
1275 AC_MSG_RESULT([yes])
1280 AC_SUBST(DISABLE_ATL)
1284 dnl ===================================================================
1285 dnl Disable rpath in shared libraries?
1286 dnl ===================================================================
1287 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
1288 if test "$enable_rpath" = "no"; then
1293 AC_MSG_RESULT([$ENABLE_RPATH])
1294 AC_SUBST(ENABLE_RPATH)
1296 dnl Test whether to include MySpell dictionaries
1297 dnl ===================================================================
1298 AC_MSG_CHECKING([whether to include MySpell dictionaries])
1299 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
1300 AC_MSG_RESULT([yes])
1301 WITH_MYSPELL_DICTS=YES
1302 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
1305 WITH_MYSPELL_DICTS=NO
1307 AC_SUBST(WITH_MYSPELL_DICTS)
1309 if test "$WITH_MYSPELL_DICTS" = "NO"; then
1310 AC_MSG_CHECKING([whether to use dicts from external paths])
1311 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
1312 AC_MSG_RESULT([yes])
1314 AC_MSG_CHECKING([for spelling dictionary directory])
1315 if test -n "$with_external_dict_dir"; then
1316 DICT_SYSTEM_DIR=file://$with_external_dict_dir
1318 DICT_SYSTEM_DIR=file:///usr/share/hunspell
1320 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
1321 AC_MSG_CHECKING([for hyphenation patterns directory])
1322 if test -n "$with_external_hyph_dir"; then
1323 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
1325 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
1327 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
1328 AC_MSG_CHECKING([for thesaurus directory])
1329 if test -n "$with_external_thes_dir"; then
1330 THES_SYSTEM_DIR=file://$with_external_thes_dir
1332 THES_SYSTEM_DIR=file:///usr/share/mythes
1334 AC_MSG_RESULT([$THES_SYSTEM_DIR])
1340 AC_SUBST(SYSTEM_DICTS)
1341 AC_SUBST(DICT_SYSTEM_DIR)
1342 AC_SUBST(HYPH_SYSTEM_DIR)
1343 AC_SUBST(THES_SYSTEM_DIR)
1345 dnl ===================================================================
1346 dnl WINNT uses tcsh, bash or 4nt all other O/S use tcsh or bash.
1347 dnl The following sets the with_use_shell variable.
1348 dnl ===================================================================
1349 AC_MSG_CHECKING([which shell to use])
1350 if test $_os = "WINNT"; then
1351 dnl ===================================================================
1352 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash" -a "$with_use_shell" != "4nt"; then
1353 AC_MSG_ERROR([only "tcsh","bash" or "4nt" are supported options])
1355 dnl ===================================================================
1356 dnl Sanity check! Native windows programs cannot use cygwin symlinks!
1357 dnl ===================================================================
1358 dnl As long as awk instead of $AWK is used somewhere in the sources,
1359 dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
1360 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
1361 AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
1362 Native windows programs cannot use cygwin symlinks. Remove the symbolic
1363 link, and copy the program to the name of the link.])
1365 dnl ===================================================================
1366 dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
1367 dnl CC and CXX but the configure checks here assume that guw.exe
1368 dnl (if needed at all) is not yet present.
1369 dnl ===================================================================
1370 CC=`echo $CC | $SED "s/^guw.exe //"`
1371 CXX=`echo $CXX | $SED "s/^guw.exe //"`
1372 dnl ===================================================================
1373 dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
1375 dnl ===================================================================
1376 if test -n "$CC";then
1377 if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
1381 dnl ===================================================================
1382 dnl If using Mingwin32 then don't use 4NT
1383 dnl ===================================================================
1384 if test "$WITH_MINGWIN" = "yes" ; then
1385 if test "$with_use_shell" = "4nt" -o "x$with_use_shell" = "x"; then
1386 with_use_shell="tcsh"
1388 if test -z "$CC"; then
1389 CC="gcc -mno-cygwin"
1390 CXX="g++ -mno-cygwin"
1393 elif test $_os = "OS2"; then
1394 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "4nt"; then
1395 AC_MSG_ERROR([only "tcsh" or "4nt" are supported options])
1398 dnl ===================================================================
1399 dnl All other operating systems use tcsh or bash.
1400 dnl ===================================================================
1401 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash"; then
1402 AC_MSG_ERROR([only "tcsh" or "bash" are supported options])
1405 USE_SHELL="$with_use_shell"
1406 AC_MSG_RESULT([$USE_SHELL])
1408 AC_SUBST(WITH_MINGWIN)
1410 dnl ===================================================================
1411 dnl Extra check for Windows. Non 4nt-builds need gcc to build dmake
1412 dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
1414 dnl ===================================================================
1415 if test "$_os" = "WINNT" -a "$with_use_shell" != "4nt" ; then
1416 AC_MSG_CHECKING([for cygwin gcc/g++])
1417 if which gcc > /dev/null && which g++ > /dev/null ; then
1418 AC_MSG_RESULT([found])
1420 AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
1425 dnl ===================================================================
1426 dnl Check whether the chosen shell can be used.
1427 dnl ===================================================================
1428 if test "$with_use_shell" = "tcsh"; then
1429 AC_PATH_PROG(SHELLPATH, tcsh)
1430 if test -z "$SHELLPATH"; then
1431 AC_MSG_ERROR([tcsh not found in \$PATH])
1433 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/tcsh$//p"`
1435 elif test "$with_use_shell" = "bash"; then
1436 AC_PATH_PROG(SHELLPATH, bash)
1437 if test -z "$SHELLPATH"; then
1438 AC_MSG_ERROR([bash not found in \$PATH])
1440 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
1443 AC_MSG_WARN([Windows/OS/2 4NT builds don't test for the shell])
1444 SHELLPATH="NO_SHELLPATH_NEEDED"
1448 dnl ===================================================================
1449 dnl Checks for c compiler,
1450 dnl The check for the c++ compiler is later on.
1451 dnl ===================================================================
1452 AC_MSG_CHECKING([gcc home])
1453 if test -z "$with_gcc_home"; then
1454 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1456 GCC_HOME="$with_gcc_home"
1458 AC_MSG_RESULT($GCC_HOME)
1461 if test -n "$with_gcc_home"; then
1462 if test -z "$CC"; then
1463 CC="$with_gcc_home/bin/gcc"
1467 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1468 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1472 COMPATH=`dirname "$CC"`
1473 if test "$COMPATH" = "." ; then
1474 AC_PATH_PROGS(COMPATH, $CC)
1475 dnl double square bracket to get single because of M4 quote...
1476 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1479 dnl ===================================================================
1480 dnl Test the gcc version, 3 is OK
1481 dnl ===================================================================
1483 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1484 AC_MSG_CHECKING([the GNU gcc compiler version])
1485 _gcc_version=`$CC -dumpversion`
1486 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
1487 _gcc_longver=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1488 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1490 if test "$_gcc_major" -lt "3"; then
1491 AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
1493 if test "$GCCVER" -eq "030203"; then
1494 if test "$ENABLE_SYMBOLS" = "SMALL"; then
1495 AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
1499 AC_MSG_RESULT([checked (gcc $_gcc_version)])
1500 if test "$_os" = "SunOS"; then
1501 AC_MSG_CHECKING([gcc linker])
1502 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
1503 AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
1505 AC_MSG_RESULT([ok (GNU ld)])
1510 HAVE_LD_BSYMBOLIC_FUNCTIONS=
1511 if test "$GCC" = "yes"; then
1512 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
1513 bsymbolic_functions_ldflags_save=$LDFLAGS
1514 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
1515 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1518 printf ("hello world\n");
1519 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
1520 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
1521 AC_MSG_RESULT( found )
1523 AC_MSG_RESULT( not found )
1525 LDFLAGS=$bsymbolic_functions_ldflags_save
1527 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
1529 dnl ===================================================================
1530 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
1531 dnl ===================================================================
1532 AC_MSG_CHECKING([whether to enable pch feature])
1533 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
1534 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
1536 AC_MSG_RESULT([yes])
1537 dnl There is no PCH support in GCC versions prior to this
1538 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
1540 AC_MSG_RESULT([yes])
1543 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
1549 AC_SUBST(ENABLE_PCH)
1551 dnl ===================================================================
1552 dnl Set the NO_HIDS variable. (enable with --enable-hids)
1553 dnl ===================================================================
1554 AC_MSG_CHECKING([whether to enable hid list feature])
1555 if test -n "$enable_hids" && test "$enable_hids" != "no"; then
1557 AC_MSG_RESULT([yes])
1564 dnl ===================================================================
1565 dnl Search all the common names for GNU make
1566 dnl ===================================================================
1567 AC_MSG_CHECKING([for GNU make])
1568 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
1569 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1570 if test $? -eq 0; then
1575 AC_MSG_RESULT($GNUMAKE)
1576 if test -z "$GNUMAKE"; then
1577 AC_MSG_ERROR([not found. install GNU make.])
1580 AC_MSG_CHECKING([the GNU make version])
1581 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
1582 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1583 if test "$_make_longver" -ge "037901" ; then
1584 AC_MSG_RESULT([$GNUMAKE $_make_version])
1586 if test "$_os" = "Darwin"; then
1587 if test "$_make_longver" -ge "037900" ; then
1588 AC_MSG_RESULT([$GNUMAKE $_make_version])
1590 AC_MSG_WARN([failed ($GNUMAKE $_make_version need 3.79.0+)])
1593 AC_MSG_ERROR([failed ($GNUMAKE $_make_version need 3.79.1+)])
1598 dnl ===================================================================
1599 dnl Search all the common names for GNU tar
1600 dnl ===================================================================
1601 AC_MSG_CHECKING([for GNU tar])
1602 for a in $GNUTAR gtar gnutar tar; do
1603 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1604 if test $? -eq 0; then
1609 AC_MSG_RESULT($GNUTAR)
1610 if test -z "$GNUTAR"; then
1611 AC_MSG_ERROR([not found. install GNU tar.])
1616 dnl ===================================================================
1617 dnl Test the solaris compiler version
1618 dnl ===================================================================
1619 if test "$_os" = "SunOS"; then
1620 if test "$CC" = "cc"; then
1621 AC_PATH_PROGS(_cc, cc)
1622 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1623 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
1624 dnl cc -V outputs to standard error!!!!
1625 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
1626 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
1627 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
1628 if test "$_sunstudio_major" != "5"; then
1629 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1631 _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" }'`
1632 if test "$_sunstudio_minor" = "false"; then
1633 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1635 dnl compiler will do
1636 AC_MSG_RESULT([checked])
1642 if test "$GCC" = "yes"; then
1643 AC_MSG_CHECKING( for --hash-style=$WITH_LINKER_HASH_STYLE linker support )
1644 hash_style_ldflags_save=$LDFLAGS
1645 LDFLAGS="$LDFLAGS -Wl,--hash-style=$WITH_LINKER_HASH_STYLE"
1646 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1649 printf ("hello world\n");
1650 ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
1651 if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
1652 AC_MSG_RESULT( found )
1654 AC_MSG_RESULT( not found )
1656 LDFLAGS=$hash_style_ldflags_save
1658 AC_SUBST(HAVE_LD_HASH_STYLE)
1659 AC_SUBST(WITH_LINKER_HASH_STYLE)
1661 dnl ===================================================================
1662 dnl Check for -Wl,--as-needed linker support
1663 dnl ===================================================================
1664 HAVE_WORKING_LD_AS_NEEDED=
1665 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1666 AC_MSG_CHECKING([for working -Wl,--as-needed linker support])
1667 _ld_version=`$CC -Wl,--version 2>&1 | head -n 1 | $SED -e "s|(.*)||" -e "s|^[[^0-9]]*||"`
1668 _ld_major=`echo $_ld_version | cut -d"." -f 1`
1669 _ld_minor=`echo $_ld_version | cut -d"." -f 2`
1670 if test "$_ld_major" -gt 2 || \
1671 test "$_ld_major" -eq 2 -a "$_ld_minor" -gt 17 ; then
1672 # there are problems with ld <= 2.17, see also http://www.gentoo.org/proj/en/qa/asneeded.xml
1673 HAVE_WORKING_LD_AS_NEEDED=TRUE
1674 AC_MSG_RESULT([yes])
1679 AC_SUBST(HAVE_WORKING_LD_AS_NEEDED)
1681 dnl ===================================================================
1682 dnl Test the IRIX SGI Mips pro compiler
1683 dnl ===================================================================
1684 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
1685 if test "$CC" = "cc"; then
1686 AC_PATH_PROGS(_cc, cc)
1687 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1688 AC_MSG_CHECKING([the SGI MIPSpro C compiler version])
1689 dnl cc -version outputs to standard error!!!!
1690 _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'`
1691 _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'`
1692 if test "$_mipspro_major" != "7"; then
1693 AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler])
1695 _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'`
1696 if test "$_mipspro_minor" = "false"; then
1697 AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler])
1699 dnl compiler will do
1700 AC_MSG_RESULT([checked])
1706 dnl ===================================================================
1707 dnl Test the Compaq compiler for OSF1
1708 dnl ===================================================================
1709 if test "$_os" = "OSF1"; then
1710 if test "$CC" = "cc"; then
1711 AC_PATH_PROGS(_cc, cc)
1712 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1713 AC_MSG_WARN([******* $_cc , $COMPATH])
1714 AC_MSG_CHECKING([the Compaq C compiler version])
1715 dnl cc -V outputs to standard error!!!!
1716 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
1717 _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
1718 if test "$_compaqc_major" != "T6"; then
1719 AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
1721 dnl compiler will do
1722 AC_MSG_RESULT([checked])
1727 dnl ===================================================================
1728 dnl Check whether there's a Perl version available.
1729 dnl ===================================================================
1730 if test -z "$with_perl_home"; then
1731 AC_PATH_PROG(PERL, perl)
1733 if test "$_os" = "WINNT"; then
1734 with_perl_home=`cygpath -u "$with_perl_home"`
1736 _perl_path="$with_perl_home/bin/perl"
1737 if test -x "$_perl_path"; then
1740 AC_MSG_ERROR([$_perl_path not found])
1744 dnl ===================================================================
1745 dnl Testing for Perl version 5 or greater.
1746 dnl $] is the perl version variable, it is returned as an integer
1747 dnl ===================================================================
1748 if test "$PERL"; then
1749 AC_MSG_CHECKING([the Perl version])
1750 ${PERL} -e "exit($]);"
1752 if test "$_perl_version" -lt 5; then
1753 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
1755 AC_MSG_RESULT([checked (perl $_perl_version)])
1757 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
1761 dnl ===================================================================
1762 dnl Testing for required Perl modules
1763 dnl ===================================================================
1764 AC_MSG_CHECKING([for required Perl modules])
1765 if `$PERL -e 'use Archive::Zip;'`; then
1766 AC_MSG_RESULT([all modules found])
1768 AC_MSG_ERROR([Failed to find some modules])
1771 dnl ===================================================================
1772 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
1773 dnl ===================================================================
1774 if test "$_os" = "WINNT"; then
1775 if test "$WITH_MINGWIN" != "yes"; then
1776 AC_MSG_CHECKING([for friendly registry keys])
1777 # VS.Net 2003, VS.Net 2005
1778 if test -z "$with_cl_home"; then
1779 vctest=`./oowintool --msvc-productdir`;
1780 if test -x "$vctest/bin/cl.exe"; then
1781 with_cl_home=$vctest;
1784 with_cl_home=`cygpath -u "$with_cl_home"`
1786 AC_MSG_RESULT([done])
1788 dnl ===========================================================
1789 dnl Check for mspdb71.dll/mspdb80.dll
1790 dnl ===========================================================
1791 dnl .NET 2003/5/8 Compiler
1792 if test -n "$with_mspdb_path";then
1793 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
1795 if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
1796 MSPDB_PATH="$with_mspdb_path"
1799 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
1800 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1802 dnl .NET 2005/2008 case
1803 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
1804 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1806 dnl Windows SDK 6.0 case
1807 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
1808 MSPDB_PATH="$with_cl_home/bin"
1811 if test -z "$MSPDB_PATH";then
1812 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
1813 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
1814 AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
1815 MSPDB_PATH=`dirname "$MSPDB_PATH"`
1818 if test -z "$MSPDB_PATH"; then
1819 AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
1821 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
1822 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
1823 dnl The path needs to be added before cl is called
1824 PATH="$MSPDB_PATH:$PATH"
1826 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
1827 if test -x "$with_cl_home/bin/cl.exe"; then
1828 CC="$with_cl_home/bin/cl.exe"
1830 AC_PATH_PROG(CC, cl.exe)
1832 if test -e "$CC"; then
1833 # This gives us a posix path with 8.3 filename restrictions
1834 CC=`cygpath -d "$CC"`
1835 CC=`cygpath -u "$CC"`
1836 # Remove /cl.exe from CC case insensitive
1837 AC_MSG_RESULT([found ($CC)])
1838 COMPATH=`echo $CC | $SED 's@/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
1839 export INCLUDE=`cygpath -d "$COMPATH/../Include"`
1840 dnl Check which Microsoft C/C++ compiler is found
1841 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
1842 dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
1843 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
1844 x = match( \\\$0, /..\\...\\...../ )
1845 CCversion = substr( \\\$0, RSTART, RLENGTH)
1846 tokencount = split (CCversion,vertoken,\".\")
1847 for ( i = 1 ; i <= tokencount ; i++ ) {
1848 printf (\"%04d\",vertoken[[i]] )
1851 AC_MSG_RESULT([found Compiler version $CCNUMVER.])
1852 if test "$CCNUMVER" -ge "001500000000"; then
1855 AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
1856 elif test "$CCNUMVER" -ge "001400000000"; then
1859 AC_MSG_RESULT([found .NET 2005.])
1860 elif test "$CCNUMVER" -ge "001300102240"; then
1863 AC_MSG_RESULT([found .NET 2003.])
1865 AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
1868 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
1871 AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
1872 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
1873 AC_MSG_RESULT([found.])
1874 if $CC -dumpspecs | grep -q "mno-cygwin"; then
1877 USE_MINGW="pure-mingw"
1880 AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
1885 AC_SUBST(MSPDB_PATH)
1888 dnl ===================================================================
1889 dnl .NET needs special treatment
1890 dnl ===================================================================
1891 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
1893 AC_PATH_PROG(MIDL_PATH, midl.exe)
1894 if test -n "$MIDL_PATH";then
1895 MIDL_PATH=`dirname "$MIDL_PATH"`
1897 if test -n "$with_midl_path";then
1898 with_midl_path=`cygpath -u "$with_midl_path"`
1900 if test -x "$with_midl_path/midl.exe"; then
1901 MIDL_PATH="$with_midl_path"
1903 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
1904 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
1906 if test -z "$MIDL_PATH" ; then
1907 vstest=`./oowintool --msvs-productdir`;
1908 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
1909 MIDL_PATH="$vstest/Common7/Tools/Bin"
1912 if test -z "$MIDL_PATH" ; then
1913 psdktest=`./oowintool --psdk-home`
1914 if test -x "$psdktest/Bin/midl.exe" ; then
1915 MIDL_PATH="$psdktest/Bin"
1918 if test ! -x "$MIDL_PATH/midl.exe"; then
1919 AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
1921 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1922 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
1923 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
1926 AC_PATH_PROG(CSC_PATH, csc.exe)
1927 if test -n "$CSC_PATH";then
1928 CSC_PATH=`dirname "$CSC_PATH"`
1930 if test -n "$with_csc_path";then
1931 with_csc_path=`cygpath -u "$with_csc_path"`
1933 if test -x "$with_csc_path/csc.exe"; then
1934 CSC_PATH="$with_csc_path"
1936 csctest=`./oowintool --csc-compilerdir`;
1937 if test -x "$csctest/csc.exe"; then
1941 if test ! -x "$CSC_PATH/csc.exe"; then
1942 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
1944 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1945 CSC_PATH=`cygpath -d "$CSC_PATH"`
1946 CSC_PATH=`cygpath -u "$CSC_PATH"`
1947 CSC="$CSC_PATH/csc.exe"
1948 AL="$CSC_PATH/al.exe"
1950 dnl Check mscoree.lib / .NET Frameworks dir
1951 dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
1952 AC_MSG_CHECKING(.NET Framework)
1953 if test -n "$with_frame_home"; then
1954 with_frame_home=`cygpath -u "$with_frame_home"`
1956 if test -f "$with_frame_home/lib/mscoree.lib"; then
1957 FRAME_HOME="$with_frame_home"
1959 if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
1960 FRAME_HOME="$with_cl_home/../SDK/v1.1"
1962 if test -z "$FRAME_HOME" ; then
1963 frametest=`./oowintool --dotnetsdk-dir`
1964 if test -f "$frametest/lib/mscoree.lib"; then
1965 FRAME_HOME="$frametest"
1967 frametest=`./oowintool --psdk-home`
1968 if test -f "$frametest/lib/mscoree.lib"; then
1969 FRAME_HOME="$frametest"
1973 if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
1974 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
1976 AC_MSG_RESULT(found)
1977 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1978 FRAME_HOME=`cygpath -d "$FRAME_HOME"`
1979 FRAME_HOME=`cygpath -u "$FRAME_HOME"`
1982 AC_SUBST(FRAME_HOME)
1984 if test "$_os" = "Linux"; then
1985 AC_MSG_CHECKING([whether to enable Mono bindings])
1989 if test "$enable_mono" != "no" ; then
1990 AC_MSG_RESULT([yes])
1991 if test "z$with_csc_path" != "z"; then
1992 if test -x "$with_csc_path/mcs"; then
1993 CSC_PATH="$with_csc_path"
1995 if test -x "$with_csc_path/bin/mcs"; then
1996 CSC_PATH="$with_csc_path/bin"
1999 if test "z$CSC_PATH" = "z"; then
2000 AC_PATH_PROG(MCS, mcs)
2001 test -z "$MCS" || CSC_PATH=`dirname $MCS`
2004 if test -x "$MCS" -a -x "$AL"; then
2005 MCS_VERSION=`$MCS --version | cut -d" " -f5`
2006 if test "`echo $MCS_VERSION | cut -d"." -f1`" -gt "1" || \
2007 test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
2008 "`echo $MCS_VERSION | cut -d"." -f2`" -ge "2" || \
2009 test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
2010 "`echo $MCS_VERSION | cut -d"." -f2`" = "1" -a \
2011 "`echo $MCS_VERSION | cut -d"." -f3`" -ge "8"; then
2014 AC_PATH_PROG(GMCS, gmcs, no)
2015 AC_PATH_PROG(MKBUNDLE2, mkbundle2, no)
2016 GMCS_VERSION=`$GMCS --version | cut -d" " -f5`
2017 if test "`echo $GMCS_VERSION | cut -d"." -f1`" -gt "1" || \
2018 test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
2019 "`echo $GMCS_VERSION | cut -d"." -f2`" -ge "3" || \
2020 test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
2021 "`echo $GMCS_VERSION | cut -d"." -f2`" = "2" -a \
2022 "`echo $GMCS_VERSION | cut -d"." -f3`" -ge "3"; then
2023 # mkbundle2 does not work on ppc, http://bugzilla.ximian.com/show_bug.cgi?id=81525
2024 if test "`uname -m`" != "ppc" -a "`uname -m`" != "ppc64" ; then
2025 ENABLE_MONO_CLIMAKER=YES
2026 AC_MSG_NOTICE([mono is up-to-date enough - building mono climaker])
2030 if test -n "$enable_mono" ; then
2031 AC_MSG_ERROR([no, mcs >= 1.1.8 is needed.])
2035 if test -n "$enable_mono"; then
2036 AC_MSG_ERROR([mcs or al not found. Make sure they're in the path or use --with-csc-path])
2039 PKG_CHECK_MODULES(MONO, mono >= 1.1.8)
2047 AC_SUBST(ENABLE_MONO)
2048 AC_SUBST(MONO_CFLAGS)
2050 AC_SUBST(ENABLE_MONO_CLIMAKER)
2052 dnl ===================================================================
2053 dnl Check if stdc headers are available excluding windows.
2054 dnl ===================================================================
2055 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2059 dnl ===================================================================
2060 dnl Find pre-processors.
2061 dnl ===================================================================
2062 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2065 dnl Check whether there's a C pre-processor.
2066 dnl ===================================================================
2067 dnl When using SunStudio compiler, there is a bug with the cc
2068 dnl preprocessor, so use CC preprocessor as the cc preprocessor
2069 dnl See Issuezilla #445.
2070 dnl ===================================================================
2071 if test "$_os" = "SunOS"; then
2078 AC_CHECK_SIZEOF(long)
2079 SIZEOF_LONG=$ac_cv_sizeof_long
2080 AC_SUBST(SIZEOF_LONG)
2082 WORDS_BIGENDIAN=$ac_cv_c_bigendian
2083 AC_SUBST(WORDS_BIGENDIAN)
2085 dnl Check for large file support
2087 if test -n "$ac_cv_sys_file_offset_bits"; then
2088 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
2090 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
2091 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
2093 AC_SUBST(LFS_CFLAGS)
2095 dnl ===================================================================
2096 dnl Check if we are to enable vba macro interoperability feature
2097 dnl ===================================================================
2098 AC_MSG_CHECKING([whether to disable vba feature])
2099 if test -n "$enable_vba" && test "$enable_vba" = "no"; then
2100 AC_MSG_RESULT([yes])
2106 AC_SUBST(ENABLE_VBA)
2108 if test "$ENABLE_VBA" = "YES"; then
2109 AC_MSG_CHECKING([how to package the vba compatibility api])
2110 if test -n "$with_vba_package_format"; then
2111 if test "$with_vba_package_format" = "extn"; then
2113 AC_MSG_RESULT([uno extension])
2114 AC_MSG_WARN([--with-vba-package-format=extn can cause problems])
2115 else if test "$with_vba_package_format" = "builtin"; then
2117 AC_MSG_RESULT([build into installset])
2119 AC_MSG_ERROR([unknown packaging method])
2125 AC_MSG_RESULT([defaulting to build into installset])
2130 AC_SUBST(VBA_EXTENSION)
2132 dnl ===================================================================
2133 dnl Check the whether vba need to be delivered as an uno package or part
2135 dnl ===================================================================
2138 dnl ===================================================================
2139 dnl Check if cups/cups.h is available
2140 dnl ===================================================================
2141 if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
2142 AC_CHECK_HEADER(cups/cups.h, [],
2143 [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
2146 dnl ===================================================================
2147 dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
2148 dnl ===================================================================
2149 if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
2150 AC_MSG_CHECKING([whether to enable pam support])
2151 if test -z "$enable_pam" || test "$enable_pam" != "no"; then
2152 AC_MSG_RESULT([yes])
2154 AC_CHECK_HEADER(security/pam_appl.h, [],
2155 [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
2156 AC_MSG_CHECKING([whether to link to libpam])
2157 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
2158 AC_MSG_RESULT([yes])
2160 AC_CHECK_LIB(pam, pam_start, [],
2161 [AC_MSG_ERROR(libpam not found or functional)], [])
2163 AC_MSG_RESULT([no, dynamically open it])
2170 dnl check getspnam_r for needed args (4 or 5)
2171 AX_FUNC_WHICH_GETSPNAM_R
2175 AC_SUBST(NEW_SHADOW_API)
2178 if test "$_os" = "Linux"; then
2179 AC_MSG_CHECKING([whether to link to libcrypt])
2180 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
2181 AC_MSG_RESULT([yes])
2183 AC_CHECK_LIB(crypt, crypt, [],
2184 [AC_MSG_ERROR(libcrypt not found or functional)], [])
2186 AC_MSG_RESULT([no, dynamically open it])
2190 AC_SUBST(CRYPT_LINK)
2192 dnl ===================================================================
2193 dnl Testing for c++ compiler and version...
2194 dnl ===================================================================
2195 if test -n "$with_gcc_home"; then
2196 if test -z "$CXX"; then
2197 CXX="$with_gcc_home/bin/g++"
2201 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2202 if test -e "$CC"; then
2207 dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
2208 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2212 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
2213 if test "$GXX" = "yes"; then
2214 AC_MSG_CHECKING([the GNU C++ compiler version])
2216 _gpp_version=`$CXX -dumpversion`
2217 _gpp_major=`echo $_gpp_version | $AWK -F. '{ print \$1 }'`
2218 _gpp_minor=`echo $_gpp_version | $AWK -F. '{ print \$2 }'`
2220 AC_MSG_RESULT([checked (g++ $_gpp_version)])
2222 if test "$_gpp_major" = "3"; then
2223 if test "$_gpp_minor" = "4"; then
2224 AC_MSG_CHECKING([whether $CXX has the enum bug])
2226 extern "C" void abort (void);
2227 extern "C" void exit (int status);
2229 enum E { E0, E1, E2, E3, E4, E5 };
2234 if (e == E2 || e == E3 || e == E1)
2246 ],[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])])
2251 dnl ===================================================================
2252 dnl Set the gcc/gxx include directories
2253 dnl ===================================================================
2254 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
2255 # often contains an i386 which is expanded as a macro. Solved in stlport.
2256 if test "$GXX" = "yes"; then
2257 AC_MSG_CHECKING([for g++ include path])
2258 if test -z "$with_gxx_include_path"; then
2259 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
2260 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
2261 with_gxx_include_path="/usr/include"
2263 if test "$WITH_MINGWIN" = "yes"; then
2264 with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
2265 with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
2267 if echo $with_gxx_include_path | grep -q linux; then
2268 # workaround for Mandriva - issue 100049
2269 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
2273 dnl This is the original code...
2274 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
2275 if test -z "$with_gxx_include_path"; then
2276 with_gxx_include_path="NO_GXX_INCLUDE"
2277 AC_MSG_RESULT([no g++ includes])
2279 AC_MSG_RESULT([$with_gxx_include_path])
2281 GXX_INCLUDE_PATH="$with_gxx_include_path"
2282 AC_SUBST(GXX_INCLUDE_PATH)
2284 dnl ===================================================================
2285 dnl Set the mingw runtime library include directories
2286 dnl ===================================================================
2287 if test "$WITH_MINGWIN" = "yes"; then
2288 AC_MSG_CHECKING([for mingwin runtime include path])
2289 cat >conftest.$ac_ext <<_ACEOF
2291 #include <bits/c++config.h>
2293 _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`
2295 if test -n "$_mingw_lib_include_path"; then
2297 for a in $_mingw_lib_include_path
2300 _temp="$_temp "`cygpath -u "$a"`
2302 _mingw_lib_include_path=$_temp
2304 if test -z "$_mingw_lib_include_path"; then
2305 _mingw_lib_include_path="NO_LIB_INCLUDE"
2306 AC_MSG_RESULT([no mingwin runtime includes])
2308 AC_MSG_RESULT([$_mingw_lib_include_path])
2310 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
2311 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
2312 dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map
2313 AC_MSG_CHECKING([for mingwin c++ backward include path])
2314 cat >conftest.$ac_ext <<_ACEOF
2317 _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`
2319 if test -n "$_mingw_backward_include_path"; then
2320 _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path`
2321 _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path`
2322 AC_MSG_RESULT([$_mingw_backward_include_path])
2324 _mingw_backward_include_path="NO_BACKWARD_INCLUDE"
2325 AC_MSG_RESULT([no mingwin c++ backward includes])
2327 MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path"
2328 AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH)
2329 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
2330 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
2331 AC_MSG_CHECKING([whether to use dynamic libgcc])
2332 if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then
2333 AC_MSG_CHECKING([dynamic libgcc name])
2334 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'`
2335 MINGW_GCCDLL=`cd $COMPATH && ls $MINGW_GCCDLL_pattern 2>/dev/null`
2336 if test -n "$MINGW_GCCDLL"; then
2337 MINGW_SHARED_GCCLIB=YES
2338 AC_MSG_RESULT([use $MINGW_GCCDLL])
2345 if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then
2348 AC_MSG_CHECKING([whether to use dynamic libstdc++])
2349 if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then
2350 AC_MSG_CHECKING([dynamic libstdc++ name])
2351 MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/libstdc++_s.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'`
2352 MINGW_GXXDLL=`cd $COMPATH && ls $MINGW_GXXDLL_pattern 2>/dev/null`
2353 if test -n "$MINGW_GXXDLL"; then
2354 MINGW_SHARED_GXXLIB=YES
2355 AC_MSG_RESULT([use $MINGW_GXXDLL])
2362 MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR`
2363 AC_SUBST(MINGW_CLIB_DIR)
2364 AC_SUBST(MINGW_SHARED_GCCLIB)
2365 AC_SUBST(MINGW_GCCLIB_EH)
2366 AC_SUBST(MINGW_SHARED_GXXLIB)
2367 AC_SUBST(MINGW_GCCDLL)
2368 AC_SUBST(MINGW_GXXDLL)
2371 dnl ===================================================================
2372 dnl Extra checking for the SUN OS compiler
2373 dnl ===================================================================
2374 if test "$_os" = "SunOS"; then
2375 dnl SunStudio C++ compiler packaged with SunStudio C compiler
2376 if test "$CC" = "cc"; then
2377 AC_MSG_CHECKING([SunStudio C++ Compiler])
2378 if test "$CXX" != "CC"; then
2379 AC_MSG_WARN([SunStudio C++ was not found])
2380 echo "SunStudio C++ was not found" >> warn
2382 AC_MSG_RESULT([checked])
2386 dnl ===================================================================
2387 dnl Extra checking for the DARWIN compiler
2388 dnl ===================================================================
2389 if test "$_os" = "Darwin"; then
2390 dnl c++ packaged with cc (gcc) for Macosx
2391 if test "$CC" = "cc"; then
2392 AC_MSG_CHECKING([Macosx c++ Compiler])
2393 if test "$CXX" != "c++"; then
2394 AC_MSG_WARN([Macosx C++ was not found])
2395 echo "Macosx C++ was not found" >> warn
2397 AC_MSG_RESULT([checked])
2401 dnl ===================================================================
2402 dnl Extra checking for the IRIX compiler
2403 dnl ===================================================================
2404 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2405 dnl MIPSpro C++ compiler packaged with MIPSpro C compiler
2406 if test "$CC" = "cc"; then
2407 AC_MSG_CHECKING([SGI MIPSpro C++ Compiler])
2408 if test "$CXX" != "CC"; then
2409 AC_MSG_WARN([SGI MIPSpro C++ was not found])
2410 echo "SGI MIPSpro C++ was not found" >> warn
2412 AC_MSG_RESULT([checked])
2416 dnl ===================================================================
2417 dnl Extra checking for the OSF compiler
2418 dnl ===================================================================
2419 if test "$_os" = "OSF1"; then
2420 AC_MSG_CHECKING([Compaq C++ compiler version])
2421 dnl cxx -V outputs to standard error!!!!
2422 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
2423 _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
2424 if test "$_compaqcxx_major" != "V6"; then
2425 AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
2426 echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
2428 dnl compiler will do
2429 AC_MSG_RESULT([checked])
2433 dnl *************************************************************
2434 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
2435 dnl *************************************************************
2436 AC_MSG_CHECKING([exception type])
2438 if test "$WITH_MINGWIN" = "yes"; then
2440 [#include <iostream>
2442 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
2445 [_Unwind_SjLj_RaiseException() ],
2446 [exceptions_type="sjlj"],
2447 [exceptions_type="dwarf2"]
2451 AC_MSG_RESULT($exceptions_type)
2453 EXCEPTIONS="$exceptions_type"
2454 AC_SUBST(EXCEPTIONS)
2456 dnl **************************************************************
2457 dnl Testing for required Solaris and SunStudio compiler patches...
2458 dnl **************************************************************
2459 dnl Check whether the OS is SunOS.
2460 if test "$_os" = "SunOS"; then
2461 _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
2462 if test "$_os_release" = "7"; then
2466 AC_MSG_CHECKING([for patch 106327-06 or greater])
2467 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
2471 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2472 if test "$_patch_major" = "106327"; then
2473 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2474 if test "$_patch_rev" -ge "6"; then
2479 if test "$_patch" = "found"; then
2480 AC_MSG_RESULT([found])
2482 AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
2483 echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
2488 AC_MSG_CHECKING([for patch 106950-11 or greater])
2489 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
2493 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2494 if test "$_patch_major" = "106950"; then
2495 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2496 if test "$_patch_rev" -ge "11"; then
2501 if test "$_patch" = "found"; then
2502 AC_MSG_RESULT([found])
2504 AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
2505 echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
2508 if test "$_os_release" = "6"; then
2512 AC_MSG_CHECKING([for patch 105591-09 or greater])
2513 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
2517 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2518 if test "$_patch_major" = "105591"; then
2519 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2520 if test "$_patch_rev" -ge "9"; then
2525 if test "$_patch" = "found"; then
2526 AC_MSG_RESULT([found])
2528 AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
2529 echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
2534 AC_MSG_CHECKING([for patch 107733-08 or greater])
2535 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
2539 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2540 if test "$_patch_major" = "107733"; then
2541 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2542 if test "$_patch_rev" -ge "8"; then
2547 if test "$_patch" = "found"; then
2548 AC_MSG_RESULT([found])
2550 AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
2551 echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
2557 dnl ===================================================================
2558 dnl Checks for SGI STL
2559 dnl ===================================================================
2560 if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then
2561 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2562 AC_MSG_CHECKING([for SGI STL])
2563 if test -d /usr/include/CC ; then
2564 AC_MSG_RESULT([yes.])
2567 AC_MSG_RESULT([not found.])
2570 AC_MSG_ERROR([Option --enable-sgistl is only valid for IRIX])
2574 dnl ===================================================================
2575 dnl Checks for what the default STL should be
2576 dnl ===================================================================
2577 AC_MSG_CHECKING([what the default STL should be])
2578 DEFAULT_TO_STLPORT="no"
2579 if test "$_os" = "Linux"; then
2580 case "$build_cpu" in
2582 DEFAULT_TO_STLPORT="yes"
2585 DEFAULT_TO_STLPORT="no"
2588 elif test "$_os" = "SunOS"; then
2589 DEFAULT_TO_STLPORT="yes"
2590 elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2591 DEFAULT_TO_STLPORT="yes"
2592 elif test "$_os" = "OS2"; then
2593 DEFAULT_TO_STLPORT="yes"
2594 elif test "$_os" = "FreeBSD"; then
2595 DEFAULT_TO_STLPORT="yes"
2597 if test "$DEFAULT_TO_STLPORT" = "yes"; then
2598 AC_MSG_RESULT([stlport])
2600 AC_MSG_RESULT([system])
2602 if test "$WITH_STLPORT" = "auto"; then
2603 WITH_STLPORT=$DEFAULT_TO_STLPORT
2606 dnl ===================================================================
2607 dnl Checks for STLPORT
2608 dnl ===================================================================
2609 AC_MSG_CHECKING([for STL providing headers])
2612 if test "$WITH_STLPORT" = "yes"; then
2613 AC_MSG_RESULT([using internal stlport.])
2614 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2615 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2616 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2618 elif test "$WITH_STLPORT" = "no"; then
2619 AC_MSG_RESULT([using system STL])
2620 USE_SYSTEM_STL="YES"
2621 if test "$DEFAULT_TO_STLPORT" != "no"; then
2622 AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
2623 echo "using system STL. Warning, breaks your ABI compatability!" >>warn
2626 STLPORT4=$WITH_STLPORT
2627 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2628 AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
2630 dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
2631 if test -f "$STLPORT4/stlport/hash_map"; then
2632 AC_MSG_RESULT([checked.])
2634 AC_MSG_ERROR([STLport headers not found.])
2637 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2638 AC_MSG_CHECKING([for STLport libraries])
2639 if test "$_os" = "SunOS"; then
2640 if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
2641 AC_MSG_RESULT([checked])
2642 elif test -f "$STLPORT4/lib/libstlport.so"; then
2643 AC_MSG_RESULT([checked])
2646 AC_MSG_ERROR([STLport libraries not found])
2648 elif test "$_os" = "Darwin"; then
2649 if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
2650 AC_MSG_RESULT([checked])
2651 elif test -f "$STLPORT4/lib/libstlport.dylib"; then
2652 AC_MSG_RESULT([checked])
2655 AC_MSG_ERROR([STLport libraries not found])
2657 elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2658 if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then
2659 AC_MSG_RESULT([checked])
2661 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2662 AC_MSG_RESULT([checked])
2663 elif test -f "$STLPORT4/lib/libstlport.so"; then
2664 AC_MSG_RESULT([checked])
2667 AC_MSG_ERROR([STLport libraries not found])
2671 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2672 AC_MSG_RESULT([checked])
2673 elif test -f "$STLPORT4/lib/libstlport.so"; then
2674 AC_MSG_RESULT([checked])
2677 AC_MSG_ERROR([STLport libraries not found])
2681 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2682 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2683 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2688 if test -z "$STLPORT4"; then
2689 STLPORT4="NO_STLPORT4"
2691 if test -z "$STLPORT_VER"; then
2695 AC_SUBST(STLPORT_VER)
2696 AC_SUBST(USE_SYSTEM_STL)
2698 dnl ===================================================================
2699 dnl visibility feature
2700 dnl ===================================================================
2701 if test "$GCC" = "yes"; then
2702 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
2704 CFLAGS="$CFLAGS -fvisibility=hidden"
2705 AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
2707 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2708 AC_MSG_RESULT([yes])
2714 dnl ===================================================================
2715 dnl system stl sanity tests
2716 dnl ===================================================================
2717 HAVE_GCC_VISIBILITY_BROKEN=
2718 if test "$USE_SYSTEM_STL" = "YES"; then
2719 AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
2722 AC_TRY_COMPILE([#include <ext/hash_map>
2723 using namespace __gnu_cxx;
2724 ],[hash_map<int, int> t; return 0;],
2725 ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
2727 if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
2728 AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
2730 AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
2733 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2734 AC_MSG_CHECKING([if STL headers are visibility safe])
2735 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
2736 AC_MSG_RESULT([$stlvisok])
2737 if test "$stlvisok" = "no"; then
2738 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
2739 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
2740 unset HAVE_GCC_VISIBILITY_FEATURE
2744 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2745 sharedlink_ldflags_save=$LDFLAGS
2746 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
2748 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
2749 AC_TRY_LINK([#include <sstream>
2750 using namespace std;
2751 ],[istringstream strm( "test" ); return 0;],
2752 $EGREP -q unresolvable conftest.err;
2753 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
2755 AC_MSG_RESULT([$gccvisok])
2756 if test "$gccvisok" = "no"; then
2757 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
2758 echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn
2759 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
2762 LDFLAGS=$sharedlink_ldflags_save
2765 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2766 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
2767 cat >visibility.cxx <<_ACEOF
2768 #pragma GCC visibility push(hidden)
2769 struct __attribute__ ((visibility ("default"))) TestStruct {
2772 __attribute__ ((visibility ("default"))) void TestFunc() {
2776 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
2779 if $EGREP -q '@PLT|\$stub' visibility.s; then
2787 AC_MSG_RESULT([$gccvisbroken])
2788 if test "$gccvisbroken" = "yes"; then
2789 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
2790 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
2791 unset HAVE_GCC_VISIBILITY_FEATURE
2798 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
2799 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
2801 dnl ===================================================================
2803 dnl ===================================================================
2804 AC_MSG_CHECKING([which memory allocator to use])
2805 if test "$with_alloc" = "system"; then
2806 AC_MSG_RESULT([system])
2808 AC_CHECK_FUNCS([malloc realloc calloc free])
2810 if test "$with_alloc" = "tcmalloc"; then
2811 AC_MSG_RESULT(tcmalloc)
2812 if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
2813 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
2815 AC_CHECK_LIB(tcmalloc, malloc, [],
2816 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
2819 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
2820 AC_MSG_RESULT([internal])
2824 dnl ===================================================================
2825 dnl Custom build version
2826 dnl ===================================================================
2828 AC_MSG_CHECKING([whether to add custom build version])
2829 if test "z$with_build_version" != "z"; then
2830 BUILD_VER_STRING=$with_build_version
2831 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
2836 AC_SUBST(BUILD_VER_STRING)
2838 dnl ===================================================================
2839 dnl Java support enable
2840 dnl ===================================================================
2841 AC_MSG_CHECKING([whether to build with Java support])
2842 if test "$WITH_JAVA" != "no"; then
2843 AC_MSG_RESULT([yes])
2849 AC_MSG_WARN([building without java will mean some features will not be available])
2850 echo "building without java will mean some features will not be available" >>warn
2852 AC_SUBST(SOLAR_JAVA)
2854 if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
2855 # IBMs JDK needs this...
2856 JITC_PROCESSOR_TYPE=6
2857 export JITC_PROCESSOR_TYPE
2860 if test "$_os" = "WINNT"; then
2861 if test -z "$with_jdk_home"; then
2862 _jdk_home=`./oowintool --jdk-home`
2863 if test -d "$_jdk_home"; then
2864 with_jdk_home="$_jdk_home"
2867 with_jdk_home=`cygpath -u "$with_jdk_home"`
2871 dnl ===================================================================
2873 dnl ===================================================================
2874 if test "$SOLAR_JAVA" != ""; then
2875 JAVA_HOME=; export JAVA_HOME
2876 if test -z "$with_jdk_home"; then
2877 AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
2879 _java_path="$with_jdk_home/bin/$WITH_JAVA"
2880 dnl Check if there is a java interpreter at all.
2881 if test -x "$_java_path"; then
2882 JAVAINTERPRETER=$_java_path
2884 AC_MSG_ERROR([$_java_path not found set with_jdk_home])
2887 if test "$_os" = "WINNT"; then
2888 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
2889 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
2891 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
2892 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
2896 dnl ===================================================================
2898 dnl ===================================================================
2899 if test "$SOLAR_JAVA" != ""; then
2901 AC_MSG_CHECKING([the installed JDK])
2902 if test -n "$JAVAINTERPRETER"; then
2903 dnl java -version sends output to stderr!
2904 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2905 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2906 # dnl Kaffe specific tests
2907 # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
2908 # if test -z "$KAFFE_VER"; then
2909 # AC_MSG_ERROR([looks like Kaffe but version detection failed])
2911 # _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2912 # if test "$_kaffe_ver" -lt 10100; then
2913 # AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
2917 # dnl TODO: define some project exclusion variables
2919 # AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
2920 # AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
2921 # echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
2922 # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2923 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
2925 AC_MSG_RESULT([checked (gcj)])
2926 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2927 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2929 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
2930 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2933 # dnl BEA JDK specific tests
2934 # _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2935 # _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2937 # if test "$_jdk_ver" -lt 10500; then
2938 # AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0])
2941 # AC_MSG_RESULT([checked (BEA JDK $_jdk)])
2943 # if test "$with_jdk_home" = ""; then
2944 # AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
2945 #you must use the "--with-jdk-home" configure option explicitly])
2948 # AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
2949 # echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
2951 # JAVA_HOME=$with_jdk_home
2953 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
2956 dnl IBM JDK specific tests
2957 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2958 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2960 if test "$_jdk_ver" -lt 10600; then
2961 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.6])
2964 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
2966 if test "$with_jdk_home" = ""; then
2967 AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
2968 you must use the "--with-jdk-home" configure option explicitly])
2971 JAVA_HOME=$with_jdk_home
2976 dnl SUN JDK specific tests
2977 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2978 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2980 if test "$_jdk_ver" -lt 10500; then
2981 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
2983 AC_MSG_RESULT([checked (JDK $_jdk)])
2984 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2985 if test "$_os" = "WINNT"; then
2986 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2988 if test "$_os" = "OS2"; then
2989 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2993 AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
2997 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
3000 _java_target_ver="1.5"
3001 dnl ===================================================================
3002 dnl Check for target java bytecode version
3003 dnl ===================================================================
3004 if test "$SOLAR_JAVA" != ""; then
3005 AC_MSG_CHECKING([for target java bytecode version])
3006 if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
3007 AC_MSG_RESULT([default by $JDK])
3008 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
3009 AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
3012 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
3013 _java_target_ver="$with_java_target_version"
3014 AC_MSG_RESULT([$_java_target_ver])
3015 elif test $_jdk_ver -gt 10000 ; then
3016 _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
3017 AC_MSG_RESULT([$_java_target_ver])
3019 AC_MSG_ERROR([Unable to guess java bytecode version from java version!])
3023 if ! test -z "$_java_target_ver" -o \
3024 "$_java_target_ver" = "1.1" -o \
3025 "$_java_target_ver" = "1.2" -o \
3026 "$_java_target_ver" = "1.3" -o \
3027 "$_java_target_ver" = "1.4" -o \
3028 "$_java_target_ver" = "1.5" -o \
3029 "$_java_target_ver" = "1.6" -o \
3030 "$_java_target_ver" = "5" ; then
3031 AC_MSG_ERROR([$_java_target_ver is not supported java bytecode version!])
3034 JAVA_SOURCE_VER="$_java_target_ver"
3035 JAVA_TARGET_VER="$_java_target_ver"
3038 dnl ===================================================================
3039 dnl Checks for javac
3040 dnl ===================================================================
3041 if test "$SOLAR_JAVA" != ""; then
3042 if test "$JDK" = "gcj"; then
3043 javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
3045 javacompiler="javac"
3047 if test "$_os" = "OS2"; then
3048 if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
3049 javacompiler="${javacompiler}.exe"
3052 if test -z "$with_jdk_home"; then
3053 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
3055 _javac_path="$with_jdk_home/bin/$javacompiler"
3056 dnl Check if there is a java compiler at all.
3057 if test -x "$_javac_path"; then
3058 JAVACOMPILER=$_javac_path
3061 if test -z "$JAVACOMPILER"; then
3062 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
3064 if test "$_os" = "WINNT"; then
3065 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
3066 JAVACOMPILER="${JAVACOMPILER}.exe"
3068 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
3069 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
3071 if test "$_os" = "OS2"; then
3072 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
3073 JAVACOMPILER="${JAVACOMPILER}.exe"
3077 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
3078 AC_MSG_CHECKING([re-checking JDK])
3080 AC_MSG_RESULT([checked (ecj)])
3081 #TODO: what's to do here? some switch to do 1.5 compiling?
3082 JAVAFLAGS="-source 1.5 -target 1.5"
3083 _gij_longver="50000"
3088 dnl ===================================================================
3089 dnl Checks that javac is gcj
3090 dnl ===================================================================
3091 if test "$SOLAR_JAVA" != ""; then
3092 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
3096 AC_SUBST(JAVACISGCJ)
3099 dnl ===================================================================
3100 dnl Checks that javac is kaffe
3101 dnl ===================================================================
3102 if test "$SOLAR_JAVA" != ""; then
3103 if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
3107 AC_SUBST(JAVACISKAFFE)
3109 dnl ===================================================================
3110 dnl Checks for javadoc
3111 dnl ===================================================================
3112 if test "$SOLAR_JAVA" != ""; then
3113 if test -z "$with_jdk_home"; then
3114 AC_PATH_PROG(JAVADOC, javadoc)
3116 _javadoc_path="$with_jdk_home/bin/javadoc"
3117 if test "$_os" = "OS2"; then
3118 if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
3119 _javadoc_path="${_javadoc_path}.exe"
3122 dnl Check if there is a javadoc at all.
3123 if test -x "$_javadoc_path"; then
3124 JAVADOC=$_javadoc_path
3126 AC_PATH_PROG(JAVADOC, javadoc)
3129 if test -z "$JAVADOC"; then
3130 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
3132 if test "$_os" = "WINNT"; then
3133 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
3134 JAVADOC="${JAVADOC}.exe"
3136 JAVADOC=`cygpath -d "$JAVADOC"`
3137 JAVADOC=`cygpath -u "$JAVADOC"`
3139 if test "$_os" = "OS2"; then
3140 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
3141 JAVADOC="${JAVADOC}.exe"
3146 if test "$SOLAR_JAVA" != ""; then
3147 dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
3148 if test "$JDK" == "gcj" -a -z "$JAVA_HOME"; then
3149 if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "50000"; then
3150 cat > findhome.java <<_ACEOF
3151 [import java.io.File;
3155 public static void main(String args[])
3157 String jrelocation = System.getProperty("java.home");
3158 File jre = new File(jrelocation);
3159 System.out.println(jre.getParent());
3163 AC_MSG_CHECKING([if javac works])
3164 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
3165 AC_TRY_EVAL(javac_cmd)
3166 if test $? = 0 && test -f ./findhome.class ; then
3167 AC_MSG_RESULT([javac works])
3169 echo "configure: javac test failed" >&5
3170 cat findhome.java >&5
3171 AC_MSG_ERROR([javac does not work - java projects will not build!])
3174 AC_MSG_CHECKING([if gij knows its java.home])
3175 JAVA_HOME=`$JAVAINTERPRETER findhome`
3176 if test $? = 0 && test "$JAVA_HOME" != "" ; then
3177 AC_MSG_RESULT([$JAVA_HOME])
3179 echo "configure: java test failed" >&5
3180 cat findhome.java >&5
3181 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
3184 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
3188 dnl second sanity check JAVA_HOME if possible
3189 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "50000"; then
3190 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
3191 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
3193 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
3194 # try to recover first by looking whether we have a alternatives
3195 # system as in Debian or newer SuSEs where following /usr/bin/javac
3196 # over /etc/alternatives/javac leads to the right bindir where we
3197 # just need to strip a bit away to get a valid JAVA_HOME
3198 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
3199 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
3200 # maybe only one level of symlink (e.g. on Mac)
3201 JAVA_HOME=$(readlink $JAVACOMPILER)
3204 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
3205 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
3206 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
3207 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
3209 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
3210 if test "$JAVA_HOME" != "/usr"; then
3211 if test "$_os" = "Darwin"; then
3212 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
3213 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
3214 dnl Tiger already returns a JDK path..
3215 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
3217 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
3221 # now check if $JAVA_HOME is really valid
3222 if test "$_os" = "Darwin"; then
3223 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
3226 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
3229 if test "$JAVA_HOME_OK" = "NO"; then
3230 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
3231 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
3232 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
3233 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
3234 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
3235 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
3236 # if test "$JDK" == "gcj"; then
3237 # 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
3244 if test "$SOLAR_JAVA" != ""; then
3245 AC_MSG_CHECKING([for jawt lib name])
3246 if test "$JDK" = "gcj"; then
3248 save_LDFLAGS=$LDFLAGS
3249 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3250 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
3251 exec 6>/dev/null # no output
3252 AC_CHECK_HEADER(jni.h, [],
3253 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
3254 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
3255 exec 6>&1 # output on again
3257 LDFLAGS=$save_LDFLAGS
3259 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
3260 # A workaround is to link also against libpmawt.so
3261 if test "$JDK" = "ibm" ; then
3263 save_LDFLAGS=$LDFLAGS
3264 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
3265 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3266 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
3267 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
3268 export LD_LIBRARY_PATH
3269 exec 6>/dev/null # no output
3270 AC_CHECK_HEADER(jni.h, [],
3271 [AC_MSG_ERROR([jni.h could not be found.])], [])
3272 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
3273 if test -z "$AWTLIB"; then
3274 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
3275 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
3277 exec 6>&1 # output on again
3279 LDFLAGS=$save_LDFLAGS
3280 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
3282 if test -z "$AWTLIB"; then
3285 AC_MSG_RESULT([$AWTLIB])
3289 dnl ===================================================================
3290 dnl Check for optional gcj for AOT
3291 dnl ===================================================================
3292 if test "$SOLAR_JAVA" != ""; then
3293 AC_MSG_CHECKING([whether to enable gcj aot compilation])
3294 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
3295 AC_MSG_RESULT([yes])
3296 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
3299 gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
3301 AC_MSG_RESULT([$gcjaot])
3302 if test -n "$with_jdk_home"; then
3303 _javac_path="$with_jdk_home/bin/$gcjaot"
3304 dnl Check if there is a gcj at all.
3305 if test -x "$_javac_path"; then
3306 JAVAAOTCOMPILER=$_javac_path
3309 if test -z "$JAVAAOTCOMPILER"; then
3310 AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
3312 if test -z "$JAVAAOTCOMPILER"; then
3313 AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
3323 AC_SUBST(JAVA_SOURCE_VER)
3324 AC_SUBST(JAVA_TARGET_VER)
3325 AC_SUBST(JAVAINTERPRETER)
3326 AC_SUBST(JAVACOMPILER)
3327 AC_SUBST(JAVAAOTCOMPILER)
3330 dnl ===================================================================
3331 dnl Checks for specific files.
3332 dnl ===================================================================
3334 dnl ===================================================================
3335 dnl Checks for programs.
3336 dnl ===================================================================
3338 dnl ===================================================================
3339 dnl Check whether we already have dmake
3340 dnl ===================================================================
3341 AC_PATH_PROG(DMAKE, dmake, no)
3342 if test "$DMAKE" = "no"; then
3344 echo "dmake will be built on ./bootstrap"
3346 AC_MSG_CHECKING([whether the found dmake is the right dmake])
3347 # we need to find out whether that dmake we found is "our" dmake
3348 # or the dmake from Sun's SunStudio Compiler which is something
3350 # This test _should_ work because the one accepts -V (ours) and one
3351 # (the other) not...
3352 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3353 if test $? -eq 0; then
3355 AC_MSG_RESULT([yes])
3356 AC_MSG_CHECKING([the dmake version])
3357 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3358 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3359 AC_MSG_RESULT([OK, >= 4.11])
3360 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3361 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3362 AC_MSG_RESULT([OK, >= 4.11])
3364 AC_MSG_RESULT([too old. >= 4.11 is needed])
3365 echo "A newer dmake will be built on ./bootstrap"
3370 echo "dmake will be built on ./bootstrap"
3374 AC_SUBST(BUILD_DMAKE)
3376 AC_MSG_CHECKING([whether to enable EPM for packing])
3377 if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -o "$enable_epm" != "no" \) ; then
3378 AC_MSG_RESULT([yes])
3379 dnl ===================================================================
3380 dnl Check for epm - not needed for windows
3381 dnl ===================================================================
3382 if test "$_os" != "WINNT"; then
3383 if test -n "$with_epm"; then
3386 AC_PATH_PROG(EPM, epm, no)
3388 if test "$EPM" = "no" || test "$EPM" = "internal"; then
3389 echo "EPM will be built."
3391 BUILD_TYPE="$BUILD_TYPE EPM"
3393 # Gentoo has some epm which is something different...
3394 AC_MSG_CHECKING([whether the found epm is the right epm])
3395 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
3396 AC_MSG_RESULT([yes])
3398 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
3400 AC_MSG_CHECKING([epm version])
3401 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
3402 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
3403 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
3404 AC_MSG_RESULT([OK, >= 3.7])
3406 if test "$_os" = "Darwin"; then
3407 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
3408 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
3409 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3410 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)])
3411 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3412 AC_MSG_RESULT([$_pm, ok])
3413 else # we never should get here, but go safe
3414 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)])
3418 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
3419 echo "EPM will be built."
3421 BUILD_TYPE="$BUILD_TYPE EPM"
3426 # test which package format to use
3427 AC_MSG_CHECKING([which package format to use])
3428 # epm supports the following formats:
3429 # aix - AIX software distribution
3430 # bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3431 # depot or swinstall - HP-UX software distribution
3432 # deb - Debian software distribution
3433 # inst or tardist - IRIX software distribution
3434 # osx - MacOS X software distribution
3435 # pkg - Solaris software distribution
3436 # rpm - RedHat software distribution
3437 # setld - Tru64 (setld) software distribution
3438 # native - "Native" software distribution for the platform
3439 # portable - Portable software distribution
3453 # if building on Debian, default should be deb...
3454 if test -e /etc/debian_version; then
3472 # we never should get here since we check the arciecture/os at the beginning,
3475 AC_MSG_ERROR([unknown system])
3477 if test -n "$with_package_format"; then
3478 for i in $with_package_format; do
3480 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable)
3483 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
3484 aix - AIX software distribution
3485 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3486 depot or swinstall - HP-UX software distribution
3487 deb - Debian software distribution
3488 inst or tardist - IRIX software distribution
3489 osx - MacOS X software distribution
3490 pkg - Solaris software distribution
3491 rpm - RedHat software distribution
3492 setld - Tru64 (setld) software distribution
3493 native - "Native" software distribution for the platform
3494 portable - Portable software distribution
3499 PKGFORMAT="$with_package_format"
3501 AC_MSG_RESULT([$PKGFORMAT])
3502 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
3503 AC_MSG_CHECKING([for rpm])
3504 for a in "$RPM" rpmbuild rpm; do
3505 $a --usage >/dev/null 2> /dev/null
3506 if test $? -eq 0; then
3510 $a --version >/dev/null 2> /dev/null
3511 if test $? -eq 0; then
3517 if test -z "$RPM" ; then
3518 AC_MSG_ERROR([not found])
3520 RPM_PATH=`which $RPM`
3521 AC_MSG_RESULT([$RPM_PATH])
3524 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
3525 AC_PATH_PROG(DPKG, dpkg, no)
3526 if test "$DPKG" = "no"; then
3527 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
3530 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
3531 if test "$_os" = "Darwin"; then
3532 AC_MSG_CHECKING([for PackageMaker availability])
3533 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
3534 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
3539 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
3542 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
3543 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3544 if test "$EPM" != "no" && test "$EPM" != "internal"; then
3545 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
3546 AC_MSG_CHECKING([whether epm is patched for OOos needs])
3547 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
3548 AC_MSG_RESULT([yes])
3551 if echo "$PKGFORMAT" | grep -q rpm; then
3553 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
3554 echo "the rpms will need to be installed with --nodeps" >> warn
3558 AC_MSG_WARN([the ${_pt}s will not be relocateable])
3559 echo "the ${_pt}s will not be relocateable" >> warn
3560 AC_MSG_WARN([if you want to make sure installation without --nodeps and
3561 relocation will work, you need to patch your epm with the
3562 patch in epm/epm-3.7.patch or build with
3563 --with-epm=internal which will build a suitable epm])
3568 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3569 AC_PATH_PROG(PKGMK, pkgmk, no)
3570 if test "$PKGMK" = "no"; then
3571 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
3585 dnl ===================================================================
3587 dnl ===================================================================
3588 AC_PATH_PROG(GPERF, gperf)
3589 if test -z "$GPERF"; then
3590 AC_MSG_ERROR([gperf not found but needed. Install it.])
3592 AC_MSG_CHECKING([gperf version])
3593 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
3596 AC_MSG_ERROR([too old, you need at least 3.0.0])
3599 dnl ===================================================================
3600 dnl Check for building stax
3601 dnl ===================================================================
3602 AC_MSG_CHECKING([whether to build the stax])
3603 if test -f "external/StAX/jsr173_1.0_api.jar"; then
3605 AC_MSG_RESULT([no, will use the prebuilt external/StAX/jsr173_1.0_api.jar])
3608 AC_MSG_RESULT([yes])
3610 AC_SUBST(BUILD_STAX)
3612 dnl ===================================================================
3613 dnl Check for building ODK
3614 dnl ===================================================================
3615 AC_MSG_CHECKING([whether to build the ODK])
3616 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
3617 AC_MSG_RESULT([yes])
3618 if test "$WITH_JAVA" != "no"; then
3619 AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
3620 if ! test -f "./external/unowinreg/unowinreg.dll"; then
3621 HAVE_UNOWINREG_DLL=no
3623 HAVE_UNOWINREG_DLL=yes
3625 if test "$HAVE_UNOWINREG_DLL" = "yes"; then
3626 AC_MSG_RESULT([found])
3629 if test "$_os" = "WINNT"; then
3630 AC_MSG_RESULT([not found, will be built])
3632 AC_MSG_WARN([not found, will be cross-built using mingw32])
3636 if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
3637 if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
3638 AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
3639 Specify mingw32 g++ executable name with --with-mingwin.
3640 Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
3641 put it into external/unowinreg])
3643 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3644 if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
3646 AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
3648 if test "$MINGWCXX" = "false"; then
3649 AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
3651 AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
3652 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
3657 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3658 if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/)); fi
3660 AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/`, false)
3662 if test "$MINGWSTRIP" = "false"; then
3663 AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
3669 CXXCPP="$MINGWCXX -E"
3670 save_CXXFLAGS=$CXXFLAGS
3671 save_CPPFLAGS=$CPPFLAGS
3672 CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
3673 CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
3674 # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
3675 # do not make sense here (and 'd make the check fail)
3678 AC_HAVE_LIBRARY(kernel32)
3679 AC_HAVE_LIBRARY(advapi32)
3680 AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
3681 CXXFLAGS=$save_CXXFLAGS
3682 CPPFLAGS=$save_CPPFLAGS
3689 BUILD_TYPE="$BUILD_TYPE ODK"
3694 AC_SUBST(BUILD_UNOWINREG)
3696 AC_SUBST(MINGWSTRIP)
3698 dnl ===================================================================
3699 dnl Check for building qadevOOo
3700 dnl ===================================================================
3701 AC_MSG_CHECKING([whether to build qadevOOo])
3702 if test "z$enable_qadevooo" = "z" -o "$enable_qadevooo" != "no"; then
3703 AC_MSG_RESULT([yes])
3704 BUILD_QADEVOOO="YES"
3705 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
3710 AC_SUBST(BUILD_QADEVOOO)
3712 dnl ===================================================================
3713 dnl Check for prelinked libgcc_s.so.1
3714 dnl ===================================================================
3715 if test -z "$with_system_stdlibs" -a -z "$with_system_libs"; then
3716 if test -n "$checkforprelink" -a -f /etc/rpm/macros.prelink; then
3717 with_system_stdlibs=yes
3718 AC_MSG_WARN([prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override])
3719 echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn
3723 dnl ===================================================================
3724 dnl Check for system stdlibs
3725 dnl ===================================================================
3726 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
3727 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
3728 test "$with_system_stdlibs" != "no"; then
3732 AC_MSG_RESULT([yes])
3735 AC_SUBST(SYSTEM_STDLIBS)
3737 dnl ===================================================================
3738 dnl Check for system zlib
3739 dnl ===================================================================
3740 if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
3741 with_system_zlib=yes
3743 AC_MSG_CHECKING([which zlib to use])
3744 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
3745 test "$with_system_zlib" != "no"; then
3746 AC_MSG_RESULT([external])
3748 AC_CHECK_HEADER(zlib.h, [],
3749 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
3750 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
3751 [AC_MSG_ERROR(zlib not found or functional)], [])
3753 AC_MSG_RESULT([internal])
3755 BUILD_TYPE="$BUILD_TYPE ZLIB"
3757 AC_SUBST(SYSTEM_ZLIB)
3759 dnl ===================================================================
3760 dnl Check for system jpeg
3761 dnl ===================================================================
3762 AC_MSG_CHECKING([which jpeg to use])
3763 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
3764 test "$with_system_jpeg" != "no"; then
3765 AC_MSG_RESULT([external])
3767 AC_CHECK_HEADER(jpeglib.h, [],
3768 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
3769 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
3770 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
3772 AC_MSG_RESULT([internal])
3774 BUILD_TYPE="$BUILD_TYPE JPEG"
3776 AC_SUBST(SYSTEM_JPEG)
3778 dnl ===================================================================
3779 dnl Check for system expat
3780 dnl ===================================================================
3781 AC_MSG_CHECKING([which expat to use])
3782 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
3783 test "$with_system_expat" != "no"; then
3784 AC_MSG_RESULT([external])
3786 AC_CHECK_HEADER(expat.h, [],
3787 [AC_MSG_ERROR(expat.h not found. install expat)], [])
3788 AC_CHECK_LIB(expat, XML_ParserCreate, [],
3789 [AC_MSG_RESULT(expat library not found or functional.)], [])
3791 AC_MSG_RESULT([internal])
3793 BUILD_TYPE="$BUILD_TYPE EXPAT"
3795 AC_SUBST(SYSTEM_EXPAT)
3797 dnl ===================================================================
3798 dnl Check for system libwpd
3799 dnl ===================================================================
3800 AC_MSG_CHECKING([which libwpd to use])
3801 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
3802 test "$with_system_libwpd" != "no"; then
3803 AC_MSG_RESULT([external])
3805 PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
3807 AC_MSG_RESULT([internal])
3809 BUILD_TYPE="$BUILD_TYPE LIBWPD"
3811 AC_SUBST(SYSTEM_LIBWPD)
3812 AC_SUBST(LIBWPD_CFLAGS)
3813 AC_SUBST(LIBWPD_LIBS)
3815 dnl ===================================================================
3816 dnl Check whether freetype is available
3817 dnl ===================================================================
3818 if test "$test_freetype" = "yes"; then
3819 AC_MSG_CHECKING([whether freetype is available])
3820 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
3822 AC_SUBST(FREETYPE_CFLAGS)
3823 AC_SUBST(FREETYPE_LIBS)
3825 dnl ===================================================================
3826 dnl Check for system libwps
3827 dnl ===================================================================
3828 AC_MSG_CHECKING([which libwps to use])
3829 if test -n "$with_system_libwps" -o -n "$with_system_libs" && \
3830 test "$with_system_libwps" != "no"; then
3831 AC_MSG_RESULT([external])
3833 PKG_CHECK_MODULES( LIBWPS, libwps-0.1 )
3835 AC_MSG_RESULT([internal])
3837 BUILD_TYPE="$BUILD_TYPE LIBWPS"
3839 AC_SUBST(SYSTEM_LIBWPS)
3840 AC_SUBST(LIBWPS_CFLAGS)
3841 AC_SUBST(LIBWPS_LIBS)
3843 dnl ===================================================================
3844 dnl Check for system libwpg
3845 dnl ===================================================================
3846 AC_MSG_CHECKING([which libwpg to use])
3847 if test -n "$with_system_libwpg" -o -n "$with_system_libs" && \
3848 test "$with_system_libwpg" != "no"; then
3849 AC_MSG_RESULT([external])
3851 PKG_CHECK_MODULES( LIBWPG, libwpg-0.1 )
3853 AC_MSG_RESULT([internal])
3855 BUILD_TYPE="$BUILD_TYPE LIBWPG"
3857 AC_SUBST(SYSTEM_LIBWPG)
3858 AC_SUBST(LIBWPG_CFLAGS)
3859 AC_SUBST(LIBWPG_LIBS)
3861 dnl ===================================================================
3862 dnl Check whether freetype2 supports emboldening
3863 dnl ===================================================================
3864 if test "$test_freetype" = "yes"; then
3865 save_CPPFLAGS="$CPPFLAGS"
3866 save_LDFLAGS="$LDFLAGS"
3868 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
3869 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
3870 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
3871 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
3872 LDFLAGS="$save_LDFLAGS"
3873 CPPFLAGS="$save_CPPFLAGS"
3876 AC_SUBST(USE_FT_EMBOLDEN)
3878 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
3879 test "$with_system_libxslt" != "no"; then
3880 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
3881 test "$with_system_libxml" == "no"; then
3882 # somehow AC_MSG_WARN won't work...
3883 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
3884 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
3885 with_system_libxml=yes
3888 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
3889 test "$with_system_libxml" != "no"; then
3890 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
3891 test "$with_system_libxslt" == "no"; then
3892 # somehow AC_MSG_WARN won't work...
3893 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
3894 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
3895 with_system_libxslt=yes
3899 dnl ===================================================================
3900 dnl Check for system libxslt
3901 dnl ===================================================================
3902 AC_MSG_CHECKING([which libxslt to use])
3903 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
3904 "$_os" = "Darwin" && \
3905 test "$with_system_libxslt" != "no"; then
3906 AC_MSG_RESULT([external])
3909 PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
3911 dnl Check for xsltproc
3912 AC_PATH_PROG(XSLTPROC, xsltproc, no)
3913 if test "$XSLTPROC" = "no"; then
3914 AC_MSG_ERROR([xsltproc is required])
3917 AC_MSG_RESULT([internal])
3919 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
3921 AC_SUBST(SYSTEM_LIBXSLT)
3922 AC_SUBST(LIBXSLT_CFLAGS)
3923 AC_SUBST(LIBXSLT_LIBS)
3926 dnl ===================================================================
3927 dnl Check for system libxml
3928 dnl ===================================================================
3929 AC_MSG_CHECKING([which libxml to use])
3930 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
3931 "$_os" = "Darwin" && \
3932 test "$with_system_libxml" != "no"; then
3933 AC_MSG_RESULT([external])
3935 PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
3936 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
3938 AC_MSG_RESULT([internal])
3940 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
3942 AC_SUBST(SYSTEM_LIBXML)
3943 AC_SUBST(LIBXML_CFLAGS)
3944 AC_SUBST(LIBXML_LIBS)
3946 dnl ===================================================================
3947 dnl Check for system python
3948 dnl ===================================================================
3949 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
3950 with_system_python=yes
3952 AC_MSG_CHECKING([which python to use])
3953 if test -n "$with_system_python" -o -n "$with_system_libs" && \
3954 test "$with_system_python" != "no"; then
3956 AC_MSG_RESULT([external])
3957 AM_PATH_PYTHON([2.2])
3959 python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
3960 python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
3961 PYTHON_CFLAGS="-I$python_include"
3963 if test "$_os" = "Darwin"; then
3964 PYTHON_LIBS="-framework Python"
3966 PYTHON_LIBS="-lpython$python_version"
3969 dnl check if the headers really work:
3970 save_CPPFLAGS="$CPPFLAGS"
3971 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
3972 AC_CHECK_HEADER(Python.h, [],
3973 [AC_MSG_ERROR(Python headers not found)], [])
3974 CPPFLAGS="$save_CPPFLAGS"
3977 BUILD_TYPE="$BUILD_TYPE PYTHON"
3978 AC_MSG_RESULT([internal])
3979 # Embedded python dies without Home set
3980 if test "z$HOME" = "z"; then
3983 # bz2 tarball and bzip2 is not standard
3984 if test -z "$BZIP2"; then
3985 AC_PATH_PROG( BZIP2, bzip2)
3986 if test -z "$BZIP2"; then
3987 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
3991 AC_SUBST(SYSTEM_PYTHON)
3992 AC_SUBST(PYTHON_CFLAGS)
3993 AC_SUBST(PYTHON_LIBS)
3994 HOME=`echo $HOME | sed 's:\\\\:/:g'`
3997 dnl ===================================================================
3998 dnl Check for system berkley db
3999 dnl ===================================================================
4000 AC_MSG_CHECKING([which db to use])
4001 if test -n "$with_system_db" -o -n "$with_system_libs" && \
4002 test "$with_system_db" != "no"; then
4004 AC_MSG_RESULT([external])
4005 AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
4007 CFLAGS=-I/usr/include/db4
4008 AC_CHECK_HEADER(db4/db.h,
4009 [ DB_INCLUDES=/usr/include/db4 ],
4010 [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
4013 AC_MSG_CHECKING([whether db is at least 4.1])
4014 for v in `seq 1 8`; do
4018 int main(int argc, char **argv) {
4019 if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0;
4022 ], [DB_VERSION_MINOR=$v], [])
4024 if test "$DB_VERSION_MINOR" -gt "1"; then
4026 DB_VERSION=4.$DB_VERSION_MINOR
4028 AC_MSG_ERROR([no. you need at least db 4.1])
4031 #AC_CHECK_LIB(db, db_create, [],
4032 # [AC_MSG_ERROR([db library not installed or functional])], [])
4033 AC_HAVE_LIBRARY(db, [],
4034 [AC_MSG_ERROR([db not installed or functional])], [])
4035 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
4037 AC_MSG_RESULT([internal])
4039 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
4042 AC_SUBST(DB_VERSION)
4043 AC_SUBST(DB_INCLUDES)
4046 dnl ===================================================================
4047 dnl Check for system lucene
4048 dnl ===================================================================
4049 AC_MSG_CHECKING([which lucene to use])
4050 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
4051 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
4052 AC_MSG_RESULT([external])
4054 if test -z $LUCENE_CORE_JAR; then
4055 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
4056 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
4058 AC_CHECK_FILE(/usr/share/java/lucene.jar,
4059 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
4060 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
4065 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
4066 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
4069 if test -z $LUCENE_ANALYZERS_JAR; then
4070 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
4071 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
4073 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
4074 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
4075 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
4080 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
4081 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
4084 AC_MSG_RESULT([internal])
4086 BUILD_TYPE="$BUILD_TYPE LUCENE"
4088 AC_SUBST(SYSTEM_LUCENE)
4089 AC_SUBST(LUCENE_CORE_JAR)
4090 AC_SUBST(LUCENE_ANALYZERS_JAR)
4092 dnl ===================================================================
4093 dnl Check for system hsqldb
4094 dnl ===================================================================
4095 AC_MSG_CHECKING([which hsqldb to use])
4096 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
4097 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
4098 AC_MSG_RESULT([external])
4100 if test -z $HSQLDB_JAR; then
4101 HSQLDB_JAR=/usr/share/java/hsqldb.jar
4103 AC_CHECK_FILE($HSQLDB_JAR, [],
4104 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
4105 AC_MSG_CHECKING([whether hsqldb is >= 1.8.0.9])
4107 if $PERL -e 'use Archive::Zip;
4108 my $file = "$ENV{'HSQLDB_JAR'}";
4109 my $zip = Archive::Zip->new( $file );
4110 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
4111 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
4112 push @l, split(/\n/, $mf);
4113 foreach my $line (@l) {
4114 if ($line =~ m/Specification-Version:/) {
4115 ($t, $version) = split (/:/,$line);
4116 $version =~ s/^\s//;
4117 ($a, $b, $c, $d) = split (/\./,$version);
4118 if (($c == "0" && $d > "8") || $c > 0) {
4128 AC_MSG_RESULT([yes])
4130 AC_MSG_ERROR([no, hsqldb >= 1.8.0.9 is needed])
4133 AC_MSG_RESULT([internal])
4135 BUILD_TYPE="$BUILD_TYPE HSQLDB"
4137 AC_SUBST(SYSTEM_HSQLDB)
4138 AC_SUBST(HSQLDB_JAR)
4140 dnl ===================================================================
4141 dnl Check for PostgreSQL stuff
4142 dnl ===================================================================
4143 AC_PATH_PROG(PGCONFIG, pg_config)
4144 if test -z "$PGCONFIG"; then
4145 AC_MSG_ERROR([pg_config needed])
4149 CFLAGS="-I`pg_config --includedir`"
4150 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
4151 AC_HAVE_LIBRARY(pq, [], [AC_MSG_ERROR(libpq is needed)], [])
4154 SYSTEM_POSTGRESQL=YES # only option atm :-)
4155 AC_SUBST(SYSTEM_POSTGRESQL)
4157 dnl ===================================================================
4158 dnl Check for system beanshell
4159 dnl ===================================================================
4160 AC_MSG_CHECKING([which beanshell to use])
4161 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
4162 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
4163 AC_MSG_RESULT([external])
4165 if test -z $BSH_JAR; then
4166 BSH_JAR=/usr/share/java/bsh.jar
4168 AC_CHECK_FILE($BSH_JAR, [],
4169 [AC_MSG_ERROR(bsh.jar not found.)], [])
4171 AC_MSG_RESULT([internal])
4173 BUILD_TYPE="$BUILD_TYPE BSH"
4175 AC_SUBST(SYSTEM_BSH)
4179 dnl ===================================================================
4180 dnl Check for system saxon
4181 dnl ===================================================================
4182 AC_MSG_CHECKING([which saxon to use])
4183 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
4184 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
4185 AC_MSG_RESULT([external])
4187 if test -z $SAXON_JAR; then
4188 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4189 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4191 AC_CHECK_FILE(/usr/share/java/saxon.jar,
4192 [ SAXON_JAR=/usr/share/java/saxon.jar ],
4193 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4194 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4195 [ AC_MSG_ERROR(saxon.jar replacement not found)]
4202 AC_CHECK_FILE($SAXON_JAR, [],
4203 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
4205 if test -n "$SERIALIZER_JAR"; then
4206 AC_CHECK_FILE($SERIALIZER_JAR, [],
4207 [AC_MSG_ERROR(serializer.jar not found.)], [])
4208 AC_SUBST(SERIALIZER_JAR)
4211 AC_MSG_RESULT([internal])
4215 AC_SUBST(SYSTEM_SAXON)
4218 if test -n "$NEED_SAXON"; then
4219 BUILD_TYPE="$BUILD_TYPE SAXON"
4222 dnl ===================================================================
4223 dnl Check for system curl
4224 dnl ===================================================================
4225 if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
4226 with_system_curl=yes
4228 AC_MSG_CHECKING([which curl to use])
4229 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
4230 test "$with_system_curl" != "no"; then
4231 AC_MSG_RESULT([external])
4234 AC_PATH_PROG( CURLCONFIG, curl-config)
4235 if test -z "$CURLCONFIG"; then
4236 AC_MSG_ERROR([install curl to run this script])
4239 # check curl version
4240 AC_MSG_CHECKING([whether curl is >= 7.9.8])
4241 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
4242 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "9" -a \
4243 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "8"; then
4244 AC_MSG_ERROR([no, you need at least curl 7.9,8])
4246 AC_MSG_RESULT([yes])
4248 CURL_LIBS=`$CURLCONFIG --libs`
4249 CURL_CFLAGS=`$CURLCONFIG --cflags`
4251 AC_MSG_RESULT([internal])
4253 BUILD_TYPE="$BUILD_TYPE CURL"
4255 AC_SUBST(SYSTEM_CURL)
4256 AC_SUBST(CURL_CFLAGS)
4259 dnl ===================================================================
4260 dnl Check for system boost
4261 dnl ===================================================================
4262 AC_MSG_CHECKING([which boost to use])
4263 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
4264 test "$with_system_boost" != "no"; then
4265 AC_MSG_RESULT([external])
4268 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
4269 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
4270 AC_CHECK_HEADER(boost/spirit/core.hpp, [],
4271 [AC_MSG_ERROR(boost/spirit/core.hpp not found. install boost)], [])
4274 AC_MSG_RESULT([internal])
4275 BUILD_TYPE="$BUILD_TYPE BOOST"
4278 AC_SUBST(SYSTEM_BOOST)
4280 dnl ===================================================================
4281 dnl Check for system vigra
4282 dnl ===================================================================
4283 AC_MSG_CHECKING([which vigra to use])
4284 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
4285 test "$with_system_vigra" != "no"; then
4286 AC_MSG_RESULT([external])
4289 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
4290 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
4293 AC_MSG_RESULT([internal])
4294 BUILD_TYPE="$BUILD_TYPE VIGRA"
4297 AC_SUBST(SYSTEM_VIGRA)
4299 dnl ===================================================================
4300 dnl Check for system odbc
4301 dnl ===================================================================
4302 AC_MSG_CHECKING([which odbc headers to use])
4303 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
4304 test "$with_system_odbc_headers" != "no"; then
4305 AC_MSG_RESULT([external])
4306 SYSTEM_ODBC_HEADERS=YES
4308 AC_CHECK_HEADER(sqlext.h, [],
4309 [AC_MSG_ERROR(odbc not found. install odbc)], [])
4311 AC_MSG_RESULT([internal])
4312 SYSTEM_ODBC_HEADERS=NO
4313 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
4315 AC_SUBST(SYSTEM_ODBC_HEADERS)
4317 AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components])
4318 if test "$enable_mozilla" = "no"; then
4321 ENABLE_NSS_MODULE=NO
4323 AC_MSG_RESULT([yes])
4326 AC_SUBST(WITH_MOZILLA)
4328 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
4329 if test "$enable_mozilla" = "no"; then
4331 elif test "$with_system_mozilla" = "yes"; then
4332 AC_MSG_RESULT([no, not possible with system-mozilla])
4334 AC_MSG_RESULT([yes])
4337 AC_MSG_CHECKING([whether to build XML Security support])
4338 if test "$enable_mozilla" = "no"; then
4339 AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
4341 AC_MSG_RESULT([yes])
4344 AC_MSG_CHECKING([whether to build LDAP configuration backend])
4345 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
4346 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
4347 AC_MSG_RESULT([yes])
4350 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
4358 if test "$WITH_LDAP" = "YES"; then
4359 dnl ===================================================================
4360 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
4361 dnl ===================================================================
4362 AC_MSG_CHECKING([which LDAP SDK to use])
4363 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
4364 AC_MSG_RESULT([OpenLDAP])
4366 AC_CHECK_HEADERS(ldap.h, [],
4367 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
4368 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
4369 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4370 # rumours say that OpenLDAP doesn't have that function. I looked and
4371 # it has it. Test for it to be sure
4372 AC_CHECK_LIB(ldap, ldap_set_option, [],
4373 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4375 AC_MSG_RESULT([Netscape/Mozilla])
4376 # TODO. Actually do a sanity check and check for
4377 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
4382 AC_SUBST(WITH_OPENLDAP)
4384 dnl ===================================================================
4385 dnl Check for system mozilla
4386 dnl ===================================================================
4387 AC_MSG_CHECKING([which mozilla to use])
4388 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
4389 AC_MSG_RESULT([external])
4391 ENABLE_NSS_MODULE=NO
4392 enable_nss_module=no
4393 AC_MSG_CHECKING([which Mozilla flavour to use])
4394 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
4396 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
4397 MOZ_FLAVOUR=xulrunner
4398 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
4399 MOZ_FLAVOUR=seamonkey
4400 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
4402 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
4407 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
4410 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
4411 if test -z "$STANDALONENSS"; then
4412 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
4414 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
4418 if $PKG_CONFIG --exists nspr ; then
4419 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
4420 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
4423 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
4426 if test "$MOZ_FLAVOUR" != "libxul"; then
4427 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
4428 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
4429 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
4432 if test -z "$HASXPCOM"; then
4433 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
4434 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
4435 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
4436 if ! test -e "$MOZ_LIB/libxul.so"; then
4437 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
4438 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
4439 MOZ_LIB="$MOZ_LIB/sdk/lib"
4444 save_CPPFLAGS="$CPPFLAGS"
4445 save_LDFLAGS="$LDFLAGS"
4447 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
4448 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
4449 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
4450 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
4451 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
4452 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
4453 LDFLAGS="$save_LDFLAGS"
4454 CPPFLAGS="$save_CPPFLAGS"
4457 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
4458 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
4459 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
4460 if test -d "$MOZ_INC/ldap"; then
4461 AC_MSG_RESULT([yes])
4462 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
4465 Could not find LDAP header include files in $MOZ_INC/ldap.
4466 Please recompile $tmp with --enable-ldap or use --with-openldap.])
4470 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
4471 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
4472 if test "$MOZ_FLAVOUR" == "libxul"; then
4473 MOZ_FLAVOUR="mozilla"
4476 elif test "$enable_mozilla" = "no"; then
4477 AC_MSG_RESULT([none])
4479 ENABLE_NSS_MODULE=NO
4480 enable_nss_module=no
4482 AC_MSG_RESULT([internal])
4484 BUILD_TYPE="$BUILD_TYPE MOZ"
4485 if test -z "$with_mozilla_version"; then
4488 AC_MSG_CHECKING([which mozilla version to build])
4489 MOZILLA_VERSION=$with_mozilla_version
4490 enable_build_mozilla=1
4491 AC_MSG_RESULT([$MOZILLA_VERSION])
4494 AC_SUBST(MOZILLA_VERSION)
4496 AC_MSG_CHECKING([for toolkit mozilla should use])
4497 if test -z "$with_mozilla_toolkit"; then
4498 if test "$_os" != "WINNT" ; then
4499 if test "$_os" = "Darwin" ; then
4501 AC_MSG_RESULT([mac])
4503 MOZILLA_TOOLKIT=gtk2
4504 AC_MSG_RESULT([gtk2])
4508 MOZILLA_TOOLKIT=$with_mozilla_toolkit
4509 enable_build_mozilla=1
4510 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
4512 #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then
4513 # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not
4514 # #available using fink, mac (carbon) doesn't work because xcode installs conflicting headers
4515 # AC_MSG_ERROR([Only gtk2 toolkit supported on Mac, sorry.])
4518 AC_SUBST(MOZILLA_TOOLKIT)
4520 # default to enabling build mozilla
4521 if test "$enable_build_mozilla" != "no"; then
4522 enable_build_mozilla=yes
4524 enable_build_mozilla=
4527 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
4528 if test -n "$enable_build_mozilla"; then
4530 AC_MSG_RESULT([yes])
4536 AC_MSG_CHECKING([whether to build provided NSS module])
4537 if test "$enable_nss_module" != "no"; then
4538 ENABLE_NSS_MODULE="YES"
4539 BUILD_TYPE="$BUILD_TYPE NSS"
4540 AC_MSG_RESULT([yes])
4541 if test "$_os" = "WINNT"; then
4542 AC_MSG_CHECKING([for Mozilla build tooling])
4543 if test -z "$MOZILLABUILD" ; then
4544 AC_MSG_ERROR([Mozilla build tooling not found. Use --with-mozilla-build=<absolut path to mozilla build tooling (mozilla-build)>])
4546 if test \( "$WITH_MINGWIN" = "yes" \) ; then
4547 if test ! -d "$MOZILLABUILD" ; then
4548 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4553 if test ! -d "$MOZILLABUILD/moztools" \
4554 -o ! -d "$MOZILLABUILD/msys" ; then
4555 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4563 ENABLE_NSS_MODULE="NO"
4567 if test "$BUILD_MOZAB" = "TRUE"; then
4568 if test "$_os" = "WINNT"; then
4569 if test "$WITH_MINGWIN" != "yes"; then
4570 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
4571 if test "$MSVSVER" != "2005"; then
4572 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
4575 AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
4576 echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
4580 if test -z "$MOZILLA_VERSION"; then
4581 MOZILLA_VERSION=1.1.14
4583 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
4585 AC_MSG_CHECKING([for $MOZILLA_SOURCE_VERSION.tar.$e])
4586 if test ! -e "moz/download/$MOZILLA_SOURCE_VERSION.tar.$e" && test "$HAVE_MOZILLA_TARBALL" != "y"; then
4587 AC_MSG_RESULT([not found])
4588 HAVE_MOZILLA_TARBALL=n
4590 AC_MSG_RESULT([found])
4591 HAVE_MOZILLA_TARBALL=y
4594 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
4595 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
4596 Please copy $MOZILLA_SOURCE_VERSION.tar.bz2 or $MOZILLA_SOURCE_VERSION.tar.gz to moz/download/.
4597 The archives can be found here:
4598 ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/$MOZILLA_VERSION/])
4600 if test "$_os" = "WINNT"; then
4601 AC_MSG_CHECKING([for moztools binaries])
4602 if test ! -e "moz/download/vc8-moztools.zip" ; then
4603 AC_MSG_ERROR([The following file is missing in moz/download: 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.]))
4684 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
4685 if test -z "$SYSTEM_GENBRK"; then
4686 AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
4688 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
4689 if test -z "$SYSTEM_GENCCODE"; then
4690 AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
4692 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
4693 if test -z "$SYSTEM_GENCMN"; then
4694 AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
4696 AC_MSG_CHECKING([ICU version])
4698 #include <unicode/uversion.h>
4700 int main(int argc, char **argv) {
4701 if(U_ICU_VERSION_MAJOR_NUM < 4)
4706 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])])
4709 AC_MSG_RESULT([internal])
4711 BUILD_TYPE="$BUILD_TYPE ICU"
4713 AC_SUBST(SYSTEM_ICU)
4714 AC_SUBST(SYSTEM_GENBRK)
4715 AC_SUBST(SYSTEM_GENCCODE)
4716 AC_SUBST(SYSTEM_GENCMN)
4718 dnl ===================================================================
4720 dnl ===================================================================
4722 AC_MSG_CHECKING([whether to enable graphite support])
4723 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" == "z" -o "$enable_graphite" != "no" ; then
4724 AC_MSG_RESULT([yes])
4725 ENABLE_GRAPHITE="TRUE"
4726 AC_MSG_CHECKING([which graphite to use])
4727 if test -n "$with_system_graphite" -o -n "$with_system_libs" && \
4728 test "$with_system_graphite" != "no"; then
4729 AC_MSG_RESULT([external])
4731 PKG_CHECK_MODULES( GRAPHITE, silgraphite )
4732 AC_MSG_CHECKING([STL compatibility])
4733 if test "$WITH_STLPORT" != "no"; then
4734 AC_MSG_ERROR([to use system graphite you need to use --without-stlport])
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 AC_CHECK_LIB(Xaw, main, [],
4852 [AC_MSG_ERROR(Xaw library not found or functional)], [])
4855 AC_SUBST(DISABLE_XAW)
4859 dnl ===================================================================
4860 dnl Check if fontconfig/fontconfig.h is available
4861 dnl ===================================================================
4862 if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
4863 AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
4864 [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
4865 AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
4867 #include <fontconfig/fontconfig.h>
4869 int main(int argc, char **argv) {
4870 if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
4873 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
4876 dnl ===================================================================
4877 dnl Check for system Xrender
4878 dnl ===================================================================
4879 AC_MSG_CHECKING([whether to link to Xrender])
4880 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
4881 AC_MSG_RESULT([yes])
4883 with_system_xrender_headers=yes
4885 AC_MSG_RESULT([no, dynamically open it])
4888 AC_MSG_CHECKING([which Xrender headers to use])
4889 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
4890 test "$with_system_xrender_headers" != "no"; then
4891 AC_MSG_RESULT([external])
4892 SYSTEM_XRENDER_HEADERS=YES
4893 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
4894 [AC_MSG_ERROR(Xrender not found. install X)], [])
4896 AC_MSG_RESULT([internal])
4897 SYSTEM_XRENDER_HEADERS=NO
4898 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
4900 if test "$XRENDER_LINK" = "YES"; then
4901 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
4902 [AC_MSG_ERROR(libXrender not found or functional)], [])
4904 AC_SUBST(SYSTEM_XRENDER_HEADERS)
4905 AC_SUBST(XRENDER_LINK)
4907 dnl ===================================================================
4908 dnl Check for XRandr
4909 dnl ===================================================================
4910 AC_MSG_CHECKING([whether to enable RandR support])
4911 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
4912 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
4913 XRANDR_DLOPEN="TRUE"
4914 AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
4916 XRANDR_DLOPEN="FALSE"
4917 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
4918 if test "$ENABLE_RANDR" != "TRUE"; then
4919 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
4920 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
4922 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
4923 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
4924 XRANDR_LIBS="-lXrandr "
4926 AC_MSG_RESULT([enabling RandR support])
4933 AC_SUBST(XRANDR_DLOPEN)
4934 AC_SUBST(XRANDR_CFLAGS)
4935 AC_SUBST(XRANDR_LIBS)
4936 AC_SUBST(ENABLE_RANDR)
4938 dnl ===================================================================
4939 dnl Check for system Mesa
4940 dnl ===================================================================
4941 AC_MSG_CHECKING([which Mesa headers to use])
4942 if test "$with_system_mesa_headers" == "no"; then
4943 AC_MSG_RESULT([internal])
4944 SYSTEM_MESA_HEADERS=NO
4945 BUILD_TYPE="$BUILD_TYPE MESA"
4947 AC_MSG_RESULT([external])
4948 SYSTEM_MESA_HEADERS=YES
4950 AC_SUBST(SYSTEM_MESA_HEADERS)
4952 dnl ===================================================================
4953 dnl Check for building neon
4954 dnl ===================================================================
4955 AC_MSG_CHECKING([whether to use neon])
4956 if test "$enable_neon" = "no"; then
4959 AC_SUBST(DISABLE_NEON)
4961 AC_MSG_RESULT([yes])
4962 dnl ===================================================================
4963 dnl Check for system neon
4964 dnl ===================================================================
4965 AC_MSG_CHECKING([which neon to use])
4966 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
4967 test "$with_system_neon" != "no"; then
4968 AC_MSG_RESULT([external])
4969 PKG_CHECK_MODULES(NEON, neon >= 0.24.0, , AC_MSG_ERROR([you need neon >= 0.24.x for system-neon]))
4970 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
4971 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
4974 AC_MSG_RESULT([internal])
4978 BUILD_TYPE="$BUILD_TYPE NEON"
4980 dnl ===================================================================
4981 dnl Check for system openssl (only neon needs it!)
4982 dnl ===================================================================
4983 if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
4984 with_system_openssl=yes
4986 AC_MSG_CHECKING([which libssl to use])
4987 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
4988 test "$with_system_openssl" != "no"; then
4989 AC_MSG_RESULT([external])
4990 # Mac OS builds should get out without extra stuff is the Mac porters'
4991 # wish. And pkg-config is although Xcode ships a .pc for openssl
4992 if test "$_os" = "Darwin"; then
4994 OPENSSL_LIBS="-lssl -lcrypto"
4996 PKG_CHECK_MODULES( OPENSSL, openssl )
5000 AC_MSG_RESULT([internal])
5002 BUILD_TYPE="$BUILD_TYPE OPENSSL"
5004 AC_SUBST(SYSTEM_OPENSSL)
5005 AC_SUBST(OPENSSL_CFLAGS)
5006 AC_SUBST(OPENSSL_LIBS)
5008 AC_SUBST(SYSTEM_NEON)
5009 AC_SUBST(NEON_VERSION)
5011 AC_SUBST(NEON_CFLAGS)
5014 dnl ===================================================================
5015 dnl Test for disabling agg
5016 dnl ===================================================================
5017 AC_MSG_CHECKING([whether to enable agg])
5018 if test "$with_agg" = "no"; then
5021 AC_MSG_RESULT([yes])
5023 AC_SUBST(ENABLE_AGG)
5025 dnl ===================================================================
5026 dnl Check for system AGG
5027 dnl ===================================================================
5028 AC_MSG_CHECKING([which AGG to use])
5029 if test -n "$with_system_agg" -o -n "$with_system_libs" && \
5030 test "$with_system_agg" != "no"; then
5031 AC_MSG_RESULT([external])
5032 PKG_CHECK_MODULES(AGG, libagg >= 2.3)
5033 AC_MSG_CHECKING([agg version])
5034 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
5035 # (/usr/include gets stripped from pkg-config output)
5036 if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
5037 AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
5039 AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
5041 if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
5042 $PKG_CONFIG --modversion libagg | grep -q 2.4; then
5043 # 2.4's libagg.pc.in still contains 2.3 :/
5044 if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
5045 AC_MSG_RESULT([2.4])
5048 AC_MSG_RESULT([2.3])
5053 AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
5056 AC_MSG_RESULT([internal])
5059 BUILD_TYPE="$BUILD_TYPE AGG"
5061 AC_SUBST(SYSTEM_AGG)
5062 AC_SUBST(AGG_VERSION)
5065 dnl ===================================================================
5066 dnl Check for system redland
5067 dnl ===================================================================
5068 AC_MSG_CHECKING([which redland library to use])
5069 dnl if test -n "$with_system_redland" -o -n "$with_system_libs" && \
5070 dnl test "$with_system_redland" != "no"; then
5071 dnl mst: NOTE: right now we need patches against redland
5072 dnl so we only enable system redland if explicitly requested
5073 dnl if next version includes patches, insert version check here
5074 if test -n "$with_system_redland" && \
5075 test "$with_system_redland" != "no"; then
5076 AC_MSG_RESULT([external])
5078 PKG_CHECK_MODULES(REDLAND, redland)
5080 AC_MSG_RESULT([internal])
5081 BUILD_TYPE="$BUILD_TYPE REDLAND"
5084 AC_SUBST(SYSTEM_REDLAND)
5085 AC_SUBST(REDLAND_LIBS)
5087 dnl ===================================================================
5088 dnl Check for system hunspell
5089 dnl ===================================================================
5090 AC_MSG_CHECKING([which libhunspell to use])
5091 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
5092 test "$with_system_hunspell" != "no"; then
5093 AC_MSG_RESULT([external])
5096 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
5097 if test "$HUNSPELL_PC" != "TRUE"; then
5098 AC_CHECK_HEADER(hunspell.hxx, [],
5100 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
5101 [AC_MSG_ERROR(hunspell headers not found.)], [])
5103 AC_CHECK_LIB(hunspell, main, [],
5104 [ AC_MSG_ERROR(hunspell library not found.) ], [])
5105 HUNSPELL_LIBS=-lhunspell
5109 AC_MSG_RESULT([internal])
5111 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
5113 AC_SUBST(SYSTEM_HUNSPELL)
5114 AC_SUBST(HUNSPELL_CFLAGS)
5115 AC_SUBST(HUNSPELL_LIBS)
5117 dnl ===================================================================
5118 dnl Checking for altlinuxhyph
5119 dnl ===================================================================
5120 AC_MSG_CHECKING([which altlinuxhyph to use])
5121 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
5122 test "$with_system_altlinuxhyph" != "no"; then
5123 AC_MSG_RESULT([external])
5125 AC_CHECK_HEADER(hyphen.h, [],
5126 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
5127 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
5128 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
5129 [#include <hyphen.h>])
5130 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
5131 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5132 if test -z "$HYPHEN_LIB"; then
5133 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
5134 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5136 if test -z "$HYPHEN_LIB"; then
5137 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
5138 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5141 AC_MSG_RESULT([internal])
5144 AC_SUBST(SYSTEM_HYPH)
5145 AC_SUBST(HYPHEN_LIB)
5147 dnl ===================================================================
5148 dnl Checking for mythes
5149 dnl ===================================================================
5150 AC_MSG_CHECKING([which mythes to use])
5151 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
5152 AC_MSG_RESULT([external])
5154 AC_CHECK_HEADER(mythes.hxx, [],
5155 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
5156 AC_CHECK_LIB(mythes, main, [],
5157 [ AC_MSG_ERROR(mythes library not found.)], [])
5159 AC_MSG_RESULT([internal])
5162 AC_SUBST(SYSTEM_MYTHES)
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 AC_CHECK_LIB(lpsolve55, make_lp, ,
5175 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
5177 AC_MSG_RESULT([internal])
5179 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
5181 AC_SUBST(SYSTEM_LPSOLVE)
5183 dnl ***************************************
5184 dnl testing libc version for Linux...
5185 dnl ***************************************
5186 if test "$_os" = "Linux"; then
5187 AC_MSG_CHECKING([whether libc is >= 2.1.1])
5188 exec 6>/dev/null # no output
5189 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
5190 exec 6>&1 # output on again
5191 if test "$HAVE_LIBC"; then
5192 AC_MSG_RESULT([yes])
5194 AC_MSG_ERROR([no, upgrade libc])
5198 dnl =========================================
5199 dnl Check for the Microsoft Platform SDK.
5200 dnl =========================================
5201 dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
5202 dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
5203 if test \( "$_os" = "WINNT" \) ; then
5204 AC_MSG_CHECKING([for PSDK files])
5205 if test -z "$with_psdk_home"; then
5206 # This first line will detect a February 2003 Microsoft Platform SDK
5207 PSDK_HOME=`./oowintool --psdk-home`
5208 # But there might be also an April 2005 PSDK, unfortunately MS changed
5209 # the registry entry. (we prefer the old version!?)
5210 if test -z "$PSDK_HOME"; then
5211 PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
5213 # normalize if found
5214 if test -n "$PSDK_HOME"; then
5215 PSDK_HOME=`cygpath -d "$PSDK_HOME"`
5216 PSDK_HOME=`cygpath -u "$PSDK_HOME"`
5219 PSDK_HOME=`cygpath -u "$with_psdk_home"`
5221 # Remove a possible trailing backslash
5222 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
5223 # Problem with current PSDK (iz 49865)
5224 if test -f "$PSDK_HOME/Lib/libcp.lib"; then
5227 Some modules do not build correctly with MS Platform SDK - April 2005
5228 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
5229 Remove/rename/backup that file and restart configure. Details about this
5230 problem can be found in issue 49856.])
5232 # WIndows SDK has different headers
5233 if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
5234 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
5235 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
5240 if test -f "$PSDK_HOME/lib/unicows.lib"; then
5245 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
5246 AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
5247 are installed or use --with-psdk-home .])
5249 if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
5250 -o ! -x "$PSDK_HOME/bin/msidb.exe" \
5251 -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
5252 -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
5253 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
5255 AC_MSG_RESULT([SDK files found ...)])
5256 dnl Check if this is the right SDK.
5257 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
5258 AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
5259 WINDOWS_VISTA_PSDK=TRUE
5260 elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
5261 AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
5262 WINDOWS_VISTA_PSDK=TRUE
5263 elif echo $PSDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
5264 AC_MSG_RESULT([Found Windows SDK 7 ($PSDK_HOME)])
5265 WINDOWS_VISTA_PSDK=TRUE
5267 AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
5271 AC_SUBST(WINDOWS_VISTA_PSDK)
5273 dnl =========================================
5274 dnl Check for the Microsoft DirectX SDK.
5275 dnl =========================================
5276 if test \( "$_os" = "WINNT" \) ; then
5277 AC_MSG_CHECKING([for DirectX SDK files])
5278 if test -z "$with_directx_home"; then
5279 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
5280 if test -n "$DXSDK_DIR"; then
5281 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
5282 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
5284 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
5285 # the "DirectX SDK files not found" error later
5287 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
5289 # Remove a possible trailing backslash
5290 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
5292 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
5293 HAVE_DIRECTXSDK_H="yes"
5295 HAVE_DIRECTXSDK_H="no"
5297 # MS changed the location of the libraries with dec 2004 directx sdk
5298 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
5299 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
5301 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
5303 if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
5304 HAVE_DIRECTXSDK_LIB="yes"
5306 HAVE_DIRECTXSDK_LIB="no"
5308 if test -n "$ENABLE_DIRECTX"; then
5309 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
5310 AC_MSG_RESULT([found])
5312 AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
5316 AC_MSG_RESULT([disabled])
5319 AC_SUBST(DIRECTXSDK_HOME)
5320 AC_SUBST(DIRECTXSDK_LIB)
5322 dnl ============================================
5323 dnl Check for Nullsoft Scriptable Install System
5324 dnl ============================================
5326 if test "$_os" = "WINNT" ; then
5327 AC_MSG_CHECKING([for NSIS])
5328 AC_PATH_PROG(NSIS_PATH, nsis.exe)
5329 if test -n "$NSIS_PATH"; then
5330 NSIS_PATH=`dirname "$NSIS_PATH"`
5332 if test -n "$with_nsis_path"; then
5333 with_nsis_path=`cygpath -u "$with_nsis_path"`
5335 if test -e "$with_nsis_path/nsis.exe"; then
5336 NSIS_PATH="$with_nsis_path"
5338 nsistest=`./oowintool --nsis-dir`;
5339 if test -x "$nsistest/nsis.exe"; then
5340 NSIS_PATH="$nsistest"
5342 if test -z "$NSIS_PATH"; then
5343 AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
5344 echo "NSIS not found, no self contained installer will be build." >> warn
5346 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5347 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5348 AC_MSG_RESULT([found ($NSIS_PATH)])
5353 dnl ***************************************
5354 dnl testing bison and flex exist
5355 dnl ***************************************
5356 AC_PATH_PROG(BISON, bison)
5357 if test -z "$BISON"; then
5358 AC_MSG_ERROR([no bison found in \$PATH, install bison])
5360 AC_MSG_CHECKING([the bison version])
5361 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
5362 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
5363 # Accept newer than 1.875 or older(equal) than 1.75
5364 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
5365 if test "$_bison_version" = "1.875" ; then
5366 AC_MSG_WARN([suspect ($BISON $_bison_version)])
5367 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
5369 AC_MSG_RESULT([checked ($BISON $_bison_version)])
5372 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
5375 AC_PATH_PROG(FLEX, flex)
5376 if test -z "$FLEX"; then
5377 AC_MSG_ERROR([no flex found in \$PATH, install flex])
5379 dnl ***************************************
5380 dnl testing that patch exists
5381 dnl ***************************************
5382 AC_PATH_PROG(PATCH, patch)
5383 if test -z "$PATCH"; then
5384 AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
5387 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
5388 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
5389 if test -z "$with_gnu_patch"; then
5392 if test -x "$with_gnu_patch"; then
5393 GNUPATCH=$with_gnu_patch
5395 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
5399 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
5400 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5401 AC_MSG_RESULT([yes])
5403 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
5406 dnl We also need to check for --with-gnu-cp
5408 if test -z "$with_gnu_cp"; then
5409 AC_PATH_PROGS(GNUCP, gnucp cp)
5410 if test -z $GNUCP; then
5411 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
5414 if test -x "$with_gnu_cp"; then
5417 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
5421 AC_MSG_CHECKING([whether $GNUCP is GNU cp])
5422 if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5423 AC_MSG_RESULT([yes])
5425 if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
5426 AC_MSG_RESULT([yes])
5428 if test "$_os" = "Darwin"; then
5430 AC_MSG_RESULT([no gnucp found - using the system's cp command])
5432 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
5441 dnl ***************************************
5442 dnl testing bash tools path on Windows
5443 dnl ***************************************
5444 if test "$_os" = "WINNT"; then
5446 AC_PATH_PROG(CYGWIN_PATH, bash)
5447 CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
5449 if test -z "$CYGWIN_PATH"; then
5450 CYGWIN_PATH="NO_CYGWIN"
5452 AC_SUBST(CYGWIN_PATH)
5454 dnl ***************************************
5455 dnl testing ml.exe assembler path
5456 dnl ***************************************
5457 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5458 AC_MSG_CHECKING([ml.exe assembler path])
5459 if test -n "$with_asm_home"; then
5460 with_asm_home=`cygpath -u "$with_asm_home"`
5462 if test ! -x "$with_asm_home/ml.exe"; then
5463 AC_PATH_PROG(ML_EXE, ml.exe)
5464 if test -z "$ML_EXE"; then
5465 if test -x "$with_cl_home/bin/ml.exe"; then
5466 with_asm_home=$with_cl_home/bin
5467 AC_MSG_RESULT([found ($with_asm_home)])
5469 AC_MSG_ERROR([Configure did not find ml.exe assembler.])
5472 with_asm_home="ASM_IN_PATH"
5476 with_asm_home="NO_ASM_HOME"
5478 ASM_HOME="$with_asm_home"
5479 if test -n "$ASM_HOME"; then
5480 AC_MSG_RESULT([$ASM_HOME])
5484 dnl ===================================================================
5485 dnl testing handle deprecated unzip switch
5486 dnl ===================================================================
5487 if test -z "$with_zip_home"; then
5488 with_zip_home="$with_unzip_home"
5490 dnl ===================================================================
5491 dnl Zip will be found where you tell me to find it
5492 dnl ===================================================================
5493 if test -n "$with_zip_home" ; then
5494 if test "$_os" = "WINNT"; then
5495 with_zip_home=`cygpath -u "$with_zip_home"`
5497 ZIP="$with_zip_home/zip"
5498 UNZIP="$with_zip_home/unzip"
5499 ZIP_HOME="$with_zip_home"
5501 AC_PATH_PROG(ZIP, zip)
5502 AC_PATH_PROG(UNZIP, unzip)
5503 ZIP_HOME=`dirname "$ZIP"`
5505 dnl ===================================================================
5506 dnl Zip must be available or else it is an error, all platforms
5507 dnl ===================================================================
5508 if test -z "$ZIP" -o -z "$UNZIP"; then
5509 AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
5512 dnl ===================================================================
5513 dnl Zip must be a specific type for different build types.
5514 dnl ===================================================================
5515 if test "$_os" = "WINNT"; then
5516 if test "$with_use_shell" = "4nt" ; then
5517 if test -z "`$ZIP -h | grep -i WinNT`" ; then
5518 AC_MSG_ERROR([$ZIP found in the path is not the required native Windows Version 2.3 of Info-ZIPs zip.exe.
5519 Probably there is a cygwin version in the path.])
5522 if test -n "`$ZIP -h | grep -i WinNT`" ; then
5523 AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
5529 dnl ===================================================================
5530 dnl Windows builds need unicows.dll in external/unicows/
5531 dnl ===================================================================
5532 if test "$_os" = "WINNT"; then
5533 AC_MSG_CHECKING([for unicows.dll])
5534 if test -x ./external/unicows/unicows.dll; then
5535 AC_MSG_RESULT([found])
5537 AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
5538 Get it from the Microsoft site and put it into external/unicows.
5539 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5540 may have to search Microsoft's website.) Last time it was seen at:
5541 <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
5545 dnl ===================================================================
5546 dnl Windows builds need dbghelp.dll in external/dbghelp/
5547 dnl ===================================================================
5548 if test "$_os" = "WINNT"; then
5549 AC_MSG_CHECKING([for dbghelp.dll])
5550 if test -x ./external/dbghelp/dbghelp.dll; then
5551 AC_MSG_RESULT([found])
5553 AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
5554 Get it from the Microsoft site and put it into external/dbghelp.
5555 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5556 may have to search Microsoft's website.) Last time it was seen at:
5557 <http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
5561 dnl ===================================================================
5562 dnl Windows builds - use oowintool to copy CRT dlls and manifest
5563 dnl ===================================================================
5564 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5565 if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
5568 AC_MSG_ERROR([oowintool failed to copy CRT])
5572 dnl ===================================================================
5573 dnl Windows builds need gdiplus.dll in external/gdiplus/
5574 dnl ===================================================================
5575 if test "$_os" = "WINNT"; then
5576 AC_MSG_CHECKING([for gdiplus.dll])
5577 if test -x ./external/gdiplus/gdiplus.dll; then
5578 AC_MSG_RESULT([found])
5580 AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
5581 Get it from the Microsoft site and put it into external/gdiplus.
5582 You may have to search Microsoft's website. Last time it was seen at:
5583 <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
5587 dnl ===================================================================
5588 dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
5589 dnl ===================================================================
5590 if test "$_os" = "WINNT"; then
5591 ./oowintool --msvc-copy-instmsi ./external/msi
5594 dnl ===================================================================
5595 dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
5596 dnl ===================================================================
5597 if test "$_os" = "WINNT"; then
5598 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
5599 AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
5600 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
5601 AC_MSG_RESULT([found])
5603 MSIAPATH=`/bin/find "$COMPATH/../.." -iname instmsia.exe | head -n 1`
5604 MSIWPATH=`/bin/find "$COMPATH/../.." -iname instmsiw.exe | head -n 1`
5605 if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
5606 cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
5607 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
5609 if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
5610 AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
5611 These programs are part of the Visual Studio installation and should be found in a
5612 directory similar to:
5613 "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
5614 As the automatic detection fails please copy the files to external/msi/.])
5616 AC_MSG_RESULT([found and copied])
5622 dnl ===================================================================
5623 dnl Test which vclplugs have to be built.
5624 dnl ===================================================================
5625 AC_MSG_CHECKING([which VCLplugs shall be built])
5627 if test "x$enable_gtk" = "xyes"; then
5631 AC_SUBST(ENABLE_GTK)
5634 if test "x$enable_kde" = "xyes"; then
5638 AC_SUBST(ENABLE_KDE)
5641 if test "x$enable_kde4" = "xyes"; then
5645 AC_SUBST(ENABLE_KDE4)
5647 if test -z "$R"; then
5648 AC_MSG_RESULT([none])
5653 dnl ===================================================================
5655 dnl ===================================================================
5658 AC_MSG_CHECKING([whether to enable GConf support])
5659 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
5661 AC_MSG_RESULT([yes])
5662 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5666 AC_SUBST(ENABLE_GCONF)
5668 dnl ===================================================================
5670 dnl ===================================================================
5673 GNOMEVFS_HAS_LOCKING=""
5674 AC_MSG_CHECKING([whether to enable GNOME VFS support])
5675 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
5676 ENABLE_GNOMEVFS="TRUE"
5677 AC_MSG_RESULT([yes])
5678 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
5679 if test "$ENABLE_GCONF" != "TRUE"; then
5680 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5685 save_CXXFLAGS=$CXXFLAGS
5686 CXXFLAGS="$CXXFLAGS $GNOMEVFS_CFLAGS"
5687 AC_CHECK_DECL(GNOME_VFS_OPEN_LOCKED,
5688 GNOMEVFS_HAS_LOCKING="YES",,
5689 [#include <libgnomevfs/gnome-vfs-handle.h>])
5690 CXXFLAGS=$save_CXXFLAGS
5695 AC_SUBST(ENABLE_GNOMEVFS)
5696 AC_SUBST(GNOMEVFS_HAS_LOCKING)
5698 dnl ===================================================================
5699 dnl Check whether the gtk 2.0 libraries are available.
5700 dnl ===================================================================
5704 ENABLE_SYSTRAY_GTK=""
5706 if test "$test_gtk" = "yes"; then
5708 if test "$ENABLE_GTK" = "TRUE" ; then
5709 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]))
5710 BUILD_TYPE="$BUILD_TYPE GTK"
5712 if test "x$enable_systray" = "xyes"; then
5713 ENABLE_SYSTRAY_GTK="TRUE"
5714 BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
5717 AC_MSG_CHECKING([whether to enable DBUS support])
5718 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
5720 AC_MSG_RESULT([yes])
5721 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
5726 AC_MSG_CHECKING([whether to enable GIO support])
5727 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
5728 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
5729 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
5732 AC_MSG_RESULT([yes])
5733 PKG_CHECK_MODULES( GIO, gio-2.0 )
5741 AC_SUBST(ENABLE_GIO)
5742 AC_SUBST(ENABLE_DBUS)
5743 AC_SUBST(ENABLE_SYSTRAY_GTK)
5744 AC_SUBST(GTK_CFLAGS)
5747 dnl ===================================================================
5748 dnl Check whether the Cairo libraries are available.
5749 dnl ===================================================================
5755 if test "$test_cairo" = "yes"; then
5757 AC_MSG_CHECKING([whether to use cairo])
5758 if test "x$enable_cairo" != "xno" ; then
5760 AC_MSG_RESULT([yes])
5761 AC_MSG_CHECKING([which cairo to use])
5762 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
5763 test "$with_system_cairo" != "no"; then
5764 AC_MSG_RESULT([external])
5767 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5768 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
5769 AC_MSG_ERROR([Cairo library requires fontconfig.])
5771 if test "$with_system_xrender_headers" = "yes"; then
5772 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
5774 #include <X11/extensions/Xrender.h>
5776 int main(int argc, char **argv) {
5777 #ifdef PictStandardA8
5783 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
5786 BUILD_TYPE="$BUILD_TYPE CAIRO"
5788 AC_MSG_RESULT([internal])
5795 AC_SUBST(ENABLE_CAIRO)
5796 AC_SUBST(BUILD_PIXMAN)
5797 AC_SUBST(SYSTEM_CAIRO)
5798 AC_SUBST(CAIRO_CFLAGS)
5799 AC_SUBST(CAIRO_LIBS)
5801 dnl ===================================================================
5802 dnl Check whether the GStreamer libraries are available.
5803 dnl ===================================================================
5807 if test "$build_gstreamer" = "yes"; then
5809 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
5810 if test "x$enable_gstreamer" != "xno" ; then
5811 ENABLE_GSTREAMER="TRUE"
5812 AC_MSG_RESULT([yes])
5813 PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
5819 AC_SUBST(ENABLE_GSTREAMER)
5821 dnl ===================================================================
5822 dnl Check whether the OpenGL libraries are available
5823 dnl ===================================================================
5825 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
5828 if test "x$enable_opengl" != "xno" ; then
5829 AC_MSG_RESULT([yes])
5830 AC_CHECK_HEADER(GL/gl.h, [],
5831 [AC_MSG_ERROR([OpenGL headers not found])], [])
5832 AC_CHECK_LIB(GL, main, [],
5833 [AC_MSG_ERROR(libGL not installed or functional)], [])
5834 AC_CHECK_LIB(GLU, main, [],
5835 [AC_MSG_ERROR(libGLU not installed or functional)], [])
5841 AC_SUBST(ENABLE_OPENGL)
5843 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
5844 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
5845 AC_MSG_RESULT([yes])
5846 ENABLE_MINIMIZER=YES
5851 AC_SUBST(ENABLE_MINIMIZER)
5853 AC_MSG_CHECKING([whether to build the Presenter Screen extension])
5854 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
5855 AC_MSG_RESULT([yes])
5856 ENABLE_PRESENTER_SCREEN=YES
5859 ENABLE_PRESENTER_SCREEN=NO
5861 AC_SUBST(ENABLE_PRESENTER_SCREEN)
5863 AC_MSG_CHECKING([whether to build the PDF Import extension])
5864 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
5865 AC_MSG_RESULT([yes])
5866 ENABLE_PDFIMPORT=YES
5868 dnl ===================================================================
5869 dnl Check for system poppler
5870 dnl ===================================================================
5871 AC_MSG_CHECKING([which pdf backend to use])
5872 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
5873 test "$with_system_poppler" != "no"; then
5874 AC_MSG_RESULT([external])
5876 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
5878 AC_MSG_RESULT([internal])
5880 BUILD_TYPE="$BUILD_TYPE XPDF"
5881 AC_MSG_CHECKING([for xpdf module])
5882 if test -d ./xpdf; then
5885 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5892 AC_SUBST(ENABLE_PDFIMPORT)
5893 AC_SUBST(SYSTEM_POPPLER)
5894 AC_SUBST(POPPLER_CFLAGS)
5895 AC_SUBST(POPPLER_LIBS)
5897 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
5898 AC_MSG_CHECKING([for sdext module])
5899 if test -d ./sdext; then
5902 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5904 BUILD_TYPE="$BUILD_TYPE SDEXT"
5907 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
5908 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
5909 AC_MSG_RESULT([yes])
5910 AC_MSG_CHECKING([for swext module])
5911 if test -d ./swext; then
5914 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5916 ENABLE_MEDIAWIKI=YES
5917 BUILD_TYPE="$BUILD_TYPE SWEXT"
5922 AC_SUBST(ENABLE_MEDIAWIKI)
5924 if test "$ENABLE_MEDIAWIKI" == "YES"; then
5925 AC_MSG_CHECKING([which Servlet API Jar to use])
5926 if test -n "$with_system_servlet_api"; then
5927 AC_MSG_RESULT([external])
5928 SYSTEM_SERVLETAPI=YES
5929 if test -z "$SERVLETAPI_JAR"; then
5930 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
5932 AC_CHECK_FILE($SERVLETAPI_JAR, [],
5933 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
5935 AC_MSG_RESULT([internal])
5936 SYSTEM_SERVLETAPI=NO
5937 BUILD_TYPE="$BUILD_TYPE TOMCAT"
5940 AC_SUBST(SYSTEM_SERVLETAPI)
5941 AC_SUBST(SERVLETAPI_JAR)
5943 AC_MSG_CHECKING([whether to build the Report Builder extension])
5944 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
5945 AC_MSG_RESULT([yes])
5946 ENABLE_REPORTBUILDER=YES
5947 AC_MSG_CHECKING([for reportbuilder module])
5948 if test -d ./reportbuilder; then
5951 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5953 AC_MSG_CHECKING([which jfreereport libs to use])
5954 if test "$with_system_jfreereport" == "yes"; then
5955 SYSTEM_JFREEREPORT=YES
5956 AC_MSG_RESULT([external])
5957 if test -z $SAC_JAR; then
5958 SAC_JAR=/usr/share/java/sac.jar
5960 AC_CHECK_FILE($SAC_JAR, [],
5961 [AC_MSG_ERROR(sac.jar not found.)], [])
5963 if test -z $LIBXML_JAR; then
5964 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
5965 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
5967 AC_CHECK_FILE(/usr/share/java/libxml.jar,
5968 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
5969 [AC_MSG_ERROR(libxml.jar replacement not found.)]
5974 AC_CHECK_FILE($LIBXML_JAR, [],
5975 [AC_MSG_ERROR(libxml.jar not found.)], [])
5978 if test -z $FLUTE_JAR; then
5979 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
5980 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
5982 AC_CHECK_FILE(/usr/share/java/flute.jar,
5983 [ FLUTE_JAR=/usr/share/java/flute.jar ],
5984 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
5989 AC_CHECK_FILE($FLUTE_JAR, [],
5990 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
5993 if test -z $JFREEREPORT_JAR; then
5994 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
5995 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
5997 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
5998 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
5999 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
6004 AC_CHECK_FILE($JFREEREPORT_JAR, [],
6005 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
6008 if test -z $LIBLAYOUT_JAR; then
6009 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
6010 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
6012 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
6013 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
6014 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
6019 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
6020 [AC_MSG_ERROR(liblayout.jar not found.)], [])
6023 if test -z $LIBLOADER_JAR; then
6024 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
6025 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
6027 AC_CHECK_FILE(/usr/share/java/libloader.jar,
6028 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
6029 [AC_MSG_ERROR(libloader.jar replacement not found.)]
6034 AC_CHECK_FILE($LIBLOADER_JAR, [],
6035 [AC_MSG_ERROR(libloader.jar not found.)], [])
6038 if test -z $LIBFORMULA_JAR; then
6039 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
6040 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
6042 AC_CHECK_FILE(/usr/share/java/libformula.jar,
6043 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
6044 [AC_MSG_ERROR(libformula.jar replacement not found.)]
6049 AC_CHECK_FILE($LIBFORMULA_JAR, [],
6050 [AC_MSG_ERROR(libformula.jar not found.)], [])
6053 if test -z $LIBREPOSITORY_JAR; then
6054 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
6055 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
6057 AC_CHECK_FILE(/usr/share/java/librepository.jar,
6058 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
6059 [AC_MSG_ERROR(librepository.jar replacement not found.)]
6064 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
6065 [AC_MSG_ERROR(librepository.jar not found.)], [])
6068 if test -z $LIBFONTS_JAR; then
6069 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
6070 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
6072 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
6073 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
6074 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
6079 AC_CHECK_FILE($LIBFONTS_JAR, [],
6080 [AC_MSG_ERROR(libfonts.jar not found.)], [])
6083 if test -z $LIBSERIALIZER_JAR; then
6084 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
6085 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
6087 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
6088 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
6089 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
6094 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
6095 [AC_MSG_ERROR(libserializer.jar not found.)], [])
6099 if test -z $LIBBASE_JAR; then
6100 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
6101 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
6103 AC_CHECK_FILE(/usr/share/java/libbase.jar,
6104 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
6105 [AC_MSG_ERROR(libbase.jar replacement not found.)]
6110 AC_CHECK_FILE($LIBBASE_JAR, [],
6111 [AC_MSG_ERROR(libbase.jar not found.)], [])
6115 AC_MSG_RESULT([internal])
6116 AC_MSG_CHECKING([for jfreereport module])
6117 if test -d ./jfreereport; then
6120 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
6122 SYSTEM_JFREEREPORT=NO
6123 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
6125 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
6128 ENABLE_REPORTBUILDER=NO
6129 SYSTEM_JFREEREPORT=NO
6131 AC_SUBST(ENABLE_REPORTBUILDER)
6132 AC_SUBST(SYSTEM_JFREEREPORT)
6134 AC_SUBST(LIBXML_JAR)
6136 AC_SUBST(JFREEREPORT_JAR)
6137 AC_SUBST(LIBBASE_JAR)
6138 AC_SUBST(LIBLAYOUT_JAR)
6139 AC_SUBST(LIBLOADER_JAR)
6140 AC_SUBST(LIBFORMULA_JAR)
6141 AC_SUBST(LIBREPOSITORY_JAR)
6142 AC_SUBST(LIBFONTS_JAR)
6143 AC_SUBST(LIBSERIALIZER_JAR)
6145 # this has to be here because both the wiki publisher and the SRB use
6147 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6148 AC_MSG_CHECKING([which Apache commons-* libs to use])
6149 if test "$with_system_apache_commons" = "yes"; then
6150 SYSTEM_APACHE_COMMONS=YES
6151 AC_MSG_RESULT([external])
6152 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6153 if test -z "$COMMONS_CODEC_JAR"; then
6154 COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar
6156 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
6157 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
6158 if test -z "$COMMONS_LANG_JAR"; then
6159 COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar
6161 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
6162 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
6163 if test -z "$COMMONS_HTTPCLIENT_JAR"; then
6164 COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar
6166 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
6167 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
6169 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6170 if test -z "$COMMONS_LOGGING_JAR"; then
6171 COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar
6173 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
6174 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
6178 AC_MSG_RESULT([internal])
6179 SYSTEM_APACHE_COMMONS=NO
6180 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
6183 AC_SUBST(SYSTEM_APACHE_COMMONS)
6184 AC_SUBST(COMMONS_CODEC_JAR)
6185 AC_SUBST(COMMONS_LANG_JAR)
6186 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
6187 AC_SUBST(COMMONS_LOGGING_JAR)
6189 dnl ===================================================================
6190 dnl Check whether the Qt and KDE libraries are available.
6191 dnl ===================================================================
6196 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
6197 dnl Search paths for Qt and KDE
6198 if test "$build_cpu" != "x86_64" ; then
6199 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"
6200 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"
6202 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"
6203 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"
6205 if test -n "$QTDIR" ; then
6206 qt_incdirs="$QTDIR/include $qt_incdirs"
6207 if test "$build_cpu" != "x86_64" ; then
6208 qt_libdirs="$QTDIR/lib $qt_libdirs"
6210 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
6213 if test "$build_cpu" != "x86_64" ; then
6214 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"
6215 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"
6217 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"
6218 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"
6220 if test -n "$KDEDIR" ; then
6221 kde_incdirs="$KDEDIR/include $kde_incdirs"
6222 if test "$build_cpu" != "x86_64" ; then
6223 kde_libdirs="$KDEDIR/lib $kde_libdirs"
6225 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
6230 qt_test_include="qstyle.h"
6231 qt_test_library="libqt-mt.so"
6232 kde_test_include="ksharedptr.h"
6233 kde_test_library="libkdeui.so"
6235 dnl Check for Qt headers
6236 AC_MSG_CHECKING([for Qt headers])
6238 for kde_check in $qt_incdirs ; do
6239 if test -r "$kde_check/$qt_test_include" ; then
6240 qt_incdir="$kde_check"
6244 AC_MSG_RESULT([$qt_incdir])
6245 if test "x$qt_incdir" = "xno" ; then
6246 AC_MSG_ERROR([Qt headers not found. Please specify the root of
6247 your Qt installation by exporting QTDIR before running "configure".])
6250 dnl Check for Qt libraries
6251 AC_MSG_CHECKING([for Qt libraries])
6253 for qt_check in $qt_libdirs ; do
6254 if test -r "$qt_check/$qt_test_library" ; then
6255 qt_libdir="$qt_check"
6259 AC_MSG_RESULT([$qt_libdir])
6260 if test "x$qt_libdir" = "xno" ; then
6261 AC_MSG_ERROR([Qt libraries not found. Please specify the root of
6262 your Qt installation by exporting QTDIR before running "configure".])
6265 dnl Check for Meta Object Compiler
6266 AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
6267 if test "$MOC" = "no" ; then
6268 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6269 the root of your Qt installation by exporting QTDIR before running "configure".])
6272 dnl Check for KDE headers
6273 AC_MSG_CHECKING([for KDE headers])
6275 for kde_check in $kde_incdirs ; do
6276 if test -r "$kde_check/$kde_test_include" ; then
6277 kde_incdir="$kde_check"
6281 AC_MSG_RESULT([$kde_incdir])
6282 if test "x$kde_incdir" = "xno" ; then
6283 AC_MSG_ERROR([KDE headers not found. Please specify the root of
6284 your KDE installation by exporting KDEDIR before running "configure".])
6287 dnl Check for KDE libraries
6288 AC_MSG_CHECKING([for KDE libraries])
6290 for kde_check in $kde_libdirs ; do
6291 if test -r "$kde_check/$kde_test_library" ; then
6292 kde_libdir="$kde_check"
6296 AC_MSG_RESULT([$kde_libdir])
6297 if test "x$kde_libdir" = "xno" ; then
6298 AC_MSG_ERROR([KDE libraries not found. Please specify the root of
6299 your KDE installation by exporting KDEDIR before running "configure".])
6302 dnl Set the variables
6303 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6304 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
6306 AC_SUBST(KDE_CFLAGS)
6310 dnl ===================================================================
6311 dnl KDE4 Integration
6312 dnl ===================================================================
6317 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
6318 qt_incdirs="$QT4INC $QT4DIR $QTINC $QTDIR /usr/include/qt4 /usr/include $x_includes"
6319 qt_libdirs="$QT4LIB $QTLIB /usr/lib $x_libraries"
6321 kde_incdirs="/usr/include $x_includes"
6322 kde_libdirs="/usr/lib $x_libraries"
6324 if test "$build_cpu" == "x86_64" ; then
6325 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
6326 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
6329 if test -n "$KDE4DIR" ; then
6330 kde_incdirs="$KDE4DIR/include $kde_incdirs"
6331 if test "$build_cpu" != "x86_64" ; then
6332 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
6334 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
6338 qt_test_include="Qt/qobject.h"
6339 qt_test_library="libQtCore.so"
6340 kde_test_include="ksharedptr.h"
6341 kde_test_library="libkdeui.so"
6343 AC_MSG_CHECKING([for Qt4 headers])
6345 for inc_dir in $qt_incdirs ; do
6346 if test -r "$inc_dir/$qt_test_include" ; then
6347 qt_header_dir="$inc_dir"
6352 AC_MSG_RESULT([$qt_header_dir])
6353 if test "x$qt_header_dir" = "xno" ; then
6354 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6357 AC_MSG_CHECKING([for Qt4 libraries])
6359 for lib_dir in $qt_libdirs ; do
6360 if test -r "$lib_dir/$qt_test_library" ; then
6361 qt_lib_dir="$lib_dir"
6366 AC_MSG_RESULT([$qt_lib_dir])
6368 if test "x$qt_lib_dir" = "xno" ; then
6369 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6372 dnl Check for Meta Object Compiler
6373 AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
6374 if test "$MOC4" = "no" ; then
6375 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6376 the root of your Qt installation by exporting QT4DIR before running "configure".])
6379 dnl Check for KDE4 headers
6380 AC_MSG_CHECKING([for KDE4 headers])
6382 for kde_check in $kde_incdirs ; do
6383 if test -r "$kde_check/$kde_test_include" ; then
6384 kde_incdir="$kde_check"
6388 AC_MSG_RESULT([$kde_incdir])
6389 if test "x$kde_incdir" = "xno" ; then
6390 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6393 dnl Check for KDE4 libraries
6394 AC_MSG_CHECKING([for KDE4 libraries])
6396 for kde_check in $kde_libdirs ; do
6397 if test -r "$kde_check/$kde_test_library" ; then
6398 kde_libdir="$kde_check"
6403 AC_MSG_RESULT([$kde_libdir])
6404 if test "x$kde_libdir" = "xno" ; then
6405 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6408 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6409 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
6411 AC_SUBST(KDE4_CFLAGS)
6415 dnl ===================================================================
6416 dnl Test for the enabling the lockdown pieces
6417 dnl ===================================================================
6418 AC_MSG_CHECKING([whether to enable the lockdown pieces])
6420 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
6422 AC_MSG_RESULT([yes])
6426 AC_SUBST(ENABLE_LOCKDOWN)
6428 dnl ===================================================================
6429 dnl Test whether to include Evolution 2 support
6430 dnl ===================================================================
6431 AC_MSG_CHECKING([whether to enable evolution 2 support])
6432 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
6433 AC_MSG_RESULT([yes])
6434 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
6435 ENABLE_EVOAB2="TRUE"
6440 AC_SUBST(ENABLE_EVOAB2)
6441 AC_SUBST(GOBJECT_CFLAGS)
6442 AC_SUBST(GOBJECT_LIBS)
6444 dnl ===================================================================
6445 dnl Test whether to include KDE AB support
6446 dnl ===================================================================
6447 AC_MSG_CHECKING([whether to enable KDE address book support])
6448 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
6449 AC_MSG_RESULT([yes])
6451 save_CXXFLAGS=$CXXFLAGS
6452 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
6453 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
6455 #include <kdeversion.h>
6457 int main(int argc, char **argv) {
6458 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
6461 ], [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])])
6462 CXXFLAGS=$save_CXXFLAGS
6469 AC_SUBST(ENABLE_KAB)
6471 dnl ===================================================================
6472 dnl Test whether to include FontOOo
6473 dnl ===================================================================
6474 AC_MSG_CHECKING([whether to include FontOOo])
6475 if test -n "$enable_fontooo"; then
6476 if test "$enable_fontooo" = "no"; then
6479 SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
6481 AC_MSG_RESULT([yes])
6483 BUILD_TYPE="$BUILD_TYPE MSFONTEXTRACT"
6488 SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
6490 AC_SUBST(WITH_FONTOOO)
6492 if test "$WITH_FONTOOO" = "YES"; then
6493 dnl ===============================================================
6494 dnl Check whether to use libmspack from system
6495 dnl ===============================================================
6496 AC_MSG_CHECKING([whether to use system libmspack])
6497 if test -n "$with_system_mspack" -o -n "$with_system_libs" && \
6498 test "$with_system_mspack" != "no"; then
6499 AC_MSG_RESULT([yes])
6501 AC_CHECK_HEADER(mspack.h, [],
6502 [AC_MSG_ERROR([mspack.h not found, install libmspack])], [])
6503 AC_CHECK_LIB(mspack, mspack_create_cab_decompressor, [],
6504 [AC_MSG_ERROR(libmspack not installed or functional)], [])
6510 AC_SUBST(SYSTEM_MSPACK)
6512 dnl ===================================================================
6513 dnl Test whether to include MathMLDTD
6514 dnl ===================================================================
6515 AC_MSG_CHECKING([whether to include MathMLDTD])
6516 if test -n "$enable_mathmldtd"; then
6517 if test "$enable_mathmldtd" = "no"; then
6519 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6521 AC_MSG_RESULT([yes])
6522 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
6526 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6529 dnl ===================================================================
6530 dnl Test whether to include fonts
6531 dnl ===================================================================
6532 AC_MSG_CHECKING([whether to include Bitstream Vera fonts])
6533 if test "$with_fonts" != "no" ; then
6534 AC_MSG_RESULT([yes])
6536 BUILD_TYPE="$BUILD_TYPE BITSTREAM_VERA_FONTS"
6540 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
6542 AC_SUBST(WITH_FONTS)
6544 AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
6545 if test "$with_agfa_monotype_fonts" != "no" -a -e ../agfa_monotype_fonts/download/agfa-monotype-fonts.tar.gz; then
6546 AC_MSG_RESULT([yes])
6547 WITH_AGFA_MONOTYPE_FONTS=YES
6548 SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
6549 BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
6552 WITH_AGFA_MONOTYPE_FONTS=NO
6554 AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
6556 dnl ===================================================================
6557 dnl Test whether to include ppds
6558 dnl ===================================================================
6559 AC_MSG_CHECKING([whether to include PPDs])
6560 if test "$with_ppds" != "no"; then
6561 AC_MSG_RESULT([yes])
6565 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
6567 AC_SUBST(WITHOUT_PPDS)
6569 dnl ===================================================================
6570 dnl Test whether to include afms
6571 dnl ===================================================================
6572 AC_MSG_CHECKING([whether to include AFMs])
6573 if test "$with_afms" != "no"; then
6574 AC_MSG_RESULT([yes])
6578 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
6580 AC_SUBST(WITHOUT_AFMS)
6584 AC_MSG_CHECKING([whether and how to use Xinerama])
6585 if test "$_os" = "Darwin"; then
6587 XINERAMA_LINK=dynamic
6588 AC_MSG_RESULT([yes])
6589 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
6590 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
6591 # we have both versions, let the user decide but use the dynamic one
6594 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
6595 XINERAMA_LINK=dynamic
6597 XINERAMA_LINK=static
6599 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
6600 # we have only the dynamic version
6602 XINERAMA_LINK=dynamic
6603 elif test -e "$XLIB/libXinerama.a"; then
6605 if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6607 XINERAMA_LINK=static
6617 if test "$USE_XINERAMA" = "YES"; then
6618 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
6619 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
6620 [AC_MSG_ERROR(Xinerama header not found.)], [])
6621 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
6622 if test "$_os" = "FreeBSD"; then
6623 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
6625 if test "$_os" = "Linux"; then
6626 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
6628 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
6629 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
6631 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
6636 AC_SUBST(USE_XINERAMA)
6637 AC_SUBST(XINERAMA_LINK)
6639 dnl ===================================================================
6640 dnl Test for the presence of Ant and that it works
6641 dnl ===================================================================
6643 if test "$SOLAR_JAVA" != ""; then
6644 ANT_HOME=; export ANT_HOME
6645 WITH_ANT_HOME=; export WITH_ANT_HOME
6646 if test -z "$with_ant_home"; then
6647 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
6649 if test "$_os" = "WINNT"; then
6650 with_ant_home=`cygpath -u "$with_ant_home"`
6652 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
6653 WITH_ANT_HOME=$with_ant_home
6654 ANT_HOME=$with_ant_home
6657 if test -z "$ANT"; then
6658 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
6660 # resolve relative or absolute symlink
6661 while test -h "$ANT"; do
6663 a_basename=`basename "$ANT"`
6664 a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
6665 cd "`dirname "$ANT"`"
6666 cd "`dirname "$a_script"`"
6667 ANT="`pwd`"/"`basename "$a_script"`"
6671 if test "$_os" = "OS2"; then
6672 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6677 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
6679 AC_MSG_CHECKING([whether ant is >= $ant_minver])
6680 ant_version=`$ANT -version | $AWK '{ print $4; }'`
6681 ant_version_major=`echo $ant_version | cut -d. -f1`
6682 ant_version_minor=`echo $ant_version | cut -d. -f2`
6683 echo "configure: ant_version $ant_version " >&5
6684 echo "configure: ant_version_major $ant_version_major " >&5
6685 echo "configure: ant_version_minor $ant_version_minor " >&5
6686 if test "$ant_version_major" -ge "2"; then
6687 AC_MSG_RESULT([yes, $ant_version])
6688 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
6689 AC_MSG_RESULT([yes, $ant_version])
6691 AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
6693 AC_MSG_CHECKING([if $ANT works])
6694 cat > conftest.java << EOF
6695 public class conftest {
6696 int testmethod(int a, int b) {
6702 cat > conftest.xml << EOF
6703 <project name="conftest" default="conftest">
6704 <target name="conftest">
6705 <javac srcdir="." includes="conftest.java">
6710 oldJAVA_HOME=$JAVA_HOME
6711 if test "$JAVACISGCJ" = "yes"; then
6712 JAVA_HOME=; export JAVA_HOME
6713 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6715 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6717 AC_TRY_EVAL(ant_cmd)
6718 if test $? = 0 && test -f ./conftest.class ; then
6719 AC_MSG_RESULT([Ant works])
6720 if test -z "$WITH_ANT_HOME"; then
6721 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
6722 if test -z "$ANT_HOME"; then
6723 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6726 ANT_HOME="$WITH_ANT_HOME"
6729 echo "configure: Ant test failed" >&5
6730 cat conftest.java >&5
6731 cat conftest.xml >&5
6732 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
6734 echo "Ant does not work - Some Java projects will not build!" >>warn
6736 JAVA_HOME=$oldJAVA_HOME
6737 rm -f conftest* core core.* *.core
6739 if test -z "$ANT_HOME"; then
6740 ANT_HOME="NO_ANT_HOME"
6744 dnl Checking for ant.jar
6745 if test "$ANT_HOME" != "NO_ANT_HOME"; then
6746 AC_MSG_CHECKING([Ant lib directory])
6747 if test -f $ANT_HOME/lib/ant.jar; then
6748 ANT_LIB="$ANT_HOME/lib"
6750 if test -f $ANT_HOME/ant.jar; then
6753 if test -f /usr/share/java/ant.jar; then
6754 ANT_LIB=/usr/share/java
6756 if test -f /usr/share/ant-core/lib/ant.jar; then
6757 ANT_LIB=/usr/share/ant-core/lib
6759 if test -f $ANT_HOME/lib/ant/ant.jar; then
6760 ANT_LIB="$ANT_HOME/lib/ant"
6762 AC_MSG_ERROR([Ant libraries not found!])
6768 AC_MSG_RESULT([Ant lib directory found.])
6773 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6774 AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
6777 cat > conftest.java << EOF
6778 public class conftest {
6779 int testmethod(int a, int b) {
6785 cat > conftest.xml << EOF
6786 <project name="conftest" default="conftest">
6787 <target name="conftest" depends="copytest">
6788 <javac srcdir="." includes="conftest.java">
6791 <target name="copytest">
6792 <copy todir="confdir">
6793 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
6795 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
6800 if test "$JAVACISGCJ" = "yes"; then
6801 JAVA_HOME=; export JAVA_HOME
6802 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6804 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6806 AC_TRY_EVAL(ant_cmd)
6807 if test $? = 0 && test -f ./conftest.class ; then
6808 AC_MSG_RESULT([yes])
6811 echo "configure: Ant test failed" >&5
6812 cat conftest.java >&5
6813 cat conftest.xml >&5
6815 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
6818 rm -f conftest* core core.* *.core
6820 AC_MSG_CHECKING([which languages to be built])
6821 WITH_LANG="$with_lang"
6822 if test -z "$WITH_LANG"; then
6823 AC_MSG_RESULT([en-US])
6825 AC_MSG_RESULT([$WITH_LANG])
6829 AC_MSG_CHECKING([which languages have poor help localizations])
6830 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
6831 if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
6832 AC_MSG_RESULT([none])
6834 AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
6836 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
6838 AC_MSG_CHECKING([which dictionaries to include])
6839 if test -z "$with_dict"; then
6841 AC_MSG_RESULT([ALL])
6843 WITH_DICT=","$with_dict","
6844 AC_MSG_RESULT([$with_dict])
6848 AC_MSG_CHECKING([for additional 'intro' bitmaps])
6850 if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
6852 AC_MSG_RESULT([none])
6854 for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
6857 *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
6859 if test -n "$bitmap" ; then
6860 INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
6863 AC_MSG_RESULT([$INTRO_BITMAPS])
6865 AC_SUBST(INTRO_BITMAPS)
6867 AC_MSG_CHECKING([for additional 'about' bitmaps])
6869 if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
6871 AC_MSG_RESULT([none])
6873 for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
6876 *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
6878 if test -n "$bitmap" ; then
6879 ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
6882 AC_MSG_RESULT([$ABOUT_BITMAPS])
6884 AC_SUBST(ABOUT_BITMAPS)
6887 AC_MSG_CHECKING([for vendor])
6888 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
6889 AC_MSG_RESULT([not set])
6891 OOO_VENDOR="$with_vendor"
6892 AC_MSG_RESULT([$OOO_VENDOR])
6894 AC_SUBST(OOO_VENDOR)
6897 AC_MSG_CHECKING([for UNIX wrapper name])
6898 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
6899 AC_MSG_RESULT([not set])
6901 UNIXWRAPPERNAME="$with_unix_wrapper"
6902 AC_MSG_RESULT([$UNIXWRAPPERNAME])
6904 AC_SUBST(UNIXWRAPPERNAME)
6906 AC_MSG_CHECKING([whether to statically link to Gtk])
6907 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
6908 ENABLE_STATIC_GTK="TRUE"
6909 AC_MSG_RESULT([yes])
6911 ENABLE_STATIC_GTK="FALSE"
6914 AC_SUBST(ENABLE_STATIC_GTK)
6916 AC_MSG_CHECKING([whether to use layout dialogs])
6917 if test -n "$enable_layout" && test "$enable_layout" != "no"; then
6918 ENABLE_LAYOUT="TRUE"
6919 AC_MSG_RESULT([yes])
6921 ENABLE_LAYOUT="FALSE"
6924 AC_SUBST(ENABLE_LAYOUT)
6926 # ===================================================================
6927 # De- or increase default verbosity of build process
6928 # ===================================================================
6929 AC_MSG_CHECKING([build verbosity])
6930 if test -n "$enable_verbose"; then
6931 if test "$enable_verbose" == "yes"; then
6933 AC_MSG_RESULT([high])
6935 if test "$enable_verbose" == "no"; then
6937 AC_MSG_RESULT([low])
6940 AC_MSG_RESULT([not set])
6944 dnl ===================================================================
6945 dnl Setting up the environment.
6946 dnl ===================================================================
6947 echo "********************************************************************"
6949 echo "* Setting up the build environment variables. *"
6951 echo "********************************************************************"
6953 if test -z "$COMPATH"; then
6954 AC_MSG_ERROR([No compiler found.])
6958 AC_MSG_CHECKING([solver path])
6959 if test -z "$with_local_solver"; then
6960 LOCAL_SOLVER="DEFAULT"
6961 AC_MSG_RESULT([default])
6963 LOCAL_SOLVER=$with_local_solver
6964 AC_MSG_RESULT([$with_local_solver])
6966 AC_SUBST(LOCAL_SOLVER)
6968 AC_SUBST(BUILD_TYPE)
6970 # make sure config.guess is +x; we execute config.guess, so it has to be so;
6971 chmod +x ./config.guess
6973 AC_OUTPUT([set_soenv Makefile])
6975 dnl Executing the set_soenv script to setup the environment variables.
6977 if test -z "$enable_check_only"; then
6982 echo No environment file will be generated
6984 num_warnings=`wc -l warn`
6985 _num=`echo $num_warnings | $AWK '{ print $1 }'`
6986 if test $_num -gt 0; then
6987 echo The following warning\(s\) were generated by configure
6988 echo ----------------------------------------------------
6993 echo There were no warnings