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 OOo includes some third-party fonts to provide a reliable
79 basis for help content, templates, samples, etc.
80 When these fonts are already known to be available on the
81 system then you should use this option.
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
710 AC_ARG_ENABLE(ccache-skip,
711 [[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to
712 escape compiler flags that would otherwise prevent
713 caching of the result (currently used on Mac only)
714 NOTE: requires patched version because of a bug in
715 ccache (see issue 104567 for details and patch)
716 explicitly enable if your version of ccache doesn't
717 identify as version 2.4_OOo
718 ]],,enable_ccache_skip=auto)
720 [ --with-lang Use this option to build OpenOffice.org with
721 additional language support. English (US) is always
722 included by default. Separate multiple languages with
723 space. For all languages, use --with-lang=ALL.
725 Usage: --with-lang="es sw tu cs sk"
727 AC_ARG_WITH(poor-help-localizations,
728 [ --with-poor-help-localizations
729 Use this option to specify which languages have
730 unusable help localizations. Separate multiple
731 languages with space.
733 Usage: --with-poor-help-localizations="af ar be-BY ca"
736 [ --with-dict Use this option to build OpenOffice.org with
737 dictionary support. ALL dictionaries are always
738 included by default unless overridden with
739 this option. Separate multiple dictionaries with
740 commas. For all dictionaries, use --with-dict=ALL.
742 Usage: --with-dict=ENGB,ENUS,ITIT
744 AC_ARG_WITH(intro-bitmaps,
745 [ --with-intro-bitmaps Prefer the specified intro bitmaps over the
746 the default one. Can be more than one (separated by
747 commas), the order means priority of fallback if the
748 first does not exist (in the installed tree).
750 Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
752 AC_ARG_WITH(about-bitmaps,
753 [ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
754 specification of bitmaps for the About box.
756 Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
759 [ --with-vendor Set vendor of the build.
761 Usage: --with-vendor="John the Builder"
763 AC_ARG_WITH(unix-wrapper,
764 [ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
765 in the desktop files and in the desktop-integration RPMs.
767 Usage: --with-unix-wrapper=ooffice
769 AC_ARG_WITH(asm-home,
770 [ --with-asm-home For Windows users, please supply the path for the
773 Usage: --with-asm-home=<path to ml.exe directory>
775 AC_ARG_WITH(os-version,
776 [ --with-os-version For FreeBSD users, use this option option to override
777 the detected OSVERSION.
779 Usage: --with-os-version=<OSVERSION>
781 AC_ARG_WITH(unzip-home,
782 [ --with-unzip-home Deprecated: use --with-zip-home instead],,)
783 AC_ARG_WITH(zip-home,
784 [ --with-zip-home If you use a non standard zip, for example windows
785 please supply the path for zip
787 Usage: --with-zip-home=<path to zip executable>
790 [ --with-mingwin For Windows users, use the mingwin32 compiler within
791 cygwin environment, this implies --with-use-shell=tcsh
793 Usage: --with-mingwin=yes
795 For !Windows use, use the mingw32 C++ compiler to
796 (re-) build unowinreg.dll. Specify the MinGW C++
799 Usage: --with-mingwin=i586-mingw32msvc-g++
800 ],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
801 AC_ARG_WITH(use-shell,
802 [ --with-use-shell Use this option to override the default shell to be
803 used for the build environment.
809 Usage: --with-use-shell=tcsh|bash|4nt
810 ],with_use_shell=$withval,with_use_shell="tcsh")
811 AC_ARG_WITH(build-version,
812 [ --with-build-version Allows the builder to add a custom version tag
813 that will appear in the Help/About box for QA
816 Usage: --with-build-version="Built by Jim"
817 ],with_build_version=$withval)
818 AC_ARG_ENABLE(sgistl,
819 [ --enable-sgistl for IRIX users, use this option option to build
820 OpenOffice.org using SGI's STL.
822 Usage: --enable-sgistl=yes
825 [ --with-alloc Define which allocator to build with
826 (choices are oo, system, tcmalloc)
828 AC_ARG_ENABLE(verbose,
829 [ --enable-verbose Increase build verbosity.
830 --disable-verbose Decrease build verbosity.
835 dnl ===================================================================
837 dnl ===================================================================
838 echo "********************************************************************"
840 echo "* OpenOffice.org build configuration. *"
842 echo "* The configure process checks your platform to see whether *"
843 echo "* you can build OpenOffice.org on it. *"
844 echo "* This process checks all pre-requisites and generates a file *"
845 echo "* containing the necessary environment variables. *"
846 echo "* Source this file after configure has ended successfully. *"
848 echo "* Any warning that is generated during the configure process *"
849 echo "* must be taken into account since it can be a reason for *"
850 echo "* an unsuccessful build of OpenOffice.org *"
852 echo "********************************************************************"
854 echo "********************************************************************"
856 echo "* Checking the platform pre-requisites. *"
858 echo "********************************************************************"
860 dnl ===================================================================
861 dnl Configure pre-requisites.
862 dnl ===================================================================
866 AC_PATH_PROG( AWK, $AWK)
867 if test -z "$AWK"; then
868 AC_MSG_ERROR([install awk to run this script])
871 AC_PATH_PROGS(SED, sed )
872 if test -z "$SED"; then
873 AC_MSG_ERROR([install sed to run this script])
876 AC_MSG_CHECKING([for solenv environment])
877 if test -z "$with_local_solenv"; then
878 LOCAL_SOLENV="DEFAULT"
879 AC_MSG_RESULT([default])
881 LOCAL_SOLENV=$with_local_solenv
882 AC_MSG_RESULT([$with_local_solenv])
884 AC_SUBST(LOCAL_SOLENV)
886 if test "$LOCAL_SOLENV" = "DEFAULT"; then
889 _solenv="$LOCAL_SOLENV"
893 if test -e $_solenv/inc/minor.mk; then
894 # Get UPD number from ./solenv/inc/minor.mk
895 UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
897 SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
898 AC_SUBST(SOURCEVERSION)
900 AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
903 dnl ===================================================================
904 dnl Checks for the operating system and processor.
905 dnl ===================================================================
907 if test "$build" != "$host" -o "$build" != "$target" \
908 -o "$host" != "$target"; then
909 AC_MSG_WARN([cross-compiling by any means is not supported (yet)!])
910 echo "cross-compiling by any means is not supported (yet)!" >> warn
913 if echo "$build_os" | grep cygwin; then
914 AC_MSG_CHECKING([Cygwin version])
916 AC_MSG_RESULT([$CygwinVer])
917 if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
918 AC_MSG_ERROR([You need at least Cygwin V1.5.x])
924 dnl ===================================================================
925 dnl The following is a list of supported systems.
926 dnl Sequential to keep the logic very simple
927 dnl These values may be checked and reset later.
928 dnl ===================================================================
939 AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
940 if test -z "$GNUTAR"; then
941 AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).])
945 dnl ===========================================================
946 dnl check whether we're using solaris 6,7,8 - sparc or intel.
947 dnl ===========================================================
948 AC_MSG_CHECKING([the Solaris operating system release])
949 _os_release=`echo $build_os | $SED -e s/solaris2\.//`
950 if test "$_os_release" -lt "6"; then
951 AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
953 AC_MSG_RESULT([ok ($_os_release)])
956 dnl check whether we're using a sparc or i386 processor
957 AC_MSG_CHECKING([the processor type])
958 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
959 AC_MSG_RESULT([ok ($build_cpu)])
961 AC_MSG_ERROR([only sparc and i386 processors are supported])
973 if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then
974 PTHREAD_CFLAGS="-DNPTL"
982 cygwin*|interix*) # Windows
995 if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
996 AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
997 echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
1018 AC_MSG_CHECKING([the FreeBSD operating system release])
1019 if test -n "$with_os_version"; then
1020 OSVERSION="$with_os_version"
1022 OSVERSION=`/sbin/sysctl -n kern.osreldate`
1024 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
1025 AC_MSG_CHECKING([which thread library to use])
1026 if test "$OSVERSION" -lt "500016"; then
1027 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1028 PTHREAD_LIBS="-pthread"
1029 elif test "$OSVERSION" -lt "502102"; then
1030 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1031 PTHREAD_LIBS="-lc_r"
1034 PTHREAD_LIBS="-pthread"
1036 AC_MSG_RESULT([$PTHREAD_LIBS])
1053 PTHREAD_CFLAGS="-pthread"
1054 PTHREAD_LIBS="-pthread -lpthread"
1067 PTHREAD_LIBS=-pthread
1068 echo "AIX is an alpha port --- Use at own risk" >> warn
1072 AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
1077 AC_SUBST(PTHREAD_CFLAGS)
1078 AC_SUBST(PTHREAD_LIBS)
1080 dnl ===================================================================
1081 dnl Set the ENABLE_CRASHDUMP variable.
1082 dnl ===================================================================
1083 AC_MSG_CHECKING([whether to enable crashdump feature])
1084 if test "$enable_crashdump" = "yes" -o "$enable_crashdump" = "TRUE"; then
1085 ENABLE_CRASHDUMP="TRUE"
1086 AC_MSG_RESULT([yes])
1087 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1089 if test "$enable_crashdump" = "STATIC"; then
1090 ENABLE_CRASHDUMP="STATIC"
1091 AC_MSG_RESULT([yes, STATIC])
1092 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1094 if test "$enable_crashdump" = "" -o "$enable_crashdump" = "no"; then
1098 AC_MSG_ERROR([--enable-crashdump only accepts yes, no, TRUE or STATIC as parameter.])
1102 AC_SUBST(ENABLE_CRASHDUMP)
1104 if test "$_os" = "WINNT"; then
1105 BUILD_TYPE="$BUILD_TYPE TWAIN"
1108 if test "$_os" = "WINNT"; then
1109 dnl ===================================================================
1110 dnl Set the VC_STANDARD variable.
1111 dnl ===================================================================
1112 AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
1113 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
1118 AC_MSG_RESULT([yes])
1120 AC_SUBST(VC_STANDARD)
1123 dnl ===================================================================
1124 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
1125 dnl ===================================================================
1126 AC_MSG_CHECKING([whether to turn warnings to errors])
1127 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
1128 ENABLE_WERROR="TRUE"
1129 AC_MSG_RESULT([yes])
1130 AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
1131 AC_MSG_WARN([on platforms where it has been disabled explicitely])
1132 echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
1134 ENABLE_WERROR="FALSE"
1137 AC_SUBST(ENABLE_WERROR)
1139 dnl ===================================================================
1140 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
1141 dnl ===================================================================
1142 AC_MSG_CHECKING([whether to do a debug build])
1143 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
1145 if test -z "$enable_symbols"; then
1146 enable_symbols="yes"
1148 AC_MSG_RESULT([yes])
1150 ENABLE_DEBUG="FALSE"
1153 AC_SUBST(ENABLE_DEBUG)
1155 dnl ===================================================================
1156 dnl Set the ENABLE_DBGUTIL variable
1157 dnl ===================================================================
1158 AC_MSG_CHECKING([whether to build with additional debug utilities])
1159 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1163 AC_MSG_RESULT([yes])
1166 PROFULLSWITCH="product=full"
1168 AC_MSG_RESULT([no, full product build])
1171 AC_SUBST(PROFULLSWITCH)
1174 dnl ===================================================================
1175 dnl First setting is whether to include symbols into final build.
1176 dnl ===================================================================
1177 AC_MSG_CHECKING([whether to include symbols into final build])
1178 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
1179 if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
1180 ENABLE_SYMBOLS="TRUE"
1181 AC_MSG_RESULT([yes])
1183 if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
1184 ENABLE_SYMBOLS="SMALL"
1185 AC_MSG_RESULT([yes, small ones])
1186 else if test "$enable_symbols" != "no" ; then
1187 echo enable symbols is: $enable_symbols
1188 AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
1198 AC_SUBST(ENABLE_SYMBOLS)
1200 dnl ===================================================================
1201 dnl Determine if the solver is to be stripped or not.
1202 dnl ===================================================================
1203 AC_MSG_CHECKING([whether to strip the solver or not.])
1204 if test -n "$enable_strip_solver"; then
1205 if test "$enable_strip_solver" = "yes"; then
1207 else if test "$enable_strip_solver" = "no"; then
1208 DISABLE_STRIP="TRUE"
1210 AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
1214 if test -n "$ENABLE_SYMBOLS"; then
1215 DISABLE_STRIP="TRUE"
1220 AC_SUBST(DISABLE_STRIP)
1222 dnl ===================================================================
1224 dnl ===================================================================
1225 AC_MSG_CHECKING([whether to enable native CUPS support])
1226 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
1228 AC_MSG_RESULT([yes])
1233 AC_SUBST(ENABLE_CUPS)
1235 AC_MSG_CHECKING([whether to enable fontconfig support])
1236 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
1237 ENABLE_FONTCONFIG="TRUE"
1238 AC_MSG_RESULT([yes])
1240 ENABLE_FONTCONFIG=""
1243 AC_SUBST(ENABLE_FONTCONFIG)
1246 dnl ===================================================================
1247 dnl Disable legacy binary file formats filters
1248 dnl ===================================================================
1249 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
1250 if test "$enable_binfilter" = "no"; then
1254 WITH_BINFILTER="YES"
1255 BUILD_TYPE="$BUILD_TYPE BINFILTER"
1256 AC_MSG_RESULT([yes])
1258 AC_SUBST(WITH_BINFILTER)
1260 if test "$_os" = "WINNT"; then
1261 AC_MSG_CHECKING([whether to use DirectX])
1262 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
1263 ENABLE_DIRECTX="TRUE"
1264 AC_MSG_RESULT([yes])
1269 AC_SUBST(ENABLE_DIRECTX)
1271 AC_MSG_CHECKING([whether to use ActiveX])
1272 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
1274 AC_MSG_RESULT([yes])
1276 DISABLE_ACTIVEX="TRUE"
1279 AC_SUBST(DISABLE_ACTIVEX)
1281 AC_MSG_CHECKING([whether to use ATL])
1282 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
1284 AC_MSG_RESULT([yes])
1289 AC_SUBST(DISABLE_ATL)
1293 dnl ===================================================================
1294 dnl Disable rpath in shared libraries?
1295 dnl ===================================================================
1296 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
1297 if test "$enable_rpath" = "no"; then
1302 AC_MSG_RESULT([$ENABLE_RPATH])
1303 AC_SUBST(ENABLE_RPATH)
1305 dnl Test whether to include MySpell dictionaries
1306 dnl ===================================================================
1307 AC_MSG_CHECKING([whether to include MySpell dictionaries])
1308 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
1309 AC_MSG_RESULT([yes])
1310 WITH_MYSPELL_DICTS=YES
1311 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
1314 WITH_MYSPELL_DICTS=NO
1316 AC_SUBST(WITH_MYSPELL_DICTS)
1318 if test "$WITH_MYSPELL_DICTS" = "NO"; then
1319 AC_MSG_CHECKING([whether to use dicts from external paths])
1320 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
1321 AC_MSG_RESULT([yes])
1323 AC_MSG_CHECKING([for spelling dictionary directory])
1324 if test -n "$with_external_dict_dir"; then
1325 DICT_SYSTEM_DIR=file://$with_external_dict_dir
1327 DICT_SYSTEM_DIR=file:///usr/share/hunspell
1329 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
1330 AC_MSG_CHECKING([for hyphenation patterns directory])
1331 if test -n "$with_external_hyph_dir"; then
1332 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
1334 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
1336 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
1337 AC_MSG_CHECKING([for thesaurus directory])
1338 if test -n "$with_external_thes_dir"; then
1339 THES_SYSTEM_DIR=file://$with_external_thes_dir
1341 THES_SYSTEM_DIR=file:///usr/share/mythes
1343 AC_MSG_RESULT([$THES_SYSTEM_DIR])
1349 AC_SUBST(SYSTEM_DICTS)
1350 AC_SUBST(DICT_SYSTEM_DIR)
1351 AC_SUBST(HYPH_SYSTEM_DIR)
1352 AC_SUBST(THES_SYSTEM_DIR)
1354 dnl ===================================================================
1355 dnl WINNT uses tcsh, bash or 4nt all other O/S use tcsh or bash.
1356 dnl The following sets the with_use_shell variable.
1357 dnl ===================================================================
1358 AC_MSG_CHECKING([which shell to use])
1359 if test $_os = "WINNT"; then
1360 dnl ===================================================================
1361 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash" -a "$with_use_shell" != "4nt"; then
1362 AC_MSG_ERROR([only "tcsh","bash" or "4nt" are supported options])
1364 dnl ===================================================================
1365 dnl Sanity check! Native windows programs cannot use cygwin symlinks!
1366 dnl ===================================================================
1367 dnl As long as awk instead of $AWK is used somewhere in the sources,
1368 dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
1369 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
1370 AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
1371 Native windows programs cannot use cygwin symlinks. Remove the symbolic
1372 link, and copy the program to the name of the link.])
1374 dnl ===================================================================
1375 dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
1376 dnl CC and CXX but the configure checks here assume that guw.exe
1377 dnl (if needed at all) is not yet present.
1378 dnl ===================================================================
1379 CC=`echo $CC | $SED "s/^guw.exe //"`
1380 CXX=`echo $CXX | $SED "s/^guw.exe //"`
1381 dnl ===================================================================
1382 dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
1384 dnl ===================================================================
1385 if test -n "$CC";then
1386 if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
1390 dnl ===================================================================
1391 dnl If using Mingwin32 then don't use 4NT
1392 dnl ===================================================================
1393 if test "$WITH_MINGWIN" = "yes" ; then
1394 if test "$with_use_shell" = "4nt" -o "x$with_use_shell" = "x"; then
1395 with_use_shell="tcsh"
1397 if test -z "$CC"; then
1398 CC="gcc -mno-cygwin"
1399 CXX="g++ -mno-cygwin"
1402 elif test $_os = "OS2"; then
1403 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "4nt"; then
1404 AC_MSG_ERROR([only "tcsh" or "4nt" are supported options])
1407 dnl ===================================================================
1408 dnl All other operating systems use tcsh or bash.
1409 dnl ===================================================================
1410 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash"; then
1411 AC_MSG_ERROR([only "tcsh" or "bash" are supported options])
1414 USE_SHELL="$with_use_shell"
1415 AC_MSG_RESULT([$USE_SHELL])
1417 AC_SUBST(WITH_MINGWIN)
1419 dnl ===================================================================
1420 dnl Extra check for Windows. Non 4nt-builds need gcc to build dmake
1421 dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
1423 dnl ===================================================================
1424 if test "$_os" = "WINNT" -a "$with_use_shell" != "4nt" ; then
1425 AC_MSG_CHECKING([for cygwin gcc/g++])
1426 if which gcc > /dev/null && which g++ > /dev/null ; then
1427 AC_MSG_RESULT([found])
1429 AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
1434 dnl ===================================================================
1435 dnl Check whether the chosen shell can be used.
1436 dnl ===================================================================
1437 if test "$with_use_shell" = "tcsh"; then
1438 AC_PATH_PROG(SHELLPATH, tcsh)
1439 if test -z "$SHELLPATH"; then
1440 AC_MSG_ERROR([tcsh not found in \$PATH])
1442 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/tcsh$//p"`
1444 elif test "$with_use_shell" = "bash"; then
1445 AC_PATH_PROG(SHELLPATH, bash)
1446 if test -z "$SHELLPATH"; then
1447 AC_MSG_ERROR([bash not found in \$PATH])
1449 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
1452 AC_MSG_WARN([Windows/OS/2 4NT builds don't test for the shell])
1453 SHELLPATH="NO_SHELLPATH_NEEDED"
1457 dnl ===================================================================
1458 dnl Checks for c compiler,
1459 dnl The check for the c++ compiler is later on.
1460 dnl ===================================================================
1461 AC_MSG_CHECKING([gcc home])
1462 if test -z "$with_gcc_home"; then
1463 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1465 GCC_HOME="$with_gcc_home"
1467 AC_MSG_RESULT($GCC_HOME)
1470 if test -n "$with_gcc_home"; then
1471 if test -z "$CC"; then
1472 CC="$with_gcc_home/bin/gcc"
1476 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1477 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1481 COMPATH=`dirname "$CC"`
1482 if test "$COMPATH" = "." ; then
1483 AC_PATH_PROGS(COMPATH, $CC)
1484 dnl double square bracket to get single because of M4 quote...
1485 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1488 dnl ===================================================================
1489 dnl Test the gcc version, 3 is OK
1490 dnl ===================================================================
1492 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1493 AC_MSG_CHECKING([the GNU gcc compiler version])
1494 _gcc_version=`$CC -dumpversion`
1495 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
1496 _gcc_longver=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1497 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1499 if test "$_gcc_major" -lt "3"; then
1500 AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
1502 if test "$GCCVER" -eq "030203"; then
1503 if test "$ENABLE_SYMBOLS" = "SMALL"; then
1504 AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
1508 AC_MSG_RESULT([checked (gcc $_gcc_version)])
1509 if test "$_os" = "SunOS"; then
1510 AC_MSG_CHECKING([gcc linker])
1511 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
1512 AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
1514 AC_MSG_RESULT([ok (GNU ld)])
1519 HAVE_LD_BSYMBOLIC_FUNCTIONS=
1520 if test "$GCC" = "yes"; then
1521 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
1522 bsymbolic_functions_ldflags_save=$LDFLAGS
1523 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
1524 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1527 printf ("hello world\n");
1528 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
1529 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
1530 AC_MSG_RESULT( found )
1532 AC_MSG_RESULT( not found )
1534 LDFLAGS=$bsymbolic_functions_ldflags_save
1536 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
1538 dnl ===================================================================
1539 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
1540 dnl ===================================================================
1541 AC_MSG_CHECKING([whether to enable pch feature])
1542 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
1543 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
1545 AC_MSG_RESULT([yes])
1546 dnl There is no PCH support in GCC versions prior to this
1547 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
1549 AC_MSG_RESULT([yes])
1552 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
1558 AC_SUBST(ENABLE_PCH)
1560 dnl ===================================================================
1561 dnl Set the NO_HIDS variable. (enable with --enable-hids)
1562 dnl ===================================================================
1563 AC_MSG_CHECKING([whether to enable hid list feature])
1564 if test -n "$enable_hids" && test "$enable_hids" != "no"; then
1566 AC_MSG_RESULT([yes])
1573 dnl ===================================================================
1574 dnl Search all the common names for GNU make
1575 dnl ===================================================================
1576 AC_MSG_CHECKING([for GNU make])
1577 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
1578 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1579 if test $? -eq 0; then
1584 AC_MSG_RESULT($GNUMAKE)
1585 if test -z "$GNUMAKE"; then
1586 AC_MSG_ERROR([not found. install GNU make.])
1589 AC_MSG_CHECKING([the GNU make version])
1590 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
1591 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1592 if test "$_make_longver" -ge "037901" ; then
1593 AC_MSG_RESULT([$GNUMAKE $_make_version])
1595 if test "$_os" = "Darwin"; then
1596 if test "$_make_longver" -ge "037900" ; then
1597 AC_MSG_RESULT([$GNUMAKE $_make_version])
1599 AC_MSG_WARN([failed ($GNUMAKE $_make_version need 3.79.0+)])
1602 AC_MSG_ERROR([failed ($GNUMAKE $_make_version need 3.79.1+)])
1607 dnl ===================================================================
1608 dnl Search all the common names for GNU tar
1609 dnl ===================================================================
1610 AC_MSG_CHECKING([for GNU tar])
1611 for a in $GNUTAR gtar gnutar tar; do
1612 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1613 if test $? -eq 0; then
1618 AC_MSG_RESULT($GNUTAR)
1619 if test -z "$GNUTAR"; then
1620 AC_MSG_ERROR([not found. install GNU tar.])
1625 dnl ===================================================================
1626 dnl Test the solaris compiler version
1627 dnl ===================================================================
1628 if test "$_os" = "SunOS"; then
1629 if test "$CC" = "cc"; then
1630 AC_PATH_PROGS(_cc, cc)
1631 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1632 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
1633 dnl cc -V outputs to standard error!!!!
1634 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
1635 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
1636 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
1637 if test "$_sunstudio_major" != "5"; then
1638 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1640 _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" }'`
1641 if test "$_sunstudio_minor" = "false"; then
1642 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1644 dnl compiler will do
1645 AC_MSG_RESULT([checked])
1651 if test "$GCC" = "yes"; then
1652 AC_MSG_CHECKING( for --hash-style=$WITH_LINKER_HASH_STYLE linker support )
1653 hash_style_ldflags_save=$LDFLAGS
1654 LDFLAGS="$LDFLAGS -Wl,--hash-style=$WITH_LINKER_HASH_STYLE"
1655 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1658 printf ("hello world\n");
1659 ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
1660 if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
1661 AC_MSG_RESULT( found )
1663 AC_MSG_RESULT( not found )
1665 LDFLAGS=$hash_style_ldflags_save
1667 AC_SUBST(HAVE_LD_HASH_STYLE)
1668 AC_SUBST(WITH_LINKER_HASH_STYLE)
1670 dnl ===================================================================
1671 dnl Check for -Wl,--as-needed linker support
1672 dnl ===================================================================
1673 HAVE_WORKING_LD_AS_NEEDED=
1674 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1675 AC_MSG_CHECKING([for working -Wl,--as-needed linker support])
1676 _ld_version=`$CC -Wl,--version 2>&1 | head -n 1 | $SED -e "s|(.*)||" -e "s|^[[^0-9]]*||"`
1677 _ld_major=`echo $_ld_version | cut -d"." -f 1`
1678 _ld_minor=`echo $_ld_version | cut -d"." -f 2`
1679 if test "$_ld_major" -gt 2 || \
1680 test "$_ld_major" -eq 2 -a "$_ld_minor" -gt 17 ; then
1681 # there are problems with ld <= 2.17, see also http://www.gentoo.org/proj/en/qa/asneeded.xml
1682 HAVE_WORKING_LD_AS_NEEDED=TRUE
1683 AC_MSG_RESULT([yes])
1688 AC_SUBST(HAVE_WORKING_LD_AS_NEEDED)
1690 dnl ===================================================================
1691 dnl Test the IRIX SGI Mips pro compiler
1692 dnl ===================================================================
1693 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
1694 if test "$CC" = "cc"; then
1695 AC_PATH_PROGS(_cc, cc)
1696 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1697 AC_MSG_CHECKING([the SGI MIPSpro C compiler version])
1698 dnl cc -version outputs to standard error!!!!
1699 _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'`
1700 _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'`
1701 if test "$_mipspro_major" != "7"; then
1702 AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler])
1704 _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'`
1705 if test "$_mipspro_minor" = "false"; then
1706 AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler])
1708 dnl compiler will do
1709 AC_MSG_RESULT([checked])
1715 dnl ===================================================================
1716 dnl Test the Compaq compiler for OSF1
1717 dnl ===================================================================
1718 if test "$_os" = "OSF1"; then
1719 if test "$CC" = "cc"; then
1720 AC_PATH_PROGS(_cc, cc)
1721 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1722 AC_MSG_WARN([******* $_cc , $COMPATH])
1723 AC_MSG_CHECKING([the Compaq C compiler version])
1724 dnl cc -V outputs to standard error!!!!
1725 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
1726 _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
1727 if test "$_compaqc_major" != "T6"; then
1728 AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
1730 dnl compiler will do
1731 AC_MSG_RESULT([checked])
1736 dnl ===================================================================
1737 dnl Check whether there's a Perl version available.
1738 dnl ===================================================================
1739 if test -z "$with_perl_home"; then
1740 AC_PATH_PROG(PERL, perl)
1742 if test "$_os" = "WINNT"; then
1743 with_perl_home=`cygpath -u "$with_perl_home"`
1745 _perl_path="$with_perl_home/bin/perl"
1746 if test -x "$_perl_path"; then
1749 AC_MSG_ERROR([$_perl_path not found])
1753 dnl ===================================================================
1754 dnl Testing for Perl version 5 or greater.
1755 dnl $] is the perl version variable, it is returned as an integer
1756 dnl ===================================================================
1757 if test "$PERL"; then
1758 AC_MSG_CHECKING([the Perl version])
1759 ${PERL} -e "exit($]);"
1761 if test "$_perl_version" -lt 5; then
1762 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
1764 AC_MSG_RESULT([checked (perl $_perl_version)])
1766 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
1770 dnl ===================================================================
1771 dnl Testing for required Perl modules
1772 dnl ===================================================================
1773 AC_MSG_CHECKING([for required Perl modules])
1774 if `$PERL -e 'use Archive::Zip;'`; then
1775 AC_MSG_RESULT([all modules found])
1777 AC_MSG_ERROR([Failed to find some modules])
1780 dnl ===================================================================
1781 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
1782 dnl ===================================================================
1783 if test "$_os" = "WINNT"; then
1784 if test "$WITH_MINGWIN" != "yes"; then
1785 AC_MSG_CHECKING([for friendly registry keys])
1786 # VS.Net 2003, VS.Net 2005
1787 if test -z "$with_cl_home"; then
1788 vctest=`./oowintool --msvc-productdir`;
1789 if test -x "$vctest/bin/cl.exe"; then
1790 with_cl_home=$vctest;
1793 with_cl_home=`cygpath -u "$with_cl_home"`
1795 AC_MSG_RESULT([done])
1797 dnl ===========================================================
1798 dnl Check for mspdb71.dll/mspdb80.dll
1799 dnl ===========================================================
1800 dnl .NET 2003/5/8 Compiler
1801 if test -n "$with_mspdb_path";then
1802 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
1804 if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
1805 MSPDB_PATH="$with_mspdb_path"
1808 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
1809 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1811 dnl .NET 2005/2008 case
1812 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
1813 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1815 dnl Windows SDK 6.0 case
1816 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
1817 MSPDB_PATH="$with_cl_home/bin"
1820 if test -z "$MSPDB_PATH";then
1821 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
1822 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
1823 AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
1824 MSPDB_PATH=`dirname "$MSPDB_PATH"`
1827 if test -z "$MSPDB_PATH"; then
1828 AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
1830 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
1831 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
1832 dnl The path needs to be added before cl is called
1833 PATH="$MSPDB_PATH:$PATH"
1835 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
1836 if test -x "$with_cl_home/bin/cl.exe"; then
1837 CC="$with_cl_home/bin/cl.exe"
1839 AC_PATH_PROG(CC, cl.exe)
1841 if test -e "$CC"; then
1842 # This gives us a posix path with 8.3 filename restrictions
1843 CC=`cygpath -d "$CC"`
1844 CC=`cygpath -u "$CC"`
1845 # Remove /cl.exe from CC case insensitive
1846 AC_MSG_RESULT([found ($CC)])
1847 COMPATH=`echo $CC | $SED 's@/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
1848 export INCLUDE=`cygpath -d "$COMPATH/../Include"`
1849 dnl Check which Microsoft C/C++ compiler is found
1850 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
1851 dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
1852 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
1853 x = match( \\\$0, /..\\...\\...../ )
1854 CCversion = substr( \\\$0, RSTART, RLENGTH)
1855 tokencount = split (CCversion,vertoken,\".\")
1856 for ( i = 1 ; i <= tokencount ; i++ ) {
1857 printf (\"%04d\",vertoken[[i]] )
1860 AC_MSG_RESULT([found Compiler version $CCNUMVER.])
1861 if test "$CCNUMVER" -ge "001500000000"; then
1864 AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
1865 elif test "$CCNUMVER" -ge "001400000000"; then
1868 AC_MSG_RESULT([found .NET 2005.])
1869 elif test "$CCNUMVER" -ge "001300102240"; then
1872 AC_MSG_RESULT([found .NET 2003.])
1874 AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
1877 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
1880 AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
1881 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
1882 AC_MSG_RESULT([found.])
1883 if $CC -dumpspecs | grep -q "mno-cygwin"; then
1886 USE_MINGW="pure-mingw"
1889 AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
1894 AC_SUBST(MSPDB_PATH)
1897 dnl ===================================================================
1898 dnl .NET needs special treatment
1899 dnl ===================================================================
1900 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
1902 AC_PATH_PROG(MIDL_PATH, midl.exe)
1903 if test -n "$MIDL_PATH";then
1904 MIDL_PATH=`dirname "$MIDL_PATH"`
1906 if test -n "$with_midl_path";then
1907 with_midl_path=`cygpath -u "$with_midl_path"`
1909 if test -x "$with_midl_path/midl.exe"; then
1910 MIDL_PATH="$with_midl_path"
1912 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
1913 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
1915 if test -z "$MIDL_PATH" ; then
1916 vstest=`./oowintool --msvs-productdir`;
1917 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
1918 MIDL_PATH="$vstest/Common7/Tools/Bin"
1921 if test -z "$MIDL_PATH" ; then
1922 psdktest=`./oowintool --psdk-home`
1923 if test -x "$psdktest/Bin/midl.exe" ; then
1924 MIDL_PATH="$psdktest/Bin"
1927 if test ! -x "$MIDL_PATH/midl.exe"; then
1928 AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
1930 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1931 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
1932 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
1935 AC_PATH_PROG(CSC_PATH, csc.exe)
1936 if test -n "$CSC_PATH";then
1937 CSC_PATH=`dirname "$CSC_PATH"`
1939 if test -n "$with_csc_path";then
1940 with_csc_path=`cygpath -u "$with_csc_path"`
1942 if test -x "$with_csc_path/csc.exe"; then
1943 CSC_PATH="$with_csc_path"
1945 csctest=`./oowintool --csc-compilerdir`;
1946 if test -x "$csctest/csc.exe"; then
1950 if test ! -x "$CSC_PATH/csc.exe"; then
1951 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
1953 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1954 CSC_PATH=`cygpath -d "$CSC_PATH"`
1955 CSC_PATH=`cygpath -u "$CSC_PATH"`
1956 CSC="$CSC_PATH/csc.exe"
1957 AL="$CSC_PATH/al.exe"
1959 dnl Check mscoree.lib / .NET Frameworks dir
1960 dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
1961 AC_MSG_CHECKING(.NET Framework)
1962 if test -n "$with_frame_home"; then
1963 with_frame_home=`cygpath -u "$with_frame_home"`
1965 if test -f "$with_frame_home/lib/mscoree.lib"; then
1966 FRAME_HOME="$with_frame_home"
1968 if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
1969 FRAME_HOME="$with_cl_home/../SDK/v1.1"
1971 if test -z "$FRAME_HOME" ; then
1972 frametest=`./oowintool --dotnetsdk-dir`
1973 if test -f "$frametest/lib/mscoree.lib"; then
1974 FRAME_HOME="$frametest"
1976 frametest=`./oowintool --psdk-home`
1977 if test -f "$frametest/lib/mscoree.lib"; then
1978 FRAME_HOME="$frametest"
1982 if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
1983 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
1985 AC_MSG_RESULT(found)
1986 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1987 FRAME_HOME=`cygpath -d "$FRAME_HOME"`
1988 FRAME_HOME=`cygpath -u "$FRAME_HOME"`
1991 AC_SUBST(FRAME_HOME)
1993 if test "$_os" = "Linux"; then
1994 AC_MSG_CHECKING([whether to enable Mono bindings])
1998 if test "$enable_mono" != "no" ; then
1999 AC_MSG_RESULT([yes])
2000 if test "z$with_csc_path" != "z"; then
2001 if test -x "$with_csc_path/mcs"; then
2002 CSC_PATH="$with_csc_path"
2004 if test -x "$with_csc_path/bin/mcs"; then
2005 CSC_PATH="$with_csc_path/bin"
2008 if test "z$CSC_PATH" = "z"; then
2009 AC_PATH_PROG(MCS, mcs)
2010 test -z "$MCS" || CSC_PATH=`dirname $MCS`
2013 if test -x "$MCS" -a -x "$AL"; then
2014 MCS_VERSION=`$MCS --version | cut -d" " -f5`
2015 if test "`echo $MCS_VERSION | cut -d"." -f1`" -gt "1" || \
2016 test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
2017 "`echo $MCS_VERSION | cut -d"." -f2`" -ge "2" || \
2018 test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
2019 "`echo $MCS_VERSION | cut -d"." -f2`" = "1" -a \
2020 "`echo $MCS_VERSION | cut -d"." -f3`" -ge "8"; then
2023 AC_PATH_PROG(GMCS, gmcs, no)
2024 AC_PATH_PROG(MKBUNDLE2, mkbundle2, no)
2025 GMCS_VERSION=`$GMCS --version | cut -d" " -f5`
2026 if test "`echo $GMCS_VERSION | cut -d"." -f1`" -gt "1" || \
2027 test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
2028 "`echo $GMCS_VERSION | cut -d"." -f2`" -ge "3" || \
2029 test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
2030 "`echo $GMCS_VERSION | cut -d"." -f2`" = "2" -a \
2031 "`echo $GMCS_VERSION | cut -d"." -f3`" -ge "3"; then
2032 # mkbundle2 does not work on ppc, http://bugzilla.ximian.com/show_bug.cgi?id=81525
2033 if test "`uname -m`" != "ppc" -a "`uname -m`" != "ppc64" ; then
2034 ENABLE_MONO_CLIMAKER=YES
2035 AC_MSG_NOTICE([mono is up-to-date enough - building mono climaker])
2039 if test -n "$enable_mono" ; then
2040 AC_MSG_ERROR([no, mcs >= 1.1.8 is needed.])
2044 if test -n "$enable_mono"; then
2045 AC_MSG_ERROR([mcs or al not found. Make sure they're in the path or use --with-csc-path])
2048 PKG_CHECK_MODULES(MONO, mono >= 1.1.8)
2056 AC_SUBST(ENABLE_MONO)
2057 AC_SUBST(MONO_CFLAGS)
2059 AC_SUBST(ENABLE_MONO_CLIMAKER)
2061 dnl ===================================================================
2062 dnl Check if stdc headers are available excluding windows.
2063 dnl ===================================================================
2064 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2068 dnl ===================================================================
2069 dnl Find pre-processors.
2070 dnl ===================================================================
2071 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2074 dnl Check whether there's a C pre-processor.
2075 dnl ===================================================================
2076 dnl When using SunStudio compiler, there is a bug with the cc
2077 dnl preprocessor, so use CC preprocessor as the cc preprocessor
2078 dnl See Issuezilla #445.
2079 dnl ===================================================================
2080 if test "$_os" = "SunOS"; then
2087 AC_CHECK_SIZEOF(long)
2088 SIZEOF_LONG=$ac_cv_sizeof_long
2089 AC_SUBST(SIZEOF_LONG)
2091 WORDS_BIGENDIAN=$ac_cv_c_bigendian
2092 AC_SUBST(WORDS_BIGENDIAN)
2094 dnl Check for large file support
2096 if test -n "$ac_cv_sys_file_offset_bits"; then
2097 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
2099 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
2100 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
2102 AC_SUBST(LFS_CFLAGS)
2104 dnl ===================================================================
2105 dnl Check if we are to enable vba macro interoperability feature
2106 dnl ===================================================================
2107 AC_MSG_CHECKING([whether to disable vba feature])
2108 if test -n "$enable_vba" && test "$enable_vba" = "no"; then
2109 AC_MSG_RESULT([yes])
2115 AC_SUBST(ENABLE_VBA)
2117 if test "$ENABLE_VBA" = "YES"; then
2118 AC_MSG_CHECKING([how to package the vba compatibility api])
2119 if test -n "$with_vba_package_format"; then
2120 if test "$with_vba_package_format" = "extn"; then
2122 AC_MSG_RESULT([uno extension])
2123 AC_MSG_WARN([--with-vba-package-format=extn can cause problems])
2124 else if test "$with_vba_package_format" = "builtin"; then
2126 AC_MSG_RESULT([build into installset])
2128 AC_MSG_ERROR([unknown packaging method])
2134 AC_MSG_RESULT([defaulting to build into installset])
2139 AC_SUBST(VBA_EXTENSION)
2141 dnl ===================================================================
2142 dnl Check the whether vba need to be delivered as an uno package or part
2144 dnl ===================================================================
2147 dnl ===================================================================
2148 dnl Check if cups/cups.h is available
2149 dnl ===================================================================
2150 if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
2151 AC_CHECK_HEADER(cups/cups.h, [],
2152 [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
2155 dnl ===================================================================
2156 dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
2157 dnl ===================================================================
2158 if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
2159 AC_MSG_CHECKING([whether to enable pam support])
2160 if test -z "$enable_pam" || test "$enable_pam" != "no"; then
2161 AC_MSG_RESULT([yes])
2163 AC_CHECK_HEADER(security/pam_appl.h, [],
2164 [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
2165 AC_MSG_CHECKING([whether to link to libpam])
2166 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
2167 AC_MSG_RESULT([yes])
2169 AC_CHECK_LIB(pam, pam_start, [],
2170 [AC_MSG_ERROR(libpam not found or functional)], [])
2172 AC_MSG_RESULT([no, dynamically open it])
2179 dnl check getspnam_r for needed args (4 or 5)
2180 AX_FUNC_WHICH_GETSPNAM_R
2184 AC_SUBST(NEW_SHADOW_API)
2187 if test "$_os" = "Linux"; then
2188 AC_MSG_CHECKING([whether to link to libcrypt])
2189 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
2190 AC_MSG_RESULT([yes])
2192 AC_CHECK_LIB(crypt, crypt, [],
2193 [AC_MSG_ERROR(libcrypt not found or functional)], [])
2195 AC_MSG_RESULT([no, dynamically open it])
2199 AC_SUBST(CRYPT_LINK)
2201 dnl ===================================================================
2202 dnl Testing for c++ compiler and version...
2203 dnl ===================================================================
2204 if test -n "$with_gcc_home"; then
2205 if test -z "$CXX"; then
2206 CXX="$with_gcc_home/bin/g++"
2210 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2211 if test -e "$CC"; then
2216 dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
2217 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2221 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
2222 if test "$GXX" = "yes"; then
2223 AC_MSG_CHECKING([the GNU C++ compiler version])
2225 _gpp_version=`$CXX -dumpversion`
2226 _gpp_major=`echo $_gpp_version | $AWK -F. '{ print \$1 }'`
2227 _gpp_minor=`echo $_gpp_version | $AWK -F. '{ print \$2 }'`
2229 AC_MSG_RESULT([checked (g++ $_gpp_version)])
2231 if test "$_gpp_major" = "3"; then
2232 if test "$_gpp_minor" = "4"; then
2233 AC_MSG_CHECKING([whether $CXX has the enum bug])
2235 extern "C" void abort (void);
2236 extern "C" void exit (int status);
2238 enum E { E0, E1, E2, E3, E4, E5 };
2243 if (e == E2 || e == E3 || e == E1)
2255 ],[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])])
2260 dnl ===================================================================
2261 dnl Set the gcc/gxx include directories
2262 dnl ===================================================================
2263 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
2264 # often contains an i386 which is expanded as a macro. Solved in stlport.
2265 if test "$GXX" = "yes"; then
2266 AC_MSG_CHECKING([for g++ include path])
2267 if test -z "$with_gxx_include_path"; then
2268 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
2269 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
2270 with_gxx_include_path="/usr/include"
2272 if test "$WITH_MINGWIN" = "yes"; then
2273 with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
2274 with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
2276 if echo $with_gxx_include_path | grep -q linux; then
2277 # workaround for Mandriva - issue 100049
2278 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
2282 dnl This is the original code...
2283 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
2284 if test -z "$with_gxx_include_path"; then
2285 with_gxx_include_path="NO_GXX_INCLUDE"
2286 AC_MSG_RESULT([no g++ includes])
2288 AC_MSG_RESULT([$with_gxx_include_path])
2290 GXX_INCLUDE_PATH="$with_gxx_include_path"
2291 AC_SUBST(GXX_INCLUDE_PATH)
2293 dnl ===================================================================
2294 dnl Set the mingw runtime library include directories
2295 dnl ===================================================================
2296 if test "$WITH_MINGWIN" = "yes"; then
2297 AC_MSG_CHECKING([for mingwin runtime include path])
2298 cat >conftest.$ac_ext <<_ACEOF
2300 #include <bits/c++config.h>
2302 _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`
2304 if test -n "$_mingw_lib_include_path"; then
2306 for a in $_mingw_lib_include_path
2309 _temp="$_temp "`cygpath -u "$a"`
2311 _mingw_lib_include_path=$_temp
2313 if test -z "$_mingw_lib_include_path"; then
2314 _mingw_lib_include_path="NO_LIB_INCLUDE"
2315 AC_MSG_RESULT([no mingwin runtime includes])
2317 AC_MSG_RESULT([$_mingw_lib_include_path])
2319 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
2320 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
2321 dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map
2322 AC_MSG_CHECKING([for mingwin c++ backward include path])
2323 cat >conftest.$ac_ext <<_ACEOF
2326 _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`
2328 if test -n "$_mingw_backward_include_path"; then
2329 _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path`
2330 _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path`
2331 AC_MSG_RESULT([$_mingw_backward_include_path])
2333 _mingw_backward_include_path="NO_BACKWARD_INCLUDE"
2334 AC_MSG_RESULT([no mingwin c++ backward includes])
2336 MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path"
2337 AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH)
2338 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
2339 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
2340 AC_MSG_CHECKING([whether to use dynamic libgcc])
2341 if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then
2342 AC_MSG_CHECKING([dynamic libgcc name])
2343 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'`
2344 MINGW_GCCDLL=`cd $COMPATH && ls $MINGW_GCCDLL_pattern 2>/dev/null`
2345 if test -n "$MINGW_GCCDLL"; then
2346 MINGW_SHARED_GCCLIB=YES
2347 AC_MSG_RESULT([use $MINGW_GCCDLL])
2354 if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then
2357 AC_MSG_CHECKING([whether to use dynamic libstdc++])
2358 if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then
2359 AC_MSG_CHECKING([dynamic libstdc++ name])
2360 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'`
2361 MINGW_GXXDLL=`cd $COMPATH && ls $MINGW_GXXDLL_pattern 2>/dev/null`
2362 if test -n "$MINGW_GXXDLL"; then
2363 MINGW_SHARED_GXXLIB=YES
2364 AC_MSG_RESULT([use $MINGW_GXXDLL])
2371 MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR`
2372 AC_SUBST(MINGW_CLIB_DIR)
2373 AC_SUBST(MINGW_SHARED_GCCLIB)
2374 AC_SUBST(MINGW_GCCLIB_EH)
2375 AC_SUBST(MINGW_SHARED_GXXLIB)
2376 AC_SUBST(MINGW_GCCDLL)
2377 AC_SUBST(MINGW_GXXDLL)
2380 dnl ===================================================================
2381 dnl Extra checking for the SUN OS compiler
2382 dnl ===================================================================
2383 if test "$_os" = "SunOS"; then
2384 dnl SunStudio C++ compiler packaged with SunStudio C compiler
2385 if test "$CC" = "cc"; then
2386 AC_MSG_CHECKING([SunStudio C++ Compiler])
2387 if test "$CXX" != "CC"; then
2388 AC_MSG_WARN([SunStudio C++ was not found])
2389 echo "SunStudio C++ was not found" >> warn
2391 AC_MSG_RESULT([checked])
2395 dnl ===================================================================
2396 dnl Extra checking for the DARWIN compiler
2397 dnl ===================================================================
2398 if test "$_os" = "Darwin"; then
2399 dnl c++ packaged with cc (gcc) for Macosx
2400 if test "$CC" = "cc"; then
2401 AC_MSG_CHECKING([Macosx c++ Compiler])
2402 if test "$CXX" != "c++"; then
2403 AC_MSG_WARN([Macosx C++ was not found])
2404 echo "Macosx C++ was not found" >> warn
2406 AC_MSG_RESULT([checked])
2410 dnl ===================================================================
2411 dnl Extra checking for the IRIX compiler
2412 dnl ===================================================================
2413 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2414 dnl MIPSpro C++ compiler packaged with MIPSpro C compiler
2415 if test "$CC" = "cc"; then
2416 AC_MSG_CHECKING([SGI MIPSpro C++ Compiler])
2417 if test "$CXX" != "CC"; then
2418 AC_MSG_WARN([SGI MIPSpro C++ was not found])
2419 echo "SGI MIPSpro C++ was not found" >> warn
2421 AC_MSG_RESULT([checked])
2425 dnl ===================================================================
2426 dnl Extra checking for the OSF compiler
2427 dnl ===================================================================
2428 if test "$_os" = "OSF1"; then
2429 AC_MSG_CHECKING([Compaq C++ compiler version])
2430 dnl cxx -V outputs to standard error!!!!
2431 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
2432 _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
2433 if test "$_compaqcxx_major" != "V6"; then
2434 AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
2435 echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
2437 dnl compiler will do
2438 AC_MSG_RESULT([checked])
2442 dnl *************************************************************
2443 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
2444 dnl *************************************************************
2445 AC_MSG_CHECKING([exception type])
2447 if test "$WITH_MINGWIN" = "yes"; then
2449 [#include <iostream>
2451 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
2454 [_Unwind_SjLj_RaiseException() ],
2455 [exceptions_type="sjlj"],
2456 [exceptions_type="dwarf2"]
2460 AC_MSG_RESULT($exceptions_type)
2462 EXCEPTIONS="$exceptions_type"
2463 AC_SUBST(EXCEPTIONS)
2465 dnl **************************************************************
2466 dnl Testing for required Solaris and SunStudio compiler patches...
2467 dnl **************************************************************
2468 dnl Check whether the OS is SunOS.
2469 if test "$_os" = "SunOS"; then
2470 _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
2471 if test "$_os_release" = "7"; then
2475 AC_MSG_CHECKING([for patch 106327-06 or greater])
2476 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
2480 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2481 if test "$_patch_major" = "106327"; then
2482 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2483 if test "$_patch_rev" -ge "6"; then
2488 if test "$_patch" = "found"; then
2489 AC_MSG_RESULT([found])
2491 AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
2492 echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
2497 AC_MSG_CHECKING([for patch 106950-11 or greater])
2498 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
2502 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2503 if test "$_patch_major" = "106950"; then
2504 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2505 if test "$_patch_rev" -ge "11"; then
2510 if test "$_patch" = "found"; then
2511 AC_MSG_RESULT([found])
2513 AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
2514 echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
2517 if test "$_os_release" = "6"; then
2521 AC_MSG_CHECKING([for patch 105591-09 or greater])
2522 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
2526 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2527 if test "$_patch_major" = "105591"; then
2528 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2529 if test "$_patch_rev" -ge "9"; then
2534 if test "$_patch" = "found"; then
2535 AC_MSG_RESULT([found])
2537 AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
2538 echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
2543 AC_MSG_CHECKING([for patch 107733-08 or greater])
2544 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
2548 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2549 if test "$_patch_major" = "107733"; then
2550 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2551 if test "$_patch_rev" -ge "8"; then
2556 if test "$_patch" = "found"; then
2557 AC_MSG_RESULT([found])
2559 AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
2560 echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
2566 dnl ===================================================================
2567 dnl Checks for SGI STL
2568 dnl ===================================================================
2569 if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then
2570 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2571 AC_MSG_CHECKING([for SGI STL])
2572 if test -d /usr/include/CC ; then
2573 AC_MSG_RESULT([yes.])
2576 AC_MSG_RESULT([not found.])
2579 AC_MSG_ERROR([Option --enable-sgistl is only valid for IRIX])
2583 dnl ===================================================================
2584 dnl Checks for what the default STL should be
2585 dnl ===================================================================
2586 AC_MSG_CHECKING([what the default STL should be])
2587 DEFAULT_TO_STLPORT="no"
2588 if test "$_os" = "Linux"; then
2589 case "$build_cpu" in
2591 DEFAULT_TO_STLPORT="yes"
2594 DEFAULT_TO_STLPORT="no"
2597 elif test "$_os" = "SunOS"; then
2598 DEFAULT_TO_STLPORT="yes"
2599 elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2600 DEFAULT_TO_STLPORT="yes"
2601 elif test "$_os" = "OS2"; then
2602 DEFAULT_TO_STLPORT="yes"
2603 elif test "$_os" = "FreeBSD"; then
2604 DEFAULT_TO_STLPORT="yes"
2606 if test "$DEFAULT_TO_STLPORT" = "yes"; then
2607 AC_MSG_RESULT([stlport])
2609 AC_MSG_RESULT([system])
2611 if test "$WITH_STLPORT" = "auto"; then
2612 WITH_STLPORT=$DEFAULT_TO_STLPORT
2615 dnl ===================================================================
2616 dnl Checks for STLPORT
2617 dnl ===================================================================
2618 AC_MSG_CHECKING([for STL providing headers])
2621 if test "$WITH_STLPORT" = "yes"; then
2622 AC_MSG_RESULT([using internal stlport.])
2623 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2624 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2625 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2627 elif test "$WITH_STLPORT" = "no"; then
2628 AC_MSG_RESULT([using system STL])
2629 USE_SYSTEM_STL="YES"
2630 if test "$DEFAULT_TO_STLPORT" != "no"; then
2631 AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
2632 echo "using system STL. Warning, breaks your ABI compatability!" >>warn
2635 STLPORT4=$WITH_STLPORT
2636 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2637 AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
2639 dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
2640 if test -f "$STLPORT4/stlport/hash_map"; then
2641 AC_MSG_RESULT([checked.])
2643 AC_MSG_ERROR([STLport headers not found.])
2646 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2647 AC_MSG_CHECKING([for STLport libraries])
2648 if test "$_os" = "SunOS"; then
2649 if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
2650 AC_MSG_RESULT([checked])
2651 elif test -f "$STLPORT4/lib/libstlport.so"; then
2652 AC_MSG_RESULT([checked])
2655 AC_MSG_ERROR([STLport libraries not found])
2657 elif test "$_os" = "Darwin"; then
2658 if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
2659 AC_MSG_RESULT([checked])
2660 elif test -f "$STLPORT4/lib/libstlport.dylib"; then
2661 AC_MSG_RESULT([checked])
2664 AC_MSG_ERROR([STLport libraries not found])
2666 elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2667 if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then
2668 AC_MSG_RESULT([checked])
2670 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2671 AC_MSG_RESULT([checked])
2672 elif test -f "$STLPORT4/lib/libstlport.so"; then
2673 AC_MSG_RESULT([checked])
2676 AC_MSG_ERROR([STLport libraries not found])
2680 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2681 AC_MSG_RESULT([checked])
2682 elif test -f "$STLPORT4/lib/libstlport.so"; then
2683 AC_MSG_RESULT([checked])
2686 AC_MSG_ERROR([STLport libraries not found])
2690 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2691 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2692 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2697 if test -z "$STLPORT4"; then
2698 STLPORT4="NO_STLPORT4"
2700 if test -z "$STLPORT_VER"; then
2704 AC_SUBST(STLPORT_VER)
2705 AC_SUBST(USE_SYSTEM_STL)
2707 dnl ===================================================================
2708 dnl visibility feature
2709 dnl ===================================================================
2710 if test "$GCC" = "yes"; then
2711 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
2713 CFLAGS="$CFLAGS -fvisibility=hidden"
2714 AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
2716 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2717 AC_MSG_RESULT([yes])
2723 # ===================================================================
2724 # use --ccache-skip?
2725 # ===================================================================
2726 dnl used to escape compiler options for ccache that otherwise prevent
2727 dnl caching of the results (like "-x objective-c++" for Mac)
2728 AC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip])
2729 if test "$_os" != "Darwin" ; then
2730 AC_MSG_RESULT([only used on Mac currently, skipping])
2731 elif test "$enable_ccache_skip" = "no" ; then
2732 AC_MSG_RESULT([no - diabled explicitly])
2733 elif test "$enable_ccache_skip" = "yes" ; then
2734 AC_MSG_RESULT([yes - enabled explicitly, skipping checks])
2735 AC_SUBST([USE_CCACHE], [YES])
2736 elif test "$enable_ccache_skip" = "auto" ; then
2737 # checking for ccache presence/version
2738 AC_MSG_RESULT([probing...])
2739 AC_PATH_PROG([CCACHE],[ccache],[not_found])
2740 if test "$CCACHE" = "not_found" ; then
2741 AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)])
2743 # check ccache version
2744 AC_MSG_CHECKING([whether version of ccache is suitable])
2745 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2746 if test "$CCACHE_VERSION" = "2.4_OOo"; then
2747 AC_MSG_RESULT([yes])
2748 AC_MSG_CHECKING([whether ccache is actually used for the build])
2750 save_CXXFLAGS=$CXXFLAGS
2751 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
2752 dnl an empty program will do, we're checking the compiler flags
2753 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),
2754 [use_ccache=yes], [use_ccache=no])
2755 if test $use_ccache = yes ; then
2756 AC_MSG_RESULT([yes, will enable --ccache-skip])
2757 AC_SUBST([USE_CCACHE], [YES])
2759 AC_MSG_RESULT([no, will not enable --ccache-skip])
2761 CXXFLAGS=$save_CXXFLAGS
2765 AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip])
2769 AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"])
2772 dnl ===================================================================
2773 dnl system stl sanity tests
2774 dnl ===================================================================
2775 HAVE_GCC_VISIBILITY_BROKEN=
2776 if test "$USE_SYSTEM_STL" = "YES"; then
2777 AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
2780 AC_TRY_COMPILE([#include <ext/hash_map>
2781 using namespace __gnu_cxx;
2782 ],[hash_map<int, int> t; return 0;],
2783 ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
2785 if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
2786 AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
2788 AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
2791 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2792 AC_MSG_CHECKING([if STL headers are visibility safe])
2793 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
2794 AC_MSG_RESULT([$stlvisok])
2795 if test "$stlvisok" = "no"; then
2796 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
2797 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
2798 unset HAVE_GCC_VISIBILITY_FEATURE
2802 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2803 sharedlink_ldflags_save=$LDFLAGS
2804 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
2806 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
2807 AC_TRY_LINK([#include <sstream>
2808 using namespace std;
2809 ],[istringstream strm( "test" ); return 0;],
2810 $EGREP -q unresolvable conftest.err;
2811 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
2813 AC_MSG_RESULT([$gccvisok])
2814 if test "$gccvisok" = "no"; then
2815 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
2816 echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn
2817 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
2820 LDFLAGS=$sharedlink_ldflags_save
2823 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2824 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
2825 cat >visibility.cxx <<_ACEOF
2826 #pragma GCC visibility push(hidden)
2827 struct __attribute__ ((visibility ("default"))) TestStruct {
2830 __attribute__ ((visibility ("default"))) void TestFunc() {
2834 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
2837 if $EGREP -q '@PLT|\$stub' visibility.s; then
2845 AC_MSG_RESULT([$gccvisbroken])
2846 if test "$gccvisbroken" = "yes"; then
2847 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
2848 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
2849 unset HAVE_GCC_VISIBILITY_FEATURE
2856 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
2857 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
2859 dnl ===================================================================
2861 dnl ===================================================================
2862 AC_MSG_CHECKING([which memory allocator to use])
2863 if test "$with_alloc" = "system"; then
2864 AC_MSG_RESULT([system])
2866 AC_CHECK_FUNCS([malloc realloc calloc free])
2868 if test "$with_alloc" = "tcmalloc"; then
2869 AC_MSG_RESULT(tcmalloc)
2870 if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
2871 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
2873 AC_CHECK_LIB(tcmalloc, malloc, [],
2874 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
2877 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
2878 AC_MSG_RESULT([internal])
2882 dnl ===================================================================
2883 dnl Custom build version
2884 dnl ===================================================================
2886 AC_MSG_CHECKING([whether to add custom build version])
2887 if test "z$with_build_version" != "z"; then
2888 BUILD_VER_STRING=$with_build_version
2889 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
2894 AC_SUBST(BUILD_VER_STRING)
2896 dnl ===================================================================
2897 dnl Java support enable
2898 dnl ===================================================================
2899 AC_MSG_CHECKING([whether to build with Java support])
2900 if test "$WITH_JAVA" != "no"; then
2901 AC_MSG_RESULT([yes])
2907 AC_MSG_WARN([building without java will mean some features will not be available])
2908 echo "building without java will mean some features will not be available" >>warn
2910 AC_SUBST(SOLAR_JAVA)
2912 if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
2913 # IBMs JDK needs this...
2914 JITC_PROCESSOR_TYPE=6
2915 export JITC_PROCESSOR_TYPE
2918 if test "$_os" = "WINNT"; then
2919 if test -z "$with_jdk_home"; then
2920 _jdk_home=`./oowintool --jdk-home`
2921 if test -d "$_jdk_home"; then
2922 with_jdk_home="$_jdk_home"
2925 with_jdk_home=`cygpath -u "$with_jdk_home"`
2929 dnl ===================================================================
2931 dnl ===================================================================
2932 if test "$SOLAR_JAVA" != ""; then
2933 JAVA_HOME=; export JAVA_HOME
2934 if test -z "$with_jdk_home"; then
2935 AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
2937 _java_path="$with_jdk_home/bin/$WITH_JAVA"
2938 dnl Check if there is a java interpreter at all.
2939 if test -x "$_java_path"; then
2940 JAVAINTERPRETER=$_java_path
2942 AC_MSG_ERROR([$_java_path not found set with_jdk_home])
2945 if test "$_os" = "WINNT"; then
2946 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
2947 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
2949 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
2950 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
2954 dnl ===================================================================
2956 dnl ===================================================================
2957 if test "$SOLAR_JAVA" != ""; then
2959 AC_MSG_CHECKING([the installed JDK])
2960 if test -n "$JAVAINTERPRETER"; then
2961 dnl java -version sends output to stderr!
2962 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2963 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2964 # dnl Kaffe specific tests
2965 # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
2966 # if test -z "$KAFFE_VER"; then
2967 # AC_MSG_ERROR([looks like Kaffe but version detection failed])
2969 # _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2970 # if test "$_kaffe_ver" -lt 10100; then
2971 # AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
2975 # dnl TODO: define some project exclusion variables
2977 # AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
2978 # AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
2979 # echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
2980 # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2981 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
2983 AC_MSG_RESULT([checked (gcj)])
2984 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2985 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2987 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
2988 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2991 # dnl BEA JDK specific tests
2992 # _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2993 # _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2995 # if test "$_jdk_ver" -lt 10500; then
2996 # AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0])
2999 # AC_MSG_RESULT([checked (BEA JDK $_jdk)])
3001 # if test "$with_jdk_home" = ""; then
3002 # AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
3003 #you must use the "--with-jdk-home" configure option explicitly])
3006 # AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
3007 # echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
3009 # JAVA_HOME=$with_jdk_home
3011 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
3014 dnl IBM JDK specific tests
3015 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
3016 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
3018 if test "$_jdk_ver" -lt 10600; then
3019 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.6])
3022 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
3024 if test "$with_jdk_home" = ""; then
3025 AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
3026 you must use the "--with-jdk-home" configure option explicitly])
3029 JAVA_HOME=$with_jdk_home
3034 dnl SUN JDK specific tests
3035 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
3036 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
3038 if test "$_jdk_ver" -lt 10500; then
3039 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
3041 AC_MSG_RESULT([checked (JDK $_jdk)])
3042 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
3043 if test "$_os" = "WINNT"; then
3044 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
3046 if test "$_os" = "OS2"; then
3047 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
3051 AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
3055 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
3058 _java_target_ver="1.5"
3059 dnl ===================================================================
3060 dnl Check for target java bytecode version
3061 dnl ===================================================================
3062 if test "$SOLAR_JAVA" != ""; then
3063 AC_MSG_CHECKING([for target java bytecode version])
3064 if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
3065 AC_MSG_RESULT([default by $JDK])
3066 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
3067 AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
3070 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
3071 _java_target_ver="$with_java_target_version"
3072 AC_MSG_RESULT([$_java_target_ver])
3073 elif test $_jdk_ver -gt 10000 ; then
3074 _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
3075 AC_MSG_RESULT([$_java_target_ver])
3077 AC_MSG_ERROR([Unable to guess java bytecode version from java version!])
3081 if ! test -z "$_java_target_ver" -o \
3082 "$_java_target_ver" = "1.1" -o \
3083 "$_java_target_ver" = "1.2" -o \
3084 "$_java_target_ver" = "1.3" -o \
3085 "$_java_target_ver" = "1.4" -o \
3086 "$_java_target_ver" = "1.5" -o \
3087 "$_java_target_ver" = "1.6" -o \
3088 "$_java_target_ver" = "5" ; then
3089 AC_MSG_ERROR([$_java_target_ver is not supported java bytecode version!])
3092 JAVA_SOURCE_VER="$_java_target_ver"
3093 JAVA_TARGET_VER="$_java_target_ver"
3096 dnl ===================================================================
3097 dnl Checks for javac
3098 dnl ===================================================================
3099 if test "$SOLAR_JAVA" != ""; then
3100 if test "$JDK" = "gcj"; then
3101 javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
3103 javacompiler="javac"
3105 if test "$_os" = "OS2"; then
3106 if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
3107 javacompiler="${javacompiler}.exe"
3110 if test -z "$with_jdk_home"; then
3111 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
3113 _javac_path="$with_jdk_home/bin/$javacompiler"
3114 dnl Check if there is a java compiler at all.
3115 if test -x "$_javac_path"; then
3116 JAVACOMPILER=$_javac_path
3119 if test -z "$JAVACOMPILER"; then
3120 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
3122 if test "$_os" = "WINNT"; then
3123 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
3124 JAVACOMPILER="${JAVACOMPILER}.exe"
3126 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
3127 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
3129 if test "$_os" = "OS2"; then
3130 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
3131 JAVACOMPILER="${JAVACOMPILER}.exe"
3135 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
3136 AC_MSG_CHECKING([re-checking JDK])
3138 AC_MSG_RESULT([checked (ecj)])
3139 #TODO: what's to do here? some switch to do 1.5 compiling?
3140 JAVAFLAGS="-source 1.5 -target 1.5"
3141 _gij_longver="50000"
3146 dnl ===================================================================
3147 dnl Checks that javac is gcj
3148 dnl ===================================================================
3149 if test "$SOLAR_JAVA" != ""; then
3150 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
3154 AC_SUBST(JAVACISGCJ)
3157 dnl ===================================================================
3158 dnl Checks that javac is kaffe
3159 dnl ===================================================================
3160 if test "$SOLAR_JAVA" != ""; then
3161 if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
3165 AC_SUBST(JAVACISKAFFE)
3167 dnl ===================================================================
3168 dnl Checks for javadoc
3169 dnl ===================================================================
3170 if test "$SOLAR_JAVA" != ""; then
3171 if test -z "$with_jdk_home"; then
3172 AC_PATH_PROG(JAVADOC, javadoc)
3174 _javadoc_path="$with_jdk_home/bin/javadoc"
3175 if test "$_os" = "OS2"; then
3176 if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
3177 _javadoc_path="${_javadoc_path}.exe"
3180 dnl Check if there is a javadoc at all.
3181 if test -x "$_javadoc_path"; then
3182 JAVADOC=$_javadoc_path
3184 AC_PATH_PROG(JAVADOC, javadoc)
3187 if test -z "$JAVADOC"; then
3188 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
3190 if test "$_os" = "WINNT"; then
3191 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
3192 JAVADOC="${JAVADOC}.exe"
3194 JAVADOC=`cygpath -d "$JAVADOC"`
3195 JAVADOC=`cygpath -u "$JAVADOC"`
3197 if test "$_os" = "OS2"; then
3198 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
3199 JAVADOC="${JAVADOC}.exe"
3204 if test "$SOLAR_JAVA" != ""; then
3205 dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
3206 if test "$JDK" == "gcj" -a -z "$JAVA_HOME"; then
3207 if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "50000"; then
3208 cat > findhome.java <<_ACEOF
3209 [import java.io.File;
3213 public static void main(String args[])
3215 String jrelocation = System.getProperty("java.home");
3216 File jre = new File(jrelocation);
3217 System.out.println(jre.getParent());
3221 AC_MSG_CHECKING([if javac works])
3222 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
3223 AC_TRY_EVAL(javac_cmd)
3224 if test $? = 0 && test -f ./findhome.class ; then
3225 AC_MSG_RESULT([javac works])
3227 echo "configure: javac test failed" >&5
3228 cat findhome.java >&5
3229 AC_MSG_ERROR([javac does not work - java projects will not build!])
3232 AC_MSG_CHECKING([if gij knows its java.home])
3233 JAVA_HOME=`$JAVAINTERPRETER findhome`
3234 if test $? = 0 && test "$JAVA_HOME" != "" ; then
3235 AC_MSG_RESULT([$JAVA_HOME])
3237 echo "configure: java test failed" >&5
3238 cat findhome.java >&5
3239 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
3242 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
3246 dnl second sanity check JAVA_HOME if possible
3247 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "50000"; then
3248 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
3249 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
3251 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
3252 # try to recover first by looking whether we have a alternatives
3253 # system as in Debian or newer SuSEs where following /usr/bin/javac
3254 # over /etc/alternatives/javac leads to the right bindir where we
3255 # just need to strip a bit away to get a valid JAVA_HOME
3256 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
3257 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
3258 # maybe only one level of symlink (e.g. on Mac)
3259 JAVA_HOME=$(readlink $JAVACOMPILER)
3262 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
3263 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
3264 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
3265 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
3267 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
3268 if test "$JAVA_HOME" != "/usr"; then
3269 if test "$_os" = "Darwin"; then
3270 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
3271 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
3272 dnl Tiger already returns a JDK path..
3273 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
3275 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
3279 # now check if $JAVA_HOME is really valid
3280 if test "$_os" = "Darwin"; then
3281 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
3284 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
3287 if test "$JAVA_HOME_OK" = "NO"; then
3288 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
3289 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
3290 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
3291 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
3292 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
3293 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
3294 # if test "$JDK" == "gcj"; then
3295 # 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
3302 if test "$SOLAR_JAVA" != ""; then
3303 AC_MSG_CHECKING([for jawt lib name])
3304 if test "$JDK" = "gcj"; then
3306 save_LDFLAGS=$LDFLAGS
3307 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3308 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
3309 exec 6>/dev/null # no output
3310 AC_CHECK_HEADER(jni.h, [],
3311 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
3312 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
3313 exec 6>&1 # output on again
3315 LDFLAGS=$save_LDFLAGS
3317 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
3318 # A workaround is to link also against libpmawt.so
3319 if test "$JDK" = "ibm" ; then
3321 save_LDFLAGS=$LDFLAGS
3322 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
3323 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3324 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
3325 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
3326 export LD_LIBRARY_PATH
3327 exec 6>/dev/null # no output
3328 AC_CHECK_HEADER(jni.h, [],
3329 [AC_MSG_ERROR([jni.h could not be found.])], [])
3330 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
3331 if test -z "$AWTLIB"; then
3332 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
3333 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
3335 exec 6>&1 # output on again
3337 LDFLAGS=$save_LDFLAGS
3338 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
3340 if test -z "$AWTLIB"; then
3343 AC_MSG_RESULT([$AWTLIB])
3347 dnl ===================================================================
3348 dnl Check for optional gcj for AOT
3349 dnl ===================================================================
3350 if test "$SOLAR_JAVA" != ""; then
3351 AC_MSG_CHECKING([whether to enable gcj aot compilation])
3352 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
3353 AC_MSG_RESULT([yes])
3354 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
3357 gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
3359 AC_MSG_RESULT([$gcjaot])
3360 if test -n "$with_jdk_home"; then
3361 _javac_path="$with_jdk_home/bin/$gcjaot"
3362 dnl Check if there is a gcj at all.
3363 if test -x "$_javac_path"; then
3364 JAVAAOTCOMPILER=$_javac_path
3367 if test -z "$JAVAAOTCOMPILER"; then
3368 AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
3370 if test -z "$JAVAAOTCOMPILER"; then
3371 AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
3381 AC_SUBST(JAVA_SOURCE_VER)
3382 AC_SUBST(JAVA_TARGET_VER)
3383 AC_SUBST(JAVAINTERPRETER)
3384 AC_SUBST(JAVACOMPILER)
3385 AC_SUBST(JAVAAOTCOMPILER)
3388 dnl ===================================================================
3389 dnl Checks for specific files.
3390 dnl ===================================================================
3392 dnl ===================================================================
3393 dnl Checks for programs.
3394 dnl ===================================================================
3396 dnl ===================================================================
3397 dnl Check whether we already have dmake
3398 dnl ===================================================================
3399 AC_PATH_PROG(DMAKE, dmake, no)
3400 if test "$DMAKE" = "no"; then
3402 echo "dmake will be built on ./bootstrap"
3404 AC_MSG_CHECKING([whether the found dmake is the right dmake])
3405 # we need to find out whether that dmake we found is "our" dmake
3406 # or the dmake from Sun's SunStudio Compiler which is something
3408 # This test _should_ work because the one accepts -V (ours) and one
3409 # (the other) not...
3410 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3411 if test $? -eq 0; then
3413 AC_MSG_RESULT([yes])
3414 AC_MSG_CHECKING([the dmake version])
3415 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3416 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3417 AC_MSG_RESULT([OK, >= 4.11])
3418 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3419 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3420 AC_MSG_RESULT([OK, >= 4.11])
3422 AC_MSG_RESULT([too old. >= 4.11 is needed])
3423 echo "A newer dmake will be built on ./bootstrap"
3428 echo "dmake will be built on ./bootstrap"
3432 AC_SUBST(BUILD_DMAKE)
3434 AC_MSG_CHECKING([whether to enable EPM for packing])
3435 if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -o "$enable_epm" != "no" \) ; then
3436 AC_MSG_RESULT([yes])
3437 dnl ===================================================================
3438 dnl Check for epm - not needed for windows
3439 dnl ===================================================================
3440 if test "$_os" != "WINNT"; then
3441 if test -n "$with_epm"; then
3444 AC_PATH_PROG(EPM, epm, no)
3446 if test "$EPM" = "no" || test "$EPM" = "internal"; then
3447 echo "EPM will be built."
3449 BUILD_TYPE="$BUILD_TYPE EPM"
3451 # Gentoo has some epm which is something different...
3452 AC_MSG_CHECKING([whether the found epm is the right epm])
3453 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
3454 AC_MSG_RESULT([yes])
3456 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
3458 AC_MSG_CHECKING([epm version])
3459 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
3460 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
3461 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
3462 AC_MSG_RESULT([OK, >= 3.7])
3464 if test "$_os" = "Darwin"; then
3465 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
3466 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
3467 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3468 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)])
3469 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3470 AC_MSG_RESULT([$_pm, ok])
3471 else # we never should get here, but go safe
3472 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)])
3476 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
3477 echo "EPM will be built."
3479 BUILD_TYPE="$BUILD_TYPE EPM"
3484 # test which package format to use
3485 AC_MSG_CHECKING([which package format to use])
3486 # epm supports the following formats:
3487 # aix - AIX software distribution
3488 # bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3489 # depot or swinstall - HP-UX software distribution
3490 # deb - Debian software distribution
3491 # inst or tardist - IRIX software distribution
3492 # osx - MacOS X software distribution
3493 # pkg - Solaris software distribution
3494 # rpm - RedHat software distribution
3495 # setld - Tru64 (setld) software distribution
3496 # native - "Native" software distribution for the platform
3497 # portable - Portable software distribution
3511 # if building on Debian, default should be deb...
3512 if test -e /etc/debian_version; then
3530 # we never should get here since we check the arciecture/os at the beginning,
3533 AC_MSG_ERROR([unknown system])
3535 if test -n "$with_package_format"; then
3536 for i in $with_package_format; do
3538 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable)
3541 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
3542 aix - AIX software distribution
3543 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3544 depot or swinstall - HP-UX software distribution
3545 deb - Debian software distribution
3546 inst or tardist - IRIX software distribution
3547 osx - MacOS X software distribution
3548 pkg - Solaris software distribution
3549 rpm - RedHat software distribution
3550 setld - Tru64 (setld) software distribution
3551 native - "Native" software distribution for the platform
3552 portable - Portable software distribution
3557 PKGFORMAT="$with_package_format"
3559 AC_MSG_RESULT([$PKGFORMAT])
3560 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
3561 AC_MSG_CHECKING([for rpm])
3562 for a in "$RPM" rpmbuild rpm; do
3563 $a --usage >/dev/null 2> /dev/null
3564 if test $? -eq 0; then
3568 $a --version >/dev/null 2> /dev/null
3569 if test $? -eq 0; then
3575 if test -z "$RPM" ; then
3576 AC_MSG_ERROR([not found])
3578 RPM_PATH=`which $RPM`
3579 AC_MSG_RESULT([$RPM_PATH])
3582 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
3583 AC_PATH_PROG(DPKG, dpkg, no)
3584 if test "$DPKG" = "no"; then
3585 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
3588 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
3589 if test "$_os" = "Darwin"; then
3590 AC_MSG_CHECKING([for PackageMaker availability])
3591 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
3592 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
3597 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
3600 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
3601 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3602 if test "$EPM" != "no" && test "$EPM" != "internal"; then
3603 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
3604 AC_MSG_CHECKING([whether epm is patched for OOos needs])
3605 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
3606 AC_MSG_RESULT([yes])
3609 if echo "$PKGFORMAT" | grep -q rpm; then
3611 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
3612 echo "the rpms will need to be installed with --nodeps" >> warn
3616 AC_MSG_WARN([the ${_pt}s will not be relocateable])
3617 echo "the ${_pt}s will not be relocateable" >> warn
3618 AC_MSG_WARN([if you want to make sure installation without --nodeps and
3619 relocation will work, you need to patch your epm with the
3620 patch in epm/epm-3.7.patch or build with
3621 --with-epm=internal which will build a suitable epm])
3626 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3627 AC_PATH_PROG(PKGMK, pkgmk, no)
3628 if test "$PKGMK" = "no"; then
3629 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
3643 dnl ===================================================================
3645 dnl ===================================================================
3646 AC_PATH_PROG(GPERF, gperf)
3647 if test -z "$GPERF"; then
3648 AC_MSG_ERROR([gperf not found but needed. Install it.])
3650 AC_MSG_CHECKING([gperf version])
3651 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
3654 AC_MSG_ERROR([too old, you need at least 3.0.0])
3657 dnl ===================================================================
3658 dnl Check for building stax
3659 dnl ===================================================================
3660 AC_MSG_CHECKING([whether to build the stax])
3661 if test -f "external/StAX/jsr173_1.0_api.jar"; then
3663 AC_MSG_RESULT([no, will use the prebuilt external/StAX/jsr173_1.0_api.jar])
3666 AC_MSG_RESULT([yes])
3668 AC_SUBST(BUILD_STAX)
3670 dnl ===================================================================
3671 dnl Check for building ODK
3672 dnl ===================================================================
3673 AC_MSG_CHECKING([whether to build the ODK])
3674 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
3675 AC_MSG_RESULT([yes])
3676 if test "$WITH_JAVA" != "no"; then
3677 AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
3678 if ! test -f "./external/unowinreg/unowinreg.dll"; then
3679 HAVE_UNOWINREG_DLL=no
3681 HAVE_UNOWINREG_DLL=yes
3683 if test "$HAVE_UNOWINREG_DLL" = "yes"; then
3684 AC_MSG_RESULT([found])
3687 if test "$_os" = "WINNT"; then
3688 AC_MSG_RESULT([not found, will be built])
3690 AC_MSG_WARN([not found, will be cross-built using mingw32])
3694 if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
3695 if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
3696 AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
3697 Specify mingw32 g++ executable name with --with-mingwin.
3698 Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
3699 put it into external/unowinreg])
3701 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3702 if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
3704 AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
3706 if test "$MINGWCXX" = "false"; then
3707 AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
3709 AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
3710 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
3715 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3716 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
3718 AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/`, false)
3720 if test "$MINGWSTRIP" = "false"; then
3721 AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
3727 CXXCPP="$MINGWCXX -E"
3728 save_CXXFLAGS=$CXXFLAGS
3729 save_CPPFLAGS=$CPPFLAGS
3730 CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
3731 CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
3732 # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
3733 # do not make sense here (and 'd make the check fail)
3736 AC_HAVE_LIBRARY(kernel32)
3737 AC_HAVE_LIBRARY(advapi32)
3738 AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
3739 CXXFLAGS=$save_CXXFLAGS
3740 CPPFLAGS=$save_CPPFLAGS
3747 BUILD_TYPE="$BUILD_TYPE ODK"
3752 AC_SUBST(BUILD_UNOWINREG)
3754 AC_SUBST(MINGWSTRIP)
3756 dnl ===================================================================
3757 dnl Check for building qadevOOo
3758 dnl ===================================================================
3759 AC_MSG_CHECKING([whether to build qadevOOo])
3760 if test "z$enable_qadevooo" = "z" -o "$enable_qadevooo" != "no"; then
3761 AC_MSG_RESULT([yes])
3762 BUILD_QADEVOOO="YES"
3763 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
3768 AC_SUBST(BUILD_QADEVOOO)
3770 dnl ===================================================================
3771 dnl Check for prelinked libgcc_s.so.1
3772 dnl ===================================================================
3773 if test -z "$with_system_stdlibs" -a -z "$with_system_libs"; then
3774 if test -n "$checkforprelink" -a -f /etc/rpm/macros.prelink; then
3775 with_system_stdlibs=yes
3776 AC_MSG_WARN([prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override])
3777 echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn
3781 dnl ===================================================================
3782 dnl Check for system stdlibs
3783 dnl ===================================================================
3784 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
3785 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
3786 test "$with_system_stdlibs" != "no"; then
3790 AC_MSG_RESULT([yes])
3793 AC_SUBST(SYSTEM_STDLIBS)
3795 dnl ===================================================================
3796 dnl Check for system zlib
3797 dnl ===================================================================
3798 if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
3799 with_system_zlib=yes
3801 AC_MSG_CHECKING([which zlib to use])
3802 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
3803 test "$with_system_zlib" != "no"; then
3804 AC_MSG_RESULT([external])
3806 AC_CHECK_HEADER(zlib.h, [],
3807 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
3808 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
3809 [AC_MSG_ERROR(zlib not found or functional)], [])
3811 AC_MSG_RESULT([internal])
3813 BUILD_TYPE="$BUILD_TYPE ZLIB"
3815 AC_SUBST(SYSTEM_ZLIB)
3817 dnl ===================================================================
3818 dnl Check for system jpeg
3819 dnl ===================================================================
3820 AC_MSG_CHECKING([which jpeg to use])
3821 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
3822 test "$with_system_jpeg" != "no"; then
3823 AC_MSG_RESULT([external])
3825 AC_CHECK_HEADER(jpeglib.h, [],
3826 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
3827 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
3828 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
3830 AC_MSG_RESULT([internal])
3832 BUILD_TYPE="$BUILD_TYPE JPEG"
3834 AC_SUBST(SYSTEM_JPEG)
3836 dnl ===================================================================
3837 dnl Check for system expat
3838 dnl ===================================================================
3839 AC_MSG_CHECKING([which expat to use])
3840 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
3841 test "$with_system_expat" != "no"; then
3842 AC_MSG_RESULT([external])
3844 AC_CHECK_HEADER(expat.h, [],
3845 [AC_MSG_ERROR(expat.h not found. install expat)], [])
3846 AC_CHECK_LIB(expat, XML_ParserCreate, [],
3847 [AC_MSG_RESULT(expat library not found or functional.)], [])
3849 AC_MSG_RESULT([internal])
3851 BUILD_TYPE="$BUILD_TYPE EXPAT"
3853 AC_SUBST(SYSTEM_EXPAT)
3855 dnl ===================================================================
3856 dnl Check for system libwpd
3857 dnl ===================================================================
3858 AC_MSG_CHECKING([which libwpd to use])
3859 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
3860 test "$with_system_libwpd" != "no"; then
3861 AC_MSG_RESULT([external])
3863 PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
3865 AC_MSG_RESULT([internal])
3867 BUILD_TYPE="$BUILD_TYPE LIBWPD"
3869 AC_SUBST(SYSTEM_LIBWPD)
3870 AC_SUBST(LIBWPD_CFLAGS)
3871 AC_SUBST(LIBWPD_LIBS)
3873 dnl ===================================================================
3874 dnl Check whether freetype is available
3875 dnl ===================================================================
3876 if test "$test_freetype" = "yes"; then
3877 AC_MSG_CHECKING([whether freetype is available])
3878 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
3880 AC_SUBST(FREETYPE_CFLAGS)
3881 AC_SUBST(FREETYPE_LIBS)
3883 dnl ===================================================================
3884 dnl Check for system libwps
3885 dnl ===================================================================
3886 AC_MSG_CHECKING([which libwps to use])
3887 if test -n "$with_system_libwps" -o -n "$with_system_libs" && \
3888 test "$with_system_libwps" != "no"; then
3889 AC_MSG_RESULT([external])
3891 PKG_CHECK_MODULES( LIBWPS, libwps-0.1 )
3893 AC_MSG_RESULT([internal])
3895 BUILD_TYPE="$BUILD_TYPE LIBWPS"
3897 AC_SUBST(SYSTEM_LIBWPS)
3898 AC_SUBST(LIBWPS_CFLAGS)
3899 AC_SUBST(LIBWPS_LIBS)
3901 dnl ===================================================================
3902 dnl Check for system libwpg
3903 dnl ===================================================================
3904 AC_MSG_CHECKING([which libwpg to use])
3905 if test -n "$with_system_libwpg" -o -n "$with_system_libs" && \
3906 test "$with_system_libwpg" != "no"; then
3907 AC_MSG_RESULT([external])
3909 PKG_CHECK_MODULES( LIBWPG, libwpg-0.1 )
3911 AC_MSG_RESULT([internal])
3913 BUILD_TYPE="$BUILD_TYPE LIBWPG"
3915 AC_SUBST(SYSTEM_LIBWPG)
3916 AC_SUBST(LIBWPG_CFLAGS)
3917 AC_SUBST(LIBWPG_LIBS)
3919 dnl ===================================================================
3920 dnl Check whether freetype2 supports emboldening
3921 dnl ===================================================================
3922 if test "$test_freetype" = "yes"; then
3923 save_CPPFLAGS="$CPPFLAGS"
3924 save_LDFLAGS="$LDFLAGS"
3926 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
3927 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
3928 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
3929 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
3930 LDFLAGS="$save_LDFLAGS"
3931 CPPFLAGS="$save_CPPFLAGS"
3934 AC_SUBST(USE_FT_EMBOLDEN)
3936 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
3937 test "$with_system_libxslt" != "no"; then
3938 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
3939 test "$with_system_libxml" == "no"; then
3940 # somehow AC_MSG_WARN won't work...
3941 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
3942 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
3943 with_system_libxml=yes
3946 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
3947 test "$with_system_libxml" != "no"; then
3948 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
3949 test "$with_system_libxslt" == "no"; then
3950 # somehow AC_MSG_WARN won't work...
3951 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
3952 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
3953 with_system_libxslt=yes
3957 dnl ===================================================================
3958 dnl Check for system libxslt
3959 dnl ===================================================================
3960 AC_MSG_CHECKING([which libxslt to use])
3961 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
3962 "$_os" = "Darwin" && \
3963 test "$with_system_libxslt" != "no"; then
3964 AC_MSG_RESULT([external])
3967 PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
3969 dnl Check for xsltproc
3970 AC_PATH_PROG(XSLTPROC, xsltproc, no)
3971 if test "$XSLTPROC" = "no"; then
3972 AC_MSG_ERROR([xsltproc is required])
3975 AC_MSG_RESULT([internal])
3977 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
3979 AC_SUBST(SYSTEM_LIBXSLT)
3980 AC_SUBST(LIBXSLT_CFLAGS)
3981 AC_SUBST(LIBXSLT_LIBS)
3984 dnl ===================================================================
3985 dnl Check for system libxml
3986 dnl ===================================================================
3987 AC_MSG_CHECKING([which libxml to use])
3988 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
3989 "$_os" = "Darwin" && \
3990 test "$with_system_libxml" != "no"; then
3991 AC_MSG_RESULT([external])
3993 PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
3994 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
3996 AC_MSG_RESULT([internal])
3998 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
4000 AC_SUBST(SYSTEM_LIBXML)
4001 AC_SUBST(LIBXML_CFLAGS)
4002 AC_SUBST(LIBXML_LIBS)
4004 dnl ===================================================================
4005 dnl Check for system python
4006 dnl ===================================================================
4007 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
4008 with_system_python=yes
4010 AC_MSG_CHECKING([which python to use])
4011 if test -n "$with_system_python" -o -n "$with_system_libs" && \
4012 test "$with_system_python" != "no"; then
4014 AC_MSG_RESULT([external])
4015 AM_PATH_PYTHON([2.2])
4017 python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
4018 python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
4019 PYTHON_CFLAGS="-I$python_include"
4021 if test "$_os" = "Darwin"; then
4022 PYTHON_LIBS="-framework Python"
4024 PYTHON_LIBS="-lpython$python_version"
4027 dnl check if the headers really work:
4028 save_CPPFLAGS="$CPPFLAGS"
4029 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
4030 AC_CHECK_HEADER(Python.h, [],
4031 [AC_MSG_ERROR(Python headers not found)], [])
4032 CPPFLAGS="$save_CPPFLAGS"
4035 BUILD_TYPE="$BUILD_TYPE PYTHON"
4036 AC_MSG_RESULT([internal])
4037 # Embedded python dies without Home set
4038 if test "z$HOME" = "z"; then
4041 # bz2 tarball and bzip2 is not standard
4042 if test -z "$BZIP2"; then
4043 AC_PATH_PROG( BZIP2, bzip2)
4044 if test -z "$BZIP2"; then
4045 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
4049 AC_SUBST(SYSTEM_PYTHON)
4050 AC_SUBST(PYTHON_CFLAGS)
4051 AC_SUBST(PYTHON_LIBS)
4052 HOME=`echo $HOME | sed 's:\\\\:/:g'`
4055 dnl ===================================================================
4056 dnl Check for system berkley db
4057 dnl ===================================================================
4058 AC_MSG_CHECKING([which db to use])
4059 if test -n "$with_system_db" -o -n "$with_system_libs" && \
4060 test "$with_system_db" != "no"; then
4062 AC_MSG_RESULT([external])
4063 AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
4065 CFLAGS=-I/usr/include/db4
4066 AC_CHECK_HEADER(db4/db.h,
4067 [ DB_INCLUDES=/usr/include/db4 ],
4068 [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
4071 AC_MSG_CHECKING([whether db is at least 4.1])
4072 for v in `seq 1 8`; do
4076 int main(int argc, char **argv) {
4077 if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0;
4080 ], [DB_VERSION_MINOR=$v], [])
4082 if test "$DB_VERSION_MINOR" -gt "1"; then
4084 DB_VERSION=4.$DB_VERSION_MINOR
4086 AC_MSG_ERROR([no. you need at least db 4.1])
4089 #AC_CHECK_LIB(db, db_create, [],
4090 # [AC_MSG_ERROR([db library not installed or functional])], [])
4091 AC_HAVE_LIBRARY(db, [],
4092 [AC_MSG_ERROR([db not installed or functional])], [])
4093 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
4095 AC_MSG_RESULT([internal])
4097 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
4100 AC_SUBST(DB_VERSION)
4101 AC_SUBST(DB_INCLUDES)
4104 dnl ===================================================================
4105 dnl Check for system lucene
4106 dnl ===================================================================
4107 AC_MSG_CHECKING([which lucene to use])
4108 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
4109 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
4110 AC_MSG_RESULT([external])
4112 if test -z $LUCENE_CORE_JAR; then
4113 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
4114 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
4116 AC_CHECK_FILE(/usr/share/java/lucene.jar,
4117 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
4118 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
4123 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
4124 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
4127 if test -z $LUCENE_ANALYZERS_JAR; then
4128 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
4129 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
4131 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
4132 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
4133 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
4138 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
4139 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
4142 AC_MSG_RESULT([internal])
4144 BUILD_TYPE="$BUILD_TYPE LUCENE"
4146 AC_SUBST(SYSTEM_LUCENE)
4147 AC_SUBST(LUCENE_CORE_JAR)
4148 AC_SUBST(LUCENE_ANALYZERS_JAR)
4150 dnl ===================================================================
4151 dnl Check for system hsqldb
4152 dnl ===================================================================
4153 AC_MSG_CHECKING([which hsqldb to use])
4154 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
4155 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
4156 AC_MSG_RESULT([external])
4158 if test -z $HSQLDB_JAR; then
4159 HSQLDB_JAR=/usr/share/java/hsqldb.jar
4161 AC_CHECK_FILE($HSQLDB_JAR, [],
4162 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
4163 AC_MSG_CHECKING([whether hsqldb is >= 1.8.0.9])
4165 if $PERL -e 'use Archive::Zip;
4166 my $file = "$ENV{'HSQLDB_JAR'}";
4167 my $zip = Archive::Zip->new( $file );
4168 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
4169 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
4170 push @l, split(/\n/, $mf);
4171 foreach my $line (@l) {
4172 if ($line =~ m/Specification-Version:/) {
4173 ($t, $version) = split (/:/,$line);
4174 $version =~ s/^\s//;
4175 ($a, $b, $c, $d) = split (/\./,$version);
4176 if (($c == "0" && $d > "8") || $c > 0) {
4186 AC_MSG_RESULT([yes])
4188 AC_MSG_ERROR([no, hsqldb >= 1.8.0.9 is needed])
4191 AC_MSG_RESULT([internal])
4193 BUILD_TYPE="$BUILD_TYPE HSQLDB"
4195 AC_SUBST(SYSTEM_HSQLDB)
4196 AC_SUBST(HSQLDB_JAR)
4198 dnl ===================================================================
4199 dnl Check for PostgreSQL stuff
4200 dnl ===================================================================
4201 AC_PATH_PROG(PGCONFIG, pg_config)
4202 if test -z "$PGCONFIG"; then
4203 AC_MSG_ERROR([pg_config needed])
4207 CFLAGS="-I`pg_config --includedir`"
4208 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
4209 AC_HAVE_LIBRARY(pq, [], [AC_MSG_ERROR(libpq is needed)], [])
4212 SYSTEM_POSTGRESQL=YES # only option atm :-)
4213 AC_SUBST(SYSTEM_POSTGRESQL)
4215 dnl ===================================================================
4216 dnl Check for system beanshell
4217 dnl ===================================================================
4218 AC_MSG_CHECKING([which beanshell to use])
4219 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
4220 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
4221 AC_MSG_RESULT([external])
4223 if test -z $BSH_JAR; then
4224 BSH_JAR=/usr/share/java/bsh.jar
4226 AC_CHECK_FILE($BSH_JAR, [],
4227 [AC_MSG_ERROR(bsh.jar not found.)], [])
4229 AC_MSG_RESULT([internal])
4231 BUILD_TYPE="$BUILD_TYPE BSH"
4233 AC_SUBST(SYSTEM_BSH)
4237 dnl ===================================================================
4238 dnl Check for system saxon
4239 dnl ===================================================================
4240 AC_MSG_CHECKING([which saxon to use])
4241 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
4242 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
4243 AC_MSG_RESULT([external])
4245 if test -z $SAXON_JAR; then
4246 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4247 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4249 AC_CHECK_FILE(/usr/share/java/saxon.jar,
4250 [ SAXON_JAR=/usr/share/java/saxon.jar ],
4251 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4252 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4253 [ AC_MSG_ERROR(saxon.jar replacement not found)]
4260 AC_CHECK_FILE($SAXON_JAR, [],
4261 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
4263 if test -n "$SERIALIZER_JAR"; then
4264 AC_CHECK_FILE($SERIALIZER_JAR, [],
4265 [AC_MSG_ERROR(serializer.jar not found.)], [])
4266 AC_SUBST(SERIALIZER_JAR)
4269 AC_MSG_RESULT([internal])
4273 AC_SUBST(SYSTEM_SAXON)
4276 if test -n "$NEED_SAXON"; then
4277 BUILD_TYPE="$BUILD_TYPE SAXON"
4280 dnl ===================================================================
4281 dnl Check for system curl
4282 dnl ===================================================================
4283 if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
4284 with_system_curl=yes
4286 AC_MSG_CHECKING([which curl to use])
4287 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
4288 test "$with_system_curl" != "no"; then
4289 AC_MSG_RESULT([external])
4292 AC_PATH_PROG( CURLCONFIG, curl-config)
4293 if test -z "$CURLCONFIG"; then
4294 AC_MSG_ERROR([install curl to run this script])
4297 # check curl version
4298 AC_MSG_CHECKING([whether curl is >= 7.9.8])
4299 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
4300 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "9" -a \
4301 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "8"; then
4302 AC_MSG_ERROR([no, you need at least curl 7.9,8])
4304 AC_MSG_RESULT([yes])
4306 CURL_LIBS=`$CURLCONFIG --libs`
4307 CURL_CFLAGS=`$CURLCONFIG --cflags`
4309 AC_MSG_RESULT([internal])
4311 BUILD_TYPE="$BUILD_TYPE CURL"
4313 AC_SUBST(SYSTEM_CURL)
4314 AC_SUBST(CURL_CFLAGS)
4317 dnl ===================================================================
4318 dnl Check for system boost
4319 dnl ===================================================================
4320 AC_MSG_CHECKING([which boost to use])
4321 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
4322 test "$with_system_boost" != "no"; then
4323 AC_MSG_RESULT([external])
4326 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
4327 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
4328 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
4329 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
4330 AC_CHECK_HEADER(boost/function.hpp, [],
4331 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
4333 save_CXXFLAGS=$CXXFLAGS
4334 CXXFLAGS="$CXXFLAGS -fno-exceptions"
4335 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
4336 AC_TRY_COMPILE([#include <boost/function.hpp>
4338 ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes)
4340 if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then
4341 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
4343 AC_MSG_RESULT([yes])
4345 CXXFLAGS=$save_CXXFLAGS
4348 AC_MSG_RESULT([internal])
4349 BUILD_TYPE="$BUILD_TYPE BOOST"
4352 AC_SUBST(SYSTEM_BOOST)
4354 dnl ===================================================================
4355 dnl Check for system vigra
4356 dnl ===================================================================
4357 AC_MSG_CHECKING([which vigra to use])
4358 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
4359 test "$with_system_vigra" != "no"; then
4360 AC_MSG_RESULT([external])
4363 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
4364 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
4367 AC_MSG_RESULT([internal])
4368 BUILD_TYPE="$BUILD_TYPE VIGRA"
4371 AC_SUBST(SYSTEM_VIGRA)
4373 dnl ===================================================================
4374 dnl Check for system odbc
4375 dnl ===================================================================
4376 AC_MSG_CHECKING([which odbc headers to use])
4377 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
4378 test "$with_system_odbc_headers" != "no"; then
4379 AC_MSG_RESULT([external])
4380 SYSTEM_ODBC_HEADERS=YES
4382 AC_CHECK_HEADER(sqlext.h, [],
4383 [AC_MSG_ERROR(odbc not found. install odbc)], [])
4385 AC_MSG_RESULT([internal])
4386 SYSTEM_ODBC_HEADERS=NO
4387 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
4389 AC_SUBST(SYSTEM_ODBC_HEADERS)
4391 AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components])
4392 if test "$enable_mozilla" = "no"; then
4395 ENABLE_NSS_MODULE=NO
4397 AC_MSG_RESULT([yes])
4400 AC_SUBST(WITH_MOZILLA)
4402 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
4403 if test "$enable_mozilla" = "no"; then
4405 elif test "$with_system_mozilla" = "yes"; then
4406 AC_MSG_RESULT([no, not possible with system-mozilla])
4408 AC_MSG_RESULT([yes])
4411 AC_MSG_CHECKING([whether to build XML Security support])
4412 if test "$enable_mozilla" = "no"; then
4413 AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
4415 AC_MSG_RESULT([yes])
4418 AC_MSG_CHECKING([whether to build LDAP configuration backend])
4419 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
4420 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
4421 AC_MSG_RESULT([yes])
4424 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
4432 if test "$WITH_LDAP" = "YES"; then
4433 dnl ===================================================================
4434 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
4435 dnl ===================================================================
4436 AC_MSG_CHECKING([which LDAP SDK to use])
4437 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
4438 AC_MSG_RESULT([OpenLDAP])
4440 AC_CHECK_HEADERS(ldap.h, [],
4441 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
4442 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
4443 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4444 # rumours say that OpenLDAP doesn't have that function. I looked and
4445 # it has it. Test for it to be sure
4446 AC_CHECK_LIB(ldap, ldap_set_option, [],
4447 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4449 AC_MSG_RESULT([Netscape/Mozilla])
4450 # TODO. Actually do a sanity check and check for
4451 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
4456 AC_SUBST(WITH_OPENLDAP)
4458 dnl ===================================================================
4459 dnl Check for system mozilla
4460 dnl ===================================================================
4461 AC_MSG_CHECKING([which mozilla to use])
4462 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
4463 AC_MSG_RESULT([external])
4465 ENABLE_NSS_MODULE=NO
4466 enable_nss_module=no
4467 AC_MSG_CHECKING([which Mozilla flavour to use])
4468 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
4470 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
4471 MOZ_FLAVOUR=xulrunner
4472 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
4473 MOZ_FLAVOUR=seamonkey
4474 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
4476 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
4481 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
4484 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
4485 if test -z "$STANDALONENSS"; then
4486 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
4488 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
4492 if $PKG_CONFIG --exists nspr ; then
4493 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
4494 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
4497 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
4500 if test "$MOZ_FLAVOUR" != "libxul"; then
4501 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
4502 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
4503 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
4506 if test -z "$HASXPCOM"; then
4507 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
4508 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
4509 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
4510 if ! test -e "$MOZ_LIB/libxul.so"; then
4511 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
4512 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
4513 MOZ_LIB="$MOZ_LIB/sdk/lib"
4518 save_CPPFLAGS="$CPPFLAGS"
4519 save_LDFLAGS="$LDFLAGS"
4521 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
4522 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
4523 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
4524 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
4525 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
4526 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
4527 LDFLAGS="$save_LDFLAGS"
4528 CPPFLAGS="$save_CPPFLAGS"
4531 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
4532 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
4533 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
4534 if test -d "$MOZ_INC/ldap"; then
4535 AC_MSG_RESULT([yes])
4536 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
4539 Could not find LDAP header include files in $MOZ_INC/ldap.
4540 Please recompile $tmp with --enable-ldap or use --with-openldap.])
4544 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
4545 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
4546 if test "$MOZ_FLAVOUR" == "libxul"; then
4547 MOZ_FLAVOUR="mozilla"
4550 elif test "$enable_mozilla" = "no"; then
4551 AC_MSG_RESULT([none])
4553 ENABLE_NSS_MODULE=NO
4554 enable_nss_module=no
4556 AC_MSG_RESULT([internal])
4558 BUILD_TYPE="$BUILD_TYPE MOZ"
4559 if test -z "$with_mozilla_version"; then
4562 AC_MSG_CHECKING([which mozilla version to build])
4563 MOZILLA_VERSION=$with_mozilla_version
4564 enable_build_mozilla=1
4565 AC_MSG_RESULT([$MOZILLA_VERSION])
4568 AC_SUBST(MOZILLA_VERSION)
4570 AC_MSG_CHECKING([for toolkit mozilla should use])
4571 if test -z "$with_mozilla_toolkit"; then
4572 if test "$_os" != "WINNT" ; then
4573 if test "$_os" = "Darwin" ; then
4575 AC_MSG_RESULT([mac])
4577 MOZILLA_TOOLKIT=gtk2
4578 AC_MSG_RESULT([gtk2])
4582 MOZILLA_TOOLKIT=$with_mozilla_toolkit
4583 enable_build_mozilla=1
4584 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
4586 #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then
4587 # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not
4588 # #available using fink, mac (carbon) doesn't work because xcode installs conflicting headers
4589 # AC_MSG_ERROR([Only gtk2 toolkit supported on Mac, sorry.])
4592 AC_SUBST(MOZILLA_TOOLKIT)
4594 # default to enabling build mozilla
4595 if test "$enable_build_mozilla" != "no"; then
4596 enable_build_mozilla=yes
4598 enable_build_mozilla=
4601 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
4602 if test -n "$enable_build_mozilla"; then
4604 AC_MSG_RESULT([yes])
4610 AC_MSG_CHECKING([whether to build provided NSS module])
4611 if test "$enable_nss_module" != "no"; then
4612 ENABLE_NSS_MODULE="YES"
4613 BUILD_TYPE="$BUILD_TYPE NSS"
4614 AC_MSG_RESULT([yes])
4615 if test "$_os" = "WINNT"; then
4616 AC_MSG_CHECKING([for Mozilla build tooling])
4617 if test -z "$MOZILLABUILD" ; then
4618 AC_MSG_ERROR([Mozilla build tooling not found. Use --with-mozilla-build=<absolut path to mozilla build tooling (mozilla-build)>])
4620 if test \( "$WITH_MINGWIN" = "yes" \) ; then
4621 if test ! -d "$MOZILLABUILD" ; then
4622 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4627 if test ! -d "$MOZILLABUILD/moztools" \
4628 -o ! -d "$MOZILLABUILD/msys" ; then
4629 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4637 ENABLE_NSS_MODULE="NO"
4641 if test "$BUILD_MOZAB" = "TRUE"; then
4642 if test "$_os" = "WINNT"; then
4643 if test "$WITH_MINGWIN" != "yes"; then
4644 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
4645 if test "$MSVSVER" != "2005"; then
4646 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
4649 AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
4650 echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
4654 if test -z "$MOZILLA_VERSION"; then
4655 MOZILLA_VERSION=1.1.14
4657 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
4659 AC_MSG_CHECKING([for $MOZILLA_SOURCE_VERSION.tar.$e])
4660 if test ! -e "moz/download/$MOZILLA_SOURCE_VERSION.tar.$e" && test "$HAVE_MOZILLA_TARBALL" != "y"; then
4661 AC_MSG_RESULT([not found])
4662 HAVE_MOZILLA_TARBALL=n
4664 AC_MSG_RESULT([found])
4665 HAVE_MOZILLA_TARBALL=y
4668 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
4669 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
4670 Please copy $MOZILLA_SOURCE_VERSION.tar.bz2 or $MOZILLA_SOURCE_VERSION.tar.gz to moz/download/.
4671 The archives can be found here:
4672 ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/$MOZILLA_VERSION/])
4674 if test "$_os" = "WINNT"; then
4675 AC_MSG_CHECKING([for moztools binaries])
4676 if test ! -e "moz/download/vc8-moztools.zip" ; then
4677 AC_MSG_ERROR([The following file is missing in moz/download: vc8-moztools.zip
4678 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
4682 elif test "$_os" = "Darwin"; then
4683 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4684 AC_MSG_NOTICE([checking whether mozilla can be built...])
4685 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]))
4687 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
4688 if test -z "$MOZIDL"; then
4689 AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit.])
4693 # Generic Unix/Linux section
4694 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4695 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
4696 if test -z "$MOZGTK"; then
4697 AC_MSG_ERROR([GTK2 is needed to build mozilla.])
4699 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
4700 if test -z "$MOZIDL"; then
4701 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.])
4704 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
4705 if test -z "$MOZGTK"; then
4706 AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.])
4708 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4709 if test -z "$MOZIDL"; then
4710 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4716 AC_SUBST(BUILD_MOZAB)
4719 AC_SUBST(ENABLE_NSS_MODULE)
4720 AC_SUBST(MOZILLABUILD)
4721 AC_SUBST(SYSTEM_MOZILLA)
4722 AC_SUBST(MOZ_FLAVOUR)
4725 AC_SUBST(MOZ_LIB_XPCOM)
4726 AC_SUBST(MOZ_NSPR_CFLAGS)
4727 AC_SUBST(MOZ_NSS_CFLAGS)
4728 AC_SUBST(MOZ_LDAP_CFLAGS)
4730 dnl ===================================================================
4731 dnl Check for system sane
4732 dnl ===================================================================
4733 AC_MSG_CHECKING([which sane header to use])
4734 if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \
4735 test "$with_system_sane_header" != "no"; then
4736 AC_MSG_RESULT([external])
4737 SYSTEM_SANE_HEADER=YES
4738 AC_CHECK_HEADER(sane/sane.h, [],
4739 [AC_MSG_ERROR(sane not found. install sane)], [])
4741 AC_MSG_RESULT([internal])
4742 SYSTEM_SANE_HEADER=NO
4743 BUILD_TYPE="$BUILD_TYPE SANE"
4745 AC_SUBST(SYSTEM_SANE_HEADER)
4747 dnl ===================================================================
4748 dnl Check for system icu
4749 dnl ===================================================================
4750 AC_MSG_CHECKING([which icu to use])
4751 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
4752 test "$with_system_icu" != "no"; then
4753 AC_MSG_RESULT([external])
4756 AC_MSG_CHECKING([for unicode/rbbi.h])
4757 AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
4758 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
4759 if test -z "$SYSTEM_GENBRK"; then
4760 AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
4762 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
4763 if test -z "$SYSTEM_GENCCODE"; then
4764 AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
4766 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
4767 if test -z "$SYSTEM_GENCMN"; then
4768 AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
4770 AC_MSG_CHECKING([ICU version])
4772 #include <unicode/uversion.h>
4774 int main(int argc, char **argv) {
4775 if(U_ICU_VERSION_MAJOR_NUM < 4)
4780 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])])
4783 AC_MSG_RESULT([internal])
4785 BUILD_TYPE="$BUILD_TYPE ICU"
4787 AC_SUBST(SYSTEM_ICU)
4788 AC_SUBST(SYSTEM_GENBRK)
4789 AC_SUBST(SYSTEM_GENCCODE)
4790 AC_SUBST(SYSTEM_GENCMN)
4792 dnl ===================================================================
4794 dnl ===================================================================
4796 AC_MSG_CHECKING([whether to enable graphite support])
4797 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" == "z" -o "$enable_graphite" != "no" ; then
4798 AC_MSG_RESULT([yes])
4799 ENABLE_GRAPHITE="TRUE"
4800 AC_MSG_CHECKING([which graphite to use])
4801 if test -n "$with_system_graphite" -o -n "$with_system_libs" && \
4802 test "$with_system_graphite" != "no"; then
4803 AC_MSG_RESULT([external])
4805 PKG_CHECK_MODULES( GRAPHITE, silgraphite )
4806 AC_MSG_CHECKING([STL compatibility])
4807 if test "$WITH_STLPORT" != "no"; then
4808 AC_MSG_ERROR([to use system graphite you need to use --without-stlport])
4813 AC_MSG_RESULT([internal])
4815 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
4820 AC_SUBST(ENABLE_GRAPHITE)
4821 AC_SUBST(SYSTEM_GRAPHITE)
4822 AC_SUBST(GRAPHITE_LIBS)
4823 AC_SUBST(GRAPHITE_CFLAGS)
4825 dnl ===================================================================
4826 dnl Checks for libraries.
4827 dnl ===================================================================
4828 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
4829 dnl See if we have the AppKit framework for building with Quartz graphics.
4831 if test "$_os" = "Darwin"; then
4832 if test "x$with_x" = "xyes"; then
4833 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
4835 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
4836 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
4837 AC_MSG_RESULT([yes])
4838 x_includes="no_x_includes"
4839 x_libraries="no_x_libraries"
4840 dnl disable some things used on other Unix versions but not on the aqua build
4844 AC_SUBST(ENABLE_CUPS)
4846 AC_MSG_ERROR([No AppKit.framewrok found])
4851 dnl ***************************************
4852 dnl testing for X libraries and includes...
4853 dnl ***************************************
4854 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
4855 echo "Do Nothing for _os = Darwin"
4856 dnl Mac OS X using Aqua graphics. Don't check for X11.
4858 elif test "$_os" = "OS2" ; then
4859 echo "Do Nothing for _os = OS2. Don't check for X11."
4860 dnl OS/2 uses native graphics. Don't check for X11.
4862 elif test "$_os" != "WINNT" ; then
4865 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4867 if test "x$x_includes" = "x"; then
4868 x_includes="default_x_includes"
4870 if test "x$x_libraries" = "x"; then
4871 x_libraries="default_x_libraries"
4873 dnl The variables $x_libraries and $x_includes are set.
4874 if test -z "$x_libraries"; then
4875 AC_MSG_ERROR([No X libraries found]) # Exit
4877 if test -z "$x_includes"; then
4878 AC_MSG_ERROR([No X includes found]) # Exit
4881 LDFLAGS="$X_LDFLAGS $X_LIBS"
4882 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
4883 dnl Check if the XauDisposeAuth symbol is provided by libXau.
4884 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
4886 x_includes="no_x_includes"
4887 x_libraries="no_x_libraries"
4889 if test -z "$x_includes"; then
4890 x_includes="no_x_includes"
4892 if test -z "$x_libraries"; then
4893 x_libraries="no_x_libraries"
4895 if test "$x_includes" = "default_x_includes"; then
4901 if test "$x_libraries" = "default_x_libraries"; then
4902 XLIB=`$PKG_CONFIG --variable=libdir x11`
4903 if test "x$XLIB" = x; then
4912 if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then
4913 dnl ===================================================================
4914 dnl Check for using Xaw
4915 dnl ===================================================================
4916 AC_MSG_CHECKING([whether to use Xaw])
4917 if test "$enable_Xaw" = "no"; then
4920 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt include headers not found])],
4921 [#include <X11/Intrinsic.h>])
4923 AC_MSG_RESULT([yes])
4924 AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])])
4925 AC_CHECK_LIB(Xaw, main, [],
4926 [AC_MSG_ERROR(Xaw library not found or functional)], [])
4929 AC_SUBST(DISABLE_XAW)
4933 dnl ===================================================================
4934 dnl Check if fontconfig/fontconfig.h is available
4935 dnl ===================================================================
4936 if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
4937 AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
4938 [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
4939 AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
4941 #include <fontconfig/fontconfig.h>
4943 int main(int argc, char **argv) {
4944 if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
4947 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
4950 dnl ===================================================================
4951 dnl Check for system Xrender
4952 dnl ===================================================================
4953 AC_MSG_CHECKING([whether to link to Xrender])
4954 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
4955 AC_MSG_RESULT([yes])
4957 with_system_xrender_headers=yes
4959 AC_MSG_RESULT([no, dynamically open it])
4962 AC_MSG_CHECKING([which Xrender headers to use])
4963 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
4964 test "$with_system_xrender_headers" != "no"; then
4965 AC_MSG_RESULT([external])
4966 SYSTEM_XRENDER_HEADERS=YES
4967 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
4968 [AC_MSG_ERROR(Xrender not found. install X)], [])
4970 AC_MSG_RESULT([internal])
4971 SYSTEM_XRENDER_HEADERS=NO
4972 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
4974 if test "$XRENDER_LINK" = "YES"; then
4975 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
4976 [AC_MSG_ERROR(libXrender not found or functional)], [])
4978 AC_SUBST(SYSTEM_XRENDER_HEADERS)
4979 AC_SUBST(XRENDER_LINK)
4981 dnl ===================================================================
4982 dnl Check for XRandr
4983 dnl ===================================================================
4984 AC_MSG_CHECKING([whether to enable RandR support])
4985 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
4986 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
4987 XRANDR_DLOPEN="TRUE"
4988 AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
4990 XRANDR_DLOPEN="FALSE"
4991 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
4992 if test "$ENABLE_RANDR" != "TRUE"; then
4993 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
4994 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
4996 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
4997 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
4998 XRANDR_LIBS="-lXrandr "
5000 AC_MSG_RESULT([enabling RandR support])
5007 AC_SUBST(XRANDR_DLOPEN)
5008 AC_SUBST(XRANDR_CFLAGS)
5009 AC_SUBST(XRANDR_LIBS)
5010 AC_SUBST(ENABLE_RANDR)
5012 dnl ===================================================================
5013 dnl Check for system Mesa
5014 dnl ===================================================================
5015 AC_MSG_CHECKING([which Mesa headers to use])
5016 if test "$with_system_mesa_headers" == "no"; then
5017 AC_MSG_RESULT([internal])
5018 SYSTEM_MESA_HEADERS=NO
5019 BUILD_TYPE="$BUILD_TYPE MESA"
5021 AC_MSG_RESULT([external])
5022 SYSTEM_MESA_HEADERS=YES
5024 AC_SUBST(SYSTEM_MESA_HEADERS)
5026 dnl ===================================================================
5027 dnl Check for building neon
5028 dnl ===================================================================
5029 AC_MSG_CHECKING([whether to use neon])
5030 if test "$enable_neon" = "no"; then
5033 AC_SUBST(DISABLE_NEON)
5035 AC_MSG_RESULT([yes])
5036 dnl ===================================================================
5037 dnl Check for system neon
5038 dnl ===================================================================
5039 AC_MSG_CHECKING([which neon to use])
5040 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
5041 test "$with_system_neon" != "no"; then
5042 AC_MSG_RESULT([external])
5043 PKG_CHECK_MODULES(NEON, neon >= 0.24.0, , AC_MSG_ERROR([you need neon >= 0.24.x for system-neon]))
5044 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
5045 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
5048 AC_MSG_RESULT([internal])
5052 BUILD_TYPE="$BUILD_TYPE NEON"
5054 AC_SUBST(SYSTEM_NEON)
5055 AC_SUBST(NEON_VERSION)
5057 AC_SUBST(NEON_CFLAGS)
5060 dnl ===================================================================
5061 dnl Check for system openssl
5062 dnl ===================================================================
5063 if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
5064 with_system_openssl=yes
5066 AC_MSG_CHECKING([which libssl to use])
5067 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
5068 test "$with_system_openssl" != "no"; then
5069 AC_MSG_RESULT([external])
5070 # Mac OS builds should get out without extra stuff is the Mac porters'
5071 # wish. And pkg-config is although Xcode ships a .pc for openssl
5072 if test "$_os" = "Darwin"; then
5074 OPENSSL_LIBS="-lssl -lcrypto"
5076 PKG_CHECK_MODULES( OPENSSL, openssl )
5080 AC_MSG_RESULT([internal])
5082 BUILD_TYPE="$BUILD_TYPE OPENSSL"
5084 AC_SUBST(SYSTEM_OPENSSL)
5085 AC_SUBST(OPENSSL_CFLAGS)
5086 AC_SUBST(OPENSSL_LIBS)
5088 dnl ===================================================================
5089 dnl Test for disabling agg
5090 dnl ===================================================================
5091 AC_MSG_CHECKING([whether to enable agg])
5092 if test "$with_agg" = "no"; then
5095 AC_MSG_RESULT([yes])
5097 AC_SUBST(ENABLE_AGG)
5099 dnl ===================================================================
5100 dnl Check for system AGG
5101 dnl ===================================================================
5102 AC_MSG_CHECKING([which AGG to use])
5103 if test -n "$with_system_agg" -o -n "$with_system_libs" && \
5104 test "$with_system_agg" != "no"; then
5105 AC_MSG_RESULT([external])
5106 PKG_CHECK_MODULES(AGG, libagg >= 2.3)
5107 AC_MSG_CHECKING([agg version])
5108 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
5109 # (/usr/include gets stripped from pkg-config output)
5110 if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
5111 AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
5113 AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
5115 if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
5116 $PKG_CONFIG --modversion libagg | grep -q 2.4; then
5117 # 2.4's libagg.pc.in still contains 2.3 :/
5118 if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
5119 AC_MSG_RESULT([2.4])
5122 AC_MSG_RESULT([2.3])
5127 AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
5130 AC_MSG_RESULT([internal])
5133 BUILD_TYPE="$BUILD_TYPE AGG"
5135 AC_SUBST(SYSTEM_AGG)
5136 AC_SUBST(AGG_VERSION)
5139 dnl ===================================================================
5140 dnl Check for system redland
5141 dnl ===================================================================
5142 AC_MSG_CHECKING([which redland library to use])
5143 dnl if test -n "$with_system_redland" -o -n "$with_system_libs" && \
5144 dnl test "$with_system_redland" != "no"; then
5145 dnl mst: NOTE: right now we need patches against redland
5146 dnl so we only enable system redland if explicitly requested
5147 dnl if next version includes patches, insert version check here
5148 if test -n "$with_system_redland" && \
5149 test "$with_system_redland" != "no"; then
5150 AC_MSG_RESULT([external])
5152 PKG_CHECK_MODULES(REDLAND, redland)
5154 AC_MSG_RESULT([internal])
5155 BUILD_TYPE="$BUILD_TYPE REDLAND"
5158 AC_SUBST(SYSTEM_REDLAND)
5159 AC_SUBST(REDLAND_LIBS)
5161 dnl ===================================================================
5162 dnl Check for system hunspell
5163 dnl ===================================================================
5164 AC_MSG_CHECKING([which libhunspell to use])
5165 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
5166 test "$with_system_hunspell" != "no"; then
5167 AC_MSG_RESULT([external])
5170 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
5171 if test "$HUNSPELL_PC" != "TRUE"; then
5172 AC_CHECK_HEADER(hunspell.hxx, [],
5174 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
5175 [AC_MSG_ERROR(hunspell headers not found.)], [])
5177 AC_CHECK_LIB(hunspell, main, [],
5178 [ AC_MSG_ERROR(hunspell library not found.) ], [])
5179 HUNSPELL_LIBS=-lhunspell
5183 AC_MSG_RESULT([internal])
5185 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
5187 AC_SUBST(SYSTEM_HUNSPELL)
5188 AC_SUBST(HUNSPELL_CFLAGS)
5189 AC_SUBST(HUNSPELL_LIBS)
5191 dnl ===================================================================
5192 dnl Checking for altlinuxhyph
5193 dnl ===================================================================
5194 AC_MSG_CHECKING([which altlinuxhyph to use])
5195 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
5196 test "$with_system_altlinuxhyph" != "no"; then
5197 AC_MSG_RESULT([external])
5199 AC_CHECK_HEADER(hyphen.h, [],
5200 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
5201 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
5202 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
5203 [#include <hyphen.h>])
5204 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
5205 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5206 if test -z "$HYPHEN_LIB"; then
5207 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
5208 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5210 if test -z "$HYPHEN_LIB"; then
5211 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
5212 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5215 AC_MSG_RESULT([internal])
5218 AC_SUBST(SYSTEM_HYPH)
5219 AC_SUBST(HYPHEN_LIB)
5221 dnl ===================================================================
5222 dnl Checking for mythes
5223 dnl ===================================================================
5224 AC_MSG_CHECKING([which mythes to use])
5225 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
5226 AC_MSG_RESULT([external])
5228 AC_CHECK_HEADER(mythes.hxx, [],
5229 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
5230 AC_CHECK_LIB(mythes, main, [],
5231 [ AC_MSG_ERROR(mythes library not found.)], [])
5233 AC_MSG_RESULT([internal])
5236 AC_SUBST(SYSTEM_MYTHES)
5238 dnl ===================================================================
5239 dnl Checking for lpsolve
5240 dnl ===================================================================
5241 AC_MSG_CHECKING([which lpsolve to use])
5242 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
5243 test "$with_system_lpsolve" != "no"; then
5244 AC_MSG_RESULT([external])
5246 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
5247 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
5248 AC_CHECK_LIB(lpsolve55, make_lp, ,
5249 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
5251 AC_MSG_RESULT([internal])
5253 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
5255 AC_SUBST(SYSTEM_LPSOLVE)
5257 dnl ***************************************
5258 dnl testing libc version for Linux...
5259 dnl ***************************************
5260 if test "$_os" = "Linux"; then
5261 AC_MSG_CHECKING([whether libc is >= 2.1.1])
5262 exec 6>/dev/null # no output
5263 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
5264 exec 6>&1 # output on again
5265 if test "$HAVE_LIBC"; then
5266 AC_MSG_RESULT([yes])
5268 AC_MSG_ERROR([no, upgrade libc])
5272 dnl =========================================
5273 dnl Check for the Microsoft Platform SDK.
5274 dnl =========================================
5275 dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
5276 dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
5277 if test \( "$_os" = "WINNT" \) ; then
5278 AC_MSG_CHECKING([for PSDK files])
5279 if test -z "$with_psdk_home"; then
5280 # This first line will detect a February 2003 Microsoft Platform SDK
5281 PSDK_HOME=`./oowintool --psdk-home`
5282 # But there might be also an April 2005 PSDK, unfortunately MS changed
5283 # the registry entry. (we prefer the old version!?)
5284 if test -z "$PSDK_HOME"; then
5285 PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
5287 # normalize if found
5288 if test -n "$PSDK_HOME"; then
5289 PSDK_HOME=`cygpath -d "$PSDK_HOME"`
5290 PSDK_HOME=`cygpath -u "$PSDK_HOME"`
5293 PSDK_HOME=`cygpath -u "$with_psdk_home"`
5295 # Remove a possible trailing backslash
5296 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
5297 # Problem with current PSDK (iz 49865)
5298 if test -f "$PSDK_HOME/Lib/libcp.lib"; then
5301 Some modules do not build correctly with MS Platform SDK - April 2005
5302 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
5303 Remove/rename/backup that file and restart configure. Details about this
5304 problem can be found in issue 49856.])
5306 # WIndows SDK has different headers
5307 if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
5308 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
5309 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
5314 if test -f "$PSDK_HOME/lib/unicows.lib"; then
5319 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
5320 AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
5321 are installed or use --with-psdk-home .])
5323 if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
5324 -o ! -x "$PSDK_HOME/bin/msidb.exe" \
5325 -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
5326 -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
5327 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
5329 AC_MSG_RESULT([SDK files found ...)])
5330 dnl Check if this is the right SDK.
5331 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
5332 AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
5333 WINDOWS_VISTA_PSDK=TRUE
5334 elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
5335 AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
5336 WINDOWS_VISTA_PSDK=TRUE
5337 elif echo $PSDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
5338 AC_MSG_RESULT([Found Windows SDK 7 ($PSDK_HOME)])
5339 WINDOWS_VISTA_PSDK=TRUE
5341 AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
5345 AC_SUBST(WINDOWS_VISTA_PSDK)
5347 dnl =========================================
5348 dnl Check for the Microsoft DirectX SDK.
5349 dnl =========================================
5350 if test \( "$_os" = "WINNT" \) ; then
5351 AC_MSG_CHECKING([for DirectX SDK files])
5352 if test -z "$with_directx_home"; then
5353 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
5354 if test -n "$DXSDK_DIR"; then
5355 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
5356 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
5358 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
5359 # the "DirectX SDK files not found" error later
5361 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
5363 # Remove a possible trailing backslash
5364 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
5366 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
5367 HAVE_DIRECTXSDK_H="yes"
5369 HAVE_DIRECTXSDK_H="no"
5371 # MS changed the location of the libraries with dec 2004 directx sdk
5372 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
5373 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
5375 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
5377 if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
5378 HAVE_DIRECTXSDK_LIB="yes"
5380 HAVE_DIRECTXSDK_LIB="no"
5382 if test -n "$ENABLE_DIRECTX"; then
5383 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
5384 AC_MSG_RESULT([found])
5386 AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
5390 AC_MSG_RESULT([disabled])
5393 AC_SUBST(DIRECTXSDK_HOME)
5394 AC_SUBST(DIRECTXSDK_LIB)
5396 dnl ============================================
5397 dnl Check for Nullsoft Scriptable Install System
5398 dnl ============================================
5400 if test "$_os" = "WINNT" ; then
5401 AC_MSG_CHECKING([for NSIS])
5402 AC_PATH_PROG(NSIS_PATH, nsis.exe)
5403 if test -n "$NSIS_PATH"; then
5404 NSIS_PATH=`dirname "$NSIS_PATH"`
5406 if test -n "$with_nsis_path"; then
5407 with_nsis_path=`cygpath -u "$with_nsis_path"`
5409 if test -e "$with_nsis_path/nsis.exe"; then
5410 NSIS_PATH="$with_nsis_path"
5412 nsistest=`./oowintool --nsis-dir`;
5413 if test -x "$nsistest/nsis.exe"; then
5414 NSIS_PATH="$nsistest"
5416 if test -z "$NSIS_PATH"; then
5417 AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
5418 echo "NSIS not found, no self contained installer will be build." >> warn
5420 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5421 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5422 AC_MSG_RESULT([found ($NSIS_PATH)])
5427 dnl ***************************************
5428 dnl testing bison and flex exist
5429 dnl ***************************************
5430 AC_PATH_PROG(BISON, bison)
5431 if test -z "$BISON"; then
5432 AC_MSG_ERROR([no bison found in \$PATH, install bison])
5434 AC_MSG_CHECKING([the bison version])
5435 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
5436 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
5437 # Accept newer than 1.875 or older(equal) than 1.75
5438 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
5439 if test "$_bison_version" = "1.875" ; then
5440 AC_MSG_WARN([suspect ($BISON $_bison_version)])
5441 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
5443 AC_MSG_RESULT([checked ($BISON $_bison_version)])
5446 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
5449 AC_PATH_PROG(FLEX, flex)
5450 if test -z "$FLEX"; then
5451 AC_MSG_ERROR([no flex found in \$PATH, install flex])
5453 dnl ***************************************
5454 dnl testing that patch exists
5455 dnl ***************************************
5456 AC_PATH_PROG(PATCH, patch)
5457 if test -z "$PATCH"; then
5458 AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
5461 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
5462 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
5463 if test -z "$with_gnu_patch"; then
5466 if test -x "$with_gnu_patch"; then
5467 GNUPATCH=$with_gnu_patch
5469 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
5473 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
5474 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5475 AC_MSG_RESULT([yes])
5477 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
5480 dnl We also need to check for --with-gnu-cp
5482 if test -z "$with_gnu_cp"; then
5483 AC_PATH_PROGS(GNUCP, gnucp cp)
5484 if test -z $GNUCP; then
5485 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
5488 if test -x "$with_gnu_cp"; then
5491 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
5495 AC_MSG_CHECKING([whether $GNUCP is GNU cp])
5496 if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5497 AC_MSG_RESULT([yes])
5499 if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
5500 AC_MSG_RESULT([yes])
5502 if test "$_os" = "Darwin"; then
5504 AC_MSG_RESULT([no gnucp found - using the system's cp command])
5506 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
5515 dnl ***************************************
5516 dnl testing bash tools path on Windows
5517 dnl ***************************************
5518 if test "$_os" = "WINNT"; then
5520 AC_PATH_PROG(CYGWIN_PATH, bash)
5521 CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
5523 if test -z "$CYGWIN_PATH"; then
5524 CYGWIN_PATH="NO_CYGWIN"
5526 AC_SUBST(CYGWIN_PATH)
5528 dnl ***************************************
5529 dnl testing ml.exe assembler path
5530 dnl ***************************************
5531 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5532 AC_MSG_CHECKING([ml.exe assembler path])
5533 if test -n "$with_asm_home"; then
5534 with_asm_home=`cygpath -u "$with_asm_home"`
5536 if test ! -x "$with_asm_home/ml.exe"; then
5537 AC_PATH_PROG(ML_EXE, ml.exe)
5538 if test -z "$ML_EXE"; then
5539 if test -x "$with_cl_home/bin/ml.exe"; then
5540 with_asm_home=$with_cl_home/bin
5541 AC_MSG_RESULT([found ($with_asm_home)])
5543 AC_MSG_ERROR([Configure did not find ml.exe assembler.])
5546 with_asm_home="ASM_IN_PATH"
5550 with_asm_home="NO_ASM_HOME"
5552 ASM_HOME="$with_asm_home"
5553 if test -n "$ASM_HOME"; then
5554 AC_MSG_RESULT([$ASM_HOME])
5558 dnl ===================================================================
5559 dnl testing handle deprecated unzip switch
5560 dnl ===================================================================
5561 if test -z "$with_zip_home"; then
5562 with_zip_home="$with_unzip_home"
5564 dnl ===================================================================
5565 dnl Zip will be found where you tell me to find it
5566 dnl ===================================================================
5567 if test -n "$with_zip_home" ; then
5568 if test "$_os" = "WINNT"; then
5569 with_zip_home=`cygpath -u "$with_zip_home"`
5571 ZIP="$with_zip_home/zip"
5572 UNZIP="$with_zip_home/unzip"
5573 ZIP_HOME="$with_zip_home"
5575 AC_PATH_PROG(ZIP, zip)
5576 AC_PATH_PROG(UNZIP, unzip)
5577 ZIP_HOME=`dirname "$ZIP"`
5579 dnl ===================================================================
5580 dnl Zip must be available or else it is an error, all platforms
5581 dnl ===================================================================
5582 if test -z "$ZIP" -o -z "$UNZIP"; then
5583 AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
5586 dnl ===================================================================
5587 dnl Zip must be a specific type for different build types.
5588 dnl ===================================================================
5589 if test "$_os" = "WINNT"; then
5590 if test "$with_use_shell" = "4nt" ; then
5591 if test -z "`$ZIP -h | grep -i WinNT`" ; then
5592 AC_MSG_ERROR([$ZIP found in the path is not the required native Windows Version 2.3 of Info-ZIPs zip.exe.
5593 Probably there is a cygwin version in the path.])
5596 if test -n "`$ZIP -h | grep -i WinNT`" ; then
5597 AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
5603 dnl ===================================================================
5604 dnl Windows builds need unicows.dll in external/unicows/
5605 dnl ===================================================================
5606 if test "$_os" = "WINNT"; then
5607 AC_MSG_CHECKING([for unicows.dll])
5608 if test -x ./external/unicows/unicows.dll; then
5609 AC_MSG_RESULT([found])
5611 AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
5612 Get it from the Microsoft site and put it into external/unicows.
5613 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5614 may have to search Microsoft's website.) Last time it was seen at:
5615 <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
5619 dnl ===================================================================
5620 dnl Windows builds need dbghelp.dll in external/dbghelp/
5621 dnl ===================================================================
5622 if test "$_os" = "WINNT"; then
5623 AC_MSG_CHECKING([for dbghelp.dll])
5624 if test -x ./external/dbghelp/dbghelp.dll; then
5625 AC_MSG_RESULT([found])
5627 AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
5628 Get it from the Microsoft site and put it into external/dbghelp.
5629 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5630 may have to search Microsoft's website.) Last time it was seen at:
5631 <http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
5635 dnl ===================================================================
5636 dnl Windows builds - use oowintool to copy CRT dlls and manifest
5637 dnl ===================================================================
5638 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5639 if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
5642 AC_MSG_ERROR([oowintool failed to copy CRT])
5646 dnl ===================================================================
5647 dnl Windows builds need gdiplus.dll in external/gdiplus/
5648 dnl ===================================================================
5649 if test "$_os" = "WINNT"; then
5650 AC_MSG_CHECKING([for gdiplus.dll])
5651 if test -x ./external/gdiplus/gdiplus.dll; then
5652 AC_MSG_RESULT([found])
5654 AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
5655 Get it from the Microsoft site and put it into external/gdiplus.
5656 You may have to search Microsoft's website. Last time it was seen at:
5657 <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
5661 dnl ===================================================================
5662 dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
5663 dnl ===================================================================
5664 if test "$_os" = "WINNT"; then
5665 ./oowintool --msvc-copy-instmsi ./external/msi
5668 dnl ===================================================================
5669 dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
5670 dnl ===================================================================
5671 if test "$_os" = "WINNT"; then
5672 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
5673 AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
5674 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
5675 AC_MSG_RESULT([found])
5677 MSIAPATH=`/bin/find "$COMPATH/../.." -iname instmsia.exe | head -n 1`
5678 MSIWPATH=`/bin/find "$COMPATH/../.." -iname instmsiw.exe | head -n 1`
5679 if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
5680 cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
5681 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
5683 if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
5684 AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
5685 These programs are part of the Visual Studio installation and should be found in a
5686 directory similar to:
5687 "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
5688 As the automatic detection fails please copy the files to external/msi/.])
5690 AC_MSG_RESULT([found and copied])
5696 dnl ===================================================================
5697 dnl Test which vclplugs have to be built.
5698 dnl ===================================================================
5699 AC_MSG_CHECKING([which VCLplugs shall be built])
5701 if test "x$enable_gtk" = "xyes"; then
5705 AC_SUBST(ENABLE_GTK)
5708 if test "x$enable_kde" = "xyes"; then
5712 AC_SUBST(ENABLE_KDE)
5715 if test "x$enable_kde4" = "xyes"; then
5719 AC_SUBST(ENABLE_KDE4)
5721 if test -z "$R"; then
5722 AC_MSG_RESULT([none])
5727 dnl ===================================================================
5729 dnl ===================================================================
5732 AC_MSG_CHECKING([whether to enable GConf support])
5733 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
5735 AC_MSG_RESULT([yes])
5736 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5740 AC_SUBST(ENABLE_GCONF)
5742 dnl ===================================================================
5744 dnl ===================================================================
5747 GNOMEVFS_HAS_LOCKING=""
5748 AC_MSG_CHECKING([whether to enable GNOME VFS support])
5749 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
5750 ENABLE_GNOMEVFS="TRUE"
5751 AC_MSG_RESULT([yes])
5752 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
5753 if test "$ENABLE_GCONF" != "TRUE"; then
5754 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5759 save_CXXFLAGS=$CXXFLAGS
5760 CXXFLAGS="$CXXFLAGS $GNOMEVFS_CFLAGS"
5761 AC_CHECK_DECL(GNOME_VFS_OPEN_LOCKED,
5762 GNOMEVFS_HAS_LOCKING="YES",,
5763 [#include <libgnomevfs/gnome-vfs-handle.h>])
5764 CXXFLAGS=$save_CXXFLAGS
5769 AC_SUBST(ENABLE_GNOMEVFS)
5770 AC_SUBST(GNOMEVFS_HAS_LOCKING)
5772 dnl ===================================================================
5773 dnl Check whether the gtk 2.0 libraries are available.
5774 dnl ===================================================================
5778 ENABLE_SYSTRAY_GTK=""
5780 if test "$test_gtk" = "yes"; then
5782 if test "$ENABLE_GTK" = "TRUE" ; then
5783 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]))
5784 BUILD_TYPE="$BUILD_TYPE GTK"
5786 if test "x$enable_systray" = "xyes"; then
5787 ENABLE_SYSTRAY_GTK="TRUE"
5788 BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
5791 AC_MSG_CHECKING([whether to enable DBUS support])
5792 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
5794 AC_MSG_RESULT([yes])
5795 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
5800 AC_MSG_CHECKING([whether to enable GIO support])
5801 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
5802 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
5803 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
5806 AC_MSG_RESULT([yes])
5807 PKG_CHECK_MODULES( GIO, gio-2.0 )
5815 AC_SUBST(ENABLE_GIO)
5816 AC_SUBST(ENABLE_DBUS)
5817 AC_SUBST(ENABLE_SYSTRAY_GTK)
5818 AC_SUBST(GTK_CFLAGS)
5821 dnl ===================================================================
5822 dnl Check whether the Cairo libraries are available.
5823 dnl ===================================================================
5829 if test "$test_cairo" = "yes"; then
5831 AC_MSG_CHECKING([whether to use cairo])
5832 if test "x$enable_cairo" != "xno" ; then
5834 AC_MSG_RESULT([yes])
5835 AC_MSG_CHECKING([which cairo to use])
5836 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
5837 test "$with_system_cairo" != "no"; then
5838 AC_MSG_RESULT([external])
5841 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5842 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
5843 AC_MSG_ERROR([Cairo library requires fontconfig.])
5845 if test "$with_system_xrender_headers" = "yes"; then
5846 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
5848 #include <X11/extensions/Xrender.h>
5850 int main(int argc, char **argv) {
5851 #ifdef PictStandardA8
5857 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
5860 BUILD_TYPE="$BUILD_TYPE CAIRO"
5862 AC_MSG_RESULT([internal])
5869 AC_SUBST(ENABLE_CAIRO)
5870 AC_SUBST(BUILD_PIXMAN)
5871 AC_SUBST(SYSTEM_CAIRO)
5872 AC_SUBST(CAIRO_CFLAGS)
5873 AC_SUBST(CAIRO_LIBS)
5875 dnl ===================================================================
5876 dnl Check whether the GStreamer libraries are available.
5877 dnl ===================================================================
5881 if test "$build_gstreamer" = "yes"; then
5883 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
5884 if test "x$enable_gstreamer" != "xno" ; then
5885 ENABLE_GSTREAMER="TRUE"
5886 AC_MSG_RESULT([yes])
5887 PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
5893 AC_SUBST(ENABLE_GSTREAMER)
5895 dnl ===================================================================
5896 dnl Check whether the OpenGL libraries are available
5897 dnl ===================================================================
5899 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
5902 if test "x$enable_opengl" != "xno" ; then
5903 AC_MSG_RESULT([yes])
5904 AC_CHECK_HEADER(GL/gl.h, [],
5905 [AC_MSG_ERROR([OpenGL headers not found])], [])
5906 AC_CHECK_LIB(GL, main, [],
5907 [AC_MSG_ERROR(libGL not installed or functional)], [])
5908 AC_CHECK_LIB(GLU, main, [],
5909 [AC_MSG_ERROR(libGLU not installed or functional)], [])
5915 AC_SUBST(ENABLE_OPENGL)
5917 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
5918 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
5919 AC_MSG_RESULT([yes])
5920 ENABLE_MINIMIZER=YES
5925 AC_SUBST(ENABLE_MINIMIZER)
5927 AC_MSG_CHECKING([whether to build the Presenter Screen extension])
5928 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
5929 AC_MSG_RESULT([yes])
5930 ENABLE_PRESENTER_SCREEN=YES
5933 ENABLE_PRESENTER_SCREEN=NO
5935 AC_SUBST(ENABLE_PRESENTER_SCREEN)
5937 AC_MSG_CHECKING([whether to build the PDF Import extension])
5938 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
5939 AC_MSG_RESULT([yes])
5940 ENABLE_PDFIMPORT=YES
5942 dnl ===================================================================
5943 dnl Check for system poppler
5944 dnl ===================================================================
5945 AC_MSG_CHECKING([which pdf backend to use])
5946 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
5947 test "$with_system_poppler" != "no"; then
5948 AC_MSG_RESULT([external])
5950 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
5952 AC_MSG_RESULT([internal])
5954 BUILD_TYPE="$BUILD_TYPE XPDF"
5955 AC_MSG_CHECKING([for xpdf module])
5956 if test -d ./xpdf; then
5959 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5966 AC_SUBST(ENABLE_PDFIMPORT)
5967 AC_SUBST(SYSTEM_POPPLER)
5968 AC_SUBST(POPPLER_CFLAGS)
5969 AC_SUBST(POPPLER_LIBS)
5971 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
5972 AC_MSG_CHECKING([for sdext module])
5973 if test -d ./sdext; then
5976 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5978 BUILD_TYPE="$BUILD_TYPE SDEXT"
5981 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
5982 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
5983 AC_MSG_RESULT([yes])
5984 AC_MSG_CHECKING([for swext module])
5985 if test -d ./swext; then
5988 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5990 ENABLE_MEDIAWIKI=YES
5991 BUILD_TYPE="$BUILD_TYPE SWEXT"
5996 AC_SUBST(ENABLE_MEDIAWIKI)
5998 if test "$ENABLE_MEDIAWIKI" == "YES"; then
5999 AC_MSG_CHECKING([which Servlet API Jar to use])
6000 if test -n "$with_system_servlet_api"; then
6001 AC_MSG_RESULT([external])
6002 SYSTEM_SERVLETAPI=YES
6003 if test -z "$SERVLETAPI_JAR"; then
6004 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
6006 AC_CHECK_FILE($SERVLETAPI_JAR, [],
6007 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
6009 AC_MSG_RESULT([internal])
6010 SYSTEM_SERVLETAPI=NO
6011 BUILD_TYPE="$BUILD_TYPE TOMCAT"
6014 AC_SUBST(SYSTEM_SERVLETAPI)
6015 AC_SUBST(SERVLETAPI_JAR)
6017 AC_MSG_CHECKING([whether to build the Report Builder extension])
6018 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
6019 AC_MSG_RESULT([yes])
6020 ENABLE_REPORTBUILDER=YES
6021 AC_MSG_CHECKING([for reportbuilder module])
6022 if test -d ./reportbuilder; then
6025 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
6027 AC_MSG_CHECKING([which jfreereport libs to use])
6028 if test "$with_system_jfreereport" == "yes"; then
6029 SYSTEM_JFREEREPORT=YES
6030 AC_MSG_RESULT([external])
6031 if test -z $SAC_JAR; then
6032 SAC_JAR=/usr/share/java/sac.jar
6034 AC_CHECK_FILE($SAC_JAR, [],
6035 [AC_MSG_ERROR(sac.jar not found.)], [])
6037 if test -z $LIBXML_JAR; then
6038 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
6039 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
6041 AC_CHECK_FILE(/usr/share/java/libxml.jar,
6042 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
6043 [AC_MSG_ERROR(libxml.jar replacement not found.)]
6048 AC_CHECK_FILE($LIBXML_JAR, [],
6049 [AC_MSG_ERROR(libxml.jar not found.)], [])
6052 if test -z $FLUTE_JAR; then
6053 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
6054 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
6056 AC_CHECK_FILE(/usr/share/java/flute.jar,
6057 [ FLUTE_JAR=/usr/share/java/flute.jar ],
6058 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
6063 AC_CHECK_FILE($FLUTE_JAR, [],
6064 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
6067 if test -z $JFREEREPORT_JAR; then
6068 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
6069 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
6071 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
6072 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
6073 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
6078 AC_CHECK_FILE($JFREEREPORT_JAR, [],
6079 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
6082 if test -z $LIBLAYOUT_JAR; then
6083 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
6084 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
6086 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
6087 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
6088 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
6093 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
6094 [AC_MSG_ERROR(liblayout.jar not found.)], [])
6097 if test -z $LIBLOADER_JAR; then
6098 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
6099 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
6101 AC_CHECK_FILE(/usr/share/java/libloader.jar,
6102 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
6103 [AC_MSG_ERROR(libloader.jar replacement not found.)]
6108 AC_CHECK_FILE($LIBLOADER_JAR, [],
6109 [AC_MSG_ERROR(libloader.jar not found.)], [])
6112 if test -z $LIBFORMULA_JAR; then
6113 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
6114 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
6116 AC_CHECK_FILE(/usr/share/java/libformula.jar,
6117 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
6118 [AC_MSG_ERROR(libformula.jar replacement not found.)]
6123 AC_CHECK_FILE($LIBFORMULA_JAR, [],
6124 [AC_MSG_ERROR(libformula.jar not found.)], [])
6127 if test -z $LIBREPOSITORY_JAR; then
6128 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
6129 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
6131 AC_CHECK_FILE(/usr/share/java/librepository.jar,
6132 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
6133 [AC_MSG_ERROR(librepository.jar replacement not found.)]
6138 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
6139 [AC_MSG_ERROR(librepository.jar not found.)], [])
6142 if test -z $LIBFONTS_JAR; then
6143 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
6144 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
6146 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
6147 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
6148 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
6153 AC_CHECK_FILE($LIBFONTS_JAR, [],
6154 [AC_MSG_ERROR(libfonts.jar not found.)], [])
6157 if test -z $LIBSERIALIZER_JAR; then
6158 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
6159 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
6161 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
6162 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
6163 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
6168 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
6169 [AC_MSG_ERROR(libserializer.jar not found.)], [])
6173 if test -z $LIBBASE_JAR; then
6174 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
6175 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
6177 AC_CHECK_FILE(/usr/share/java/libbase.jar,
6178 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
6179 [AC_MSG_ERROR(libbase.jar replacement not found.)]
6184 AC_CHECK_FILE($LIBBASE_JAR, [],
6185 [AC_MSG_ERROR(libbase.jar not found.)], [])
6189 AC_MSG_RESULT([internal])
6190 AC_MSG_CHECKING([for jfreereport module])
6191 if test -d ./jfreereport; then
6194 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
6196 SYSTEM_JFREEREPORT=NO
6197 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
6199 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
6202 ENABLE_REPORTBUILDER=NO
6203 SYSTEM_JFREEREPORT=NO
6205 AC_SUBST(ENABLE_REPORTBUILDER)
6206 AC_SUBST(SYSTEM_JFREEREPORT)
6208 AC_SUBST(LIBXML_JAR)
6210 AC_SUBST(JFREEREPORT_JAR)
6211 AC_SUBST(LIBBASE_JAR)
6212 AC_SUBST(LIBLAYOUT_JAR)
6213 AC_SUBST(LIBLOADER_JAR)
6214 AC_SUBST(LIBFORMULA_JAR)
6215 AC_SUBST(LIBREPOSITORY_JAR)
6216 AC_SUBST(LIBFONTS_JAR)
6217 AC_SUBST(LIBSERIALIZER_JAR)
6219 # this has to be here because both the wiki publisher and the SRB use
6221 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6222 AC_MSG_CHECKING([which Apache commons-* libs to use])
6223 if test "$with_system_apache_commons" = "yes"; then
6224 SYSTEM_APACHE_COMMONS=YES
6225 AC_MSG_RESULT([external])
6226 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6227 if test -z "$COMMONS_CODEC_JAR"; then
6228 COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar
6230 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
6231 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
6232 if test -z "$COMMONS_LANG_JAR"; then
6233 COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar
6235 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
6236 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
6237 if test -z "$COMMONS_HTTPCLIENT_JAR"; then
6238 COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar
6240 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
6241 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
6243 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6244 if test -z "$COMMONS_LOGGING_JAR"; then
6245 COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar
6247 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
6248 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
6252 AC_MSG_RESULT([internal])
6253 SYSTEM_APACHE_COMMONS=NO
6254 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
6257 AC_SUBST(SYSTEM_APACHE_COMMONS)
6258 AC_SUBST(COMMONS_CODEC_JAR)
6259 AC_SUBST(COMMONS_LANG_JAR)
6260 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
6261 AC_SUBST(COMMONS_LOGGING_JAR)
6263 dnl ===================================================================
6264 dnl Check whether the Qt and KDE libraries are available.
6265 dnl ===================================================================
6270 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
6271 dnl Search paths for Qt and KDE
6272 if test "$build_cpu" != "x86_64" ; then
6273 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"
6274 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"
6276 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"
6277 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"
6279 if test -n "$QTDIR" ; then
6280 qt_incdirs="$QTDIR/include $qt_incdirs"
6281 if test "$build_cpu" != "x86_64" ; then
6282 qt_libdirs="$QTDIR/lib $qt_libdirs"
6284 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
6287 if test "$build_cpu" != "x86_64" ; then
6288 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"
6289 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"
6291 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"
6292 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"
6294 if test -n "$KDEDIR" ; then
6295 kde_incdirs="$KDEDIR/include $kde_incdirs"
6296 if test "$build_cpu" != "x86_64" ; then
6297 kde_libdirs="$KDEDIR/lib $kde_libdirs"
6299 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
6304 qt_test_include="qstyle.h"
6305 qt_test_library="libqt-mt.so"
6306 kde_test_include="ksharedptr.h"
6307 kde_test_library="libkdeui.so"
6309 dnl Check for Qt headers
6310 AC_MSG_CHECKING([for Qt headers])
6312 for kde_check in $qt_incdirs ; do
6313 if test -r "$kde_check/$qt_test_include" ; then
6314 qt_incdir="$kde_check"
6318 AC_MSG_RESULT([$qt_incdir])
6319 if test "x$qt_incdir" = "xno" ; then
6320 AC_MSG_ERROR([Qt headers not found. Please specify the root of
6321 your Qt installation by exporting QTDIR before running "configure".])
6324 dnl Check for Qt libraries
6325 AC_MSG_CHECKING([for Qt libraries])
6327 for qt_check in $qt_libdirs ; do
6328 if test -r "$qt_check/$qt_test_library" ; then
6329 qt_libdir="$qt_check"
6333 AC_MSG_RESULT([$qt_libdir])
6334 if test "x$qt_libdir" = "xno" ; then
6335 AC_MSG_ERROR([Qt libraries not found. Please specify the root of
6336 your Qt installation by exporting QTDIR before running "configure".])
6339 dnl Check for Meta Object Compiler
6340 AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
6341 if test "$MOC" = "no" ; then
6342 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6343 the root of your Qt installation by exporting QTDIR before running "configure".])
6346 dnl Check for KDE headers
6347 AC_MSG_CHECKING([for KDE headers])
6349 for kde_check in $kde_incdirs ; do
6350 if test -r "$kde_check/$kde_test_include" ; then
6351 kde_incdir="$kde_check"
6355 AC_MSG_RESULT([$kde_incdir])
6356 if test "x$kde_incdir" = "xno" ; then
6357 AC_MSG_ERROR([KDE headers not found. Please specify the root of
6358 your KDE installation by exporting KDEDIR before running "configure".])
6361 dnl Check for KDE libraries
6362 AC_MSG_CHECKING([for KDE libraries])
6364 for kde_check in $kde_libdirs ; do
6365 if test -r "$kde_check/$kde_test_library" ; then
6366 kde_libdir="$kde_check"
6370 AC_MSG_RESULT([$kde_libdir])
6371 if test "x$kde_libdir" = "xno" ; then
6372 AC_MSG_ERROR([KDE libraries not found. Please specify the root of
6373 your KDE installation by exporting KDEDIR before running "configure".])
6376 dnl Set the variables
6377 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6378 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
6380 AC_SUBST(KDE_CFLAGS)
6384 dnl ===================================================================
6385 dnl KDE4 Integration
6386 dnl ===================================================================
6391 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
6392 qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes"
6393 qt_libdirs="$QT4LIB /usr/lib $x_libraries"
6395 kde_incdirs="/usr/include $x_includes"
6396 kde_libdirs="/usr/lib $x_libraries"
6398 if test "$build_cpu" == "x86_64" ; then
6399 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
6400 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
6403 if test -n "$KDE4DIR" ; then
6404 kde_incdirs="$KDE4DIR/include $kde_incdirs"
6405 if test "$build_cpu" != "x86_64" ; then
6406 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
6408 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
6412 qt_test_include="Qt/qobject.h"
6413 qt_test_library="libQtCore.so"
6414 kde_test_include="ksharedptr.h"
6415 kde_test_library="libkdeui.so"
6417 AC_MSG_CHECKING([for Qt4 headers])
6419 for inc_dir in $qt_incdirs ; do
6420 if test -r "$inc_dir/$qt_test_include" ; then
6421 qt_header_dir="$inc_dir"
6426 AC_MSG_RESULT([$qt_header_dir])
6427 if test "x$qt_header_dir" = "xno" ; then
6428 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6431 AC_MSG_CHECKING([for Qt4 libraries])
6433 for lib_dir in $qt_libdirs ; do
6434 if test -r "$lib_dir/$qt_test_library" ; then
6435 qt_lib_dir="$lib_dir"
6440 AC_MSG_RESULT([$qt_lib_dir])
6442 if test "x$qt_lib_dir" = "xno" ; then
6443 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6446 dnl Check for Meta Object Compiler
6447 AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
6448 if test "$MOC4" = "no" ; then
6449 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6450 the root of your Qt installation by exporting QT4DIR before running "configure".])
6453 dnl Check for KDE4 headers
6454 AC_MSG_CHECKING([for KDE4 headers])
6456 for kde_check in $kde_incdirs ; do
6457 if test -r "$kde_check/$kde_test_include" ; then
6458 kde_incdir="$kde_check"
6462 AC_MSG_RESULT([$kde_incdir])
6463 if test "x$kde_incdir" = "xno" ; then
6464 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6467 dnl Check for KDE4 libraries
6468 AC_MSG_CHECKING([for KDE4 libraries])
6470 for kde_check in $kde_libdirs ; do
6471 if test -r "$kde_check/$kde_test_library" ; then
6472 kde_libdir="$kde_check"
6477 AC_MSG_RESULT([$kde_libdir])
6478 if test "x$kde_libdir" = "xno" ; then
6479 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6482 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6483 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
6485 AC_SUBST(KDE4_CFLAGS)
6489 dnl ===================================================================
6490 dnl Test for the enabling the lockdown pieces
6491 dnl ===================================================================
6492 AC_MSG_CHECKING([whether to enable the lockdown pieces])
6494 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
6496 AC_MSG_RESULT([yes])
6500 AC_SUBST(ENABLE_LOCKDOWN)
6502 dnl ===================================================================
6503 dnl Test whether to include Evolution 2 support
6504 dnl ===================================================================
6505 AC_MSG_CHECKING([whether to enable evolution 2 support])
6506 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
6507 AC_MSG_RESULT([yes])
6508 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
6509 ENABLE_EVOAB2="TRUE"
6514 AC_SUBST(ENABLE_EVOAB2)
6515 AC_SUBST(GOBJECT_CFLAGS)
6516 AC_SUBST(GOBJECT_LIBS)
6518 dnl ===================================================================
6519 dnl Test whether to include KDE AB support
6520 dnl ===================================================================
6521 AC_MSG_CHECKING([whether to enable KDE address book support])
6522 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
6523 AC_MSG_RESULT([yes])
6525 save_CXXFLAGS=$CXXFLAGS
6526 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
6527 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
6529 #include <kdeversion.h>
6531 int main(int argc, char **argv) {
6532 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
6535 ], [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])])
6536 CXXFLAGS=$save_CXXFLAGS
6543 AC_SUBST(ENABLE_KAB)
6545 dnl ===================================================================
6546 dnl Test whether to include FontOOo
6547 dnl ===================================================================
6548 AC_MSG_CHECKING([whether to include FontOOo])
6549 if test -n "$enable_fontooo"; then
6550 if test "$enable_fontooo" = "no"; then
6553 SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
6555 AC_MSG_RESULT([yes])
6557 BUILD_TYPE="$BUILD_TYPE MSFONTEXTRACT"
6562 SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
6564 AC_SUBST(WITH_FONTOOO)
6566 if test "$WITH_FONTOOO" = "YES"; then
6567 dnl ===============================================================
6568 dnl Check whether to use libmspack from system
6569 dnl ===============================================================
6570 AC_MSG_CHECKING([whether to use system libmspack])
6571 if test -n "$with_system_mspack" -o -n "$with_system_libs" && \
6572 test "$with_system_mspack" != "no"; then
6573 AC_MSG_RESULT([yes])
6575 AC_CHECK_HEADER(mspack.h, [],
6576 [AC_MSG_ERROR([mspack.h not found, install libmspack])], [])
6577 AC_CHECK_LIB(mspack, mspack_create_cab_decompressor, [],
6578 [AC_MSG_ERROR(libmspack not installed or functional)], [])
6584 AC_SUBST(SYSTEM_MSPACK)
6586 dnl ===================================================================
6587 dnl Test whether to include MathMLDTD
6588 dnl ===================================================================
6589 AC_MSG_CHECKING([whether to include MathMLDTD])
6590 if test -n "$enable_mathmldtd"; then
6591 if test "$enable_mathmldtd" = "no"; then
6593 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6595 AC_MSG_RESULT([yes])
6596 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
6600 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6603 dnl ===================================================================
6604 dnl Test whether to include fonts
6605 dnl ===================================================================
6606 AC_MSG_CHECKING([whether to include Bitstream Vera fonts])
6607 if test "$with_fonts" != "no" ; then
6608 AC_MSG_RESULT([yes])
6610 BUILD_TYPE="$BUILD_TYPE BITSTREAM_VERA_FONTS"
6614 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
6616 AC_SUBST(WITH_FONTS)
6618 AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
6619 if test "$with_agfa_monotype_fonts" != "no" -a -e ../agfa_monotype_fonts/download/agfa-monotype-fonts.tar.gz; then
6620 AC_MSG_RESULT([yes])
6621 WITH_AGFA_MONOTYPE_FONTS=YES
6622 SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
6623 BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
6626 WITH_AGFA_MONOTYPE_FONTS=NO
6628 AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
6630 dnl ===================================================================
6631 dnl Test whether to include ppds
6632 dnl ===================================================================
6633 AC_MSG_CHECKING([whether to include PPDs])
6634 if test "$with_ppds" != "no"; then
6635 AC_MSG_RESULT([yes])
6639 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
6641 AC_SUBST(WITHOUT_PPDS)
6643 dnl ===================================================================
6644 dnl Test whether to include afms
6645 dnl ===================================================================
6646 AC_MSG_CHECKING([whether to include AFMs])
6647 if test "$with_afms" != "no"; then
6648 AC_MSG_RESULT([yes])
6652 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
6654 AC_SUBST(WITHOUT_AFMS)
6658 AC_MSG_CHECKING([whether and how to use Xinerama])
6659 if test "$_os" = "Darwin"; then
6661 XINERAMA_LINK=dynamic
6662 AC_MSG_RESULT([yes])
6663 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
6664 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
6665 # we have both versions, let the user decide but use the dynamic one
6668 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
6669 XINERAMA_LINK=dynamic
6671 XINERAMA_LINK=static
6673 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
6674 # we have only the dynamic version
6676 XINERAMA_LINK=dynamic
6677 elif test -e "$XLIB/libXinerama.a"; then
6679 if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6681 XINERAMA_LINK=static
6691 if test "$USE_XINERAMA" = "YES"; then
6692 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
6693 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
6694 [AC_MSG_ERROR(Xinerama header not found.)], [])
6695 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
6696 if test "$_os" = "FreeBSD"; then
6697 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
6699 if test "$_os" = "Linux"; then
6700 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
6702 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
6703 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
6705 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
6710 AC_SUBST(USE_XINERAMA)
6711 AC_SUBST(XINERAMA_LINK)
6713 dnl ===================================================================
6714 dnl Test for the presence of Ant and that it works
6715 dnl ===================================================================
6717 if test "$SOLAR_JAVA" != ""; then
6718 ANT_HOME=; export ANT_HOME
6719 WITH_ANT_HOME=; export WITH_ANT_HOME
6720 if test -z "$with_ant_home"; then
6721 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
6723 if test "$_os" = "WINNT"; then
6724 with_ant_home=`cygpath -u "$with_ant_home"`
6726 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
6727 WITH_ANT_HOME=$with_ant_home
6728 ANT_HOME=$with_ant_home
6731 if test -z "$ANT"; then
6732 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
6734 # resolve relative or absolute symlink
6735 while test -h "$ANT"; do
6737 a_basename=`basename "$ANT"`
6738 a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
6739 cd "`dirname "$ANT"`"
6740 cd "`dirname "$a_script"`"
6741 ANT="`pwd`"/"`basename "$a_script"`"
6745 if test "$_os" = "OS2"; then
6746 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6751 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
6753 AC_MSG_CHECKING([whether ant is >= $ant_minver])
6754 ant_version=`$ANT -version | $AWK '{ print $4; }'`
6755 ant_version_major=`echo $ant_version | cut -d. -f1`
6756 ant_version_minor=`echo $ant_version | cut -d. -f2`
6757 echo "configure: ant_version $ant_version " >&5
6758 echo "configure: ant_version_major $ant_version_major " >&5
6759 echo "configure: ant_version_minor $ant_version_minor " >&5
6760 if test "$ant_version_major" -ge "2"; then
6761 AC_MSG_RESULT([yes, $ant_version])
6762 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
6763 AC_MSG_RESULT([yes, $ant_version])
6765 AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
6767 AC_MSG_CHECKING([if $ANT works])
6768 cat > conftest.java << EOF
6769 public class conftest {
6770 int testmethod(int a, int b) {
6776 cat > conftest.xml << EOF
6777 <project name="conftest" default="conftest">
6778 <target name="conftest">
6779 <javac srcdir="." includes="conftest.java">
6784 oldJAVA_HOME=$JAVA_HOME
6785 if test "$JAVACISGCJ" = "yes"; then
6786 JAVA_HOME=; export JAVA_HOME
6787 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6789 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6791 AC_TRY_EVAL(ant_cmd)
6792 if test $? = 0 && test -f ./conftest.class ; then
6793 AC_MSG_RESULT([Ant works])
6794 if test -z "$WITH_ANT_HOME"; then
6795 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
6796 if test -z "$ANT_HOME"; then
6797 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6800 ANT_HOME="$WITH_ANT_HOME"
6803 echo "configure: Ant test failed" >&5
6804 cat conftest.java >&5
6805 cat conftest.xml >&5
6806 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
6808 echo "Ant does not work - Some Java projects will not build!" >>warn
6810 JAVA_HOME=$oldJAVA_HOME
6811 rm -f conftest* core core.* *.core
6813 if test -z "$ANT_HOME"; then
6814 ANT_HOME="NO_ANT_HOME"
6818 dnl Checking for ant.jar
6819 if test "$ANT_HOME" != "NO_ANT_HOME"; then
6820 AC_MSG_CHECKING([Ant lib directory])
6821 if test -f $ANT_HOME/lib/ant.jar; then
6822 ANT_LIB="$ANT_HOME/lib"
6824 if test -f $ANT_HOME/ant.jar; then
6827 if test -f /usr/share/java/ant.jar; then
6828 ANT_LIB=/usr/share/java
6830 if test -f /usr/share/ant-core/lib/ant.jar; then
6831 ANT_LIB=/usr/share/ant-core/lib
6833 if test -f $ANT_HOME/lib/ant/ant.jar; then
6834 ANT_LIB="$ANT_HOME/lib/ant"
6836 AC_MSG_ERROR([Ant libraries not found!])
6842 AC_MSG_RESULT([Ant lib directory found.])
6847 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6848 AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
6851 cat > conftest.java << EOF
6852 public class conftest {
6853 int testmethod(int a, int b) {
6859 cat > conftest.xml << EOF
6860 <project name="conftest" default="conftest">
6861 <target name="conftest" depends="copytest">
6862 <javac srcdir="." includes="conftest.java">
6865 <target name="copytest">
6866 <copy todir="confdir">
6867 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
6869 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
6874 if test "$JAVACISGCJ" = "yes"; then
6875 JAVA_HOME=; export JAVA_HOME
6876 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6878 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6880 AC_TRY_EVAL(ant_cmd)
6881 if test $? = 0 && test -f ./conftest.class ; then
6882 AC_MSG_RESULT([yes])
6885 echo "configure: Ant test failed" >&5
6886 cat conftest.java >&5
6887 cat conftest.xml >&5
6889 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
6892 rm -f conftest* core core.* *.core
6894 AC_MSG_CHECKING([which languages to be built])
6895 WITH_LANG="$with_lang"
6896 if test -z "$WITH_LANG"; then
6897 AC_MSG_RESULT([en-US])
6899 AC_MSG_RESULT([$WITH_LANG])
6903 AC_MSG_CHECKING([which languages have poor help localizations])
6904 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
6905 if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
6906 AC_MSG_RESULT([none])
6908 AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
6910 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
6912 AC_MSG_CHECKING([which dictionaries to include])
6913 if test -z "$with_dict"; then
6915 AC_MSG_RESULT([ALL])
6917 WITH_DICT=","$with_dict","
6918 AC_MSG_RESULT([$with_dict])
6922 AC_MSG_CHECKING([for additional 'intro' bitmaps])
6924 if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
6926 AC_MSG_RESULT([none])
6928 for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
6931 *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
6933 if test -n "$bitmap" ; then
6934 INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
6937 AC_MSG_RESULT([$INTRO_BITMAPS])
6939 AC_SUBST(INTRO_BITMAPS)
6941 AC_MSG_CHECKING([for additional 'about' bitmaps])
6943 if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
6945 AC_MSG_RESULT([none])
6947 for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
6950 *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
6952 if test -n "$bitmap" ; then
6953 ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
6956 AC_MSG_RESULT([$ABOUT_BITMAPS])
6958 AC_SUBST(ABOUT_BITMAPS)
6961 AC_MSG_CHECKING([for vendor])
6962 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
6963 AC_MSG_RESULT([not set])
6965 OOO_VENDOR="$with_vendor"
6966 AC_MSG_RESULT([$OOO_VENDOR])
6968 AC_SUBST(OOO_VENDOR)
6971 AC_MSG_CHECKING([for UNIX wrapper name])
6972 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
6973 AC_MSG_RESULT([not set])
6975 UNIXWRAPPERNAME="$with_unix_wrapper"
6976 AC_MSG_RESULT([$UNIXWRAPPERNAME])
6978 AC_SUBST(UNIXWRAPPERNAME)
6980 AC_MSG_CHECKING([whether to statically link to Gtk])
6981 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
6982 ENABLE_STATIC_GTK="TRUE"
6983 AC_MSG_RESULT([yes])
6985 ENABLE_STATIC_GTK="FALSE"
6988 AC_SUBST(ENABLE_STATIC_GTK)
6990 AC_MSG_CHECKING([whether to use layout dialogs])
6991 if test -n "$enable_layout" && test "$enable_layout" != "no"; then
6992 ENABLE_LAYOUT="TRUE"
6993 AC_MSG_RESULT([yes])
6995 ENABLE_LAYOUT="FALSE"
6998 AC_SUBST(ENABLE_LAYOUT)
7000 # ===================================================================
7001 # De- or increase default verbosity of build process
7002 # ===================================================================
7003 AC_MSG_CHECKING([build verbosity])
7004 if test -n "$enable_verbose"; then
7005 if test "$enable_verbose" == "yes"; then
7007 AC_MSG_RESULT([high])
7009 if test "$enable_verbose" == "no"; then
7011 AC_MSG_RESULT([low])
7014 AC_MSG_RESULT([not set])
7018 dnl ===================================================================
7019 dnl Setting up the environment.
7020 dnl ===================================================================
7021 echo "********************************************************************"
7023 echo "* Setting up the build environment variables. *"
7025 echo "********************************************************************"
7027 if test -z "$COMPATH"; then
7028 AC_MSG_ERROR([No compiler found.])
7032 AC_MSG_CHECKING([solver path])
7033 if test -z "$with_local_solver"; then
7034 LOCAL_SOLVER="DEFAULT"
7035 AC_MSG_RESULT([default])
7037 LOCAL_SOLVER=$with_local_solver
7038 AC_MSG_RESULT([$with_local_solver])
7040 AC_SUBST(LOCAL_SOLVER)
7042 AC_SUBST(BUILD_TYPE)
7044 # make sure config.guess is +x; we execute config.guess, so it has to be so;
7045 chmod +x ./config.guess
7047 AC_OUTPUT([set_soenv Makefile])
7049 dnl Executing the set_soenv script to setup the environment variables.
7051 if test -z "$enable_check_only"; then
7056 echo No environment file will be generated
7058 num_warnings=`wc -l warn`
7059 _num=`echo $num_warnings | $AWK '{ print $1 }'`
7060 if test $_num -gt 0; then
7061 echo The following warning\(s\) were generated by configure
7062 echo ----------------------------------------------------
7067 echo There were no warnings