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
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-mdds,
519 [ --with-system-mdds Use mdds already on system
521 AC_ARG_WITH(system-vigra,
522 [ --with-system-vigra Use vigra already on system
525 [ --disable-neon Disable neon and the compilation of webdav binding
528 [ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla
531 AC_ARG_WITH(system-neon,
532 [ --with-system-neon Use neon already on system
534 AC_ARG_WITH(system-agg,
535 [ --with-system-agg Use AGG already on system
537 AC_ARG_WITH(system-hunspell,
538 [ --with-system-hunspell Use libhunspell already on system
540 AC_ARG_WITH(system-mythes,
541 [ --with-system-mythes Use mythes already on system
543 AC_ARG_WITH(system-altlinuxhyph,
544 [ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
546 AC_ARG_WITH(system-lpsolve,
547 [ --with-system-lpsolve Use lpsolve already on system
549 AC_ARG_WITH(system-cppunit,
550 [ --with-system-cppunit Use cppunit already on system
552 AC_ARG_WITH(system-redland,
553 [ --with-system-redland Use redland library already on system
555 AC_ARG_WITH(system-mozilla,
556 [ --with-system-mozilla Use mozilla already on system. Note that some
557 components cannot be built against a contemporary
558 mozilla. The flavour used can be specified by
559 --with-system-mozilla=<flavour>. Supported are:
560 libxul (default), xulrunner, firefox, seamonkey,
562 ], WITH_SYSTEM_MOZILLA=$withval, WITH_SYSTEM_MOZILLA=no)
564 [ --with-stlport The location that STLport is installed in. The STL
565 header files are assumed to be in
566 stlport-home/stlport and the STLPort library in
569 Usage: --with-stlport=<absolute path to stlport home>
571 Warning!!, disabling using --without-stlport or
572 enabling using --with-stlport on a platform that
573 defaults to the opposite will break ABI compatability
574 ], WITH_STLPORT=$withval , WITH_STLPORT=auto)
575 AC_ARG_WITH(jdk-home,
576 [ --with-jdk-home if you have installed JDK 1.3 or later on your system
577 please supply the path here.
578 Note that this is not the location of the Java binary
579 but the location of the entire distribution.
581 Usage: --with-jdk-home=<absolute path to JDK home>
583 AC_ARG_WITH(gxx_include_path,
584 [ --with-gxx-include-path if you want to override the autodetected g++ include
587 Usage: --with-gxx-include-path=<absolute path to g++ include dir>
590 [ --with-java Build with[[out]] Java support. If you use
591 --without-java/--with-java=no then the build will have
592 no support for Java components, applets, accessibility
594 ], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java)
595 AC_ARG_ENABLE(gcjaot,
596 [ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation
597 support to speed up buildsi by compiling the jars also
599 --enable-gcjaot is only known to work with bytecode
600 created with gcj or ecj
602 AC_ARG_WITH(ant-home,
603 [ --with-ant-home If you have installed Jakarta Ant on your system,
604 please supply the path here.
605 Note that this is not the location of the Ant binary
606 but the location of the entire distribution.
608 Usage: --with-ant-home=<absolute path to Ant home>
611 [ --with-junit Specifies the JUnit 4 jar file to use for JUnit-based
612 tests. --without-junit disables those tests. Not
613 relevant in the --without-java case.
615 Usage: --with-junit=<absolute path to JUnit 4 jar>
617 AC_ARG_WITH(perl-home,
618 [ --with-perl-home If you have installed the Perl 5 Distribution, on your
619 system, please supply the path here.
620 Note that this is not the location of the Perl binary
621 but the location of the entire distribution.
623 Usage: --with-perl-home=<absolute path to Perl 5 home>
626 [ --with-cl-home For Windows NT users, please supply the path
627 for the Microsoft C/C++ compiler.
628 Note that this is not the location of the compiler
629 binary but the location of the entire distribution.
631 Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>
633 AC_ARG_WITH(mspdb-path,
634 [ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the
635 path pointing to the mspdb71.dll (.NET 2003).
637 Usage: --with-mspdb-path=<absolute path to mspdb71.dll>
639 AC_ARG_WITH(midl-path,
640 [ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply
641 the path pointing to the midl.exe.
643 Usage: --with-midl-path=<absolute path to midl.exe>
645 AC_ARG_WITH(csc-path,
646 [ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply
647 the path pointing to the csc.exe.
649 Usage: --with-csc-path=<absolute path to csc.exe>
651 AC_ARG_WITH(nsis-path,
652 [ --with-nsis-path For Windows users, please supply the path to the
653 "Nullsoft Scriptable Install System" (NSIS). If NSIS
654 is found in the path or this option is supplied a self
655 contained executable installer for OpenOffice.org will
658 Usage: --with-nsis-path=<absolute path to nsis.exe>
660 AC_ARG_WITH(frame-home,
661 [ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply
662 the path pointing to lib/mscoree.lib, usually
664 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"
666 MS Visual Toolkit compiler users, please supply the
667 path pointing to lib/msvcrt.lib, usually something
669 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"
671 Usage: --with-frame-home=<absolute path to Framework SDK [[home]]>
673 AC_ARG_WITH(psdk-home,
674 [ --with-psdk-home For Windows users, please supply the path to the
675 Microsoft Platform SDK.
677 Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>
679 AC_ARG_WITH(directx-home,
680 [ --with-directx-home For Windows users, please supply the path to the
681 Microsoft DirectX SDK.
683 Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
685 AC_ARG_WITH(mozilla-build,
686 [ --with-mozilla-build For Windows users, please supply the path to the
689 Usage: --with-mozilla-build=<absolute path to mozilla build tools>
691 At the moment of this writing, an installer for the mozilla build tools
692 can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
693 ],[MOZILLABUILD=$withval],)
694 AC_ARG_WITH(local-solenv,
695 [ --with-local-solenv If you have solenv in a location other than ./solenv,
696 please supply the path here.
698 Usage: --with-local-solenv=<absolute path to solenv>
700 AC_ARG_WITH(local-solver,
701 [ --with-local-solver if you have solver in a location other than ./solver,
702 please supply the path here.
704 Usage: --with-local-solver=<absolute path to solver>
706 AC_ARG_ENABLE(check-only,
707 [ --enable-check-only Use this option option if you just want to check your
708 environment. This option stops the generation of an
711 Usage: --enable-check-only=yes
713 AC_ARG_ENABLE(ccache-skip,
714 [[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to
715 escape compiler flags that would otherwise prevent
716 caching of the result (currently used on Mac only)
717 NOTE: requires patched version because of a bug in
718 ccache (see issue 104567 for details and patch)
719 explicitly enable if your version of ccache doesn't
720 identify as version 2.4_OOo
721 ]],,enable_ccache_skip=auto)
723 [ --with-lang Use this option to build OpenOffice.org with
724 additional language support. English (US) is always
725 included by default. Separate multiple languages with
726 space. For all languages, use --with-lang=ALL.
728 Usage: --with-lang="es sw tu cs sk"
730 AC_ARG_WITH(poor-help-localizations,
731 [ --with-poor-help-localizations
732 Use this option to specify which languages have
733 unusable help localizations. Separate multiple
734 languages with space.
736 Usage: --with-poor-help-localizations="af ar be-BY ca"
739 [ --with-dict Use this option to build OpenOffice.org with
740 dictionary support. ALL dictionaries are always
741 included by default unless overridden with
742 this option. Separate multiple dictionaries with
743 commas. For all dictionaries, use --with-dict=ALL.
745 Usage: --with-dict=ENGB,ENUS,ITIT
747 AC_ARG_WITH(intro-bitmaps,
748 [ --with-intro-bitmaps Prefer the specified intro bitmaps over the
749 the default one. Can be more than one (separated by
750 commas), the order means priority of fallback if the
751 first does not exist (in the installed tree).
753 Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
755 AC_ARG_WITH(about-bitmaps,
756 [ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
757 specification of bitmaps for the About box.
759 Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
762 [ --with-vendor Set vendor of the build.
764 Usage: --with-vendor="John the Builder"
766 AC_ARG_WITH(unix-wrapper,
767 [ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
768 in the desktop files and in the desktop-integration RPMs.
770 Usage: --with-unix-wrapper=ooffice
772 AC_ARG_WITH(asm-home,
773 [ --with-asm-home For Windows users, please supply the path for the
776 Usage: --with-asm-home=<path to ml.exe directory>
778 AC_ARG_WITH(os-version,
779 [ --with-os-version For FreeBSD users, use this option option to override
780 the detected OSVERSION.
782 Usage: --with-os-version=<OSVERSION>
784 AC_ARG_WITH(unzip-home,
785 [ --with-unzip-home Deprecated: use --with-zip-home instead],,)
786 AC_ARG_WITH(zip-home,
787 [ --with-zip-home If you use a non standard zip, for example windows
788 please supply the path for zip
790 Usage: --with-zip-home=<path to zip executable>
793 [ --with-mingwin For Windows users, use the mingwin32 compiler within
796 Usage: --with-mingwin=yes
798 For !Windows use, use the mingw32 C++ compiler to
799 (re-) build unowinreg.dll. Specify the MinGW C++
802 Usage: --with-mingwin=i586-mingw32msvc-g++
803 ],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
804 AC_ARG_WITH(build-version,
805 [ --with-build-version Allows the builder to add a custom version tag
806 that will appear in the Help/About box for QA
809 Usage: --with-build-version="Built by Jim"
810 ],with_build_version=$withval)
812 [ --with-alloc Define which allocator to build with
813 (choices are oo, system, tcmalloc, jemalloc)
815 Note that on FreeBSD/NetBSD system==jemalloc
817 AC_ARG_ENABLE(verbose,
818 [ --enable-verbose Increase build verbosity.
819 --disable-verbose Decrease build verbosity.
821 AC_ARG_ENABLE(dependency-tracking,
822 [ --disable-dependency-tracking Disables generation of dependency information.
827 dnl ===================================================================
829 dnl ===================================================================
830 echo "********************************************************************"
832 echo "* OpenOffice.org build configuration. *"
834 echo "* The configure process checks your platform to see whether *"
835 echo "* you can build OpenOffice.org on it. *"
836 echo "* This process checks all pre-requisites and generates a file *"
837 echo "* containing the necessary environment variables. *"
838 echo "* Source this file after configure has ended successfully. *"
840 echo "* Any warning that is generated during the configure process *"
841 echo "* must be taken into account since it can be a reason for *"
842 echo "* an unsuccessful build of OpenOffice.org *"
844 echo "********************************************************************"
846 echo "********************************************************************"
848 echo "* Checking the platform pre-requisites. *"
850 echo "********************************************************************"
852 dnl ===================================================================
853 dnl Configure pre-requisites.
854 dnl ===================================================================
858 AC_PATH_PROG( AWK, $AWK)
859 if test -z "$AWK"; then
860 AC_MSG_ERROR([install awk to run this script])
863 AC_PATH_PROGS(SED, sed )
864 if test -z "$SED"; then
865 AC_MSG_ERROR([install sed to run this script])
868 AC_MSG_CHECKING([for solenv environment])
869 if test -z "$with_local_solenv"; then
870 LOCAL_SOLENV="DEFAULT"
871 AC_MSG_RESULT([default])
873 LOCAL_SOLENV=$with_local_solenv
874 AC_MSG_RESULT([$with_local_solenv])
876 AC_SUBST(LOCAL_SOLENV)
878 if test "$LOCAL_SOLENV" = "DEFAULT"; then
881 _solenv="$LOCAL_SOLENV"
885 if test -e $_solenv/inc/minor.mk; then
886 # Get UPD number from ./solenv/inc/minor.mk
887 UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
889 SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
890 AC_SUBST(SOURCEVERSION)
892 AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
895 dnl ===================================================================
896 dnl Checks for the operating system and processor.
897 dnl ===================================================================
899 if test "$build" != "$host" -o "$build" != "$target" \
900 -o "$host" != "$target"; then
901 AC_MSG_WARN([cross-compiling by any means is not supported (yet)!])
902 echo "cross-compiling by any means is not supported (yet)!" >> warn
905 if echo "$build_os" | grep cygwin; then
906 AC_MSG_CHECKING([Cygwin version])
908 AC_MSG_RESULT([$CygwinVer])
909 if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
910 AC_MSG_ERROR([You need at least Cygwin V1.5.x])
916 dnl ===================================================================
917 dnl The following is a list of supported systems.
918 dnl Sequential to keep the logic very simple
919 dnl These values may be checked and reset later.
920 dnl ===================================================================
930 AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
931 if test -z "$GNUTAR"; then
932 AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).])
936 dnl ===========================================================
937 dnl check whether we're using solaris 6,7,8 - sparc or intel.
938 dnl ===========================================================
939 AC_MSG_CHECKING([the Solaris operating system release])
940 _os_release=`echo $build_os | $SED -e s/solaris2\.//`
941 if test "$_os_release" -lt "6"; then
942 AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
944 AC_MSG_RESULT([ok ($_os_release)])
947 dnl check whether we're using a sparc or i386 processor
948 AC_MSG_CHECKING([the processor type])
949 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
950 AC_MSG_RESULT([ok ($build_cpu)])
952 AC_MSG_ERROR([only sparc and i386 processors are supported])
955 linux-gnu*|k*bsd*-gnu*)
982 if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
983 AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
984 echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
1004 AC_MSG_CHECKING([the FreeBSD operating system release])
1005 if test -n "$with_os_version"; then
1006 OSVERSION="$with_os_version"
1008 OSVERSION=`/sbin/sysctl -n kern.osreldate`
1010 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
1011 AC_MSG_CHECKING([which thread library to use])
1012 if test "$OSVERSION" -lt "500016"; then
1013 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1014 PTHREAD_LIBS="-pthread"
1015 elif test "$OSVERSION" -lt "502102"; then
1016 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1017 PTHREAD_LIBS="-lc_r"
1020 PTHREAD_LIBS="-pthread"
1022 AC_MSG_RESULT([$PTHREAD_LIBS])
1038 PTHREAD_CFLAGS="-pthread"
1039 PTHREAD_LIBS="-pthread -lpthread"
1046 PTHREAD_LIBS=-pthread
1047 echo "AIX is an alpha port --- Use at own risk" >> warn
1051 AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
1056 AC_SUBST(PTHREAD_CFLAGS)
1057 AC_SUBST(PTHREAD_LIBS)
1059 dnl ===================================================================
1060 dnl Set the ENABLE_CRASHDUMP variable.
1061 dnl ===================================================================
1062 AC_MSG_CHECKING([whether to enable crashdump feature])
1063 if test "$enable_crashdump" = "yes"; then
1064 ENABLE_CRASHDUMP="TRUE"
1065 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1066 AC_MSG_RESULT([yes])
1071 AC_SUBST(ENABLE_CRASHDUMP)
1073 if test "$_os" = "WINNT"; then
1074 BUILD_TYPE="$BUILD_TYPE TWAIN"
1077 if test "$_os" = "WINNT"; then
1078 dnl ===================================================================
1079 dnl Set the VC_STANDARD variable.
1080 dnl ===================================================================
1081 AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
1082 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
1087 AC_MSG_RESULT([yes])
1089 AC_SUBST(VC_STANDARD)
1092 dnl ===================================================================
1093 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
1094 dnl ===================================================================
1095 AC_MSG_CHECKING([whether to turn warnings to errors])
1096 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
1097 ENABLE_WERROR="TRUE"
1098 AC_MSG_RESULT([yes])
1099 AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
1100 AC_MSG_WARN([on platforms where it has been disabled explicitely])
1101 echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
1103 ENABLE_WERROR="FALSE"
1106 AC_SUBST(ENABLE_WERROR)
1108 dnl ===================================================================
1109 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
1110 dnl ===================================================================
1111 AC_MSG_CHECKING([whether to do a debug build])
1112 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
1114 if test -z "$enable_symbols"; then
1115 enable_symbols="yes"
1117 AC_MSG_RESULT([yes])
1119 ENABLE_DEBUG="FALSE"
1122 AC_SUBST(ENABLE_DEBUG)
1124 dnl ===================================================================
1125 dnl Set the ENABLE_DBGUTIL variable
1126 dnl ===================================================================
1127 AC_MSG_CHECKING([whether to build with additional debug utilities])
1128 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1132 AC_MSG_RESULT([yes])
1135 PROFULLSWITCH="product=full"
1137 AC_MSG_RESULT([no, full product build])
1140 AC_SUBST(PROFULLSWITCH)
1143 dnl ===================================================================
1144 dnl First setting is whether to include symbols into final build.
1145 dnl ===================================================================
1146 AC_MSG_CHECKING([whether to include symbols into final build])
1147 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
1148 if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
1149 ENABLE_SYMBOLS="TRUE"
1150 AC_MSG_RESULT([yes])
1152 if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
1153 ENABLE_SYMBOLS="SMALL"
1154 AC_MSG_RESULT([yes, small ones])
1155 else if test "$enable_symbols" != "no" ; then
1156 echo enable symbols is: $enable_symbols
1157 AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
1167 AC_SUBST(ENABLE_SYMBOLS)
1169 dnl ===================================================================
1170 dnl Determine if the solver is to be stripped or not.
1171 dnl ===================================================================
1172 AC_MSG_CHECKING([whether to strip the solver or not.])
1173 if test -n "$enable_strip_solver"; then
1174 if test "$enable_strip_solver" = "yes"; then
1176 else if test "$enable_strip_solver" = "no"; then
1177 DISABLE_STRIP="TRUE"
1179 AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
1183 if test -n "$ENABLE_SYMBOLS"; then
1184 DISABLE_STRIP="TRUE"
1189 AC_SUBST(DISABLE_STRIP)
1191 dnl ===================================================================
1193 dnl ===================================================================
1194 AC_MSG_CHECKING([whether to enable native CUPS support])
1195 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
1197 AC_MSG_RESULT([yes])
1202 AC_SUBST(ENABLE_CUPS)
1204 AC_MSG_CHECKING([whether to enable fontconfig support])
1205 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
1206 ENABLE_FONTCONFIG="TRUE"
1207 AC_MSG_RESULT([yes])
1209 ENABLE_FONTCONFIG=""
1212 AC_SUBST(ENABLE_FONTCONFIG)
1214 dnl ===================================================================
1215 dnl find external tarballs.
1216 dnl ===================================================================
1217 if test -z $TARFILE_LOCATION; then
1218 TARFILE_LOCATION="DEFAULT"
1220 AC_SUBST(TARFILE_LOCATION)
1222 if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \
1223 && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then
1224 DO_FETCH_TARBALLS="yes"
1226 AC_SUBST(DO_FETCH_TARBALLS)
1228 dnl ===================================================================
1229 dnl Disable legacy binary file formats filters
1230 dnl ===================================================================
1231 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
1232 if test "$enable_binfilter" = "no"; then
1236 WITH_BINFILTER="YES"
1237 BUILD_TYPE="$BUILD_TYPE BINFILTER"
1238 AC_MSG_RESULT([yes])
1240 AC_SUBST(WITH_BINFILTER)
1242 if test "$_os" = "WINNT"; then
1243 AC_MSG_CHECKING([whether to use DirectX])
1244 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
1245 ENABLE_DIRECTX="TRUE"
1246 AC_MSG_RESULT([yes])
1251 AC_SUBST(ENABLE_DIRECTX)
1253 AC_MSG_CHECKING([whether to use ActiveX])
1254 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
1256 AC_MSG_RESULT([yes])
1258 DISABLE_ACTIVEX="TRUE"
1261 AC_SUBST(DISABLE_ACTIVEX)
1263 AC_MSG_CHECKING([whether to use ATL])
1264 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
1266 AC_MSG_RESULT([yes])
1271 AC_SUBST(DISABLE_ATL)
1275 dnl ===================================================================
1276 dnl Disable rpath in shared libraries?
1277 dnl ===================================================================
1278 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
1279 if test "$enable_rpath" = "no"; then
1284 AC_MSG_RESULT([$ENABLE_RPATH])
1285 AC_SUBST(ENABLE_RPATH)
1287 dnl Test whether to include MySpell dictionaries
1288 dnl ===================================================================
1289 AC_MSG_CHECKING([whether to include MySpell dictionaries])
1290 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
1291 AC_MSG_RESULT([yes])
1292 WITH_MYSPELL_DICTS=YES
1293 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
1296 WITH_MYSPELL_DICTS=NO
1298 AC_SUBST(WITH_MYSPELL_DICTS)
1300 if test "$WITH_MYSPELL_DICTS" = "NO"; then
1301 AC_MSG_CHECKING([whether to use dicts from external paths])
1302 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
1303 AC_MSG_RESULT([yes])
1305 AC_MSG_CHECKING([for spelling dictionary directory])
1306 if test -n "$with_external_dict_dir"; then
1307 DICT_SYSTEM_DIR=file://$with_external_dict_dir
1309 DICT_SYSTEM_DIR=file:///usr/share/hunspell
1311 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
1312 AC_MSG_CHECKING([for hyphenation patterns directory])
1313 if test -n "$with_external_hyph_dir"; then
1314 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
1316 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
1318 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
1319 AC_MSG_CHECKING([for thesaurus directory])
1320 if test -n "$with_external_thes_dir"; then
1321 THES_SYSTEM_DIR=file://$with_external_thes_dir
1323 THES_SYSTEM_DIR=file:///usr/share/mythes
1325 AC_MSG_RESULT([$THES_SYSTEM_DIR])
1331 AC_SUBST(SYSTEM_DICTS)
1332 AC_SUBST(DICT_SYSTEM_DIR)
1333 AC_SUBST(HYPH_SYSTEM_DIR)
1334 AC_SUBST(THES_SYSTEM_DIR)
1336 if test $_os = "WINNT"; then
1337 AC_MSG_CHECKING([Windows build environment sanity])
1338 dnl ===================================================================
1339 dnl Sanity check! Native windows programs cannot use cygwin symlinks!
1340 dnl ===================================================================
1341 dnl As long as awk instead of $AWK is used somewhere in the sources,
1342 dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
1343 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
1344 AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
1345 Native windows programs cannot use cygwin symlinks. Remove the symbolic
1346 link, and copy the program to the name of the link.])
1348 dnl ===================================================================
1349 dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
1350 dnl CC and CXX but the configure checks here assume that guw.exe
1351 dnl (if needed at all) is not yet present.
1352 dnl ===================================================================
1353 CC=`echo $CC | $SED "s/^guw.exe //"`
1354 CXX=`echo $CXX | $SED "s/^guw.exe //"`
1355 dnl ===================================================================
1356 dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
1358 dnl ===================================================================
1359 if test -n "$CC";then
1360 if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
1364 dnl ===================================================================
1365 if test "$WITH_MINGWIN" = "yes" ; then
1366 if test -z "$CC"; then
1367 CC="gcc -mno-cygwin"
1368 CXX="g++ -mno-cygwin"
1373 AC_SUBST(WITH_MINGWIN)
1375 dnl ===================================================================
1376 dnl Extra check for Windows. cygwin builds need gcc to build dmake
1377 dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
1379 dnl ===================================================================
1380 if test "$_os" = "WINNT" ; then
1381 AC_MSG_CHECKING([for cygwin gcc/g++])
1382 if which gcc > /dev/null && which g++ > /dev/null ; then
1383 AC_MSG_RESULT([found])
1385 AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
1390 dnl ===================================================================
1391 dnl Check whether the bash shell can be used.
1392 dnl ===================================================================
1393 AC_PATH_PROG(SHELLPATH, bash)
1394 if test -z "$SHELLPATH"; then
1395 AC_MSG_ERROR([bash not found in \$PATH])
1397 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
1401 dnl ===================================================================
1402 dnl Checks for c compiler,
1403 dnl The check for the c++ compiler is later on.
1404 dnl ===================================================================
1405 AC_MSG_CHECKING([gcc home])
1406 if test -z "$with_gcc_home"; then
1407 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1409 GCC_HOME="$with_gcc_home"
1411 AC_MSG_RESULT($GCC_HOME)
1417 if test -n "$with_gcc_home"; then
1418 if test -z "$CC"; then
1419 CC="$with_gcc_home/bin/gcc"
1423 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1424 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1428 COMPATH=`dirname "$CC"`
1429 if test "$COMPATH" = "." ; then
1430 AC_PATH_PROGS(COMPATH, $CC)
1431 dnl double square bracket to get single because of M4 quote...
1432 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1434 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
1436 dnl ===================================================================
1437 dnl Test the gcc version, 3 is OK
1438 dnl ===================================================================
1440 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1441 AC_MSG_CHECKING([the GNU gcc compiler version])
1442 _gcc_version=`$CC -dumpversion`
1443 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
1444 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1446 if test "$_gcc_major" -lt "3"; then
1447 AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
1449 if test "$GCCVER" -eq "030203"; then
1450 if test "$ENABLE_SYMBOLS" = "SMALL"; then
1451 AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
1455 if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then
1456 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
1457 CC=$GCC_HOME/bin/gcc-4.0
1458 GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1459 if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
1463 if test "$GCCVER" -ge "040100" ; then
1464 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])
1466 AC_MSG_RESULT([implicitly using CC=$CC])
1469 AC_MSG_RESULT([checked (gcc $_gcc_version)])
1471 if test "$_os" = "SunOS"; then
1472 AC_MSG_CHECKING([gcc linker])
1473 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
1474 AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
1476 AC_MSG_RESULT([ok (GNU ld)])
1481 HAVE_LD_BSYMBOLIC_FUNCTIONS=
1482 if test "$GCC" = "yes"; then
1483 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
1484 bsymbolic_functions_ldflags_save=$LDFLAGS
1485 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
1486 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1489 printf ("hello world\n");
1490 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
1491 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
1492 AC_MSG_RESULT( found )
1494 AC_MSG_RESULT( not found )
1496 LDFLAGS=$bsymbolic_functions_ldflags_save
1498 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
1500 dnl ===================================================================
1501 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
1502 dnl ===================================================================
1503 AC_MSG_CHECKING([whether to enable pch feature])
1504 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
1505 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
1507 AC_MSG_RESULT([yes])
1508 dnl There is no PCH support in GCC versions prior to this
1509 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
1511 AC_MSG_RESULT([yes])
1514 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
1520 AC_SUBST(ENABLE_PCH)
1522 dnl ===================================================================
1523 dnl Set the NO_HIDS variable. (enable with --enable-hids)
1524 dnl ===================================================================
1525 AC_MSG_CHECKING([whether to enable hid list feature])
1526 if test -n "$enable_hids" && test "$enable_hids" != "no"; then
1528 AC_MSG_RESULT([yes])
1535 dnl ===================================================================
1536 dnl Search all the common names for GNU make
1537 dnl ===================================================================
1538 AC_MSG_CHECKING([for GNU make])
1539 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
1540 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1541 if test $? -eq 0; then
1546 AC_MSG_RESULT($GNUMAKE)
1547 if test -z "$GNUMAKE"; then
1548 AC_MSG_ERROR([not found. install GNU make.])
1551 AC_MSG_CHECKING([the GNU make version])
1552 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
1553 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1554 if test "$_make_longver" -ge "037901" ; then
1555 AC_MSG_RESULT([$GNUMAKE $_make_version])
1557 if test "$_os" = "Darwin"; then
1558 if test "$_make_longver" -ge "037900" ; then
1559 AC_MSG_RESULT([$GNUMAKE $_make_version])
1561 AC_MSG_WARN([failed ($GNUMAKE $_make_version need 3.79.0+)])
1564 AC_MSG_ERROR([failed ($GNUMAKE $_make_version need 3.79.1+)])
1569 dnl ===================================================================
1570 dnl Search all the common names for GNU tar
1571 dnl ===================================================================
1572 AC_MSG_CHECKING([for GNU tar])
1573 for a in $GNUTAR gtar gnutar tar; do
1574 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1575 if test $? -eq 0; then
1580 AC_MSG_RESULT($GNUTAR)
1581 if test -z "$GNUTAR"; then
1582 AC_MSG_ERROR([not found. install GNU tar.])
1587 dnl ===================================================================
1588 dnl Test the solaris compiler version
1589 dnl ===================================================================
1590 if test "$_os" = "SunOS"; then
1591 if test "$CC" = "cc"; then
1592 AC_PATH_PROGS(_cc, cc)
1593 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
1594 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
1595 dnl cc -V outputs to standard error!!!!
1596 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
1597 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
1598 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
1599 if test "$_sunstudio_major" != "5"; then
1600 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1602 _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" }'`
1603 if test "$_sunstudio_minor" = "false"; then
1604 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1606 dnl compiler will do
1607 AC_MSG_RESULT([checked])
1613 if test "$GCC" = "yes"; then
1614 AC_MSG_CHECKING( for --hash-style=both linker support )
1615 hash_style_ldflags_save=$LDFLAGS
1616 LDFLAGS="$LDFLAGS -Wl,--hash-style=both"
1617 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1620 printf ("hello world\n");
1621 ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
1622 if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
1623 AC_MSG_RESULT( found )
1625 AC_MSG_RESULT( not found )
1627 LDFLAGS=$hash_style_ldflags_save
1629 AC_SUBST(HAVE_LD_HASH_STYLE)
1631 dnl ===================================================================
1632 dnl Test the Compaq compiler for OSF1
1633 dnl ===================================================================
1634 if test "$_os" = "OSF1"; then
1635 if test "$CC" = "cc"; then
1636 AC_PATH_PROGS(_cc, cc)
1637 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
1638 AC_MSG_WARN([******* $_cc , $COMPATH])
1639 AC_MSG_CHECKING([the Compaq C compiler version])
1640 dnl cc -V outputs to standard error!!!!
1641 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
1642 _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
1643 if test "$_compaqc_major" != "T6"; then
1644 AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
1646 dnl compiler will do
1647 AC_MSG_RESULT([checked])
1652 dnl ===================================================================
1653 dnl Check whether there's a Perl version available.
1654 dnl ===================================================================
1655 if test -z "$with_perl_home"; then
1656 AC_PATH_PROG(PERL, perl)
1658 if test "$_os" = "WINNT"; then
1659 with_perl_home=`cygpath -u "$with_perl_home"`
1661 _perl_path="$with_perl_home/bin/perl"
1662 if test -x "$_perl_path"; then
1665 AC_MSG_ERROR([$_perl_path not found])
1669 dnl ===================================================================
1670 dnl Testing for Perl version 5 or greater.
1671 dnl $] is the perl version variable, it is returned as an integer
1672 dnl ===================================================================
1673 if test "$PERL"; then
1674 AC_MSG_CHECKING([the Perl version])
1675 ${PERL} -e "exit($]);"
1677 if test "$_perl_version" -lt 5; then
1678 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
1680 AC_MSG_RESULT([checked (perl $_perl_version)])
1682 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
1686 dnl ===================================================================
1687 dnl Testing for required Perl modules
1688 dnl ===================================================================
1689 AC_MSG_CHECKING([for required Perl modules])
1690 if `$PERL -e 'use Archive::Zip;'`; then
1691 AC_MSG_RESULT([all modules found])
1693 AC_MSG_ERROR([Failed to find some modules])
1696 dnl ===================================================================
1697 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
1698 dnl ===================================================================
1699 if test "$_os" = "WINNT"; then
1700 if test "$WITH_MINGWIN" != "yes"; then
1701 AC_MSG_CHECKING([for friendly registry keys])
1702 # VS.Net 2003, VS.Net 2005
1703 if test -z "$with_cl_home"; then
1704 vctest=`./oowintool --msvc-productdir`;
1705 if test -x "$vctest/bin/cl.exe"; then
1706 with_cl_home=$vctest;
1709 with_cl_home=`cygpath -u "$with_cl_home"`
1711 AC_MSG_RESULT([done])
1713 dnl ===========================================================
1714 dnl Check for mspdb71.dll/mspdb80.dll
1715 dnl ===========================================================
1716 dnl .NET 2003/5/8 Compiler
1717 if test -n "$with_mspdb_path";then
1718 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
1720 if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
1721 MSPDB_PATH="$with_mspdb_path"
1724 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
1725 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1727 dnl .NET 2005/2008 case
1728 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
1729 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1731 dnl Windows SDK 6.0 case
1732 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
1733 MSPDB_PATH="$with_cl_home/bin"
1736 if test -z "$MSPDB_PATH";then
1737 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
1738 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
1739 AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
1740 MSPDB_PATH=`dirname "$MSPDB_PATH"`
1743 if test -z "$MSPDB_PATH"; then
1744 AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
1746 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
1747 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
1748 dnl The path needs to be added before cl is called
1749 PATH="$MSPDB_PATH:$PATH"
1751 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
1752 if test -x "$with_cl_home/bin/cl.exe"; then
1753 CC="$with_cl_home/bin/cl.exe"
1755 AC_PATH_PROG(CC, cl.exe)
1757 if test -e "$CC"; then
1758 # This gives us a posix path with 8.3 filename restrictions
1759 CC=`cygpath -d "$CC"`
1760 CC=`cygpath -u "$CC"`
1761 # Remove /cl.exe from CC case insensitive
1762 AC_MSG_RESULT([found ($CC)])
1763 COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
1764 export INCLUDE=`cygpath -d "$COMPATH/Include"`
1765 dnl Check which Microsoft C/C++ compiler is found
1766 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
1767 dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
1768 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
1769 x = match( \\\$0, /..\\...\\...../ )
1770 CCversion = substr( \\\$0, RSTART, RLENGTH)
1771 tokencount = split (CCversion,vertoken,\".\")
1772 for ( i = 1 ; i <= tokencount ; i++ ) {
1773 printf (\"%04d\",vertoken[[i]] )
1776 AC_MSG_RESULT([found Compiler version $CCNUMVER.])
1777 if test "$CCNUMVER" -ge "001500000000"; then
1780 AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
1781 elif test "$CCNUMVER" -ge "001400000000"; then
1784 AC_MSG_RESULT([found .NET 2005.])
1785 elif test "$CCNUMVER" -ge "001300102240"; then
1788 AC_MSG_RESULT([found .NET 2003.])
1790 AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
1793 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
1796 AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
1797 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
1798 AC_MSG_RESULT([found.])
1799 if $CC -dumpspecs | grep -q "mno-cygwin"; then
1802 USE_MINGW="pure-mingw"
1805 AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
1810 AC_SUBST(MSPDB_PATH)
1813 dnl ===================================================================
1814 dnl .NET needs special treatment
1815 dnl ===================================================================
1816 if test "$_os" = "WINNT"; then
1817 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
1819 AC_PATH_PROG(MIDL_PATH, midl.exe)
1820 if test -n "$MIDL_PATH";then
1821 MIDL_PATH=`dirname "$MIDL_PATH"`
1823 if test -n "$with_midl_path";then
1824 with_midl_path=`cygpath -u "$with_midl_path"`
1826 if test -x "$with_midl_path/midl.exe"; then
1827 MIDL_PATH="$with_midl_path"
1829 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
1830 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
1832 if test -z "$MIDL_PATH" ; then
1833 vstest=`./oowintool --msvs-productdir`;
1834 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
1835 MIDL_PATH="$vstest/Common7/Tools/Bin"
1838 if test -z "$MIDL_PATH" ; then
1839 psdktest=`./oowintool --psdk-home`
1840 if test -x "$psdktest/Bin/midl.exe" ; then
1841 MIDL_PATH="$psdktest/Bin"
1844 if test ! -x "$MIDL_PATH/midl.exe"; then
1845 AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
1847 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1848 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
1849 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
1852 AC_PATH_PROG(CSC_PATH, csc.exe)
1853 if test -n "$CSC_PATH";then
1854 CSC_PATH=`dirname "$CSC_PATH"`
1856 if test -n "$with_csc_path";then
1857 with_csc_path=`cygpath -u "$with_csc_path"`
1859 if test -x "$with_csc_path/csc.exe"; then
1860 CSC_PATH="$with_csc_path"
1862 csctest=`./oowintool --csc-compilerdir`;
1863 if test -x "$csctest/csc.exe"; then
1867 if test ! -x "$CSC_PATH/csc.exe"; then
1868 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
1870 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1871 CSC_PATH=`cygpath -d "$CSC_PATH"`
1872 CSC_PATH=`cygpath -u "$CSC_PATH"`
1874 dnl Check mscoree.lib / .NET Frameworks dir
1875 dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
1876 AC_MSG_CHECKING(.NET Framework)
1877 if test -n "$with_frame_home"; then
1878 with_frame_home=`cygpath -u "$with_frame_home"`
1880 if test -f "$with_frame_home/lib/mscoree.lib"; then
1881 FRAME_HOME="$with_frame_home"
1883 if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
1884 FRAME_HOME="$with_cl_home/../SDK/v1.1"
1886 if test -z "$FRAME_HOME" ; then
1887 frametest=`./oowintool --dotnetsdk-dir`
1888 if test -f "$frametest/lib/mscoree.lib"; then
1889 FRAME_HOME="$frametest"
1891 frametest=`./oowintool --psdk-home`
1892 if test -f "$frametest/lib/mscoree.lib"; then
1893 FRAME_HOME="$frametest"
1897 if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
1898 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
1900 AC_MSG_RESULT(found)
1901 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1902 FRAME_HOME=`cygpath -d "$FRAME_HOME"`
1903 FRAME_HOME=`cygpath -u "$FRAME_HOME"`
1907 AC_SUBST(FRAME_HOME)
1910 dnl ===================================================================
1911 dnl Check if stdc headers are available excluding windows.
1912 dnl ===================================================================
1913 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1917 dnl ===================================================================
1918 dnl Find pre-processors.
1919 dnl ===================================================================
1920 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1923 dnl Check whether there's a C pre-processor.
1924 dnl ===================================================================
1925 dnl When using SunStudio compiler, there is a bug with the cc
1926 dnl preprocessor, so use CC preprocessor as the cc preprocessor
1927 dnl See Issuezilla #445.
1928 dnl ===================================================================
1929 if test "$_os" = "SunOS"; then
1936 AC_CHECK_SIZEOF(long)
1937 SIZEOF_LONG=$ac_cv_sizeof_long
1938 AC_SUBST(SIZEOF_LONG)
1940 WORDS_BIGENDIAN=$ac_cv_c_bigendian
1941 AC_SUBST(WORDS_BIGENDIAN)
1943 dnl Check for large file support
1945 if test -n "$ac_cv_sys_file_offset_bits"; then
1946 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1948 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
1949 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
1951 AC_SUBST(LFS_CFLAGS)
1953 dnl ===================================================================
1954 dnl Check if we are to enable vba macro interoperability feature
1955 dnl ===================================================================
1956 AC_MSG_CHECKING([whether to disable vba feature])
1957 if test -n "$enable_vba" && test "$enable_vba" = "no"; then
1958 AC_MSG_RESULT([yes])
1964 AC_SUBST(ENABLE_VBA)
1966 if test "$ENABLE_VBA" = "YES"; then
1967 AC_MSG_CHECKING([how to package the vba compatibility api])
1968 if test -n "$with_vba_package_format"; then
1969 if test "$with_vba_package_format" = "extn"; then
1971 AC_MSG_RESULT([uno extension])
1972 AC_MSG_WARN([--with-vba-package-format=extn can cause problems])
1973 else if test "$with_vba_package_format" = "builtin"; then
1975 AC_MSG_RESULT([build into installset])
1977 AC_MSG_ERROR([unknown packaging method])
1983 AC_MSG_RESULT([defaulting to build into installset])
1988 AC_SUBST(VBA_EXTENSION)
1990 dnl ===================================================================
1991 dnl Check the whether vba need to be delivered as an uno package or part
1993 dnl ===================================================================
1996 dnl ===================================================================
1997 dnl Check if cups/cups.h is available
1998 dnl ===================================================================
1999 if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
2000 AC_CHECK_HEADER(cups/cups.h, [],
2001 [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
2004 dnl ===================================================================
2005 dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
2006 dnl ===================================================================
2007 if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
2008 AC_MSG_CHECKING([whether to enable pam support])
2009 if test -z "$enable_pam" || test "$enable_pam" != "no"; then
2010 AC_MSG_RESULT([yes])
2012 AC_CHECK_HEADER(security/pam_appl.h, [],
2013 [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
2014 AC_MSG_CHECKING([whether to link to libpam])
2015 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
2016 AC_MSG_RESULT([yes])
2018 AC_CHECK_LIB(pam, pam_start, [],
2019 [AC_MSG_ERROR(libpam not found or functional)], [])
2021 AC_MSG_RESULT([no, dynamically open it])
2028 dnl check getspnam_r for needed args (4 or 5)
2029 AX_FUNC_WHICH_GETSPNAM_R
2033 AC_SUBST(NEW_SHADOW_API)
2036 if test "$_os" = "Linux"; then
2037 AC_MSG_CHECKING([whether to link to libcrypt])
2038 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
2039 AC_MSG_RESULT([yes])
2041 AC_CHECK_LIB(crypt, crypt, [],
2042 [AC_MSG_ERROR(libcrypt not found or functional)], [])
2044 AC_MSG_RESULT([no, dynamically open it])
2048 AC_SUBST(CRYPT_LINK)
2050 dnl ===================================================================
2051 dnl Testing for c++ compiler and version...
2052 dnl ===================================================================
2053 if test -n "$with_gcc_home"; then
2054 if test -z "$CXX"; then
2055 CXX="$with_gcc_home/bin/g++"
2059 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2060 if test -e "$CC"; then
2065 dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
2066 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2070 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
2071 if test "$GXX" = "yes"; then
2072 AC_MSG_CHECKING([the GNU C++ compiler version])
2074 _gpp_version=`$CXX -dumpversion`
2075 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
2077 if test "$_os" = "Darwin" -a "$_gpp_majmin" -ge "401" ; then
2078 if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
2079 CXX=$GCC_HOME/bin/g++-4.0
2080 _gpp_majmin_2=`"$CXX" -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
2081 if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
2082 _gpp_majmin=$_gpp_majmin_2
2085 if test "$_gpp_majmin" -ge "401" ; then
2086 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])
2088 AC_MSG_RESULT([implicitly using CXX=$CXX])
2091 AC_MSG_RESULT([checked (g++ $_gpp_version)])
2094 if test "$_gpp_majmin" = "304"; then
2095 AC_MSG_CHECKING([whether $CXX has the enum bug])
2097 extern "C" void abort (void);
2098 extern "C" void exit (int status);
2100 enum E { E0, E1, E2, E3, E4, E5 };
2105 if (e == E2 || e == E3 || e == E1)
2117 ],[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])])
2121 dnl ===================================================================
2122 dnl Set the gcc/gxx include directories
2123 dnl ===================================================================
2124 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
2125 # often contains an i386 which is expanded as a macro. Solved in stlport.
2126 if test "$GXX" = "yes"; then
2127 AC_MSG_CHECKING([for g++ include path])
2128 if test -z "$with_gxx_include_path"; then
2129 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
2130 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
2131 with_gxx_include_path="/usr/include"
2133 if test "$WITH_MINGWIN" = "yes"; then
2134 with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
2135 with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
2137 if echo $with_gxx_include_path | grep -q linux; then
2138 # workaround for Mandriva - issue 100049
2139 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
2143 dnl This is the original code...
2144 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
2145 if test -z "$with_gxx_include_path"; then
2146 with_gxx_include_path="NO_GXX_INCLUDE"
2147 AC_MSG_RESULT([no g++ includes])
2149 AC_MSG_RESULT([$with_gxx_include_path])
2151 GXX_INCLUDE_PATH="$with_gxx_include_path"
2152 AC_SUBST(GXX_INCLUDE_PATH)
2154 dnl ===================================================================
2155 dnl Set the mingw runtime library include directories
2156 dnl ===================================================================
2157 if test "$WITH_MINGWIN" = "yes"; then
2158 AC_MSG_CHECKING([for mingwin runtime include path])
2159 cat >conftest.$ac_ext <<_ACEOF
2161 #include <bits/c++config.h>
2163 _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`
2165 if test -n "$_mingw_lib_include_path"; then
2167 for a in $_mingw_lib_include_path
2170 _temp="$_temp "`cygpath -u "$a"`
2172 _mingw_lib_include_path=$_temp
2174 if test -z "$_mingw_lib_include_path"; then
2175 _mingw_lib_include_path="NO_LIB_INCLUDE"
2176 AC_MSG_RESULT([no mingwin runtime includes])
2178 AC_MSG_RESULT([$_mingw_lib_include_path])
2180 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
2181 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
2182 dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map
2183 AC_MSG_CHECKING([for mingwin c++ backward include path])
2184 cat >conftest.$ac_ext <<_ACEOF
2187 _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`
2189 if test -n "$_mingw_backward_include_path"; then
2190 _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path`
2191 _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path`
2192 AC_MSG_RESULT([$_mingw_backward_include_path])
2194 _mingw_backward_include_path="NO_BACKWARD_INCLUDE"
2195 AC_MSG_RESULT([no mingwin c++ backward includes])
2197 MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path"
2198 AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH)
2199 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
2200 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
2201 AC_MSG_CHECKING([whether to use dynamic libgcc])
2202 if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then
2203 AC_MSG_CHECKING([dynamic libgcc name])
2204 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'`
2205 MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null`
2206 if test -n "$MINGW_GCCDLL"; then
2207 MINGW_SHARED_GCCLIB=YES
2208 AC_MSG_RESULT([use $MINGW_GCCDLL])
2215 if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then
2218 AC_MSG_CHECKING([whether to use dynamic libstdc++])
2219 if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then
2220 AC_MSG_CHECKING([dynamic libstdc++ name])
2221 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'`
2222 MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null`
2223 if test -n "$MINGW_GXXDLL"; then
2224 MINGW_SHARED_GXXLIB=YES
2225 AC_MSG_RESULT([use $MINGW_GXXDLL])
2232 MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR`
2233 AC_SUBST(MINGW_CLIB_DIR)
2234 AC_SUBST(MINGW_SHARED_GCCLIB)
2235 AC_SUBST(MINGW_GCCLIB_EH)
2236 AC_SUBST(MINGW_SHARED_GXXLIB)
2237 AC_SUBST(MINGW_GCCDLL)
2238 AC_SUBST(MINGW_GXXDLL)
2241 dnl ===================================================================
2242 dnl Extra checking for the SUN OS compiler
2243 dnl ===================================================================
2244 if test "$_os" = "SunOS"; then
2245 dnl SunStudio C++ compiler packaged with SunStudio C compiler
2246 if test "$CC" = "cc"; then
2247 AC_MSG_CHECKING([SunStudio C++ Compiler])
2248 if test "$CXX" != "CC"; then
2249 AC_MSG_WARN([SunStudio C++ was not found])
2250 echo "SunStudio C++ was not found" >> warn
2252 AC_MSG_RESULT([checked])
2256 dnl ===================================================================
2257 dnl Extra checking for the OSF compiler
2258 dnl ===================================================================
2259 if test "$_os" = "OSF1"; then
2260 AC_MSG_CHECKING([Compaq C++ compiler version])
2261 dnl cxx -V outputs to standard error!!!!
2262 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
2263 _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
2264 if test "$_compaqcxx_major" != "V6"; then
2265 AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
2266 echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
2268 dnl compiler will do
2269 AC_MSG_RESULT([checked])
2273 dnl *************************************************************
2274 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
2275 dnl *************************************************************
2276 AC_MSG_CHECKING([exception type])
2278 if test "$WITH_MINGWIN" = "yes"; then
2280 [#include <iostream>
2282 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
2285 [_Unwind_SjLj_RaiseException() ],
2286 [exceptions_type="sjlj"],
2287 [exceptions_type="dwarf2"]
2291 AC_MSG_RESULT($exceptions_type)
2293 EXCEPTIONS="$exceptions_type"
2294 AC_SUBST(EXCEPTIONS)
2296 dnl **************************************************************
2297 dnl Testing for required Solaris and SunStudio compiler patches...
2298 dnl **************************************************************
2299 dnl Check whether the OS is SunOS.
2300 if test "$_os" = "SunOS"; then
2301 _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
2302 if test "$_os_release" = "7"; then
2306 AC_MSG_CHECKING([for patch 106327-06 or greater])
2307 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
2311 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2312 if test "$_patch_major" = "106327"; then
2313 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2314 if test "$_patch_rev" -ge "6"; then
2319 if test "$_patch" = "found"; then
2320 AC_MSG_RESULT([found])
2322 AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
2323 echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
2328 AC_MSG_CHECKING([for patch 106950-11 or greater])
2329 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
2333 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2334 if test "$_patch_major" = "106950"; then
2335 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2336 if test "$_patch_rev" -ge "11"; then
2341 if test "$_patch" = "found"; then
2342 AC_MSG_RESULT([found])
2344 AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
2345 echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
2348 if test "$_os_release" = "6"; then
2352 AC_MSG_CHECKING([for patch 105591-09 or greater])
2353 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
2357 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2358 if test "$_patch_major" = "105591"; then
2359 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2360 if test "$_patch_rev" -ge "9"; then
2365 if test "$_patch" = "found"; then
2366 AC_MSG_RESULT([found])
2368 AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
2369 echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
2374 AC_MSG_CHECKING([for patch 107733-08 or greater])
2375 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
2379 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2380 if test "$_patch_major" = "107733"; then
2381 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2382 if test "$_patch_rev" -ge "8"; then
2387 if test "$_patch" = "found"; then
2388 AC_MSG_RESULT([found])
2390 AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
2391 echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
2397 dnl ===================================================================
2398 dnl Checks for what the default STL should be
2399 dnl ===================================================================
2400 AC_MSG_CHECKING([what the default STL should be])
2401 DEFAULT_TO_STLPORT="no"
2402 if test "$_os" = "Linux"; then
2403 case "$build_cpu" in
2405 case "$build_os" in k*bsd*-gnu*)
2406 DEFAULT_TO_STLPORT="no"
2409 DEFAULT_TO_STLPORT="yes"
2414 DEFAULT_TO_STLPORT="no"
2417 elif test "$_os" = "SunOS"; then
2418 DEFAULT_TO_STLPORT="yes"
2419 elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2420 DEFAULT_TO_STLPORT="yes"
2421 elif test "$_os" = "OS2"; then
2422 DEFAULT_TO_STLPORT="yes"
2423 elif test "$_os" = "FreeBSD"; then
2424 DEFAULT_TO_STLPORT="yes"
2426 if test "$DEFAULT_TO_STLPORT" = "yes"; then
2427 AC_MSG_RESULT([stlport])
2429 AC_MSG_RESULT([system])
2431 if test "$WITH_STLPORT" = "auto"; then
2432 WITH_STLPORT=$DEFAULT_TO_STLPORT
2435 dnl ===================================================================
2436 dnl Checks for STLPORT
2437 dnl ===================================================================
2438 AC_MSG_CHECKING([for STL providing headers])
2441 if test "$WITH_STLPORT" = "yes"; then
2442 AC_MSG_RESULT([using internal stlport.])
2443 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2444 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2445 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2447 elif test "$WITH_STLPORT" = "no"; then
2448 AC_MSG_RESULT([using system STL])
2449 USE_SYSTEM_STL="YES"
2450 if test "$DEFAULT_TO_STLPORT" != "no"; then
2451 AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
2452 echo "using system STL. Warning, breaks your ABI compatability!" >>warn
2455 STLPORT4=$WITH_STLPORT
2456 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2457 AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
2459 dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
2460 if test -f "$STLPORT4/stlport/hash_map"; then
2461 AC_MSG_RESULT([checked.])
2463 AC_MSG_ERROR([STLport headers not found.])
2466 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2467 AC_MSG_CHECKING([for STLport libraries])
2468 if test "$_os" = "SunOS"; then
2469 if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
2470 AC_MSG_RESULT([checked])
2471 elif test -f "$STLPORT4/lib/libstlport.so"; then
2472 AC_MSG_RESULT([checked])
2475 AC_MSG_ERROR([STLport libraries not found])
2477 elif test "$_os" = "Darwin"; then
2478 if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
2479 AC_MSG_RESULT([checked])
2480 elif test -f "$STLPORT4/lib/libstlport.dylib"; then
2481 AC_MSG_RESULT([checked])
2484 AC_MSG_ERROR([STLport libraries not found])
2487 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2488 AC_MSG_RESULT([checked])
2489 elif test -f "$STLPORT4/lib/libstlport.so"; then
2490 AC_MSG_RESULT([checked])
2493 AC_MSG_ERROR([STLport libraries not found])
2497 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2498 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2499 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2503 if test -z "$STLPORT4"; then
2504 STLPORT4="NO_STLPORT4"
2506 if test -z "$STLPORT_VER"; then
2510 AC_SUBST(STLPORT_VER)
2511 AC_SUBST(USE_SYSTEM_STL)
2513 dnl ===================================================================
2514 dnl visibility feature
2515 dnl ===================================================================
2516 if test "$GCC" = "yes"; then
2517 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
2519 CFLAGS="$CFLAGS -fvisibility=hidden"
2520 AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
2522 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2523 AC_MSG_RESULT([yes])
2529 # ===================================================================
2530 # use --ccache-skip?
2531 # ===================================================================
2532 dnl used to escape compiler options for ccache that otherwise prevent
2533 dnl caching of the results (like "-x objective-c++" for Mac)
2534 AC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip])
2535 if test "$_os" != "Darwin" ; then
2536 AC_MSG_RESULT([only used on Mac currently, skipping])
2537 elif test "$enable_ccache_skip" = "no" ; then
2538 AC_MSG_RESULT([no - diabled explicitly])
2539 elif test "$enable_ccache_skip" = "yes" ; then
2540 AC_MSG_RESULT([yes - enabled explicitly, skipping checks])
2541 AC_SUBST([USE_CCACHE], [YES])
2542 elif test "$enable_ccache_skip" = "auto" ; then
2543 # checking for ccache presence/version
2544 AC_MSG_RESULT([probing...])
2545 AC_PATH_PROG([CCACHE],[ccache],[not_found])
2546 if test "$CCACHE" = "not_found" ; then
2547 AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)])
2549 # check ccache version
2550 AC_MSG_CHECKING([whether version of ccache is suitable])
2551 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2552 if test "$CCACHE_VERSION" = "2.4_OOo"; then
2553 AC_MSG_RESULT([yes])
2554 AC_MSG_CHECKING([whether ccache is actually used for the build])
2556 save_CXXFLAGS=$CXXFLAGS
2557 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
2558 dnl an empty program will do, we're checking the compiler flags
2559 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),
2560 [use_ccache=yes], [use_ccache=no])
2561 if test $use_ccache = yes ; then
2562 AC_MSG_RESULT([yes, will enable --ccache-skip])
2563 AC_SUBST([USE_CCACHE], [YES])
2565 AC_MSG_RESULT([no, will not enable --ccache-skip])
2567 CXXFLAGS=$save_CXXFLAGS
2571 AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip])
2575 AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"])
2578 dnl ===================================================================
2579 dnl system stl sanity tests
2580 dnl ===================================================================
2581 if test "$USE_SYSTEM_STL" = "YES"; then
2582 AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
2585 AC_TRY_COMPILE([#include <ext/hash_map>
2586 using namespace __gnu_cxx;
2587 ],[hash_map<int, int> t; return 0;],
2588 ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
2590 if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
2591 AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
2593 AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
2596 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2597 AC_MSG_CHECKING([if STL headers are visibility safe])
2598 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
2599 AC_MSG_RESULT([$stlvisok])
2600 if test "$stlvisok" = "no"; then
2601 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
2602 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
2603 unset HAVE_GCC_VISIBILITY_FEATURE
2607 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2608 sharedlink_ldflags_save=$LDFLAGS
2609 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
2611 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
2612 AC_TRY_LINK([#include <sstream>
2613 using namespace std;
2614 ],[istringstream strm( "test" ); return 0;],
2615 $EGREP -q unresolvable conftest.err;
2616 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
2618 AC_MSG_RESULT([$gccvisok])
2619 if test "$gccvisok" = "no"; then
2620 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility])
2621 echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn
2622 unset HAVE_GCC_VISIBILITY_FEATURE
2625 LDFLAGS=$sharedlink_ldflags_save
2628 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2629 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
2630 cat >visibility.cxx <<_ACEOF
2631 #pragma GCC visibility push(hidden)
2632 struct __attribute__ ((visibility ("default"))) TestStruct {
2635 __attribute__ ((visibility ("default"))) void TestFunc() {
2639 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
2642 case "$build_cpu" in
2644 if $EGREP -q '@PLT' visibility.s; then
2657 AC_MSG_RESULT([$gccvisbroken])
2658 if test "$gccvisbroken" = "yes"; then
2659 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
2660 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
2661 unset HAVE_GCC_VISIBILITY_FEATURE
2668 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
2670 dnl ===================================================================
2672 dnl ===================================================================
2673 AC_MSG_CHECKING([which memory allocator to use])
2674 if test "$with_alloc" = "system"; then
2675 AC_MSG_RESULT([system])
2677 AC_CHECK_FUNCS([malloc realloc calloc free])
2679 if test "$with_alloc" = "tcmalloc"; then
2680 AC_MSG_RESULT(tcmalloc)
2681 if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
2682 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
2684 AC_CHECK_LIB(tcmalloc, malloc, [],
2685 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
2688 if test "$with_alloc" = "jemalloc"; then
2689 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
2690 AC_MSG_RESULT(jemalloc)
2692 CFLAGS="$CFLAGS -pthread"
2693 AC_CHECK_LIB(jemalloc, malloc, [],
2694 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
2698 AC_MSG_RESULT([system])
2700 AC_CHECK_FUNCS([malloc realloc calloc free])
2703 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
2704 AC_MSG_RESULT([internal])
2708 dnl ===================================================================
2709 dnl Custom build version
2710 dnl ===================================================================
2712 AC_MSG_CHECKING([whether to add custom build version])
2713 if test "z$with_build_version" != "z"; then
2714 BUILD_VER_STRING=$with_build_version
2715 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
2720 AC_SUBST(BUILD_VER_STRING)
2722 dnl ===================================================================
2723 dnl Java support enable
2724 dnl ===================================================================
2725 AC_MSG_CHECKING([whether to build with Java support])
2726 if test "$WITH_JAVA" != "no"; then
2727 AC_MSG_RESULT([yes])
2733 AC_MSG_WARN([building without java will mean some features will not be available])
2734 echo "building without java will mean some features will not be available" >>warn
2736 AC_SUBST(SOLAR_JAVA)
2738 if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
2739 # IBMs JDK needs this...
2740 JITC_PROCESSOR_TYPE=6
2741 export JITC_PROCESSOR_TYPE
2744 if test "$_os" = "WINNT"; then
2745 if test -z "$with_jdk_home"; then
2746 _jdk_home=`./oowintool --jdk-home`
2747 if test -d "$_jdk_home"; then
2748 with_jdk_home="$_jdk_home"
2751 with_jdk_home=`cygpath -u "$with_jdk_home"`
2755 dnl ===================================================================
2757 dnl ===================================================================
2758 if test "$SOLAR_JAVA" != ""; then
2759 JAVA_HOME=; export JAVA_HOME
2760 if test -z "$with_jdk_home"; then
2761 AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
2763 _java_path="$with_jdk_home/bin/$WITH_JAVA"
2764 dnl Check if there is a java interpreter at all.
2765 if test -x "$_java_path"; then
2766 JAVAINTERPRETER=$_java_path
2768 AC_MSG_ERROR([$_java_path not found set with_jdk_home])
2771 if test "$_os" = "WINNT"; then
2772 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
2773 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
2775 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
2776 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
2777 elif test "$_os" = "Darwin"; then
2778 dnl HACK: There currently is only a 32 bit version of OOo for Mac OS X,
2779 dnl and Tiger java complains about -d32 while Snow Leopard java needs it
2780 dnl to run in 32 bit mode and be able to load OOo jnilibs:
2781 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
2782 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
2783 AC_MSG_RESULT([yes])
2791 dnl ===================================================================
2793 dnl ===================================================================
2794 if test "$SOLAR_JAVA" != ""; then
2796 AC_MSG_CHECKING([the installed JDK])
2797 if test -n "$JAVAINTERPRETER"; then
2798 dnl java -version sends output to stderr!
2799 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2800 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2801 # dnl Kaffe specific tests
2802 # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
2803 # if test -z "$KAFFE_VER"; then
2804 # AC_MSG_ERROR([looks like Kaffe but version detection failed])
2806 # _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2807 # if test "$_kaffe_ver" -lt 10100; then
2808 # AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
2812 # dnl TODO: define some project exclusion variables
2814 # AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
2815 # AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
2816 # echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
2817 # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2818 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
2820 AC_MSG_RESULT([checked (gcj)])
2821 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2822 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2824 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
2825 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2828 # dnl BEA 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([JDK is too old, you need at least BEA JDK 1.5.0])
2836 # AC_MSG_RESULT([checked (BEA JDK $_jdk)])
2838 # if test "$with_jdk_home" = ""; then
2839 # AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
2840 #you must use the "--with-jdk-home" configure option explicitly])
2843 # AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
2844 # echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
2846 # JAVA_HOME=$with_jdk_home
2848 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
2851 dnl IBM JDK specific tests
2852 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2853 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2855 if test "$_jdk_ver" -lt 10500; then
2856 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
2859 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
2861 if test "$with_jdk_home" = ""; then
2862 AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
2863 you must use the "--with-jdk-home" configure option explicitly])
2866 JAVA_HOME=$with_jdk_home
2871 dnl SUN JDK specific tests
2872 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2873 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2875 if test "$_jdk_ver" -lt 10500; then
2876 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
2878 AC_MSG_RESULT([checked (JDK $_jdk)])
2879 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2880 if test "$_os" = "WINNT"; then
2881 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2883 if test "$_os" = "OS2"; then
2884 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2888 AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
2892 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
2895 dnl ===================================================================
2896 dnl Checks for javac
2897 dnl ===================================================================
2898 if test "$SOLAR_JAVA" != ""; then
2899 if test "$JDK" = "gcj"; then
2900 javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
2902 javacompiler="javac"
2904 if test "$_os" = "OS2"; then
2905 if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
2906 javacompiler="${javacompiler}.exe"
2909 if test -z "$with_jdk_home"; then
2910 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
2912 _javac_path="$with_jdk_home/bin/$javacompiler"
2913 dnl Check if there is a java compiler at all.
2914 if test -x "$_javac_path"; then
2915 JAVACOMPILER=$_javac_path
2918 if test -z "$JAVACOMPILER"; then
2919 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
2921 if test "$_os" = "WINNT"; then
2922 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2923 JAVACOMPILER="${JAVACOMPILER}.exe"
2925 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
2926 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
2928 if test "$_os" = "OS2"; then
2929 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2930 JAVACOMPILER="${JAVACOMPILER}.exe"
2934 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
2935 AC_MSG_CHECKING([re-checking JDK])
2937 AC_MSG_RESULT([checked (ecj)])
2938 #TODO: what's to do here? some switch to do 1.5 compiling?
2939 JAVAFLAGS="-source 1.5 -target 1.5"
2940 _gij_longver="40200"
2945 dnl ===================================================================
2946 dnl Checks that javac is gcj
2947 dnl ===================================================================
2948 if test "$SOLAR_JAVA" != ""; then
2949 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
2953 AC_SUBST(JAVACISGCJ)
2955 dnl ===================================================================
2956 dnl Checks for javadoc
2957 dnl ===================================================================
2958 if test "$SOLAR_JAVA" != ""; then
2959 if test -z "$with_jdk_home"; then
2960 AC_PATH_PROG(JAVADOC, javadoc)
2962 _javadoc_path="$with_jdk_home/bin/javadoc"
2963 if test "$_os" = "OS2"; then
2964 if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
2965 _javadoc_path="${_javadoc_path}.exe"
2968 dnl Check if there is a javadoc at all.
2969 if test -x "$_javadoc_path"; then
2970 JAVADOC=$_javadoc_path
2972 AC_PATH_PROG(JAVADOC, javadoc)
2975 if test -z "$JAVADOC"; then
2976 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
2978 if test "$_os" = "WINNT"; then
2979 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2980 JAVADOC="${JAVADOC}.exe"
2982 JAVADOC=`cygpath -d "$JAVADOC"`
2983 JAVADOC=`cygpath -u "$JAVADOC"`
2985 if test "$_os" = "OS2"; then
2986 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2987 JAVADOC="${JAVADOC}.exe"
2992 if test "$SOLAR_JAVA" != ""; then
2993 dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
2994 if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then
2995 if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then
2996 cat > findhome.java <<_ACEOF
2997 [import java.io.File;
3001 public static void main(String args[])
3003 String jrelocation = System.getProperty("java.home");
3004 File jre = new File(jrelocation);
3005 System.out.println(jre.getParent());
3009 AC_MSG_CHECKING([if javac works])
3010 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
3011 AC_TRY_EVAL(javac_cmd)
3012 if test $? = 0 && test -f ./findhome.class ; then
3013 AC_MSG_RESULT([javac works])
3015 echo "configure: javac test failed" >&5
3016 cat findhome.java >&5
3017 AC_MSG_ERROR([javac does not work - java projects will not build!])
3020 AC_MSG_CHECKING([if gij knows its java.home])
3021 JAVA_HOME=`$JAVAINTERPRETER findhome`
3022 if test $? = 0 && test "$JAVA_HOME" != "" ; then
3023 AC_MSG_RESULT([$JAVA_HOME])
3025 echo "configure: java test failed" >&5
3026 cat findhome.java >&5
3027 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
3030 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
3034 dnl second sanity check JAVA_HOME if possible
3035 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
3036 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
3037 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
3039 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
3040 # try to recover first by looking whether we have a alternatives
3041 # system as in Debian or newer SuSEs where following /usr/bin/javac
3042 # over /etc/alternatives/javac leads to the right bindir where we
3043 # just need to strip a bit away to get a valid JAVA_HOME
3044 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
3045 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
3046 # maybe only one level of symlink (e.g. on Mac)
3047 JAVA_HOME=$(readlink $JAVACOMPILER)
3050 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
3051 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
3052 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
3053 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
3055 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
3056 if test "$JAVA_HOME" != "/usr"; then
3057 if test "$_os" = "Darwin"; then
3058 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
3059 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
3060 dnl Tiger already returns a JDK path..
3061 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
3063 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
3067 # now check if $JAVA_HOME is really valid
3068 if test "$_os" = "Darwin"; then
3069 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
3072 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
3075 if test "$JAVA_HOME_OK" = "NO"; then
3076 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
3077 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
3078 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
3079 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
3080 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
3081 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
3082 # if test "$JDK" = "gcj"; then
3083 # 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
3090 if test "$SOLAR_JAVA" != ""; then
3091 AC_MSG_CHECKING([for jawt lib name])
3092 if test "$JDK" = "gcj"; then
3094 save_LDFLAGS=$LDFLAGS
3095 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3096 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
3097 exec 6>/dev/null # no output
3098 AC_CHECK_HEADER(jni.h, [],
3099 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
3100 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
3101 exec 6>&1 # output on again
3103 LDFLAGS=$save_LDFLAGS
3105 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
3106 # A workaround is to link also against libpmawt.so
3107 if test "$JDK" = "ibm" ; then
3109 save_LDFLAGS=$LDFLAGS
3110 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
3111 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3112 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
3113 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
3114 export LD_LIBRARY_PATH
3115 exec 6>/dev/null # no output
3116 AC_CHECK_HEADER(jni.h, [],
3117 [AC_MSG_ERROR([jni.h could not be found.])], [])
3118 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
3119 if test -z "$AWTLIB"; then
3120 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
3121 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
3123 exec 6>&1 # output on again
3125 LDFLAGS=$save_LDFLAGS
3126 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
3128 if test -z "$AWTLIB"; then
3131 AC_MSG_RESULT([$AWTLIB])
3135 dnl ===================================================================
3136 dnl Check for optional gcj for AOT
3137 dnl ===================================================================
3138 if test "$SOLAR_JAVA" != ""; then
3139 AC_MSG_CHECKING([whether to enable gcj aot compilation])
3140 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
3141 AC_MSG_RESULT([yes])
3142 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
3145 gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
3147 AC_MSG_RESULT([$gcjaot])
3148 if test -n "$with_jdk_home"; then
3149 _javac_path="$with_jdk_home/bin/$gcjaot"
3150 dnl Check if there is a gcj at all.
3151 if test -x "$_javac_path"; then
3152 JAVAAOTCOMPILER=$_javac_path
3155 if test -z "$JAVAAOTCOMPILER"; then
3156 AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
3158 if test -z "$JAVAAOTCOMPILER"; then
3159 AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
3169 AC_SUBST(JAVAINTERPRETER)
3170 AC_SUBST(JAVAIFLAGS)
3171 AC_SUBST(JAVACOMPILER)
3172 AC_SUBST(JAVAAOTCOMPILER)
3175 dnl ===================================================================
3176 dnl Checks for specific files.
3177 dnl ===================================================================
3179 dnl ===================================================================
3180 dnl Checks for programs.
3181 dnl ===================================================================
3183 dnl ===================================================================
3184 dnl Check whether we already have dmake
3185 dnl ===================================================================
3186 AC_PATH_PROG(DMAKE, dmake, no)
3187 if test "$DMAKE" = "no"; then
3189 echo "dmake will be built on ./bootstrap"
3191 AC_MSG_CHECKING([whether the found dmake is the right dmake])
3192 # we need to find out whether that dmake we found is "our" dmake
3193 # or the dmake from Sun's SunStudio Compiler which is something
3195 # This test _should_ work because the one accepts -V (ours) and one
3196 # (the other) not...
3197 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3198 if test $? -eq 0; then
3200 AC_MSG_RESULT([yes])
3201 AC_MSG_CHECKING([the dmake version])
3202 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3203 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3204 AC_MSG_RESULT([OK, >= 4.11])
3205 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3206 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3207 AC_MSG_RESULT([OK, >= 4.11])
3209 AC_MSG_RESULT([too old. >= 4.11 is needed])
3210 echo "A newer dmake will be built on ./bootstrap"
3215 echo "dmake will be built on ./bootstrap"
3219 AC_SUBST(BUILD_DMAKE)
3221 AC_MSG_CHECKING([whether to enable EPM for packing])
3222 if test "$enable_epm" = "yes"; then
3223 AC_MSG_RESULT([yes])
3224 dnl ===================================================================
3225 dnl Check for epm - not needed for windows
3226 dnl ===================================================================
3227 if test "$_os" != "WINNT"; then
3228 if test -n "$with_epm"; then
3231 AC_PATH_PROG(EPM, epm, no)
3233 if test "$EPM" = "no" || test "$EPM" = "internal"; then
3234 echo "EPM will be built."
3236 BUILD_TYPE="$BUILD_TYPE EPM"
3238 # Gentoo has some epm which is something different...
3239 AC_MSG_CHECKING([whether the found epm is the right epm])
3240 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
3241 AC_MSG_RESULT([yes])
3243 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
3245 AC_MSG_CHECKING([epm version])
3246 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
3247 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
3248 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
3249 AC_MSG_RESULT([OK, >= 3.7])
3251 if test "$_os" = "Darwin"; then
3252 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
3253 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
3254 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3255 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)])
3256 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3257 AC_MSG_RESULT([$_pm, ok])
3258 else # we never should get here, but go safe
3259 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)])
3263 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
3264 echo "EPM will be built."
3266 BUILD_TYPE="$BUILD_TYPE EPM"
3271 # test which package format to use
3272 AC_MSG_CHECKING([which package format to use])
3286 # if building on Debian, default should be deb...
3287 if test -e /etc/debian_version; then
3305 # we never should get here since we check the arciecture/os at the beginning,
3308 AC_MSG_ERROR([unknown system])
3310 if test -n "$with_package_format"; then
3311 for i in $with_package_format; do
3313 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
3316 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
3317 aix - AIX software distribution
3318 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3319 depot or swinstall - HP-UX software distribution
3320 deb - Debian software distribution
3321 inst or tardist - IRIX software distribution
3322 osx - MacOS X software distribution
3323 pkg - Solaris software distribution
3324 rpm - RedHat software distribution
3325 setld - Tru64 (setld) software distribution
3326 native - "Native" software distribution for the platform
3327 portable - Portable software distribution
3328 OOo additionally supports:
3329 archive - .tar.gz or .zip
3331 installed - installation tree
3337 PKGFORMAT="$with_package_format"
3339 AC_MSG_RESULT([$PKGFORMAT])
3340 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
3341 AC_MSG_CHECKING([for rpm])
3342 for a in "$RPM" rpmbuild rpm; do
3343 $a --usage >/dev/null 2> /dev/null
3344 if test $? -eq 0; then
3348 $a --version >/dev/null 2> /dev/null
3349 if test $? -eq 0; then
3355 if test -z "$RPM" ; then
3356 AC_MSG_ERROR([not found])
3357 elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then
3358 RPM_PATH=`which $RPM`
3359 AC_MSG_RESULT([$RPM_PATH])
3361 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
3364 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
3365 AC_PATH_PROG(DPKG, dpkg, no)
3366 if test "$DPKG" = "no"; then
3367 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
3370 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
3371 if test "$_os" = "Darwin"; then
3372 AC_MSG_CHECKING([for PackageMaker availability])
3373 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
3374 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
3379 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
3382 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
3383 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3384 if test "$EPM" != "no" && test "$EPM" != "internal"; then
3385 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
3386 AC_MSG_CHECKING([whether epm is patched for OOos needs])
3387 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
3388 AC_MSG_RESULT([yes])
3391 if echo "$PKGFORMAT" | grep -q rpm; then
3393 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
3394 echo "the rpms will need to be installed with --nodeps" >> warn
3398 AC_MSG_WARN([the ${_pt}s will not be relocateable])
3399 echo "the ${_pt}s will not be relocateable" >> warn
3400 AC_MSG_WARN([if you want to make sure installation without --nodeps and
3401 relocation will work, you need to patch your epm with the
3402 patch in epm/epm-3.7.patch or build with
3403 --with-epm=internal which will build a suitable epm])
3408 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3409 AC_PATH_PROG(PKGMK, pkgmk, no)
3410 if test "$PKGMK" = "no"; then
3411 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
3426 dnl ===================================================================
3428 dnl ===================================================================
3429 AC_PATH_PROG(GPERF, gperf)
3430 if test -z "$GPERF"; then
3431 AC_MSG_ERROR([gperf not found but needed. Install it.])
3433 AC_MSG_CHECKING([gperf version])
3434 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
3437 AC_MSG_ERROR([too old, you need at least 3.0.0])
3440 dnl ===================================================================
3441 dnl Check for building stax
3442 dnl ===================================================================
3443 AC_MSG_CHECKING([whether to build the stax])
3444 if test -f "./stax/download/jsr173_1.0_api.jar"; then
3446 AC_MSG_RESULT([no, will use the prebuilt stax/download/jsr173_1.0_api.jar])
3449 AC_MSG_RESULT([yes])
3451 AC_SUBST(BUILD_STAX)
3453 dnl ===================================================================
3454 dnl Check for building ODK
3455 dnl ===================================================================
3456 AC_MSG_CHECKING([whether to build the ODK])
3457 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
3458 AC_MSG_RESULT([yes])
3459 if test "$WITH_JAVA" != "no"; then
3460 AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
3461 if ! test -f "./external/unowinreg/unowinreg.dll"; then
3462 HAVE_UNOWINREG_DLL=no
3464 HAVE_UNOWINREG_DLL=yes
3466 if test "$HAVE_UNOWINREG_DLL" = "yes"; then
3467 AC_MSG_RESULT([found])
3470 if test "$_os" = "WINNT"; then
3471 AC_MSG_RESULT([not found, will be built])
3473 AC_MSG_WARN([not found, will be cross-built using mingw32])
3477 if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
3478 if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
3479 AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
3480 Specify mingw32 g++ executable name with --with-mingwin.
3481 Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
3482 put it into external/unowinreg])
3484 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3485 if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
3487 AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
3489 if test "$MINGWCXX" = "false"; then
3490 AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
3492 AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
3493 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
3498 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3499 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
3501 AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/`, false)
3503 if test "$MINGWSTRIP" = "false"; then
3504 AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
3510 CXXCPP="$MINGWCXX -E"
3511 save_CXXFLAGS=$CXXFLAGS
3512 save_CPPFLAGS=$CPPFLAGS
3513 CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
3514 CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
3515 # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
3516 # do not make sense here (and 'd make the check fail)
3519 AC_HAVE_LIBRARY(kernel32)
3520 AC_HAVE_LIBRARY(advapi32)
3521 AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
3522 CXXFLAGS=$save_CXXFLAGS
3523 CPPFLAGS=$save_CPPFLAGS
3530 BUILD_TYPE="$BUILD_TYPE ODK"
3535 AC_SUBST(BUILD_UNOWINREG)
3537 AC_SUBST(MINGWSTRIP)
3539 dnl ===================================================================
3540 dnl Check for system stdlibs
3541 dnl ===================================================================
3542 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
3543 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
3544 test "$with_system_stdlibs" != "no"; then
3548 AC_MSG_RESULT([yes])
3551 AC_SUBST(SYSTEM_STDLIBS)
3553 dnl ===================================================================
3554 dnl Check for system zlib
3555 dnl ===================================================================
3556 if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
3557 with_system_zlib=yes
3559 AC_MSG_CHECKING([which zlib to use])
3560 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
3561 test "$with_system_zlib" != "no"; then
3562 AC_MSG_RESULT([external])
3564 AC_CHECK_HEADER(zlib.h, [],
3565 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
3566 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
3567 [AC_MSG_ERROR(zlib not found or functional)], [])
3569 AC_MSG_RESULT([internal])
3571 BUILD_TYPE="$BUILD_TYPE ZLIB"
3573 AC_SUBST(SYSTEM_ZLIB)
3575 dnl ===================================================================
3576 dnl Check for system jpeg
3577 dnl ===================================================================
3578 AC_MSG_CHECKING([which jpeg to use])
3579 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
3580 test "$with_system_jpeg" != "no"; then
3581 AC_MSG_RESULT([external])
3583 AC_CHECK_HEADER(jpeglib.h, [],
3584 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
3585 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
3586 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
3588 AC_MSG_RESULT([internal])
3590 BUILD_TYPE="$BUILD_TYPE JPEG"
3592 AC_SUBST(SYSTEM_JPEG)
3594 dnl ===================================================================
3595 dnl Check for system expat
3596 dnl ===================================================================
3597 AC_MSG_CHECKING([which expat to use])
3598 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
3599 test "$with_system_expat" != "no"; then
3600 AC_MSG_RESULT([external])
3602 AC_CHECK_HEADER(expat.h, [],
3603 [AC_MSG_ERROR(expat.h not found. install expat)], [])
3604 AC_CHECK_LIB(expat, XML_ParserCreate, [],
3605 [AC_MSG_RESULT(expat library not found or functional.)], [])
3607 AC_MSG_RESULT([internal])
3609 BUILD_TYPE="$BUILD_TYPE EXPAT"
3611 AC_SUBST(SYSTEM_EXPAT)
3613 dnl ===================================================================
3614 dnl Check for system libwpd
3615 dnl ===================================================================
3616 AC_MSG_CHECKING([which libwpd to use])
3617 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
3618 test "$with_system_libwpd" != "no"; then
3619 AC_MSG_RESULT([external])
3621 PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
3623 AC_MSG_RESULT([internal])
3625 BUILD_TYPE="$BUILD_TYPE LIBWPD"
3627 AC_SUBST(SYSTEM_LIBWPD)
3628 AC_SUBST(LIBWPD_CFLAGS)
3629 AC_SUBST(LIBWPD_LIBS)
3631 dnl ===================================================================
3632 dnl Check for system cppunit
3633 dnl ===================================================================
3634 AC_MSG_CHECKING([which cppunit to use])
3635 if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
3636 test "$with_system_cppunit" != "no"; then
3637 AC_MSG_RESULT([external])
3639 # might work for earlier, too but go sure. We didn't have
3640 # a system-cppunit before the first version using a proper cppunit
3641 # (and that being 1.12.1) anyway
3642 PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.1 )
3643 AC_MSG_CHECKING([STL compatibility])
3644 if test "$WITH_STLPORT" != "no"; then
3645 AC_MSG_ERROR([to use system cppunit you need to use --without-stlport])
3650 AC_MSG_RESULT([internal])
3652 BUILD_TYPE="$BUILD_TYPE CPPUNIT"
3654 AC_SUBST(SYSTEM_CPPUNIT)
3655 AC_SUBST(CPPUNIT_CFLAGS)
3656 AC_SUBST(CPPUNIT_LIBS)
3658 dnl ===================================================================
3659 dnl Check whether freetype is available
3660 dnl ===================================================================
3661 if test "$test_freetype" = "yes"; then
3662 AC_MSG_CHECKING([whether freetype is available])
3663 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
3665 AC_SUBST(FREETYPE_CFLAGS)
3666 AC_SUBST(FREETYPE_LIBS)
3668 dnl ===================================================================
3669 dnl Check whether freetype2 supports emboldening
3670 dnl ===================================================================
3671 if test "$test_freetype" = "yes"; then
3672 save_CPPFLAGS="$CPPFLAGS"
3673 save_LDFLAGS="$LDFLAGS"
3675 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
3676 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
3677 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
3678 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
3679 LDFLAGS="$save_LDFLAGS"
3680 CPPFLAGS="$save_CPPFLAGS"
3683 AC_SUBST(USE_FT_EMBOLDEN)
3685 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
3686 test "$with_system_libxslt" != "no"; then
3687 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
3688 test "$with_system_libxml" = "no"; then
3689 # somehow AC_MSG_WARN won't work...
3690 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
3691 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
3692 with_system_libxml=yes
3695 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
3696 test "$with_system_libxml" != "no"; then
3697 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
3698 test "$with_system_libxslt" = "no"; then
3699 # somehow AC_MSG_WARN won't work...
3700 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
3701 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
3702 with_system_libxslt=yes
3706 dnl ===================================================================
3707 dnl Check for system libxslt
3708 dnl ===================================================================
3709 AC_MSG_CHECKING([which libxslt to use])
3710 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
3711 "$_os" = "Darwin" && \
3712 test "$with_system_libxslt" != "no"; then
3713 AC_MSG_RESULT([external])
3716 PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
3718 dnl Check for xsltproc
3719 AC_PATH_PROG(XSLTPROC, xsltproc, no)
3720 if test "$XSLTPROC" = "no"; then
3721 AC_MSG_ERROR([xsltproc is required])
3724 AC_MSG_RESULT([internal])
3726 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
3728 AC_SUBST(SYSTEM_LIBXSLT)
3729 AC_SUBST(LIBXSLT_CFLAGS)
3730 AC_SUBST(LIBXSLT_LIBS)
3733 dnl ===================================================================
3734 dnl Check for system libxml
3735 dnl ===================================================================
3736 AC_MSG_CHECKING([which libxml to use])
3737 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
3738 "$_os" = "Darwin" && \
3739 test "$with_system_libxml" != "no"; then
3740 AC_MSG_RESULT([external])
3742 PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
3743 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
3745 AC_MSG_RESULT([internal])
3747 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
3749 AC_SUBST(SYSTEM_LIBXML)
3750 AC_SUBST(LIBXML_CFLAGS)
3751 AC_SUBST(LIBXML_LIBS)
3753 dnl ===================================================================
3754 dnl Check for system python
3755 dnl ===================================================================
3756 AC_MSG_CHECKING([which python to use])
3757 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
3758 with_system_python=yes
3759 AC_MSG_RESULT([compiling against MacOSX10.4u.sdk (python version 2.3)])
3760 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
3761 PYTHON_LIBS="-framework Python"
3762 elif test -n "$with_system_python" -o -n "$with_system_libs" && \
3763 test "$with_system_python" != "no"; then
3764 with_system_python=yes
3765 AC_MSG_RESULT([external])
3766 AM_PATH_PYTHON([2.2])
3768 python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
3769 python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
3770 PYTHON_CFLAGS="-I$python_include"
3771 PYTHON_LIBS="-lpython$python_version"
3773 if test "$with_system_python" = "yes" ; then
3775 dnl check if the headers really work:
3776 save_CPPFLAGS="$CPPFLAGS"
3777 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
3778 AC_CHECK_HEADER(Python.h, [],
3779 [AC_MSG_ERROR(Python headers not found)], [])
3780 CPPFLAGS="$save_CPPFLAGS"
3783 BUILD_TYPE="$BUILD_TYPE PYTHON"
3784 AC_MSG_RESULT([internal])
3785 # Embedded python dies without Home set
3786 if test "z$HOME" = "z"; then
3789 # bz2 tarball and bzip2 is not standard
3790 if test -z "$BZIP2"; then
3791 AC_PATH_PROG( BZIP2, bzip2)
3792 if test -z "$BZIP2"; then
3793 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
3797 AC_SUBST(SYSTEM_PYTHON)
3798 AC_SUBST(PYTHON_CFLAGS)
3799 AC_SUBST(PYTHON_LIBS)
3800 HOME=`echo $HOME | sed 's:\\\\:/:g'`
3803 dnl ===================================================================
3804 dnl Check for system berkley db
3805 dnl ===================================================================
3806 AC_MSG_CHECKING([which db to use])
3807 if test -n "$with_system_db" -o -n "$with_system_libs" && \
3808 test "$with_system_db" != "no"; then
3810 AC_MSG_RESULT([external])
3811 AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
3813 CFLAGS=-I/usr/include/db4
3814 AC_CHECK_HEADER(db4/db.h,
3815 [ DB_INCLUDES=/usr/include/db4 ],
3816 [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
3819 AC_MSG_CHECKING([whether db is at least 4.1])
3823 int main(int argc, char **argv) {
3824 if(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) return 0;
3827 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
3828 AC_HAVE_LIBRARY(db, [],
3829 [AC_MSG_ERROR([db not installed or functional])], [])
3830 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
3832 AC_MSG_RESULT([internal])
3834 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
3837 AC_SUBST(DB_VERSION)
3838 AC_SUBST(DB_INCLUDES)
3841 dnl ===================================================================
3842 dnl Check for system lucene
3843 dnl ===================================================================
3844 AC_MSG_CHECKING([which lucene to use])
3845 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
3846 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
3847 AC_MSG_RESULT([external])
3849 if test -z $LUCENE_CORE_JAR; then
3850 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
3851 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
3853 AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
3854 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
3855 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
3860 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3861 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
3864 if test -z $LUCENE_ANALYZERS_JAR; then
3865 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
3866 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
3868 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
3869 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
3870 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
3875 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3876 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
3878 AC_MSG_CHECKING([whether lucene is version 2.x])
3879 export LUCENE_CORE_JAR
3880 if $PERL -e 'use Archive::Zip;
3881 my $file = "$ENV{'LUCENE_CORE_JAR'}";
3882 my $zip = Archive::Zip->new( $file );
3883 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
3884 if ( $mf =~ m/Specification-Version: 2.*/ ) {
3889 AC_MSG_RESULT([yes])
3891 AC_MSG_ERROR([no, you need lucene 2])
3895 AC_MSG_RESULT([internal])
3897 BUILD_TYPE="$BUILD_TYPE LUCENE"
3899 AC_SUBST(SYSTEM_LUCENE)
3900 AC_SUBST(LUCENE_CORE_JAR)
3901 AC_SUBST(LUCENE_ANALYZERS_JAR)
3903 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
3904 if test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then
3905 AC_MSG_RESULT([yes])
3907 AC_MSG_CHECKING([for mysqlc module])
3908 if test -d mysqlc; then
3911 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
3913 BUILD_TYPE="$BUILD_TYPE MYSQLC"
3918 AC_SUBST(ENABLE_MYSQLC)
3920 if test "$ENABLE_MYSQLC" = "YES"; then
3921 dnl ===================================================================
3922 dnl Check for system MySQL
3923 dnl ===================================================================
3924 AC_MSG_CHECKING([for mysql pre-requisites])
3925 if test -n "$with_system_mysql" -o -n "$with_system_libs" && \
3926 test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then
3927 AC_MSG_RESULT([external MySQL])
3929 AC_PATH_PROG( MYSQLCONFIG, mysql_config)
3930 AC_MSG_CHECKING([MySQL version])
3931 MYSQL_VERSION=`$MYSQLCONFIG --version`
3932 MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
3933 if test "$MYSQL_MAJOR" -ge "5"; then
3936 AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
3938 AC_MSG_CHECKING([for MySQL Client library])
3939 MYSQL_INC=`$MYSQLCONFIG --include`
3940 MYSQL_LIB=`$MYSQLCONFIG --libs`
3941 MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,`
3942 AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
3945 if test -n "$with_libmysql_path"; then
3946 AC_MSG_RESULT([external Connector/C (libmysql)])
3947 LIBMYSQL=libmysql.so
3948 if test "$_os" = "Darwin"; then
3949 LIBMYSQL=libmysql.dylib
3950 elif test "$_os" = "WINNT"; then
3951 LIBMYSQL=libmysql.dll
3953 AC_MSG_CHECKING([for $LIBMYSQL])
3954 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
3955 AC_MSG_RESULT([found.])
3956 LIBMYSQL_PATH=$with_libmysql_path
3958 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
3961 AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path])
3964 AC_SUBST(SYSTEM_MYSQL)
3967 AC_SUBST(MYSQL_DEFINES)
3968 AC_SUBST(LIBMYSQL_PATH)
3971 dnl ===================================================================
3972 dnl Check for system MySQL C++ Connector
3973 dnl ===================================================================
3975 # who thought this too-generic cppconn dir was a good idea?
3976 AC_MSG_CHECKING([MySQL Connector/C++])
3977 if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \
3978 test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then
3979 AC_MSG_RESULT([external])
3980 SYSTEM_MYSQL_CPPCONN=YES
3982 AC_CHECK_HEADER(mysql_driver.h, [],
3983 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
3984 AC_CHECK_LIB(mysqlcppconn, main, [],
3985 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
3986 AC_MSG_CHECKING([version])
3988 #include <mysql_driver.h>
3990 int main(int argc, char **argv) {
3991 sql::Driver *driver;
3992 driver = get_driver_instance();
3993 if (driver->getMajorVersion() > 1 || \
3994 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
3995 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
4000 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])])
4004 AC_MSG_RESULT([internal])
4005 AC_MSG_CHECKING([for mysqlcppconn module])
4006 if test -d mysqlcppconn; then
4009 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
4011 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
4012 SYSTEM_MYSQL_CPPCONN=NO
4015 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
4018 dnl ===================================================================
4019 dnl Check for system hsqldb
4020 dnl ===================================================================
4021 AC_MSG_CHECKING([which hsqldb to use])
4022 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
4023 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
4024 AC_MSG_RESULT([external])
4026 if test -z $HSQLDB_JAR; then
4027 HSQLDB_JAR=/usr/share/java/hsqldb.jar
4029 AC_CHECK_FILE($HSQLDB_JAR, [],
4030 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
4031 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
4033 if $PERL -e 'use Archive::Zip;
4034 my $file = "$ENV{'HSQLDB_JAR'}";
4035 my $zip = Archive::Zip->new( $file );
4036 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
4037 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
4038 push @l, split(/\n/, $mf);
4039 foreach my $line (@l) {
4040 if ($line =~ m/Specification-Version:/) {
4041 ($t, $version) = split (/:/,$line);
4042 $version =~ s/^\s//;
4043 ($a, $b, $c, $d) = split (/\./,$version);
4044 if ($c == "0" && $d > "8") {
4054 AC_MSG_RESULT([yes])
4056 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
4059 AC_MSG_RESULT([internal])
4061 BUILD_TYPE="$BUILD_TYPE HSQLDB"
4063 AC_SUBST(SYSTEM_HSQLDB)
4064 AC_SUBST(HSQLDB_JAR)
4066 dnl ===================================================================
4067 dnl Check for system beanshell
4068 dnl ===================================================================
4069 AC_MSG_CHECKING([which beanshell to use])
4070 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
4071 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
4072 AC_MSG_RESULT([external])
4074 if test -z $BSH_JAR; then
4075 BSH_JAR=/usr/share/java/bsh.jar
4077 AC_CHECK_FILE($BSH_JAR, [],
4078 [AC_MSG_ERROR(bsh.jar not found.)], [])
4080 AC_MSG_RESULT([internal])
4082 BUILD_TYPE="$BUILD_TYPE BSH"
4084 AC_SUBST(SYSTEM_BSH)
4088 dnl ===================================================================
4089 dnl Check for system saxon
4090 dnl ===================================================================
4091 AC_MSG_CHECKING([which saxon to use])
4092 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
4093 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
4094 AC_MSG_RESULT([external])
4096 if test -z $SAXON_JAR; then
4097 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4098 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4100 AC_CHECK_FILE(/usr/share/java/saxon.jar,
4101 [ SAXON_JAR=/usr/share/java/saxon.jar ],
4102 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4103 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4104 [ AC_MSG_ERROR(saxon.jar replacement not found)]
4111 AC_CHECK_FILE($SAXON_JAR, [],
4112 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
4114 if test -n "$SERIALIZER_JAR"; then
4115 AC_CHECK_FILE($SERIALIZER_JAR, [],
4116 [AC_MSG_ERROR(serializer.jar not found.)], [])
4117 AC_SUBST(SERIALIZER_JAR)
4120 dnl Saxon comes in two practically available versions, the out-of-date saxonb which
4121 dnl supports the java extensions that OOo uses, and the up-to-date saxon he
4122 dnl "home edition" version, which is crippled to not support those java extensions.
4123 dnl And as an aside the he one also needs to be tweaked to include
4124 dnl a META-INF/services to broadcast that it supports the jaxp transform factory
4126 AC_MSG_CHECKING([if saxon works])
4127 cat > saxontest.java <<_ACEOF
4128 [import javax.xml.transform.TransformerFactory;
4129 import javax.xml.transform.Transformer;
4130 import javax.xml.transform.stream.StreamSource;
4133 import net.sf.saxon.FeatureKeys;
4136 public static void main(String[] args) {
4137 System.setProperty("javax.xml.transform.TransformerFactory",
4138 "net.sf.saxon.TransformerFactoryImpl");
4140 TransformerFactory tfactory = TransformerFactory.newInstance();
4141 // some external saxons (Debian, Ubuntu, ...) have this disabled
4143 tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
4144 System.out.println("TransformerFactory is" +
4145 tfactory.getClass().getName());
4146 Transformer transformer = tfactory.newTransformer(
4147 new StreamSource(new File(args[0])));
4148 } catch(Exception e){
4149 e.printStackTrace(System.err);
4157 cat > saxontest.xsl<<_ACEOF
4158 [<?xml version="1.0" encoding="UTF-8"?>
4159 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4160 <xsl:template match="/">
4161 <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/>
4166 javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2"
4167 AC_TRY_EVAL(javac_cmd)
4168 if test $? = 0 && test -f ./saxontest.class ; then
4169 java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2"
4170 AC_TRY_EVAL(java_cmd)
4171 if test $? = 0; then
4172 AC_MSG_RESULT([yes])
4174 cat saxontest.java >&5
4176 AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb])
4180 cat saxontest.java >&5
4181 AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar])
4184 AC_MSG_RESULT([internal])
4188 AC_SUBST(SYSTEM_SAXON)
4191 if test -n "$NEED_SAXON"; then
4192 BUILD_TYPE="$BUILD_TYPE SAXON"
4195 dnl ===================================================================
4196 dnl Check for system curl
4197 dnl ===================================================================
4198 if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
4199 with_system_curl=yes
4201 AC_MSG_CHECKING([which curl to use])
4202 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
4203 test "$with_system_curl" != "no"; then
4204 AC_MSG_RESULT([external])
4207 AC_PATH_PROG( CURLCONFIG, curl-config)
4208 if test -z "$CURLCONFIG"; then
4209 AC_MSG_ERROR([install curl to run this script])
4212 # check curl version
4213 AC_MSG_CHECKING([whether curl is >= 7.13.1])
4214 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
4215 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \
4216 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then
4217 AC_MSG_ERROR([no, you need at least curl 7.13,1])
4219 AC_MSG_RESULT([yes])
4221 CURL_LIBS=`$CURLCONFIG --libs`
4222 CURL_CFLAGS=`$CURLCONFIG --cflags`
4224 AC_MSG_RESULT([internal])
4226 BUILD_TYPE="$BUILD_TYPE CURL"
4228 AC_SUBST(SYSTEM_CURL)
4229 AC_SUBST(CURL_CFLAGS)
4232 dnl ===================================================================
4233 dnl Check for system mdds
4234 dnl ===================================================================
4235 AC_MSG_CHECKING([which mdds to use])
4236 if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
4237 test "$with_system_mdds" != "no"; then
4238 AC_MSG_RESULT([external])
4241 AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
4242 [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
4245 AC_MSG_RESULT([internal])
4246 BUILD_TYPE="$BUILD_TYPE MDDS"
4249 AC_SUBST(SYSTEM_MDDS)
4251 dnl ===================================================================
4252 dnl Check for system boost
4253 dnl ===================================================================
4254 AC_MSG_CHECKING([which boost to use])
4255 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
4256 test "$with_system_boost" != "no"; then
4257 AC_MSG_RESULT([external])
4260 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
4261 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
4262 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
4263 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
4264 AC_CHECK_HEADER(boost/function.hpp, [],
4265 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
4267 save_CXXFLAGS=$CXXFLAGS
4268 CXXFLAGS="$CXXFLAGS -fno-exceptions"
4269 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
4270 AC_TRY_COMPILE([#include <boost/function.hpp>
4272 ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes)
4274 if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then
4275 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
4277 AC_MSG_RESULT([yes])
4279 CXXFLAGS=$save_CXXFLAGS
4282 AC_MSG_RESULT([internal])
4283 BUILD_TYPE="$BUILD_TYPE BOOST"
4286 AC_SUBST(SYSTEM_BOOST)
4288 dnl ===================================================================
4289 dnl Check for system vigra
4290 dnl ===================================================================
4291 AC_MSG_CHECKING([which vigra to use])
4292 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
4293 test "$with_system_vigra" != "no"; then
4294 AC_MSG_RESULT([external])
4297 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
4298 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
4301 AC_MSG_RESULT([internal])
4302 BUILD_TYPE="$BUILD_TYPE VIGRA"
4305 AC_SUBST(SYSTEM_VIGRA)
4307 dnl ===================================================================
4308 dnl Check for system odbc
4309 dnl ===================================================================
4310 AC_MSG_CHECKING([which odbc headers to use])
4311 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
4312 test "$with_system_odbc_headers" != "no"; then
4313 AC_MSG_RESULT([external])
4314 SYSTEM_ODBC_HEADERS=YES
4316 AC_CHECK_HEADER(sqlext.h, [],
4317 [AC_MSG_ERROR(odbc not found. install odbc)], [])
4319 AC_MSG_RESULT([internal])
4320 SYSTEM_ODBC_HEADERS=NO
4321 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
4323 AC_SUBST(SYSTEM_ODBC_HEADERS)
4325 AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components])
4326 if test "$enable_mozilla" = "no"; then
4329 ENABLE_NSS_MODULE=NO
4331 AC_MSG_RESULT([yes])
4334 AC_SUBST(WITH_MOZILLA)
4336 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
4337 if test "$enable_mozilla" = "no"; then
4339 elif test "$with_system_mozilla" = "yes"; then
4340 AC_MSG_RESULT([no, not possible with system-mozilla])
4342 AC_MSG_RESULT([yes])
4345 AC_MSG_CHECKING([whether to build XML Security support])
4346 if test "$enable_mozilla" = "no"; then
4347 AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
4349 AC_MSG_RESULT([yes])
4352 AC_MSG_CHECKING([whether to build LDAP configuration backend])
4353 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
4354 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
4355 AC_MSG_RESULT([yes])
4358 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
4366 if test "$WITH_LDAP" = "YES"; then
4367 dnl ===================================================================
4368 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
4369 dnl ===================================================================
4370 AC_MSG_CHECKING([which LDAP SDK to use])
4371 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
4372 AC_MSG_RESULT([OpenLDAP])
4374 AC_CHECK_HEADERS(ldap.h, [],
4375 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
4376 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
4377 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4378 # rumours say that OpenLDAP doesn't have that function. I looked and
4379 # it has it. Test for it to be sure
4380 AC_CHECK_LIB(ldap, ldap_set_option, [],
4381 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4383 AC_MSG_RESULT([Netscape/Mozilla])
4384 # TODO. Actually do a sanity check and check for
4385 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
4390 AC_SUBST(WITH_OPENLDAP)
4392 dnl ===================================================================
4393 dnl Check for system mozilla
4394 dnl ===================================================================
4395 AC_MSG_CHECKING([which mozilla to use])
4396 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
4397 AC_MSG_RESULT([external])
4399 ENABLE_NSS_MODULE=NO
4400 enable_nss_module=no
4401 AC_MSG_CHECKING([which Mozilla flavour to use])
4402 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
4404 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
4405 MOZ_FLAVOUR=xulrunner
4406 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
4407 MOZ_FLAVOUR=seamonkey
4408 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
4410 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
4415 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
4418 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
4419 if test -z "$STANDALONENSS"; then
4420 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
4422 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
4426 if $PKG_CONFIG --exists nspr ; then
4427 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
4428 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
4431 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
4434 if test "$MOZ_FLAVOUR" != "libxul"; then
4435 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
4436 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
4437 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
4440 if test -z "$HASXPCOM"; then
4441 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
4442 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
4443 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
4444 if ! test -e "$MOZ_LIB/libxul.so"; then
4445 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
4446 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
4447 MOZ_LIB="$MOZ_LIB/sdk/lib"
4452 save_CPPFLAGS="$CPPFLAGS"
4453 save_LDFLAGS="$LDFLAGS"
4455 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
4456 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
4457 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
4458 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
4459 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
4460 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
4461 LDFLAGS="$save_LDFLAGS"
4462 CPPFLAGS="$save_CPPFLAGS"
4465 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
4466 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
4467 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
4468 if test -d "$MOZ_INC/ldap"; then
4469 AC_MSG_RESULT([yes])
4470 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
4473 Could not find LDAP header include files in $MOZ_INC/ldap.
4474 Please recompile $tmp with --enable-ldap or use --with-openldap.])
4478 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
4479 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
4480 if test "$MOZ_FLAVOUR" = "libxul"; then
4481 MOZ_FLAVOUR="mozilla"
4484 elif test "$enable_mozilla" = "no"; then
4485 AC_MSG_RESULT([none])
4487 ENABLE_NSS_MODULE=NO
4488 enable_nss_module=no
4490 AC_MSG_RESULT([internal])
4492 BUILD_TYPE="$BUILD_TYPE MOZ"
4493 if test -z "$with_mozilla_version"; then
4496 AC_MSG_CHECKING([which mozilla version to build])
4497 MOZILLA_VERSION=$with_mozilla_version
4498 enable_build_mozilla=1
4499 AC_MSG_RESULT([$MOZILLA_VERSION])
4502 AC_SUBST(MOZILLA_VERSION)
4504 AC_MSG_CHECKING([for toolkit mozilla should use])
4505 if test -z "$with_mozilla_toolkit"; then
4506 if test "$_os" != "WINNT" ; then
4507 if test "$_os" = "Darwin" ; then
4509 AC_MSG_RESULT([mac])
4511 MOZILLA_TOOLKIT=gtk2
4512 AC_MSG_RESULT([gtk2])
4516 MOZILLA_TOOLKIT=$with_mozilla_toolkit
4517 enable_build_mozilla=1
4518 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
4520 #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then
4521 # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not
4522 # #available using fink, mac (carbon) doesn't work because xcode installs conflicting headers
4523 # AC_MSG_ERROR([Only gtk2 toolkit supported on Mac, sorry.])
4526 AC_SUBST(MOZILLA_TOOLKIT)
4528 # default to enabling build mozilla
4529 if test "$enable_build_mozilla" != "no"; then
4530 enable_build_mozilla=yes
4532 enable_build_mozilla=
4535 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
4536 if test -n "$enable_build_mozilla"; then
4538 AC_MSG_RESULT([yes])
4544 AC_MSG_CHECKING([whether to build provided NSS module])
4545 if test "$enable_nss_module" != "no"; then
4546 ENABLE_NSS_MODULE="YES"
4547 BUILD_TYPE="$BUILD_TYPE NSS"
4548 AC_MSG_RESULT([yes])
4549 if test "$_os" = "WINNT"; then
4550 AC_MSG_CHECKING([for Mozilla build tooling])
4551 if test -z "$MOZILLABUILD" ; then
4552 AC_MSG_ERROR([Mozilla build tooling not found.
4553 Use the --with-mozilla-build option after installling the tools obtained
4554 from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
4556 if test \( "$WITH_MINGWIN" = "yes" \) ; then
4557 if test ! -d "$MOZILLABUILD" ; then
4558 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4563 if test ! -d "$MOZILLABUILD/moztools" \
4564 -o ! -d "$MOZILLABUILD/msys" ; then
4565 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4573 ENABLE_NSS_MODULE="NO"
4577 if test "$BUILD_MOZAB" = "TRUE"; then
4578 if test "$_os" = "WINNT"; then
4579 if test "$WITH_MINGWIN" != "yes"; then
4580 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
4581 if test "$MSVSVER" != "2005"; then
4582 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
4585 AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
4586 echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
4590 if test -z "$MOZILLA_VERSION"; then
4591 MOZILLA_VERSION=1.1.14
4593 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
4594 MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst`
4595 AC_MSG_CHECKING([for mozilla sources])
4596 if test -z "$MOZILLA_FETCH_FILE"; then
4597 AC_MSG_RESULT([not found])
4598 HAVE_MOZILLA_TARBALL=n
4600 AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE])
4601 if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then
4602 if test -z "$DO_FETCH"; then
4603 AC_MSG_RESULT([will be fetched])
4604 HAVE_MOZILLA_TARBALL=y
4606 AC_MSG_RESULT([not found])
4607 HAVE_MOZILLA_TARBALL=n
4610 AC_MSG_RESULT([found])
4611 HAVE_MOZILLA_TARBALL=y
4614 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
4615 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
4616 Use "./fetch_tarballs.sh ooo.lst" to download.])
4618 if test "$_os" = "WINNT"; then
4619 AC_MSG_CHECKING([for moztools binaries])
4620 if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then
4621 AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip
4622 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
4626 elif test "$_os" = "Darwin"; then
4627 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4628 AC_MSG_NOTICE([checking whether mozilla can be built...])
4629 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]))
4631 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
4632 if test -z "$MOZIDL"; then
4633 AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit.])
4637 # Generic Unix/Linux section
4638 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4639 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
4640 if test -z "$MOZGTK"; then
4641 AC_MSG_ERROR([GTK2 is needed to build mozilla.])
4643 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
4644 if test -z "$MOZIDL"; then
4645 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.])
4648 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
4649 if test -z "$MOZGTK"; then
4650 AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.])
4652 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4653 if test -z "$MOZIDL"; then
4654 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4660 AC_SUBST(BUILD_MOZAB)
4663 AC_SUBST(ENABLE_NSS_MODULE)
4664 AC_SUBST(MOZILLABUILD)
4665 AC_SUBST(SYSTEM_MOZILLA)
4666 AC_SUBST(MOZ_FLAVOUR)
4669 AC_SUBST(MOZ_LIB_XPCOM)
4670 AC_SUBST(MOZ_NSPR_CFLAGS)
4671 AC_SUBST(MOZ_NSS_CFLAGS)
4672 AC_SUBST(MOZ_LDAP_CFLAGS)
4674 dnl ===================================================================
4675 dnl Check for system sane
4676 dnl ===================================================================
4677 AC_MSG_CHECKING([which sane header to use])
4678 if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \
4679 test "$with_system_sane_header" != "no"; then
4680 AC_MSG_RESULT([external])
4681 SYSTEM_SANE_HEADER=YES
4682 AC_CHECK_HEADER(sane/sane.h, [],
4683 [AC_MSG_ERROR(sane not found. install sane)], [])
4685 AC_MSG_RESULT([internal])
4686 SYSTEM_SANE_HEADER=NO
4687 BUILD_TYPE="$BUILD_TYPE SANE"
4689 AC_SUBST(SYSTEM_SANE_HEADER)
4691 dnl ===================================================================
4692 dnl Check for system icu
4693 dnl ===================================================================
4694 AC_MSG_CHECKING([which icu to use])
4695 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
4696 test "$with_system_icu" != "no"; then
4697 AC_MSG_RESULT([external])
4700 AC_MSG_CHECKING([for unicode/rbbi.h])
4701 AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
4702 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
4703 if test -z "$SYSTEM_GENBRK"; then
4704 AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
4706 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
4707 if test -z "$SYSTEM_GENCCODE"; then
4708 AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
4710 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
4711 if test -z "$SYSTEM_GENCMN"; then
4712 AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
4714 AC_MSG_CHECKING([ICU version])
4716 #include <unicode/uversion.h>
4718 int main(int argc, char **argv) {
4719 if(U_ICU_VERSION_MAJOR_NUM < 4)
4724 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])])
4727 AC_MSG_RESULT([internal])
4729 BUILD_TYPE="$BUILD_TYPE ICU"
4731 AC_SUBST(SYSTEM_ICU)
4732 AC_SUBST(SYSTEM_GENBRK)
4733 AC_SUBST(SYSTEM_GENCCODE)
4734 AC_SUBST(SYSTEM_GENCMN)
4736 dnl ===================================================================
4738 dnl ===================================================================
4740 AC_MSG_CHECKING([whether to enable graphite support])
4741 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then
4742 AC_MSG_RESULT([yes])
4743 ENABLE_GRAPHITE="TRUE"
4744 AC_MSG_CHECKING([which graphite to use])
4745 if test -n "$with_system_graphite" -o -n "$with_system_libs" && \
4746 test "$with_system_graphite" != "no"; then
4747 AC_MSG_RESULT([external])
4749 PKG_CHECK_MODULES( GRAPHITE, silgraphite )
4751 AC_MSG_RESULT([internal])
4753 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
4758 AC_SUBST(ENABLE_GRAPHITE)
4759 AC_SUBST(SYSTEM_GRAPHITE)
4760 AC_SUBST(GRAPHITE_LIBS)
4761 AC_SUBST(GRAPHITE_CFLAGS)
4763 dnl ===================================================================
4764 dnl Checks for libraries.
4765 dnl ===================================================================
4766 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
4767 dnl See if we have the AppKit framework for building with Quartz graphics.
4769 if test "$_os" = "Darwin"; then
4770 if test "x$with_x" = "xyes"; then
4771 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
4773 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
4774 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
4775 AC_MSG_RESULT([yes])
4776 x_includes="no_x_includes"
4777 x_libraries="no_x_libraries"
4778 dnl disable some things used on other Unix versions but not on the aqua build
4782 AC_SUBST(ENABLE_CUPS)
4784 AC_MSG_ERROR([No AppKit.framewrok found])
4789 dnl ***************************************
4790 dnl testing for X libraries and includes...
4791 dnl ***************************************
4792 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
4793 echo "Do Nothing for _os = Darwin"
4794 dnl Mac OS X using Aqua graphics. Don't check for X11.
4796 elif test "$_os" = "OS2" ; then
4797 echo "Do Nothing for _os = OS2. Don't check for X11."
4798 dnl OS/2 uses native graphics. Don't check for X11.
4800 elif test "$_os" != "WINNT" ; then
4803 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4805 if test "x$x_includes" = "x"; then
4806 x_includes="default_x_includes"
4808 if test "x$x_libraries" = "x"; then
4809 x_libraries="default_x_libraries"
4811 dnl The variables $x_libraries and $x_includes are set.
4812 if test -z "$x_libraries"; then
4813 AC_MSG_ERROR([No X libraries found]) # Exit
4815 if test -z "$x_includes"; then
4816 AC_MSG_ERROR([No X includes found]) # Exit
4819 LDFLAGS="$X_LDFLAGS $X_LIBS"
4820 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
4821 dnl Check if the XauDisposeAuth symbol is provided by libXau.
4822 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
4824 x_includes="no_x_includes"
4825 x_libraries="no_x_libraries"
4827 if test -z "$x_includes"; then
4828 x_includes="no_x_includes"
4830 if test -z "$x_libraries"; then
4831 x_libraries="no_x_libraries"
4833 if test "$x_includes" = "default_x_includes"; then
4839 if test "$x_libraries" = "default_x_libraries"; then
4840 XLIB=`$PKG_CONFIG --variable=libdir x11`
4841 if test "x$XLIB" = x; then
4850 if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then
4851 dnl ===================================================================
4852 dnl Check for using Xaw
4853 dnl ===================================================================
4854 AC_MSG_CHECKING([whether to use Xaw])
4855 if test "$enable_Xaw" = "no"; then
4858 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt include headers not found])],
4859 [#include <X11/Intrinsic.h>])
4861 AC_MSG_RESULT([yes])
4862 AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])],
4863 [#include <X11/Intrinsic.h>])
4864 AC_CHECK_LIB(Xaw, main, [],
4865 [AC_MSG_ERROR(Xaw library not found or functional)], [])
4868 AC_SUBST(DISABLE_XAW)
4872 dnl ===================================================================
4873 dnl Check if fontconfig/fontconfig.h is available
4874 dnl ===================================================================
4875 if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
4876 AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
4877 [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
4878 AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
4880 #include <fontconfig/fontconfig.h>
4882 int main(int argc, char **argv) {
4883 if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
4886 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
4889 dnl ===================================================================
4890 dnl Check for system Xrender
4891 dnl ===================================================================
4892 AC_MSG_CHECKING([whether to link to Xrender])
4893 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
4894 AC_MSG_RESULT([yes])
4896 with_system_xrender_headers=yes
4898 AC_MSG_RESULT([no, dynamically open it])
4901 AC_MSG_CHECKING([which Xrender headers to use])
4902 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
4903 test "$with_system_xrender_headers" != "no"; then
4904 AC_MSG_RESULT([external])
4905 SYSTEM_XRENDER_HEADERS=YES
4906 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
4907 [AC_MSG_ERROR(Xrender not found. install X)], [])
4909 AC_MSG_RESULT([internal])
4910 SYSTEM_XRENDER_HEADERS=NO
4911 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
4913 if test "$XRENDER_LINK" = "YES"; then
4914 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
4915 [AC_MSG_ERROR(libXrender not found or functional)], [])
4917 AC_SUBST(SYSTEM_XRENDER_HEADERS)
4918 AC_SUBST(XRENDER_LINK)
4920 dnl ===================================================================
4921 dnl Check for XRandr
4922 dnl ===================================================================
4923 AC_MSG_CHECKING([whether to enable RandR support])
4924 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
4925 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
4926 XRANDR_DLOPEN="TRUE"
4927 AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
4929 XRANDR_DLOPEN="FALSE"
4930 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
4931 if test "$ENABLE_RANDR" != "TRUE"; then
4932 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
4933 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
4935 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
4936 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
4937 XRANDR_LIBS="-lXrandr "
4939 AC_MSG_RESULT([enabling RandR support])
4946 AC_SUBST(XRANDR_DLOPEN)
4947 AC_SUBST(XRANDR_CFLAGS)
4948 AC_SUBST(XRANDR_LIBS)
4949 AC_SUBST(ENABLE_RANDR)
4951 dnl ===================================================================
4952 dnl Check for building neon
4953 dnl ===================================================================
4954 AC_MSG_CHECKING([whether to use neon])
4955 if test "$enable_neon" = "no"; then
4958 AC_SUBST(DISABLE_NEON)
4960 AC_MSG_RESULT([yes])
4961 dnl ===================================================================
4962 dnl Check for system neon
4963 dnl ===================================================================
4964 AC_MSG_CHECKING([which neon to use])
4965 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
4966 test "$with_system_neon" != "no"; then
4967 AC_MSG_RESULT([external])
4968 PKG_CHECK_MODULES(NEON, neon >= 0.24.0, , AC_MSG_ERROR([you need neon >= 0.24.x for system-neon]))
4969 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
4970 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
4973 AC_MSG_RESULT([internal])
4977 BUILD_TYPE="$BUILD_TYPE NEON"
4979 AC_SUBST(SYSTEM_NEON)
4980 AC_SUBST(NEON_VERSION)
4982 AC_SUBST(NEON_CFLAGS)
4985 dnl ===================================================================
4986 dnl Check for system openssl
4987 dnl ===================================================================
4988 if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
4989 with_system_openssl=yes
4991 AC_MSG_CHECKING([which libssl to use])
4992 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
4993 test "$with_system_openssl" != "no"; then
4994 AC_MSG_RESULT([external])
4995 # Mac OS builds should get out without extra stuff is the Mac porters'
4996 # wish. And pkg-config is although Xcode ships a .pc for openssl
4997 if test "$_os" = "Darwin"; then
4999 OPENSSL_LIBS="-lssl -lcrypto"
5001 PKG_CHECK_MODULES( OPENSSL, openssl )
5005 AC_MSG_RESULT([internal])
5007 BUILD_TYPE="$BUILD_TYPE OPENSSL"
5009 AC_SUBST(SYSTEM_OPENSSL)
5010 AC_SUBST(OPENSSL_CFLAGS)
5011 AC_SUBST(OPENSSL_LIBS)
5013 dnl ===================================================================
5014 dnl Test for disabling agg
5015 dnl ===================================================================
5016 AC_MSG_CHECKING([whether to enable agg])
5017 if test "$with_agg" = "no"; then
5020 AC_MSG_RESULT([yes])
5022 AC_SUBST(ENABLE_AGG)
5024 dnl ===================================================================
5025 dnl Check for system AGG
5026 dnl ===================================================================
5027 AC_MSG_CHECKING([which AGG to use])
5028 if test -n "$with_system_agg" -o -n "$with_system_libs" && \
5029 test "$with_system_agg" != "no"; then
5030 AC_MSG_RESULT([external])
5031 PKG_CHECK_MODULES(AGG, libagg >= 2.3)
5032 AC_MSG_CHECKING([agg version])
5033 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
5034 # (/usr/include gets stripped from pkg-config output)
5035 if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
5036 AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
5038 AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
5040 if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
5041 $PKG_CONFIG --modversion libagg | grep -q 2.4; then
5042 # 2.4's libagg.pc.in still contains 2.3 :/
5043 if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
5044 AC_MSG_RESULT([2.4])
5047 AC_MSG_RESULT([2.3])
5052 AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
5055 AC_MSG_RESULT([internal])
5058 BUILD_TYPE="$BUILD_TYPE AGG"
5060 AC_SUBST(SYSTEM_AGG)
5061 AC_SUBST(AGG_VERSION)
5064 dnl ===================================================================
5065 dnl Check for system redland
5066 dnl ===================================================================
5067 AC_MSG_CHECKING([which redland library to use])
5068 if test -n "$with_system_redland" -o -n "$with_system_libs" && \
5069 test "$with_system_redland" != "no"; then
5070 AC_MSG_RESULT([external])
5072 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
5073 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
5075 AC_MSG_RESULT([internal])
5076 BUILD_TYPE="$BUILD_TYPE REDLAND"
5079 AC_SUBST(SYSTEM_REDLAND)
5080 AC_SUBST(REDLAND_LIBS)
5082 dnl ===================================================================
5083 dnl Check for system hunspell
5084 dnl ===================================================================
5085 AC_MSG_CHECKING([which libhunspell to use])
5086 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
5087 test "$with_system_hunspell" != "no"; then
5088 AC_MSG_RESULT([external])
5091 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
5092 if test "$HUNSPELL_PC" != "TRUE"; then
5093 AC_CHECK_HEADER(hunspell.hxx, [],
5095 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
5096 [AC_MSG_ERROR(hunspell headers not found.)], [])
5098 AC_CHECK_LIB(hunspell, main, [],
5099 [ AC_MSG_ERROR(hunspell library not found.) ], [])
5100 HUNSPELL_LIBS=-lhunspell
5104 AC_MSG_RESULT([internal])
5106 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
5108 AC_SUBST(SYSTEM_HUNSPELL)
5109 AC_SUBST(HUNSPELL_CFLAGS)
5110 AC_SUBST(HUNSPELL_LIBS)
5112 dnl ===================================================================
5113 dnl Checking for altlinuxhyph
5114 dnl ===================================================================
5115 AC_MSG_CHECKING([which altlinuxhyph to use])
5116 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
5117 test "$with_system_altlinuxhyph" != "no"; then
5118 AC_MSG_RESULT([external])
5120 AC_CHECK_HEADER(hyphen.h, [],
5121 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
5122 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
5123 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
5124 [#include <hyphen.h>])
5125 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
5126 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5127 if test -z "$HYPHEN_LIB"; then
5128 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
5129 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5131 if test -z "$HYPHEN_LIB"; then
5132 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
5133 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5136 AC_MSG_RESULT([internal])
5138 BUILD_TYPE="$BUILD_TYPE HYPHEN"
5140 AC_SUBST(SYSTEM_HYPH)
5141 AC_SUBST(HYPHEN_LIB)
5143 dnl ===================================================================
5144 dnl Checking for mythes
5145 dnl ===================================================================
5146 AC_MSG_CHECKING([which mythes to use])
5147 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
5148 AC_MSG_RESULT([external])
5151 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
5152 if test "$MYTHES_PKGCONFIG" = "no"; then
5153 AC_CHECK_HEADER(mythes.hxx, [],
5154 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
5155 AC_CHECK_LIB(mythes-1.2, main, [],
5156 [ MYTHES_FOUND=no], [])
5157 if test "$MYTHES_FOUND" = "no"; then
5158 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
5159 [ MYTHES_FOUND=no], [])
5161 if test "$MYTHES_FOUND" = "no"; then
5162 AC_MSG_ERROR([mythes library not found!.])
5167 AC_MSG_RESULT([internal])
5169 BUILD_TYPE="$BUILD_TYPE MYTHES"
5171 AC_SUBST(SYSTEM_MYTHES)
5172 AC_SUBST(MYTHES_CFLAGS)
5173 AC_SUBST(MYTHES_LIBS)
5175 dnl ===================================================================
5176 dnl Checking for lpsolve
5177 dnl ===================================================================
5178 AC_MSG_CHECKING([which lpsolve to use])
5179 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
5180 test "$with_system_lpsolve" != "no"; then
5181 AC_MSG_RESULT([external])
5183 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
5184 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
5185 # some systems need this. Like Ubuntu....
5186 AC_CHECK_LIB(m, floor)
5187 AC_CHECK_LIB(dl, dlopen)
5188 AC_CHECK_LIB(lpsolve55, make_lp, ,
5189 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
5191 AC_MSG_RESULT([internal])
5193 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
5195 AC_SUBST(SYSTEM_LPSOLVE)
5197 dnl ***************************************
5198 dnl testing libc version for Linux...
5199 dnl ***************************************
5200 if test "$_os" = "Linux"; then
5201 AC_MSG_CHECKING([whether libc is >= 2.1.1])
5202 exec 6>/dev/null # no output
5203 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
5204 exec 6>&1 # output on again
5205 if test "$HAVE_LIBC"; then
5206 AC_MSG_RESULT([yes])
5208 AC_MSG_ERROR([no, upgrade libc])
5212 if test "$_os" != "WNT"; then
5213 AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
5214 AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
5215 if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
5223 AC_SUBST(HAVE_GETOPT)
5224 AC_SUBST(HAVE_READDIR_R)
5225 AC_SUBST(SYSTEM_LIBC)
5227 dnl =========================================
5228 dnl Check for the Microsoft Platform SDK.
5229 dnl =========================================
5230 dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
5231 dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
5232 if test \( "$_os" = "WINNT" \) ; then
5233 AC_MSG_CHECKING([for PSDK files])
5234 if test -z "$with_psdk_home"; then
5235 # This first line will detect a February 2003 Microsoft Platform SDK
5236 PSDK_HOME=`./oowintool --psdk-home`
5237 # But there might be also an April 2005 PSDK, unfortunately MS changed
5238 # the registry entry. (we prefer the old version!?)
5239 if test -z "$PSDK_HOME"; then
5240 PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
5242 # normalize if found
5243 if test -n "$PSDK_HOME"; then
5244 PSDK_HOME=`cygpath -d "$PSDK_HOME"`
5245 PSDK_HOME=`cygpath -u "$PSDK_HOME"`
5248 PSDK_HOME=`cygpath -u "$with_psdk_home"`
5250 # Remove a possible trailing backslash
5251 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
5252 # Problem with current PSDK (iz 49865)
5253 if test -f "$PSDK_HOME/Lib/libcp.lib"; then
5256 Some modules do not build correctly with MS Platform SDK - April 2005
5257 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
5258 Remove/rename/backup that file and restart configure. Details about this
5259 problem can be found in issue 49856.])
5261 # WIndows SDK has different headers
5262 if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
5263 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
5264 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
5269 if test -f "$PSDK_HOME/lib/unicows.lib"; then
5274 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
5275 AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
5276 are installed or use --with-psdk-home .])
5278 if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
5279 -o ! -x "$PSDK_HOME/bin/msidb.exe" \
5280 -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
5281 -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
5282 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
5284 AC_MSG_RESULT([SDK files found ...)])
5285 dnl Check if this is the right SDK.
5286 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
5287 AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
5288 WINDOWS_VISTA_PSDK=TRUE
5289 elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
5290 AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
5291 WINDOWS_VISTA_PSDK=TRUE
5293 AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
5297 AC_SUBST(WINDOWS_VISTA_PSDK)
5299 dnl =========================================
5300 dnl Check for the Microsoft DirectX SDK.
5301 dnl =========================================
5302 if test \( "$_os" = "WINNT" \) ; then
5303 AC_MSG_CHECKING([for DirectX SDK files])
5304 if test -z "$with_directx_home"; then
5305 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
5306 if test -n "$DXSDK_DIR"; then
5307 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
5308 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
5310 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
5311 # the "DirectX SDK files not found" error later
5313 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
5315 # Remove a possible trailing backslash
5316 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
5318 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
5319 HAVE_DIRECTXSDK_H="yes"
5321 HAVE_DIRECTXSDK_H="no"
5323 # MS changed the location of the libraries with dec 2004 directx sdk
5324 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
5325 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
5327 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
5329 if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
5330 HAVE_DIRECTXSDK_LIB="yes"
5332 HAVE_DIRECTXSDK_LIB="no"
5334 if test -n "$ENABLE_DIRECTX"; then
5335 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
5336 AC_MSG_RESULT([found])
5338 AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
5342 AC_MSG_RESULT([disabled])
5345 AC_SUBST(DIRECTXSDK_HOME)
5346 AC_SUBST(DIRECTXSDK_LIB)
5348 dnl ============================================
5349 dnl Check for Nullsoft Scriptable Install System
5350 dnl ============================================
5352 if test "$_os" = "WINNT" ; then
5353 AC_MSG_CHECKING([for NSIS])
5354 AC_PATH_PROG(NSIS_PATH, nsis.exe)
5355 if test -n "$NSIS_PATH"; then
5356 NSIS_PATH=`dirname "$NSIS_PATH"`
5358 if test -n "$with_nsis_path"; then
5359 with_nsis_path=`cygpath -u "$with_nsis_path"`
5361 if test -e "$with_nsis_path/nsis.exe"; then
5362 NSIS_PATH="$with_nsis_path"
5364 nsistest=`./oowintool --nsis-dir`;
5365 if test -x "$nsistest/nsis.exe"; then
5366 NSIS_PATH="$nsistest"
5368 if test -z "$NSIS_PATH"; then
5369 AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
5370 echo "NSIS not found, no self contained installer will be build." >> warn
5372 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5373 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5374 AC_MSG_RESULT([found ($NSIS_PATH)])
5379 dnl ***************************************
5380 dnl testing bison and flex exist
5381 dnl ***************************************
5382 AC_PATH_PROG(BISON, bison)
5383 if test -z "$BISON"; then
5384 AC_MSG_ERROR([no bison found in \$PATH, install bison])
5386 AC_MSG_CHECKING([the bison version])
5387 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
5388 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
5389 # Accept newer than 1.875 or older(equal) than 1.75
5390 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
5391 if test "$_bison_version" = "1.875" ; then
5392 AC_MSG_WARN([suspect ($BISON $_bison_version)])
5393 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
5395 AC_MSG_RESULT([checked ($BISON $_bison_version)])
5398 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
5401 AC_PATH_PROG(FLEX, flex)
5402 if test -z "$FLEX"; then
5403 AC_MSG_ERROR([no flex found in \$PATH, install flex])
5405 dnl ***************************************
5406 dnl testing that patch exists
5407 dnl ***************************************
5408 AC_PATH_PROG(PATCH, patch)
5409 if test -z "$PATCH"; then
5410 AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
5413 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
5414 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
5415 if test -z "$with_gnu_patch"; then
5418 if test -x "$with_gnu_patch"; then
5419 GNUPATCH=$with_gnu_patch
5421 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
5425 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
5426 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5427 AC_MSG_RESULT([yes])
5429 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
5432 dnl We also need to check for --with-gnu-cp
5434 if test -z "$with_gnu_cp"; then
5435 AC_PATH_PROGS(GNUCP, gnucp cp)
5436 if test -z $GNUCP; then
5437 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
5440 if test -x "$with_gnu_cp"; then
5443 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
5447 AC_MSG_CHECKING([whether $GNUCP is GNU cp])
5448 if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5449 AC_MSG_RESULT([yes])
5451 if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
5452 AC_MSG_RESULT([yes])
5454 if test "$_os" = "Darwin"; then
5456 AC_MSG_RESULT([no gnucp found - using the system's cp command])
5458 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
5467 dnl ***************************************
5468 dnl testing bash tools path on Windows
5469 dnl ***************************************
5470 if test "$_os" = "WINNT"; then
5472 AC_PATH_PROG(CYGWIN_PATH, bash)
5473 CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
5475 if test -z "$CYGWIN_PATH"; then
5476 CYGWIN_PATH="NO_CYGWIN"
5478 AC_SUBST(CYGWIN_PATH)
5480 dnl ***************************************
5481 dnl testing ml.exe assembler path
5482 dnl ***************************************
5483 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5484 AC_MSG_CHECKING([ml.exe assembler path])
5485 if test -n "$with_asm_home"; then
5486 with_asm_home=`cygpath -u "$with_asm_home"`
5488 if test ! -x "$with_asm_home/ml.exe"; then
5489 AC_PATH_PROG(ML_EXE, ml.exe)
5490 if test -z "$ML_EXE"; then
5491 if test -x "$with_cl_home/bin/ml.exe"; then
5492 with_asm_home=$with_cl_home/bin
5493 AC_MSG_RESULT([found ($with_asm_home)])
5495 AC_MSG_ERROR([Configure did not find ml.exe assembler.])
5498 with_asm_home="ASM_IN_PATH"
5501 AC_MSG_RESULT([$ASM_HOME])
5503 with_asm_home="NO_ASM_HOME"
5505 ASM_HOME="$with_asm_home"
5508 dnl ===================================================================
5509 dnl testing handle deprecated unzip switch
5510 dnl ===================================================================
5511 if test -z "$with_zip_home"; then
5512 with_zip_home="$with_unzip_home"
5514 dnl ===================================================================
5515 dnl Zip will be found where you tell me to find it
5516 dnl ===================================================================
5517 if test -n "$with_zip_home" ; then
5518 if test "$_os" = "WINNT"; then
5519 with_zip_home=`cygpath -u "$with_zip_home"`
5521 ZIP="$with_zip_home/zip"
5522 UNZIP="$with_zip_home/unzip"
5523 ZIP_HOME="$with_zip_home"
5525 AC_PATH_PROG(ZIP, zip)
5526 AC_PATH_PROG(UNZIP, unzip)
5527 ZIP_HOME=`dirname "$ZIP"`
5529 dnl ===================================================================
5530 dnl Zip must be available or else it is an error, all platforms
5531 dnl ===================================================================
5532 if test -z "$ZIP" -o -z "$UNZIP"; then
5533 AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
5536 dnl ===================================================================
5537 dnl Zip must be a specific type for different build types.
5538 dnl ===================================================================
5539 if test "$_os" = "WINNT"; then
5540 if test -n "`$ZIP -h | grep -i WinNT`" ; then
5541 AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
5546 dnl ===================================================================
5547 dnl Windows builds need unicows.dll in external/unicows/
5548 dnl ===================================================================
5549 if test "$_os" = "WINNT"; then
5550 AC_MSG_CHECKING([for unicows.dll])
5551 if test -x ./external/unicows/unicows.dll; then
5552 AC_MSG_RESULT([found])
5554 AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
5555 Get it from the Microsoft site and put it into external/unicows.
5556 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5557 may have to search Microsoft's website.) Last time it was seen at:
5558 <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
5562 dnl ===================================================================
5563 dnl Windows builds need dbghelp.dll in external/dbghelp/
5564 dnl ===================================================================
5565 if test "$_os" = "WINNT"; then
5566 AC_MSG_CHECKING([for dbghelp.dll])
5567 if test -x ./external/dbghelp/dbghelp.dll; then
5568 AC_MSG_RESULT([found])
5570 AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
5571 Get it from the Microsoft site and put it into external/dbghelp.
5572 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5573 may have to search Microsoft's website.) Last time it was seen at:
5574 <http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
5578 dnl ===================================================================
5579 dnl Windows builds - use oowintool to copy CRT dlls and manifest
5580 dnl ===================================================================
5581 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5582 if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
5585 AC_MSG_ERROR([oowintool failed to copy CRT])
5589 dnl ===================================================================
5590 dnl Windows builds need gdiplus.dll in external/gdiplus/
5591 dnl ===================================================================
5592 if test "$_os" = "WINNT"; then
5593 AC_MSG_CHECKING([for gdiplus.dll])
5594 if test -x ./external/gdiplus/gdiplus.dll; then
5595 AC_MSG_RESULT([found])
5597 AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
5598 Get it from the Microsoft site and put it into external/gdiplus.
5599 You may have to search Microsoft's website. Last time it was seen at:
5600 <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
5604 dnl ===================================================================
5605 dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
5606 dnl ===================================================================
5607 if test "$_os" = "WINNT"; then
5608 ./oowintool --msvc-copy-instmsi ./external/msi
5611 dnl ===================================================================
5612 dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
5613 dnl ===================================================================
5614 if test "$_os" = "WINNT"; then
5615 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
5616 AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
5617 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
5618 AC_MSG_RESULT([found])
5620 MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1`
5621 MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1`
5622 if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
5623 cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
5624 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
5626 if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
5627 AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
5628 These programs are part of the Visual Studio installation and should be found in a
5629 directory similar to:
5630 "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
5631 As the automatic detection fails please copy the files to external/msi/.])
5633 AC_MSG_RESULT([found and copied])
5639 dnl ===================================================================
5640 dnl Test which vclplugs have to be built.
5641 dnl ===================================================================
5642 AC_MSG_CHECKING([which VCLplugs shall be built])
5644 if test "x$enable_gtk" = "xyes"; then
5648 AC_SUBST(ENABLE_GTK)
5651 if test "x$enable_kde" = "xyes"; then
5655 AC_SUBST(ENABLE_KDE)
5658 if test "x$enable_kde4" = "xyes"; then
5662 AC_SUBST(ENABLE_KDE4)
5664 if test -z "$R"; then
5665 AC_MSG_RESULT([none])
5670 dnl ===================================================================
5672 dnl ===================================================================
5675 AC_MSG_CHECKING([whether to enable GConf support])
5676 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
5678 AC_MSG_RESULT([yes])
5679 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5683 AC_SUBST(ENABLE_GCONF)
5685 dnl ===================================================================
5687 dnl ===================================================================
5690 AC_MSG_CHECKING([whether to enable GNOME VFS support])
5691 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
5692 ENABLE_GNOMEVFS="TRUE"
5693 AC_MSG_RESULT([yes])
5694 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
5695 if test "$ENABLE_GCONF" != "TRUE"; then
5696 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5701 AC_SUBST(ENABLE_GNOMEVFS)
5703 dnl ===================================================================
5704 dnl Check whether the gtk 2.0 libraries are available.
5705 dnl ===================================================================
5709 ENABLE_SYSTRAY_GTK=""
5711 if test "$test_gtk" = "yes"; then
5713 if test "$ENABLE_GTK" = "TRUE" ; then
5714 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]))
5715 BUILD_TYPE="$BUILD_TYPE GTK"
5717 if test "x$enable_systray" = "xyes"; then
5718 ENABLE_SYSTRAY_GTK="TRUE"
5719 BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
5722 AC_MSG_CHECKING([whether to enable DBUS support])
5723 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
5725 AC_MSG_RESULT([yes])
5726 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
5731 AC_MSG_CHECKING([whether to enable GIO support])
5732 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
5733 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
5734 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
5737 AC_MSG_RESULT([yes])
5738 PKG_CHECK_MODULES( GIO, gio-2.0 )
5746 AC_SUBST(ENABLE_GIO)
5747 AC_SUBST(ENABLE_DBUS)
5748 AC_SUBST(ENABLE_SYSTRAY_GTK)
5749 AC_SUBST(GTK_CFLAGS)
5752 dnl ===================================================================
5753 dnl Check whether the Cairo libraries are available.
5754 dnl ===================================================================
5760 if test "$test_cairo" = "yes"; then
5762 AC_MSG_CHECKING([whether to use cairo])
5763 if test "x$enable_cairo" != "xno" ; then
5765 AC_MSG_RESULT([yes])
5766 AC_MSG_CHECKING([which cairo to use])
5767 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
5768 test "$with_system_cairo" != "no"; then
5769 AC_MSG_RESULT([external])
5772 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5773 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
5774 AC_MSG_ERROR([Cairo library requires fontconfig.])
5776 if test "$with_system_xrender_headers" = "yes"; then
5777 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
5779 #include <X11/extensions/Xrender.h>
5781 int main(int argc, char **argv) {
5782 #ifdef PictStandardA8
5788 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
5791 BUILD_TYPE="$BUILD_TYPE CAIRO"
5792 dnl === compiler fails on pixman with 64bit architectures...===
5793 if test "$build_cpu" != "x86_64"; then
5796 AC_MSG_RESULT([internal])
5803 AC_SUBST(ENABLE_CAIRO)
5804 AC_SUBST(BUILD_PIXMAN)
5805 AC_SUBST(SYSTEM_CAIRO)
5806 AC_SUBST(CAIRO_CFLAGS)
5807 AC_SUBST(CAIRO_LIBS)
5809 dnl ===================================================================
5810 dnl Check whether the OpenGL libraries are available
5811 dnl ===================================================================
5813 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
5816 if test "x$enable_opengl" != "xno" ; then
5817 AC_MSG_RESULT([yes])
5818 AC_CHECK_HEADER(GL/gl.h, [],
5819 [AC_MSG_ERROR([OpenGL headers not found])], [])
5820 AC_CHECK_LIB(GL, main, [],
5821 [AC_MSG_ERROR(libGL not installed or functional)], [])
5822 AC_CHECK_LIB(GLU, main, [],
5823 [AC_MSG_ERROR(libGLU not installed or functional)], [])
5829 AC_SUBST(ENABLE_OPENGL)
5831 AC_MSG_CHECKING([whether to build extra presenter ui])
5832 if test -n "$enable_presenter_extra_ui" -a "$enable_presenter_extra_ui" != "no"; then
5833 AC_MSG_RESULT([yes])
5834 ENABLE_PRESENTER_EXTRA_UI=YES
5837 ENABLE_PRESENTER_EXTRA_UI=NO
5839 AC_SUBST(ENABLE_PRESENTER_EXTRA_UI)
5841 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
5842 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
5843 AC_MSG_RESULT([yes])
5844 ENABLE_MINIMIZER=YES
5849 AC_SUBST(ENABLE_MINIMIZER)
5851 AC_MSG_CHECKING([whether to build the Presenter Screen extension])
5852 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
5853 AC_MSG_RESULT([yes])
5854 ENABLE_PRESENTER_SCREEN=YES
5857 ENABLE_PRESENTER_SCREEN=NO
5859 AC_SUBST(ENABLE_PRESENTER_SCREEN)
5861 AC_MSG_CHECKING([whether to build the PDF Import extension])
5862 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
5863 AC_MSG_RESULT([yes])
5864 ENABLE_PDFIMPORT=YES
5866 dnl ===================================================================
5867 dnl Check for system poppler
5868 dnl ===================================================================
5869 AC_MSG_CHECKING([which pdf backend to use])
5870 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
5871 test "$with_system_poppler" != "no"; then
5872 AC_MSG_RESULT([external])
5874 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
5876 AC_MSG_RESULT([internal])
5878 BUILD_TYPE="$BUILD_TYPE XPDF"
5879 AC_MSG_CHECKING([for xpdf module])
5880 if test -d ./xpdf; then
5883 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5890 AC_SUBST(ENABLE_PDFIMPORT)
5891 AC_SUBST(SYSTEM_POPPLER)
5892 AC_SUBST(POPPLER_CFLAGS)
5893 AC_SUBST(POPPLER_LIBS)
5895 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
5896 AC_MSG_CHECKING([for sdext module])
5897 if test -d ./sdext; then
5900 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5902 BUILD_TYPE="$BUILD_TYPE SDEXT"
5905 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
5906 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
5907 AC_MSG_RESULT([yes])
5908 AC_MSG_CHECKING([for swext module])
5909 if test -d ./swext; then
5912 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5914 ENABLE_MEDIAWIKI=YES
5915 BUILD_TYPE="$BUILD_TYPE SWEXT"
5920 AC_SUBST(ENABLE_MEDIAWIKI)
5922 if test "$ENABLE_MEDIAWIKI" = "YES"; then
5923 AC_MSG_CHECKING([which Servlet API Jar to use])
5924 if test -n "$with_system_servlet_api"; then
5925 AC_MSG_RESULT([external])
5926 SYSTEM_SERVLETAPI=YES
5927 if test -z "$SERVLETAPI_JAR"; then
5928 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
5930 AC_CHECK_FILE($SERVLETAPI_JAR, [],
5931 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
5933 AC_MSG_RESULT([internal])
5934 SYSTEM_SERVLETAPI=NO
5935 BUILD_TYPE="$BUILD_TYPE TOMCAT"
5938 AC_SUBST(SYSTEM_SERVLETAPI)
5939 AC_SUBST(SERVLETAPI_JAR)
5941 AC_MSG_CHECKING([whether to build the Report Builder extension])
5942 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
5943 AC_MSG_RESULT([yes])
5944 ENABLE_REPORTBUILDER=YES
5945 AC_MSG_CHECKING([for reportbuilder module])
5946 if test -d ./reportbuilder; then
5949 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5951 AC_MSG_CHECKING([which jfreereport libs to use])
5952 if test "$with_system_jfreereport" = "yes"; then
5953 SYSTEM_JFREEREPORT=YES
5954 AC_MSG_RESULT([external])
5955 if test -z $SAC_JAR; then
5956 SAC_JAR=/usr/share/java/sac.jar
5958 AC_CHECK_FILE($SAC_JAR, [],
5959 [AC_MSG_ERROR(sac.jar not found.)], [])
5961 if test -z $LIBXML_JAR; then
5962 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
5963 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
5965 AC_CHECK_FILE(/usr/share/java/libxml.jar,
5966 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
5967 [AC_MSG_ERROR(libxml.jar replacement not found.)]
5972 AC_CHECK_FILE($LIBXML_JAR, [],
5973 [AC_MSG_ERROR(libxml.jar not found.)], [])
5976 if test -z $FLUTE_JAR; then
5977 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
5978 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
5980 AC_CHECK_FILE(/usr/share/java/flute.jar,
5981 [ FLUTE_JAR=/usr/share/java/flute.jar ],
5982 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
5987 AC_CHECK_FILE($FLUTE_JAR, [],
5988 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
5991 if test -z $JFREEREPORT_JAR; then
5992 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
5993 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
5995 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
5996 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
5997 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
6002 AC_CHECK_FILE($JFREEREPORT_JAR, [],
6003 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
6006 if test -z $LIBLAYOUT_JAR; then
6007 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
6008 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
6010 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
6011 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
6012 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
6017 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
6018 [AC_MSG_ERROR(liblayout.jar not found.)], [])
6021 if test -z $LIBLOADER_JAR; then
6022 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
6023 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
6025 AC_CHECK_FILE(/usr/share/java/libloader.jar,
6026 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
6027 [AC_MSG_ERROR(libloader.jar replacement not found.)]
6032 AC_CHECK_FILE($LIBLOADER_JAR, [],
6033 [AC_MSG_ERROR(libloader.jar not found.)], [])
6036 if test -z $LIBFORMULA_JAR; then
6037 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
6038 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
6040 AC_CHECK_FILE(/usr/share/java/libformula.jar,
6041 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
6042 [AC_MSG_ERROR(libformula.jar replacement not found.)]
6047 AC_CHECK_FILE($LIBFORMULA_JAR, [],
6048 [AC_MSG_ERROR(libformula.jar not found.)], [])
6051 if test -z $LIBREPOSITORY_JAR; then
6052 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
6053 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
6055 AC_CHECK_FILE(/usr/share/java/librepository.jar,
6056 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
6057 [AC_MSG_ERROR(librepository.jar replacement not found.)]
6062 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
6063 [AC_MSG_ERROR(librepository.jar not found.)], [])
6066 if test -z $LIBFONTS_JAR; then
6067 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
6068 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
6070 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
6071 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
6072 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
6077 AC_CHECK_FILE($LIBFONTS_JAR, [],
6078 [AC_MSG_ERROR(libfonts.jar not found.)], [])
6081 if test -z $LIBSERIALIZER_JAR; then
6082 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
6083 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
6085 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
6086 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
6087 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
6092 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
6093 [AC_MSG_ERROR(libserializer.jar not found.)], [])
6097 if test -z $LIBBASE_JAR; then
6098 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
6099 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
6101 AC_CHECK_FILE(/usr/share/java/libbase.jar,
6102 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
6103 [AC_MSG_ERROR(libbase.jar replacement not found.)]
6108 AC_CHECK_FILE($LIBBASE_JAR, [],
6109 [AC_MSG_ERROR(libbase.jar not found.)], [])
6113 AC_MSG_RESULT([internal])
6114 AC_MSG_CHECKING([for jfreereport module])
6115 if test -d ./jfreereport; then
6118 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
6120 SYSTEM_JFREEREPORT=NO
6121 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
6123 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
6126 ENABLE_REPORTBUILDER=NO
6127 SYSTEM_JFREEREPORT=NO
6129 AC_SUBST(ENABLE_REPORTBUILDER)
6130 AC_SUBST(SYSTEM_JFREEREPORT)
6132 AC_SUBST(LIBXML_JAR)
6134 AC_SUBST(JFREEREPORT_JAR)
6135 AC_SUBST(LIBBASE_JAR)
6136 AC_SUBST(LIBLAYOUT_JAR)
6137 AC_SUBST(LIBLOADER_JAR)
6138 AC_SUBST(LIBFORMULA_JAR)
6139 AC_SUBST(LIBREPOSITORY_JAR)
6140 AC_SUBST(LIBFONTS_JAR)
6141 AC_SUBST(LIBSERIALIZER_JAR)
6143 # this has to be here because both the wiki publisher and the SRB use
6145 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6146 AC_MSG_CHECKING([which Apache commons-* libs to use])
6147 if test "$with_system_apache_commons" = "yes"; then
6148 SYSTEM_APACHE_COMMONS=YES
6149 AC_MSG_RESULT([external])
6150 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6151 if test -z $COMMONS_CODEC_JAR; then
6152 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
6153 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
6155 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
6156 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
6157 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
6162 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
6163 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
6166 if test -z $COMMONS_LANG_JAR; then
6167 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
6168 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
6170 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
6171 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
6172 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
6177 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
6178 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
6181 if test -z $COMMONS_HTTPCLIENT_JAR; then
6182 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
6183 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
6185 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
6186 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
6187 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
6192 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
6193 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
6196 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6197 if test -z $COMMONS_LOGGING_JAR; then
6198 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
6199 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
6201 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
6202 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
6203 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
6208 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
6209 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
6213 AC_MSG_RESULT([internal])
6214 SYSTEM_APACHE_COMMONS=NO
6215 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
6218 AC_SUBST(SYSTEM_APACHE_COMMONS)
6219 AC_SUBST(COMMONS_CODEC_JAR)
6220 AC_SUBST(COMMONS_LANG_JAR)
6221 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
6222 AC_SUBST(COMMONS_LOGGING_JAR)
6224 dnl ===================================================================
6225 dnl Check whether the Qt and KDE libraries are available.
6226 dnl ===================================================================
6231 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
6232 dnl Search paths for Qt and KDE
6233 if test "$build_cpu" != "x86_64" ; then
6234 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"
6235 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"
6237 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"
6238 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"
6240 if test -n "$QTDIR" ; then
6241 qt_incdirs="$QTDIR/include $qt_incdirs"
6242 if test "$build_cpu" != "x86_64" ; then
6243 qt_libdirs="$QTDIR/lib $qt_libdirs"
6245 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
6248 if test "$build_cpu" != "x86_64" ; then
6249 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"
6250 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"
6252 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"
6253 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"
6255 if test -n "$KDEDIR" ; then
6256 kde_incdirs="$KDEDIR/include $kde_incdirs"
6257 if test "$build_cpu" != "x86_64" ; then
6258 kde_libdirs="$KDEDIR/lib $kde_libdirs"
6260 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
6265 qt_test_include="qstyle.h"
6266 qt_test_library="libqt-mt.so"
6267 kde_test_include="ksharedptr.h"
6268 kde_test_library="libkdeui.so"
6270 dnl Check for Qt headers
6271 AC_MSG_CHECKING([for Qt headers])
6273 for kde_check in $qt_incdirs ; do
6274 if test -r "$kde_check/$qt_test_include" ; then
6275 qt_incdir="$kde_check"
6279 AC_MSG_RESULT([$qt_incdir])
6280 if test "x$qt_incdir" = "xno" ; then
6281 AC_MSG_ERROR([Qt headers not found. Please specify the root of
6282 your Qt installation by exporting QTDIR before running "configure".])
6285 dnl Check for Qt libraries
6286 AC_MSG_CHECKING([for Qt libraries])
6288 for qt_check in $qt_libdirs ; do
6289 if test -r "$qt_check/$qt_test_library" ; then
6290 qt_libdir="$qt_check"
6294 AC_MSG_RESULT([$qt_libdir])
6295 if test "x$qt_libdir" = "xno" ; then
6296 AC_MSG_ERROR([Qt libraries not found. Please specify the root of
6297 your Qt installation by exporting QTDIR before running "configure".])
6300 dnl Check for Meta Object Compiler
6301 AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
6302 if test "$MOC" = "no" ; then
6303 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6304 the root of your Qt installation by exporting QTDIR before running "configure".])
6307 dnl Check for KDE headers
6308 AC_MSG_CHECKING([for KDE headers])
6310 for kde_check in $kde_incdirs ; do
6311 if test -r "$kde_check/$kde_test_include" ; then
6312 kde_incdir="$kde_check"
6316 AC_MSG_RESULT([$kde_incdir])
6317 if test "x$kde_incdir" = "xno" ; then
6318 AC_MSG_ERROR([KDE headers not found. Please specify the root of
6319 your KDE installation by exporting KDEDIR before running "configure".])
6322 dnl Check for KDE libraries
6323 AC_MSG_CHECKING([for KDE libraries])
6325 for kde_check in $kde_libdirs ; do
6326 if test -r "$kde_check/$kde_test_library" ; then
6327 kde_libdir="$kde_check"
6331 AC_MSG_RESULT([$kde_libdir])
6332 if test "x$kde_libdir" = "xno" ; then
6333 AC_MSG_ERROR([KDE libraries not found. Please specify the root of
6334 your KDE installation by exporting KDEDIR before running "configure".])
6337 dnl Set the variables
6338 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6339 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
6341 AC_SUBST(KDE_CFLAGS)
6345 dnl ===================================================================
6346 dnl KDE4 Integration
6347 dnl ===================================================================
6352 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
6353 qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes"
6354 qt_libdirs="$QT4LIB /usr/lib $x_libraries"
6356 kde_incdirs="/usr/include $x_includes"
6357 kde_libdirs="/usr/lib $x_libraries"
6359 if test "$build_cpu" = "x86_64" ; then
6360 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
6361 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
6364 if test -n "$KDE4DIR" ; then
6365 kde_incdirs="$KDE4DIR/include $kde_incdirs"
6366 if test "$build_cpu" != "x86_64" ; then
6367 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
6369 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
6373 qt_test_include="Qt/qobject.h"
6374 qt_test_library="libQtCore.so"
6375 kde_test_include="ksharedptr.h"
6376 kde_test_library="libkdeui.so"
6378 AC_MSG_CHECKING([for Qt4 headers])
6380 for inc_dir in $qt_incdirs ; do
6381 if test -r "$inc_dir/$qt_test_include" ; then
6382 qt_header_dir="$inc_dir"
6387 AC_MSG_RESULT([$qt_header_dir])
6388 if test "x$qt_header_dir" = "xno" ; then
6389 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6392 AC_MSG_CHECKING([for Qt4 libraries])
6394 for lib_dir in $qt_libdirs ; do
6395 if test -r "$lib_dir/$qt_test_library" ; then
6396 qt_lib_dir="$lib_dir"
6401 AC_MSG_RESULT([$qt_lib_dir])
6403 if test "x$qt_lib_dir" = "xno" ; then
6404 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6407 dnl Check for Meta Object Compiler
6408 AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
6409 if test "$MOC4" = "no" ; then
6410 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6411 the root of your Qt installation by exporting QT4DIR before running "configure".])
6414 dnl Check for KDE4 headers
6415 AC_MSG_CHECKING([for KDE4 headers])
6417 for kde_check in $kde_incdirs ; do
6418 if test -r "$kde_check/$kde_test_include" ; then
6419 kde_incdir="$kde_check"
6423 AC_MSG_RESULT([$kde_incdir])
6424 if test "x$kde_incdir" = "xno" ; then
6425 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6428 dnl Check for KDE4 libraries
6429 AC_MSG_CHECKING([for KDE4 libraries])
6431 for kde_check in $kde_libdirs ; do
6432 if test -r "$kde_check/$kde_test_library" ; then
6433 kde_libdir="$kde_check"
6438 AC_MSG_RESULT([$kde_libdir])
6439 if test "x$kde_libdir" = "xno" ; then
6440 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6443 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6444 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
6446 AC_SUBST(KDE4_CFLAGS)
6450 dnl ===================================================================
6451 dnl Test for the enabling the lockdown pieces
6452 dnl ===================================================================
6453 AC_MSG_CHECKING([whether to enable the lockdown pieces])
6455 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
6457 AC_MSG_RESULT([yes])
6461 AC_SUBST(ENABLE_LOCKDOWN)
6463 dnl ===================================================================
6464 dnl Test whether to include Evolution 2 support
6465 dnl ===================================================================
6466 AC_MSG_CHECKING([whether to enable evolution 2 support])
6467 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
6468 AC_MSG_RESULT([yes])
6469 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
6470 ENABLE_EVOAB2="TRUE"
6475 AC_SUBST(ENABLE_EVOAB2)
6476 AC_SUBST(GOBJECT_CFLAGS)
6477 AC_SUBST(GOBJECT_LIBS)
6479 dnl ===================================================================
6480 dnl Test whether to include KDE AB support
6481 dnl ===================================================================
6482 AC_MSG_CHECKING([whether to enable KDE address book support])
6483 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
6484 AC_MSG_RESULT([yes])
6486 save_CXXFLAGS=$CXXFLAGS
6487 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
6488 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
6490 #include <kdeversion.h>
6492 int main(int argc, char **argv) {
6493 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
6496 ], [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])])
6497 CXXFLAGS=$save_CXXFLAGS
6504 AC_SUBST(ENABLE_KAB)
6506 dnl ===================================================================
6507 dnl Test whether to include MathMLDTD
6508 dnl ===================================================================
6509 AC_MSG_CHECKING([whether to include MathMLDTD])
6510 if test -n "$enable_mathmldtd"; then
6511 if test "$enable_mathmldtd" = "no"; then
6513 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6515 AC_MSG_RESULT([yes])
6516 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
6520 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6523 dnl ===================================================================
6524 dnl Test whether to include fonts
6525 dnl ===================================================================
6526 AC_MSG_CHECKING([whether to include third-party fonts])
6527 if test "$with_fonts" != "no" ; then
6528 AC_MSG_RESULT([yes])
6530 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
6534 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
6536 AC_SUBST(WITH_FONTS)
6538 dnl ===================================================================
6539 dnl Test whether to include ppds
6540 dnl ===================================================================
6541 AC_MSG_CHECKING([whether to include PPDs])
6542 if test "$with_ppds" != "no"; then
6543 AC_MSG_RESULT([yes])
6547 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
6549 AC_SUBST(WITHOUT_PPDS)
6551 dnl ===================================================================
6552 dnl Test whether to include afms
6553 dnl ===================================================================
6554 AC_MSG_CHECKING([whether to include AFMs])
6555 if test "$with_afms" != "no"; then
6556 AC_MSG_RESULT([yes])
6560 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
6562 AC_SUBST(WITHOUT_AFMS)
6566 AC_MSG_CHECKING([whether and how to use Xinerama])
6567 if test "$_os" = "Darwin"; then
6569 XINERAMA_LINK=dynamic
6570 AC_MSG_RESULT([yes])
6571 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
6572 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
6573 # we have both versions, let the user decide but use the dynamic one
6576 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
6577 XINERAMA_LINK=dynamic
6579 XINERAMA_LINK=static
6581 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
6582 # we have only the dynamic version
6584 XINERAMA_LINK=dynamic
6585 elif test -e "$XLIB/libXinerama.a"; then
6587 if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6589 XINERAMA_LINK=static
6599 if test "$USE_XINERAMA" = "YES"; then
6600 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
6601 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
6602 [AC_MSG_ERROR(Xinerama header not found.)], [])
6603 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
6604 if test "$_os" = "FreeBSD"; then
6605 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
6607 if test "$_os" = "Linux"; then
6608 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
6610 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
6611 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
6613 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
6618 AC_SUBST(USE_XINERAMA)
6619 AC_SUBST(XINERAMA_LINK)
6621 dnl ===================================================================
6622 dnl Test for the presence of Ant and that it works
6623 dnl ===================================================================
6625 if test "$SOLAR_JAVA" != ""; then
6626 ANT_HOME=; export ANT_HOME
6627 WITH_ANT_HOME=; export WITH_ANT_HOME
6628 if test -z "$with_ant_home"; then
6629 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
6631 if test "$_os" = "WINNT"; then
6632 with_ant_home=`cygpath -u "$with_ant_home"`
6634 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
6635 WITH_ANT_HOME=$with_ant_home
6636 ANT_HOME=$with_ant_home
6639 if test -z "$ANT"; then
6640 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
6642 # resolve relative or absolute symlink
6643 while test -h "$ANT"; do
6645 a_basename=`basename "$ANT"`
6646 a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
6647 cd "`dirname "$ANT"`"
6648 cd "`dirname "$a_script"`"
6649 ANT="`pwd`"/"`basename "$a_script"`"
6653 if test "$_os" = "OS2"; then
6654 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6658 AC_MSG_CHECKING([if $ANT works])
6659 cat > conftest.java << EOF
6660 public class conftest {
6661 int testmethod(int a, int b) {
6667 cat > conftest.xml << EOF
6668 <project name="conftest" default="conftest">
6669 <target name="conftest">
6670 <javac srcdir="." includes="conftest.java">
6675 oldJAVA_HOME=$JAVA_HOME
6676 if test "$JAVACISGCJ" = "yes"; then
6677 JAVA_HOME=; export JAVA_HOME
6678 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6680 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6682 AC_TRY_EVAL(ant_cmd)
6683 if test $? = 0 && test -f ./conftest.class ; then
6684 AC_MSG_RESULT([Ant works])
6685 if test -z "$WITH_ANT_HOME"; then
6686 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
6687 if test -z "$ANT_HOME"; then
6688 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6691 ANT_HOME="$WITH_ANT_HOME"
6694 echo "configure: Ant test failed" >&5
6695 cat conftest.java >&5
6696 cat conftest.xml >&5
6697 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
6699 echo "Ant does not work - Some Java projects will not build!" >>warn
6701 JAVA_HOME=$oldJAVA_HOME
6702 rm -f conftest* core core.* *.core
6704 if test -z "$ANT_HOME"; then
6705 ANT_HOME="NO_ANT_HOME"
6709 dnl Checking for ant.jar
6710 if test "$ANT_HOME" != "NO_ANT_HOME"; then
6711 AC_MSG_CHECKING([Ant lib directory])
6712 if test -f $ANT_HOME/lib/ant.jar; then
6713 ANT_LIB="$ANT_HOME/lib"
6715 if test -f $ANT_HOME/ant.jar; then
6718 if test -f /usr/share/java/ant.jar; then
6719 ANT_LIB=/usr/share/java
6721 if test -f /usr/share/ant-core/lib/ant.jar; then
6722 ANT_LIB=/usr/share/ant-core/lib
6724 if test -f $ANT_HOME/lib/ant/ant.jar; then
6725 ANT_LIB="$ANT_HOME/lib/ant"
6727 AC_MSG_ERROR([Ant libraries not found!])
6733 AC_MSG_RESULT([Ant lib directory found.])
6739 # update for more extensions...
6740 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6743 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
6745 AC_MSG_CHECKING([whether ant is >= $ant_minver])
6746 ant_version=`$ANT -version | $AWK '{ print $4; }'`
6747 ant_version_major=`echo $ant_version | cut -d. -f1`
6748 ant_version_minor=`echo $ant_version | cut -d. -f2`
6749 echo "configure: ant_version $ant_version " >&5
6750 echo "configure: ant_version_major $ant_version_major " >&5
6751 echo "configure: ant_version_minor $ant_version_minor " >&5
6752 if test "$ant_version_major" -ge "2"; then
6753 AC_MSG_RESULT([yes, $ant_version])
6754 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
6755 AC_MSG_RESULT([yes, $ant_version])
6757 AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
6760 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6761 AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
6764 cat > conftest.java << EOF
6765 public class conftest {
6766 int testmethod(int a, int b) {
6772 cat > conftest.xml << EOF
6773 <project name="conftest" default="conftest">
6774 <target name="conftest" depends="copytest">
6775 <javac srcdir="." includes="conftest.java">
6778 <target name="copytest">
6779 <copy todir="confdir">
6780 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
6782 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
6787 if test "$JAVACISGCJ" = "yes"; then
6788 JAVA_HOME=; export JAVA_HOME
6789 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6791 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6793 AC_TRY_EVAL(ant_cmd)
6794 if test $? = 0 && test -f ./conftest.class ; then
6795 AC_MSG_RESULT([yes])
6798 echo "configure: Ant test failed" >&5
6799 cat conftest.java >&5
6800 cat conftest.xml >&5
6802 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
6805 rm -f conftest* core core.* *.core
6808 if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
6809 AC_MSG_CHECKING([for JUnit 4])
6810 if test "$with_junit" == "yes"; then
6811 if test -e /usr/share/java/junit4.jar; then
6812 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
6814 OOO_JUNIT_JAR=/usr/share/java/junit.jar
6817 OOO_JUNIT_JAR=$with_junit
6819 if test "$_os" = "WINNT"; then
6820 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
6822 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
6823 grep org/junit/Before.class > /dev/null 2>&5
6824 if test $? -eq 0; then
6825 AC_MSG_RESULT([$OOO_JUNIT_JAR])
6828 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
6829 location (/usr/share/java), specify its pathname via
6830 --with-junit=..., or disable it via --without-junit])
6833 AC_SUBST(OOO_JUNIT_JAR)
6835 AC_MSG_CHECKING([which languages to be built])
6836 WITH_LANG="$with_lang"
6837 if test -z "$WITH_LANG"; then
6838 AC_MSG_RESULT([en-US])
6840 AC_MSG_RESULT([$WITH_LANG])
6844 AC_MSG_CHECKING([which languages have poor help localizations])
6845 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
6846 if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
6847 AC_MSG_RESULT([none])
6849 AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
6851 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
6853 AC_MSG_CHECKING([which dictionaries to include])
6854 if test -z "$with_dict"; then
6856 AC_MSG_RESULT([ALL])
6858 WITH_DICT=","$with_dict","
6859 AC_MSG_RESULT([$with_dict])
6863 AC_MSG_CHECKING([for additional 'intro' bitmaps])
6865 if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
6867 AC_MSG_RESULT([none])
6869 for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
6872 *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
6874 if test -n "$bitmap" ; then
6875 INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
6878 AC_MSG_RESULT([$INTRO_BITMAPS])
6880 AC_SUBST(INTRO_BITMAPS)
6882 AC_MSG_CHECKING([for additional 'about' bitmaps])
6884 if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
6886 AC_MSG_RESULT([none])
6888 for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
6891 *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
6893 if test -n "$bitmap" ; then
6894 ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
6897 AC_MSG_RESULT([$ABOUT_BITMAPS])
6899 AC_SUBST(ABOUT_BITMAPS)
6902 AC_MSG_CHECKING([for vendor])
6903 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
6904 AC_MSG_RESULT([not set])
6906 OOO_VENDOR="$with_vendor"
6907 AC_MSG_RESULT([$OOO_VENDOR])
6909 AC_SUBST(OOO_VENDOR)
6912 AC_MSG_CHECKING([for UNIX wrapper name])
6913 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
6914 AC_MSG_RESULT([not set])
6916 UNIXWRAPPERNAME="$with_unix_wrapper"
6917 AC_MSG_RESULT([$UNIXWRAPPERNAME])
6919 AC_SUBST(UNIXWRAPPERNAME)
6921 AC_MSG_CHECKING([whether to statically link to Gtk])
6922 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
6923 ENABLE_STATIC_GTK="TRUE"
6924 AC_MSG_RESULT([yes])
6926 ENABLE_STATIC_GTK="FALSE"
6929 AC_SUBST(ENABLE_STATIC_GTK)
6931 AC_MSG_CHECKING([whether to use layout dialogs])
6932 if test -n "$enable_layout" && test "$enable_layout" != "no"; then
6933 ENABLE_LAYOUT="TRUE"
6934 AC_MSG_RESULT([yes])
6936 ENABLE_LAYOUT="FALSE"
6939 AC_SUBST(ENABLE_LAYOUT)
6941 # ===================================================================
6942 # De- or increase default verbosity of build process
6943 # ===================================================================
6944 AC_MSG_CHECKING([build verbosity])
6945 if test -n "$enable_verbose"; then
6946 if test "$enable_verbose" = "yes"; then
6948 AC_MSG_RESULT([high])
6950 if test "$enable_verbose" = "no"; then
6952 AC_MSG_RESULT([low])
6955 AC_MSG_RESULT([not set])
6959 dnl ===================================================================
6960 dnl Hook up OOos nodep environmental variable to automake's equivalent
6961 dnl --enable-dependency-tracking configure option
6962 dnl ===================================================================
6963 AC_MSG_CHECKING([whether to enable dependency tracking])
6964 if test "$enable_dependency_tracking" = "no"; then
6968 AC_MSG_RESULT([yes])
6972 dnl ===================================================================
6973 dnl Setting up the environment.
6974 dnl ===================================================================
6975 echo "********************************************************************"
6977 echo "* Setting up the build environment variables. *"
6979 echo "********************************************************************"
6981 if test -z "$COMPATH"; then
6982 AC_MSG_ERROR([No compiler found.])
6986 AC_MSG_CHECKING([solver path])
6987 if test -z "$with_local_solver"; then
6988 LOCAL_SOLVER="DEFAULT"
6989 AC_MSG_RESULT([default])
6991 LOCAL_SOLVER=$with_local_solver
6992 AC_MSG_RESULT([$with_local_solver])
6994 AC_SUBST(LOCAL_SOLVER)
6996 AC_SUBST(BUILD_TYPE)
6998 # make sure config.guess is +x; we execute config.guess, so it has to be so;
6999 chmod +x ./config.guess
7001 AC_OUTPUT([set_soenv Makefile])
7003 dnl Executing the set_soenv script to setup the environment variables.
7005 if test -z "$enable_check_only"; then
7010 echo No environment file will be generated
7012 num_warnings=`wc -l warn`
7013 _num=`echo $num_warnings | $AWK '{ print $1 }'`
7014 if test $_num -gt 0; then
7015 echo The following warning\(s\) were generated by configure
7016 echo ----------------------------------------------------
7021 echo There were no warnings