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)
273 [ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms
274 where Qt4 and KDE4 are available. Should not be used with --enable-kde.
276 AC_ARG_ENABLE(binfilter,
277 [ --disable-binfilter Disable legacy binary file formats filters
278 ],,if ! test -d ./binfilter; then enable_binfilter=no; fi)
280 [ --disable-rpath Disable the use of relative paths in shared libraries
283 [ --disable-pam Disable pam support.
285 AC_ARG_ENABLE(pam-link,
286 [ --enable-pam-link link with libpam instead of dynamically open it
288 AC_ARG_ENABLE(crypt-link,
289 [ --disable-crypt-link disable linking with libcrypt instead of dynamically
290 open it (needed for ancient GNU/Linux distributions
291 without crypt()/libcrypt)
292 ],,enable_crypt_link=yes)
293 AC_ARG_ENABLE(xrender-link,
294 [ --enable-xrender-link link with libXrender instead of dynamically open it
297 [ --disable-randr disable RandR support in the vcl project
299 AC_ARG_ENABLE(randr-link,
300 [ --disable-randr-link disable linking with libXrandr, instead dynamically
302 ],,enable_randr_link=yes)
303 AC_ARG_WITH(myspell-dicts,
304 [ --without-myspell-dicts Removes myspell dictionaries from openoffice.org
305 installation set, for people building for specific
306 distributions where the myspell dictionaries are
307 installed from other sources
309 AC_ARG_WITH(system-dicts,
310 [ --with-system-dicts Use dictionaries from system paths- Specify
311 them via --with-{dict,hyph,thes}-path=/path
312 if you want to override the default ones
314 AC_ARG_WITH(external-dict-dir,
315 [ --with-external-dict-dir Specify external dictionary dir
317 AC_ARG_WITH(external-hyph-dir,
318 [ --with-external-hyph-dir Specify external hyphenation pattern dir
320 AC_ARG_WITH(external-thes-dir,
321 [ --with-external-thes-dir Specify external thesaurus dir
323 AC_ARG_WITH(system-libs,
324 [ --with-system-libs Use libs already on system -- enables all
325 --with-system-* flags except mozilla and
326 odbc/sane/xrender-header(s)
328 AC_ARG_WITH(system-headers,
329 [ --with-system-headers Use headers already on system -- enables all
330 --with-system-* flags for external packages
331 whose headers are the only entities used i.e.
332 boost/vigra/odbc/sane/xrender-header(s)
334 AC_ARG_WITH(system-jars,
335 [ --without-system-jars When building with --with-system-libs, also the
336 needed jars are expected on the system. Use this to
338 (except for the db case where --with-system-db
339 *has to* imply using the db.jar from there, too)
341 AC_ARG_WITH(system-zlib,
342 [ --with-system-zlib Use zlib already on system
344 AC_ARG_WITH(system-openssl,
345 [ --with-system-openssl Use OpenSSL already on system
347 AC_ARG_WITH(system-jpeg,
348 [ --with-system-jpeg Use jpeg already on system
350 AC_ARG_WITH(system-expat,
351 [ --with-system-expat Use expat already on system
353 AC_ARG_WITH(system-libwpd,
354 [ --with-system-libwpd Use libwpd already on system
356 AC_ARG_WITH(system-libwps,
357 [ --with-system-libwps Use libwps already on system
359 AC_ARG_WITH(system-libwpg,
360 [ --with-system-libwpg Use libwpg already on system
362 AC_ARG_WITH(system-libxml,
363 [ --with-system-libxml Use libxml already on system
365 AC_ARG_WITH(system-python,
366 [ --with-system-python Use python already on system
368 AC_ARG_WITH(system-icu,
369 [ --with-system-icu Use icu already on system
371 AC_ARG_WITH(system-poppler,
372 [ --with-system-poppler Use poppler already on system
374 AC_ARG_WITH(system-db,
375 [ --with-system-db Use berkeley db already on system
377 AC_ARG_WITH(system-lucene,
378 [ --with-system-lucene Use lucene already on system
380 AC_ARG_WITH(lucene-core-jar,
381 [ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ],
382 [ LUCENE_CORE_JAR="$withval"
384 AC_ARG_WITH(lucene-analyzers-jar,
385 [ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ],
386 [ LUCENE_ANALYZERS_JAR="$withval"
388 AC_ARG_WITH(system-hsqldb,
389 [ --with-system-hsqldb Use hsqldb already on system
391 AC_ARG_WITH(hsqldb-jar,
392 [ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ],
393 [ HSQLDB_JAR="$withval"
395 AC_ARG_WITH(system-beanshell,
396 [ --with-system-beanshell Use beanshell already on system
398 AC_ARG_WITH(beanshell-jar,
399 [ --with-beanshell-jar=JARFILE Specify path to jarfile manually ],
402 AC_ARG_ENABLE(minimizer,
403 [ --enable-minimizer enables the build of the Presentation Minimizer extension
405 AC_ARG_ENABLE(presenter-console,
406 [ --enable-presenter-console enables the build of the Presenter Console extension
408 AC_ARG_ENABLE(pdfimport,
409 [ --enable-pdfimport enables the build of the PDF Import extension and xpdf
411 AC_ARG_ENABLE(wiki-publisher,
412 [ --enable-wiki-publisher enables the build of the Wiki Publisher extension
414 AC_ARG_WITH(commons-codec-jar,
415 [ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ],
416 [ COMMONS_CODEC_JAR="$withval"
418 AC_ARG_WITH(commons-lang-jar,
419 [ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ],
420 [ COMMONS_LANG_JAR="$withval"
422 AC_ARG_WITH(commons-httpclient-jar,
423 [ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ],
424 [ COMMONS_HTTPCLIENT_JAR="$withval"
426 AC_ARG_WITH(commons-logging-jar,
427 [ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ],
428 [ COMMONS_LOGGING_JAR="$withval"
430 AC_ARG_WITH(servlet-api-jar,
431 [ --servlet-api-jar=JARFILE Specify path to jarfile manually ],
432 [ SERVLETAPI_JAR="$withval"
434 AC_ARG_ENABLE(ogltrans,
435 [ --enable-ogltrans enables the build of the OGLTrans extension
437 AC_ARG_ENABLE(report-builder,
438 [ --enable-report-builder enables the build of the Report Builder extension
440 AC_ARG_WITH(system-jfreereport,
441 [ --with-system-jfreereport Use JFreeReport already on system
444 [ --with-sac-jar=JARFILE Specify path to jarfile manually ],
447 AC_ARG_WITH(libxml-jar,
448 [ --with-libxml-jar=JARFILE Specify path to jarfile manually ],
449 [ LIBXML_JAR="$withval"
451 AC_ARG_WITH(flute-jar,
452 [ --with-flute-jar=JARFILE Specify path to jarfile manually ],
453 [ FLUTE_JAR="$withval"
455 AC_ARG_WITH(jfreereport-jar,
456 [ --with-jfreereport-jar=JARFILE Specify path to jarfile manually ],
457 [ JFREEREPORT_JAR="$withval"
459 AC_ARG_WITH(liblayout-jar,
460 [ --with-liblayout-jar=JARFILE Specify path to jarfile manually ],
461 [ LIBLAYOUT_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(libloader-jar,
468 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
469 [ LIBLOADER_JAR="$withval"
471 AC_ARG_WITH(libformula-jar,
472 [ --with-libformula-jar=JARFILE Specify path to jarfile manually ],
473 [ LIBFORMULA_JAR="$withval"
475 AC_ARG_WITH(librepository-jar,
476 [ --with-librepository-jar=JARFILE Specify path to jarfile manually ],
477 [ LIBREPOSITORY_JAR="$withval"
479 AC_ARG_WITH(libfonts-jar,
480 [ --with-libfonts-jar=JARFILE Specify path to jarfile manually ],
481 [ LIBFONTS_JAR="$withval"
483 AC_ARG_WITH(libserializer-jar,
484 [ --with-libserializer-jar=JARFILE Specify path to jarfile manually ],
485 [ LIBSERIALIZER_JAR="$withval"
487 AC_ARG_WITH(libbase-jar,
488 [ --with-libbase-jar=JARFILE Specify path to jarfile manually ],
489 [ LIBBASE_JAR="$withval"
491 AC_ARG_WITH(system-saxon,
492 [ --with-system-saxon Use saxon already on system
494 AC_ARG_WITH(saxon-jar,
495 [ --with-saxon-jar=JARFILE Specify path to jarfile manually ],
496 [ SAXON_JAR="$withval"
498 AC_ARG_WITH(system-libxslt,
499 [ --with-system-libxslt Use libxslt already on system
501 AC_ARG_WITH(system-odbc,
502 [ --with-system-odbc-headers Use the odbc headers already on system
504 AC_ARG_WITH(system-sane,
505 [ --with-system-sane-header Use sane.h already on system
507 AC_ARG_WITH(system-xrender,
508 [ --with-system-xrender-headers Use XRender headers already on system
510 AC_ARG_WITH(system-mesa-headers,
511 [ --with-system-mesa-headers Use Mesa headers already on system
513 AC_ARG_WITH(system-curl,
514 [ --with-system-curl Use curl already on system
516 AC_ARG_WITH(system-boost,
517 [ --with-system-boost Use boost already on system
519 AC_ARG_WITH(system-vigra,
520 [ --with-system-vigra Use vigra already on system
523 [ --disable-neon Disable neon and the compilation of webdav binding
526 [ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla
529 AC_ARG_WITH(system-neon,
530 [ --with-system-neon Use neon already on system
532 AC_ARG_WITH(system-agg,
533 [ --with-system-agg Use AGG already on system
535 AC_ARG_WITH(system-hunspell,
536 [ --with-system-hunspell Use libhunspell already on system
538 AC_ARG_WITH(system-mythes,
539 [ --with-system-mythes Use mythes already on system
541 AC_ARG_WITH(system-altlinuxhyph,
542 [ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
544 AC_ARG_WITH(system-lpsolve,
545 [ --with-system-lpsolve Use lpsolve already on system
547 AC_ARG_WITH(system-mozilla,
548 [ --with-system-mozilla Use mozilla already on system. Note that some
549 components cannot be built against a contemporary
550 mozilla. The flavour used can be specified by
551 --with-system-mozilla=<flavour>. Supported are:
552 libxul (default), xulrunner, firefox, seamonkey,
554 ], WITH_SYSTEM_MOZILLA=$withval, WITH_SYSTEM_MOZILLA=no)
555 AC_ARG_WITH(linker-hash-style,
556 [ --with-linker-hash-style
557 ], WITH_LINKER_HASH_STYLE=$withval, WITH_LINKER_HASH_STYLE=gnu)
559 [ --with-stlport The location that STLport is installed in. The STL
560 header files are assumed to be in
561 stlport-home/stlport and the STLPort library in
564 Usage: --with-stlport=<absolute path to stlport home>
566 Warning!!, disabling using --without-stlport or
567 enabling using --with-stlport on a platform that
568 defaults to the opposite will break ABI compatability
569 ], WITH_STLPORT=$withval , WITH_STLPORT=auto)
570 AC_ARG_WITH(jdk-home,
571 [ --with-jdk-home if you have installed JDK 1.3 or later on your system
572 please supply the path here.
573 Note that this is not the location of the Java binary
574 but the location of the entire distribution.
576 Usage: --with-jdk-home=<absolute path to JDK home>
578 AC_ARG_WITH(gxx_include_path,
579 [ --with-gxx-include-path if you want to override the autodetected g++ include
582 Usage: --with-gxx-include-path=<absolute path to g++ include dir>
585 [ --with-java Build with[[out]] Java support. If you use
586 --without-java/--with-java=no then the build will have
587 no support for Java components, applets, accessibility
589 ], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java)
590 AC_ARG_WITH(java_target_version,
591 [ --with-java-target-version Generate class files that will work on JVMs with
592 the specified version. For example, use
593 --with-java-target-version=1.4 to make sure that the
594 application will work with JVM 1.4 even when compiled
597 This option is ignored when you compile with gcj/gij.
599 Usage: --with-java-target-version=<jvm version>
601 AC_ARG_ENABLE(gcjaot,
602 [ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation
603 support to speed up buildsi by compiling the jars also
605 --enable-gcjaot is only known to work with bytecode
606 created with gcj or ecj
608 AC_ARG_WITH(ant-home,
609 [ --with-ant-home If you have installed Jakarta Ant on your system,
610 please supply the path here.
611 Note that this is not the location of the Ant binary
612 but the location of the entire distribution.
614 Usage: --with-ant-home=<absolute path to Ant home>
616 AC_ARG_WITH(perl-home,
617 [ --with-perl-home If you have installed the Perl 5 Distribution, on your
618 system, please supply the path here.
619 Note that this is not the location of the Perl binary
620 but the location of the entire distribution.
622 Usage: --with-perl-home=<absolute path to Perl 5 home>
625 [ --with-cl-home For Windows NT users, please supply the path
626 for the Microsoft C/C++ compiler.
627 Note that this is not the location of the compiler
628 binary but the location of the entire distribution.
630 Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>
632 AC_ARG_WITH(mspdb-path,
633 [ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the
634 path pointing to the mspdb71.dll (.NET 2003).
636 Usage: --with-mspdb-path=<absolute path to mspdb71.dll>
638 AC_ARG_WITH(midl-path,
639 [ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply
640 the path pointing to the midl.exe.
642 Usage: --with-midl-path=<absolute path to midl.exe>
644 AC_ARG_WITH(csc-path,
645 [ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply
646 the path pointing to the csc.exe.
648 Usage: --with-csc-path=<absolute path to csc.exe>
650 AC_ARG_WITH(nsis-path,
651 [ --with-nsis-path For Windows users, please supply the path to the
652 "Nullsoft Scriptable Install System" (NSIS). If NSIS
653 is found in the path or this option is supplied a self
654 contained executable installer for OpenOffice.org will
657 Usage: --with-nsis-path=<absolute path to nsis.exe>
659 AC_ARG_WITH(frame-home,
660 [ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply
661 the path pointing to lib/mscoree.lib, usually
663 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"
665 MS Visual Toolkit compiler users, please supply the
666 path pointing to lib/msvcrt.lib, usually something
668 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"
670 Usage: --with-frame-home=<absolute path to Framework SDK [[home]]>
672 AC_ARG_WITH(psdk-home,
673 [ --with-psdk-home For Windows users, please supply the path to the
674 Microsoft Platform SDK.
676 Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>
678 AC_ARG_WITH(directx-home,
679 [ --with-directx-home For Windows users, please supply the path to the
680 Microsoft DirectX SDK.
682 Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
684 AC_ARG_WITH(local-solenv,
685 [ --with-local-solenv If you have solenv in a location other than ./solenv,
686 please supply the path here.
688 Usage: --with-local-solenv=<absolute path to solenv>
690 AC_ARG_WITH(local-solver,
691 [ --with-local-solver if you have solver in a location other than ./solver,
692 please supply the path here.
694 Usage: --with-local-solver=<absolute path to solver>
696 AC_ARG_ENABLE(check-only,
697 [ --enable-check-only Use this option option if you just want to check your
698 environment. This option stops the generation of an
701 Usage: --enable-check-only=yes
704 [ --with-lang Use this option to build OpenOffice.org with
705 additional language support. English (US) is always
706 included by default. Separate multiple languages with
707 space. For all languages, use --with-lang=ALL.
709 Usage: --with-lang="es sw tu cs sk"
711 AC_ARG_WITH(poor-help-localizations,
712 [ --with-poor-help-localizations
713 Use this option to specify which languages have
714 unusable help localizations. Separate multiple
715 languages with space.
717 Usage: --with-poor-help-localizations="af ar be-BY ca"
720 [ --with-dict Use this option to build OpenOffice.org with
721 dictionary support. ALL dictionaries are always
722 included by default unless overridden with
723 this option. Separate multiple dictionaries with
724 commas. For all dictionaries, use --with-dict=ALL.
726 Usage: --with-dict=ENGB,ENUS,ITIT
728 AC_ARG_WITH(intro-bitmaps,
729 [ --with-intro-bitmaps Prefer the specified intro bitmaps over the
730 the default one. Can be more than one (separated by
731 commas), the order means priority of fallback if the
732 first does not exist (in the installed tree).
734 Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
736 AC_ARG_WITH(about-bitmaps,
737 [ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
738 specification of bitmaps for the About box.
740 Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
743 [ --with-vendor Set vendor of the build.
745 Usage: --with-vendor="John the Builder"
747 AC_ARG_WITH(unix-wrapper,
748 [ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
749 in the desktop files and in the desktop-integration RPMs.
751 Usage: --with-unix-wrapper=ooffice
753 AC_ARG_WITH(asm-home,
754 [ --with-asm-home For Windows users, please supply the path for the
757 Usage: --with-asm-home=<path to ml.exe directory>
759 AC_ARG_WITH(os-version,
760 [ --with-os-version For FreeBSD users, use this option option to override
761 the detected OSVERSION.
763 Usage: --with-os-version=<OSVERSION>
765 AC_ARG_WITH(unzip-home,
766 [ --with-unzip-home Deprecated: use --with-zip-home instead],,)
767 AC_ARG_WITH(zip-home,
768 [ --with-zip-home If you use a non standard zip, for example windows
769 please supply the path for zip
771 Usage: --with-zip-home=<path to zip executable>
774 [ --with-mingwin For Windows users, use the mingwin32 compiler within
775 cygwin environment, this implies --with-use-shell=tcsh
777 Usage: --with-mingwin=yes
779 For !Windows use, use the mingw32 C++ compiler to
780 (re-) build unowinreg.dll. Specify the MinGW C++
783 Usage: --with-mingwin=i586-mingw32msvc-g++
784 ],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
785 AC_ARG_WITH(use-shell,
786 [ --with-use-shell Use this option to override the default shell to be
787 used for the build environment.
793 Usage: --with-use-shell=tcsh|bash|4nt
794 ],with_use_shell=$withval,with_use_shell="tcsh")
795 AC_ARG_WITH(build-version,
796 [ --with-build-version Allows the builder to add a custom version tag
797 that will appear in the Help/About box for QA
800 Usage: --with-build-version="Built by Jim"
801 ],with_build_version=$withval)
802 AC_ARG_ENABLE(sgistl,
803 [ --enable-sgistl for IRIX users, use this option option to build
804 OpenOffice.org using SGI's STL.
806 Usage: --enable-sgistl=yes
809 [ --with-alloc Define which allocator to build with
810 (choices are oo, system, tcmalloc)
812 AC_ARG_ENABLE(verbose,
813 [ --enable-verbose Increase build verbosity.
814 --disable-verbose Decrease build verbosity.
819 dnl ===================================================================
821 dnl ===================================================================
822 echo "********************************************************************"
824 echo "* OpenOffice.org build configuration. *"
826 echo "* The configure process checks your platform to see whether *"
827 echo "* you can build OpenOffice.org on it. *"
828 echo "* This process checks all pre-requisites and generates a file *"
829 echo "* containing the necessary environment variables. *"
830 echo "* Source this file after configure has ended successfully. *"
832 echo "* Any warning that is generated during the configure process *"
833 echo "* must be taken into account since it can be a reason for *"
834 echo "* an unsuccessful build of OpenOffice.org *"
836 echo "********************************************************************"
838 echo "********************************************************************"
840 echo "* Checking the platform pre-requisites. *"
842 echo "********************************************************************"
844 dnl ===================================================================
845 dnl Configure pre-requisites.
846 dnl ===================================================================
850 AC_PATH_PROG( AWK, $AWK)
851 if test -z "$AWK"; then
852 AC_MSG_ERROR([install awk to run this script])
855 AC_PATH_PROGS(SED, sed )
856 if test -z "$SED"; then
857 AC_MSG_ERROR([install sed to run this script])
860 AC_MSG_CHECKING([for solenv environment])
861 if test -z "$with_local_solenv"; then
862 LOCAL_SOLENV="DEFAULT"
863 AC_MSG_RESULT([default])
865 LOCAL_SOLENV=$with_local_solenv
866 AC_MSG_RESULT([$with_local_solenv])
868 AC_SUBST(LOCAL_SOLENV)
870 if test "$LOCAL_SOLENV" = "DEFAULT"; then
873 _solenv="$LOCAL_SOLENV"
877 if test -e $_solenv/inc/minor.mk; then
878 # Get UPD number from ./solenv/inc/minor.mk
879 UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
881 SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
882 AC_SUBST(SOURCEVERSION)
884 AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
887 dnl ===================================================================
888 dnl Checks for the operating system and processor.
889 dnl ===================================================================
891 if test "$build" != "$host" -o "$build" != "$target" \
892 -o "$host" != "$target"; then
893 AC_MSG_WARN([cross-compiling by any means is not supported (yet)!])
894 echo "cross-compiling by any means is not supported (yet)!" >> warn
897 if echo "$build_os" | grep cygwin; then
898 AC_MSG_CHECKING([Cygwin version])
900 AC_MSG_RESULT([$CygwinVer])
901 if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
902 AC_MSG_ERROR([You need at least Cygwin V1.5.x])
908 dnl ===================================================================
909 dnl The following is a list of supported systems.
910 dnl Sequential to keep the logic very simple
911 dnl These values may be checked and reset later.
912 dnl ===================================================================
925 dnl ===========================================================
926 dnl check whether we're using solaris 6,7,8 - sparc or intel.
927 dnl ===========================================================
928 AC_MSG_CHECKING([the Solaris operating system release])
929 _os_release=`echo $build_os | $SED -e s/solaris2\.//`
930 if test "$_os_release" -lt "6"; then
931 AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
933 AC_MSG_RESULT([ok ($_os_release)])
936 dnl check whether we're using a sparc or i386 processor
937 AC_MSG_CHECKING([the processor type])
938 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
939 AC_MSG_RESULT([ok ($build_cpu)])
941 AC_MSG_ERROR([only sparc and i386 processors are supported])
953 if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then
954 PTHREAD_CFLAGS="-DNPTL"
975 if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
976 AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
977 echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
998 AC_MSG_CHECKING([the FreeBSD operating system release])
999 if test -n "$with_os_version"; then
1000 OSVERSION="$with_os_version"
1002 OSVERSION=`/sbin/sysctl -n kern.osreldate`
1004 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
1005 AC_MSG_CHECKING([which thread library to use])
1006 if test "$OSVERSION" -lt "500016"; then
1007 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1008 PTHREAD_LIBS="-pthread"
1009 elif test "$OSVERSION" -lt "502102"; then
1010 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1011 PTHREAD_LIBS="-lc_r"
1014 PTHREAD_LIBS="-pthread"
1016 AC_MSG_RESULT([$PTHREAD_LIBS])
1033 PTHREAD_CFLAGS="-pthread"
1034 PTHREAD_LIBS="-pthread -lpthread"
1047 PTHREAD_LIBS=-pthread
1048 echo "AIX is an alpha port --- Use at own risk" >> warn
1052 AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
1057 AC_SUBST(PTHREAD_CFLAGS)
1058 AC_SUBST(PTHREAD_LIBS)
1060 dnl ===================================================================
1061 dnl Set the ENABLE_CRASHDUMP variable.
1062 dnl ===================================================================
1063 AC_MSG_CHECKING([whether to enable crashdump feature])
1064 if test "$enable_crashdump" = "yes" -o "$enable_crashdump" = "TRUE"; then
1065 ENABLE_CRASHDUMP="TRUE"
1066 AC_MSG_RESULT([yes])
1067 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1069 if test "$enable_crashdump" = "STATIC"; then
1070 ENABLE_CRASHDUMP="STATIC"
1071 AC_MSG_RESULT([yes, STATIC])
1072 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1074 if test "$enable_crashdump" = "" -o "$enable_crashdump" = "no"; then
1078 AC_MSG_ERROR([--enable-crashdump only accepts yes, no, TRUE or STATIC as parameter.])
1082 AC_SUBST(ENABLE_CRASHDUMP)
1084 if test "$_os" = "WINNT"; then
1085 BUILD_TYPE="$BUILD_TYPE TWAIN"
1088 if test "$_os" = "WINNT"; then
1089 dnl ===================================================================
1090 dnl Set the VC_STANDARD variable.
1091 dnl ===================================================================
1092 AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
1093 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
1098 AC_MSG_RESULT([yes])
1100 AC_SUBST(VC_STANDARD)
1103 dnl ===================================================================
1104 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
1105 dnl ===================================================================
1106 AC_MSG_CHECKING([whether to turn warnings to errors])
1107 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
1108 ENABLE_WERROR="TRUE"
1109 AC_MSG_RESULT([yes])
1110 AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
1111 AC_MSG_WARN([on platforms where it has been disabled explicitely])
1112 echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
1114 ENABLE_WERROR="FALSE"
1117 AC_SUBST(ENABLE_WERROR)
1119 dnl ===================================================================
1120 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
1121 dnl ===================================================================
1122 AC_MSG_CHECKING([whether to do a debug build])
1123 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
1125 if test -z "$enable_symbols"; then
1126 enable_symbols="yes"
1128 AC_MSG_RESULT([yes])
1130 ENABLE_DEBUG="FALSE"
1133 AC_SUBST(ENABLE_DEBUG)
1135 dnl ===================================================================
1136 dnl Set the ENABLE_DBGUTIL variable
1137 dnl ===================================================================
1138 AC_MSG_CHECKING([whether to build with additional debug utilities])
1139 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1143 AC_MSG_RESULT([yes])
1146 PROFULLSWITCH="product=full"
1148 AC_MSG_RESULT([no, full product build])
1151 AC_SUBST(PROFULLSWITCH)
1154 dnl ===================================================================
1155 dnl First setting is whether to include symbols into final build.
1156 dnl ===================================================================
1157 AC_MSG_CHECKING([whether to include symbols into final build])
1158 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
1159 if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
1160 ENABLE_SYMBOLS="TRUE"
1161 AC_MSG_RESULT([yes])
1163 if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
1164 ENABLE_SYMBOLS="SMALL"
1165 AC_MSG_RESULT([yes, small ones])
1166 else if test "$enable_symbols" != "no" ; then
1167 echo enable symbols is: $enable_symbols
1168 AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
1178 AC_SUBST(ENABLE_SYMBOLS)
1180 dnl ===================================================================
1181 dnl Determine if the solver is to be stripped or not.
1182 dnl ===================================================================
1183 AC_MSG_CHECKING([whether to strip the solver or not.])
1184 if test -n "$enable_strip_solver"; then
1185 if test "$enable_strip_solver" = "yes"; then
1187 else if test "$enable_strip_solver" = "no"; then
1188 DISABLE_STRIP="TRUE"
1190 AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
1194 if test -n "$ENABLE_SYMBOLS"; then
1195 DISABLE_STRIP="TRUE"
1200 AC_SUBST(DISABLE_STRIP)
1202 dnl ===================================================================
1204 dnl ===================================================================
1205 AC_MSG_CHECKING([whether to enable native CUPS support])
1206 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
1208 AC_MSG_RESULT([yes])
1213 AC_SUBST(ENABLE_CUPS)
1215 AC_MSG_CHECKING([whether to enable fontconfig support])
1216 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
1217 ENABLE_FONTCONFIG="TRUE"
1218 AC_MSG_RESULT([yes])
1220 ENABLE_FONTCONFIG=""
1223 AC_SUBST(ENABLE_FONTCONFIG)
1226 dnl ===================================================================
1227 dnl Disable legacy binary file formats filters
1228 dnl ===================================================================
1229 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
1230 if test "$enable_binfilter" = "no"; then
1234 WITH_BINFILTER="YES"
1235 BUILD_TYPE="$BUILD_TYPE BINFILTER"
1236 AC_MSG_RESULT([yes])
1238 AC_SUBST(WITH_BINFILTER)
1240 if test "$_os" = "WINNT"; then
1241 AC_MSG_CHECKING([whether to use DirectX])
1242 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
1243 ENABLE_DIRECTX="TRUE"
1244 AC_MSG_RESULT([yes])
1249 AC_SUBST(ENABLE_DIRECTX)
1251 AC_MSG_CHECKING([whether to use ActiveX])
1252 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
1254 AC_MSG_RESULT([yes])
1256 DISABLE_ACTIVEX="TRUE"
1259 AC_SUBST(DISABLE_ACTIVEX)
1261 AC_MSG_CHECKING([whether to use ATL])
1262 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
1264 AC_MSG_RESULT([yes])
1269 AC_SUBST(DISABLE_ATL)
1273 dnl ===================================================================
1274 dnl Disable rpath in shared libraries?
1275 dnl ===================================================================
1276 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
1277 if test "$enable_rpath" = "no"; then
1282 AC_MSG_RESULT([$ENABLE_RPATH])
1283 AC_SUBST(ENABLE_RPATH)
1285 dnl Test whether to include MySpell dictionaries
1286 dnl ===================================================================
1287 AC_MSG_CHECKING([whether to include MySpell dictionaries])
1288 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
1289 AC_MSG_RESULT([yes])
1290 WITH_MYSPELL_DICTS=YES
1291 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
1294 WITH_MYSPELL_DICTS=NO
1296 AC_SUBST(WITH_MYSPELL_DICTS)
1298 if test "$WITH_MYSPELL_DICTS" = "NO"; then
1299 AC_MSG_CHECKING([whether to use dicts from external paths])
1300 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
1301 AC_MSG_RESULT([yes])
1303 AC_MSG_CHECKING([for spelling dictionary directory])
1304 if test -n "$with_external_dict_dir"; then
1305 DICT_SYSTEM_DIR=file://$with_external_dict_dir
1307 DICT_SYSTEM_DIR=file:///usr/share/hunspell
1309 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
1310 AC_MSG_CHECKING([for hyphenation patterns directory])
1311 if test -n "$with_external_hyph_dir"; then
1312 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
1314 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
1316 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
1317 AC_MSG_CHECKING([for thesaurus directory])
1318 if test -n "$with_external_thes_dir"; then
1319 THES_SYSTEM_DIR=file://$with_external_thes_dir
1321 THES_SYSTEM_DIR=file:///usr/share/mythes
1323 AC_MSG_RESULT([$THES_SYSTEM_DIR])
1329 AC_SUBST(SYSTEM_DICTS)
1330 AC_SUBST(DICT_SYSTEM_DIR)
1331 AC_SUBST(HYPH_SYSTEM_DIR)
1332 AC_SUBST(THES_SYSTEM_DIR)
1334 dnl ===================================================================
1335 dnl WINNT uses tcsh, bash or 4nt all other O/S use tcsh or bash.
1336 dnl The following sets the with_use_shell variable.
1337 dnl ===================================================================
1338 AC_MSG_CHECKING([which shell to use])
1339 if test $_os = "WINNT"; then
1340 dnl ===================================================================
1341 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash" -a "$with_use_shell" != "4nt"; then
1342 AC_MSG_ERROR([only "tcsh","bash" or "4nt" are supported options])
1344 dnl ===================================================================
1345 dnl Sanity check! Native windows programs cannot use cygwin symlinks!
1346 dnl ===================================================================
1347 dnl As long as awk instead of $AWK is used somewhere in the sources,
1348 dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
1349 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
1350 AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
1351 Native windows programs cannot use cygwin symlinks. Remove the symbolic
1352 link, and copy the program to the name of the link.])
1354 dnl ===================================================================
1355 dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
1356 dnl CC and CXX but the configure checks here assume that guw.exe
1357 dnl (if needed at all) is not yet present.
1358 dnl ===================================================================
1359 CC=`echo $CC | $SED "s/^guw.exe //"`
1360 CXX=`echo $CXX | $SED "s/^guw.exe //"`
1361 dnl ===================================================================
1362 dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
1364 dnl ===================================================================
1365 if test -n "$CC";then
1366 if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
1370 dnl ===================================================================
1371 dnl If using Mingwin32 then don't use 4NT
1372 dnl ===================================================================
1373 if test "$WITH_MINGWIN" = "yes" ; then
1374 if test "$with_use_shell" = "4nt" -o "x$with_use_shell" = "x"; then
1375 with_use_shell="tcsh"
1377 if test -z "$CC"; then
1378 CC="gcc -mno-cygwin"
1379 CXX="g++ -mno-cygwin"
1382 elif test $_os = "OS2"; then
1383 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "4nt"; then
1384 AC_MSG_ERROR([only "tcsh" or "4nt" are supported options])
1387 dnl ===================================================================
1388 dnl All other operating systems use tcsh or bash.
1389 dnl ===================================================================
1390 if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash"; then
1391 AC_MSG_ERROR([only "tcsh" or "bash" are supported options])
1394 USE_SHELL="$with_use_shell"
1395 AC_MSG_RESULT([$USE_SHELL])
1397 AC_SUBST(WITH_MINGWIN)
1399 dnl ===================================================================
1400 dnl Extra check for Windows. Non 4nt-builds need gcc to build dmake
1401 dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
1403 dnl ===================================================================
1404 if test "$_os" = "WINNT" -a "$with_use_shell" != "4nt" ; then
1405 AC_MSG_CHECKING([for cygwin gcc/g++])
1406 if which gcc > /dev/null && which g++ > /dev/null ; then
1407 AC_MSG_RESULT([found])
1409 AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
1414 dnl ===================================================================
1415 dnl Check whether the chosen shell can be used.
1416 dnl ===================================================================
1417 if test "$with_use_shell" = "tcsh"; then
1418 AC_PATH_PROG(SHELLPATH, tcsh)
1419 if test -z "$SHELLPATH"; then
1420 AC_MSG_ERROR([tcsh not found in \$PATH])
1422 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/tcsh$//p"`
1424 elif test "$with_use_shell" = "bash"; then
1425 AC_PATH_PROG(SHELLPATH, bash)
1426 if test -z "$SHELLPATH"; then
1427 AC_MSG_ERROR([bash not found in \$PATH])
1429 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
1432 AC_MSG_WARN([Windows/OS/2 4NT builds don't test for the shell])
1433 SHELLPATH="NO_SHELLPATH_NEEDED"
1437 dnl ===================================================================
1438 dnl Checks for c compiler,
1439 dnl The check for the c++ compiler is later on.
1440 dnl ===================================================================
1441 AC_MSG_CHECKING([gcc home])
1442 if test -z "$with_gcc_home"; then
1443 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1445 GCC_HOME="$with_gcc_home"
1447 AC_MSG_RESULT($GCC_HOME)
1450 if test -n "$with_gcc_home"; then
1451 if test -z "$CC"; then
1452 CC="$with_gcc_home/bin/gcc"
1456 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1457 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1461 COMPATH=`dirname "$CC"`
1462 if test "$COMPATH" = "." ; then
1463 AC_PATH_PROGS(COMPATH, $CC)
1464 dnl double square bracket to get single because of M4 quote...
1465 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1468 dnl ===================================================================
1469 dnl Test the gcc version, 3 is OK
1470 dnl ===================================================================
1472 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1473 AC_MSG_CHECKING([the GNU gcc compiler version])
1474 _gcc_version=`$CC -dumpversion`
1475 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
1476 _gcc_longver=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1477 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1479 if test "$_gcc_major" -lt "3"; then
1480 AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
1482 if test "$GCCVER" -eq "030203"; then
1483 if test "$ENABLE_SYMBOLS" = "SMALL"; then
1484 AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
1488 AC_MSG_RESULT([checked (gcc $_gcc_version)])
1489 if test "$_os" = "SunOS"; then
1490 AC_MSG_CHECKING([gcc linker])
1491 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
1492 AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
1494 AC_MSG_RESULT([ok (GNU ld)])
1499 dnl ===================================================================
1500 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
1501 dnl ===================================================================
1502 AC_MSG_CHECKING([whether to enable pch feature])
1503 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
1504 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
1506 AC_MSG_RESULT([yes])
1507 dnl There is no PCH support in GCC versions prior to this
1508 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
1510 AC_MSG_RESULT([yes])
1513 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
1519 AC_SUBST(ENABLE_PCH)
1521 dnl ===================================================================
1522 dnl Search all the common names for GNU make
1523 dnl ===================================================================
1524 AC_MSG_CHECKING([for GNU make])
1525 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
1526 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1527 if test $? -eq 0; then
1532 AC_MSG_RESULT($GNUMAKE)
1533 if test -z "$GNUMAKE"; then
1534 AC_MSG_ERROR([not found. install GNU make.])
1537 AC_MSG_CHECKING([the GNU make version])
1538 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
1539 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1540 if test "$_make_longver" -ge "037901" ; then
1541 AC_MSG_RESULT([$GNUMAKE $_make_version])
1543 if test "$_os" = "Darwin"; then
1544 if test "$_make_longver" -ge "037900" ; then
1545 AC_MSG_RESULT([$GNUMAKE $_make_version])
1547 AC_MSG_WARN([failed ($GNUMAKE $_make_version need 3.79.0+)])
1550 AC_MSG_ERROR([failed ($GNUMAKE $_make_version need 3.79.1+)])
1555 dnl ===================================================================
1556 dnl Test the solaris compiler version
1557 dnl ===================================================================
1558 if test "$_os" = "SunOS"; then
1559 if test "$CC" = "cc"; then
1560 AC_PATH_PROGS(_cc, cc)
1561 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1562 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
1563 dnl cc -V outputs to standard error!!!!
1564 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
1565 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
1566 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
1567 if test "$_sunstudio_major" != "5"; then
1568 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1570 _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" }'`
1571 if test "$_sunstudio_minor" = "false"; then
1572 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1574 dnl compiler will do
1575 AC_MSG_RESULT([checked])
1581 if test "$GCC" = "yes"; then
1582 AC_MSG_CHECKING( for --hash-style=$WITH_LINKER_HASH_STYLE linker support )
1583 hash_style_ldflags_save=$LDFLAGS
1584 LDFLAGS="$LDFLAGS -Wl,--hash-style=$WITH_LINKER_HASH_STYLE"
1585 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1588 printf ("hello world\n");
1589 ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
1590 if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
1591 AC_MSG_RESULT( found )
1593 AC_MSG_RESULT( not found )
1595 LDFLAGS=$hash_style_ldflags_save
1597 AC_SUBST(HAVE_LD_HASH_STYLE)
1598 AC_SUBST(WITH_LINKER_HASH_STYLE)
1600 dnl ===================================================================
1601 dnl Check for -Bsymbolic-functions linker support
1602 dnl ===================================================================
1604 HAVE_LD_BSYMBOLIC_FUNCTIONS=
1605 if test "$GCC" = "yes"; then
1606 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
1607 bsymbolic_functions_ldflags_save=$LDFLAGS
1608 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
1609 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1612 printf ("hello world\n");
1613 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
1614 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
1615 AC_MSG_RESULT( found )
1617 AC_MSG_RESULT( not found )
1619 LDFLAGS=$bsymbolic_functions_ldflags_save
1621 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
1623 dnl ===================================================================
1624 dnl Test the IRIX SGI Mips pro compiler
1625 dnl ===================================================================
1626 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
1627 if test "$CC" = "cc"; then
1628 AC_PATH_PROGS(_cc, cc)
1629 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1630 AC_MSG_CHECKING([the SGI MIPSpro C compiler version])
1631 dnl cc -version outputs to standard error!!!!
1632 _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'`
1633 _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'`
1634 if test "$_mipspro_major" != "7"; then
1635 AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler])
1637 _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'`
1638 if test "$_mipspro_minor" = "false"; then
1639 AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler])
1641 dnl compiler will do
1642 AC_MSG_RESULT([checked])
1648 dnl ===================================================================
1649 dnl Test the Compaq compiler for OSF1
1650 dnl ===================================================================
1651 if test "$_os" = "OSF1"; then
1652 if test "$CC" = "cc"; then
1653 AC_PATH_PROGS(_cc, cc)
1654 COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
1655 AC_MSG_WARN([******* $_cc , $COMPATH])
1656 AC_MSG_CHECKING([the Compaq C compiler version])
1657 dnl cc -V outputs to standard error!!!!
1658 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
1659 _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
1660 if test "$_compaqc_major" != "T6"; then
1661 AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
1663 dnl compiler will do
1664 AC_MSG_RESULT([checked])
1669 dnl ===================================================================
1670 dnl Check whether there's a Perl version available.
1671 dnl ===================================================================
1672 if test -z "$with_perl_home"; then
1673 AC_PATH_PROG(PERL, perl)
1675 if test "$_os" = "WINNT"; then
1676 with_perl_home=`cygpath -u "$with_perl_home"`
1678 _perl_path="$with_perl_home/bin/perl"
1679 if test -x "$_perl_path"; then
1682 AC_MSG_ERROR([$_perl_path not found])
1686 dnl ===================================================================
1687 dnl Testing for Perl version 5 or greater.
1688 dnl $] is the perl version variable, it is returned as an integer
1689 dnl ===================================================================
1690 if test "$PERL"; then
1691 AC_MSG_CHECKING([the Perl version])
1692 ${PERL} -e "exit($]);"
1694 if test "$_perl_version" -lt 5; then
1695 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
1697 AC_MSG_RESULT([checked (perl $_perl_version)])
1699 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
1703 dnl ===================================================================
1704 dnl Testing for required Perl modules
1705 dnl ===================================================================
1706 AC_MSG_CHECKING([for required Perl modules])
1707 if `$PERL -e 'use Archive::Zip;'`; then
1708 AC_MSG_RESULT([all modules found])
1710 AC_MSG_ERROR([Failed to find some modules])
1713 dnl ===================================================================
1714 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
1715 dnl ===================================================================
1716 if test "$_os" = "WINNT"; then
1717 if test "$WITH_MINGWIN" != "yes"; then
1718 AC_MSG_CHECKING([for friendly registry keys])
1719 # VS.Net 2003, VS.Net 2005
1720 if test -z "$with_cl_home"; then
1721 vctest=`./oowintool --msvc-productdir`;
1722 if test -x "$vctest/bin/cl.exe"; then
1723 with_cl_home=$vctest;
1726 with_cl_home=`cygpath -u "$with_cl_home"`
1728 AC_MSG_RESULT([done])
1730 dnl ===========================================================
1731 dnl Check for mspdb71.dll/mspdb80.dll
1732 dnl ===========================================================
1733 dnl .NET 2003/5/8 Compiler
1734 if test -n "$with_mspdb_path";then
1735 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
1737 if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
1738 MSPDB_PATH="$with_mspdb_path"
1741 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
1742 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1744 dnl .NET 2005/2008 case
1745 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
1746 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1748 dnl Windows SDK 6.0 case
1749 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
1750 MSPDB_PATH="$with_cl_home/bin"
1753 if test -z "$MSPDB_PATH";then
1754 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
1755 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
1756 AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
1757 MSPDB_PATH=`dirname "$MSPDB_PATH"`
1760 if test -z "$MSPDB_PATH"; then
1761 AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
1763 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
1764 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
1765 dnl The path needs to be added before cl is called
1766 PATH="$MSPDB_PATH:$PATH"
1768 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
1769 if test -x "$with_cl_home/bin/cl.exe"; then
1770 CC="$with_cl_home/bin/cl.exe"
1772 AC_PATH_PROG(CC, cl.exe)
1774 if test -e "$CC"; then
1775 # This gives us a posix path with 8.3 filename restrictions
1776 CC=`cygpath -d "$CC"`
1777 CC=`cygpath -u "$CC"`
1778 # Remove /cl.exe from CC case insensitive
1779 AC_MSG_RESULT([found ($CC)])
1780 COMPATH=`echo $CC | $SED 's@/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
1781 export INCLUDE=`cygpath -d "$COMPATH/../Include"`
1782 dnl Check which Microsoft C/C++ compiler is found
1783 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
1784 dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
1785 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
1786 x = match( \\\$0, /..\\...\\...../ )
1787 CCversion = substr( \\\$0, RSTART, RLENGTH)
1788 tokencount = split (CCversion,vertoken,\".\")
1789 for ( i = 1 ; i <= tokencount ; i++ ) {
1790 printf (\"%04d\",vertoken[[i]] )
1793 AC_MSG_RESULT([found Compiler version $CCNUMVER.])
1794 if test "$CCNUMVER" -ge "001500000000"; then
1797 AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
1798 elif test "$CCNUMVER" -ge "001400000000"; then
1801 AC_MSG_RESULT([found .NET 2005.])
1802 elif test "$CCNUMVER" -ge "001300102240"; then
1805 AC_MSG_RESULT([found .NET 2003.])
1807 AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
1810 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
1813 AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
1814 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
1815 AC_MSG_RESULT([found.])
1816 if $CC -dumpspecs | grep -q "mno-cygwin"; then
1819 USE_MINGW="pure-mingw"
1822 AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
1827 AC_SUBST(MSPDB_PATH)
1830 dnl ===================================================================
1831 dnl .NET needs special treatment
1832 dnl ===================================================================
1833 if test "$COMEX" -ge "10"; then
1835 AC_PATH_PROG(MIDL_PATH, midl.exe)
1836 if test -n "$MIDL_PATH";then
1837 MIDL_PATH=`dirname "$MIDL_PATH"`
1839 if test -n "$with_midl_path";then
1840 with_midl_path=`cygpath -u "$with_midl_path"`
1842 if test -x "$with_midl_path/midl.exe"; then
1843 MIDL_PATH="$with_midl_path"
1845 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
1846 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
1848 if test -z "$MIDL_PATH" ; then
1849 vstest=`./oowintool --msvs-productdir`;
1850 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
1851 MIDL_PATH="$vstest/Common7/Tools/Bin"
1854 if test -z "$MIDL_PATH" ; then
1855 psdktest=`./oowintool --psdk-home`
1856 if test -x "$psdktest/Bin/midl.exe" ; then
1857 MIDL_PATH="$psdktest/Bin"
1860 if test ! -x "$MIDL_PATH/midl.exe"; then
1861 AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
1863 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1864 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
1865 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
1868 AC_PATH_PROG(CSC_PATH, csc.exe)
1869 if test -n "$CSC_PATH";then
1870 CSC_PATH=`dirname "$CSC_PATH"`
1872 if test -n "$with_csc_path";then
1873 with_csc_path=`cygpath -u "$with_csc_path"`
1875 if test -x "$with_csc_path/csc.exe"; then
1876 CSC_PATH="$with_csc_path"
1878 csctest=`./oowintool --csc-compilerdir`;
1879 if test -x "$csctest/csc.exe"; then
1883 if test ! -x "$CSC_PATH/csc.exe"; then
1884 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
1886 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1887 CSC_PATH=`cygpath -d "$CSC_PATH"`
1888 CSC_PATH=`cygpath -u "$CSC_PATH"`
1889 CSC="$CSC_PATH/csc.exe"
1890 AL="$CSC_PATH/al.exe"
1892 dnl Check mscoree.lib / .NET Frameworks dir
1893 dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
1894 AC_MSG_CHECKING(.NET Framework)
1895 if test -n "$with_frame_home"; then
1896 with_frame_home=`cygpath -u "$with_frame_home"`
1898 if test -f "$with_frame_home/lib/mscoree.lib"; then
1899 FRAME_HOME="$with_frame_home"
1901 if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
1902 FRAME_HOME="$with_cl_home/../SDK/v1.1"
1904 if test -z "$FRAME_HOME" ; then
1905 frametest=`./oowintool --dotnetsdk-dir`
1906 if test -f "$frametest/lib/mscoree.lib"; then
1907 FRAME_HOME="$frametest"
1909 frametest=`./oowintool --psdk-home`
1910 if test -f "$frametest/lib/mscoree.lib"; then
1911 FRAME_HOME="$frametest"
1915 if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
1916 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
1918 AC_MSG_RESULT(found)
1919 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1920 FRAME_HOME=`cygpath -d "$FRAME_HOME"`
1921 FRAME_HOME=`cygpath -u "$FRAME_HOME"`
1924 AC_SUBST(FRAME_HOME)
1926 if test "$_os" = "Linux"; then
1927 AC_MSG_CHECKING([whether to enable Mono bindings])
1931 if test "$enable_mono" != "no" ; then
1932 AC_MSG_RESULT([yes])
1933 if test "z$with_csc_path" != "z"; then
1934 if test -x "$with_csc_path/mcs"; then
1935 CSC_PATH="$with_csc_path"
1937 if test -x "$with_csc_path/bin/mcs"; then
1938 CSC_PATH="$with_csc_path/bin"
1941 if test "z$CSC_PATH" = "z"; then
1942 AC_PATH_PROG(MCS, mcs)
1943 test -z "$MCS" || CSC_PATH=`dirname $MCS`
1946 if test -x "$MCS" -a -x "$AL"; then
1947 MCS_VERSION=`$MCS --version | cut -d" " -f5`
1948 if test "`echo $MCS_VERSION | cut -d"." -f1`" -gt "1" || \
1949 test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
1950 "`echo $MCS_VERSION | cut -d"." -f2`" -ge "2" || \
1951 test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
1952 "`echo $MCS_VERSION | cut -d"." -f2`" = "1" -a \
1953 "`echo $MCS_VERSION | cut -d"." -f3`" -ge "8"; then
1956 AC_PATH_PROG(GMCS, gmcs, no)
1957 AC_PATH_PROG(MKBUNDLE2, mkbundle2, no)
1958 GMCS_VERSION=`$GMCS --version | cut -d" " -f5`
1959 if test "`echo $GMCS_VERSION | cut -d"." -f1`" -gt "1" || \
1960 test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
1961 "`echo $GMCS_VERSION | cut -d"." -f2`" -ge "3" || \
1962 test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
1963 "`echo $GMCS_VERSION | cut -d"." -f2`" = "2" -a \
1964 "`echo $GMCS_VERSION | cut -d"." -f3`" -ge "3"; then
1965 # mkbundle2 does not work on ppc, http://bugzilla.ximian.com/show_bug.cgi?id=81525
1966 if test "`uname -m`" != "ppc" -a "`uname -m`" != "ppc64" ; then
1967 ENABLE_MONO_CLIMAKER=YES
1968 AC_MSG_NOTICE([mono is up-to-date enough - building mono climaker])
1972 if test -n "$enable_mono" ; then
1973 AC_MSG_ERROR([no, mcs >= 1.1.8 is needed.])
1977 if test -n "$enable_mono"; then
1978 AC_MSG_ERROR([mcs or al not found. Make sure they're in the path or use --with-csc-path])
1981 PKG_CHECK_MODULES(MONO, mono >= 1.1.8)
1989 AC_SUBST(ENABLE_MONO)
1990 AC_SUBST(MONO_CFLAGS)
1992 AC_SUBST(ENABLE_MONO_CLIMAKER)
1994 dnl ===================================================================
1995 dnl Check if stdc headers are available excluding windows.
1996 dnl ===================================================================
1997 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2001 dnl ===================================================================
2002 dnl Find pre-processors.
2003 dnl ===================================================================
2004 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2007 dnl Check whether there's a C pre-processor.
2008 dnl ===================================================================
2009 dnl When using SunStudio compiler, there is a bug with the cc
2010 dnl preprocessor, so use CC preprocessor as the cc preprocessor
2011 dnl See Issuezilla #445.
2012 dnl ===================================================================
2013 if test "$_os" = "SunOS"; then
2020 AC_CHECK_SIZEOF(long)
2021 SIZEOF_LONG=$ac_cv_sizeof_long
2022 AC_SUBST(SIZEOF_LONG)
2024 WORDS_BIGENDIAN=$ac_cv_c_bigendian
2025 AC_SUBST(WORDS_BIGENDIAN)
2027 dnl Check for large file support
2029 if test -n "$ac_cv_sys_file_offset_bits"; then
2030 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
2032 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
2033 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
2035 AC_SUBST(LFS_CFLAGS)
2037 dnl ===================================================================
2038 dnl Check if we are to enable vba macro interoperability feature
2039 dnl ===================================================================
2040 AC_MSG_CHECKING([whether to disable vba feature])
2041 if test -n "$enable_vba" && test "$enable_vba" = "no"; then
2042 AC_MSG_RESULT([yes])
2048 AC_SUBST(ENABLE_VBA)
2050 if test "$ENABLE_VBA" = "YES"; then
2051 AC_MSG_CHECKING([how to package the vba compatibility api])
2052 if test -n "$with_vba_package_format"; then
2053 if test "$with_vba_package_format" = "extn"; then
2055 AC_MSG_RESULT([uno extension])
2056 AC_MSG_WARN([--with-vba-package-format=extn can cause problems])
2057 else if test "$with_vba_package_format" = "builtin"; then
2059 AC_MSG_RESULT([build into installset])
2061 AC_MSG_ERROR([unknown packaging method])
2067 AC_MSG_RESULT([defaulting to build into installset])
2072 AC_SUBST(VBA_EXTENSION)
2074 dnl ===================================================================
2075 dnl Check the whether vba need to be delivered as an uno package or part
2077 dnl ===================================================================
2080 dnl ===================================================================
2081 dnl Check if cups/cups.h is available
2082 dnl ===================================================================
2083 if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
2084 AC_CHECK_HEADER(cups/cups.h, [],
2085 [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
2088 dnl ===================================================================
2089 dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
2090 dnl ===================================================================
2091 if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
2092 AC_MSG_CHECKING([whether to enable pam support])
2093 if test -z "$enable_pam" || test "$enable_pam" != "no"; then
2094 AC_MSG_RESULT([yes])
2096 AC_CHECK_HEADER(security/pam_appl.h, [],
2097 [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
2098 AC_MSG_CHECKING([whether to link to libpam])
2099 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
2100 AC_MSG_RESULT([yes])
2102 AC_CHECK_LIB(pam, pam_start, [],
2103 [AC_MSG_ERROR(libpam not found or functional)], [])
2105 AC_MSG_RESULT([no, dynamically open it])
2112 dnl check getspnam_r for needed args (4 or 5)
2113 AX_FUNC_WHICH_GETSPNAM_R
2117 AC_SUBST(NEW_SHADOW_API)
2120 if test "$_os" = "Linux"; then
2121 AC_MSG_CHECKING([whether to link to libcrypt])
2122 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
2123 AC_MSG_RESULT([yes])
2125 AC_CHECK_LIB(crypt, crypt, [],
2126 [AC_MSG_ERROR(libcrypt not found or functional)], [])
2128 AC_MSG_RESULT([no, dynamically open it])
2132 AC_SUBST(CRYPT_LINK)
2134 dnl ===================================================================
2135 dnl Testing for c++ compiler and version...
2136 dnl ===================================================================
2137 if test -n "$with_gcc_home"; then
2138 if test -z "$CXX"; then
2139 CXX="$with_gcc_home/bin/g++"
2143 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2144 if test -e "$CC"; then
2149 dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
2150 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2154 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
2155 if test "$GXX" = "yes"; then
2156 AC_MSG_CHECKING([the GNU C++ compiler version])
2158 _gpp_version=`$CXX -dumpversion`
2159 _gpp_major=`echo $_gpp_version | $AWK -F. '{ print \$1 }'`
2160 _gpp_minor=`echo $_gpp_version | $AWK -F. '{ print \$2 }'`
2162 AC_MSG_RESULT([checked (g++ $_gpp_version)])
2164 if test "$_gpp_major" = "3"; then
2165 if test "$_gpp_minor" = "4"; then
2166 AC_MSG_CHECKING([whether $CXX has the enum bug])
2168 extern "C" void abort (void);
2169 extern "C" void exit (int status);
2171 enum E { E0, E1, E2, E3, E4, E5 };
2176 if (e == E2 || e == E3 || e == E1)
2188 ],[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])])
2193 dnl ===================================================================
2194 dnl Set the gcc/gxx include directories
2195 dnl ===================================================================
2196 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
2197 # often contains an i386 which is expanded as a macro. Solved in stlport.
2198 if test "$GXX" = "yes"; then
2199 AC_MSG_CHECKING([for g++ include path])
2200 if test -z "$with_gxx_include_path"; then
2201 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
2202 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
2203 with_gxx_include_path="/usr/include"
2205 if test "$WITH_MINGWIN" = "yes"; then
2206 with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
2207 with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
2211 dnl This is the original code...
2212 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
2213 if test -z "$with_gxx_include_path"; then
2214 with_gxx_include_path="NO_GXX_INCLUDE"
2215 AC_MSG_RESULT([no g++ includes])
2217 AC_MSG_RESULT([$with_gxx_include_path])
2219 GXX_INCLUDE_PATH="$with_gxx_include_path"
2220 AC_SUBST(GXX_INCLUDE_PATH)
2222 dnl ===================================================================
2223 dnl Set the mingw runtime library include directories
2224 dnl ===================================================================
2225 if test "$WITH_MINGWIN" = "yes"; then
2226 AC_MSG_CHECKING([for mingwin runtime include path])
2227 cat >conftest.$ac_ext <<_ACEOF
2229 #include <bits/c++config.h>
2231 _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`
2233 if test -n "$_mingw_lib_include_path"; then
2235 for a in $_mingw_lib_include_path
2238 _temp="$_temp "`cygpath -u "$a"`
2240 _mingw_lib_include_path=$_temp
2242 if test -z "$_mingw_lib_include_path"; then
2243 _mingw_lib_include_path="NO_LIB_INCLUDE"
2244 AC_MSG_RESULT([no mingwin runtime includes])
2246 AC_MSG_RESULT([$_mingw_lib_include_path])
2248 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
2249 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
2252 dnl ===================================================================
2253 dnl Extra checking for the SUN OS compiler
2254 dnl ===================================================================
2255 if test "$_os" = "SunOS"; then
2256 dnl SunStudio C++ compiler packaged with SunStudio C compiler
2257 if test "$CC" = "cc"; then
2258 AC_MSG_CHECKING([SunStudio C++ Compiler])
2259 if test "$CXX" != "CC"; then
2260 AC_MSG_WARN([SunStudio C++ was not found])
2261 echo "SunStudio C++ was not found" >> warn
2263 AC_MSG_RESULT([checked])
2267 dnl ===================================================================
2268 dnl Extra checking for the DARWIN compiler
2269 dnl ===================================================================
2270 if test "$_os" = "Darwin"; then
2271 dnl c++ packaged with cc (gcc) for Macosx
2272 if test "$CC" = "cc"; then
2273 AC_MSG_CHECKING([Macosx c++ Compiler])
2274 if test "$CXX" != "c++"; then
2275 AC_MSG_WARN([Macosx C++ was not found])
2276 echo "Macosx C++ was not found" >> warn
2278 AC_MSG_RESULT([checked])
2282 dnl ===================================================================
2283 dnl Extra checking for the IRIX compiler
2284 dnl ===================================================================
2285 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2286 dnl MIPSpro C++ compiler packaged with MIPSpro C compiler
2287 if test "$CC" = "cc"; then
2288 AC_MSG_CHECKING([SGI MIPSpro C++ Compiler])
2289 if test "$CXX" != "CC"; then
2290 AC_MSG_WARN([SGI MIPSpro C++ was not found])
2291 echo "SGI MIPSpro C++ was not found" >> warn
2293 AC_MSG_RESULT([checked])
2297 dnl ===================================================================
2298 dnl Extra checking for the OSF compiler
2299 dnl ===================================================================
2300 if test "$_os" = "OSF1"; then
2301 AC_MSG_CHECKING([Compaq C++ compiler version])
2302 dnl cxx -V outputs to standard error!!!!
2303 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
2304 _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
2305 if test "$_compaqcxx_major" != "V6"; then
2306 AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
2307 echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
2309 dnl compiler will do
2310 AC_MSG_RESULT([checked])
2314 dnl **************************************************************
2315 dnl Testing for required Solaris and SunStudio compiler patches...
2316 dnl **************************************************************
2317 dnl Check whether the OS is SunOS.
2318 if test "$_os" = "SunOS"; then
2319 _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
2320 if test "$_os_release" = "7"; then
2324 AC_MSG_CHECKING([for patch 106327-06 or greater])
2325 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
2329 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2330 if test "$_patch_major" = "106327"; then
2331 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2332 if test "$_patch_rev" -ge "6"; then
2337 if test "$_patch" = "found"; then
2338 AC_MSG_RESULT([found])
2340 AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
2341 echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
2346 AC_MSG_CHECKING([for patch 106950-11 or greater])
2347 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
2351 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2352 if test "$_patch_major" = "106950"; then
2353 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2354 if test "$_patch_rev" -ge "11"; then
2359 if test "$_patch" = "found"; then
2360 AC_MSG_RESULT([found])
2362 AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
2363 echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
2366 if test "$_os_release" = "6"; then
2370 AC_MSG_CHECKING([for patch 105591-09 or greater])
2371 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
2375 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2376 if test "$_patch_major" = "105591"; then
2377 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2378 if test "$_patch_rev" -ge "9"; then
2383 if test "$_patch" = "found"; then
2384 AC_MSG_RESULT([found])
2386 AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
2387 echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
2392 AC_MSG_CHECKING([for patch 107733-08 or greater])
2393 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
2397 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2398 if test "$_patch_major" = "107733"; then
2399 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2400 if test "$_patch_rev" -ge "8"; then
2405 if test "$_patch" = "found"; then
2406 AC_MSG_RESULT([found])
2408 AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
2409 echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
2415 dnl ===================================================================
2416 dnl Checks for SGI STL
2417 dnl ===================================================================
2418 if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then
2419 if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2420 AC_MSG_CHECKING([for SGI STL])
2421 if test -d /usr/include/CC ; then
2422 AC_MSG_RESULT([yes.])
2425 AC_MSG_RESULT([not found.])
2428 AC_MSG_ERROR([Option --enable-sgistl is only valid for IRIX])
2432 dnl ===================================================================
2433 dnl Checks for what the default STL should be
2434 dnl ===================================================================
2435 AC_MSG_CHECKING([what the default STL should be])
2436 DEFAULT_TO_STLPORT="no"
2437 if test "$_os" = "Linux"; then
2438 case "$build_cpu" in
2440 DEFAULT_TO_STLPORT="yes"
2443 DEFAULT_TO_STLPORT="no"
2446 elif test "$_os" = "SunOS"; then
2447 DEFAULT_TO_STLPORT="yes"
2448 elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2449 DEFAULT_TO_STLPORT="yes"
2450 elif test "$_os" = "OS2"; then
2451 DEFAULT_TO_STLPORT="yes"
2452 elif test "$_os" = "FreeBSD"; then
2453 DEFAULT_TO_STLPORT="yes"
2455 if test "$DEFAULT_TO_STLPORT" = "yes"; then
2456 AC_MSG_RESULT([stlport])
2458 AC_MSG_RESULT([system])
2460 if test "$WITH_STLPORT" = "auto"; then
2461 WITH_STLPORT=$DEFAULT_TO_STLPORT
2464 dnl ===================================================================
2465 dnl Checks for STLPORT
2466 dnl ===================================================================
2467 AC_MSG_CHECKING([for STL providing headers])
2470 if test "$WITH_STLPORT" = "yes"; then
2471 AC_MSG_RESULT([using internal stlport.])
2472 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2473 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2474 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2476 elif test "$WITH_STLPORT" = "no"; then
2477 AC_MSG_RESULT([using system STL])
2478 USE_SYSTEM_STL="YES"
2479 if test "$DEFAULT_TO_STLPORT" != "no"; then
2480 AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
2481 echo "using system STL. Warning, breaks your ABI compatability!" >>warn
2484 STLPORT4=$WITH_STLPORT
2485 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2486 AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
2488 dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
2489 if test -f "$STLPORT4/stlport/hash_map"; then
2490 AC_MSG_RESULT([checked.])
2492 AC_MSG_ERROR([STLport headers not found.])
2495 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2496 AC_MSG_CHECKING([for STLport libraries])
2497 if test "$_os" = "SunOS"; then
2498 if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
2499 AC_MSG_RESULT([checked])
2500 elif test -f "$STLPORT4/lib/libstlport.so"; then
2501 AC_MSG_RESULT([checked])
2504 AC_MSG_ERROR([STLport libraries not found])
2506 elif test "$_os" = "Darwin"; then
2507 if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
2508 AC_MSG_RESULT([checked])
2509 elif test -f "$STLPORT4/lib/libstlport.dylib"; then
2510 AC_MSG_RESULT([checked])
2513 AC_MSG_ERROR([STLport libraries not found])
2515 elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
2516 if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then
2517 AC_MSG_RESULT([checked])
2519 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2520 AC_MSG_RESULT([checked])
2521 elif test -f "$STLPORT4/lib/libstlport.so"; then
2522 AC_MSG_RESULT([checked])
2525 AC_MSG_ERROR([STLport libraries not found])
2529 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2530 AC_MSG_RESULT([checked])
2531 elif test -f "$STLPORT4/lib/libstlport.so"; then
2532 AC_MSG_RESULT([checked])
2535 AC_MSG_ERROR([STLport libraries not found])
2539 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2540 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2541 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2546 if test -z "$STLPORT4"; then
2547 STLPORT4="NO_STLPORT4"
2549 if test -z "$STLPORT_VER"; then
2553 AC_SUBST(STLPORT_VER)
2554 AC_SUBST(USE_SYSTEM_STL)
2556 dnl ===================================================================
2557 dnl visibility feature
2558 dnl ===================================================================
2559 if test "$GCC" = "yes"; then
2560 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
2562 CFLAGS="$CFLAGS -fvisibility=hidden"
2563 AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
2565 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2566 AC_MSG_RESULT([yes])
2572 dnl ===================================================================
2573 dnl system stl sanity tests
2574 dnl ===================================================================
2575 HAVE_GCC_VISIBILITY_BROKEN=
2576 if test "$USE_SYSTEM_STL" = "YES"; then
2577 AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
2580 AC_TRY_COMPILE([#include <ext/hash_map>
2581 using namespace __gnu_cxx;
2582 ],[hash_map<int, int> t; return 0;],
2583 ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
2585 if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
2586 AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
2588 AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
2591 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2592 AC_MSG_CHECKING([if STL headers are visibility safe])
2593 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
2594 AC_MSG_RESULT([$stlvisok])
2595 if test "$stlvisok" = "no"; then
2596 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
2597 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
2598 unset HAVE_GCC_VISIBILITY_FEATURE
2602 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2603 sharedlink_ldflags_save=$LDFLAGS
2604 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
2606 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
2607 AC_TRY_LINK([#include <sstream>
2608 using namespace std;
2609 ],[istringstream strm( "test" ); return 0;],
2610 $EGREP -q unresolvable conftest.err;
2611 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
2613 AC_MSG_RESULT([$gccvisok])
2614 if test "$gccvisok" = "no"; then
2615 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
2616 echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn
2617 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
2620 LDFLAGS=$sharedlink_ldflags_save
2623 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2624 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
2625 cat >visibility.cxx <<_ACEOF
2626 #pragma GCC visibility push(hidden)
2627 struct __attribute__ ((visibility ("default"))) TestStruct {
2630 __attribute__ ((visibility ("default"))) void TestFunc() {
2634 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
2637 if $EGREP -q '@PLT|\$stub' visibility.s; then
2645 AC_MSG_RESULT([$gccvisbroken])
2646 if test "$gccvisbroken" = "yes"; then
2647 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
2648 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
2649 unset HAVE_GCC_VISIBILITY_FEATURE
2656 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
2657 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
2659 dnl ===================================================================
2661 dnl ===================================================================
2662 AC_MSG_CHECKING([which memory allocator to use])
2663 if test "$with_alloc" = "system"; then
2664 AC_MSG_RESULT([system])
2666 AC_CHECK_FUNCS([malloc realloc calloc free])
2668 if test "$with_alloc" = "tcmalloc"; then
2669 AC_MSG_RESULT(tcmalloc)
2670 if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
2671 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
2673 AC_CHECK_LIB(tcmalloc, malloc, [],
2674 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
2677 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
2678 AC_MSG_RESULT([internal])
2682 dnl ===================================================================
2683 dnl Custom build version
2684 dnl ===================================================================
2686 AC_MSG_CHECKING([whether to add custom build version])
2687 if test "z$with_build_version" != "z"; then
2688 BUILD_VER_STRING=$with_build_version
2689 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
2694 AC_SUBST(BUILD_VER_STRING)
2696 dnl ===================================================================
2697 dnl Java support enable
2698 dnl ===================================================================
2699 AC_MSG_CHECKING([whether to build with Java support])
2700 if test "$WITH_JAVA" != "no"; then
2701 AC_MSG_RESULT([yes])
2707 AC_MSG_WARN([building without java will mean some features will not be available])
2708 echo "building without java will mean some features will not be available" >>warn
2710 AC_SUBST(SOLAR_JAVA)
2712 if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
2713 # IBMs JDK needs this...
2714 JITC_PROCESSOR_TYPE=6
2715 export JITC_PROCESSOR_TYPE
2718 if test "$_os" = "WINNT"; then
2719 if test -z "$with_jdk_home"; then
2720 _jdk_home=`./oowintool --jdk-home`
2721 if test -d "$_jdk_home"; then
2722 with_jdk_home="$_jdk_home"
2725 with_jdk_home=`cygpath -u "$with_jdk_home"`
2729 dnl ===================================================================
2731 dnl ===================================================================
2732 if test "$SOLAR_JAVA" != ""; then
2733 JAVA_HOME=; export JAVA_HOME
2734 if test -z "$with_jdk_home"; then
2735 AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
2737 _java_path="$with_jdk_home/bin/$WITH_JAVA"
2738 dnl Check if there is a java interpreter at all.
2739 if test -x "$_java_path"; then
2740 JAVAINTERPRETER=$_java_path
2742 AC_MSG_ERROR([$_java_path not found set with_jdk_home])
2745 if test "$_os" = "WINNT"; then
2746 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
2747 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
2749 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
2750 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
2754 dnl ===================================================================
2756 dnl ===================================================================
2757 if test "$SOLAR_JAVA" != ""; then
2759 AC_MSG_CHECKING([the installed JDK])
2760 if test -n "$JAVAINTERPRETER"; then
2761 dnl java -version sends output to stderr!
2762 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2763 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2764 # dnl Kaffe specific tests
2765 # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
2766 # if test -z "$KAFFE_VER"; then
2767 # AC_MSG_ERROR([looks like Kaffe but version detection failed])
2769 # _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2770 # if test "$_kaffe_ver" -lt 10100; then
2771 # AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
2775 # dnl TODO: define some project exclusion variables
2777 # AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
2778 # AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
2779 # echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
2780 # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2781 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
2783 AC_MSG_RESULT([checked (gcj)])
2784 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2785 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2787 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
2788 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2791 # dnl BEA JDK specific tests
2792 # _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2793 # _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2795 # if test "$_jdk_ver" -lt 10500; then
2796 # AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0])
2799 # AC_MSG_RESULT([checked (BEA JDK $_jdk)])
2801 # if test "$with_jdk_home" = ""; then
2802 # AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
2803 #you must use the "--with-jdk-home" configure option explicitly])
2806 # AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
2807 # echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
2809 # JAVA_HOME=$with_jdk_home
2811 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
2814 dnl IBM JDK specific tests
2815 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2816 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2818 if test "$_jdk_ver" -lt 10600; then
2819 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.6])
2822 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
2824 if test "$with_jdk_home" = ""; then
2825 AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
2826 you must use the "--with-jdk-home" configure option explicitly])
2829 JAVA_HOME=$with_jdk_home
2834 dnl SUN JDK specific tests
2835 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2836 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2838 if test "$_jdk_ver" -lt 10500; then
2839 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
2841 AC_MSG_RESULT([checked (JDK $_jdk)])
2842 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2843 if test "$_os" = "WINNT"; then
2844 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2846 if test "$_os" = "OS2"; then
2847 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2851 AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
2855 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
2858 _java_target_ver="1.5"
2859 dnl ===================================================================
2860 dnl Check for target java bytecode version
2861 dnl ===================================================================
2862 if test "$SOLAR_JAVA" != ""; then
2863 AC_MSG_CHECKING([for target java bytecode version])
2864 if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
2865 AC_MSG_RESULT([default by $JDK])
2866 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
2867 AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
2870 if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
2871 _java_target_ver="$with_java_target_version"
2872 AC_MSG_RESULT([$_java_target_ver])
2873 elif test $_jdk_ver -gt 10000 ; then
2874 _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
2875 AC_MSG_RESULT([$_java_target_ver])
2877 AC_MSG_ERROR([Unable to guess java bytecode version from java version!])
2881 if ! test -z "$_java_target_ver" -o \
2882 "$_java_target_ver" = "1.1" -o \
2883 "$_java_target_ver" = "1.2" -o \
2884 "$_java_target_ver" = "1.3" -o \
2885 "$_java_target_ver" = "1.4" -o \
2886 "$_java_target_ver" = "1.5" -o \
2887 "$_java_target_ver" = "1.6" -o \
2888 "$_java_target_ver" = "5" ; then
2889 AC_MSG_ERROR([$_java_target_ver is not supported java bytecode version!])
2892 JAVA_SOURCE_VER="$_java_target_ver"
2893 JAVA_TARGET_VER="$_java_target_ver"
2896 dnl ===================================================================
2897 dnl Checks for javac
2898 dnl ===================================================================
2899 if test "$SOLAR_JAVA" != ""; then
2900 if test "$JDK" = "gcj"; then
2901 javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
2903 javacompiler="javac"
2905 if test "$_os" = "OS2"; then
2906 if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
2907 javacompiler="${javacompiler}.exe"
2910 if test -z "$with_jdk_home"; then
2911 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
2913 _javac_path="$with_jdk_home/bin/$javacompiler"
2914 dnl Check if there is a java compiler at all.
2915 if test -x "$_javac_path"; then
2916 JAVACOMPILER=$_javac_path
2919 if test -z "$JAVACOMPILER"; then
2920 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
2922 if test "$_os" = "WINNT"; then
2923 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2924 JAVACOMPILER="${JAVACOMPILER}.exe"
2926 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
2927 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
2929 if test "$_os" = "OS2"; then
2930 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2931 JAVACOMPILER="${JAVACOMPILER}.exe"
2935 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
2936 AC_MSG_CHECKING([re-checking JDK])
2938 AC_MSG_RESULT([checked (ecj)])
2939 #TODO: what's to do here? some switch to do 1.5 compiling?
2940 JAVAFLAGS="-source 1.5 -target 1.5"
2941 _gij_longver="50000"
2946 dnl ===================================================================
2947 dnl Checks that javac is gcj
2948 dnl ===================================================================
2949 if test "$SOLAR_JAVA" != ""; then
2950 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
2954 AC_SUBST(JAVACISGCJ)
2957 dnl ===================================================================
2958 dnl Checks that javac is kaffe
2959 dnl ===================================================================
2960 if test "$SOLAR_JAVA" != ""; then
2961 if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2965 AC_SUBST(JAVACISKAFFE)
2967 dnl ===================================================================
2968 dnl Checks for javadoc
2969 dnl ===================================================================
2970 if test "$SOLAR_JAVA" != ""; then
2971 if test -z "$with_jdk_home"; then
2972 AC_PATH_PROG(JAVADOC, javadoc)
2974 _javadoc_path="$with_jdk_home/bin/javadoc"
2975 if test "$_os" = "OS2"; then
2976 if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
2977 _javadoc_path="${_javadoc_path}.exe"
2980 dnl Check if there is a javadoc at all.
2981 if test -x "$_javadoc_path"; then
2982 JAVADOC=$_javadoc_path
2984 AC_PATH_PROG(JAVADOC, javadoc)
2987 if test -z "$JAVADOC"; then
2988 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
2990 if test "$_os" = "WINNT"; then
2991 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2992 JAVADOC="${JAVADOC}.exe"
2994 JAVADOC=`cygpath -d "$JAVADOC"`
2995 JAVADOC=`cygpath -u "$JAVADOC"`
2997 if test "$_os" = "OS2"; then
2998 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2999 JAVADOC="${JAVADOC}.exe"
3004 if test "$SOLAR_JAVA" != ""; then
3005 dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
3006 if test "$JDK" == "gcj" -a -z "$JAVA_HOME"; then
3007 if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "50000"; then
3008 cat > findhome.java <<_ACEOF
3009 [import java.io.File;
3013 public static void main(String args[])
3015 String jrelocation = System.getProperty("java.home");
3016 File jre = new File(jrelocation);
3017 System.out.println(jre.getParent());
3021 AC_MSG_CHECKING([if javac works])
3022 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
3023 AC_TRY_EVAL(javac_cmd)
3024 if test $? = 0 && test -f ./findhome.class ; then
3025 AC_MSG_RESULT([javac works])
3027 echo "configure: javac test failed" >&5
3028 cat findhome.java >&5
3029 AC_MSG_ERROR([javac does not work - java projects will not build!])
3032 AC_MSG_CHECKING([if gij knows its java.home])
3033 JAVA_HOME=`$JAVAINTERPRETER findhome`
3034 if test $? = 0 && test "$JAVA_HOME" != "" ; then
3035 AC_MSG_RESULT([$JAVA_HOME])
3037 echo "configure: java test failed" >&5
3038 cat findhome.java >&5
3039 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
3042 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
3046 dnl second sanity check JAVA_HOME if possible
3047 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "50000"; then
3048 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
3049 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
3051 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
3052 # try to recover first by looking whether we have a alternatives
3053 # system as in Debian or newer SuSEs where following /usr/bin/javac
3054 # over /etc/alternatives/javac leads to the right bindir where we
3055 # just need to strip a bit away to get a valid JAVA_HOME
3056 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
3057 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
3058 # maybe only one level of symlink (e.g. on Mac)
3059 JAVA_HOME=$(readlink $JAVACOMPILER)
3062 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
3063 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
3064 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
3065 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
3067 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
3068 if test "$JAVA_HOME" != "/usr"; then
3069 if test "$_os" = "Darwin"; then
3070 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
3071 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
3072 dnl Tiger already returns a JDK path..
3073 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
3075 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
3079 # now check if $JAVA_HOME is really valid
3080 if test "$_os" = "Darwin"; then
3081 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
3084 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
3087 if test "$JAVA_HOME_OK" = "NO"; then
3088 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
3089 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
3090 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
3091 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
3092 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
3093 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
3094 # if test "$JDK" == "gcj"; then
3095 # 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
3102 if test "$SOLAR_JAVA" != ""; then
3103 AC_MSG_CHECKING([for jawt lib name])
3104 if test "$JDK" = "gcj"; then
3106 save_LDFLAGS=$LDFLAGS
3107 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3108 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
3109 exec 6>/dev/null # no output
3110 AC_CHECK_HEADER(jni.h, [],
3111 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
3112 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
3113 exec 6>&1 # output on again
3115 LDFLAGS=$save_LDFLAGS
3117 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
3118 # A workaround is to link also against libpmawt.so
3119 if test "$JDK" = "ibm" ; then
3121 save_LDFLAGS=$LDFLAGS
3122 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
3123 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3124 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
3125 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
3126 export LD_LIBRARY_PATH
3127 exec 6>/dev/null # no output
3128 AC_CHECK_HEADER(jni.h, [],
3129 [AC_MSG_ERROR([jni.h could not be found.])], [])
3130 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
3131 if test -z "$AWTLIB"; then
3132 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
3133 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
3135 exec 6>&1 # output on again
3137 LDFLAGS=$save_LDFLAGS
3138 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
3140 if test -z "$AWTLIB"; then
3143 AC_MSG_RESULT([$AWTLIB])
3147 dnl ===================================================================
3148 dnl Check for optional gcj for AOT
3149 dnl ===================================================================
3150 if test "$SOLAR_JAVA" != ""; then
3151 AC_MSG_CHECKING([whether to enable gcj aot compilation])
3152 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
3153 AC_MSG_RESULT([yes])
3154 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
3157 gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
3159 AC_MSG_RESULT([$gcjaot])
3160 if test -n "$with_jdk_home"; then
3161 _javac_path="$with_jdk_home/bin/$gcjaot"
3162 dnl Check if there is a gcj at all.
3163 if test -x "$_javac_path"; then
3164 JAVAAOTCOMPILER=$_javac_path
3167 if test -z "$JAVAAOTCOMPILER"; then
3168 AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
3170 if test -z "$JAVAAOTCOMPILER"; then
3171 AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
3181 AC_SUBST(JAVA_SOURCE_VER)
3182 AC_SUBST(JAVA_TARGET_VER)
3183 AC_SUBST(JAVAINTERPRETER)
3184 AC_SUBST(JAVACOMPILER)
3185 AC_SUBST(JAVAAOTCOMPILER)
3188 dnl ===================================================================
3189 dnl Checks for specific files.
3190 dnl ===================================================================
3192 dnl ===================================================================
3193 dnl Checks for programs.
3194 dnl ===================================================================
3196 dnl ===================================================================
3197 dnl Check whether we already have dmake
3198 dnl ===================================================================
3199 AC_PATH_PROG(DMAKE, dmake, no)
3200 if test "$DMAKE" = "no"; then
3202 echo "dmake will be built on ./bootstrap"
3204 AC_MSG_CHECKING([whether the found dmake is the right dmake])
3205 # we need to find out whether that dmake we found is "our" dmake
3206 # or the dmake from Sun's SunStudio Compiler which is something
3208 # This test _should_ work because the one accepts -V (ours) and one
3209 # (the other) not...
3210 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3211 if test $? -eq 0; then
3213 AC_MSG_RESULT([yes])
3214 AC_MSG_CHECKING([the dmake version])
3215 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3216 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3217 AC_MSG_RESULT([OK, >= 4.11])
3218 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3219 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3220 AC_MSG_RESULT([OK, >= 4.11])
3222 AC_MSG_RESULT([too old. >= 4.11 is needed])
3223 echo "A newer dmake will be built on ./bootstrap"
3228 echo "dmake will be built on ./bootstrap"
3232 AC_SUBST(BUILD_DMAKE)
3234 AC_MSG_CHECKING([whether to enable EPM for packing])
3235 if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -o "$enable_epm" != "no" \) ; then
3236 AC_MSG_RESULT([yes])
3237 dnl ===================================================================
3238 dnl Check for epm - not needed for windows
3239 dnl ===================================================================
3240 if test "$_os" != "WINNT"; then
3241 if test -n "$with_epm"; then
3244 AC_PATH_PROG(EPM, epm, no)
3246 if test "$EPM" = "no" || test "$EPM" = "internal"; then
3247 echo "EPM will be built."
3249 BUILD_TYPE="$BUILD_TYPE EPM"
3251 # Gentoo has some epm which is something different...
3252 AC_MSG_CHECKING([whether the found epm is the right epm])
3253 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
3254 AC_MSG_RESULT([yes])
3256 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
3258 AC_MSG_CHECKING([epm version])
3259 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
3260 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
3261 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
3262 AC_MSG_RESULT([OK, >= 3.7])
3264 if test "$_os" = "Darwin"; then
3265 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
3266 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
3267 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3268 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)])
3269 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3270 AC_MSG_RESULT([$_pm, ok])
3271 else # we never should get here, but go safe
3272 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)])
3276 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
3277 echo "EPM will be built."
3279 BUILD_TYPE="$BUILD_TYPE EPM"
3284 # test which package format to use
3285 AC_MSG_CHECKING([which package format to use])
3286 # epm supports the following formats:
3287 # aix - AIX software distribution
3288 # bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3289 # depot or swinstall - HP-UX software distribution
3290 # deb - Debian software distribution
3291 # inst or tardist - IRIX software distribution
3292 # osx - MacOS X software distribution
3293 # pkg - Solaris software distribution
3294 # rpm - RedHat software distribution
3295 # setld - Tru64 (setld) software distribution
3296 # native - "Native" software distribution for the platform
3297 # portable - Portable software distribution
3311 # if building on Debian, default should be deb...
3312 if test -e /etc/debian_version; then
3330 # we never should get here since we check the arciecture/os at the beginning,
3333 AC_MSG_ERROR([unknown system])
3335 if test -n "$with_package_format"; then
3336 for i in $with_package_format; do
3338 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable)
3341 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
3342 aix - AIX software distribution
3343 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3344 depot or swinstall - HP-UX software distribution
3345 deb - Debian software distribution
3346 inst or tardist - IRIX software distribution
3347 osx - MacOS X software distribution
3348 pkg - Solaris software distribution
3349 rpm - RedHat software distribution
3350 setld - Tru64 (setld) software distribution
3351 native - "Native" software distribution for the platform
3352 portable - Portable software distribution
3357 PKGFORMAT="$with_package_format"
3359 AC_MSG_RESULT([$PKGFORMAT])
3360 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
3361 AC_MSG_CHECKING([for rpm])
3362 for a in "$RPM" rpmbuild rpm; do
3363 $a --usage >/dev/null 2> /dev/null
3364 if test $? -eq 0; then
3368 $a --version >/dev/null 2> /dev/null
3369 if test $? -eq 0; then
3375 if test -z "$RPM" ; then
3376 AC_MSG_ERROR([not found])
3378 RPM_PATH=`which $RPM`
3379 AC_MSG_RESULT([$RPM_PATH])
3382 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
3383 AC_PATH_PROG(DPKG, dpkg, no)
3384 if test "$DPKG" = "no"; then
3385 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
3388 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
3389 if test "$_os" = "Darwin"; then
3390 AC_MSG_CHECKING([for PackageMaker availability])
3391 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
3392 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
3397 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
3400 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
3401 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3402 if test "$EPM" != "no" && test "$EPM" != "internal"; then
3403 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
3404 AC_MSG_CHECKING([whether epm is patched for OOos needs])
3405 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
3406 AC_MSG_RESULT([yes])
3409 if echo "$PKGFORMAT" | grep -q rpm; then
3411 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
3412 echo "the rpms will need to be installed with --nodeps" >> warn
3416 AC_MSG_WARN([the ${_pt}s will not be relocateable])
3417 echo "the ${_pt}s will not be relocateable" >> warn
3418 AC_MSG_WARN([if you want to make sure installation without --nodeps and
3419 relocation will work, you need to patch your epm with the
3420 patch in epm/epm-3.7.patch or build with
3421 --with-epm=internal which will build a suitable epm])
3426 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3427 AC_PATH_PROG(PKGMK, pkgmk, no)
3428 if test "$PKGMK" = "no"; then
3429 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
3443 dnl ===================================================================
3445 dnl ===================================================================
3446 AC_PATH_PROG(GPERF, gperf)
3447 if test -z "$GPERF"; then
3448 AC_MSG_ERROR([gperf not found but needed. Install it.])
3450 AC_MSG_CHECKING([gperf version])
3451 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
3454 AC_MSG_ERROR([too old, you need at least 3.0.0])
3457 dnl ===================================================================
3458 dnl Check for building stax
3459 dnl ===================================================================
3460 AC_MSG_CHECKING([whether to build the stax])
3461 if test -f "external/StAX/jsr173_1.0_api.jar"; then
3463 AC_MSG_RESULT([no, will use the prebuilt external/StAX/jsr173_1.0_api.jar])
3466 AC_MSG_RESULT([yes])
3468 AC_SUBST(BUILD_STAX)
3470 dnl ===================================================================
3471 dnl Check for building ODK
3472 dnl ===================================================================
3473 AC_MSG_CHECKING([whether to build the ODK])
3474 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
3475 AC_MSG_RESULT([yes])
3476 if test "$WITH_JAVA" != "no"; then
3477 AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
3478 if ! test -f "./external/unowinreg/unowinreg.dll"; then
3479 HAVE_UNOWINREG_DLL=no
3481 HAVE_UNOWINREG_DLL=yes
3483 if test "$HAVE_UNOWINREG_DLL" = "yes"; then
3484 AC_MSG_RESULT([found])
3487 if test "$_os" = "WINNT"; then
3488 AC_MSG_RESULT([not found, will be built])
3490 AC_MSG_WARN([not found, will be cross-built using mingw32])
3494 if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
3495 if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
3496 AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
3497 Specify mingw32 g++ executable name with --with-mingwin.
3498 Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
3499 put it into external/unowinreg])
3501 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3502 if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
3504 AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
3506 if test "$MINGWCXX" = "false"; then
3507 AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
3509 AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
3510 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
3515 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3516 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
3518 AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/`, false)
3520 if test "$MINGWSTRIP" = "false"; then
3521 AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
3527 CXXCPP="$MINGWCXX -E"
3528 save_CXXFLAGS=$CXXFLAGS
3529 save_CPPFLAGS=$CPPFLAGS
3530 CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
3531 CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
3532 # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
3533 # do not make sense here (and 'd make the check fail)
3536 AC_HAVE_LIBRARY(kernel32)
3537 AC_HAVE_LIBRARY(advapi32)
3538 AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
3539 CXXFLAGS=$save_CXXFLAGS
3540 CPPFLAGS=$save_CPPFLAGS
3547 BUILD_TYPE="$BUILD_TYPE ODK"
3552 AC_SUBST(BUILD_UNOWINREG)
3554 AC_SUBST(MINGWSTRIP)
3556 dnl ===================================================================
3557 dnl Check for building qadevOOo
3558 dnl ===================================================================
3559 AC_MSG_CHECKING([whether to build qadevOOo])
3560 if test "z$enable_qadevooo" = "z" -o "$enable_qadevooo" != "no"; then
3561 AC_MSG_RESULT([yes])
3562 BUILD_QADEVOOO="YES"
3563 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
3568 AC_SUBST(BUILD_QADEVOOO)
3570 dnl ===================================================================
3571 dnl Check for prelinked libgcc_s.so.1
3572 dnl ===================================================================
3573 if test -z "$with_system_stdlibs" -a -z "$with_system_libs"; then
3574 if test -n "$checkforprelink" -a -f /etc/rpm/macros.prelink; then
3575 with_system_stdlibs=yes
3576 AC_MSG_WARN([prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override])
3577 echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn
3581 dnl ===================================================================
3582 dnl Check for system stdlibs
3583 dnl ===================================================================
3584 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
3585 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
3586 test "$with_system_stdlibs" != "no"; then
3590 AC_MSG_RESULT([yes])
3593 AC_SUBST(SYSTEM_STDLIBS)
3595 dnl ===================================================================
3596 dnl Check for system zlib
3597 dnl ===================================================================
3598 if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
3599 with_system_zlib=yes
3601 AC_MSG_CHECKING([which zlib to use])
3602 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
3603 test "$with_system_zlib" != "no"; then
3604 AC_MSG_RESULT([external])
3606 AC_CHECK_HEADER(zlib.h, [],
3607 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
3608 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
3609 [AC_MSG_ERROR(zlib not found or functional)], [])
3611 AC_MSG_RESULT([internal])
3613 BUILD_TYPE="$BUILD_TYPE ZLIB"
3615 AC_SUBST(SYSTEM_ZLIB)
3617 dnl ===================================================================
3618 dnl Check for system jpeg
3619 dnl ===================================================================
3620 AC_MSG_CHECKING([which jpeg to use])
3621 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
3622 test "$with_system_jpeg" != "no"; then
3623 AC_MSG_RESULT([external])
3625 AC_CHECK_HEADER(jpeglib.h, [],
3626 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
3627 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
3628 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
3630 AC_MSG_RESULT([internal])
3632 BUILD_TYPE="$BUILD_TYPE JPEG"
3634 AC_SUBST(SYSTEM_JPEG)
3636 dnl ===================================================================
3637 dnl Check for system expat
3638 dnl ===================================================================
3639 AC_MSG_CHECKING([which expat to use])
3640 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
3641 test "$with_system_expat" != "no"; then
3642 AC_MSG_RESULT([external])
3644 AC_CHECK_HEADER(expat.h, [],
3645 [AC_MSG_ERROR(expat.h not found. install expat)], [])
3646 AC_CHECK_LIB(expat, XML_ParserCreate, [],
3647 [AC_MSG_RESULT(expat library not found or functional.)], [])
3649 AC_MSG_RESULT([internal])
3651 BUILD_TYPE="$BUILD_TYPE EXPAT"
3653 AC_SUBST(SYSTEM_EXPAT)
3655 dnl ===================================================================
3656 dnl Check for system libwpd
3657 dnl ===================================================================
3658 AC_MSG_CHECKING([which libwpd to use])
3659 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
3660 test "$with_system_libwpd" != "no"; then
3661 AC_MSG_RESULT([external])
3663 PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
3665 AC_MSG_RESULT([internal])
3667 BUILD_TYPE="$BUILD_TYPE LIBWPD"
3669 AC_SUBST(SYSTEM_LIBWPD)
3670 AC_SUBST(LIBWPD_CFLAGS)
3671 AC_SUBST(LIBWPD_LIBS)
3673 dnl ===================================================================
3674 dnl Check whether freetype is available
3675 dnl ===================================================================
3676 if test "$test_freetype" = "yes"; then
3677 AC_MSG_CHECKING([whether freetype is available])
3678 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
3680 AC_SUBST(FREETYPE_CFLAGS)
3681 AC_SUBST(FREETYPE_LIBS)
3683 dnl ===================================================================
3684 dnl Check for system libwps
3685 dnl ===================================================================
3686 AC_MSG_CHECKING([which libwps to use])
3687 if test -n "$with_system_libwps" -o -n "$with_system_libs" && \
3688 test "$with_system_libwps" != "no"; then
3689 AC_MSG_RESULT([external])
3691 PKG_CHECK_MODULES( LIBWPS, libwps-0.1 )
3693 AC_MSG_RESULT([internal])
3695 BUILD_TYPE="$BUILD_TYPE LIBWPS"
3697 AC_SUBST(SYSTEM_LIBWPS)
3698 AC_SUBST(LIBWPS_CFLAGS)
3699 AC_SUBST(LIBWPS_LIBS)
3701 dnl ===================================================================
3702 dnl Check for system libwpg
3703 dnl ===================================================================
3704 AC_MSG_CHECKING([which libwpg to use])
3705 if test -n "$with_system_libwpg" -o -n "$with_system_libs" && \
3706 test "$with_system_libwpg" != "no"; then
3707 AC_MSG_RESULT([external])
3709 PKG_CHECK_MODULES( LIBWPG, libwpg-0.1 )
3711 AC_MSG_RESULT([internal])
3713 BUILD_TYPE="$BUILD_TYPE LIBWPG"
3715 AC_SUBST(SYSTEM_LIBWPG)
3716 AC_SUBST(LIBWPG_CFLAGS)
3717 AC_SUBST(LIBWPG_LIBS)
3719 dnl ===================================================================
3720 dnl Check whether freetype2 supports emboldening
3721 dnl ===================================================================
3722 if test "$test_freetype" = "yes"; then
3723 save_CPPFLAGS="$CPPFLAGS"
3724 save_LDFLAGS="$LDFLAGS"
3726 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
3727 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
3728 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
3729 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
3730 LDFLAGS="$save_LDFLAGS"
3731 CPPFLAGS="$save_CPPFLAGS"
3734 AC_SUBST(USE_FT_EMBOLDEN)
3736 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
3737 test "$with_system_libxslt" != "no"; then
3738 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
3739 test "$with_system_libxml" == "no"; then
3740 # somehow AC_MSG_WARN won't work...
3741 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
3742 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
3743 with_system_libxml=yes
3746 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
3747 test "$with_system_libxml" != "no"; then
3748 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
3749 test "$with_system_libxslt" == "no"; then
3750 # somehow AC_MSG_WARN won't work...
3751 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
3752 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
3753 with_system_libxslt=yes
3757 dnl ===================================================================
3758 dnl Check for system libxslt
3759 dnl ===================================================================
3760 AC_MSG_CHECKING([which libxslt to use])
3761 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
3762 "$_os" = "Darwin" && \
3763 test "$with_system_libxslt" != "no"; then
3764 AC_MSG_RESULT([external])
3767 PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
3769 dnl Check for xsltproc
3770 AC_PATH_PROG(XSLTPROC, xsltproc, no)
3771 if test "$XSLTPROC" = "no"; then
3772 AC_MSG_ERROR([xsltproc is required])
3775 AC_MSG_RESULT([internal])
3777 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
3779 AC_SUBST(SYSTEM_LIBXSLT)
3780 AC_SUBST(LIBXSLT_CFLAGS)
3781 AC_SUBST(LIBXSLT_LIBS)
3784 dnl ===================================================================
3785 dnl Check for system libxml
3786 dnl ===================================================================
3787 AC_MSG_CHECKING([which libxml to use])
3788 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
3789 "$_os" = "Darwin" && \
3790 test "$with_system_libxml" != "no"; then
3791 AC_MSG_RESULT([external])
3793 PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
3794 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
3796 AC_MSG_RESULT([internal])
3798 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
3800 AC_SUBST(SYSTEM_LIBXML)
3801 AC_SUBST(LIBXML_CFLAGS)
3802 AC_SUBST(LIBXML_LIBS)
3804 dnl ===================================================================
3805 dnl Check for system python
3806 dnl ===================================================================
3807 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
3808 with_system_python=yes
3810 AC_MSG_CHECKING([which python to use])
3811 if test -n "$with_system_python" -o -n "$with_system_libs" && \
3812 test "$with_system_python" != "no"; then
3814 AC_MSG_RESULT([external])
3815 AM_PATH_PYTHON([2.2])
3817 python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
3818 python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
3819 PYTHON_CFLAGS="-I$python_include"
3821 if test "$_os" = "Darwin"; then
3822 PYTHON_LIBS="-framework Python"
3824 PYTHON_LIBS="-lpython$python_version"
3827 dnl check if the headers really work:
3828 save_CPPFLAGS="$CPPFLAGS"
3829 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
3830 AC_CHECK_HEADER(Python.h, [],
3831 [AC_MSG_ERROR(Python headers not found)], [])
3832 CPPFLAGS="$save_CPPFLAGS"
3835 BUILD_TYPE="$BUILD_TYPE PYTHON"
3836 AC_MSG_RESULT([internal])
3837 # Embedded python dies without Home set
3838 if test "z$HOME" = "z"; then
3841 # bz2 tarball and bzip2 is not standard
3842 if test -z "$BZIP2"; then
3843 AC_PATH_PROG( BZIP2, bzip2)
3844 if test -z "$BZIP2"; then
3845 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
3849 AC_SUBST(SYSTEM_PYTHON)
3850 AC_SUBST(PYTHON_CFLAGS)
3851 AC_SUBST(PYTHON_LIBS)
3852 HOME=`echo $HOME | sed 's:\\\\:/:g'`
3855 dnl ===================================================================
3856 dnl Check for system berkley db
3857 dnl ===================================================================
3858 AC_MSG_CHECKING([which db to use])
3859 if test -n "$with_system_db" -o -n "$with_system_libs" && \
3860 test "$with_system_db" != "no"; then
3862 AC_MSG_RESULT([external])
3863 AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
3865 CFLAGS=-I/usr/include/db4
3866 AC_CHECK_HEADER(db4/db.h,
3867 [ DB_INCLUDES=/usr/include/db4 ],
3868 [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
3871 AC_MSG_CHECKING([whether db is at least 4.1])
3872 for v in `seq 1 7`; do
3876 int main(int argc, char **argv) {
3877 if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0;
3880 ], [DB_VERSION_MINOR=$v], [])
3882 if test "$DB_VERSION_MINOR" -gt "1"; then
3884 DB_VERSION=4.$DB_VERSION_MINOR
3886 AC_MSG_ERROR([no. you need at least db 4.1])
3889 #AC_CHECK_LIB(db, db_create, [],
3890 # [AC_MSG_ERROR([db library not installed or functional])], [])
3891 AC_HAVE_LIBRARY(db, [],
3892 [AC_MSG_ERROR([db not installed or functional])], [])
3893 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
3895 AC_MSG_RESULT([internal])
3897 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
3900 AC_SUBST(DB_VERSION)
3901 AC_SUBST(DB_INCLUDES)
3904 dnl ===================================================================
3905 dnl Check for system lucene
3906 dnl ===================================================================
3907 AC_MSG_CHECKING([which lucene to use])
3908 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
3909 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
3910 AC_MSG_RESULT([external])
3912 if test -z $LUCENE_CORE_JAR; then
3913 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
3914 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
3916 AC_CHECK_FILE(/usr/share/java/lucene.jar,
3917 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
3918 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
3923 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3924 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
3927 if test -z $LUCENE_ANALYZERS_JAR; then
3928 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
3929 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
3931 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
3932 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
3933 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
3938 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3939 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
3942 AC_MSG_RESULT([internal])
3944 BUILD_TYPE="$BUILD_TYPE LUCENE"
3946 AC_SUBST(SYSTEM_LUCENE)
3947 AC_SUBST(LUCENE_CORE_JAR)
3948 AC_SUBST(LUCENE_ANALYZERS_JAR)
3950 dnl ===================================================================
3951 dnl Check for system hsqldb
3952 dnl ===================================================================
3953 AC_MSG_CHECKING([which hsqldb to use])
3954 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
3955 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
3956 AC_MSG_RESULT([external])
3958 if test -z $HSQLDB_JAR; then
3959 HSQLDB_JAR=/usr/share/java/hsqldb.jar
3961 AC_CHECK_FILE($HSQLDB_JAR, [],
3962 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
3963 AC_MSG_CHECKING([whether hsqldb is >= 1.8.0.9])
3965 if $PERL -e 'use Archive::Zip;
3966 my $file = "$ENV{'HSQLDB_JAR'}";
3967 my $zip = Archive::Zip->new( $file );
3968 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
3969 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
3970 push @l, split(/\n/, $mf);
3971 foreach my $line (@l) {
3972 if ($line =~ m/Specification-Version:/) {
3973 ($t, $version) = split (/:/,$line);
3974 $version =~ s/^\s//;
3975 ($a, $b, $c, $d) = split (/\./,$version);
3976 if (($c == "0" && $d > "8") || $c > 0) {
3986 AC_MSG_RESULT([yes])
3988 AC_MSG_ERROR([no, hsqldb >= 1.8.0.9 is needed])
3991 AC_MSG_RESULT([internal])
3993 BUILD_TYPE="$BUILD_TYPE HSQLDB"
3995 AC_SUBST(SYSTEM_HSQLDB)
3996 AC_SUBST(HSQLDB_JAR)
3998 dnl ===================================================================
3999 dnl Check for PostgreSQL stuff
4000 dnl ===================================================================
4001 AC_PATH_PROG(PGCONFIG, pg_config)
4002 if test -z "$PGCONFIG"; then
4003 AC_MSG_ERROR([pg_config needed])
4007 CFLAGS="-I`pg_config --includedir`"
4008 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
4009 AC_HAVE_LIBRARY(pq, [], [AC_MSG_ERROR(libpq is needed)], [])
4012 SYSTEM_POSTGRESQL=YES # only option atm :-)
4013 AC_SUBST(SYSTEM_POSTGRESQL)
4015 dnl ===================================================================
4016 dnl Check for system beanshell
4017 dnl ===================================================================
4018 AC_MSG_CHECKING([which beanshell to use])
4019 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
4020 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
4021 AC_MSG_RESULT([external])
4023 if test -z $BSH_JAR; then
4024 BSH_JAR=/usr/share/java/bsh.jar
4026 AC_CHECK_FILE($BSH_JAR, [],
4027 [AC_MSG_ERROR(bsh.jar not found.)], [])
4029 AC_MSG_RESULT([internal])
4031 BUILD_TYPE="$BUILD_TYPE BSH"
4033 AC_SUBST(SYSTEM_BSH)
4037 dnl ===================================================================
4038 dnl Check for system saxon
4039 dnl ===================================================================
4040 AC_MSG_CHECKING([which saxon to use])
4041 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
4042 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
4043 AC_MSG_RESULT([external])
4045 if test -z $SAXON_JAR; then
4046 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4047 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4049 AC_CHECK_FILE(/usr/share/java/saxon.jar,
4050 [ SAXON_JAR=/usr/share/java/saxon.jar ],
4051 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4052 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4053 [ AC_MSG_ERROR(saxon.jar replacement not found)]
4060 AC_CHECK_FILE($SAXON_JAR, [],
4061 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
4063 if test -n "$SERIALIZER_JAR"; then
4064 AC_CHECK_FILE($SERIALIZER_JAR, [],
4065 [AC_MSG_ERROR(serializer.jar not found.)], [])
4066 AC_SUBST(SERIALIZER_JAR)
4069 AC_MSG_RESULT([internal])
4073 AC_SUBST(SYSTEM_SAXON)
4076 if test -n "$NEED_SAXON"; then
4077 BUILD_TYPE="$BUILD_TYPE SAXON"
4080 dnl ===================================================================
4081 dnl Check for system curl
4082 dnl ===================================================================
4083 if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
4084 with_system_curl=yes
4086 AC_MSG_CHECKING([which curl to use])
4087 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
4088 test "$with_system_curl" != "no"; then
4089 AC_MSG_RESULT([external])
4092 AC_PATH_PROG( CURLCONFIG, curl-config)
4093 if test -z "$CURLCONFIG"; then
4094 AC_MSG_ERROR([install curl to run this script])
4097 # check curl version
4098 AC_MSG_CHECKING([whether curl is >= 7.9.8])
4099 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
4100 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "9" -a \
4101 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "8"; then
4102 AC_MSG_ERROR([no, you need at least curl 7.9,8])
4104 AC_MSG_RESULT([yes])
4106 CURL_LIBS=`$CURLCONFIG --libs`
4107 CURL_CFLAGS=`$CURLCONFIG --cflags`
4109 AC_MSG_RESULT([internal])
4111 BUILD_TYPE="$BUILD_TYPE CURL"
4113 AC_SUBST(SYSTEM_CURL)
4114 AC_SUBST(CURL_CFLAGS)
4117 dnl ===================================================================
4118 dnl Check for system boost
4119 dnl ===================================================================
4120 AC_MSG_CHECKING([which boost to use])
4121 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
4122 test "$with_system_boost" != "no"; then
4123 AC_MSG_RESULT([external])
4126 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
4127 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
4128 AC_CHECK_HEADER(boost/spirit/core.hpp, [],
4129 [AC_MSG_ERROR(boost/spirit/core.hpp not found. install boost)], [])
4132 AC_MSG_RESULT([internal])
4133 BUILD_TYPE="$BUILD_TYPE BOOST"
4136 AC_SUBST(SYSTEM_BOOST)
4138 dnl ===================================================================
4139 dnl Check for system vigra
4140 dnl ===================================================================
4141 AC_MSG_CHECKING([which vigra to use])
4142 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
4143 test "$with_system_vigra" != "no"; then
4144 AC_MSG_RESULT([external])
4147 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
4148 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
4151 AC_MSG_RESULT([internal])
4152 BUILD_TYPE="$BUILD_TYPE VIGRA"
4155 AC_SUBST(SYSTEM_VIGRA)
4157 dnl ===================================================================
4158 dnl Check for system odbc
4159 dnl ===================================================================
4160 AC_MSG_CHECKING([which odbc headers to use])
4161 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
4162 test "$with_system_odbc_headers" != "no"; then
4163 AC_MSG_RESULT([external])
4164 SYSTEM_ODBC_HEADERS=YES
4166 AC_CHECK_HEADER(sqlext.h, [],
4167 [AC_MSG_ERROR(odbc not found. install odbc)], [])
4169 AC_MSG_RESULT([internal])
4170 SYSTEM_ODBC_HEADERS=NO
4171 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
4173 AC_SUBST(SYSTEM_ODBC_HEADERS)
4175 AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components])
4176 if test "$enable_mozilla" = "no"; then
4180 AC_MSG_RESULT([yes])
4183 AC_SUBST(WITH_MOZILLA)
4185 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
4186 if test "$enable_mozilla" = "no"; then
4188 elif test "$with_system_mozilla" = "yes"; then
4189 AC_MSG_RESULT([no, not possible with system-mozilla])
4191 AC_MSG_RESULT([yes])
4194 AC_MSG_CHECKING([whether to build XML Security support])
4195 if test "$enable_mozilla" = "no"; then
4196 AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
4198 AC_MSG_RESULT([yes])
4201 AC_MSG_CHECKING([whether to build LDAP configuration backend])
4202 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
4203 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
4204 AC_MSG_RESULT([yes])
4207 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
4215 if test "$WITH_LDAP" = "YES"; then
4216 dnl ===================================================================
4217 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
4218 dnl ===================================================================
4219 AC_MSG_CHECKING([which LDAP SDK to use])
4220 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
4221 AC_MSG_RESULT([OpenLDAP])
4223 AC_CHECK_HEADERS(ldap.h, [],
4224 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
4225 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
4226 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4227 # rumours say that OpenLDAP doesn't have that function. I looked and
4228 # it has it. Test for it to be sure
4229 AC_CHECK_LIB(ldap, ldap_set_option, [],
4230 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4232 AC_MSG_RESULT([Netscape/Mozilla])
4233 # TODO. Actually do a sanity check and check for
4234 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
4239 AC_SUBST(WITH_OPENLDAP)
4241 dnl ===================================================================
4242 dnl Check for system mozilla
4243 dnl ===================================================================
4244 AC_MSG_CHECKING([which mozilla to use])
4245 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
4246 AC_MSG_RESULT([external])
4248 AC_MSG_CHECKING([which Mozilla flavour to use])
4249 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
4251 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
4252 MOZ_FLAVOUR=xulrunner
4253 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
4254 MOZ_FLAVOUR=seamonkey
4255 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
4257 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
4262 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
4265 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
4266 if test -z "$STANDALONENSS"; then
4267 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
4269 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
4273 if $PKG_CONFIG --exists nspr ; then
4274 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
4275 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
4278 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
4281 if test "$MOZ_FLAVOUR" != "libxul"; then
4282 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
4283 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
4284 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
4287 if test -z "$HASXPCOM"; then
4288 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
4289 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
4290 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
4291 if ! test -e "$MOZ_LIB/libxul.so"; then
4292 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
4293 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
4294 MOZ_LIB="$MOZ_LIB/sdk/lib"
4299 save_CPPFLAGS="$CPPFLAGS"
4300 save_LDFLAGS="$LDFLAGS"
4302 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
4303 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
4304 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
4305 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
4306 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
4307 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
4308 LDFLAGS="$save_LDFLAGS"
4309 CPPFLAGS="$save_CPPFLAGS"
4312 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
4313 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
4314 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
4315 if test -d "$MOZ_INC/ldap"; then
4316 AC_MSG_RESULT([yes])
4317 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
4320 Could not find LDAP header include files in $MOZ_INC/ldap.
4321 Please recompile $tmp with --enable-ldap or use --with-openldap.])
4325 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
4326 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
4327 if test "$MOZ_FLAVOUR" == "libxul"; then
4328 MOZ_FLAVOUR="mozilla"
4331 elif test "$enable_mozilla" = "no"; then
4332 AC_MSG_RESULT([none])
4335 AC_MSG_RESULT([internal])
4337 BUILD_TYPE="$BUILD_TYPE MOZ"
4338 if test -z "$with_mozilla_version"; then
4341 AC_MSG_CHECKING([which mozilla version to build])
4342 MOZILLA_VERSION=$with_mozilla_version
4343 enable_build_mozilla=1
4344 AC_MSG_RESULT([$MOZILLA_VERSION])
4347 AC_SUBST(MOZILLA_VERSION)
4349 AC_MSG_CHECKING([for toolkit mozilla should use])
4350 if test -z "$with_mozilla_toolkit"; then
4351 if test "$_os" != "WINNT" ; then
4352 if test "$_os" = "Darwin" ; then
4354 AC_MSG_RESULT([mac])
4356 MOZILLA_TOOLKIT=gtk2
4357 AC_MSG_RESULT([gtk2])
4361 MOZILLA_TOOLKIT=$with_mozilla_toolkit
4362 enable_build_mozilla=1
4363 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
4365 #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then
4366 # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not
4367 # #available using fink, mac (carbon) doesn't work because xcode installs conflicting headers
4368 # AC_MSG_ERROR([Only gtk2 toolkit supported on Mac, sorry.])
4371 AC_SUBST(MOZILLA_TOOLKIT)
4373 # default to enabling build mozilla
4374 if test "$enable_build_mozilla" != "no"; then
4375 enable_build_mozilla=yes
4377 enable_build_mozilla=
4380 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
4381 if test -n "$enable_build_mozilla"; then
4383 AC_MSG_RESULT([yes])
4389 if test "$BUILD_MOZAB" = "TRUE"; then
4390 if test "$_os" = "WINNT"; then
4391 if test "$WITH_MINGWIN" != "yes"; then
4392 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
4393 if test "$MSVSVER" != "2005"; then
4394 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
4397 AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
4398 echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
4402 if test -z "$MOZILLA_VERSION"; then
4403 MOZILLA_VERSION=1.1.13
4405 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
4407 AC_MSG_CHECKING([for $MOZILLA_SOURCE_VERSION.tar.$e])
4408 if test ! -e "moz/download/$MOZILLA_SOURCE_VERSION.tar.$e" && test "$HAVE_MOZILLA_TARBALL" != "y"; then
4409 AC_MSG_RESULT([not found])
4410 HAVE_MOZILLA_TARBALL=n
4412 AC_MSG_RESULT([found])
4413 HAVE_MOZILLA_TARBALL=y
4416 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
4417 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
4418 Please copy $MOZILLA_SOURCE_VERSION.tar.bz2 or $MOZILLA_SOURCE_VERSION.tar.gz to moz/download/.
4419 The archives can be found here:
4420 http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/$MOZILLA_VERSION/])
4422 if test "$_os" = "WINNT"; then
4423 AC_MSG_CHECKING([for moztools binaries])
4424 if test ! -e "moz/download/vc8-moztools.zip" ; then
4425 AC_MSG_ERROR([The following file is missing in moz/download: vc8-moztools.zip
4426 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
4430 elif test "$_os" = "Darwin"; then
4431 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4432 AC_MSG_NOTICE([checking whether mozilla can be built...])
4433 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]))
4435 PKG_CHECK_MODULES(MOZLIBREQ, libIDL >= 0.6.3 libIDL <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4436 if test -z "$MOZIDL"; then
4437 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4441 # Generic Unix/Linux section
4442 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4443 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
4444 if test -z "$MOZGTK"; then
4445 AC_MSG_ERROR([GTK2 is needed to build mozilla.])
4447 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
4448 if test -z "$MOZIDL"; then
4449 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.])
4452 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
4453 if test -z "$MOZGTK"; then
4454 AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.])
4456 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4457 if test -z "$MOZIDL"; then
4458 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4464 AC_SUBST(BUILD_MOZAB)
4467 AC_SUBST(SYSTEM_MOZILLA)
4468 AC_SUBST(MOZ_FLAVOUR)
4471 AC_SUBST(MOZ_LIB_XPCOM)
4472 AC_SUBST(MOZ_NSPR_CFLAGS)
4473 AC_SUBST(MOZ_NSS_CFLAGS)
4474 AC_SUBST(MOZ_LDAP_CFLAGS)
4476 dnl ===================================================================
4477 dnl Check for system sane
4478 dnl ===================================================================
4479 AC_MSG_CHECKING([which sane header to use])
4480 if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \
4481 test "$with_system_sane_header" != "no"; then
4482 AC_MSG_RESULT([external])
4483 SYSTEM_SANE_HEADER=YES
4484 AC_CHECK_HEADER(sane/sane.h, [],
4485 [AC_MSG_ERROR(sane not found. install sane)], [])
4487 AC_MSG_RESULT([internal])
4488 SYSTEM_SANE_HEADER=NO
4489 BUILD_TYPE="$BUILD_TYPE SANE"
4491 AC_SUBST(SYSTEM_SANE_HEADER)
4493 dnl ===================================================================
4494 dnl Check for system icu
4495 dnl ===================================================================
4496 AC_MSG_CHECKING([which icu to use])
4497 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
4498 test "$with_system_icu" != "no"; then
4499 AC_MSG_RESULT([external])
4502 AC_MSG_CHECKING([for unicode/rbbi.h])
4503 AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
4504 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
4505 if test -z "$SYSTEM_GENBRK"; then
4506 AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
4508 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
4509 if test -z "$SYSTEM_GENCCODE"; then
4510 AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
4512 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
4513 if test -z "$SYSTEM_GENCMN"; then
4514 AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
4516 AC_MSG_CHECKING([ICU version])
4518 #include <unicode/uversion.h>
4520 int main(int argc, char **argv) {
4521 if(U_ICU_VERSION_MAJOR_NUM < 4)
4526 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])])
4529 AC_MSG_RESULT([internal])
4531 BUILD_TYPE="$BUILD_TYPE ICU"
4533 AC_SUBST(SYSTEM_ICU)
4534 AC_SUBST(SYSTEM_GENBRK)
4535 AC_SUBST(SYSTEM_GENCCODE)
4536 AC_SUBST(SYSTEM_GENCMN)
4538 dnl ===================================================================
4539 dnl Checks for libraries.
4540 dnl ===================================================================
4541 dnl Check for Mac OS X native GUI, which may be used instead of X11.
4542 dnl Check for a lack of --with-x option on Darwin. If it is missing, look to
4543 dnl see if we have the AppKit framework for building with Quartz graphics.
4545 if test "$_os" = "Darwin" -a "x$with_x" != "xyes" -a "x$x_includes" = "xNONE" -a "x$x_libraries" = "xNONE"; then
4546 dnl System is either Mac OS X or pure Darwin, and --with-x was not specified
4547 dnl Default to Aqua graphics if available.
4548 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
4549 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
4550 AC_MSG_RESULT([yes])
4551 x_includes="no_x_includes"
4552 x_libraries="no_x_libraries"
4553 dnl disable some things used on other Unix versions but not on the aqua build
4557 AC_SUBST(ENABLE_CUPS)
4560 dnl Probably a pure Darwin system. Check for X11 below.
4564 dnl ***************************************
4565 dnl testing for X libraries and includes...
4566 dnl ***************************************
4567 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
4568 echo "Do Nothing for _os = Darwin and x_includes = no_x_includes"
4569 dnl Mac OS X using Aqua graphics. Don't check for X11.
4571 elif test "$_os" = "OS2" ; then
4572 echo "Do Nothing for _os = OS2. Don't check for X11."
4573 dnl OS/2 uses native graphics. Don't check for X11.
4575 elif test "$_os" != "WINNT" ; then
4578 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4580 if test "x$x_includes" = "x"; then
4581 x_includes="default_x_includes"
4583 if test "x$x_libraries" = "x"; then
4584 x_libraries="default_x_libraries"
4586 dnl The variables $x_libraries and $x_includes are set.
4587 if test -z "$x_libraries"; then
4588 AC_MSG_ERROR([No X libraries found]) # Exit
4590 if test -z "$x_includes"; then
4591 AC_MSG_ERROR([No X includes found]) # Exit
4594 LDFLAGS="$X_LDFLAGS $X_LIBS"
4595 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
4596 dnl Check if the XauDisposeAuth symbol is provided by libXau.
4597 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
4599 x_includes="no_x_includes"
4600 x_libraries="no_x_libraries"
4602 if test -z "$x_includes"; then
4603 x_includes="no_x_includes"
4605 if test -z "$x_libraries"; then
4606 x_libraries="no_x_libraries"
4608 if test "$x_includes" = "default_x_includes"; then
4614 if test "$x_libraries" = "default_x_libraries"; then
4615 XLIB=`$PKG_CONFIG --variable=libdir x11`
4616 if test "x$XLIB" = x; then
4625 if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then
4626 dnl ===================================================================
4627 dnl Check for using Xaw
4628 dnl ===================================================================
4629 AC_MSG_CHECKING([whether to use Xaw])
4630 if test "$enable_Xaw" = "no"; then
4633 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt include headers not found])],
4634 [#include <X11/Intrinsic.h>])
4636 AC_MSG_RESULT([yes])
4637 AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])])
4638 AC_CHECK_LIB(Xaw, main, [],
4639 [AC_MSG_ERROR(Xaw library not found or functional)], [])
4642 AC_SUBST(DISABLE_XAW)
4646 dnl ===================================================================
4647 dnl Check if fontconfig/fontconfig.h is available
4648 dnl ===================================================================
4649 if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
4650 AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
4651 [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
4652 AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
4654 #include <fontconfig/fontconfig.h>
4656 int main(int argc, char **argv) {
4657 if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
4660 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
4663 dnl ===================================================================
4664 dnl Check for system Xrender
4665 dnl ===================================================================
4666 AC_MSG_CHECKING([whether to link to Xrender])
4667 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
4668 AC_MSG_RESULT([yes])
4670 with_system_xrender_headers=yes
4672 AC_MSG_RESULT([no, dynamically open it])
4675 AC_MSG_CHECKING([which Xrender headers to use])
4676 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
4677 test "$with_system_xrender_headers" != "no"; then
4678 AC_MSG_RESULT([external])
4679 SYSTEM_XRENDER_HEADERS=YES
4680 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
4681 [AC_MSG_ERROR(Xrender not found. install X)], [])
4683 AC_MSG_RESULT([internal])
4684 SYSTEM_XRENDER_HEADERS=NO
4685 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
4687 if test "$XRENDER_LINK" = "YES"; then
4688 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
4689 [AC_MSG_ERROR(libXrender not found or functional)], [])
4691 AC_SUBST(SYSTEM_XRENDER_HEADERS)
4692 AC_SUBST(XRENDER_LINK)
4694 dnl ===================================================================
4695 dnl Check for XRandr
4696 dnl ===================================================================
4697 AC_MSG_CHECKING([whether to enable RandR support])
4698 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
4699 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
4700 XRANDR_DLOPEN="TRUE"
4701 AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
4703 XRANDR_DLOPEN="FALSE"
4704 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
4705 if test "$ENABLE_RANDR" != "TRUE"; then
4706 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
4707 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
4709 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
4710 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
4711 XRANDR_LIBS="-lXrandr "
4713 AC_MSG_RESULT([enabling RandR support])
4720 AC_SUBST(XRANDR_DLOPEN)
4721 AC_SUBST(XRANDR_CFLAGS)
4722 AC_SUBST(XRANDR_LIBS)
4723 AC_SUBST(ENABLE_RANDR)
4725 dnl ===================================================================
4726 dnl Check for system Mesa
4727 dnl ===================================================================
4728 AC_MSG_CHECKING([which Mesa headers to use])
4729 if test "$with_system_mesa_headers" == "no"; then
4730 AC_MSG_RESULT([internal])
4731 SYSTEM_MESA_HEADERS=NO
4732 BUILD_TYPE="$BUILD_TYPE MESA"
4734 AC_MSG_RESULT([external])
4735 SYSTEM_MESA_HEADERS=YES
4737 AC_SUBST(SYSTEM_MESA_HEADERS)
4739 dnl ===================================================================
4740 dnl Check for building neon
4741 dnl ===================================================================
4742 AC_MSG_CHECKING([whether to use neon])
4743 if test "$enable_neon" = "no"; then
4746 AC_SUBST(DISABLE_NEON)
4748 AC_MSG_RESULT([yes])
4749 dnl ===================================================================
4750 dnl Check for system neon
4751 dnl ===================================================================
4752 AC_MSG_CHECKING([which neon to use])
4753 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
4754 test "$with_system_neon" != "no"; then
4755 AC_MSG_RESULT([external])
4756 PKG_CHECK_MODULES(NEON, neon >= 0.24.0, , AC_MSG_ERROR([you need neon >= 0.24.x for system-neon]))
4757 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
4758 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
4761 AC_MSG_RESULT([internal])
4765 BUILD_TYPE="$BUILD_TYPE NEON"
4767 dnl ===================================================================
4768 dnl Check for system openssl (only neon needs it!)
4769 dnl ===================================================================
4770 if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
4771 with_system_openssl=yes
4773 AC_MSG_CHECKING([which libssl to use])
4774 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
4775 test "$with_system_openssl" != "no"; then
4776 AC_MSG_RESULT([external])
4777 # Mac OS builds should get out without extra stuff is the Mac porters'
4778 # wish. And pkg-config is although Xcode ships a .pc for openssl
4779 if test "$_os" = "Darwin"; then
4781 OPENSSL_LIBS="-lssl -lcrypto"
4783 PKG_CHECK_MODULES( OPENSSL, openssl )
4787 AC_MSG_RESULT([internal])
4789 BUILD_TYPE="$BUILD_TYPE OPENSSL"
4791 AC_SUBST(SYSTEM_OPENSSL)
4792 AC_SUBST(OPENSSL_CFLAGS)
4793 AC_SUBST(OPENSSL_LIBS)
4795 AC_SUBST(SYSTEM_NEON)
4796 AC_SUBST(NEON_VERSION)
4798 AC_SUBST(NEON_CFLAGS)
4801 dnl ===================================================================
4802 dnl Test for disabling agg
4803 dnl ===================================================================
4804 AC_MSG_CHECKING([whether to enable agg])
4805 if test "$with_agg" = "no"; then
4808 AC_MSG_RESULT([yes])
4810 AC_SUBST(ENABLE_AGG)
4812 dnl ===================================================================
4813 dnl Check for system AGG
4814 dnl ===================================================================
4815 AC_MSG_CHECKING([which AGG to use])
4816 if test -n "$with_system_agg" -o -n "$with_system_libs" && \
4817 test "$with_system_agg" != "no"; then
4818 AC_MSG_RESULT([external])
4819 PKG_CHECK_MODULES(AGG, libagg >= 2.3)
4820 AC_MSG_CHECKING([agg version])
4821 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
4822 # (/usr/include gets stripped from pkg-config output)
4823 if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
4824 AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
4826 AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
4828 if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
4829 $PKG_CONFIG --modversion libagg | grep -q 2.4; then
4830 # 2.4's libagg.pc.in still contains 2.3 :/
4831 if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
4832 AC_MSG_RESULT([2.4])
4835 AC_MSG_RESULT([2.3])
4840 AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
4843 AC_MSG_RESULT([internal])
4846 BUILD_TYPE="$BUILD_TYPE AGG"
4848 AC_SUBST(SYSTEM_AGG)
4849 AC_SUBST(AGG_VERSION)
4852 dnl ===================================================================
4853 dnl Check for system redland
4854 dnl ===================================================================
4855 AC_MSG_CHECKING([which redland library to use])
4856 dnl if test -n "$with_system_redland" -o -n "$with_system_libs" && \
4857 dnl test "$with_system_redland" != "no"; then
4858 dnl mst: NOTE: right now we need patches against redland
4859 dnl so we only enable system redland if explicitly requested
4860 dnl if next version includes patches, insert version check here
4861 if test -n "$with_system_redland" && \
4862 test "$with_system_redland" != "no"; then
4863 AC_MSG_RESULT([external])
4865 PKG_CHECK_MODULES(REDLAND, redland)
4867 AC_MSG_RESULT([internal])
4868 BUILD_TYPE="$BUILD_TYPE REDLAND"
4871 AC_SUBST(SYSTEM_REDLAND)
4872 AC_SUBST(REDLAND_LIBS)
4874 dnl ===================================================================
4875 dnl Check for system hunspell
4876 dnl ===================================================================
4877 AC_MSG_CHECKING([which libhunspell to use])
4878 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
4879 test "$with_system_hunspell" != "no"; then
4880 AC_MSG_RESULT([external])
4883 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
4884 if test "$HUNSPELL_PC" != "TRUE"; then
4885 AC_CHECK_HEADER(hunspell.hxx, [],
4887 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
4888 [AC_MSG_ERROR(hunspell headers not found.)], [])
4890 AC_CHECK_LIB(hunspell, main, [],
4891 [ AC_MSG_ERROR(hunspell library not found.) ], [])
4892 HUNSPELL_LIBS=-lhunspell
4896 AC_MSG_RESULT([internal])
4898 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
4900 AC_SUBST(SYSTEM_HUNSPELL)
4901 AC_SUBST(HUNSPELL_CFLAGS)
4902 AC_SUBST(HUNSPELL_LIBS)
4904 dnl ===================================================================
4905 dnl Checking for altlinuxhyph
4906 dnl ===================================================================
4907 AC_MSG_CHECKING([which altlinuxhyph to use])
4908 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
4909 test "$with_system_altlinuxhyph" != "no"; then
4910 AC_MSG_RESULT([external])
4912 AC_CHECK_HEADER(hyphen.h, [],
4913 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
4914 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
4915 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
4916 [#include <hyphen.h>])
4917 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
4918 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
4919 if test -z "$HYPHEN_LIB"; then
4920 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
4921 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
4923 if test -z "$HYPHEN_LIB"; then
4924 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
4925 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
4928 AC_MSG_RESULT([internal])
4931 AC_SUBST(SYSTEM_HYPH)
4932 AC_SUBST(HYPHEN_LIB)
4934 dnl ===================================================================
4935 dnl Checking for mythes
4936 dnl ===================================================================
4937 AC_MSG_CHECKING([which mythes to use])
4938 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
4939 AC_MSG_RESULT([external])
4941 AC_CHECK_HEADER(mythes.hxx, [],
4942 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
4943 AC_CHECK_LIB(mythes, main, [],
4944 [ AC_MSG_ERROR(mythes library not found.)], [])
4946 AC_MSG_RESULT([internal])
4949 AC_SUBST(SYSTEM_MYTHES)
4951 dnl ===================================================================
4952 dnl Checking for lpsolve
4953 dnl ===================================================================
4954 AC_MSG_CHECKING([which lpsolve to use])
4955 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
4956 test "$with_system_lpsolve" != "no"; then
4957 AC_MSG_RESULT([external])
4959 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
4960 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
4961 AC_CHECK_LIB(lpsolve55, make_lp, ,
4962 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
4964 AC_MSG_RESULT([internal])
4966 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
4968 AC_SUBST(SYSTEM_LPSOLVE)
4970 dnl ***************************************
4971 dnl testing libc version for Linux...
4972 dnl ***************************************
4973 if test "$_os" = "Linux"; then
4974 AC_MSG_CHECKING([whether libc is >= 2.1.1])
4975 exec 6>/dev/null # no output
4976 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
4977 exec 6>&1 # output on again
4978 if test "$HAVE_LIBC"; then
4979 AC_MSG_RESULT([yes])
4981 AC_MSG_ERROR([no, upgrade libc])
4985 dnl =========================================
4986 dnl Check for the Microsoft Platform SDK.
4987 dnl =========================================
4988 dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
4989 dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
4990 if test \( "$_os" = "WINNT" \) ; then
4991 AC_MSG_CHECKING([for PSDK files])
4992 if test -z "$with_psdk_home"; then
4993 # This first line will detect a February 2003 Microsoft Platform SDK
4994 PSDK_HOME=`./oowintool --psdk-home`
4995 # But there might be also an April 2005 PSDK, unfortunately MS changed
4996 # the registry entry. (we prefer the old version!?)
4997 if test -z "$PSDK_HOME"; then
4998 PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
5000 # normalize if found
5001 if test -n "$PSDK_HOME"; then
5002 PSDK_HOME=`cygpath -d "$PSDK_HOME"`
5003 PSDK_HOME=`cygpath -u "$PSDK_HOME"`
5006 PSDK_HOME=`cygpath -u "$with_psdk_home"`
5008 # Remove a possible trailing backslash
5009 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
5010 # Problem with current PSDK (iz 49865)
5011 if test -f "$PSDK_HOME/Lib/libcp.lib"; then
5014 Some modules do not build correctly with MS Platform SDK - April 2005
5015 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
5016 Remove/rename/backup that file and restart configure. Details about this
5017 problem can be found in issue 49856.])
5019 # WIndows SDK has different headers
5020 if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
5021 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
5022 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
5027 if test -f "$PSDK_HOME/lib/unicows.lib"; then
5032 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
5033 AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
5034 are installed or use --with-psdk-home .])
5036 if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
5037 -o ! -x "$PSDK_HOME/bin/msidb.exe" \
5038 -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
5039 -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
5040 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
5042 AC_MSG_RESULT([SDK files found ...)])
5043 dnl Check if this is the right SDK.
5044 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
5045 AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
5046 WINDOWS_VISTA_PSDK=TRUE
5047 elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
5048 AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
5049 WINDOWS_VISTA_PSDK=TRUE
5051 AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
5055 AC_SUBST(WINDOWS_VISTA_PSDK)
5057 dnl =========================================
5058 dnl Check for the Microsoft DirectX SDK.
5059 dnl =========================================
5060 if test \( "$_os" = "WINNT" \) ; then
5061 AC_MSG_CHECKING([for DirectX SDK files])
5062 if test -z "$with_directx_home"; then
5063 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
5064 if test -n "$DXSDK_DIR"; then
5065 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
5066 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
5068 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
5069 # the "DirectX SDK files not found" error later
5071 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
5073 # Remove a possible trailing backslash
5074 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
5076 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
5077 HAVE_DIRECTXSDK_H="yes"
5079 HAVE_DIRECTXSDK_H="no"
5081 # MS changed the location of the libraries with dec 2004 directx sdk
5082 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
5083 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
5085 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
5087 if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
5088 HAVE_DIRECTXSDK_LIB="yes"
5090 HAVE_DIRECTXSDK_LIB="no"
5092 if test -n "$ENABLE_DIRECTX"; then
5093 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
5094 AC_MSG_RESULT([found])
5096 AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
5100 AC_MSG_RESULT([disabled])
5103 AC_SUBST(DIRECTXSDK_HOME)
5104 AC_SUBST(DIRECTXSDK_LIB)
5106 dnl ============================================
5107 dnl Check for Nullsoft Scriptable Install System
5108 dnl ============================================
5110 if test "$_os" = "WINNT" ; then
5111 AC_MSG_CHECKING([for NSIS])
5112 AC_PATH_PROG(NSIS_PATH, nsis.exe)
5113 if test -n "$NSIS_PATH"; then
5114 NSIS_PATH=`dirname "$NSIS_PATH"`
5116 if test -n "$with_nsis_path"; then
5117 with_nsis_path=`cygpath -u "$with_nsis_path"`
5119 if test -e "$with_nsis_path/nsis.exe"; then
5120 NSIS_PATH="$with_nsis_path"
5122 nsistest=`./oowintool --nsis-dir`;
5123 if test -x "$nsistest/nsis.exe"; then
5124 NSIS_PATH="$nsistest"
5126 if test -z "$NSIS_PATH"; then
5127 AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
5128 echo "NSIS not found, no self contained installer will be build." >> warn
5130 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5131 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5132 AC_MSG_RESULT([found ($NSIS_PATH)])
5137 dnl ***************************************
5138 dnl testing bison and flex exist
5139 dnl ***************************************
5140 AC_PATH_PROG(BISON, bison)
5141 if test -z "$BISON"; then
5142 AC_MSG_ERROR([no bison found in \$PATH, install bison])
5144 AC_MSG_CHECKING([the bison version])
5145 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
5146 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
5147 # Accept newer than 1.875 or older(equal) than 1.75
5148 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
5149 if test "$_bison_version" = "1.875" ; then
5150 AC_MSG_WARN([suspect ($BISON $_bison_version)])
5151 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
5153 AC_MSG_RESULT([checked ($BISON $_bison_version)])
5156 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
5159 AC_PATH_PROG(FLEX, flex)
5160 if test -z "$FLEX"; then
5161 AC_MSG_ERROR([no flex found in \$PATH, install flex])
5163 dnl ***************************************
5164 dnl testing that patch exists
5165 dnl ***************************************
5166 AC_PATH_PROG(PATCH, patch)
5167 if test -z "$PATCH"; then
5168 AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
5171 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
5172 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
5173 if test -z "$with_gnu_patch"; then
5176 if test -x "$with_gnu_patch"; then
5177 GNUPATCH=$with_gnu_patch
5179 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
5183 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
5184 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5185 AC_MSG_RESULT([yes])
5187 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
5190 dnl We also need to check for --with-gnu-cp
5192 if test -z "$with_gnu_cp"; then
5193 AC_PATH_PROGS(GNUCP, gnucp cp)
5194 if test -z $GNUCP; then
5195 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
5198 if test -x "$with_gnu_cp"; then
5201 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
5205 AC_MSG_CHECKING([whether $GNUCP is GNU cp])
5206 if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5207 AC_MSG_RESULT([yes])
5209 if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
5210 AC_MSG_RESULT([yes])
5212 if test "$_os" = "Darwin"; then
5214 AC_MSG_RESULT([no gnucp found - using the system's cp command])
5216 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
5225 dnl ***************************************
5226 dnl testing bash tools path on Windows
5227 dnl ***************************************
5228 if test "$_os" = "WINNT"; then
5230 AC_PATH_PROG(CYGWIN_PATH, bash)
5231 CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
5233 if test -z "$CYGWIN_PATH"; then
5234 CYGWIN_PATH="NO_CYGWIN"
5236 AC_SUBST(CYGWIN_PATH)
5238 dnl ***************************************
5239 dnl testing ml.exe assembler path
5240 dnl ***************************************
5241 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5242 AC_MSG_CHECKING([ml.exe assembler path])
5243 if test -n "$with_asm_home"; then
5244 with_asm_home=`cygpath -u "$with_asm_home"`
5246 if test ! -x "$with_asm_home/ml.exe"; then
5247 AC_PATH_PROG(ML_EXE, ml.exe)
5248 if test -z "$ML_EXE"; then
5249 if test -x "$with_cl_home/bin/ml.exe"; then
5250 with_asm_home=$with_cl_home/bin
5251 AC_MSG_RESULT([found ($with_asm_home)])
5253 AC_MSG_ERROR([Configure did not find ml.exe assembler.])
5256 with_asm_home="ASM_IN_PATH"
5260 with_asm_home="NO_ASM_HOME"
5262 ASM_HOME="$with_asm_home"
5263 if test -n "$ASM_HOME"; then
5264 AC_MSG_RESULT([$ASM_HOME])
5268 dnl ===================================================================
5269 dnl testing handle deprecated unzip switch
5270 dnl ===================================================================
5271 if test -z "$with_zip_home"; then
5272 with_zip_home="$with_unzip_home"
5274 dnl ===================================================================
5275 dnl Zip will be found where you tell me to find it
5276 dnl ===================================================================
5277 if test -n "$with_zip_home" ; then
5278 if test "$_os" = "WINNT"; then
5279 with_zip_home=`cygpath -u "$with_zip_home"`
5281 ZIP="$with_zip_home/zip"
5282 UNZIP="$with_zip_home/unzip"
5283 ZIP_HOME="$with_zip_home"
5285 AC_PATH_PROG(ZIP, zip)
5286 AC_PATH_PROG(UNZIP, unzip)
5287 ZIP_HOME=`dirname "$ZIP"`
5289 dnl ===================================================================
5290 dnl Zip must be available or else it is an error, all platforms
5291 dnl ===================================================================
5292 if test -z "$ZIP" -o -z "$UNZIP"; then
5293 AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
5296 dnl ===================================================================
5297 dnl Zip must be a specific type for different build types.
5298 dnl ===================================================================
5299 if test "$_os" = "WINNT"; then
5300 if test "$with_use_shell" = "4nt" ; then
5301 if test -z "`$ZIP -h | grep -i WinNT`" ; then
5302 AC_MSG_ERROR([$ZIP found in the path is not the required native Windows Version 2.3 of Info-ZIPs zip.exe.
5303 Probably there is a cygwin version in the path.])
5306 if test -n "`$ZIP -h | grep -i WinNT`" ; then
5307 AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
5313 dnl ===================================================================
5314 dnl Windows builds need unicows.dll in external/unicows/
5315 dnl ===================================================================
5316 if test "$_os" = "WINNT"; then
5317 AC_MSG_CHECKING([for unicows.dll])
5318 if test -x ./external/unicows/unicows.dll; then
5319 AC_MSG_RESULT([found])
5321 AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
5322 Get it from the Microsoft site and put it into external/unicows.
5323 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5324 may have to search Microsoft's website.) Last time it was seen at:
5325 <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
5329 dnl ===================================================================
5330 dnl Windows builds need dbghelp.dll in external/dbghelp/
5331 dnl ===================================================================
5332 if test "$_os" = "WINNT"; then
5333 AC_MSG_CHECKING([for dbghelp.dll])
5334 if test -x ./external/dbghelp/dbghelp.dll; then
5335 AC_MSG_RESULT([found])
5337 AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
5338 Get it from the Microsoft site and put it into external/dbghelp.
5339 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5340 may have to search Microsoft's website.) Last time it was seen at:
5341 <http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
5345 dnl ===================================================================
5346 dnl Windows builds - use oowintool to copy CRT dlls and manifest
5347 dnl ===================================================================
5348 if test "$_os" = "WINNT"; then
5349 if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
5352 AC_MSG_ERROR([oowintool failed to copy CRT])
5356 dnl ===================================================================
5357 dnl Windows builds need gdiplus.dll in external/gdiplus/
5358 dnl ===================================================================
5359 if test "$_os" = "WINNT"; then
5360 AC_MSG_CHECKING([for gdiplus.dll])
5361 if test -x ./external/gdiplus/gdiplus.dll; then
5362 AC_MSG_RESULT([found])
5364 AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
5365 Get it from the Microsoft site and put it into external/gdiplus.
5366 You may have to search Microsoft's website. Last time it was seen at:
5367 <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
5371 dnl ===================================================================
5372 dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
5373 dnl ===================================================================
5374 if test "$_os" = "WINNT"; then
5375 ./oowintool --msvc-copy-instmsi ./external/msi
5378 dnl ===================================================================
5379 dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
5380 dnl ===================================================================
5381 if test "$_os" = "WINNT"; then
5382 if test "$COMEX" -ge "10"; then
5383 AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
5384 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
5385 AC_MSG_RESULT([found])
5387 MSIAPATH=`/bin/find "$COMPATH/../.." -iname instmsia.exe | head -n 1`
5388 MSIWPATH=`/bin/find "$COMPATH/../.." -iname instmsiw.exe | head -n 1`
5389 if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
5390 cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
5391 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
5393 if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
5394 AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
5395 These programs are part of the Visual Studio installation and should be found in a
5396 directory similar to:
5397 "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
5398 As the automatic detection fails please copy the files to external/msi/.])
5400 AC_MSG_RESULT([found and copied])
5406 dnl ===================================================================
5407 dnl Test for the presence of the right polygon clipping code
5408 dnl ===================================================================
5409 AC_MSG_CHECKING([which polygon clipping code to use])
5412 if test "$with_gpc" != "no" && test "$without_gpc" != "yes"; then
5414 AC_MSG_RESULT([GPC])
5416 AC_MSG_CHECKING([for GPC files])
5417 if test -f ./external/gpc/gpc.h; then
5422 if test -f ./external/gpc/gpc.c; then
5428 if test "$HAVE_GPC_H" = "yes" -a "$HAVE_GPC_C" = "yes"; then
5429 AC_MSG_RESULT([GPC files found])
5431 AC_MSG_ERROR([GPC files not found
5432 ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc,
5433 or use basegfx' implementation using --without-gpc])
5436 AC_MSG_RESULT([internal])
5440 dnl ===================================================================
5441 dnl Test which vclplugs have to be built.
5442 dnl ===================================================================
5443 AC_MSG_CHECKING([which VCLplugs shall be built])
5445 if test "x$enable_gtk" = "xyes"; then
5449 AC_SUBST(ENABLE_GTK)
5452 if test "x$enable_kde" = "xyes"; then
5456 AC_SUBST(ENABLE_KDE)
5459 if test "x$enable_kde4" = "xyes"; then
5463 AC_SUBST(ENABLE_KDE4)
5465 if test -z "$R"; then
5466 AC_MSG_RESULT([none])
5471 dnl ===================================================================
5473 dnl ===================================================================
5476 AC_MSG_CHECKING([whether to enable GConf support])
5477 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
5479 AC_MSG_RESULT([yes])
5480 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5484 AC_SUBST(ENABLE_GCONF)
5486 dnl ===================================================================
5488 dnl ===================================================================
5491 GNOMEVFS_HAS_LOCKING=""
5492 AC_MSG_CHECKING([whether to enable GNOME VFS support])
5493 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
5494 ENABLE_GNOMEVFS="TRUE"
5495 AC_MSG_RESULT([yes])
5496 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
5497 if test "$ENABLE_GCONF" != "TRUE"; then
5498 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5503 save_CXXFLAGS=$CXXFLAGS
5504 CXXFLAGS="$CXXFLAGS $GNOMEVFS_CFLAGS"
5505 AC_CHECK_DECL(GNOME_VFS_OPEN_LOCKED,
5506 GNOMEVFS_HAS_LOCKING="YES",,
5507 [#include <libgnomevfs/gnome-vfs-handle.h>])
5508 CXXFLAGS=$save_CXXFLAGS
5513 AC_SUBST(ENABLE_GNOMEVFS)
5514 AC_SUBST(GNOMEVFS_HAS_LOCKING)
5516 dnl ===================================================================
5517 dnl Check whether the gtk 2.0 libraries are available.
5518 dnl ===================================================================
5522 ENABLE_SYSTRAY_GTK=""
5524 if test "$test_gtk" = "yes"; then
5526 if test "$ENABLE_GTK" = "TRUE" ; then
5527 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]))
5528 PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.10)
5529 if test "x$enable_cairo" == "xno" ; then
5530 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5532 BUILD_TYPE="$BUILD_TYPE GTK"
5534 if test "x$enable_systray" = "xyes"; then
5535 ENABLE_SYSTRAY_GTK="TRUE"
5536 BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
5539 AC_MSG_CHECKING([whether to enable DBUS support])
5540 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
5542 AC_MSG_RESULT([yes])
5543 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
5548 AC_MSG_CHECKING([whether to enable GIO support])
5549 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
5550 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
5551 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
5554 AC_MSG_RESULT([yes])
5555 PKG_CHECK_MODULES( GIO, gio-2.0 )
5563 AC_SUBST(ENABLE_GIO)
5564 AC_SUBST(ENABLE_DBUS)
5565 AC_SUBST(ENABLE_SYSTRAY_GTK)
5566 AC_SUBST(GTK_CFLAGS)
5569 dnl ===================================================================
5570 dnl Check whether the Cairo libraries are available.
5571 dnl ===================================================================
5577 if test "$test_cairo" = "yes"; then
5579 AC_MSG_CHECKING([whether to use cairo])
5580 if test "x$enable_cairo" != "xno" ; then
5582 AC_MSG_RESULT([yes])
5583 AC_MSG_CHECKING([which cairo to use])
5584 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
5585 test "$with_system_cairo" != "no"; then
5586 AC_MSG_RESULT([external])
5589 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5590 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
5591 AC_MSG_ERROR([Cairo library requires fontconfig.])
5593 if test "$with_system_xrender_headers" = "yes"; then
5594 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
5596 #include <X11/extensions/Xrender.h>
5598 int main(int argc, char **argv) {
5599 #ifdef PictStandardA8
5605 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
5608 BUILD_TYPE="$BUILD_TYPE CAIRO"
5610 AC_MSG_RESULT([internal])
5617 AC_SUBST(ENABLE_CAIRO)
5618 AC_SUBST(BUILD_PIXMAN)
5619 AC_SUBST(SYSTEM_CAIRO)
5620 AC_SUBST(CAIRO_CFLAGS)
5621 AC_SUBST(CAIRO_LIBS)
5623 dnl ===================================================================
5624 dnl Check whether the GStreamer libraries are available.
5625 dnl ===================================================================
5629 if test "$build_gstreamer" = "yes"; then
5631 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
5632 if test "x$enable_gstreamer" != "xno" ; then
5633 ENABLE_GSTREAMER="TRUE"
5634 AC_MSG_RESULT([yes])
5635 PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
5641 AC_SUBST(ENABLE_GSTREAMER)
5643 dnl ===================================================================
5644 dnl Check whether the OpenGL libraries are available
5645 dnl ===================================================================
5647 AC_MSG_CHECKING([whether to build the OGLTrans extension])
5650 if test "x$enable_opengl" != "xno" ; then
5651 AC_MSG_RESULT([yes])
5652 AC_CHECK_HEADER(GL/gl.h, [],
5653 [AC_MSG_ERROR([OpenGL headers not found])], [])
5654 AC_CHECK_LIB(GL, main, [],
5655 [AC_MSG_ERROR(libGL not installed or functional)], [])
5656 AC_CHECK_LIB(GLU, main, [],
5657 [AC_MSG_ERROR(libGLU not installed or functional)], [])
5663 AC_SUBST(ENABLE_OPENGL)
5665 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
5666 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
5667 AC_MSG_RESULT([yes])
5668 ENABLE_MINIMIZER=YES
5673 AC_SUBST(ENABLE_MINIMIZER)
5675 AC_MSG_CHECKING([whether to build the Presenter Screen extension])
5676 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
5677 AC_MSG_RESULT([yes])
5678 ENABLE_PRESENTER_SCREEN=YES
5681 ENABLE_PRESENTER_SCREEN=NO
5683 AC_SUBST(ENABLE_PRESENTER_SCREEN)
5685 AC_MSG_CHECKING([whether to build the PDF Import extension])
5686 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
5687 AC_MSG_RESULT([yes])
5688 ENABLE_PDFIMPORT=YES
5690 dnl ===================================================================
5691 dnl Check for system poppler
5692 dnl ===================================================================
5693 AC_MSG_CHECKING([which pdf backend to use])
5694 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
5695 test "$with_system_poppler" != "no"; then
5696 AC_MSG_RESULT([external])
5698 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
5700 AC_MSG_RESULT([internal])
5702 BUILD_TYPE="$BUILD_TYPE XPDF"
5703 AC_MSG_CHECKING([for xpdf module])
5704 if test -d ./xpdf; then
5707 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5714 AC_SUBST(ENABLE_PDFIMPORT)
5715 AC_SUBST(SYSTEM_POPPLER)
5716 AC_SUBST(POPPLER_CFLAGS)
5717 AC_SUBST(POPPLER_LIBS)
5719 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
5720 AC_MSG_CHECKING([for sdext module])
5721 if test -d ./sdext; then
5724 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5726 BUILD_TYPE="$BUILD_TYPE SDEXT"
5729 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
5730 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
5731 AC_MSG_RESULT([yes])
5732 AC_MSG_CHECKING([for swext module])
5733 if test -d ./swext; then
5736 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5738 ENABLE_MEDIAWIKI=YES
5739 BUILD_TYPE="$BUILD_TYPE SWEXT"
5744 AC_SUBST(ENABLE_MEDIAWIKI)
5746 if test "$ENABLE_MEDIAWIKI" == "YES"; then
5747 AC_MSG_CHECKING([which Servlet API Jar to use])
5748 if test -n "$with_system_servlet_api"; then
5749 AC_MSG_RESULT([external])
5750 SYSTEM_SERVLETAPI=YES
5751 if test -z "$SERVLETAPI_JAR"; then
5752 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
5754 AC_CHECK_FILE($SERVLETAPI_JAR, [],
5755 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
5757 AC_MSG_RESULT([internal])
5758 SYSTEM_SERVLETAPI=NO
5759 BUILD_TYPE="$BUILD_TYPE TOMCAT"
5762 AC_SUBST(SYSTEM_SERVLETAPI)
5763 AC_SUBST(SERVLETAPI_JAR)
5765 AC_MSG_CHECKING([whether to build the Report Builder extension])
5766 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
5767 AC_MSG_RESULT([yes])
5768 ENABLE_REPORTBUILDER=YES
5769 AC_MSG_CHECKING([for reportbuilder module])
5770 if test -d ./reportbuilder; then
5773 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5775 AC_MSG_CHECKING([which jfreereport libs to use])
5776 if test "$with_system_jfreereport" == "yes"; then
5777 SYSTEM_JFREEREPORT=YES
5778 AC_MSG_RESULT([external])
5779 if test -z $SAC_JAR; then
5780 SAC_JAR=/usr/share/java/sac.jar
5782 AC_CHECK_FILE($SAC_JAR, [],
5783 [AC_MSG_ERROR(sac.jar not found.)], [])
5785 if test -z $LIBXML_JAR; then
5786 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
5787 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
5789 AC_CHECK_FILE(/usr/share/java/libxml.jar,
5790 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
5791 [AC_MSG_ERROR(libxml.jar replacement not found.)]
5796 AC_CHECK_FILE($LIBXML_JAR, [],
5797 [AC_MSG_ERROR(libxml.jar not found.)], [])
5800 if test -z $FLUTE_JAR; then
5801 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
5802 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
5804 AC_CHECK_FILE(/usr/share/java/flute.jar,
5805 [ FLUTE_JAR=/usr/share/java/flute.jar ],
5806 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
5811 AC_CHECK_FILE($FLUTE_JAR, [],
5812 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
5815 if test -z $JFREEREPORT_JAR; then
5816 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
5817 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
5819 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
5820 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
5821 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
5826 AC_CHECK_FILE($JFREEREPORT_JAR, [],
5827 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
5830 if test -z $LIBLAYOUT_JAR; then
5831 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
5832 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
5834 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
5835 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
5836 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
5841 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
5842 [AC_MSG_ERROR(liblayout.jar not found.)], [])
5845 if test -z $LIBLOADER_JAR; then
5846 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
5847 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
5849 AC_CHECK_FILE(/usr/share/java/libloader.jar,
5850 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
5851 [AC_MSG_ERROR(libloader.jar replacement not found.)]
5856 AC_CHECK_FILE($LIBLOADER_JAR, [],
5857 [AC_MSG_ERROR(libloader.jar not found.)], [])
5860 if test -z $LIBFORMULA_JAR; then
5861 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
5862 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
5864 AC_CHECK_FILE(/usr/share/java/libformula.jar,
5865 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
5866 [AC_MSG_ERROR(libformula.jar replacement not found.)]
5871 AC_CHECK_FILE($LIBFORMULA_JAR, [],
5872 [AC_MSG_ERROR(libformula.jar not found.)], [])
5875 if test -z $LIBREPOSITORY_JAR; then
5876 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
5877 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
5879 AC_CHECK_FILE(/usr/share/java/librepository.jar,
5880 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
5881 [AC_MSG_ERROR(librepository.jar replacement not found.)]
5886 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
5887 [AC_MSG_ERROR(librepository.jar not found.)], [])
5890 if test -z $LIBFONTS_JAR; then
5891 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
5892 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
5894 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
5895 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
5896 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
5901 AC_CHECK_FILE($LIBFONTS_JAR, [],
5902 [AC_MSG_ERROR(libfonts.jar not found.)], [])
5905 if test -z $LIBSERIALIZER_JAR; then
5906 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
5907 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
5909 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
5910 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
5911 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
5916 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
5917 [AC_MSG_ERROR(libserializer.jar not found.)], [])
5921 if test -z $LIBBASE_JAR; then
5922 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
5923 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
5925 AC_CHECK_FILE(/usr/share/java/libbase.jar,
5926 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
5927 [AC_MSG_ERROR(libbase.jar replacement not found.)]
5932 AC_CHECK_FILE($LIBBASE_JAR, [],
5933 [AC_MSG_ERROR(libbase.jar not found.)], [])
5937 AC_MSG_RESULT([internal])
5938 AC_MSG_CHECKING([for jfreereport module])
5939 if test -d ./jfreereport; then
5942 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5944 SYSTEM_JFREEREPORT=NO
5945 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
5947 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
5950 ENABLE_REPORTBUILDER=NO
5951 SYSTEM_JFREEREPORT=NO
5953 AC_SUBST(ENABLE_REPORTBUILDER)
5954 AC_SUBST(SYSTEM_JFREEREPORT)
5956 AC_SUBST(LIBXML_JAR)
5958 AC_SUBST(JFREEREPORT_JAR)
5959 AC_SUBST(LIBBASE_JAR)
5960 AC_SUBST(LIBLAYOUT_JAR)
5961 AC_SUBST(LIBLOADER_JAR)
5962 AC_SUBST(LIBFORMULA_JAR)
5963 AC_SUBST(LIBREPOSITORY_JAR)
5964 AC_SUBST(LIBFONTS_JAR)
5965 AC_SUBST(LIBSERIALIZER_JAR)
5967 # this has to be here because both the wiki publisher and the SRB use
5969 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
5970 AC_MSG_CHECKING([which Apache commons-* libs to use])
5971 if test "$with_system_apache_commons" = "yes"; then
5972 SYSTEM_APACHE_COMMONS=YES
5973 AC_MSG_RESULT([external])
5974 if test "$ENABLE_MEDIAWIKI" = "YES"; then
5975 if test -z "$COMMONS_CODEC_JAR"; then
5976 COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar
5978 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
5979 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
5980 if test -z "$COMMONS_LANG_JAR"; then
5981 COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar
5983 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
5984 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
5985 if test -z "$COMMONS_HTTPCLIENT_JAR"; then
5986 COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar
5988 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
5989 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
5991 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
5992 if test -z "$COMMONS_LOGGING_JAR"; then
5993 COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar
5995 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
5996 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
6000 AC_MSG_RESULT([internal])
6001 SYSTEM_APACHE_COMMONS=NO
6002 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
6005 AC_SUBST(SYSTEM_APACHE_COMMONS)
6006 AC_SUBST(COMMONS_CODEC_JAR)
6007 AC_SUBST(COMMONS_LANG_JAR)
6008 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
6009 AC_SUBST(COMMONS_LOGGING_JAR)
6011 dnl ===================================================================
6012 dnl Check whether the Qt and KDE libraries are available.
6013 dnl ===================================================================
6018 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
6019 dnl Search paths for Qt and KDE
6020 if test "$build_cpu" != "x86_64" ; then
6021 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"
6022 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"
6024 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"
6025 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"
6027 if test -n "$QTDIR" ; then
6028 qt_incdirs="$QTDIR/include $qt_incdirs"
6029 if test "$build_cpu" != "x86_64" ; then
6030 qt_libdirs="$QTDIR/lib $qt_libdirs"
6032 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
6035 if test "$build_cpu" != "x86_64" ; then
6036 kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /opt/kde3/include /opt/kde/include $x_includes"
6037 kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib /usr/lib $x_libraries"
6039 kde_incdirs="/usr/lib64/kde/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /opt/kde3/include /opt/kde/include $x_includes"
6040 kde_libdirs="/usr/lib64/kde/lib64 /usr/local/kde/lib64 /usr/kde/lib64 /usr/lib64/kde /usr/lib64/kde3 /usr/X11R6/lib64 /usr/local/lib64 /opt/kde3/lib64 /opt/kde/lib64 /usr/X11R6/kde/lib64 /usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib /usr/lib64 $x_libraries"
6042 if test -n "$KDEDIR" ; then
6043 kde_incdirs="$KDEDIR/include $kde_incdirs"
6044 if test "$build_cpu" != "x86_64" ; then
6045 kde_libdirs="$KDEDIR/lib $kde_libdirs"
6047 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
6052 qt_test_include="qstyle.h"
6053 qt_test_library="libqt-mt.so"
6054 kde_test_include="ksharedptr.h"
6055 kde_test_library="libkdeui.so"
6057 dnl Check for Qt headers
6058 AC_MSG_CHECKING([for Qt headers])
6060 for kde_check in $qt_incdirs ; do
6061 if test -r "$kde_check/$qt_test_include" ; then
6062 qt_incdir="$kde_check"
6066 AC_MSG_RESULT([$qt_incdir])
6067 if test "x$qt_incdir" = "xno" ; then
6068 AC_MSG_ERROR([Qt headers not found. Please specify the root of
6069 your Qt installation by exporting QTDIR before running "configure".])
6072 dnl Check for Qt libraries
6073 AC_MSG_CHECKING([for Qt libraries])
6075 for qt_check in $qt_libdirs ; do
6076 if test -r "$qt_check/$qt_test_library" ; then
6077 qt_libdir="$qt_check"
6081 AC_MSG_RESULT([$qt_libdir])
6082 if test "x$qt_libdir" = "xno" ; then
6083 AC_MSG_ERROR([Qt libraries not found. Please specify the root of
6084 your Qt installation by exporting QTDIR before running "configure".])
6087 dnl Check for Meta Object Compiler
6088 AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
6089 if test "$MOC" = "no" ; then
6090 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6091 the root of your Qt installation by exporting QTDIR before running "configure".])
6094 dnl Check for KDE headers
6095 AC_MSG_CHECKING([for KDE headers])
6097 for kde_check in $kde_incdirs ; do
6098 if test -r "$kde_check/$kde_test_include" ; then
6099 kde_incdir="$kde_check"
6103 AC_MSG_RESULT([$kde_incdir])
6104 if test "x$kde_incdir" = "xno" ; then
6105 AC_MSG_ERROR([KDE headers not found. Please specify the root of
6106 your KDE installation by exporting KDEDIR before running "configure".])
6109 dnl Check for KDE libraries
6110 AC_MSG_CHECKING([for KDE libraries])
6112 for kde_check in $kde_libdirs ; do
6113 if test -r "$kde_check/$kde_test_library" ; then
6114 kde_libdir="$kde_check"
6118 AC_MSG_RESULT([$kde_libdir])
6119 if test "x$kde_libdir" = "xno" ; then
6120 AC_MSG_ERROR([KDE libraries not found. Please specify the root of
6121 your KDE installation by exporting KDEDIR before running "configure".])
6124 dnl Set the variables
6125 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6126 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
6128 AC_SUBST(KDE_CFLAGS)
6132 dnl ===================================================================
6133 dnl KDE4 Integration
6134 dnl ===================================================================
6139 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
6140 qt_incdirs="$QTINC $QTDIR /usr/include/qt4 /usr/include $x_includes"
6141 qt_libdirs="$QTLIB /usr/lib $x_libraries"
6143 kde_incdirs="/usr/include $x_includes"
6144 kde_libdirs="/usr/lib $x_libraries"
6146 if test "$build_cpu" == "x86_64" ; then
6147 qt_libdirs="$qt_libdirs /usr/lib64/qt /usr/lib64"
6148 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
6151 qt_test_include="Qt/qobject.h"
6152 qt_test_library="libQtCore.so"
6153 kde_test_include="ksharedptr.h"
6154 kde_test_library="libkdeui.so"
6156 AC_MSG_CHECKING([for Qt4 headers])
6158 for inc_dir in $qt_incdirs ; do
6159 if test -r "$inc_dir/$qt_test_include" ; then
6160 qt_header_dir="$inc_dir"
6165 AC_MSG_RESULT([$qt_header_dir])
6166 if test "x$qt_header_dir" = "xno" ; then
6167 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QTDIR before running "configure".])
6170 AC_MSG_CHECKING([for Qt4 libraries])
6172 for lib_dir in $qt_libdirs ; do
6173 if test -r "$lib_dir/$qt_test_library" ; then
6174 qt_lib_dir="$lib_dir"
6179 AC_MSG_RESULT([$qt_lib_dir])
6181 if test "x$qt_lib_dir" = "xno" ; then
6182 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QTDIR before running "configure".])
6185 dnl Check for Meta Object Compiler
6186 AC_PATH_PROG( MOC4, moc, no, [$PATH:$QTDIR/bin] )
6187 if test "$MOC4" = "no" ; then
6188 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6189 the root of your Qt installation by exporting QTDIR before running "configure".])
6192 dnl Check for KDE4 headers
6193 AC_MSG_CHECKING([for KDE4 headers])
6195 for kde_check in $kde_incdirs ; do
6196 if test -r "$kde_check/$kde_test_include" ; then
6197 kde_incdir="$kde_check"
6201 AC_MSG_RESULT([$kde_incdir])
6202 if test "x$kde_incdir" = "xno" ; then
6203 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDEDIR before running "configure".])
6206 dnl Check for KDE4 libraries
6207 AC_MSG_CHECKING([for KDE4 libraries])
6209 for kde_check in $kde_libdirs ; do
6210 if test -r "$kde_check/$kde_test_library" ; then
6211 kde_libdir="$kde_check"
6216 AC_MSG_RESULT([$kde_libdir])
6217 if test "x$kde_libdir" = "xno" ; then
6218 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDEDIR before running "configure".])
6221 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6222 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
6224 AC_SUBST(KDE4_CFLAGS)
6228 dnl ===================================================================
6229 dnl Test for the enabling the lockdown pieces
6230 dnl ===================================================================
6231 AC_MSG_CHECKING([whether to enable the lockdown pieces])
6233 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
6235 AC_MSG_RESULT([yes])
6239 AC_SUBST(ENABLE_LOCKDOWN)
6241 dnl ===================================================================
6242 dnl Test whether to include Evolution 2 support
6243 dnl ===================================================================
6244 AC_MSG_CHECKING([whether to enable evolution 2 support])
6245 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
6246 AC_MSG_RESULT([yes])
6247 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
6248 ENABLE_EVOAB2="TRUE"
6253 AC_SUBST(ENABLE_EVOAB2)
6254 AC_SUBST(GOBJECT_CFLAGS)
6255 AC_SUBST(GOBJECT_LIBS)
6257 dnl ===================================================================
6258 dnl Test whether to include KDE AB support
6259 dnl ===================================================================
6260 AC_MSG_CHECKING([whether to enable KDE address book support])
6261 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
6262 AC_MSG_RESULT([yes])
6264 save_CXXFLAGS=$CXXFLAGS
6265 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
6266 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
6268 #include <kdeversion.h>
6270 int main(int argc, char **argv) {
6271 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
6274 ], [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])])
6275 CXXFLAGS=$save_CXXFLAGS
6282 AC_SUBST(ENABLE_KAB)
6284 dnl ===================================================================
6285 dnl Test whether to include FontOOo
6286 dnl ===================================================================
6287 AC_MSG_CHECKING([whether to include FontOOo])
6288 if test -n "$enable_fontooo"; then
6289 if test "$enable_fontooo" = "no"; then
6292 SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
6294 AC_MSG_RESULT([yes])
6296 BUILD_TYPE="$BUILD_TYPE MSFONTEXTRACT"
6301 SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
6303 AC_SUBST(WITH_FONTOOO)
6305 if test "$WITH_FONTOOO" = "YES"; then
6306 dnl ===============================================================
6307 dnl Check whether to use libmspack from system
6308 dnl ===============================================================
6309 AC_MSG_CHECKING([whether to use system libmspack])
6310 if test -n "$with_system_mspack" -o -n "$with_system_libs" && \
6311 test "$with_system_mspack" != "no"; then
6312 AC_MSG_RESULT([yes])
6314 AC_CHECK_HEADER(mspack.h, [],
6315 [AC_MSG_ERROR([mspack.h not found, install libmspack])], [])
6316 AC_CHECK_LIB(mspack, mspack_create_cab_decompressor, [],
6317 [AC_MSG_ERROR(libmspack not installed or functional)], [])
6323 AC_SUBST(SYSTEM_MSPACK)
6325 dnl ===================================================================
6326 dnl Test whether to include MathMLDTD
6327 dnl ===================================================================
6328 AC_MSG_CHECKING([whether to include MathMLDTD])
6329 if test -n "$enable_mathmldtd"; then
6330 if test "$enable_mathmldtd" = "no"; then
6332 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6334 AC_MSG_RESULT([yes])
6335 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
6339 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6342 dnl ===================================================================
6343 dnl Test whether to include fonts
6344 dnl ===================================================================
6345 AC_MSG_CHECKING([whether to include Bitstream Vera fonts])
6346 if test "$with_fonts" != "no" ; then
6347 AC_MSG_RESULT([yes])
6349 BUILD_TYPE="$BUILD_TYPE BITSTREAM_VERA_FONTS"
6353 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
6355 AC_SUBST(WITH_FONTS)
6357 AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
6358 if test "$with_agfa_monotype_fonts" != "no" -a -e ../agfa_monotype_fonts/download/agfa-monotype-fonts.tar.gz; then
6359 AC_MSG_RESULT([yes])
6360 WITH_AGFA_MONOTYPE_FONTS=YES
6361 SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
6362 BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
6365 WITH_AGFA_MONOTYPE_FONTS=NO
6367 AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
6369 dnl ===================================================================
6370 dnl Test whether to include ppds
6371 dnl ===================================================================
6372 AC_MSG_CHECKING([whether to include PPDs])
6373 if test "$with_ppds" != "no"; then
6374 AC_MSG_RESULT([yes])
6378 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
6380 AC_SUBST(WITHOUT_PPDS)
6382 dnl ===================================================================
6383 dnl Test whether to include afms
6384 dnl ===================================================================
6385 AC_MSG_CHECKING([whether to include AFMs])
6386 if test "$with_afms" != "no"; then
6387 AC_MSG_RESULT([yes])
6391 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
6393 AC_SUBST(WITHOUT_AFMS)
6397 AC_MSG_CHECKING([whether and how to use Xinerama])
6398 if test "$_os" = "Darwin"; then
6400 XINERAMA_LINK=dynamic
6401 AC_MSG_RESULT([yes])
6402 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
6403 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
6404 # we have both versions, let the user decide but use the dynamic one
6407 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
6408 XINERAMA_LINK=dynamic
6410 XINERAMA_LINK=static
6412 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
6413 # we have only the dynamic version
6415 XINERAMA_LINK=dynamic
6416 elif test -e "$XLIB/libXinerama.a"; then
6418 if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6420 XINERAMA_LINK=static
6430 if test "$USE_XINERAMA" = "YES"; then
6431 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
6432 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
6433 [AC_MSG_ERROR(Xinerama header not found.)], [])
6434 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
6435 if test "$_os" = "FreeBSD"; then
6436 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
6438 if test "$_os" = "Linux"; then
6439 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
6441 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
6442 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
6444 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
6449 AC_SUBST(USE_XINERAMA)
6450 AC_SUBST(XINERAMA_LINK)
6452 dnl ===================================================================
6453 dnl Test for the presence of Ant and that it works
6454 dnl ===================================================================
6456 if test "$SOLAR_JAVA" != ""; then
6457 ANT_HOME=; export ANT_HOME
6458 WITH_ANT_HOME=; export WITH_ANT_HOME
6459 if test -z "$with_ant_home"; then
6460 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
6462 if test "$_os" = "WINNT"; then
6463 with_ant_home=`cygpath -u "$with_ant_home"`
6465 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
6466 WITH_ANT_HOME=$with_ant_home
6467 ANT_HOME=$with_ant_home
6470 if test -z "$ANT"; then
6471 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
6473 # resolve relative or absolute symlink
6474 while test -h "$ANT"; do
6476 a_basename=`basename "$ANT"`
6477 a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
6478 cd "`dirname "$ANT"`"
6479 cd "`dirname "$a_script"`"
6480 ANT="`pwd`"/"`basename "$a_script"`"
6484 if test "$_os" = "OS2"; then
6485 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6490 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
6492 AC_MSG_CHECKING([whether ant is >= $ant_minver])
6493 ant_version=`$ANT -version | $AWK '{ print $4; }'`
6494 ant_version_major=`echo $ant_version | cut -d. -f1`
6495 ant_version_minor=`echo $ant_version | cut -d. -f2`
6496 echo "configure: ant_version $ant_version " >&5
6497 echo "configure: ant_version_major $ant_version_major " >&5
6498 echo "configure: ant_version_minor $ant_version_minor " >&5
6499 if test "$ant_version_major" -ge "2"; then
6500 AC_MSG_RESULT([yes, $ant_version])
6501 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
6502 AC_MSG_RESULT([yes, $ant_version])
6504 AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
6506 AC_MSG_CHECKING([if $ANT works])
6507 cat > conftest.java << EOF
6508 public class conftest {
6509 int testmethod(int a, int b) {
6515 cat > conftest.xml << EOF
6516 <project name="conftest" default="conftest">
6517 <target name="conftest">
6518 <javac srcdir="." includes="conftest.java">
6523 oldJAVA_HOME=$JAVA_HOME
6524 if test "$JAVACISGCJ" = "yes"; then
6525 JAVA_HOME=; export JAVA_HOME
6526 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6528 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6530 AC_TRY_EVAL(ant_cmd)
6531 if test $? = 0 && test -f ./conftest.class ; then
6532 AC_MSG_RESULT([Ant works])
6533 if test -z "$WITH_ANT_HOME"; then
6534 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
6535 if test -z "$ANT_HOME"; then
6536 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6539 ANT_HOME="$WITH_ANT_HOME"
6542 echo "configure: Ant test failed" >&5
6543 cat conftest.java >&5
6544 cat conftest.xml >&5
6545 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
6547 echo "Ant does not work - Some Java projects will not build!" >>warn
6549 JAVA_HOME=$oldJAVA_HOME
6550 rm -f conftest* core core.* *.core
6552 if test -z "$ANT_HOME"; then
6553 ANT_HOME="NO_ANT_HOME"
6557 dnl Checking for ant.jar
6558 if test "$ANT_HOME" != "NO_ANT_HOME"; then
6559 AC_MSG_CHECKING([Ant lib directory])
6560 if test -f $ANT_HOME/lib/ant.jar; then
6561 ANT_LIB="$ANT_HOME/lib"
6563 if test -f $ANT_HOME/ant.jar; then
6566 if test -f /usr/share/java/ant.jar; then
6567 ANT_LIB=/usr/share/java
6569 if test -f /usr/share/ant-core/lib/ant.jar; then
6570 ANT_LIB=/usr/share/ant-core/lib
6572 if test -f $ANT_HOME/lib/ant/ant.jar; then
6573 ANT_LIB="$ANT_HOME/lib/ant"
6575 AC_MSG_ERROR([Ant libraries not found!])
6581 AC_MSG_RESULT([Ant lib directory found.])
6586 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6587 AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
6590 cat > conftest.java << EOF
6591 public class conftest {
6592 int testmethod(int a, int b) {
6598 cat > conftest.xml << EOF
6599 <project name="conftest" default="conftest">
6600 <target name="conftest" depends="copytest">
6601 <javac srcdir="." includes="conftest.java">
6604 <target name="copytest">
6605 <copy todir="confdir">
6606 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
6608 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
6613 if test "$JAVACISGCJ" = "yes"; then
6614 JAVA_HOME=; export JAVA_HOME
6615 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6617 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6619 AC_TRY_EVAL(ant_cmd)
6620 if test $? = 0 && test -f ./conftest.class ; then
6621 AC_MSG_RESULT([yes])
6624 echo "configure: Ant test failed" >&5
6625 cat conftest.java >&5
6626 cat conftest.xml >&5
6628 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
6631 rm -f conftest* core core.* *.core
6633 AC_MSG_CHECKING([which languages to be built])
6634 WITH_LANG="$with_lang"
6635 if test -z "$WITH_LANG"; then
6636 AC_MSG_RESULT([en-US])
6638 AC_MSG_RESULT([$WITH_LANG])
6642 AC_MSG_CHECKING([which languages have poor help localizations])
6643 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
6644 if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
6645 AC_MSG_RESULT([none])
6647 AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
6649 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
6651 AC_MSG_CHECKING([which dictionaries to include])
6652 if test -z "$with_dict"; then
6654 AC_MSG_RESULT([ALL])
6656 WITH_DICT=","$with_dict","
6657 AC_MSG_RESULT([$with_dict])
6661 AC_MSG_CHECKING([for additional 'intro' bitmaps])
6663 if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
6665 AC_MSG_RESULT([none])
6667 for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
6670 *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
6672 if test -n "$bitmap" ; then
6673 INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
6676 AC_MSG_RESULT([$INTRO_BITMAPS])
6678 AC_SUBST(INTRO_BITMAPS)
6680 AC_MSG_CHECKING([for additional 'about' bitmaps])
6682 if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
6684 AC_MSG_RESULT([none])
6686 for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
6689 *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
6691 if test -n "$bitmap" ; then
6692 ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
6695 AC_MSG_RESULT([$ABOUT_BITMAPS])
6697 AC_SUBST(ABOUT_BITMAPS)
6700 AC_MSG_CHECKING([for vendor])
6701 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
6702 AC_MSG_RESULT([not set])
6704 OOO_VENDOR="$with_vendor"
6705 AC_MSG_RESULT([$OOO_VENDOR])
6707 AC_SUBST(OOO_VENDOR)
6710 AC_MSG_CHECKING([for UNIX wrapper name])
6711 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
6712 AC_MSG_RESULT([not set])
6714 UNIXWRAPPERNAME="$with_unix_wrapper"
6715 AC_MSG_RESULT([$UNIXWRAPPERNAME])
6717 AC_SUBST(UNIXWRAPPERNAME)
6719 AC_MSG_CHECKING([whether to statically link to Gtk])
6720 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
6721 ENABLE_STATIC_GTK="TRUE"
6722 AC_MSG_RESULT([yes])
6724 ENABLE_STATIC_GTK="FALSE"
6727 AC_SUBST(ENABLE_STATIC_GTK)
6729 AC_MSG_CHECKING([whether to use layout dialogs])
6730 if test -z "$enable_layout" || test "$enable_layout" != "no"; then
6731 ENABLE_LAYOUT="TRUE"
6732 AC_MSG_RESULT([yes])
6734 ENABLE_LAYOUT="FALSE"
6737 AC_SUBST(ENABLE_LAYOUT)
6739 AC_MSG_CHECKING([whether to use experimental layout dialogs])
6740 if test -n "$enable_layout_experimental" && test "$enable_layout_experimental" == "yes"; then
6741 ENABLE_LAYOUT_EXPERIMENTAL="TRUE"
6742 AC_MSG_RESULT([yes])
6744 ENABLE_LAYOUT_EXPERIMENTAL="FALSE"
6747 AC_SUBST(ENABLE_LAYOUT_EXPERIMENTAL)
6749 # ===================================================================
6750 # De- or increase default verbosity of build process
6751 # ===================================================================
6752 AC_MSG_CHECKING([build verbosity])
6753 if test -n "$enable_verbose"; then
6754 if test "$enable_verbose" == "yes"; then
6756 AC_MSG_RESULT([high])
6758 if test "$enable_verbose" == "no"; then
6760 AC_MSG_RESULT([low])
6763 AC_MSG_RESULT([not set])
6767 dnl ===================================================================
6768 dnl Setting up the environment.
6769 dnl ===================================================================
6770 echo "********************************************************************"
6772 echo "* Setting up the build environment variables. *"
6774 echo "********************************************************************"
6776 if test -z "$COMPATH"; then
6777 AC_MSG_ERROR([No compiler found.])
6781 AC_MSG_CHECKING([solver path])
6782 if test -z "$with_local_solver"; then
6783 LOCAL_SOLVER="DEFAULT"
6784 AC_MSG_RESULT([default])
6786 LOCAL_SOLVER=$with_local_solver
6787 AC_MSG_RESULT([$with_local_solver])
6789 AC_SUBST(LOCAL_SOLVER)
6791 AC_SUBST(BUILD_TYPE)
6793 # make sure config.guess is +x; we execute config.guess, so it has to be so;
6794 chmod +x ./config.guess
6796 AC_OUTPUT([set_soenv Makefile])
6798 dnl Executing the set_soenv script to setup the environment variables.
6800 if test -z "$enable_check_only"; then
6805 echo No environment file will be generated
6807 num_warnings=`wc -l warn`
6808 _num=`echo $num_warnings | $AWK '{ print $1 }'`
6809 if test $_num -gt 0; then
6810 echo The following warning\(s\) were generated by configure
6811 echo ----------------------------------------------------
6816 echo There were no warnings