1 dnl /******************************************************************
2 dnl * vi:set sw=3 ts=3 et:
4 dnl * Name: configure.in
5 dnl * Auth: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems Ireland
6 dnl * Date: $Date: 2008-09-08 07:38:40 $
8 dnl * Desc: This file serves as input for the GNU autoconf package
9 dnl * in order to create a configure script.
10 dnl * In this stage configure just checks the pre-requisites
11 dnl * necessary to build OpenOffice.org
14 dnl ******************************************************************/
15 AC_REVISION( $Revision: 1.290 $ )
18 echo "$@" >config.parms
19 AC_ARG_WITH(gnu-patch,
20 [ --with-gnu-patch Specify location of GNU patch on Solaris or FreeBSD
23 [ --without-agg Disable the use of agg altogether
26 [ --with-gnu-cp Specify location of GNU cp on Solaris or FreeBSD
28 AC_ARG_ENABLE(graphite,
29 [ --enable-graphite Enables the compilation of Graphite smart font rendering
31 AC_ARG_WITH(system-graphite,
32 [ --with-system-graphite use graphite library already installed on system
35 [ --disable-ldap Disables the use of LDAP backend via Netscape/Mozilla
38 AC_ARG_ENABLE(fetch-external,
39 [ --disable-fetch-external Disables fetching external tarballs from web sources.
41 AC_ARG_WITH(external-tar,
42 [ --with-external-tar=<TARFILE PATH> Specify path to tarfiles manually ],
43 [ TARFILE_LOCATION="$withval"
46 [ --with-openldap Enables the use of the OpenLDAP LDAP SDK instead
47 of the Netscape/Mozilla one
49 AC_ARG_ENABLE(lockdown,
50 [ --enable-lockdown Enables the gconf integration work in OOo
53 [ --disable-vba disables the vba compatibility feature
55 AC_ARG_WITH(vba-package-format,
56 [ --with-vba-package-format specify package format for vba compatibility api.
57 Specifying "builtin" means the api component and
58 associated type library are part of the installation set.
59 Specifying "extn" creates an uno extension that is
60 part of the installation set ( located in the program
61 directory ) that MUST be optionly registered using
62 either the unopkg executeable or the extension manager
65 Note: "builtin" is the default, "extn" can cause
67 Usage: --with-vba-package-format="builtin" or
68 --with-vba-package-format="extn"
71 [ --enable-pch EXPERIMENTAL: Enables precompiled header support for C++.
74 [ --enable-hids Enables generation of HelpId lists.
76 AC_ARG_ENABLE(mozilla,
77 [ --disable-mozilla OO.o usually includes a strangely hacked up mozilla
78 binary for your platform, to build without this
79 version, use this option.
80 ],,enable_mozilla="yes")
82 [ --without-fonts OOo includes some third-party fonts to provide a reliable
83 basis for help content, templates, samples, etc.
84 When these fonts are already known to be available on the
85 system then you should use this option.
88 [ --without-ppds Removes Postscript Printer definition files from
89 openoffice.org installation set, for people building
90 for specific distributions where PPDs are known to be
91 already available (every recent distro with CUPS
95 [ --without-afms Removes bitmap font files from openoffice.org
96 installation set, for people building for specific
97 distributions where AFM files or TrueType Fonts
98 are known to be available.
101 [ --disable-epm OO.o includes self-packaging code, that requires
102 epm, however epm is useless for large scale
106 [ --with-epm Decides which epm to use. Default is to use
107 the one from the system if one is built. When
108 either this is not there or you say =internal
111 AC_ARG_WITH(package-format,
112 [ --with-package-format specify package format(s) for OOo installsets.
113 Default is "normal" one of the OS/Distribution.
115 Usage: --with-package-format="foo bar"
118 [ --disable-odk OO.o includes an ODK, office development kit
119 which some packagers may with to build without
121 AC_ARG_ENABLE(mathmldtd,
122 [ --disable-mathmldtd disable mathmldtd
123 (useful for distributions that want to avoid packaging
125 ],,enable_mathmldtd="yes")
126 AC_ARG_ENABLE(evolution2,
127 [ --enable-evolution2 Allows the built-in evolution 2 addressbook
128 connectivity build to be enabled.
130 AC_ARG_WITH(system-stdlibs,
131 [ --with-system-stdlibs use libstdc++/libgcc_s already on system
132 ],,checkforstdlibproblems=yes)
134 [ --disable-cups disable cups support in the psprint project
136 AC_ARG_ENABLE(fontconfig,
137 [ --disable-fontconfig disable support for the fontconfig library
138 ],,enable_fontconfig=yes)
139 AC_ARG_ENABLE(directx,
140 [ --disable-directx Remove DirectX implementation for the new XCanvas
141 interface. The DirectX support requires more stuff
142 installed on Windows to compile.
143 (DirectX SDK, GDI+ libs)
144 ],,enable_directx=yes)
145 AC_ARG_ENABLE(activex,
146 [ --disable-activex Disable the use of ActiveX for windows build.
147 This switch is mandatory when using VC++ 2005/2008 Express.
151 [ --disable-atl Disable the use of ATL for windows build.
152 This switch is mandatory when using VC++ 2005/2008 Express.
155 AC_ARG_ENABLE(symbols,
156 [ --enable-symbols Include debugging symbols in output.
157 WARNING - a complete build needs 8 Gb of space and
158 takes much longer. (enables -g compiler flag)
160 --enable-symbols=SMALL sets the gcc -g1 setting
163 Enabling symbols disables the stripping of the solver
164 (--disable-strip-solver).
166 AC_ARG_ENABLE(strip-solver,
167 [ --disable-strip-solver Disable the stripping of the solver.
168 By default the solver is stripped unless a build with
169 debugging symbols (--enable-symbols) is requested.
171 This switch allows to override this setting.
173 AC_ARG_ENABLE(werror,
174 [ --enable-werror Turn warnings to errors. (Has no effect in modules
175 where the treating of warnings as errors is disabled
179 [ --enable-debug Include debugging symbols from --enable-symbols
180 plus extra debugging code. Extra large build!
181 (enables -g compiler flag and dmake debug=true)
183 AC_ARG_ENABLE(dbgutil,
184 [ --enable-dbgutil Include additional debugging utilities, such as
185 assertions, object counting, etc. Larger build.
186 Independent from --enable-debug
188 AC_ARG_ENABLE(crashdump,
189 [ --enable-crashdump Enable the crashdump feature code.
191 AC_ARG_ENABLE(cl-standard,
192 [ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing
193 standard compiler. ( This just disavles optimization
194 options and therefore removes a lot of warnings when
195 using the cheaper standard compiler. )
198 [ --disable-gtk Determines whether to use Gtk+ vclplug on platforms
199 where Gtk+ is available.
201 AC_ARG_ENABLE(systray,
202 [ --disable-systray Determines whether to build the systray quickstarter.
203 ],,enable_systray=yes)
205 [ --enable-cairo Determines whether to use Cairo library on
206 platforms where Cairo is available.
208 AC_ARG_WITH(system-cairo,
209 [ --with-system-cairo Use Cairo libraries already on system
211 AC_ARG_ENABLE(opengl,
212 [ --enable-opengl Determines whether to build the OpenGL 3D slide
213 transitions component
216 [ --enable-dbus Determines whether to enable presentation mode
217 screensaver control under GNOME via DBUS
220 [ --disable-gconf Determines whether to use the GConf support
222 AC_ARG_ENABLE(gnome-vfs,
223 [ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing
224 System on platforms where that VFS is available
225 ],,enable_gnome_vfs=yes)
227 [ --enable-gio Determines whether to use the GIO support
229 AC_ARG_ENABLE(static-gtk,
230 [ --enable-static-gtk Modules that are linked against gtk libraries use
231 the static libraries instead of the dynamic ones.
232 (enables -Bstatic linker flag for gtk libraries)
234 AC_ARG_ENABLE(layout,
235 [ --enable-layout Enable the compilation and use of layout dialogs
237 AC_ARG_ENABLE(build-mozilla,
238 [ --disable-build-mozilla Use this option if you do not want to build the
239 mozilla components from the mozilla source code but
240 take precompiled zips
242 AC_ARG_WITH(mozilla-version,
243 [ --with-mozilla-version Choose which version of mozilla to use while building
244 mozilla. Default: 1.7.5.
245 Note that not all versions are supported.
247 AC_ARG_WITH(mozilla-toolkit,
248 [ --with-mozilla-toolkit Choose which GUI toolkit to use while building mozilla
249 components. Default: gtk2
251 AC_ARG_ENABLE(nss_module,
252 [ --disable-nss-module Whether to use provided NSS module
253 ],,enable_nss_module=yes)
255 [ --enable-kde Determines whether to use Qt/KDE vclplug on platforms
256 where Qt and KDE are available.
259 [ --disable-kdeab Disable the KDE address book support
260 ],,if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi)
262 [ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms
263 where Qt4 and KDE4 are available. May be used with --enable-kde
264 if you want to support both KDE3 and KDE4.
266 AC_ARG_ENABLE(binfilter,
267 [ --disable-binfilter Disable legacy binary file formats filters
268 ],,if ! test -d ./binfilter; then enable_binfilter=no; fi)
270 [ --disable-rpath Disable the use of relative paths in shared libraries
273 [ --disable-pam Disable pam support.
275 AC_ARG_ENABLE(pam-link,
276 [ --enable-pam-link link with libpam instead of dynamically open it
278 AC_ARG_ENABLE(crypt-link,
279 [ --disable-crypt-link disable linking with libcrypt instead of dynamically
280 open it (needed for ancient GNU/Linux distributions
281 without crypt()/libcrypt)
282 ],,enable_crypt_link=yes)
283 AC_ARG_ENABLE(xrender-link,
284 [ --enable-xrender-link link with libXrender instead of dynamically open it
287 [ --disable-randr disable RandR support in the vcl project
289 AC_ARG_ENABLE(randr-link,
290 [ --disable-randr-link disable linking with libXrandr, instead dynamically
292 ],,enable_randr_link=yes)
293 AC_ARG_WITH(myspell-dicts,
294 [ --without-myspell-dicts Removes myspell dictionaries from openoffice.org
295 installation set, for people building for specific
296 distributions where the myspell dictionaries are
297 installed from other sources
299 AC_ARG_WITH(system-dicts,
300 [ --with-system-dicts Use dictionaries from system paths- Specify
301 them via --with-{dict,hyph,thes}-path=/path
302 if you want to override the default ones
304 AC_ARG_WITH(external-dict-dir,
305 [ --with-external-dict-dir Specify external dictionary dir
307 AC_ARG_WITH(external-hyph-dir,
308 [ --with-external-hyph-dir Specify external hyphenation pattern dir
310 AC_ARG_WITH(external-thes-dir,
311 [ --with-external-thes-dir Specify external thesaurus dir
313 AC_ARG_WITH(system-libs,
314 [ --with-system-libs Use libs already on system -- enables all
315 --with-system-* flags except mozilla and
316 odbc/sane/xrender-header(s)
318 AC_ARG_WITH(system-headers,
319 [ --with-system-headers Use headers already on system -- enables all
320 --with-system-* flags for external packages
321 whose headers are the only entities used i.e.
322 boost/vigra/odbc/sane/xrender-header(s)
324 AC_ARG_WITH(system-jars,
325 [ --without-system-jars When building with --with-system-libs, also the
326 needed jars are expected on the system. Use this to
328 (except for the db case where --with-system-db
329 *has to* imply using the db.jar from there, too)
331 AC_ARG_WITH(system-zlib,
332 [ --with-system-zlib Use zlib already on system
334 AC_ARG_WITH(system-openssl,
335 [ --with-system-openssl Use OpenSSL already on system
337 AC_ARG_WITH(system-jpeg,
338 [ --with-system-jpeg Use jpeg already on system
340 AC_ARG_WITH(system-expat,
341 [ --with-system-expat Use expat already on system
343 AC_ARG_WITH(system-libwpd,
344 [ --with-system-libwpd Use libwpd already on system
346 AC_ARG_WITH(system-libxml,
347 [ --with-system-libxml Use libxml already on system
349 AC_ARG_WITH(system-python,
350 [ --with-system-python Use python already on system
352 AC_ARG_WITH(system-icu,
353 [ --with-system-icu Use icu already on system
355 AC_ARG_WITH(system-poppler,
356 [ --with-system-poppler Use poppler already on system
358 AC_ARG_WITH(system-db,
359 [ --with-system-db Use berkeley db already on system
361 AC_ARG_WITH(system-lucene,
362 [ --with-system-lucene Use lucene already on system
364 AC_ARG_WITH(lucene-core-jar,
365 [ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ],
366 [ LUCENE_CORE_JAR="$withval"
368 AC_ARG_WITH(lucene-analyzers-jar,
369 [ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ],
370 [ LUCENE_ANALYZERS_JAR="$withval"
372 AC_ARG_ENABLE(mysql-connector,
373 [ --enable-mysql-connector enables the build of the MySQL Connector/OOo extension.
374 This requires access to the MySQL Connector/C (aka libmysql) to be given, too, with
375 either the --with-system-mysql or --with-libmysql-path option.
377 AC_ARG_WITH(system-mysql,
378 [ --with-system-mysql Use MySQL libraries already on system, for building the MySQL Connector/OOo extension.
379 Requires MYSQLCONFIG to point to the mysql_config executable.
381 AC_ARG_WITH(libmysql-path,
382 [ --with-libmysql-path Use Connector/C (libmysql) installation for building the MySQL Connector/OOo extension.
384 Usage: --with-libmysql-path=<absolute path to your Connector/C installation>
386 AC_ARG_WITH(system-mysql-cppconn,
387 [ --with-system-mysql-cppconn Use MySQL C++ Connector libraries already on system
389 AC_ARG_WITH(system-hsqldb,
390 [ --with-system-hsqldb Use hsqldb already on system
392 AC_ARG_WITH(hsqldb-jar,
393 [ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ],
394 [ HSQLDB_JAR="$withval"
396 AC_ARG_WITH(system-beanshell,
397 [ --with-system-beanshell Use beanshell already on system
399 AC_ARG_WITH(beanshell-jar,
400 [ --with-beanshell-jar=JARFILE Specify path to jarfile manually ],
403 AC_ARG_ENABLE(presenter-extra-ui,
404 [ --enable-presenter-extra-ui enables extra functionality during slideshow,
405 e.g. selecting pen color, erasing drawings etc.
406 ],,enable_presenter_extra_ui=no)
407 AC_ARG_ENABLE(minimizer,
408 [ --enable-minimizer enables the build of the Presentation Minimizer extension
410 AC_ARG_ENABLE(presenter-console,
411 [ --enable-presenter-console enables the build of the Presenter Console extension
413 AC_ARG_ENABLE(pdfimport,
414 [ --enable-pdfimport enables the build of the PDF Import extension and xpdf
416 AC_ARG_ENABLE(wiki-publisher,
417 [ --enable-wiki-publisher enables the build of the Wiki Publisher extension
419 AC_ARG_WITH(commons-codec-jar,
420 [ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ],
421 [ COMMONS_CODEC_JAR="$withval"
423 AC_ARG_WITH(commons-lang-jar,
424 [ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ],
425 [ COMMONS_LANG_JAR="$withval"
427 AC_ARG_WITH(commons-httpclient-jar,
428 [ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ],
429 [ COMMONS_HTTPCLIENT_JAR="$withval"
431 AC_ARG_WITH(commons-logging-jar,
432 [ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ],
433 [ COMMONS_LOGGING_JAR="$withval"
435 AC_ARG_WITH(servlet-api-jar,
436 [ --servlet-api-jar=JARFILE Specify path to jarfile manually ],
437 [ SERVLETAPI_JAR="$withval"
439 AC_ARG_ENABLE(report-builder,
440 [ --enable-report-builder enables the build of the Report Builder extension
442 AC_ARG_WITH(system-jfreereport,
443 [ --with-system-jfreereport Use JFreeReport already on system
446 [ --with-sac-jar=JARFILE Specify path to jarfile manually ],
449 AC_ARG_WITH(libxml-jar,
450 [ --with-libxml-jar=JARFILE Specify path to jarfile manually ],
451 [ LIBXML_JAR="$withval"
453 AC_ARG_WITH(flute-jar,
454 [ --with-flute-jar=JARFILE Specify path to jarfile manually ],
455 [ FLUTE_JAR="$withval"
457 AC_ARG_WITH(jfreereport-jar,
458 [ --with-jfreereport-jar=JARFILE Specify path to jarfile manually ],
459 [ JFREEREPORT_JAR="$withval"
461 AC_ARG_WITH(liblayout-jar,
462 [ --with-liblayout-jar=JARFILE Specify path to jarfile manually ],
463 [ LIBLAYOUT_JAR="$withval"
465 AC_ARG_WITH(libloader-jar,
466 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
467 [ LIBLOADER_JAR="$withval"
469 AC_ARG_WITH(libloader-jar,
470 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
471 [ LIBLOADER_JAR="$withval"
473 AC_ARG_WITH(libformula-jar,
474 [ --with-libformula-jar=JARFILE Specify path to jarfile manually ],
475 [ LIBFORMULA_JAR="$withval"
477 AC_ARG_WITH(librepository-jar,
478 [ --with-librepository-jar=JARFILE Specify path to jarfile manually ],
479 [ LIBREPOSITORY_JAR="$withval"
481 AC_ARG_WITH(libfonts-jar,
482 [ --with-libfonts-jar=JARFILE Specify path to jarfile manually ],
483 [ LIBFONTS_JAR="$withval"
485 AC_ARG_WITH(libserializer-jar,
486 [ --with-libserializer-jar=JARFILE Specify path to jarfile manually ],
487 [ LIBSERIALIZER_JAR="$withval"
489 AC_ARG_WITH(libbase-jar,
490 [ --with-libbase-jar=JARFILE Specify path to jarfile manually ],
491 [ LIBBASE_JAR="$withval"
493 AC_ARG_WITH(system-saxon,
494 [ --with-system-saxon Use saxon already on system
496 AC_ARG_WITH(saxon-jar,
497 [ --with-saxon-jar=JARFILE Specify path to jarfile manually ],
498 [ SAXON_JAR="$withval"
500 AC_ARG_WITH(system-libxslt,
501 [ --with-system-libxslt Use libxslt already on system
503 AC_ARG_WITH(system-odbc,
504 [ --with-system-odbc-headers Use the odbc headers already on system
506 AC_ARG_WITH(system-sane,
507 [ --with-system-sane-header Use sane.h already on system
509 AC_ARG_WITH(system-xrender,
510 [ --with-system-xrender-headers Use XRender headers already on system
512 AC_ARG_WITH(system-curl,
513 [ --with-system-curl Use curl already on system
515 AC_ARG_WITH(system-boost,
516 [ --with-system-boost Use boost already on system
518 AC_ARG_WITH(system-vigra,
519 [ --with-system-vigra Use vigra already on system
522 [ --disable-neon Disable neon and the compilation of webdav binding
525 [ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla
528 AC_ARG_WITH(system-neon,
529 [ --with-system-neon Use neon already on system
531 AC_ARG_WITH(system-agg,
532 [ --with-system-agg Use AGG already on system
534 AC_ARG_WITH(system-hunspell,
535 [ --with-system-hunspell Use libhunspell already on system
537 AC_ARG_WITH(system-mythes,
538 [ --with-system-mythes Use mythes already on system
540 AC_ARG_WITH(system-altlinuxhyph,
541 [ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
543 AC_ARG_WITH(system-lpsolve,
544 [ --with-system-lpsolve Use lpsolve already on system
546 AC_ARG_WITH(system-cppunit,
547 [ --with-system-cppunit Use cppunit already on system
549 AC_ARG_WITH(system-redland,
550 [ --with-system-redland Use redland library already on system
552 AC_ARG_WITH(system-mozilla,
553 [ --with-system-mozilla Use mozilla already on system. Note that some
554 components cannot be built against a contemporary
555 mozilla. The flavour used can be specified by
556 --with-system-mozilla=<flavour>. Supported are:
557 libxul (default), xulrunner, firefox, seamonkey,
559 ], WITH_SYSTEM_MOZILLA=$withval, WITH_SYSTEM_MOZILLA=no)
561 [ --with-stlport The location that STLport is installed in. The STL
562 header files are assumed to be in
563 stlport-home/stlport and the STLPort library in
566 Usage: --with-stlport=<absolute path to stlport home>
568 Warning!!, disabling using --without-stlport or
569 enabling using --with-stlport on a platform that
570 defaults to the opposite will break ABI compatability
571 ], WITH_STLPORT=$withval , WITH_STLPORT=auto)
572 AC_ARG_WITH(jdk-home,
573 [ --with-jdk-home if you have installed JDK 1.3 or later on your system
574 please supply the path here.
575 Note that this is not the location of the Java binary
576 but the location of the entire distribution.
578 Usage: --with-jdk-home=<absolute path to JDK home>
580 AC_ARG_WITH(gxx_include_path,
581 [ --with-gxx-include-path if you want to override the autodetected g++ include
584 Usage: --with-gxx-include-path=<absolute path to g++ include dir>
587 [ --with-java Build with[[out]] Java support. If you use
588 --without-java/--with-java=no then the build will have
589 no support for Java components, applets, accessibility
591 ], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java)
592 AC_ARG_ENABLE(gcjaot,
593 [ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation
594 support to speed up buildsi by compiling the jars also
596 --enable-gcjaot is only known to work with bytecode
597 created with gcj or ecj
599 AC_ARG_WITH(ant-home,
600 [ --with-ant-home If you have installed Jakarta Ant on your system,
601 please supply the path here.
602 Note that this is not the location of the Ant binary
603 but the location of the entire distribution.
605 Usage: --with-ant-home=<absolute path to Ant home>
608 [ --with-junit Specifies the JUnit 4 jar file to use for JUnit-based
609 tests. --without-junit disables those tests. Not
610 relevant in the --without-java case.
612 Usage: --with-junit=<absolute path to JUnit 4 jar>
614 AC_ARG_WITH(perl-home,
615 [ --with-perl-home If you have installed the Perl 5 Distribution, on your
616 system, please supply the path here.
617 Note that this is not the location of the Perl binary
618 but the location of the entire distribution.
620 Usage: --with-perl-home=<absolute path to Perl 5 home>
623 [ --with-cl-home For Windows NT users, please supply the path
624 for the Microsoft C/C++ compiler.
625 Note that this is not the location of the compiler
626 binary but the location of the entire distribution.
628 Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>
630 AC_ARG_WITH(mspdb-path,
631 [ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the
632 path pointing to the mspdb71.dll (.NET 2003).
634 Usage: --with-mspdb-path=<absolute path to mspdb71.dll>
636 AC_ARG_WITH(midl-path,
637 [ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply
638 the path pointing to the midl.exe.
640 Usage: --with-midl-path=<absolute path to midl.exe>
642 AC_ARG_WITH(csc-path,
643 [ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply
644 the path pointing to the csc.exe.
646 Usage: --with-csc-path=<absolute path to csc.exe>
648 AC_ARG_WITH(nsis-path,
649 [ --with-nsis-path For Windows users, please supply the path to the
650 "Nullsoft Scriptable Install System" (NSIS). If NSIS
651 is found in the path or this option is supplied a self
652 contained executable installer for OpenOffice.org will
655 Usage: --with-nsis-path=<absolute path to nsis.exe>
657 AC_ARG_WITH(frame-home,
658 [ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply
659 the path pointing to lib/mscoree.lib, usually
661 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"
663 MS Visual Toolkit compiler users, please supply the
664 path pointing to lib/msvcrt.lib, usually something
666 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"
668 Usage: --with-frame-home=<absolute path to Framework SDK [[home]]>
670 AC_ARG_WITH(psdk-home,
671 [ --with-psdk-home For Windows users, please supply the path to the
672 Microsoft Platform SDK.
674 Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>
676 AC_ARG_WITH(directx-home,
677 [ --with-directx-home For Windows users, please supply the path to the
678 Microsoft DirectX SDK.
680 Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
682 AC_ARG_WITH(mozilla-build,
683 [ --with-mozilla-build For Windows users, please supply the path to the
686 Usage: --with-mozilla-build=<absolute path to mozilla build tools>
688 At the moment of this writing, an installer for the mozilla build tools
689 can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
690 ],[MOZILLABUILD=$withval],)
691 AC_ARG_WITH(local-solenv,
692 [ --with-local-solenv If you have solenv in a location other than ./solenv,
693 please supply the path here.
695 Usage: --with-local-solenv=<absolute path to solenv>
697 AC_ARG_WITH(local-solver,
698 [ --with-local-solver if you have solver in a location other than ./solver,
699 please supply the path here.
701 Usage: --with-local-solver=<absolute path to solver>
703 AC_ARG_ENABLE(check-only,
704 [ --enable-check-only Use this option option if you just want to check your
705 environment. This option stops the generation of an
708 Usage: --enable-check-only=yes
710 AC_ARG_ENABLE(ccache-skip,
711 [[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to
712 escape compiler flags that would otherwise prevent
713 caching of the result (currently used on Mac only)
714 NOTE: requires patched version because of a bug in
715 ccache (see issue 104567 for details and patch)
716 explicitly enable if your version of ccache doesn't
717 identify as version 2.4_OOo
718 ]],,enable_ccache_skip=auto)
720 [ --with-lang Use this option to build OpenOffice.org with
721 additional language support. English (US) is always
722 included by default. Separate multiple languages with
723 space. For all languages, use --with-lang=ALL.
725 Usage: --with-lang="es sw tu cs sk"
727 AC_ARG_WITH(poor-help-localizations,
728 [ --with-poor-help-localizations
729 Use this option to specify which languages have
730 unusable help localizations. Separate multiple
731 languages with space.
733 Usage: --with-poor-help-localizations="af ar be-BY ca"
736 [ --with-dict Use this option to build OpenOffice.org with
737 dictionary support. ALL dictionaries are always
738 included by default unless overridden with
739 this option. Separate multiple dictionaries with
740 commas. For all dictionaries, use --with-dict=ALL.
742 Usage: --with-dict=ENGB,ENUS,ITIT
744 AC_ARG_WITH(intro-bitmaps,
745 [ --with-intro-bitmaps Prefer the specified intro bitmaps over the
746 the default one. Can be more than one (separated by
747 commas), the order means priority of fallback if the
748 first does not exist (in the installed tree).
750 Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
752 AC_ARG_WITH(about-bitmaps,
753 [ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
754 specification of bitmaps for the About box.
756 Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
759 [ --with-vendor Set vendor of the build.
761 Usage: --with-vendor="John the Builder"
763 AC_ARG_WITH(unix-wrapper,
764 [ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
765 in the desktop files and in the desktop-integration RPMs.
767 Usage: --with-unix-wrapper=ooffice
769 AC_ARG_WITH(asm-home,
770 [ --with-asm-home For Windows users, please supply the path for the
773 Usage: --with-asm-home=<path to ml.exe directory>
775 AC_ARG_WITH(os-version,
776 [ --with-os-version For FreeBSD users, use this option option to override
777 the detected OSVERSION.
779 Usage: --with-os-version=<OSVERSION>
781 AC_ARG_WITH(unzip-home,
782 [ --with-unzip-home Deprecated: use --with-zip-home instead],,)
783 AC_ARG_WITH(zip-home,
784 [ --with-zip-home If you use a non standard zip, for example windows
785 please supply the path for zip
787 Usage: --with-zip-home=<path to zip executable>
790 [ --with-mingwin For Windows users, use the mingwin32 compiler within
793 Usage: --with-mingwin=yes
795 For !Windows use, use the mingw32 C++ compiler to
796 (re-) build unowinreg.dll. Specify the MinGW C++
799 Usage: --with-mingwin=i586-mingw32msvc-g++
800 ],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
801 AC_ARG_WITH(build-version,
802 [ --with-build-version Allows the builder to add a custom version tag
803 that will appear in the Help/About box for QA
806 Usage: --with-build-version="Built by Jim"
807 ],with_build_version=$withval)
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 ===================================================================
922 AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
923 if test -z "$GNUTAR"; then
924 AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).])
928 dnl ===========================================================
929 dnl check whether we're using solaris 6,7,8 - sparc or intel.
930 dnl ===========================================================
931 AC_MSG_CHECKING([the Solaris operating system release])
932 _os_release=`echo $build_os | $SED -e s/solaris2\.//`
933 if test "$_os_release" -lt "6"; then
934 AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
936 AC_MSG_RESULT([ok ($_os_release)])
939 dnl check whether we're using a sparc or i386 processor
940 AC_MSG_CHECKING([the processor type])
941 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
942 AC_MSG_RESULT([ok ($build_cpu)])
944 AC_MSG_ERROR([only sparc and i386 processors are supported])
947 linux-gnu*|k*bsd*-gnu*)
974 if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
975 AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
976 echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
996 AC_MSG_CHECKING([the FreeBSD operating system release])
997 if test -n "$with_os_version"; then
998 OSVERSION="$with_os_version"
1000 OSVERSION=`/sbin/sysctl -n kern.osreldate`
1002 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
1003 AC_MSG_CHECKING([which thread library to use])
1004 if test "$OSVERSION" -lt "500016"; then
1005 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1006 PTHREAD_LIBS="-pthread"
1007 elif test "$OSVERSION" -lt "502102"; then
1008 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1009 PTHREAD_LIBS="-lc_r"
1012 PTHREAD_LIBS="-pthread"
1014 AC_MSG_RESULT([$PTHREAD_LIBS])
1030 PTHREAD_CFLAGS="-pthread"
1031 PTHREAD_LIBS="-pthread -lpthread"
1038 PTHREAD_LIBS=-pthread
1039 echo "AIX is an alpha port --- Use at own risk" >> warn
1043 AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
1048 AC_SUBST(PTHREAD_CFLAGS)
1049 AC_SUBST(PTHREAD_LIBS)
1051 dnl ===================================================================
1052 dnl Set the ENABLE_CRASHDUMP variable.
1053 dnl ===================================================================
1054 AC_MSG_CHECKING([whether to enable crashdump feature])
1055 if test "$enable_crashdump" = "yes"; then
1056 ENABLE_CRASHDUMP="TRUE"
1057 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1058 AC_MSG_RESULT([yes])
1063 AC_SUBST(ENABLE_CRASHDUMP)
1065 if test "$_os" = "WINNT"; then
1066 BUILD_TYPE="$BUILD_TYPE TWAIN"
1069 if test "$_os" = "WINNT"; then
1070 dnl ===================================================================
1071 dnl Set the VC_STANDARD variable.
1072 dnl ===================================================================
1073 AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
1074 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
1079 AC_MSG_RESULT([yes])
1081 AC_SUBST(VC_STANDARD)
1084 dnl ===================================================================
1085 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
1086 dnl ===================================================================
1087 AC_MSG_CHECKING([whether to turn warnings to errors])
1088 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
1089 ENABLE_WERROR="TRUE"
1090 AC_MSG_RESULT([yes])
1091 AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
1092 AC_MSG_WARN([on platforms where it has been disabled explicitely])
1093 echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
1095 ENABLE_WERROR="FALSE"
1098 AC_SUBST(ENABLE_WERROR)
1100 dnl ===================================================================
1101 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
1102 dnl ===================================================================
1103 AC_MSG_CHECKING([whether to do a debug build])
1104 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
1106 if test -z "$enable_symbols"; then
1107 enable_symbols="yes"
1109 AC_MSG_RESULT([yes])
1111 ENABLE_DEBUG="FALSE"
1114 AC_SUBST(ENABLE_DEBUG)
1116 dnl ===================================================================
1117 dnl Set the ENABLE_DBGUTIL variable
1118 dnl ===================================================================
1119 AC_MSG_CHECKING([whether to build with additional debug utilities])
1120 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1124 AC_MSG_RESULT([yes])
1127 PROFULLSWITCH="product=full"
1129 AC_MSG_RESULT([no, full product build])
1132 AC_SUBST(PROFULLSWITCH)
1135 dnl ===================================================================
1136 dnl First setting is whether to include symbols into final build.
1137 dnl ===================================================================
1138 AC_MSG_CHECKING([whether to include symbols into final build])
1139 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
1140 if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
1141 ENABLE_SYMBOLS="TRUE"
1142 AC_MSG_RESULT([yes])
1144 if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
1145 ENABLE_SYMBOLS="SMALL"
1146 AC_MSG_RESULT([yes, small ones])
1147 else if test "$enable_symbols" != "no" ; then
1148 echo enable symbols is: $enable_symbols
1149 AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
1159 AC_SUBST(ENABLE_SYMBOLS)
1161 dnl ===================================================================
1162 dnl Determine if the solver is to be stripped or not.
1163 dnl ===================================================================
1164 AC_MSG_CHECKING([whether to strip the solver or not.])
1165 if test -n "$enable_strip_solver"; then
1166 if test "$enable_strip_solver" = "yes"; then
1168 else if test "$enable_strip_solver" = "no"; then
1169 DISABLE_STRIP="TRUE"
1171 AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
1175 if test -n "$ENABLE_SYMBOLS"; then
1176 DISABLE_STRIP="TRUE"
1181 AC_SUBST(DISABLE_STRIP)
1183 dnl ===================================================================
1185 dnl ===================================================================
1186 AC_MSG_CHECKING([whether to enable native CUPS support])
1187 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
1189 AC_MSG_RESULT([yes])
1194 AC_SUBST(ENABLE_CUPS)
1196 AC_MSG_CHECKING([whether to enable fontconfig support])
1197 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
1198 ENABLE_FONTCONFIG="TRUE"
1199 AC_MSG_RESULT([yes])
1201 ENABLE_FONTCONFIG=""
1204 AC_SUBST(ENABLE_FONTCONFIG)
1206 dnl ===================================================================
1207 dnl find external tarballs.
1208 dnl ===================================================================
1209 if test -z $TARFILE_LOCATION; then
1210 TARFILE_LOCATION="DEFAULT"
1212 AC_SUBST(TARFILE_LOCATION)
1214 if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \
1215 && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then
1216 DO_FETCH_TARBALLS="yes"
1218 AC_SUBST(DO_FETCH_TARBALLS)
1220 dnl ===================================================================
1221 dnl Disable legacy binary file formats filters
1222 dnl ===================================================================
1223 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
1224 if test "$enable_binfilter" = "no"; then
1228 WITH_BINFILTER="YES"
1229 BUILD_TYPE="$BUILD_TYPE BINFILTER"
1230 AC_MSG_RESULT([yes])
1232 AC_SUBST(WITH_BINFILTER)
1234 if test "$_os" = "WINNT"; then
1235 AC_MSG_CHECKING([whether to use DirectX])
1236 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
1237 ENABLE_DIRECTX="TRUE"
1238 AC_MSG_RESULT([yes])
1243 AC_SUBST(ENABLE_DIRECTX)
1245 AC_MSG_CHECKING([whether to use ActiveX])
1246 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
1248 AC_MSG_RESULT([yes])
1250 DISABLE_ACTIVEX="TRUE"
1253 AC_SUBST(DISABLE_ACTIVEX)
1255 AC_MSG_CHECKING([whether to use ATL])
1256 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
1258 AC_MSG_RESULT([yes])
1263 AC_SUBST(DISABLE_ATL)
1267 dnl ===================================================================
1268 dnl Disable rpath in shared libraries?
1269 dnl ===================================================================
1270 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
1271 if test "$enable_rpath" = "no"; then
1276 AC_MSG_RESULT([$ENABLE_RPATH])
1277 AC_SUBST(ENABLE_RPATH)
1279 dnl Test whether to include MySpell dictionaries
1280 dnl ===================================================================
1281 AC_MSG_CHECKING([whether to include MySpell dictionaries])
1282 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
1283 AC_MSG_RESULT([yes])
1284 WITH_MYSPELL_DICTS=YES
1285 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
1288 WITH_MYSPELL_DICTS=NO
1290 AC_SUBST(WITH_MYSPELL_DICTS)
1292 if test "$WITH_MYSPELL_DICTS" = "NO"; then
1293 AC_MSG_CHECKING([whether to use dicts from external paths])
1294 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
1295 AC_MSG_RESULT([yes])
1297 AC_MSG_CHECKING([for spelling dictionary directory])
1298 if test -n "$with_external_dict_dir"; then
1299 DICT_SYSTEM_DIR=file://$with_external_dict_dir
1301 DICT_SYSTEM_DIR=file:///usr/share/hunspell
1303 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
1304 AC_MSG_CHECKING([for hyphenation patterns directory])
1305 if test -n "$with_external_hyph_dir"; then
1306 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
1308 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
1310 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
1311 AC_MSG_CHECKING([for thesaurus directory])
1312 if test -n "$with_external_thes_dir"; then
1313 THES_SYSTEM_DIR=file://$with_external_thes_dir
1315 THES_SYSTEM_DIR=file:///usr/share/mythes
1317 AC_MSG_RESULT([$THES_SYSTEM_DIR])
1323 AC_SUBST(SYSTEM_DICTS)
1324 AC_SUBST(DICT_SYSTEM_DIR)
1325 AC_SUBST(HYPH_SYSTEM_DIR)
1326 AC_SUBST(THES_SYSTEM_DIR)
1328 if test $_os = "WINNT"; then
1329 AC_MSG_CHECKING([Windows build environment sanity])
1330 dnl ===================================================================
1331 dnl Sanity check! Native windows programs cannot use cygwin symlinks!
1332 dnl ===================================================================
1333 dnl As long as awk instead of $AWK is used somewhere in the sources,
1334 dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
1335 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
1336 AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
1337 Native windows programs cannot use cygwin symlinks. Remove the symbolic
1338 link, and copy the program to the name of the link.])
1340 dnl ===================================================================
1341 dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
1342 dnl CC and CXX but the configure checks here assume that guw.exe
1343 dnl (if needed at all) is not yet present.
1344 dnl ===================================================================
1345 CC=`echo $CC | $SED "s/^guw.exe //"`
1346 CXX=`echo $CXX | $SED "s/^guw.exe //"`
1347 dnl ===================================================================
1348 dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
1350 dnl ===================================================================
1351 if test -n "$CC";then
1352 if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
1356 dnl ===================================================================
1357 if test "$WITH_MINGWIN" = "yes" ; then
1358 if test -z "$CC"; then
1359 CC="gcc -mno-cygwin"
1360 CXX="g++ -mno-cygwin"
1365 AC_SUBST(WITH_MINGWIN)
1367 dnl ===================================================================
1368 dnl Extra check for Windows. cygwin builds need gcc to build dmake
1369 dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
1371 dnl ===================================================================
1372 if test "$_os" = "WINNT" ; then
1373 AC_MSG_CHECKING([for cygwin gcc/g++])
1374 if which gcc > /dev/null && which g++ > /dev/null ; then
1375 AC_MSG_RESULT([found])
1377 AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
1382 dnl ===================================================================
1383 dnl Check whether the bash shell can be used.
1384 dnl ===================================================================
1385 AC_PATH_PROG(SHELLPATH, bash)
1386 if test -z "$SHELLPATH"; then
1387 AC_MSG_ERROR([bash not found in \$PATH])
1389 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
1393 dnl ===================================================================
1394 dnl Checks for c compiler,
1395 dnl The check for the c++ compiler is later on.
1396 dnl ===================================================================
1397 AC_MSG_CHECKING([gcc home])
1398 if test -z "$with_gcc_home"; then
1399 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1401 GCC_HOME="$with_gcc_home"
1403 AC_MSG_RESULT($GCC_HOME)
1409 if test -n "$with_gcc_home"; then
1410 if test -z "$CC"; then
1411 CC="$with_gcc_home/bin/gcc"
1415 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1416 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1420 COMPATH=`dirname "$CC"`
1421 if test "$COMPATH" = "." ; then
1422 AC_PATH_PROGS(COMPATH, $CC)
1423 dnl double square bracket to get single because of M4 quote...
1424 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1426 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
1428 dnl ===================================================================
1429 dnl Test the gcc version, 3 is OK
1430 dnl ===================================================================
1432 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1433 AC_MSG_CHECKING([the GNU gcc compiler version])
1434 _gcc_version=`$CC -dumpversion`
1435 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
1436 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1438 if test "$_gcc_major" -lt "3"; then
1439 AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
1441 if test "$GCCVER" -eq "030203"; then
1442 if test "$ENABLE_SYMBOLS" = "SMALL"; then
1443 AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
1447 if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then
1448 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
1449 CC=$GCC_HOME/bin/gcc-4.0
1450 GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1451 if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
1455 if test "$GCCVER" -ge "040100" ; then
1456 AC_MSG_ERROR([You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly])
1458 AC_MSG_RESULT([implicitly using CC=$CC])
1461 AC_MSG_RESULT([checked (gcc $_gcc_version)])
1463 if test "$_os" = "SunOS"; then
1464 AC_MSG_CHECKING([gcc linker])
1465 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
1466 AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
1468 AC_MSG_RESULT([ok (GNU ld)])
1473 HAVE_LD_BSYMBOLIC_FUNCTIONS=
1474 if test "$GCC" = "yes"; then
1475 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
1476 bsymbolic_functions_ldflags_save=$LDFLAGS
1477 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
1478 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1481 printf ("hello world\n");
1482 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
1483 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
1484 AC_MSG_RESULT( found )
1486 AC_MSG_RESULT( not found )
1488 LDFLAGS=$bsymbolic_functions_ldflags_save
1490 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
1492 dnl ===================================================================
1493 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
1494 dnl ===================================================================
1495 AC_MSG_CHECKING([whether to enable pch feature])
1496 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
1497 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
1499 AC_MSG_RESULT([yes])
1500 dnl There is no PCH support in GCC versions prior to this
1501 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
1503 AC_MSG_RESULT([yes])
1506 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
1512 AC_SUBST(ENABLE_PCH)
1514 dnl ===================================================================
1515 dnl Set the NO_HIDS variable. (enable with --enable-hids)
1516 dnl ===================================================================
1517 AC_MSG_CHECKING([whether to enable hid list feature])
1518 if test -n "$enable_hids" && test "$enable_hids" != "no"; then
1520 AC_MSG_RESULT([yes])
1527 dnl ===================================================================
1528 dnl Search all the common names for GNU make
1529 dnl ===================================================================
1530 AC_MSG_CHECKING([for GNU make])
1531 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
1532 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1533 if test $? -eq 0; then
1538 AC_MSG_RESULT($GNUMAKE)
1539 if test -z "$GNUMAKE"; then
1540 AC_MSG_ERROR([not found. install GNU make.])
1543 AC_MSG_CHECKING([the GNU make version])
1544 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
1545 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1546 if test "$_make_longver" -ge "037901" ; then
1547 AC_MSG_RESULT([$GNUMAKE $_make_version])
1549 if test "$_os" = "Darwin"; then
1550 if test "$_make_longver" -ge "037900" ; then
1551 AC_MSG_RESULT([$GNUMAKE $_make_version])
1553 AC_MSG_WARN([failed ($GNUMAKE $_make_version need 3.79.0+)])
1556 AC_MSG_ERROR([failed ($GNUMAKE $_make_version need 3.79.1+)])
1561 dnl ===================================================================
1562 dnl Search all the common names for GNU tar
1563 dnl ===================================================================
1564 AC_MSG_CHECKING([for GNU tar])
1565 for a in $GNUTAR gtar gnutar tar; do
1566 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1567 if test $? -eq 0; then
1572 AC_MSG_RESULT($GNUTAR)
1573 if test -z "$GNUTAR"; then
1574 AC_MSG_ERROR([not found. install GNU tar.])
1579 dnl ===================================================================
1580 dnl Test the solaris compiler version
1581 dnl ===================================================================
1582 if test "$_os" = "SunOS"; then
1583 if test "$CC" = "cc"; then
1584 AC_PATH_PROGS(_cc, cc)
1585 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
1586 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
1587 dnl cc -V outputs to standard error!!!!
1588 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
1589 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
1590 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
1591 if test "$_sunstudio_major" != "5"; then
1592 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1594 _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" }'`
1595 if test "$_sunstudio_minor" = "false"; then
1596 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1598 dnl compiler will do
1599 AC_MSG_RESULT([checked])
1605 if test "$GCC" = "yes"; then
1606 AC_MSG_CHECKING( for --hash-style=both linker support )
1607 hash_style_ldflags_save=$LDFLAGS
1608 LDFLAGS="$LDFLAGS -Wl,--hash-style=both"
1609 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1612 printf ("hello world\n");
1613 ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
1614 if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
1615 AC_MSG_RESULT( found )
1617 AC_MSG_RESULT( not found )
1619 LDFLAGS=$hash_style_ldflags_save
1621 AC_SUBST(HAVE_LD_HASH_STYLE)
1623 dnl ===================================================================
1624 dnl Test the Compaq compiler for OSF1
1625 dnl ===================================================================
1626 if test "$_os" = "OSF1"; then
1627 if test "$CC" = "cc"; then
1628 AC_PATH_PROGS(_cc, cc)
1629 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
1630 AC_MSG_WARN([******* $_cc , $COMPATH])
1631 AC_MSG_CHECKING([the Compaq C compiler version])
1632 dnl cc -V outputs to standard error!!!!
1633 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
1634 _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
1635 if test "$_compaqc_major" != "T6"; then
1636 AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
1638 dnl compiler will do
1639 AC_MSG_RESULT([checked])
1644 dnl ===================================================================
1645 dnl Check whether there's a Perl version available.
1646 dnl ===================================================================
1647 if test -z "$with_perl_home"; then
1648 AC_PATH_PROG(PERL, perl)
1650 if test "$_os" = "WINNT"; then
1651 with_perl_home=`cygpath -u "$with_perl_home"`
1653 _perl_path="$with_perl_home/bin/perl"
1654 if test -x "$_perl_path"; then
1657 AC_MSG_ERROR([$_perl_path not found])
1661 dnl ===================================================================
1662 dnl Testing for Perl version 5 or greater.
1663 dnl $] is the perl version variable, it is returned as an integer
1664 dnl ===================================================================
1665 if test "$PERL"; then
1666 AC_MSG_CHECKING([the Perl version])
1667 ${PERL} -e "exit($]);"
1669 if test "$_perl_version" -lt 5; then
1670 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
1672 AC_MSG_RESULT([checked (perl $_perl_version)])
1674 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
1678 dnl ===================================================================
1679 dnl Testing for required Perl modules
1680 dnl ===================================================================
1681 AC_MSG_CHECKING([for required Perl modules])
1682 if `$PERL -e 'use Archive::Zip;'`; then
1683 AC_MSG_RESULT([all modules found])
1685 AC_MSG_ERROR([Failed to find some modules])
1688 dnl ===================================================================
1689 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
1690 dnl ===================================================================
1691 if test "$_os" = "WINNT"; then
1692 if test "$WITH_MINGWIN" != "yes"; then
1693 AC_MSG_CHECKING([for friendly registry keys])
1694 # VS.Net 2003, VS.Net 2005
1695 if test -z "$with_cl_home"; then
1696 vctest=`./oowintool --msvc-productdir`;
1697 if test -x "$vctest/bin/cl.exe"; then
1698 with_cl_home=$vctest;
1701 with_cl_home=`cygpath -u "$with_cl_home"`
1703 AC_MSG_RESULT([done])
1705 dnl ===========================================================
1706 dnl Check for mspdb71.dll/mspdb80.dll
1707 dnl ===========================================================
1708 dnl .NET 2003/5/8 Compiler
1709 if test -n "$with_mspdb_path";then
1710 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
1712 if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
1713 MSPDB_PATH="$with_mspdb_path"
1716 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
1717 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1719 dnl .NET 2005/2008 case
1720 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
1721 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1723 dnl Windows SDK 6.0 case
1724 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
1725 MSPDB_PATH="$with_cl_home/bin"
1728 if test -z "$MSPDB_PATH";then
1729 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
1730 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
1731 AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
1732 MSPDB_PATH=`dirname "$MSPDB_PATH"`
1735 if test -z "$MSPDB_PATH"; then
1736 AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
1738 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
1739 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
1740 dnl The path needs to be added before cl is called
1741 PATH="$MSPDB_PATH:$PATH"
1743 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
1744 if test -x "$with_cl_home/bin/cl.exe"; then
1745 CC="$with_cl_home/bin/cl.exe"
1747 AC_PATH_PROG(CC, cl.exe)
1749 if test -e "$CC"; then
1750 # This gives us a posix path with 8.3 filename restrictions
1751 CC=`cygpath -d "$CC"`
1752 CC=`cygpath -u "$CC"`
1753 # Remove /cl.exe from CC case insensitive
1754 AC_MSG_RESULT([found ($CC)])
1755 COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
1756 export INCLUDE=`cygpath -d "$COMPATH/Include"`
1757 dnl Check which Microsoft C/C++ compiler is found
1758 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
1759 dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
1760 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
1761 x = match( \\\$0, /..\\...\\...../ )
1762 CCversion = substr( \\\$0, RSTART, RLENGTH)
1763 tokencount = split (CCversion,vertoken,\".\")
1764 for ( i = 1 ; i <= tokencount ; i++ ) {
1765 printf (\"%04d\",vertoken[[i]] )
1768 AC_MSG_RESULT([found Compiler version $CCNUMVER.])
1769 if test "$CCNUMVER" -ge "001500000000"; then
1772 AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
1773 elif test "$CCNUMVER" -ge "001400000000"; then
1776 AC_MSG_RESULT([found .NET 2005.])
1777 elif test "$CCNUMVER" -ge "001300102240"; then
1780 AC_MSG_RESULT([found .NET 2003.])
1782 AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
1785 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
1788 AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
1789 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
1790 AC_MSG_RESULT([found.])
1791 if $CC -dumpspecs | grep -q "mno-cygwin"; then
1794 USE_MINGW="pure-mingw"
1797 AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
1802 AC_SUBST(MSPDB_PATH)
1805 dnl ===================================================================
1806 dnl .NET needs special treatment
1807 dnl ===================================================================
1808 if test "$_os" = "WINNT"; then
1809 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
1811 AC_PATH_PROG(MIDL_PATH, midl.exe)
1812 if test -n "$MIDL_PATH";then
1813 MIDL_PATH=`dirname "$MIDL_PATH"`
1815 if test -n "$with_midl_path";then
1816 with_midl_path=`cygpath -u "$with_midl_path"`
1818 if test -x "$with_midl_path/midl.exe"; then
1819 MIDL_PATH="$with_midl_path"
1821 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
1822 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
1824 if test -z "$MIDL_PATH" ; then
1825 vstest=`./oowintool --msvs-productdir`;
1826 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
1827 MIDL_PATH="$vstest/Common7/Tools/Bin"
1830 if test -z "$MIDL_PATH" ; then
1831 psdktest=`./oowintool --psdk-home`
1832 if test -x "$psdktest/Bin/midl.exe" ; then
1833 MIDL_PATH="$psdktest/Bin"
1836 if test ! -x "$MIDL_PATH/midl.exe"; then
1837 AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
1839 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1840 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
1841 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
1844 AC_PATH_PROG(CSC_PATH, csc.exe)
1845 if test -n "$CSC_PATH";then
1846 CSC_PATH=`dirname "$CSC_PATH"`
1848 if test -n "$with_csc_path";then
1849 with_csc_path=`cygpath -u "$with_csc_path"`
1851 if test -x "$with_csc_path/csc.exe"; then
1852 CSC_PATH="$with_csc_path"
1854 csctest=`./oowintool --csc-compilerdir`;
1855 if test -x "$csctest/csc.exe"; then
1859 if test ! -x "$CSC_PATH/csc.exe"; then
1860 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
1862 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1863 CSC_PATH=`cygpath -d "$CSC_PATH"`
1864 CSC_PATH=`cygpath -u "$CSC_PATH"`
1866 dnl Check mscoree.lib / .NET Frameworks dir
1867 dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
1868 AC_MSG_CHECKING(.NET Framework)
1869 if test -n "$with_frame_home"; then
1870 with_frame_home=`cygpath -u "$with_frame_home"`
1872 if test -f "$with_frame_home/lib/mscoree.lib"; then
1873 FRAME_HOME="$with_frame_home"
1875 if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
1876 FRAME_HOME="$with_cl_home/../SDK/v1.1"
1878 if test -z "$FRAME_HOME" ; then
1879 frametest=`./oowintool --dotnetsdk-dir`
1880 if test -f "$frametest/lib/mscoree.lib"; then
1881 FRAME_HOME="$frametest"
1883 frametest=`./oowintool --psdk-home`
1884 if test -f "$frametest/lib/mscoree.lib"; then
1885 FRAME_HOME="$frametest"
1889 if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
1890 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
1892 AC_MSG_RESULT(found)
1893 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1894 FRAME_HOME=`cygpath -d "$FRAME_HOME"`
1895 FRAME_HOME=`cygpath -u "$FRAME_HOME"`
1899 AC_SUBST(FRAME_HOME)
1902 dnl ===================================================================
1903 dnl Check if stdc headers are available excluding windows.
1904 dnl ===================================================================
1905 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1909 dnl ===================================================================
1910 dnl Find pre-processors.
1911 dnl ===================================================================
1912 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1915 dnl Check whether there's a C pre-processor.
1916 dnl ===================================================================
1917 dnl When using SunStudio compiler, there is a bug with the cc
1918 dnl preprocessor, so use CC preprocessor as the cc preprocessor
1919 dnl See Issuezilla #445.
1920 dnl ===================================================================
1921 if test "$_os" = "SunOS"; then
1928 AC_CHECK_SIZEOF(long)
1929 SIZEOF_LONG=$ac_cv_sizeof_long
1930 AC_SUBST(SIZEOF_LONG)
1932 WORDS_BIGENDIAN=$ac_cv_c_bigendian
1933 AC_SUBST(WORDS_BIGENDIAN)
1935 dnl Check for large file support
1937 if test -n "$ac_cv_sys_file_offset_bits"; then
1938 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1940 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
1941 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
1943 AC_SUBST(LFS_CFLAGS)
1945 dnl ===================================================================
1946 dnl Check if we are to enable vba macro interoperability feature
1947 dnl ===================================================================
1948 AC_MSG_CHECKING([whether to disable vba feature])
1949 if test -n "$enable_vba" && test "$enable_vba" = "no"; then
1950 AC_MSG_RESULT([yes])
1956 AC_SUBST(ENABLE_VBA)
1958 if test "$ENABLE_VBA" = "YES"; then
1959 AC_MSG_CHECKING([how to package the vba compatibility api])
1960 if test -n "$with_vba_package_format"; then
1961 if test "$with_vba_package_format" = "extn"; then
1963 AC_MSG_RESULT([uno extension])
1964 AC_MSG_WARN([--with-vba-package-format=extn can cause problems])
1965 else if test "$with_vba_package_format" = "builtin"; then
1967 AC_MSG_RESULT([build into installset])
1969 AC_MSG_ERROR([unknown packaging method])
1975 AC_MSG_RESULT([defaulting to build into installset])
1980 AC_SUBST(VBA_EXTENSION)
1982 dnl ===================================================================
1983 dnl Check the whether vba need to be delivered as an uno package or part
1985 dnl ===================================================================
1988 dnl ===================================================================
1989 dnl Check if cups/cups.h is available
1990 dnl ===================================================================
1991 if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
1992 AC_CHECK_HEADER(cups/cups.h, [],
1993 [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
1996 dnl ===================================================================
1997 dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
1998 dnl ===================================================================
1999 if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
2000 AC_MSG_CHECKING([whether to enable pam support])
2001 if test -z "$enable_pam" || test "$enable_pam" != "no"; then
2002 AC_MSG_RESULT([yes])
2004 AC_CHECK_HEADER(security/pam_appl.h, [],
2005 [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
2006 AC_MSG_CHECKING([whether to link to libpam])
2007 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
2008 AC_MSG_RESULT([yes])
2010 AC_CHECK_LIB(pam, pam_start, [],
2011 [AC_MSG_ERROR(libpam not found or functional)], [])
2013 AC_MSG_RESULT([no, dynamically open it])
2020 dnl check getspnam_r for needed args (4 or 5)
2021 AX_FUNC_WHICH_GETSPNAM_R
2025 AC_SUBST(NEW_SHADOW_API)
2028 if test "$_os" = "Linux"; then
2029 AC_MSG_CHECKING([whether to link to libcrypt])
2030 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
2031 AC_MSG_RESULT([yes])
2033 AC_CHECK_LIB(crypt, crypt, [],
2034 [AC_MSG_ERROR(libcrypt not found or functional)], [])
2036 AC_MSG_RESULT([no, dynamically open it])
2040 AC_SUBST(CRYPT_LINK)
2042 dnl ===================================================================
2043 dnl Testing for c++ compiler and version...
2044 dnl ===================================================================
2045 if test -n "$with_gcc_home"; then
2046 if test -z "$CXX"; then
2047 CXX="$with_gcc_home/bin/g++"
2051 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2052 if test -e "$CC"; then
2057 dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
2058 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2062 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
2063 if test "$GXX" = "yes"; then
2064 AC_MSG_CHECKING([the GNU C++ compiler version])
2066 _gpp_version=`$CXX -dumpversion`
2067 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
2069 if test "$_os" = "Darwin" -a "$_gpp_majmin" -ge "401" ; then
2070 if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
2071 CXX=$GCC_HOME/bin/g++-4.0
2072 _gpp_majmin_2=`"$CXX" -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
2073 if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
2074 _gpp_majmin=$_gpp_majmin_2
2077 if test "$_gpp_majmin" -ge "401" ; then
2078 AC_MSG_ERROR([You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly])
2080 AC_MSG_RESULT([implicitly using CXX=$CXX])
2083 AC_MSG_RESULT([checked (g++ $_gpp_version)])
2086 if test "$_gpp_majmin" = "304"; then
2087 AC_MSG_CHECKING([whether $CXX has the enum bug])
2089 extern "C" void abort (void);
2090 extern "C" void exit (int status);
2092 enum E { E0, E1, E2, E3, E4, E5 };
2097 if (e == E2 || e == E3 || e == E1)
2109 ],[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])])
2113 dnl ===================================================================
2114 dnl Set the gcc/gxx include directories
2115 dnl ===================================================================
2116 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
2117 # often contains an i386 which is expanded as a macro. Solved in stlport.
2118 if test "$GXX" = "yes"; then
2119 AC_MSG_CHECKING([for g++ include path])
2120 if test -z "$with_gxx_include_path"; then
2121 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
2122 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
2123 with_gxx_include_path="/usr/include"
2125 if test "$WITH_MINGWIN" = "yes"; then
2126 with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
2127 with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
2129 if echo $with_gxx_include_path | grep -q linux; then
2130 # workaround for Mandriva - issue 100049
2131 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
2135 dnl This is the original code...
2136 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
2137 if test -z "$with_gxx_include_path"; then
2138 with_gxx_include_path="NO_GXX_INCLUDE"
2139 AC_MSG_RESULT([no g++ includes])
2141 AC_MSG_RESULT([$with_gxx_include_path])
2143 GXX_INCLUDE_PATH="$with_gxx_include_path"
2144 AC_SUBST(GXX_INCLUDE_PATH)
2146 dnl ===================================================================
2147 dnl Set the mingw runtime library include directories
2148 dnl ===================================================================
2149 if test "$WITH_MINGWIN" = "yes"; then
2150 AC_MSG_CHECKING([for mingwin runtime include path])
2151 cat >conftest.$ac_ext <<_ACEOF
2153 #include <bits/c++config.h>
2155 _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`
2157 if test -n "$_mingw_lib_include_path"; then
2159 for a in $_mingw_lib_include_path
2162 _temp="$_temp "`cygpath -u "$a"`
2164 _mingw_lib_include_path=$_temp
2166 if test -z "$_mingw_lib_include_path"; then
2167 _mingw_lib_include_path="NO_LIB_INCLUDE"
2168 AC_MSG_RESULT([no mingwin runtime includes])
2170 AC_MSG_RESULT([$_mingw_lib_include_path])
2172 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
2173 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
2174 dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map
2175 AC_MSG_CHECKING([for mingwin c++ backward include path])
2176 cat >conftest.$ac_ext <<_ACEOF
2179 _mingw_backward_include_path=`$CXX -E -xc++ -Wno-deprecated conftest.$ac_ext 2>&5| $SED -n -e '/.*1*"\(.*\)\/hash_set".*/s//\1/p' | sort -u | xargs echo`
2181 if test -n "$_mingw_backward_include_path"; then
2182 _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path`
2183 _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path`
2184 AC_MSG_RESULT([$_mingw_backward_include_path])
2186 _mingw_backward_include_path="NO_BACKWARD_INCLUDE"
2187 AC_MSG_RESULT([no mingwin c++ backward includes])
2189 MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path"
2190 AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH)
2191 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
2192 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
2193 AC_MSG_CHECKING([whether to use dynamic libgcc])
2194 if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then
2195 AC_MSG_CHECKING([dynamic libgcc name])
2196 MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'`
2197 MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null`
2198 if test -n "$MINGW_GCCDLL"; then
2199 MINGW_SHARED_GCCLIB=YES
2200 AC_MSG_RESULT([use $MINGW_GCCDLL])
2207 if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then
2210 AC_MSG_CHECKING([whether to use dynamic libstdc++])
2211 if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then
2212 AC_MSG_CHECKING([dynamic libstdc++ name])
2213 MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/libstdc++_s.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'`
2214 MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null`
2215 if test -n "$MINGW_GXXDLL"; then
2216 MINGW_SHARED_GXXLIB=YES
2217 AC_MSG_RESULT([use $MINGW_GXXDLL])
2224 MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR`
2225 AC_SUBST(MINGW_CLIB_DIR)
2226 AC_SUBST(MINGW_SHARED_GCCLIB)
2227 AC_SUBST(MINGW_GCCLIB_EH)
2228 AC_SUBST(MINGW_SHARED_GXXLIB)
2229 AC_SUBST(MINGW_GCCDLL)
2230 AC_SUBST(MINGW_GXXDLL)
2233 dnl ===================================================================
2234 dnl Extra checking for the SUN OS compiler
2235 dnl ===================================================================
2236 if test "$_os" = "SunOS"; then
2237 dnl SunStudio C++ compiler packaged with SunStudio C compiler
2238 if test "$CC" = "cc"; then
2239 AC_MSG_CHECKING([SunStudio C++ Compiler])
2240 if test "$CXX" != "CC"; then
2241 AC_MSG_WARN([SunStudio C++ was not found])
2242 echo "SunStudio C++ was not found" >> warn
2244 AC_MSG_RESULT([checked])
2248 dnl ===================================================================
2249 dnl Extra checking for the OSF compiler
2250 dnl ===================================================================
2251 if test "$_os" = "OSF1"; then
2252 AC_MSG_CHECKING([Compaq C++ compiler version])
2253 dnl cxx -V outputs to standard error!!!!
2254 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
2255 _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
2256 if test "$_compaqcxx_major" != "V6"; then
2257 AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
2258 echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
2260 dnl compiler will do
2261 AC_MSG_RESULT([checked])
2265 dnl *************************************************************
2266 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
2267 dnl *************************************************************
2268 AC_MSG_CHECKING([exception type])
2270 if test "$WITH_MINGWIN" = "yes"; then
2272 [#include <iostream>
2274 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
2277 [_Unwind_SjLj_RaiseException() ],
2278 [exceptions_type="sjlj"],
2279 [exceptions_type="dwarf2"]
2283 AC_MSG_RESULT($exceptions_type)
2285 EXCEPTIONS="$exceptions_type"
2286 AC_SUBST(EXCEPTIONS)
2288 dnl **************************************************************
2289 dnl Testing for required Solaris and SunStudio compiler patches...
2290 dnl **************************************************************
2291 dnl Check whether the OS is SunOS.
2292 if test "$_os" = "SunOS"; then
2293 _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
2294 if test "$_os_release" = "7"; then
2298 AC_MSG_CHECKING([for patch 106327-06 or greater])
2299 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
2303 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2304 if test "$_patch_major" = "106327"; then
2305 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2306 if test "$_patch_rev" -ge "6"; then
2311 if test "$_patch" = "found"; then
2312 AC_MSG_RESULT([found])
2314 AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
2315 echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
2320 AC_MSG_CHECKING([for patch 106950-11 or greater])
2321 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
2325 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2326 if test "$_patch_major" = "106950"; then
2327 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2328 if test "$_patch_rev" -ge "11"; then
2333 if test "$_patch" = "found"; then
2334 AC_MSG_RESULT([found])
2336 AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
2337 echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
2340 if test "$_os_release" = "6"; then
2344 AC_MSG_CHECKING([for patch 105591-09 or greater])
2345 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
2349 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2350 if test "$_patch_major" = "105591"; then
2351 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2352 if test "$_patch_rev" -ge "9"; then
2357 if test "$_patch" = "found"; then
2358 AC_MSG_RESULT([found])
2360 AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
2361 echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
2366 AC_MSG_CHECKING([for patch 107733-08 or greater])
2367 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
2371 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2372 if test "$_patch_major" = "107733"; then
2373 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2374 if test "$_patch_rev" -ge "8"; then
2379 if test "$_patch" = "found"; then
2380 AC_MSG_RESULT([found])
2382 AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
2383 echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
2389 dnl ===================================================================
2390 dnl Checks for what the default STL should be
2391 dnl ===================================================================
2392 AC_MSG_CHECKING([what the default STL should be])
2393 DEFAULT_TO_STLPORT="no"
2394 if test "$_os" = "Linux"; then
2395 case "$build_cpu" in
2397 case "$build_os" in k*bsd*-gnu*)
2398 DEFAULT_TO_STLPORT="no"
2401 DEFAULT_TO_STLPORT="yes"
2406 DEFAULT_TO_STLPORT="no"
2409 elif test "$_os" = "SunOS"; then
2410 DEFAULT_TO_STLPORT="yes"
2411 elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2412 DEFAULT_TO_STLPORT="yes"
2413 elif test "$_os" = "OS2"; then
2414 DEFAULT_TO_STLPORT="yes"
2415 elif test "$_os" = "FreeBSD"; then
2416 DEFAULT_TO_STLPORT="yes"
2418 if test "$DEFAULT_TO_STLPORT" = "yes"; then
2419 AC_MSG_RESULT([stlport])
2421 AC_MSG_RESULT([system])
2423 if test "$WITH_STLPORT" = "auto"; then
2424 WITH_STLPORT=$DEFAULT_TO_STLPORT
2427 dnl ===================================================================
2428 dnl Checks for STLPORT
2429 dnl ===================================================================
2430 AC_MSG_CHECKING([for STL providing headers])
2433 if test "$WITH_STLPORT" = "yes"; then
2434 AC_MSG_RESULT([using internal stlport.])
2435 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2436 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2437 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2439 elif test "$WITH_STLPORT" = "no"; then
2440 AC_MSG_RESULT([using system STL])
2441 USE_SYSTEM_STL="YES"
2442 if test "$DEFAULT_TO_STLPORT" != "no"; then
2443 AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
2444 echo "using system STL. Warning, breaks your ABI compatability!" >>warn
2447 STLPORT4=$WITH_STLPORT
2448 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2449 AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
2451 dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
2452 if test -f "$STLPORT4/stlport/hash_map"; then
2453 AC_MSG_RESULT([checked.])
2455 AC_MSG_ERROR([STLport headers not found.])
2458 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2459 AC_MSG_CHECKING([for STLport libraries])
2460 if test "$_os" = "SunOS"; then
2461 if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
2462 AC_MSG_RESULT([checked])
2463 elif test -f "$STLPORT4/lib/libstlport.so"; then
2464 AC_MSG_RESULT([checked])
2467 AC_MSG_ERROR([STLport libraries not found])
2469 elif test "$_os" = "Darwin"; then
2470 if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
2471 AC_MSG_RESULT([checked])
2472 elif test -f "$STLPORT4/lib/libstlport.dylib"; then
2473 AC_MSG_RESULT([checked])
2476 AC_MSG_ERROR([STLport libraries not found])
2479 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2480 AC_MSG_RESULT([checked])
2481 elif test -f "$STLPORT4/lib/libstlport.so"; then
2482 AC_MSG_RESULT([checked])
2485 AC_MSG_ERROR([STLport libraries not found])
2489 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2490 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2491 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2495 if test -z "$STLPORT4"; then
2496 STLPORT4="NO_STLPORT4"
2498 if test -z "$STLPORT_VER"; then
2502 AC_SUBST(STLPORT_VER)
2503 AC_SUBST(USE_SYSTEM_STL)
2505 dnl ===================================================================
2506 dnl visibility feature
2507 dnl ===================================================================
2508 if test "$GCC" = "yes"; then
2509 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
2511 CFLAGS="$CFLAGS -fvisibility=hidden"
2512 AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
2514 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2515 AC_MSG_RESULT([yes])
2521 # ===================================================================
2522 # use --ccache-skip?
2523 # ===================================================================
2524 dnl used to escape compiler options for ccache that otherwise prevent
2525 dnl caching of the results (like "-x objective-c++" for Mac)
2526 AC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip])
2527 if test "$_os" != "Darwin" ; then
2528 AC_MSG_RESULT([only used on Mac currently, skipping])
2529 elif test "$enable_ccache_skip" = "no" ; then
2530 AC_MSG_RESULT([no - diabled explicitly])
2531 elif test "$enable_ccache_skip" = "yes" ; then
2532 AC_MSG_RESULT([yes - enabled explicitly, skipping checks])
2533 AC_SUBST([USE_CCACHE], [YES])
2534 elif test "$enable_ccache_skip" = "auto" ; then
2535 # checking for ccache presence/version
2536 AC_MSG_RESULT([probing...])
2537 AC_PATH_PROG([CCACHE],[ccache],[not_found])
2538 if test "$CCACHE" = "not_found" ; then
2539 AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)])
2541 # check ccache version
2542 AC_MSG_CHECKING([whether version of ccache is suitable])
2543 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2544 if test "$CCACHE_VERSION" = "2.4_OOo"; then
2545 AC_MSG_RESULT([yes])
2546 AC_MSG_CHECKING([whether ccache is actually used for the build])
2548 save_CXXFLAGS=$CXXFLAGS
2549 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
2550 dnl an empty program will do, we're checking the compiler flags
2551 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),
2552 [use_ccache=yes], [use_ccache=no])
2553 if test $use_ccache = yes ; then
2554 AC_MSG_RESULT([yes, will enable --ccache-skip])
2555 AC_SUBST([USE_CCACHE], [YES])
2557 AC_MSG_RESULT([no, will not enable --ccache-skip])
2559 CXXFLAGS=$save_CXXFLAGS
2563 AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip])
2567 AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"])
2570 dnl ===================================================================
2571 dnl system stl sanity tests
2572 dnl ===================================================================
2573 if test "$USE_SYSTEM_STL" = "YES"; then
2574 AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
2577 AC_TRY_COMPILE([#include <ext/hash_map>
2578 using namespace __gnu_cxx;
2579 ],[hash_map<int, int> t; return 0;],
2580 ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
2582 if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
2583 AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
2585 AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
2588 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2589 AC_MSG_CHECKING([if STL headers are visibility safe])
2590 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
2591 AC_MSG_RESULT([$stlvisok])
2592 if test "$stlvisok" = "no"; then
2593 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
2594 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
2595 unset HAVE_GCC_VISIBILITY_FEATURE
2599 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2600 sharedlink_ldflags_save=$LDFLAGS
2601 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
2603 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
2604 AC_TRY_LINK([#include <sstream>
2605 using namespace std;
2606 ],[istringstream strm( "test" ); return 0;],
2607 $EGREP -q unresolvable conftest.err;
2608 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
2610 AC_MSG_RESULT([$gccvisok])
2611 if test "$gccvisok" = "no"; then
2612 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility])
2613 echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn
2614 unset HAVE_GCC_VISIBILITY_FEATURE
2617 LDFLAGS=$sharedlink_ldflags_save
2620 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2621 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
2622 cat >visibility.cxx <<_ACEOF
2623 #pragma GCC visibility push(hidden)
2624 struct __attribute__ ((visibility ("default"))) TestStruct {
2627 __attribute__ ((visibility ("default"))) void TestFunc() {
2631 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
2634 case "$build_cpu" in
2636 if $EGREP -q '@PLT' visibility.s; then
2649 AC_MSG_RESULT([$gccvisbroken])
2650 if test "$gccvisbroken" = "yes"; then
2651 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
2652 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
2653 unset HAVE_GCC_VISIBILITY_FEATURE
2660 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
2662 dnl ===================================================================
2664 dnl ===================================================================
2665 AC_MSG_CHECKING([which memory allocator to use])
2666 if test "$with_alloc" = "system"; then
2667 AC_MSG_RESULT([system])
2669 AC_CHECK_FUNCS([malloc realloc calloc free])
2671 if test "$with_alloc" = "tcmalloc"; then
2672 AC_MSG_RESULT(tcmalloc)
2673 if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
2674 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
2676 AC_CHECK_LIB(tcmalloc, malloc, [],
2677 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
2680 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
2681 AC_MSG_RESULT([internal])
2685 dnl ===================================================================
2686 dnl Custom build version
2687 dnl ===================================================================
2689 AC_MSG_CHECKING([whether to add custom build version])
2690 if test "z$with_build_version" != "z"; then
2691 BUILD_VER_STRING=$with_build_version
2692 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
2697 AC_SUBST(BUILD_VER_STRING)
2699 dnl ===================================================================
2700 dnl Java support enable
2701 dnl ===================================================================
2702 AC_MSG_CHECKING([whether to build with Java support])
2703 if test "$WITH_JAVA" != "no"; then
2704 AC_MSG_RESULT([yes])
2710 AC_MSG_WARN([building without java will mean some features will not be available])
2711 echo "building without java will mean some features will not be available" >>warn
2713 AC_SUBST(SOLAR_JAVA)
2715 if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
2716 # IBMs JDK needs this...
2717 JITC_PROCESSOR_TYPE=6
2718 export JITC_PROCESSOR_TYPE
2721 if test "$_os" = "WINNT"; then
2722 if test -z "$with_jdk_home"; then
2723 _jdk_home=`./oowintool --jdk-home`
2724 if test -d "$_jdk_home"; then
2725 with_jdk_home="$_jdk_home"
2728 with_jdk_home=`cygpath -u "$with_jdk_home"`
2732 dnl ===================================================================
2734 dnl ===================================================================
2735 if test "$SOLAR_JAVA" != ""; then
2736 JAVA_HOME=; export JAVA_HOME
2737 if test -z "$with_jdk_home"; then
2738 AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
2740 _java_path="$with_jdk_home/bin/$WITH_JAVA"
2741 dnl Check if there is a java interpreter at all.
2742 if test -x "$_java_path"; then
2743 JAVAINTERPRETER=$_java_path
2745 AC_MSG_ERROR([$_java_path not found set with_jdk_home])
2748 if test "$_os" = "WINNT"; then
2749 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
2750 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
2752 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
2753 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
2754 elif test "$_os" = "Darwin"; then
2755 dnl HACK: There currently is only a 32 bit version of OOo for Mac OS X,
2756 dnl and Tiger java complains about -d32 while Snow Leopard java needs it
2757 dnl to run in 32 bit mode and be able to load OOo jnilibs:
2758 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
2759 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
2760 AC_MSG_RESULT([yes])
2768 dnl ===================================================================
2770 dnl ===================================================================
2771 if test "$SOLAR_JAVA" != ""; then
2773 AC_MSG_CHECKING([the installed JDK])
2774 if test -n "$JAVAINTERPRETER"; then
2775 dnl java -version sends output to stderr!
2776 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2777 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2778 # dnl Kaffe specific tests
2779 # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
2780 # if test -z "$KAFFE_VER"; then
2781 # AC_MSG_ERROR([looks like Kaffe but version detection failed])
2783 # _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2784 # if test "$_kaffe_ver" -lt 10100; then
2785 # AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
2789 # dnl TODO: define some project exclusion variables
2791 # AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
2792 # AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
2793 # echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
2794 # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2795 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
2797 AC_MSG_RESULT([checked (gcj)])
2798 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2799 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2801 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
2802 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2805 # dnl BEA JDK specific tests
2806 # _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2807 # _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2809 # if test "$_jdk_ver" -lt 10500; then
2810 # AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0])
2813 # AC_MSG_RESULT([checked (BEA JDK $_jdk)])
2815 # if test "$with_jdk_home" = ""; then
2816 # AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
2817 #you must use the "--with-jdk-home" configure option explicitly])
2820 # AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
2821 # echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
2823 # JAVA_HOME=$with_jdk_home
2825 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
2828 dnl IBM JDK specific tests
2829 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2830 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2832 if test "$_jdk_ver" -lt 10500; then
2833 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
2836 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
2838 if test "$with_jdk_home" = ""; then
2839 AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
2840 you must use the "--with-jdk-home" configure option explicitly])
2843 JAVA_HOME=$with_jdk_home
2848 dnl SUN JDK specific tests
2849 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2850 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2852 if test "$_jdk_ver" -lt 10500; then
2853 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
2855 AC_MSG_RESULT([checked (JDK $_jdk)])
2856 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2857 if test "$_os" = "WINNT"; then
2858 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2860 if test "$_os" = "OS2"; then
2861 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2865 AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
2869 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
2872 dnl ===================================================================
2873 dnl Checks for javac
2874 dnl ===================================================================
2875 if test "$SOLAR_JAVA" != ""; then
2876 if test "$JDK" = "gcj"; then
2877 javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
2879 javacompiler="javac"
2881 if test "$_os" = "OS2"; then
2882 if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
2883 javacompiler="${javacompiler}.exe"
2886 if test -z "$with_jdk_home"; then
2887 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
2889 _javac_path="$with_jdk_home/bin/$javacompiler"
2890 dnl Check if there is a java compiler at all.
2891 if test -x "$_javac_path"; then
2892 JAVACOMPILER=$_javac_path
2895 if test -z "$JAVACOMPILER"; then
2896 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
2898 if test "$_os" = "WINNT"; then
2899 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2900 JAVACOMPILER="${JAVACOMPILER}.exe"
2902 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
2903 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
2905 if test "$_os" = "OS2"; then
2906 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2907 JAVACOMPILER="${JAVACOMPILER}.exe"
2911 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
2912 AC_MSG_CHECKING([re-checking JDK])
2914 AC_MSG_RESULT([checked (ecj)])
2915 #TODO: what's to do here? some switch to do 1.5 compiling?
2916 JAVAFLAGS="-source 1.5 -target 1.5"
2917 _gij_longver="40200"
2922 dnl ===================================================================
2923 dnl Checks that javac is gcj
2924 dnl ===================================================================
2925 if test "$SOLAR_JAVA" != ""; then
2926 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
2930 AC_SUBST(JAVACISGCJ)
2932 dnl ===================================================================
2933 dnl Checks for javadoc
2934 dnl ===================================================================
2935 if test "$SOLAR_JAVA" != ""; then
2936 if test -z "$with_jdk_home"; then
2937 AC_PATH_PROG(JAVADOC, javadoc)
2939 _javadoc_path="$with_jdk_home/bin/javadoc"
2940 if test "$_os" = "OS2"; then
2941 if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
2942 _javadoc_path="${_javadoc_path}.exe"
2945 dnl Check if there is a javadoc at all.
2946 if test -x "$_javadoc_path"; then
2947 JAVADOC=$_javadoc_path
2949 AC_PATH_PROG(JAVADOC, javadoc)
2952 if test -z "$JAVADOC"; then
2953 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
2955 if test "$_os" = "WINNT"; then
2956 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2957 JAVADOC="${JAVADOC}.exe"
2959 JAVADOC=`cygpath -d "$JAVADOC"`
2960 JAVADOC=`cygpath -u "$JAVADOC"`
2962 if test "$_os" = "OS2"; then
2963 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2964 JAVADOC="${JAVADOC}.exe"
2969 if test "$SOLAR_JAVA" != ""; then
2970 dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
2971 if test "$JDK" == "gcj" -a -z "$JAVA_HOME"; then
2972 if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then
2973 cat > findhome.java <<_ACEOF
2974 [import java.io.File;
2978 public static void main(String args[])
2980 String jrelocation = System.getProperty("java.home");
2981 File jre = new File(jrelocation);
2982 System.out.println(jre.getParent());
2986 AC_MSG_CHECKING([if javac works])
2987 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
2988 AC_TRY_EVAL(javac_cmd)
2989 if test $? = 0 && test -f ./findhome.class ; then
2990 AC_MSG_RESULT([javac works])
2992 echo "configure: javac test failed" >&5
2993 cat findhome.java >&5
2994 AC_MSG_ERROR([javac does not work - java projects will not build!])
2997 AC_MSG_CHECKING([if gij knows its java.home])
2998 JAVA_HOME=`$JAVAINTERPRETER findhome`
2999 if test $? = 0 && test "$JAVA_HOME" != "" ; then
3000 AC_MSG_RESULT([$JAVA_HOME])
3002 echo "configure: java test failed" >&5
3003 cat findhome.java >&5
3004 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
3007 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
3011 dnl second sanity check JAVA_HOME if possible
3012 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
3013 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
3014 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
3016 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
3017 # try to recover first by looking whether we have a alternatives
3018 # system as in Debian or newer SuSEs where following /usr/bin/javac
3019 # over /etc/alternatives/javac leads to the right bindir where we
3020 # just need to strip a bit away to get a valid JAVA_HOME
3021 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
3022 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
3023 # maybe only one level of symlink (e.g. on Mac)
3024 JAVA_HOME=$(readlink $JAVACOMPILER)
3027 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
3028 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
3029 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
3030 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
3032 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
3033 if test "$JAVA_HOME" != "/usr"; then
3034 if test "$_os" = "Darwin"; then
3035 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
3036 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
3037 dnl Tiger already returns a JDK path..
3038 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
3040 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
3044 # now check if $JAVA_HOME is really valid
3045 if test "$_os" = "Darwin"; then
3046 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
3049 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
3052 if test "$JAVA_HOME_OK" = "NO"; then
3053 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
3054 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
3055 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
3056 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
3057 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
3058 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
3059 # if test "$JDK" == "gcj"; then
3060 # 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
3067 if test "$SOLAR_JAVA" != ""; then
3068 AC_MSG_CHECKING([for jawt lib name])
3069 if test "$JDK" = "gcj"; then
3071 save_LDFLAGS=$LDFLAGS
3072 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3073 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
3074 exec 6>/dev/null # no output
3075 AC_CHECK_HEADER(jni.h, [],
3076 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
3077 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
3078 exec 6>&1 # output on again
3080 LDFLAGS=$save_LDFLAGS
3082 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
3083 # A workaround is to link also against libpmawt.so
3084 if test "$JDK" = "ibm" ; then
3086 save_LDFLAGS=$LDFLAGS
3087 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
3088 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3089 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
3090 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
3091 export LD_LIBRARY_PATH
3092 exec 6>/dev/null # no output
3093 AC_CHECK_HEADER(jni.h, [],
3094 [AC_MSG_ERROR([jni.h could not be found.])], [])
3095 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
3096 if test -z "$AWTLIB"; then
3097 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
3098 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
3100 exec 6>&1 # output on again
3102 LDFLAGS=$save_LDFLAGS
3103 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
3105 if test -z "$AWTLIB"; then
3108 AC_MSG_RESULT([$AWTLIB])
3112 dnl ===================================================================
3113 dnl Check for optional gcj for AOT
3114 dnl ===================================================================
3115 if test "$SOLAR_JAVA" != ""; then
3116 AC_MSG_CHECKING([whether to enable gcj aot compilation])
3117 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
3118 AC_MSG_RESULT([yes])
3119 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
3122 gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
3124 AC_MSG_RESULT([$gcjaot])
3125 if test -n "$with_jdk_home"; then
3126 _javac_path="$with_jdk_home/bin/$gcjaot"
3127 dnl Check if there is a gcj at all.
3128 if test -x "$_javac_path"; then
3129 JAVAAOTCOMPILER=$_javac_path
3132 if test -z "$JAVAAOTCOMPILER"; then
3133 AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
3135 if test -z "$JAVAAOTCOMPILER"; then
3136 AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
3146 AC_SUBST(JAVAINTERPRETER)
3147 AC_SUBST(JAVAIFLAGS)
3148 AC_SUBST(JAVACOMPILER)
3149 AC_SUBST(JAVAAOTCOMPILER)
3152 dnl ===================================================================
3153 dnl Checks for specific files.
3154 dnl ===================================================================
3156 dnl ===================================================================
3157 dnl Checks for programs.
3158 dnl ===================================================================
3160 dnl ===================================================================
3161 dnl Check whether we already have dmake
3162 dnl ===================================================================
3163 AC_PATH_PROG(DMAKE, dmake, no)
3164 if test "$DMAKE" = "no"; then
3166 echo "dmake will be built on ./bootstrap"
3168 AC_MSG_CHECKING([whether the found dmake is the right dmake])
3169 # we need to find out whether that dmake we found is "our" dmake
3170 # or the dmake from Sun's SunStudio Compiler which is something
3172 # This test _should_ work because the one accepts -V (ours) and one
3173 # (the other) not...
3174 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3175 if test $? -eq 0; then
3177 AC_MSG_RESULT([yes])
3178 AC_MSG_CHECKING([the dmake version])
3179 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3180 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3181 AC_MSG_RESULT([OK, >= 4.11])
3182 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3183 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3184 AC_MSG_RESULT([OK, >= 4.11])
3186 AC_MSG_RESULT([too old. >= 4.11 is needed])
3187 echo "A newer dmake will be built on ./bootstrap"
3192 echo "dmake will be built on ./bootstrap"
3196 AC_SUBST(BUILD_DMAKE)
3198 AC_MSG_CHECKING([whether to enable EPM for packing])
3199 if test "$enable_epm" = "yes"; then
3200 AC_MSG_RESULT([yes])
3201 dnl ===================================================================
3202 dnl Check for epm - not needed for windows
3203 dnl ===================================================================
3204 if test "$_os" != "WINNT"; then
3205 if test -n "$with_epm"; then
3208 AC_PATH_PROG(EPM, epm, no)
3210 if test "$EPM" = "no" || test "$EPM" = "internal"; then
3211 echo "EPM will be built."
3213 BUILD_TYPE="$BUILD_TYPE EPM"
3215 # Gentoo has some epm which is something different...
3216 AC_MSG_CHECKING([whether the found epm is the right epm])
3217 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
3218 AC_MSG_RESULT([yes])
3220 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
3222 AC_MSG_CHECKING([epm version])
3223 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
3224 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
3225 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
3226 AC_MSG_RESULT([OK, >= 3.7])
3228 if test "$_os" = "Darwin"; then
3229 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
3230 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
3231 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3232 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)])
3233 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3234 AC_MSG_RESULT([$_pm, ok])
3235 else # we never should get here, but go safe
3236 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)])
3240 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
3241 echo "EPM will be built."
3243 BUILD_TYPE="$BUILD_TYPE EPM"
3248 # test which package format to use
3249 AC_MSG_CHECKING([which package format to use])
3263 # if building on Debian, default should be deb...
3264 if test -e /etc/debian_version; then
3282 # we never should get here since we check the arciecture/os at the beginning,
3285 AC_MSG_ERROR([unknown system])
3287 if test -n "$with_package_format"; then
3288 for i in $with_package_format; do
3290 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
3293 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
3294 aix - AIX software distribution
3295 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3296 depot or swinstall - HP-UX software distribution
3297 deb - Debian software distribution
3298 inst or tardist - IRIX software distribution
3299 osx - MacOS X software distribution
3300 pkg - Solaris software distribution
3301 rpm - RedHat software distribution
3302 setld - Tru64 (setld) software distribution
3303 native - "Native" software distribution for the platform
3304 portable - Portable software distribution
3305 OOo additionally supports:
3306 archive - .tar.gz or .zip
3308 installed - installation tree
3314 PKGFORMAT="$with_package_format"
3316 AC_MSG_RESULT([$PKGFORMAT])
3317 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
3318 AC_MSG_CHECKING([for rpm])
3319 for a in "$RPM" rpmbuild rpm; do
3320 $a --usage >/dev/null 2> /dev/null
3321 if test $? -eq 0; then
3325 $a --version >/dev/null 2> /dev/null
3326 if test $? -eq 0; then
3332 if test -z "$RPM" ; then
3333 AC_MSG_ERROR([not found])
3335 RPM_PATH=`which $RPM`
3336 AC_MSG_RESULT([$RPM_PATH])
3339 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
3340 AC_PATH_PROG(DPKG, dpkg, no)
3341 if test "$DPKG" = "no"; then
3342 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
3345 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
3346 if test "$_os" = "Darwin"; then
3347 AC_MSG_CHECKING([for PackageMaker availability])
3348 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
3349 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
3354 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
3357 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
3358 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3359 if test "$EPM" != "no" && test "$EPM" != "internal"; then
3360 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
3361 AC_MSG_CHECKING([whether epm is patched for OOos needs])
3362 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
3363 AC_MSG_RESULT([yes])
3366 if echo "$PKGFORMAT" | grep -q rpm; then
3368 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
3369 echo "the rpms will need to be installed with --nodeps" >> warn
3373 AC_MSG_WARN([the ${_pt}s will not be relocateable])
3374 echo "the ${_pt}s will not be relocateable" >> warn
3375 AC_MSG_WARN([if you want to make sure installation without --nodeps and
3376 relocation will work, you need to patch your epm with the
3377 patch in epm/epm-3.7.patch or build with
3378 --with-epm=internal which will build a suitable epm])
3383 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3384 AC_PATH_PROG(PKGMK, pkgmk, no)
3385 if test "$PKGMK" = "no"; then
3386 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
3400 dnl ===================================================================
3402 dnl ===================================================================
3403 AC_PATH_PROG(GPERF, gperf)
3404 if test -z "$GPERF"; then
3405 AC_MSG_ERROR([gperf not found but needed. Install it.])
3407 AC_MSG_CHECKING([gperf version])
3408 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
3411 AC_MSG_ERROR([too old, you need at least 3.0.0])
3414 dnl ===================================================================
3415 dnl Check for building ODK
3416 dnl ===================================================================
3417 AC_MSG_CHECKING([whether to build the ODK])
3418 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
3419 AC_MSG_RESULT([yes])
3420 if test "$WITH_JAVA" != "no"; then
3421 AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
3422 if ! test -f "./external/unowinreg/unowinreg.dll"; then
3423 HAVE_UNOWINREG_DLL=no
3425 HAVE_UNOWINREG_DLL=yes
3427 if test "$HAVE_UNOWINREG_DLL" = "yes"; then
3428 AC_MSG_RESULT([found])
3431 if test "$_os" = "WINNT"; then
3432 AC_MSG_RESULT([not found, will be built])
3434 AC_MSG_WARN([not found, will be cross-built using mingw32])
3438 if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
3439 if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
3440 AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
3441 Specify mingw32 g++ executable name with --with-mingwin.
3442 Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
3443 put it into external/unowinreg])
3445 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3446 if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
3448 AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
3450 if test "$MINGWCXX" = "false"; then
3451 AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
3453 AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
3454 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
3459 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3460 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
3462 AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/`, false)
3464 if test "$MINGWSTRIP" = "false"; then
3465 AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
3471 CXXCPP="$MINGWCXX -E"
3472 save_CXXFLAGS=$CXXFLAGS
3473 save_CPPFLAGS=$CPPFLAGS
3474 CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
3475 CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
3476 # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
3477 # do not make sense here (and 'd make the check fail)
3480 AC_HAVE_LIBRARY(kernel32)
3481 AC_HAVE_LIBRARY(advapi32)
3482 AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
3483 CXXFLAGS=$save_CXXFLAGS
3484 CPPFLAGS=$save_CPPFLAGS
3491 BUILD_TYPE="$BUILD_TYPE ODK"
3496 AC_SUBST(BUILD_UNOWINREG)
3498 AC_SUBST(MINGWSTRIP)
3500 dnl ===================================================================
3501 dnl Check for prelinked libgcc_s.so.1
3502 dnl ===================================================================
3503 if test "$_os" = "Linux" -a -z "$with_system_stdlibs" -a -z "$with_system_libs"; then
3504 if test -n "$checkforstdlibproblems"; then
3505 if test -f /etc/rpm/macros.prelink; then
3506 with_system_stdlibs=yes
3507 AC_MSG_WARN([prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override])
3508 echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn
3509 elif test "$GCC" = "yes" -a ! -e `$CC -print-file-name=libgcc_s.so.1`; then
3510 with_system_stdlibs=yes
3511 AC_MSG_WARN([platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override])
3512 echo "platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn
3517 dnl ===================================================================
3518 dnl Check for system stdlibs
3519 dnl ===================================================================
3520 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
3521 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
3522 test "$with_system_stdlibs" != "no"; then
3526 AC_MSG_RESULT([yes])
3529 AC_SUBST(SYSTEM_STDLIBS)
3531 dnl ===================================================================
3532 dnl Check for system zlib
3533 dnl ===================================================================
3534 if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
3535 with_system_zlib=yes
3537 AC_MSG_CHECKING([which zlib to use])
3538 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
3539 test "$with_system_zlib" != "no"; then
3540 AC_MSG_RESULT([external])
3542 AC_CHECK_HEADER(zlib.h, [],
3543 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
3544 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
3545 [AC_MSG_ERROR(zlib not found or functional)], [])
3547 AC_MSG_RESULT([internal])
3549 BUILD_TYPE="$BUILD_TYPE ZLIB"
3551 AC_SUBST(SYSTEM_ZLIB)
3553 dnl ===================================================================
3554 dnl Check for system jpeg
3555 dnl ===================================================================
3556 AC_MSG_CHECKING([which jpeg to use])
3557 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
3558 test "$with_system_jpeg" != "no"; then
3559 AC_MSG_RESULT([external])
3561 AC_CHECK_HEADER(jpeglib.h, [],
3562 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
3563 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
3564 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
3566 AC_MSG_RESULT([internal])
3568 BUILD_TYPE="$BUILD_TYPE JPEG"
3570 AC_SUBST(SYSTEM_JPEG)
3572 dnl ===================================================================
3573 dnl Check for system expat
3574 dnl ===================================================================
3575 AC_MSG_CHECKING([which expat to use])
3576 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
3577 test "$with_system_expat" != "no"; then
3578 AC_MSG_RESULT([external])
3580 AC_CHECK_HEADER(expat.h, [],
3581 [AC_MSG_ERROR(expat.h not found. install expat)], [])
3582 AC_CHECK_LIB(expat, XML_ParserCreate, [],
3583 [AC_MSG_RESULT(expat library not found or functional.)], [])
3585 AC_MSG_RESULT([internal])
3587 BUILD_TYPE="$BUILD_TYPE EXPAT"
3589 AC_SUBST(SYSTEM_EXPAT)
3591 dnl ===================================================================
3592 dnl Check for system libwpd
3593 dnl ===================================================================
3594 AC_MSG_CHECKING([which libwpd to use])
3595 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
3596 test "$with_system_libwpd" != "no"; then
3597 AC_MSG_RESULT([external])
3599 PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
3601 AC_MSG_RESULT([internal])
3603 BUILD_TYPE="$BUILD_TYPE LIBWPD"
3605 AC_SUBST(SYSTEM_LIBWPD)
3606 AC_SUBST(LIBWPD_CFLAGS)
3607 AC_SUBST(LIBWPD_LIBS)
3609 dnl ===================================================================
3610 dnl Check for system cppunit
3611 dnl ===================================================================
3612 AC_MSG_CHECKING([which cppunit to use])
3613 if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
3614 test "$with_system_cppunit" != "no"; then
3615 AC_MSG_RESULT([external])
3617 # might work for earlier, too but go sure. We didn't have
3618 # a system-cppunit before the first version using a proper cppunit
3619 # (and that being 1.12.1) anyway
3620 PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.1 )
3621 AC_MSG_CHECKING([STL compatibility])
3622 if test "$WITH_STLPORT" != "no"; then
3623 AC_MSG_ERROR([to use system cppunit you need to use --without-stlport])
3628 AC_MSG_RESULT([internal])
3630 BUILD_TYPE="$BUILD_TYPE CPPUNIT"
3632 AC_SUBST(SYSTEM_CPPUNIT)
3633 AC_SUBST(CPPUNIT_CFLAGS)
3634 AC_SUBST(CPPUNIT_LIBS)
3636 dnl ===================================================================
3637 dnl Check whether freetype is available
3638 dnl ===================================================================
3639 if test "$test_freetype" = "yes"; then
3640 AC_MSG_CHECKING([whether freetype is available])
3641 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
3643 AC_SUBST(FREETYPE_CFLAGS)
3644 AC_SUBST(FREETYPE_LIBS)
3646 dnl ===================================================================
3647 dnl Check whether freetype2 supports emboldening
3648 dnl ===================================================================
3649 if test "$test_freetype" = "yes"; then
3650 save_CPPFLAGS="$CPPFLAGS"
3651 save_LDFLAGS="$LDFLAGS"
3653 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
3654 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
3655 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
3656 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
3657 LDFLAGS="$save_LDFLAGS"
3658 CPPFLAGS="$save_CPPFLAGS"
3661 AC_SUBST(USE_FT_EMBOLDEN)
3663 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
3664 test "$with_system_libxslt" != "no"; then
3665 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
3666 test "$with_system_libxml" == "no"; then
3667 # somehow AC_MSG_WARN won't work...
3668 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
3669 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
3670 with_system_libxml=yes
3673 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
3674 test "$with_system_libxml" != "no"; then
3675 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
3676 test "$with_system_libxslt" == "no"; then
3677 # somehow AC_MSG_WARN won't work...
3678 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
3679 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
3680 with_system_libxslt=yes
3684 dnl ===================================================================
3685 dnl Check for system libxslt
3686 dnl ===================================================================
3687 AC_MSG_CHECKING([which libxslt to use])
3688 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
3689 "$_os" = "Darwin" && \
3690 test "$with_system_libxslt" != "no"; then
3691 AC_MSG_RESULT([external])
3694 PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
3696 dnl Check for xsltproc
3697 AC_PATH_PROG(XSLTPROC, xsltproc, no)
3698 if test "$XSLTPROC" = "no"; then
3699 AC_MSG_ERROR([xsltproc is required])
3702 AC_MSG_RESULT([internal])
3704 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
3706 AC_SUBST(SYSTEM_LIBXSLT)
3707 AC_SUBST(LIBXSLT_CFLAGS)
3708 AC_SUBST(LIBXSLT_LIBS)
3711 dnl ===================================================================
3712 dnl Check for system libxml
3713 dnl ===================================================================
3714 AC_MSG_CHECKING([which libxml to use])
3715 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
3716 "$_os" = "Darwin" && \
3717 test "$with_system_libxml" != "no"; then
3718 AC_MSG_RESULT([external])
3720 PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
3721 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
3723 AC_MSG_RESULT([internal])
3725 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
3727 AC_SUBST(SYSTEM_LIBXML)
3728 AC_SUBST(LIBXML_CFLAGS)
3729 AC_SUBST(LIBXML_LIBS)
3731 dnl ===================================================================
3732 dnl Check for system python
3733 dnl ===================================================================
3734 AC_MSG_CHECKING([which python to use])
3735 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
3736 with_system_python=yes
3737 AC_MSG_RESULT([compiling against MacOSX10.4u.sdk (python version 2.3)])
3738 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
3739 PYTHON_LIBS="-framework Python"
3740 elif test -n "$with_system_python" -o -n "$with_system_libs" && \
3741 test "$with_system_python" != "no"; then
3742 with_system_python=yes
3743 AC_MSG_RESULT([external])
3744 AM_PATH_PYTHON([2.2])
3746 python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
3747 python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
3748 PYTHON_CFLAGS="-I$python_include"
3749 PYTHON_LIBS="-lpython$python_version"
3751 if test "$with_system_python" = "yes" ; then
3753 dnl check if the headers really work:
3754 save_CPPFLAGS="$CPPFLAGS"
3755 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
3756 AC_CHECK_HEADER(Python.h, [],
3757 [AC_MSG_ERROR(Python headers not found)], [])
3758 CPPFLAGS="$save_CPPFLAGS"
3761 BUILD_TYPE="$BUILD_TYPE PYTHON"
3762 AC_MSG_RESULT([internal])
3763 # Embedded python dies without Home set
3764 if test "z$HOME" = "z"; then
3767 # bz2 tarball and bzip2 is not standard
3768 if test -z "$BZIP2"; then
3769 AC_PATH_PROG( BZIP2, bzip2)
3770 if test -z "$BZIP2"; then
3771 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
3775 AC_SUBST(SYSTEM_PYTHON)
3776 AC_SUBST(PYTHON_CFLAGS)
3777 AC_SUBST(PYTHON_LIBS)
3778 HOME=`echo $HOME | sed 's:\\\\:/:g'`
3781 dnl ===================================================================
3782 dnl Check for system berkley db
3783 dnl ===================================================================
3784 AC_MSG_CHECKING([which db to use])
3785 if test -n "$with_system_db" -o -n "$with_system_libs" && \
3786 test "$with_system_db" != "no"; then
3788 AC_MSG_RESULT([external])
3789 AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
3791 CFLAGS=-I/usr/include/db4
3792 AC_CHECK_HEADER(db4/db.h,
3793 [ DB_INCLUDES=/usr/include/db4 ],
3794 [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
3797 AC_MSG_CHECKING([whether db is at least 4.1])
3801 int main(int argc, char **argv) {
3802 if(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) return 0;
3805 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
3806 AC_HAVE_LIBRARY(db, [],
3807 [AC_MSG_ERROR([db not installed or functional])], [])
3808 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
3810 AC_MSG_RESULT([internal])
3812 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
3815 AC_SUBST(DB_VERSION)
3816 AC_SUBST(DB_INCLUDES)
3819 dnl ===================================================================
3820 dnl Check for system lucene
3821 dnl ===================================================================
3822 AC_MSG_CHECKING([which lucene to use])
3823 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
3824 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
3825 AC_MSG_RESULT([external])
3827 if test -z $LUCENE_CORE_JAR; then
3828 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
3829 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
3831 AC_CHECK_FILE(/usr/share/java/lucene.jar,
3832 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
3833 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
3838 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3839 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
3842 if test -z $LUCENE_ANALYZERS_JAR; then
3843 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
3844 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
3846 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
3847 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
3848 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
3853 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3854 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
3857 AC_MSG_RESULT([internal])
3859 BUILD_TYPE="$BUILD_TYPE LUCENE"
3861 AC_SUBST(SYSTEM_LUCENE)
3862 AC_SUBST(LUCENE_CORE_JAR)
3863 AC_SUBST(LUCENE_ANALYZERS_JAR)
3865 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
3866 if test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then
3867 AC_MSG_RESULT([yes])
3869 AC_MSG_CHECKING([for mysqlc module])
3870 if test -d mysqlc; then
3873 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
3875 BUILD_TYPE="$BUILD_TYPE MYSQLC"
3880 AC_SUBST(ENABLE_MYSQLC)
3882 if test "$ENABLE_MYSQLC" = "YES"; then
3883 dnl ===================================================================
3884 dnl Check for system MySQL
3885 dnl ===================================================================
3886 AC_MSG_CHECKING([for mysql pre-requisites])
3887 if test -n "$with_system_mysql" -o -n "$with_system_libs" && \
3888 test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then
3889 AC_MSG_RESULT([external MySQL])
3891 AC_PATH_PROG( MYSQLCONFIG, mysql_config)
3892 AC_MSG_CHECKING([MySQL version])
3893 MYSQL_VERSION=`$MYSQLCONFIG --version`
3894 MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
3895 if test "$MYSQL_MAJOR" -ge "5"; then
3898 AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
3900 AC_MSG_CHECKING([for MySQL Client library])
3901 MYSQL_INC=`$MYSQLCONFIG --include`
3902 MYSQL_LIB=`$MYSQLCONFIG --libs`
3903 MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,`
3904 AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
3907 if test -n "$with_libmysql_path"; then
3908 AC_MSG_RESULT([external Connector/C (libmysql)])
3909 LIBMYSQL=libmysql.so
3910 if test "$_os" = "Darwin"; then
3911 LIBMYSQL=libmysql.dylib
3912 elif test "$_os" = "WINNT"; then
3913 LIBMYSQL=libmysql.dll
3915 AC_MSG_CHECKING([for $LIBMYSQL])
3916 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
3917 AC_MSG_RESULT([found.])
3918 LIBMYSQL_PATH=$with_libmysql_path
3920 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
3923 AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path])
3926 AC_SUBST(SYSTEM_MYSQL)
3929 AC_SUBST(MYSQL_DEFINES)
3930 AC_SUBST(LIBMYSQL_PATH)
3933 dnl ===================================================================
3934 dnl Check for system MySQL C++ Connector
3935 dnl ===================================================================
3937 # who thought this too-generic cppconn dir was a good idea?
3938 AC_MSG_CHECKING([MySQL Connector/C++])
3939 if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \
3940 test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then
3941 AC_MSG_RESULT([external])
3942 SYSTEM_MYSQL_CPPCONN=YES
3944 AC_CHECK_HEADER(mysql_driver.h, [],
3945 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
3946 AC_CHECK_LIB(mysqlcppconn, main, [],
3947 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
3948 AC_MSG_CHECKING([version])
3950 #include <mysql_driver.h>
3952 int main(int argc, char **argv) {
3953 sql::Driver *driver;
3954 driver = get_driver_instance();
3955 if (driver->getMajorVersion() > 1 || \
3956 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
3957 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
3962 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])])
3966 AC_MSG_RESULT([internal])
3967 AC_MSG_CHECKING([for mysqlcppconn module])
3968 if test -d mysqlcppconn; then
3971 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
3973 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
3974 SYSTEM_MYSQL_CPPCONN=NO
3977 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
3980 dnl ===================================================================
3981 dnl Check for system hsqldb
3982 dnl ===================================================================
3983 AC_MSG_CHECKING([which hsqldb to use])
3984 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
3985 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
3986 AC_MSG_RESULT([external])
3988 if test -z $HSQLDB_JAR; then
3989 HSQLDB_JAR=/usr/share/java/hsqldb.jar
3991 AC_CHECK_FILE($HSQLDB_JAR, [],
3992 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
3993 AC_MSG_CHECKING([whether hsqldb is >= 1.8.0.9])
3995 if $PERL -e 'use Archive::Zip;
3996 my $file = "$ENV{'HSQLDB_JAR'}";
3997 my $zip = Archive::Zip->new( $file );
3998 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
3999 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
4000 push @l, split(/\n/, $mf);
4001 foreach my $line (@l) {
4002 if ($line =~ m/Specification-Version:/) {
4003 ($t, $version) = split (/:/,$line);
4004 $version =~ s/^\s//;
4005 ($a, $b, $c, $d) = split (/\./,$version);
4006 if (($c == "0" && $d > "8") || $c > 0) {
4016 AC_MSG_RESULT([yes])
4018 AC_MSG_ERROR([no, hsqldb >= 1.8.0.9 is needed])
4021 AC_MSG_RESULT([internal])
4023 BUILD_TYPE="$BUILD_TYPE HSQLDB"
4025 AC_SUBST(SYSTEM_HSQLDB)
4026 AC_SUBST(HSQLDB_JAR)
4028 dnl ===================================================================
4029 dnl Check for system beanshell
4030 dnl ===================================================================
4031 AC_MSG_CHECKING([which beanshell to use])
4032 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
4033 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
4034 AC_MSG_RESULT([external])
4036 if test -z $BSH_JAR; then
4037 BSH_JAR=/usr/share/java/bsh.jar
4039 AC_CHECK_FILE($BSH_JAR, [],
4040 [AC_MSG_ERROR(bsh.jar not found.)], [])
4042 AC_MSG_RESULT([internal])
4044 BUILD_TYPE="$BUILD_TYPE BSH"
4046 AC_SUBST(SYSTEM_BSH)
4050 dnl ===================================================================
4051 dnl Check for system saxon
4052 dnl ===================================================================
4053 AC_MSG_CHECKING([which saxon to use])
4054 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
4055 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
4056 AC_MSG_RESULT([external])
4058 if test -z $SAXON_JAR; then
4059 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4060 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4062 AC_CHECK_FILE(/usr/share/java/saxon.jar,
4063 [ SAXON_JAR=/usr/share/java/saxon.jar ],
4064 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4065 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4066 [ AC_MSG_ERROR(saxon.jar replacement not found)]
4073 AC_CHECK_FILE($SAXON_JAR, [],
4074 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
4076 if test -n "$SERIALIZER_JAR"; then
4077 AC_CHECK_FILE($SERIALIZER_JAR, [],
4078 [AC_MSG_ERROR(serializer.jar not found.)], [])
4079 AC_SUBST(SERIALIZER_JAR)
4082 dnl Saxon comes in two practically available versions, the out-of-date saxonb which
4083 dnl supports the java extensions that OOo uses, and the up-to-date saxon he
4084 dnl "home edition" version, which is crippled to not support those java extensions.
4085 dnl And as an aside the he one also needs to be tweaked to include
4086 dnl a META-INF/services to broadcast that it supports the jaxp transform factory
4088 AC_MSG_CHECKING([if saxon works])
4089 cat > saxontest.java <<_ACEOF
4090 [import javax.xml.transform.TransformerFactory;
4091 import javax.xml.transform.Transformer;
4092 import javax.xml.transform.stream.StreamSource;
4095 import net.sf.saxon.FeatureKeys;
4098 public static void main(String[] args) {
4099 System.setProperty("javax.xml.transform.TransformerFactory",
4100 "net.sf.saxon.TransformerFactoryImpl");
4102 TransformerFactory tfactory = TransformerFactory.newInstance();
4103 // some external saxons (Debian, Ubuntu, ...) have this disabled
4105 tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
4106 System.out.println("TransformerFactory is" +
4107 tfactory.getClass().getName());
4108 Transformer transformer = tfactory.newTransformer(
4109 new StreamSource(new File(args[0])));
4110 } catch(Exception e){
4111 e.printStackTrace(System.err);
4119 cat > saxontest.xsl<<_ACEOF
4120 [<?xml version="1.0" encoding="UTF-8"?>
4121 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4122 <xsl:template match="/">
4123 <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/>
4128 javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2"
4129 AC_TRY_EVAL(javac_cmd)
4130 if test $? = 0 && test -f ./saxontest.class ; then
4131 java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2"
4132 AC_TRY_EVAL(java_cmd)
4133 if test $? = 0; then
4134 AC_MSG_RESULT([yes])
4136 cat saxontest.java >&5
4138 AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb])
4142 cat saxontest.java >&5
4143 AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar])
4146 AC_MSG_RESULT([internal])
4150 AC_SUBST(SYSTEM_SAXON)
4153 if test -n "$NEED_SAXON"; then
4154 BUILD_TYPE="$BUILD_TYPE SAXON"
4157 dnl ===================================================================
4158 dnl Check for system curl
4159 dnl ===================================================================
4160 if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
4161 with_system_curl=yes
4163 AC_MSG_CHECKING([which curl to use])
4164 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
4165 test "$with_system_curl" != "no"; then
4166 AC_MSG_RESULT([external])
4169 AC_PATH_PROG( CURLCONFIG, curl-config)
4170 if test -z "$CURLCONFIG"; then
4171 AC_MSG_ERROR([install curl to run this script])
4174 # check curl version
4175 AC_MSG_CHECKING([whether curl is >= 7.13.1])
4176 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
4177 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \
4178 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then
4179 AC_MSG_ERROR([no, you need at least curl 7.13,1])
4181 AC_MSG_RESULT([yes])
4183 CURL_LIBS=`$CURLCONFIG --libs`
4184 CURL_CFLAGS=`$CURLCONFIG --cflags`
4186 AC_MSG_RESULT([internal])
4188 BUILD_TYPE="$BUILD_TYPE CURL"
4190 AC_SUBST(SYSTEM_CURL)
4191 AC_SUBST(CURL_CFLAGS)
4194 dnl ===================================================================
4195 dnl Check for system boost
4196 dnl ===================================================================
4197 AC_MSG_CHECKING([which boost to use])
4198 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
4199 test "$with_system_boost" != "no"; then
4200 AC_MSG_RESULT([external])
4203 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
4204 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
4205 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
4206 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.38)], [])
4207 AC_CHECK_HEADER(boost/function.hpp, [],
4208 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
4210 save_CXXFLAGS=$CXXFLAGS
4211 CXXFLAGS="$CXXFLAGS -fno-exceptions"
4212 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
4213 AC_TRY_COMPILE([#include <boost/function.hpp>
4215 ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes)
4217 if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then
4218 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
4220 AC_MSG_RESULT([yes])
4222 CXXFLAGS=$save_CXXFLAGS
4225 AC_MSG_RESULT([internal])
4226 BUILD_TYPE="$BUILD_TYPE BOOST"
4229 AC_SUBST(SYSTEM_BOOST)
4231 dnl ===================================================================
4232 dnl Check for system vigra
4233 dnl ===================================================================
4234 AC_MSG_CHECKING([which vigra to use])
4235 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
4236 test "$with_system_vigra" != "no"; then
4237 AC_MSG_RESULT([external])
4240 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
4241 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
4244 AC_MSG_RESULT([internal])
4245 BUILD_TYPE="$BUILD_TYPE VIGRA"
4248 AC_SUBST(SYSTEM_VIGRA)
4250 dnl ===================================================================
4251 dnl Check for system odbc
4252 dnl ===================================================================
4253 AC_MSG_CHECKING([which odbc headers to use])
4254 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
4255 test "$with_system_odbc_headers" != "no"; then
4256 AC_MSG_RESULT([external])
4257 SYSTEM_ODBC_HEADERS=YES
4259 AC_CHECK_HEADER(sqlext.h, [],
4260 [AC_MSG_ERROR(odbc not found. install odbc)], [])
4262 AC_MSG_RESULT([internal])
4263 SYSTEM_ODBC_HEADERS=NO
4264 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
4266 AC_SUBST(SYSTEM_ODBC_HEADERS)
4268 AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components])
4269 if test "$enable_mozilla" = "no"; then
4272 ENABLE_NSS_MODULE=NO
4274 AC_MSG_RESULT([yes])
4277 AC_SUBST(WITH_MOZILLA)
4279 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
4280 if test "$enable_mozilla" = "no"; then
4282 elif test "$with_system_mozilla" = "yes"; then
4283 AC_MSG_RESULT([no, not possible with system-mozilla])
4285 AC_MSG_RESULT([yes])
4288 AC_MSG_CHECKING([whether to build XML Security support])
4289 if test "$enable_mozilla" = "no"; then
4290 AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
4292 AC_MSG_RESULT([yes])
4295 AC_MSG_CHECKING([whether to build LDAP configuration backend])
4296 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
4297 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
4298 AC_MSG_RESULT([yes])
4301 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
4309 if test "$WITH_LDAP" = "YES"; then
4310 dnl ===================================================================
4311 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
4312 dnl ===================================================================
4313 AC_MSG_CHECKING([which LDAP SDK to use])
4314 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
4315 AC_MSG_RESULT([OpenLDAP])
4317 AC_CHECK_HEADERS(ldap.h, [],
4318 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
4319 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
4320 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4321 # rumours say that OpenLDAP doesn't have that function. I looked and
4322 # it has it. Test for it to be sure
4323 AC_CHECK_LIB(ldap, ldap_set_option, [],
4324 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4326 AC_MSG_RESULT([Netscape/Mozilla])
4327 # TODO. Actually do a sanity check and check for
4328 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
4333 AC_SUBST(WITH_OPENLDAP)
4335 dnl ===================================================================
4336 dnl Check for system mozilla
4337 dnl ===================================================================
4338 AC_MSG_CHECKING([which mozilla to use])
4339 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
4340 AC_MSG_RESULT([external])
4342 ENABLE_NSS_MODULE=NO
4343 enable_nss_module=no
4344 AC_MSG_CHECKING([which Mozilla flavour to use])
4345 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
4347 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
4348 MOZ_FLAVOUR=xulrunner
4349 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
4350 MOZ_FLAVOUR=seamonkey
4351 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
4353 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
4358 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
4361 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
4362 if test -z "$STANDALONENSS"; then
4363 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
4365 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
4369 if $PKG_CONFIG --exists nspr ; then
4370 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
4371 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
4374 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
4377 if test "$MOZ_FLAVOUR" != "libxul"; then
4378 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
4379 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
4380 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
4383 if test -z "$HASXPCOM"; then
4384 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
4385 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
4386 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
4387 if ! test -e "$MOZ_LIB/libxul.so"; then
4388 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
4389 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
4390 MOZ_LIB="$MOZ_LIB/sdk/lib"
4395 save_CPPFLAGS="$CPPFLAGS"
4396 save_LDFLAGS="$LDFLAGS"
4398 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
4399 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
4400 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
4401 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
4402 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
4403 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
4404 LDFLAGS="$save_LDFLAGS"
4405 CPPFLAGS="$save_CPPFLAGS"
4408 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
4409 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
4410 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
4411 if test -d "$MOZ_INC/ldap"; then
4412 AC_MSG_RESULT([yes])
4413 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
4416 Could not find LDAP header include files in $MOZ_INC/ldap.
4417 Please recompile $tmp with --enable-ldap or use --with-openldap.])
4421 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
4422 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
4423 if test "$MOZ_FLAVOUR" == "libxul"; then
4424 MOZ_FLAVOUR="mozilla"
4427 elif test "$enable_mozilla" = "no"; then
4428 AC_MSG_RESULT([none])
4430 ENABLE_NSS_MODULE=NO
4431 enable_nss_module=no
4433 AC_MSG_RESULT([internal])
4435 BUILD_TYPE="$BUILD_TYPE MOZ"
4436 if test -z "$with_mozilla_version"; then
4439 AC_MSG_CHECKING([which mozilla version to build])
4440 MOZILLA_VERSION=$with_mozilla_version
4441 enable_build_mozilla=1
4442 AC_MSG_RESULT([$MOZILLA_VERSION])
4445 AC_SUBST(MOZILLA_VERSION)
4447 AC_MSG_CHECKING([for toolkit mozilla should use])
4448 if test -z "$with_mozilla_toolkit"; then
4449 if test "$_os" != "WINNT" ; then
4450 if test "$_os" = "Darwin" ; then
4452 AC_MSG_RESULT([mac])
4454 MOZILLA_TOOLKIT=gtk2
4455 AC_MSG_RESULT([gtk2])
4459 MOZILLA_TOOLKIT=$with_mozilla_toolkit
4460 enable_build_mozilla=1
4461 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
4463 #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then
4464 # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not
4465 # #available using fink, mac (carbon) doesn't work because xcode installs conflicting headers
4466 # AC_MSG_ERROR([Only gtk2 toolkit supported on Mac, sorry.])
4469 AC_SUBST(MOZILLA_TOOLKIT)
4471 # default to enabling build mozilla
4472 if test "$enable_build_mozilla" != "no"; then
4473 enable_build_mozilla=yes
4475 enable_build_mozilla=
4478 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
4479 if test -n "$enable_build_mozilla"; then
4481 AC_MSG_RESULT([yes])
4487 AC_MSG_CHECKING([whether to build provided NSS module])
4488 if test "$enable_nss_module" != "no"; then
4489 ENABLE_NSS_MODULE="YES"
4490 BUILD_TYPE="$BUILD_TYPE NSS"
4491 AC_MSG_RESULT([yes])
4492 if test "$_os" = "WINNT"; then
4493 AC_MSG_CHECKING([for Mozilla build tooling])
4494 if test -z "$MOZILLABUILD" ; then
4495 AC_MSG_ERROR([Mozilla build tooling not found.
4496 Use the --with-mozilla-build option after installling the tools obtained
4497 from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
4499 if test \( "$WITH_MINGWIN" = "yes" \) ; then
4500 if test ! -d "$MOZILLABUILD" ; then
4501 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4506 if test ! -d "$MOZILLABUILD/moztools" \
4507 -o ! -d "$MOZILLABUILD/msys" ; then
4508 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4516 ENABLE_NSS_MODULE="NO"
4520 if test "$BUILD_MOZAB" = "TRUE"; then
4521 if test "$_os" = "WINNT"; then
4522 if test "$WITH_MINGWIN" != "yes"; then
4523 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
4524 if test "$MSVSVER" != "2005"; then
4525 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
4528 AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
4529 echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
4533 if test -z "$MOZILLA_VERSION"; then
4534 MOZILLA_VERSION=1.1.14
4536 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
4537 MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst`
4538 AC_MSG_CHECKING([for mozilla sources])
4539 if test -z "$MOZILLA_FETCH_FILE"; then
4540 AC_MSG_RESULT([not found])
4541 HAVE_MOZILLA_TARBALL=n
4543 AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE])
4544 if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then
4545 if test -z "$DO_FETCH"; then
4546 AC_MSG_RESULT([will be fetched])
4547 HAVE_MOZILLA_TARBALL=y
4549 AC_MSG_RESULT([not found])
4550 HAVE_MOZILLA_TARBALL=n
4553 AC_MSG_RESULT([found])
4554 HAVE_MOZILLA_TARBALL=y
4557 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
4558 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
4559 Use "./fetch_tarballs.sh ooo.lst" to download.])
4561 if test "$_os" = "WINNT"; then
4562 AC_MSG_CHECKING([for moztools binaries])
4563 if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then
4564 AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip
4565 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
4569 elif test "$_os" = "Darwin"; then
4570 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4571 AC_MSG_NOTICE([checking whether mozilla can be built...])
4572 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]))
4574 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
4575 if test -z "$MOZIDL"; then
4576 AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit.])
4580 # Generic Unix/Linux section
4581 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4582 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
4583 if test -z "$MOZGTK"; then
4584 AC_MSG_ERROR([GTK2 is needed to build mozilla.])
4586 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
4587 if test -z "$MOZIDL"; then
4588 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.])
4591 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
4592 if test -z "$MOZGTK"; then
4593 AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.])
4595 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4596 if test -z "$MOZIDL"; then
4597 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4603 AC_SUBST(BUILD_MOZAB)
4606 AC_SUBST(ENABLE_NSS_MODULE)
4607 AC_SUBST(MOZILLABUILD)
4608 AC_SUBST(SYSTEM_MOZILLA)
4609 AC_SUBST(MOZ_FLAVOUR)
4612 AC_SUBST(MOZ_LIB_XPCOM)
4613 AC_SUBST(MOZ_NSPR_CFLAGS)
4614 AC_SUBST(MOZ_NSS_CFLAGS)
4615 AC_SUBST(MOZ_LDAP_CFLAGS)
4617 dnl ===================================================================
4618 dnl Check for system sane
4619 dnl ===================================================================
4620 AC_MSG_CHECKING([which sane header to use])
4621 if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \
4622 test "$with_system_sane_header" != "no"; then
4623 AC_MSG_RESULT([external])
4624 SYSTEM_SANE_HEADER=YES
4625 AC_CHECK_HEADER(sane/sane.h, [],
4626 [AC_MSG_ERROR(sane not found. install sane)], [])
4628 AC_MSG_RESULT([internal])
4629 SYSTEM_SANE_HEADER=NO
4630 BUILD_TYPE="$BUILD_TYPE SANE"
4632 AC_SUBST(SYSTEM_SANE_HEADER)
4634 dnl ===================================================================
4635 dnl Check for system icu
4636 dnl ===================================================================
4637 AC_MSG_CHECKING([which icu to use])
4638 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
4639 test "$with_system_icu" != "no"; then
4640 AC_MSG_RESULT([external])
4643 AC_MSG_CHECKING([for unicode/rbbi.h])
4644 AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
4645 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
4646 if test -z "$SYSTEM_GENBRK"; then
4647 AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
4649 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
4650 if test -z "$SYSTEM_GENCCODE"; then
4651 AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
4653 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
4654 if test -z "$SYSTEM_GENCMN"; then
4655 AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
4657 AC_MSG_CHECKING([ICU version])
4659 #include <unicode/uversion.h>
4661 int main(int argc, char **argv) {
4662 if(U_ICU_VERSION_MAJOR_NUM < 4)
4667 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])])
4670 AC_MSG_RESULT([internal])
4672 BUILD_TYPE="$BUILD_TYPE ICU"
4674 AC_SUBST(SYSTEM_ICU)
4675 AC_SUBST(SYSTEM_GENBRK)
4676 AC_SUBST(SYSTEM_GENCCODE)
4677 AC_SUBST(SYSTEM_GENCMN)
4679 dnl ===================================================================
4681 dnl ===================================================================
4683 AC_MSG_CHECKING([whether to enable graphite support])
4684 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" == "z" -o "$enable_graphite" != "no" ; then
4685 AC_MSG_RESULT([yes])
4686 ENABLE_GRAPHITE="TRUE"
4687 AC_MSG_CHECKING([which graphite to use])
4688 if test -n "$with_system_graphite" -o -n "$with_system_libs" && \
4689 test "$with_system_graphite" != "no"; then
4690 AC_MSG_RESULT([external])
4692 PKG_CHECK_MODULES( GRAPHITE, silgraphite )
4694 AC_MSG_RESULT([internal])
4696 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
4701 AC_SUBST(ENABLE_GRAPHITE)
4702 AC_SUBST(SYSTEM_GRAPHITE)
4703 AC_SUBST(GRAPHITE_LIBS)
4704 AC_SUBST(GRAPHITE_CFLAGS)
4706 dnl ===================================================================
4707 dnl Checks for libraries.
4708 dnl ===================================================================
4709 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
4710 dnl See if we have the AppKit framework for building with Quartz graphics.
4712 if test "$_os" = "Darwin"; then
4713 if test "x$with_x" = "xyes"; then
4714 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
4716 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
4717 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
4718 AC_MSG_RESULT([yes])
4719 x_includes="no_x_includes"
4720 x_libraries="no_x_libraries"
4721 dnl disable some things used on other Unix versions but not on the aqua build
4725 AC_SUBST(ENABLE_CUPS)
4727 AC_MSG_ERROR([No AppKit.framewrok found])
4732 dnl ***************************************
4733 dnl testing for X libraries and includes...
4734 dnl ***************************************
4735 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
4736 echo "Do Nothing for _os = Darwin"
4737 dnl Mac OS X using Aqua graphics. Don't check for X11.
4739 elif test "$_os" = "OS2" ; then
4740 echo "Do Nothing for _os = OS2. Don't check for X11."
4741 dnl OS/2 uses native graphics. Don't check for X11.
4743 elif test "$_os" != "WINNT" ; then
4746 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4748 if test "x$x_includes" = "x"; then
4749 x_includes="default_x_includes"
4751 if test "x$x_libraries" = "x"; then
4752 x_libraries="default_x_libraries"
4754 dnl The variables $x_libraries and $x_includes are set.
4755 if test -z "$x_libraries"; then
4756 AC_MSG_ERROR([No X libraries found]) # Exit
4758 if test -z "$x_includes"; then
4759 AC_MSG_ERROR([No X includes found]) # Exit
4762 LDFLAGS="$X_LDFLAGS $X_LIBS"
4763 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
4764 dnl Check if the XauDisposeAuth symbol is provided by libXau.
4765 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
4767 x_includes="no_x_includes"
4768 x_libraries="no_x_libraries"
4770 if test -z "$x_includes"; then
4771 x_includes="no_x_includes"
4773 if test -z "$x_libraries"; then
4774 x_libraries="no_x_libraries"
4776 if test "$x_includes" = "default_x_includes"; then
4782 if test "$x_libraries" = "default_x_libraries"; then
4783 XLIB=`$PKG_CONFIG --variable=libdir x11`
4784 if test "x$XLIB" = x; then
4793 if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then
4794 dnl ===================================================================
4795 dnl Check for using Xaw
4796 dnl ===================================================================
4797 AC_MSG_CHECKING([whether to use Xaw])
4798 if test "$enable_Xaw" = "no"; then
4801 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt include headers not found])],
4802 [#include <X11/Intrinsic.h>])
4804 AC_MSG_RESULT([yes])
4805 AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])],
4806 [#include <X11/Intrinsic.h>])
4807 AC_CHECK_LIB(Xaw, main, [],
4808 [AC_MSG_ERROR(Xaw library not found or functional)], [])
4811 AC_SUBST(DISABLE_XAW)
4815 dnl ===================================================================
4816 dnl Check if fontconfig/fontconfig.h is available
4817 dnl ===================================================================
4818 if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
4819 AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
4820 [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
4821 AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
4823 #include <fontconfig/fontconfig.h>
4825 int main(int argc, char **argv) {
4826 if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
4829 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
4832 dnl ===================================================================
4833 dnl Check for system Xrender
4834 dnl ===================================================================
4835 AC_MSG_CHECKING([whether to link to Xrender])
4836 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
4837 AC_MSG_RESULT([yes])
4839 with_system_xrender_headers=yes
4841 AC_MSG_RESULT([no, dynamically open it])
4844 AC_MSG_CHECKING([which Xrender headers to use])
4845 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
4846 test "$with_system_xrender_headers" != "no"; then
4847 AC_MSG_RESULT([external])
4848 SYSTEM_XRENDER_HEADERS=YES
4849 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
4850 [AC_MSG_ERROR(Xrender not found. install X)], [])
4852 AC_MSG_RESULT([internal])
4853 SYSTEM_XRENDER_HEADERS=NO
4854 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
4856 if test "$XRENDER_LINK" = "YES"; then
4857 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
4858 [AC_MSG_ERROR(libXrender not found or functional)], [])
4860 AC_SUBST(SYSTEM_XRENDER_HEADERS)
4861 AC_SUBST(XRENDER_LINK)
4863 dnl ===================================================================
4864 dnl Check for XRandr
4865 dnl ===================================================================
4866 AC_MSG_CHECKING([whether to enable RandR support])
4867 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
4868 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
4869 XRANDR_DLOPEN="TRUE"
4870 AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
4872 XRANDR_DLOPEN="FALSE"
4873 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
4874 if test "$ENABLE_RANDR" != "TRUE"; then
4875 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
4876 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
4878 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
4879 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
4880 XRANDR_LIBS="-lXrandr "
4882 AC_MSG_RESULT([enabling RandR support])
4889 AC_SUBST(XRANDR_DLOPEN)
4890 AC_SUBST(XRANDR_CFLAGS)
4891 AC_SUBST(XRANDR_LIBS)
4892 AC_SUBST(ENABLE_RANDR)
4894 dnl ===================================================================
4895 dnl Check for building neon
4896 dnl ===================================================================
4897 AC_MSG_CHECKING([whether to use neon])
4898 if test "$enable_neon" = "no"; then
4901 AC_SUBST(DISABLE_NEON)
4903 AC_MSG_RESULT([yes])
4904 dnl ===================================================================
4905 dnl Check for system neon
4906 dnl ===================================================================
4907 AC_MSG_CHECKING([which neon to use])
4908 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
4909 test "$with_system_neon" != "no"; then
4910 AC_MSG_RESULT([external])
4911 PKG_CHECK_MODULES(NEON, neon >= 0.24.0, , AC_MSG_ERROR([you need neon >= 0.24.x for system-neon]))
4912 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
4913 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
4916 AC_MSG_RESULT([internal])
4920 BUILD_TYPE="$BUILD_TYPE NEON"
4922 AC_SUBST(SYSTEM_NEON)
4923 AC_SUBST(NEON_VERSION)
4925 AC_SUBST(NEON_CFLAGS)
4928 dnl ===================================================================
4929 dnl Check for system openssl
4930 dnl ===================================================================
4931 if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
4932 with_system_openssl=yes
4934 AC_MSG_CHECKING([which libssl to use])
4935 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
4936 test "$with_system_openssl" != "no"; then
4937 AC_MSG_RESULT([external])
4938 # Mac OS builds should get out without extra stuff is the Mac porters'
4939 # wish. And pkg-config is although Xcode ships a .pc for openssl
4940 if test "$_os" = "Darwin"; then
4942 OPENSSL_LIBS="-lssl -lcrypto"
4944 PKG_CHECK_MODULES( OPENSSL, openssl )
4948 AC_MSG_RESULT([internal])
4950 BUILD_TYPE="$BUILD_TYPE OPENSSL"
4952 AC_SUBST(SYSTEM_OPENSSL)
4953 AC_SUBST(OPENSSL_CFLAGS)
4954 AC_SUBST(OPENSSL_LIBS)
4956 dnl ===================================================================
4957 dnl Test for disabling agg
4958 dnl ===================================================================
4959 AC_MSG_CHECKING([whether to enable agg])
4960 if test "$with_agg" = "no"; then
4963 AC_MSG_RESULT([yes])
4965 AC_SUBST(ENABLE_AGG)
4967 dnl ===================================================================
4968 dnl Check for system AGG
4969 dnl ===================================================================
4970 AC_MSG_CHECKING([which AGG to use])
4971 if test -n "$with_system_agg" -o -n "$with_system_libs" && \
4972 test "$with_system_agg" != "no"; then
4973 AC_MSG_RESULT([external])
4974 PKG_CHECK_MODULES(AGG, libagg >= 2.3)
4975 AC_MSG_CHECKING([agg version])
4976 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
4977 # (/usr/include gets stripped from pkg-config output)
4978 if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
4979 AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
4981 AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
4983 if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
4984 $PKG_CONFIG --modversion libagg | grep -q 2.4; then
4985 # 2.4's libagg.pc.in still contains 2.3 :/
4986 if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
4987 AC_MSG_RESULT([2.4])
4990 AC_MSG_RESULT([2.3])
4995 AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
4998 AC_MSG_RESULT([internal])
5001 BUILD_TYPE="$BUILD_TYPE AGG"
5003 AC_SUBST(SYSTEM_AGG)
5004 AC_SUBST(AGG_VERSION)
5007 dnl ===================================================================
5008 dnl Check for system redland
5009 dnl ===================================================================
5010 AC_MSG_CHECKING([which redland library to use])
5011 if test -n "$with_system_redland" -o -n "$with_system_libs" && \
5012 test "$with_system_redland" != "no"; then
5013 AC_MSG_RESULT([external])
5015 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
5016 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
5018 AC_MSG_RESULT([internal])
5019 BUILD_TYPE="$BUILD_TYPE REDLAND"
5022 AC_SUBST(SYSTEM_REDLAND)
5023 AC_SUBST(REDLAND_LIBS)
5025 dnl ===================================================================
5026 dnl Check for system hunspell
5027 dnl ===================================================================
5028 AC_MSG_CHECKING([which libhunspell to use])
5029 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
5030 test "$with_system_hunspell" != "no"; then
5031 AC_MSG_RESULT([external])
5034 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
5035 if test "$HUNSPELL_PC" != "TRUE"; then
5036 AC_CHECK_HEADER(hunspell.hxx, [],
5038 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
5039 [AC_MSG_ERROR(hunspell headers not found.)], [])
5041 AC_CHECK_LIB(hunspell, main, [],
5042 [ AC_MSG_ERROR(hunspell library not found.) ], [])
5043 HUNSPELL_LIBS=-lhunspell
5047 AC_MSG_RESULT([internal])
5049 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
5051 AC_SUBST(SYSTEM_HUNSPELL)
5052 AC_SUBST(HUNSPELL_CFLAGS)
5053 AC_SUBST(HUNSPELL_LIBS)
5055 dnl ===================================================================
5056 dnl Checking for altlinuxhyph
5057 dnl ===================================================================
5058 AC_MSG_CHECKING([which altlinuxhyph to use])
5059 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
5060 test "$with_system_altlinuxhyph" != "no"; then
5061 AC_MSG_RESULT([external])
5063 AC_CHECK_HEADER(hyphen.h, [],
5064 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
5065 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
5066 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
5067 [#include <hyphen.h>])
5068 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
5069 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5070 if test -z "$HYPHEN_LIB"; then
5071 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
5072 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5074 if test -z "$HYPHEN_LIB"; then
5075 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
5076 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5079 AC_MSG_RESULT([internal])
5081 BUILD_TYPE="$BUILD_TYPE HYPHEN"
5083 AC_SUBST(SYSTEM_HYPH)
5084 AC_SUBST(HYPHEN_LIB)
5086 dnl ===================================================================
5087 dnl Checking for mythes
5088 dnl ===================================================================
5089 AC_MSG_CHECKING([which mythes to use])
5090 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
5091 AC_MSG_RESULT([external])
5093 AC_CHECK_HEADER(mythes.hxx, [],
5094 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
5095 AC_CHECK_LIB(mythes, main, [],
5096 [ AC_MSG_ERROR(mythes library not found.)], [])
5098 AC_MSG_RESULT([internal])
5101 AC_SUBST(SYSTEM_MYTHES)
5103 dnl ===================================================================
5104 dnl Checking for lpsolve
5105 dnl ===================================================================
5106 AC_MSG_CHECKING([which lpsolve to use])
5107 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
5108 test "$with_system_lpsolve" != "no"; then
5109 AC_MSG_RESULT([external])
5111 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
5112 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
5113 AC_CHECK_LIB(lpsolve55, make_lp, ,
5114 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
5116 AC_MSG_RESULT([internal])
5118 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
5120 AC_SUBST(SYSTEM_LPSOLVE)
5122 dnl ***************************************
5123 dnl testing libc version for Linux...
5124 dnl ***************************************
5125 if test "$_os" = "Linux"; then
5126 AC_MSG_CHECKING([whether libc is >= 2.1.1])
5127 exec 6>/dev/null # no output
5128 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
5129 exec 6>&1 # output on again
5130 if test "$HAVE_LIBC"; then
5131 AC_MSG_RESULT([yes])
5133 AC_MSG_ERROR([no, upgrade libc])
5137 dnl =========================================
5138 dnl Check for the Microsoft Platform SDK.
5139 dnl =========================================
5140 dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
5141 dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
5142 if test \( "$_os" = "WINNT" \) ; then
5143 AC_MSG_CHECKING([for PSDK files])
5144 if test -z "$with_psdk_home"; then
5145 # This first line will detect a February 2003 Microsoft Platform SDK
5146 PSDK_HOME=`./oowintool --psdk-home`
5147 # But there might be also an April 2005 PSDK, unfortunately MS changed
5148 # the registry entry. (we prefer the old version!?)
5149 if test -z "$PSDK_HOME"; then
5150 PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
5152 # normalize if found
5153 if test -n "$PSDK_HOME"; then
5154 PSDK_HOME=`cygpath -d "$PSDK_HOME"`
5155 PSDK_HOME=`cygpath -u "$PSDK_HOME"`
5158 PSDK_HOME=`cygpath -u "$with_psdk_home"`
5160 # Remove a possible trailing backslash
5161 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
5162 # Problem with current PSDK (iz 49865)
5163 if test -f "$PSDK_HOME/Lib/libcp.lib"; then
5166 Some modules do not build correctly with MS Platform SDK - April 2005
5167 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
5168 Remove/rename/backup that file and restart configure. Details about this
5169 problem can be found in issue 49856.])
5171 # WIndows SDK has different headers
5172 if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
5173 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
5174 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
5179 if test -f "$PSDK_HOME/lib/unicows.lib"; then
5184 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
5185 AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
5186 are installed or use --with-psdk-home .])
5188 if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
5189 -o ! -x "$PSDK_HOME/bin/msidb.exe" \
5190 -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
5191 -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
5192 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
5194 AC_MSG_RESULT([SDK files found ...)])
5195 dnl Check if this is the right SDK.
5196 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
5197 AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
5198 WINDOWS_VISTA_PSDK=TRUE
5199 elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
5200 AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
5201 WINDOWS_VISTA_PSDK=TRUE
5203 AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
5207 AC_SUBST(WINDOWS_VISTA_PSDK)
5209 dnl =========================================
5210 dnl Check for the Microsoft DirectX SDK.
5211 dnl =========================================
5212 if test \( "$_os" = "WINNT" \) ; then
5213 AC_MSG_CHECKING([for DirectX SDK files])
5214 if test -z "$with_directx_home"; then
5215 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
5216 if test -n "$DXSDK_DIR"; then
5217 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
5218 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
5220 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
5221 # the "DirectX SDK files not found" error later
5223 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
5225 # Remove a possible trailing backslash
5226 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
5228 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
5229 HAVE_DIRECTXSDK_H="yes"
5231 HAVE_DIRECTXSDK_H="no"
5233 # MS changed the location of the libraries with dec 2004 directx sdk
5234 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
5235 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
5237 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
5239 if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
5240 HAVE_DIRECTXSDK_LIB="yes"
5242 HAVE_DIRECTXSDK_LIB="no"
5244 if test -n "$ENABLE_DIRECTX"; then
5245 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
5246 AC_MSG_RESULT([found])
5248 AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
5252 AC_MSG_RESULT([disabled])
5255 AC_SUBST(DIRECTXSDK_HOME)
5256 AC_SUBST(DIRECTXSDK_LIB)
5258 dnl ============================================
5259 dnl Check for Nullsoft Scriptable Install System
5260 dnl ============================================
5262 if test "$_os" = "WINNT" ; then
5263 AC_MSG_CHECKING([for NSIS])
5264 AC_PATH_PROG(NSIS_PATH, nsis.exe)
5265 if test -n "$NSIS_PATH"; then
5266 NSIS_PATH=`dirname "$NSIS_PATH"`
5268 if test -n "$with_nsis_path"; then
5269 with_nsis_path=`cygpath -u "$with_nsis_path"`
5271 if test -e "$with_nsis_path/nsis.exe"; then
5272 NSIS_PATH="$with_nsis_path"
5274 nsistest=`./oowintool --nsis-dir`;
5275 if test -x "$nsistest/nsis.exe"; then
5276 NSIS_PATH="$nsistest"
5278 if test -z "$NSIS_PATH"; then
5279 AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
5280 echo "NSIS not found, no self contained installer will be build." >> warn
5282 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5283 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5284 AC_MSG_RESULT([found ($NSIS_PATH)])
5289 dnl ***************************************
5290 dnl testing bison and flex exist
5291 dnl ***************************************
5292 AC_PATH_PROG(BISON, bison)
5293 if test -z "$BISON"; then
5294 AC_MSG_ERROR([no bison found in \$PATH, install bison])
5296 AC_MSG_CHECKING([the bison version])
5297 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
5298 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
5299 # Accept newer than 1.875 or older(equal) than 1.75
5300 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
5301 if test "$_bison_version" = "1.875" ; then
5302 AC_MSG_WARN([suspect ($BISON $_bison_version)])
5303 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
5305 AC_MSG_RESULT([checked ($BISON $_bison_version)])
5308 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
5311 AC_PATH_PROG(FLEX, flex)
5312 if test -z "$FLEX"; then
5313 AC_MSG_ERROR([no flex found in \$PATH, install flex])
5315 dnl ***************************************
5316 dnl testing that patch exists
5317 dnl ***************************************
5318 AC_PATH_PROG(PATCH, patch)
5319 if test -z "$PATCH"; then
5320 AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
5323 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
5324 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
5325 if test -z "$with_gnu_patch"; then
5328 if test -x "$with_gnu_patch"; then
5329 GNUPATCH=$with_gnu_patch
5331 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
5335 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
5336 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5337 AC_MSG_RESULT([yes])
5339 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
5342 dnl We also need to check for --with-gnu-cp
5344 if test -z "$with_gnu_cp"; then
5345 AC_PATH_PROGS(GNUCP, gnucp cp)
5346 if test -z $GNUCP; then
5347 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
5350 if test -x "$with_gnu_cp"; then
5353 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
5357 AC_MSG_CHECKING([whether $GNUCP is GNU cp])
5358 if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5359 AC_MSG_RESULT([yes])
5361 if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
5362 AC_MSG_RESULT([yes])
5364 if test "$_os" = "Darwin"; then
5366 AC_MSG_RESULT([no gnucp found - using the system's cp command])
5368 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
5377 dnl ***************************************
5378 dnl testing bash tools path on Windows
5379 dnl ***************************************
5380 if test "$_os" = "WINNT"; then
5382 AC_PATH_PROG(CYGWIN_PATH, bash)
5383 CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
5385 if test -z "$CYGWIN_PATH"; then
5386 CYGWIN_PATH="NO_CYGWIN"
5388 AC_SUBST(CYGWIN_PATH)
5390 dnl ***************************************
5391 dnl testing ml.exe assembler path
5392 dnl ***************************************
5393 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5394 AC_MSG_CHECKING([ml.exe assembler path])
5395 if test -n "$with_asm_home"; then
5396 with_asm_home=`cygpath -u "$with_asm_home"`
5398 if test ! -x "$with_asm_home/ml.exe"; then
5399 AC_PATH_PROG(ML_EXE, ml.exe)
5400 if test -z "$ML_EXE"; then
5401 if test -x "$with_cl_home/bin/ml.exe"; then
5402 with_asm_home=$with_cl_home/bin
5403 AC_MSG_RESULT([found ($with_asm_home)])
5405 AC_MSG_ERROR([Configure did not find ml.exe assembler.])
5408 with_asm_home="ASM_IN_PATH"
5412 with_asm_home="NO_ASM_HOME"
5414 ASM_HOME="$with_asm_home"
5415 if test -n "$ASM_HOME"; then
5416 AC_MSG_RESULT([$ASM_HOME])
5420 dnl ===================================================================
5421 dnl testing handle deprecated unzip switch
5422 dnl ===================================================================
5423 if test -z "$with_zip_home"; then
5424 with_zip_home="$with_unzip_home"
5426 dnl ===================================================================
5427 dnl Zip will be found where you tell me to find it
5428 dnl ===================================================================
5429 if test -n "$with_zip_home" ; then
5430 if test "$_os" = "WINNT"; then
5431 with_zip_home=`cygpath -u "$with_zip_home"`
5433 ZIP="$with_zip_home/zip"
5434 UNZIP="$with_zip_home/unzip"
5435 ZIP_HOME="$with_zip_home"
5437 AC_PATH_PROG(ZIP, zip)
5438 AC_PATH_PROG(UNZIP, unzip)
5439 ZIP_HOME=`dirname "$ZIP"`
5441 dnl ===================================================================
5442 dnl Zip must be available or else it is an error, all platforms
5443 dnl ===================================================================
5444 if test -z "$ZIP" -o -z "$UNZIP"; then
5445 AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
5448 dnl ===================================================================
5449 dnl Zip must be a specific type for different build types.
5450 dnl ===================================================================
5451 if test "$_os" = "WINNT"; then
5452 if test -n "`$ZIP -h | grep -i WinNT`" ; then
5453 AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
5458 dnl ===================================================================
5459 dnl Windows builds need unicows.dll in external/unicows/
5460 dnl ===================================================================
5461 if test "$_os" = "WINNT"; then
5462 AC_MSG_CHECKING([for unicows.dll])
5463 if test -x ./external/unicows/unicows.dll; then
5464 AC_MSG_RESULT([found])
5466 AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
5467 Get it from the Microsoft site and put it into external/unicows.
5468 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5469 may have to search Microsoft's website.) Last time it was seen at:
5470 <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
5474 dnl ===================================================================
5475 dnl Windows builds need dbghelp.dll in external/dbghelp/
5476 dnl ===================================================================
5477 if test "$_os" = "WINNT"; then
5478 AC_MSG_CHECKING([for dbghelp.dll])
5479 if test -x ./external/dbghelp/dbghelp.dll; then
5480 AC_MSG_RESULT([found])
5482 AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
5483 Get it from the Microsoft site and put it into external/dbghelp.
5484 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5485 may have to search Microsoft's website.) Last time it was seen at:
5486 <http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
5490 dnl ===================================================================
5491 dnl Windows builds - use oowintool to copy CRT dlls and manifest
5492 dnl ===================================================================
5493 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5494 if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
5497 AC_MSG_ERROR([oowintool failed to copy CRT])
5501 dnl ===================================================================
5502 dnl Windows builds need gdiplus.dll in external/gdiplus/
5503 dnl ===================================================================
5504 if test "$_os" = "WINNT"; then
5505 AC_MSG_CHECKING([for gdiplus.dll])
5506 if test -x ./external/gdiplus/gdiplus.dll; then
5507 AC_MSG_RESULT([found])
5509 AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
5510 Get it from the Microsoft site and put it into external/gdiplus.
5511 You may have to search Microsoft's website. Last time it was seen at:
5512 <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
5516 dnl ===================================================================
5517 dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
5518 dnl ===================================================================
5519 if test "$_os" = "WINNT"; then
5520 ./oowintool --msvc-copy-instmsi ./external/msi
5523 dnl ===================================================================
5524 dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
5525 dnl ===================================================================
5526 if test "$_os" = "WINNT"; then
5527 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
5528 AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
5529 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
5530 AC_MSG_RESULT([found])
5532 MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1`
5533 MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1`
5534 if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
5535 cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
5536 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
5538 if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
5539 AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
5540 These programs are part of the Visual Studio installation and should be found in a
5541 directory similar to:
5542 "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
5543 As the automatic detection fails please copy the files to external/msi/.])
5545 AC_MSG_RESULT([found and copied])
5551 dnl ===================================================================
5552 dnl Test which vclplugs have to be built.
5553 dnl ===================================================================
5554 AC_MSG_CHECKING([which VCLplugs shall be built])
5556 if test "x$enable_gtk" = "xyes"; then
5560 AC_SUBST(ENABLE_GTK)
5563 if test "x$enable_kde" = "xyes"; then
5567 AC_SUBST(ENABLE_KDE)
5570 if test "x$enable_kde4" = "xyes"; then
5574 AC_SUBST(ENABLE_KDE4)
5576 if test -z "$R"; then
5577 AC_MSG_RESULT([none])
5582 dnl ===================================================================
5584 dnl ===================================================================
5587 AC_MSG_CHECKING([whether to enable GConf support])
5588 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
5590 AC_MSG_RESULT([yes])
5591 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5595 AC_SUBST(ENABLE_GCONF)
5597 dnl ===================================================================
5599 dnl ===================================================================
5602 AC_MSG_CHECKING([whether to enable GNOME VFS support])
5603 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
5604 ENABLE_GNOMEVFS="TRUE"
5605 AC_MSG_RESULT([yes])
5606 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
5607 if test "$ENABLE_GCONF" != "TRUE"; then
5608 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5613 AC_SUBST(ENABLE_GNOMEVFS)
5615 dnl ===================================================================
5616 dnl Check whether the gtk 2.0 libraries are available.
5617 dnl ===================================================================
5621 ENABLE_SYSTRAY_GTK=""
5623 if test "$test_gtk" = "yes"; then
5625 if test "$ENABLE_GTK" = "TRUE" ; then
5626 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]))
5627 BUILD_TYPE="$BUILD_TYPE GTK"
5629 if test "x$enable_systray" = "xyes"; then
5630 ENABLE_SYSTRAY_GTK="TRUE"
5631 BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
5634 AC_MSG_CHECKING([whether to enable DBUS support])
5635 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
5637 AC_MSG_RESULT([yes])
5638 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
5643 AC_MSG_CHECKING([whether to enable GIO support])
5644 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
5645 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
5646 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
5649 AC_MSG_RESULT([yes])
5650 PKG_CHECK_MODULES( GIO, gio-2.0 )
5658 AC_SUBST(ENABLE_GIO)
5659 AC_SUBST(ENABLE_DBUS)
5660 AC_SUBST(ENABLE_SYSTRAY_GTK)
5661 AC_SUBST(GTK_CFLAGS)
5664 dnl ===================================================================
5665 dnl Check whether the Cairo libraries are available.
5666 dnl ===================================================================
5672 if test "$test_cairo" = "yes"; then
5674 AC_MSG_CHECKING([whether to use cairo])
5675 if test "x$enable_cairo" != "xno" ; then
5677 AC_MSG_RESULT([yes])
5678 AC_MSG_CHECKING([which cairo to use])
5679 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
5680 test "$with_system_cairo" != "no"; then
5681 AC_MSG_RESULT([external])
5684 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5685 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
5686 AC_MSG_ERROR([Cairo library requires fontconfig.])
5688 if test "$with_system_xrender_headers" = "yes"; then
5689 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
5691 #include <X11/extensions/Xrender.h>
5693 int main(int argc, char **argv) {
5694 #ifdef PictStandardA8
5700 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
5703 BUILD_TYPE="$BUILD_TYPE CAIRO"
5704 dnl === compiler fails on pixman with 64bit architectures...===
5705 if test "$build_cpu" != "x86_64"; then
5708 AC_MSG_RESULT([internal])
5715 AC_SUBST(ENABLE_CAIRO)
5716 AC_SUBST(BUILD_PIXMAN)
5717 AC_SUBST(SYSTEM_CAIRO)
5718 AC_SUBST(CAIRO_CFLAGS)
5719 AC_SUBST(CAIRO_LIBS)
5721 dnl ===================================================================
5722 dnl Check whether the OpenGL libraries are available
5723 dnl ===================================================================
5725 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
5728 if test "x$enable_opengl" != "xno" ; then
5729 AC_MSG_RESULT([yes])
5730 AC_CHECK_HEADER(GL/gl.h, [],
5731 [AC_MSG_ERROR([OpenGL headers not found])], [])
5732 AC_CHECK_LIB(GL, main, [],
5733 [AC_MSG_ERROR(libGL not installed or functional)], [])
5734 AC_CHECK_LIB(GLU, main, [],
5735 [AC_MSG_ERROR(libGLU not installed or functional)], [])
5741 AC_SUBST(ENABLE_OPENGL)
5743 AC_MSG_CHECKING([whether to build extra presenter ui])
5744 if test -n "$enable_presenter_extra_ui" -a "$enable_presenter_extra_ui" != "no"; then
5745 AC_MSG_RESULT([yes])
5746 ENABLE_PRESENTER_EXTRA_UI=YES
5749 ENABLE_PRESENTER_EXTRA_UI=NO
5751 AC_SUBST(ENABLE_PRESENTER_EXTRA_UI)
5753 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
5754 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
5755 AC_MSG_RESULT([yes])
5756 ENABLE_MINIMIZER=YES
5761 AC_SUBST(ENABLE_MINIMIZER)
5763 AC_MSG_CHECKING([whether to build the Presenter Screen extension])
5764 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
5765 AC_MSG_RESULT([yes])
5766 ENABLE_PRESENTER_SCREEN=YES
5769 ENABLE_PRESENTER_SCREEN=NO
5771 AC_SUBST(ENABLE_PRESENTER_SCREEN)
5773 AC_MSG_CHECKING([whether to build the PDF Import extension])
5774 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
5775 AC_MSG_RESULT([yes])
5776 ENABLE_PDFIMPORT=YES
5778 dnl ===================================================================
5779 dnl Check for system poppler
5780 dnl ===================================================================
5781 AC_MSG_CHECKING([which pdf backend to use])
5782 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
5783 test "$with_system_poppler" != "no"; then
5784 AC_MSG_RESULT([external])
5786 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
5788 AC_MSG_RESULT([internal])
5790 BUILD_TYPE="$BUILD_TYPE XPDF"
5791 AC_MSG_CHECKING([for xpdf module])
5792 if test -d ./xpdf; then
5795 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5802 AC_SUBST(ENABLE_PDFIMPORT)
5803 AC_SUBST(SYSTEM_POPPLER)
5804 AC_SUBST(POPPLER_CFLAGS)
5805 AC_SUBST(POPPLER_LIBS)
5807 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
5808 AC_MSG_CHECKING([for sdext module])
5809 if test -d ./sdext; then
5812 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5814 BUILD_TYPE="$BUILD_TYPE SDEXT"
5817 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
5818 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
5819 AC_MSG_RESULT([yes])
5820 AC_MSG_CHECKING([for swext module])
5821 if test -d ./swext; then
5824 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5826 ENABLE_MEDIAWIKI=YES
5827 BUILD_TYPE="$BUILD_TYPE SWEXT"
5832 AC_SUBST(ENABLE_MEDIAWIKI)
5834 if test "$ENABLE_MEDIAWIKI" == "YES"; then
5835 AC_MSG_CHECKING([which Servlet API Jar to use])
5836 if test -n "$with_system_servlet_api"; then
5837 AC_MSG_RESULT([external])
5838 SYSTEM_SERVLETAPI=YES
5839 if test -z "$SERVLETAPI_JAR"; then
5840 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
5842 AC_CHECK_FILE($SERVLETAPI_JAR, [],
5843 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
5845 AC_MSG_RESULT([internal])
5846 SYSTEM_SERVLETAPI=NO
5847 BUILD_TYPE="$BUILD_TYPE TOMCAT"
5850 AC_SUBST(SYSTEM_SERVLETAPI)
5851 AC_SUBST(SERVLETAPI_JAR)
5853 AC_MSG_CHECKING([whether to build the Report Builder extension])
5854 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
5855 AC_MSG_RESULT([yes])
5856 ENABLE_REPORTBUILDER=YES
5857 AC_MSG_CHECKING([for reportbuilder module])
5858 if test -d ./reportbuilder; then
5861 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5863 AC_MSG_CHECKING([which jfreereport libs to use])
5864 if test "$with_system_jfreereport" == "yes"; then
5865 SYSTEM_JFREEREPORT=YES
5866 AC_MSG_RESULT([external])
5867 if test -z $SAC_JAR; then
5868 SAC_JAR=/usr/share/java/sac.jar
5870 AC_CHECK_FILE($SAC_JAR, [],
5871 [AC_MSG_ERROR(sac.jar not found.)], [])
5873 if test -z $LIBXML_JAR; then
5874 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
5875 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
5877 AC_CHECK_FILE(/usr/share/java/libxml.jar,
5878 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
5879 [AC_MSG_ERROR(libxml.jar replacement not found.)]
5884 AC_CHECK_FILE($LIBXML_JAR, [],
5885 [AC_MSG_ERROR(libxml.jar not found.)], [])
5888 if test -z $FLUTE_JAR; then
5889 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
5890 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
5892 AC_CHECK_FILE(/usr/share/java/flute.jar,
5893 [ FLUTE_JAR=/usr/share/java/flute.jar ],
5894 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
5899 AC_CHECK_FILE($FLUTE_JAR, [],
5900 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
5903 if test -z $JFREEREPORT_JAR; then
5904 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
5905 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
5907 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
5908 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
5909 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
5914 AC_CHECK_FILE($JFREEREPORT_JAR, [],
5915 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
5918 if test -z $LIBLAYOUT_JAR; then
5919 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
5920 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
5922 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
5923 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
5924 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
5929 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
5930 [AC_MSG_ERROR(liblayout.jar not found.)], [])
5933 if test -z $LIBLOADER_JAR; then
5934 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
5935 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
5937 AC_CHECK_FILE(/usr/share/java/libloader.jar,
5938 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
5939 [AC_MSG_ERROR(libloader.jar replacement not found.)]
5944 AC_CHECK_FILE($LIBLOADER_JAR, [],
5945 [AC_MSG_ERROR(libloader.jar not found.)], [])
5948 if test -z $LIBFORMULA_JAR; then
5949 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
5950 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
5952 AC_CHECK_FILE(/usr/share/java/libformula.jar,
5953 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
5954 [AC_MSG_ERROR(libformula.jar replacement not found.)]
5959 AC_CHECK_FILE($LIBFORMULA_JAR, [],
5960 [AC_MSG_ERROR(libformula.jar not found.)], [])
5963 if test -z $LIBREPOSITORY_JAR; then
5964 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
5965 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
5967 AC_CHECK_FILE(/usr/share/java/librepository.jar,
5968 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
5969 [AC_MSG_ERROR(librepository.jar replacement not found.)]
5974 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
5975 [AC_MSG_ERROR(librepository.jar not found.)], [])
5978 if test -z $LIBFONTS_JAR; then
5979 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
5980 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
5982 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
5983 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
5984 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
5989 AC_CHECK_FILE($LIBFONTS_JAR, [],
5990 [AC_MSG_ERROR(libfonts.jar not found.)], [])
5993 if test -z $LIBSERIALIZER_JAR; then
5994 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
5995 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
5997 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
5998 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
5999 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
6004 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
6005 [AC_MSG_ERROR(libserializer.jar not found.)], [])
6009 if test -z $LIBBASE_JAR; then
6010 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
6011 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
6013 AC_CHECK_FILE(/usr/share/java/libbase.jar,
6014 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
6015 [AC_MSG_ERROR(libbase.jar replacement not found.)]
6020 AC_CHECK_FILE($LIBBASE_JAR, [],
6021 [AC_MSG_ERROR(libbase.jar not found.)], [])
6025 AC_MSG_RESULT([internal])
6026 AC_MSG_CHECKING([for jfreereport module])
6027 if test -d ./jfreereport; then
6030 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
6032 SYSTEM_JFREEREPORT=NO
6033 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
6035 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
6038 ENABLE_REPORTBUILDER=NO
6039 SYSTEM_JFREEREPORT=NO
6041 AC_SUBST(ENABLE_REPORTBUILDER)
6042 AC_SUBST(SYSTEM_JFREEREPORT)
6044 AC_SUBST(LIBXML_JAR)
6046 AC_SUBST(JFREEREPORT_JAR)
6047 AC_SUBST(LIBBASE_JAR)
6048 AC_SUBST(LIBLAYOUT_JAR)
6049 AC_SUBST(LIBLOADER_JAR)
6050 AC_SUBST(LIBFORMULA_JAR)
6051 AC_SUBST(LIBREPOSITORY_JAR)
6052 AC_SUBST(LIBFONTS_JAR)
6053 AC_SUBST(LIBSERIALIZER_JAR)
6055 # this has to be here because both the wiki publisher and the SRB use
6057 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6058 AC_MSG_CHECKING([which Apache commons-* libs to use])
6059 if test "$with_system_apache_commons" = "yes"; then
6060 SYSTEM_APACHE_COMMONS=YES
6061 AC_MSG_RESULT([external])
6062 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6063 if test -z $COMMONS_CODEC_JAR; then
6064 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
6065 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
6067 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
6068 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
6069 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
6074 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
6075 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
6078 if test -z $COMMONS_LANG_JAR; then
6079 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
6080 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
6082 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
6083 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
6084 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
6089 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
6090 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
6093 if test -z $COMMONS_HTTPCLIENT_JAR; then
6094 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
6095 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
6097 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
6098 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
6099 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
6104 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
6105 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
6108 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6109 if test -z $COMMONS_LOGGING_JAR; then
6110 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
6111 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
6113 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
6114 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
6115 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
6120 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
6121 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
6125 AC_MSG_RESULT([internal])
6126 SYSTEM_APACHE_COMMONS=NO
6127 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
6130 AC_SUBST(SYSTEM_APACHE_COMMONS)
6131 AC_SUBST(COMMONS_CODEC_JAR)
6132 AC_SUBST(COMMONS_LANG_JAR)
6133 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
6134 AC_SUBST(COMMONS_LOGGING_JAR)
6136 dnl ===================================================================
6137 dnl Check whether the Qt and KDE libraries are available.
6138 dnl ===================================================================
6143 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
6144 dnl Search paths for Qt and KDE
6145 if test "$build_cpu" != "x86_64" ; then
6146 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"
6147 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"
6149 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"
6150 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"
6152 if test -n "$QTDIR" ; then
6153 qt_incdirs="$QTDIR/include $qt_incdirs"
6154 if test "$build_cpu" != "x86_64" ; then
6155 qt_libdirs="$QTDIR/lib $qt_libdirs"
6157 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
6160 if test "$build_cpu" != "x86_64" ; then
6161 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"
6162 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"
6164 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"
6165 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"
6167 if test -n "$KDEDIR" ; then
6168 kde_incdirs="$KDEDIR/include $kde_incdirs"
6169 if test "$build_cpu" != "x86_64" ; then
6170 kde_libdirs="$KDEDIR/lib $kde_libdirs"
6172 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
6177 qt_test_include="qstyle.h"
6178 qt_test_library="libqt-mt.so"
6179 kde_test_include="ksharedptr.h"
6180 kde_test_library="libkdeui.so"
6182 dnl Check for Qt headers
6183 AC_MSG_CHECKING([for Qt headers])
6185 for kde_check in $qt_incdirs ; do
6186 if test -r "$kde_check/$qt_test_include" ; then
6187 qt_incdir="$kde_check"
6191 AC_MSG_RESULT([$qt_incdir])
6192 if test "x$qt_incdir" = "xno" ; then
6193 AC_MSG_ERROR([Qt headers not found. Please specify the root of
6194 your Qt installation by exporting QTDIR before running "configure".])
6197 dnl Check for Qt libraries
6198 AC_MSG_CHECKING([for Qt libraries])
6200 for qt_check in $qt_libdirs ; do
6201 if test -r "$qt_check/$qt_test_library" ; then
6202 qt_libdir="$qt_check"
6206 AC_MSG_RESULT([$qt_libdir])
6207 if test "x$qt_libdir" = "xno" ; then
6208 AC_MSG_ERROR([Qt libraries not found. Please specify the root of
6209 your Qt installation by exporting QTDIR before running "configure".])
6212 dnl Check for Meta Object Compiler
6213 AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
6214 if test "$MOC" = "no" ; then
6215 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6216 the root of your Qt installation by exporting QTDIR before running "configure".])
6219 dnl Check for KDE headers
6220 AC_MSG_CHECKING([for KDE headers])
6222 for kde_check in $kde_incdirs ; do
6223 if test -r "$kde_check/$kde_test_include" ; then
6224 kde_incdir="$kde_check"
6228 AC_MSG_RESULT([$kde_incdir])
6229 if test "x$kde_incdir" = "xno" ; then
6230 AC_MSG_ERROR([KDE headers not found. Please specify the root of
6231 your KDE installation by exporting KDEDIR before running "configure".])
6234 dnl Check for KDE libraries
6235 AC_MSG_CHECKING([for KDE libraries])
6237 for kde_check in $kde_libdirs ; do
6238 if test -r "$kde_check/$kde_test_library" ; then
6239 kde_libdir="$kde_check"
6243 AC_MSG_RESULT([$kde_libdir])
6244 if test "x$kde_libdir" = "xno" ; then
6245 AC_MSG_ERROR([KDE libraries not found. Please specify the root of
6246 your KDE installation by exporting KDEDIR before running "configure".])
6249 dnl Set the variables
6250 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6251 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
6253 AC_SUBST(KDE_CFLAGS)
6257 dnl ===================================================================
6258 dnl KDE4 Integration
6259 dnl ===================================================================
6264 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
6265 qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes"
6266 qt_libdirs="$QT4LIB /usr/lib $x_libraries"
6268 kde_incdirs="/usr/include $x_includes"
6269 kde_libdirs="/usr/lib $x_libraries"
6271 if test "$build_cpu" == "x86_64" ; then
6272 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
6273 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
6276 if test -n "$KDE4DIR" ; then
6277 kde_incdirs="$KDE4DIR/include $kde_incdirs"
6278 if test "$build_cpu" != "x86_64" ; then
6279 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
6281 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
6285 qt_test_include="Qt/qobject.h"
6286 qt_test_library="libQtCore.so"
6287 kde_test_include="ksharedptr.h"
6288 kde_test_library="libkdeui.so"
6290 AC_MSG_CHECKING([for Qt4 headers])
6292 for inc_dir in $qt_incdirs ; do
6293 if test -r "$inc_dir/$qt_test_include" ; then
6294 qt_header_dir="$inc_dir"
6299 AC_MSG_RESULT([$qt_header_dir])
6300 if test "x$qt_header_dir" = "xno" ; then
6301 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6304 AC_MSG_CHECKING([for Qt4 libraries])
6306 for lib_dir in $qt_libdirs ; do
6307 if test -r "$lib_dir/$qt_test_library" ; then
6308 qt_lib_dir="$lib_dir"
6313 AC_MSG_RESULT([$qt_lib_dir])
6315 if test "x$qt_lib_dir" = "xno" ; then
6316 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6319 dnl Check for Meta Object Compiler
6320 AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
6321 if test "$MOC4" = "no" ; then
6322 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6323 the root of your Qt installation by exporting QT4DIR before running "configure".])
6326 dnl Check for KDE4 headers
6327 AC_MSG_CHECKING([for KDE4 headers])
6329 for kde_check in $kde_incdirs ; do
6330 if test -r "$kde_check/$kde_test_include" ; then
6331 kde_incdir="$kde_check"
6335 AC_MSG_RESULT([$kde_incdir])
6336 if test "x$kde_incdir" = "xno" ; then
6337 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6340 dnl Check for KDE4 libraries
6341 AC_MSG_CHECKING([for KDE4 libraries])
6343 for kde_check in $kde_libdirs ; do
6344 if test -r "$kde_check/$kde_test_library" ; then
6345 kde_libdir="$kde_check"
6350 AC_MSG_RESULT([$kde_libdir])
6351 if test "x$kde_libdir" = "xno" ; then
6352 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6355 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6356 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
6358 AC_SUBST(KDE4_CFLAGS)
6362 dnl ===================================================================
6363 dnl Test for the enabling the lockdown pieces
6364 dnl ===================================================================
6365 AC_MSG_CHECKING([whether to enable the lockdown pieces])
6367 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
6369 AC_MSG_RESULT([yes])
6373 AC_SUBST(ENABLE_LOCKDOWN)
6375 dnl ===================================================================
6376 dnl Test whether to include Evolution 2 support
6377 dnl ===================================================================
6378 AC_MSG_CHECKING([whether to enable evolution 2 support])
6379 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
6380 AC_MSG_RESULT([yes])
6381 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
6382 ENABLE_EVOAB2="TRUE"
6387 AC_SUBST(ENABLE_EVOAB2)
6388 AC_SUBST(GOBJECT_CFLAGS)
6389 AC_SUBST(GOBJECT_LIBS)
6391 dnl ===================================================================
6392 dnl Test whether to include KDE AB support
6393 dnl ===================================================================
6394 AC_MSG_CHECKING([whether to enable KDE address book support])
6395 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
6396 AC_MSG_RESULT([yes])
6398 save_CXXFLAGS=$CXXFLAGS
6399 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
6400 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
6402 #include <kdeversion.h>
6404 int main(int argc, char **argv) {
6405 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
6408 ], [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])])
6409 CXXFLAGS=$save_CXXFLAGS
6416 AC_SUBST(ENABLE_KAB)
6418 dnl ===================================================================
6419 dnl Test whether to include MathMLDTD
6420 dnl ===================================================================
6421 AC_MSG_CHECKING([whether to include MathMLDTD])
6422 if test -n "$enable_mathmldtd"; then
6423 if test "$enable_mathmldtd" = "no"; then
6425 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6427 AC_MSG_RESULT([yes])
6428 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
6432 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6435 dnl ===================================================================
6436 dnl Test whether to include fonts
6437 dnl ===================================================================
6438 AC_MSG_CHECKING([whether to include third-party fonts])
6439 if test "$with_fonts" != "no" ; then
6440 AC_MSG_RESULT([yes])
6442 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
6446 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
6448 AC_SUBST(WITH_FONTS)
6450 dnl ===================================================================
6451 dnl Test whether to include ppds
6452 dnl ===================================================================
6453 AC_MSG_CHECKING([whether to include PPDs])
6454 if test "$with_ppds" != "no"; then
6455 AC_MSG_RESULT([yes])
6459 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
6461 AC_SUBST(WITHOUT_PPDS)
6463 dnl ===================================================================
6464 dnl Test whether to include afms
6465 dnl ===================================================================
6466 AC_MSG_CHECKING([whether to include AFMs])
6467 if test "$with_afms" != "no"; then
6468 AC_MSG_RESULT([yes])
6472 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
6474 AC_SUBST(WITHOUT_AFMS)
6478 AC_MSG_CHECKING([whether and how to use Xinerama])
6479 if test "$_os" = "Darwin"; then
6481 XINERAMA_LINK=dynamic
6482 AC_MSG_RESULT([yes])
6483 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
6484 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
6485 # we have both versions, let the user decide but use the dynamic one
6488 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
6489 XINERAMA_LINK=dynamic
6491 XINERAMA_LINK=static
6493 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
6494 # we have only the dynamic version
6496 XINERAMA_LINK=dynamic
6497 elif test -e "$XLIB/libXinerama.a"; then
6499 if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6501 XINERAMA_LINK=static
6511 if test "$USE_XINERAMA" = "YES"; then
6512 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
6513 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
6514 [AC_MSG_ERROR(Xinerama header not found.)], [])
6515 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
6516 if test "$_os" = "FreeBSD"; then
6517 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
6519 if test "$_os" = "Linux"; then
6520 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
6522 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
6523 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
6525 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
6530 AC_SUBST(USE_XINERAMA)
6531 AC_SUBST(XINERAMA_LINK)
6533 dnl ===================================================================
6534 dnl Test for the presence of Ant and that it works
6535 dnl ===================================================================
6537 if test "$SOLAR_JAVA" != ""; then
6538 ANT_HOME=; export ANT_HOME
6539 WITH_ANT_HOME=; export WITH_ANT_HOME
6540 if test -z "$with_ant_home"; then
6541 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
6543 if test "$_os" = "WINNT"; then
6544 with_ant_home=`cygpath -u "$with_ant_home"`
6546 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
6547 WITH_ANT_HOME=$with_ant_home
6548 ANT_HOME=$with_ant_home
6551 if test -z "$ANT"; then
6552 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
6554 # resolve relative or absolute symlink
6555 while test -h "$ANT"; do
6557 a_basename=`basename "$ANT"`
6558 a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
6559 cd "`dirname "$ANT"`"
6560 cd "`dirname "$a_script"`"
6561 ANT="`pwd`"/"`basename "$a_script"`"
6565 if test "$_os" = "OS2"; then
6566 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6571 # update for more extensions...
6572 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6575 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
6577 AC_MSG_CHECKING([whether ant is >= $ant_minver])
6578 ant_version=`$ANT -version | $AWK '{ print $4; }'`
6579 ant_version_major=`echo $ant_version | cut -d. -f1`
6580 ant_version_minor=`echo $ant_version | cut -d. -f2`
6581 echo "configure: ant_version $ant_version " >&5
6582 echo "configure: ant_version_major $ant_version_major " >&5
6583 echo "configure: ant_version_minor $ant_version_minor " >&5
6584 if test "$ant_version_major" -ge "2"; then
6585 AC_MSG_RESULT([yes, $ant_version])
6586 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
6587 AC_MSG_RESULT([yes, $ant_version])
6589 AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
6591 AC_MSG_CHECKING([if $ANT works])
6592 cat > conftest.java << EOF
6593 public class conftest {
6594 int testmethod(int a, int b) {
6600 cat > conftest.xml << EOF
6601 <project name="conftest" default="conftest">
6602 <target name="conftest">
6603 <javac srcdir="." includes="conftest.java">
6608 oldJAVA_HOME=$JAVA_HOME
6609 if test "$JAVACISGCJ" = "yes"; then
6610 JAVA_HOME=; export JAVA_HOME
6611 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6613 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6615 AC_TRY_EVAL(ant_cmd)
6616 if test $? = 0 && test -f ./conftest.class ; then
6617 AC_MSG_RESULT([Ant works])
6618 if test -z "$WITH_ANT_HOME"; then
6619 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
6620 if test -z "$ANT_HOME"; then
6621 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6624 ANT_HOME="$WITH_ANT_HOME"
6627 echo "configure: Ant test failed" >&5
6628 cat conftest.java >&5
6629 cat conftest.xml >&5
6630 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
6632 echo "Ant does not work - Some Java projects will not build!" >>warn
6634 JAVA_HOME=$oldJAVA_HOME
6635 rm -f conftest* core core.* *.core
6637 if test -z "$ANT_HOME"; then
6638 ANT_HOME="NO_ANT_HOME"
6642 dnl Checking for ant.jar
6643 if test "$ANT_HOME" != "NO_ANT_HOME"; then
6644 AC_MSG_CHECKING([Ant lib directory])
6645 if test -f $ANT_HOME/lib/ant.jar; then
6646 ANT_LIB="$ANT_HOME/lib"
6648 if test -f $ANT_HOME/ant.jar; then
6651 if test -f /usr/share/java/ant.jar; then
6652 ANT_LIB=/usr/share/java
6654 if test -f /usr/share/ant-core/lib/ant.jar; then
6655 ANT_LIB=/usr/share/ant-core/lib
6657 if test -f $ANT_HOME/lib/ant/ant.jar; then
6658 ANT_LIB="$ANT_HOME/lib/ant"
6660 AC_MSG_ERROR([Ant libraries not found!])
6666 AC_MSG_RESULT([Ant lib directory found.])
6671 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6672 AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
6675 cat > conftest.java << EOF
6676 public class conftest {
6677 int testmethod(int a, int b) {
6683 cat > conftest.xml << EOF
6684 <project name="conftest" default="conftest">
6685 <target name="conftest" depends="copytest">
6686 <javac srcdir="." includes="conftest.java">
6689 <target name="copytest">
6690 <copy todir="confdir">
6691 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
6693 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
6698 if test "$JAVACISGCJ" = "yes"; then
6699 JAVA_HOME=; export JAVA_HOME
6700 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6702 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6704 AC_TRY_EVAL(ant_cmd)
6705 if test $? = 0 && test -f ./conftest.class ; then
6706 AC_MSG_RESULT([yes])
6709 echo "configure: Ant test failed" >&5
6710 cat conftest.java >&5
6711 cat conftest.xml >&5
6713 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
6716 rm -f conftest* core core.* *.core
6719 if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
6720 AC_MSG_CHECKING([for JUnit 4])
6721 if test "$with_junit" == "yes"; then
6722 if test -e /usr/share/java/junit4.jar; then
6723 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
6725 OOO_JUNIT_JAR=/usr/share/java/junit.jar
6728 OOO_JUNIT_JAR=$with_junit
6730 if test "$_os" = "WINNT"; then
6731 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
6733 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
6734 grep org/junit/Before.class > /dev/null 2>&5
6735 if test $? -eq 0; then
6736 AC_MSG_RESULT([$OOO_JUNIT_JAR])
6739 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
6740 location (/usr/share/java), specify its pathname via
6741 --with-junit=..., or disable it via --without-junit])
6744 AC_SUBST(OOO_JUNIT_JAR)
6746 AC_MSG_CHECKING([which languages to be built])
6747 WITH_LANG="$with_lang"
6748 if test -z "$WITH_LANG"; then
6749 AC_MSG_RESULT([en-US])
6751 AC_MSG_RESULT([$WITH_LANG])
6755 AC_MSG_CHECKING([which languages have poor help localizations])
6756 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
6757 if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
6758 AC_MSG_RESULT([none])
6760 AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
6762 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
6764 AC_MSG_CHECKING([which dictionaries to include])
6765 if test -z "$with_dict"; then
6767 AC_MSG_RESULT([ALL])
6769 WITH_DICT=","$with_dict","
6770 AC_MSG_RESULT([$with_dict])
6774 AC_MSG_CHECKING([for additional 'intro' bitmaps])
6776 if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
6778 AC_MSG_RESULT([none])
6780 for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
6783 *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
6785 if test -n "$bitmap" ; then
6786 INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
6789 AC_MSG_RESULT([$INTRO_BITMAPS])
6791 AC_SUBST(INTRO_BITMAPS)
6793 AC_MSG_CHECKING([for additional 'about' bitmaps])
6795 if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
6797 AC_MSG_RESULT([none])
6799 for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
6802 *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
6804 if test -n "$bitmap" ; then
6805 ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
6808 AC_MSG_RESULT([$ABOUT_BITMAPS])
6810 AC_SUBST(ABOUT_BITMAPS)
6813 AC_MSG_CHECKING([for vendor])
6814 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
6815 AC_MSG_RESULT([not set])
6817 OOO_VENDOR="$with_vendor"
6818 AC_MSG_RESULT([$OOO_VENDOR])
6820 AC_SUBST(OOO_VENDOR)
6823 AC_MSG_CHECKING([for UNIX wrapper name])
6824 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
6825 AC_MSG_RESULT([not set])
6827 UNIXWRAPPERNAME="$with_unix_wrapper"
6828 AC_MSG_RESULT([$UNIXWRAPPERNAME])
6830 AC_SUBST(UNIXWRAPPERNAME)
6832 AC_MSG_CHECKING([whether to statically link to Gtk])
6833 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
6834 ENABLE_STATIC_GTK="TRUE"
6835 AC_MSG_RESULT([yes])
6837 ENABLE_STATIC_GTK="FALSE"
6840 AC_SUBST(ENABLE_STATIC_GTK)
6842 AC_MSG_CHECKING([whether to use layout dialogs])
6843 if test -n "$enable_layout" && test "$enable_layout" != "no"; then
6844 ENABLE_LAYOUT="TRUE"
6845 AC_MSG_RESULT([yes])
6847 ENABLE_LAYOUT="FALSE"
6850 AC_SUBST(ENABLE_LAYOUT)
6852 # ===================================================================
6853 # De- or increase default verbosity of build process
6854 # ===================================================================
6855 AC_MSG_CHECKING([build verbosity])
6856 if test -n "$enable_verbose"; then
6857 if test "$enable_verbose" == "yes"; then
6859 AC_MSG_RESULT([high])
6861 if test "$enable_verbose" == "no"; then
6863 AC_MSG_RESULT([low])
6866 AC_MSG_RESULT([not set])
6870 dnl ===================================================================
6871 dnl Setting up the environment.
6872 dnl ===================================================================
6873 echo "********************************************************************"
6875 echo "* Setting up the build environment variables. *"
6877 echo "********************************************************************"
6879 if test -z "$COMPATH"; then
6880 AC_MSG_ERROR([No compiler found.])
6884 AC_MSG_CHECKING([solver path])
6885 if test -z "$with_local_solver"; then
6886 LOCAL_SOLVER="DEFAULT"
6887 AC_MSG_RESULT([default])
6889 LOCAL_SOLVER=$with_local_solver
6890 AC_MSG_RESULT([$with_local_solver])
6892 AC_SUBST(LOCAL_SOLVER)
6894 AC_SUBST(BUILD_TYPE)
6896 # make sure config.guess is +x; we execute config.guess, so it has to be so;
6897 chmod +x ./config.guess
6899 AC_OUTPUT([set_soenv Makefile])
6901 dnl Executing the set_soenv script to setup the environment variables.
6903 if test -z "$enable_check_only"; then
6908 echo No environment file will be generated
6910 num_warnings=`wc -l warn`
6911 _num=`echo $num_warnings | $AWK '{ print $1 }'`
6912 if test $_num -gt 0; then
6913 echo The following warning\(s\) were generated by configure
6914 echo ----------------------------------------------------
6919 echo There were no warnings