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
29 [ --without-gpc Use the internal polygon clipping code instead of
30 the external GPC polygon clipping library.
31 ],,if test ! -e ./external/gpc/gpc.c && test ! -e ./external/gpc/gpc.h; then without_gpc=yes; fi)
33 [ --disable-ldap Disables the use of LDAP backend via Netscape/Mozilla
37 [ --enable-mono Enables the compilation of the Mono bindings
40 [ --with-openldap Enables the use of the OpenLDAP LDAP SDK instead
41 of the Netscape/Mozilla one
43 AC_ARG_ENABLE(lockdown,
44 [ --enable-lockdown Enables the gconf integration work in OOo
47 [ --disable-vba disables the vba compatibility feature
49 AC_ARG_WITH(vba-package-format,
50 [ --with-vba-package-format specify package format for vba compatibility api.
51 Specifying "builtin" means the api component and
52 associated type library are part of the installation set.
53 Specifying "extn" creates an uno extension that is
54 part of the installation set ( located in the program
55 directory ) that MUST be optionly registered using
56 either the unopkg executeable or the extension manager
59 Note: "builtin" is the default, "extn" can cause
61 Usage: --with-vba-package-format="builtin" or
62 --with-vba-package-format="extn"
65 [ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++.
67 AC_ARG_ENABLE(mozilla,
68 [ --disable-mozilla OO.o usually includes a strangely hacked up mozilla
69 binary for your platform, to build without this
70 version, use this option.
71 ],,enable_mozilla="yes")
73 [ --without-fonts Removes Bitstream Vera fonts from
74 openoffice.org installation set, for people building
75 for specific distributions where the fonts are known
76 to be already available
79 [ --without-ppds Removes Postscript Printer definition files from
80 openoffice.org installation set, for people building
81 for specific distributions where PPDs are known to be
82 already available (every recent distro with CUPS
86 [ --without-afms Removes bitmap font files from openoffice.org
87 installation set, for people building for specific
88 distributions where AFM files or TrueType Fonts
89 are known to be available.
91 AC_ARG_WITH(agfa-monotype-fonts,
92 [ --without-agfa-monotype-fonts Remove proprietary Agfa Monotype fonts
93 (even if present) in the openoffice.org installation
95 ],,with_agfa_monotype_fonts="yes")
97 [ --disable-epm OO.o includes self-packaging code, that requires
98 epm, however epm is useless for large scale
102 [ --with-epm Decides which epm to use. Default is to use
103 the one from the system if one is built. When
104 either this is not there or you say =internal
107 AC_ARG_WITH(package-format,
108 [ --with-package-format specify package format(s) for OOo installsets.
109 Default is "normal" one of the OS/Distribution.
111 Usage: --with-package-format="foo bar"
114 [ --disable-odk OO.o includes an ODK, office development kit
115 which some packagers may with to build without
117 AC_ARG_ENABLE(qadevooo,
118 [ --disable-qadevooo OO.o includes some qa testsuites which some
119 packagers may wish to build without
120 ],,enable_qadevooo="yes")
121 AC_ARG_ENABLE(fontooo,
122 [ --disable-fontooo disable FontOOo
123 (useful for distributions using fontconfig for OOo)
124 ],,enable_fontooo="yes")
125 AC_ARG_ENABLE(mathmldtd,
126 [ --disable-mathmldtd disable mathmldtd
127 (useful for distributions that want to avoid packaging
129 ],,enable_mathmldtd="yes")
130 AC_ARG_ENABLE(evolution2,
131 [ --enable-evolution2 Allows the built-in evolution 2 addressbook
132 connectivity build to be enabled.
134 AC_ARG_WITH(system-stdlibs,
135 [ --with-system-stdlibs use libstdc++/libgcc_s already on system
136 ],,checkforprelink=yes)
137 AC_ARG_WITH(system-mspack,
138 [ --with-system-mspack use libmspack already installed on system
141 [ --disable-cups disable cups support in the psprint project
143 AC_ARG_ENABLE(fontconfig,
144 [ --disable-fontconfig disable support for the fontconfig library
145 ],,enable_fontconfig=yes)
146 AC_ARG_ENABLE(directx,
147 [ --disable-directx Remove DirectX implementation for the new XCanvas
148 interface. The DirectX support requires more stuff
149 installed on Windows to compile.
150 (DirectX SDK, GDI+ libs)
151 ],,enable_directx=yes)
152 AC_ARG_ENABLE(activex,
153 [ --disable-activex Disable the use of ActiveX for windows build.
154 This switch is mandatory when using VC++ 2005/2008 Express.
158 [ --disable-atl Disable the use of ATL for windows build.
159 This switch is mandatory when using VC++ 2005/2008 Express.
162 AC_ARG_ENABLE(symbols,
163 [ --enable-symbols Include debugging symbols in output.
164 WARNING - a complete build needs 8 Gb of space and
165 takes much longer. (enables -g compiler flag)
167 --enable-symbols=SMALL sets the gcc -g1 setting
170 Enabling symbols disables the stripping of the solver
171 (--disable-strip-solver).
173 AC_ARG_ENABLE(strip-solver,
174 [ --disable-strip-solver Disable the stripping of the solver.
175 By default the solver is stripped unless a build with
176 debugging symbols (--enable-symbols) is requested.
178 This switch allows to override this setting.
180 AC_ARG_ENABLE(werror,
181 [ --enable-werror Turn warnings to errors. (Has no effect in modules
182 where the treating of warnings as errors is disabled
186 [ --enable-debug Include debugging symbols from --enable-symbols
187 plus extra debugging code. Extra large build!
188 (enables -g compiler flag and dmake debug=true)
190 AC_ARG_ENABLE(dbgutil,
191 [ --enable-dbgutil Include additional debugging utilities, such as
192 assertions, object counting, etc. Larger build.
193 Independent from --enable-debug
195 AC_ARG_ENABLE(crashdump,
196 [[ --enable-crashdump[=yes|TRUE|STATIC|no]
197 Enable (disable) the crashdump feature code.
199 ]],,enable_crashdump=no)
200 AC_ARG_ENABLE(cl-standard,
201 [ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing
202 standard compiler. ( This just disavles optimization
203 options and therefore removes a lot of warnings when
204 using the cheaper standard compiler. )
207 [ --disable-gtk Determines whether to use Gtk+ vclplug on platforms
208 where Gtk+ is available.
210 AC_ARG_ENABLE(systray,
211 [ --disable-systray Determines whether to build the systray quickstarter.
212 ],,enable_systray=yes)
214 [ --enable-cairo Determines whether to use Cairo library on
215 platforms where Cairo is available.
217 AC_ARG_WITH(system-cairo,
218 [ --with-system-cairo Use Cairo libraries already on system
220 AC_ARG_ENABLE(opengl,
221 [ --enable-opengl Determines whether to use OpenGL (for 3D transitions)
222 This is built as an UNO extension and not deployed
223 in the install per default.
226 [ --enable-dbus Determines whether to enable presentation mode
227 screensaver control under GNOME via DBUS
230 [ --disable-gconf Determines whether to use the GConf support
232 AC_ARG_ENABLE(gnome-vfs,
233 [ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing
234 System on platforms where that VFS is available
235 ],,enable_gnome_vfs=yes)
237 [ --enable-gio Determines whether to use the GIO support
239 AC_ARG_ENABLE(static-gtk,
240 [ --enable-static-gtk Modules that are linked against gtk libraries use
241 the static libraries instead of the dynamic ones.
242 (enables -Bstatic linker flag for gtk libraries)
244 AC_ARG_ENABLE(layout,
245 [ --disable-layout Disable the compilation and use of layout dialogs
247 AC_ARG_ENABLE(layout_experimental,
248 [ --enable-layout-experimental 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
266 [ --enable-kde Determines whether to use Qt/KDE vclplug on platforms
267 where Qt and KDE are available.
270 [ --disable-kdeab Disable the KDE address book support
271 ],,if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi)
272 AC_ARG_ENABLE(binfilter,
273 [ --disable-binfilter Disable legacy binary file formats filters
274 ],,if ! test -d ./binfilter; then enable_binfilter=no; fi)
276 [ --disable-rpath Disable the use of relative paths in shared libraries
279 [ --disable-pam Disable pam support.
281 AC_ARG_ENABLE(pam-link,
282 [ --enable-pam-link link with libpam instead of dynamically open it
284 AC_ARG_ENABLE(crypt-link,
285 [ --disable-crypt-link disable linking with libcrypt instead of dynamically
286 open it (needed for ancient GNU/Linux distributions
287 without crypt()/libcrypt)
288 ],,enable_crypt_link=yes)
289 AC_ARG_ENABLE(xrender-link,
290 [ --enable-xrender-link link with libXrender instead of dynamically open it
293 [ --disable-randr disable RandR support in the vcl project
295 AC_ARG_ENABLE(randr-link,
296 [ --disable-randr-link disable linking with libXrandr, instead dynamically
298 ],,enable_randr_link=yes)
299 AC_ARG_WITH(myspell-dicts,
300 [ --without-myspell-dicts Removes myspell dictionaries from openoffice.org
301 installation set, for people building for specific
302 distributions where the myspell dictionaries are
303 installed from other sources
305 AC_ARG_WITH(system-dicts,
306 [ --with-system-dicts Use dictionaries from system paths- Specify
307 them via --with-{dict,hyph,thes}-path=/path
308 if you want to override the default ones
310 AC_ARG_WITH(external-dict-dir,
311 [ --with-external-dict-dir Specify external dictionary dir
313 AC_ARG_WITH(external-hyph-dir,
314 [ --with-external-hyph-dir Specify external hyphenation pattern dir
316 AC_ARG_WITH(external-thes-dir,
317 [ --with-external-thes-dir Specify external thesaurus dir
319 AC_ARG_WITH(system-libs,
320 [ --with-system-libs Use libs already on system -- enables all
321 --with-system-* flags except mozilla and
322 odbc/sane/xrender-header(s)
324 AC_ARG_WITH(system-headers,
325 [ --with-system-headers Use headers already on system -- enables all
326 --with-system-* flags for external packages
327 whose headers are the only entities used i.e.
328 boost/vigra/odbc/sane/xrender-header(s)
330 AC_ARG_WITH(system-jars,
331 [ --without-system-jars When building with --with-system-libs, also the
332 needed jars are expected on the system. Use this to
334 (except for the db case where --with-system-db
335 *has to* imply using the db.jar from there, too)
337 AC_ARG_WITH(system-zlib,
338 [ --with-system-zlib Use zlib already on system
340 AC_ARG_WITH(system-openssl,
341 [ --with-system-openssl Use OpenSSL already on system
343 AC_ARG_WITH(system-jpeg,
344 [ --with-system-jpeg Use jpeg already on system
346 AC_ARG_WITH(system-expat,
347 [ --with-system-expat Use expat already on system
349 AC_ARG_WITH(system-libwpd,
350 [ --with-system-libwpd Use libwpd already on system
352 AC_ARG_WITH(system-libwps,
353 [ --with-system-libwps Use libwps already on system
355 AC_ARG_WITH(system-libwpg,
356 [ --with-system-libwpg Use libwpg already on system
358 AC_ARG_WITH(system-libxml,
359 [ --with-system-libxml Use libxml already on system
361 AC_ARG_WITH(system-python,
362 [ --with-system-python Use python already on system
364 AC_ARG_WITH(system-icu,
365 [ --with-system-icu Use icu already on system
367 AC_ARG_WITH(system-poppler,
368 [ --with-system-poppler Use poppler already on system
370 AC_ARG_WITH(system-db,
371 [ --with-system-db Use berkeley db already on system
373 AC_ARG_WITH(system-lucene,
374 [ --with-system-lucene Use lucene already on system
376 AC_ARG_WITH(lucene-core-jar,
377 [ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ],
378 [ LUCENE_CORE_JAR="$withval"
380 AC_ARG_WITH(lucene-analyzers-jar,
381 [ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ],
382 [ LUCENE_ANALYZERS_JAR="$withval"
384 AC_ARG_WITH(system-hsqldb,
385 [ --with-system-hsqldb Use hsqldb already on system
387 AC_ARG_WITH(hsqldb-jar,
388 [ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ],
389 [ HSQLDB_JAR="$withval"
391 AC_ARG_WITH(system-beanshell,
392 [ --with-system-beanshell Use beanshell already on system
394 AC_ARG_WITH(beanshell-jar,
395 [ --with-beanshell-jar=JARFILE Specify path to jarfile manually ],
398 AC_ARG_ENABLE(minimizer,
399 [ --enable-minimizer enables the build of the Presentation Minimizer extension
401 AC_ARG_ENABLE(presenter-console,
402 [ --enable-presenter-console enables the build of the Presenter Console extension
404 AC_ARG_ENABLE(pdfimport,
405 [ --enable-pdfimport enables the build of the PDF Import extension and xpdf
407 AC_ARG_ENABLE(wiki-publisher,
408 [ --enable-wiki-publisher enables the build of the Wiki Publisher extension
410 AC_ARG_WITH(commons-codec-jar,
411 [ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ],
412 [ COMMONS_CODEC_JAR="$withval"
414 AC_ARG_WITH(commons-lang-jar,
415 [ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ],
416 [ COMMONS_LANG_JAR="$withval"
418 AC_ARG_WITH(commons-httpclient-jar,
419 [ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ],
420 [ COMMONS_HTTPCLIENT_JAR="$withval"
422 AC_ARG_WITH(commons-logging-jar,
423 [ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ],
424 [ COMMONS_LOGGING_JAR="$withval"
426 AC_ARG_WITH(servlet-api-jar,
427 [ --servlet-api-jar=JARFILE Specify path to jarfile manually ],
428 [ SERVLETAPI_JAR="$withval"
430 AC_ARG_ENABLE(ogltrans,
431 [ --enable-ogltrans enables the build of the OGLTrans extension
433 AC_ARG_ENABLE(report-builder,
434 [ --enable-report-builder enables the build of the Report Builder extension
436 AC_ARG_WITH(system-jfreereport,
437 [ --with-system-jfreereport Use JFreeReport already on system
440 [ --with-sac-jar=JARFILE Specify path to jarfile manually ],
443 AC_ARG_WITH(libxml-jar,
444 [ --with-libxml-jar=JARFILE Specify path to jarfile manually ],
445 [ LIBXML_JAR="$withval"
447 AC_ARG_WITH(flute-jar,
448 [ --with-flute-jar=JARFILE Specify path to jarfile manually ],
449 [ FLUTE_JAR="$withval"
451 AC_ARG_WITH(jfreereport-jar,
452 [ --with-jfreereport-jar=JARFILE Specify path to jarfile manually ],
453 [ JFREEREPORT_JAR="$withval"
455 AC_ARG_WITH(liblayout-jar,
456 [ --with-liblayout-jar=JARFILE Specify path to jarfile manually ],
457 [ LIBLAYOUT_JAR="$withval"
459 AC_ARG_WITH(libloader-jar,
460 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
461 [ LIBLOADER_JAR="$withval"
463 AC_ARG_WITH(libloader-jar,
464 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
465 [ LIBLOADER_JAR="$withval"
467 AC_ARG_WITH(libformula-jar,
468 [ --with-libformula-jar=JARFILE Specify path to jarfile manually ],
469 [ LIBFORMULA_JAR="$withval"
471 AC_ARG_WITH(librepository-jar,
472 [ --with-librepository-jar=JARFILE Specify path to jarfile manually ],
473 [ LIBREPOSITORY_JAR="$withval"
475 AC_ARG_WITH(libfonts-jar,
476 [ --with-libfonts-jar=JARFILE Specify path to jarfile manually ],
477 [ LIBFONTS_JAR="$withval"
479 AC_ARG_WITH(libserializer-jar,
480 [ --with-libserializer-jar=JARFILE Specify path to jarfile manually ],
481 [ LIBSERIALIZER_JAR="$withval"
483 AC_ARG_WITH(libbase-jar,
484 [ --with-libbase-jar=JARFILE Specify path to jarfile manually ],
485 [ LIBBASE_JAR="$withval"
487 AC_ARG_WITH(system-saxon,
488 [ --with-system-saxon Use saxon already on system
490 AC_ARG_WITH(saxon-jar,
491 [ --with-saxon-jar=JARFILE Specify path to jarfile manually ],
492 [ SAXON_JAR="$withval"
494 AC_ARG_WITH(system-libxslt,
495 [ --with-system-libxslt Use libxslt already on system
497 AC_ARG_WITH(system-odbc,
498 [ --with-system-odbc-headers Use the odbc headers already on system
500 AC_ARG_WITH(system-sane,
501 [ --with-system-sane-header Use sane.h already on system
503 AC_ARG_WITH(system-xrender,
504 [ --with-system-xrender-headers Use XRender headers already on system
506 AC_ARG_WITH(system-mesa-headers,
507 [ --with-system-mesa-headers Use Mesa headers already on system
509 AC_ARG_WITH(system-curl,
510 [ --with-system-curl Use curl already on system
512 AC_ARG_WITH(system-boost,
513 [ --with-system-boost Use boost already on system
515 AC_ARG_WITH(system-vigra,
516 [ --with-system-vigra Use vigra already on system
519 [ --disable-neon Disable neon and the compilation of webdav binding
522 [ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla
525 AC_ARG_WITH(system-neon,
526 [ --with-system-neon Use neon already on system
528 AC_ARG_WITH(system-agg,
529 [ --with-system-agg Use AGG already on system
531 AC_ARG_WITH(system-hunspell,
532 [ --with-system-hunspell Use libhunspell already on system
534 AC_ARG_WITH(system-mythes,
535 [ --with-system-mythes Use mythes already on system
537 AC_ARG_WITH(system-altlinuxhyph,
538 [ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
540 AC_ARG_WITH(system-lpsolve,
541 [ --with-system-lpsolve Use lpsolve already on system
543 AC_ARG_WITH(system-mozilla,
544 [ --with-system-mozilla Use mozilla already on system. Note that some
545 components cannot be built against a contemporary
546 mozilla. The flavour used can be specified by
547 --with-system-mozilla=<flavour>. Supported are:
548 libxul (default), xulrunner, firefox, seamonkey,
550 ], WITH_SYSTEM_MOZILLA=$withval, WITH_SYSTEM_MOZILLA=no)
551 AC_ARG_WITH(linker-hash-style,
552 [ --with-linker-hash-style
553 ], WITH_LINKER_HASH_STYLE=$withval, WITH_LINKER_HASH_STYLE=gnu)
555 [ --with-stlport The location that STLport is installed in. The STL
556 header files are assumed to be in
557 stlport-home/stlport and the STLPort library in
560 Usage: --with-stlport=<absolute path to stlport home>
562 Warning!!, disabling using --without-stlport or
563 enabling using --with-stlport on a platform that
564 defaults to the opposite will break ABI compatability
565 ], WITH_STLPORT=$withval , WITH_STLPORT=auto)
566 AC_ARG_WITH(jdk-home,
567 [ --with-jdk-home if you have installed JDK 1.3 or later on your system
568 please supply the path here.
569 Note that this is not the location of the Java binary
570 but the location of the entire distribution.
572 Usage: --with-jdk-home=<absolute path to JDK home>
574 AC_ARG_WITH(gxx_include_path,
575 [ --with-gxx-include-path if you want to override the autodetected g++ include
578 Usage: --with-gxx-include-path=<absolute path to g++ include dir>
581 [ --with-java Build with[[out]] Java support. If you use
582 --without-java/--with-java=no then the build will have
583 no support for Java components, applets, accessibility
585 ], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java)
586 AC_ARG_WITH(java_target_version,
587 [ --with-java-target-version Generate class files that will work on JVMs with
588 the specified version. For example, use
589 --with-java-target-version=1.4 to make sure that the
590 application will work with JVM 1.4 even when compiled
593 This option is ignored when you compile with gcj/gij.
595 Usage: --with-java-target-version=<jvm version>
597 AC_ARG_ENABLE(gcjaot,
598 [ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation
599 support to speed up buildsi by compiling the jars also
601 --enable-gcjaot is only known to work with bytecode
602 created with gcj or ecj
604 AC_ARG_WITH(ant-home,
605 [ --with-ant-home If you have installed Jakarta Ant on your system,
606 please supply the path here.
607 Note that this is not the location of the Ant binary
608 but the location of the entire distribution.
610 Usage: --with-ant-home=<absolute path to Ant home>
612 AC_ARG_WITH(perl-home,
613 [ --with-perl-home If you have installed the Perl 5 Distribution, on your
614 system, please supply the path here.
615 Note that this is not the location of the Perl binary
616 but the location of the entire distribution.
618 Usage: --with-perl-home=<absolute path to Perl 5 home>
621 [ --with-cl-home For Windows NT users, please supply the path
622 for the Microsoft C/C++ compiler.
623 Note that this is not the location of the compiler
624 binary but the location of the entire distribution.
626 Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>
628 AC_ARG_WITH(mspdb-path,
629 [ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the
630 path pointing to the mspdb71.dll (.NET 2003).
632 Usage: --with-mspdb-path=<absolute path to mspdb71.dll>
634 AC_ARG_WITH(midl-path,
635 [ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply
636 the path pointing to the midl.exe.
638 Usage: --with-midl-path=<absolute path to midl.exe>
640 AC_ARG_WITH(csc-path,
641 [ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply
642 the path pointing to the csc.exe.
644 Usage: --with-csc-path=<absolute path to csc.exe>
646 AC_ARG_WITH(nsis-path,
647 [ --with-nsis-path For Windows users, please supply the path to the
648 "Nullsoft Scriptable Install System" (NSIS). If NSIS
649 is found in the path or this option is supplied a self
650 contained executable installer for OpenOffice.org will
653 Usage: --with-nsis-path=<absolute path to nsis.exe>
655 AC_ARG_WITH(frame-home,
656 [ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply
657 the path pointing to lib/mscoree.lib, usually
659 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"
661 MS Visual Toolkit compiler users, please supply the
662 path pointing to lib/msvcrt.lib, usually something
664 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"
666 Usage: --with-frame-home=<absolute path to Framework SDK [[home]]>
668 AC_ARG_WITH(psdk-home,
669 [ --with-psdk-home For Windows users, please supply the path to the
670 Microsoft Platform SDK.
672 Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>
674 AC_ARG_WITH(directx-home,
675 [ --with-directx-home For Windows users, please supply the path to the
676 Microsoft DirectX SDK.
678 Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
680 AC_ARG_WITH(local-solenv,
681 [ --with-local-solenv If you have solenv in a location other than ./solenv,
682 please supply the path here.
684 Usage: --with-local-solenv=<absolute path to solenv>
686 AC_ARG_WITH(local-solver,
687 [ --with-local-solver if you have solver in a location other than ./solver,
688 please supply the path here.
690 Usage: --with-local-solver=<absolute path to solver>
692 AC_ARG_ENABLE(check-only,
693 [ --enable-check-only Use this option option if you just want to check your
694 environment. This option stops the generation of an
697 Usage: --enable-check-only=yes
700 [ --with-lang Use this option to build OpenOffice.org with
701 additional language support. English (US) is always
702 included by default. Separate multiple languages with
703 space. For all languages, use --with-lang=ALL.
705 Usage: --with-lang="es sw tu cs sk"
707 AC_ARG_WITH(poor-help-localizations,
708 [ --with-poor-help-localizations
709 Use this option to specify which languages have
710 unusable help localizations. Separate multiple
711 languages with space.
713 Usage: --with-poor-help-localizations="af ar be-BY ca"
716 [ --with-dict Use this option to build OpenOffice.org with
717 dictionary support. ALL dictionaries are always
718 included by default unless overridden with
719 this option. Separate multiple dictionaries with
720 commas. For all dictionaries, use --with-dict=ALL.
722 Usage: --with-dict=ENGB,ENUS,ITIT
724 AC_ARG_WITH(intro-bitmaps,
725 [ --with-intro-bitmaps Prefer the specified intro bitmaps over the
726 the default one. Can be more than one (separated by
727 commas), the order means priority of fallback if the
728 first does not exist (in the installed tree).
730 Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
732 AC_ARG_WITH(about-bitmaps,
733 [ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
734 specification of bitmaps for the About box.
736 Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
739 [ --with-vendor Set vendor of the build.
741 Usage: --with-vendor="John the Builder"
743 AC_ARG_WITH(unix-wrapper,
744 [ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
745 in the desktop files and in the desktop-integration RPMs.
747 Usage: --with-unix-wrapper=ooffice
749 AC_ARG_WITH(asm-home,
750 [ --with-asm-home For Windows users, please supply the path for the
753 Usage: --with-asm-home=<path to ml.exe directory>
755 AC_ARG_WITH(os-version,
756 [ --with-os-version For FreeBSD users, use this option option to override
757 the detected OSVERSION.
759 Usage: --with-os-version=<OSVERSION>
761 AC_ARG_WITH(unzip-home,
762 [ --with-unzip-home Deprecated: use --with-zip-home instead],,)
763 AC_ARG_WITH(zip-home,
764 [ --with-zip-home If you use a non standard zip, for example windows
765 please supply the path for zip
767 Usage: --with-zip-home=<path to zip executable>
770 [ --with-mingwin For Windows users, use the mingwin32 compiler within
771 cygwin environment, this implies --with-use-shell=tcsh
773 Usage: --with-mingwin=yes
775 For !Windows use, use the mingw32 C++ compiler to
776 (re-) build unowinreg.dll. Specify the MinGW C++
779 Usage: --with-mingwin=i586-mingw32msvc-g++
780 ],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
781 AC_ARG_WITH(use-shell,
782 [ --with-use-shell Use this option to override the default shell to be
783 used for the build environment.
789 Usage: --with-use-shell=tcsh|bash|4nt
790 ],with_use_shell=$withval,with_use_shell="tcsh")
791 AC_ARG_WITH(build-version,
792 [ --with-build-version Allows the builder to add a custom version tag
793 that will appear in the Help/About box for QA
796 Usage: --with-build-version="Built by Jim"
797 ],with_build_version=$withval)
798 AC_ARG_ENABLE(sgistl,
799 [ --enable-sgistl for IRIX users, use this option option to build
800 OpenOffice.org using SGI's STL.
802 Usage: --enable-sgistl=yes
805 [ --with-alloc Define which allocator to build with
806 (choices are oo, system, tcmalloc)
808 AC_ARG_ENABLE(verbose,
809 [ --enable-verbose Increase build verbosity.
810 --disable-verbose Decrease build verbosity.
815 dnl ===================================================================
817 dnl ===================================================================
818 echo "********************************************************************"
820 echo "* OpenOffice.org build configuration. *"
822 echo "* The configure process checks your platform to see whether *"
823 echo "* you can build OpenOffice.org on it. *"
824 echo "* This process checks all pre-requisites and generates a file *"
825 echo "* containing the necessary environment variables. *"
826 echo "* Source this file after configure has ended successfully. *"
828 echo "* Any warning that is generated during the configure process *"
829 echo "* must be taken into account since it can be a reason for *"
830 echo "* an unsuccessful build of OpenOffice.org *"
832 echo "********************************************************************"
834 echo "********************************************************************"
836 echo "* Checking the platform pre-requisites. *"
838 echo "********************************************************************"
840 dnl ===================================================================
841 dnl Configure pre-requisites.
842 dnl ===================================================================
846 AC_PATH_PROG( AWK, $AWK)
847 if test -z "$AWK"; then
848 AC_MSG_ERROR([install awk to run this script])
851 AC_PATH_PROGS(SED, sed )
852 if test -z "$SED"; then
853 AC_MSG_ERROR([install sed to run this script])
856 AC_MSG_CHECKING([for solenv environment])
857 if test -z "$with_local_solenv"; then
858 LOCAL_SOLENV="DEFAULT"
859 AC_MSG_RESULT([default])
861 LOCAL_SOLENV=$with_local_solenv
862 AC_MSG_RESULT([$with_local_solenv])
864 AC_SUBST(LOCAL_SOLENV)
866 if test "$LOCAL_SOLENV" = "DEFAULT"; then
869 _solenv="$LOCAL_SOLENV"
873 if test -e $_solenv/inc/minor.mk; then
874 # Get UPD number from ./solenv/inc/minor.mk
875 UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
877 SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
878 AC_SUBST(SOURCEVERSION)
880 AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
883 dnl ===================================================================
884 dnl Checks for the operating system and processor.
885 dnl ===================================================================
887 if test "$build" != "$host" -o "$build" != "$target" \
888 -o "$host" != "$target"; then
889 AC_MSG_WARN([cross-compiling by any means is not supported (yet)!])
890 echo "cross-compiling by any means is not supported (yet)!" >> warn
893 if echo "$build_os" | grep cygwin; then
894 AC_MSG_CHECKING([Cygwin version])
896 AC_MSG_RESULT([$CygwinVer])
897 if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
898 AC_MSG_ERROR([You need at least Cygwin V1.5.x])
904 dnl ===================================================================
905 dnl The following is a list of supported systems.
906 dnl Sequential to keep the logic very simple
907 dnl These values may be checked and reset later.
908 dnl ===================================================================
920 dnl ===========================================================
921 dnl check whether we're using solaris 6,7,8 - sparc or intel.
922 dnl ===========================================================
923 AC_MSG_CHECKING([the Solaris operating system release])
924 _os_release=`echo $build_os | $SED -e s/solaris2\.//`
925 if test "$_os_release" -lt "6"; then
926 AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
928 AC_MSG_RESULT([ok ($_os_release)])
931 dnl check whether we're using a sparc or i386 processor
932 AC_MSG_CHECKING([the processor type])
933 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
934 AC_MSG_RESULT([ok ($build_cpu)])
936 AC_MSG_ERROR([only sparc and i386 processors are supported])
947 if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then
948 PTHREAD_CFLAGS="-DNPTL"
969 if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
970 AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
971 echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
991 AC_MSG_CHECKING([the FreeBSD operating system release])
992 if test -n "$with_os_version"; then
993 OSVERSION="$with_os_version"
995 OSVERSION=`/sbin/sysctl -n kern.osreldate`
997 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
998 AC_MSG_CHECKING([which thread library to use])
999 if test "$OSVERSION" -lt "500016"; then
1000 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1001 PTHREAD_LIBS="-pthread"
1002 elif test "$OSVERSION" -lt "502102"; then
1003 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1004 PTHREAD_LIBS="-lc_r"
1007 PTHREAD_LIBS="-pthread"
1009 AC_MSG_RESULT([$PTHREAD_LIBS])
1025 PTHREAD_CFLAGS="-pthread"
1026 PTHREAD_LIBS="-pthread -lpthread"
1039 PTHREAD_LIBS=-pthread
1040 echo "AIX is an alpha port --- Use at own risk" >> warn
1044 AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
1049 AC_SUBST(PTHREAD_CFLAGS)
1050 AC_SUBST(PTHREAD_LIBS)
1052 dnl ===================================================================
1053 dnl Set the ENABLE_CRASHDUMP variable.
1054 dnl ===================================================================
1055 AC_MSG_CHECKING([whether to enable crashdump feature])
1056 if test "$enable_crashdump" = "yes" -o "$enable_crashdump" = "TRUE"; then
1057 ENABLE_CRASHDUMP="TRUE"
1058 AC_MSG_RESULT([yes])
1059 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1061 if test "$enable_crashdump" = "STATIC"; then
1062 ENABLE_CRASHDUMP="STATIC"
1063 AC_MSG_RESULT([yes, STATIC])
1064 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1066 if test "$enable_crashdump" = "" -o "$enable_crashdump" = "no"; then
1070 AC_MSG_ERROR([--enable-crashdump only accepts yes, no, TRUE or STATIC as parameter.])
1074 AC_SUBST(ENABLE_CRASHDUMP)
1076 if test "$_os" = "WINNT"; then
1077 BUILD_TYPE="$BUILD_TYPE TWAIN"
1080 if test "$_os" = "WINNT"; then
1081 dnl ===================================================================
1082 dnl Set the VC_STANDARD variable.
1083 dnl ===================================================================
1084 AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
1085 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
1090 AC_MSG_RESULT([yes])
1092 AC_SUBST(VC_STANDARD)
1095 dnl ===================================================================
1096 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
1097 dnl ===================================================================
1098 AC_MSG_CHECKING([whether to turn warnings to errors])
1099 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
1100 ENABLE_WERROR="TRUE"
1101 AC_MSG_RESULT([yes])
1102 AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
1103 AC_MSG_WARN([on platforms where it has been disabled explicitely])
1104 echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
1106 ENABLE_WERROR="FALSE"
1109 AC_SUBST(ENABLE_WERROR)
1111 dnl ===================================================================
1112 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
1113 dnl ===================================================================
1114 AC_MSG_CHECKING([whether to do a debug build])
1115 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
1117 if test -z "$enable_symbols"; then
1118 enable_symbols="yes"
1120 AC_MSG_RESULT([yes])
1122 ENABLE_DEBUG="FALSE"
1125 AC_SUBST(ENABLE_DEBUG)
1127 dnl ===================================================================
1128 dnl Set the ENABLE_DBGUTIL variable
1129 dnl ===================================================================
1130 AC_MSG_CHECKING([whether to build with additional debug utilities])
1131 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1135 AC_MSG_RESULT([yes])
1138 PROFULLSWITCH="product=full"
1140 AC_MSG_RESULT([no, full product build])
1143 AC_SUBST(PROFULLSWITCH)
1146 dnl ===================================================================
1147 dnl First setting is whether to include symbols into final build.
1148 dnl ===================================================================
1149 AC_MSG_CHECKING([whether to include symbols into final build])
1150 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
1151 if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
1152 ENABLE_SYMBOLS="TRUE"
1153 AC_MSG_RESULT([yes])
1155 if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
1156 ENABLE_SYMBOLS="SMALL"
1157 AC_MSG_RESULT([yes, small ones])
1158 else if test "$enable_symbols" != "no" ; then
1159 echo enable symbols is: $enable_symbols
1160 AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
1170 AC_SUBST(ENABLE_SYMBOLS)
1172 dnl ===================================================================
1173 dnl Determine if the solver is to be stripped or not.
1174 dnl ===================================================================
1175 AC_MSG_CHECKING([whether to strip the solver or not.])
1176 if test -n "$enable_strip_solver"; then
1177 if test "$enable_strip_solver" = "yes"; then
1179 else if test "$enable_strip_solver" = "no"; then
1180 DISABLE_STRIP="TRUE"
1182 AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
1186 if test -n "$ENABLE_SYMBOLS"; then
1187 DISABLE_STRIP="TRUE"
1192 AC_SUBST(DISABLE_STRIP)
1194 dnl ===================================================================
1196 dnl ===================================================================
1197 AC_MSG_CHECKING([whether to enable native CUPS support])
1198 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
1200 AC_MSG_RESULT([yes])
1205 AC_SUBST(ENABLE_CUPS)
1207 AC_MSG_CHECKING([whether to enable fontconfig support])
1208 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
1209 ENABLE_FONTCONFIG="TRUE"
1210 AC_MSG_RESULT([yes])
1212 ENABLE_FONTCONFIG=""
1215 AC_SUBST(ENABLE_FONTCONFIG)
1218 dnl ===================================================================
1219 dnl Disable legacy binary file formats filters
1220 dnl ===================================================================
1221 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
1222 if test "$enable_binfilter" = "no"; then
1226 WITH_BINFILTER="YES"
1227 BUILD_TYPE="$BUILD_TYPE BINFILTER"
1228 AC_MSG_RESULT([yes])
1230 AC_SUBST(WITH_BINFILTER)
1232 if test "$_os" = "WINNT"; then
1233 AC_MSG_CHECKING([whether to use DirectX])
1234 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
1235 ENABLE_DIRECTX="TRUE"
1236 AC_MSG_RESULT([yes])
1241 AC_SUBST(ENABLE_DIRECTX)
1243 AC_MSG_CHECKING([whether to use ActiveX])
1244 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
1246 AC_MSG_RESULT([yes])
1248 DISABLE_ACTIVEX="TRUE"
1251 AC_SUBST(DISABLE_ACTIVEX)
1253 AC_MSG_CHECKING([whether to use ATL])
1254 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
1256 AC_MSG_RESULT([yes])
1261 AC_SUBST(DISABLE_ATL)
1265 dnl ===================================================================
1266 dnl Disable rpath in shared libraries?
1267 dnl ===================================================================
1268 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
1269 if test "$enable_rpath" = "no"; then
1274 AC_MSG_RESULT([$ENABLE_RPATH])
1275 AC_SUBST(ENABLE_RPATH)
1277 dnl Test whether to include MySpell dictionaries
1278 dnl ===================================================================
1279 AC_MSG_CHECKING([whether to include MySpell dictionaries])
1280 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
1281 AC_MSG_RESULT([yes])
1282 WITH_MYSPELL_DICTS=YES
1283 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
1286 WITH_MYSPELL_DICTS=NO
1288 AC_SUBST(WITH_MYSPELL_DICTS)
1290 if test "$WITH_MYSPELL_DICTS" = "NO"; then
1291 AC_MSG_CHECKING([whether to use dicts from external paths])
1292 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
1293 AC_MSG_RESULT([yes])
1295 AC_MSG_CHECKING([for spelling dictionary directory])
1296 if test -n "$with_external_dict_dir"; then
1297 DICT_SYSTEM_DIR=file://$with_external_dict_dir
1299 DICT_SYSTEM_DIR=file:///usr/share/hunspell
1301 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
1302 AC_MSG_CHECKING([for hyphenation patterns directory])
1303 if test -n "$with_external_hyph_dir"; then
1304 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
1306 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
1308 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
1309 AC_MSG_CHECKING([for thesaurus directory])
1310 if test -n "$with_external_thes_dir"; then
1311 THES_SYSTEM_DIR=file://$with_external_thes_dir
1313 THES_SYSTEM_DIR=file:///usr/share/mythes
1315 AC_MSG_RESULT([$THES_SYSTEM_DIR])
1321 AC_SUBST(SYSTEM_DICTS)
1322 AC_SUBST(DICT_SYSTEM_DIR)
1323 AC_SUBST(HYPH_SYSTEM_DIR)
1324 AC_SUBST(THES_SYSTEM_DIR)
1326 dnl ===================================================================
1327 dnl WINNT uses tcsh, bash or 4nt all other O/S use tcsh or bash.
1328 dnl The following sets the with_use_shell variable.
1329 dnl ===================================================================
1330 AC_MSG_CHECKING([which shell to use])
1331 if test $_os = "WINNT"; then
1332 dnl ===================================================================
1333 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash" -a "$with_use_shell" != "4nt"; then
1334 AC_MSG_ERROR([only "tcsh","bash" or "4nt" are supported options])
1336 dnl ===================================================================
1337 dnl Sanity check! Native windows programs cannot use cygwin symlinks!
1338 dnl ===================================================================
1339 dnl As long as awk instead of $AWK is used somewhere in the sources,
1340 dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
1341 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
1342 AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
1343 Native windows programs cannot use cygwin symlinks. Remove the symbolic
1344 link, and copy the program to the name of the link.])
1346 dnl ===================================================================
1347 dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
1348 dnl CC and CXX but the configure checks here assume that guw.exe
1349 dnl (if needed at all) is not yet present.
1350 dnl ===================================================================
1351 CC=`echo $CC | $SED "s/^guw.exe //"`
1352 CXX=`echo $CXX | $SED "s/^guw.exe //"`
1353 dnl ===================================================================
1354 dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
1356 dnl ===================================================================
1357 if test -n "$CC";then
1358 if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
1362 dnl ===================================================================
1363 dnl If using Mingwin32 then don't use 4NT
1364 dnl ===================================================================
1365 if test "$WITH_MINGWIN" = "yes" ; then
1366 if test "$with_use_shell" = "4nt" -o "x$with_use_shell" = "x"; then
1367 with_use_shell="tcsh"
1369 if test -z "$CC"; then
1370 CC="gcc -mno-cygwin"
1371 CXX="g++ -mno-cygwin"
1374 elif test $_os = "OS2"; then
1375 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "4nt"; then
1376 AC_MSG_ERROR([only "tcsh" or "4nt" are supported options])
1379 dnl ===================================================================
1380 dnl All other operating systems use tcsh or bash.
1381 dnl ===================================================================
1382 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash"; then
1383 AC_MSG_ERROR([only "tcsh" or "bash" are supported options])
1386 USE_SHELL="$with_use_shell"
1387 AC_MSG_RESULT([$USE_SHELL])
1389 AC_SUBST(WITH_MINGWIN)
1391 dnl ===================================================================
1392 dnl Extra check for Windows. Non 4nt-builds need gcc to build dmake
1393 dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
1395 dnl ===================================================================
1396 if test "$_os" = "WINNT" -a "$with_use_shell" != "4nt" ; then
1397 AC_MSG_CHECKING([for cygwin gcc/g++])
1398 if which gcc > /dev/null && which g++ > /dev/null ; then
1399 AC_MSG_RESULT([found])
1401 AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
1406 dnl ===================================================================
1407 dnl Check whether the chosen shell can be used.
1408 dnl ===================================================================
1409 if test "$with_use_shell" = "tcsh"; then
1410 AC_PATH_PROG(SHELLPATH, tcsh)
1411 if test -z "$SHELLPATH"; then
1412 AC_MSG_ERROR([tcsh not found in \$PATH])
1414 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/tcsh$//p"`
1416 elif test "$with_use_shell" = "bash"; then
1417 AC_PATH_PROG(SHELLPATH, bash)
1418 if test -z "$SHELLPATH"; then
1419 AC_MSG_ERROR([bash not found in \$PATH])
1421 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
1424 AC_MSG_WARN([Windows/OS/2 4NT builds don't test for the shell])
1425 SHELLPATH="NO_SHELLPATH_NEEDED"
1429 dnl ===================================================================
1430 dnl Checks for c compiler,
1431 dnl The check for the c++ compiler is later on.
1432 dnl ===================================================================
1433 AC_MSG_CHECKING([gcc home])
1434 if test -z "$with_gcc_home"; then
1435 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1437 GCC_HOME="$with_gcc_home"
1439 AC_MSG_RESULT($GCC_HOME)
1442 if test -n "$with_gcc_home"; then
1443 if test -z "$CC"; then
1444 CC="$with_gcc_home/bin/gcc"
1448 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1449 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1453 COMPATH=`dirname "$CC"`
1454 if test "$COMPATH" = "." ; then
1455 AC_PATH_PROGS(COMPATH, $CC)
1456 dnl double square bracket to get single because of M4 quote...
1457 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1460 dnl ===================================================================
1461 dnl Test the gcc version, 3 is OK
1462 dnl ===================================================================
1464 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1465 AC_MSG_CHECKING([the GNU gcc compiler version])
1466 _gcc_version=`$CC -dumpversion`
1467 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
1468 _gcc_longver=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1469 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1471 if test "$_gcc_major" -lt "3"; then
1472 AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
1474 if test "$GCCVER" -eq "030203"; then
1475 if test "$ENABLE_SYMBOLS" = "SMALL"; then
1476 AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
1480 AC_MSG_RESULT([checked (gcc $_gcc_version)])
1481 if test "$_os" = "SunOS"; then
1482 AC_MSG_CHECKING([gcc linker])
1483 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
1484 AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
1486 AC_MSG_RESULT([ok (GNU ld)])
1491 dnl ===================================================================
1492 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
1493 dnl ===================================================================
1494 AC_MSG_CHECKING([whether to enable pch feature])
1495 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
1496 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
1498 AC_MSG_RESULT([yes])
1499 dnl There is no PCH support in GCC versions prior to this
1500 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
1502 AC_MSG_RESULT([yes])
1505 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
1511 AC_SUBST(ENABLE_PCH)
1513 dnl ===================================================================
1514 dnl Search all the common names for GNU make
1515 dnl ===================================================================
1516 AC_MSG_CHECKING([for GNU make])
1517 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
1518 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1519 if test $? -eq 0; then
1524 AC_MSG_RESULT($GNUMAKE)
1525 if test -z "$GNUMAKE"; then
1526 AC_MSG_ERROR([not found. install GNU make.])
1529 AC_MSG_CHECKING([the GNU make version])
1530 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
1531 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1532 if test "$_make_longver" -ge "037901" ; then
1533 AC_MSG_RESULT([$GNUMAKE $_make_version])
1535 if test "$_os" = "Darwin"; then
1536 if test "$_make_longver" -ge "037900" ; then
1537 AC_MSG_RESULT([$GNUMAKE $_make_version])
1539 AC_MSG_WARN([failed ($GNUMAKE $_make_version need 3.79.0+)])
1542 AC_MSG_ERROR([failed ($GNUMAKE $_make_version need 3.79.1+)])
1547 dnl ===================================================================
1548 dnl Test the solaris compiler version
1549 dnl ===================================================================
1550 if test "$_os" = "SunOS"; then
1551 if test "$CC" = "cc"; then
1552 AC_PATH_PROGS(_cc, cc)
1553 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1554 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
1555 dnl cc -V outputs to standard error!!!!
1556 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
1557 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
1558 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
1559 if test "$_sunstudio_major" != "5"; then
1560 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1562 _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" }'`
1563 if test "$_sunstudio_minor" = "false"; then
1564 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1566 dnl compiler will do
1567 AC_MSG_RESULT([checked])
1573 if test "$GCC" = "yes"; then
1574 AC_MSG_CHECKING( for --hash-style=$WITH_LINKER_HASH_STYLE linker support )
1575 hash_style_ldflags_save=$LDFLAGS
1576 LDFLAGS="$LDFLAGS -Wl,--hash-style=$WITH_LINKER_HASH_STYLE"
1577 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1580 printf ("hello world\n");
1581 ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
1582 if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
1583 AC_MSG_RESULT( found )
1585 AC_MSG_RESULT( not found )
1587 LDFLAGS=$hash_style_ldflags_save
1589 AC_SUBST(HAVE_LD_HASH_STYLE)
1590 AC_SUBST(WITH_LINKER_HASH_STYLE)
1592 dnl ===================================================================
1593 dnl Check for -Bsymbolic-functions linker support
1594 dnl ===================================================================
1596 HAVE_LD_BSYMBOLIC_FUNCTIONS=
1597 if test "$GCC" = "yes"; then
1598 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
1599 bsymbolic_functions_ldflags_save=$LDFLAGS
1600 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
1601 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1604 printf ("hello world\n");
1605 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
1606 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
1607 AC_MSG_RESULT( found )
1609 AC_MSG_RESULT( not found )
1611 LDFLAGS=$bsymbolic_functions_ldflags_save
1613 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
1615 dnl ===================================================================
1616 dnl Test the IRIX SGI Mips pro compiler
1617 dnl ===================================================================
1618 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
1619 if test "$CC" = "cc"; then
1620 AC_PATH_PROGS(_cc, cc)
1621 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1622 AC_MSG_CHECKING([the SGI MIPSpro C compiler version])
1623 dnl cc -version outputs to standard error!!!!
1624 _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'`
1625 _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'`
1626 if test "$_mipspro_major" != "7"; then
1627 AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler])
1629 _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'`
1630 if test "$_mipspro_minor" = "false"; then
1631 AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler])
1633 dnl compiler will do
1634 AC_MSG_RESULT([checked])
1640 dnl ===================================================================
1641 dnl Test the Compaq compiler for OSF1
1642 dnl ===================================================================
1643 if test "$_os" = "OSF1"; then
1644 if test "$CC" = "cc"; then
1645 AC_PATH_PROGS(_cc, cc)
1646 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1647 AC_MSG_WARN([******* $_cc , $COMPATH])
1648 AC_MSG_CHECKING([the Compaq C compiler version])
1649 dnl cc -V outputs to standard error!!!!
1650 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
1651 _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
1652 if test "$_compaqc_major" != "T6"; then
1653 AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
1655 dnl compiler will do
1656 AC_MSG_RESULT([checked])
1661 dnl ===================================================================
1662 dnl Check whether there's a Perl version available.
1663 dnl ===================================================================
1664 if test -z "$with_perl_home"; then
1665 AC_PATH_PROG(PERL, perl)
1667 if test "$_os" = "WINNT"; then
1668 with_perl_home=`cygpath -u "$with_perl_home"`
1670 _perl_path="$with_perl_home/bin/perl"
1671 if test -x "$_perl_path"; then
1674 AC_MSG_ERROR([$_perl_path not found])
1678 dnl ===================================================================
1679 dnl Testing for Perl version 5 or greater.
1680 dnl $] is the perl version variable, it is returned as an integer
1681 dnl ===================================================================
1682 if test "$PERL"; then
1683 AC_MSG_CHECKING([the Perl version])
1684 ${PERL} -e "exit($]);"
1686 if test "$_perl_version" -lt 5; then
1687 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
1689 AC_MSG_RESULT([checked (perl $_perl_version)])
1691 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
1695 dnl ===================================================================
1696 dnl Testing for required Perl modules
1697 dnl ===================================================================
1698 AC_MSG_CHECKING([for required Perl modules])
1699 if `$PERL -e 'use Archive::Zip;'`; then
1700 AC_MSG_RESULT([all modules found])
1702 AC_MSG_ERROR([Failed to find some modules])
1705 dnl ===================================================================
1706 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
1707 dnl ===================================================================
1708 if test "$_os" = "WINNT"; then
1709 if test "$WITH_MINGWIN" != "yes"; then
1710 AC_MSG_CHECKING([for friendly registry keys])
1711 # VS.Net 2003, VS.Net 2005
1712 if test -z "$with_cl_home"; then
1713 vctest=`./oowintool --msvc-productdir`;
1714 if test -x "$vctest/bin/cl.exe"; then
1715 with_cl_home=$vctest;
1718 with_cl_home=`cygpath -u "$with_cl_home"`
1720 AC_MSG_RESULT([done])
1722 dnl ===========================================================
1723 dnl Check for mspdb71.dll/mspdb80.dll
1724 dnl ===========================================================
1725 dnl .NET 2003/5/8 Compiler
1726 if test -n "$with_mspdb_path";then
1727 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
1729 if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
1730 MSPDB_PATH="$with_mspdb_path"
1733 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
1734 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1736 dnl .NET 2005/2008 case
1737 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
1738 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1740 dnl Windows SDK 6.0 case
1741 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
1742 MSPDB_PATH="$with_cl_home/bin"
1745 if test -z "$MSPDB_PATH";then
1746 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
1747 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
1748 AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
1749 MSPDB_PATH=`dirname "$MSPDB_PATH"`
1752 if test -z "$MSPDB_PATH"; then
1753 AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
1755 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
1756 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
1757 dnl The path needs to be added before cl is called
1758 PATH="$MSPDB_PATH:$PATH"
1760 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
1761 if test -x "$with_cl_home/bin/cl.exe"; then
1762 CC="$with_cl_home/bin/cl.exe"
1764 AC_PATH_PROG(CC, cl.exe)
1766 if test -e "$CC"; then
1767 # This gives us a posix path with 8.3 filename restrictions
1768 CC=`cygpath -d "$CC"`
1769 CC=`cygpath -u "$CC"`
1770 # Remove /cl.exe from CC case insensitive
1771 AC_MSG_RESULT([found ($CC)])
1772 COMPATH=`echo $CC | $SED 's@/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
1773 export INCLUDE=`cygpath -d "$COMPATH/../Include"`
1774 dnl Check which Microsoft C/C++ compiler is found
1775 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
1776 dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
1777 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
1778 x = match( \\\$0, /..\\...\\...../ )
1779 CCversion = substr( \\\$0, RSTART, RLENGTH)
1780 tokencount = split (CCversion,vertoken,\".\")
1781 for ( i = 1 ; i <= tokencount ; i++ ) {
1782 printf (\"%04d\",vertoken[[i]] )
1785 AC_MSG_RESULT([found Compiler version $CCNUMVER.])
1786 if test "$CCNUMVER" -ge "001500000000"; then
1789 AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
1790 elif test "$CCNUMVER" -ge "001400000000"; then
1793 AC_MSG_RESULT([found .NET 2005.])
1794 elif test "$CCNUMVER" -ge "001300102240"; then
1797 AC_MSG_RESULT([found .NET 2003.])
1799 AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
1802 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
1805 AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
1806 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
1807 AC_MSG_RESULT([found.])
1808 if $CC -dumpspecs | grep -q "mno-cygwin"; then
1811 USE_MINGW="pure-mingw"
1814 AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
1819 AC_SUBST(MSPDB_PATH)
1822 dnl ===================================================================
1823 dnl .NET needs special treatment
1824 dnl ===================================================================
1825 if test "$COMEX" -ge "10"; then
1827 AC_PATH_PROG(MIDL_PATH, midl.exe)
1828 if test -n "$MIDL_PATH";then
1829 MIDL_PATH=`dirname "$MIDL_PATH"`
1831 if test -n "$with_midl_path";then
1832 with_midl_path=`cygpath -u "$with_midl_path"`
1834 if test -x "$with_midl_path/midl.exe"; then
1835 MIDL_PATH="$with_midl_path"
1837 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
1838 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
1840 if test -z "$MIDL_PATH" ; then
1841 vstest=`./oowintool --msvs-productdir`;
1842 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
1843 MIDL_PATH="$vstest/Common7/Tools/Bin"
1846 if test -z "$MIDL_PATH" ; then
1847 psdktest=`./oowintool --psdk-home`
1848 if test -x "$psdktest/Bin/midl.exe" ; then
1849 MIDL_PATH="$psdktest/Bin"
1852 if test ! -x "$MIDL_PATH/midl.exe"; then
1853 AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
1855 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1856 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
1857 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
1860 AC_PATH_PROG(CSC_PATH, csc.exe)
1861 if test -n "$CSC_PATH";then
1862 CSC_PATH=`dirname "$CSC_PATH"`
1864 if test -n "$with_csc_path";then
1865 with_csc_path=`cygpath -u "$with_csc_path"`
1867 if test -x "$with_csc_path/csc.exe"; then
1868 CSC_PATH="$with_csc_path"
1870 csctest=`./oowintool --csc-compilerdir`;
1871 if test -x "$csctest/csc.exe"; then
1875 if test ! -x "$CSC_PATH/csc.exe"; then
1876 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
1878 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1879 CSC_PATH=`cygpath -d "$CSC_PATH"`
1880 CSC_PATH=`cygpath -u "$CSC_PATH"`
1881 CSC="$CSC_PATH/csc.exe"
1882 AL="$CSC_PATH/al.exe"
1884 dnl Check mscoree.lib / .NET Frameworks dir
1885 dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
1886 AC_MSG_CHECKING(.NET Framework)
1887 if test -n "$with_frame_home"; then
1888 with_frame_home=`cygpath -u "$with_frame_home"`
1890 if test -f "$with_frame_home/lib/mscoree.lib"; then
1891 FRAME_HOME="$with_frame_home"
1893 if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
1894 FRAME_HOME="$with_cl_home/../SDK/v1.1"
1896 if test -z "$FRAME_HOME" ; then
1897 frametest=`./oowintool --dotnetsdk-dir`
1898 if test -f "$frametest/lib/mscoree.lib"; then
1899 FRAME_HOME="$frametest"
1901 frametest=`./oowintool --psdk-home`
1902 if test -f "$frametest/lib/mscoree.lib"; then
1903 FRAME_HOME="$frametest"
1907 if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
1908 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
1910 AC_MSG_RESULT(found)
1911 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1912 FRAME_HOME=`cygpath -d "$FRAME_HOME"`
1913 FRAME_HOME=`cygpath -u "$FRAME_HOME"`
1916 AC_SUBST(FRAME_HOME)
1918 if test "$_os" = "Linux"; then
1919 AC_MSG_CHECKING([whether to enable Mono bindings])
1923 if test "$enable_mono" != "no" ; then
1924 AC_MSG_RESULT([yes])
1925 if test "z$with_csc_path" != "z"; then
1926 if test -x "$with_csc_path/mcs"; then
1927 CSC_PATH="$with_csc_path"
1929 if test -x "$with_csc_path/bin/mcs"; then
1930 CSC_PATH="$with_csc_path/bin"
1933 if test "z$CSC_PATH" = "z"; then
1934 AC_PATH_PROG(MCS, mcs)
1935 test -z "$MCS" || CSC_PATH=`dirname $MCS`
1938 if test -x "$MCS" -a -x "$AL"; then
1939 MCS_VERSION=`$MCS --version | cut -d" " -f5`
1940 if test "`echo $MCS_VERSION | cut -d"." -f1`" -gt "1" || \
1941 test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
1942 "`echo $MCS_VERSION | cut -d"." -f2`" -ge "2" || \
1943 test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
1944 "`echo $MCS_VERSION | cut -d"." -f2`" = "1" -a \
1945 "`echo $MCS_VERSION | cut -d"." -f3`" -ge "8"; then
1948 AC_PATH_PROG(GMCS, gmcs, no)
1949 AC_PATH_PROG(MKBUNDLE2, mkbundle2, no)
1950 GMCS_VERSION=`$GMCS --version | cut -d" " -f5`
1951 if test "`echo $GMCS_VERSION | cut -d"." -f1`" -gt "1" || \
1952 test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
1953 "`echo $GMCS_VERSION | cut -d"." -f2`" -ge "3" || \
1954 test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
1955 "`echo $GMCS_VERSION | cut -d"." -f2`" = "2" -a \
1956 "`echo $GMCS_VERSION | cut -d"." -f3`" -ge "3"; then
1957 # mkbundle2 does not work on ppc, http://bugzilla.ximian.com/show_bug.cgi?id=81525
1958 if test "`uname -m`" != "ppc" -a "`uname -m`" != "ppc64" ; then
1959 ENABLE_MONO_CLIMAKER=YES
1960 AC_MSG_NOTICE([mono is up-to-date enough - building mono climaker])
1964 if test -n "$enable_mono" ; then
1965 AC_MSG_ERROR([no, mcs >= 1.1.8 is needed.])
1969 if test -n "$enable_mono"; then
1970 AC_MSG_ERROR([mcs or al not found. Make sure they're in the path or use --with-csc-path])
1973 PKG_CHECK_MODULES(MONO, mono >= 1.1.8)
1981 AC_SUBST(ENABLE_MONO)
1982 AC_SUBST(MONO_CFLAGS)
1984 AC_SUBST(ENABLE_MONO_CLIMAKER)
1986 dnl ===================================================================
1987 dnl Check if stdc headers are available excluding windows.
1988 dnl ===================================================================
1989 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1993 dnl ===================================================================
1994 dnl Find pre-processors.
1995 dnl ===================================================================
1996 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1999 dnl Check whether there's a C pre-processor.
2000 dnl ===================================================================
2001 dnl When using SunStudio compiler, there is a bug with the cc
2002 dnl preprocessor, so use CC preprocessor as the cc preprocessor
2003 dnl See Issuezilla #445.
2004 dnl ===================================================================
2005 if test "$_os" = "SunOS"; then
2012 AC_CHECK_SIZEOF(long)
2013 SIZEOF_LONG=$ac_cv_sizeof_long
2014 AC_SUBST(SIZEOF_LONG)
2016 WORDS_BIGENDIAN=$ac_cv_c_bigendian
2017 AC_SUBST(WORDS_BIGENDIAN)
2019 dnl Check for large file support
2021 if test -n "$ac_cv_sys_file_offset_bits"; then
2022 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
2024 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
2025 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
2027 AC_SUBST(LFS_CFLAGS)
2029 dnl ===================================================================
2030 dnl Check if we are to enable vba macro interoperability feature
2031 dnl ===================================================================
2032 AC_MSG_CHECKING([whether to disable vba feature])
2033 if test -n "$enable_vba" && test "$enable_vba" = "no"; then
2034 AC_MSG_RESULT([yes])
2040 AC_SUBST(ENABLE_VBA)
2042 if test "$ENABLE_VBA" = "YES"; then
2043 AC_MSG_CHECKING([how to package the vba compatibility api])
2044 if test -n "$with_vba_package_format"; then
2045 if test "$with_vba_package_format" = "extn"; then
2047 AC_MSG_RESULT([uno extension])
2048 AC_MSG_WARN([--with-vba-package-format=extn can cause problems])
2049 else if test "$with_vba_package_format" = "builtin"; then
2051 AC_MSG_RESULT([build into installset])
2053 AC_MSG_ERROR([unknown packaging method])
2059 AC_MSG_RESULT([defaulting to build into installset])
2064 AC_SUBST(VBA_EXTENSION)
2066 dnl ===================================================================
2067 dnl Check the whether vba need to be delivered as an uno package or part
2069 dnl ===================================================================
2072 dnl ===================================================================
2073 dnl Check if cups/cups.h is available
2074 dnl ===================================================================
2075 if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
2076 AC_CHECK_HEADER(cups/cups.h, [],
2077 [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
2080 dnl ===================================================================
2081 dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
2082 dnl ===================================================================
2083 if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
2084 AC_MSG_CHECKING([whether to enable pam support])
2085 if test -z "$enable_pam" || test "$enable_pam" != "no"; then
2086 AC_MSG_RESULT([yes])
2088 AC_CHECK_HEADER(security/pam_appl.h, [],
2089 [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
2090 AC_MSG_CHECKING([whether to link to libpam])
2091 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
2092 AC_MSG_RESULT([yes])
2094 AC_CHECK_LIB(pam, pam_start, [],
2095 [AC_MSG_ERROR(libpam not found or functional)], [])
2097 AC_MSG_RESULT([no, dynamically open it])
2104 dnl check getspnam_r for needed args (4 or 5)
2105 AX_FUNC_WHICH_GETSPNAM_R
2109 AC_SUBST(NEW_SHADOW_API)
2112 if test "$_os" = "Linux"; then
2113 AC_MSG_CHECKING([whether to link to libcrypt])
2114 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
2115 AC_MSG_RESULT([yes])
2117 AC_CHECK_LIB(crypt, crypt, [],
2118 [AC_MSG_ERROR(libcrypt not found or functional)], [])
2120 AC_MSG_RESULT([no, dynamically open it])
2124 AC_SUBST(CRYPT_LINK)
2126 dnl ===================================================================
2127 dnl Testing for c++ compiler and version...
2128 dnl ===================================================================
2129 if test -n "$with_gcc_home"; then
2130 if test -z "$CXX"; then
2131 CXX="$with_gcc_home/bin/g++"
2135 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2136 if test -e "$CC"; then
2141 dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
2142 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2146 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
2147 if test "$GXX" = "yes"; then
2148 AC_MSG_CHECKING([the GNU C++ compiler version])
2150 _gpp_version=`$CXX -dumpversion`
2151 _gpp_major=`echo $_gpp_version | $AWK -F. '{ print \$1 }'`
2152 _gpp_minor=`echo $_gpp_version | $AWK -F. '{ print \$2 }'`
2154 AC_MSG_RESULT([checked (g++ $_gpp_version)])
2156 if test "$_gpp_major" = "3"; then
2157 if test "$_gpp_minor" = "4"; then
2158 AC_MSG_CHECKING([whether $CXX has the enum bug])
2160 extern "C" void abort (void);
2161 extern "C" void exit (int status);
2163 enum E { E0, E1, E2, E3, E4, E5 };
2168 if (e == E2 || e == E3 || e == E1)
2180 ],[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])])
2185 dnl ===================================================================
2186 dnl Set the gcc/gxx include directories
2187 dnl ===================================================================
2188 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
2189 # often contains an i386 which is expanded as a macro. Solved in stlport.
2190 if test "$GXX" = "yes"; then
2191 AC_MSG_CHECKING([for g++ include path])
2192 if test -z "$with_gxx_include_path"; then
2193 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
2194 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
2195 with_gxx_include_path="/usr/include"
2197 if test "$WITH_MINGWIN" = "yes"; then
2198 with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
2199 with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
2203 dnl This is the original code...
2204 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
2205 if test -z "$with_gxx_include_path"; then
2206 with_gxx_include_path="NO_GXX_INCLUDE"
2207 AC_MSG_RESULT([no g++ includes])
2209 AC_MSG_RESULT([$with_gxx_include_path])
2211 GXX_INCLUDE_PATH="$with_gxx_include_path"
2212 AC_SUBST(GXX_INCLUDE_PATH)
2214 dnl ===================================================================
2215 dnl Set the mingw runtime library include directories
2216 dnl ===================================================================
2217 if test "$WITH_MINGWIN" = "yes"; then
2218 AC_MSG_CHECKING([for mingwin runtime include path])
2219 cat >conftest.$ac_ext <<_ACEOF
2221 #include <bits/c++config.h>
2223 _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`
2225 if test -n "$_mingw_lib_include_path"; then
2227 for a in $_mingw_lib_include_path
2230 _temp="$_temp "`cygpath -u "$a"`
2232 _mingw_lib_include_path=$_temp
2234 if test -z "$_mingw_lib_include_path"; then
2235 _mingw_lib_include_path="NO_LIB_INCLUDE"
2236 AC_MSG_RESULT([no mingwin runtime includes])
2238 AC_MSG_RESULT([$_mingw_lib_include_path])
2240 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
2241 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
2244 dnl ===================================================================
2245 dnl Extra checking for the SUN OS compiler
2246 dnl ===================================================================
2247 if test "$_os" = "SunOS"; then
2248 dnl SunStudio C++ compiler packaged with SunStudio C compiler
2249 if test "$CC" = "cc"; then
2250 AC_MSG_CHECKING([SunStudio C++ Compiler])
2251 if test "$CXX" != "CC"; then
2252 AC_MSG_WARN([SunStudio C++ was not found])
2253 echo "SunStudio C++ was not found" >> warn
2255 AC_MSG_RESULT([checked])
2259 dnl ===================================================================
2260 dnl Extra checking for the DARWIN compiler
2261 dnl ===================================================================
2262 if test "$_os" = "Darwin"; then
2263 dnl c++ packaged with cc (gcc) for Macosx
2264 if test "$CC" = "cc"; then
2265 AC_MSG_CHECKING([Macosx c++ Compiler])
2266 if test "$CXX" != "c++"; then
2267 AC_MSG_WARN([Macosx C++ was not found])
2268 echo "Macosx C++ was not found" >> warn
2270 AC_MSG_RESULT([checked])
2274 dnl ===================================================================
2275 dnl Extra checking for the IRIX compiler
2276 dnl ===================================================================
2277 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2278 dnl MIPSpro C++ compiler packaged with MIPSpro C compiler
2279 if test "$CC" = "cc"; then
2280 AC_MSG_CHECKING([SGI MIPSpro C++ Compiler])
2281 if test "$CXX" != "CC"; then
2282 AC_MSG_WARN([SGI MIPSpro C++ was not found])
2283 echo "SGI MIPSpro C++ was not found" >> warn
2285 AC_MSG_RESULT([checked])
2289 dnl ===================================================================
2290 dnl Extra checking for the OSF compiler
2291 dnl ===================================================================
2292 if test "$_os" = "OSF1"; then
2293 AC_MSG_CHECKING([Compaq C++ compiler version])
2294 dnl cxx -V outputs to standard error!!!!
2295 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
2296 _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
2297 if test "$_compaqcxx_major" != "V6"; then
2298 AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
2299 echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
2301 dnl compiler will do
2302 AC_MSG_RESULT([checked])
2306 dnl **************************************************************
2307 dnl Testing for required Solaris and SunStudio compiler patches...
2308 dnl **************************************************************
2309 dnl Check whether the OS is SunOS.
2310 if test "$_os" = "SunOS"; then
2311 _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
2312 if test "$_os_release" = "7"; then
2316 AC_MSG_CHECKING([for patch 106327-06 or greater])
2317 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
2321 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2322 if test "$_patch_major" = "106327"; then
2323 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2324 if test "$_patch_rev" -ge "6"; then
2329 if test "$_patch" = "found"; then
2330 AC_MSG_RESULT([found])
2332 AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
2333 echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
2338 AC_MSG_CHECKING([for patch 106950-11 or greater])
2339 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
2343 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2344 if test "$_patch_major" = "106950"; then
2345 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2346 if test "$_patch_rev" -ge "11"; then
2351 if test "$_patch" = "found"; then
2352 AC_MSG_RESULT([found])
2354 AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
2355 echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
2358 if test "$_os_release" = "6"; then
2362 AC_MSG_CHECKING([for patch 105591-09 or greater])
2363 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
2367 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2368 if test "$_patch_major" = "105591"; then
2369 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2370 if test "$_patch_rev" -ge "9"; then
2375 if test "$_patch" = "found"; then
2376 AC_MSG_RESULT([found])
2378 AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
2379 echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
2384 AC_MSG_CHECKING([for patch 107733-08 or greater])
2385 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
2389 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2390 if test "$_patch_major" = "107733"; then
2391 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2392 if test "$_patch_rev" -ge "8"; then
2397 if test "$_patch" = "found"; then
2398 AC_MSG_RESULT([found])
2400 AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
2401 echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
2407 dnl ===================================================================
2408 dnl Checks for SGI STL
2409 dnl ===================================================================
2410 if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then
2411 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2412 AC_MSG_CHECKING([for SGI STL])
2413 if test -d /usr/include/CC ; then
2414 AC_MSG_RESULT([yes.])
2417 AC_MSG_RESULT([not found.])
2420 AC_MSG_ERROR([Option --enable-sgistl is only valid for IRIX])
2424 dnl ===================================================================
2425 dnl Checks for what the default STL should be
2426 dnl ===================================================================
2427 AC_MSG_CHECKING([what the default STL should be])
2428 DEFAULT_TO_STLPORT="no"
2429 if test "$_os" = "Linux"; then
2430 case "$build_cpu" in
2432 DEFAULT_TO_STLPORT="yes"
2435 DEFAULT_TO_STLPORT="no"
2438 elif test "$_os" = "SunOS"; then
2439 DEFAULT_TO_STLPORT="yes"
2440 elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2441 DEFAULT_TO_STLPORT="yes"
2442 elif test "$_os" = "OS2"; then
2443 DEFAULT_TO_STLPORT="yes"
2444 elif test "$_os" = "FreeBSD"; then
2445 DEFAULT_TO_STLPORT="yes"
2447 if test "$DEFAULT_TO_STLPORT" = "yes"; then
2448 AC_MSG_RESULT([stlport])
2450 AC_MSG_RESULT([system])
2452 if test "$WITH_STLPORT" = "auto"; then
2453 WITH_STLPORT=$DEFAULT_TO_STLPORT
2456 dnl ===================================================================
2457 dnl Checks for STLPORT
2458 dnl ===================================================================
2459 AC_MSG_CHECKING([for STL providing headers])
2462 if test "$WITH_STLPORT" = "yes"; then
2463 AC_MSG_RESULT([using internal stlport.])
2464 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2465 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2466 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2468 elif test "$WITH_STLPORT" = "no"; then
2469 AC_MSG_RESULT([using system STL])
2470 USE_SYSTEM_STL="YES"
2471 if test "$DEFAULT_TO_STLPORT" != "no"; then
2472 AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
2473 echo "using system STL. Warning, breaks your ABI compatability!" >>warn
2476 STLPORT4=$WITH_STLPORT
2477 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2478 AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
2480 dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
2481 if test -f "$STLPORT4/stlport/hash_map"; then
2482 AC_MSG_RESULT([checked.])
2484 AC_MSG_ERROR([STLport headers not found.])
2487 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2488 AC_MSG_CHECKING([for STLport libraries])
2489 if test "$_os" = "SunOS"; then
2490 if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
2491 AC_MSG_RESULT([checked])
2492 elif test -f "$STLPORT4/lib/libstlport.so"; then
2493 AC_MSG_RESULT([checked])
2496 AC_MSG_ERROR([STLport libraries not found])
2498 elif test "$_os" = "Darwin"; then
2499 if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
2500 AC_MSG_RESULT([checked])
2501 elif test -f "$STLPORT4/lib/libstlport.dylib"; then
2502 AC_MSG_RESULT([checked])
2505 AC_MSG_ERROR([STLport libraries not found])
2507 elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2508 if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then
2509 AC_MSG_RESULT([checked])
2511 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2512 AC_MSG_RESULT([checked])
2513 elif test -f "$STLPORT4/lib/libstlport.so"; then
2514 AC_MSG_RESULT([checked])
2517 AC_MSG_ERROR([STLport libraries not found])
2521 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2522 AC_MSG_RESULT([checked])
2523 elif test -f "$STLPORT4/lib/libstlport.so"; then
2524 AC_MSG_RESULT([checked])
2527 AC_MSG_ERROR([STLport libraries not found])
2531 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2532 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2533 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2538 if test -z "$STLPORT4"; then
2539 STLPORT4="NO_STLPORT4"
2541 if test -z "$STLPORT_VER"; then
2545 AC_SUBST(STLPORT_VER)
2546 AC_SUBST(USE_SYSTEM_STL)
2548 dnl ===================================================================
2549 dnl visibility feature
2550 dnl ===================================================================
2551 if test "$GCC" = "yes"; then
2552 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
2554 CFLAGS="$CFLAGS -fvisibility=hidden"
2555 AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
2557 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2558 AC_MSG_RESULT([yes])
2564 dnl ===================================================================
2565 dnl system stl sanity tests
2566 dnl ===================================================================
2567 HAVE_GCC_VISIBILITY_BROKEN=
2568 if test "$USE_SYSTEM_STL" = "YES"; then
2569 AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
2572 AC_TRY_COMPILE([#include <ext/hash_map>
2573 using namespace __gnu_cxx;
2574 ],[hash_map<int, int> t; return 0;],
2575 ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
2577 if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
2578 AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
2580 AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
2583 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2584 AC_MSG_CHECKING([if STL headers are visibility safe])
2585 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
2586 AC_MSG_RESULT([$stlvisok])
2587 if test "$stlvisok" = "no"; then
2588 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
2589 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
2590 unset HAVE_GCC_VISIBILITY_FEATURE
2594 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2595 sharedlink_ldflags_save=$LDFLAGS
2596 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
2598 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
2599 AC_TRY_LINK([#include <sstream>
2600 using namespace std;
2601 ],[istringstream strm( "test" ); return 0;],
2602 $EGREP -q unresolvable conftest.err;
2603 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
2605 AC_MSG_RESULT([$gccvisok])
2606 if test "$gccvisok" = "no"; then
2607 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
2608 echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn
2609 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
2612 LDFLAGS=$sharedlink_ldflags_save
2615 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2616 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
2617 cat >visibility.cxx <<_ACEOF
2618 #pragma GCC visibility push(hidden)
2619 struct __attribute__ ((visibility ("default"))) TestStruct {
2622 __attribute__ ((visibility ("default"))) void TestFunc() {
2626 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
2629 if $EGREP -q '@PLT|\$stub' visibility.s; then
2637 AC_MSG_RESULT([$gccvisbroken])
2638 if test "$gccvisbroken" = "yes"; then
2639 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
2640 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
2641 unset HAVE_GCC_VISIBILITY_FEATURE
2648 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
2649 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
2651 dnl ===================================================================
2653 dnl ===================================================================
2654 AC_MSG_CHECKING([which memory allocator to use])
2655 if test "$with_alloc" = "system"; then
2656 AC_MSG_RESULT([system])
2658 AC_CHECK_FUNCS([malloc realloc calloc free])
2660 if test "$with_alloc" = "tcmalloc"; then
2661 AC_MSG_RESULT(tcmalloc)
2662 if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
2663 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
2665 AC_CHECK_LIB(tcmalloc, malloc, [],
2666 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
2669 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
2670 AC_MSG_RESULT([internal])
2674 dnl ===================================================================
2675 dnl Custom build version
2676 dnl ===================================================================
2678 AC_MSG_CHECKING([whether to add custom build version])
2679 if test "z$with_build_version" != "z"; then
2680 BUILD_VER_STRING=$with_build_version
2681 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
2686 AC_SUBST(BUILD_VER_STRING)
2688 dnl ===================================================================
2689 dnl Java support enable
2690 dnl ===================================================================
2691 AC_MSG_CHECKING([whether to build with Java support])
2692 if test "$WITH_JAVA" != "no"; then
2693 AC_MSG_RESULT([yes])
2699 AC_MSG_WARN([building without java will mean some features will not be available])
2700 echo "building without java will mean some features will not be available" >>warn
2702 AC_SUBST(SOLAR_JAVA)
2704 if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
2705 # IBMs JDK needs this...
2706 JITC_PROCESSOR_TYPE=6
2707 export JITC_PROCESSOR_TYPE
2710 if test "$_os" = "WINNT"; then
2711 if test -z "$with_jdk_home"; then
2712 _jdk_home=`./oowintool --jdk-home`
2713 if test -d "$_jdk_home"; then
2714 with_jdk_home="$_jdk_home"
2717 with_jdk_home=`cygpath -u "$with_jdk_home"`
2721 dnl ===================================================================
2723 dnl ===================================================================
2724 if test "$SOLAR_JAVA" != ""; then
2725 JAVA_HOME=; export JAVA_HOME
2726 if test -z "$with_jdk_home"; then
2727 AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
2729 _java_path="$with_jdk_home/bin/$WITH_JAVA"
2730 dnl Check if there is a java interpreter at all.
2731 if test -x "$_java_path"; then
2732 JAVAINTERPRETER=$_java_path
2734 AC_MSG_ERROR([$_java_path not found set with_jdk_home])
2737 if test "$_os" = "WINNT"; then
2738 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
2739 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
2741 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
2742 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
2746 dnl ===================================================================
2748 dnl ===================================================================
2749 if test "$SOLAR_JAVA" != ""; then
2751 AC_MSG_CHECKING([the installed JDK])
2752 if test -n "$JAVAINTERPRETER"; then
2753 dnl java -version sends output to stderr!
2754 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2755 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2756 # dnl Kaffe specific tests
2757 # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
2758 # if test -z "$KAFFE_VER"; then
2759 # AC_MSG_ERROR([looks like Kaffe but version detection failed])
2761 # _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2762 # if test "$_kaffe_ver" -lt 10100; then
2763 # AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
2767 # dnl TODO: define some project exclusion variables
2769 # AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
2770 # AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
2771 # echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
2772 # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2773 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
2775 AC_MSG_RESULT([checked (gcj)])
2776 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2777 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2779 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
2780 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2783 # dnl BEA JDK specific tests
2784 # _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2785 # _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2787 # if test "$_jdk_ver" -lt 10500; then
2788 # AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0])
2791 # AC_MSG_RESULT([checked (BEA JDK $_jdk)])
2793 # if test "$with_jdk_home" = ""; then
2794 # AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
2795 #you must use the "--with-jdk-home" configure option explicitly])
2798 # AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
2799 # echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
2801 # JAVA_HOME=$with_jdk_home
2803 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
2806 dnl IBM JDK specific tests
2807 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2808 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2810 if test "$_jdk_ver" -lt 10600; then
2811 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.6])
2814 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
2816 if test "$with_jdk_home" = ""; then
2817 AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
2818 you must use the "--with-jdk-home" configure option explicitly])
2821 JAVA_HOME=$with_jdk_home
2826 dnl SUN JDK specific tests
2827 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2828 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2830 if test "$_jdk_ver" -lt 10500; then
2831 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
2833 AC_MSG_RESULT([checked (JDK $_jdk)])
2834 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2835 if test "$_os" = "WINNT"; then
2836 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2838 if test "$_os" = "OS2"; then
2839 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2843 AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
2847 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
2850 _java_target_ver="1.5"
2851 dnl ===================================================================
2852 dnl Check for target java bytecode version
2853 dnl ===================================================================
2854 if test "$SOLAR_JAVA" != ""; then
2855 AC_MSG_CHECKING([for target java bytecode version])
2856 if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
2857 AC_MSG_RESULT([default by $JDK])
2858 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
2859 AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
2862 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
2863 _java_target_ver="$with_java_target_version"
2864 AC_MSG_RESULT([$_java_target_ver])
2865 elif test $_jdk_ver -gt 10000 ; then
2866 _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
2867 AC_MSG_RESULT([$_java_target_ver])
2869 AC_MSG_ERROR([Unable to guess java bytecode version from java version!])
2873 if ! test -z "$_java_target_ver" -o \
2874 "$_java_target_ver" = "1.1" -o \
2875 "$_java_target_ver" = "1.2" -o \
2876 "$_java_target_ver" = "1.3" -o \
2877 "$_java_target_ver" = "1.4" -o \
2878 "$_java_target_ver" = "1.5" -o \
2879 "$_java_target_ver" = "1.6" -o \
2880 "$_java_target_ver" = "5" ; then
2881 AC_MSG_ERROR([$_java_target_ver is not supported java bytecode version!])
2884 JAVA_SOURCE_VER="$_java_target_ver"
2885 JAVA_TARGET_VER="$_java_target_ver"
2888 dnl ===================================================================
2889 dnl Checks for javac
2890 dnl ===================================================================
2891 if test "$SOLAR_JAVA" != ""; then
2892 if test "$JDK" = "gcj"; then
2893 javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
2895 javacompiler="javac"
2897 if test "$_os" = "OS2"; then
2898 if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
2899 javacompiler="${javacompiler}.exe"
2902 if test -z "$with_jdk_home"; then
2903 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
2905 _javac_path="$with_jdk_home/bin/$javacompiler"
2906 dnl Check if there is a java compiler at all.
2907 if test -x "$_javac_path"; then
2908 JAVACOMPILER=$_javac_path
2911 if test -z "$JAVACOMPILER"; then
2912 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
2914 if test "$_os" = "WINNT"; then
2915 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2916 JAVACOMPILER="${JAVACOMPILER}.exe"
2918 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
2919 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
2921 if test "$_os" = "OS2"; then
2922 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2923 JAVACOMPILER="${JAVACOMPILER}.exe"
2927 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
2928 AC_MSG_CHECKING([re-checking JDK])
2930 AC_MSG_RESULT([checked (ecj)])
2931 #TODO: what's to do here? some switch to do 1.5 compiling?
2932 JAVAFLAGS="-source 1.5 -target 1.5"
2933 _gij_longver="50000"
2938 dnl ===================================================================
2939 dnl Checks that javac is gcj
2940 dnl ===================================================================
2941 if test "$SOLAR_JAVA" != ""; then
2942 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
2946 AC_SUBST(JAVACISGCJ)
2949 dnl ===================================================================
2950 dnl Checks that javac is kaffe
2951 dnl ===================================================================
2952 if test "$SOLAR_JAVA" != ""; then
2953 if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2957 AC_SUBST(JAVACISKAFFE)
2959 dnl ===================================================================
2960 dnl Checks for javadoc
2961 dnl ===================================================================
2962 if test "$SOLAR_JAVA" != ""; then
2963 if test -z "$with_jdk_home"; then
2964 AC_PATH_PROG(JAVADOC, javadoc)
2966 _javadoc_path="$with_jdk_home/bin/javadoc"
2967 if test "$_os" = "OS2"; then
2968 if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
2969 _javadoc_path="${_javadoc_path}.exe"
2972 dnl Check if there is a javadoc at all.
2973 if test -x "$_javadoc_path"; then
2974 JAVADOC=$_javadoc_path
2976 AC_PATH_PROG(JAVADOC, javadoc)
2979 if test -z "$JAVADOC"; then
2980 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
2982 if test "$_os" = "WINNT"; then
2983 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2984 JAVADOC="${JAVADOC}.exe"
2986 JAVADOC=`cygpath -d "$JAVADOC"`
2987 JAVADOC=`cygpath -u "$JAVADOC"`
2989 if test "$_os" = "OS2"; then
2990 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2991 JAVADOC="${JAVADOC}.exe"
2996 if test "$SOLAR_JAVA" != ""; then
2997 dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
2998 if test "$JDK" == "gcj" -a -z "$JAVA_HOME"; then
2999 if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "50000"; then
3000 cat > findhome.java <<_ACEOF
3001 [import java.io.File;
3005 public static void main(String args[])
3007 String jrelocation = System.getProperty("java.home");
3008 File jre = new File(jrelocation);
3009 System.out.println(jre.getParent());
3013 AC_MSG_CHECKING([if javac works])
3014 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
3015 AC_TRY_EVAL(javac_cmd)
3016 if test $? = 0 && test -f ./findhome.class ; then
3017 AC_MSG_RESULT([javac works])
3019 echo "configure: javac test failed" >&5
3020 cat findhome.java >&5
3021 AC_MSG_ERROR([javac does not work - java projects will not build!])
3024 AC_MSG_CHECKING([if gij knows its java.home])
3025 JAVA_HOME=`$JAVAINTERPRETER findhome`
3026 if test $? = 0 && test "$JAVA_HOME" != "" ; then
3027 AC_MSG_RESULT([$JAVA_HOME])
3029 echo "configure: java test failed" >&5
3030 cat findhome.java >&5
3031 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
3034 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
3038 dnl second sanity check JAVA_HOME if possible
3039 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "50000"; then
3040 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
3041 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
3043 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
3044 # try to recover first by looking whether we have a alternatives
3045 # system as in Debian or newer SuSEs where following /usr/bin/javac
3046 # over /etc/alternatives/javac leads to the right bindir where we
3047 # just need to strip a bit away to get a valid JAVA_HOME
3048 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
3049 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
3050 # maybe only one level of symlink (e.g. on Mac)
3051 JAVA_HOME=$(readlink $JAVACOMPILER)
3054 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
3055 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
3056 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
3057 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
3059 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
3060 if test "$JAVA_HOME" != "/usr"; then
3061 if test "$_os" = "Darwin"; then
3062 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
3063 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
3064 dnl Tiger already returns a JDK path..
3065 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
3067 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
3071 # now check if $JAVA_HOME is really valid
3072 if test "$_os" = "Darwin"; then
3073 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
3076 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
3079 if test "$JAVA_HOME_OK" = "NO"; then
3080 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
3081 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
3082 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
3083 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
3084 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
3085 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
3086 # if test "$JDK" == "gcj"; then
3087 # 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
3094 if test "$SOLAR_JAVA" != ""; then
3095 AC_MSG_CHECKING([for jawt lib name])
3096 if test "$JDK" = "gcj"; then
3098 save_LDFLAGS=$LDFLAGS
3099 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3100 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
3101 exec 6>/dev/null # no output
3102 AC_CHECK_HEADER(jni.h, [],
3103 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
3104 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
3105 exec 6>&1 # output on again
3107 LDFLAGS=$save_LDFLAGS
3109 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
3110 # A workaround is to link also against libpmawt.so
3111 if test "$JDK" = "ibm" ; then
3113 save_LDFLAGS=$LDFLAGS
3114 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
3115 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3116 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
3117 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
3118 export LD_LIBRARY_PATH
3119 exec 6>/dev/null # no output
3120 AC_CHECK_HEADER(jni.h, [],
3121 [AC_MSG_ERROR([jni.h could not be found.])], [])
3122 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
3123 if test -z "$AWTLIB"; then
3124 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
3125 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
3127 exec 6>&1 # output on again
3129 LDFLAGS=$save_LDFLAGS
3130 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
3132 if test -z "$AWTLIB"; then
3135 AC_MSG_RESULT([$AWTLIB])
3139 dnl ===================================================================
3140 dnl Check for optional gcj for AOT
3141 dnl ===================================================================
3142 if test "$SOLAR_JAVA" != ""; then
3143 AC_MSG_CHECKING([whether to enable gcj aot compilation])
3144 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
3145 AC_MSG_RESULT([yes])
3146 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
3149 gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
3151 AC_MSG_RESULT([$gcjaot])
3152 if test -n "$with_jdk_home"; then
3153 _javac_path="$with_jdk_home/bin/$gcjaot"
3154 dnl Check if there is a gcj at all.
3155 if test -x "$_javac_path"; then
3156 JAVAAOTCOMPILER=$_javac_path
3159 if test -z "$JAVAAOTCOMPILER"; then
3160 AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
3162 if test -z "$JAVAAOTCOMPILER"; then
3163 AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
3173 AC_SUBST(JAVA_SOURCE_VER)
3174 AC_SUBST(JAVA_TARGET_VER)
3175 AC_SUBST(JAVAINTERPRETER)
3176 AC_SUBST(JAVACOMPILER)
3177 AC_SUBST(JAVAAOTCOMPILER)
3180 dnl ===================================================================
3181 dnl Checks for specific files.
3182 dnl ===================================================================
3184 dnl ===================================================================
3185 dnl Checks for programs.
3186 dnl ===================================================================
3188 dnl ===================================================================
3189 dnl Check whether we already have dmake
3190 dnl ===================================================================
3191 AC_PATH_PROG(DMAKE, dmake, no)
3192 if test "$DMAKE" = "no"; then
3194 echo "dmake will be built on ./bootstrap"
3196 AC_MSG_CHECKING([whether the found dmake is the right dmake])
3197 # we need to find out whether that dmake we found is "our" dmake
3198 # or the dmake from Sun's SunStudio Compiler which is something
3200 # This test _should_ work because the one accepts -V (ours) and one
3201 # (the other) not...
3202 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3203 if test $? -eq 0; then
3205 AC_MSG_RESULT([yes])
3206 AC_MSG_CHECKING([the dmake version])
3207 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3208 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3209 AC_MSG_RESULT([OK, >= 4.11])
3210 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3211 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3212 AC_MSG_RESULT([OK, >= 4.11])
3214 AC_MSG_RESULT([too old. >= 4.11 is needed])
3215 echo "A newer dmake will be built on ./bootstrap"
3220 echo "dmake will be built on ./bootstrap"
3224 AC_SUBST(BUILD_DMAKE)
3226 AC_MSG_CHECKING([whether to enable EPM for packing])
3227 if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -o "$enable_epm" != "no" \) ; then
3228 AC_MSG_RESULT([yes])
3229 dnl ===================================================================
3230 dnl Check for epm - not needed for windows
3231 dnl ===================================================================
3232 if test "$_os" != "WINNT"; then
3233 if test -n "$with_epm"; then
3236 AC_PATH_PROG(EPM, epm, no)
3238 if test "$EPM" = "no" || test "$EPM" = "internal"; then
3239 echo "EPM will be built."
3241 BUILD_TYPE="$BUILD_TYPE EPM"
3243 # Gentoo has some epm which is something different...
3244 AC_MSG_CHECKING([whether the found epm is the right epm])
3245 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
3246 AC_MSG_RESULT([yes])
3248 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
3250 AC_MSG_CHECKING([epm version])
3251 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
3252 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
3253 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
3254 AC_MSG_RESULT([OK, >= 3.7])
3256 if test "$_os" = "Darwin"; then
3257 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
3258 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
3259 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3260 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)])
3261 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3262 AC_MSG_RESULT([$_pm, ok])
3263 else # we never should get here, but go safe
3264 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)])
3268 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
3269 echo "EPM will be built."
3271 BUILD_TYPE="$BUILD_TYPE EPM"
3276 # test which package format to use
3277 AC_MSG_CHECKING([which package format to use])
3278 # epm supports the following formats:
3279 # aix - AIX software distribution
3280 # bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3281 # depot or swinstall - HP-UX software distribution
3282 # deb - Debian software distribution
3283 # inst or tardist - IRIX software distribution
3284 # osx - MacOS X software distribution
3285 # pkg - Solaris software distribution
3286 # rpm - RedHat software distribution
3287 # setld - Tru64 (setld) software distribution
3288 # native - "Native" software distribution for the platform
3289 # portable - Portable software distribution
3303 # if building on Debian, default should be deb...
3304 if test -e /etc/debian_version; then
3322 # we never should get here since we check the arciecture/os at the beginning,
3325 AC_MSG_ERROR([unknown system])
3327 if test -n "$with_package_format"; then
3328 for i in $with_package_format; do
3330 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable)
3333 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
3334 aix - AIX software distribution
3335 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3336 depot or swinstall - HP-UX software distribution
3337 deb - Debian software distribution
3338 inst or tardist - IRIX software distribution
3339 osx - MacOS X software distribution
3340 pkg - Solaris software distribution
3341 rpm - RedHat software distribution
3342 setld - Tru64 (setld) software distribution
3343 native - "Native" software distribution for the platform
3344 portable - Portable software distribution
3349 PKGFORMAT="$with_package_format"
3351 AC_MSG_RESULT([$PKGFORMAT])
3352 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
3353 AC_MSG_CHECKING([for rpm])
3354 for a in "$RPM" rpmbuild rpm; do
3355 $a --usage >/dev/null 2> /dev/null
3356 if test $? -eq 0; then
3360 $a --version >/dev/null 2> /dev/null
3361 if test $? -eq 0; then
3367 if test -z "$RPM" ; then
3368 AC_MSG_ERROR([not found])
3370 RPM_PATH=`which $RPM`
3371 AC_MSG_RESULT([$RPM_PATH])
3374 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
3375 AC_PATH_PROG(DPKG, dpkg, no)
3376 if test "$DPKG" = "no"; then
3377 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
3380 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
3381 if test "$_os" = "Darwin"; then
3382 AC_MSG_CHECKING([for PackageMaker availability])
3383 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
3384 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
3389 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
3392 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
3393 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3394 if test "$EPM" != "no" && test "$EPM" != "internal"; then
3395 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
3396 AC_MSG_CHECKING([whether epm is patched for OOos needs])
3397 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
3398 AC_MSG_RESULT([yes])
3401 if echo "$PKGFORMAT" | grep -q rpm; then
3403 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
3404 echo "the rpms will need to be installed with --nodeps" >> warn
3408 AC_MSG_WARN([the ${_pt}s will not be relocateable])
3409 echo "the ${_pt}s will not be relocateable" >> warn
3410 AC_MSG_WARN([if you want to make sure installation without --nodeps and
3411 relocation will work, you need to patch your epm with the
3412 patch in epm/epm-3.7.patch or build with
3413 --with-epm=internal which will build a suitable epm])
3418 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3419 AC_PATH_PROG(PKGMK, pkgmk, no)
3420 if test "$PKGMK" = "no"; then
3421 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
3435 dnl ===================================================================
3437 dnl ===================================================================
3438 AC_PATH_PROG(GPERF, gperf)
3439 if test -z "$GPERF"; then
3440 AC_MSG_ERROR([gperf not found but needed. Install it.])
3442 AC_MSG_CHECKING([gperf version])
3443 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
3446 AC_MSG_ERROR([too old, you need at least 3.0.0])
3449 dnl ===================================================================
3450 dnl Check for building stax
3451 dnl ===================================================================
3452 AC_MSG_CHECKING([whether to build the stax])
3453 if test -f "external/StAX/jsr173_1.0_api.jar"; then
3455 AC_MSG_RESULT([no, will use the prebuilt external/StAX/jsr173_1.0_api.jar])
3458 AC_MSG_RESULT([yes])
3460 AC_SUBST(BUILD_STAX)
3462 dnl ===================================================================
3463 dnl Check for building ODK
3464 dnl ===================================================================
3465 AC_MSG_CHECKING([whether to build the ODK])
3466 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
3467 AC_MSG_RESULT([yes])
3468 if test "$WITH_JAVA" != "no"; then
3469 AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
3470 if ! test -f "./external/unowinreg/unowinreg.dll"; then
3471 HAVE_UNOWINREG_DLL=no
3473 HAVE_UNOWINREG_DLL=yes
3475 if test "$HAVE_UNOWINREG_DLL" = "yes"; then
3476 AC_MSG_RESULT([found])
3479 if test "$_os" = "WINNT"; then
3480 AC_MSG_RESULT([not found, will be built])
3482 AC_MSG_WARN([not found, will be cross-built using mingw32])
3486 if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
3487 if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
3488 AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
3489 Specify mingw32 g++ executable name with --with-mingwin.
3490 Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
3491 put it into external/unowinreg])
3493 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3494 if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
3496 AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
3498 if test "$MINGWCXX" = "false"; then
3499 AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
3501 AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
3502 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
3507 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3508 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
3510 AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/`, false)
3512 if test "$MINGWSTRIP" = "false"; then
3513 AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
3519 CXXCPP="$MINGWCXX -E"
3520 save_CXXFLAGS=$CXXFLAGS
3521 save_CPPFLAGS=$CPPFLAGS
3522 CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
3523 CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
3524 # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
3525 # do not make sense here (and 'd make the check fail)
3528 AC_HAVE_LIBRARY(kernel32)
3529 AC_HAVE_LIBRARY(advapi32)
3530 AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
3531 CXXFLAGS=$save_CXXFLAGS
3532 CPPFLAGS=$save_CPPFLAGS
3539 BUILD_TYPE="$BUILD_TYPE ODK"
3544 AC_SUBST(BUILD_UNOWINREG)
3546 AC_SUBST(MINGWSTRIP)
3548 dnl ===================================================================
3549 dnl Check for building qadevOOo
3550 dnl ===================================================================
3551 AC_MSG_CHECKING([whether to build qadevOOo])
3552 if test "z$enable_qadevooo" = "z" -o "$enable_qadevooo" != "no"; then
3553 AC_MSG_RESULT([yes])
3554 BUILD_QADEVOOO="YES"
3555 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
3560 AC_SUBST(BUILD_QADEVOOO)
3562 dnl ===================================================================
3563 dnl Check for prelinked libgcc_s.so.1
3564 dnl ===================================================================
3565 if test -z "$with_system_stdlibs" -a -z "$with_system_libs"; then
3566 if test -n "$checkforprelink" -a -f /etc/rpm/macros.prelink; then
3567 with_system_stdlibs=yes
3568 AC_MSG_WARN([prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override])
3569 echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn
3573 dnl ===================================================================
3574 dnl Check for system stdlibs
3575 dnl ===================================================================
3576 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
3577 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
3578 test "$with_system_stdlibs" != "no"; then
3582 AC_MSG_RESULT([yes])
3585 AC_SUBST(SYSTEM_STDLIBS)
3587 dnl ===================================================================
3588 dnl Check for system zlib
3589 dnl ===================================================================
3590 if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
3591 with_system_zlib=yes
3593 AC_MSG_CHECKING([which zlib to use])
3594 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
3595 test "$with_system_zlib" != "no"; then
3596 AC_MSG_RESULT([external])
3598 AC_CHECK_HEADER(zlib.h, [],
3599 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
3600 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
3601 [AC_MSG_ERROR(zlib not found or functional)], [])
3603 AC_MSG_RESULT([internal])
3605 BUILD_TYPE="$BUILD_TYPE ZLIB"
3607 AC_SUBST(SYSTEM_ZLIB)
3609 dnl ===================================================================
3610 dnl Check for system jpeg
3611 dnl ===================================================================
3612 AC_MSG_CHECKING([which jpeg to use])
3613 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
3614 test "$with_system_jpeg" != "no"; then
3615 AC_MSG_RESULT([external])
3617 AC_CHECK_HEADER(jpeglib.h, [],
3618 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
3619 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
3620 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
3622 AC_MSG_RESULT([internal])
3624 BUILD_TYPE="$BUILD_TYPE JPEG"
3626 AC_SUBST(SYSTEM_JPEG)
3628 dnl ===================================================================
3629 dnl Check for system expat
3630 dnl ===================================================================
3631 AC_MSG_CHECKING([which expat to use])
3632 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
3633 test "$with_system_expat" != "no"; then
3634 AC_MSG_RESULT([external])
3636 AC_CHECK_HEADER(expat.h, [],
3637 [AC_MSG_ERROR(expat.h not found. install expat)], [])
3638 AC_CHECK_LIB(expat, XML_ParserCreate, [],
3639 [AC_MSG_RESULT(expat library not found or functional.)], [])
3641 AC_MSG_RESULT([internal])
3643 BUILD_TYPE="$BUILD_TYPE EXPAT"
3645 AC_SUBST(SYSTEM_EXPAT)
3647 dnl ===================================================================
3648 dnl Check for system libwpd
3649 dnl ===================================================================
3650 AC_MSG_CHECKING([which libwpd to use])
3651 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
3652 test "$with_system_libwpd" != "no"; then
3653 AC_MSG_RESULT([external])
3655 PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
3657 AC_MSG_RESULT([internal])
3659 BUILD_TYPE="$BUILD_TYPE LIBWPD"
3661 AC_SUBST(SYSTEM_LIBWPD)
3662 AC_SUBST(LIBWPD_CFLAGS)
3663 AC_SUBST(LIBWPD_LIBS)
3665 dnl ===================================================================
3666 dnl Check whether freetype is available
3667 dnl ===================================================================
3668 if test "$test_freetype" = "yes"; then
3669 AC_MSG_CHECKING([whether freetype is available])
3670 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
3672 AC_SUBST(FREETYPE_CFLAGS)
3673 AC_SUBST(FREETYPE_LIBS)
3675 dnl ===================================================================
3676 dnl Check for system libwps
3677 dnl ===================================================================
3678 AC_MSG_CHECKING([which libwps to use])
3679 if test -n "$with_system_libwps" -o -n "$with_system_libs" && \
3680 test "$with_system_libwps" != "no"; then
3681 AC_MSG_RESULT([external])
3683 PKG_CHECK_MODULES( LIBWPS, libwps-0.1 )
3685 AC_MSG_RESULT([internal])
3687 BUILD_TYPE="$BUILD_TYPE LIBWPS"
3689 AC_SUBST(SYSTEM_LIBWPS)
3690 AC_SUBST(LIBWPS_CFLAGS)
3691 AC_SUBST(LIBWPS_LIBS)
3693 dnl ===================================================================
3694 dnl Check for system libwpg
3695 dnl ===================================================================
3696 AC_MSG_CHECKING([which libwpg to use])
3697 if test -n "$with_system_libwpg" -o -n "$with_system_libs" && \
3698 test "$with_system_libwpg" != "no"; then
3699 AC_MSG_RESULT([external])
3701 PKG_CHECK_MODULES( LIBWPG, libwpg-0.1 )
3703 AC_MSG_RESULT([internal])
3705 BUILD_TYPE="$BUILD_TYPE LIBWPG"
3707 AC_SUBST(SYSTEM_LIBWPG)
3708 AC_SUBST(LIBWPG_CFLAGS)
3709 AC_SUBST(LIBWPG_LIBS)
3711 dnl ===================================================================
3712 dnl Check whether freetype2 supports emboldening
3713 dnl ===================================================================
3714 if test "$test_freetype" = "yes"; then
3715 save_CPPFLAGS="$CPPFLAGS"
3716 save_LDFLAGS="$LDFLAGS"
3718 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
3719 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
3720 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
3721 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
3722 LDFLAGS="$save_LDFLAGS"
3723 CPPFLAGS="$save_CPPFLAGS"
3726 AC_SUBST(USE_FT_EMBOLDEN)
3728 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
3729 test "$with_system_libxslt" != "no"; then
3730 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
3731 test "$with_system_libxml" == "no"; then
3732 # somehow AC_MSG_WARN won't work...
3733 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
3734 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
3735 with_system_libxml=yes
3738 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
3739 test "$with_system_libxml" != "no"; then
3740 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
3741 test "$with_system_libxslt" == "no"; then
3742 # somehow AC_MSG_WARN won't work...
3743 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
3744 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
3745 with_system_libxslt=yes
3749 dnl ===================================================================
3750 dnl Check for system libxslt
3751 dnl ===================================================================
3752 AC_MSG_CHECKING([which libxslt to use])
3753 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
3754 "$_os" = "Darwin" && \
3755 test "$with_system_libxslt" != "no"; then
3756 AC_MSG_RESULT([external])
3759 PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
3761 dnl Check for xsltproc
3762 AC_PATH_PROG(XSLTPROC, xsltproc, no)
3763 if test "$XSLTPROC" = "no"; then
3764 AC_MSG_ERROR([xsltproc is required])
3767 AC_MSG_RESULT([internal])
3769 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
3771 AC_SUBST(SYSTEM_LIBXSLT)
3772 AC_SUBST(LIBXSLT_CFLAGS)
3773 AC_SUBST(LIBXSLT_LIBS)
3776 dnl ===================================================================
3777 dnl Check for system libxml
3778 dnl ===================================================================
3779 AC_MSG_CHECKING([which libxml to use])
3780 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
3781 "$_os" = "Darwin" && \
3782 test "$with_system_libxml" != "no"; then
3783 AC_MSG_RESULT([external])
3785 PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
3786 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
3788 AC_MSG_RESULT([internal])
3790 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
3792 AC_SUBST(SYSTEM_LIBXML)
3793 AC_SUBST(LIBXML_CFLAGS)
3794 AC_SUBST(LIBXML_LIBS)
3796 dnl ===================================================================
3797 dnl Check for system python
3798 dnl ===================================================================
3799 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
3800 with_system_python=yes
3802 AC_MSG_CHECKING([which python to use])
3803 if test -n "$with_system_python" -o -n "$with_system_libs" && \
3804 test "$with_system_python" != "no"; then
3806 AC_MSG_RESULT([external])
3807 AM_PATH_PYTHON([2.2])
3809 python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
3810 python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
3811 PYTHON_CFLAGS="-I$python_include"
3813 if test "$_os" = "Darwin"; then
3814 PYTHON_LIBS="-framework Python"
3816 PYTHON_LIBS="-lpython$python_version"
3819 dnl check if the headers really work:
3820 save_CPPFLAGS="$CPPFLAGS"
3821 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
3822 AC_CHECK_HEADER(Python.h, [],
3823 [AC_MSG_ERROR(Python headers not found)], [])
3824 CPPFLAGS="$save_CPPFLAGS"
3827 BUILD_TYPE="$BUILD_TYPE PYTHON"
3828 AC_MSG_RESULT([internal])
3829 # Embedded python dies without Home set
3830 if test "z$HOME" = "z"; then
3833 # bz2 tarball and bzip2 is not standard
3834 if test -z "$BZIP2"; then
3835 AC_PATH_PROG( BZIP2, bzip2)
3836 if test -z "$BZIP2"; then
3837 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
3841 AC_SUBST(SYSTEM_PYTHON)
3842 AC_SUBST(PYTHON_CFLAGS)
3843 AC_SUBST(PYTHON_LIBS)
3844 HOME=`echo $HOME | sed 's:\\\\:/:g'`
3847 dnl ===================================================================
3848 dnl Check for system berkley db
3849 dnl ===================================================================
3850 AC_MSG_CHECKING([which db to use])
3851 if test -n "$with_system_db" -o -n "$with_system_libs" && \
3852 test "$with_system_db" != "no"; then
3854 AC_MSG_RESULT([external])
3855 AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
3857 CFLAGS=-I/usr/include/db4
3858 AC_CHECK_HEADER(db4/db.h,
3859 [ DB_INCLUDES=/usr/include/db4 ],
3860 [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
3863 AC_MSG_CHECKING([whether db is at least 4.1])
3864 for v in `seq 1 7`; do
3868 int main(int argc, char **argv) {
3869 if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0;
3872 ], [DB_VERSION_MINOR=$v], [])
3874 if test "$DB_VERSION_MINOR" -gt "1"; then
3876 DB_VERSION=4.$DB_VERSION_MINOR
3878 AC_MSG_ERROR([no. you need at least db 4.1])
3881 #AC_CHECK_LIB(db, db_create, [],
3882 # [AC_MSG_ERROR([db library not installed or functional])], [])
3883 AC_HAVE_LIBRARY(db, [],
3884 [AC_MSG_ERROR([db not installed or functional])], [])
3885 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
3887 AC_MSG_RESULT([internal])
3889 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
3892 AC_SUBST(DB_VERSION)
3893 AC_SUBST(DB_INCLUDES)
3896 dnl ===================================================================
3897 dnl Check for system lucene
3898 dnl ===================================================================
3899 AC_MSG_CHECKING([which lucene to use])
3900 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
3901 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
3902 AC_MSG_RESULT([external])
3904 if test -z $LUCENE_CORE_JAR; then
3905 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
3906 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
3908 AC_CHECK_FILE(/usr/share/java/lucene.jar,
3909 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
3910 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
3915 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3916 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
3919 if test -z $LUCENE_ANALYZERS_JAR; then
3920 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
3921 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
3923 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
3924 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
3925 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
3930 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3931 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
3934 AC_MSG_RESULT([internal])
3936 BUILD_TYPE="$BUILD_TYPE LUCENE"
3938 AC_SUBST(SYSTEM_LUCENE)
3939 AC_SUBST(LUCENE_CORE_JAR)
3940 AC_SUBST(LUCENE_ANALYZERS_JAR)
3942 dnl ===================================================================
3943 dnl Check for system hsqldb
3944 dnl ===================================================================
3945 AC_MSG_CHECKING([which hsqldb to use])
3946 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
3947 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
3948 AC_MSG_RESULT([external])
3950 if test -z $HSQLDB_JAR; then
3951 HSQLDB_JAR=/usr/share/java/hsqldb.jar
3953 AC_CHECK_FILE($HSQLDB_JAR, [],
3954 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
3955 AC_MSG_CHECKING([whether hsqldb is >= 1.8.0.9])
3957 if $PERL -e 'use Archive::Zip;
3958 my $file = "$ENV{'HSQLDB_JAR'}";
3959 my $zip = Archive::Zip->new( $file );
3960 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
3961 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
3962 push @l, split(/\n/, $mf);
3963 foreach my $line (@l) {
3964 if ($line =~ m/Specification-Version:/) {
3965 ($t, $version) = split (/:/,$line);
3966 $version =~ s/^\s//;
3967 ($a, $b, $c, $d) = split (/\./,$version);
3968 if (($c == "0" && $d > "8") || $c > 0) {
3978 AC_MSG_RESULT([yes])
3980 AC_MSG_ERROR([no, hsqldb >= 1.8.0.9 is needed])
3983 AC_MSG_RESULT([internal])
3985 BUILD_TYPE="$BUILD_TYPE HSQLDB"
3987 AC_SUBST(SYSTEM_HSQLDB)
3988 AC_SUBST(HSQLDB_JAR)
3990 dnl ===================================================================
3991 dnl Check for PostgreSQL stuff
3992 dnl ===================================================================
3993 AC_PATH_PROG(PGCONFIG, pg_config)
3994 if test -z "$PGCONFIG"; then
3995 AC_MSG_ERROR([pg_config needed])
3999 CFLAGS="-I`pg_config --includedir`"
4000 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
4001 AC_HAVE_LIBRARY(pq, [], [AC_MSG_ERROR(libpq is needed)], [])
4004 SYSTEM_POSTGRESQL=YES # only option atm :-)
4005 AC_SUBST(SYSTEM_POSTGRESQL)
4007 dnl ===================================================================
4008 dnl Check for system beanshell
4009 dnl ===================================================================
4010 AC_MSG_CHECKING([which beanshell to use])
4011 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
4012 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
4013 AC_MSG_RESULT([external])
4015 if test -z $BSH_JAR; then
4016 BSH_JAR=/usr/share/java/bsh.jar
4018 AC_CHECK_FILE($BSH_JAR, [],
4019 [AC_MSG_ERROR(bsh.jar not found.)], [])
4021 AC_MSG_RESULT([internal])
4023 BUILD_TYPE="$BUILD_TYPE BSH"
4025 AC_SUBST(SYSTEM_BSH)
4029 dnl ===================================================================
4030 dnl Check for system saxon
4031 dnl ===================================================================
4032 AC_MSG_CHECKING([which saxon to use])
4033 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
4034 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
4035 AC_MSG_RESULT([external])
4037 if test -z $SAXON_JAR; then
4038 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4039 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4041 AC_CHECK_FILE(/usr/share/java/saxon.jar,
4042 [ SAXON_JAR=/usr/share/java/saxon.jar ],
4043 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4044 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4045 [ AC_MSG_ERROR(saxon.jar replacement not found)]
4052 AC_CHECK_FILE($SAXON_JAR, [],
4053 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
4055 if test -n "$SERIALIZER_JAR"; then
4056 AC_CHECK_FILE($SERIALIZER_JAR, [],
4057 [AC_MSG_ERROR(serializer.jar not found.)], [])
4058 AC_SUBST(SERIALIZER_JAR)
4061 AC_MSG_RESULT([internal])
4065 AC_SUBST(SYSTEM_SAXON)
4068 if test -n "$NEED_SAXON"; then
4069 BUILD_TYPE="$BUILD_TYPE SAXON"
4072 dnl ===================================================================
4073 dnl Check for system curl
4074 dnl ===================================================================
4075 if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
4076 with_system_curl=yes
4078 AC_MSG_CHECKING([which curl to use])
4079 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
4080 test "$with_system_curl" != "no"; then
4081 AC_MSG_RESULT([external])
4084 AC_PATH_PROG( CURLCONFIG, curl-config)
4085 if test -z "$CURLCONFIG"; then
4086 AC_MSG_ERROR([install curl to run this script])
4089 # check curl version
4090 AC_MSG_CHECKING([whether curl is >= 7.9.8])
4091 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
4092 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "9" -a \
4093 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "8"; then
4094 AC_MSG_ERROR([no, you need at least curl 7.9,8])
4096 AC_MSG_RESULT([yes])
4098 CURL_LIBS=`$CURLCONFIG --libs`
4099 CURL_CFLAGS=`$CURLCONFIG --cflags`
4101 AC_MSG_RESULT([internal])
4103 BUILD_TYPE="$BUILD_TYPE CURL"
4105 AC_SUBST(SYSTEM_CURL)
4106 AC_SUBST(CURL_CFLAGS)
4109 dnl ===================================================================
4110 dnl Check for system boost
4111 dnl ===================================================================
4112 AC_MSG_CHECKING([which boost to use])
4113 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
4114 test "$with_system_boost" != "no"; then
4115 AC_MSG_RESULT([external])
4118 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
4119 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
4120 AC_CHECK_HEADER(boost/spirit/core.hpp, [],
4121 [AC_MSG_ERROR(boost/spirit/core.hpp not found. install boost)], [])
4124 AC_MSG_RESULT([internal])
4125 BUILD_TYPE="$BUILD_TYPE BOOST"
4128 AC_SUBST(SYSTEM_BOOST)
4130 dnl ===================================================================
4131 dnl Check for system vigra
4132 dnl ===================================================================
4133 AC_MSG_CHECKING([which vigra to use])
4134 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
4135 test "$with_system_vigra" != "no"; then
4136 AC_MSG_RESULT([external])
4139 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
4140 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
4143 AC_MSG_RESULT([internal])
4144 BUILD_TYPE="$BUILD_TYPE VIGRA"
4147 AC_SUBST(SYSTEM_VIGRA)
4149 dnl ===================================================================
4150 dnl Check for system odbc
4151 dnl ===================================================================
4152 AC_MSG_CHECKING([which odbc headers to use])
4153 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
4154 test "$with_system_odbc_headers" != "no"; then
4155 AC_MSG_RESULT([external])
4156 SYSTEM_ODBC_HEADERS=YES
4158 AC_CHECK_HEADER(sqlext.h, [],
4159 [AC_MSG_ERROR(odbc not found. install odbc)], [])
4161 AC_MSG_RESULT([internal])
4162 SYSTEM_ODBC_HEADERS=NO
4163 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
4165 AC_SUBST(SYSTEM_ODBC_HEADERS)
4167 AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components])
4168 if test "$enable_mozilla" = "no"; then
4172 AC_MSG_RESULT([yes])
4175 AC_SUBST(WITH_MOZILLA)
4177 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
4178 if test "$enable_mozilla" = "no"; then
4180 elif test "$with_system_mozilla" = "yes"; then
4181 AC_MSG_RESULT([no, not possible with system-mozilla])
4183 AC_MSG_RESULT([yes])
4186 AC_MSG_CHECKING([whether to build XML Security support])
4187 if test "$enable_mozilla" = "no"; then
4188 AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
4190 AC_MSG_RESULT([yes])
4193 AC_MSG_CHECKING([whether to build LDAP configuration backend])
4194 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
4195 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
4196 AC_MSG_RESULT([yes])
4199 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
4207 if test "$WITH_LDAP" = "YES"; then
4208 dnl ===================================================================
4209 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
4210 dnl ===================================================================
4211 AC_MSG_CHECKING([which LDAP SDK to use])
4212 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
4213 AC_MSG_RESULT([OpenLDAP])
4215 AC_CHECK_HEADERS(ldap.h, [],
4216 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
4217 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
4218 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4219 # rumours say that OpenLDAP doesn't have that function. I looked and
4220 # it has it. Test for it to be sure
4221 AC_CHECK_LIB(ldap, ldap_set_option, [],
4222 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4224 AC_MSG_RESULT([Netscape/Mozilla])
4225 # TODO. Actually do a sanity check and check for
4226 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
4231 AC_SUBST(WITH_OPENLDAP)
4233 dnl ===================================================================
4234 dnl Check for system mozilla
4235 dnl ===================================================================
4236 AC_MSG_CHECKING([which mozilla to use])
4237 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
4238 AC_MSG_RESULT([external])
4240 AC_MSG_CHECKING([which Mozilla flavour to use])
4241 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
4243 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
4244 MOZ_FLAVOUR=xulrunner
4245 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
4246 MOZ_FLAVOUR=seamonkey
4247 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
4249 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
4254 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
4257 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
4258 if test -z "$STANDALONENSS"; then
4259 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
4261 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
4265 if $PKG_CONFIG --exists nspr ; then
4266 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
4267 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
4270 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
4273 if test "$MOZ_FLAVOUR" != "libxul"; then
4274 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
4275 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
4276 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
4279 if test -z "$HASXPCOM"; then
4280 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
4281 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
4282 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
4283 if ! test -e "$MOZ_LIB/libxul.so"; then
4284 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
4285 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
4286 MOZ_LIB="$MOZ_LIB/sdk/lib"
4291 save_CPPFLAGS="$CPPFLAGS"
4292 save_LDFLAGS="$LDFLAGS"
4294 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
4295 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
4296 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
4297 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
4298 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
4299 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
4300 LDFLAGS="$save_LDFLAGS"
4301 CPPFLAGS="$save_CPPFLAGS"
4304 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
4305 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
4306 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
4307 if test -d "$MOZ_INC/ldap"; then
4308 AC_MSG_RESULT([yes])
4309 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
4312 Could not find LDAP header include files in $MOZ_INC/ldap.
4313 Please recompile $tmp with --enable-ldap or use --with-openldap.])
4317 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
4318 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
4319 if test "$MOZ_FLAVOUR" == "libxul"; then
4320 MOZ_FLAVOUR="mozilla"
4323 elif test "$enable_mozilla" = "no"; then
4324 AC_MSG_RESULT([none])
4327 AC_MSG_RESULT([internal])
4329 BUILD_TYPE="$BUILD_TYPE MOZ"
4330 if test -z "$with_mozilla_version"; then
4333 AC_MSG_CHECKING([which mozilla version to build])
4334 MOZILLA_VERSION=$with_mozilla_version
4335 enable_build_mozilla=1
4336 AC_MSG_RESULT([$MOZILLA_VERSION])
4339 AC_SUBST(MOZILLA_VERSION)
4341 AC_MSG_CHECKING([for toolkit mozilla should use])
4342 if test -z "$with_mozilla_toolkit"; then
4343 if test "$_os" != "WINNT" ; then
4344 if test "$_os" = "Darwin" ; then
4346 AC_MSG_RESULT([mac])
4348 MOZILLA_TOOLKIT=gtk2
4349 AC_MSG_RESULT([gtk2])
4353 MOZILLA_TOOLKIT=$with_mozilla_toolkit
4354 enable_build_mozilla=1
4355 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
4357 #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then
4358 # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not
4359 # #available using fink, mac (carbon) doesn't work because xcode installs conflicting headers
4360 # AC_MSG_ERROR([Only gtk2 toolkit supported on Mac, sorry.])
4363 AC_SUBST(MOZILLA_TOOLKIT)
4365 # default to enabling build mozilla
4366 if test "$enable_build_mozilla" != "no"; then
4367 enable_build_mozilla=yes
4369 enable_build_mozilla=
4372 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
4373 if test -n "$enable_build_mozilla"; then
4375 AC_MSG_RESULT([yes])
4381 if test "$BUILD_MOZAB" = "TRUE"; then
4382 if test "$_os" = "WINNT"; then
4383 if test "$WITH_MINGWIN" != "yes"; then
4384 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
4385 if test "$MSVSVER" != "2005"; then
4386 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
4389 AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
4390 echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
4394 if test -z "$MOZILLA_VERSION"; then
4395 MOZILLA_VERSION=1.1.13
4397 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
4399 AC_MSG_CHECKING([for $MOZILLA_SOURCE_VERSION.tar.$e])
4400 if test ! -e "moz/download/$MOZILLA_SOURCE_VERSION.tar.$e" && test "$HAVE_MOZILLA_TARBALL" != "y"; then
4401 AC_MSG_RESULT([not found])
4402 HAVE_MOZILLA_TARBALL=n
4404 AC_MSG_RESULT([found])
4405 HAVE_MOZILLA_TARBALL=y
4408 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
4409 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
4410 Please copy $MOZILLA_SOURCE_VERSION.tar.bz2 or $MOZILLA_SOURCE_VERSION.tar.gz to moz/download/.
4411 The archives can be found here:
4412 http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/$MOZILLA_VERSION/])
4414 if test "$_os" = "WINNT"; then
4415 AC_MSG_CHECKING([for moztools binaries])
4416 if test ! -e "moz/download/vc8-moztools.zip" ; then
4417 AC_MSG_ERROR([The following file is missing in moz/download: vc8-moztools.zip
4418 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
4422 elif test "$_os" = "Darwin"; then
4423 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4424 AC_MSG_NOTICE([checking whether mozilla can be built...])
4425 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]))
4427 PKG_CHECK_MODULES(MOZLIBREQ, libIDL >= 0.6.3 libIDL <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4428 if test -z "$MOZIDL"; then
4429 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4433 # Generic Unix/Linux section
4434 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4435 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
4436 if test -z "$MOZGTK"; then
4437 AC_MSG_ERROR([GTK2 is needed to build mozilla.])
4439 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
4440 if test -z "$MOZIDL"; then
4441 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.])
4444 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
4445 if test -z "$MOZGTK"; then
4446 AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.])
4448 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4449 if test -z "$MOZIDL"; then
4450 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4456 AC_SUBST(BUILD_MOZAB)
4459 AC_SUBST(SYSTEM_MOZILLA)
4460 AC_SUBST(MOZ_FLAVOUR)
4463 AC_SUBST(MOZ_LIB_XPCOM)
4464 AC_SUBST(MOZ_NSPR_CFLAGS)
4465 AC_SUBST(MOZ_NSS_CFLAGS)
4466 AC_SUBST(MOZ_LDAP_CFLAGS)
4468 dnl ===================================================================
4469 dnl Check for system sane
4470 dnl ===================================================================
4471 AC_MSG_CHECKING([which sane header to use])
4472 if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \
4473 test "$with_system_sane_header" != "no"; then
4474 AC_MSG_RESULT([external])
4475 SYSTEM_SANE_HEADER=YES
4476 AC_CHECK_HEADER(sane/sane.h, [],
4477 [AC_MSG_ERROR(sane not found. install sane)], [])
4479 AC_MSG_RESULT([internal])
4480 SYSTEM_SANE_HEADER=NO
4481 BUILD_TYPE="$BUILD_TYPE SANE"
4483 AC_SUBST(SYSTEM_SANE_HEADER)
4485 dnl ===================================================================
4486 dnl Check for system icu
4487 dnl ===================================================================
4488 AC_MSG_CHECKING([which icu to use])
4489 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
4490 test "$with_system_icu" != "no"; then
4491 AC_MSG_RESULT([external])
4494 AC_MSG_CHECKING([for unicode/rbbi.h])
4495 AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
4496 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
4497 if test -z "$SYSTEM_GENBRK"; then
4498 AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
4500 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
4501 if test -z "$SYSTEM_GENCCODE"; then
4502 AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
4504 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
4505 if test -z "$SYSTEM_GENCMN"; then
4506 AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
4508 AC_MSG_CHECKING([ICU version])
4510 #include <unicode/uversion.h>
4512 int main(int argc, char **argv) {
4513 if(U_ICU_VERSION_MAJOR_NUM < 4)
4518 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])])
4521 AC_MSG_RESULT([internal])
4523 BUILD_TYPE="$BUILD_TYPE ICU"
4525 AC_SUBST(SYSTEM_ICU)
4526 AC_SUBST(SYSTEM_GENBRK)
4527 AC_SUBST(SYSTEM_GENCCODE)
4528 AC_SUBST(SYSTEM_GENCMN)
4530 dnl ===================================================================
4531 dnl Checks for libraries.
4532 dnl ===================================================================
4533 dnl Check for Mac OS X native GUI, which may be used instead of X11.
4534 dnl Check for a lack of --with-x option on Darwin. If it is missing, look to
4535 dnl see if we have the AppKit framework for building with Quartz graphics.
4537 if test "$_os" = "Darwin" -a "x$with_x" != "xyes" -a "x$x_includes" = "xNONE" -a "x$x_libraries" = "xNONE"; then
4538 dnl System is either Mac OS X or pure Darwin, and --with-x was not specified
4539 dnl Default to Aqua graphics if available.
4540 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
4541 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
4542 AC_MSG_RESULT([yes])
4543 x_includes="no_x_includes"
4544 x_libraries="no_x_libraries"
4545 dnl disable some things used on other Unix versions but not on the aqua build
4549 AC_SUBST(ENABLE_CUPS)
4552 dnl Probably a pure Darwin system. Check for X11 below.
4556 dnl ***************************************
4557 dnl testing for X libraries and includes...
4558 dnl ***************************************
4559 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
4560 echo "Do Nothing for _os = Darwin and x_includes = no_x_includes"
4561 dnl Mac OS X using Aqua graphics. Don't check for X11.
4563 elif test "$_os" = "OS2" ; then
4564 echo "Do Nothing for _os = OS2. Don't check for X11."
4565 dnl OS/2 uses native graphics. Don't check for X11.
4567 elif test "$_os" != "WINNT" ; then
4570 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4572 if test "x$x_includes" = "x"; then
4573 x_includes="default_x_includes"
4575 if test "x$x_libraries" = "x"; then
4576 x_libraries="default_x_libraries"
4578 dnl The variables $x_libraries and $x_includes are set.
4579 if test -z "$x_libraries"; then
4580 AC_MSG_ERROR([No X libraries found]) # Exit
4582 if test -z "$x_includes"; then
4583 AC_MSG_ERROR([No X includes found]) # Exit
4586 LDFLAGS="$X_LDFLAGS $X_LIBS"
4587 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
4588 dnl Check if the XauDisposeAuth symbol is provided by libXau.
4589 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
4591 x_includes="no_x_includes"
4592 x_libraries="no_x_libraries"
4594 if test -z "$x_includes"; then
4595 x_includes="no_x_includes"
4597 if test -z "$x_libraries"; then
4598 x_libraries="no_x_libraries"
4600 if test "$x_includes" = "default_x_includes"; then
4606 if test "$x_libraries" = "default_x_libraries"; then
4607 XLIB=`$PKG_CONFIG --variable=libdir x11`
4608 if test "x$XLIB" = x; then
4617 if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then
4618 dnl ===================================================================
4619 dnl Check for using Xaw
4620 dnl ===================================================================
4621 AC_MSG_CHECKING([whether to use Xaw])
4622 if test "$enable_Xaw" = "no"; then
4625 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt include headers not found])],
4626 [#include <X11/Intrinsic.h>])
4628 AC_MSG_RESULT([yes])
4629 AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])])
4630 AC_CHECK_LIB(Xaw, main, [],
4631 [AC_MSG_ERROR(Xaw library not found or functional)], [])
4634 AC_SUBST(DISABLE_XAW)
4638 dnl ===================================================================
4639 dnl Check if fontconfig/fontconfig.h is available
4640 dnl ===================================================================
4641 if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
4642 AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
4643 [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
4644 AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
4646 #include <fontconfig/fontconfig.h>
4648 int main(int argc, char **argv) {
4649 if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
4652 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
4655 dnl ===================================================================
4656 dnl Check for system Xrender
4657 dnl ===================================================================
4658 AC_MSG_CHECKING([whether to link to Xrender])
4659 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
4660 AC_MSG_RESULT([yes])
4662 with_system_xrender_headers=yes
4664 AC_MSG_RESULT([no, dynamically open it])
4667 AC_MSG_CHECKING([which Xrender headers to use])
4668 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
4669 test "$with_system_xrender_headers" != "no"; then
4670 AC_MSG_RESULT([external])
4671 SYSTEM_XRENDER_HEADERS=YES
4672 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
4673 [AC_MSG_ERROR(Xrender not found. install X)], [])
4675 AC_MSG_RESULT([internal])
4676 SYSTEM_XRENDER_HEADERS=NO
4677 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
4679 if test "$XRENDER_LINK" = "YES"; then
4680 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
4681 [AC_MSG_ERROR(libXrender not found or functional)], [])
4683 AC_SUBST(SYSTEM_XRENDER_HEADERS)
4684 AC_SUBST(XRENDER_LINK)
4686 dnl ===================================================================
4687 dnl Check for XRandr
4688 dnl ===================================================================
4689 AC_MSG_CHECKING([whether to enable RandR support])
4690 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
4691 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
4692 XRANDR_DLOPEN="TRUE"
4693 AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
4695 XRANDR_DLOPEN="FALSE"
4696 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
4697 if test "$ENABLE_RANDR" != "TRUE"; then
4698 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
4699 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
4701 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
4702 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
4703 XRANDR_LIBS="-lXrandr "
4705 AC_MSG_RESULT([enabling RandR support])
4712 AC_SUBST(XRANDR_DLOPEN)
4713 AC_SUBST(XRANDR_CFLAGS)
4714 AC_SUBST(XRANDR_LIBS)
4715 AC_SUBST(ENABLE_RANDR)
4717 dnl ===================================================================
4718 dnl Check for system Mesa
4719 dnl ===================================================================
4720 AC_MSG_CHECKING([which Mesa headers to use])
4721 if test "$with_system_mesa_headers" == "no"; then
4722 AC_MSG_RESULT([internal])
4723 SYSTEM_MESA_HEADERS=NO
4724 BUILD_TYPE="$BUILD_TYPE MESA"
4726 AC_MSG_RESULT([external])
4727 SYSTEM_MESA_HEADERS=YES
4729 AC_SUBST(SYSTEM_MESA_HEADERS)
4731 dnl ===================================================================
4732 dnl Check for building neon
4733 dnl ===================================================================
4734 AC_MSG_CHECKING([whether to use neon])
4735 if test "$enable_neon" = "no"; then
4738 AC_SUBST(DISABLE_NEON)
4740 AC_MSG_RESULT([yes])
4741 dnl ===================================================================
4742 dnl Check for system neon
4743 dnl ===================================================================
4744 AC_MSG_CHECKING([which neon to use])
4745 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
4746 test "$with_system_neon" != "no"; then
4747 AC_MSG_RESULT([external])
4748 PKG_CHECK_MODULES(NEON, neon >= 0.24.0, , AC_MSG_ERROR([you need neon >= 0.24.x for system-neon]))
4749 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
4750 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
4753 AC_MSG_RESULT([internal])
4757 BUILD_TYPE="$BUILD_TYPE NEON"
4759 dnl ===================================================================
4760 dnl Check for system openssl (only neon needs it!)
4761 dnl ===================================================================
4762 if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
4763 with_system_openssl=yes
4765 AC_MSG_CHECKING([which libssl to use])
4766 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
4767 test "$with_system_openssl" != "no"; then
4768 AC_MSG_RESULT([external])
4769 # Mac OS builds should get out without extra stuff is the Mac porters'
4770 # wish. And pkg-config is although Xcode ships a .pc for openssl
4771 if test "$_os" = "Darwin"; then
4773 OPENSSL_LIBS="-lssl -lcrypto"
4775 PKG_CHECK_MODULES( OPENSSL, openssl )
4779 AC_MSG_RESULT([internal])
4781 BUILD_TYPE="$BUILD_TYPE OPENSSL"
4783 AC_SUBST(SYSTEM_OPENSSL)
4784 AC_SUBST(OPENSSL_CFLAGS)
4785 AC_SUBST(OPENSSL_LIBS)
4787 AC_SUBST(SYSTEM_NEON)
4788 AC_SUBST(NEON_VERSION)
4790 AC_SUBST(NEON_CFLAGS)
4793 dnl ===================================================================
4794 dnl Test for disabling agg
4795 dnl ===================================================================
4796 AC_MSG_CHECKING([whether to enable agg])
4797 if test "$with_agg" = "no"; then
4800 AC_MSG_RESULT([yes])
4802 AC_SUBST(ENABLE_AGG)
4804 dnl ===================================================================
4805 dnl Check for system AGG
4806 dnl ===================================================================
4807 AC_MSG_CHECKING([which AGG to use])
4808 if test -n "$with_system_agg" -o -n "$with_system_libs" && \
4809 test "$with_system_agg" != "no"; then
4810 AC_MSG_RESULT([external])
4811 PKG_CHECK_MODULES(AGG, libagg >= 2.3)
4812 AC_MSG_CHECKING([agg version])
4813 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
4814 # (/usr/include gets stripped from pkg-config output)
4815 if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
4816 AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
4818 AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
4820 if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
4821 $PKG_CONFIG --modversion libagg | grep -q 2.4; then
4822 # 2.4's libagg.pc.in still contains 2.3 :/
4823 if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
4824 AC_MSG_RESULT([2.4])
4827 AC_MSG_RESULT([2.3])
4832 AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
4835 AC_MSG_RESULT([internal])
4838 BUILD_TYPE="$BUILD_TYPE AGG"
4840 AC_SUBST(SYSTEM_AGG)
4841 AC_SUBST(AGG_VERSION)
4844 dnl ===================================================================
4845 dnl Check for system redland
4846 dnl ===================================================================
4847 AC_MSG_CHECKING([which redland library to use])
4848 dnl if test -n "$with_system_redland" -o -n "$with_system_libs" && \
4849 dnl test "$with_system_redland" != "no"; then
4850 dnl mst: NOTE: right now we need patches against redland
4851 dnl so we only enable system redland if explicitly requested
4852 dnl if next version includes patches, insert version check here
4853 if test -n "$with_system_redland" && \
4854 test "$with_system_redland" != "no"; then
4855 AC_MSG_RESULT([external])
4857 PKG_CHECK_MODULES(REDLAND, redland)
4859 AC_MSG_RESULT([internal])
4860 BUILD_TYPE="$BUILD_TYPE REDLAND"
4863 AC_SUBST(SYSTEM_REDLAND)
4864 AC_SUBST(REDLAND_LIBS)
4866 dnl ===================================================================
4867 dnl Check for system hunspell
4868 dnl ===================================================================
4869 AC_MSG_CHECKING([which libhunspell to use])
4870 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
4871 test "$with_system_hunspell" != "no"; then
4872 AC_MSG_RESULT([external])
4875 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
4876 if test "$HUNSPELL_PC" != "TRUE"; then
4877 AC_CHECK_HEADER(hunspell.hxx, [],
4879 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
4880 [AC_MSG_ERROR(hunspell headers not found.)], [])
4882 AC_CHECK_LIB(hunspell, main, [],
4883 [ AC_MSG_ERROR(hunspell library not found.) ], [])
4884 HUNSPELL_LIBS=-lhunspell
4888 AC_MSG_RESULT([internal])
4890 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
4892 AC_SUBST(SYSTEM_HUNSPELL)
4893 AC_SUBST(HUNSPELL_CFLAGS)
4894 AC_SUBST(HUNSPELL_LIBS)
4896 dnl ===================================================================
4897 dnl Checking for altlinuxhyph
4898 dnl ===================================================================
4899 AC_MSG_CHECKING([which altlinuxhyph to use])
4900 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
4901 test "$with_system_altlinuxhyph" != "no"; then
4902 AC_MSG_RESULT([external])
4904 AC_CHECK_HEADER(hyphen.h, [],
4905 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
4906 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
4907 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
4908 [#include <hyphen.h>])
4909 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
4910 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
4911 if test -z "$HYPHEN_LIB"; then
4912 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
4913 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
4915 if test -z "$HYPHEN_LIB"; then
4916 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
4917 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
4920 AC_MSG_RESULT([internal])
4923 AC_SUBST(SYSTEM_HYPH)
4924 AC_SUBST(HYPHEN_LIB)
4926 dnl ===================================================================
4927 dnl Checking for mythes
4928 dnl ===================================================================
4929 AC_MSG_CHECKING([which mythes to use])
4930 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
4931 AC_MSG_RESULT([external])
4933 AC_CHECK_HEADER(mythes.hxx, [],
4934 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
4935 AC_CHECK_LIB(mythes, main, [],
4936 [ AC_MSG_ERROR(mythes library not found.)], [])
4938 AC_MSG_RESULT([internal])
4941 AC_SUBST(SYSTEM_MYTHES)
4943 dnl ===================================================================
4944 dnl Checking for lpsolve
4945 dnl ===================================================================
4946 AC_MSG_CHECKING([which lpsolve to use])
4947 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
4948 test "$with_system_lpsolve" != "no"; then
4949 AC_MSG_RESULT([external])
4951 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
4952 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
4953 AC_CHECK_LIB(lpsolve55, make_lp, ,
4954 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
4956 AC_MSG_RESULT([internal])
4958 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
4960 AC_SUBST(SYSTEM_LPSOLVE)
4962 dnl ***************************************
4963 dnl testing libc version for Linux...
4964 dnl ***************************************
4965 if test "$_os" = "Linux"; then
4966 AC_MSG_CHECKING([whether libc is >= 2.1.1])
4967 exec 6>/dev/null # no output
4968 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
4969 exec 6>&1 # output on again
4970 if test "$HAVE_LIBC"; then
4971 AC_MSG_RESULT([yes])
4973 AC_MSG_ERROR([no, upgrade libc])
4977 dnl =========================================
4978 dnl Check for the Microsoft Platform SDK.
4979 dnl =========================================
4980 dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
4981 dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
4982 if test \( "$_os" = "WINNT" \) ; then
4983 AC_MSG_CHECKING([for PSDK files])
4984 if test -z "$with_psdk_home"; then
4985 # This first line will detect a February 2003 Microsoft Platform SDK
4986 PSDK_HOME=`./oowintool --psdk-home`
4987 # But there might be also an April 2005 PSDK, unfortunately MS changed
4988 # the registry entry. (we prefer the old version!?)
4989 if test -z "$PSDK_HOME"; then
4990 PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
4992 # normalize if found
4993 if test -n "$PSDK_HOME"; then
4994 PSDK_HOME=`cygpath -d "$PSDK_HOME"`
4995 PSDK_HOME=`cygpath -u "$PSDK_HOME"`
4998 PSDK_HOME=`cygpath -u "$with_psdk_home"`
5000 # Remove a possible trailing backslash
5001 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
5002 # Problem with current PSDK (iz 49865)
5003 if test -f "$PSDK_HOME/Lib/libcp.lib"; then
5006 Some modules do not build correctly with MS Platform SDK - April 2005
5007 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
5008 Remove/rename/backup that file and restart configure. Details about this
5009 problem can be found in issue 49856.])
5011 # WIndows SDK has different headers
5012 if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
5013 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
5014 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
5019 if test -f "$PSDK_HOME/lib/unicows.lib"; then
5024 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
5025 AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
5026 are installed or use --with-psdk-home .])
5028 if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
5029 -o ! -x "$PSDK_HOME/bin/msidb.exe" \
5030 -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
5031 -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
5032 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
5034 AC_MSG_RESULT([SDK files found ...)])
5035 dnl Check if this is the right SDK.
5036 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
5037 AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
5038 WINDOWS_VISTA_PSDK=TRUE
5039 elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
5040 AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
5041 WINDOWS_VISTA_PSDK=TRUE
5043 AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
5047 AC_SUBST(WINDOWS_VISTA_PSDK)
5049 dnl =========================================
5050 dnl Check for the Microsoft DirectX SDK.
5051 dnl =========================================
5052 if test \( "$_os" = "WINNT" \) ; then
5053 AC_MSG_CHECKING([for DirectX SDK files])
5054 if test -z "$with_directx_home"; then
5055 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
5056 if test -n "$DXSDK_DIR"; then
5057 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
5058 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
5060 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
5061 # the "DirectX SDK files not found" error later
5063 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
5065 # Remove a possible trailing backslash
5066 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
5068 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
5069 HAVE_DIRECTXSDK_H="yes"
5071 HAVE_DIRECTXSDK_H="no"
5073 # MS changed the location of the libraries with dec 2004 directx sdk
5074 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
5075 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
5077 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
5079 if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
5080 HAVE_DIRECTXSDK_LIB="yes"
5082 HAVE_DIRECTXSDK_LIB="no"
5084 if test -n "$ENABLE_DIRECTX"; then
5085 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
5086 AC_MSG_RESULT([found])
5088 AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
5092 AC_MSG_RESULT([disabled])
5095 AC_SUBST(DIRECTXSDK_HOME)
5096 AC_SUBST(DIRECTXSDK_LIB)
5098 dnl ============================================
5099 dnl Check for Nullsoft Scriptable Install System
5100 dnl ============================================
5102 if test "$_os" = "WINNT" ; then
5103 AC_MSG_CHECKING([for NSIS])
5104 AC_PATH_PROG(NSIS_PATH, nsis.exe)
5105 if test -n "$NSIS_PATH"; then
5106 NSIS_PATH=`dirname "$NSIS_PATH"`
5108 if test -n "$with_nsis_path"; then
5109 with_nsis_path=`cygpath -u "$with_nsis_path"`
5111 if test -e "$with_nsis_path/nsis.exe"; then
5112 NSIS_PATH="$with_nsis_path"
5114 nsistest=`./oowintool --nsis-dir`;
5115 if test -x "$nsistest/nsis.exe"; then
5116 NSIS_PATH="$nsistest"
5118 if test -z "$NSIS_PATH"; then
5119 AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
5120 echo "NSIS not found, no self contained installer will be build." >> warn
5122 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5123 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5124 AC_MSG_RESULT([found ($NSIS_PATH)])
5129 dnl ***************************************
5130 dnl testing bison and flex exist
5131 dnl ***************************************
5132 AC_PATH_PROG(BISON, bison)
5133 if test -z "$BISON"; then
5134 AC_MSG_ERROR([no bison found in \$PATH, install bison])
5136 AC_MSG_CHECKING([the bison version])
5137 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
5138 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
5139 # Accept newer than 1.875 or older(equal) than 1.75
5140 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
5141 if test "$_bison_version" = "1.875" ; then
5142 AC_MSG_WARN([suspect ($BISON $_bison_version)])
5143 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
5145 AC_MSG_RESULT([checked ($BISON $_bison_version)])
5148 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
5151 AC_PATH_PROG(FLEX, flex)
5152 if test -z "$FLEX"; then
5153 AC_MSG_ERROR([no flex found in \$PATH, install flex])
5155 dnl ***************************************
5156 dnl testing that patch exists
5157 dnl ***************************************
5158 AC_PATH_PROG(PATCH, patch)
5159 if test -z "$PATCH"; then
5160 AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
5163 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
5164 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
5165 if test -z "$with_gnu_patch"; then
5168 if test -x "$with_gnu_patch"; then
5169 GNUPATCH=$with_gnu_patch
5171 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
5175 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
5176 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5177 AC_MSG_RESULT([yes])
5179 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
5182 dnl We also need to check for --with-gnu-cp
5184 if test -z "$with_gnu_cp"; then
5185 AC_PATH_PROGS(GNUCP, gnucp cp)
5186 if test -z $GNUCP; then
5187 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
5190 if test -x "$with_gnu_cp"; then
5193 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
5197 AC_MSG_CHECKING([whether $GNUCP is GNU cp])
5198 if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5199 AC_MSG_RESULT([yes])
5201 if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
5202 AC_MSG_RESULT([yes])
5204 if test "$_os" = "Darwin"; then
5206 AC_MSG_RESULT([no gnucp found - using the system's cp command])
5208 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
5217 dnl ***************************************
5218 dnl testing bash tools path on Windows
5219 dnl ***************************************
5220 if test "$_os" = "WINNT"; then
5222 AC_PATH_PROG(CYGWIN_PATH, bash)
5223 CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
5225 if test -z "$CYGWIN_PATH"; then
5226 CYGWIN_PATH="NO_CYGWIN"
5228 AC_SUBST(CYGWIN_PATH)
5230 dnl ***************************************
5231 dnl testing ml.exe assembler path
5232 dnl ***************************************
5233 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5234 AC_MSG_CHECKING([ml.exe assembler path])
5235 if test -n "$with_asm_home"; then
5236 with_asm_home=`cygpath -u "$with_asm_home"`
5238 if test ! -x "$with_asm_home/ml.exe"; then
5239 AC_PATH_PROG(ML_EXE, ml.exe)
5240 if test -z "$ML_EXE"; then
5241 if test -x "$with_cl_home/bin/ml.exe"; then
5242 with_asm_home=$with_cl_home/bin
5243 AC_MSG_RESULT([found ($with_asm_home)])
5245 AC_MSG_ERROR([Configure did not find ml.exe assembler.])
5248 with_asm_home="ASM_IN_PATH"
5252 with_asm_home="NO_ASM_HOME"
5254 ASM_HOME="$with_asm_home"
5255 if test -n "$ASM_HOME"; then
5256 AC_MSG_RESULT([$ASM_HOME])
5260 dnl ===================================================================
5261 dnl testing handle deprecated unzip switch
5262 dnl ===================================================================
5263 if test -z "$with_zip_home"; then
5264 with_zip_home="$with_unzip_home"
5266 dnl ===================================================================
5267 dnl Zip will be found where you tell me to find it
5268 dnl ===================================================================
5269 if test -n "$with_zip_home" ; then
5270 if test "$_os" = "WINNT"; then
5271 with_zip_home=`cygpath -u "$with_zip_home"`
5273 ZIP="$with_zip_home/zip"
5274 UNZIP="$with_zip_home/unzip"
5275 ZIP_HOME="$with_zip_home"
5277 AC_PATH_PROG(ZIP, zip)
5278 AC_PATH_PROG(UNZIP, unzip)
5279 ZIP_HOME=`dirname "$ZIP"`
5281 dnl ===================================================================
5282 dnl Zip must be available or else it is an error, all platforms
5283 dnl ===================================================================
5284 if test -z "$ZIP" -o -z "$UNZIP"; then
5285 AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
5288 dnl ===================================================================
5289 dnl Zip must be a specific type for different build types.
5290 dnl ===================================================================
5291 if test "$_os" = "WINNT"; then
5292 if test "$with_use_shell" = "4nt" ; then
5293 if test -z "`$ZIP -h | grep -i WinNT`" ; then
5294 AC_MSG_ERROR([$ZIP found in the path is not the required native Windows Version 2.3 of Info-ZIPs zip.exe.
5295 Probably there is a cygwin version in the path.])
5298 if test -n "`$ZIP -h | grep -i WinNT`" ; then
5299 AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
5305 dnl ===================================================================
5306 dnl Windows builds need unicows.dll in external/unicows/
5307 dnl ===================================================================
5308 if test "$_os" = "WINNT"; then
5309 AC_MSG_CHECKING([for unicows.dll])
5310 if test -x ./external/unicows/unicows.dll; then
5311 AC_MSG_RESULT([found])
5313 AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
5314 Get it from the Microsoft site and put it into external/unicows.
5315 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5316 may have to search Microsoft's website.) Last time it was seen at:
5317 <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
5321 dnl ===================================================================
5322 dnl Windows builds need dbghelp.dll in external/dbghelp/
5323 dnl ===================================================================
5324 if test "$_os" = "WINNT"; then
5325 AC_MSG_CHECKING([for dbghelp.dll])
5326 if test -x ./external/dbghelp/dbghelp.dll; then
5327 AC_MSG_RESULT([found])
5329 AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
5330 Get it from the Microsoft site and put it into external/dbghelp.
5331 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5332 may have to search Microsoft's website.) Last time it was seen at:
5333 <http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
5337 dnl ===================================================================
5338 dnl Windows builds - use oowintool to copy CRT dlls and manifest
5339 dnl ===================================================================
5340 if test "$_os" = "WINNT"; then
5341 if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
5344 AC_MSG_ERROR([oowintool failed to copy CRT])
5348 dnl ===================================================================
5349 dnl Windows builds need gdiplus.dll in external/gdiplus/
5350 dnl ===================================================================
5351 if test "$_os" = "WINNT"; then
5352 AC_MSG_CHECKING([for gdiplus.dll])
5353 if test -x ./external/gdiplus/gdiplus.dll; then
5354 AC_MSG_RESULT([found])
5356 AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
5357 Get it from the Microsoft site and put it into external/gdiplus.
5358 You may have to search Microsoft's website. Last time it was seen at:
5359 <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
5363 dnl ===================================================================
5364 dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
5365 dnl ===================================================================
5366 if test "$_os" = "WINNT"; then
5367 ./oowintool --msvc-copy-instmsi ./external/msi
5370 dnl ===================================================================
5371 dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
5372 dnl ===================================================================
5373 if test "$_os" = "WINNT"; then
5374 if test "$COMEX" -ge "10"; then
5375 AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
5376 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
5377 AC_MSG_RESULT([found])
5379 MSIAPATH=`/bin/find "$COMPATH/../.." -iname instmsia.exe | head -n 1`
5380 MSIWPATH=`/bin/find "$COMPATH/../.." -iname instmsiw.exe | head -n 1`
5381 if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
5382 cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
5383 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
5385 if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
5386 AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
5387 These programs are part of the Visual Studio installation and should be found in a
5388 directory similar to:
5389 "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
5390 As the automatic detection fails please copy the files to external/msi/.])
5392 AC_MSG_RESULT([found and copied])
5398 dnl ===================================================================
5399 dnl Test for the presence of the right polygon clipping code
5400 dnl ===================================================================
5401 AC_MSG_CHECKING([which polygon clipping code to use])
5404 if test "$with_gpc" != "no" && test "$without_gpc" != "yes"; then
5406 AC_MSG_RESULT([GPC])
5408 AC_MSG_CHECKING([for GPC files])
5409 if test -f ./external/gpc/gpc.h; then
5414 if test -f ./external/gpc/gpc.c; then
5420 if test "$HAVE_GPC_H" = "yes" -a "$HAVE_GPC_C" = "yes"; then
5421 AC_MSG_RESULT([GPC files found])
5423 AC_MSG_ERROR([GPC files not found
5424 ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc,
5425 or use basegfx' implementation using --without-gpc])
5428 AC_MSG_RESULT([internal])
5432 dnl ===================================================================
5433 dnl Test which vclplugs have to be built.
5434 dnl ===================================================================
5435 AC_MSG_CHECKING([which VCLplugs shall be built])
5437 if test "x$enable_gtk" = "xyes"; then
5441 AC_SUBST(ENABLE_GTK)
5444 if test "x$enable_kde" = "xyes"; then
5448 AC_SUBST(ENABLE_KDE)
5450 if test -z "$R"; then
5451 AC_MSG_RESULT([none])
5456 dnl ===================================================================
5458 dnl ===================================================================
5461 AC_MSG_CHECKING([whether to enable GConf support])
5462 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
5464 AC_MSG_RESULT([yes])
5465 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5469 AC_SUBST(ENABLE_GCONF)
5471 dnl ===================================================================
5473 dnl ===================================================================
5476 GNOMEVFS_HAS_LOCKING=""
5477 AC_MSG_CHECKING([whether to enable GNOME VFS support])
5478 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
5479 ENABLE_GNOMEVFS="TRUE"
5480 AC_MSG_RESULT([yes])
5481 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
5482 if test "$ENABLE_GCONF" != "TRUE"; then
5483 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5488 save_CXXFLAGS=$CXXFLAGS
5489 CXXFLAGS="$CXXFLAGS $GNOMEVFS_CFLAGS"
5490 AC_CHECK_DECL(GNOME_VFS_OPEN_LOCKED,
5491 GNOMEVFS_HAS_LOCKING="YES",,
5492 [#include <libgnomevfs/gnome-vfs-handle.h>])
5493 CXXFLAGS=$save_CXXFLAGS
5498 AC_SUBST(ENABLE_GNOMEVFS)
5499 AC_SUBST(GNOMEVFS_HAS_LOCKING)
5501 dnl ===================================================================
5502 dnl Check whether the gtk 2.0 libraries are available.
5503 dnl ===================================================================
5507 ENABLE_SYSTRAY_GTK=""
5509 if test "$test_gtk" = "yes"; then
5511 if test "$ENABLE_GTK" = "TRUE" ; then
5512 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]))
5513 PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.10)
5514 if test "x$enable_cairo" == "xno" ; then
5515 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5517 BUILD_TYPE="$BUILD_TYPE GTK"
5519 if test "x$enable_systray" = "xyes"; then
5520 ENABLE_SYSTRAY_GTK="TRUE"
5521 BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
5524 AC_MSG_CHECKING([whether to enable DBUS support])
5525 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
5527 AC_MSG_RESULT([yes])
5528 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
5533 AC_MSG_CHECKING([whether to enable GIO support])
5534 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
5535 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
5536 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
5539 AC_MSG_RESULT([yes])
5540 PKG_CHECK_MODULES( GIO, gio-2.0 )
5548 AC_SUBST(ENABLE_GIO)
5549 AC_SUBST(ENABLE_DBUS)
5550 AC_SUBST(ENABLE_SYSTRAY_GTK)
5551 AC_SUBST(GTK_CFLAGS)
5554 dnl ===================================================================
5555 dnl Check whether the Cairo libraries are available.
5556 dnl ===================================================================
5562 if test "$test_cairo" = "yes"; then
5564 AC_MSG_CHECKING([whether to use cairo])
5565 if test "x$enable_cairo" != "xno" ; then
5567 AC_MSG_RESULT([yes])
5568 AC_MSG_CHECKING([which cairo to use])
5569 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
5570 test "$with_system_cairo" != "no"; then
5571 AC_MSG_RESULT([external])
5574 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5575 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
5576 AC_MSG_ERROR([Cairo library requires fontconfig.])
5578 if test "$with_system_xrender_headers" = "yes"; then
5579 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
5581 #include <X11/extensions/Xrender.h>
5583 int main(int argc, char **argv) {
5584 #ifdef PictStandardA8
5590 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
5593 BUILD_TYPE="$BUILD_TYPE CAIRO"
5595 AC_MSG_RESULT([internal])
5602 AC_SUBST(ENABLE_CAIRO)
5603 AC_SUBST(BUILD_PIXMAN)
5604 AC_SUBST(SYSTEM_CAIRO)
5605 AC_SUBST(CAIRO_CFLAGS)
5606 AC_SUBST(CAIRO_LIBS)
5608 dnl ===================================================================
5609 dnl Check whether the GStreamer libraries are available.
5610 dnl ===================================================================
5614 if test "$build_gstreamer" = "yes"; then
5616 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
5617 if test "x$enable_gstreamer" != "xno" ; then
5618 ENABLE_GSTREAMER="TRUE"
5619 AC_MSG_RESULT([yes])
5620 PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
5626 AC_SUBST(ENABLE_GSTREAMER)
5628 dnl ===================================================================
5629 dnl Check whether the OpenGL libraries are available
5630 dnl ===================================================================
5632 AC_MSG_CHECKING([whether to build the OGLTrans extension])
5635 if test "x$enable_opengl" != "xno" ; then
5636 AC_MSG_RESULT([yes])
5637 AC_CHECK_HEADER(GL/gl.h, [],
5638 [AC_MSG_ERROR([OpenGL headers not found])], [])
5639 AC_CHECK_LIB(GL, main, [],
5640 [AC_MSG_ERROR(libGL not installed or functional)], [])
5641 AC_CHECK_LIB(GLU, main, [],
5642 [AC_MSG_ERROR(libGLU not installed or functional)], [])
5648 AC_SUBST(ENABLE_OPENGL)
5650 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
5651 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
5652 AC_MSG_RESULT([yes])
5653 ENABLE_MINIMIZER=YES
5658 AC_SUBST(ENABLE_MINIMIZER)
5660 AC_MSG_CHECKING([whether to build the Presenter Screen extension])
5661 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
5662 AC_MSG_RESULT([yes])
5663 ENABLE_PRESENTER_SCREEN=YES
5666 ENABLE_PRESENTER_SCREEN=NO
5668 AC_SUBST(ENABLE_PRESENTER_SCREEN)
5670 AC_MSG_CHECKING([whether to build the PDF Import extension])
5671 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
5672 AC_MSG_RESULT([yes])
5673 ENABLE_PDFIMPORT=YES
5675 dnl ===================================================================
5676 dnl Check for system poppler
5677 dnl ===================================================================
5678 AC_MSG_CHECKING([which pdf backend to use])
5679 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
5680 test "$with_system_poppler" != "no"; then
5681 AC_MSG_RESULT([external])
5683 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
5685 AC_MSG_RESULT([internal])
5687 BUILD_TYPE="$BUILD_TYPE XPDF"
5688 AC_MSG_CHECKING([for xpdf module])
5689 if test -d ./xpdf; then
5692 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5699 AC_SUBST(ENABLE_PDFIMPORT)
5700 AC_SUBST(SYSTEM_POPPLER)
5701 AC_SUBST(POPPLER_CFLAGS)
5702 AC_SUBST(POPPLER_LIBS)
5704 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
5705 AC_MSG_CHECKING([for sdext module])
5706 if test -d ./sdext; then
5709 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5711 BUILD_TYPE="$BUILD_TYPE SDEXT"
5714 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
5715 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
5716 AC_MSG_RESULT([yes])
5717 AC_MSG_CHECKING([for swext module])
5718 if test -d ./swext; then
5721 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5723 ENABLE_MEDIAWIKI=YES
5724 BUILD_TYPE="$BUILD_TYPE SWEXT"
5729 AC_SUBST(ENABLE_MEDIAWIKI)
5731 if test "$ENABLE_MEDIAWIKI" == "YES"; then
5732 AC_MSG_CHECKING([which Servlet API Jar to use])
5733 if test -n "$with_system_servlet_api"; then
5734 AC_MSG_RESULT([external])
5735 SYSTEM_SERVLETAPI=YES
5736 if test -z "$SERVLETAPI_JAR"; then
5737 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
5739 AC_CHECK_FILE($SERVLETAPI_JAR, [],
5740 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
5742 AC_MSG_RESULT([internal])
5743 SYSTEM_SERVLETAPI=NO
5744 BUILD_TYPE="$BUILD_TYPE TOMCAT"
5747 AC_SUBST(SYSTEM_SERVLETAPI)
5748 AC_SUBST(SERVLETAPI_JAR)
5750 AC_MSG_CHECKING([whether to build the Report Builder extension])
5751 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
5752 AC_MSG_RESULT([yes])
5753 ENABLE_REPORTBUILDER=YES
5754 AC_MSG_CHECKING([for reportbuilder module])
5755 if test -d ./reportbuilder; then
5758 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5760 AC_MSG_CHECKING([which jfreereport libs to use])
5761 if test "$with_system_jfreereport" == "yes"; then
5762 SYSTEM_JFREEREPORT=YES
5763 AC_MSG_RESULT([external])
5764 if test -z $SAC_JAR; then
5765 SAC_JAR=/usr/share/java/sac.jar
5767 AC_CHECK_FILE($SAC_JAR, [],
5768 [AC_MSG_ERROR(sac.jar not found.)], [])
5770 if test -z $LIBXML_JAR; then
5771 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
5772 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
5774 AC_CHECK_FILE(/usr/share/java/libxml.jar,
5775 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
5776 [AC_MSG_ERROR(libxml.jar replacement not found.)]
5781 AC_CHECK_FILE($LIBXML_JAR, [],
5782 [AC_MSG_ERROR(libxml.jar not found.)], [])
5785 if test -z $FLUTE_JAR; then
5786 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
5787 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
5789 AC_CHECK_FILE(/usr/share/java/flute.jar,
5790 [ FLUTE_JAR=/usr/share/java/flute.jar ],
5791 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
5796 AC_CHECK_FILE($FLUTE_JAR, [],
5797 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
5800 if test -z $JFREEREPORT_JAR; then
5801 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
5802 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
5804 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
5805 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
5806 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
5811 AC_CHECK_FILE($JFREEREPORT_JAR, [],
5812 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
5815 if test -z $LIBLAYOUT_JAR; then
5816 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
5817 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
5819 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
5820 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
5821 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
5826 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
5827 [AC_MSG_ERROR(liblayout.jar not found.)], [])
5830 if test -z $LIBLOADER_JAR; then
5831 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
5832 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
5834 AC_CHECK_FILE(/usr/share/java/libloader.jar,
5835 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
5836 [AC_MSG_ERROR(libloader.jar replacement not found.)]
5841 AC_CHECK_FILE($LIBLOADER_JAR, [],
5842 [AC_MSG_ERROR(libloader.jar not found.)], [])
5845 if test -z $LIBFORMULA_JAR; then
5846 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
5847 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
5849 AC_CHECK_FILE(/usr/share/java/libformula.jar,
5850 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
5851 [AC_MSG_ERROR(libformula.jar replacement not found.)]
5856 AC_CHECK_FILE($LIBFORMULA_JAR, [],
5857 [AC_MSG_ERROR(libformula.jar not found.)], [])
5860 if test -z $LIBREPOSITORY_JAR; then
5861 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
5862 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
5864 AC_CHECK_FILE(/usr/share/java/librepository.jar,
5865 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
5866 [AC_MSG_ERROR(librepository.jar replacement not found.)]
5871 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
5872 [AC_MSG_ERROR(librepository.jar not found.)], [])
5875 if test -z $LIBFONTS_JAR; then
5876 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
5877 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
5879 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
5880 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
5881 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
5886 AC_CHECK_FILE($LIBFONTS_JAR, [],
5887 [AC_MSG_ERROR(libfonts.jar not found.)], [])
5890 if test -z $LIBSERIALIZER_JAR; then
5891 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
5892 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
5894 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
5895 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
5896 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
5901 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
5902 [AC_MSG_ERROR(libserializer.jar not found.)], [])
5906 if test -z $LIBBASE_JAR; then
5907 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
5908 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
5910 AC_CHECK_FILE(/usr/share/java/libbase.jar,
5911 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
5912 [AC_MSG_ERROR(libbase.jar replacement not found.)]
5917 AC_CHECK_FILE($LIBBASE_JAR, [],
5918 [AC_MSG_ERROR(libbase.jar not found.)], [])
5922 AC_MSG_RESULT([internal])
5923 AC_MSG_CHECKING([for jfreereport module])
5924 if test -d ./jfreereport; then
5927 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5929 SYSTEM_JFREEREPORT=NO
5930 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
5932 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
5935 ENABLE_REPORTBUILDER=NO
5936 SYSTEM_JFREEREPORT=NO
5938 AC_SUBST(ENABLE_REPORTBUILDER)
5939 AC_SUBST(SYSTEM_JFREEREPORT)
5941 AC_SUBST(LIBXML_JAR)
5943 AC_SUBST(JFREEREPORT_JAR)
5944 AC_SUBST(LIBBASE_JAR)
5945 AC_SUBST(LIBLAYOUT_JAR)
5946 AC_SUBST(LIBLOADER_JAR)
5947 AC_SUBST(LIBFORMULA_JAR)
5948 AC_SUBST(LIBREPOSITORY_JAR)
5949 AC_SUBST(LIBFONTS_JAR)
5950 AC_SUBST(LIBSERIALIZER_JAR)
5952 # this has to be here because both the wiki publisher and the SRB use
5954 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
5955 AC_MSG_CHECKING([which Apache commons-* libs to use])
5956 if test "$with_system_apache_commons" = "yes"; then
5957 SYSTEM_APACHE_COMMONS=YES
5958 AC_MSG_RESULT([external])
5959 if test "$ENABLE_MEDIAWIKI" = "YES"; then
5960 if test -z "$COMMONS_CODEC_JAR"; then
5961 COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar
5963 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
5964 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
5965 if test -z "$COMMONS_LANG_JAR"; then
5966 COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar
5968 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
5969 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
5970 if test -z "$COMMONS_HTTPCLIENT_JAR"; then
5971 COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar
5973 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
5974 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
5976 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
5977 if test -z "$COMMONS_LOGGING_JAR"; then
5978 COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar
5980 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
5981 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
5985 AC_MSG_RESULT([internal])
5986 SYSTEM_APACHE_COMMONS=NO
5987 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
5990 AC_SUBST(SYSTEM_APACHE_COMMONS)
5991 AC_SUBST(COMMONS_CODEC_JAR)
5992 AC_SUBST(COMMONS_LANG_JAR)
5993 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
5994 AC_SUBST(COMMONS_LOGGING_JAR)
5996 dnl ===================================================================
5997 dnl Check whether the Qt and KDE libraries are available.
5998 dnl ===================================================================
6003 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
6004 dnl Search paths for Qt and KDE
6005 if test "$build_cpu" != "x86_64" ; then
6006 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"
6007 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"
6009 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"
6010 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"
6012 if test -n "$QTDIR" ; then
6013 qt_incdirs="$QTDIR/include $qt_incdirs"
6014 if test "$build_cpu" != "x86_64" ; then
6015 qt_libdirs="$QTDIR/lib $qt_libdirs"
6017 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
6020 if test "$build_cpu" != "x86_64" ; then
6021 kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes"
6022 kde_libdirs="/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 $x_libraries"
6024 kde_incdirs="/usr/lib64/kde/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes"
6025 kde_libdirs="/usr/lib64/kde/lib64 /usr/local/kde/lib64 /usr/kde/lib64 /usr/lib64/kde /usr/lib64/kde3 /usr/lib64 /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 $x_libraries"
6027 if test -n "$KDEDIR" ; then
6028 kde_incdirs="$KDEDIR/include $kde_incdirs"
6029 if test "$build_cpu" != "x86_64" ; then
6030 kde_libdirs="$KDEDIR/lib $kde_libdirs"
6032 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
6037 qt_test_include="qstyle.h"
6038 qt_test_library="libqt-mt.so"
6039 kde_test_include="ksharedptr.h"
6040 kde_test_library="libkdeui.so"
6042 dnl Check for Qt headers
6043 AC_MSG_CHECKING([for Qt headers])
6045 for kde_check in $qt_incdirs ; do
6046 if test -r "$kde_check/$qt_test_include" ; then
6047 qt_incdir="$kde_check"
6051 AC_MSG_RESULT([$qt_incdir])
6052 if test "x$qt_incdir" = "xno" ; then
6053 AC_MSG_ERROR([Qt headers not found. Please specify the root of
6054 your Qt installation by exporting QTDIR before running "configure".])
6057 dnl Check for Qt libraries
6058 AC_MSG_CHECKING([for Qt libraries])
6060 for qt_check in $qt_libdirs ; do
6061 if test -r "$qt_check/$qt_test_library" ; then
6062 qt_libdir="$qt_check"
6066 AC_MSG_RESULT([$qt_libdir])
6067 if test "x$qt_libdir" = "xno" ; then
6068 AC_MSG_ERROR([Qt libraries not found. Please specify the root of
6069 your Qt installation by exporting QTDIR before running "configure".])
6072 AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
6073 if test "$MOC" = "no" ; then
6074 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6075 the root of your Qt installation by exporting QTDIR before running "configure".])
6078 dnl Check for KDE headers
6079 AC_MSG_CHECKING([for KDE headers])
6081 for kde_check in $kde_incdirs ; do
6082 if test -r "$kde_check/$kde_test_include" ; then
6083 kde_incdir="$kde_check"
6087 AC_MSG_RESULT([$kde_incdir])
6088 if test "x$kde_incdir" = "xno" ; then
6089 AC_MSG_ERROR([KDE headers not found. Please specify the root of
6090 your KDE installation by exporting KDEDIR before running "configure".])
6093 dnl Check for KDE libraries
6094 AC_MSG_CHECKING([for KDE libraries])
6096 for kde_check in $kde_libdirs ; do
6097 if test -r "$kde_check/$kde_test_library" ; then
6098 kde_libdir="$kde_check"
6102 AC_MSG_RESULT([$kde_libdir])
6103 if test "x$kde_libdir" = "xno" ; then
6104 AC_MSG_ERROR([KDE libraries not found. Please specify the root of
6105 your KDE installation by exporting KDEDIR before running "configure".])
6108 dnl Set the variables
6109 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6110 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
6112 AC_SUBST(KDE_CFLAGS)
6116 dnl ===================================================================
6117 dnl Test for the enabling the lockdown pieces
6118 dnl ===================================================================
6119 AC_MSG_CHECKING([whether to enable the lockdown pieces])
6121 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
6123 AC_MSG_RESULT([yes])
6127 AC_SUBST(ENABLE_LOCKDOWN)
6129 dnl ===================================================================
6130 dnl Test whether to include Evolution 2 support
6131 dnl ===================================================================
6132 AC_MSG_CHECKING([whether to enable evolution 2 support])
6133 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
6134 AC_MSG_RESULT([yes])
6135 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
6136 ENABLE_EVOAB2="TRUE"
6141 AC_SUBST(ENABLE_EVOAB2)
6142 AC_SUBST(GOBJECT_CFLAGS)
6143 AC_SUBST(GOBJECT_LIBS)
6145 dnl ===================================================================
6146 dnl Test whether to include KDE AB support
6147 dnl ===================================================================
6148 AC_MSG_CHECKING([whether to enable KDE address book support])
6149 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
6150 AC_MSG_RESULT([yes])
6152 save_CXXFLAGS=$CXXFLAGS
6153 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
6154 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
6156 #include <kdeversion.h>
6158 int main(int argc, char **argv) {
6159 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
6162 ], [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])])
6163 CXXFLAGS=$save_CXXFLAGS
6170 AC_SUBST(ENABLE_KAB)
6172 dnl ===================================================================
6173 dnl Test whether to include FontOOo
6174 dnl ===================================================================
6175 AC_MSG_CHECKING([whether to include FontOOo])
6176 if test -n "$enable_fontooo"; then
6177 if test "$enable_fontooo" = "no"; then
6180 SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
6182 AC_MSG_RESULT([yes])
6184 BUILD_TYPE="$BUILD_TYPE MSFONTEXTRACT"
6189 SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
6191 AC_SUBST(WITH_FONTOOO)
6193 if test "$WITH_FONTOOO" = "YES"; then
6194 dnl ===============================================================
6195 dnl Check whether to use libmspack from system
6196 dnl ===============================================================
6197 AC_MSG_CHECKING([whether to use system libmspack])
6198 if test -n "$with_system_mspack" -o -n "$with_system_libs" && \
6199 test "$with_system_mspack" != "no"; then
6200 AC_MSG_RESULT([yes])
6202 AC_CHECK_HEADER(mspack.h, [],
6203 [AC_MSG_ERROR([mspack.h not found, install libmspack])], [])
6204 AC_CHECK_LIB(mspack, mspack_create_cab_decompressor, [],
6205 [AC_MSG_ERROR(libmspack not installed or functional)], [])
6211 AC_SUBST(SYSTEM_MSPACK)
6213 dnl ===================================================================
6214 dnl Test whether to include MathMLDTD
6215 dnl ===================================================================
6216 AC_MSG_CHECKING([whether to include MathMLDTD])
6217 if test -n "$enable_mathmldtd"; then
6218 if test "$enable_mathmldtd" = "no"; then
6220 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6222 AC_MSG_RESULT([yes])
6223 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
6227 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6230 dnl ===================================================================
6231 dnl Test whether to include fonts
6232 dnl ===================================================================
6233 AC_MSG_CHECKING([whether to include Bitstream Vera fonts])
6234 if test "$with_fonts" != "no" ; then
6235 AC_MSG_RESULT([yes])
6237 BUILD_TYPE="$BUILD_TYPE BITSTREAM_VERA_FONTS"
6241 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
6243 AC_SUBST(WITH_FONTS)
6245 AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
6246 if test "$with_agfa_monotype_fonts" != "no" -a -e ../agfa_monotype_fonts/download/agfa-monotype-fonts.tar.gz; then
6247 AC_MSG_RESULT([yes])
6248 WITH_AGFA_MONOTYPE_FONTS=YES
6249 SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
6250 BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
6253 WITH_AGFA_MONOTYPE_FONTS=NO
6255 AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
6257 dnl ===================================================================
6258 dnl Test whether to include ppds
6259 dnl ===================================================================
6260 AC_MSG_CHECKING([whether to include PPDs])
6261 if test "$with_ppds" != "no"; then
6262 AC_MSG_RESULT([yes])
6266 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
6268 AC_SUBST(WITHOUT_PPDS)
6270 dnl ===================================================================
6271 dnl Test whether to include afms
6272 dnl ===================================================================
6273 AC_MSG_CHECKING([whether to include AFMs])
6274 if test "$with_afms" != "no"; then
6275 AC_MSG_RESULT([yes])
6279 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
6281 AC_SUBST(WITHOUT_AFMS)
6285 AC_MSG_CHECKING([whether and how to use Xinerama])
6286 if test "$_os" = "Darwin"; then
6288 XINERAMA_LINK=dynamic
6289 AC_MSG_RESULT([yes])
6290 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
6291 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
6292 # we have both versions, let the user decide but use the dynamic one
6295 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
6296 XINERAMA_LINK=dynamic
6298 XINERAMA_LINK=static
6300 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
6301 # we have only the dynamic version
6303 XINERAMA_LINK=dynamic
6304 elif test -e "$XLIB/libXinerama.a"; then
6306 if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6308 XINERAMA_LINK=static
6318 if test "$USE_XINERAMA" = "YES"; then
6319 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
6320 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
6321 [AC_MSG_ERROR(Xinerama header not found.)], [])
6322 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
6323 if test "$_os" = "FreeBSD"; then
6324 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
6326 if test "$_os" = "Linux"; then
6327 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
6329 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
6330 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
6332 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
6337 AC_SUBST(USE_XINERAMA)
6338 AC_SUBST(XINERAMA_LINK)
6340 dnl ===================================================================
6341 dnl Test for the presence of Ant and that it works
6342 dnl ===================================================================
6344 if test "$SOLAR_JAVA" != ""; then
6345 ANT_HOME=; export ANT_HOME
6346 WITH_ANT_HOME=; export WITH_ANT_HOME
6347 if test -z "$with_ant_home"; then
6348 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
6350 if test "$_os" = "WINNT"; then
6351 with_ant_home=`cygpath -u "$with_ant_home"`
6353 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
6354 WITH_ANT_HOME=$with_ant_home
6355 ANT_HOME=$with_ant_home
6358 if test -z "$ANT"; then
6359 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
6361 # resolve relative or absolute symlink
6362 while test -h "$ANT"; do
6364 a_basename=`basename "$ANT"`
6365 a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
6366 cd "`dirname "$ANT"`"
6367 cd "`dirname "$a_script"`"
6368 ANT="`pwd`"/"`basename "$a_script"`"
6372 if test "$_os" = "OS2"; then
6373 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6378 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
6380 AC_MSG_CHECKING([whether ant is >= $ant_minver])
6381 ant_version=`$ANT -version | $AWK '{ print $4; }'`
6382 ant_version_major=`echo $ant_version | cut -d. -f1`
6383 ant_version_minor=`echo $ant_version | cut -d. -f2`
6384 echo "configure: ant_version $ant_version " >&5
6385 echo "configure: ant_version_major $ant_version_major " >&5
6386 echo "configure: ant_version_minor $ant_version_minor " >&5
6387 if test "$ant_version_major" -ge "2"; then
6388 AC_MSG_RESULT([yes, $ant_version])
6389 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
6390 AC_MSG_RESULT([yes, $ant_version])
6392 AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
6394 AC_MSG_CHECKING([if $ANT works])
6395 cat > conftest.java << EOF
6396 public class conftest {
6397 int testmethod(int a, int b) {
6403 cat > conftest.xml << EOF
6404 <project name="conftest" default="conftest">
6405 <target name="conftest">
6406 <javac srcdir="." includes="conftest.java">
6411 oldJAVA_HOME=$JAVA_HOME
6412 if test "$JAVACISGCJ" = "yes"; then
6413 JAVA_HOME=; export JAVA_HOME
6414 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6416 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6418 AC_TRY_EVAL(ant_cmd)
6419 if test $? = 0 && test -f ./conftest.class ; then
6420 AC_MSG_RESULT([Ant works])
6421 if test -z "$WITH_ANT_HOME"; then
6422 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
6423 if test -z "$ANT_HOME"; then
6424 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6427 ANT_HOME="$WITH_ANT_HOME"
6430 echo "configure: Ant test failed" >&5
6431 cat conftest.java >&5
6432 cat conftest.xml >&5
6433 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
6435 echo "Ant does not work - Some Java projects will not build!" >>warn
6437 JAVA_HOME=$oldJAVA_HOME
6438 rm -f conftest* core core.* *.core
6440 if test -z "$ANT_HOME"; then
6441 ANT_HOME="NO_ANT_HOME"
6445 dnl Checking for ant.jar
6446 if test "$ANT_HOME" != "NO_ANT_HOME"; then
6447 AC_MSG_CHECKING([Ant lib directory])
6448 if test -f $ANT_HOME/lib/ant.jar; then
6449 ANT_LIB="$ANT_HOME/lib"
6451 if test -f $ANT_HOME/ant.jar; then
6454 if test -f /usr/share/java/ant.jar; then
6455 ANT_LIB=/usr/share/java
6457 if test -f /usr/share/ant-core/lib/ant.jar; then
6458 ANT_LIB=/usr/share/ant-core/lib
6460 if test -f $ANT_HOME/lib/ant/ant.jar; then
6461 ANT_LIB="$ANT_HOME/lib/ant"
6463 AC_MSG_ERROR([Ant libraries not found!])
6469 AC_MSG_RESULT([Ant lib directory found.])
6474 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6475 AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
6478 cat > conftest.java << EOF
6479 public class conftest {
6480 int testmethod(int a, int b) {
6486 cat > conftest.xml << EOF
6487 <project name="conftest" default="conftest">
6488 <target name="conftest" depends="copytest">
6489 <javac srcdir="." includes="conftest.java">
6492 <target name="copytest">
6493 <copy todir="confdir">
6494 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
6496 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
6501 if test "$JAVACISGCJ" = "yes"; then
6502 JAVA_HOME=; export JAVA_HOME
6503 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6505 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6507 AC_TRY_EVAL(ant_cmd)
6508 if test $? = 0 && test -f ./conftest.class ; then
6509 AC_MSG_RESULT([yes])
6512 echo "configure: Ant test failed" >&5
6513 cat conftest.java >&5
6514 cat conftest.xml >&5
6516 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
6519 rm -f conftest* core core.* *.core
6521 AC_MSG_CHECKING([which languages to be built])
6522 WITH_LANG="$with_lang"
6523 if test -z "$WITH_LANG"; then
6524 AC_MSG_RESULT([en-US])
6526 AC_MSG_RESULT([$WITH_LANG])
6530 AC_MSG_CHECKING([which languages have poor help localizations])
6531 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
6532 if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
6533 AC_MSG_RESULT([none])
6535 AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
6537 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
6539 AC_MSG_CHECKING([which dictionaries to include])
6540 if test -z "$with_dict"; then
6542 AC_MSG_RESULT([ALL])
6544 WITH_DICT=","$with_dict","
6545 AC_MSG_RESULT([$with_dict])
6549 AC_MSG_CHECKING([for additional 'intro' bitmaps])
6551 if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
6553 AC_MSG_RESULT([none])
6555 for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
6558 *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
6560 if test -n "$bitmap" ; then
6561 INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
6564 AC_MSG_RESULT([$INTRO_BITMAPS])
6566 AC_SUBST(INTRO_BITMAPS)
6568 AC_MSG_CHECKING([for additional 'about' bitmaps])
6570 if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
6572 AC_MSG_RESULT([none])
6574 for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
6577 *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
6579 if test -n "$bitmap" ; then
6580 ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
6583 AC_MSG_RESULT([$ABOUT_BITMAPS])
6585 AC_SUBST(ABOUT_BITMAPS)
6588 AC_MSG_CHECKING([for vendor])
6589 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
6590 AC_MSG_RESULT([not set])
6592 OOO_VENDOR="$with_vendor"
6593 AC_MSG_RESULT([$OOO_VENDOR])
6595 AC_SUBST(OOO_VENDOR)
6598 AC_MSG_CHECKING([for UNIX wrapper name])
6599 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
6600 AC_MSG_RESULT([not set])
6602 UNIXWRAPPERNAME="$with_unix_wrapper"
6603 AC_MSG_RESULT([$UNIXWRAPPERNAME])
6605 AC_SUBST(UNIXWRAPPERNAME)
6607 AC_MSG_CHECKING([whether to statically link to Gtk])
6608 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
6609 ENABLE_STATIC_GTK="TRUE"
6610 AC_MSG_RESULT([yes])
6612 ENABLE_STATIC_GTK="FALSE"
6615 AC_SUBST(ENABLE_STATIC_GTK)
6617 AC_MSG_CHECKING([whether to use layout dialogs])
6618 if test -z "$enable_layout" || test "$enable_layout" != "no"; then
6619 ENABLE_LAYOUT="TRUE"
6620 AC_MSG_RESULT([yes])
6622 ENABLE_LAYOUT="FALSE"
6625 AC_SUBST(ENABLE_LAYOUT)
6627 AC_MSG_CHECKING([whether to use experimental layout dialogs])
6628 if test -n "$enable_layout_experimental" && test "$enable_layout_experimental" == "yes"; then
6629 ENABLE_LAYOUT_EXPERIMENTAL="TRUE"
6630 AC_MSG_RESULT([yes])
6632 ENABLE_LAYOUT_EXPERIMENTAL="FALSE"
6635 AC_SUBST(ENABLE_LAYOUT_EXPERIMENTAL)
6637 # ===================================================================
6638 # De- or increase default verbosity of build process
6639 # ===================================================================
6640 AC_MSG_CHECKING([build verbosity])
6641 if test -n "$enable_verbose"; then
6642 if test "$enable_verbose" == "yes"; then
6644 AC_MSG_RESULT([high])
6646 if test "$enable_verbose" == "no"; then
6648 AC_MSG_RESULT([low])
6651 AC_MSG_RESULT([not set])
6655 dnl ===================================================================
6656 dnl Setting up the environment.
6657 dnl ===================================================================
6658 echo "********************************************************************"
6660 echo "* Setting up the build environment variables. *"
6662 echo "********************************************************************"
6664 if test -z "$COMPATH"; then
6665 AC_MSG_ERROR([No compiler found.])
6669 AC_MSG_CHECKING([solver path])
6670 if test -z "$with_local_solver"; then
6671 LOCAL_SOLVER="DEFAULT"
6672 AC_MSG_RESULT([default])
6674 LOCAL_SOLVER=$with_local_solver
6675 AC_MSG_RESULT([$with_local_solver])
6677 AC_SUBST(LOCAL_SOLVER)
6679 AC_SUBST(BUILD_TYPE)
6681 # make sure config.guess is +x; we execute config.guess, so it has to be so;
6682 chmod +x ./config.guess
6684 AC_OUTPUT([set_soenv Makefile])
6686 dnl Executing the set_soenv script to setup the environment variables.
6688 if test -z "$enable_check_only"; then
6693 echo No environment file will be generated
6695 num_warnings=`wc -l warn`
6696 _num=`echo $num_warnings | $AWK '{ print $1 }'`
6697 if test $_num -gt 0; then
6698 echo The following warning\(s\) were generated by configure
6699 echo ----------------------------------------------------
6704 echo There were no warnings