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++.
73 AC_ARG_ENABLE(mozilla,
74 [ --disable-mozilla OO.o usually includes a strangely hacked up mozilla
75 binary for your platform, to build without this
76 version, use this option.
77 ],,enable_mozilla="yes")
79 [ --without-fonts OOo includes some third-party fonts to provide a reliable
80 basis for help content, templates, samples, etc.
81 When these fonts are already known to be available on the
82 system then you should use this option.
85 [ --without-ppds Removes Postscript Printer definition files from
86 openoffice.org installation set, for people building
87 for specific distributions where PPDs are known to be
88 already available (every recent distro with CUPS
92 [ --without-afms Removes bitmap font files from openoffice.org
93 installation set, for people building for specific
94 distributions where AFM files or TrueType Fonts
95 are known to be available.
98 [ --disable-epm OO.o includes self-packaging code, that requires
99 epm, however epm is useless for large scale
103 [ --with-epm Decides which epm to use. Default is to use
104 the one from the system if one is built. When
105 either this is not there or you say =internal
108 AC_ARG_WITH(package-format,
109 [ --with-package-format specify package format(s) for OOo installsets.
110 Default is "normal" one of the OS/Distribution.
112 Usage: --with-package-format="foo bar"
115 [ --disable-odk OO.o includes an ODK, office development kit
116 which some packagers may with to build without
118 AC_ARG_ENABLE(mathmldtd,
119 [ --disable-mathmldtd disable mathmldtd
120 (useful for distributions that want to avoid packaging
122 ],,enable_mathmldtd="yes")
123 AC_ARG_ENABLE(evolution2,
124 [ --enable-evolution2 Allows the built-in evolution 2 addressbook
125 connectivity build to be enabled.
127 AC_ARG_WITH(system-stdlibs,
128 [ --with-system-stdlibs use libstdc++/libgcc_s already on system
131 [ --disable-cups disable cups support in the psprint project
133 AC_ARG_ENABLE(fontconfig,
134 [ --disable-fontconfig disable support for the fontconfig library
135 ],,enable_fontconfig=yes)
136 AC_ARG_ENABLE(directx,
137 [ --disable-directx Remove DirectX implementation for the new XCanvas
138 interface. The DirectX support requires more stuff
139 installed on Windows to compile.
140 (DirectX SDK, GDI+ libs)
141 ],,enable_directx=yes)
142 AC_ARG_ENABLE(activex,
143 [ --disable-activex Disable the use of ActiveX for windows build.
144 This switch is mandatory when using VC++ 2005/2008 Express.
148 [ --disable-atl Disable the use of ATL for windows build.
149 This switch is mandatory when using VC++ 2005/2008 Express.
152 AC_ARG_ENABLE(symbols,
153 [ --enable-symbols Include debugging symbols in output.
154 WARNING - a complete build needs 8 Gb of space and
155 takes much longer. (enables -g compiler flag)
157 --enable-symbols=SMALL sets the gcc -g1 setting
160 Enabling symbols disables the stripping of the solver
161 (--disable-strip-solver).
163 AC_ARG_ENABLE(strip-solver,
164 [ --disable-strip-solver Disable the stripping of the solver.
165 By default the solver is stripped unless a build with
166 debugging symbols (--enable-symbols) is requested.
168 This switch allows to override this setting.
170 AC_ARG_ENABLE(werror,
171 [ --enable-werror Turn warnings to errors. (Has no effect in modules
172 where the treating of warnings as errors is disabled
176 [ --enable-debug Include debugging symbols from --enable-symbols
177 plus extra debugging code. Extra large build!
178 (enables -g compiler flag and dmake debug=true)
180 AC_ARG_ENABLE(dbgutil,
181 [ --enable-dbgutil Include additional debugging utilities, such as
182 assertions, object counting, etc. Larger build.
183 Independent from --enable-debug
185 AC_ARG_ENABLE(crashdump,
186 [ --enable-crashdump Enable the crashdump feature code.
188 AC_ARG_ENABLE(cl-standard,
189 [ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing
190 standard compiler. ( This just disavles optimization
191 options and therefore removes a lot of warnings when
192 using the cheaper standard compiler. )
195 [ --disable-gtk Determines whether to use Gtk+ vclplug on platforms
196 where Gtk+ is available.
198 AC_ARG_ENABLE(gstreamer,
199 [ --disable-gstreamer Determines whether to use the GStreamer media
200 backend on platforms where GStreamer is available.
201 ],,enable_gstreamer=yes)
202 AC_ARG_ENABLE(systray,
203 [ --disable-systray Determines whether to build the systray quickstarter.
204 ],,enable_systray=yes)
206 [ --enable-cairo Determines whether to use Cairo library on
207 platforms where Cairo is available.
209 AC_ARG_WITH(system-cairo,
210 [ --with-system-cairo Use Cairo libraries already on system
212 AC_ARG_ENABLE(opengl,
213 [ --enable-opengl Determines whether to build the OpenGL 3D slide
214 transitions component
217 [ --enable-dbus Determines whether to enable presentation mode
218 screensaver control under GNOME via DBUS
221 [ --disable-gconf Determines whether to use the GConf support
223 AC_ARG_ENABLE(gnome-vfs,
224 [ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing
225 System on platforms where that VFS is available
226 ],,enable_gnome_vfs=yes)
228 [ --enable-gio Determines whether to use the GIO support
230 AC_ARG_ENABLE(static-gtk,
231 [ --enable-static-gtk Modules that are linked against gtk libraries use
232 the static libraries instead of the dynamic ones.
233 (enables -Bstatic linker flag for gtk libraries)
235 AC_ARG_ENABLE(layout,
236 [ --enable-layout Enable the compilation and use of layout dialogs
238 AC_ARG_ENABLE(build-mozilla,
239 [ --disable-build-mozilla Use this option if you do not want to build the
240 mozilla components from the mozilla source code but
241 take precompiled zips
243 AC_ARG_WITH(mozilla-version,
244 [ --with-mozilla-version Choose which version of mozilla to use while building
245 mozilla. Default: 1.7.5.
246 Note that not all versions are supported.
248 AC_ARG_WITH(mozilla-toolkit,
249 [ --with-mozilla-toolkit Choose which GUI toolkit to use while building mozilla
250 components. Default: gtk2
252 AC_ARG_ENABLE(nss_module,
253 [ --disable-nss-module Whether to use provided NSS module
254 ],,enable_nss_module=yes)
256 [ --enable-kde Determines whether to use Qt/KDE vclplug on platforms
257 where Qt and KDE are available.
260 [ --disable-kdeab Disable the KDE address book support
261 ],,if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi)
263 [ --enable-kde4 Determines whether to use Qt4/KDE4 vclplug on platforms
264 where Qt4 and KDE4 are available. May be used with --enable-kde
265 if you want to support both KDE3 and KDE4.
267 AC_ARG_ENABLE(binfilter,
268 [ --disable-binfilter Disable legacy binary file formats filters
269 ],,if ! test -d ./binfilter; then enable_binfilter=no; fi)
271 [ --disable-rpath Disable the use of relative paths in shared libraries
274 [ --disable-pam Disable pam support.
276 AC_ARG_ENABLE(pam-link,
277 [ --enable-pam-link link with libpam instead of dynamically open it
279 AC_ARG_ENABLE(crypt-link,
280 [ --disable-crypt-link disable linking with libcrypt instead of dynamically
281 open it (needed for ancient GNU/Linux distributions
282 without crypt()/libcrypt)
283 ],,enable_crypt_link=yes)
284 AC_ARG_ENABLE(xrender-link,
285 [ --enable-xrender-link link with libXrender instead of dynamically open it
288 [ --disable-randr disable RandR support in the vcl project
290 AC_ARG_ENABLE(randr-link,
291 [ --disable-randr-link disable linking with libXrandr, instead dynamically
293 ],,enable_randr_link=yes)
294 AC_ARG_WITH(myspell-dicts,
295 [ --without-myspell-dicts Removes myspell dictionaries from openoffice.org
296 installation set, for people building for specific
297 distributions where the myspell dictionaries are
298 installed from other sources
300 AC_ARG_WITH(system-dicts,
301 [ --with-system-dicts Use dictionaries from system paths- Specify
302 them via --with-{dict,hyph,thes}-path=/path
303 if you want to override the default ones
305 AC_ARG_WITH(external-dict-dir,
306 [ --with-external-dict-dir Specify external dictionary dir
308 AC_ARG_WITH(external-hyph-dir,
309 [ --with-external-hyph-dir Specify external hyphenation pattern dir
311 AC_ARG_WITH(external-thes-dir,
312 [ --with-external-thes-dir Specify external thesaurus dir
314 AC_ARG_WITH(system-libs,
315 [ --with-system-libs Use libs already on system -- enables all
316 --with-system-* flags except mozilla and
317 odbc/sane/xrender-header(s)
319 AC_ARG_WITH(system-headers,
320 [ --with-system-headers Use headers already on system -- enables all
321 --with-system-* flags for external packages
322 whose headers are the only entities used i.e.
323 boost/vigra/odbc/sane/xrender-header(s)
325 AC_ARG_WITH(system-jars,
326 [ --without-system-jars When building with --with-system-libs, also the
327 needed jars are expected on the system. Use this to
329 (except for the db case where --with-system-db
330 *has to* imply using the db.jar from there, too)
332 AC_ARG_WITH(system-zlib,
333 [ --with-system-zlib Use zlib already on system
335 AC_ARG_WITH(system-openssl,
336 [ --with-system-openssl Use OpenSSL already on system
338 AC_ARG_WITH(system-jpeg,
339 [ --with-system-jpeg Use jpeg already on system
341 AC_ARG_WITH(system-expat,
342 [ --with-system-expat Use expat already on system
344 AC_ARG_WITH(system-libwpd,
345 [ --with-system-libwpd Use libwpd already on system
347 AC_ARG_WITH(system-libxml,
348 [ --with-system-libxml Use libxml already on system
350 AC_ARG_WITH(system-python,
351 [ --with-system-python Use python already on system
353 AC_ARG_WITH(system-icu,
354 [ --with-system-icu Use icu already on system
356 AC_ARG_WITH(system-poppler,
357 [ --with-system-poppler Use poppler already on system
359 AC_ARG_WITH(system-db,
360 [ --with-system-db Use berkeley db already on system
362 AC_ARG_WITH(system-lucene,
363 [ --with-system-lucene Use lucene already on system
365 AC_ARG_WITH(lucene-core-jar,
366 [ --with-lucene-core-jar=JARFILE Specify path to jarfile manually ],
367 [ LUCENE_CORE_JAR="$withval"
369 AC_ARG_WITH(lucene-analyzers-jar,
370 [ --with-lucene-analyzers-jar=JARFILE Specify path to jarfile manually ],
371 [ LUCENE_ANALYZERS_JAR="$withval"
373 AC_ARG_ENABLE(mysql-connector,
374 [ --enable-mysql-connector enables the build of the MySQL Connector/OOo extension.
375 This requires access to the MySQL Connector/C (aka libmysql) to be given, too, with
376 either the --with-system-mysql or --with-libmysql-path option.
378 AC_ARG_WITH(system-mysql,
379 [ --with-system-mysql Use MySQL libraries already on system, for building the MySQL Connector/OOo extension.
380 Requires MYSQLCONFIG to point to the mysql_config executable.
382 AC_ARG_WITH(libmysql-path,
383 [ --with-libmysql-path Use Connector/C (libmysql) installation for building the MySQL Connector/OOo extension.
385 Usage: --with-libmysql-path=<absolute path to your Connector/C installation>
387 AC_ARG_WITH(system-mysql-cppconn,
388 [ --with-system-mysql-cppconn Use MySQL C++ Connector libraries already on system
390 AC_ARG_WITH(system-hsqldb,
391 [ --with-system-hsqldb Use hsqldb already on system
393 AC_ARG_WITH(hsqldb-jar,
394 [ --with-hsqldb-jar=JARFILE Specify path to jarfile manually ],
395 [ HSQLDB_JAR="$withval"
397 AC_ARG_WITH(system-beanshell,
398 [ --with-system-beanshell Use beanshell already on system
400 AC_ARG_WITH(beanshell-jar,
401 [ --with-beanshell-jar=JARFILE Specify path to jarfile manually ],
404 AC_ARG_ENABLE(presenter-extra-ui,
405 [ --enable-presenter-extra-ui enables extra functionality during slideshow,
406 e.g. selecting pen color, erasing drawings etc.
407 ],,enable_presenter_extra_ui=no)
408 AC_ARG_ENABLE(minimizer,
409 [ --enable-minimizer enables the build of the Presentation Minimizer extension
411 AC_ARG_ENABLE(presenter-console,
412 [ --enable-presenter-console enables the build of the Presenter Console extension
414 AC_ARG_ENABLE(pdfimport,
415 [ --enable-pdfimport enables the build of the PDF Import extension and xpdf
417 AC_ARG_ENABLE(wiki-publisher,
418 [ --enable-wiki-publisher enables the build of the Wiki Publisher extension
420 AC_ARG_WITH(commons-codec-jar,
421 [ --with-commons-codec-jar=JARFILE Specify path to jarfile manually ],
422 [ COMMONS_CODEC_JAR="$withval"
424 AC_ARG_WITH(commons-lang-jar,
425 [ --with-commons-lang-jar=JARFILE Specify path to jarfile manually ],
426 [ COMMONS_LANG_JAR="$withval"
428 AC_ARG_WITH(commons-httpclient-jar,
429 [ --with-commons-httpclient-jar=JARFILE Specify path to jarfile manually ],
430 [ COMMONS_HTTPCLIENT_JAR="$withval"
432 AC_ARG_WITH(commons-logging-jar,
433 [ --with-commons-logging-jar=JARFILE Specify path to jarfile manually ],
434 [ COMMONS_LOGGING_JAR="$withval"
436 AC_ARG_WITH(servlet-api-jar,
437 [ --servlet-api-jar=JARFILE Specify path to jarfile manually ],
438 [ SERVLETAPI_JAR="$withval"
440 AC_ARG_ENABLE(report-builder,
441 [ --enable-report-builder enables the build of the Report Builder extension
443 AC_ARG_WITH(system-jfreereport,
444 [ --with-system-jfreereport Use JFreeReport already on system
447 [ --with-sac-jar=JARFILE Specify path to jarfile manually ],
450 AC_ARG_WITH(libxml-jar,
451 [ --with-libxml-jar=JARFILE Specify path to jarfile manually ],
452 [ LIBXML_JAR="$withval"
454 AC_ARG_WITH(flute-jar,
455 [ --with-flute-jar=JARFILE Specify path to jarfile manually ],
456 [ FLUTE_JAR="$withval"
458 AC_ARG_WITH(jfreereport-jar,
459 [ --with-jfreereport-jar=JARFILE Specify path to jarfile manually ],
460 [ JFREEREPORT_JAR="$withval"
462 AC_ARG_WITH(liblayout-jar,
463 [ --with-liblayout-jar=JARFILE Specify path to jarfile manually ],
464 [ LIBLAYOUT_JAR="$withval"
466 AC_ARG_WITH(libloader-jar,
467 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
468 [ LIBLOADER_JAR="$withval"
470 AC_ARG_WITH(libloader-jar,
471 [ --with-libloader-jar=JARFILE Specify path to jarfile manually ],
472 [ LIBLOADER_JAR="$withval"
474 AC_ARG_WITH(libformula-jar,
475 [ --with-libformula-jar=JARFILE Specify path to jarfile manually ],
476 [ LIBFORMULA_JAR="$withval"
478 AC_ARG_WITH(librepository-jar,
479 [ --with-librepository-jar=JARFILE Specify path to jarfile manually ],
480 [ LIBREPOSITORY_JAR="$withval"
482 AC_ARG_WITH(libfonts-jar,
483 [ --with-libfonts-jar=JARFILE Specify path to jarfile manually ],
484 [ LIBFONTS_JAR="$withval"
486 AC_ARG_WITH(libserializer-jar,
487 [ --with-libserializer-jar=JARFILE Specify path to jarfile manually ],
488 [ LIBSERIALIZER_JAR="$withval"
490 AC_ARG_WITH(libbase-jar,
491 [ --with-libbase-jar=JARFILE Specify path to jarfile manually ],
492 [ LIBBASE_JAR="$withval"
494 AC_ARG_WITH(system-saxon,
495 [ --with-system-saxon Use saxon already on system
497 AC_ARG_WITH(saxon-jar,
498 [ --with-saxon-jar=JARFILE Specify path to jarfile manually ],
499 [ SAXON_JAR="$withval"
501 AC_ARG_WITH(system-libxslt,
502 [ --with-system-libxslt Use libxslt already on system
504 AC_ARG_WITH(system-odbc,
505 [ --with-system-odbc-headers Use the odbc headers already on system
507 AC_ARG_WITH(system-sane,
508 [ --with-system-sane-header Use sane.h already on system
510 AC_ARG_WITH(system-xrender,
511 [ --with-system-xrender-headers Use XRender headers already on system
513 AC_ARG_WITH(system-curl,
514 [ --with-system-curl Use curl already on system
516 AC_ARG_WITH(system-boost,
517 [ --with-system-boost Use boost already on system
519 AC_ARG_WITH(system-mdds,
520 [ --with-system-mdds Use mdds already on system
522 AC_ARG_WITH(system-vigra,
523 [ --with-system-vigra Use vigra already on system
526 [ --disable-neon Disable neon and the compilation of webdav binding
529 [ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla
532 AC_ARG_WITH(system-neon,
533 [ --with-system-neon Use neon already on system
535 AC_ARG_WITH(system-agg,
536 [ --with-system-agg Use AGG already on system
538 AC_ARG_WITH(system-hunspell,
539 [ --with-system-hunspell Use libhunspell already on system
541 AC_ARG_WITH(system-mythes,
542 [ --with-system-mythes Use mythes already on system
544 AC_ARG_WITH(system-altlinuxhyph,
545 [ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
547 AC_ARG_WITH(system-lpsolve,
548 [ --with-system-lpsolve Use lpsolve already on system
550 AC_ARG_WITH(system-libtextcat,
551 [ --with-system-libtextcat Use libtextcat already on system
553 AC_ARG_WITH(external-libtextcat-data,
554 [ --with-system-libtextcat-data Use libtextcat data already on system
556 AC_ARG_WITH(system-cppunit,
557 [ --with-system-cppunit Use cppunit already on system
559 AC_ARG_WITH(system-redland,
560 [ --with-system-redland Use redland library already on system
562 AC_ARG_WITH(system-mozilla,
563 [ --with-system-mozilla Use mozilla already on system. Note that some
564 components cannot be built against a contemporary
565 mozilla. The flavour used can be specified by
566 --with-system-mozilla=<flavour>. Supported are:
567 libxul (default), xulrunner, firefox, seamonkey,
569 ], WITH_SYSTEM_MOZILLA=$withval, WITH_SYSTEM_MOZILLA=no)
571 [ --with-stlport The location that STLport is installed in. The STL
572 header files are assumed to be in
573 stlport-home/stlport and the STLPort library in
576 Usage: --with-stlport=<absolute path to stlport home>
578 Warning!!, disabling using --without-stlport or
579 enabling using --with-stlport on a platform that
580 defaults to the opposite will break ABI compatability
581 ], WITH_STLPORT=$withval , WITH_STLPORT=auto)
582 AC_ARG_WITH(jdk-home,
583 [ --with-jdk-home if you have installed JDK 1.3 or later on your system
584 please supply the path here.
585 Note that this is not the location of the Java binary
586 but the location of the entire distribution.
588 Usage: --with-jdk-home=<absolute path to JDK home>
590 AC_ARG_WITH(gxx_include_path,
591 [ --with-gxx-include-path if you want to override the autodetected g++ include
594 Usage: --with-gxx-include-path=<absolute path to g++ include dir>
597 [ --with-java Build with[[out]] Java support. If you use
598 --without-java/--with-java=no then the build will have
599 no support for Java components, applets, accessibility
601 ], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java)
602 AC_ARG_ENABLE(gcjaot,
603 [ --enable-gcjaot Build with[[out]] using Ahead of Time java compilation
604 support to speed up buildsi by compiling the jars also
606 --enable-gcjaot is only known to work with bytecode
607 created with gcj or ecj
609 AC_ARG_WITH(ant-home,
610 [ --with-ant-home If you have installed Jakarta Ant on your system,
611 please supply the path here.
612 Note that this is not the location of the Ant binary
613 but the location of the entire distribution.
615 Usage: --with-ant-home=<absolute path to Ant home>
618 [ --with-junit Specifies the JUnit 4 jar file to use for JUnit-based
619 tests. --without-junit disables those tests. Not
620 relevant in the --without-java case.
622 Usage: --with-junit=<absolute path to JUnit 4 jar>
624 AC_ARG_WITH(perl-home,
625 [ --with-perl-home If you have installed the Perl 5 Distribution, on your
626 system, please supply the path here.
627 Note that this is not the location of the Perl binary
628 but the location of the entire distribution.
630 Usage: --with-perl-home=<absolute path to Perl 5 home>
633 [ --with-cl-home For Windows NT users, please supply the path
634 for the Microsoft C/C++ compiler.
635 Note that this is not the location of the compiler
636 binary but the location of the entire distribution.
638 Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>
640 AC_ARG_WITH(mspdb-path,
641 [ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the
642 path pointing to the mspdb71.dll (.NET 2003).
644 Usage: --with-mspdb-path=<absolute path to mspdb71.dll>
646 AC_ARG_WITH(midl-path,
647 [ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply
648 the path pointing to the midl.exe.
650 Usage: --with-midl-path=<absolute path to midl.exe>
652 AC_ARG_WITH(csc-path,
653 [ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply
654 the path pointing to the csc.exe.
656 Usage: --with-csc-path=<absolute path to csc.exe>
658 AC_ARG_WITH(nsis-path,
659 [ --with-nsis-path For Windows users, please supply the path to the
660 "Nullsoft Scriptable Install System" (NSIS). If NSIS
661 is found in the path or this option is supplied a self
662 contained executable installer for OpenOffice.org will
665 Usage: --with-nsis-path=<absolute path to nsis.exe>
667 AC_ARG_WITH(frame-home,
668 [ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply
669 the path pointing to lib/mscoree.lib, usually
671 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"
673 MS Visual Toolkit compiler users, please supply the
674 path pointing to lib/msvcrt.lib, usually something
676 "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"
678 Usage: --with-frame-home=<absolute path to Framework SDK [[home]]>
680 AC_ARG_WITH(psdk-home,
681 [ --with-psdk-home For Windows users, please supply the path to the
682 Microsoft Platform SDK.
684 Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>
686 AC_ARG_WITH(directx-home,
687 [ --with-directx-home For Windows users, please supply the path to the
688 Microsoft DirectX SDK.
690 Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
692 AC_ARG_WITH(mozilla-build,
693 [ --with-mozilla-build For Windows users, please supply the path to the
696 Usage: --with-mozilla-build=<absolute path to mozilla build tools>
698 At the moment of this writing, an installer for the mozilla build tools
699 can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
700 ],[MOZILLABUILD=$withval],)
701 AC_ARG_WITH(local-solenv,
702 [ --with-local-solenv If you have solenv in a location other than ./solenv,
703 please supply the path here.
705 Usage: --with-local-solenv=<absolute path to solenv>
707 AC_ARG_WITH(local-solver,
708 [ --with-local-solver if you have solver in a location other than ./solver,
709 please supply the path here.
711 Usage: --with-local-solver=<absolute path to solver>
713 AC_ARG_ENABLE(check-only,
714 [ --enable-check-only Use this option option if you just want to check your
715 environment. This option stops the generation of an
718 Usage: --enable-check-only=yes
720 AC_ARG_ENABLE(ccache-skip,
721 [[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to
722 escape compiler flags that would otherwise prevent
723 caching of the result (currently used on Mac only)
724 NOTE: requires patched version because of a bug in
725 ccache (see issue 104567 for details and patch)
726 explicitly enable if your version of ccache doesn't
727 identify as version 2.4_OOo
728 ]],,enable_ccache_skip=auto)
730 [ --with-lang Use this option to build OpenOffice.org with
731 additional language support. English (US) is always
732 included by default. Separate multiple languages with
733 space. For all languages, use --with-lang=ALL.
735 Usage: --with-lang="es sw tu cs sk"
737 AC_ARG_WITH(poor-help-localizations,
738 [ --with-poor-help-localizations
739 Use this option to specify which languages have
740 unusable help localizations. Separate multiple
741 languages with space.
743 Usage: --with-poor-help-localizations="af ar be-BY ca"
746 [ --with-dict Use this option to build OpenOffice.org with
747 dictionary support. ALL dictionaries are always
748 included by default unless overridden with
749 this option. Separate multiple dictionaries with
750 commas. For all dictionaries, use --with-dict=ALL.
752 Usage: --with-dict=ENGB,ENUS,ITIT
754 AC_ARG_WITH(intro-bitmaps,
755 [ --with-intro-bitmaps Prefer the specified intro bitmaps over the
756 the default one. Can be more than one (separated by
757 commas), the order means priority of fallback if the
758 first does not exist (in the installed tree).
760 Usage: --with-intro-bitmaps=/path/my_ooo_intro.bmp
762 AC_ARG_WITH(about-bitmaps,
763 [ --with-about-bitmaps Similarly to --with-intro-bitmaps, this allows
764 specification of bitmaps for the About box.
766 Usage: --with-about-bitmaps=/path/my_ooo_about.bmp
769 [ --with-vendor Set vendor of the build.
771 Usage: --with-vendor="John the Builder"
773 AC_ARG_WITH(unix-wrapper,
774 [ --with-unix-wrapper Redefines the name of the UNIX wrapper that will be used
775 in the desktop files and in the desktop-integration RPMs.
777 Usage: --with-unix-wrapper=ooffice
779 AC_ARG_WITH(asm-home,
780 [ --with-asm-home For Windows users, please supply the path for the
783 Usage: --with-asm-home=<path to ml.exe directory>
785 AC_ARG_WITH(os-version,
786 [ --with-os-version For FreeBSD users, use this option option to override
787 the detected OSVERSION.
789 Usage: --with-os-version=<OSVERSION>
791 AC_ARG_WITH(unzip-home,
792 [ --with-unzip-home Deprecated: use --with-zip-home instead],,)
793 AC_ARG_WITH(zip-home,
794 [ --with-zip-home If you use a non standard zip, for example windows
795 please supply the path for zip
797 Usage: --with-zip-home=<path to zip executable>
800 [ --with-mingwin For Windows users, use the mingwin32 compiler within
803 Usage: --with-mingwin=yes
805 For !Windows use, use the mingw32 C++ compiler to
806 (re-) build unowinreg.dll. Specify the MinGW C++
809 Usage: --with-mingwin=i586-mingw32msvc-g++
810 ],WITH_MINGWIN=$withval,WITH_MINGWIN=0)
811 AC_ARG_WITH(build-version,
812 [ --with-build-version Allows the builder to add a custom version tag
813 that will appear in the Help/About box for QA
816 Usage: --with-build-version="Built by Jim"
817 ],with_build_version=$withval)
819 [ --with-alloc Define which allocator to build with
820 (choices are oo, system, tcmalloc, jemalloc)
822 Note that on FreeBSD/NetBSD system==jemalloc
824 AC_ARG_ENABLE(verbose,
825 [ --enable-verbose Increase build verbosity.
826 --disable-verbose Decrease build verbosity.
828 AC_ARG_ENABLE(dependency-tracking,
829 [ --disable-dependency-tracking Disables generation of dependency information.
834 dnl ===================================================================
836 dnl ===================================================================
837 echo "********************************************************************"
839 echo "* OpenOffice.org build configuration. *"
841 echo "* The configure process checks your platform to see whether *"
842 echo "* you can build OpenOffice.org on it. *"
843 echo "* This process checks all pre-requisites and generates a file *"
844 echo "* containing the necessary environment variables. *"
845 echo "* Source this file after configure has ended successfully. *"
847 echo "* Any warning that is generated during the configure process *"
848 echo "* must be taken into account since it can be a reason for *"
849 echo "* an unsuccessful build of OpenOffice.org *"
851 echo "********************************************************************"
853 echo "********************************************************************"
855 echo "* Checking the platform pre-requisites. *"
857 echo "********************************************************************"
859 dnl ===================================================================
860 dnl Configure pre-requisites.
861 dnl ===================================================================
865 AC_PATH_PROG( AWK, $AWK)
866 if test -z "$AWK"; then
867 AC_MSG_ERROR([install awk to run this script])
870 AC_PATH_PROGS(SED, sed )
871 if test -z "$SED"; then
872 AC_MSG_ERROR([install sed to run this script])
875 AC_MSG_CHECKING([for solenv environment])
876 if test -z "$with_local_solenv"; then
877 LOCAL_SOLENV="DEFAULT"
878 AC_MSG_RESULT([default])
880 LOCAL_SOLENV=$with_local_solenv
881 AC_MSG_RESULT([$with_local_solenv])
883 AC_SUBST(LOCAL_SOLENV)
885 if test "$LOCAL_SOLENV" = "DEFAULT"; then
888 _solenv="$LOCAL_SOLENV"
892 if test -e $_solenv/inc/minor.mk; then
893 # Get UPD number from ./solenv/inc/minor.mk
894 UPD="`grep RSCVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
896 SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"
897 AC_SUBST(SOURCEVERSION)
899 AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...])
902 dnl ===================================================================
903 dnl Checks for the operating system and processor.
904 dnl ===================================================================
906 if test "$build" != "$host" -o "$build" != "$target" \
907 -o "$host" != "$target"; then
908 AC_MSG_WARN([cross-compiling by any means is not supported (yet)!])
909 echo "cross-compiling by any means is not supported (yet)!" >> warn
912 if echo "$build_os" | grep cygwin; then
913 AC_MSG_CHECKING([Cygwin version])
915 AC_MSG_RESULT([$CygwinVer])
916 if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
917 AC_MSG_ERROR([You need at least Cygwin V1.5.x])
923 dnl ===================================================================
924 dnl The following is a list of supported systems.
925 dnl Sequential to keep the logic very simple
926 dnl These values may be checked and reset later.
927 dnl ===================================================================
938 AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
939 if test -z "$GNUTAR"; then
940 AC_MSG_ERROR([gtar (gnu tar) not found but needed. Install it (SUN Freeware package).])
944 dnl ===========================================================
945 dnl check whether we're using solaris 6,7,8 - sparc or intel.
946 dnl ===========================================================
947 AC_MSG_CHECKING([the Solaris operating system release])
948 _os_release=`echo $build_os | $SED -e s/solaris2\.//`
949 if test "$_os_release" -lt "6"; then
950 AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org])
952 AC_MSG_RESULT([ok ($_os_release)])
955 dnl check whether we're using a sparc or i386 processor
956 AC_MSG_CHECKING([the processor type])
957 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
958 AC_MSG_RESULT([ok ($build_cpu)])
960 AC_MSG_ERROR([only sparc and i386 processors are supported])
963 linux-gnu*|k*bsd*-gnu*)
993 if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then
994 AC_MSG_WARN([Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray])
995 echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
1017 AC_MSG_CHECKING([the FreeBSD operating system release])
1018 if test -n "$with_os_version"; then
1019 OSVERSION="$with_os_version"
1021 OSVERSION=`/sbin/sysctl -n kern.osreldate`
1023 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
1024 AC_MSG_CHECKING([which thread library to use])
1025 if test "$OSVERSION" -lt "500016"; then
1026 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1027 PTHREAD_LIBS="-pthread"
1028 elif test "$OSVERSION" -lt "502102"; then
1029 PTHREAD_CFLAGS="-D_THREAD_SAFE"
1030 PTHREAD_LIBS="-lc_r"
1033 PTHREAD_LIBS="-pthread"
1035 AC_MSG_RESULT([$PTHREAD_LIBS])
1052 PTHREAD_CFLAGS="-pthread"
1053 PTHREAD_LIBS="-pthread -lpthread"
1061 PTHREAD_LIBS=-pthread
1062 echo "AIX is an alpha port --- Use at own risk" >> warn
1066 AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
1071 AC_SUBST(PTHREAD_CFLAGS)
1072 AC_SUBST(PTHREAD_LIBS)
1074 dnl ===================================================================
1075 dnl Set the ENABLE_CRASHDUMP variable.
1076 dnl ===================================================================
1077 AC_MSG_CHECKING([whether to enable crashdump feature])
1078 if test "$enable_crashdump" = "yes"; then
1079 ENABLE_CRASHDUMP="TRUE"
1080 BUILD_TYPE="$BUILD_TYPE CRASHREP"
1081 AC_MSG_RESULT([yes])
1086 AC_SUBST(ENABLE_CRASHDUMP)
1088 if test "$_os" = "WINNT"; then
1089 BUILD_TYPE="$BUILD_TYPE TWAIN"
1092 if test "$_os" = "WINNT"; then
1093 dnl ===================================================================
1094 dnl Set the VC_STANDARD variable.
1095 dnl ===================================================================
1096 AC_MSG_CHECKING([whether to use the standard non-optimizing compiler])
1097 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
1102 AC_MSG_RESULT([yes])
1104 AC_SUBST(VC_STANDARD)
1107 dnl ===================================================================
1108 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
1109 dnl ===================================================================
1110 AC_MSG_CHECKING([whether to turn warnings to errors])
1111 if test -n "$enable_werror" && test "$enable_werror" != "no"; then
1112 ENABLE_WERROR="TRUE"
1113 AC_MSG_RESULT([yes])
1114 AC_MSG_WARN([Turning warnings to errors has no effect in modules or])
1115 AC_MSG_WARN([on platforms where it has been disabled explicitely])
1116 echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn
1118 ENABLE_WERROR="FALSE"
1121 AC_SUBST(ENABLE_WERROR)
1123 dnl ===================================================================
1124 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
1125 dnl ===================================================================
1126 AC_MSG_CHECKING([whether to do a debug build])
1127 if test -n "$enable_debug" && test "$enable_debug" != "no"; then
1129 if test -z "$enable_symbols"; then
1130 enable_symbols="yes"
1132 AC_MSG_RESULT([yes])
1134 ENABLE_DEBUG="FALSE"
1137 AC_SUBST(ENABLE_DEBUG)
1139 dnl ===================================================================
1140 dnl Set the ENABLE_DBGUTIL variable
1141 dnl ===================================================================
1142 AC_MSG_CHECKING([whether to build with additional debug utilities])
1143 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1147 AC_MSG_RESULT([yes])
1150 PROFULLSWITCH="product=full"
1152 AC_MSG_RESULT([no, full product build])
1155 AC_SUBST(PROFULLSWITCH)
1158 dnl ===================================================================
1159 dnl First setting is whether to include symbols into final build.
1160 dnl ===================================================================
1161 AC_MSG_CHECKING([whether to include symbols into final build])
1162 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
1163 if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
1164 ENABLE_SYMBOLS="TRUE"
1165 AC_MSG_RESULT([yes])
1167 if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
1168 ENABLE_SYMBOLS="SMALL"
1169 AC_MSG_RESULT([yes, small ones])
1170 else if test "$enable_symbols" != "no" ; then
1171 echo enable symbols is: $enable_symbols
1172 AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.])
1182 AC_SUBST(ENABLE_SYMBOLS)
1184 dnl ===================================================================
1185 dnl Determine if the solver is to be stripped or not.
1186 dnl ===================================================================
1187 AC_MSG_CHECKING([whether to strip the solver or not.])
1188 if test -n "$enable_strip_solver"; then
1189 if test "$enable_strip_solver" = "yes"; then
1191 else if test "$enable_strip_solver" = "no"; then
1192 DISABLE_STRIP="TRUE"
1194 AC_MSG_ERROR([--disable-strip-solver only accepts yes or no as parameter.])
1198 if test -n "$ENABLE_SYMBOLS"; then
1199 DISABLE_STRIP="TRUE"
1204 AC_SUBST(DISABLE_STRIP)
1206 dnl ===================================================================
1208 dnl ===================================================================
1209 AC_MSG_CHECKING([whether to enable native CUPS support])
1210 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
1212 AC_MSG_RESULT([yes])
1217 AC_SUBST(ENABLE_CUPS)
1219 AC_MSG_CHECKING([whether to enable fontconfig support])
1220 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
1221 ENABLE_FONTCONFIG="TRUE"
1222 AC_MSG_RESULT([yes])
1224 ENABLE_FONTCONFIG=""
1227 AC_SUBST(ENABLE_FONTCONFIG)
1229 dnl ===================================================================
1230 dnl find external tarballs.
1231 dnl ===================================================================
1232 if test -z $TARFILE_LOCATION; then
1233 TARFILE_LOCATION="DEFAULT"
1235 AC_SUBST(TARFILE_LOCATION)
1237 if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \
1238 && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then
1239 DO_FETCH_TARBALLS="yes"
1241 AC_SUBST(DO_FETCH_TARBALLS)
1243 dnl ===================================================================
1244 dnl Disable legacy binary file formats filters
1245 dnl ===================================================================
1246 AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)])
1247 if test "$enable_binfilter" = "no"; then
1251 WITH_BINFILTER="YES"
1252 BUILD_TYPE="$BUILD_TYPE BINFILTER"
1253 AC_MSG_RESULT([yes])
1255 AC_SUBST(WITH_BINFILTER)
1257 if test "$_os" = "WINNT"; then
1258 AC_MSG_CHECKING([whether to use DirectX])
1259 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
1260 ENABLE_DIRECTX="TRUE"
1261 AC_MSG_RESULT([yes])
1266 AC_SUBST(ENABLE_DIRECTX)
1268 AC_MSG_CHECKING([whether to use ActiveX])
1269 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
1271 AC_MSG_RESULT([yes])
1273 DISABLE_ACTIVEX="TRUE"
1276 AC_SUBST(DISABLE_ACTIVEX)
1278 AC_MSG_CHECKING([whether to use ATL])
1279 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
1281 AC_MSG_RESULT([yes])
1286 AC_SUBST(DISABLE_ATL)
1290 dnl ===================================================================
1291 dnl Disable rpath in shared libraries?
1292 dnl ===================================================================
1293 AC_MSG_CHECKING([whether to use RPATH in shared libraries])
1294 if test "$enable_rpath" = "no"; then
1299 AC_MSG_RESULT([$ENABLE_RPATH])
1300 AC_SUBST(ENABLE_RPATH)
1302 dnl Test whether to include MySpell dictionaries
1303 dnl ===================================================================
1304 AC_MSG_CHECKING([whether to include MySpell dictionaries])
1305 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
1306 AC_MSG_RESULT([yes])
1307 WITH_MYSPELL_DICTS=YES
1308 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
1311 WITH_MYSPELL_DICTS=NO
1313 AC_SUBST(WITH_MYSPELL_DICTS)
1315 if test "$WITH_MYSPELL_DICTS" = "NO"; then
1316 AC_MSG_CHECKING([whether to use dicts from external paths])
1317 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
1318 AC_MSG_RESULT([yes])
1320 AC_MSG_CHECKING([for spelling dictionary directory])
1321 if test -n "$with_external_dict_dir"; then
1322 DICT_SYSTEM_DIR=file://$with_external_dict_dir
1324 DICT_SYSTEM_DIR=file:///usr/share/hunspell
1326 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
1327 AC_MSG_CHECKING([for hyphenation patterns directory])
1328 if test -n "$with_external_hyph_dir"; then
1329 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
1331 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
1333 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
1334 AC_MSG_CHECKING([for thesaurus directory])
1335 if test -n "$with_external_thes_dir"; then
1336 THES_SYSTEM_DIR=file://$with_external_thes_dir
1338 THES_SYSTEM_DIR=file:///usr/share/mythes
1340 AC_MSG_RESULT([$THES_SYSTEM_DIR])
1346 AC_SUBST(SYSTEM_DICTS)
1347 AC_SUBST(DICT_SYSTEM_DIR)
1348 AC_SUBST(HYPH_SYSTEM_DIR)
1349 AC_SUBST(THES_SYSTEM_DIR)
1351 if test $_os = "WINNT"; then
1352 AC_MSG_CHECKING([Windows build environment sanity])
1353 dnl ===================================================================
1354 dnl Sanity check! Native windows programs cannot use cygwin symlinks!
1355 dnl ===================================================================
1356 dnl As long as awk instead of $AWK is used somewhere in the sources,
1357 dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
1358 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
1359 AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
1360 Native windows programs cannot use cygwin symlinks. Remove the symbolic
1361 link, and copy the program to the name of the link.])
1363 dnl ===================================================================
1364 dnl Another sanity check! More a band-aid. winenv.* adds guw.exe to
1365 dnl CC and CXX but the configure checks here assume that guw.exe
1366 dnl (if needed at all) is not yet present.
1367 dnl ===================================================================
1368 CC=`echo $CC | $SED "s/^guw.exe //"`
1369 CXX=`echo $CXX | $SED "s/^guw.exe //"`
1370 dnl ===================================================================
1371 dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable
1373 dnl ===================================================================
1374 if test -n "$CC";then
1375 if test "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then
1379 dnl ===================================================================
1380 if test "$WITH_MINGWIN" = "yes" ; then
1381 if test -z "$CC"; then
1382 CC="gcc -mno-cygwin"
1383 CXX="g++ -mno-cygwin"
1388 AC_SUBST(WITH_MINGWIN)
1390 dnl ===================================================================
1391 dnl Extra check for Windows. cygwin builds need gcc to build dmake
1392 dnl and g++ to build guw.exe although MS cl (or MinGW) is used to
1394 dnl ===================================================================
1395 if test "$_os" = "WINNT" ; then
1396 AC_MSG_CHECKING([for cygwin gcc/g++])
1397 if which gcc > /dev/null && which g++ > /dev/null ; then
1398 AC_MSG_RESULT([found])
1400 AC_MSG_ERROR([cygwin gcc and g++ are needed, please install them.])
1405 dnl ===================================================================
1406 dnl Check whether the bash shell can be used.
1407 dnl ===================================================================
1408 AC_PATH_PROG(SHELLPATH, bash)
1409 if test -z "$SHELLPATH"; then
1410 AC_MSG_ERROR([bash not found in \$PATH])
1412 SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
1416 dnl ===================================================================
1417 dnl Checks for c compiler,
1418 dnl The check for the c++ compiler is later on.
1419 dnl ===================================================================
1420 AC_MSG_CHECKING([gcc home])
1421 if test -z "$with_gcc_home"; then
1422 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
1424 GCC_HOME="$with_gcc_home"
1426 AC_MSG_RESULT($GCC_HOME)
1432 if test -n "$with_gcc_home"; then
1433 if test -z "$CC"; then
1434 CC="$with_gcc_home/bin/gcc"
1438 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
1439 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1443 COMPATH=`dirname "$CC"`
1444 if test "$COMPATH" = "." ; then
1445 AC_PATH_PROGS(COMPATH, $CC)
1446 dnl double square bracket to get single because of M4 quote...
1447 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
1449 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
1451 dnl ===================================================================
1452 dnl Test the gcc version, 3 is OK
1453 dnl ===================================================================
1455 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
1456 AC_MSG_CHECKING([the GNU gcc compiler version])
1457 _gcc_version=`$CC -dumpversion`
1458 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
1459 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1461 if test "$_gcc_major" -lt "3"; then
1462 AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler])
1464 if test "$GCCVER" -eq "030203"; then
1465 if test "$ENABLE_SYMBOLS" = "SMALL"; then
1466 AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.])
1470 if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then
1471 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
1472 export CC=$GCC_HOME/bin/gcc-4.0
1473 dnl export CC to have it available in set_soenv -> config.guess
1474 GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1475 if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
1479 if test "$GCCVER" -ge "040100" ; then
1480 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])
1482 AC_MSG_RESULT([implicitly using CC=$CC])
1485 AC_MSG_RESULT([checked (gcc $_gcc_version)])
1487 if test "$_os" = "SunOS"; then
1488 AC_MSG_CHECKING([gcc linker])
1489 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
1490 AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris])
1492 AC_MSG_RESULT([ok (GNU ld)])
1497 HAVE_LD_BSYMBOLIC_FUNCTIONS=
1498 if test "$GCC" = "yes"; then
1499 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
1500 bsymbolic_functions_ldflags_save=$LDFLAGS
1501 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
1502 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1505 printf ("hello world\n");
1506 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
1507 if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then
1508 AC_MSG_RESULT( found )
1510 AC_MSG_RESULT( not found )
1512 LDFLAGS=$bsymbolic_functions_ldflags_save
1514 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
1516 dnl ===================================================================
1517 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
1518 dnl ===================================================================
1519 AC_MSG_CHECKING([whether to enable pch feature])
1520 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
1521 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
1523 AC_MSG_RESULT([yes])
1524 dnl There is no PCH support in GCC versions prior to this
1525 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then
1527 AC_MSG_RESULT([yes])
1530 AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler])
1536 AC_SUBST(ENABLE_PCH)
1538 dnl ===================================================================
1539 dnl Search all the common names for GNU make
1540 dnl ===================================================================
1541 AC_MSG_CHECKING([for GNU make])
1542 for a in "$MAKE" $GNUMAKE make gmake gnumake; do
1543 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1544 if test $? -eq 0; then
1549 AC_MSG_RESULT($GNUMAKE)
1550 if test -z "$GNUMAKE"; then
1551 AC_MSG_ERROR([not found. install GNU make.])
1554 AC_MSG_CHECKING([the GNU make version])
1555 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
1556 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
1557 if test "$_make_longver" -ge "038100" ; then
1558 AC_MSG_RESULT([$GNUMAKE $_make_version])
1560 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
1564 dnl ===================================================================
1565 dnl Search all the common names for GNU tar
1566 dnl ===================================================================
1567 AC_MSG_CHECKING([for GNU tar])
1568 for a in $GNUTAR gtar gnutar tar; do
1569 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
1570 if test $? -eq 0; then
1575 AC_MSG_RESULT($GNUTAR)
1576 if test -z "$GNUTAR"; then
1577 AC_MSG_ERROR([not found. install GNU tar.])
1582 dnl ===================================================================
1583 dnl Test the solaris compiler version
1584 dnl ===================================================================
1585 if test "$_os" = "SunOS"; then
1586 if test "$CC" = "cc"; then
1587 AC_PATH_PROGS(_cc, cc)
1588 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
1589 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
1590 dnl cc -V outputs to standard error!!!!
1591 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
1592 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
1593 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
1594 if test "$_sunstudio_major" != "5"; then
1595 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1597 _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" }'`
1598 if test "$_sunstudio_minor" = "false"; then
1599 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
1601 dnl compiler will do
1602 AC_MSG_RESULT([checked])
1608 if test "$GCC" = "yes"; then
1609 AC_MSG_CHECKING( for --hash-style=both linker support )
1610 hash_style_ldflags_save=$LDFLAGS
1611 LDFLAGS="$LDFLAGS -Wl,--hash-style=both"
1612 AC_LINK_IFELSE([AC_LANG_PROGRAM([
1615 printf ("hello world\n");
1616 ])], HAVE_LD_HASH_STYLE=TRUE, HAVE_LD_HASH_STYLE=FALSE)
1617 if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then
1618 AC_MSG_RESULT( found )
1620 AC_MSG_RESULT( not found )
1622 LDFLAGS=$hash_style_ldflags_save
1624 AC_SUBST(HAVE_LD_HASH_STYLE)
1626 dnl ===================================================================
1627 dnl Test the Compaq compiler for OSF1
1628 dnl ===================================================================
1629 if test "$_os" = "OSF1"; then
1630 if test "$CC" = "cc"; then
1631 AC_PATH_PROGS(_cc, cc)
1632 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
1633 AC_MSG_WARN([******* $_cc , $COMPATH])
1634 AC_MSG_CHECKING([the Compaq C compiler version])
1635 dnl cc -V outputs to standard error!!!!
1636 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
1637 _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
1638 if test "$_compaqc_major" != "T6"; then
1639 AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler])
1641 dnl compiler will do
1642 AC_MSG_RESULT([checked])
1647 dnl ===================================================================
1648 dnl Check whether there's a Perl version available.
1649 dnl ===================================================================
1650 if test -z "$with_perl_home"; then
1651 AC_PATH_PROG(PERL, perl)
1653 if test "$_os" = "WINNT"; then
1654 with_perl_home=`cygpath -u "$with_perl_home"`
1656 _perl_path="$with_perl_home/bin/perl"
1657 if test -x "$_perl_path"; then
1660 AC_MSG_ERROR([$_perl_path not found])
1664 dnl ===================================================================
1665 dnl Testing for Perl version 5 or greater.
1666 dnl $] is the perl version variable, it is returned as an integer
1667 dnl ===================================================================
1668 if test "$PERL"; then
1669 AC_MSG_CHECKING([the Perl version])
1670 ${PERL} -e "exit($]);"
1672 if test "$_perl_version" -lt 5; then
1673 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
1675 AC_MSG_RESULT([checked (perl $_perl_version)])
1677 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
1681 dnl ===================================================================
1682 dnl Testing for required Perl modules
1683 dnl ===================================================================
1684 AC_MSG_CHECKING([for required Perl modules])
1685 if `$PERL -e 'use Archive::Zip;'`; then
1686 AC_MSG_RESULT([all modules found])
1688 AC_MSG_ERROR([Failed to find some modules])
1691 dnl ===================================================================
1692 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
1693 dnl ===================================================================
1694 if test "$_os" = "WINNT"; then
1695 if test "$WITH_MINGWIN" != "yes"; then
1696 AC_MSG_CHECKING([for friendly registry keys])
1697 # VS.Net 2003, VS.Net 2005
1698 if test -z "$with_cl_home"; then
1699 vctest=`./oowintool --msvc-productdir`;
1700 if test -x "$vctest/bin/cl.exe"; then
1701 with_cl_home=$vctest;
1704 with_cl_home=`cygpath -u "$with_cl_home"`
1706 AC_MSG_RESULT([done])
1708 dnl ===========================================================
1709 dnl Check for mspdb71.dll/mspdb80.dll
1710 dnl ===========================================================
1711 dnl .NET 2003/5/8 Compiler
1712 if test -n "$with_mspdb_path";then
1713 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
1715 if test -e "$with_mspdb_path/mspdb71.dll" -o -e "$with_mspdb_path/mspdb80.dll"; then
1716 MSPDB_PATH="$with_mspdb_path"
1719 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
1720 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1722 dnl .NET 2005/2008 case
1723 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
1724 MSPDB_PATH="$with_cl_home/../Common7/IDE"
1726 dnl Windows SDK 6.0 case
1727 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
1728 MSPDB_PATH="$with_cl_home/bin"
1731 if test -z "$MSPDB_PATH";then
1732 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
1733 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
1734 AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
1735 MSPDB_PATH=`dirname "$MSPDB_PATH"`
1738 if test -z "$MSPDB_PATH"; then
1739 AC_MSG_ERROR([You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path])
1741 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
1742 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
1743 dnl The path needs to be added before cl is called
1744 PATH="$MSPDB_PATH:$PATH"
1746 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
1747 if test -x "$with_cl_home/bin/cl.exe"; then
1748 CC="$with_cl_home/bin/cl.exe"
1750 AC_PATH_PROG(CC, cl.exe)
1752 if test -e "$CC"; then
1753 # This gives us a posix path with 8.3 filename restrictions
1754 CC=`cygpath -d "$CC"`
1755 CC=`cygpath -u "$CC"`
1756 # Remove /cl.exe from CC case insensitive
1757 AC_MSG_RESULT([found ($CC)])
1758 COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
1759 export INCLUDE=`cygpath -d "$COMPATH/Include"`
1760 dnl Check which Microsoft C/C++ compiler is found
1761 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
1762 dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
1763 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
1764 x = match( \\\$0, /..\\...\\...../ )
1765 CCversion = substr( \\\$0, RSTART, RLENGTH)
1766 tokencount = split (CCversion,vertoken,\".\")
1767 for ( i = 1 ; i <= tokencount ; i++ ) {
1768 printf (\"%04d\",vertoken[[i]] )
1771 AC_MSG_RESULT([found Compiler version $CCNUMVER.])
1772 if test "$CCNUMVER" -ge "001500000000"; then
1775 AC_MSG_RESULT([found .NET 2008 / VS 9.0.])
1776 elif test "$CCNUMVER" -ge "001400000000"; then
1779 AC_MSG_RESULT([found .NET 2005.])
1780 elif test "$CCNUMVER" -ge "001300102240"; then
1783 AC_MSG_RESULT([found .NET 2003.])
1785 AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler.])
1788 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
1791 AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
1792 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
1793 AC_MSG_RESULT([found.])
1794 if $CC -dumpspecs | grep -q "mno-cygwin"; then
1797 USE_MINGW="pure-mingw"
1800 AC_MSG_ERROR([Mingwin32 C++ Compiler not found.])
1805 AC_SUBST(MSPDB_PATH)
1808 dnl ===================================================================
1809 dnl .NET needs special treatment
1810 dnl ===================================================================
1811 if test "$_os" = "WINNT"; then
1812 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
1814 AC_PATH_PROG(MIDL_PATH, midl.exe)
1815 if test -n "$MIDL_PATH";then
1816 MIDL_PATH=`dirname "$MIDL_PATH"`
1818 if test -n "$with_midl_path";then
1819 with_midl_path=`cygpath -u "$with_midl_path"`
1821 if test -x "$with_midl_path/midl.exe"; then
1822 MIDL_PATH="$with_midl_path"
1824 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
1825 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
1827 if test -z "$MIDL_PATH" ; then
1828 vstest=`./oowintool --msvs-productdir`;
1829 if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
1830 MIDL_PATH="$vstest/Common7/Tools/Bin"
1833 if test -z "$MIDL_PATH" ; then
1834 psdktest=`./oowintool --psdk-home`
1835 if test -x "$psdktest/Bin/midl.exe" ; then
1836 MIDL_PATH="$psdktest/Bin"
1839 if test ! -x "$MIDL_PATH/midl.exe"; then
1840 AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
1842 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1843 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
1844 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
1847 AC_PATH_PROG(CSC_PATH, csc.exe)
1848 if test -n "$CSC_PATH";then
1849 CSC_PATH=`dirname "$CSC_PATH"`
1851 if test -n "$with_csc_path";then
1852 with_csc_path=`cygpath -u "$with_csc_path"`
1854 if test -x "$with_csc_path/csc.exe"; then
1855 CSC_PATH="$with_csc_path"
1857 csctest=`./oowintool --csc-compilerdir`;
1858 if test -x "$csctest/csc.exe"; then
1862 if test ! -x "$CSC_PATH/csc.exe"; then
1863 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
1865 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1866 CSC_PATH=`cygpath -d "$CSC_PATH"`
1867 CSC_PATH=`cygpath -u "$CSC_PATH"`
1869 dnl Check mscoree.lib / .NET Frameworks dir
1870 dnl For VS2003/2005 $with_frame_home has to point to the directory with lib/mscoree.lib.
1871 AC_MSG_CHECKING(.NET Framework)
1872 if test -n "$with_frame_home"; then
1873 with_frame_home=`cygpath -u "$with_frame_home"`
1875 if test -f "$with_frame_home/lib/mscoree.lib"; then
1876 FRAME_HOME="$with_frame_home"
1878 if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
1879 FRAME_HOME="$with_cl_home/../SDK/v1.1"
1881 if test -z "$FRAME_HOME" ; then
1882 frametest=`./oowintool --dotnetsdk-dir`
1883 if test -f "$frametest/lib/mscoree.lib"; then
1884 FRAME_HOME="$frametest"
1886 frametest=`./oowintool --psdk-home`
1887 if test -f "$frametest/lib/mscoree.lib"; then
1888 FRAME_HOME="$frametest"
1892 if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
1893 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
1895 AC_MSG_RESULT(found)
1896 # Convert to posix path with 8.3 filename restrictions ( No spaces )
1897 FRAME_HOME=`cygpath -d "$FRAME_HOME"`
1898 FRAME_HOME=`cygpath -u "$FRAME_HOME"`
1902 AC_SUBST(FRAME_HOME)
1905 dnl ===================================================================
1906 dnl Check if stdc headers are available excluding windows.
1907 dnl ===================================================================
1908 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1912 dnl ===================================================================
1913 dnl Find pre-processors.
1914 dnl ===================================================================
1915 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
1918 dnl Check whether there's a C pre-processor.
1919 dnl ===================================================================
1920 dnl When using SunStudio compiler, there is a bug with the cc
1921 dnl preprocessor, so use CC preprocessor as the cc preprocessor
1922 dnl See Issuezilla #445.
1923 dnl ===================================================================
1924 if test "$_os" = "SunOS"; then
1931 AC_CHECK_SIZEOF(long)
1932 SIZEOF_LONG=$ac_cv_sizeof_long
1933 AC_SUBST(SIZEOF_LONG)
1935 WORDS_BIGENDIAN=$ac_cv_c_bigendian
1936 AC_SUBST(WORDS_BIGENDIAN)
1938 dnl Check for large file support
1940 if test -n "$ac_cv_sys_file_offset_bits"; then
1941 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1943 if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then
1944 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
1946 AC_SUBST(LFS_CFLAGS)
1948 dnl ===================================================================
1949 dnl Check if valgrind.h is available
1950 dnl ===================================================================
1951 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
1952 dnl Test $prefix (currently only testing for /usr and /usr/local)
1953 dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind
1955 prev_cppflags=$CPPFLAGS
1956 if test -z "$VALGRIND_CFLAGS"; then
1957 CPPFLAGS="-I/usr/include/valgrind"
1958 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h])
1960 if test -z "$VALGRIND_CFLAGS"; then
1961 CPPFLAGS="-I/usr/local/include/valgrind"
1962 AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [])
1964 if test -n "$VALGRIND_CFLAGS"; then
1965 CPPFLAGS=$VALGRIND_CFLAGS
1966 AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""])
1968 CPPFLAGS=$prev_cppflags
1970 AC_SUBST([VALGRIND_CFLAGS])
1972 dnl ===================================================================
1973 dnl Check if cups/cups.h is available
1974 dnl ===================================================================
1975 if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
1976 AC_CHECK_HEADER(cups/cups.h, [],
1977 [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], [])
1980 dnl ===================================================================
1981 dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD
1982 dnl ===================================================================
1983 if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
1984 AC_MSG_CHECKING([whether to enable pam support])
1985 if test -z "$enable_pam" || test "$enable_pam" != "no"; then
1986 AC_MSG_RESULT([yes])
1988 AC_CHECK_HEADER(security/pam_appl.h, [],
1989 [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
1990 AC_MSG_CHECKING([whether to link to libpam])
1991 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
1992 AC_MSG_RESULT([yes])
1994 AC_CHECK_LIB(pam, pam_start, [],
1995 [AC_MSG_ERROR(libpam not found or functional)], [])
1997 AC_MSG_RESULT([no, dynamically open it])
2004 dnl check getspnam_r for needed args (4 or 5)
2005 AX_FUNC_WHICH_GETSPNAM_R
2009 AC_SUBST(NEW_SHADOW_API)
2012 if test "$_os" = "Linux"; then
2013 AC_MSG_CHECKING([whether to link to libcrypt])
2014 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
2015 AC_MSG_RESULT([yes])
2017 AC_CHECK_LIB(crypt, crypt, [],
2018 [AC_MSG_ERROR(libcrypt not found or functional)], [])
2020 AC_MSG_RESULT([no, dynamically open it])
2024 AC_SUBST(CRYPT_LINK)
2026 dnl ===================================================================
2027 dnl Testing for c++ compiler and version...
2028 dnl ===================================================================
2029 if test -n "$with_gcc_home"; then
2030 if test -z "$CXX"; then
2031 CXX="$with_gcc_home/bin/g++"
2035 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2036 if test -e "$CC"; then
2041 dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't!
2042 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2046 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
2047 if test "$GXX" = "yes"; then
2048 AC_MSG_CHECKING([the GNU C++ compiler version])
2050 _gpp_version=`$CXX -dumpversion`
2051 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
2053 if test "$_os" = "Darwin" -a "$_gpp_majmin" -ge "401" ; then
2054 if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
2055 CXX=$GCC_HOME/bin/g++-4.0
2056 _gpp_majmin_2=`"$CXX" -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
2057 if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
2058 _gpp_majmin=$_gpp_majmin_2
2061 if test "$_gpp_majmin" -ge "401" ; then
2062 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])
2064 AC_MSG_RESULT([implicitly using CXX=$CXX])
2067 AC_MSG_RESULT([checked (g++ $_gpp_version)])
2070 if test "$_gpp_majmin" = "304"; then
2071 AC_MSG_CHECKING([whether $CXX has the enum bug])
2073 extern "C" void abort (void);
2074 extern "C" void exit (int status);
2076 enum E { E0, E1, E2, E3, E4, E5 };
2081 if (e == E2 || e == E3 || e == E1)
2093 ],[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])])
2097 dnl ===================================================================
2098 dnl Set the gcc/gxx include directories
2099 dnl ===================================================================
2100 # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
2101 # often contains an i386 which is expanded as a macro. Solved in stlport.
2102 if test "$GXX" = "yes"; then
2103 AC_MSG_CHECKING([for g++ include path])
2104 if test -z "$with_gxx_include_path"; then
2105 with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
2106 if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
2107 with_gxx_include_path="/usr/include"
2109 if test "$WITH_MINGWIN" = "yes"; then
2110 with_gxx_include_path=`cygpath -d "$with_gxx_include_path"`
2111 with_gxx_include_path=`cygpath -u "$with_gxx_include_path"`
2113 if echo $with_gxx_include_path | grep -q linux; then
2114 # workaround for Mandriva - issue 100049
2115 with_gxx_include_path=`cd $with_gxx_include_path && pwd`
2119 dnl This is the original code...
2120 dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include
2121 if test -z "$with_gxx_include_path"; then
2122 with_gxx_include_path="NO_GXX_INCLUDE"
2123 AC_MSG_RESULT([no g++ includes])
2125 AC_MSG_RESULT([$with_gxx_include_path])
2127 GXX_INCLUDE_PATH="$with_gxx_include_path"
2128 AC_SUBST(GXX_INCLUDE_PATH)
2130 dnl ===================================================================
2131 dnl Set the mingw runtime library include directories
2132 dnl ===================================================================
2133 if test "$WITH_MINGWIN" = "yes"; then
2134 AC_MSG_CHECKING([for mingwin runtime include path])
2135 cat >conftest.$ac_ext <<_ACEOF
2137 #include <bits/c++config.h>
2139 _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`
2141 if test -n "$_mingw_lib_include_path"; then
2143 for a in $_mingw_lib_include_path
2146 _temp="$_temp "`cygpath -u "$a"`
2148 _mingw_lib_include_path=$_temp
2150 if test -z "$_mingw_lib_include_path"; then
2151 _mingw_lib_include_path="NO_LIB_INCLUDE"
2152 AC_MSG_RESULT([no mingwin runtime includes])
2154 AC_MSG_RESULT([$_mingw_lib_include_path])
2156 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
2157 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
2158 dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map
2159 AC_MSG_CHECKING([for mingwin c++ backward include path])
2160 cat >conftest.$ac_ext <<_ACEOF
2163 _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`
2165 if test -n "$_mingw_backward_include_path"; then
2166 _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path`
2167 _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path`
2168 AC_MSG_RESULT([$_mingw_backward_include_path])
2170 _mingw_backward_include_path="NO_BACKWARD_INCLUDE"
2171 AC_MSG_RESULT([no mingwin c++ backward includes])
2173 MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path"
2174 AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH)
2175 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
2176 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
2177 AC_MSG_CHECKING([whether to use dynamic libgcc])
2178 if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then
2179 AC_MSG_CHECKING([dynamic libgcc name])
2180 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'`
2181 MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null`
2182 if test -n "$MINGW_GCCDLL"; then
2183 MINGW_SHARED_GCCLIB=YES
2184 AC_MSG_RESULT([use $MINGW_GCCDLL])
2191 if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then
2194 AC_MSG_CHECKING([whether to use dynamic libstdc++])
2195 MINGW_SHARED_LIBSTDCPP=
2196 if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then
2197 MINGW_SHARED_LIBSTDCPP=stdc++_s
2199 if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then
2200 MINGW_SHARED_LIBSTDCPP=stdc++.dll
2202 if test -n "$MINGW_SHARED_LIBSTDCPP" ; then
2203 AC_MSG_CHECKING([dynamic libstdc++ name])
2204 MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'`
2205 MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null`
2206 if test -n "$MINGW_GXXDLL"; then
2207 MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP
2208 MINGW_SHARED_GXXLIB=YES
2209 AC_MSG_RESULT([use $MINGW_GXXDLL])
2211 MINGW_SHARED_LIBSTDCPP=
2217 MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR`
2218 AC_SUBST(MINGW_CLIB_DIR)
2219 AC_SUBST(MINGW_SHARED_GCCLIB)
2220 AC_SUBST(MINGW_GCCLIB_EH)
2221 AC_SUBST(MINGW_SHARED_GXXLIB)
2222 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
2223 AC_SUBST(MINGW_GCCDLL)
2224 AC_SUBST(MINGW_GXXDLL)
2227 dnl ===================================================================
2228 dnl Extra checking for the SUN OS compiler
2229 dnl ===================================================================
2230 if test "$_os" = "SunOS"; then
2231 dnl SunStudio C++ compiler packaged with SunStudio C compiler
2232 if test "$CC" = "cc"; then
2233 AC_MSG_CHECKING([SunStudio C++ Compiler])
2234 if test "$CXX" != "CC"; then
2235 AC_MSG_WARN([SunStudio C++ was not found])
2236 echo "SunStudio C++ was not found" >> warn
2238 AC_MSG_RESULT([checked])
2242 dnl ===================================================================
2243 dnl Extra checking for the OSF compiler
2244 dnl ===================================================================
2245 if test "$_os" = "OSF1"; then
2246 AC_MSG_CHECKING([Compaq C++ compiler version])
2247 dnl cxx -V outputs to standard error!!!!
2248 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
2249 _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
2250 if test "$_compaqcxx_major" != "V6"; then
2251 AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler])
2252 echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
2254 dnl compiler will do
2255 AC_MSG_RESULT([checked])
2259 dnl *************************************************************
2260 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
2261 dnl *************************************************************
2262 AC_MSG_CHECKING([exception type])
2264 if test "$WITH_MINGWIN" = "yes"; then
2266 [#include <iostream>
2268 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
2271 [_Unwind_SjLj_RaiseException() ],
2272 [exceptions_type="sjlj"],
2273 [exceptions_type="dwarf2"]
2277 AC_MSG_RESULT($exceptions_type)
2279 EXCEPTIONS="$exceptions_type"
2280 AC_SUBST(EXCEPTIONS)
2282 dnl **************************************************************
2283 dnl Testing for required Solaris and SunStudio compiler patches...
2284 dnl **************************************************************
2285 dnl Check whether the OS is SunOS.
2286 if test "$_os" = "SunOS"; then
2287 _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
2288 if test "$_os_release" = "7"; then
2292 AC_MSG_CHECKING([for patch 106327-06 or greater])
2293 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
2297 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2298 if test "$_patch_major" = "106327"; then
2299 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2300 if test "$_patch_rev" -ge "6"; then
2305 if test "$_patch" = "found"; then
2306 AC_MSG_RESULT([found])
2308 AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
2309 echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
2314 AC_MSG_CHECKING([for patch 106950-11 or greater])
2315 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
2319 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2320 if test "$_patch_major" = "106950"; then
2321 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2322 if test "$_patch_rev" -ge "11"; then
2327 if test "$_patch" = "found"; then
2328 AC_MSG_RESULT([found])
2330 AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
2331 echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
2334 if test "$_os_release" = "6"; then
2338 AC_MSG_CHECKING([for patch 105591-09 or greater])
2339 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
2343 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2344 if test "$_patch_major" = "105591"; then
2345 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2346 if test "$_patch_rev" -ge "9"; then
2351 if test "$_patch" = "found"; then
2352 AC_MSG_RESULT([found])
2354 AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
2355 echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
2360 AC_MSG_CHECKING([for patch 107733-08 or greater])
2361 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
2365 _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
2366 if test "$_patch_major" = "107733"; then
2367 _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
2368 if test "$_patch_rev" -ge "8"; then
2373 if test "$_patch" = "found"; then
2374 AC_MSG_RESULT([found])
2376 AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
2377 echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
2383 dnl ===================================================================
2384 dnl Checks for what the default STL should be
2385 dnl ===================================================================
2386 AC_MSG_CHECKING([what the default STL should be])
2387 DEFAULT_TO_STLPORT="no"
2388 if test "$_os" = "Linux"; then
2389 case "$build_cpu" in
2391 case "$build_os" in k*bsd*-gnu*)
2392 DEFAULT_TO_STLPORT="no"
2395 DEFAULT_TO_STLPORT="yes"
2400 DEFAULT_TO_STLPORT="no"
2403 elif test "$_os" = "SunOS"; then
2404 DEFAULT_TO_STLPORT="yes"
2405 elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
2406 DEFAULT_TO_STLPORT="yes"
2407 elif test "$_os" = "OS2"; then
2408 DEFAULT_TO_STLPORT="yes"
2409 elif test "$_os" = "FreeBSD"; then
2410 DEFAULT_TO_STLPORT="yes"
2412 if test "$DEFAULT_TO_STLPORT" = "yes"; then
2413 AC_MSG_RESULT([stlport])
2415 AC_MSG_RESULT([system])
2417 if test "$WITH_STLPORT" = "auto"; then
2418 WITH_STLPORT=$DEFAULT_TO_STLPORT
2421 dnl ===================================================================
2422 dnl Checks for STLPORT
2423 dnl ===================================================================
2424 AC_MSG_CHECKING([for STL providing headers])
2427 if test "$WITH_STLPORT" = "yes"; then
2428 AC_MSG_RESULT([using internal stlport.])
2429 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2430 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2431 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2433 elif test "$WITH_STLPORT" = "no"; then
2434 AC_MSG_RESULT([using system STL])
2435 USE_SYSTEM_STL="YES"
2436 if test "$DEFAULT_TO_STLPORT" != "no"; then
2437 AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
2438 echo "using system STL. Warning, breaks your ABI compatability!" >>warn
2441 STLPORT4=$WITH_STLPORT
2442 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2443 AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
2445 dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
2446 if test -f "$STLPORT4/stlport/hash_map"; then
2447 AC_MSG_RESULT([checked.])
2449 AC_MSG_ERROR([STLport headers not found.])
2452 if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
2453 AC_MSG_CHECKING([for STLport libraries])
2454 if test "$_os" = "SunOS"; then
2455 if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
2456 AC_MSG_RESULT([checked])
2457 elif test -f "$STLPORT4/lib/libstlport.so"; then
2458 AC_MSG_RESULT([checked])
2461 AC_MSG_ERROR([STLport libraries not found])
2463 elif test "$_os" = "Darwin"; then
2464 if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
2465 AC_MSG_RESULT([checked])
2466 elif test -f "$STLPORT4/lib/libstlport.dylib"; then
2467 AC_MSG_RESULT([checked])
2470 AC_MSG_ERROR([STLport libraries not found])
2473 if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
2474 AC_MSG_RESULT([checked])
2475 elif test -f "$STLPORT4/lib/libstlport.so"; then
2476 AC_MSG_RESULT([checked])
2479 AC_MSG_ERROR([STLport libraries not found])
2483 if test "$DEFAULT_TO_STLPORT" != "yes"; then
2484 AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
2485 echo "using stlport. Warning, breaks your ABI compatability!" >>warn
2489 if test -z "$STLPORT4"; then
2490 STLPORT4="NO_STLPORT4"
2492 if test -z "$STLPORT_VER"; then
2496 AC_SUBST(STLPORT_VER)
2497 AC_SUBST(USE_SYSTEM_STL)
2499 dnl ===================================================================
2500 dnl visibility feature
2501 dnl ===================================================================
2502 if test "$GCC" = "yes"; then
2503 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
2505 CFLAGS="$CFLAGS -fvisibility=hidden"
2506 AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
2508 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2509 AC_MSG_RESULT([yes])
2515 # ===================================================================
2516 # use --ccache-skip?
2517 # ===================================================================
2518 dnl used to escape compiler options for ccache that otherwise prevent
2519 dnl caching of the results (like "-x objective-c++" for Mac)
2520 AC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip])
2521 if test "$_os" != "Darwin" ; then
2522 AC_MSG_RESULT([only used on Mac currently, skipping])
2523 elif test "$enable_ccache_skip" = "no" ; then
2524 AC_MSG_RESULT([no - diabled explicitly])
2525 elif test "$enable_ccache_skip" = "yes" ; then
2526 AC_MSG_RESULT([yes - enabled explicitly, skipping checks])
2527 AC_SUBST([USE_CCACHE], [YES])
2528 elif test "$enable_ccache_skip" = "auto" ; then
2529 # checking for ccache presence/version
2530 AC_MSG_RESULT([probing...])
2531 AC_PATH_PROG([CCACHE],[ccache],[not_found])
2532 if test "$CCACHE" = "not_found" ; then
2533 AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)])
2535 # check ccache version
2536 AC_MSG_CHECKING([whether version of ccache is suitable])
2537 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2538 if test "$CCACHE_VERSION" = "2.4_OOo"; then
2539 AC_MSG_RESULT([yes])
2540 AC_MSG_CHECKING([whether ccache is actually used for the build])
2542 save_CXXFLAGS=$CXXFLAGS
2543 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
2544 dnl an empty program will do, we're checking the compiler flags
2545 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),
2546 [use_ccache=yes], [use_ccache=no])
2547 if test $use_ccache = yes ; then
2548 AC_MSG_RESULT([yes, will enable --ccache-skip])
2549 AC_SUBST([USE_CCACHE], [YES])
2551 AC_MSG_RESULT([no, will not enable --ccache-skip])
2553 CXXFLAGS=$save_CXXFLAGS
2557 AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip])
2561 AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"])
2564 dnl ===================================================================
2565 dnl system stl sanity tests
2566 dnl ===================================================================
2567 if test "$USE_SYSTEM_STL" = "YES"; then
2568 AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
2571 AC_TRY_COMPILE([#include <ext/hash_map>
2572 using namespace __gnu_cxx;
2573 ],[hash_map<int, int> t; return 0;],
2574 ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
2576 if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
2577 AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
2579 AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
2582 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2583 AC_MSG_CHECKING([if STL headers are visibility safe])
2584 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
2585 AC_MSG_RESULT([$stlvisok])
2586 if test "$stlvisok" = "no"; then
2587 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
2588 echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn
2589 unset HAVE_GCC_VISIBILITY_FEATURE
2593 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2594 sharedlink_ldflags_save=$LDFLAGS
2595 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
2597 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
2598 AC_TRY_LINK([#include <sstream>
2599 using namespace std;
2600 ],[istringstream strm( "test" ); return 0;],
2601 $EGREP -q unresolvable conftest.err;
2602 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
2604 AC_MSG_RESULT([$gccvisok])
2605 if test "$gccvisok" = "no"; then
2606 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility])
2607 echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn
2608 unset HAVE_GCC_VISIBILITY_FEATURE
2611 LDFLAGS=$sharedlink_ldflags_save
2614 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
2615 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
2616 cat >visibility.cxx <<_ACEOF
2617 #pragma GCC visibility push(hidden)
2618 struct __attribute__ ((visibility ("default"))) TestStruct {
2621 __attribute__ ((visibility ("default"))) void TestFunc() {
2625 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
2628 case "$build_cpu" in
2630 if $EGREP -q '@PLT' visibility.s; then
2643 AC_MSG_RESULT([$gccvisbroken])
2644 if test "$gccvisbroken" = "yes"; then
2645 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
2646 echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn
2647 unset HAVE_GCC_VISIBILITY_FEATURE
2654 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
2656 dnl ===================================================================
2658 dnl ===================================================================
2659 AC_MSG_CHECKING([which memory allocator to use])
2660 if test "$with_alloc" = "system"; then
2661 AC_MSG_RESULT([system])
2663 AC_CHECK_FUNCS([malloc realloc calloc free])
2665 if test "$with_alloc" = "tcmalloc"; then
2666 AC_MSG_RESULT(tcmalloc)
2667 if ! echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
2668 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
2670 AC_CHECK_LIB(tcmalloc, malloc, [],
2671 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
2674 if test "$with_alloc" = "jemalloc"; then
2675 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
2676 AC_MSG_RESULT(jemalloc)
2678 CFLAGS="$CFLAGS -pthread"
2679 AC_CHECK_LIB(jemalloc, malloc, [],
2680 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
2684 AC_MSG_RESULT([system])
2686 AC_CHECK_FUNCS([malloc realloc calloc free])
2689 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
2690 AC_MSG_RESULT([internal])
2694 dnl ===================================================================
2695 dnl Custom build version
2696 dnl ===================================================================
2698 AC_MSG_CHECKING([whether to add custom build version])
2699 if test "z$with_build_version" != "z"; then
2700 BUILD_VER_STRING=$with_build_version
2701 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
2706 AC_SUBST(BUILD_VER_STRING)
2708 dnl ===================================================================
2709 dnl Java support enable
2710 dnl ===================================================================
2711 AC_MSG_CHECKING([whether to build with Java support])
2712 if test "$WITH_JAVA" != "no"; then
2713 AC_MSG_RESULT([yes])
2719 AC_MSG_WARN([building without java will mean some features will not be available])
2720 echo "building without java will mean some features will not be available" >>warn
2722 AC_SUBST(SOLAR_JAVA)
2724 if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
2725 # IBMs JDK needs this...
2726 JITC_PROCESSOR_TYPE=6
2727 export JITC_PROCESSOR_TYPE
2730 if test "$_os" = "WINNT"; then
2731 if test -z "$with_jdk_home"; then
2732 _jdk_home=`./oowintool --jdk-home`
2733 if test -d "$_jdk_home"; then
2734 with_jdk_home="$_jdk_home"
2737 with_jdk_home=`cygpath -u "$with_jdk_home"`
2741 dnl ===================================================================
2743 dnl ===================================================================
2744 if test "$SOLAR_JAVA" != ""; then
2745 JAVA_HOME=; export JAVA_HOME
2746 if test -z "$with_jdk_home"; then
2747 AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
2749 _java_path="$with_jdk_home/bin/$WITH_JAVA"
2750 dnl Check if there is a java interpreter at all.
2751 if test -x "$_java_path"; then
2752 JAVAINTERPRETER=$_java_path
2754 AC_MSG_ERROR([$_java_path not found set with_jdk_home])
2757 if test "$_os" = "WINNT"; then
2758 if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
2759 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
2761 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
2762 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
2763 elif test "$_os" = "Darwin"; then
2764 dnl HACK: There currently is only a 32 bit version of OOo for Mac OS X,
2765 dnl and Tiger java complains about -d32 while Snow Leopard java needs it
2766 dnl to run in 32 bit mode and be able to load OOo jnilibs:
2767 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
2768 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
2769 AC_MSG_RESULT([yes])
2777 dnl ===================================================================
2779 dnl ===================================================================
2780 if test "$SOLAR_JAVA" != ""; then
2782 AC_MSG_CHECKING([the installed JDK])
2783 if test -n "$JAVAINTERPRETER"; then
2784 dnl java -version sends output to stderr!
2785 if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
2786 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2787 # dnl Kaffe specific tests
2788 # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
2789 # if test -z "$KAFFE_VER"; then
2790 # AC_MSG_ERROR([looks like Kaffe but version detection failed])
2792 # _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2793 # if test "$_kaffe_ver" -lt 10100; then
2794 # AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
2798 # dnl TODO: define some project exclusion variables
2800 # AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
2801 # AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
2802 # echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
2803 # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2804 elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
2806 AC_MSG_RESULT([checked (gcj)])
2807 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
2808 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2810 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
2811 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
2814 # dnl BEA JDK specific tests
2815 # _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2816 # _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2818 # if test "$_jdk_ver" -lt 10500; then
2819 # AC_MSG_ERROR([JDK is too old, you need at least BEA JDK 1.5.0])
2822 # AC_MSG_RESULT([checked (BEA JDK $_jdk)])
2824 # if test "$with_jdk_home" = ""; then
2825 # AC_MSG_ERROR([In order to successfully build OpenOffice.org using the BEA JDK,
2826 #you must use the "--with-jdk-home" configure option explicitly])
2829 # AC_MSG_WARN([A bug in certain BEA JREs can prevent you from successfully compiling some modules])
2830 # echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn
2832 # JAVA_HOME=$with_jdk_home
2834 elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
2837 dnl IBM JDK specific tests
2838 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2839 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2841 if test "$_jdk_ver" -lt 10500; then
2842 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
2845 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
2847 if test "$with_jdk_home" = ""; then
2848 AC_MSG_ERROR([In order to successfully build OpenOffice.org using the IBM JDK,
2849 you must use the "--with-jdk-home" configure option explicitly])
2852 JAVA_HOME=$with_jdk_home
2857 dnl SUN JDK specific tests
2858 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
2859 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2861 if test "$_jdk_ver" -lt 10500; then
2862 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
2864 AC_MSG_RESULT([checked (JDK $_jdk)])
2865 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
2866 if test "$_os" = "WINNT"; then
2867 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2869 if test "$_os" = "OS2"; then
2870 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
2874 AC_MSG_ERROR([JAVA not found. You need at least jdk-1.5, or gcj-4])
2878 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
2881 dnl ===================================================================
2882 dnl Checks for javac
2883 dnl ===================================================================
2884 if test "$SOLAR_JAVA" != ""; then
2885 if test "$JDK" = "gcj"; then
2886 javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
2888 javacompiler="javac"
2890 if test "$_os" = "OS2"; then
2891 if test x`echo "$javacompiler" | grep -i '\.exe$'` = x; then
2892 javacompiler="${javacompiler}.exe"
2895 if test -z "$with_jdk_home"; then
2896 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
2898 _javac_path="$with_jdk_home/bin/$javacompiler"
2899 dnl Check if there is a java compiler at all.
2900 if test -x "$_javac_path"; then
2901 JAVACOMPILER=$_javac_path
2904 if test -z "$JAVACOMPILER"; then
2905 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
2907 if test "$_os" = "WINNT"; then
2908 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2909 JAVACOMPILER="${JAVACOMPILER}.exe"
2911 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
2912 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
2914 if test "$_os" = "OS2"; then
2915 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
2916 JAVACOMPILER="${JAVACOMPILER}.exe"
2920 if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
2921 AC_MSG_CHECKING([re-checking JDK])
2923 AC_MSG_RESULT([checked (ecj)])
2924 #TODO: what's to do here? some switch to do 1.5 compiling?
2925 JAVAFLAGS="-source 1.5 -target 1.5"
2926 _gij_longver="40200"
2931 dnl ===================================================================
2932 dnl Checks that javac is gcj
2933 dnl ===================================================================
2934 if test "$SOLAR_JAVA" != ""; then
2935 if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
2939 AC_SUBST(JAVACISGCJ)
2941 dnl ===================================================================
2942 dnl Checks for javadoc
2943 dnl ===================================================================
2944 if test "$SOLAR_JAVA" != ""; then
2945 if test -z "$with_jdk_home"; then
2946 AC_PATH_PROG(JAVADOC, javadoc)
2948 _javadoc_path="$with_jdk_home/bin/javadoc"
2949 if test "$_os" = "OS2"; then
2950 if test x`echo "$_javadoc_path" | grep -i '\.exe$'` = x; then
2951 _javadoc_path="${_javadoc_path}.exe"
2954 dnl Check if there is a javadoc at all.
2955 if test -x "$_javadoc_path"; then
2956 JAVADOC=$_javadoc_path
2958 AC_PATH_PROG(JAVADOC, javadoc)
2961 if test -z "$JAVADOC"; then
2962 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
2964 if test "$_os" = "WINNT"; then
2965 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2966 JAVADOC="${JAVADOC}.exe"
2968 JAVADOC=`cygpath -d "$JAVADOC"`
2969 JAVADOC=`cygpath -u "$JAVADOC"`
2971 if test "$_os" = "OS2"; then
2972 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
2973 JAVADOC="${JAVADOC}.exe"
2978 if test "$SOLAR_JAVA" != ""; then
2979 dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
2980 if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then
2981 if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then
2982 cat > findhome.java <<_ACEOF
2983 [import java.io.File;
2987 public static void main(String args[])
2989 String jrelocation = System.getProperty("java.home");
2990 File jre = new File(jrelocation);
2991 System.out.println(jre.getParent());
2995 AC_MSG_CHECKING([if javac works])
2996 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
2997 AC_TRY_EVAL(javac_cmd)
2998 if test $? = 0 && test -f ./findhome.class ; then
2999 AC_MSG_RESULT([javac works])
3001 echo "configure: javac test failed" >&5
3002 cat findhome.java >&5
3003 AC_MSG_ERROR([javac does not work - java projects will not build!])
3006 AC_MSG_CHECKING([if gij knows its java.home])
3007 JAVA_HOME=`$JAVAINTERPRETER findhome`
3008 if test $? = 0 && test "$JAVA_HOME" != "" ; then
3009 AC_MSG_RESULT([$JAVA_HOME])
3011 echo "configure: java test failed" >&5
3012 cat findhome.java >&5
3013 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
3016 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
3020 dnl second sanity check JAVA_HOME if possible
3021 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
3022 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
3023 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
3025 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
3026 # try to recover first by looking whether we have a alternatives
3027 # system as in Debian or newer SuSEs where following /usr/bin/javac
3028 # over /etc/alternatives/javac leads to the right bindir where we
3029 # just need to strip a bit away to get a valid JAVA_HOME
3030 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
3031 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
3032 # maybe only one level of symlink (e.g. on Mac)
3033 JAVA_HOME=$(readlink $JAVACOMPILER)
3036 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
3037 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
3038 echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
3039 echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
3041 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
3042 if test "$JAVA_HOME" != "/usr"; then
3043 if test "$_os" = "Darwin"; then
3044 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
3045 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
3046 dnl Tiger already returns a JDK path..
3047 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
3049 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
3053 # now check if $JAVA_HOME is really valid
3054 if test "$_os" = "Darwin"; then
3055 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
3058 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
3061 if test "$JAVA_HOME_OK" = "NO"; then
3062 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
3063 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
3064 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
3065 echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
3066 echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
3067 echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
3068 # if test "$JDK" = "gcj"; then
3069 # 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
3076 if test "$SOLAR_JAVA" != ""; then
3077 AC_MSG_CHECKING([for jawt lib name])
3078 if test "$JDK" = "gcj"; then
3080 save_LDFLAGS=$LDFLAGS
3081 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3082 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
3083 exec 6>/dev/null # no output
3084 AC_CHECK_HEADER(jni.h, [],
3085 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
3086 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
3087 exec 6>&1 # output on again
3089 LDFLAGS=$save_LDFLAGS
3091 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
3092 # A workaround is to link also against libpmawt.so
3093 if test "$JDK" = "ibm" ; then
3095 save_LDFLAGS=$LDFLAGS
3096 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
3097 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
3098 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
3099 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
3100 export LD_LIBRARY_PATH
3101 exec 6>/dev/null # no output
3102 AC_CHECK_HEADER(jni.h, [],
3103 [AC_MSG_ERROR([jni.h could not be found.])], [])
3104 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
3105 if test -z "$AWTLIB"; then
3106 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
3107 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
3109 exec 6>&1 # output on again
3111 LDFLAGS=$save_LDFLAGS
3112 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
3114 if test -z "$AWTLIB"; then
3117 AC_MSG_RESULT([$AWTLIB])
3121 dnl ===================================================================
3122 dnl Check for optional gcj for AOT
3123 dnl ===================================================================
3124 if test "$SOLAR_JAVA" != ""; then
3125 AC_MSG_CHECKING([whether to enable gcj aot compilation])
3126 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
3127 AC_MSG_RESULT([yes])
3128 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
3131 gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
3133 AC_MSG_RESULT([$gcjaot])
3134 if test -n "$with_jdk_home"; then
3135 _javac_path="$with_jdk_home/bin/$gcjaot"
3136 dnl Check if there is a gcj at all.
3137 if test -x "$_javac_path"; then
3138 JAVAAOTCOMPILER=$_javac_path
3141 if test -z "$JAVAAOTCOMPILER"; then
3142 AC_PATH_PROG(JAVAAOTCOMPILER, $gcjaot)
3144 if test -z "$JAVAAOTCOMPILER"; then
3145 AC_MSG_WARN([$gcjaot not found, set with_jdk_home])
3155 AC_SUBST(JAVAINTERPRETER)
3156 AC_SUBST(JAVAIFLAGS)
3157 AC_SUBST(JAVACOMPILER)
3158 AC_SUBST(JAVAAOTCOMPILER)
3161 dnl ===================================================================
3162 dnl Checks for specific files.
3163 dnl ===================================================================
3165 dnl ===================================================================
3166 dnl Checks for programs.
3167 dnl ===================================================================
3169 dnl ===================================================================
3170 dnl Check whether we already have dmake
3171 dnl ===================================================================
3172 AC_PATH_PROG(DMAKE, dmake, no)
3173 if test "$DMAKE" = "no"; then
3175 echo "dmake will be built on ./bootstrap"
3177 AC_MSG_CHECKING([whether the found dmake is the right dmake])
3178 # we need to find out whether that dmake we found is "our" dmake
3179 # or the dmake from Sun's SunStudio Compiler which is something
3181 # This test _should_ work because the one accepts -V (ours) and one
3182 # (the other) not...
3183 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3184 if test $? -eq 0; then
3186 AC_MSG_RESULT([yes])
3187 AC_MSG_CHECKING([the dmake version])
3188 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3189 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3190 AC_MSG_RESULT([OK, >= 4.11])
3191 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3192 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3193 AC_MSG_RESULT([OK, >= 4.11])
3195 AC_MSG_RESULT([too old. >= 4.11 is needed])
3196 echo "A newer dmake will be built on ./bootstrap"
3201 echo "dmake will be built on ./bootstrap"
3205 AC_SUBST(BUILD_DMAKE)
3207 AC_MSG_CHECKING([whether to enable EPM for packing])
3208 if test "$enable_epm" = "yes"; then
3209 AC_MSG_RESULT([yes])
3210 dnl ===================================================================
3211 dnl Check for epm - not needed for windows
3212 dnl ===================================================================
3213 if test "$_os" != "WINNT"; then
3214 if test -n "$with_epm"; then
3217 AC_PATH_PROG(EPM, epm, no)
3219 if test "$EPM" = "no" || test "$EPM" = "internal"; then
3220 echo "EPM will be built."
3222 BUILD_TYPE="$BUILD_TYPE EPM"
3224 # Gentoo has some epm which is something different...
3225 AC_MSG_CHECKING([whether the found epm is the right epm])
3226 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
3227 AC_MSG_RESULT([yes])
3229 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
3231 AC_MSG_CHECKING([epm version])
3232 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
3233 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
3234 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
3235 AC_MSG_RESULT([OK, >= 3.7])
3237 if test "$_os" = "Darwin"; then
3238 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
3239 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
3240 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3241 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)])
3242 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
3243 AC_MSG_RESULT([$_pm, ok])
3244 else # we never should get here, but go safe
3245 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)])
3249 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
3250 echo "EPM will be built."
3252 BUILD_TYPE="$BUILD_TYPE EPM"
3257 # test which package format to use
3258 AC_MSG_CHECKING([which package format to use])
3272 # if building on Debian, default should be deb...
3273 if test -e /etc/debian_version; then
3291 # we never should get here since we check the arciecture/os at the beginning,
3294 AC_MSG_ERROR([unknown system])
3296 if test -n "$with_package_format"; then
3297 for i in $with_package_format; do
3299 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
3302 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
3303 aix - AIX software distribution
3304 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
3305 depot or swinstall - HP-UX software distribution
3306 deb - Debian software distribution
3307 inst or tardist - IRIX software distribution
3308 osx - MacOS X software distribution
3309 pkg - Solaris software distribution
3310 rpm - RedHat software distribution
3311 setld - Tru64 (setld) software distribution
3312 native - "Native" software distribution for the platform
3313 portable - Portable software distribution
3314 OOo additionally supports:
3315 archive - .tar.gz or .zip
3317 installed - installation tree
3323 PKGFORMAT="$with_package_format"
3325 AC_MSG_RESULT([$PKGFORMAT])
3326 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
3327 AC_MSG_CHECKING([for rpm])
3328 for a in "$RPM" rpmbuild rpm; do
3329 $a --usage >/dev/null 2> /dev/null
3330 if test $? -eq 0; then
3334 $a --version >/dev/null 2> /dev/null
3335 if test $? -eq 0; then
3341 if test -z "$RPM" ; then
3342 AC_MSG_ERROR([not found])
3343 elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then
3344 RPM_PATH=`which $RPM`
3345 AC_MSG_RESULT([$RPM_PATH])
3347 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
3350 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
3351 AC_PATH_PROG(DPKG, dpkg, no)
3352 if test "$DPKG" = "no"; then
3353 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
3356 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
3357 if test "$_os" = "Darwin"; then
3358 AC_MSG_CHECKING([for PackageMaker availability])
3359 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
3360 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
3365 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
3368 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
3369 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3370 if test "$EPM" != "no" && test "$EPM" != "internal"; then
3371 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
3372 AC_MSG_CHECKING([whether epm is patched for OOos needs])
3373 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
3374 AC_MSG_RESULT([yes])
3377 if echo "$PKGFORMAT" | grep -q rpm; then
3379 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
3380 echo "the rpms will need to be installed with --nodeps" >> warn
3384 AC_MSG_WARN([the ${_pt}s will not be relocateable])
3385 echo "the ${_pt}s will not be relocateable" >> warn
3386 AC_MSG_WARN([if you want to make sure installation without --nodeps and
3387 relocation will work, you need to patch your epm with the
3388 patch in epm/epm-3.7.patch or build with
3389 --with-epm=internal which will build a suitable epm])
3394 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
3395 AC_PATH_PROG(PKGMK, pkgmk, no)
3396 if test "$PKGMK" = "no"; then
3397 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
3412 dnl ===================================================================
3414 dnl ===================================================================
3415 AC_PATH_PROG(GPERF, gperf)
3416 if test -z "$GPERF"; then
3417 AC_MSG_ERROR([gperf not found but needed. Install it.])
3419 AC_MSG_CHECKING([gperf version])
3420 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
3423 AC_MSG_ERROR([too old, you need at least 3.0.0])
3426 dnl ===================================================================
3427 dnl Check for building stax
3428 dnl ===================================================================
3429 AC_MSG_CHECKING([whether to build the stax])
3430 if test -f "./stax/download/jsr173_1.0_api.jar"; then
3432 AC_MSG_RESULT([no, will use the prebuilt stax/download/jsr173_1.0_api.jar])
3435 AC_MSG_RESULT([yes])
3437 AC_SUBST(BUILD_STAX)
3439 dnl ===================================================================
3440 dnl Check for building ODK
3441 dnl ===================================================================
3442 AC_MSG_CHECKING([whether to build the ODK])
3443 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
3444 AC_MSG_RESULT([yes])
3445 if test "$WITH_JAVA" != "no"; then
3446 AC_MSG_CHECKING([for external/unowinreg/unowinreg.dll])
3447 if ! test -f "./external/unowinreg/unowinreg.dll"; then
3448 HAVE_UNOWINREG_DLL=no
3450 HAVE_UNOWINREG_DLL=yes
3452 if test "$HAVE_UNOWINREG_DLL" = "yes"; then
3453 AC_MSG_RESULT([found])
3456 if test "$_os" = "WINNT"; then
3457 AC_MSG_RESULT([not found, will be built])
3459 AC_MSG_WARN([not found, will be cross-built using mingw32])
3463 if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then
3464 if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then
3465 AC_MSG_ERROR([for rebuilding unowinreg.dll you need the mingw32 C++ compiler.
3466 Specify mingw32 g++ executable name with --with-mingwin.
3467 Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and
3468 put it into external/unowinreg])
3470 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3471 if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi
3473 AC_CHECK_TOOL(MINGWCXX, $WITH_MINGWIN, false)
3475 if test "$MINGWCXX" = "false"; then
3476 AC_MSG_ERROR(specified MinGW32 C++ cross-compiler not found. Install it or correct name.)
3478 AC_MSG_CHECKING(whether we are using the MinGW32 cross C++ compiler)
3479 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then
3484 if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
3485 if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi
3487 AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ |
3488 $SED -e s/c++/strip/`, false)
3490 if test "$MINGWSTRIP" = "false"; then
3491 AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
3497 CXXCPP="$MINGWCXX -E"
3498 save_CXXFLAGS=$CXXFLAGS
3499 save_CPPFLAGS=$CPPFLAGS
3500 CXXFLAGS="$CXXFLAGS -I$JAVA_HOME/include"
3501 CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
3502 # LIBS contains -lcrypt etc due to teh AC_CHECK_LIBS which obviously
3503 # do not make sense here (and 'd make the check fail)
3506 AC_HAVE_LIBRARY(kernel32)
3507 AC_HAVE_LIBRARY(advapi32)
3508 AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h missing])])
3509 CXXFLAGS=$save_CXXFLAGS
3510 CPPFLAGS=$save_CPPFLAGS
3517 BUILD_TYPE="$BUILD_TYPE ODK"
3522 AC_SUBST(BUILD_UNOWINREG)
3524 AC_SUBST(MINGWSTRIP)
3526 dnl ===================================================================
3527 dnl Check for system stdlibs
3528 dnl ===================================================================
3529 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
3530 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
3531 test "$with_system_stdlibs" != "no"; then
3535 AC_MSG_RESULT([yes])
3538 AC_SUBST(SYSTEM_STDLIBS)
3540 dnl ===================================================================
3541 dnl Check for system zlib
3542 dnl ===================================================================
3543 if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
3544 with_system_zlib=yes
3546 AC_MSG_CHECKING([which zlib to use])
3547 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
3548 test "$with_system_zlib" != "no"; then
3549 AC_MSG_RESULT([external])
3551 AC_CHECK_HEADER(zlib.h, [],
3552 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
3553 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
3554 [AC_MSG_ERROR(zlib not found or functional)], [])
3556 AC_MSG_RESULT([internal])
3558 BUILD_TYPE="$BUILD_TYPE ZLIB"
3560 AC_SUBST(SYSTEM_ZLIB)
3562 dnl ===================================================================
3563 dnl Check for system jpeg
3564 dnl ===================================================================
3565 AC_MSG_CHECKING([which jpeg to use])
3566 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
3567 test "$with_system_jpeg" != "no"; then
3568 AC_MSG_RESULT([external])
3570 AC_CHECK_HEADER(jpeglib.h, [],
3571 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
3572 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
3573 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
3575 AC_MSG_RESULT([internal])
3577 BUILD_TYPE="$BUILD_TYPE JPEG"
3579 AC_SUBST(SYSTEM_JPEG)
3581 dnl ===================================================================
3582 dnl Check for system expat
3583 dnl ===================================================================
3584 AC_MSG_CHECKING([which expat to use])
3585 if test -n "$with_system_expat" -o -n "$with_system_libs" && \
3586 test "$with_system_expat" != "no"; then
3587 AC_MSG_RESULT([external])
3589 AC_CHECK_HEADER(expat.h, [],
3590 [AC_MSG_ERROR(expat.h not found. install expat)], [])
3591 AC_CHECK_LIB(expat, XML_ParserCreate, [],
3592 [AC_MSG_RESULT(expat library not found or functional.)], [])
3594 AC_MSG_RESULT([internal])
3596 BUILD_TYPE="$BUILD_TYPE EXPAT"
3598 AC_SUBST(SYSTEM_EXPAT)
3600 dnl ===================================================================
3601 dnl Check for system libwpd
3602 dnl ===================================================================
3603 AC_MSG_CHECKING([which libwpd to use])
3604 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
3605 test "$with_system_libwpd" != "no"; then
3606 AC_MSG_RESULT([external])
3608 PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
3610 AC_MSG_RESULT([internal])
3612 BUILD_TYPE="$BUILD_TYPE LIBWPD"
3614 AC_SUBST(SYSTEM_LIBWPD)
3615 AC_SUBST(LIBWPD_CFLAGS)
3616 AC_SUBST(LIBWPD_LIBS)
3618 dnl ===================================================================
3619 dnl Check for system cppunit
3620 dnl ===================================================================
3621 AC_MSG_CHECKING([which cppunit to use])
3622 if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
3623 test "$with_system_cppunit" != "no"; then
3624 AC_MSG_RESULT([external])
3626 # might work for earlier, too but go sure:
3627 PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.0 )
3629 AC_MSG_RESULT([internal])
3631 BUILD_TYPE="$BUILD_TYPE CPPUNIT"
3633 AC_SUBST(SYSTEM_CPPUNIT)
3634 AC_SUBST(CPPUNIT_CFLAGS)
3635 AC_SUBST(CPPUNIT_LIBS)
3637 dnl ===================================================================
3638 dnl Check whether freetype is available
3639 dnl ===================================================================
3640 if test "$test_freetype" = "yes"; then
3641 AC_MSG_CHECKING([whether freetype is available])
3642 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
3644 AC_SUBST(FREETYPE_CFLAGS)
3645 AC_SUBST(FREETYPE_LIBS)
3647 dnl ===================================================================
3648 dnl Check whether freetype2 supports emboldening
3649 dnl ===================================================================
3650 if test "$test_freetype" = "yes"; then
3651 save_CPPFLAGS="$CPPFLAGS"
3652 save_LDFLAGS="$LDFLAGS"
3654 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
3655 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
3656 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
3657 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
3658 LDFLAGS="$save_LDFLAGS"
3659 CPPFLAGS="$save_CPPFLAGS"
3662 AC_SUBST(USE_FT_EMBOLDEN)
3664 if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
3665 test "$with_system_libxslt" != "no"; then
3666 if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
3667 test "$with_system_libxml" = "no"; then
3668 # somehow AC_MSG_WARN won't work...
3669 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
3670 echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
3671 with_system_libxml=yes
3674 if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
3675 test "$with_system_libxml" != "no"; then
3676 if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
3677 test "$with_system_libxslt" = "no"; then
3678 # somehow AC_MSG_WARN won't work...
3679 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
3680 echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
3681 with_system_libxslt=yes
3685 dnl ===================================================================
3686 dnl Check for system libxslt
3687 dnl ===================================================================
3688 AC_MSG_CHECKING([which libxslt to use])
3689 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
3690 "$_os" = "Darwin" && \
3691 test "$with_system_libxslt" != "no"; then
3692 AC_MSG_RESULT([external])
3695 PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
3697 dnl Check for xsltproc
3698 AC_PATH_PROG(XSLTPROC, xsltproc, no)
3699 if test "$XSLTPROC" = "no"; then
3700 AC_MSG_ERROR([xsltproc is required])
3703 AC_MSG_RESULT([internal])
3705 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
3707 AC_SUBST(SYSTEM_LIBXSLT)
3708 AC_SUBST(LIBXSLT_CFLAGS)
3709 AC_SUBST(LIBXSLT_LIBS)
3712 dnl ===================================================================
3713 dnl Check for system libxml
3714 dnl ===================================================================
3715 AC_MSG_CHECKING([which libxml to use])
3716 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
3717 "$_os" = "Darwin" && \
3718 test "$with_system_libxml" != "no"; then
3719 AC_MSG_RESULT([external])
3721 PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
3722 BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
3724 AC_MSG_RESULT([internal])
3726 BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
3728 AC_SUBST(SYSTEM_LIBXML)
3729 AC_SUBST(LIBXML_CFLAGS)
3730 AC_SUBST(LIBXML_LIBS)
3732 dnl ===================================================================
3733 dnl Check for system python
3734 dnl ===================================================================
3735 AC_MSG_CHECKING([which python to use])
3736 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
3737 with_system_python=yes
3738 AC_MSG_RESULT([compiling against MacOSX10.4u.sdk (python version 2.3)])
3739 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
3740 PYTHON_LIBS="-framework Python"
3741 elif test -n "$with_system_python" -o -n "$with_system_libs" && \
3742 test "$with_system_python" != "no"; then
3743 with_system_python=yes
3744 AC_MSG_RESULT([external])
3745 AM_PATH_PYTHON([2.2])
3747 python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
3748 python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
3749 PYTHON_CFLAGS="-I$python_include"
3750 PYTHON_LIBS="-lpython$python_version"
3752 if test "$with_system_python" = "yes" ; then
3754 dnl check if the headers really work:
3755 save_CPPFLAGS="$CPPFLAGS"
3756 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
3757 AC_CHECK_HEADER(Python.h, [],
3758 [AC_MSG_ERROR(Python headers not found)], [])
3759 CPPFLAGS="$save_CPPFLAGS"
3762 BUILD_TYPE="$BUILD_TYPE PYTHON"
3763 AC_MSG_RESULT([internal])
3764 # Embedded python dies without Home set
3765 if test "z$HOME" = "z"; then
3768 # bz2 tarball and bzip2 is not standard
3769 if test -z "$BZIP2"; then
3770 AC_PATH_PROG( BZIP2, bzip2)
3771 if test -z "$BZIP2"; then
3772 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
3776 AC_SUBST(SYSTEM_PYTHON)
3777 AC_SUBST(PYTHON_CFLAGS)
3778 AC_SUBST(PYTHON_LIBS)
3779 HOME=`echo $HOME | sed 's:\\\\:/:g'`
3782 dnl ===================================================================
3783 dnl Check for system berkley db
3784 dnl ===================================================================
3785 AC_MSG_CHECKING([which db to use])
3786 if test -n "$with_system_db" -o -n "$with_system_libs" && \
3787 test "$with_system_db" != "no"; then
3789 AC_MSG_RESULT([external])
3790 AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
3792 CFLAGS=-I/usr/include/db4
3793 AC_CHECK_HEADER(db4/db.h,
3794 [ DB_INCLUDES=/usr/include/db4 ],
3795 [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
3798 AC_MSG_CHECKING([whether db is at least 4.1])
3802 int main(int argc, char **argv) {
3803 if(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) return 0;
3806 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
3807 AC_HAVE_LIBRARY(db, [],
3808 [AC_MSG_ERROR([db not installed or functional])], [])
3809 SCPDEFS="$SCPDEFS -DSYSTEM_DB"
3811 AC_MSG_RESULT([internal])
3813 BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
3816 AC_SUBST(DB_VERSION)
3817 AC_SUBST(DB_INCLUDES)
3820 dnl ===================================================================
3821 dnl Check for system lucene
3822 dnl ===================================================================
3823 AC_MSG_CHECKING([which lucene to use])
3824 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
3825 test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then
3826 AC_MSG_RESULT([external])
3828 if test -z $LUCENE_CORE_JAR; then
3829 AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
3830 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
3832 AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
3833 [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
3834 [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
3835 [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
3836 [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
3843 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3844 [AC_MSG_ERROR(lucene-core.jar not found.)], [])
3847 if test -z $LUCENE_ANALYZERS_JAR; then
3848 AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
3849 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
3851 AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
3852 [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
3853 [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
3858 AC_CHECK_FILE($LUCENE_CORE_JAR, [],
3859 [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
3861 AC_MSG_CHECKING([whether lucene is version 2.x])
3862 export LUCENE_CORE_JAR
3863 if $PERL -e 'use Archive::Zip;
3864 my $file = "$ENV{'LUCENE_CORE_JAR'}";
3865 my $zip = Archive::Zip->new( $file );
3866 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
3867 if ( $mf =~ m/Specification-Version: 2.*/ ) {
3872 AC_MSG_RESULT([yes])
3874 AC_MSG_ERROR([no, you need lucene 2])
3878 AC_MSG_RESULT([internal])
3880 BUILD_TYPE="$BUILD_TYPE LUCENE"
3882 AC_SUBST(SYSTEM_LUCENE)
3883 AC_SUBST(LUCENE_CORE_JAR)
3884 AC_SUBST(LUCENE_ANALYZERS_JAR)
3886 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
3887 if test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then
3888 AC_MSG_RESULT([yes])
3890 AC_MSG_CHECKING([for mysqlc module])
3891 if test -d mysqlc; then
3894 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
3896 BUILD_TYPE="$BUILD_TYPE MYSQLC"
3901 AC_SUBST(ENABLE_MYSQLC)
3903 if test "$ENABLE_MYSQLC" = "YES"; then
3904 dnl ===================================================================
3905 dnl Check for system MySQL
3906 dnl ===================================================================
3907 AC_MSG_CHECKING([for mysql pre-requisites])
3908 if test -n "$with_system_mysql" -o -n "$with_system_libs" && \
3909 test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then
3910 AC_MSG_RESULT([external MySQL])
3912 AC_PATH_PROG( MYSQLCONFIG, mysql_config)
3913 AC_MSG_CHECKING([MySQL version])
3914 MYSQL_VERSION=`$MYSQLCONFIG --version`
3915 MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
3916 if test "$MYSQL_MAJOR" -ge "5"; then
3919 AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
3921 AC_MSG_CHECKING([for MySQL Client library])
3922 MYSQL_INC=`$MYSQLCONFIG --include`
3923 MYSQL_LIB=`$MYSQLCONFIG --libs`
3924 MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,`
3925 AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
3928 if test -n "$with_libmysql_path"; then
3929 AC_MSG_RESULT([external Connector/C (libmysql)])
3930 LIBMYSQL=libmysql.so
3931 if test "$_os" = "Darwin"; then
3932 LIBMYSQL=libmysql.dylib
3933 elif test "$_os" = "WINNT"; then
3934 LIBMYSQL=libmysql.dll
3936 AC_MSG_CHECKING([for $LIBMYSQL])
3937 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
3938 AC_MSG_RESULT([found.])
3939 LIBMYSQL_PATH=$with_libmysql_path
3941 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
3944 AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path])
3947 AC_SUBST(SYSTEM_MYSQL)
3950 AC_SUBST(MYSQL_DEFINES)
3951 AC_SUBST(LIBMYSQL_PATH)
3954 dnl ===================================================================
3955 dnl Check for system MySQL C++ Connector
3956 dnl ===================================================================
3958 # who thought this too-generic cppconn dir was a good idea?
3959 AC_MSG_CHECKING([MySQL Connector/C++])
3960 if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \
3961 test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then
3962 AC_MSG_RESULT([external])
3963 SYSTEM_MYSQL_CPPCONN=YES
3965 AC_CHECK_HEADER(mysql_driver.h, [],
3966 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
3967 AC_CHECK_LIB(mysqlcppconn, main, [],
3968 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
3969 AC_MSG_CHECKING([version])
3971 #include <mysql_driver.h>
3973 int main(int argc, char **argv) {
3974 sql::Driver *driver;
3975 driver = get_driver_instance();
3976 if (driver->getMajorVersion() > 1 || \
3977 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
3978 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
3983 ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])])
3987 AC_MSG_RESULT([internal])
3988 AC_MSG_CHECKING([for mysqlcppconn module])
3989 if test -d mysqlcppconn; then
3992 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
3994 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
3995 SYSTEM_MYSQL_CPPCONN=NO
3998 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
4001 dnl ===================================================================
4002 dnl Check for system hsqldb
4003 dnl ===================================================================
4004 AC_MSG_CHECKING([which hsqldb to use])
4005 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
4006 test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then
4007 AC_MSG_RESULT([external])
4009 if test -z $HSQLDB_JAR; then
4010 HSQLDB_JAR=/usr/share/java/hsqldb.jar
4012 AC_CHECK_FILE($HSQLDB_JAR, [],
4013 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
4014 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
4016 if $PERL -e 'use Archive::Zip;
4017 my $file = "$ENV{'HSQLDB_JAR'}";
4018 my $zip = Archive::Zip->new( $file );
4019 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
4020 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
4021 push @l, split(/\n/, $mf);
4022 foreach my $line (@l) {
4023 if ($line =~ m/Specification-Version:/) {
4024 ($t, $version) = split (/:/,$line);
4025 $version =~ s/^\s//;
4026 ($a, $b, $c, $d) = split (/\./,$version);
4027 if ($c == "0" && $d > "8") {
4037 AC_MSG_RESULT([yes])
4039 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
4042 AC_MSG_RESULT([internal])
4044 BUILD_TYPE="$BUILD_TYPE HSQLDB"
4046 AC_SUBST(SYSTEM_HSQLDB)
4047 AC_SUBST(HSQLDB_JAR)
4049 dnl ===================================================================
4050 dnl Check for system beanshell
4051 dnl ===================================================================
4052 AC_MSG_CHECKING([which beanshell to use])
4053 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
4054 test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then
4055 AC_MSG_RESULT([external])
4057 if test -z $BSH_JAR; then
4058 BSH_JAR=/usr/share/java/bsh.jar
4060 AC_CHECK_FILE($BSH_JAR, [],
4061 [AC_MSG_ERROR(bsh.jar not found.)], [])
4063 AC_MSG_RESULT([internal])
4065 BUILD_TYPE="$BUILD_TYPE BSH"
4067 AC_SUBST(SYSTEM_BSH)
4071 dnl ===================================================================
4072 dnl Check for system saxon
4073 dnl ===================================================================
4074 AC_MSG_CHECKING([which saxon to use])
4075 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \
4076 test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then
4077 AC_MSG_RESULT([external])
4079 if test -z $SAXON_JAR; then
4080 AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4081 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4083 AC_CHECK_FILE(/usr/share/java/saxon.jar,
4084 [ SAXON_JAR=/usr/share/java/saxon.jar ],
4085 [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
4086 [ SAXON_JAR=/usr/share/java/saxon9.jar ],
4087 [ AC_MSG_ERROR(saxon.jar replacement not found)]
4094 AC_CHECK_FILE($SAXON_JAR, [],
4095 [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
4097 if test -n "$SERIALIZER_JAR"; then
4098 AC_CHECK_FILE($SERIALIZER_JAR, [],
4099 [AC_MSG_ERROR(serializer.jar not found.)], [])
4100 AC_SUBST(SERIALIZER_JAR)
4103 dnl Saxon comes in two practically available versions, the out-of-date saxonb which
4104 dnl supports the java extensions that OOo uses, and the up-to-date saxon he
4105 dnl "home edition" version, which is crippled to not support those java extensions.
4106 dnl And as an aside the he one also needs to be tweaked to include
4107 dnl a META-INF/services to broadcast that it supports the jaxp transform factory
4109 AC_MSG_CHECKING([if saxon works])
4110 cat > saxontest.java <<_ACEOF
4111 [import javax.xml.transform.TransformerFactory;
4112 import javax.xml.transform.Transformer;
4113 import javax.xml.transform.stream.StreamSource;
4116 import net.sf.saxon.FeatureKeys;
4119 public static void main(String[] args) {
4120 System.setProperty("javax.xml.transform.TransformerFactory",
4121 "net.sf.saxon.TransformerFactoryImpl");
4123 TransformerFactory tfactory = TransformerFactory.newInstance();
4124 // some external saxons (Debian, Ubuntu, ...) have this disabled
4126 tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
4127 System.out.println("TransformerFactory is" +
4128 tfactory.getClass().getName());
4129 Transformer transformer = tfactory.newTransformer(
4130 new StreamSource(new File(args[0])));
4131 } catch(Exception e){
4132 e.printStackTrace(System.err);
4140 cat > saxontest.xsl<<_ACEOF
4141 [<?xml version="1.0" encoding="UTF-8"?>
4142 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4143 <xsl:template match="/">
4144 <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/>
4149 javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2"
4150 AC_TRY_EVAL(javac_cmd)
4151 if test $? = 0 && test -f ./saxontest.class ; then
4152 java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2"
4153 AC_TRY_EVAL(java_cmd)
4154 if test $? = 0; then
4155 AC_MSG_RESULT([yes])
4157 cat saxontest.java >&5
4159 AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb])
4163 cat saxontest.java >&5
4164 AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar])
4167 AC_MSG_RESULT([internal])
4171 AC_SUBST(SYSTEM_SAXON)
4174 if test -n "$NEED_SAXON"; then
4175 BUILD_TYPE="$BUILD_TYPE SAXON"
4178 dnl ===================================================================
4179 dnl Check for system curl
4180 dnl ===================================================================
4181 if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
4182 with_system_curl=yes
4184 AC_MSG_CHECKING([which curl to use])
4185 if test -n "$with_system_curl" -o -n "$with_system_libs" && \
4186 test "$with_system_curl" != "no"; then
4187 AC_MSG_RESULT([external])
4190 AC_PATH_PROG( CURLCONFIG, curl-config)
4191 if test -z "$CURLCONFIG"; then
4192 AC_MSG_ERROR([install curl to run this script])
4195 # check curl version
4196 AC_MSG_CHECKING([whether curl is >= 7.13.1])
4197 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
4198 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \
4199 "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then
4200 AC_MSG_ERROR([no, you need at least curl 7.13,1])
4202 AC_MSG_RESULT([yes])
4204 CURL_LIBS=`$CURLCONFIG --libs`
4205 CURL_CFLAGS=`$CURLCONFIG --cflags`
4207 AC_MSG_RESULT([internal])
4209 BUILD_TYPE="$BUILD_TYPE CURL"
4211 AC_SUBST(SYSTEM_CURL)
4212 AC_SUBST(CURL_CFLAGS)
4215 dnl ===================================================================
4216 dnl Check for system mdds
4217 dnl ===================================================================
4218 AC_MSG_CHECKING([which mdds to use])
4219 if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
4220 test "$with_system_mdds" != "no"; then
4221 AC_MSG_RESULT([external])
4224 AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
4225 [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
4228 AC_MSG_RESULT([internal])
4229 BUILD_TYPE="$BUILD_TYPE MDDS"
4232 AC_SUBST(SYSTEM_MDDS)
4234 dnl ===================================================================
4235 dnl Check for system boost
4236 dnl ===================================================================
4237 AC_MSG_CHECKING([which boost to use])
4238 if test -n "$with_system_boost" -o -n "$with_system_headers" && \
4239 test "$with_system_boost" != "no"; then
4240 AC_MSG_RESULT([external])
4243 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
4244 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
4245 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
4246 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
4247 AC_CHECK_HEADER(boost/function.hpp, [],
4248 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
4250 save_CXXFLAGS=$CXXFLAGS
4251 CXXFLAGS="$CXXFLAGS -fno-exceptions"
4252 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
4253 AC_TRY_COMPILE([#include <boost/function.hpp>
4255 ac_cv_cxx_boost_no_exceptons_broken=no, ac_cv_cxx_boost_no_exceptons_broken=yes)
4257 if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then
4258 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
4260 AC_MSG_RESULT([yes])
4262 CXXFLAGS=$save_CXXFLAGS
4265 AC_MSG_RESULT([internal])
4266 BUILD_TYPE="$BUILD_TYPE BOOST"
4269 AC_SUBST(SYSTEM_BOOST)
4271 dnl ===================================================================
4272 dnl Check for system vigra
4273 dnl ===================================================================
4274 AC_MSG_CHECKING([which vigra to use])
4275 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \
4276 test "$with_system_vigra" != "no"; then
4277 AC_MSG_RESULT([external])
4280 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
4281 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
4284 AC_MSG_RESULT([internal])
4285 BUILD_TYPE="$BUILD_TYPE VIGRA"
4288 AC_SUBST(SYSTEM_VIGRA)
4290 dnl ===================================================================
4291 dnl Check for system odbc
4292 dnl ===================================================================
4293 AC_MSG_CHECKING([which odbc headers to use])
4294 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \
4295 test "$with_system_odbc_headers" != "no"; then
4296 AC_MSG_RESULT([external])
4297 SYSTEM_ODBC_HEADERS=YES
4299 AC_CHECK_HEADER(sqlext.h, [],
4300 [AC_MSG_ERROR(odbc not found. install odbc)], [])
4302 AC_MSG_RESULT([internal])
4303 SYSTEM_ODBC_HEADERS=NO
4304 BUILD_TYPE="$BUILD_TYPE UNIXODBC"
4306 AC_SUBST(SYSTEM_ODBC_HEADERS)
4308 AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components])
4309 if test "$enable_mozilla" = "no"; then
4312 ENABLE_NSS_MODULE=NO
4314 AC_MSG_RESULT([yes])
4317 AC_SUBST(WITH_MOZILLA)
4319 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
4320 if test "$enable_mozilla" = "no"; then
4322 elif test "$with_system_mozilla" = "yes"; then
4323 AC_MSG_RESULT([no, not possible with system-mozilla])
4325 AC_MSG_RESULT([yes])
4328 AC_MSG_CHECKING([whether to build XML Security support])
4329 if test "$enable_mozilla" = "no"; then
4330 AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
4332 AC_MSG_RESULT([yes])
4335 AC_MSG_CHECKING([whether to build LDAP configuration backend])
4336 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
4337 if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
4338 AC_MSG_RESULT([yes])
4341 AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed])
4349 if test "$WITH_LDAP" = "YES"; then
4350 dnl ===================================================================
4351 dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK
4352 dnl ===================================================================
4353 AC_MSG_CHECKING([which LDAP SDK to use])
4354 if test -n "$with_openldap" && test "$with_openldap" != "no"; then
4355 AC_MSG_RESULT([OpenLDAP])
4357 AC_CHECK_HEADERS(ldap.h, [],
4358 [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
4359 AC_CHECK_LIB(ldap, ldap_simple_bind_s, [],
4360 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4361 # rumours say that OpenLDAP doesn't have that function. I looked and
4362 # it has it. Test for it to be sure
4363 AC_CHECK_LIB(ldap, ldap_set_option, [],
4364 [AC_MSG_ERROR(openldap lib not found or functional)], [])
4366 AC_MSG_RESULT([Netscape/Mozilla])
4367 # TODO. Actually do a sanity check and check for
4368 # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
4373 AC_SUBST(WITH_OPENLDAP)
4375 dnl ===================================================================
4376 dnl Check for system mozilla
4377 dnl ===================================================================
4378 AC_MSG_CHECKING([which mozilla to use])
4379 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
4380 AC_MSG_RESULT([external])
4382 ENABLE_NSS_MODULE=NO
4383 enable_nss_module=no
4384 AC_MSG_CHECKING([which Mozilla flavour to use])
4385 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
4387 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then
4388 MOZ_FLAVOUR=xulrunner
4389 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then
4390 MOZ_FLAVOUR=seamonkey
4391 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
4393 elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
4398 tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
4401 PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
4402 if test -z "$STANDALONENSS"; then
4403 PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
4405 NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
4409 if $PKG_CONFIG --exists nspr ; then
4410 PKG_CHECK_MODULES( MOZ_NSPR, nspr )
4411 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
4414 PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
4417 if test "$MOZ_FLAVOUR" != "libxul"; then
4418 PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
4419 MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
4420 MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
4423 if test -z "$HASXPCOM"; then
4424 PKG_CHECK_MODULES( MOZILLAXPCOM, libxul )
4425 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul`
4426 MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`
4427 if ! test -e "$MOZ_LIB/libxul.so"; then
4428 MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul`
4429 if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then
4430 MOZ_LIB="$MOZ_LIB/sdk/lib"
4435 save_CPPFLAGS="$CPPFLAGS"
4436 save_LDFLAGS="$LDFLAGS"
4438 CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
4439 LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
4440 AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
4441 [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
4442 See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
4443 Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
4444 LDFLAGS="$save_LDFLAGS"
4445 CPPFLAGS="$save_CPPFLAGS"
4448 MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
4449 if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
4450 AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
4451 if test -d "$MOZ_INC/ldap"; then
4452 AC_MSG_RESULT([yes])
4453 MOZ_LDAP_CFLAGS="-I$MOZ_INC"
4456 Could not find LDAP header include files in $MOZ_INC/ldap.
4457 Please recompile $tmp with --enable-ldap or use --with-openldap.])
4461 #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
4462 #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
4463 if test "$MOZ_FLAVOUR" = "libxul"; then
4464 MOZ_FLAVOUR="mozilla"
4467 elif test "$enable_mozilla" = "no"; then
4468 AC_MSG_RESULT([none])
4470 ENABLE_NSS_MODULE=NO
4471 enable_nss_module=no
4473 AC_MSG_RESULT([internal])
4475 BUILD_TYPE="$BUILD_TYPE MOZ"
4476 if test -z "$with_mozilla_version"; then
4479 AC_MSG_CHECKING([which mozilla version to build])
4480 MOZILLA_VERSION=$with_mozilla_version
4481 enable_build_mozilla=1
4482 AC_MSG_RESULT([$MOZILLA_VERSION])
4485 AC_SUBST(MOZILLA_VERSION)
4487 AC_MSG_CHECKING([for toolkit mozilla should use])
4488 if test -z "$with_mozilla_toolkit"; then
4489 if test "$_os" != "WINNT" ; then
4490 if test "$_os" = "Darwin" ; then
4492 AC_MSG_RESULT([mac])
4494 MOZILLA_TOOLKIT=gtk2
4495 AC_MSG_RESULT([gtk2])
4499 MOZILLA_TOOLKIT=$with_mozilla_toolkit
4500 enable_build_mozilla=1
4501 AC_MSG_RESULT([$MOZILLA_TOOLKIT])
4503 #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then
4504 # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not
4505 # #available using fink, mac (carbon) doesn't work because xcode installs conflicting headers
4506 # AC_MSG_ERROR([Only gtk2 toolkit supported on Mac, sorry.])
4509 AC_SUBST(MOZILLA_TOOLKIT)
4511 # default to enabling build mozilla
4512 if test "$enable_build_mozilla" != "no"; then
4513 enable_build_mozilla=yes
4515 enable_build_mozilla=
4518 AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey])
4519 if test -n "$enable_build_mozilla"; then
4521 AC_MSG_RESULT([yes])
4527 AC_MSG_CHECKING([whether to build provided NSS module])
4528 if test "$enable_nss_module" != "no"; then
4529 ENABLE_NSS_MODULE="YES"
4530 BUILD_TYPE="$BUILD_TYPE NSS"
4531 AC_MSG_RESULT([yes])
4532 if test "$_os" = "WINNT"; then
4533 AC_MSG_CHECKING([for Mozilla build tooling])
4534 if test -z "$MOZILLABUILD" ; then
4535 AC_MSG_ERROR([Mozilla build tooling not found.
4536 Use the --with-mozilla-build option after installling the tools obtained
4537 from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
4539 if test \( "$WITH_MINGWIN" = "yes" \) ; then
4540 if test ! -d "$MOZILLABUILD" ; then
4541 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4546 if test ! -d "$MOZILLABUILD/moztools" \
4547 -o ! -d "$MOZILLABUILD/msys" ; then
4548 AC_MSG_ERROR([Mozilla build tooling incomplete!])
4556 ENABLE_NSS_MODULE="NO"
4560 if test "$BUILD_MOZAB" = "TRUE"; then
4561 if test "$_os" = "WINNT"; then
4562 if test "$WITH_MINGWIN" != "yes"; then
4563 # compiling with MSVC. Only supported platform here is MSVS2005 at the moment.
4564 if test "$MSVSVER" != "2005"; then
4565 AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only.])
4568 AC_MSG_WARN([Building SeaMonkey with mingwin is not tested, and likely to break.])
4569 echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn
4573 if test -z "$MOZILLA_VERSION"; then
4574 MOZILLA_VERSION=1.1.14
4576 MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
4577 MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst`
4578 AC_MSG_CHECKING([for mozilla sources])
4579 if test -z "$MOZILLA_FETCH_FILE"; then
4580 AC_MSG_RESULT([not found])
4581 HAVE_MOZILLA_TARBALL=n
4583 AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE])
4584 if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then
4585 if test -z "$DO_FETCH"; then
4586 AC_MSG_RESULT([will be fetched])
4587 HAVE_MOZILLA_TARBALL=y
4589 AC_MSG_RESULT([not found])
4590 HAVE_MOZILLA_TARBALL=n
4593 AC_MSG_RESULT([found])
4594 HAVE_MOZILLA_TARBALL=y
4597 if test "$HAVE_MOZILLA_TARBALL" != "y"; then
4598 AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found.
4599 Use "./fetch_tarballs.sh ooo.lst" to download.])
4601 if test "$_os" = "WINNT"; then
4602 AC_MSG_CHECKING([for moztools binaries])
4603 if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then
4604 AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip
4605 (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)])
4609 elif test "$_os" = "Darwin"; then
4610 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4611 AC_MSG_NOTICE([checking whether mozilla can be built...])
4612 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]))
4614 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="")
4615 if test -z "$MOZIDL"; then
4616 AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit.])
4620 # Generic Unix/Linux section
4621 if test "$MOZILLA_TOOLKIT" = "gtk2"; then
4622 PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="")
4623 if test -z "$MOZGTK"; then
4624 AC_MSG_ERROR([GTK2 is needed to build mozilla.])
4626 PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="")
4627 if test -z "$MOZIDL"; then
4628 AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.])
4631 PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="")
4632 if test -z "$MOZGTK"; then
4633 AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.])
4635 PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="")
4636 if test -z "$MOZIDL"; then
4637 AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.])
4643 AC_SUBST(BUILD_MOZAB)
4646 AC_SUBST(ENABLE_NSS_MODULE)
4647 AC_SUBST(MOZILLABUILD)
4648 AC_SUBST(SYSTEM_MOZILLA)
4649 AC_SUBST(MOZ_FLAVOUR)
4652 AC_SUBST(MOZ_LIB_XPCOM)
4653 AC_SUBST(MOZ_NSPR_CFLAGS)
4654 AC_SUBST(MOZ_NSS_CFLAGS)
4655 AC_SUBST(MOZ_LDAP_CFLAGS)
4657 dnl ===================================================================
4658 dnl Check for system sane
4659 dnl ===================================================================
4660 AC_MSG_CHECKING([which sane header to use])
4661 if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \
4662 test "$with_system_sane_header" != "no"; then
4663 AC_MSG_RESULT([external])
4664 SYSTEM_SANE_HEADER=YES
4665 AC_CHECK_HEADER(sane/sane.h, [],
4666 [AC_MSG_ERROR(sane not found. install sane)], [])
4668 AC_MSG_RESULT([internal])
4669 SYSTEM_SANE_HEADER=NO
4670 BUILD_TYPE="$BUILD_TYPE SANE"
4672 AC_SUBST(SYSTEM_SANE_HEADER)
4674 dnl ===================================================================
4675 dnl Check for system icu
4676 dnl ===================================================================
4677 AC_MSG_CHECKING([which icu to use])
4678 if test -n "$with_system_icu" -o -n "$with_system_libs" && \
4679 test "$with_system_icu" != "no"; then
4680 AC_MSG_RESULT([external])
4683 AC_MSG_CHECKING([for unicode/rbbi.h])
4684 AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
4686 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
4687 if test -z "$SYSTEM_GENBRK"; then
4688 AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
4690 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
4691 if test -z "$SYSTEM_GENCCODE"; then
4692 AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
4694 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
4695 if test -z "$SYSTEM_GENCMN"; then
4696 AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
4699 AC_PATH_PROG( ICUCONFIG, icu-config)
4700 AC_MSG_CHECKING([ICU version])
4701 ICU_VERSION=`$ICUCONFIG --version`
4702 ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1`
4703 ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2`
4704 ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3`
4706 if test "$ICU_MAJOR" -ge "4"; then
4709 AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
4713 AC_MSG_RESULT([internal])
4715 BUILD_TYPE="$BUILD_TYPE ICU"
4717 AC_SUBST(SYSTEM_ICU)
4718 AC_SUBST(SYSTEM_GENBRK)
4719 AC_SUBST(SYSTEM_GENCCODE)
4720 AC_SUBST(SYSTEM_GENCMN)
4725 dnl ===================================================================
4727 dnl ===================================================================
4729 AC_MSG_CHECKING([whether to enable graphite support])
4730 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then
4731 AC_MSG_RESULT([yes])
4732 ENABLE_GRAPHITE="TRUE"
4733 AC_MSG_CHECKING([which graphite to use])
4734 if test -n "$with_system_graphite" -o -n "$with_system_libs" && \
4735 test "$with_system_graphite" != "no"; then
4736 AC_MSG_RESULT([external])
4738 PKG_CHECK_MODULES( GRAPHITE, silgraphite )
4740 AC_MSG_RESULT([internal])
4742 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
4747 AC_SUBST(ENABLE_GRAPHITE)
4748 AC_SUBST(SYSTEM_GRAPHITE)
4749 AC_SUBST(GRAPHITE_LIBS)
4750 AC_SUBST(GRAPHITE_CFLAGS)
4752 dnl ===================================================================
4753 dnl Checks for libraries.
4754 dnl ===================================================================
4755 dnl Check for Mac OS X native GUI, which may is now required; the X11 build is no longer supported
4756 dnl See if we have the AppKit framework for building with Quartz graphics.
4758 if test "$_os" = "Darwin"; then
4759 if test "x$with_x" = "xyes"; then
4760 AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build])
4762 AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework])
4763 if test -d "/System/Library/Frameworks/AppKit.framework/"; then
4764 AC_MSG_RESULT([yes])
4765 x_includes="no_x_includes"
4766 x_libraries="no_x_libraries"
4767 dnl disable some things used on other Unix versions but not on the aqua build
4771 AC_SUBST(ENABLE_CUPS)
4773 AC_MSG_ERROR([No AppKit.framewrok found])
4778 dnl ***************************************
4779 dnl testing for X libraries and includes...
4780 dnl ***************************************
4781 if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
4782 echo "Do Nothing for _os = Darwin"
4783 dnl Mac OS X using Aqua graphics. Don't check for X11.
4785 elif test "$_os" = "OS2" ; then
4786 echo "Do Nothing for _os = OS2. Don't check for X11."
4787 dnl OS/2 uses native graphics. Don't check for X11.
4789 elif test "$_os" != "WINNT" ; then
4792 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
4794 if test "x$x_includes" = "x"; then
4795 x_includes="default_x_includes"
4797 if test "x$x_libraries" = "x"; then
4798 x_libraries="default_x_libraries"
4800 dnl The variables $x_libraries and $x_includes are set.
4801 if test -z "$x_libraries"; then
4802 AC_MSG_ERROR([No X libraries found]) # Exit
4804 if test -z "$x_includes"; then
4805 AC_MSG_ERROR([No X includes found]) # Exit
4808 LDFLAGS="$X_LDFLAGS $X_LIBS"
4809 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
4810 dnl Check if the XauDisposeAuth symbol is provided by libXau.
4811 AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
4813 x_includes="no_x_includes"
4814 x_libraries="no_x_libraries"
4816 if test -z "$x_includes"; then
4817 x_includes="no_x_includes"
4819 if test -z "$x_libraries"; then
4820 x_libraries="no_x_libraries"
4822 if test "$x_includes" = "default_x_includes"; then
4828 if test "$x_libraries" = "default_x_libraries"; then
4829 XLIB=`$PKG_CONFIG --variable=libdir x11`
4830 if test "x$XLIB" = x; then
4839 if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then
4840 dnl ===================================================================
4841 dnl Check for using Xaw
4842 dnl ===================================================================
4843 AC_MSG_CHECKING([whether to use Xaw])
4844 if test "$enable_Xaw" = "no"; then
4847 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt include headers not found])],
4848 [#include <X11/Intrinsic.h>])
4850 AC_MSG_RESULT([yes])
4851 AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])],
4852 [#include <X11/Intrinsic.h>])
4853 AC_CHECK_LIB(Xaw, main, [],
4854 [AC_MSG_ERROR(Xaw library not found or functional)], [])
4857 AC_SUBST(DISABLE_XAW)
4861 dnl ===================================================================
4862 dnl Check if fontconfig/fontconfig.h is available
4863 dnl ===================================================================
4864 if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
4865 AC_CHECK_HEADER(fontconfig/fontconfig.h, [],
4866 [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], [])
4867 AC_MSG_CHECKING([whether fontconfig is >= 2.2.0])
4869 #include <fontconfig/fontconfig.h>
4871 int main(int argc, char **argv) {
4872 if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
4875 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])])
4878 dnl ===================================================================
4879 dnl Check for system Xrender
4880 dnl ===================================================================
4881 AC_MSG_CHECKING([whether to link to Xrender])
4882 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
4883 AC_MSG_RESULT([yes])
4885 with_system_xrender_headers=yes
4887 AC_MSG_RESULT([no, dynamically open it])
4890 AC_MSG_CHECKING([which Xrender headers to use])
4891 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \
4892 test "$with_system_xrender_headers" != "no"; then
4893 AC_MSG_RESULT([external])
4894 SYSTEM_XRENDER_HEADERS=YES
4895 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
4896 [AC_MSG_ERROR(Xrender not found. install X)], [])
4898 AC_MSG_RESULT([internal])
4899 SYSTEM_XRENDER_HEADERS=NO
4900 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
4902 if test "$XRENDER_LINK" = "YES"; then
4903 AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
4904 [AC_MSG_ERROR(libXrender not found or functional)], [])
4906 AC_SUBST(SYSTEM_XRENDER_HEADERS)
4907 AC_SUBST(XRENDER_LINK)
4909 dnl ===================================================================
4910 dnl Check for XRandr
4911 dnl ===================================================================
4912 AC_MSG_CHECKING([whether to enable RandR support])
4913 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
4914 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
4915 XRANDR_DLOPEN="TRUE"
4916 AC_MSG_RESULT([resorting to dlopen libXrandr at runtime])
4918 XRANDR_DLOPEN="FALSE"
4919 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
4920 if test "$ENABLE_RANDR" != "TRUE"; then
4921 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
4922 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
4924 AC_CHECK_LIB(Xrandr, XRRQueryExtension, [],
4925 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
4926 XRANDR_LIBS="-lXrandr "
4928 AC_MSG_RESULT([enabling RandR support])
4935 AC_SUBST(XRANDR_DLOPEN)
4936 AC_SUBST(XRANDR_CFLAGS)
4937 AC_SUBST(XRANDR_LIBS)
4938 AC_SUBST(ENABLE_RANDR)
4940 dnl ===================================================================
4941 dnl Check for building neon
4942 dnl ===================================================================
4943 AC_MSG_CHECKING([whether to use neon])
4944 if test "$enable_neon" = "no"; then
4947 AC_SUBST(DISABLE_NEON)
4949 AC_MSG_RESULT([yes])
4950 dnl ===================================================================
4951 dnl Check for system neon
4952 dnl ===================================================================
4953 AC_MSG_CHECKING([which neon to use])
4954 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
4955 test "$with_system_neon" != "no"; then
4956 AC_MSG_RESULT([external])
4957 PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
4958 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
4959 NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
4962 AC_MSG_RESULT([internal])
4966 BUILD_TYPE="$BUILD_TYPE NEON"
4968 AC_SUBST(SYSTEM_NEON)
4969 AC_SUBST(NEON_VERSION)
4971 AC_SUBST(NEON_CFLAGS)
4974 dnl ===================================================================
4975 dnl Check for system openssl
4976 dnl ===================================================================
4977 if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then
4978 with_system_openssl=yes
4980 AC_MSG_CHECKING([which libssl to use])
4981 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \
4982 test "$with_system_openssl" != "no"; then
4983 AC_MSG_RESULT([external])
4984 # Mac OS builds should get out without extra stuff is the Mac porters'
4985 # wish. And pkg-config is although Xcode ships a .pc for openssl
4986 if test "$_os" = "Darwin"; then
4988 OPENSSL_LIBS="-lssl -lcrypto"
4990 PKG_CHECK_MODULES( OPENSSL, openssl )
4994 AC_MSG_RESULT([internal])
4996 BUILD_TYPE="$BUILD_TYPE OPENSSL"
4998 AC_SUBST(SYSTEM_OPENSSL)
4999 AC_SUBST(OPENSSL_CFLAGS)
5000 AC_SUBST(OPENSSL_LIBS)
5002 dnl ===================================================================
5003 dnl Test for disabling agg
5004 dnl ===================================================================
5005 AC_MSG_CHECKING([whether to enable agg])
5006 if test "$with_agg" = "no"; then
5009 AC_MSG_RESULT([yes])
5011 AC_SUBST(ENABLE_AGG)
5013 dnl ===================================================================
5014 dnl Check for system AGG
5015 dnl ===================================================================
5016 AC_MSG_CHECKING([which AGG to use])
5017 if test -n "$with_system_agg" -o -n "$with_system_libs" && \
5018 test "$with_system_agg" != "no"; then
5019 AC_MSG_RESULT([external])
5020 PKG_CHECK_MODULES(AGG, libagg >= 2.3)
5021 AC_MSG_CHECKING([agg version])
5022 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway
5023 # (/usr/include gets stripped from pkg-config output)
5024 if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then
5025 AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2"
5027 AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`"
5029 if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \
5030 $PKG_CONFIG --modversion libagg | grep -q 2.4; then
5031 # 2.4's libagg.pc.in still contains 2.3 :/
5032 if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then
5033 AC_MSG_RESULT([2.4])
5036 AC_MSG_RESULT([2.3])
5041 AC_MSG_ERROR([only agg 2.3 and 2.4 are supported])
5044 AC_MSG_RESULT([internal])
5047 BUILD_TYPE="$BUILD_TYPE AGG"
5049 AC_SUBST(SYSTEM_AGG)
5050 AC_SUBST(AGG_VERSION)
5053 dnl ===================================================================
5054 dnl Check for system redland
5055 dnl ===================================================================
5056 AC_MSG_CHECKING([which redland library to use])
5057 if test -n "$with_system_redland" -o -n "$with_system_libs" && \
5058 test "$with_system_redland" != "no"; then
5059 AC_MSG_RESULT([external])
5061 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
5062 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
5064 AC_MSG_RESULT([internal])
5065 BUILD_TYPE="$BUILD_TYPE REDLAND"
5068 AC_SUBST(SYSTEM_REDLAND)
5069 AC_SUBST(REDLAND_CFLAGS)
5070 AC_SUBST(REDLAND_LIBS)
5072 dnl ===================================================================
5073 dnl Check for system hunspell
5074 dnl ===================================================================
5075 AC_MSG_CHECKING([which libhunspell to use])
5076 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
5077 test "$with_system_hunspell" != "no"; then
5078 AC_MSG_RESULT([external])
5081 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
5082 if test "$HUNSPELL_PC" != "TRUE"; then
5083 AC_CHECK_HEADER(hunspell.hxx, [],
5085 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
5086 [AC_MSG_ERROR(hunspell headers not found.)], [])
5088 AC_CHECK_LIB(hunspell, main, [],
5089 [ AC_MSG_ERROR(hunspell library not found.) ], [])
5090 HUNSPELL_LIBS=-lhunspell
5094 AC_MSG_RESULT([internal])
5096 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
5098 AC_SUBST(SYSTEM_HUNSPELL)
5099 AC_SUBST(HUNSPELL_CFLAGS)
5100 AC_SUBST(HUNSPELL_LIBS)
5102 dnl ===================================================================
5103 dnl Checking for altlinuxhyph
5104 dnl ===================================================================
5105 AC_MSG_CHECKING([which altlinuxhyph to use])
5106 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
5107 test "$with_system_altlinuxhyph" != "no"; then
5108 AC_MSG_RESULT([external])
5110 AC_CHECK_HEADER(hyphen.h, [],
5111 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
5112 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
5113 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
5114 [#include <hyphen.h>])
5115 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
5116 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5117 if test -z "$HYPHEN_LIB"; then
5118 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
5119 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5121 if test -z "$HYPHEN_LIB"; then
5122 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
5123 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
5126 AC_MSG_RESULT([internal])
5128 BUILD_TYPE="$BUILD_TYPE HYPHEN"
5130 AC_SUBST(SYSTEM_HYPH)
5131 AC_SUBST(HYPHEN_LIB)
5133 dnl ===================================================================
5134 dnl Checking for mythes
5135 dnl ===================================================================
5136 AC_MSG_CHECKING([which mythes to use])
5137 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
5138 AC_MSG_RESULT([external])
5141 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
5142 if test "$MYTHES_PKGCONFIG" = "no"; then
5143 AC_CHECK_HEADER(mythes.hxx, [],
5144 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
5145 AC_CHECK_LIB(mythes-1.2, main, [],
5146 [ MYTHES_FOUND=no], [])
5147 if test "$MYTHES_FOUND" = "no"; then
5148 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
5149 [ MYTHES_FOUND=no], [])
5151 if test "$MYTHES_FOUND" = "no"; then
5152 AC_MSG_ERROR([mythes library not found!.])
5157 AC_MSG_RESULT([internal])
5159 BUILD_TYPE="$BUILD_TYPE MYTHES"
5161 AC_SUBST(SYSTEM_MYTHES)
5162 AC_SUBST(MYTHES_CFLAGS)
5163 AC_SUBST(MYTHES_LIBS)
5165 dnl ===================================================================
5166 dnl Checking for lpsolve
5167 dnl ===================================================================
5168 AC_MSG_CHECKING([which lpsolve to use])
5169 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
5170 test "$with_system_lpsolve" != "no"; then
5171 AC_MSG_RESULT([external])
5173 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
5174 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
5175 # some systems need this. Like Ubuntu....
5176 AC_CHECK_LIB(m, floor)
5177 AC_CHECK_LIB(dl, dlopen)
5178 AC_CHECK_LIB(lpsolve55, make_lp, ,
5179 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
5181 AC_MSG_RESULT([internal])
5183 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
5185 AC_SUBST(SYSTEM_LPSOLVE)
5187 dnl ===================================================================
5188 dnl Checking for libtextcat
5189 dnl ===================================================================
5190 AC_MSG_CHECKING([which libtextcat to use])
5191 if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then
5192 AC_MSG_RESULT([external])
5193 SYSTEM_LIBTEXTCAT=YES
5194 AC_CHECK_HEADER(libtextcat/textcat.h, [],
5195 [ AC_MSG_ERROR(libtextcat headers not found.)], [])
5196 AC_CHECK_LIB(textcat, special_textcat_Init, ,
5197 [ AC_MSG_ERROR(libtextcat library not found or not suitable. libtextcat typically needs to be patched)], [])
5199 AC_MSG_RESULT([internal])
5200 SYSTEM_LIBTEXTCAT=NO
5201 BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT"
5203 AC_SUBST(SYSTEM_LIBTEXTCAT)
5205 AC_MSG_CHECKING([which libtextcat data directory to use])
5206 if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then
5207 if test "$with_system_libtextcat_data" = "yes"; then
5208 SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat
5210 SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data
5212 AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA])
5214 AC_MSG_RESULT([internal])
5215 BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA"
5217 AC_SUBST(SYSTEM_LIBTEXTCAT_DATA)
5219 dnl ***************************************
5220 dnl testing libc version for Linux...
5221 dnl ***************************************
5222 if test "$_os" = "Linux"; then
5223 AC_MSG_CHECKING([whether libc is >= 2.1.1])
5224 exec 6>/dev/null # no output
5225 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
5226 exec 6>&1 # output on again
5227 if test "$HAVE_LIBC"; then
5228 AC_MSG_RESULT([yes])
5230 AC_MSG_ERROR([no, upgrade libc])
5234 if test "$_os" != "WNT"; then
5235 AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
5236 AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
5237 if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
5245 AC_SUBST(HAVE_GETOPT)
5246 AC_SUBST(HAVE_READDIR_R)
5247 AC_SUBST(SYSTEM_LIBC)
5249 dnl =========================================
5250 dnl Check for the Microsoft Platform SDK.
5251 dnl =========================================
5252 dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better,
5253 dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then
5254 if test \( "$_os" = "WINNT" \) ; then
5255 AC_MSG_CHECKING([for PSDK files])
5256 if test -z "$with_psdk_home"; then
5257 # This first line will detect a February 2003 Microsoft Platform SDK
5258 PSDK_HOME=`./oowintool --psdk-home`
5259 # But there might be also an April 2005 PSDK, unfortunately MS changed
5260 # the registry entry. (we prefer the old version!?)
5261 if test -z "$PSDK_HOME"; then
5262 PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
5264 # normalize if found
5265 if test -n "$PSDK_HOME"; then
5266 PSDK_HOME=`cygpath -d "$PSDK_HOME"`
5267 PSDK_HOME=`cygpath -u "$PSDK_HOME"`
5270 PSDK_HOME=`cygpath -u "$with_psdk_home"`
5272 # Remove a possible trailing backslash
5273 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
5274 # Problem with current PSDK (iz 49865)
5275 if test -f "$PSDK_HOME/Lib/libcp.lib"; then
5278 Some modules do not build correctly with MS Platform SDK - April 2005
5279 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
5280 Remove/rename/backup that file and restart configure. Details about this
5281 problem can be found in issue 49856.])
5283 # WIndows SDK has different headers
5284 if test \( -f "$PSDK_HOME/Include/adoint.h" \) \
5285 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
5286 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
5291 if test -f "$PSDK_HOME/lib/unicows.lib"; then
5296 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
5297 AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs
5298 are installed or use --with-psdk-home .])
5300 if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
5301 -o ! -x "$PSDK_HOME/bin/msidb.exe" \
5302 -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
5303 -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
5304 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
5306 AC_MSG_RESULT([SDK files found ...)])
5307 dnl Check if this is the right SDK.
5308 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
5309 AC_MSG_RESULT([Found Windows SDK 6.1 ($PSDK_HOME)])
5310 WINDOWS_VISTA_PSDK=TRUE
5311 elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
5312 AC_MSG_RESULT([Found Windows SDK 6.0 ($PSDK_HOME)])
5313 WINDOWS_VISTA_PSDK=TRUE
5315 AC_MSG_RESULT([Found Legacy Windows Platform SDK ($PSDK_HOME)])
5319 AC_SUBST(WINDOWS_VISTA_PSDK)
5321 dnl =========================================
5322 dnl Check for the Microsoft DirectX SDK.
5323 dnl =========================================
5324 if test \( "$_os" = "WINNT" \) ; then
5325 AC_MSG_CHECKING([for DirectX SDK files])
5326 if test -z "$with_directx_home"; then
5327 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
5328 if test -n "$DXSDK_DIR"; then
5329 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
5330 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
5332 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
5333 # the "DirectX SDK files not found" error later
5335 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
5337 # Remove a possible trailing backslash
5338 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
5340 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
5341 HAVE_DIRECTXSDK_H="yes"
5343 HAVE_DIRECTXSDK_H="no"
5345 # MS changed the location of the libraries with dec 2004 directx sdk
5346 if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
5347 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
5349 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
5351 if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
5352 HAVE_DIRECTXSDK_LIB="yes"
5354 HAVE_DIRECTXSDK_LIB="no"
5356 if test -n "$ENABLE_DIRECTX"; then
5357 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
5358 AC_MSG_RESULT([found])
5360 AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.])
5364 AC_MSG_RESULT([disabled])
5367 AC_SUBST(DIRECTXSDK_HOME)
5368 AC_SUBST(DIRECTXSDK_LIB)
5370 dnl ============================================
5371 dnl Check for Nullsoft Scriptable Install System
5372 dnl ============================================
5374 if test "$_os" = "WINNT" ; then
5375 AC_MSG_CHECKING([for NSIS])
5376 AC_PATH_PROG(NSIS_PATH, nsis.exe)
5377 if test -n "$NSIS_PATH"; then
5378 NSIS_PATH=`dirname "$NSIS_PATH"`
5380 if test -n "$with_nsis_path"; then
5381 with_nsis_path=`cygpath -u "$with_nsis_path"`
5383 if test -e "$with_nsis_path/nsis.exe"; then
5384 NSIS_PATH="$with_nsis_path"
5386 nsistest=`./oowintool --nsis-dir`;
5387 if test -x "$nsistest/nsis.exe"; then
5388 NSIS_PATH="$nsistest"
5390 if test -z "$NSIS_PATH"; then
5391 AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
5392 echo "NSIS not found, no self contained installer will be build." >> warn
5394 NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5395 NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5396 AC_MSG_RESULT([found ($NSIS_PATH)])
5401 dnl ***************************************
5402 dnl testing bison and flex exist
5403 dnl ***************************************
5404 AC_PATH_PROG(BISON, bison)
5405 if test -z "$BISON"; then
5406 AC_MSG_ERROR([no bison found in \$PATH, install bison])
5408 AC_MSG_CHECKING([the bison version])
5409 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
5410 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
5411 # Accept newer than 1.875 or older(equal) than 1.75
5412 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
5413 if test "$_bison_version" = "1.875" ; then
5414 AC_MSG_WARN([suspect ($BISON $_bison_version)])
5415 echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
5417 AC_MSG_RESULT([checked ($BISON $_bison_version)])
5420 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
5423 AC_PATH_PROG(FLEX, flex)
5424 if test -z "$FLEX"; then
5425 AC_MSG_ERROR([no flex found in \$PATH, install flex])
5427 dnl ***************************************
5428 dnl testing that patch exists
5429 dnl ***************************************
5430 AC_PATH_PROG(PATCH, patch)
5431 if test -z "$PATCH"; then
5432 AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\])
5435 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
5436 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
5437 if test -z "$with_gnu_patch"; then
5440 if test -x "$with_gnu_patch"; then
5441 GNUPATCH=$with_gnu_patch
5443 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
5447 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
5448 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
5449 AC_MSG_RESULT([yes])
5451 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
5455 dnl We also need to check for --with-gnu-cp
5457 if test -z "$with_gnu_cp"; then
5458 AC_PATH_PROGS(GNUCP, gnucp cp)
5459 if test -z $GNUCP; then
5460 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
5463 if test -x "$with_gnu_cp"; then
5466 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
5470 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
5471 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
5472 AC_MSG_RESULT([yes])
5478 if test -z "$GNUCP"; then
5479 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then
5480 AC_MSG_ERROR([no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it])
5482 AC_MSG_RESULT([no GNU cp from coreutils found - using the system's cp command])
5489 dnl ***************************************
5490 dnl testing bash tools path on Windows
5491 dnl ***************************************
5492 if test "$_os" = "WINNT"; then
5494 AC_PATH_PROG(CYGWIN_PATH, bash)
5495 CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
5497 if test -z "$CYGWIN_PATH"; then
5498 CYGWIN_PATH="NO_CYGWIN"
5500 AC_SUBST(CYGWIN_PATH)
5502 dnl ***************************************
5503 dnl testing ml.exe assembler path
5504 dnl ***************************************
5505 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5506 AC_MSG_CHECKING([ml.exe assembler path])
5507 if test -n "$with_asm_home"; then
5508 with_asm_home=`cygpath -u "$with_asm_home"`
5510 if test ! -x "$with_asm_home/ml.exe"; then
5511 AC_PATH_PROG(ML_EXE, ml.exe)
5512 if test -z "$ML_EXE"; then
5513 if test -x "$with_cl_home/bin/ml.exe"; then
5514 with_asm_home=$with_cl_home/bin
5515 AC_MSG_RESULT([found ($with_asm_home)])
5517 AC_MSG_ERROR([Configure did not find ml.exe assembler.])
5520 with_asm_home="ASM_IN_PATH"
5523 AC_MSG_RESULT([$ASM_HOME])
5525 with_asm_home="NO_ASM_HOME"
5527 ASM_HOME="$with_asm_home"
5530 dnl ===================================================================
5531 dnl testing handle deprecated unzip switch
5532 dnl ===================================================================
5533 if test -z "$with_zip_home"; then
5534 with_zip_home="$with_unzip_home"
5536 dnl ===================================================================
5537 dnl Zip will be found where you tell me to find it
5538 dnl ===================================================================
5539 if test -n "$with_zip_home" ; then
5540 if test "$_os" = "WINNT"; then
5541 with_zip_home=`cygpath -u "$with_zip_home"`
5543 ZIP="$with_zip_home/zip"
5544 UNZIP="$with_zip_home/unzip"
5545 ZIP_HOME="$with_zip_home"
5547 AC_PATH_PROG(ZIP, zip)
5548 AC_PATH_PROG(UNZIP, unzip)
5549 ZIP_HOME=`dirname "$ZIP"`
5551 dnl ===================================================================
5552 dnl Zip must be available or else it is an error, all platforms
5553 dnl ===================================================================
5554 if test -z "$ZIP" -o -z "$UNZIP"; then
5555 AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
5558 dnl ===================================================================
5559 dnl Zip must be a specific type for different build types.
5560 dnl ===================================================================
5561 if test "$_os" = "WINNT"; then
5562 if test -n "`$ZIP -h | grep -i WinNT`" ; then
5563 AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.])
5568 dnl ===================================================================
5569 dnl Windows builds need unicows.dll in external/unicows/
5570 dnl ===================================================================
5571 if test "$_os" = "WINNT"; then
5572 AC_MSG_CHECKING([for unicows.dll])
5573 if test -x ./external/unicows/unicows.dll; then
5574 AC_MSG_RESULT([found])
5576 AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
5577 Get it from the Microsoft site and put it into external/unicows.
5578 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5579 may have to search Microsoft's website.) Last time it was seen at:
5580 <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>.])
5584 dnl ===================================================================
5585 dnl Windows builds need dbghelp.dll in external/dbghelp/
5586 dnl ===================================================================
5587 if test "$_os" = "WINNT"; then
5588 AC_MSG_CHECKING([for dbghelp.dll])
5589 if test -x ./external/dbghelp/dbghelp.dll; then
5590 AC_MSG_RESULT([found])
5592 AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/.
5593 Get it from the Microsoft site and put it into external/dbghelp.
5594 (Note: Microsoft seems to enjoy changing the exact location of this file. You
5595 may have to search Microsoft's website.) Last time it was seen at:
5596 <http://www.microsoft.com/downloads/release.asp?releaseid=30682>.])
5600 dnl ===================================================================
5601 dnl Windows builds - use oowintool to copy CRT dlls and manifest
5602 dnl ===================================================================
5603 if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
5604 if ./oowintool --msvc-copy-dlls ./external/msvcp ; then
5607 AC_MSG_ERROR([oowintool failed to copy CRT])
5611 dnl ===================================================================
5612 dnl Windows builds need gdiplus.dll in external/gdiplus/
5613 dnl ===================================================================
5614 if test "$_os" = "WINNT"; then
5615 AC_MSG_CHECKING([for gdiplus.dll])
5616 if test -x ./external/gdiplus/gdiplus.dll; then
5617 AC_MSG_RESULT([found])
5619 AC_MSG_ERROR([gdiplus.dll is missing in external/gdiplus/.
5620 Get it from the Microsoft site and put it into external/gdiplus.
5621 You may have to search Microsoft's website. Last time it was seen at:
5622 <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>.])
5626 dnl ===================================================================
5627 dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
5628 dnl ===================================================================
5629 if test "$_os" = "WINNT"; then
5630 ./oowintool --msvc-copy-instmsi ./external/msi
5633 dnl ===================================================================
5634 dnl Windows builds with VS 2003/2005/2008 need instmsia.exe and instmsiw.exe in external/msi
5635 dnl ===================================================================
5636 if test "$_os" = "WINNT"; then
5637 if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then
5638 AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe])
5639 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then
5640 AC_MSG_RESULT([found])
5642 MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1`
5643 MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1`
5644 if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
5645 cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK"
5646 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK"
5648 if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
5649 AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location.
5650 These programs are part of the Visual Studio installation and should be found in a
5651 directory similar to:
5652 "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\"
5653 As the automatic detection fails please copy the files to external/msi/.])
5655 AC_MSG_RESULT([found and copied])
5661 dnl ===================================================================
5662 dnl Test which vclplugs have to be built.
5663 dnl ===================================================================
5664 AC_MSG_CHECKING([which VCLplugs shall be built])
5666 if test "x$enable_gtk" = "xyes"; then
5670 AC_SUBST(ENABLE_GTK)
5673 if test "x$enable_kde" = "xyes"; then
5677 AC_SUBST(ENABLE_KDE)
5680 if test "x$enable_kde4" = "xyes"; then
5684 AC_SUBST(ENABLE_KDE4)
5686 if test -z "$R"; then
5687 AC_MSG_RESULT([none])
5692 dnl ===================================================================
5694 dnl ===================================================================
5697 AC_MSG_CHECKING([whether to enable GConf support])
5698 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then
5700 AC_MSG_RESULT([yes])
5701 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5705 AC_SUBST(ENABLE_GCONF)
5707 dnl ===================================================================
5709 dnl ===================================================================
5712 AC_MSG_CHECKING([whether to enable GNOME VFS support])
5713 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
5714 ENABLE_GNOMEVFS="TRUE"
5715 AC_MSG_RESULT([yes])
5716 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
5717 if test "$ENABLE_GCONF" != "TRUE"; then
5718 PKG_CHECK_MODULES( GCONF, gconf-2.0 )
5723 AC_SUBST(ENABLE_GNOMEVFS)
5725 dnl ===================================================================
5726 dnl Check whether the gtk 2.0 libraries are available.
5727 dnl ===================================================================
5731 ENABLE_SYSTRAY_GTK=""
5733 if test "$test_gtk" = "yes"; then
5735 if test "$ENABLE_GTK" = "TRUE" ; then
5736 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]))
5737 BUILD_TYPE="$BUILD_TYPE GTK"
5739 if test "x$enable_systray" = "xyes"; then
5740 ENABLE_SYSTRAY_GTK="TRUE"
5741 BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK"
5744 AC_MSG_CHECKING([whether to enable DBUS support])
5745 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then
5747 AC_MSG_RESULT([yes])
5748 PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 )
5753 AC_MSG_CHECKING([whether to enable GIO support])
5754 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
5755 if test "$ENABLE_GNOMEVFS" = "TRUE" ; then
5756 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
5759 AC_MSG_RESULT([yes])
5760 PKG_CHECK_MODULES( GIO, gio-2.0 )
5768 AC_SUBST(ENABLE_GIO)
5769 AC_SUBST(ENABLE_DBUS)
5770 AC_SUBST(ENABLE_SYSTRAY_GTK)
5771 AC_SUBST(GTK_CFLAGS)
5774 dnl ===================================================================
5775 dnl Check whether the GStreamer libraries are available.
5776 dnl ===================================================================
5782 if test "$test_gstreamer" = "yes"; then
5783 AC_MSG_CHECKING([whether to build the GStreamer media backend])
5784 if test "x$enable_gstreamer" != "xno" ; then
5785 PKG_CHECK_MODULES( GSTREAMER, gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ,,AC_MSG_ERROR([requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages]))
5786 ENABLE_GSTREAMER="TRUE"
5787 AC_MSG_RESULT([yes])
5792 AC_SUBST(ENABLE_GSTREAMER)
5793 AC_SUBST(GSTREAMER_CFLAGS)
5794 AC_SUBST(GSTREAMER_LIBS)
5797 dnl ===================================================================
5798 dnl Check whether the Cairo libraries are available.
5799 dnl ===================================================================
5805 if test "$test_cairo" = "yes"; then
5807 AC_MSG_CHECKING([whether to use cairo])
5808 if test "x$enable_cairo" != "xno" ; then
5810 AC_MSG_RESULT([yes])
5811 AC_MSG_CHECKING([which cairo to use])
5812 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \
5813 test "$with_system_cairo" != "no"; then
5814 AC_MSG_RESULT([external])
5817 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
5818 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then
5819 AC_MSG_ERROR([Cairo library requires fontconfig.])
5821 if test "$with_system_xrender_headers" = "yes"; then
5822 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
5824 #include <X11/extensions/Xrender.h>
5826 int main(int argc, char **argv) {
5827 #ifdef PictStandardA8
5833 ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, X headers too old.])])
5836 BUILD_TYPE="$BUILD_TYPE CAIRO"
5837 dnl === compiler fails on pixman with 64bit architectures...===
5838 if test "$build_cpu" != "x86_64"; then
5841 AC_MSG_RESULT([internal])
5848 AC_SUBST(ENABLE_CAIRO)
5849 AC_SUBST(BUILD_PIXMAN)
5850 AC_SUBST(SYSTEM_CAIRO)
5851 AC_SUBST(CAIRO_CFLAGS)
5852 AC_SUBST(CAIRO_LIBS)
5854 dnl ===================================================================
5855 dnl Check whether the OpenGL libraries are available
5856 dnl ===================================================================
5858 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
5861 if test "x$enable_opengl" != "xno" ; then
5862 AC_MSG_RESULT([yes])
5863 AC_CHECK_HEADER(GL/gl.h, [],
5864 [AC_MSG_ERROR([OpenGL headers not found])], [])
5865 AC_CHECK_LIB(GL, main, [],
5866 [AC_MSG_ERROR(libGL not installed or functional)], [])
5867 AC_CHECK_LIB(GLU, main, [],
5868 [AC_MSG_ERROR(libGLU not installed or functional)], [])
5874 AC_SUBST(ENABLE_OPENGL)
5876 AC_MSG_CHECKING([whether to build extra presenter ui])
5877 if test -n "$enable_presenter_extra_ui" -a "$enable_presenter_extra_ui" != "no"; then
5878 AC_MSG_RESULT([yes])
5879 ENABLE_PRESENTER_EXTRA_UI=YES
5882 ENABLE_PRESENTER_EXTRA_UI=NO
5884 AC_SUBST(ENABLE_PRESENTER_EXTRA_UI)
5886 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
5887 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
5888 AC_MSG_RESULT([yes])
5889 ENABLE_MINIMIZER=YES
5894 AC_SUBST(ENABLE_MINIMIZER)
5896 AC_MSG_CHECKING([whether to build the Presenter Screen extension])
5897 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then
5898 AC_MSG_RESULT([yes])
5899 ENABLE_PRESENTER_SCREEN=YES
5902 ENABLE_PRESENTER_SCREEN=NO
5904 AC_SUBST(ENABLE_PRESENTER_SCREEN)
5906 AC_MSG_CHECKING([whether to build the PDF Import extension])
5907 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then
5908 AC_MSG_RESULT([yes])
5909 ENABLE_PDFIMPORT=YES
5911 dnl ===================================================================
5912 dnl Check for system poppler
5913 dnl ===================================================================
5914 AC_MSG_CHECKING([which pdf backend to use])
5915 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \
5916 test "$with_system_poppler" != "no"; then
5917 AC_MSG_RESULT([external])
5919 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
5921 AC_MSG_RESULT([internal])
5923 BUILD_TYPE="$BUILD_TYPE XPDF"
5924 AC_MSG_CHECKING([for xpdf module])
5925 if test -d ./xpdf; then
5928 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5935 AC_SUBST(ENABLE_PDFIMPORT)
5936 AC_SUBST(SYSTEM_POPPLER)
5937 AC_SUBST(POPPLER_CFLAGS)
5938 AC_SUBST(POPPLER_LIBS)
5940 if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
5941 AC_MSG_CHECKING([for sdext module])
5942 if test -d ./sdext; then
5945 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5947 BUILD_TYPE="$BUILD_TYPE SDEXT"
5950 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
5951 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then
5952 AC_MSG_RESULT([yes])
5953 AC_MSG_CHECKING([for swext module])
5954 if test -d ./swext; then
5957 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5959 ENABLE_MEDIAWIKI=YES
5960 BUILD_TYPE="$BUILD_TYPE SWEXT"
5965 AC_SUBST(ENABLE_MEDIAWIKI)
5967 if test "$ENABLE_MEDIAWIKI" = "YES"; then
5968 AC_MSG_CHECKING([which Servlet API Jar to use])
5969 if test -n "$with_system_servlet_api"; then
5970 AC_MSG_RESULT([external])
5971 SYSTEM_SERVLETAPI=YES
5972 if test -z "$SERVLETAPI_JAR"; then
5973 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
5975 AC_CHECK_FILE($SERVLETAPI_JAR, [],
5976 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
5978 AC_MSG_RESULT([internal])
5979 SYSTEM_SERVLETAPI=NO
5980 BUILD_TYPE="$BUILD_TYPE TOMCAT"
5983 AC_SUBST(SYSTEM_SERVLETAPI)
5984 AC_SUBST(SERVLETAPI_JAR)
5986 AC_MSG_CHECKING([whether to build the Report Builder extension])
5987 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then
5988 AC_MSG_RESULT([yes])
5989 ENABLE_REPORTBUILDER=YES
5990 AC_MSG_CHECKING([for reportbuilder module])
5991 if test -d ./reportbuilder; then
5994 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
5996 AC_MSG_CHECKING([which jfreereport libs to use])
5997 if test "$with_system_jfreereport" = "yes"; then
5998 SYSTEM_JFREEREPORT=YES
5999 AC_MSG_RESULT([external])
6000 if test -z $SAC_JAR; then
6001 SAC_JAR=/usr/share/java/sac.jar
6003 AC_CHECK_FILE($SAC_JAR, [],
6004 [AC_MSG_ERROR(sac.jar not found.)], [])
6006 if test -z $LIBXML_JAR; then
6007 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
6008 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
6010 AC_CHECK_FILE(/usr/share/java/libxml.jar,
6011 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
6012 [AC_MSG_ERROR(libxml.jar replacement not found.)]
6017 AC_CHECK_FILE($LIBXML_JAR, [],
6018 [AC_MSG_ERROR(libxml.jar not found.)], [])
6021 if test -z $FLUTE_JAR; then
6022 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
6023 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
6025 AC_CHECK_FILE(/usr/share/java/flute.jar,
6026 [ FLUTE_JAR=/usr/share/java/flute.jar ],
6027 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
6032 AC_CHECK_FILE($FLUTE_JAR, [],
6033 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
6036 if test -z $JFREEREPORT_JAR; then
6037 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
6038 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
6040 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
6041 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
6042 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
6047 AC_CHECK_FILE($JFREEREPORT_JAR, [],
6048 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
6051 if test -z $LIBLAYOUT_JAR; then
6052 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
6053 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
6055 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
6056 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
6057 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
6062 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
6063 [AC_MSG_ERROR(liblayout.jar not found.)], [])
6066 if test -z $LIBLOADER_JAR; then
6067 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
6068 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
6070 AC_CHECK_FILE(/usr/share/java/libloader.jar,
6071 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
6072 [AC_MSG_ERROR(libloader.jar replacement not found.)]
6077 AC_CHECK_FILE($LIBLOADER_JAR, [],
6078 [AC_MSG_ERROR(libloader.jar not found.)], [])
6081 if test -z $LIBFORMULA_JAR; then
6082 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
6083 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
6085 AC_CHECK_FILE(/usr/share/java/libformula.jar,
6086 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
6087 [AC_MSG_ERROR(libformula.jar replacement not found.)]
6092 AC_CHECK_FILE($LIBFORMULA_JAR, [],
6093 [AC_MSG_ERROR(libformula.jar not found.)], [])
6096 if test -z $LIBREPOSITORY_JAR; then
6097 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
6098 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
6100 AC_CHECK_FILE(/usr/share/java/librepository.jar,
6101 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
6102 [AC_MSG_ERROR(librepository.jar replacement not found.)]
6107 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
6108 [AC_MSG_ERROR(librepository.jar not found.)], [])
6111 if test -z $LIBFONTS_JAR; then
6112 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
6113 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
6115 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
6116 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
6117 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
6122 AC_CHECK_FILE($LIBFONTS_JAR, [],
6123 [AC_MSG_ERROR(libfonts.jar not found.)], [])
6126 if test -z $LIBSERIALIZER_JAR; then
6127 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
6128 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
6130 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
6131 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
6132 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
6137 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
6138 [AC_MSG_ERROR(libserializer.jar not found.)], [])
6142 if test -z $LIBBASE_JAR; then
6143 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
6144 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
6146 AC_CHECK_FILE(/usr/share/java/libbase.jar,
6147 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
6148 [AC_MSG_ERROR(libbase.jar replacement not found.)]
6153 AC_CHECK_FILE($LIBBASE_JAR, [],
6154 [AC_MSG_ERROR(libbase.jar not found.)], [])
6158 AC_MSG_RESULT([internal])
6159 AC_MSG_CHECKING([for jfreereport module])
6160 if test -d ./jfreereport; then
6163 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
6165 SYSTEM_JFREEREPORT=NO
6166 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
6168 BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
6171 ENABLE_REPORTBUILDER=NO
6172 SYSTEM_JFREEREPORT=NO
6174 AC_SUBST(ENABLE_REPORTBUILDER)
6175 AC_SUBST(SYSTEM_JFREEREPORT)
6177 AC_SUBST(LIBXML_JAR)
6179 AC_SUBST(JFREEREPORT_JAR)
6180 AC_SUBST(LIBBASE_JAR)
6181 AC_SUBST(LIBLAYOUT_JAR)
6182 AC_SUBST(LIBLOADER_JAR)
6183 AC_SUBST(LIBFORMULA_JAR)
6184 AC_SUBST(LIBREPOSITORY_JAR)
6185 AC_SUBST(LIBFONTS_JAR)
6186 AC_SUBST(LIBSERIALIZER_JAR)
6188 # this has to be here because both the wiki publisher and the SRB use
6190 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6191 AC_MSG_CHECKING([which Apache commons-* libs to use])
6192 if test "$with_system_apache_commons" = "yes"; then
6193 SYSTEM_APACHE_COMMONS=YES
6194 AC_MSG_RESULT([external])
6195 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6196 if test -z $COMMONS_CODEC_JAR; then
6197 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
6198 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
6200 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
6201 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
6202 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
6207 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
6208 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
6211 if test -z $COMMONS_LANG_JAR; then
6212 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
6213 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
6215 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
6216 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
6217 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
6222 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
6223 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
6226 if test -z $COMMONS_HTTPCLIENT_JAR; then
6227 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
6228 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
6230 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
6231 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
6232 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
6237 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
6238 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
6241 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
6242 if test -z $COMMONS_LOGGING_JAR; then
6243 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
6244 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
6246 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
6247 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
6248 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
6253 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
6254 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
6258 AC_MSG_RESULT([internal])
6259 SYSTEM_APACHE_COMMONS=NO
6260 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
6263 AC_SUBST(SYSTEM_APACHE_COMMONS)
6264 AC_SUBST(COMMONS_CODEC_JAR)
6265 AC_SUBST(COMMONS_LANG_JAR)
6266 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
6267 AC_SUBST(COMMONS_LOGGING_JAR)
6269 dnl ===================================================================
6270 dnl Check whether the Qt and KDE libraries are available.
6271 dnl ===================================================================
6276 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
6277 dnl Search paths for Qt and KDE
6278 if test "$build_cpu" != "x86_64" ; then
6279 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"
6280 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"
6282 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"
6283 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"
6285 if test -n "$QTDIR" ; then
6286 qt_incdirs="$QTDIR/include $qt_incdirs"
6287 if test "$build_cpu" != "x86_64" ; then
6288 qt_libdirs="$QTDIR/lib $qt_libdirs"
6290 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
6293 if test "$build_cpu" != "x86_64" ; then
6294 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"
6295 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"
6297 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"
6298 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"
6300 if test -n "$KDEDIR" ; then
6301 kde_incdirs="$KDEDIR/include $kde_incdirs"
6302 if test "$build_cpu" != "x86_64" ; then
6303 kde_libdirs="$KDEDIR/lib $kde_libdirs"
6305 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
6310 qt_test_include="qstyle.h"
6311 qt_test_library="libqt-mt.so"
6312 kde_test_include="ksharedptr.h"
6313 kde_test_library="libkdeui.so"
6315 dnl Check for Qt headers
6316 AC_MSG_CHECKING([for Qt headers])
6318 for kde_check in $qt_incdirs ; do
6319 if test -r "$kde_check/$qt_test_include" ; then
6320 qt_incdir="$kde_check"
6324 AC_MSG_RESULT([$qt_incdir])
6325 if test "x$qt_incdir" = "xno" ; then
6326 AC_MSG_ERROR([Qt headers not found. Please specify the root of
6327 your Qt installation by exporting QTDIR before running "configure".])
6330 dnl Check for Qt libraries
6331 AC_MSG_CHECKING([for Qt libraries])
6333 for qt_check in $qt_libdirs ; do
6334 if test -r "$qt_check/$qt_test_library" ; then
6335 qt_libdir="$qt_check"
6339 AC_MSG_RESULT([$qt_libdir])
6340 if test "x$qt_libdir" = "xno" ; then
6341 AC_MSG_ERROR([Qt libraries not found. Please specify the root of
6342 your Qt installation by exporting QTDIR before running "configure".])
6345 dnl Check for Meta Object Compiler
6346 AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
6347 if test "$MOC" = "no" ; then
6348 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6349 the root of your Qt installation by exporting QTDIR before running "configure".])
6352 dnl Check for KDE headers
6353 AC_MSG_CHECKING([for KDE headers])
6355 for kde_check in $kde_incdirs ; do
6356 if test -r "$kde_check/$kde_test_include" ; then
6357 kde_incdir="$kde_check"
6361 AC_MSG_RESULT([$kde_incdir])
6362 if test "x$kde_incdir" = "xno" ; then
6363 AC_MSG_ERROR([KDE headers not found. Please specify the root of
6364 your KDE installation by exporting KDEDIR before running "configure".])
6367 dnl Check for KDE libraries
6368 AC_MSG_CHECKING([for KDE libraries])
6370 for kde_check in $kde_libdirs ; do
6371 if test -r "$kde_check/$kde_test_library" ; then
6372 kde_libdir="$kde_check"
6376 AC_MSG_RESULT([$kde_libdir])
6377 if test "x$kde_libdir" = "xno" ; then
6378 AC_MSG_ERROR([KDE libraries not found. Please specify the root of
6379 your KDE installation by exporting KDEDIR before running "configure".])
6382 dnl Set the variables
6383 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6384 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
6386 AC_SUBST(KDE_CFLAGS)
6390 dnl ===================================================================
6391 dnl KDE4 Integration
6392 dnl ===================================================================
6397 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
6398 qt_incdirs="$QT4INC $QT4DIR /usr/include/qt4 /usr/include $x_includes"
6399 qt_libdirs="$QT4LIB /usr/lib $x_libraries"
6401 kde_incdirs="/usr/include $x_includes"
6402 kde_libdirs="/usr/lib $x_libraries"
6404 if test "$build_cpu" = "x86_64" ; then
6405 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
6406 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
6409 if test -n "$KDE4DIR" ; then
6410 kde_incdirs="$KDE4DIR/include $kde_incdirs"
6411 if test "$build_cpu" != "x86_64" ; then
6412 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
6414 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
6418 qt_test_include="Qt/qobject.h"
6419 qt_test_library="libQtCore.so"
6420 kde_test_include="ksharedptr.h"
6421 kde_test_library="libkdeui.so"
6423 AC_MSG_CHECKING([for Qt4 headers])
6425 for inc_dir in $qt_incdirs ; do
6426 if test -r "$inc_dir/$qt_test_include" ; then
6427 qt_header_dir="$inc_dir"
6432 AC_MSG_RESULT([$qt_header_dir])
6433 if test "x$qt_header_dir" = "xno" ; then
6434 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6437 AC_MSG_CHECKING([for Qt4 libraries])
6439 for lib_dir in $qt_libdirs ; do
6440 if test -r "$lib_dir/$qt_test_library" ; then
6441 qt_lib_dir="$lib_dir"
6446 AC_MSG_RESULT([$qt_lib_dir])
6448 if test "x$qt_lib_dir" = "xno" ; then
6449 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
6452 dnl Check for Meta Object Compiler
6453 AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
6454 if test "$MOC4" = "no" ; then
6455 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
6456 the root of your Qt installation by exporting QT4DIR before running "configure".])
6459 dnl Check for KDE4 headers
6460 AC_MSG_CHECKING([for KDE4 headers])
6462 for kde_check in $kde_incdirs ; do
6463 if test -r "$kde_check/$kde_test_include" ; then
6464 kde_incdir="$kde_check"
6468 AC_MSG_RESULT([$kde_incdir])
6469 if test "x$kde_incdir" = "xno" ; then
6470 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6473 dnl Check for KDE4 libraries
6474 AC_MSG_CHECKING([for KDE4 libraries])
6476 for kde_check in $kde_libdirs ; do
6477 if test -r "$kde_check/$kde_test_library" ; then
6478 kde_libdir="$kde_check"
6483 AC_MSG_RESULT([$kde_libdir])
6484 if test "x$kde_libdir" = "xno" ; then
6485 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
6488 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
6489 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui"
6491 AC_SUBST(KDE4_CFLAGS)
6495 dnl ===================================================================
6496 dnl Test for the enabling the lockdown pieces
6497 dnl ===================================================================
6498 AC_MSG_CHECKING([whether to enable the lockdown pieces])
6500 if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
6502 AC_MSG_RESULT([yes])
6506 AC_SUBST(ENABLE_LOCKDOWN)
6508 dnl ===================================================================
6509 dnl Test whether to include Evolution 2 support
6510 dnl ===================================================================
6511 AC_MSG_CHECKING([whether to enable evolution 2 support])
6512 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
6513 AC_MSG_RESULT([yes])
6514 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
6515 ENABLE_EVOAB2="TRUE"
6520 AC_SUBST(ENABLE_EVOAB2)
6521 AC_SUBST(GOBJECT_CFLAGS)
6522 AC_SUBST(GOBJECT_LIBS)
6524 dnl ===================================================================
6525 dnl Test whether to include KDE AB support
6526 dnl ===================================================================
6527 AC_MSG_CHECKING([whether to enable KDE address book support])
6528 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
6529 AC_MSG_RESULT([yes])
6531 save_CXXFLAGS=$CXXFLAGS
6532 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
6533 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
6535 #include <kdeversion.h>
6537 int main(int argc, char **argv) {
6538 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
6541 ], [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])])
6542 CXXFLAGS=$save_CXXFLAGS
6549 AC_SUBST(ENABLE_KAB)
6551 dnl ===================================================================
6552 dnl Test whether to include MathMLDTD
6553 dnl ===================================================================
6554 AC_MSG_CHECKING([whether to include MathMLDTD])
6555 if test -n "$enable_mathmldtd"; then
6556 if test "$enable_mathmldtd" = "no"; then
6558 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6560 AC_MSG_RESULT([yes])
6561 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
6565 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
6568 dnl ===================================================================
6569 dnl Test whether to include fonts
6570 dnl ===================================================================
6571 AC_MSG_CHECKING([whether to include third-party fonts])
6572 if test "$with_fonts" != "no" ; then
6573 AC_MSG_RESULT([yes])
6575 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
6579 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
6581 AC_SUBST(WITH_FONTS)
6583 dnl ===================================================================
6584 dnl Test whether to include ppds
6585 dnl ===================================================================
6586 AC_MSG_CHECKING([whether to include PPDs])
6587 if test "$with_ppds" != "no"; then
6588 AC_MSG_RESULT([yes])
6592 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
6594 AC_SUBST(WITHOUT_PPDS)
6596 dnl ===================================================================
6597 dnl Test whether to include afms
6598 dnl ===================================================================
6599 AC_MSG_CHECKING([whether to include AFMs])
6600 if test "$with_afms" != "no"; then
6601 AC_MSG_RESULT([yes])
6602 BUILD_TYPE="$BUILD_TYPE AFMS"
6606 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
6608 AC_SUBST(WITHOUT_AFMS)
6612 AC_MSG_CHECKING([whether and how to use Xinerama])
6613 if test "$_os" = "Darwin"; then
6615 XINERAMA_LINK=dynamic
6616 AC_MSG_RESULT([yes])
6617 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
6618 if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
6619 # we have both versions, let the user decide but use the dynamic one
6622 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
6623 XINERAMA_LINK=dynamic
6625 XINERAMA_LINK=static
6627 elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
6628 # we have only the dynamic version
6630 XINERAMA_LINK=dynamic
6631 elif test -e "$XLIB/libXinerama.a"; then
6633 if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6635 XINERAMA_LINK=static
6645 if test "$USE_XINERAMA" = "YES"; then
6646 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
6647 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
6648 [AC_MSG_ERROR(Xinerama header not found.)], [])
6649 XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
6650 if test "$_os" = "FreeBSD"; then
6651 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
6653 if test "$_os" = "Linux"; then
6654 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
6656 AC_CHECK_LIB(Xinerama, XineramaIsActive, [],
6657 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
6659 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
6664 AC_SUBST(USE_XINERAMA)
6665 AC_SUBST(XINERAMA_LINK)
6667 dnl ===================================================================
6668 dnl Test for the presence of Ant and that it works
6669 dnl ===================================================================
6671 if test "$SOLAR_JAVA" != ""; then
6672 ANT_HOME=; export ANT_HOME
6673 WITH_ANT_HOME=; export WITH_ANT_HOME
6674 if test -z "$with_ant_home"; then
6675 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
6677 if test "$_os" = "WINNT"; then
6678 with_ant_home=`cygpath -u "$with_ant_home"`
6680 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
6681 WITH_ANT_HOME=$with_ant_home
6682 ANT_HOME=$with_ant_home
6685 if test -z "$ANT"; then
6686 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
6688 # resolve relative or absolute symlink
6689 while test -h "$ANT"; do
6691 a_basename=`basename "$ANT"`
6692 a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
6693 cd "`dirname "$ANT"`"
6694 cd "`dirname "$a_script"`"
6695 ANT="`pwd`"/"`basename "$a_script"`"
6699 if test "$_os" = "OS2"; then
6700 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6704 AC_MSG_CHECKING([if $ANT works])
6705 cat > conftest.java << EOF
6706 public class conftest {
6707 int testmethod(int a, int b) {
6713 cat > conftest.xml << EOF
6714 <project name="conftest" default="conftest">
6715 <target name="conftest">
6716 <javac srcdir="." includes="conftest.java">
6721 oldJAVA_HOME=$JAVA_HOME
6722 if test "$JAVACISGCJ" = "yes"; then
6723 JAVA_HOME=; export JAVA_HOME
6724 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6726 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6728 AC_TRY_EVAL(ant_cmd)
6729 if test $? = 0 && test -f ./conftest.class ; then
6730 AC_MSG_RESULT([Ant works])
6731 if test -z "$WITH_ANT_HOME"; then
6732 ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
6733 if test -z "$ANT_HOME"; then
6734 ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
6737 ANT_HOME="$WITH_ANT_HOME"
6740 echo "configure: Ant test failed" >&5
6741 cat conftest.java >&5
6742 cat conftest.xml >&5
6743 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
6745 echo "Ant does not work - Some Java projects will not build!" >>warn
6747 JAVA_HOME=$oldJAVA_HOME
6748 rm -f conftest* core core.* *.core
6750 if test -z "$ANT_HOME"; then
6751 ANT_HOME="NO_ANT_HOME"
6755 dnl Checking for ant.jar
6756 if test "$ANT_HOME" != "NO_ANT_HOME"; then
6757 AC_MSG_CHECKING([Ant lib directory])
6758 if test -f $ANT_HOME/lib/ant.jar; then
6759 ANT_LIB="$ANT_HOME/lib"
6761 if test -f $ANT_HOME/ant.jar; then
6764 if test -f /usr/share/java/ant.jar; then
6765 ANT_LIB=/usr/share/java
6767 if test -f /usr/share/ant-core/lib/ant.jar; then
6768 ANT_LIB=/usr/share/ant-core/lib
6770 if test -f $ANT_HOME/lib/ant/ant.jar; then
6771 ANT_LIB="$ANT_HOME/lib/ant"
6773 AC_MSG_ERROR([Ant libraries not found!])
6779 AC_MSG_RESULT([Ant lib directory found.])
6785 # update for more extensions...
6786 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6789 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
6791 AC_MSG_CHECKING([whether ant is >= $ant_minver])
6792 ant_version=`$ANT -version | $AWK '{ print $4; }'`
6793 ant_version_major=`echo $ant_version | cut -d. -f1`
6794 ant_version_minor=`echo $ant_version | cut -d. -f2`
6795 echo "configure: ant_version $ant_version " >&5
6796 echo "configure: ant_version_major $ant_version_major " >&5
6797 echo "configure: ant_version_minor $ant_version_minor " >&5
6798 if test "$ant_version_major" -ge "2"; then
6799 AC_MSG_RESULT([yes, $ant_version])
6800 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
6801 AC_MSG_RESULT([yes, $ant_version])
6803 AC_MSG_ERROR([no, you need at least ant >= $ant_minver])
6806 if test "$ENABLE_MEDIAWIKI" = "YES"; then
6807 AC_MSG_CHECKING([whether ant supports mapper type="regexp"])
6810 cat > conftest.java << EOF
6811 public class conftest {
6812 int testmethod(int a, int b) {
6818 cat > conftest.xml << EOF
6819 <project name="conftest" default="conftest">
6820 <target name="conftest" depends="copytest">
6821 <javac srcdir="." includes="conftest.java">
6824 <target name="copytest">
6825 <copy todir="confdir">
6826 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
6828 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
6833 if test "$JAVACISGCJ" = "yes"; then
6834 JAVA_HOME=; export JAVA_HOME
6835 ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
6837 ant_cmd="$ANT -buildfile conftest.xml 1>&2"
6839 AC_TRY_EVAL(ant_cmd)
6840 if test $? = 0 && test -f ./conftest.class ; then
6841 AC_MSG_RESULT([yes])
6844 echo "configure: Ant test failed" >&5
6845 cat conftest.java >&5
6846 cat conftest.xml >&5
6848 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
6851 rm -f conftest* core core.* *.core
6854 if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
6855 AC_MSG_CHECKING([for JUnit 4])
6856 if test "$with_junit" == "yes"; then
6857 if test -e /usr/share/java/junit4.jar; then
6858 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
6860 OOO_JUNIT_JAR=/usr/share/java/junit.jar
6863 OOO_JUNIT_JAR=$with_junit
6865 if test "$_os" = "WINNT"; then
6866 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
6868 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
6869 grep org/junit/Before.class > /dev/null 2>&5
6870 if test $? -eq 0; then
6871 AC_MSG_RESULT([$OOO_JUNIT_JAR])
6874 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
6875 location (/usr/share/java), specify its pathname via
6876 --with-junit=..., or disable it via --without-junit])
6879 AC_SUBST(OOO_JUNIT_JAR)
6881 AC_MSG_CHECKING([which languages to be built])
6882 WITH_LANG="$with_lang"
6883 if test -z "$WITH_LANG"; then
6884 AC_MSG_RESULT([en-US])
6886 AC_MSG_RESULT([$WITH_LANG])
6890 AC_MSG_CHECKING([which languages have poor help localizations])
6891 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations"
6892 if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then
6893 AC_MSG_RESULT([none])
6895 AC_MSG_RESULT([$WITH_POOR_HELP_LOCALIZATIONS])
6897 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
6899 AC_MSG_CHECKING([which dictionaries to include])
6900 if test -z "$with_dict"; then
6902 AC_MSG_RESULT([ALL])
6904 WITH_DICT=","$with_dict","
6905 AC_MSG_RESULT([$with_dict])
6909 AC_MSG_CHECKING([for additional 'intro' bitmaps])
6911 if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then
6913 AC_MSG_RESULT([none])
6915 for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do
6918 *) bitmap= ; AC_MSG_WARN([Intro bitmaps should be .bmp files!]) ;;
6920 if test -n "$bitmap" ; then
6921 INTRO_BITMAPS="$INTRO_BITMAPS $bitmap"
6924 AC_MSG_RESULT([$INTRO_BITMAPS])
6926 AC_SUBST(INTRO_BITMAPS)
6928 AC_MSG_CHECKING([for additional 'about' bitmaps])
6930 if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then
6932 AC_MSG_RESULT([none])
6934 for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do
6937 *) bitmap= ; AC_MSG_WARN([About bitmaps should be .bmp files!]) ;;
6939 if test -n "$bitmap" ; then
6940 ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap"
6943 AC_MSG_RESULT([$ABOUT_BITMAPS])
6945 AC_SUBST(ABOUT_BITMAPS)
6948 AC_MSG_CHECKING([for vendor])
6949 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then
6950 AC_MSG_RESULT([not set])
6952 OOO_VENDOR="$with_vendor"
6953 AC_MSG_RESULT([$OOO_VENDOR])
6955 AC_SUBST(OOO_VENDOR)
6958 AC_MSG_CHECKING([for UNIX wrapper name])
6959 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then
6960 AC_MSG_RESULT([not set])
6962 UNIXWRAPPERNAME="$with_unix_wrapper"
6963 AC_MSG_RESULT([$UNIXWRAPPERNAME])
6965 AC_SUBST(UNIXWRAPPERNAME)
6967 AC_MSG_CHECKING([whether to statically link to Gtk])
6968 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
6969 ENABLE_STATIC_GTK="TRUE"
6970 AC_MSG_RESULT([yes])
6972 ENABLE_STATIC_GTK="FALSE"
6975 AC_SUBST(ENABLE_STATIC_GTK)
6977 AC_MSG_CHECKING([whether to use layout dialogs])
6978 if test -n "$enable_layout" && test "$enable_layout" != "no"; then
6979 ENABLE_LAYOUT="TRUE"
6980 AC_MSG_RESULT([yes])
6982 ENABLE_LAYOUT="FALSE"
6985 AC_SUBST(ENABLE_LAYOUT)
6987 # ===================================================================
6988 # De- or increase default verbosity of build process
6989 # ===================================================================
6990 AC_MSG_CHECKING([build verbosity])
6991 if test -n "$enable_verbose"; then
6992 if test "$enable_verbose" = "yes"; then
6994 AC_MSG_RESULT([high])
6996 if test "$enable_verbose" = "no"; then
6998 AC_MSG_RESULT([low])
7001 AC_MSG_RESULT([not set])
7005 dnl ===================================================================
7006 dnl Hook up OOos nodep environmental variable to automake's equivalent
7007 dnl --enable-dependency-tracking configure option
7008 dnl ===================================================================
7009 AC_MSG_CHECKING([whether to enable dependency tracking])
7010 if test "$enable_dependency_tracking" = "no"; then
7014 AC_MSG_RESULT([yes])
7018 dnl ===================================================================
7019 dnl Setting up the environment.
7020 dnl ===================================================================
7021 echo "********************************************************************"
7023 echo "* Setting up the build environment variables. *"
7025 echo "********************************************************************"
7027 if test -z "$COMPATH"; then
7028 AC_MSG_ERROR([No compiler found.])
7032 AC_MSG_CHECKING([solver path])
7033 if test -z "$with_local_solver"; then
7034 LOCAL_SOLVER="DEFAULT"
7035 AC_MSG_RESULT([default])
7037 LOCAL_SOLVER=$with_local_solver
7038 AC_MSG_RESULT([$with_local_solver])
7040 AC_SUBST(LOCAL_SOLVER)
7042 AC_SUBST(BUILD_TYPE)
7044 # make sure config.guess is +x; we execute config.guess, so it has to be so;
7045 chmod +x ./config.guess
7047 AC_OUTPUT([set_soenv Makefile])
7049 dnl Executing the set_soenv script to setup the environment variables.
7051 if test -z "$enable_check_only"; then
7056 echo No environment file will be generated
7058 num_warnings=`wc -l warn`
7059 _num=`echo $num_warnings | $AWK '{ print $1 }'`
7060 if test $_num -gt 0; then
7061 echo The following warning\(s\) were generated by configure
7062 echo ----------------------------------------------------
7067 echo There were no warnings