1 dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 102 -*-
2 dnl configure.ac serves as input for the GNU autoconf package
3 dnl in order to create a configure script.
5 AC_INIT([LibreOffice],[4.0],[],[],[http://documentfoundation.org/])
13 GIT_NEEDED_SUBMODULES=""
14 LO_PATH= # used by path_munge to construct a PATH variable
19 if test "$build_os" = "cygwin"; then
22 for pf_part in $formatted_path; do
23 if test -z "$pf_part1"; then
29 if test "$pf_conv_to_dos" = "yes"; then
30 formatted_path=`cygpath -d "$formatted_path"`
31 if test $? -ne 0; then
32 AC_MSG_ERROR([path conversion failed for "$1".])
35 fp_count_colon=`echo "$formatted_path" | $GREP -c "[:]"`
36 fp_count_slash=`echo "$formatted_path" | $GREP -c "[/]"`
37 if test "$fp_count_slash$fp_count_colon" != "00"; then
38 if test "$fp_count_colon" = "0"; then
39 formatted_path=`realpath "$formatted_path"`
40 if test $? -ne 0; then
41 AC_MSG_ERROR([realpath failed for "$1".])
44 formatted_path=`cygpath -m "$formatted_path"`
45 if test $? -ne 0; then
46 AC_MSG_ERROR([path conversion failed for "$1".])
56 if test "$have_WARNINGS" = "no"; then
57 echo "*************************************" >> warn
59 if which tput >/dev/null 2>/dev/null && test `tput colors` -ge 8; then
60 dnl <esc> as actual byte (U+1b), [ escaped using quadrigraph @<:@
61 COLORWARN='*
\e@<:@1;33;40m WARNING
\e@<:@0m:'
63 COLORWARN="* WARNING :"
66 echo "$COLORWARN $@" >> warn
69 if test -n "$SOLARENV"; then
70 AC_MSG_ERROR([You have sourced config_host.mk in this shell. This may lead to trouble, please run in a fresh (login) shell.])
73 echo "********************************************************************"
75 echo "* Running ${PACKAGE_NAME} build configuration."
77 echo "********************************************************************"
80 dnl ===================================================================
81 dnl checks build and host OSes
82 dnl do this before argument processing to allow for platform dependent defaults
83 dnl ===================================================================
87 # AC_PROG_EGREP doesn't set GREP on all systems as well
88 AC_PATH_PROG(GREP, grep)
90 if test "$build_os" = "cygwin"; then
93 PathFormat "$SRC_ROOT"
94 SRC_ROOT="$formatted_path"
103 AC_SUBST(EXEEXT_FOR_BUILD)
106 if test "z$EUID" = "z0" -a "`uname -o 2>/dev/null`" = "Cygwin"; then
107 AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account])
110 # need sed in os checks...
111 AC_PATH_PROGS(SED, sed)
112 if test -z "$SED"; then
113 AC_MSG_ERROR([install sed to run this script])
116 dnl ===================================================================
117 dnl When building for Android the --with-android-ndk is mandatory
118 dnl ===================================================================
120 AC_ARG_WITH(android-ndk,
121 AS_HELP_STRING([--with-android-ndk],
122 [Specify location of the Android Native Development Kit. Mandatory when building for Android.]),
125 AC_ARG_WITH(android-ndk-toolchain-version,
126 AS_HELP_STRING([--with-android-ndk-toolchain-version],
127 [Specify which toolchain version to use, of those present in the
128 Android NDK you are using. Mandatory if the NDK used has several
129 toolchain versions for the host architecture you are building for.]), ,)
131 AC_ARG_WITH(android-sdk,
132 AS_HELP_STRING([--with-android-sdk],
133 [Specify location of the Android SDK. Mandatory when building for Android.]),
137 if test -n "$with_android_ndk"; then
138 ANDROID_NDK_HOME=$with_android_ndk
140 # Set up a lot of pre-canned defaults
142 if test $host_cpu = arm; then
144 elif test $host_cpu = mips; then
147 # host_cpu is something like "i386" or "i686" I guess, NDK uses
148 # "x86" in some contexts
152 ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$android_cpu*-*$with_android_ndk_toolchain_version/prebuilt/*/bin`
153 # Check if there are several toolchain versions
154 case "$ANDROID_ABI_PREBUILT_BIN" in
156 AC_MSG_ERROR([Several toolchain versions in NDK, you must specify --with-android-ndk-toolchain-version])
159 # This stays empty if there is just one version of the toolchain in the NDK
160 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=
161 case "`echo $ANDROID_NDK_HOME/toolchains/$android_cpu*-*/prebuilt/*/bin`" in
163 # Trailing slash intentional and necessary, compare to how this is used
164 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR="${with_android_ndk_toolchain_version}/"
168 if test $host_cpu = arm; then
169 android_gcc_prefix=arm-linux-androideabi
170 elif test $host_cpu = mips; then
171 android_gcc_prefix=mipsel-linux-android
172 elif test -f $ANDROID_ABI_PREBUILT_BIN/i686-android-linux-gcc; then
173 android_gcc_prefix=i686-android-linux
174 elif test -f $ANDROID_ABI_PREBUILT_BIN/i686-linux-android-gcc; then
175 android_gcc_prefix=i686-linux-android
177 AC_MSG_ERROR([Can't figure out the toolchain prefix])
180 test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-$android_cpu
181 test -z "$AR" && AR=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ar
182 test -z "$NM" && NM=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-nm
183 test -z "$OBJDUMP" && OBJDUMP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-objdump
184 test -z "$RANLIB" && RANLIB=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ranlib
185 test -z "$STRIP" && STRIP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-strip
187 if test $host_cpu = arm; then
188 ANDROID_APP_ABI=armeabi-v7a
189 ANDROIDCFLAGS="-march=armv7-a -mfloat-abi=softfp -mthumb -mfpu=neon -Wl,--fix-cortex-a8"
190 elif test $host_cpu = mips; then
195 ANDROIDCFLAGS="-march=atom"
197 ANDROIDCFLAGS="$ANDROIDCFLAGS -ffunction-sections"
198 ANDROIDCFLAGS="$ANDROIDCFLAGS -Wno-psabi --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-$android_cpu -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/$ANDROID_APP_ABI"
200 # When using the 4.6 or newer toolchain, use the gold linker
201 case "$with_android_ndk_toolchain_version" in
202 4.[[6789]]*|[[56789]].*)
203 # The NDK doesn't have ld.gold for MIPS for some reason
204 if test "$host_cpu" != mips; then
205 ANDROIDCFLAGS="$ANDROIDCFLAGS -fuse-ld=gold"
210 # gdbserver can be in different locations
211 if test -f $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver; then
212 ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver
213 elif test -f $ANDROID_NDK_HOME/prebuilt/android-$android_cpu/gdbserver/gdbserver; then
214 ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/prebuilt/android-$android_cpu/gdbserver/gdbserver
216 AC_MSG_ERROR([Can't find gdbserver for your Android target])
219 if test $host_cpu = arm; then
220 ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/armeabi-v7a/include"
221 elif test $host_cpu = mips; then
222 ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/mips/include"
224 ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/x86/include"
227 test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-gcc $ANDROIDCFLAGS"
228 test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-g++ $ANDROIDCXXFLAGS"
230 AC_SUBST(ANDROID_NDK_HOME)
231 AC_SUBST(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)
232 AC_SUBST(ANDROID_NDK_GDBSERVER)
233 AC_SUBST(ANDROID_APP_ABI)
235 dnl ===================================================================
236 dnl Also --with-android-sdk is mandatory
237 dnl ===================================================================
239 if test -n "$with_android_sdk"; then
240 ANDROID_SDK_HOME=$with_android_sdk
241 PATH="$ANDROID_SDK_HOME/platform-tools:$ANDROID_SDK_HOME/tools:$PATH"
243 AC_SUBST(ANDROID_SDK_HOME)
245 dnl ===================================================================
246 dnl The following is a list of supported systems.
247 dnl Sequential to keep the logic very simple
248 dnl These values may be checked and reset later.
249 dnl ===================================================================
250 #defaults unless the os test overrides this:
258 # Default values, as such probably valid just for Linux, set
259 # differently below just for Mac OSX,but at least better than
260 # hardcoding these as we used to do. Much of this is duplicated also
261 # in solenv for old build system and for gbuild, ideally we should
262 # perhaps define stuff like this only here in configure.ac?
264 LINKFLAGSSHL="-shared"
268 LINKFLAGSNOUNDEFS="-Wl,-z,defs"
275 build_gstreamer_0_10=yes
282 dnl ===========================================================
283 dnl Check whether we're using Solaris 10 - SPARC or Intel.
284 dnl ===========================================================
285 AC_MSG_CHECKING([the Solaris operating system release])
286 _os_release=`echo $host_os | $SED -e s/solaris2\.//`
287 if test "$_os_release" -lt "10"; then
288 AC_MSG_ERROR([use Solaris >= 10 to build LibreOffice])
290 AC_MSG_RESULT([ok ($_os_release)])
293 dnl Check whether we're using a SPARC or i386 processor
294 AC_MSG_CHECKING([the processor type])
295 if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then
296 AC_MSG_RESULT([ok ($host_cpu)])
298 AC_MSG_ERROR([only SPARC and i386 processors are supported])
302 linux-gnu*|k*bsd*-gnu*)
305 build_gstreamer_0_10=yes
310 test_unix_quickstarter=yes
320 cygwin*|interix*|mingw32*)
322 # When building on Windows normally with MSVC under Cygwin,
323 # configure thinks that the host platform (the platform the
324 # built code will run on) is Cygwin, even if it obviously is
325 # Windows, which in Autoconf terminology is called
326 # "mingw32". (Which is misleading as MinGW is the name of the
327 # tool-chain, not an operating system.)
329 # Somewhat confusing, yes. But this configure script doesn't
330 # look at $host etc that much, it mostly uses its own $_os
331 # variable, set here in this case statement.
333 # When cross-compiling to Windows from Unix, the host platform
334 # is "mingw32" (because in that case it is the MinGW
335 # tool-chain that is used).
344 use_shl_version="TRUE"
350 # If the host OS matches "mingw32*", that means we are using the
351 # MinGW cross-compiler, because we don't see the point in building
352 # LibreOffice using MinGW on Windows. If you want to build on
353 # Windows, use MSVC. If you want to use MinGW, surely you want to
354 # cross-compile (from Linux or some other Unix).
359 if test -z "$CC"; then
360 CC="$host_cpu-$host_vendor-$host_os-gcc"
362 if test -z "$CXX"; then
363 CXX="$host_cpu-$host_vendor-$host_os-g++"
369 darwin*) # Mac OS X or iOS
376 if test "$host_cpu" = "arm"; then
384 # See comment above the case "$host_os"
385 LINKFLAGSSHL="-dynamiclib -single_module"
392 # -undefined error is the default
399 build_gstreamer_0_10=yes
404 AC_MSG_CHECKING([the FreeBSD operating system release])
405 if test -n "$with_os_version"; then
406 OSVERSION="$with_os_version"
408 OSVERSION=`/sbin/sysctl -n kern.osreldate`
410 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
411 AC_MSG_CHECKING([which thread library to use])
412 if test "$OSVERSION" -lt "500016"; then
413 PTHREAD_CFLAGS="-D_THREAD_SAFE"
414 PTHREAD_LIBS="-pthread"
415 elif test "$OSVERSION" -lt "502102"; then
416 PTHREAD_CFLAGS="-D_THREAD_SAFE"
420 PTHREAD_LIBS="-pthread"
422 AC_MSG_RESULT([$PTHREAD_LIBS])
429 build_gstreamer_0_10=yes
434 PTHREAD_LIBS="-pthread -lpthread"
441 PTHREAD_LIBS=-pthread
450 PTHREAD_CFLAGS="-D_THREAD_SAFE"
451 PTHREAD_LIBS="-pthread"
458 build_gstreamer_0_10=yes
463 PTHREAD_LIBS="-pthread"
469 build_gstreamer_0_10=no
480 test_unix_quickstarter=no
483 if test -z "$with_android_ndk"; then
484 AC_MSG_ERROR([the --with-android-ndk option is mandatory])
487 if test -z "$with_android_sdk"; then
488 AC_MSG_ERROR([the --with-android-sdk option is mandatory])
491 # Verify that the NDK and SDK options are proper
492 if test ! -f "$ANDROID_NDK_HOME/platforms/android-9/arch-arm/usr/lib/libc.a"; then
493 AC_MSG_ERROR([the --with-android-ndk option does not point to an Android NDK])
496 if test ! -d "$ANDROID_SDK_HOME/platforms"; then
497 AC_MSG_ERROR([the --with-android-sdk option does not point to an Android SDK])
500 BUILD_TYPE="$BUILD_TYPE FONTCONFIG FREETYPE"
504 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
508 if test "$_os" = "AIX"; then
509 AC_PATH_PROG(GAWK, gawk)
510 if test -z "$GAWK"; then
511 AC_MSG_ERROR([gawk not found in \$PATH])
515 AC_SUBST(use_shl_version)
516 AC_SUBST(DYNAMIC_CRT)
520 AC_SUBST(PTHREAD_CFLAGS)
521 AC_SUBST(PTHREAD_LIBS)
523 ###############################################################################
524 # Extensions switches --enable/--disable
525 ###############################################################################
526 # By default these should be enabled unless having extra dependencies.
527 # If there is extra dependency over configure options then the enable should
528 # be automagic based on whether the requiring feature is enabled or not.
529 # All this options change anything only with --enable-extension-integration.
531 # The name of this option and its help string makes it sound as if
532 # extensions are built anyway, just not integrated in the installer,
533 # if you use --disable-extension-integration. Is that really the
536 AC_ARG_ENABLE(extension-integration,
537 AS_HELP_STRING([--disable-extension-integration],
538 [Disable integration of the built extensions in the installer of the
539 product. Use this switch to disable the integration.])
542 AC_ARG_ENABLE(ext-barcode,
543 AS_HELP_STRING([--enable-ext-barcode],
544 [Enable the Barcode extension.])
547 AC_ARG_ENABLE(export,
548 AS_HELP_STRING([--disable-export],
549 [Disable (some) code for document export. Useful when building viewer-only apps that lack
550 save/export functionality, to avoid having an excessive amount of code and data used
551 only for exporrt linked in. Work in progress, use only if you are hacking on it.])
554 AC_ARG_ENABLE(database-connectivity,
555 AS_HELP_STRING([--disable-database-connectivity],
556 [Disable various database connectivity. Work in progress, use only if you are hacking on it.])
559 # This doesn't mean not building (or "integrating") extensions
560 # (although it probably should; i.e. it should imply
561 # --disable-extension-integration I guess), it means not supporting
562 # any extension mechanism at all
563 AC_ARG_ENABLE(extensions,
564 AS_HELP_STRING([--disable-extensions],
565 [Disable all add-on extension functionality. Work in progress, use only if you are hacking on it.])
568 AC_ARG_ENABLE(scripting,
569 AS_HELP_STRING([--disable-scripting],
570 [Disable BASIC, Java and Python. Work in progress, use only if you are hacking on it.])
573 # This is mainly for Android and iOS, but could potentially be used in some
574 # special case otherwise, too, so factored out as a separate setting
576 AC_ARG_ENABLE(dynamic-loading,
577 AS_HELP_STRING([--disable-dynamic-loading],
578 [Disable any use of dynamic loading of code. Work in progress, use only if you are hacking on it.])
581 AC_ARG_ENABLE(ext-diagram,
582 AS_HELP_STRING([--enable-ext-diagram],
583 [Enable the SmART Gallery (Diagram) extension.])
586 AC_ARG_ENABLE(ext-google-docs,
587 AS_HELP_STRING([--enable-ext-google-docs],
588 [Enable the Google Documents extension.])
591 AC_ARG_ENABLE(ext-hunart,
592 AS_HELP_STRING([--enable-ext-hunart],
593 [Enable the Hungarian Cross-reference Toolbar extension.])
596 AC_ARG_ENABLE(ext-languagetool,
597 AS_HELP_STRING([--enable-ext-languagetool],
598 [Enable the LanguageTool extension.])
601 AC_ARG_ENABLE(ext-mysql-connector,
602 AS_HELP_STRING([--enable-ext-mysql-connector],
603 [Enable the build of the MySQL Connector extension.])
606 AC_ARG_ENABLE(ext-nlpsolver,
607 AS_HELP_STRING([--enable-ext-nlpsolver],
608 [Enable the NLPSolver extension.])
611 AC_ARG_ENABLE(ext-ct2n,
612 AS_HELP_STRING([--enable-ext-ct2n],
613 [Enable the ConvertTextToNumber extension.])
616 AC_ARG_ENABLE(ext-numbertext,
617 AS_HELP_STRING([--enable-ext-numbertext],
618 [Enable the Numbertext extension.])
621 AC_ARG_ENABLE(ext-presenter-minimizer,
622 AS_HELP_STRING([--disable-ext-presenter-minimizer],
623 [Disable the Presentation Minimizer extension.])
626 AC_ARG_ENABLE(ext-report-builder,
627 AS_HELP_STRING([--disable-ext-report-builder],
628 [Disable the Report Builder extension.])
631 AC_ARG_ENABLE(ext-typo,
632 AS_HELP_STRING([--enable-ext-typo],
633 [Enable the Typography Toolbar extension.])
636 AC_ARG_ENABLE(ext-validator,
637 AS_HELP_STRING([--enable-ext-validator],
638 [Enable the Validator extension.])
641 AC_ARG_ENABLE(ext-watch-window,
642 AS_HELP_STRING([--enable-ext-watch-window],
643 [Enable the Watch Window extension to Calc.])
646 AC_ARG_ENABLE(ext-wiki-publisher,
647 AS_HELP_STRING([--enable-ext-wiki-publisher],
648 [Enable the Wiki Publisher extension.])
650 ###############################################################################
652 dnl ---------- *** ----------
654 AC_ARG_ENABLE([hardlink-deliver],
655 AS_HELP_STRING([--enable-hardlink-deliver],
656 [Put files into deliver folder as hardlinks instead of copying them
657 over. Saves space and speeds up build.])
660 AC_ARG_ENABLE(mergelibs,
661 AS_HELP_STRING([--enable-mergelibs],
662 [Enables linking of big, merged, library. Experimental feature tested
663 only on Linux and Android.])
666 AC_ARG_ENABLE(graphite,
667 AS_HELP_STRING([--enable-graphite],
668 [Enables the compilation of Graphite smart font rendering.])
671 AC_ARG_ENABLE(fetch-external,
672 AS_HELP_STRING([--disable-fetch-external],
673 [Disables fetching external tarballs from web sources.])
676 AC_ARG_ENABLE(lockdown,
677 AS_HELP_STRING([--disable-lockdown],
678 [Disables the gconf integration work in LibreOffice.]),
682 AS_HELP_STRING([--disable-vba],
683 [Disables the vba compatibility feature.])
687 AS_HELP_STRING([--enable-pch],
688 [DEPRECATED : is ignored])
691 AC_ARG_ENABLE(win-mozab-driver,
692 AS_HELP_STRING([--enable-win-mozab-driver],
693 [LibreOffice includes a driver to connect to Mozilla
694 address books under Windows, to build with this version, use this option.])
698 AS_HELP_STRING([--enable-epm],
699 [LibreOffice includes self-packaging code, that requires epm, however epm is
700 useless for large scale package building.])
704 AS_HELP_STRING([--disable-odk],
705 [LibreOffice includes an ODK, office development kit which some packagers may
706 wish to build without.])
709 AC_ARG_ENABLE(mathmldtd,
710 AS_HELP_STRING([--enable-mathmldtd],
711 [Enable bundling of (modified) MathML 1.01 DTD.])
714 AC_ARG_ENABLE(evolution2,
715 AS_HELP_STRING([--enable-evolution2],
716 [Allows the built-in evolution 2 addressbook connectivity build to be
720 AC_ARG_ENABLE(directx,
721 AS_HELP_STRING([--disable-directx],
722 [Remove DirectX implementation for the new XCanvas interface.
723 The DirectX support requires more stuff installed on Windows to
724 compile. (DirectX SDK, GDI+ libs)])
727 AC_ARG_ENABLE(activex,
728 AS_HELP_STRING([--disable-activex],
729 [Disable the use of ActiveX for a Windows build.
730 This switch is mandatory when using VC++ 2008 Express.])
734 AS_HELP_STRING([--disable-atl],
735 [Disable the use of ATL for a Windows build.])
737 This switch is mandatory when using VC++ 2008 Express.
741 AC_ARG_ENABLE(werror,
742 AS_HELP_STRING([--enable-werror],
743 [Turn warnings to errors. (Has no effect in modules where the treating
744 of warnings as errors is disabled explicitly.)]),
747 AC_ARG_ENABLE(assert-always-abort,
748 AS_HELP_STRING([--enable-assert-always-abort],
749 [make assert() abort even in release code.]),
752 AC_ARG_ENABLE(dbgutil,
753 AS_HELP_STRING([--enable-dbgutil],
754 [Provide debugging support from --enable-debug and include additional debugging
755 utilities such as object counting or more expensive checks.
756 This is the recommended option for developers.
757 Note that this makes the build ABI incompatible, it is not possible to mix object
758 files or libraries from a --enable-dbgutil and a --disable-dbgutil build.]))
761 AS_HELP_STRING([--enable-debug],
762 [Include debugging information, disable compiler optimization and inlining plus
763 extra debugging code like assertions. Extra large build! (enables -g compiler flag
764 and dmake debug=true).]))
766 AC_ARG_ENABLE(selective-debuginfo,
767 AS_HELP_STRING([--enable-selective-debuginfo],
768 [If --enable-debug or --enable-dbgutil is used, build debugging information
769 (-g compiler flag) only for the specified gbuild build targets
770 (where all means everything, - prepended means not to enable, / appended means
771 everything in the directory; there is no ordering, more specific overrides
772 more general, and disabling takes precedence).
773 Example: --enable-selective-debuginfo="all -sw/ -Library_sc".]))
775 AC_ARG_ENABLE(symbols,
776 AS_HELP_STRING([--enable-symbols],
777 [Include debugging symbols in output while preserve optimization.
778 This enables -g compiler flag for GCC or equivalent,
779 without changing anything else compared to productive code.]))
781 AC_ARG_ENABLE(compiler-plugins,
782 AS_HELP_STRING([--enable-compiler-plugins],
783 [Enable compiler plugins that will perform additional checks during
784 building. Enabled automatically by --enable-dbgutil.]))
786 AC_ARG_ENABLE(linkoo,
787 AS_HELP_STRING([--disable-linkoo],
788 [Disable linkoo for the smoketest installation.]))
791 AS_HELP_STRING([--enable-lto],
792 [Enable link-time optimization. Suitable for product builds.
793 Building takes longer but libraries are optimized for speed.
794 (possible only with gcc-4.5 or later,
795 better to use gcc-4.6 and 'gold' as linker)]))
797 AC_ARG_ENABLE(crashdump,
798 AS_HELP_STRING([--enable-crashdump],
799 [Enable the crashdump feature.]))
801 AC_ARG_ENABLE(python,
802 AS_HELP_STRING([--enable-python=<no/auto/system/internal>],
803 [Enables or disables Python support at run-time and build-time.
804 Also specifies what Python to use. 'auto' is the
805 default. Note that Python can be disabled with
806 --disable-python or --enable-python=no only if no
807 translations are required.]))
810 AS_HELP_STRING([--disable-gtk],
811 [Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available.]),
815 AS_HELP_STRING([--enable-gtk3],
816 [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
819 AC_ARG_ENABLE(systray,
820 AS_HELP_STRING([--disable-systray],
821 [Determines whether to build the systray quickstarter.]),
824 AC_ARG_ENABLE(split-app-modules,
825 AS_HELP_STRING([--enable-split-app-modules],
826 [Split file lists for app modules, e.g. base, calc.
827 Has effect only with make distro-pack-install]),
830 AC_ARG_ENABLE(split-opt-features,
831 AS_HELP_STRING([--enable-split-opt-features],
832 [Split file lists for some optional features, .e.g. pyuno, testtool.
833 Has effect only with make distro-pack-install]),
836 AC_ARG_ENABLE(cairo-canvas,
837 [ --disable-cairo-canvas Determines whether to build the Cairo canvas on
838 platforms where Cairo is available.
841 AC_ARG_ENABLE(opengl,
842 AS_HELP_STRING([--disable-opengl],
843 [Determines whether to build the OpenGL 3D slide transitions component.]),
847 AS_HELP_STRING([--disable-dbus],
848 [Determines whether to enable features that depend on dbus.
849 e.g. Presentation mode screensaver control, bluetooth presentation control]),
852 AC_ARG_ENABLE(packagekit,
853 AS_HELP_STRING([--enable-packagekit],
854 [Determines whether to enable features using packagekit.
855 Right now that is auto font install]),
858 AC_ARG_ENABLE(sdremote,
859 AS_HELP_STRING([--disable-sdremote],
860 [Determines whether to enable Impress remote control.]),
861 ,enable_sdremote=yes)
863 AC_ARG_ENABLE(sdremote-bluetooth,
864 AS_HELP_STRING([--disable-sdremote-bluetooth],
865 [Determines whether to build sdremote with bluetooth support.
866 Requires dbus on Linux.]))
869 AS_HELP_STRING([--disable-gconf],
870 [Determines whether to use the GConf support.]),
873 AC_ARG_ENABLE(gnome-vfs,
874 AS_HELP_STRING([--disable-gnome-vfs],
875 [Determines whether to use the Gnome Virtual Filing System on platforms
876 where that VFS is available.]),
877 ,enable_gnome_vfs=yes)
880 AS_HELP_STRING([--enable-gio],
881 [Determines whether to use the GIO support.]),
884 AC_ARG_ENABLE(telepathy,
885 AS_HELP_STRING([--enable-telepathy],
886 [Determines whether to enable Telepathy for collaboration.]),
887 ,enable_telepathy=no)
889 AC_ARG_ENABLE(build-mozab,
890 AS_HELP_STRING([--disable-build-mozab],
891 [Use this option if you do not want to build the Mozilla address book
892 components from the Mozilla source code but take precompiled zips.
893 Meaningful only after --enable-win-mozab-driver.]),
897 AS_HELP_STRING([--enable-tde],
898 [Determines whether to use TQt/TDE vclplug on platforms where TQt and
899 TDE are available.]),
903 AS_HELP_STRING([--disable-tdeab],
904 [Disable the TDE address book support.]),
906 if test "$enable_tde" = "yes"; then
912 AS_HELP_STRING([--enable-kde],
913 [Determines whether to use Qt3/KDE3 vclplug on platforms where Qt3 and
914 KDE3 are available.]),
918 AS_HELP_STRING([--disable-kdeab],
919 [Disable the KDE3 address book support.]),
921 if test "$enable_kde" = "yes"; then
927 AS_HELP_STRING([--enable-kde4],
928 [Determines whether to use Qt4/KDE4 vclplug on platforms where Qt4 and
929 KDE4 are available. May be used with --enable-kde if you want to support
930 both KDE3 and KDE4.]),
933 AC_ARG_ENABLE(headless,
934 AS_HELP_STRING([--enable-headless],
935 [Disable building of GUIs to reduce dependencies. Useful for
936 server usage. Work in progress, use only if you are hacking on
937 it. Not related to the --headless option.]), ,)
939 AC_ARG_ENABLE(unix-qstart-libpng,
940 AS_HELP_STRING([--disable-unix-qstart-libpng],
941 [On UNIX systems, we have a faster splash app, that can use libpng to
942 render its splash, if we can safely link to the system libpng then
943 enabling this is a good idea (ie. for Linux Distro packaging).]),
944 ,enable_unix_qstart_libpng=yes)
947 AS_HELP_STRING([--disable-rpath],
948 [Disable the use of relative paths in shared libraries.]),
952 AS_HELP_STRING([--disable-randr],
953 [Disable RandR support in the vcl project.]),
956 AC_ARG_ENABLE(randr-link,
957 AS_HELP_STRING([--disable-randr-link],
958 [Disable linking with libXrandr, instead dynamically open it at runtime.]),
959 ,enable_randr_link=yes)
961 AC_ARG_ENABLE(gstreamer,
962 AS_HELP_STRING([--enable-gstreamer],
963 [Enable building with the new gstreamer 1.0 avmedia backend.]),
964 ,enable_gstreamer=no)
966 AC_ARG_ENABLE(gstreamer-0-10,
967 AS_HELP_STRING([--disable-gstreamer-0-10],
968 [Disable building the gstreamer avmedia backend.]),
969 ,enable_gstreamer_0_10=yes)
972 AS_HELP_STRING([--disable-neon],
973 [Disable neon and the compilation of webdav binding.]),
976 AC_ARG_ENABLE(cve-tests,
977 AS_HELP_STRING([--disable-cve-tests],
978 [Prevent CVE tests to be executed]),
981 AC_ARG_ENABLE(build-unowinreg,
982 AS_HELP_STRING([--enable-build-unowinreg],
983 [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
984 compiler is needed on Linux.])
986 Usage: --enable-build-unowinreg
990 AC_ARG_ENABLE(verbose,
991 AS_HELP_STRING([--enable-verbose],
992 [Increase build verbosity.])[
993 --disable-verbose Decrease build verbosity.],
996 AC_ARG_ENABLE(dependency-tracking,
997 AS_HELP_STRING([--enable-dependency-tracking],
998 [Do not reject slow dependency extractors.])[
999 --disable-dependency-tracking
1000 Disables generation of dependency information.
1001 Speed up one-time builds.],
1004 AC_ARG_ENABLE(icecream,
1005 AS_HELP_STRING([--enable-icecream],
1006 [Use the 'icecream' distributed compiling tool to speedup the compilation.
1007 It defaults to /opt/icecream for the location of the icecream gcc/g++
1008 wrappers, you can override that using --with-gcc-home=/the/path switch.]),
1011 AC_ARG_ENABLE(zenity,
1012 AS_HELP_STRING([--disable-zenity],
1013 [Do not display a build icon in the notification area (on unix) during build.]),
1017 AS_HELP_STRING([--disable-cups],
1018 [Do not build cups support.])
1021 AC_ARG_ENABLE(ccache,
1022 AS_HELP_STRING([--disable-ccache],
1023 [Do not try to use ccache automatically.
1024 By default, we will try to detect if ccache is available; in that case if
1025 CC/CXX are not yet set, and --enable-icecream is not given, we
1026 attempt to use ccache. --disable-ccache disables ccache completely.
1030 AC_ARG_ENABLE(64-bit,
1031 AS_HELP_STRING([--enable-64-bit],
1032 [Build a 64-bit LibreOffice on platforms where the normal and only supported build
1033 is 32-bit. In other words, this option is experimental and possibly quite broken,
1034 use only if you are hacking on 64-bit support.]), ,)
1036 AC_ARG_ENABLE(extra-gallery,
1037 AS_HELP_STRING([--enable-extra-gallery],
1038 [Add extra gallery content.]),
1041 AC_ARG_ENABLE(extra-template,
1042 AS_HELP_STRING([--enable-extra-template],
1043 [Add extra template content.]),
1046 AC_ARG_ENABLE(extra-sample,
1047 AS_HELP_STRING([--enable-extra-sample],
1048 [Add extra sample content.]),
1051 AC_ARG_ENABLE(extra-font,
1052 AS_HELP_STRING([--enable-extra-font],
1053 [Add extra font content.]),
1056 AC_ARG_ENABLE(lomenubar,
1057 AS_HELP_STRING([--enable-lomenubar],
1058 [Enable global menu support.]),
1061 AC_ARG_ENABLE(online-update,
1062 AS_HELP_STRING([--enable-online-update],
1063 [Enable the online update service that will check for new versions of
1064 LibreOffice. By default, it is on on Windows and Mac, and off on Linux.]),
1067 AC_ARG_ENABLE(release-build,
1068 AS_HELP_STRING([--enable-release-build],
1069 [Enable release build.
1070 See http://wiki.documentfoundation.org/DevBuild]),
1073 AC_ARG_ENABLE(windows-build-signing,
1074 AS_HELP_STRING([--enable-windows-build-signing],
1075 [Enable signing of windows binaries (*.exe, *.dll)]),
1078 AC_ARG_ENABLE(silent-msi,
1079 AS_HELP_STRING([--enable-silent-msi],
1080 [Enable MSI with LIMITUI=1 (silent install).]),
1083 AC_ARG_ENABLE(macosx-code-signing,
1084 AS_HELP_STRING([--enable-macosx-code-signing<=identity>],
1085 [Sign the app bundle being stored in the disk image. The
1086 default is to do signing if there is a suitable certificate
1087 in your keychain, so if you don't want that, use the
1088 corresponding --disable option. Experimental work in
1089 progress, don't use unless you are working on this.]),
1092 AC_ARG_ENABLE(postgresql-sdbc,
1093 AS_HELP_STRING([--disable-postgresql-sdbc],
1094 [Disable the build of the PostgreSQL-SDBC driver.])
1097 AC_ARG_ENABLE(coretext,
1098 AS_HELP_STRING([--enable-coretext],
1099 [Use CoreText framework on Mac (instead of ATSU).
1100 Known to not work properly, use only if you plan to work on that.]),
1103 AC_ARG_ENABLE(winegcc,
1104 AS_HELP_STRING([--enable-winegcc],
1105 [Enable use of winegcc during the build, in order to create msi* tools
1106 needed for MinGW cross-compilation.]),
1109 AC_ARG_ENABLE(liblangtag,
1110 AS_HELP_STRING([--disable-liblangtag],
1111 [Disable use of liblangtag, and insted use an own simple
1115 AC_ARG_ENABLE(bogus-pkg-config,
1116 AS_HELP_STRING([--enable-bogus-pkg-config],
1117 [MACOSX only: on MacOSX pkg-config can cause trouble. by default if one is found in the PATH, an error is issued. This flag turn that error into a warning.]),
1120 dnl ===================================================================
1121 dnl Optional Packages (--with/without-)
1122 dnl ===================================================================
1124 AC_ARG_WITH(gnu-patch,
1125 AS_HELP_STRING([--with-gnu-patch],
1126 [Specify location of GNU patch on Solaris or FreeBSD.]),
1129 AC_ARG_WITH(build-platform-configure-options,
1130 [Specify options for the configure script run for the *build* platform in a cross-compilation])
1133 AS_HELP_STRING([--with-gnu-cp],
1134 [Specify location of GNU cp on Solaris or FreeBSD.]),
1137 AC_ARG_WITH(external-tar,
1138 AS_HELP_STRING([--with-external-tar=<TARFILE PATH>],
1139 [Specify path to tarfiles manually.]),
1140 TARFILE_LOCATION=$withval ,
1143 AC_ARG_WITH(solver-and-workdir-root,
1144 AS_HELP_STRING([--with-solver-and-workdir-root=<PATH>],
1145 [Specify path that contains SOLARVER and WORKDIR directories manually.])
1148 AC_ARG_WITH(linked-git,
1149 AS_HELP_STRING([--with-linked-git=<OTHER_CLONE_DIR>],
1150 [Specify another checkout's clonedir to re-use. This makes use of
1151 git-new-workdir, and saves a lot of diskspace when having multiple
1152 trees side-by-side.]),
1153 GIT_LINK_SRC=$withval ,
1156 AC_ARG_WITH(vba-package-format,
1157 AS_HELP_STRING([--with-vba-package-format],
1158 [Specify package format for vba compatibility api. Specifying "builtin"
1159 means the api component and associated type library are part of the
1160 installation set. Specifying "extn" creates an uno extension that is
1161 part of the installation set (located in the program directory) that
1162 MUST be optionally registered using either the unopkg executeable or the
1163 extension manager gui.])
1165 Note: "builtin" is the default, "extn" can cause
1168 Usage: --with-vba-package-format="builtin" or
1169 --with-vba-package-format="extn"
1174 AS_HELP_STRING([--with-theme="theme1 theme2..."],
1175 [Choose which themes to include. By default those themes with an '*' are included.
1176 Possible choices: *crystal, *default (galaxy), *hicontrast, human, industrial, *oxygen, *tango, *tango_testing.]),
1179 AC_ARG_WITH(helppack-integration,
1181 --without-helppack-integration It will not integrate the helppacks to the installer
1183 Please use this switch to use the online help or separate help packages.],
1187 AS_HELP_STRING([--without-fonts],
1188 [LibreOffice includes some third-party fonts to provide a reliable basis for
1189 help content, templates, samples, etc. When these fonts are already
1190 known to be available on the system then you should use this option.]),
1194 AS_HELP_STRING([--without-ppds],
1195 [Removes Postscript Printer definition files from LibreOffice
1196 installation set, for people building for specific distributions where
1197 PPDs are known to be already available (every recent distro with CUPS backend).]),
1201 AS_HELP_STRING([--without-afms],
1202 [Removes bitmap font files from LibreOffice installation set, for people
1203 building for specific distributions where AFM files or TrueType Fonts
1204 are known to be available.]),
1207 AC_ARG_WITH(agfa-monotype-fonts,
1208 AS_HELP_STRING([--with-agfa-monotype-fonts],
1209 [This switch should only be enabled for those who have the right
1210 to use or distribute the proprietary Agfa Monotype
1215 AS_HELP_STRING([--with-epm],
1216 [Decides which epm to use. Default is to use the one from the system if
1217 one is built. When either this is not there or you say =internal epm
1221 AC_ARG_WITH(package-format,
1222 AS_HELP_STRING([--with-package-format],
1223 [Specify package format(s) for LibreOffice installsets. Default is the
1224 "normal" one of the OS/Distribution. Possible values: aix, bsd, deb,
1225 inst, tardist, osx, pkg, rpm, setld, native, portable, archive, dmg,
1226 installed, msi. Example: --with-package-format="deb dmg"]),
1229 AC_ARG_WITH(system-libs,
1230 AS_HELP_STRING([--with-system-libs],
1231 [Use libraries already on system -- enables all --with-system-* flags except
1235 AC_ARG_WITH(system-headers,
1236 AS_HELP_STRING([--with-system-headers],
1237 [Use headers already on system -- enables all --with-system-* flags for
1238 external packages whose headers are the only entities used i.e.
1239 boost/vigra/odbc/sane-header(s).]),,
1240 [with_system_headers="$with_system_libs"])
1242 AC_ARG_WITH(system-jars,
1243 AS_HELP_STRING([--without-system-jars],
1244 [When building with --with-system-libs, also the needed jars are expected
1245 on the system. Use this to disable that]),,
1246 [with_system_jars="$with_system_libs"])
1248 AC_ARG_WITH(system-cairo,
1249 AS_HELP_STRING([--with-system-cairo],
1250 [Use Cairo libraries already on system.]),,
1251 [with_system_cairo="$with_system_libs"])
1253 AC_ARG_WITH(system-graphite,
1254 AS_HELP_STRING([--with-system-graphite],
1255 [Use graphite library already installed on system.]),,
1256 [with_system_graphite="$with_system_libs"])
1258 AC_ARG_WITH(system-nss,
1259 AS_HELP_STRING([--with-system-nss],
1260 [Use NSS/nspr libraries already on system.]),,
1261 [with_system_nss="$with_system_libs"])
1263 AC_ARG_WITH(mozilla-toolkit,
1264 AS_HELP_STRING([--with-mozilla-toolkit],
1265 [DEPRECATED : is ignored]),
1268 AC_ARG_WITH(myspell-dicts,
1269 AS_HELP_STRING([--without-myspell-dicts],
1270 [Removes myspell dictionaries from LibreOffice installation set, for
1271 people building for specific distributions where the myspell dictionaries
1272 are installed from other sources.]),
1275 AC_ARG_WITH(system-dicts,
1276 AS_HELP_STRING([--without-system-dicts],
1277 [Do not use dictionaries from system paths.]),
1280 AC_ARG_WITH(external-dict-dir,
1281 AS_HELP_STRING([--with-external-dict-dir],
1282 [Specify external dictionary dir.]),
1285 AC_ARG_WITH(external-hyph-dir,
1286 AS_HELP_STRING([--with-external-hyph-dir],
1287 [Specify external hyphenation pattern dir.]),
1290 AC_ARG_WITH(external-thes-dir,
1291 AS_HELP_STRING([--with-external-thes-dir],
1292 [Specify external thesaurus dir.]),
1295 AC_ARG_WITH(system-zlib,
1296 AS_HELP_STRING([--with-system-zlib],
1297 [Use zlib already on system.]),,
1298 [with_system_zlib=auto])
1300 AC_ARG_WITH(system-openssl,
1301 AS_HELP_STRING([--with-system-openssl],
1302 [Use OpenSSL already on system.]),,
1303 [with_system_openssl="$with_system_libs"])
1305 AC_ARG_WITH(system-jpeg,
1306 AS_HELP_STRING([--with-system-jpeg],
1307 [Use jpeg already on system.]),,
1308 [with_system_jpeg=auto])
1310 AC_ARG_WITH(system-clucene,
1311 AS_HELP_STRING([--with-system-clucene],
1312 [Use clucene already on system.]),,
1313 [with_system_clucene="$with_system_libs"])
1315 AC_ARG_WITH(system-expat,
1316 AS_HELP_STRING([--with-system-expat],
1317 [Use expat already on system.]),,
1318 [with_system_expat="$with_system_libs"])
1320 AC_ARG_WITH(system-libcmis,
1321 AS_HELP_STRING([--with-system-libcmis],
1322 [Use libcmis already on system.]),,
1323 [with_system_libcmis="$with_system_libs"])
1325 AC_ARG_WITH(system-lcms2,
1326 AS_HELP_STRING([--with-system-lcms2],
1327 [Use littlecms v2 already on system.]),,
1328 [with_system_lcms2="$with_system_libs"])
1330 AC_ARG_WITH(system-libcdr,
1331 AS_HELP_STRING([--with-system-libcdr],
1332 [Use libcdr already on system.]),,
1333 [with_system_libcdr="$with_system_libs"])
1335 AC_ARG_WITH(system-libmspub,
1336 AS_HELP_STRING([--with-system-libmspub],
1337 [Use libmspub already on system.]),,
1338 [with_system_libmspub="$with_system_libs"])
1340 AC_ARG_WITH(system-libvisio,
1341 AS_HELP_STRING([--with-system-libvisio],
1342 [Use libvisio already on system.]),,
1343 [with_system_libvisio="$with_system_libs"])
1345 AC_ARG_WITH(system-libwpd,
1346 AS_HELP_STRING([--with-system-libwpd],
1347 [Use libwpd already on system.]),,
1348 [with_system_libwpd="$with_system_libs"])
1350 AC_ARG_WITH(system-libwps,
1351 AS_HELP_STRING([--with-system-libwps],
1352 [Use libwps already on system.]),,
1353 [with_system_libwps="$with_system_libs"])
1355 AC_ARG_WITH(system-libwpg,
1356 AS_HELP_STRING([--with-system-libwpg],
1357 [Use libwpg already on system.]),,
1358 [with_system_libwpg="$with_system_libs"])
1360 AC_ARG_WITH(system-libxml,
1361 AS_HELP_STRING([--with-system-libxml],
1362 [Use libxml/libxslt already on system.]),,
1363 [with_system_libxml=auto])
1365 AC_ARG_WITH(system-icu,
1366 AS_HELP_STRING([--with-system-icu],
1367 [Use icu already on system.]),,
1368 [with_system_icu="$with_system_libs"])
1370 AC_ARG_WITH(system-ucpp,
1371 AS_HELP_STRING([--with-system-ucpp],
1372 [Use ucpp already on system.]),,
1375 AC_ARG_WITH(system-openldap,
1376 AS_HELP_STRING([--with-system-openldap],
1377 [Use the OpenLDAP LDAP SDK already on system.]),,
1378 [with_system_openldap="$with_system_libs"])
1380 AC_ARG_WITH(system-poppler,
1381 AS_HELP_STRING([--with-system-poppler],
1382 [Use system poppler (only needed for PDF import).]),,
1383 [with_system_poppler="$with_system_libs"])
1385 AC_ARG_WITH(system-apache-commons,
1386 AS_HELP_STRING([--with-system-apache-commons],
1387 [Use Apache commons libraries already on system.]),,
1388 [with_system_apache_commons="$with_system_jars"])
1390 AC_ARG_WITH(system-mysql,
1391 AS_HELP_STRING([--with-system-mysql],
1392 [Use MySQL libraries already on system, for building the MySQL Connector/LibreOffice
1393 extension. If the the mysql_config executable is not in PATH, use MYSQLCONFIG to
1395 [with_system_mysql="$with_system_libs"])
1397 AC_ARG_WITH(libmysql-path,
1398 AS_HELP_STRING([--with-libmysql-path],
1399 [Use Connector/C (libmysql) installation for building the MySQL
1400 Connector/LibreOffice extension.])
1402 Usage: --with-libmysql-path=<absolute path to
1403 your Connector/C installation>
1407 AC_ARG_WITH(system-mysql-cppconn,
1408 AS_HELP_STRING([--with-system-mysql-cppconn],
1409 [Use MySQL C++ Connector libraries already on system.]),,
1410 [with_system_mysql_cppconn="$with_system_libs"])
1412 AC_ARG_WITH(system-postgresql,
1413 AS_HELP_STRING([--with-system-postgresql],
1414 [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC
1415 driver. If pg_config is not in PATH, use PGCONFIG to point to it.]),,
1416 [with_system_postgresql="$with_system_libs"])
1418 AC_ARG_WITH(libpq-path,
1419 AS_HELP_STRING([--with-libpq-path],
1420 [Use this PostgreSQL C interface (libpq) installation for building
1421 the PostgreSQL-SDBC extension.])
1423 Usage: --with-libpq-path=<absolute path to
1424 your libq installation>
1428 AC_ARG_WITH(system-hsqldb,
1429 AS_HELP_STRING([--with-system-hsqldb],
1430 [Use hsqldb already on system.]))
1432 AC_ARG_WITH(hsqldb-jar,
1433 AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
1434 [Specify path to jarfile manually.]),
1435 HSQLDB_JAR=$withval)
1437 AC_ARG_ENABLE(scripting-beanshell,
1438 AS_HELP_STRING([--disable-scripting-beanshell],
1439 [Disable support for scripts in BeanShell.]),
1443 AC_ARG_WITH(system-beanshell,
1444 AS_HELP_STRING([--with-system-beanshell],
1445 [Use beanshell already on system.]),,
1446 [with_system_beanshell="$with_system_jars"])
1448 AC_ARG_WITH(beanshell-jar,
1449 AS_HELP_STRING([--with-beanshell-jar=JARFILE],
1450 [Specify path to jarfile manually.]),
1453 AC_ARG_ENABLE(scripting-javascript,
1454 AS_HELP_STRING([--disable-scripting-javascript],
1455 [Disable support for scripts in JavaScript.]),
1459 AC_ARG_WITH(system-rhino,
1460 AS_HELP_STRING([--with-system-rhino],
1461 [Use rhino already on system.]),,)
1462 # [with_system_rhino="$with_system_jars"])
1463 # Above is not used as we have different debug interface
1464 # patched into internal rhino. This code needs to be fixed
1465 # before we can enable it by default.
1467 AC_ARG_WITH(rhino-jar,
1468 AS_HELP_STRING([--with-rhino-jar=JARFILE],
1469 [Specify path to jarfile manually.]),
1472 AC_ARG_WITH(commons-codec-jar,
1473 AS_HELP_STRING([--with-commons-codec-jar=JARFILE],
1474 [Specify path to jarfile manually.]),
1475 COMMONS_CODEC_JAR=$withval)
1477 AC_ARG_WITH(commons-lang-jar,
1478 AS_HELP_STRING([--with-commons-lang-jar=JARFILE],
1479 [Specify path to jarfile manually.]),
1480 COMMONS_LANG_JAR=$withval)
1482 AC_ARG_WITH(commons-httpclient-jar,
1483 AS_HELP_STRING([--with-commons-httpclient-jar=JARFILE],
1484 [Specify path to jarfile manually.]),
1485 COMMONS_HTTPCLIENT_JAR=$withval)
1487 AC_ARG_WITH(commons-logging-jar,
1488 AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
1489 [Specify path to jarfile manually.]),
1490 COMMONS_LOGGING_JAR=$withval)
1492 AC_ARG_WITH(system-servlet-api,
1493 AS_HELP_STRING([--with-system-servlet-api],
1494 [Use servlet-api already on system.]),,
1495 [with_system_servlet_api="$with_system_jars"])
1497 AC_ARG_WITH(servlet-api-jar,
1498 AS_HELP_STRING([--with-servlet-api-jar=JARFILE],
1499 [Specify path to jarfile manually.]),
1500 SERVLETAPI_JAR=$withval)
1502 AC_ARG_WITH(system-jfreereport,
1503 AS_HELP_STRING([--with-system-jfreereport],
1504 [Use JFreeReport already on system.]),,
1505 [with_system_jfreereport="$with_system_jars"])
1507 AC_ARG_WITH(sac-jar,
1508 AS_HELP_STRING([--with-sac-jar=JARFILE],
1509 [Specify path to jarfile manually.]),
1512 AC_ARG_WITH(libxml-jar,
1513 AS_HELP_STRING([--with-libxml-jar=JARFILE],
1514 [Specify path to jarfile manually.]),
1515 LIBXML_JAR=$withval)
1517 AC_ARG_WITH(flute-jar,
1518 AS_HELP_STRING([--with-flute-jar=JARFILE],
1519 [Specify path to jarfile manually.]),
1522 AC_ARG_WITH(jfreereport-jar,
1523 AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
1524 [Specify path to jarfile manually.]),
1525 JFREEREPORT_JAR=$withval)
1527 AC_ARG_WITH(liblayout-jar,
1528 AS_HELP_STRING([--with-liblayout-jar=JARFILE],
1529 [Specify path to jarfile manually.]),
1530 LIBLAYOUT_JAR=$withval)
1532 AC_ARG_WITH(libloader-jar,
1533 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1534 [Specify path to jarfile manually.]),
1535 LIBLOADER_JAR=$withval)
1537 AC_ARG_WITH(libloader-jar,
1538 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1539 [Specify path to jarfile manually.]),
1540 LIBLOADER_JAR=$withval)
1542 AC_ARG_WITH(libformula-jar,
1543 AS_HELP_STRING([--with-libformula-jar=JARFILE],
1544 [Specify path to jarfile manually.]),
1545 LIBFORMULA_JAR=$withval)
1547 AC_ARG_WITH(librepository-jar,
1548 AS_HELP_STRING([--with-librepository-jar=JARFILE],
1549 [Specify path to jarfile manually.]),
1550 LIBREPOSITORY_JAR=$withval)
1552 AC_ARG_WITH(libfonts-jar,
1553 AS_HELP_STRING([--with-libfonts-jar=JARFILE],
1554 [Specify path to jarfile manually.]),
1555 LIBFONTS_JAR=$withval)
1557 AC_ARG_WITH(libserializer-jar,
1558 AS_HELP_STRING([--with-libserializer-jar=JARFILE],
1559 [Specify path to jarfile manually.]),
1560 LIBSERIALIZER_JAR=$withval)
1562 AC_ARG_WITH(libbase-jar,
1563 AS_HELP_STRING([--with-libbase-jar=JARFILE],
1564 [Specify path to jarfile manually.]),
1565 LIBBASE_JAR=$withval)
1567 AC_ARG_WITH(system-odbc,
1568 AS_HELP_STRING([--with-system-odbc],
1569 [Use the odbc headers already on system.]),,
1570 [with_system_odbc="$with_system_headers"])
1572 AC_ARG_WITH(system-sane,
1573 AS_HELP_STRING([--with-system-sane],
1574 [Use sane.h already on system.]),,
1575 [with_system_sane="$with_system_headers"])
1577 AC_ARG_WITH(system-bluez,
1578 AS_HELP_STRING([--with-system-bluez],
1579 [Use bluetooth.h already on system.]),,
1580 [with_system_bluez="$with_system_headers"])
1582 AC_ARG_WITH(system-xextensions-headers,
1583 AS_HELP_STRING([--with-system-xextensions-headers],
1584 [To build without system X11 extensions headers, use
1585 --without-system-xextensions-headers. This is possibly
1586 useful on legacy unix systems which ship with the libs
1587 but without the headers.]))
1589 AC_ARG_WITH(system-mesa-headers,
1590 AS_HELP_STRING([--with-system-mesa-headers],
1591 [Use Mesa headers already on system.]),,
1592 [with_system_mesa_headers="$with_system_headers"])
1594 AC_ARG_WITH(system-curl,
1595 AS_HELP_STRING([--with-system-curl],
1596 [Use curl already on system.]),,
1597 [with_system_curl=auto])
1599 AC_ARG_WITH(system-boost,
1600 AS_HELP_STRING([--with-system-boost],
1601 [Use boost already on system.]),,
1602 [with_system_boost="$with_system_headers"])
1604 AC_ARG_WITH(system-mdds,
1605 AS_HELP_STRING([--with-system-mdds],
1606 [Use mdds already on system.]),,
1607 [with_system_mdds="$with_system_headers"])
1609 AC_ARG_WITH(system-vigra,
1610 AS_HELP_STRING([--with-system-vigra],
1611 [Use vigra already on system.]),,
1612 [with_system_vigra="$with_system_headers"])
1614 AC_ARG_WITH(system-neon,
1615 AS_HELP_STRING([--with-system-neon],
1616 [Use neon already on system.]),,
1617 [with_system_neon="$with_system_libs"])
1619 AC_ARG_WITH(system-hunspell,
1620 AS_HELP_STRING([--with-system-hunspell],
1621 [Use libhunspell already on system.]),,
1622 [with_system_hunspell="$with_system_libs"])
1624 AC_ARG_WITH(system-mythes,
1625 AS_HELP_STRING([--with-system-mythes],
1626 [Use mythes already on system.]),,
1627 [with_system_mythes="$with_system_libs"])
1629 AC_ARG_WITH(system-altlinuxhyph,
1630 AS_HELP_STRING([--with-system-altlinuxhyph],
1631 [Use ALTLinuxhyph already on system.]),,
1632 [with_system_altlinuxhyph="$with_system_libs"])
1634 AC_ARG_WITH(system-lpsolve,
1635 AS_HELP_STRING([--with-system-lpsolve],
1636 [Use lpsolve already on system.]),,
1637 [with_system_lpsolve="$with_system_libs"])
1639 AC_ARG_WITH(system-libexttextcat,
1640 AS_HELP_STRING([--with-system-libexttextcat],
1641 [Use libexttextcat already on system.]),,
1642 [with_system_libexttextcat="$with_system_libs"])
1644 AC_ARG_WITH(system-cppunit,
1645 AS_HELP_STRING([--with-system-cppunit],
1646 [Use cppunit already on system.]),,
1647 [with_system_cppunit="$with_system_libs"])
1649 AC_ARG_WITH(system-redland,
1650 AS_HELP_STRING([--with-system-redland],
1651 [Use redland library already on system.]),,
1652 [with_system_redland="$with_system_libs"])
1654 AC_ARG_WITH(system-orcus,
1655 AS_HELP_STRING([--with-system-orcus],
1656 [Use orcus library already on system.]),,
1657 [with_system_orcus="$with_system_libs"])
1659 AC_ARG_WITH(system-liblangtag,
1660 AS_HELP_STRING([--with-system-liblangtag],
1661 [Use liblangtag library already on system.]),,
1662 [with_system_liblangtag="$with_system_libs"])
1664 AC_ARG_WITH(system-mozilla,
1665 AS_HELP_STRING([--with-system-mozilla],
1666 [DEPRECATED : is ignored]),,
1669 AC_ARG_WITH(system-npapi-headers,
1670 AS_HELP_STRING([--with-system-npapi-headers],
1671 [Use NPAPI headers provided by system instead of bundled ones. Used in
1672 extensions/source/nsplugin (ENABLE_NPAPI_INTO_BROWSER=YES) and
1673 extensions/source/plugin (ENABLE_NPAPI_FROM_BROWSER=YES)]),,
1674 [with_system_npapi_headers="$with_system_headers"]
1677 AC_ARG_WITH(system-libpng,
1678 AS_HELP_STRING([--with-system-libpng],
1679 [Use libpng already on system.]),,
1680 [with_system_libpng=auto])
1682 AC_ARG_WITH(linker-hash-style,
1683 AS_HELP_STRING([--with-linker-hash-style],
1684 [Use linker with --hash-style=<style> when linking shared objects.
1685 Possible values: "sysv", "gnu", "both". The default value is "gnu"
1686 if supported on the build system, and "sysv" otherwise.]))
1688 AC_ARG_WITH(jdk-home,
1689 AS_HELP_STRING([--with-jdk-home],
1690 [If you have installed JDK 1.3 or later on your system please supply the
1691 path here. Note that this is not the location of the java command but the
1692 location of the entire distribution.])
1694 Usage: --with-jdk-home=<absolute path to JDK home>
1699 AS_HELP_STRING([--without-help],
1700 [Disable the build of help.]))
1703 AS_HELP_STRING([--with-java],
1704 [Specify the name of the Java interpreter command. Typically "java"
1705 which is the default.
1707 To build without support for Java components, applets, accessibility
1708 or the XML filters written in Java, use --without-java or --with-java=no.])
1710 Usage: --with-java==<java command>
1713 [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
1717 AC_ARG_WITH(jvm-path,
1718 AS_HELP_STRING([--with-jvm-path],
1719 [Use a specific JVM search path at runtime.])
1721 Usage: --with-jvm-path=<absolute path to parent of jvm home>
1723 e. g.: --with-jvm-path=/usr/lib/
1724 to find JRE/JDK in /usr/lib/jvm/
1728 AC_ARG_WITH(ant-home,
1729 AS_HELP_STRING([--with-ant-home],
1730 [If you have installed Jakarta Ant on your system, please supply the path here.
1731 Note that this is not the location of the Ant binary but the location
1732 of the entire distribution.])
1734 Usage: --with-ant-home=<absolute path to Ant home>
1739 AS_HELP_STRING([--with-junit],
1740 [Specifies the JUnit 4 jar file to use for JUnit-based tests.
1741 --without-junit disables those tests. Not relevant in the --without-java case.])
1743 Usage: --with-junit=<absolute path to JUnit 4 jar>
1747 AC_ARG_WITH(perl-home,
1748 AS_HELP_STRING([--with-perl-home],
1749 [If you have installed Perl 5 Distribution, on your system, please
1750 supply the path here. Note that this is not the location of the Perl
1751 binary but the location of the entire distribution.])
1753 Usage: --with-perl-home=<abs. path to Perl 5 home>
1761 [Specifies the doxygen executable to use when generating ODK C/C++
1762 documentation. --without-doxygen disables generation of ODK C/C++
1763 documentation. Not relevant in the --disable-odk case.])
1765 Usage: --with-doxygen=<absolute path to doxygen executable>
1769 AC_ARG_WITH(cl-home,
1770 AS_HELP_STRING([--with-cl-home],
1771 [For Windows NT users, please supply the path for the Microsoft C/C++
1772 compiler. Note that this is not the location of the compiler binary but
1773 the location of the entire distribution.])
1775 Usage: --with-cl-home=<absolute path to Microsoft
1776 C/C++ compiler home>
1780 AC_ARG_WITH(mspdb-path,
1781 AS_HELP_STRING([--with-mspdb-path],
1782 [For Microsoft C/C++ compiler users, please supply the path pointing to
1783 the mspdb80.dll (if using Visual Studio 2008) or mspdb100.dll (if using
1784 Visual Studio 2010).])
1786 Usage: --with-mspdb-path=<path to
1787 mspdb80.dll/mspdb100.dll>
1791 AC_ARG_WITH(midl-path,
1792 AS_HELP_STRING([--with-midl-path],
1793 [For Microsoft compiler users, please supply the path pointing to the midl.exe.])
1795 Usage: --with-midl-path=<abs. path to midl.exe>
1799 AC_ARG_WITH(csc-path,
1800 AS_HELP_STRING([--with-csc-path],
1801 [For Windows builds, please supply the path pointing to the csc.exe.
1802 Usually found automatically when building on Windows.])
1804 Usage: --with-csc-path=<abs. path to csc.exe>
1808 AC_ARG_WITH(dotnet-framework-home,
1809 AS_HELP_STRING([--with-dotnet-framework-home],
1810 [For Microsoft compiler users, please supply the path pointing to
1811 lib/mscoree.lib, usually something like:
1812 "/cygdrive/c/Program Files/Windows SDKs/Windows/v7.0"])
1814 Note that in most cases it will be automatically
1817 Usage: --with-dotnet-framework-home=<absolute path to .NET
1822 AC_ARG_WITH(windows-sdk-home,
1823 AS_HELP_STRING([--with-windows-sdk-home],
1824 [For Windows builds, please supply the path to the Windows SDK.
1825 Usually found automatically when building on Windows.])
1827 Usage: --with-windows-sdk-home=<absolute path to Windows SDK>
1831 AC_ARG_WITH(directx-home,
1832 AS_HELP_STRING([--with-directx-home],
1833 [For Windows users, please supply the path to the Microsoft DirectX SDK.])
1835 Usage: --with-directx-home=<absolute path to
1836 Microsoft DirectX SDK>
1840 AC_ARG_WITH(nss-build-tools,
1841 AS_HELP_STRING([--with-nss-build-tools],
1842 [For Windows users, please supply the path to the nss build tools.])
1844 Usage: --with-nss-build-tools=<absolute path to
1847 At the moment of this writing, an installer for the
1848 mozilla build tools can be obtained from http://ftp.
1849 mozilla.org/pub/mozilla.org/mozilla/libraries/win32.
1851 NSSBUILDTOOLS=$withval ,
1855 AS_HELP_STRING([--with-lang],
1856 [Use this option to build LibreOffice with additional language support.
1857 English (US) is always included by default.
1858 Separate multiple languages with space.
1859 For all languages, use --with-lang=ALL.])
1861 Usage: --with-lang="es sw tu cs sk"
1865 # Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
1867 AS_HELP_STRING([--with-krb5],
1868 [Enable MIT Kerberos 5 support in modules that support it.
1869 By default automatically enabled on platforms
1870 where a good system Kerberos 5 is available.]),
1874 AS_HELP_STRING([--with-gssapi],
1875 [Enable GSSAPI support in modules that support it.
1876 By default automatically enabled on platforms
1877 where a good system GSSAPI is available.]),
1880 dnl ===================================================================
1882 dnl ===================================================================
1884 AC_ARG_WITH(branding,
1885 [ --with-branding Use given path to retrieve all branding images.
1886 Expects /path/intro.png ...
1887 /path/backing_rtl_right.png to be there. Individual
1888 images can be overridden via --with-intro-bitmap ...
1889 --with-startcenter-rtl-left-bitmap switches.
1891 Usage: --with-branding=/path/to/images
1894 AC_ARG_WITH(intro-bitmap,
1895 [ --with-intro-bitmap Prefer the specified intro bitmap over the
1898 Usage: --with-intro-bitmap=/path/my_ooo_intro.png
1901 AC_ARG_WITH(intro-progressbar-color,
1902 [ --with-intro-progressbar-color Set color of progress bar on intro screen.
1903 Comma separated RGB values in decimal format.
1905 Usage: --with-intro-progressbar-color=126,170,23
1908 AC_ARG_WITH(intro-progressbar-size,
1909 [ --with-intro-progressbar-size Set size of progress bar on intro screen.
1910 Comma separated values in decimal format.
1912 Usage: --with-intro-progressbar-size=319,10
1915 AC_ARG_WITH(intro-progressbar-position,
1916 [ --with-intro-progressbar-position Set position of progress bar on intro screen.
1917 Comma separated values in decimal format.
1919 Usage: --with-intro-progressbar-position=164,225
1922 AC_ARG_WITH(intro-progressbar-frame-color,
1923 [ --with-intro-progressbar-frame-color Set color of progress bar frame on intro screen.
1924 Comma separated RGB values in decimal format.
1926 Usage: --with-intro-progressbar-frame-color=207,208,211
1929 AC_ARG_WITH(intro-progressbar-text-color,
1930 AS_HELP_STRING([--with-intro-progressbar-text-color],
1931 [Set color of progress bar text on intro screen. Comma separated RGB values in decimal format.])
1933 Usage: --with-intro-progressbar-text-color=207,208,211
1936 AC_ARG_WITH(intro-progressbar-text-baseline,
1937 AS_HELP_STRING([--with-intro-progressbar-text-baseline],
1938 [Set vertical position of progress bar text on intro screen. Value in decimal format.])
1940 Usage: --with-intro-progressbar-text-baseline=250
1943 AC_ARG_WITH(flat-logo-svg,
1944 [ --with-flat-logo-svg Allows specification of the flat Logo SVG.
1946 Usage: --with-flat-logo-svg=/path/my_flat_logo.svg
1949 AC_ARG_WITH(about-background-svg,
1950 [ --with-about-background-svg Allows specification of the background SVG for the About dialog.
1952 Usage: --with-about-background-svg=/path/my_libo_about.svg
1955 AC_ARG_WITH(startcenter-left-bitmap,
1956 [ --with-startcenter-left-bitmap Similarly to --with-intro-bitmap, this allows
1957 specification of bitmap for the Start center.
1959 Usage: --with-startcenter-left-bitmap=/path/my_backing_left.png
1962 AC_ARG_WITH(startcenter-right-bitmap,
1963 [ --with-startcenter-right-bitmap Similarly to --with-intro-bitmap, this allows
1964 specification of bitmap for the Start center.
1966 Usage: --with-startcenter-right-bitmap=/path/my_backing_right.png
1969 AC_ARG_WITH(startcenter-rtl-left-bitmap,
1970 [ --with-startcenter-rtl-left-bitmap Similarly to --with-intro-bitmap, this allows
1971 specification of bitmap for the Start center.
1973 Usage: --with-startcenter-rtl-left-bitmap=/path/my_backing_rtl_left.png
1976 AC_ARG_WITH(startcenter-rtl-right-bitmap,
1977 [ --with-startcenter-rtl-right-bitmap Similarly to --with-intro-bitmap, this allows
1978 specification of bitmap for the Start center.
1980 Usage: --with-startcenter-rtl-right-bitmap=/path/my_backing_rtl_right.png
1983 AC_ARG_WITH(startcenter-space-bitmap,
1984 [ --with-startcenter-space-bitmap Similarly to --with-intro-bitmap, this allows
1985 specification of bitmap for the Start center.
1987 Usage: --with-startcenter-space-bitmap=/path/my_backing_space.png
1990 AC_ARG_WITH(extra-buildid,
1991 AS_HELP_STRING([--with-extra-buildid],
1992 [Show addition build identification in about dialog.])
1994 Usage: --with-extra-buildid="Tinderbox: Win-x86@6, Branch:master, Date:2012-11-26_00.29.34"
2000 AS_HELP_STRING([--with-vendor],
2001 [Set vendor of the build.])
2003 Usage: --with-vendor="John the Builder"
2007 AC_ARG_WITH(unix-wrapper,
2008 AS_HELP_STRING([--with-unix-wrapper],
2009 [Redefines the name of the UNIX wrapper that will be used in the desktop
2010 files and in the desktop-integration RPMs.])
2012 Usage: --with-unix-wrapper=ooffice
2016 AC_ARG_WITH(compat-oowrappers,
2017 AS_HELP_STRING([--with-compat-oowrappers],
2018 [Install oo* wrappers in parallel with
2019 lo* ones to keep backward compatibility.
2020 Has effect only with make distro-pack-install]),
2023 AC_ARG_WITH(asm-home,
2024 AS_HELP_STRING([--with-asm-home],
2025 [For Windows, please supply the path for the ml.exe or ml64.exe assembler.])
2027 Usage: --with-asm-home=<path to assembler directory>
2031 AC_ARG_WITH(os-version,
2032 AS_HELP_STRING([--with-os-version],
2033 [For FreeBSD users, use this option option to override the detected OSVERSION.])
2035 Usage: --with-os-version=<OSVERSION>
2039 AC_ARG_WITH(mingw-cross-compiler,
2040 AS_HELP_STRING([--with-mingw-cross-compiler],
2041 [Specify the MinGW cross-compiler to use.])
2043 Usage: --with-mingw-cross-compiler=<mingw32-g++ command>
2045 When building on the ODK on Unix and building unowinreg.dll,
2046 specify the MinGW C++ cross-compiler.
2050 AC_ARG_WITH(idlc-cpp,
2051 AS_HELP_STRING([--with-idlc-cpp],
2052 [Specify the C Preprocessor to use for idlc.])
2054 Usage: --with-idlc-cpp=cpp
2060 AC_ARG_WITH(build-version,
2061 AS_HELP_STRING([--with-build-version],
2062 [Allows the builder to add a custom version tag that will appear in the
2063 Help/About box for QA purposes.])
2065 Usage: --with-build-version="Built by Jim"
2067 with_build_version=$withval ,
2071 AS_HELP_STRING([--with-alloc],
2072 [Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
2073 Note that on FreeBSD/NetBSD system==jemalloc]),
2076 AC_ARG_WITH(sun-templates,
2077 AS_HELP_STRING([--with-sun-templates],
2078 [Integrate Sun template packages.]),
2081 AC_ARG_WITH(parallelism,
2082 AS_HELP_STRING([--with-parallelism],
2083 [Number of jobs to run simultaneously during build. Parallel builds can save a lot
2084 of time on multi-cpu machines. The real number of jobs can get up to parallelism*parallelism
2085 for a while in the first build phase. That will not happen when dmake is removed.
2086 Defaults to the number of CPUs on the machine, unless you configure --enable-icecream - then to 10.]),
2089 AC_ARG_WITH(check-jobs,
2090 AS_HELP_STRING([--with-check-jobs],
2091 [Maximum number of jobs that will be issued at the same time during 'make subsequenttest'.
2092 Default value is the same as 'parallelism'. Useful because the subsequent tests are very lightweight.]),
2095 AC_ARG_WITH(all-tarballs,
2096 AS_HELP_STRING([--with-all-tarballs],
2097 [Download all external tarballs unconditionally]))
2099 dnl ===================================================================
2100 dnl Test whether build target is Release Build
2101 dnl ===================================================================
2102 AC_MSG_CHECKING([whether build target is Release Build])
2103 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
2105 ENABLE_RELEASE_BUILD="FALSE"
2107 AC_MSG_RESULT([yes])
2108 ENABLE_RELEASE_BUILD="TRUE"
2110 AC_SUBST(ENABLE_RELEASE_BUILD)
2112 dnl ===================================================================
2113 dnl Test whether to sign Windows Build
2114 dnl ===================================================================
2115 AC_MSG_CHECKING([whether to sign windows build])
2116 if test "$enable_windows_build_signing" = "yes" -a "$_os" = "WINNT" -a "$WITH_MINGW" != "YES" ; then
2117 AC_MSG_RESULT([yes])
2118 WINDOWS_BUILD_SIGNING="TRUE"
2121 WINDOWS_BUILD_SIGNING="FALSE"
2123 AC_SUBST(WINDOWS_BUILD_SIGNING)
2125 dnl ===================================================================
2126 dnl MacOSX build and runtime environment options
2127 dnl ===================================================================
2129 AC_ARG_WITH(macosx-sdk,
2130 AS_HELP_STRING([--with-macosx-sdk],
2131 [Use a specific SDK for building.])
2133 Usage: --with-macosx-sdk=<version>
2135 e. g.: --with-macosx-sdk=10.4
2137 there are 3 options to control the MacOSX build:
2138 --with-macosx-sdk (refered as 'sdk' below)
2139 --with-macosx-version-min-required (refered as 'min' below)
2140 --with-macosx-version-max-allowed (refered as 'max' below)
2142 the connection between these value and the default they take is as follow:
2143 ( ? means not specified on the command line, s means the SDK version found,
2144 constraint: x <= y <= z)
2146 ==========================================
2147 command line || config result
2148 ==========================================
2149 min | max | sdk || min | max | sdk |
2150 ? | ? | ? || 10.4 | 10.s | 10.s |
2151 ? | ? | 10.x || 10.4 | 10.x | 10.x |
2152 ? | 10.x | ? || 10.4 | 10.s | 10.s |
2153 ? | 10.x | 10.y || 10.4 | 10.x | 10.y |
2154 10.x | ? | ? || 10.x | 10.s | 10.s |
2155 10.x | ? | 10.y || 10.x | 10.y | 10.y |
2156 10.x | 10.y | ? || 10.x | 10.y | 10.y |
2157 10.x | 10.y | 10.z || 10.x | 10.y | 10.z |
2160 see: http://developer.apple.com/library/mac/#technotes/tn2064/_index.html
2161 for a detailled technical explanation of these variables
2163 Note: MACOSX_DEPLOYMENT_TARGET will be set to the value of 'min'.
2165 Note that even if in theory using a --with-macosx-version-max-allowed
2166 (i.e. the MAC_OS_X_VERSION_MAX_ALLOWED macro) less than the SDK version
2167 should work, in practice Apple doesn't seem to test that, and at least
2168 compiling with -DMAC_OS_X_VERSION_MAX_ALLOWED=1060 against the 10.7 SDK
2169 fails in a couple of places. Just because of oversights in ifdefs in the SDK
2174 AC_ARG_WITH(macosx-version-min-required,
2175 AS_HELP_STRING([--with-macosx-version-min-required],
2176 [set the minimum OS version needed to run the built LibreOffice])
2178 Usage: --with-macosx-version-min-required=<version>
2180 e. g.: --with-macos-version-min-required=10.4
2181 see --with-macosx-sdk for more info
2185 AC_ARG_WITH(macosx-version-max-allowed,
2186 AS_HELP_STRING([--with-macosx-version-max-allowed],
2187 [set the maximum allowed OS version the LibreOffice compilation can use APIs from])
2189 Usage: --with-macosx-version-max-allowed=<version>
2191 e. g.: --with-macos-version-max-allowed=10.6
2192 see --with-macosx-sdk for more info
2197 dnl ===================================================================
2198 dnl options for stuff used during cross-compilation build
2199 dnl These are superseded by --with-build-platform-configure-options
2200 dnl ===================================================================
2202 AC_ARG_WITH(system-boost-for-build,
2203 AS_HELP_STRING([--with-system-boost-for-build],
2204 [Use boost already on system for build tools (cross-compilation only).]))
2206 AC_ARG_WITH(system-cppunit-for-build,
2207 AS_HELP_STRING([--with-system-cppunit-for-build],
2208 [Use cppunit already on system for build tools (cross-compilation only).]))
2210 AC_ARG_WITH(system-expat-for-build,
2211 AS_HELP_STRING([--with-system-expat-for-build],
2212 [Use expat already on system for build tools (cross-compilation only).]))
2214 AC_ARG_WITH(system-icu-for-build,
2215 AS_HELP_STRING([--with-system-icu-for-build=yes/no/force],
2216 [Use icu already on system for build tools (cross-compilation only).]))
2218 AC_ARG_WITH(system-libxml-for-build,
2219 AS_HELP_STRING([--with-system-libxml-for-build],
2220 [Use libxml/libxslt already on system for build tools (cross-compilation only).]))
2223 dnl ===================================================================
2224 dnl check for required programs (grep, awk, sed, bash)
2225 dnl ===================================================================
2229 if test -n "$1"; then
2230 if test "$build_os" = "cygwin"; then
2232 new_path=`cygpath -u "$formatted_path"`
2236 if ! echo "$LO_PATH" | $EGREP -q "(^|:)$1($|:)"; then
2237 if test "$2" = "after"; then
2238 LO_PATH="$LO_PATH:$new_path"
2240 LO_PATH="$new_path:$LO_PATH"
2248 AC_PATH_PROG( AWK, $AWK)
2249 if test -z "$AWK"; then
2250 AC_MSG_ERROR([install awk to run this script])
2253 AC_PATH_PROG(BASH, bash)
2254 if test -z "$BASH"; then
2255 AC_MSG_ERROR([bash not found in \$PATH])
2259 AC_MSG_CHECKING([for GNU or BSD tar])
2260 for a in $GNUTAR gtar gnutar tar /usr/sfw/bin/gtar; do
2261 $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
2262 if test $? -eq 0; then
2267 AC_MSG_RESULT($GNUTAR)
2268 if test -z "$GNUTAR"; then
2269 AC_MSG_ERROR([not found. install GNU or BSD tar.])
2273 AC_MSG_CHECKING([for tar's option to strip components])
2274 $GNUTAR --help 2> /dev/null | egrep "bsdtar|strip-components" 2>&1 >/dev/null
2275 if test $? -eq 0; then
2276 STRIP_COMPONENTS="--strip-components"
2278 $GNUTAR --help 2> /dev/null | egrep "strip-path" 2>&1 >/dev/null
2279 if test $? -eq 0; then
2280 STRIP_COMPONENTS="--strip-path"
2282 STRIP_COMPONENTS="unsupported"
2285 AC_MSG_RESULT($STRIP_COMPONENTS)
2286 if test x$STRIP_COMPONENTS == xunsupported; then
2287 AC_MSG_ERROR([you need a tar that is able to strip components.])
2289 AC_SUBST(STRIP_COMPONENTS)
2291 dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
2292 dnl desktop OSes from "mobile" ones.
2294 dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
2295 dnl In other words, that when building for an OS that is not a
2296 dnl "desktop" one but a "mobile" one, we are always cross-compiling.
2298 dnl Note the direction of the implication; there is no assumption that
2299 dnl cross-compiling would imply a non-desktop OS.
2301 if test $_os != iOS -a $_os != Android; then
2302 BUILD_TYPE="$BUILD_TYPE DESKTOP"
2305 # Currently we build only viewer apps for Android (and for iOS not even that yet), so to avoid getting
2306 # some pathological export-related code and data linked in, we will add some judicious #ifndef
2307 # DISABLE_EXPORT in the code in places where the linker map shows it has a big impact. Places that
2308 # generate large amounts of code or data related to export only but still gets linked in. At least
2309 # that is the theory, let's see...
2311 if test -z "$enable_export"; then
2312 if test $_os != Android -a $_os != iOS; then
2318 if test "$enable_export" = yes; then
2319 BUILD_TYPE="$BUILD_TYPE EXPORT"
2321 DISABLE_EXPORT='TRUE'
2322 SCPDEFS="$SCPDES -DDISABLE_EXPORT"
2324 AC_SUBST(DISABLE_EXPORT)
2326 dnl Decide whether to build database connectivity stuff (including
2327 dnl Base) or not. We probably don't want to on non-desktop OSes.
2329 if test -z "$enable_database_connectivity"; then
2330 # Do enable database connectivity for Android for now as otherwise
2331 # we presumably will get linking errors... We are not as far in
2332 # the work for iOS, so we might as well disable it for iOS already.
2334 # And actually, do enable it for iOS, too. Let's get back to
2335 # figuring out what to do with this later, if ever.
2337 # (Note that with "enable", I mean "enable building the related
2338 # code". Very likely little of it will make any sense at run-time
2339 # on Android or iOS and won't even be shipped with/linked into any
2342 #if test $_os != iOS; then
2343 enable_database_connectivity=yes
2347 DISABLE_DBCONNECTIVITY=''
2348 if test "$enable_database_connectivity" = yes; then
2349 BUILD_TYPE="$BUILD_TYPE DBCONNECTIVITY"
2351 DISABLE_DBCONNECTIVITY='TRUE'
2352 SCPDEFS="$SCPDEFS -DDISABLE_DBCONNECTIVITY"
2354 AC_SUBST(DISABLE_DBCONNECTIVITY)
2356 if test -z "$enable_extensions"; then
2357 # For iOS disable extensions unless specifically overridden with
2358 # --enable-extensions.
2359 if test $_os != iOS; then
2360 enable_extensions=yes
2364 DISABLE_EXTENSIONS=''
2365 if test "$enable_extensions" = yes; then
2366 BUILD_TYPE="$BUILD_TYPE EXTENSIONS"
2368 DISABLE_EXTENSIONS='TRUE'
2370 AC_SUBST(DISABLE_EXTENSIONS)
2372 if test -z "$enable_scripting"; then
2373 # Disable scripting for iOS unless specifically overridden
2374 # with --enable-scripting.
2375 if test $_os != iOS; then
2376 enable_scripting=yes
2380 DISABLE_SCRIPTING=''
2381 if test "$enable_scripting" = yes; then
2382 BUILD_TYPE="$BUILD_TYPE SCRIPTING"
2384 DISABLE_SCRIPTING='TRUE'
2385 SCPDEFS="$SCPDEFS -DDISABLE_SCRIPTING"
2387 AC_SUBST(DISABLE_SCRIPTING)
2389 if test $_os = iOS -o $_os = Android; then
2390 # Disable dynamic_loading always for iOS and Android
2391 enable_dynamic_loading=no
2392 elif test -z "$enable_dynamic_loading"; then
2393 # Otherwise enable it unless speficically disabled
2394 enable_dynamic_loading=yes
2397 DISABLE_DYNLOADING=''
2398 if test "$enable_dynamic_loading" = yes; then
2399 BUILD_TYPE="$BUILD_TYPE DYNLOADING"
2401 DISABLE_DYNLOADING='TRUE'
2402 SCPDEFS="$SCPDEFS -DDISABLE_DYNLOADING"
2404 AC_SUBST(DISABLE_DYNLOADING)
2406 if test -n "${with_solver_and_workdir_root}"; then
2407 if ! test -d ${with_solver_and_workdir_root}; then
2408 AC_MSG_ERROR([directory does not exist: ${with_solver_and_workdir_root}])
2410 PathFormat "${with_solver_and_workdir_root}"
2411 # IsValidFilePath in /sal/osl/w32/file_url.cxx rejects "X:\\" breaking idlc
2412 if echo ${formatted_path} | $GREP -q '/$'; then
2413 SOLARVER=${formatted_path}solver
2415 SOLARVER=${formatted_path}/solver
2418 SOLARVER=${SRC_ROOT}/solver
2421 dnl ===================================================================
2422 dnl Extra check for Windows. Cygwin builds need gcc to build dmake
2423 dnl although MSVC is used to build other build-time tools and
2424 dnl LibreOffice itself.
2425 dnl ===================================================================
2426 if test "$build_os" = "cygwin"; then
2427 AC_MSG_CHECKING([for Cygwin gcc/g++])
2428 if which gcc > /dev/null && which g++ > /dev/null; then
2429 AC_MSG_RESULT([found])
2431 AC_MSG_ERROR([Cygwin gcc and g++ are needed, please install them.])
2435 # remenber SYSBASE value
2438 dnl ===================================================================
2439 dnl Checks if ccache is available
2440 dnl ===================================================================
2441 if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
2442 case "%$CC%$CXX%" in
2443 # If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc),
2444 # assume that's good then
2445 *%ccache[[-_' ']]*|*/ccache[[-_' ']]*)
2446 AC_MSG_NOTICE([ccache seems to be included in a pre-defined CC and/or CXX])
2449 AC_PATH_PROG([CCACHE],[ccache],[not found])
2450 if test "$CCACHE" = "not found"; then
2453 # Need to check for ccache version: otherwise prevents
2454 # caching of the results (like "-x objective-c++" for Mac)
2455 if test $_os = Darwin -o $_os = iOS; then
2456 # Check ccache version
2457 AC_MSG_CHECKING([whether version of ccache is suitable])
2458 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2459 CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2460 if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
2461 AC_MSG_RESULT([yes, $CCACHE_VERSION])
2463 AC_MSG_RESULT([no, $CCACHE_VERSION])
2474 if test "$CCACHE" != ""; then
2475 ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
2476 ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
2477 if test "$ccache_size" = ""; then
2478 ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
2479 if test "$ccache_size" = ""; then
2482 # we could not determine the size or it was less than 1GB -> disable auto-ccache
2483 if test $ccache_size -lt 1024; then
2485 AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-producive: Disabling auto-ccache detection])
2486 add_warning "ccache's cache size is less than 1GB using it is counter-producive: auto-ccache detection disabled"
2488 # warn that ccache may be too small for debug build
2489 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build])
2490 add_warning "ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build"
2493 if test $ccache_size -lt 5; then
2494 #warn that ccache may be too small for debug build
2495 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build])
2496 add_warning "ccache's cache size is less than 5GB using it may be counter-producive for debug or symbol-enabled build"
2501 dnl ===================================================================
2502 dnl Checks for C compiler,
2503 dnl The check for the C++ compiler is later on.
2504 dnl ===================================================================
2506 AC_MSG_CHECKING([gcc home])
2507 if test -z "$with_gcc_home"; then
2508 if test "$enable_icecream" = "yes"; then
2509 if test -d "/usr/lib/icecc/bin"; then
2510 GCC_HOME="/usr/lib/icecc/"
2512 GCC_HOME="/opt/icecream/"
2515 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
2516 GCC_HOME_SET="false"
2519 GCC_HOME="$with_gcc_home"
2521 AC_MSG_RESULT($GCC_HOME)
2524 if test "$GCC_HOME_SET" = "true"; then
2525 if test -z "$CC"; then
2526 CC="$GCC_HOME/bin/gcc"
2528 if test -z "$CXX"; then
2529 CXX="$GCC_HOME/bin/g++"
2533 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
2534 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
2535 # AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that
2541 COMPATH=`dirname "$CC"`
2542 if test "$COMPATH" = "."; then
2543 AC_PATH_PROGS(COMPATH, $CC)
2544 dnl double square bracket to get single because of M4 quote...
2545 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`
2547 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`
2549 dnl ===================================================================
2550 dnl Test the Solaris compiler version
2551 dnl ===================================================================
2552 if test "$_os" = "SunOS"; then
2553 if test "$CC" = "cc"; then
2554 AC_PATH_PROGS(_cc, cc)
2555 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
2556 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
2557 dnl cc -V outputs to standard error!!!!
2558 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'`
2559 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
2560 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
2561 if test "$_sunstudio_major" != "5"; then
2562 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2564 _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" }'`
2565 if test "$_sunstudio_minor" = "false"; then
2566 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2568 dnl compiler will do
2569 AC_MSG_RESULT([checked])
2576 dnl ===================================================================
2577 dnl Check / find MacOSX SDK and compiler, version checks
2578 dnl ===================================================================
2579 if test "$_os" = "Darwin"; then
2581 if test "$build_cpu" = i386 -a "$host_cpu" = powerpc; then
2582 # Cross-compiling for PPC from Intel
2584 elif test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
2591 # If no --with-macosx-sdk option is given, first look for the 10.4u
2592 # SDK (which is distributed with the obsolete Xcode 3), then the
2593 # 10.6, 10.7 and 10.8 SDKs, in that order. (Don't bother looking
2594 # for the 10.5 SDK, unlikely somebody would have that but not
2595 # 10.6, I think.) If not found in some (old) default locations,
2596 # try the xcode-select tool.
2598 # The intent is that for "most" Mac-based developers, a suitable
2599 # SDK will be found automatically without any configure options.
2601 # For developers still using Xcode 2 or 3, in /Developer, either
2602 # because it is the only Xcode they have, or they have that in
2603 # addition to Xcode 4 in /Applications/Xcode.app, the 10.4 SDK
2606 # For developers with a current Xcode 4 installed from the Mac App
2607 # Store, the 10.6, 10.7 or 10.8 SDK should be found.
2609 AC_MSG_CHECKING([what Mac OS X SDK to use])
2611 if test -z "$with_macosx_sdk"; then
2612 if test -d /Developer/SDKs/MacOSX10.4u.sdk; then
2613 with_macosx_sdk=10.4
2614 elif test -d /Developer-old/SDKs/MacOSX10.4u.sdk; then
2615 with_macosx_sdk=10.4
2616 elif test -d /Xcode3/SDKs/MacOSX10.4u.sdk; then
2617 with_macosx_sdk=10.4
2618 elif test -d /Developer/SDKs/MacOSX10.6.sdk; then
2619 with_macosx_sdk=10.6
2620 elif test -d /Developer/SDKs/MacOSX10.7.sdk; then
2621 with_macosx_sdk=10.7
2622 elif test -x /usr/bin/xcode-select; then
2623 xcodepath="`xcode-select -print-path`"
2624 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; then
2625 with_macosx_sdk=10.6
2626 elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"; then
2627 with_macosx_sdk=10.7
2628 elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"; then
2629 with_macosx_sdk=10.8
2632 if test -z "$with_macosx_sdk"; then
2633 AC_MSG_ERROR([Could not figure out the location of a Mac OS X SDK and its version])
2637 case $with_macosx_sdk in
2639 MACOSX_SDK_VERSION=1040
2642 MACOSX_SDK_VERSION=1050
2645 MACOSX_SDK_VERSION=1060
2648 MACOSX_SDK_VERSION=1070
2651 MACOSX_SDK_VERSION=1080
2654 AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported value are 10.4--8])
2658 # Next find it (again, if we deduced its version above by finding
2659 # it... but we need to look for it once more in case
2660 # --with-macosx-sdk was given so that the aboce search did not
2662 if test -z "$MACOSX_SDK_PATH"; then
2663 case $with_macosx_sdk in
2665 if test -d /Developer/SDKs/MacOSX10.4u.sdk; then
2666 MACOSX_SDK_PATH=/Developer/SDKs/MacOSX10.4u.sdk
2667 elif test -d /Developer-old/SDKs/MacOSX10.4u.sdk; then
2668 MACOSX_SDK_PATH=/Developer-old/SDKs/MacOSX10.4u.sdk
2669 elif test -d /Xcode3/SDKs/MacOSX10.4u.sdk; then
2670 MACOSX_SDK_PATH=/Xcode3/SDKs/MacOSX10.4u.sdk
2674 if test -d /Developer/SDKs/MacOSX$with_macosx_sdk.sdk; then
2675 MACOSX_SDK_PATH=/Developer/SDKs/MacOSX$with_macosx_sdk.sdk
2676 elif test -x /usr/bin/xcode-select; then
2677 xcodepath="`xcode-select -print-path`"
2678 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2679 MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"
2684 if test -z "$MACOSX_SDK_PATH"; then
2685 AC_MSG_ERROR([Could not figure out the location of Mac OS X $with_macosx_sdk SDK])
2688 AC_MSG_RESULT([SDK $with_macosx_sdk at $MACOSX_SDK_PATH])
2690 if test "$with_macosx_version_min_required" = ""; then
2691 case $with_macosx_sdk in
2693 with_macosx_version_min_required="10.4";;
2695 with_macosx_version_min_required="10.6";;
2699 if test "$with_macosx_version_max_allowed" = ""; then
2700 with_macosx_version_max_allowed="$with_macosx_sdk"
2703 FRAMEWORKSHOME="$MACOSX_SDK_PATH/System/Library/Frameworks"
2704 MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
2706 case "$with_macosx_version_min_required" in
2708 MAC_OS_X_VERSION_MIN_REQUIRED="1040"
2711 MAC_OS_X_VERSION_MIN_REQUIRED="1050"
2714 MAC_OS_X_VERSION_MIN_REQUIRED="1060"
2717 MAC_OS_X_VERSION_MIN_REQUIRED="1070"
2720 MAC_OS_X_VERSION_MIN_REQUIRED="1080"
2723 AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported value are 10.4--8])
2727 if test "$BITNESS_OVERRIDE" = 64; then
2728 case $with_macosx_version_min_required in
2730 AC_MSG_ERROR([Can't build 64-bit code for with-macosx-version-min-required=$with_macosx_version_min_required])
2735 if test "$BITNESS_OVERRIDE" = ""; then
2736 case "$with_macosx_version_min_required" in
2738 case "$with_macosx_sdk" in
2742 AC_MSG_WARN([Building with a SDK > 10.4 possibly breaks 10.4 compatibility. Do not use for deliverable build until verified that it really works])
2743 add_warning "Building with a SDK > 10.4 possibly breaks 10.4 compatibility. Do not use for deliverable build until verified that it really works"
2748 AC_MSG_WARN([Building with a minimum version requirement > 10.4 breaks 10.4 compatibility. Do not use for deliverable build])
2749 add_warning "Building with a minimum version requirement > 10.4 breaks 10.4 compatibility. Do not use for deliverable build"
2754 # If no CC and CXX environment vars, try to guess where the compiler is
2755 if test -z "$save_CC"; then
2756 AC_MSG_CHECKING([what compiler to use])
2757 case $with_macosx_sdk in
2759 case "$MACOSX_SDK_PATH" in
2764 gccprefix=/Developer-old/usr/bin/
2767 gccprefix=/Xcode3/usr/bin/
2770 AC_MSG_ERROR([Cannot guess gcc location for this SDK])
2773 CC="${gccprefix}gcc-4.0 $arch -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2774 CXX="${gccprefix}g++-4.0 $arch -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2777 # Is similar logic as above needed? Is it likely somebody
2778 # has both an older Xcode with the 10.6 SDK and a current
2780 CC="gcc-4.2 $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2781 CXX="g++-4.2 $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2784 CC="`xcrun -find clang` $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2785 CXX="`xcrun -find clang++` $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2789 AC_MSG_RESULT([$CC and $CXX])
2792 case "$with_macosx_version_max_allowed" in
2794 MAC_OS_X_VERSION_MAX_ALLOWED="1040"
2797 MAC_OS_X_VERSION_MAX_ALLOWED="1050"
2800 MAC_OS_X_VERSION_MAX_ALLOWED="1060"
2803 MAC_OS_X_VERSION_MAX_ALLOWED="1070"
2806 MAC_OS_X_VERSION_MAX_ALLOWED="1080"
2809 AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported value are 10.4--8])
2813 AC_MSG_CHECKING([that macosx-version-min-required is coherent with macosx-version-max-allowed])
2814 if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED; then
2815 AC_MSG_ERROR([the version minimumn required must be inferior or equal to the version maximum allowed])
2820 AC_MSG_CHECKING([that macosx-version-max-allowed is coherent with macos-with-sdk])
2821 if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $MACOSX_SDK_VERSION; then
2822 AC_MSG_ERROR([the version maximum allowed cannot be greater thatn the sdk level])
2826 AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED])
2827 AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED])
2829 AC_MSG_CHECKING([whether to do code signing])
2831 if test "$enable_macosx_code_signing" = yes; then
2832 # By default use the first suitable certificate (?).
2834 # http://stackoverflow.com/questions/13196291/difference-between-mac-developer-and-3rd-party-mac-developer-application
2835 # says that the "Mac Developer" certificate is useful just for self-testing. For distribution
2836 # outside the Mac App Store, use the "Developer ID Application" one, and for distribution in
2837 # the App Store, the "3rd Party Mac Developer" one. I think it works best to the the
2838 # "Developer ID Application" one.
2840 identity=`security find-identity -p codesigning -v 2>/dev/null | grep 'Developer ID Application:' | awk '{print $2}' |head -1`
2841 if test -n "$identity"; then
2842 MACOSX_CODESIGNING_IDENTITY=$identity
2843 pretty_name=`security find-identity -p codesigning -v | grep $MACOSX_CODESIGNING_IDENTITY | sed -e 's/^[[^"]]*"//' -e 's/"//'`
2844 AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
2846 elif test -n "$enable_macosx_code_signing"; then
2847 MACOSX_CODESIGNING_IDENTITY=$enable_macosx_code_signing
2848 pretty_name=`security find-identity -p codesigning -v | grep $MACOSX_CODESIGNING_IDENTITY | sed -e 's/^[[^"]]*"//' -e 's/"//'`
2849 AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
2854 AC_SUBST(FRAMEWORKSHOME)
2855 AC_SUBST(MACOSX_SDK_PATH)
2856 AC_SUBST(MACOSX_SDK_VERSION)
2857 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
2858 AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
2859 AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED)
2861 AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
2863 dnl ===================================================================
2864 dnl Windows specific tests and stuff
2865 dnl ===================================================================
2866 if test "$_os" = "WINNT" -a "$WITH_MINGW" != yes; then
2867 AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
2868 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
2872 AC_MSG_RESULT([yes])
2877 AC_MSG_CHECKING([whether to use DirectX])
2878 if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
2879 ENABLE_DIRECTX="TRUE"
2880 AC_MSG_RESULT([yes])
2886 AC_MSG_CHECKING([whether to use ActiveX])
2887 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then
2889 SCPDEFS="$SCPDEFS -DWITH_ACTIVEX_COMPONENT"
2890 AC_MSG_RESULT([yes])
2892 DISABLE_ACTIVEX="TRUE"
2896 AC_MSG_CHECKING([whether to use ATL])
2897 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then
2899 AC_MSG_RESULT([yes])
2906 DISABLE_ACTIVEX="TRUE"
2910 AC_SUBST(ENABLE_DIRECTX)
2911 AC_SUBST(DISABLE_ACTIVEX)
2912 AC_SUBST(DISABLE_ATL)
2914 if test "$cross_compiling" = "yes"; then
2916 SCPDEFS="$SCPDEFS -DCROSS_COMPILING"
2919 BUILD_TYPE="$BUILD_TYPE NATIVE"
2921 AC_SUBST(CROSS_COMPILING)
2923 dnl ===================================================================
2924 dnl Test the gcc version
2925 dnl ===================================================================
2926 if test "$GCC" = "yes"; then
2927 AC_MSG_CHECKING([the GCC version])
2928 _gcc_version=`$CC -dumpversion`
2929 _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
2930 GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2932 if test "$_os" = "Darwin" -a "$with_macosx_sdk" = "10.4" -a "$GCCVER" -ge "040100"; then
2933 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0"; then
2934 export CC="$GCC_HOME/bin/gcc-4.0"
2935 # export CC to make it finally available to config.guess
2936 GCCVER2=`$CC -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2937 if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100"; then
2941 if test "$GCCVER" -ge "040100"; then
2942 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])
2944 AC_MSG_RESULT([implicitly using CC=$CC])
2947 AC_MSG_RESULT([gcc $_gcc_version])
2949 if test "$GCCVER" -lt 040000; then
2950 AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 4.0.0])
2954 dnl ===================================================================
2955 dnl Is GCC actually Clang?
2956 dnl ===================================================================
2959 if test "$GCC" = "yes"; then
2960 AC_MSG_CHECKING([whether GCC is actually Clang])
2961 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
2967 [AC_MSG_RESULT([yes])
2968 COM_GCC_IS_CLANG=TRUE],
2969 [AC_MSG_RESULT([no])])
2971 if test "$COM_GCC_IS_CLANG" = TRUE; then
2972 AC_MSG_CHECKING([the Clang version])
2973 clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC -E -P -`
2974 CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P -`
2975 CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2976 AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
2979 AC_SUBST(COM_GCC_IS_CLANG)
2981 # ===================================================================
2982 # check various GCC options that Clang does not support now but maybe
2983 # will somewhen in the future, check them even for GCC, so that the
2985 # ===================================================================
2988 HAVE_GCC_FINLINE_LIMIT=
2989 HAVE_GCC_FNO_INLINE=
2990 if test "$GCC" = "yes"; then
2991 AC_MSG_CHECKING([whether $CC supports -ggdb2])
2992 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
2993 # Option just ignored and silly warning that isn't a real
2998 CFLAGS="$CFLAGS -Werror -ggdb2"
2999 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_GGDB2=TRUE ],[])
3002 if test "$HAVE_GCC_GGDB2" = "TRUE"; then
3003 AC_MSG_RESULT([yes])
3008 AC_MSG_CHECKING([whether $CC supports -finline-limit=0])
3009 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3014 CFLAGS="$CFLAGS -Werror -finline-limit=0"
3015 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FINLINE_LIMIT=TRUE ],[])
3018 if test "$HAVE_GCC_FINLINE_LIMIT" = "TRUE"; then
3019 AC_MSG_RESULT([yes])
3024 AC_MSG_CHECKING([whether $CC supports -fno-inline])
3025 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3030 CFLAGS="$CFLAGS -Werror -fno-inline"
3031 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_INLINE=TRUE ],[])
3034 if test "$HAVE_GCC_FNO_INLINE" = "TRUE"; then
3035 AC_MSG_RESULT([yes])
3040 AC_SUBST(HAVE_GCC_GGDB2)
3041 AC_SUBST(HAVE_GCC_FINLINE_LIMIT)
3042 AC_SUBST(HAVE_GCC_FNO_INLINE)
3044 HAVE_LD_BSYMBOLIC_FUNCTIONS=
3045 if test "$GCC" = "yes"; then
3046 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
3047 bsymbolic_functions_ldflags_save=$LDFLAGS
3048 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
3049 AC_LINK_IFELSE([AC_LANG_PROGRAM([
3052 printf ("hello world\n");
3053 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
3054 if test "$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "TRUE"; then
3055 AC_MSG_RESULT( found )
3057 AC_MSG_RESULT( not found )
3059 LDFLAGS=$bsymbolic_functions_ldflags_save
3061 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
3063 dnl ===================================================================
3064 dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT
3065 dnl ===================================================================
3066 SHOWINCLUDES_PREFIX=
3067 if test "$_os" = "WINNT"; then
3068 if test "$WITH_MINGW" != "yes"; then
3069 AC_MSG_CHECKING([for a friendly Microsoft C/C++ compiler installation path])
3070 if test -z "$with_cl_home"; then
3071 vctest=`./oowintool --msvc-productdir`
3072 if test "$BITNESS_OVERRIDE" = ""; then
3073 if test -x "$vctest/bin/cl.exe"; then
3074 with_cl_home=$vctest
3077 if test -x "$vctest/bin/amd64/cl.exe"; then
3078 with_cl_home=$vctest
3082 with_cl_home=`cygpath -u "$with_cl_home"`
3084 with_cl_home=`cygpath -d "$with_cl_home"`
3085 with_cl_home=`cygpath -u "$with_cl_home"`
3086 AC_MSG_RESULT([$with_cl_home])
3088 dnl ===========================================================
3089 dnl Check for mspdb80.dll/mspdb100.dll/mspdb110.dll
3090 dnl ===========================================================
3091 dnl MSVS 2008/10/12 Compiler
3092 if test -n "$with_mspdb_path"; then
3093 with_mspdb_path=`cygpath -u "$with_mspdb_path"`
3095 if test -e "$with_mspdb_path/mspdb80.dll" -o -e "$with_mspdb_path/mspdb100.dll" -o -e "$with_mspdb_path/mspdb110.dll"; then
3096 MSPDB_PATH="$with_mspdb_path"
3099 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb80.dll"; then
3100 MSPDB_PATH="$with_cl_home/../Common7/IDE"
3102 dnl Windows SDK 6.0 case
3103 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb80.dll"; then
3104 MSPDB_PATH="$with_cl_home/bin"
3107 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb100.dll"; then
3108 MSPDB_PATH="$with_cl_home/../Common7/IDE"
3111 if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb110.dll"; then
3112 MSPDB_PATH="$with_cl_home/../Common7/IDE"
3115 if test -z "$MSPDB_PATH"; then
3116 dnl AC_PATH_PROG only checks if MSPDB_PATH is still empty
3117 AC_PATH_PROG(MSPDB_PATH, mspdb80.dll)
3118 AC_PATH_PROG(MSPDB_PATH, mspdb100.dll)
3119 AC_PATH_PROG(MSPDB_PATH, mspdb110.dll)
3120 MSPDB_PATH=`dirname "$MSPDB_PATH"`
3123 if test -z "$MSPDB_PATH"; then
3124 AC_MSG_ERROR([You need a mspdb80.dll or mspdb100.dll or mspdb110.dll, make sure it is in the path or use --with-mspdb-path])
3126 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
3127 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
3128 dnl The path needs to be added before cl is called
3129 PATH="$MSPDB_PATH:$PATH"
3131 AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
3132 if test -z "$CC"; then
3133 if test "$BITNESS_OVERRIDE" = ""; then
3134 if test -x "$with_cl_home/bin/cl.exe"; then
3135 CC="$with_cl_home/bin/cl.exe"
3138 if test -x "$with_cl_home/bin/amd64/cl.exe"; then
3139 CC="$with_cl_home/bin/amd64/cl.exe"
3142 if test -z "$CC"; then
3143 AC_PATH_PROG(CC, cl.exe)
3145 # This gives us a posix path with 8.3 filename restrictions
3146 CC=`cygpath -d "$CC"`
3147 CC=`cygpath -u "$CC"`
3150 if test -n "$CC"; then
3151 # Remove /cl.exe from CC case insensitive
3152 AC_MSG_RESULT([found ($CC)])
3153 if test "$BITNESS_OVERRIDE" = ""; then
3154 COMPATH=`echo $CC | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
3156 if test -n "$with_cl_home"; then
3157 COMPATH=`echo $with_cl_home`
3160 export INCLUDE=`cygpath -d "$COMPATH/Include"`
3161 dnl Check which Microsoft C/C++ compiler is found
3162 AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
3163 # The following finds Microsoft, matches nn.nn.nnnn then pulls numbers out.
3164 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
3165 x = match( \\\$0, /..\\...\\...../ )
3166 CCversion = substr( \\\$0, RSTART, RLENGTH)
3167 tokencount = split (CCversion,vertoken,\".\")
3168 for ( i = 1 ; i <= tokencount ; i++ ) {
3169 printf (\"%04d\",vertoken[[i]] )
3172 if test "$CCNUMVER" -ge "001700000000"; then
3176 elif test "$CCNUMVER" -ge "001600000000"; then
3180 elif test "$CCNUMVER" -ge "001500000000"; then
3185 AC_MSG_ERROR([Compiler too old. Use Microsoft Visual Studio 2008 or 2010.])
3187 PathFormat "$COMPATH"
3188 COMPATH="$formatted_path"
3190 AC_MSG_RESULT([found compiler version $CCNUMVER (MSVS $MSVSVER).])
3192 AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.])
3195 dnl We need to guess the prefix of the -showIncludes output, it can be
3197 AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
3198 echo "#include <stdlib.h>" > conftest.c
3199 SHOWINCLUDES_PREFIX=`$CC -c -showIncludes conftest.c 2>/dev/null | \
3200 grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
3201 rm -f conftest.c conftest.obj
3202 if test -z "$SHOWINCLUDES_PREFIX"; then
3203 AC_MSG_ERROR([cannot determine the -showIncludes prefix])
3205 AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
3208 # Check for 64-bit (cross-)compiler to use to build the 64-bit
3209 # version of the Explorer extension (and maybe other small
3210 # bits, too) needed when installing a 32-bit LibreOffice on a
3211 # 64-bit OS. The 64-bit Explorer extension is a feature that
3212 # has been present since long in OOo. Don't confuse it with
3213 # building LibreOffice itself as 64-bit code, which is
3214 # unfished work and highly experimental.
3221 if test "$BITNESS_OVERRIDE" = ""; then
3222 AC_MSG_CHECKING([for a x64 compiler and libraries for 64-bit Explorer extensions])
3223 if test -f "$with_cl_home/atlmfc/lib/amd64/atls.lib"; then
3224 # Prefer native x64 compiler to cross-compiler, in case we are running
3225 # the build on a 64-bit OS.
3226 if "$with_cl_home/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3228 CXX_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
3229 LINK_X64_BINARY="$with_cl_home/bin/amd64/link.exe"
3230 LIBMGR_X64_BINARY="$with_cl_home/bin/amd64/lib.exe"
3231 elif "$with_cl_home/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3233 CXX_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
3234 LINK_X64_BINARY="$with_cl_home/bin/x86_amd64/link.exe"
3235 LIBMGR_X64_BINARY="$with_cl_home/bin/x86_amd64/lib.exe"
3238 if test "$BUILD_X64" = TRUE; then
3239 AC_MSG_RESULT([found])
3241 AC_MSG_RESULT([not found])
3242 AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
3247 # These are passed to the environment and then used in set_wntx64.mk
3248 AC_SUBST(CXX_X64_BINARY)
3249 AC_SUBST(LINK_X64_BINARY)
3250 AC_SUBST(LIBMGR_X64_BINARY)
3253 AC_MSG_CHECKING([the compiler is MinGW])
3254 MACHINE_PREFIX=`$CC -dumpmachine`
3255 if echo $MACHINE_PREFIX | $GREP -q mingw32; then
3256 COMPATH=`echo "$COMPATH" | sed -e 's,/bin$,,'`
3257 AC_MSG_RESULT([yes])
3259 AC_MSG_ERROR([Compiler is not MinGW.])
3265 PathFormat "$MSPDB_PATH"
3266 MSPDB_PATH="$formatted_path"
3267 AC_SUBST(SHOWINCLUDES_PREFIX)
3272 if test "$_os" == "WINNT"; then
3273 DBGHELP_DLL="13fbc2e8b37ddf28181dd6d8081c2b8e-dbghelp.dll"
3275 AC_SUBST(DBGHELP_DLL)
3280 UNOWINREG_DLL="185d60944ea767075d27247c3162b3bc-unowinreg.dll"
3281 AC_SUBST(UNOWINREG_DLL)
3284 # prefix C with ccache if needed
3286 if test "$CCACHE" != ""; then
3287 AC_MSG_CHECKING([whether $CC is already ccached])
3291 CFLAGS="$CFLAGS --ccache-skip -O2"
3292 dnl an empty program will do, we're checking the compiler flags
3293 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
3294 [use_ccache=yes], [use_ccache=no])
3295 if test $use_ccache = yes; then
3296 AC_MSG_RESULT([yes])
3305 dnl Set the ENABLE_DBGUTIL variable
3306 dnl ===================================================================
3307 AC_MSG_CHECKING([whether to build with additional debug utilities])
3308 if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
3309 ENABLE_DBGUTIL="TRUE"
3313 AC_MSG_RESULT([yes])
3314 # cppunit and graphite expose STL in public headers
3315 if test "$with_system_cppunit" = "yes"; then
3316 AC_MSG_ERROR([--with-system-cppunit conflicts with --enable-dbgutil])
3318 with_system_cppunit=no
3320 if test "$with_system_graphite" = "yes"; then
3321 AC_MSG_ERROR([--with-system-graphite conflicts with --enable-dbgutil])
3323 with_system_graphite=no
3325 if test "$with_system_mysql_cppconn" = "yes"; then
3326 AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with --enable-dbgutil])
3328 with_system_mysql_cppconn=no
3330 if test "$with_system_orcus" = "yes"; then
3331 AC_MSG_ERROR([--with-system-orcus conflicts with --enable-dbgutil])
3333 with_system_orcus=no
3337 # PRODUCT is old concept, still used by build.pl .
3342 AC_SUBST(ENABLE_DBGUTIL)
3346 dnl Set the ENABLE_DEBUG variable.
3347 dnl ===================================================================
3348 AC_MSG_CHECKING([whether to do a debug build])
3349 if test -n "$enable_debug" && test "$enable_debug" != "yes" && test "$enable_debug" != "no"; then
3350 AC_MSG_ERROR([--enable-debug now accepts only yes or no, use --enable-selective-debuginfo])
3352 if test -n "$ENABLE_DBGUTIL"; then
3353 if test "$enable_debug" = "no"; then
3354 AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil])
3357 AC_MSG_RESULT([yes (dbgutil)])
3358 elif test -n "$enable_debug" && test "$enable_debug" != "no"; then
3360 AC_MSG_RESULT([yes])
3365 AC_SUBST(ENABLE_DEBUG)
3367 dnl Selective debuginfo
3368 ENABLE_DEBUGINFO_FOR=
3369 if test -n "$ENABLE_DEBUG"; then
3370 AC_MSG_CHECKING([whether to use selective debuginfo])
3371 if test -n "$enable_selective_debuginfo" -a "$enable_selective_debuginfo" != "no"; then
3372 ENABLE_DEBUGINFO_FOR="$enable_selective_debuginfo"
3373 AC_MSG_RESULT([for "$enable_selective_debuginfo"])
3375 ENABLE_DEBUGINFO_FOR=all
3376 AC_MSG_RESULT([no, for all])
3379 AC_SUBST(ENABLE_DEBUGINFO_FOR)
3381 dnl Check for enable symbols option
3382 dnl ===================================================================
3383 AC_MSG_CHECKING([whether to include symbols while preserve optimization])
3384 if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
3385 ENABLE_SYMBOLS="TRUE"
3386 if test -n "$ENABLE_DBGUTIL"; then
3387 AC_MSG_ERROR([--enable-dbgutil cannot be used with --enable-symbols])
3388 elif test -n "$ENABLE_DEBUG"; then
3389 AC_MSG_ERROR([--enable-debug cannot be used with --enable-symbols])
3391 AC_MSG_RESULT([yes])
3393 if test -n "$enable_symbols" -a "$enable_symbols" = "no"; then
3394 ENABLE_SYMBOLS="FALSE"
3400 AC_SUBST(ENABLE_SYMBOLS)
3402 dnl Check for explicit C/CXX/OBJC/OBJCXX/LDFLAGS. We by default use the ones specified
3403 dnl by our build system, but explicit override is possible.
3404 AC_MSG_CHECKING(for explicit CFLAGS)
3405 if test -n "$CFLAGS"; then
3406 AC_MSG_RESULT([$CFLAGS])
3412 AC_MSG_CHECKING(for explicit CXXFLAGS)
3413 if test -n "$CXXFLAGS"; then
3414 AC_MSG_RESULT([$CXXFLAGS])
3420 AC_MSG_CHECKING(for explicit OBJCFLAGS)
3421 if test -n "$OBJCFLAGS"; then
3422 AC_MSG_RESULT([$OBJCFLAGS])
3428 AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
3429 if test -n "$OBJCXXFLAGS"; then
3430 AC_MSG_RESULT([$OBJCXXFLAGS])
3436 AC_MSG_CHECKING(for explicit LDFLAGS)
3437 if test -n "$LDFLAGS"; then
3438 AC_MSG_RESULT([$LDFLAGS])
3447 AC_SUBST(OBJCXXFLAGS)
3450 AC_SUBST(x_CXXFLAGS)
3451 AC_SUBST(x_OBJCFLAGS)
3452 AC_SUBST(x_OBJCXXFLAGS)
3456 # determine CPU, CPUNAME, GUI, GUIBASE, ...
3472 PLATFORMID=aix_powerpc
3475 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3476 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3477 SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
3490 if test "$BITNESS_OVERRIDE" = 64; then
3495 PLATFORMID=windows_x86_64
3496 OUTPATH=wntmscx$COMEX
3501 PLATFORMID=windows_x86
3502 OUTPATH=wntmsci$COMEX
3506 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3509 SCPDEFS="$SCPDEFS -D_MSC_VER"
3510 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3511 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3517 # Not sure if "Aqua" is the right term to use?
3529 PLATFORMID=macosx_arm_eabi
3537 PLATFORMID=macosx_powerpc
3541 if test "$BITNESS_OVERRIDE" = 64; then
3542 AC_MSG_ERROR([Can't build 64-bit code in 32-bit OS])
3547 PLATFORMID=macosx_x86
3551 if test "$BITNESS_OVERRIDE" = 64; then
3555 PLATFORMID=macosx_x86_64
3561 PLATFORMID=macosx_x86
3566 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3569 SOLARLIB="-L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3586 PLATFORMID=dragonfly_x86
3592 PLATFORMID=dragonfly_x86_64
3595 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3598 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3599 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3600 SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
3617 PLATFORMID=freebsd_x86
3624 PLATFORMID=freebsd_x86_64
3627 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3630 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3631 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3632 SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
3649 PLATFORMID=kfreebsd_x86
3657 PLATFORMID=kfreebsd_x86_64
3661 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3664 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3665 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3666 SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
3683 PLATFORMID=linux_alpha
3692 PLATFORMID=linux_arm_eabi
3696 PLATFORMID=linux_arm_oabi
3705 PLATFORMID=linux_hppa
3712 PLATFORMID=linux_x86
3719 PLATFORMID=linux_ia64
3727 PLATFORMID=linux_mips_eb
3734 EPM_FLAGS="-a mips64"
3735 PLATFORMID=linux_mips_eb
3742 EPM_FLAGS="-a mips64el"
3743 PLATFORMID=linux_mips_el
3750 EPM_FLAGS="-a mipsel"
3751 PLATFORMID=linux_mips_el
3758 PLATFORMID=linux_m68k
3765 PLATFORMID=linux_powerpc
3773 PLATFORMID=linux_powerpc_64
3780 PLATFORMID=linux_sparc
3787 PLATFORMID=linux_s390
3795 PLATFORMID=linux_s390x
3803 PLATFORMID=linux_x86_64
3807 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3810 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3811 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3812 SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
3829 PLATFORMID=android_arm_eabi
3834 CPUNAME=GODSON # Weird, but maybe that's the LO convention?
3836 PLATFORMID=android_mips_el
3843 PLATFORMID=android_x86
3847 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3850 SOLARINC="$SOLARINC -I$SRC_ROOT/solenv/inc/$OUTPATH"
3851 SOLARLIB="-L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3864 if test "$BITNESS_OVERRIDE" = 64; then
3868 PLATFORMID=windows_x86_64
3869 OUTPATH=wntgccx$COMEX
3874 PLATFORMID=windows_x86
3875 OUTPATH=wntgcci$COMEX
3879 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3882 SOLARINC="$SOLARINC -I$SRC_ROOT/solenv/inc/win32 -I$SRC_ROOT/solenv/inc/$OUTPATH"
3883 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3884 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3902 PLATFORMID=netbsd_x86
3908 PLATFORMID=netbsd_powerpc
3914 PLATFORMID=netbsd_sparc
3920 PLATFORMID=netbsd_x86_64
3923 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3926 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3927 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3928 SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
3945 PLATFORMID=openbsd_x86
3951 PLATFORMID=openbsd_x86_64
3954 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3957 SOLARINC="$SOLARINC -I/usr/local/include"
3958 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3959 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3960 SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
3961 SOLARLIB="$SOLARLIB -L/usr/local/lib"
3979 PLATFORMID=solaris_x86
3986 PLATFORMID=solaris_sparc
3990 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3993 SOLARINC="$SOLARINC -I/usr/local/include"
3994 SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
3995 SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
3996 SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
3997 SOLARLIB="$SOLARLIB -L$COMPATH/lib"
3998 SOLARLIB="$SOLARLIB -L/usr/local/bin -L/usr/dt/lib -L/usr/openwin/lib"
4002 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
4006 if test "$enable_headless" = "yes"; then
4007 if test "$GUIBASE" != "unx"; then
4008 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice with --enable-headless])
4013 INPATH="${OUTPATH}${PROEXT}"
4014 if test -n "${with_solver_and_workdir_root}"; then
4015 PathFormat "${with_solver_and_workdir_root}"
4016 # IsValidFilePath in /sal/osl/w32/file_url.cxx rejects "X:\\" breaking idlc
4017 if echo ${formatted_path} | $GREP -q '/$'; then
4018 WORKDIR=${formatted_path}workdir/${INPATH}
4020 WORKDIR=${formatted_path}/workdir/${INPATH}
4023 WORKDIR=${SRC_ROOT}/workdir/${INPATH}
4025 OUTDIR="${SOLARVER}/${INPATH}"
4026 SOLARINC="-I. -I${SOLARVER}/$INPATH/inc/external -I${SOLARVER}/$INPATH/inc -I$SRC_ROOT/solenv/inc $SOLARINC"
4042 AC_SUBST(PLATFORMID)
4044 dnl ===================================================================
4045 dnl Test which package format to use
4046 dnl ===================================================================
4047 AC_MSG_CHECKING([which package format to use])
4048 if test -n "$with_package_format"; then
4049 for i in $with_package_format; do
4051 aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
4054 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
4055 aix - AIX software distribution
4056 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
4057 deb - Debian software distribution
4058 inst or tardist - IRIX software distribution
4059 osx - MacOS X software distribution
4060 pkg - Solaris software distribution
4061 rpm - RedHat software distribution
4062 setld - Tru64 (setld) software distribution
4063 native - "Native" software distribution for the platform
4064 portable - Portable software distribution
4066 LibreOffice additionally supports:
4067 archive - .tar.gz or .zip
4069 installed - installation tree
4075 PKGFORMAT="$with_package_format"
4076 elif test "$enable_epm" = "yes"; then
4086 # if building on Debian, default should be deb...
4087 if test -e /etc/debian_version; then
4105 # we never should get here since we check the arciecture/os at the beginning,
4108 AC_MSG_ERROR([unknown system])
4111 if test "$WITH_MINGW" = "yes"; then
4112 # when tested, we should default this to 'msi', instead of 'archive'
4118 AC_MSG_RESULT([$PKGFORMAT])
4121 dnl ===================================================================
4122 dnl Set up a different compiler to produce tools to run on the build
4123 dnl machine when doing cross-compilation
4124 dnl ===================================================================
4126 m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
4127 if test "$cross_compiling" = "yes"; then
4128 AC_MSG_CHECKING([for BUILD platform configuration])
4130 rm -rf CONF-FOR-BUILD config_build.mk
4131 mkdir CONF-FOR-BUILD
4137 bin/get_config_variables \
4138 solenv/bin/getcompver.awk \
4139 solenv/inc/langlist.mk \
4140 solenv/inc/postset.mk \
4141 | (cd CONF-FOR-BUILD && tar xf -)
4143 unset COM GUI GUIBASE OS CPU CPUNAME
4144 unset CC CXX SYSBASE CFLAGS
4145 unset PYTHON_CFLAGS PYTHON_LIBS
4146 unset AR NM OBJDUMP PKG_CONFIG RANLIB STRIP
4147 unset CPPUNIT_CFLAGS CPPUNIT_LIBS
4148 unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC
4149 test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
4150 test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
4151 test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
4154 test -n "$enable_ccache" && sub_conf_opts="$sub_conf_opts --enable-ccache=$enable_ccache"
4155 test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
4156 test $with_java = no && sub_conf_opts="$sub_conf_opts --without-java"
4157 test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
4158 test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
4159 test -n "${with_solver_and_workdir_root}" && sub_conf_opts="$sub_conf_opts --with-solver-and-workdir-root=${with_solver_and_workdir_root}"
4160 test -n "$with_system_boost_for_build" && sub_conf_opts="$sub_conf_opts --with-system-boost"
4161 test -n "$with_system_cppunit_for_build" && sub_conf_opts="$sub_conf_opts --with-system-cppunit"
4162 test -n "$with_system_expat_for_build" && sub_conf_opts="$sub_conf_opts --with-system-expat"
4163 test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu"
4164 test -n "$with_system_libxml_for_build" && sub_conf_opts="$sub_conf_opts --with-system-libxml"
4165 # we need the msi build tools on mingw if we are creating the
4167 if test "$WITH_MINGW" = "yes"; then
4168 enable_winegcc_for_build=
4169 for pkgformat in $PKGFORMAT; do
4170 case "$pkgformat" in
4171 msi|native) enable_winegcc_for_build=yes ;;
4174 test -n "$enable_winegcc_for_build" && sub_conf_opts="$sub_conf_opts --enable-winegcc"
4176 sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
4177 # Don't bother having configure look for stuff not needed for the build platform anyway
4179 --disable-graphite \
4180 --disable-build-mozilla \
4181 --disable-postgresql-sdbc \
4183 --with-parallelism="$with_parallelism" \
4185 ENABLE_PDFIMPORT=FALSE \
4187 2>&1 | sed -e 's/^/ /'
4188 test -f ./config_host.mk 2>/dev/null || exit
4189 cp config_host.mk ../config_build.mk
4190 cp config.log ../config.Build.log
4191 . ./bin/get_config_variables COM GUI GUIBASE OS PATH CPU CPUNAME CC CXX DISABLE_PYTHON MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH PYTHON SYSTEM_LIBXSLT OUTDIR SOLARINC SOLARLIB WORKDIR
4193 for V in COM GUI GUIBASE OS CPU CPUNAME CC CXX DISABLE_PYTHON MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH \
4194 PYTHON SYSTEM_LIBXSLT; do
4196 VV=`eval "echo $VV"`
4197 if test -n "$VV"; then
4198 line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
4199 echo "$line" >>build-config
4203 for V in OUTDIR SOLARINC SOLARLIB WORKDIR; do
4205 VV=`eval "echo $VV"`
4206 VV=`echo $VV | sed -e 's,/CONF-FOR-BUILD,,g'`
4207 if test -n "$VV"; then
4208 line="${V}_FOR_BUILD='$VV'"
4209 echo "$line" >>build-config
4213 line=`echo "LO_PATH_FOR_BUILD=$PATH" | sed -e 's,/CONF-FOR-BUILD,,g'`
4214 echo "$line" >>build-config
4217 test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
4218 test -f config_build.mk || AC_MSG_ERROR([A file called config_build.mk was supposed to have been copied here, but it isn't found])
4219 perl -pi -e 's,/CONF-FOR-BUILD,,g' config_build.mk
4220 eval `cat CONF-FOR-BUILD/build-config`
4221 AC_MSG_RESULT([checking for BUILD platform configuration... done])
4222 rm -rf CONF-FOR-BUILD
4225 CXX_FOR_BUILD="$CXX"
4227 COM_FOR_BUILD="$COM"
4228 CPUNAME_FOR_BUILD="$CPUNAME"
4229 CPU_FOR_BUILD="$CPU"
4230 CXX_FOR_BUILD="$CXX"
4231 DISABLE_PYTHON_FOR_BUILD="$DISABLE_PYTHON"
4232 GUIBASE_FOR_BUILD="$GUIBASE"
4233 GUI_FOR_BUILD="$GUI"
4234 INPATH_FOR_BUILD="$INPATH"
4235 MACOSX_DEPLOYMENT_TARGET_FOR_BUILD="$MACOSX_DEPLOYMENT_TARGET"
4237 OUTDIR_FOR_BUILD="$OUTDIR"
4238 OUTPATH_FOR_BUILD="$OUTPATH"
4239 PYTHON_FOR_BUILD="$PYTHON"
4240 WORKDIR_FOR_BUILD="$WORKDIR"
4242 AC_SUBST(COM_FOR_BUILD)
4243 AC_SUBST(GUI_FOR_BUILD)
4244 AC_SUBST(GUIBASE_FOR_BUILD)
4245 AC_SUBST(OS_FOR_BUILD)
4246 AC_SUBST(CPU_FOR_BUILD)
4247 AC_SUBST(CPUNAME_FOR_BUILD)
4248 AC_SUBST(CC_FOR_BUILD)
4249 AC_SUBST(CXX_FOR_BUILD)
4250 AC_SUBST(INPATH_FOR_BUILD)
4251 AC_SUBST(OUTPATH_FOR_BUILD)
4252 AC_SUBST(MACOSX_DEPLOYMENT_TARGET_FOR_BUILD)
4253 AC_SUBST([PYTHON_FOR_BUILD])
4255 AC_SUBST(OUTDIR_FOR_BUILD)
4256 AC_SUBST(WORKDIR_FOR_BUILD)
4258 UPD="`echo AC_PACKAGE_VERSION | sed "s/\.//"`0"
4259 SOURCEVERSION="OOO$UPD"
4261 AC_SUBST(SOURCEVERSION)
4263 dnl ===================================================================
4264 dnl Grim-ness to export version number of LibreOffice to code
4265 dnl this needs to be turned around and to be driven by configure
4266 dnl ===================================================================
4267 LIBO_VERSION_MAJOR="`$GREP VERSIONMAJOR solenv/inc/minor.mk | sed "s/^.*=//"`"
4268 LIBO_VERSION_MINOR="`$GREP VERSIONMINOR solenv/inc/minor.mk | sed "s/^.*=//"`"
4269 LIBO_VERSION_MICRO="`$GREP VERSIONMICRO solenv/inc/minor.mk | sed "s/^.*=//"`"
4270 LIBO_VERSION_PATCH="`$GREP BUILD solenv/inc/minor.mk | sed "s/^.*=//"`"
4271 AC_SUBST(LIBO_VERSION_MAJOR)
4272 AC_SUBST(LIBO_VERSION_MINOR)
4273 AC_SUBST(LIBO_VERSION_MICRO)
4274 AC_SUBST(LIBO_VERSION_PATCH)
4275 AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,"$LIBO_VERSION_MAJOR")
4276 AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,"$LIBO_VERSION_MINOR")
4277 AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,"$LIBO_VERSION_MICRO")
4278 AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,"$LIBO_VERSION_PATCH")
4280 dnl ===================================================================
4281 dnl Set the ENABLE_CRASHDUMP variable.
4282 dnl ===================================================================
4283 AC_MSG_CHECKING([whether to enable crashdump feature])
4284 if test "$enable_crashdump" = "yes"; then
4285 ENABLE_CRASHDUMP="TRUE"
4286 BUILD_TYPE="$BUILD_TYPE CRASHREP"
4287 AC_MSG_RESULT([yes])
4292 AC_SUBST(ENABLE_CRASHDUMP)
4295 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
4296 dnl ===================================================================
4297 AC_MSG_CHECKING([whether to turn warnings to errors])
4298 if test -n "$enable_werror" -a "$enable_werror" != "no"; then
4299 EXTERNAL_WARNINGS_NOT_ERRORS="FALSE"
4300 AC_MSG_RESULT([yes])
4302 EXTERNAL_WARNINGS_NOT_ERRORS="TRUE"
4305 AC_SUBST(EXTERNAL_WARNINGS_NOT_ERRORS)
4307 dnl Set the ASSERT_ALWAYS_ABORT variable. (Activate --enable-assert-always-abort)
4308 dnl ===================================================================
4309 AC_MSG_CHECKING([whether to have assert to abort in release code])
4310 if test -n "$enable_assert_always_abort" -a "$enable_assert_always_abort" = "yes"; then
4311 ASSERT_ALWAYS_ABORT="TRUE"
4312 AC_MSG_RESULT([yes])
4314 ASSERT_ALWAYS_ABORT="FALSE"
4317 AC_SUBST(ASSERT_ALWAYS_ABORT)
4319 dnl Determine whether to use linkoo for the smoketest installation
4320 dnl ===================================================================
4321 AC_MSG_CHECKING([whether to use linkoo for the smoketest installation])
4322 if test "$enable_linkoo" = "no"; then
4323 DISABLE_LINKOO="TRUE"
4327 AC_MSG_RESULT([yes])
4329 AC_SUBST(DISABLE_LINKOO)
4331 # Set the ENABLE_LTO variable
4332 # ===================================================================
4333 AC_MSG_CHECKING([whether to use link-time optimization])
4334 if test -n "$enable_lto" -a "$enable_lto" != "no"; then
4336 AC_MSG_RESULT([yes])
4341 AC_SUBST(ENABLE_LTO)
4343 if test "$enable_headless" = "yes"; then
4344 # be sure to do not mess with uneeded stuff
4352 build_gstreamer_0_10=no
4356 test_unix_quickstarter=no
4357 enable_cairo_canvas=no
4361 dnl ===================================================================
4362 dnl check for cups support
4363 dnl ===================================================================
4366 if test "$enable_cups" = "no"; then
4370 AC_MSG_CHECKING([whether to enable CUPS support])
4371 if test "$test_cups" = "yes"; then
4373 AC_MSG_RESULT([yes])
4375 AC_MSG_CHECKING([whether cups support is present])
4376 AC_CHECK_LIB([cups], [cupsPrintFiles], [:])
4377 AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
4378 if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then
4379 AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups-devel.])
4386 AC_SUBST(ENABLE_CUPS)
4389 if test "$test_fontconfig" = "yes"; then
4390 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0])
4392 case "$BUILD_TYPE" in
4394 FONTCONFIG_LIBS="-lfontconfig"
4398 AC_SUBST(FONTCONFIG_CFLAGS)
4399 AC_SUBST(FONTCONFIG_LIBS)
4401 dnl whether to find & fetch external tarballs?
4402 dnl ===================================================================
4403 if test -z "$TARFILE_LOCATION"; then
4404 TARFILE_LOCATION="$SRC_ROOT/src"
4406 AC_SUBST(TARFILE_LOCATION)
4408 AC_MSG_CHECKING([whether we want to fetch tarballs])
4409 if test "$enable_fetch_external" != "no"; then
4410 if test "$with_all_tarballs" = "yes"; then
4411 AC_MSG_RESULT(["yes, all of them"])
4412 DO_FETCH_TARBALLS="ALL"
4414 AC_MSG_RESULT(["yes, if we use them"])
4415 DO_FETCH_TARBALLS="YES"
4419 DO_FETCH_TARBALLS="NO"
4421 AC_SUBST(DO_FETCH_TARBALLS)
4423 AC_MSG_CHECKING([whether to build help])
4424 if test "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
4425 AC_MSG_RESULT([yes])
4426 BUILD_TYPE="$BUILD_TYPE HELP"
4427 SCPDEFS="$SCPDEFS -DWITH_HELP"
4428 GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
4433 dnl Test whether to include MySpell dictionaries
4434 dnl ===================================================================
4435 AC_MSG_CHECKING([whether to include MySpell dictionaries])
4436 if test -z "$with_myspell_dicts" -o "$with_myspell_dicts" = "yes"; then
4437 AC_MSG_RESULT([yes])
4438 WITH_MYSPELL_DICTS=YES
4439 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
4440 GIT_NEEDED_SUBMODULES="dictionaries $GIT_NEEDED_SUBMODULES"
4443 WITH_MYSPELL_DICTS=NO
4445 AC_SUBST(WITH_MYSPELL_DICTS)
4447 AC_MSG_CHECKING([whether to use dicts from external paths])
4448 if test -z "$with_system_dicts" -o "$with_system_dicts" != "no"; then
4449 AC_MSG_RESULT([yes])
4451 AC_MSG_CHECKING([for spelling dictionary directory])
4452 if test -n "$with_external_dict_dir"; then
4453 DICT_SYSTEM_DIR=file://$with_external_dict_dir
4455 DICT_SYSTEM_DIR=file:///usr/share/hunspell
4456 if test ! -d /usr/share/hunspell -a -d /usr/share/myspell; then
4457 DICT_SYSTEM_DIR=file:///usr/share/myspell
4460 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
4461 AC_MSG_CHECKING([for hyphenation patterns directory])
4462 if test -n "$with_external_hyph_dir"; then
4463 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
4465 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
4467 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
4468 AC_MSG_CHECKING([for thesaurus directory])
4469 if test -n "$with_external_thes_dir"; then
4470 THES_SYSTEM_DIR=file://$with_external_thes_dir
4472 THES_SYSTEM_DIR=file:///usr/share/mythes
4474 AC_MSG_RESULT([$THES_SYSTEM_DIR])
4479 AC_SUBST(SYSTEM_DICTS)
4480 AC_SUBST(DICT_SYSTEM_DIR)
4481 AC_SUBST(HYPH_SYSTEM_DIR)
4482 AC_SUBST(THES_SYSTEM_DIR)
4484 dnl ===================================================================
4485 dnl ENABLE_PCH i now a no-op
4486 dnl ===================================================================
4487 AC_MSG_CHECKING([whether to enable pch feature])
4488 AC_MSG_RESULT([no, obsolete])
4490 dnl ===================================================================
4491 dnl Search all the common names for GNU make
4492 dnl ===================================================================
4493 AC_MSG_CHECKING([for GNU make])
4495 # try to use our own make if it is available and GNUMAKE was not already defined
4496 if test -z "$GNUMAKE"; then
4497 if test -x "/opt/lo/bin/make"; then
4498 GNUMAKE="/opt/lo/bin/make"
4502 for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do
4503 if test -n "$a"; then
4504 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
4505 if test $? -eq 0; then
4511 AC_MSG_RESULT($GNUMAKE)
4512 if test -z "$GNUMAKE"; then
4513 AC_MSG_ERROR([not found. install GNU make.])
4516 AC_MSG_CHECKING([the GNU make version])
4517 _make_version=`$GNUMAKE --version | grep GNU | $GREP -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
4518 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
4519 if test "$_make_longver" -ge "038200"; then
4520 AC_MSG_RESULT([$GNUMAKE $_make_version])
4522 elif test "$_make_longver" -ge "038100"; then
4523 if test "$build_os" = "cygwin"; then
4524 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.82 needed])
4526 AC_MSG_RESULT([$GNUMAKE $_make_version])
4528 dnl ===================================================================
4529 dnl Search all the common names for sha1sum
4530 dnl ===================================================================
4531 AC_PATH_PROGS(SHA1SUM, sha1sum sha1 shasum)
4532 if test -z "$SHA1SUM"; then
4533 AC_MSG_ERROR([install the approproate SHA-1 checksumming program for this OS])
4535 AC_MSG_CHECKING([for GNU make bug 20033])
4536 TESTGMAKEBUG20033=`mktemp -d tmp.XXXXXX`
4537 cat > $TESTGMAKEBUG20033/Makefile << EOF
4538 A := \$(wildcard *.a)
4542 @echo survived bug20033. #dont kill these tabs, you will break the Makefile!!!!
4546 @touch 1.a 2.a 3.a 4.a 5.a 6.a
4559 \$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | $SHA1SUM))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\
4560 \$(call d1,\$(CHECKSUM)),\
4561 \$(call d2,\$(CHECKSUM)))
4563 if test -z "`(cd $TESTGMAKEBUG20033 && $GNUMAKE setup && $GNUMAKE -j)|grep survived`"; then
4564 no_parallelism_make="YES"
4565 AC_MSG_RESULT([yes, disable parallelism])
4567 AC_MSG_RESULT([no, keep parallelism enabled])
4569 rm -rf $TESTGMAKEBUG20033
4571 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
4574 # find if gnumake support file function
4575 AC_MSG_CHECKING([whether GNU make supports the 'file' function])
4576 TESTGMAKEFILEFUNC="`mktemp -d -t tst.XXXXXX`"
4577 cat > $TESTGMAKEFILEFUNC/Makefile << EOF
4578 \$(file >test.txt,Success )
4585 $GNUMAKE -C $TESTGMAKEFILEFUNC 2>/dev/null 1>&2
4586 if test -f $TESTGMAKEFILEFUNC/test.txt; then
4587 HAVE_GNUMAKE_FILE_FUNC="YES"
4588 AC_MSG_RESULT([yes])
4592 rm -rf $TESTGMAKEFILEFUNC
4593 AC_SUBST(HAVE_GNUMAKE_FILE_FUNC)
4596 _make_ver_check=`$GNUMAKE --version | grep LibreOffice`
4599 if test "$_make_ver_check" = ""; then
4603 HAVE_LD_HASH_STYLE=FALSE
4604 WITH_LINKER_HASH_STYLE=
4605 AC_MSG_CHECKING( for --hash-style gcc linker support )
4606 if test "$GCC" = "yes"; then
4607 if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes"; then
4608 hash_styles="gnu sysv"
4609 elif test "$with_linker_hash_style" = "no"; then
4612 hash_styles="$with_linker_hash_style"
4615 for hash_style in $hash_styles; do
4616 test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
4617 hash_style_ldflags_save=$LDFLAGS
4618 LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
4620 AC_LINK_IFELSE([AC_LANG_PROGRAM(
4626 [ if ./conftest$EXEEXT; then
4627 HAVE_LD_HASH_STYLE=TRUE
4628 WITH_LINKER_HASH_STYLE=$hash_style
4630 [HAVE_LD_HASH_STYLE=FALSE])
4631 LDFLAGS=$hash_style_ldflags_save
4634 if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
4635 AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
4639 LDFLAGS=$hash_style_ldflags_save
4643 AC_SUBST(HAVE_LD_HASH_STYLE)
4644 AC_SUBST(WITH_LINKER_HASH_STYLE)
4646 dnl ===================================================================
4647 dnl Check whether there's a Perl version available.
4648 dnl ===================================================================
4649 if test -z "$with_perl_home"; then
4650 AC_PATH_PROG(PERL, perl)
4652 test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
4653 _perl_path="$with_perl_home/bin/perl"
4654 if test -x "$_perl_path"; then
4657 AC_MSG_ERROR([$_perl_path not found])
4661 dnl ===================================================================
4662 dnl Testing for Perl version 5 or greater.
4663 dnl $] is the Perl version variable, it is returned as an integer
4664 dnl ===================================================================
4665 if test "$PERL"; then
4666 AC_MSG_CHECKING([the Perl version])
4667 ${PERL} -e "exit($]);"
4669 if test "$_perl_version" -lt 5; then
4670 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
4672 AC_MSG_RESULT([checked (perl $_perl_version)])
4674 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
4677 dnl ===================================================================
4678 dnl Testing for required Perl modules
4679 dnl ===================================================================
4681 AC_MSG_CHECKING([for required Perl modules])
4682 if `$PERL -e 'use Archive::Zip; use Cwd; use Digest::MD5'`; then
4683 AC_MSG_RESULT([all modules found])
4685 AC_MSG_ERROR([Failed to find some modules])
4689 dnl ===================================================================
4690 dnl Check for pkg-config
4691 dnl ===================================================================
4692 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
4696 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
4698 # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
4699 # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
4700 # explicitly. Or put /path/to/compiler in PATH yourself.
4702 AC_CHECK_TOOL(AR,ar)
4703 AC_CHECK_TOOL(NM,nm)
4704 AC_CHECK_TOOL(OBJDUMP,objdump)
4705 AC_CHECK_TOOL(RANLIB,ranlib)
4706 AC_CHECK_TOOL(STRIP,strip)
4707 if test "$_os" = "WINNT"; then
4708 AC_CHECK_TOOL(DLLTOOL,dlltool)
4709 AC_CHECK_TOOL(WINDRES,windres)
4716 AC_SUBST(PKG_CONFIG)
4721 dnl ===================================================================
4722 dnl pkg-config checks on Mac OS X
4723 dnl ===================================================================
4725 if test $_os = Darwin; then
4726 AC_MSG_CHECKING([for bogus pkg-config])
4727 if test -n "$PKG_CONFIG"; then
4728 if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | $GREP -q Mono.framework; then
4729 AC_MSG_ERROR([yes, from Mono. This *will* break the build. Please remove or hide $PKG_CONFIG])
4731 if test "$enable_bogus_pkg_config" = "yes"; then
4732 AC_MSG_RESULT([yes, user-approved from unknown origin.])
4734 AC_MSG_ERROR([yes, from unknown origin. This *will* break the build. Please remove or hide $PKG_CONFIG])
4738 AC_MSG_RESULT([no, good])
4742 dnl ===================================================================
4743 dnl .NET needs special treatment
4744 dnl (does the above comment really mean .NET, or is it misusing
4745 dnl that to mean Visual Studio .NET 2003 ? And does this also
4746 dnl in fact apply equally to what we actually support, i.e.
4747 dnl Visual Studio 2008 and 2010?)
4748 dnl ===================================================================
4749 if test "$build_os" = "cygwin"; then
4751 AC_PATH_PROG(MIDL_PATH, midl.exe)
4752 if test -n "$MIDL_PATH"; then
4753 MIDL_PATH=`dirname "$MIDL_PATH"`
4755 AC_MSG_CHECKING([for midl.exe more thoroughly])
4757 if test -n "$with_midl_path"; then
4758 with_midl_path=`cygpath -u "$with_midl_path"`
4760 if test -x "$with_midl_path/midl.exe"; then
4761 MIDL_PATH="$with_midl_path"
4763 if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
4764 MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
4766 if test -z "$MIDL_PATH"; then
4767 vstest=`./oowintool --msvs-productdir`
4768 if test -x "$vstest/Common7/Tools/Bin/midl.exe"; then
4769 MIDL_PATH="$vstest/Common7/Tools/Bin"
4772 if test -z "$MIDL_PATH"; then
4773 winsdktest=`./oowintool --windows-sdk-home`
4774 if test -x "$winsdktest/Bin/midl.exe"; then
4775 MIDL_PATH="$winsdktest/Bin"
4776 elif test -x "$winsdktest/Bin/$SDK_ARCH/midl.exe"; then
4777 MIDL_PATH="$winsdktest/Bin/$SDK_ARCH"
4780 if test ! -x "$MIDL_PATH/midl.exe"; then
4781 AC_MSG_ERROR([midl.exe not found. Make sure it's in PATH or use --with-midl-path])
4783 AC_MSG_RESULT([$MIDL_PATH/midl.exe])
4785 # Convert to posix path with 8.3 filename restrictions ( No spaces )
4786 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
4787 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
4790 AC_PATH_PROG(CSC_PATH, csc.exe)
4791 if test -n "$CSC_PATH"; then
4792 CSC_PATH=`dirname "$CSC_PATH"`
4794 if test -n "$with_csc_path"; then
4795 with_csc_path=`cygpath -u "$with_csc_path"`
4797 AC_MSG_CHECKING([for csc.exe more thoroughly])
4799 if test -x "$with_csc_path/csc.exe"; then
4800 CSC_PATH="$with_csc_path"
4802 csctest=`./oowintool --csc-compilerdir`
4803 if test -x "$csctest/csc.exe"; then
4807 if test ! -x "$CSC_PATH/csc.exe"; then
4808 AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
4810 AC_MSG_RESULT([$CSC_PATH/csc.exe])
4812 # Convert to posix path with 8.3 filename restrictions ( No spaces )
4813 CSC_PATH=`cygpath -d "$CSC_PATH"`
4814 CSC_PATH=`cygpath -u "$CSC_PATH"`
4817 AC_PATH_PROG(AL_PATH, al.exe)
4818 if test -n "$AL_PATH"; then
4819 AL_PATH=`dirname "$AL_PATH"`
4821 AC_MSG_CHECKING([for al.exe more thoroughly])
4823 if test -n "$with_al_path"; then
4824 with_al_path=`cygpath -u "$with_al_path"`
4826 if test -x "$with_al_path/al.exe"; then
4827 AL_PATH="$with_al_path"
4829 if test -z "$AL_PATH"; then
4830 winsdktest=`./oowintool --windows-sdk-home`
4831 if test -x "$winsdktest/Bin/al.exe"; then
4832 AL_PATH="$winsdktest/Bin"
4833 elif test -x "$winsdktest/Bin/$SDK_ARCH/al.exe"; then
4834 AL_PATH="$winsdktest/Bin/$SDK_ARCH"
4837 if test -z "$AL_PATH"; then
4838 altest=`./oowintool --al-home`
4839 if test -x "$altest/bin/al.exe"; then
4840 AL_PATH="$altest/bin"
4841 elif test -x "$altest/al.exe"; then
4845 if test ! -x "$AL_PATH/al.exe"; then
4846 AC_MSG_ERROR([al.exe not found. Make sure it's in PATH or use --with-al-path])
4848 AC_MSG_RESULT([$AL_PATH/al.exe])
4851 # Convert to posix path with 8.3 filename restrictions ( No spaces )
4852 AL_PATH=`cygpath -d "$AL_PATH"`
4853 AL_PATH=`cygpath -u "$AL_PATH"`
4855 dnl Check mscoree.lib / .NET Framework dir
4856 AC_MSG_CHECKING(.NET Framework)
4857 if test -n "$with_dotnet_framework_home"; then
4858 with_dotnet_framework_home=`cygpath -u "$with_dotnet_framework_home"`
4860 if test -f "$with_dotnet_framework_home/lib/mscoree.lib"; then
4861 DOTNET_FRAMEWORK_HOME="$with_dotnet_framework_home"
4863 if test -z "$DOTNET_FRAMEWORK_HOME"; then
4864 frametest=`./oowintool --dotnetsdk-dir`
4865 if test -f "$frametest/lib/mscoree.lib"; then
4866 DOTNET_FRAMEWORK_HOME="$frametest"
4868 frametest=`./oowintool --windows-sdk-home`
4869 if test -f "$frametest/lib/mscoree.lib" -o -f "$frametest/lib/win8/um/$SDK_ARCH/mscoree.lib"; then
4870 DOTNET_FRAMEWORK_HOME="$frametest"
4874 if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib" -a ! -f "$DOTNET_FRAMEWORK_HOME/lib/win8/um/$SDK_ARCH/mscoree.lib"; then
4875 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-dotnet-framework-home])
4877 AC_MSG_RESULT(found)
4879 PathFormat "$MIDL_PATH"
4880 MIDL_PATH="$formatted_path"
4882 PathFormat "$AL_PATH"
4883 AL_PATH="$formatted_path"
4885 PathFormat "$DOTNET_FRAMEWORK_HOME"
4886 DOTNET_FRAMEWORK_HOME="$formatted_path"
4888 PathFormat "$CSC_PATH"
4889 CSC_PATH="$formatted_path"
4893 dnl ===================================================================
4894 dnl Check if stdc headers are available excluding MSVC.
4895 dnl ===================================================================
4896 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
4900 dnl ===================================================================
4901 dnl Testing for C++ compiler and version...
4902 dnl ===================================================================
4904 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
4905 # AC_PROG_CXX sets CXXFLAGS to -g -O2 if not set, avoid that
4906 save_CXXFLAGS=$CXXFLAGS
4908 CXXFLAGS=$save_CXXFLAGS
4910 if test -n "$CC" -a -z "$CXX"; then
4915 dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk)
4916 if test "$GXX" = "yes"; then
4917 AC_MSG_CHECKING([the GNU C++ compiler version])
4919 _gpp_version=`$CXX -dumpversion`
4920 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
4922 if test "$_os" = "Darwin" -a "$with_macosx_sdk" = "10.4" -a "$_gpp_majmin" -ge "401"; then
4923 if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0"; then
4924 export CXX="$GCC_HOME/bin/g++-4.0"
4925 _gpp_majmin_2=`$CXX -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
4926 if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401"; then
4927 _gpp_majmin=$_gpp_majmin_2
4930 if test "$_gpp_majmin" -ge "401"; then
4931 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])
4933 AC_MSG_RESULT([implicitly using CXX=$CXX])
4936 AC_MSG_RESULT([checked (g++ $_gpp_version)])
4939 if test "$_gpp_majmin" = "304"; then
4940 AC_MSG_CHECKING([whether $CXX has the enum bug])
4941 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4942 extern "C" void abort (void);
4943 extern "C" void exit (int status);
4945 enum E { E0, E1, E2, E3, E4, E5 };
4947 void test (enum E e)
4949 if (e == E2 || e == E3 || e == E1)
4960 ]])],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents LibreOffice from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])],[AC_MSG_RESULT([no])],[])
4965 # prefx CXX with ccache if needed
4967 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
4968 if test "$CCACHE" != ""; then
4969 AC_MSG_CHECKING([whether $CXX is already ccached])
4971 save_CXXFLAGS=$CXXFLAGS
4972 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
4973 dnl an empty program will do, we're checking the compiler flags
4974 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
4975 [use_ccache=yes], [use_ccache=no])
4976 if test $use_ccache = yes; then
4977 AC_MSG_RESULT([yes])
4982 CXXFLAGS=$save_CXXFLAGS
4987 dnl ===================================================================
4988 dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
4989 dnl ===================================================================
4991 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
4994 dnl Check whether there's a C pre-processor.
4995 dnl ===================================================================
4996 dnl When using SunStudio compiler, there is a bug with the cc
4997 dnl preprocessor, so use CC preprocessor as the cc preprocessor
4998 dnl See Issuezilla #445.
4999 dnl ===================================================================
5000 if test "$_os" = "SunOS"; then
5008 dnl ===================================================================
5009 dnl Find integral type sizes and alignments
5010 dnl ===================================================================
5012 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5014 AC_CHECK_SIZEOF(long)
5015 AC_CHECK_SIZEOF(short)
5016 AC_CHECK_SIZEOF(int)
5017 AC_CHECK_SIZEOF(long long)
5018 AC_CHECK_SIZEOF(double)
5019 AC_CHECK_SIZEOF(void*)
5021 SIZEOF_SHORT=$ac_cv_sizeof_short
5022 SIZEOF_INT=$ac_cv_sizeof_int
5023 SIZEOF_LONG=$ac_cv_sizeof_long
5024 SIZEOF_LONGLONG=$ac_cv_sizeof_long_long
5025 SIZEOF_DOUBLE=$ac_cv_sizeof_double
5026 SIZEOF_POINTER=$ac_cv_sizeof_voidp
5028 dnl Allow build without AC_CHECK_ALIGNOF, grrr
5029 m4_pattern_allow([AC_CHECK_ALIGNOF])
5030 m4_ifdef([AC_CHECK_ALIGNOF],
5032 AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
5033 AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
5034 AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
5035 AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
5038 case "$_os-$host_cpu" in
5040 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=1
5041 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=1
5042 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=1
5043 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=1
5046 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
5047 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
5048 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=4
5049 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=4
5052 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
5053 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
5054 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=8
5055 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=8
5058 if test -z "$ac_cv_alignof_short" -o \
5059 -z "$ac_cv_alignof_int" -o \
5060 -z "$ac_cv_alignof_long" -o \
5061 -z "$ac_cv_alignof_double"; then
5062 AC_MSG_ERROR([Your Autoconf doesn't have [AC_][CHECK_ALIGNOF]. You need to set the environment variables ac_cv_alignof_short, ac_cv_alignof_int, ac_cv_alignof_long and ac_cv_alignof_double.])
5068 ALIGNOF_SHORT=$ac_cv_alignof_short
5069 ALIGNOF_INT=$ac_cv_alignof_int
5070 ALIGNOF_LONG=$ac_cv_alignof_long
5071 ALIGNOF_DOUBLE=$ac_cv_alignof_double
5074 WORDS_BIGENDIAN=$ac_cv_c_bigendian
5076 dnl Check for large file support
5078 if test -n "$ac_cv_sys_file_offset_bits" -a "$ac_cv_sys_file_offset_bits" != "no"; then
5079 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5081 if test -n "$ac_cv_sys_large_files" -a "$ac_cv_sys_large_files" != "no"; then
5082 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
5090 if test "$BITNESS_OVERRIDE" = ""; then
5102 AC_SUBST(WORDS_BIGENDIAN)
5103 AC_SUBST(LFS_CFLAGS)
5105 AC_SUBST(SIZEOF_SHORT)
5106 AC_SUBST(SIZEOF_INT)
5107 AC_SUBST(SIZEOF_LONG)
5108 AC_SUBST(SIZEOF_LONGLONG)
5109 AC_SUBST(SIZEOF_DOUBLE)
5110 AC_SUBST(SIZEOF_POINTER)
5111 AC_SUBST(ALIGNOF_SHORT)
5112 AC_SUBST(ALIGNOF_INT)
5113 AC_SUBST(ALIGNOF_LONG)
5114 AC_SUBST(ALIGNOF_DOUBLE)
5116 dnl ===================================================================
5117 dnl Check if valgrind headers are available
5118 dnl ===================================================================
5119 if test "$cross_compiling" = yes -o "$ENABLE_DBGUTIL" != TRUE; then
5120 ENABLE_VALGRIND=FALSE
5122 prev_cppflags=$CPPFLAGS
5123 CPPFLAGS="$CPPFLAGS $VALGRIND_CFLAGS"
5124 AC_CHECK_HEADER([valgrind/valgrind.h],
5125 [ENABLE_VALGRIND=TRUE],[ENABLE_VALGRIND=FALSE])
5126 CPPFLAGS=$prev_cppflags
5128 AC_SUBST([ENABLE_VALGRIND])
5129 if test "$ENABLE_VALGRIND" = FALSE; then
5132 AC_SUBST([VALGRIND_CFLAGS])
5134 dnl ===================================================================
5135 dnl Compiler plugins
5136 dnl ===================================================================
5139 # currently only Clang
5140 if test "$COM_GCC_IS_CLANG" = "TRUE"; then
5141 if test -n "$enable_compiler_plugins"; then
5142 compiler_plugins="$enable_compiler_plugins"
5143 elif test -n "$ENABLE_DBGUTIL"; then
5144 compiler_plugins=test
5148 if test "$compiler_plugins" != "no"; then
5150 save_CPPFLAGS=$CPPFLAGS
5151 CPPFLAGS="$CPPFLAGS $CLANGPLUGIN_CPPFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
5152 AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
5153 [COMPILER_PLUGINS=TRUE],
5155 if test "$compiler_plugins" = "yes"; then
5156 AC_MSG_ERROR([Cannot find Clang headers to build compiler plugins.])
5158 AC_MSG_WARN([Cannot find Clang headers to build compiler plugins, plugins disabled])
5159 add_warning "Cannot find Clang headers to build compiler plugins, plugins disabled."
5162 CPPFLAGS=$save_CPPFLAGS
5166 if test "$enable_compiler_plugins" = "yes"; then
5167 AC_MSG_ERROR([Compiler plugins are currently supported only with the Clang compiler.])
5170 AC_SUBST(COMPILER_PLUGINS)
5171 AC_SUBST(CLANGPLUGIN_CPPFLAGS)
5173 dnl ===================================================================
5174 dnl Set the MinGW sys-root
5175 dnl ===================================================================
5176 if test "$WITH_MINGW" = "yes"; then
5177 for sysroot in /usr/i686-w64-mingw32/sys-root/mingw; do
5178 if test -d "$sysroot"; then
5179 MINGW_SYSROOT="$sysroot"
5184 AC_SUBST([MINGW_SYSROOT])
5186 dnl ===================================================================
5187 dnl Set the MinGW include directories
5188 dnl ===================================================================
5189 if test "$WITH_MINGW" = "yes"; then
5190 AC_MSG_CHECKING([for MinGW include path])
5191 cat >conftest.$ac_ext <<_ACEOF
5193 #include <bits/c++config.h>
5195 _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`
5197 if test -z "$_mingw_lib_include_path"; then
5198 _mingw_lib_include_path="NO_LIB_INCLUDE"
5199 AC_MSG_RESULT([no MinGW include path])
5201 AC_MSG_RESULT([$_mingw_lib_include_path])
5203 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
5204 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
5206 mingw_crtbegin=`$CC -print-file-name=crtbegin.o`
5207 MINGW_CLIB_DIR=`dirname $mingw_crtbegin`
5211 AC_MSG_CHECKING([for dynamic libgcc])
5212 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5214 using namespace std;
5215 ]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[
5216 MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's@.*DLL Name: @@'`
5217 if test -n "$MINGW_GCCDLL"; then
5218 MINGW_SHARED_GCCLIB=YES
5219 AC_MSG_RESULT([ $MINGW_GCCDLL])
5221 MINGW_SHARED_GCCLIB=NO
5224 ],[ AC_MSG_RESULT([no])
5228 AC_MSG_CHECKING([for dynamic libstdc++])
5229 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5231 using namespace std;
5232 ]], [[ cout << "Hello there." << endl; ]])],[
5233 MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's@.*DLL Name: @@'`
5234 if test -n "$MINGW_GXXDLL"; then
5235 mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
5236 mingw_gxxdll_root=${mingw_gxxdll_root#lib}
5237 if test "$CROSS_COMPILING" = "YES"; then
5239 mingw_gxxdll_root=${mingw_gxxdll_root%-[[0-9]]}
5241 MINGW_SHARED_LIBSTDCPP=-l$mingw_gxxdll_root
5242 MINGW_SHARED_GXXLIB=YES
5243 AC_MSG_RESULT([$MINGW_GXXDLL])
5245 MINGW_SHARED_GXXLIB=NO
5248 ],[ AC_MSG_RESULT([no])
5254 AC_SUBST(MINGW_CLIB_DIR)
5255 AC_SUBST(MINGW_SHARED_GCCLIB)
5256 AC_SUBST(MINGW_SHARED_GXXLIB)
5257 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
5258 AC_SUBST(MINGW_GCCDLL)
5259 AC_SUBST(MINGW_GXXDLL)
5262 dnl ===================================================================
5263 dnl Extra checking for the SunOS compiler
5264 dnl ===================================================================
5265 if test "$_os" = "SunOS"; then
5266 dnl SunStudio C++ compiler packaged with SunStudio C compiler
5267 if test "$CC" = "cc"; then
5268 AC_MSG_CHECKING([SunStudio C++ Compiler])
5269 if test "$CXX" != "CC"; then
5270 AC_MSG_WARN([SunStudio C++ was not found])
5271 add_warning "SunStudio C++ was not found"
5273 AC_MSG_RESULT([checked])
5278 dnl *************************************************************
5279 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
5280 dnl *************************************************************
5281 if test "$WITH_MINGW" = "yes"; then
5282 AC_MSG_CHECKING([exception type])
5284 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
5286 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
5288 ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
5290 AC_MSG_RESULT($exceptions_type)
5294 EXCEPTIONS="$exceptions_type"
5295 AC_SUBST(EXCEPTIONS)
5297 dnl ===================================================================
5298 dnl thread-safe statics
5299 dnl ===================================================================
5300 AC_MSG_CHECKING([whether $CXX supports thread safe statics])
5301 unset HAVE_THREADSAFE_STATICS
5302 if test "$GCC" = "yes"; then
5303 dnl -fthreadsafe-statics is available since GCC 4, so always available for
5304 dnl us. However, some C++ runtimes use a single lock for all static
5305 dnl variables, which can cause deadlock in multi-threaded applications.
5306 dnl This is not easily tested here; for POSIX-based systems, if executing
5307 dnl the following C++ program does not terminate then the tool chain
5308 dnl apparently has this problem:
5310 dnl #include <pthread.h>
5311 dnl int h() { return 0; }
5312 dnl void * g(void * unused) {
5313 dnl static int n = h();
5318 dnl pthread_create(&t, 0, g, 0);
5319 dnl pthread_join(t, 0);
5323 dnl static int n = f();
5327 dnl Mac OS X up to at least 10.7.1 is known to have this problem, as is at
5328 dnl least one instance of GCC 4.2.4 (used on a "Linux ooobuild1.osuosl.org
5329 dnl 2.6.9-101.plus.c4smp #1 SMP Thu Jul 21 19:08:15 EDT 2011 i686 i686 i386
5330 dnl GNU/Linux" machine); see the definition of __cxa_guard_acquire in GCC's
5331 dnl libstdc++-v3/libsupc++/guard.cc for what #ifdefs actually make a
5332 dnl difference there. Conservative advice from Jakub Jelinek is to assume
5333 dnl it working in GCC >= 4.3:
5334 if test "$_os" = "Darwin" -o $_os = Android -o "${GCCVER?}" -lt 040300; then
5335 AC_MSG_RESULT([broken (i.e., no)])
5337 HAVE_THREADSAFE_STATICS=TRUE
5338 AC_MSG_RESULT([yes])
5341 AC_MSG_RESULT([unknown (assuming no)])
5343 AC_SUBST(HAVE_THREADSAFE_STATICS)
5345 dnl ===================================================================
5346 dnl visibility and c++0x features
5347 dnl ===================================================================
5348 if test "$GCC" = "yes"; then
5349 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
5351 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
5352 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_VISIBILITY_FEATURE=TRUE ],[])
5355 if test "$COM_GCC_IS_CLANG" = TRUE -a $_os = Darwin; then
5356 # It seems that with Apple's Clang, visibility doesn't work as
5357 # we would want at least in the connectivity and dbaccess
5358 # modules. This might be because of something peculiar in
5359 # those modules? Whatever.
5360 HAVE_GCC_VISIBILITY_FEATURE=
5363 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
5364 AC_MSG_RESULT([yes])
5369 AC_MSG_CHECKING([whether $CC supports -Wno-long-double])
5371 CFLAGS="$CFLAGS -Werror -Wno-long-double"
5372 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_NO_LONG_DOUBLE=TRUE ],[])
5374 if test "$HAVE_GCC_NO_LONG_DOUBLE" = "TRUE"; then
5375 AC_MSG_RESULT([yes])
5380 AC_MSG_CHECKING([whether $CC supports -mno-avx])
5382 CFLAGS="$CFLAGS -Werror -mno-avx"
5383 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
5385 if test "$HAVE_GCC_AVX" = "TRUE"; then
5386 AC_MSG_RESULT([yes])
5391 AC_MSG_CHECKING([whether $CC supports atomic functions])
5392 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
5394 if (__sync_add_and_fetch(&v, 1) != 1 ||
5395 __sync_sub_and_fetch(&v, 1) != 0)
5397 __sync_synchronize();
5398 if (__sync_val_compare_and_swap(&v, 0, 1) != 0 ||
5402 ]])],[HAVE_GCC_BUILTIN_ATOMIC=TRUE],[])
5403 if test "$HAVE_GCC_BUILTIN_ATOMIC" = "TRUE"; then
5404 AC_MSG_RESULT([yes])
5409 AC_MSG_CHECKING([whether $CXX supports -std=gnu++0x without Language Defect 757])
5410 if test "$GCCVER" -ge 040700 -a "$GCCVER" -lt 040702; then
5411 AC_MSG_NOTICE([Not using -std=gnu++0x on $CXX version 4.7.0/4.7.1 due to libstdc++ ABI breakage.])
5413 save_CXXFLAGS=$CXXFLAGS
5414 CXXFLAGS="$CXXFLAGS -std=gnu++0x"
5417 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5421 // some Clang fail when compiling against GCC 4.7 headers with --std=gnu++0x
5423 template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
5439 a thinga[]={{0,0}, {1,1}};
5440 b thingb[]={{0,0}, {1,1}};
5441 size_t i = sizeof(sal_n_array_size(thinga));
5442 size_t j = sizeof(sal_n_array_size(thingb));
5443 return !(i != 0 && j != 0);
5444 ]])],[HAVE_CXX0X=TRUE],[])
5447 CXXFLAGS=$save_CXXFLAGS
5449 if test "$HAVE_CXX0X" = "TRUE"; then
5450 AC_MSG_RESULT([yes])
5456 AC_SUBST(HAVE_CXX0X)
5457 AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
5458 AC_SUBST(HAVE_GCC_AVX)
5459 AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
5461 dnl ===================================================================
5462 dnl Check for C++11 perfect forwarding support
5463 dnl ===================================================================
5464 HAVE_CXX11_PERFECT_FORWARDING=
5465 AC_MSG_CHECKING([whether $CXX supports C++11 perfect forwarding])
5466 save_CXXFLAGS=$CXXFLAGS
5467 if test "$HAVE_CXX0X" = TRUE; then
5468 CXXFLAGS="$CXXFLAGS -std=gnu++0x"
5471 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5473 template<typename T, typename... Args> T * f(Args &&... v) {
5474 return new T(std::forward<Args>(v)...);
5478 ]])], [perfect_forwarding=yes], [perfect_forwarding=no])
5480 CXXFLAGS=$save_CXXFLAGS
5481 AC_MSG_RESULT([$perfect_forwarding])
5482 if test "$perfect_forwarding" = yes; then
5483 HAVE_CXX11_PERFECT_FORWARDING=TRUE
5485 AC_SUBST([HAVE_CXX11_PERFECT_FORWARDING])
5487 dnl ===================================================================
5488 dnl system stl sanity tests
5489 dnl ===================================================================
5490 HAVE_GCC_VISIBILITY_BROKEN=
5491 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \); then
5495 save_CPPFLAGS="$CPPFLAGS"
5496 if test -n "$MACOSX_SDK_PATH"; then
5497 CPPFLAGS="-isysroot $MACOSX_SDK_PATH $CPPFLAGS"
5500 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
5501 dnl gcc#19664, gcc#22482, rhbz#162935
5502 AC_MSG_CHECKING([if STL headers are visibility safe (GCC bug 22482)])
5503 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
5504 AC_MSG_RESULT([$stlvisok])
5505 if test "$stlvisok" = "no"; then
5506 AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility])
5507 add_warning "Your gcc STL headers are not visibility safe. Disabling visibility"
5508 unset HAVE_GCC_VISIBILITY_FEATURE
5512 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
5513 sharedlink_ldflags_save=$LDFLAGS
5514 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden $PICSWITCH $LINKFLAGSSHL"
5516 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
5517 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5519 using namespace std;
5521 istringstream strm( "test" ); return 0;
5523 # Ugh, surely bad to assume an error message will contain
5524 # the word "unresolvable", a problem with
5525 # -fvisibility-inlines-hidden and STL headers might cause
5526 # some more obscure message on some platform, and anway,
5527 # the error message could be localised.
5528 [$EGREP -q unresolvable conftest.err;
5529 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi],[gccvisok=no
5531 AC_MSG_RESULT([$gccvisok])
5532 if test "$gccvisok" = "no"; then
5533 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
5534 add_warning "Your gcc is not -fvisibility-inlines-hidden safe, disabling that."
5535 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
5538 LDFLAGS=$sharedlink_ldflags_save
5541 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$HAVE_GCC_VISIBILITY_BROKEN" != "TRUE"; then
5542 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe (Clang bug 11250)])
5543 cat > conftestlib1.cc <<_ACEOF
5544 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
5545 struct S2: S1<int> { virtual ~S2(); };
5548 cat > conftestlib2.cc <<_ACEOF
5549 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
5550 struct S2: S1<int> { virtual ~S2(); };
5551 struct S3: S2 { virtual ~S3(); }; S3::~S3() {}
5553 gccvisinlineshiddenok=yes
5554 if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST >/dev/null 2>&5; then
5555 gccvisinlineshiddenok=no
5557 if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 $LINKFLAGSNOUNDEFS -o libconftest2$DLLPOST >/dev/null 2>&5; then
5558 gccvisinlineshiddenok=no
5563 AC_MSG_RESULT([$gccvisinlineshiddenok])
5564 if test "$gccvisinlineshiddenok" = "no"; then
5565 AC_MSG_WARN([Your gcc/clang is not -fvisibility-inlines-hidden safe, disabling that.])
5566 add_warning "Your gcc/clang is not -fvisibility-inlines-hidden safe, disabling that."
5567 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
5571 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
5572 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
5573 cat >visibility.cxx <<_ACEOF
5574 #pragma GCC visibility push(hidden)
5575 struct __attribute__ ((visibility ("default"))) TestStruct {
5578 __attribute__ ((visibility ("default"))) void TestFunc() {
5582 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
5587 if test "$_os" = "Darwin" -o "$WITH_MINGW" = "yes"; then
5590 if $EGREP -q '@PLT|@GOT' visibility.s; then
5602 rm -f visibility.s visibility.cxx
5604 AC_MSG_RESULT([$gccvisbroken])
5605 if test "$gccvisbroken" = "yes"; then
5606 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
5607 add_warning "Your gcc is not -fvisibility=hidden safe. Disabling visibility"
5608 unset HAVE_GCC_VISIBILITY_FEATURE
5612 CPPFLAGS="$save_CPPFLAGS"
5617 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
5618 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
5620 dnl ===================================================================
5622 dnl Pre-C++11 does not allow types without linkage as template arguments.
5623 dnl Substitution Failure Is Not An Error is an idiom that disables
5624 dnl template instances that would cause an error, without actually
5625 dnl causing an error. Old gcc (pre-4.0.2) however causes a real error.
5626 dnl http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21514
5627 dnl ===================================================================
5628 HAVE_SFINAE_ANONYMOUS_BROKEN=
5629 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \); then
5632 AC_MSG_CHECKING([if SFINAE is broken with anonymous types])
5633 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5634 enum { AnonymousEnumValue };
5635 template< typename T > class TestPredicate {};
5636 template<> class TestPredicate< int > { public: typedef bool Type; };
5637 template< typename T >
5638 bool test( const T&, typename TestPredicate< T >::Type = false )
5643 test( AnonymousEnumValue );
5644 ]])],[sfinae_anonymous_broken=no],[sfinae_anonymous_broken=yes
5646 AC_MSG_RESULT([$sfinae_anonymous_broken])
5647 if test "$sfinae_anonymous_broken" = "yes"; then
5648 HAVE_SFINAE_ANONYMOUS_BROKEN="TRUE"
5653 AC_SUBST(HAVE_SFINAE_ANONYMOUS_BROKEN)
5655 dnl ===================================================================
5657 dnl ===================================================================
5659 HAVE_GCC_FNO_DEFAULT_INLINE=
5660 HAVE_GCC_FNO_ENFORCE_EH_SPECS=
5661 if test "$GCC" = "yes"; then
5662 AC_MSG_CHECKING([whether $CXX supports -fno-default-inline])
5663 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
5664 # Option just ignored and silly warning that isn't a real
5669 save_CXXFLAGS=$CXXFLAGS
5670 CXXFLAGS="$CFLAGS -Werror -fno-default-inline"
5671 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_DEFAULT_INLINE=TRUE ],[])
5672 CXXFLAGS=$save_CXXFLAGS
5675 if test "$HAVE_GCC_FNO_DEFAULT_INLINE" = "TRUE"; then
5676 AC_MSG_RESULT([yes])
5681 AC_MSG_CHECKING([whether $CXX supports -fno-enforce-eh-specs])
5682 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
5687 save_CXXFLAGS=$CXXFLAGS
5688 CXXFLAGS="$CFLAGS -Werror -fno-enforce-eh-specs"
5689 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_ENFORCE_EH_SPECS=TRUE ],[])
5690 CXXFLAGS=$save_CXXFLAGS
5693 if test "$HAVE_GCC_FNO_ENFORCE_EH_SPECS" = "TRUE"; then
5694 AC_MSG_RESULT([yes])
5699 AC_SUBST(HAVE_GCC_FNO_DEFAULT_INLINE)
5700 AC_SUBST(HAVE_GCC_FNO_ENFORCE_EH_SPECS)
5703 dnl ===================================================================
5705 dnl ===================================================================
5706 AC_MSG_CHECKING([which memory allocator to use])
5707 if test "$with_alloc" = "system"; then
5708 AC_MSG_RESULT([system])
5710 AC_CHECK_FUNCS([malloc realloc calloc free])
5712 if test "$with_alloc" = "tcmalloc"; then
5713 AC_MSG_RESULT(tcmalloc)
5714 if ! echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
5715 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
5717 AC_CHECK_LIB([tcmalloc], [malloc], [:],
5718 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
5721 if test "$with_alloc" = "jemalloc"; then
5722 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
5723 AC_MSG_RESULT(jemalloc)
5725 CFLAGS="$CFLAGS -pthread"
5726 AC_CHECK_LIB([jemalloc], [malloc], [:],
5727 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
5731 AC_MSG_RESULT([system])
5733 AC_CHECK_FUNCS([malloc realloc calloc free])
5736 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
5737 AC_MSG_RESULT([internal])
5739 AC_CHECK_FUNCS(posix_fallocate, HAVE_POSIX_FALLOCATE=YES, [HAVE_POSIX_FALLOCATE=NO])
5740 AC_SUBST(HAVE_POSIX_FALLOCATE)
5743 dnl ===================================================================
5744 dnl Custom build version
5745 dnl ===================================================================
5747 AC_MSG_CHECKING([whether to add custom build version])
5748 if test "$with_build_version" != ""; then
5749 BUILD_VER_STRING=$with_build_version
5750 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
5755 AC_SUBST(BUILD_VER_STRING)
5757 dnl ===================================================================
5758 dnl Java support enable
5759 dnl ===================================================================
5760 AC_MSG_CHECKING([whether to build with Java support])
5761 if test "$with_java" != "no"; then
5762 if test "$DISABLE_SCRIPTING" = TRUE; then
5763 AC_MSG_RESULT([no, overridden by --disable-scripting])
5767 AC_MSG_RESULT([yes])
5775 AC_SUBST(SOLAR_JAVA)
5777 dnl SOLAR_JAVA="YES" (yes, silly name, should rename) indicates whether we
5778 dnl want there to be *run-time* (and build-time) support for Java extensions in the
5779 dnl built LibreOffice.
5781 dnl SOLAR_JAVA="BUILD" is claimed to indicate build-time only support
5782 dnl (no runtime support). It doesn't seem to ever be set to this
5783 dnl value, though, and everywhere SOLAR_JAVA is only checked for being
5784 dnl empty or non-empty.
5786 dnl SOLAR_JAVA="" indicate no java support at all
5788 JITC_PROCESSOR_TYPE=""
5789 if test "$_os" = "Linux" -a "$host_cpu" = "powerpc"; then
5790 # IBMs JDK needs this...
5791 JITC_PROCESSOR_TYPE=6
5792 export JITC_PROCESSOR_TYPE
5794 AC_SUBST([JITC_PROCESSOR_TYPE])
5796 if test $_os = "WINNT"; then
5797 AC_MSG_CHECKING([for Microsoft_VC${VCVER}_CRT_x86.msm])
5798 if ./oowintool --msvc-find-msms; then
5799 AC_MSG_RESULT([yes])
5800 SCPDEFS="$SCPDEFS -DWITH_VC"$VCVER"_REDIST"
5806 dnl ===================================================================
5808 dnl ===================================================================
5809 if test "$SOLAR_JAVA" != ""; then
5811 # Windows-specific tests
5812 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
5813 if test "$BITNESS_OVERRIDE" = 64; then
5815 otherbitness="32-bit"
5818 otherbitness="64-bit"
5821 if test -z "$with_jdk_home"; then
5823 # Unfortunately apparently no way to find, if needed, the 64-bit
5824 # JDK in the Registry from the 32-bit Perl oowintool
5826 _jdk_home=`./oowintool --jdk-home`
5827 if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
5828 with_jdk_home="$_jdk_home"
5829 howfound="found by oowintool"
5831 AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK])
5834 test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
5835 howfound="you passed"
5839 JAVA_HOME=; export JAVA_HOME
5840 if test -z "$with_jdk_home"; then
5841 AC_PATH_PROG(JAVAINTERPRETER, $with_java)
5843 _java_path="$with_jdk_home/bin/$with_java"
5844 dnl Check if there is a Java interpreter at all.
5845 if test -x "$_java_path"; then
5846 JAVAINTERPRETER=$_java_path
5848 AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
5852 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
5853 # Check that the JDK found is correct architecture
5854 # Why is this necessary, we don't link with any library from the JDK I think,
5856 shortjdkhome=`cygpath -d "$with_jdk_home"`
5857 if test "$BITNESS_OVERRIDE" = 64 -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
5858 AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
5859 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
5860 elif test "$BITNESS_OVERRIDE" = "" -a -f "$_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" != "" >/dev/null; then
5861 AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
5862 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
5865 if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then
5866 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
5868 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
5869 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
5870 elif test "$_os" = "Darwin"; then
5871 dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X,
5872 dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
5873 dnl to run in 32 bit mode and be able to load LibreOffice jnilibs:
5874 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
5875 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
5876 AC_MSG_RESULT([yes])
5884 dnl ===================================================================
5886 dnl ===================================================================
5888 # Note that JAVA_HOME as for now always means the *build* platform's
5889 # JAVA_HOME. Whether all the complexity here actually is needed any
5890 # more or not, no idea.
5892 if test "$SOLAR_JAVA" != ""; then
5894 AC_MSG_CHECKING([the installed JDK])
5895 if test -n "$JAVAINTERPRETER"; then
5896 dnl java -version sends output to stderr!
5897 if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
5898 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
5899 elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then
5901 AC_MSG_RESULT([checked (gcj)])
5902 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
5903 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
5905 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "BEA"` -gt 0; then
5906 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
5907 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "IBM"` -gt 0; then
5910 dnl IBM JDK specific tests
5911 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
5912 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
5914 if test "$_jdk_ver" -lt 10500; then
5915 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
5918 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
5920 if test "$with_jdk_home" = ""; then
5921 AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
5922 you must use the "--with-jdk-home" configure option explicitly])
5925 JAVA_HOME=$with_jdk_home
5930 dnl Sun JDK specific tests
5931 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
5932 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
5934 if test "$_jdk_ver" -lt 10500; then
5935 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
5937 AC_MSG_RESULT([checked (JDK $_jdk)])
5938 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
5939 if test "$_os" = "WINNT"; then
5940 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
5944 AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
5948 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
5951 dnl ===================================================================
5952 dnl Set target Java bytecode version
5953 dnl ===================================================================
5954 if test "$SOLAR_JAVA" != ""; then
5955 _java_target_ver="1.5"
5957 JAVA_SOURCE_VER="$_java_target_ver"
5958 JAVA_TARGET_VER="$_java_target_ver"
5961 dnl ===================================================================
5962 dnl Checks for javac
5963 dnl ===================================================================
5964 if test "$SOLAR_JAVA" != ""; then
5965 if test "$JDK" = "gcj"; then
5966 javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
5968 javacompiler="javac"
5970 if test -z "$with_jdk_home"; then
5971 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
5973 _javac_path="$with_jdk_home/bin/$javacompiler"
5974 dnl Check if there is a Java compiler at all.
5975 if test -x "$_javac_path"; then
5976 JAVACOMPILER=$_javac_path
5979 if test -z "$JAVACOMPILER"; then
5980 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
5982 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
5983 if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then
5984 JAVACOMPILER="${JAVACOMPILER}.exe"
5986 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
5987 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
5990 if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Eclipse Java Compiler"` -gt 0; then
5991 AC_MSG_CHECKING([re-checking JDK])
5993 AC_MSG_RESULT([checked (ecj)])
5994 _gij_longver="40200"
5999 dnl ===================================================================
6000 dnl Checks that javac is gcj
6001 dnl ===================================================================
6002 if test "$SOLAR_JAVA" != ""; then
6003 if test `$JAVACOMPILER --version 2>&1 | $GREP -c "GCC"` -gt 0; then
6007 AC_SUBST(JAVACISGCJ)
6010 dnl ===================================================================
6011 dnl Checks that javac is kaffe
6012 dnl ===================================================================
6013 if test "$SOLAR_JAVA" != ""; then
6014 if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
6018 AC_SUBST(JAVACISKAFFE)
6020 dnl ===================================================================
6021 dnl Checks for javadoc
6022 dnl ===================================================================
6023 if test "$SOLAR_JAVA" != ""; then
6024 if test -z "$with_jdk_home"; then
6025 AC_PATH_PROG(JAVADOC, javadoc)
6027 _javadoc_path="$with_jdk_home/bin/javadoc"
6028 dnl Check if there is a javadoc at all.
6029 if test -x "$_javadoc_path"; then
6030 JAVADOC=$_javadoc_path
6032 AC_PATH_PROG(JAVADOC, javadoc)
6035 if test -z "$JAVADOC"; then
6036 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
6038 if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
6039 if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
6040 JAVADOC="${JAVADOC}.exe"
6042 JAVADOC=`cygpath -d "$JAVADOC"`
6043 JAVADOC=`cygpath -u "$JAVADOC"`
6046 if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
6047 JAVADOCISGJDOC="yes"
6050 AC_SUBST(JAVADOCISGJDOC)
6052 if test "$SOLAR_JAVA" != ""; then
6053 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
6054 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
6055 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
6056 # try to recover first by looking whether we have a alternatives
6057 # system as in Debian or newer SuSEs where following /usr/bin/javac
6058 # over /etc/alternatives/javac leads to the right bindir where we
6059 # just need to strip a bit away to get a valid JAVA_HOME
6060 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
6061 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
6062 # maybe only one level of symlink (e.g. on Mac)
6063 JAVA_HOME=$(readlink $JAVACOMPILER)
6064 if test "$(dirname $JAVA_HOME)" = "."; then
6065 # we've got no path to trim back
6070 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
6071 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
6072 add_warning "JAVA_HOME is set to /usr - this is very likely to be incorrect"
6073 add_warning "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home"
6075 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
6076 if test "$JAVA_HOME" != "/usr"; then
6077 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
6078 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
6079 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
6080 dnl Tiger already returns a JDK path..
6081 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
6083 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
6087 # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
6089 dnl now if JAVA_HOME has been set to empty, then call findhome to find it
6090 if test -z "$JAVA_HOME"; then
6091 if test "x$with_jdk_home" = "x"; then
6092 cat > findhome.java <<_ACEOF
6093 [import java.io.File;
6097 public static void main(String args[])
6099 String jrelocation = System.getProperty("java.home");
6100 File jre = new File(jrelocation);
6101 System.out.println(jre.getParent());
6105 AC_MSG_CHECKING([if javac works])
6106 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
6107 AC_TRY_EVAL(javac_cmd)
6108 if test $? = 0 -a -f ./findhome.class; then
6109 AC_MSG_RESULT([javac works])
6111 echo "configure: javac test failed" >&5
6112 cat findhome.java >&5
6113 AC_MSG_ERROR([javac does not work - java projects will not build!])
6115 AC_MSG_CHECKING([if gij knows its java.home])
6116 JAVA_HOME=`$JAVAINTERPRETER findhome`
6117 if test $? = 0 -a "$JAVA_HOME" != ""; then
6118 AC_MSG_RESULT([$JAVA_HOME])
6120 echo "configure: java test failed" >&5
6121 cat findhome.java >&5
6122 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
6124 # clean-up after ourselves
6125 rm -f ./findhome.java ./findhome.class
6127 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
6131 dnl second sanity check JAVA_HOME if possible
6132 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
6133 # now check if $JAVA_HOME is really valid
6134 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
6135 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
6138 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
6141 if test "$JAVA_HOME_OK" = "NO"; then
6142 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
6143 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
6144 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
6145 add_warning "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script"
6146 add_warning "attempted to find JAVA_HOME automatically, but apparently it failed"
6147 add_warning "in case JAVA_HOME is incorrectly set, some projects with not be built correctly"
6150 PathFormat "$JAVA_HOME"
6151 JAVA_HOME="$formatted_path"
6156 if test "$SOLAR_JAVA" != ""; then
6157 AC_MSG_CHECKING([for jawt lib name])
6158 if test "$JDK" = "gcj"; then
6160 save_LDFLAGS=$LDFLAGS
6161 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
6162 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
6163 exec 6>/dev/null # no output
6164 AC_CHECK_HEADER(jni.h, [],
6165 [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
6166 AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
6167 exec 6>&1 # output on again
6169 LDFLAGS=$save_LDFLAGS
6171 # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
6172 # A workaround is to link also against libpmawt.so
6173 if test "$JDK" = "ibm"; then
6175 save_LDFLAGS=$LDFLAGS
6176 save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
6177 CFLAGS="$CFLAGS -I$JAVA_HOME/include"
6178 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
6179 LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
6180 export LD_LIBRARY_PATH
6181 exec 6>/dev/null # no output
6182 AC_CHECK_HEADER(jni.h, [],
6183 [AC_MSG_ERROR([jni.h could not be found.])], [])
6184 AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
6185 if test -z "$AWTLIB"; then
6186 LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
6187 AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
6189 exec 6>&1 # output on again
6191 LDFLAGS=$save_LDFLAGS
6192 LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
6194 if test -z "$AWTLIB"; then
6195 if test $_os = WINNT -a "$WITH_MINGW" != yes; then
6201 AC_MSG_RESULT([$AWTLIB])
6206 if test "$SOLAR_JAVA" != ""; then
6209 # If your platform follow the common pattern
6210 # just define JAVA_ARCH and JAVA_TOOLKIT for it
6211 # if not, leave JAVA_ARCH empty and define JAVALIB manually
6212 # if you don't want JAVALIB to be exported at all
6213 # define x_JAVALIB=[\#]
6224 JAVA_TOOLKIT="classic"
6225 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6226 SOLARINC="$SOLARINC -I$JAVA_HOME/include/aix"
6227 SOLARINC="$SOLARINC -I$JAVA_HOME/include/native_threads/include"
6232 JDKLIB="$JAVA_HOME/lib"
6233 SOLARINC="$SOLARINC -I$JAVA_HOME/include/win32"
6234 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6239 SOLARINC="$SOLARINC -I$FRAMEWORKSHOME/JavaVM.framework/Versions/Current/Headers -I$FRAMEWORKSHOME/JavaVM/Headers"
6246 JAVA_TOOLKIT="client"
6250 JAVA_TOOLKIT="server"
6253 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6254 SOLARINC="$SOLARINC -I$JAVA_HOME/include/native_threads/include"
6261 JAVA_TOOLKIT="client"
6264 if test "`echo $JAVA_HOME | sed -e 's,.*/,,'`" = "linux"; then
6266 JAVA_TOOLKIT="client"
6269 JAVA_TOOLKIT="server"
6273 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6274 SOLARINC="$SOLARINC -I$JAVA_HOME/include/freebsd"
6275 SOLARINC="$SOLARINC -I$JAVA_HOME/include/bsd"
6276 SOLARINC="$SOLARINC -I$JAVA_HOME/include/linux"
6277 SOLARINC="$SOLARINC -I$JAVA_HOME/include/native_threads/include"
6284 JAVA_TOOLKIT="client"
6288 JAVA_TOOLKIT="server"
6291 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6292 SOLARINC="$SOLARINC -I$JAVA_HOME/include/native_threads/include"
6301 JAVA_TOOLKIT="server"
6305 JAVA_TOOLKIT="server"
6309 JAVA_TOOLKIT="server"
6316 JRE_BASE_DIR="$JAVA_HOME/jre/bin"
6317 JAVALIB="-L$JAVA_HOME/$LIB64 -L$JRE_BASE_DIR -L$JRE_BASE_DIR/classic -L$JRE_BASE_DIR/native_thread"
6320 JAVA_TOOLKIT="jrockit"
6323 JAVA_TOOLKIT="client"
6329 JAVA_TOOLKIT="server"
6333 JAVA_TOOLKIT="server"
6335 mips|mips64|mipsel|mips64el)
6336 JAVA_ARCH="$host_cpu"
6337 JAVA_TOOLKIT="server"
6340 JAVA_ARCH="$host_cpu"
6341 JAVA_TOOLKIT="client"
6347 JAVA_TOOLKIT="classic"
6350 JAVA_TOOLKIT="client"
6353 JAVA_TOOLKIT="server"
6359 if test "$JDK" = "gcj"; then
6360 JAVA_TOOLKIT="client"
6362 JAVA_TOOLKIT="server"
6367 JAVA_TOOLKIT="server"
6371 JAVA_TOOLKIT="server"
6375 JAVA_TOOLKIT="server"
6379 JAVA_TOOLKIT="server"
6382 AC_MSG_ERROR([No JAVALIB definition host_cpu $host_cpu for host_os $host_os])
6385 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6386 SOLARINC="$SOLARINC -I$JAVA_HOME/include/linux"
6387 SOLARINC="$SOLARINC -I$JAVA_HOME/include/native_threads/include"
6396 JAVA_TOOLKIT="server"
6403 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6411 JAVA_TOOLKIT="client"
6415 JAVA_TOOLKIT="classic"
6419 JAVA_TOOLKIT="client"
6423 JAVA_TOOLKIT="client"
6426 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6427 SOLARINC="$SOLARINC -I$JAVA_HOME/include/netbsd"
6428 SOLARINC="$SOLARINC -I$JAVA_HOME/include/native_threads/include"
6435 JAVA_TOOLKIT="client"
6439 JAVA_TOOLKIT="server"
6442 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6443 SOLARINC="$SOLARINC -I$JAVA_HOME/include/openbsd"
6444 SOLARINC="$SOLARINC -I$JAVA_HOME/include/native_threads/include"
6458 SOLARINC="$SOLARINC -I$JAVA_HOME/include"
6459 SOLARINC="$SOLARINC -I$JAVA_HOME/include/solaris"
6460 SOLARINC="$SOLARINC -I$JAVA_HOME/include/native_threads/include"
6464 if test -n "$JAVA_ARCH"; then
6465 JRE_BASE_DIR="$JAVA_HOME/jre/lib/$JAVA_ARCH"
6466 JAVALIB="-L$JAVA_HOME/$LIB64"
6467 test -d "$JRE_BASE_DIR" && JAVALIB="$JAVALIB -L$JRE_BASE_DIR"
6468 test -d "$JRE_BASE_DIR/$JAVA_TOOLKIT" && JAVALIB="$JAVALIB -L$JRE_BASE_DIR/$JAVA_TOOLKIT"
6469 test -d "$JRE_BASE_DIR/native_thread" && JAVALIB="$JAVALIB -L$JRE_BASE_DIR/native_thread"
6477 AC_SUBST(JAVACOMPILER)
6479 AC_SUBST(JAVAINTERPRETER)
6480 AC_SUBST(JAVAIFLAGS)
6482 AC_SUBST(JAVA_SOURCE_VER)
6483 AC_SUBST(JAVA_TARGET_VER)
6489 dnl ===================================================================
6490 dnl Checks for specific files.
6491 dnl ===================================================================
6493 dnl ===================================================================
6494 dnl Checks for programs.
6495 dnl ===================================================================
6497 dnl ===================================================================
6498 dnl Check whether we already have dmake
6499 dnl ===================================================================
6500 AC_PATH_PROG(DMAKE, dmake, no)
6501 if test "$DMAKE" = "no"; then
6503 echo "dmake will be built on ./bootstrap"
6505 AC_MSG_CHECKING([whether the found dmake is the right dmake])
6506 # we need to find out whether that dmake we found is "our" dmake
6507 # or the dmake from Sun's SunStudio Compiler which is something
6509 # This test _should_ work because the one accepts -V (ours) and one
6510 # (the other) not...
6511 $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
6512 if test $? -eq 0; then
6514 AC_MSG_RESULT([yes])
6515 AC_MSG_CHECKING([the dmake version])
6516 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
6517 if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
6518 AC_MSG_RESULT([OK, >= 4.11])
6519 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
6520 test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
6521 AC_MSG_RESULT([OK, >= 4.11])
6523 AC_MSG_RESULT([too old. >= 4.11 is needed])
6524 echo "A newer dmake will be built on ./bootstrap"
6529 echo "dmake will be built on ./bootstrap"
6533 AC_SUBST(BUILD_DMAKE)
6535 AC_MSG_CHECKING([which C preprocessor to use in idlc])
6536 if test -n "$with_idlc_cpp"; then
6537 AC_MSG_RESULT([$with_idlc_cpp])
6538 AC_PATH_PROG(SYSTEM_UCPP, $with_idlc_cpp)
6540 AC_MSG_RESULT([ucpp])
6541 AC_MSG_CHECKING([which ucpp tp use])
6542 if test -n "$with_system_ucpp" -a "$with_system_ucpp" != "no"; then
6543 AC_MSG_RESULT([external])
6544 AC_PATH_PROG(SYSTEM_UCPP, ucpp)
6546 AC_MSG_RESULT([internal])
6547 BUILD_TYPE="$BUILD_TYPE UCPP"
6550 AC_SUBST(SYSTEM_UCPP)
6552 dnl ===================================================================
6553 dnl Check for epm (not needed for Windows)
6554 dnl ===================================================================
6555 AC_MSG_CHECKING([whether to enable EPM for packing])
6556 if test "$enable_epm" = "yes"; then
6557 AC_MSG_RESULT([yes])
6558 if test "$_os" != "WINNT"; then
6559 if test -n "$with_epm"; then
6562 AC_PATH_PROG(EPM, epm, no)
6564 if test "$EPM" = "no" -o "$EPM" = "internal"; then
6565 echo "EPM will be built."
6566 BUILD_TYPE="$BUILD_TYPE EPM"
6568 # Gentoo has some epm which is something different...
6569 AC_MSG_CHECKING([whether the found epm is the right epm])
6570 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
6571 AC_MSG_RESULT([yes])
6573 AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm])
6575 AC_MSG_CHECKING([epm version])
6576 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
6577 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
6578 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
6579 AC_MSG_RESULT([OK, >= 3.7])
6580 if test "$_os" = "Darwin"; then
6581 AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
6582 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
6583 if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
6584 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)])
6585 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
6586 AC_MSG_RESULT([$_pm, ok])
6587 else # we never should get here, but go safe
6588 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)])
6592 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
6593 echo "EPM will be built."
6594 BUILD_TYPE="$BUILD_TYPE EPM"
6599 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
6600 AC_MSG_CHECKING([for rpm])
6601 for a in "$RPM" rpmbuild rpm; do
6602 $a --usage >/dev/null 2> /dev/null
6603 if test $? -eq 0; then
6607 $a --version >/dev/null 2> /dev/null
6608 if test $? -eq 0; then
6614 if test -z "$RPM"; then
6615 AC_MSG_ERROR([not found])
6616 elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
6617 RPM_PATH=`which $RPM`
6618 AC_MSG_RESULT([$RPM_PATH])
6620 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
6623 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
6624 AC_PATH_PROG(DPKG, dpkg, no)
6625 if test "$DPKG" = "no"; then
6626 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
6629 if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
6630 if test "$_os" = "Darwin"; then
6631 AC_MSG_CHECKING([for PackageMaker availability])
6632 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
6633 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
6638 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
6641 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
6642 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
6643 if test "$EPM" != "no" -a "$EPM" != "internal"; then
6644 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
6645 AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
6646 if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then
6647 AC_MSG_RESULT([yes])
6650 if echo "$PKGFORMAT" | $GREP -q rpm; then
6652 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
6653 add_warning "the rpms will need to be installed with --nodeps"
6657 AC_MSG_WARN([the ${_pt}s will not be relocateable])
6658 add_warning "the ${_pt}s will not be relocateable"
6659 AC_MSG_WARN([if you want to make sure installation without --nodeps and
6660 relocation will work, you need to patch your epm with the
6661 patch in epm/epm-3.7.patch or build with
6662 --with-epm=internal which will build a suitable epm])
6667 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
6668 AC_PATH_PROG(PKGMK, pkgmk, no)
6669 if test "$PKGMK" = "no"; then
6670 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
6682 dnl ===================================================================
6683 dnl We need winegcc when building MinGW build to be able to cross-build msi tools
6684 dnl ===================================================================
6686 if test "$enable_winegcc" = "yes"; then
6687 AC_PATH_PROG(WINEGCC, winegcc)
6688 if test "$WINEGCC" = ""; then
6689 AC_MSG_ERROR([winegcc was not found, please install wine-devel, or wine-devel-32bit])
6692 ac_exeext_save="$ac_exeext"
6695 AC_LINK_IFELSE([AC_LANG_PROGRAM([
6698 printf ("hello world\n");
6700 [AC_MSG_ERROR([winegcc cannot build 32bit binaries, please install glibc-devel-32bit and gcc-32bit])]
6703 ac_exeext="$ac_exeext_save"
6707 dnl ===================================================================
6709 dnl ===================================================================
6710 AC_PATH_PROG(GPERF, gperf)
6711 if test -z "$GPERF"; then
6712 AC_MSG_ERROR([gperf not found but needed. Install it.])
6714 AC_MSG_CHECKING([gperf version])
6715 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
6718 AC_MSG_ERROR([too old, you need at least 3.0.0])
6722 dnl ===================================================================
6723 dnl Check for building ODK
6724 dnl ===================================================================
6725 AC_MSG_CHECKING([whether to build the ODK])
6726 if test "$enable_odk" = "" -o "$enable_odk" != "no"; then
6727 AC_MSG_RESULT([yes])
6729 if test "$with_java" != "no"; then
6730 AC_MSG_CHECKING([whether to build unowinreg.dll])
6731 if test "$_os" = "WINNT" -a "$enable_build_unowinreg" = ""; then
6732 # build on Win by default
6733 enable_build_unowinreg=yes
6735 if test "$enable_build_unowinreg" = "" -o "$enable_build_unowinreg" = "no"; then
6739 AC_MSG_RESULT([yes])
6742 if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "YES"; then
6743 if test -z "$with_mingw_cross_compiler"; then
6745 AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
6746 elif test -x "$with_mingw_cross_compiler"; then
6747 MINGWCXX="$with_mingw_cross_compiler"
6749 AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
6752 if test "$MINGWCXX" = "false"; then
6753 AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
6756 mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
6757 if test -x "$mingwstrip_test"; then
6758 MINGWSTRIP="$mingwstrip_test"
6760 AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
6763 if test "$MINGWSTRIP" = "false"; then
6764 AC_MSG_ERROR(MinGW32 binutils not found.)
6768 BUILD_TYPE="$BUILD_TYPE ODK"
6773 AC_SUBST(BUILD_UNOWINREG)
6775 AC_SUBST(MINGWSTRIP)
6777 dnl ===================================================================
6778 dnl Check for system zlib
6779 dnl ===================================================================
6780 if test "$with_system_zlib" = "auto"; then
6783 with_system_zlib="$with_system_libs"
6786 with_system_zlib=yes
6791 AC_MSG_CHECKING([which zlib to use])
6792 if test "$with_system_zlib" = "yes"; then
6793 AC_MSG_RESULT([external])
6795 AC_CHECK_HEADER(zlib.h, [],
6796 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
6797 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
6798 [AC_MSG_ERROR(zlib not found or functional)], [])
6800 AC_MSG_RESULT([internal])
6802 BUILD_TYPE="$BUILD_TYPE ZLIB"
6803 ZLIB_CFLAGS="-I${OUTDIR}/inc/external/zlib"
6804 ZLIB_LIBS="-L${OUTDIR}/lib -lz"
6806 AC_SUBST(ZLIB_CFLAGS)
6808 AC_SUBST(SYSTEM_ZLIB)
6810 dnl ===================================================================
6811 dnl Check for system jpeg
6812 dnl ===================================================================
6813 AC_MSG_CHECKING([which jpeg to use])
6814 if test "$with_system_jpeg" = "auto"; then
6816 WINNT|Darwin|iOS|Android)
6817 with_system_jpeg="$with_system_libs"
6820 with_system_jpeg=yes
6825 if test "$with_system_jpeg" = "yes"; then
6826 AC_MSG_RESULT([external])
6828 AC_CHECK_HEADER(jpeglib.h, [],
6829 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
6830 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
6831 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
6832 libo_MINGW_CHECK_DLL([JPEG], [libjpeg])
6834 AC_MSG_RESULT([internal])
6836 BUILD_TYPE="$BUILD_TYPE JPEG"
6838 AC_SUBST(SYSTEM_JPEG)
6839 AC_SUBST([MINGW_JPEG_DLL])
6841 dnl ===================================================================
6842 dnl Check for system clucene
6843 dnl ===================================================================
6844 AC_MSG_CHECKING([which clucene to use])
6845 if test "$with_system_clucene" = "yes"; then
6846 AC_MSG_RESULT([external])
6848 PKG_CHECK_MODULES(CLUCENE, libclucene-core)
6851 save_CXXFLAGS=$CXXFLAGS
6852 save_CPPFLAGS=$CPPFLAGS
6853 CXXFLAGS="$CXXFLAGS $CLUCENE_CFLAGS"
6854 CPPFLAGS="$CPPFLAGS $CLUCENE_CFLAGS"
6855 dnl http://sourceforge.net/tracker/index.php?func=detail&aid=3392466&group_id=80013&atid=558446
6856 dnl https://bugzilla.redhat.com/show_bug.cgi?id=794795
6857 AC_CHECK_HEADER([CLucene/analysis/cjk/CJKAnalyzer.h], [],
6858 [AC_MSG_ERROR([Your version of libclucene has contribs-lib missing.])], [#include <CLucene.h>])
6859 CXXFLAGS=$save_CXXFLAGS
6860 CPPFLAGS=$save_CPPFLAGS
6863 CLUCENE_LIBS="$CLUCENE_LIBS -lclucene-contribs-lib"
6865 AC_MSG_RESULT([internal])
6867 BUILD_TYPE="$BUILD_TYPE CLUCENE"
6869 AC_SUBST(SYSTEM_CLUCENE)
6870 AC_SUBST(CLUCENE_CFLAGS)
6871 AC_SUBST(CLUCENE_LIBS)
6873 dnl ===================================================================
6874 dnl Check for system expat
6875 dnl ===================================================================
6876 AC_MSG_CHECKING([which expat to use])
6877 if test "$with_system_expat" = "yes"; then
6878 AC_MSG_RESULT([external])
6880 AC_CHECK_HEADER(expat.h, [],
6881 [AC_MSG_ERROR(expat.h not found. install expat)], [])
6882 AC_CHECK_LIB([expat], [XML_ParserCreate], [:],
6883 [AC_MSG_RESULT(expat library not found or functional.)], [])
6884 libo_MINGW_CHECK_DLL([EXPAT], [libexpat])
6886 AC_MSG_RESULT([internal])
6888 BUILD_TYPE="$BUILD_TYPE EXPAT"
6890 AC_SUBST(SYSTEM_EXPAT)
6891 AC_SUBST([MINGW_EXPAT_DLL])
6893 dnl ===================================================================
6894 dnl Check for system libcdr
6895 dnl ===================================================================
6896 AC_MSG_CHECKING([which libcdr to use])
6897 if test "$with_system_libcdr" = "yes"; then
6898 AC_MSG_RESULT([external])
6900 PKG_CHECK_MODULES( CDR, libcdr-0.0 >= 0.0.5 )
6901 elif test $_os = iOS; then
6902 # libcdr depends on libwpd and libwpg and those are LGPL
6903 AC_MSG_RESULT([none])
6905 AC_MSG_RESULT([internal])
6907 BUILD_TYPE="$BUILD_TYPE CDR"
6909 AC_SUBST(SYSTEM_LIBCDR)
6910 AC_SUBST(CDR_CFLAGS)
6913 dnl ===================================================================
6914 dnl Check for system libmspub
6915 dnl ===================================================================
6916 AC_MSG_CHECKING([which libmspub to use])
6917 if test "$with_system_libmspub" = "yes"; then
6918 AC_MSG_RESULT([external])
6920 PKG_CHECK_MODULES( MSPUB, libmspub-0.0 )
6921 elif test $_os = iOS; then
6922 # libmspub depends on libwpd and libwpg and those are LGPL
6923 AC_MSG_RESULT([none])
6925 AC_MSG_RESULT([internal])
6927 BUILD_TYPE="$BUILD_TYPE MSPUB"
6929 AC_SUBST(SYSTEM_LIBMSPUB)
6930 AC_SUBST(MSPUB_CFLAGS)
6931 AC_SUBST(MSPUB_LIBS)
6933 dnl ===================================================================
6934 dnl Check for system libvisio
6935 dnl ===================================================================
6936 AC_MSG_CHECKING([which libvisio to use])
6937 if test "$with_system_libvisio" = "yes"; then
6938 AC_MSG_RESULT([external])
6940 PKG_CHECK_MODULES( VISIO, libvisio-0.0 )
6941 elif test $_os = iOS; then
6942 # libvisio depends on libwpd and libwpg and those are LGPL
6943 AC_MSG_RESULT([none])
6945 AC_MSG_RESULT([internal])
6947 BUILD_TYPE="$BUILD_TYPE VISIO"
6949 AC_SUBST(SYSTEM_LIBVISIO)
6950 AC_SUBST(VISIO_CFLAGS)
6951 AC_SUBST(VISIO_LIBS)
6953 dnl ===================================================================
6954 dnl Check for system libcmis
6955 dnl ===================================================================
6956 AC_MSG_CHECKING([which libcmis to use])
6957 if test "$with_system_libcmis" = "yes"; then
6958 AC_MSG_RESULT([external])
6960 PKG_CHECK_MODULES( CMIS, libcmis-0.3 >= 0.3.1 )
6962 AC_MSG_RESULT([internal])
6964 BUILD_TYPE="$BUILD_TYPE CMIS"
6966 AC_SUBST(SYSTEM_LIBCMIS)
6967 AC_SUBST(CMIS_CFLAGS)
6971 dnl ===================================================================
6972 dnl Check for system libwpd
6973 dnl ===================================================================
6974 AC_MSG_CHECKING([which libwpd to use])
6975 if test "$with_system_libwpd" = "yes"; then
6976 AC_MSG_RESULT([external])
6978 PKG_CHECK_MODULES( WPD, libwpd-0.9 libwpd-stream-0.9 )
6979 elif test $_os = iOS; then
6980 AC_MSG_RESULT([none])
6982 AC_MSG_RESULT([internal])
6984 WPD_CFLAGS="-I${OUTDIR}/inc/external"
6985 WPD_LIBS="-L${OUTDIR}/lib -lwpdlib"
6986 BUILD_TYPE="$BUILD_TYPE WPD"
6988 AC_SUBST(SYSTEM_LIBWPD)
6989 AC_SUBST(WPD_CFLAGS)
6992 dnl ===================================================================
6993 dnl Check for system lcms2
6994 dnl ===================================================================
6995 AC_MSG_CHECKING([which littlecms v2 to use])
6996 if test "$with_system_lcms2" = "yes"; then
6997 AC_MSG_RESULT([external])
6999 PKG_CHECK_MODULES( LCMS2, lcms2 )
7000 libo_MINGW_CHECK_DLL([LCMS2], [liblcms2])
7002 AC_MSG_RESULT([internal])
7004 LCMS2_LIBS="-L${OUTDIR}/lib -llcms2"
7005 LCMS2_CFLAGS="-I${WORKDIR}/UnpackedTarball/lcms2/include"
7006 if test "$GCC" = "yes"; then
7007 LCMS2_CFLAGS="${LCMS2_CFLAGS} -Wno-long-long"
7009 BUILD_TYPE="$BUILD_TYPE LCMS2"
7011 AC_SUBST(SYSTEM_LCMS2)
7012 AC_SUBST(LCMS2_CFLAGS)
7013 AC_SUBST(LCMS2_LIBS)
7014 AC_SUBST([MINGW_LCMS2_DLL])
7016 dnl ===================================================================
7017 dnl Check for system cppunit
7018 dnl ===================================================================
7019 AC_MSG_CHECKING([which cppunit to use])
7020 if test "$with_system_cppunit" = "yes"; then
7021 AC_MSG_RESULT([external])
7023 # might work for earlier, too but go sure:
7024 PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.0 )
7026 AC_MSG_RESULT([internal])
7028 BUILD_TYPE="$BUILD_TYPE CPPUNIT"
7030 AC_SUBST(SYSTEM_CPPUNIT)
7031 AC_SUBST(CPPUNIT_CFLAGS)
7032 AC_SUBST(CPPUNIT_LIBS)
7034 dnl ===================================================================
7035 dnl Check whether freetype is available
7036 dnl ===================================================================
7037 if test "$test_freetype" = "yes"; then
7038 AC_MSG_CHECKING([whether freetype is available])
7039 PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
7041 case "$BUILD_TYPE" in
7043 FREETYPE_LIBS="-lfreetype"
7047 AC_SUBST(FREETYPE_CFLAGS)
7048 AC_SUBST(FREETYPE_LIBS)
7050 dnl ===================================================================
7051 dnl Check for system libwps
7052 dnl ===================================================================
7053 AC_MSG_CHECKING([which libwps to use])
7054 if test "$with_system_libwps" = "yes"; then
7055 AC_MSG_RESULT([external])
7057 PKG_CHECK_MODULES( WPS, libwps-0.2 )
7058 elif test $_os = iOS; then
7059 AC_MSG_RESULT([none])
7061 AC_MSG_RESULT([internal])
7063 WPS_CFLAGS="-I${OUTDIR}/inc/external"
7064 WPS_LIBS="-L${OUTDIR}/lib -lwpslib"
7065 BUILD_TYPE="$BUILD_TYPE WPS"
7067 AC_SUBST(SYSTEM_LIBWPS)
7068 AC_SUBST(WPS_CFLAGS)
7071 dnl ===================================================================
7072 dnl Check for system libwpg
7073 dnl ===================================================================
7074 AC_MSG_CHECKING([which libwpg to use])
7075 if test "$with_system_libwpg" = "yes"; then
7076 AC_MSG_RESULT([external])
7078 PKG_CHECK_MODULES( WPG, libwpg-0.2 )
7079 elif test $_os = iOS; then
7080 AC_MSG_RESULT([none])
7082 AC_MSG_RESULT([internal])
7084 WPG_CFLAGS="-I${OUTDIR}/inc/external"
7085 WPG_LIBS="-L${OUTDIR}/lib -lwpglib"
7086 BUILD_TYPE="$BUILD_TYPE WPG"
7088 AC_SUBST(SYSTEM_LIBWPG)
7089 AC_SUBST(WPG_CFLAGS)
7092 dnl ===================================================================
7093 dnl Check whether freetype2 supports emboldening
7094 dnl ===================================================================
7095 if test "$test_freetype" = "yes"; then
7096 save_CPPFLAGS="$CPPFLAGS"
7097 save_LDFLAGS="$LDFLAGS"
7099 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
7100 LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
7101 AC_CHECK_LIB(freetype, FT_GlyphSlot_Embolden,
7102 [USE_FT_EMBOLDEN="YES"], [USE_FT_EMBOLDEN="NO"], [])
7103 LDFLAGS="$save_LDFLAGS"
7104 CPPFLAGS="$save_CPPFLAGS"
7107 AC_SUBST(USE_FT_EMBOLDEN)
7109 # ===================================================================
7110 # Check for system libxslt
7111 # to prevent incompatibilities between internal libxml2 and external libxslt,
7112 # or vice versa, use with_system_libxml here
7113 # ===================================================================
7114 if test "$with_system_libxml" = "auto"; then
7117 with_system_libxml="$with_system_libs"
7120 with_system_libxml=yes
7125 AC_MSG_CHECKING([which libxslt to use])
7126 if test "$with_system_libxml" = "yes"; then
7127 AC_MSG_RESULT([external])
7129 if test "$_os" = "Darwin"; then
7130 dnl make sure to use SDK path
7131 LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
7132 LIBEXSLT_CFLAGS="$LIBXSLT_CFLAGS"
7134 LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
7135 LIBEXSLT_LIBS="-lexslt $LIBXSLT_LIBS"
7137 PKG_CHECK_MODULES(LIBXSLT, libxslt)
7138 PKG_CHECK_MODULES(LIBEXSLT, libexslt)
7141 dnl Check for xsltproc
7142 AC_PATH_PROG(XSLTPROC, xsltproc, no)
7143 if test "$XSLTPROC" = "no"; then
7144 AC_MSG_ERROR([xsltproc is required])
7147 libo_MINGW_CHECK_DLL([LIBXSLT], [libxslt])
7148 libo_MINGW_CHECK_DLL([LIBEXSLT], [libexslt])
7149 libo_MINGW_TRY_DLL([ICONV], [iconv])
7151 AC_MSG_RESULT([internal])
7153 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
7155 if test "$cross_compiling" = "yes"; then
7156 AC_PATH_PROG(XSLTPROC, xsltproc, no)
7157 if test "$XSLTPROC" = "no"; then
7158 AC_MSG_ERROR([xsltproc is required])
7162 AC_SUBST(SYSTEM_LIBXSLT)
7163 if test -z "$SYSTEM_LIBXSLT_FOR_BUILD"; then
7164 SYSTEM_LIBXSLT_FOR_BUILD="$SYSTEM_LIBXSLT"
7166 AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
7168 AC_SUBST(LIBEXSLT_CFLAGS)
7169 AC_SUBST(LIBEXSLT_LIBS)
7170 AC_SUBST(LIBXSLT_CFLAGS)
7171 AC_SUBST(LIBXSLT_LIBS)
7173 AC_SUBST([MINGW_LIBEXSLT_DLL])
7174 AC_SUBST([MINGW_LIBXSLT_DLL])
7175 AC_SUBST([MINGW_ICONV_DLL])
7177 # ===================================================================
7178 # Check for system libxml
7179 # ===================================================================
7180 AC_MSG_CHECKING([which libxml to use])
7181 if test "$with_system_libxml" = "yes"; then
7182 AC_MSG_RESULT([external])
7184 if test "$_os" = "Darwin"; then
7185 dnl make sure to use SDK path
7186 LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
7188 LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
7189 elif test $_os = iOS; then
7190 dnl make sure to use SDK path
7191 usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
7192 LIBXML_CFLAGS="-I$usr/include/libxml2"
7193 LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
7195 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
7198 dnl Check for xmllint
7199 AC_PATH_PROG(XMLLINT, xmllint, no)
7200 if test "$XMLLINT" = "no"; then
7201 AC_MSG_ERROR([xmllint is required])
7204 libo_MINGW_CHECK_DLL([LIBXML],[libxml2])
7205 libo_MINGW_TRY_DLL([ZLIB],[zlib1])
7207 AC_MSG_RESULT([internal])
7209 BUILD_TYPE="$BUILD_TYPE LIBXML2"
7211 AC_SUBST(SYSTEM_LIBXML)
7212 AC_SUBST(LIBXML_CFLAGS)
7213 AC_SUBST(LIBXML_LIBS)
7215 AC_SUBST([MINGW_LIBXML_DLL])
7216 AC_SUBST([MINGW_ZLIB_DLL])
7217 dnl ===================================================================
7218 dnl Checks for Python
7219 dnl ===================================================================
7221 AC_MSG_CHECKING([which Python to use])
7223 case "$enable_python" in
7226 AC_MSG_RESULT([none])
7230 if test "$DISABLE_SCRIPTING" = TRUE; then
7231 AC_MSG_RESULT([no, overridden by --disable-scripting])
7234 elif test $build_os = cygwin; then
7235 dnl When building on Windows we don't attempt to use any installed
7236 dnl "system" Python.
7238 dnl (When cross-compiling to Windows from Linux using the mingw32-cross
7239 dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
7240 dnl MinGW cross-compilation setups.)
7241 AC_MSG_RESULT([internal])
7242 enable_python=internal
7243 elif test $_os = Darwin -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \) \
7244 -a \( "$with_macosx_sdk" = 10.4 -o "$with_macosx_sdk" = 10.5 \); then
7245 # When building against a more recent SDK the ionternal Python can't be compiled, I can't be bothered to fix that for now,
7246 # building against a recent SDK is only for developer's own builds anyway.
7247 AC_MSG_RESULT([internal, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno])
7248 enable_python=internal
7250 AC_MSG_RESULT([checking below])
7255 AC_MSG_RESULT([internal])
7258 if test $_os = Darwin -a -z "$PYTHON" -a \( "$with_macosx_version_min_required" = 10.4 -o "$with_macosx_version_min_required" = 10.5 \); then
7259 AC_MSG_ERROR([Cannot use "system" Python, the Python in Mac OS X $with_macosx_version_min_required is incompatible with Python3-ified pyuno])
7261 AC_MSG_RESULT([system])
7264 AC_MSG_ERROR([Incorrect --enable-python option])
7268 AC_SUBST(DISABLE_PYTHON)
7270 if test $_os = WINNT -a "$WITH_MINGW" != yes -a $enable_python = system; then
7271 AC_MSG_ERROR([Must use internal Python when building with MSVC])
7274 if test $enable_python != no; then
7275 BUILD_TYPE="$BUILD_TYPE PYUNO"
7278 if test "$cross_compiling" = yes; then
7279 if test $enable_python = auto; then
7280 enable_python=system
7283 if test $enable_python = system -a -z "$PYTHON"; then
7284 if test $_os = Darwin; then
7285 # We already have logic above to make sure the system Python
7286 # is used only when building against SDK 10.6 or newer.
7288 # Make sure we use the 2.6 Python when building against the
7290 case $with_macosx_sdk in
7292 python_version=2.6;;
7294 python_version=2.7;;
7297 python_version=2.7;;
7299 PYTHON=python$python_version
7300 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX${with_macosx_sdk}.sdk/System/Library/Frameworks/Python.framework/Versions/${python_version}/include/python${python_version}"
7301 PYTHON_LIBS="-framework Python"
7303 # This causes an error if no python command is found
7304 AM_PATH_PYTHON([3.3])
7306 elif test $enable_python = auto; then
7307 # We should not come here in a MSVC build, I think?
7308 if test $build_os = cygwin; then
7309 AC_MSG_ERROR([Assertion failed - should not be here in a MSVC build])
7312 # This allows a lack of system Python 3.3 with no error, we check below for a system Python of
7314 AM_PATH_PYTHON([3.3],, [:])
7316 if test "$PYTHON" = :; then
7317 enable_python=internal
7319 if test $_os = Darwin; then
7320 # See the fixme in gbuild.mk
7322 # There must be a system Python, 2.6 should be fine (?), to run build-time Python scripts
7323 # like filter/source/svg/js2hxx.py. (Is that the only build-time Python script?) If we
7324 # don't do this, PYTHON will stay with the value ":" which of course makes runing
7325 # build-time Python scripts rather ineffective.
7327 # Unset variables set by the above AM_PATH_PYTHON so that we acutally do check anew
7328 # Finding an (old) system Python should not confuse our already decided intent to build an
7329 # internal Python 3.3, that is directed by enable_python = internal.
7330 unset PYTHON am_cv_pathless_PYTHON ac_cv_path_PYTHON
7331 AM_PATH_PYTHON([2.6])
7333 # For Linux it works to use the internally built Python, see gbuild.mk
7337 enable_python=system
7342 if test $enable_python = system; then
7343 if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
7344 # Fallback: Accept these in the environment, or as set above
7347 elif test "$cross_compiling" != yes; then
7348 python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
7349 python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
7350 python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
7351 python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
7352 if test -z "$PKG_CONFIG"; then
7353 PYTHON_CFLAGS="-I$python_include"
7354 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
7355 elif $PKG_CONFIG --exists python-$python_version; then
7356 PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
7357 PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version` $python_libs"
7359 PYTHON_CFLAGS="-I$python_include"
7360 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
7363 dnl How to find out the cross-compilation Python installation path?
7364 dnl Let's hardocode what we know for different distributions for now...
7365 for python_version in 2.6; do
7366 if test -f ${MINGW_SYSROOT}/include/python${python_version}/Python.h; then
7367 PYTHON_CFLAGS="-I${MINGW_SYSROOT}/include/python$python_version"
7368 PYTHON_LIBS="-L${MINGW_SYSROOT}lib -lpython$python_version $python_libs"
7369 MINGW_PYTHON_EXE=python.exe
7370 libo_MINGW_CHECK_DLL([PYTHON], [libpython$python_version])
7371 libo_MINGW_CHECK_DLL([READLINE], [libreadline6])
7372 libo_MINGW_CHECK_DLL([TERMCAP], [libtermcap])
7373 # could we somehow extract the really mingw python version from
7374 # actual distro package?
7375 # 2.6.2 currently on OpenSUSE 12.1?
7376 # rpm -q mingw32-python => mingw32-python-2.6.2-17.17.noarch
7377 PYTHON_VERSION=$python_version.2
7378 PYTHON_VERSION_MAJOR=${python_version%.*}
7379 PYTHON_VERSION_MINOR=${python_version#*.}
7383 test -n "$PYTHON_CFLAGS" && break
7387 dnl By now enable_python should be "system", "internal" or "no"
7388 case $enable_python in
7392 if test "$CROSS_COMPILING" != YES; then
7393 dnl Check if the headers really work
7394 save_CPPFLAGS="$CPPFLAGS"
7395 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
7396 AC_CHECK_HEADER(Python.h, [],
7397 [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
7399 CPPFLAGS="$save_CPPFLAGS"
7402 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
7403 AC_MSG_CHECKING([for correct python library version])
7404 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7407 int main(int argc, char **argv) {
7408 if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 6) ||
7409 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0;
7412 ]])],[AC_MSG_RESULT([ok])],[AC_MSG_ERROR([Python >= 3.3 is needed when building with Python 3, or Python >= 2.6 when building with Python 2])],[])
7416 dnl FIXME Check if the Python library can be linked with, too?
7422 PYTHON_VERSION_MAJOR=3
7423 PYTHON_VERSION_MINOR=3
7424 PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.0
7425 BUILD_TYPE="$BUILD_TYPE PYTHON"
7426 # Embedded Python dies without Home set
7427 if test "$HOME" = ""; then
7430 # bz2 tarball and bzip2 is not standard
7431 if test -z "$BZIP2"; then
7432 AC_PATH_PROG( BZIP2, bzip2)
7433 if test -z "$BZIP2"; then
7434 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
7442 AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
7446 dnl Cross-build of python requires python that is runnable on the build
7447 dnl platform, because it is used in the build process
7448 if test "$cross_compiling" = yes; then
7449 if test "$DISABLE_PYTHON" = no -a "$SYSTEM_PYTHON" = no -a "$DISABLE_PYTHON_FOR_BUILD" = yes; then
7450 AC_MSG_ERROR([Cross-build of python requires python that is runnable on the build platform. You must not use --disable-python for the 'build' config.])
7454 AC_SUBST(SYSTEM_PYTHON)
7455 AC_SUBST(PYTHON_CFLAGS)
7456 AC_SUBST(PYTHON_LIBS)
7457 AC_SUBST(PYTHON_VERSION)
7458 AC_SUBST(PYTHON_VERSION_MAJOR)
7459 AC_SUBST(PYTHON_VERSION_MINOR)
7460 AC_SUBST([MINGW_PYTHON_EXE])
7461 AC_SUBST([MINGW_PYTHON_DLL])
7462 AC_SUBST([MINGW_READLINE_DLL])
7463 AC_SUBST([MINGW_TERMCAP_DLL])
7465 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
7466 if test "x$enable_ext_mysql_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
7467 AC_MSG_RESULT([yes])
7469 BUILD_TYPE="$BUILD_TYPE MYSQLC"
7474 AC_SUBST(ENABLE_MYSQLC)
7476 if test "$ENABLE_MYSQLC" = "YES"; then
7478 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MYSQLC"
7480 dnl ===================================================================
7481 dnl Check for system MySQL
7482 dnl ===================================================================
7483 AC_MSG_CHECKING([for MySQL prerequisites])
7484 if test "$with_system_mysql" = "yes"; then
7485 AC_MSG_RESULT([external MySQL])
7487 AC_PATH_PROG( MYSQLCONFIG, mysql_config)
7488 AC_MSG_CHECKING([MySQL version])
7489 MYSQL_VERSION=`$MYSQLCONFIG --version`
7490 MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
7491 if test "$MYSQL_MAJOR" -ge "5"; then
7494 AC_MSG_ERROR([too old, use 5.0.x or 5.1.x])
7496 AC_MSG_CHECKING([for MySQL Client library])
7497 MYSQL_INC=`$MYSQLCONFIG --include`
7498 MYSQL_LIB=`$MYSQLCONFIG --libs`
7499 MYSQL_DEFINES=`$MYSQLCONFIG --cflags | $SED -e s,$MYSQL_INC,,`
7500 AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB])
7503 if test -n "$with_libmysql_path"; then
7504 AC_MSG_RESULT([external Connector/C (libmysql)])
7505 LIBMYSQL=libmysql.so
7506 if test "$_os" = "Darwin"; then
7507 LIBMYSQL=libmysql.dylib
7508 elif test "$_os" = "WINNT"; then
7509 LIBMYSQL=libmysql.dll
7511 AC_MSG_CHECKING([for $LIBMYSQL])
7512 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
7513 AC_MSG_RESULT([found.])
7514 LIBMYSQL_PATH=$with_libmysql_path
7516 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
7519 AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path])
7522 AC_SUBST(SYSTEM_MYSQL)
7525 AC_SUBST(MYSQL_DEFINES)
7526 AC_SUBST(LIBMYSQL_PATH)
7529 dnl ===================================================================
7530 dnl Check for system MySQL C++ Connector
7531 dnl ===================================================================
7533 # who thought this too-generic cppconn dir was a good idea?
7534 AC_MSG_CHECKING([MySQL Connector/C++])
7535 if test "$with_system_mysql_cppconn" = "yes"; then
7536 AC_MSG_RESULT([external])
7537 SYSTEM_MYSQL_CPPCONN=YES
7539 AC_CHECK_HEADER(mysql_driver.h, [],
7540 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
7541 AC_CHECK_LIB([mysqlcppconn], [main], [:],
7542 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
7544 LIBS="$LIBS -lmysqlcppconn"
7545 AC_MSG_CHECKING([version])
7546 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7547 #include <mysql_driver.h>
7549 int main(int argc, char **argv) {
7550 sql::Driver *driver;
7551 driver = get_driver_instance();
7552 if (driver->getMajorVersion() > 1 || \
7553 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
7554 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
7559 ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[])
7564 AC_MSG_RESULT([internal])
7565 AC_MSG_CHECKING([for mysqlcppconn module])
7566 if test -d mysqlcppconn; then
7569 AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
7571 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
7572 SYSTEM_MYSQL_CPPCONN=NO
7576 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
7578 dnl ===================================================================
7579 dnl Check for system hsqldb
7580 dnl ===================================================================
7581 if test "$with_java" != "no"; then
7582 HSQLDB_USE_JDBC_4_1=
7583 AC_MSG_CHECKING([which hsqldb to use])
7584 if test "$with_system_hsqldb" = "yes"; then
7585 AC_MSG_RESULT([external])
7587 if test -z $HSQLDB_JAR; then
7588 HSQLDB_JAR=/usr/share/java/hsqldb.jar
7590 AC_CHECK_FILE($HSQLDB_JAR, [],
7591 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
7592 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
7594 if $PERL -e 'use Archive::Zip;
7595 my $file = "$ENV{'HSQLDB_JAR'}";
7596 my $zip = Archive::Zip->new( $file );
7597 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
7598 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
7599 push @l, split(/\n/, $mf);
7600 foreach my $line (@l) {
7601 if ($line =~ m/Specification-Version:/) {
7602 ($t, $version) = split (/:/,$line);
7603 $version =~ s/^\s//;
7604 ($a, $b, $c, $d) = split (/\./,$version);
7605 if ($c == "0" && $d > "8") {
7615 AC_MSG_RESULT([yes])
7617 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
7620 AC_MSG_RESULT([internal])
7622 BUILD_TYPE="$BUILD_TYPE HSQLDB"
7623 AC_MSG_CHECKING([whether hsqldb should be built with JDBC 4.1])
7624 javanumver=`$JAVAINTERPRETER -version 2>&1 | $AWK -v num=true -f $SRC_ROOT/solenv/bin/getcompver.awk`
7625 if expr "$javanumver" '>=' 000100060000 > /dev/null; then
7626 AC_MSG_RESULT([yes])
7627 HSQLDB_USE_JDBC_4_1=YES
7632 AC_SUBST(SYSTEM_HSQLDB)
7633 AC_SUBST(HSQLDB_JAR)
7634 AC_SUBST([HSQLDB_USE_JDBC_4_1])
7637 dnl ===================================================================
7638 dnl Check for PostgreSQL stuff
7639 dnl ===================================================================
7640 if test "x$enable_postgresql_sdbc" != "xno"; then
7641 SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
7643 # if/when anything else than PostgreSQL uses Kerberos,
7644 # move this out of `test "x$enable_postgresql_sdbc" != "xno"'
7649 # MacOS X has system MIT Kerberos 5 since 10.4
7650 if test "$with_krb5" != "no"; then
7653 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
7654 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5, try installing libcom_err devel package])])
7656 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
7657 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5, try installing krb5 devel package])])
7660 if test "$with_gssapi" != "no"; then
7663 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
7664 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
7669 if test "$with_krb5" = "yes" -o "$with_gssapi" = "yes"; then
7670 AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Windows.])
7673 Linux|GNU|*BSD|DragonFly)
7674 if test "$with_krb5" != "no"; then
7677 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
7678 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
7680 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
7681 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
7684 if test "$with_gssapi" != "no"; then
7687 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
7688 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
7693 if test "$with_krb5" = "yes"; then
7696 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
7697 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
7699 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
7700 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
7703 if test "$with_gssapi" = "yes"; then
7706 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
7707 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
7712 AC_MSG_CHECKING([PostgreSQL C interface])
7713 if test "$with_system_postgresql" = "yes"; then
7714 AC_MSG_RESULT([external PostgreSQL])
7715 SYSTEM_POSTGRESQL=YES
7716 if test "$_os" = Darwin; then
7718 for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
7719 pg_supp_path="$P_SEP$d$pg_supp_path"
7722 AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
7723 if test -z "$PGCONFIG"; then
7724 AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
7726 POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
7727 POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
7729 if test -n "$with_libpq_path"; then
7730 SYSTEM_POSTGRESQL=YES
7731 AC_MSG_RESULT([external libpq])
7732 POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
7733 POSTGRESQL_INC=-I"${with_libpq_path}/include/"
7735 SYSTEM_POSTGRESQL=NO
7736 AC_MSG_RESULT([internal])
7738 POSTGRESQL_INC="%OVERRIDE_ME%"
7739 BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
7742 if test "${SYSTEM_POSTGRESQL}" = "YES"; then
7743 AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
7745 save_CPPFLAGS=$CPPFLAGS
7747 CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
7748 LIBS="${LIBS} ${POSTGRESQL_LIB}"
7749 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
7750 AC_CHECK_LIB([pq], [PQconnectdbParams], [:],
7751 [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
7753 CPPFLAGS=$save_CPPFLAGS
7756 BUILD_POSTGRESQL_SDBC=YES
7759 AC_SUBST(WITH_GSSAPI)
7760 AC_SUBST(BUILD_POSTGRESQL_SDBC)
7761 AC_SUBST(SYSTEM_POSTGRESQL)
7762 AC_SUBST(POSTGRESQL_INC)
7763 AC_SUBST(POSTGRESQL_LIB)
7765 dnl ===================================================================
7766 dnl Check for system curl
7767 dnl ===================================================================
7768 AC_MSG_CHECKING([which libcurl to use])
7769 if test "$with_system_curl" = "auto"; then
7772 with_system_curl=yes
7775 with_system_curl="$with_system_libs"
7780 if test "$with_system_curl" = "yes"; then
7781 AC_MSG_RESULT([external])
7785 if test "$cross_compiling" = "yes"; then
7786 dnl At least the OBS mingw32-libcurl-devel package
7787 dnl comes with a proper .pc file
7788 PKG_CHECK_MODULES(CURL, libcurl,, [:])
7789 if test -n "$CURL_PKG_ERRORS"; then
7792 curl_version=`$PKG_CONFIG --modversion libcurl`
7795 if test -z "$curl_version"; then
7796 AC_PATH_PROG(CURLCONFIG, curl-config)
7797 if test -z "$CURLCONFIG"; then
7798 AC_MSG_ERROR([install the libcurl development package])
7800 CURL_LIBS=`$CURLCONFIG --libs`
7801 CURL_CFLAGS=`$CURLCONFIG --cflags`
7802 curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
7805 AC_MSG_CHECKING([whether libcurl is >= 7.13.1])
7807 case $curl_version in
7808 dnl brackets doubled below because Autoconf uses them as m4 quote characters,
7809 dnl so they need to be doubled to end up in the configure script
7810 7.13.1|7.1[[4-9]].*|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
7811 AC_MSG_RESULT([yes, you have $curl_version])
7814 AC_MSG_ERROR([no, you have $curl_version])
7818 libo_MINGW_CHECK_DLL([CURL], [libcurl])
7819 libo_MINGW_TRY_DLL([INTL], [libintl])
7820 libo_MINGW_TRY_DLL([IDN], [libidn])
7821 libo_MINGW_TRY_DLL([NSPR4], [libnspr4])
7822 libo_MINGW_TRY_DLL([NSSUTIL3], [nssutil3])
7823 libo_MINGW_TRY_DLL([PLC4], [libplc4])
7824 libo_MINGW_TRY_DLL([PLDS4], [libplds4])
7825 libo_MINGW_TRY_DLL([NSS3], [nss3])
7826 libo_MINGW_TRY_DLL([SSL3], [ssl3])
7827 libo_MINGW_TRY_DLL([GPG_ERROR], [libgpg-error])
7828 libo_MINGW_TRY_DLL([GCRYPT], [libgcrypt])
7829 libo_MINGW_TRY_DLL([SSH2], [libssh2])
7831 AC_MSG_RESULT([internal])
7833 BUILD_TYPE="$BUILD_TYPE CURL"
7835 AC_SUBST(SYSTEM_CURL)
7836 AC_SUBST(CURL_CFLAGS)
7838 AC_SUBST([MINGW_CURL_DLL])
7839 AC_SUBST([MINGW_GCRYPT_DLL])
7840 AC_SUBST([MINGW_GPG_ERROR_DLL])
7841 AC_SUBST([MINGW_IDN_DLL])
7842 AC_SUBST([MINGW_INTL_DLL])
7843 AC_SUBST([MINGW_NSPR4_DLL])
7844 AC_SUBST([MINGW_NSS3_DLL])
7845 AC_SUBST([MINGW_NSSUTIL3_DLL])
7846 AC_SUBST([MINGW_PLC4_DLL])
7847 AC_SUBST([MINGW_PLDS4_DLL])
7848 AC_SUBST([MINGW_SSH2_DLL])
7849 AC_SUBST([MINGW_SSL3_DLL])
7851 dnl ===================================================================
7852 dnl Check for system boost
7853 dnl ===================================================================
7854 AC_MSG_CHECKING([which boost to use])
7855 if test "$with_system_boost" = "yes"; then
7856 AC_MSG_RESULT([external])
7859 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
7860 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
7861 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
7862 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
7863 AC_CHECK_HEADER(boost/function.hpp, [],
7864 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
7866 save_CXXFLAGS=$CXXFLAGS
7867 CXXFLAGS="$CXXFLAGS -fno-exceptions"
7868 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
7869 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
7870 ]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
7872 if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
7873 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
7875 AC_MSG_RESULT([yes])
7877 CXXFLAGS=$save_CXXFLAGS
7882 mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
7883 libo_MINGW_TRY_DLL([BOOST_DATE_TIME], [$mingw_boost_date_time_dll])
7884 if test -z "$MINGW_BOOST_DATE_TIME_DLL"; then
7885 # if not found, try again with 'lib' prefix
7886 libo_MINGW_CHECK_DLL([BOOST_DATE_TIME],
7887 [lib$mingw_boost_date_time_dll])
7890 AC_MSG_RESULT([internal])
7891 BUILD_TYPE="$BUILD_TYPE BOOST"
7894 AC_SUBST([MINGW_BOOST_DATE_TIME_DLL])
7895 AC_SUBST(SYSTEM_BOOST)
7897 dnl ===================================================================
7898 dnl Check for system mdds
7899 dnl ===================================================================
7900 AC_MSG_CHECKING([which mdds to use])
7901 if test "$with_system_mdds" = "yes"; then
7902 AC_MSG_RESULT([external])
7905 dnl ===================================================================
7906 dnl Determine which hash container mdds shall use
7907 dnl ===================================================================
7908 AC_MSG_CHECKING([which hash container mdds shall use])
7909 if test "x$HAVE_CXX0X" = "xTRUE"; then
7910 MDDS_CPPFLAGS="-std=gnu++0x"
7911 AC_MSG_RESULT([std::unordered_map])
7913 MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
7914 AC_MSG_RESULT([boost::unordered_map])
7918 save_CPPFLAGS="$CPPFLAGS"
7919 CPPFLAGS="$CPPFLAGS $MDDS_CPPFLAGS"
7920 AC_CHECK_HEADER(mdds/flat_segment_tree.hpp, [],
7921 [AC_MSG_ERROR(mdds/flat_segment_tree.hpp not found. install mdds)], [])
7922 AC_CHECK_HEADER(mdds/multi_type_matrix.hpp, [],
7923 [AC_MSG_ERROR(mdds/multi_type_matrix.hpp not found. install mdds >= 0.6.0)], [])
7924 CPPFLAGS="$save_CPPFLAGS"
7927 AC_MSG_RESULT([internal])
7928 BUILD_TYPE="$BUILD_TYPE MDDS"
7931 dnl ===================================================================
7932 dnl Determine which hash container mdds shall use
7933 dnl ===================================================================
7934 AC_MSG_CHECKING([which hash container mdds shall use])
7935 MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
7936 AC_MSG_RESULT([boost::unordered_map])
7938 AC_SUBST(SYSTEM_MDDS)
7939 AC_SUBST([MDDS_CPPFLAGS])
7941 dnl ===================================================================
7942 dnl Check for system vigra
7943 dnl ===================================================================
7944 AC_MSG_CHECKING([which vigra to use])
7945 if test "$with_system_vigra" = "yes"; then
7946 AC_MSG_RESULT([external])
7949 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
7950 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
7953 AC_MSG_RESULT([internal])
7954 BUILD_TYPE="$BUILD_TYPE VIGRA"
7957 AC_SUBST(SYSTEM_VIGRA)
7959 dnl ===================================================================
7960 dnl Check for system odbc
7961 dnl ===================================================================
7962 AC_MSG_CHECKING([which odbc headers to use])
7963 if test "$with_system_odbc" = "yes"; then
7964 AC_MSG_RESULT([external])
7965 SYSTEM_ODBC_HEADERS=YES
7967 AC_CHECK_HEADER(sqlext.h, [],
7968 [AC_MSG_ERROR(odbc not found. install odbc)], [])
7969 elif test "$enable_database_connectivity" != yes; then
7970 AC_MSG_RESULT([none])
7972 AC_MSG_RESULT([internal])
7973 SYSTEM_ODBC_HEADERS=NO
7975 AC_SUBST(SYSTEM_ODBC_HEADERS)
7978 dnl ===================================================================
7979 dnl Check for system openldap
7980 dnl ===================================================================
7982 if test "$_os" != "WINNT" -a "$_os" != "iOS" -a "$_os" != "Android"; then
7983 AC_MSG_CHECKING([which openldap library to use])
7984 if test "$with_system_openldap" = "yes"; then
7985 AC_MSG_RESULT([external])
7987 AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
7988 AC_CHECK_LIB([ldap], [ldap_simple_bind_s], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
7989 AC_CHECK_LIB([ldap], [ldap_set_option], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
7991 AC_MSG_RESULT([internal])
7993 BUILD_TYPE="$BUILD_TYPE OPENLDAP"
7996 AC_SUBST(SYSTEM_OPENLDAP)
7998 dnl ===================================================================
7999 dnl Check for mozilla ab connectivity for windows
8000 dnl ===================================================================
8002 AC_MSG_CHECKING([whether to enable build of Mozilla addressbook connectivity driver for Windows])
8003 if test "$enable_win_mozab_driver" = "yes" -a "$_os" = "WINNT" -a "$WITH_MINGW" != "YES" ; then
8004 AC_MSG_RESULT([yes])
8007 if test "$enable_build_mozab" = "no" ; then
8014 AC_SUBST(WITH_MOZAB4WIN)
8015 AC_SUBST(BUILD_MOZAB)
8017 if test "$_os" != "WINNT"; then
8018 # on all other platforms Mozilla addressbook connectivity
8019 # is unconditionally built
8020 # new and shiny mork driver
8021 AC_MSG_RESULT([yes (new mork driver)])
8023 if test "$WITH_MOZAB4WIN" = "NO"; then
8026 AC_MSG_RESULT([yes, internal (old windows mozab driver)])
8027 BUILD_TYPE="$BUILD_TYPE MOZ"
8028 EXTMSV80=`cygpath -u "$SRC_ROOT/external/msvcp80"`
8029 AC_MSG_CHECKING([for MSVC 2005 runtime needed for prebuilt Mozilla])
8030 if test -e "$EXTMSV80/Microsoft.VC80.CRT.manifest" -a \
8031 -e "$EXTMSV80/msvcp80.dll" -a \
8032 -e "$EXTMSV80/msvcr80.dll"; then
8033 AC_MSG_RESULT([Found])
8036 #uwin-prefixed paths are with no quotes to allow for mask, and uwin to not have spaces, btw
8037 uwin=`cygpath -d "$WINDIR"`
8038 uwin=`cygpath -u "$uwin"`
8039 #if we have one we have all
8040 if test -e $uwin/winsxs/x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053* ; then
8041 MSVC80_DLL_DIR=`ls -d $uwin/winsxs/x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053*`
8042 MSVC80_MNFST=`ls $uwin/winsxs/Manifests/x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_*.manifest`
8043 AC_MSG_RESULT([Found])
8046 AC_MSG_RESULT([Not Found])
8047 AC_MSG_ERROR([For the pre-built Mozilla libraries, you need MSVC 2005 runtime files
8048 Microsoft.VC80.CRT.manifest, msvcp80.dll, and msvcr80.dll
8049 in external/msvcp80.
8051 You can get them by installing:
8052 <http://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE>
8053 and relaunch ./autogen.sh])
8060 AC_SUBST(MSVC80_DLL_DIR)
8061 AC_SUBST(MSVC80_MNFST)
8065 dnl ===================================================================
8066 dnl Check for system NSS
8067 dnl ===================================================================
8068 AC_MSG_CHECKING([which NSS to use])
8069 if test "$with_system_nss" = "yes"; then
8070 AC_MSG_RESULT([external])
8072 PKG_CHECK_MODULES(NSS, nss >= 3.9.3 nspr >= 4.8)
8073 libo_MINGW_CHECK_DLL([NSPR4], [libnspr4])
8074 libo_MINGW_CHECK_DLL([PLC4], [libplc4])
8075 libo_MINGW_CHECK_DLL([PLDS4], [libplds4])
8076 libo_MINGW_CHECK_DLL([NSS3], [nss3])
8077 libo_MINGW_CHECK_DLL([NSSUTIL3], [nssutil3])
8078 libo_MINGW_CHECK_DLL([SMIME3], [smime3])
8079 libo_MINGW_CHECK_DLL([SSL3], [ssl3])
8082 BUILD_TYPE="$BUILD_TYPE NSS"
8083 AC_MSG_RESULT([internal])
8084 if test "$build_os" = "cygwin"; then
8085 AC_MSG_CHECKING([for nss build tooling]) # coming from mozilla
8086 if test -z "$NSSBUILDTOOLS"; then
8087 AC_MSG_ERROR([nss build tooling not provided
8088 Use the --with-nss-build-tools option after installing the tools obtained
8089 from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
8091 if test \( "$WITH_MINGW" = "yes" -a ! -d "$NSSBUILDTOOLS" \) \
8092 -o ! -d "$NSSBUILDTOOLS/moztools" \
8093 -o ! -d "$NSSBUILDTOOLS/msys" ; then
8094 AC_MSG_ERROR([nss build tooling incomplete!])
8101 AC_SUBST(SYSTEM_NSS)
8102 AC_SUBST(NSS_CFLAGS)
8104 AC_SUBST(NSSBUILDTOOLS)
8105 AC_SUBST(MINGW_SMIME3_DLL)
8107 dnl ===================================================================
8108 dnl Check for system mozilla headers
8109 dnl ===================================================================
8110 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=
8111 AC_MSG_CHECKING([which NPAPI headers to use])
8113 if test "$with_system_npapi_headers" = "yes"; then
8114 AC_MSG_RESULT([external])
8115 SYSTEM_NPAPI_HEADERS=YES
8116 # First try npapi-sdk:
8117 PKG_CHECK_MODULES(NPAPI_HEADERS, npapi-sdk, [LOCATED=yes], [LOCATED=no])
8118 # Then go with libxul:
8119 if test "x$LOCATED" != "xyes"; then
8120 PKG_CHECK_MODULES(NPAPI_HEADERS, libxul, [LOCATED=yes], [LOCATED=no])
8122 if test "x$LOCATED" != "xyes"; then
8123 PKG_CHECK_MODULES(NPAPI_HEADERS, mozilla-plugin, [LOCATED=yes], [LOCATED=no])
8125 # if still not found bail out
8126 if test "x$LOCATED" != "xyes"; then
8127 AC_MSG_ERROR([npapi.h header file not found])
8132 CFLAGS="$CFLAGS $NPAPI_HEADERS_CFLAGS"
8133 AC_MSG_CHECKING([for NPP_GetMIMEDescription return type])
8138 const char* NPP_GetMIMEDescription(void) { return "foo"; }
8140 [AC_MSG_RESULT([const char*])],
8142 AC_MSG_RESULT([char*])
8143 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=TRUE
8148 AC_MSG_RESULT([internal])
8149 dnl ...but will not be built/used unless ENABLE_NPAPI_FROM_BROWSER or
8150 dnl ENABLE_NPAPI_INTO_BROWSER is YES
8151 SYSTEM_NPAPI_HEADERS=NO
8153 AC_SUBST(NPAPI_HEADERS_CFLAGS)
8154 AC_SUBST(SYSTEM_NPAPI_HEADERS)
8155 AC_SUBST(HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION)
8157 dnl ===================================================================
8158 dnl Check for system sane
8159 dnl ===================================================================
8160 AC_MSG_CHECKING([which sane header to use])
8161 if test "$with_system_sane" = "yes"; then
8162 AC_MSG_RESULT([external])
8163 AC_CHECK_HEADER(sane/sane.h, [],
8164 [AC_MSG_ERROR(sane not found. install sane)], [])
8166 AC_MSG_RESULT([internal])
8167 BUILD_TYPE="$BUILD_TYPE SANE"
8170 dnl ===================================================================
8171 dnl Check for system icu
8172 dnl ===================================================================
8180 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
8181 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="YES"
8182 ICU_RECLASSIFIED_HEBREW_LETTER="YES"
8183 AC_MSG_CHECKING([which icu to use])
8184 if test "$with_system_icu" = "yes"; then
8185 AC_MSG_RESULT([external])
8188 AC_MSG_CHECKING([for unicode/rbbi.h])
8189 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
8193 if test "$WITH_MINGW" = "yes"; then
8194 ICUPATH=`$CC -print-sysroot`/mingw/bin:"$ICUPATH"
8196 AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
8198 AC_MSG_CHECKING([ICU version])
8199 ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
8200 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
8201 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
8202 ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3`
8204 if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "6" \); then
8205 AC_MSG_RESULT([OK, $ICU_VERSION])
8207 AC_MSG_ERROR([not suitable, only >= 4.6 supported currently])
8210 if test "$cross_compiling" = "yes" -a \( "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \); then
8211 AC_PATH_PROG([ICUCONFIG_FOR_BUILD], [icu-config], [], [$PATH:/usr/sbin:/sbin])
8212 ICU_VERSION_FOR_BUILD=`$ICUCONFIG_FOR_BUILD --noverify --version 2>/dev/null || $ICUCONFIG_FOR_BUILD --version`
8213 ICU_MAJOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f1`
8214 ICU_MINOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f2`
8215 AC_MSG_CHECKING([if MinGW and system versions of ICU are compatible])
8216 if test "$ICU_MAJOR" -eq "$ICU_MAJOR_FOR_BUILD" -a "$ICU_MINOR" -eq "$ICU_MINOR_FOR_BUILD"; then
8217 AC_MSG_RESULT([yes])
8220 if test "$with_system_icu_for_build" != "force"; then
8221 AC_MSG_ERROR([System ICU is not version-compatible with MinGW ICU.
8222 You can use --with-system-icu-for-build=force to use it anyway.])
8227 if test "$cross_compiling" != "yes" -o "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force"; then
8228 # using the system icu tools can lead to version confusion, use the
8229 # ones from the build environment when cross-compiling
8230 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
8231 if test -z "$SYSTEM_GENBRK"; then
8232 AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
8234 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
8235 if test -z "$SYSTEM_GENCCODE"; then
8236 AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
8238 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
8239 if test -z "$SYSTEM_GENCMN"; then
8240 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
8242 if test "$ICU_MAJOR" -ge "49"; then
8243 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
8245 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="NO"
8247 if test "$ICU_MAJOR" -le 4; then
8248 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="NO"
8249 ICU_RECLASSIFIED_HEBREW_LETTER="NO"
8253 libo_MINGW_CHECK_DLL([ICUDATA], [icudata][$ICU_MAJOR][$ICU_MINOR])
8254 libo_MINGW_CHECK_DLL([ICUI18N], [icui18n][$ICU_MAJOR][$ICU_MINOR])
8255 libo_MINGW_CHECK_DLL([ICUUC], [icuuc][$ICU_MAJOR][$ICU_MINOR])
8257 AC_MSG_RESULT([internal])
8259 BUILD_TYPE="$BUILD_TYPE ICU"
8261 AC_SUBST(SYSTEM_ICU)
8262 AC_SUBST(SYSTEM_GENBRK)
8263 AC_SUBST(SYSTEM_GENCCODE)
8264 AC_SUBST(SYSTEM_GENCMN)
8268 AC_SUBST([ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER])
8269 AC_SUBST([ICU_RECLASSIFIED_HEBREW_LETTER])
8270 AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
8271 AC_SUBST([MINGW_ICUDATA_DLL])
8272 AC_SUBST([MINGW_ICUI18N_DLL])
8273 AC_SUBST([MINGW_ICUUC_DLL])
8275 dnl ===================================================================
8277 dnl ===================================================================
8279 AC_MSG_CHECKING([whether to enable graphite support])
8280 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "$enable_graphite" = "" -o "$enable_graphite" != "no"; then
8281 AC_MSG_RESULT([yes])
8282 ENABLE_GRAPHITE="TRUE"
8283 AC_MSG_CHECKING([which graphite to use])
8284 if test "$with_system_graphite" = "yes"; then
8285 AC_MSG_RESULT([external])
8287 PKG_CHECK_MODULES( GRAPHITE, graphite2 >= 0.9.3 )
8288 libo_MINGW_CHECK_DLL([GRAPHITE2], [libgraphite2])
8290 AC_MSG_RESULT([internal])
8292 BUILD_TYPE="$BUILD_TYPE GRAPHITE"
8297 AC_SUBST(ENABLE_GRAPHITE)
8298 AC_SUBST(SYSTEM_GRAPHITE)
8299 AC_SUBST(GRAPHITE_CFLAGS)
8300 AC_SUBST(GRAPHITE_LIBS)
8301 AC_SUBST([MINGW_GRAPHITE2_DLL])
8303 dnl ===================================================================
8304 dnl Check for NPAPI interface to plug browser plugins into LibreOffice documents
8305 dnl ===================================================================
8306 AC_MSG_CHECKING([whether to plug browser plugins into LibreOffice documents])
8307 if test "$_os" != Android -a "$_os" != iOS
8309 AC_MSG_RESULT([yes])
8310 ENABLE_NPAPI_FROM_BROWSER=YES
8313 ENABLE_NPAPI_FROM_BROWSER=NO
8315 AC_SUBST(ENABLE_NPAPI_FROM_BROWSER)
8317 dnl ===================================================================
8318 dnl Check for NPAPI interface to plug LibreOffice into browser windows
8319 dnl ===================================================================
8320 AC_MSG_CHECKING([whether to plug LibreOffice into browser windows])
8321 if test "$_os" == WINNT -o "$_os" != Android -a "$_os" != Darwin -a "$_os" != iOS -a \
8322 "$enable_headless" != yes -a "$enable_gtk" != no
8324 AC_MSG_RESULT([yes])
8325 ENABLE_NPAPI_INTO_BROWSER=YES
8328 ENABLE_NPAPI_INTO_BROWSER=NO
8330 AC_SUBST(ENABLE_NPAPI_INTO_BROWSER)
8332 AC_MSG_CHECKING([whether to use X11])
8333 dnl ***************************************
8334 dnl testing for X libraries and includes...
8335 dnl ***************************************
8337 if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS -a "$enable_headless" != "yes"; then
8340 AC_MSG_RESULT([$WANT_X11])
8342 if test "$WANT_X11" = "yes"; then
8345 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8347 if test "x$x_includes" = "x"; then
8348 x_includes="default_x_includes"
8350 if test "x$x_libraries" = "x"; then
8351 x_libraries="default_x_libraries"
8353 dnl The variables $x_libraries and $x_includes are set.
8354 if test -z "$x_libraries"; then
8355 AC_MSG_ERROR([No X libraries found]) # Exit
8357 if test -z "$x_includes"; then
8358 AC_MSG_ERROR([No X includes found]) # Exit
8360 CFLAGS="$CFLAGS $X_CFLAGS"
8361 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
8362 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
8364 x_includes="no_x_includes"
8365 x_libraries="no_x_libraries"
8367 if test -z "$x_includes"; then
8368 x_includes="no_x_includes"
8370 if test -z "$x_libraries"; then
8371 x_libraries="no_x_libraries"
8373 if test "$x_includes" = "default_x_includes"; then
8379 if test "$x_libraries" = "default_x_libraries"; then
8380 XLIB=`$PKG_CONFIG --variable=libdir x11`
8381 if test "x$XLIB" = x; then
8387 if test "$XLIB" != "no_x_libraries" -a "$XLIB" != "/usr/lib" -a "$XLIB" != "/usr/lib64"; then
8388 SOLARLIB="$SOLARLIB -L$XLIB"
8390 if test "$XINC" != "no_x_includes" -a "$XINC" != "/usr/include"; then
8391 SOLARINC="$SOLARINC -I$XINC"
8395 if test "$WANT_X11" = "yes"; then
8396 dnl ===================================================================
8397 dnl Check for Composite.h for Mozilla plugin
8398 dnl ===================================================================
8399 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
8400 [#include <X11/Intrinsic.h>])
8402 dnl ===================================================================
8403 dnl Check for extension headers
8404 dnl ===================================================================
8405 AC_MSG_CHECKING([whether to use internal X11 extensions headers])
8406 if test "$with_system_xextensions_headers" != "no"; then
8408 AC_CHECK_HEADERS(X11/extensions/shape.h,[],[AC_MSG_ERROR([libXext headers not found])],
8409 [#include <X11/extensions/shape.h>])
8411 AC_MSG_RESULT([yes])
8412 BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
8417 dnl ===================================================================
8418 dnl Check for system Xrender
8419 dnl ===================================================================
8420 AC_MSG_CHECKING([whether to use Xrender])
8421 if test "$WANT_X11" = "yes" -a "$test_xrender" = "yes"; then
8422 AC_MSG_RESULT([yes])
8423 PKG_CHECK_MODULES(XRENDER, xrender)
8424 AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
8425 [AC_MSG_ERROR(libXrender not found or functional)], [])
8426 AC_MSG_CHECKING([which Xrender headers to use])
8427 if test "$with_system_xextensions_headers" != "no"; then
8428 AC_MSG_RESULT([external])
8429 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
8430 [AC_MSG_ERROR(Xrender not found. install X)], [])
8432 AC_MSG_RESULT([internal])
8437 AC_SUBST(XRENDER_CFLAGS)
8438 AC_SUBST(XRENDER_LIBS)
8440 dnl ===================================================================
8441 dnl Check for XRandr
8442 dnl ===================================================================
8443 AC_MSG_CHECKING([whether to enable RandR support])
8444 if test "$WANT_X11" = "yes" -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \); then
8445 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
8446 XRANDR_DLOPEN="TRUE"
8447 AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
8449 AC_MSG_RESULT([yes])
8450 XRANDR_DLOPEN="FALSE"
8451 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
8452 if test "$ENABLE_RANDR" != "TRUE"; then
8453 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
8454 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
8456 AC_CHECK_LIB([Xrandr], [XRRQueryExtension], [:],
8457 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
8458 XRANDR_LIBS="-lXrandr "
8466 AC_SUBST(XRANDR_DLOPEN)
8467 AC_SUBST(XRANDR_CFLAGS)
8468 AC_SUBST(XRANDR_LIBS)
8469 AC_SUBST(ENABLE_RANDR)
8471 dnl ===================================================================
8472 dnl Check for building neon
8473 dnl ===================================================================
8474 AC_MSG_CHECKING([whether to use neon])
8475 if test "$enable_neon" = "no"; then
8478 AC_SUBST(DISABLE_NEON)
8480 AC_MSG_RESULT([yes])
8481 dnl ===================================================================
8482 dnl Check for system neon
8483 dnl ===================================================================
8484 AC_MSG_CHECKING([which neon to use])
8485 if test "$with_system_neon" = "yes"; then
8486 AC_MSG_RESULT([external])
8487 PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
8488 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
8490 libo_MINGW_CHECK_DLL([NEON], [libneon])
8491 libo_MINGW_TRY_DLL([TASN1], [libtasn1])
8492 libo_MINGW_TRY_DLL([GNUTLS], [libgnutls])
8494 AC_MSG_RESULT([internal])
8496 BUILD_TYPE="$BUILD_TYPE NEON"
8499 AC_SUBST(SYSTEM_NEON)
8501 AC_SUBST(NEON_CFLAGS)
8502 AC_SUBST(NEON_VERSION)
8503 AC_SUBST([MINGW_GNUTLS_DLL])
8504 AC_SUBST([MINGW_NEON_DLL])
8505 AC_SUBST([MINGW_TASN1_DLL])
8508 dnl ===================================================================
8509 dnl Check for disabling cve_tests
8510 dnl ===================================================================
8511 AC_MSG_CHECKING([whether to execute CVE tests])
8512 if test "$enable_cve_tests" = "no"; then
8514 DISABLE_CVE_TESTS=TRUE
8515 AC_SUBST(DISABLE_CVE_TESTS)
8517 AC_MSG_RESULT([yes])
8520 dnl ===================================================================
8521 dnl Check for system openssl
8522 dnl ===================================================================
8523 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
8524 "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
8525 with_system_openssl=yes
8527 AC_MSG_CHECKING([which libssl to use])
8528 if test "$with_system_openssl" = "yes"; then
8529 AC_MSG_RESULT([external])
8530 # Mac OS builds should get out without extra stuff is the Mac porters'
8531 # wish. And pkg-config is although Xcode ships a .pc for openssl
8532 if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
8533 "$_os" = "DragonFly"; then
8535 OPENSSL_LIBS="-lssl -lcrypto"
8537 PKG_CHECK_MODULES( OPENSSL, openssl )
8540 libo_MINGW_CHECK_DLL([SSL], [libssl])
8541 libo_MINGW_CHECK_DLL([CRYPTO], [libcrypto])
8543 AC_MSG_RESULT([internal])
8545 BUILD_TYPE="$BUILD_TYPE OPENSSL"
8547 AC_SUBST(SYSTEM_OPENSSL)
8548 AC_SUBST(OPENSSL_CFLAGS)
8549 AC_SUBST(OPENSSL_LIBS)
8550 AC_SUBST([MINGW_SSL_DLL])
8551 AC_SUBST([MINGW_CRYPTO_DLL])
8553 dnl ===================================================================
8554 dnl Check for system redland
8555 dnl ===================================================================
8556 AC_MSG_CHECKING([which redland library to use])
8557 if test "$with_system_redland" = "yes"; then
8558 AC_MSG_RESULT([external])
8560 dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
8561 PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8)
8562 libo_MINGW_CHECK_DLL([REDLAND], [librdf])
8563 libo_MINGW_TRY_DLL([RAPTOR], [libraptor])
8564 libo_MINGW_TRY_DLL([RASQAL], [librasqal])
8565 libo_MINGW_TRY_DLL([SQLITE3], [libsqlite3])
8567 AC_MSG_RESULT([internal])
8568 BUILD_TYPE="$BUILD_TYPE REDLAND"
8571 AC_SUBST(SYSTEM_REDLAND)
8572 AC_SUBST(REDLAND_CFLAGS)
8573 AC_SUBST(REDLAND_LIBS)
8574 AC_SUBST([MINGW_RAPTOR_DLL])
8575 AC_SUBST([MINGW_RASQAL_DLL])
8576 AC_SUBST([MINGW_REDLAND_DLL])
8577 AC_SUBST([MINGW_SQLITE3_DLL])
8579 dnl ===================================================================
8580 dnl Check for system orcus
8581 dnl ===================================================================
8582 AC_MSG_CHECKING([which orcus library to use])
8583 if test "$with_system_orcus" = "yes"; then
8584 AC_MSG_RESULT([external])
8586 PKG_CHECK_MODULES(ORCUS, liborcus-0.4 >= 0.3.0)
8588 AC_MSG_RESULT([internal])
8589 BUILD_TYPE="$BUILD_TYPE ORCUS"
8592 if test "$SYSTEM_BOOST" = "YES"; then
8593 # ===========================================================
8594 # Determine if we are going to need to link with Boost.System
8595 # ===========================================================
8596 dnl This seems to be necessary since boost 1.50 (1.48 does not need it,
8597 dnl 1.49 is untested). The macro BOOST_THREAD_DONT_USE_SYSTEM mentioned
8598 dnl in documentation has no effect.
8599 AC_MSG_CHECKING([if we need to link with Boost.System])
8601 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
8602 @%:@include <boost/version.hpp>
8604 #if BOOST_VERSION >= 105000
8605 # error yes, we need to link with Boost.System
8610 AC_MSG_RESULT([yes])
8616 AC_SUBST([BOOST_SYSTEM_LIB])
8617 AC_SUBST(SYSTEM_LIBORCUS)
8618 AC_SUBST(ORCUS_CFLAGS)
8619 AC_SUBST(ORCUS_LIBS)
8621 dnl ===================================================================
8622 dnl Check for system hunspell
8623 dnl ===================================================================
8624 AC_MSG_CHECKING([which libhunspell to use])
8625 if test "$with_system_hunspell" = "yes"; then
8626 AC_MSG_RESULT([external])
8629 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
8630 if test "$HUNSPELL_PC" != "TRUE"; then
8631 AC_CHECK_HEADER(hunspell.hxx, [],
8633 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
8634 [AC_MSG_ERROR(hunspell headers not found.)], [])
8636 AC_CHECK_LIB([hunspell], [main], [:],
8637 [ AC_MSG_ERROR(hunspell library not found.) ], [])
8638 HUNSPELL_LIBS=-lhunspell
8641 libo_MINGW_CHECK_DLL([HUNSPELL], [libhunspell-1.3])
8643 AC_MSG_RESULT([internal])
8645 HUNSPELL_CFLAGS="-I${WORKDIR}/UnpackedTarball/hunspell/src/hunspell"
8646 HUNSPELL_LIBS="-L${OUTDIR}/lib -lhunspell"
8647 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
8649 AC_SUBST(SYSTEM_HUNSPELL)
8650 AC_SUBST(HUNSPELL_CFLAGS)
8651 AC_SUBST(HUNSPELL_LIBS)
8652 AC_SUBST([MINGW_HUNSPELL_DLL])
8654 dnl ===================================================================
8655 dnl Checking for altlinuxhyph
8656 dnl ===================================================================
8657 AC_MSG_CHECKING([which altlinuxhyph to use])
8658 if test "$with_system_altlinuxhyph" = "yes"; then
8659 AC_MSG_RESULT([external])
8661 AC_CHECK_HEADER(hyphen.h, [],
8662 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
8663 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
8664 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
8665 [#include <hyphen.h>])
8666 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
8667 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
8668 if test -z "$HYPHEN_LIB"; then
8669 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
8670 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
8672 if test -z "$HYPHEN_LIB"; then
8673 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
8674 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
8676 libo_MINGW_CHECK_DLL([HYPHEN], [libhyphen])
8678 AC_MSG_RESULT([internal])
8680 BUILD_TYPE="$BUILD_TYPE HYPHEN"
8682 AC_SUBST(SYSTEM_HYPH)
8683 AC_SUBST(HYPHEN_LIB)
8684 AC_SUBST([MINGW_HYPHEN_DLL])
8686 dnl ===================================================================
8687 dnl Checking for mythes
8688 dnl ===================================================================
8689 AC_MSG_CHECKING([which mythes to use])
8690 if test "$with_system_mythes" = "yes"; then
8691 AC_MSG_RESULT([external])
8694 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
8695 if test "$MYTHES_PKGCONFIG" = "no"; then
8696 AC_CHECK_HEADER(mythes.hxx, [],
8697 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
8698 AC_CHECK_LIB([mythes-1.2], [main], [:],
8699 [ MYTHES_FOUND=no], [])
8700 if test "$MYTHES_FOUND" = "no"; then
8701 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
8702 [ MYTHES_FOUND=no], [])
8704 if test "$MYTHES_FOUND" = "no"; then
8705 AC_MSG_ERROR([mythes library not found!.])
8709 libo_MINGW_CHECK_DLL([MYTHES], [libmythes-1.2])
8711 AC_MSG_RESULT([internal])
8713 BUILD_TYPE="$BUILD_TYPE MYTHES"
8715 AC_SUBST(SYSTEM_MYTHES)
8716 AC_SUBST(MYTHES_CFLAGS)
8717 AC_SUBST(MYTHES_LIBS)
8718 AC_SUBST([MINGW_MYTHES_DLL])
8720 dnl ===================================================================
8721 dnl Checking for lpsolve
8722 dnl ===================================================================
8723 AC_MSG_CHECKING([which lpsolve to use])
8724 if test "$with_system_lpsolve" = "yes"; then
8725 AC_MSG_RESULT([external])
8727 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
8728 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
8730 # some systems need this. Like Ubuntu....
8731 AC_CHECK_LIB(m, floor)
8732 AC_CHECK_LIB(dl, dlopen)
8733 AC_CHECK_LIB([lpsolve55], [make_lp], [:],
8734 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
8736 libo_MINGW_CHECK_DLL([LPSOLVE], [lpsolve55])
8738 AC_MSG_RESULT([internal])
8740 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
8742 AC_SUBST(SYSTEM_LPSOLVE)
8743 AC_SUBST([MINGW_LPSOLVE_DLL])
8745 dnl ===================================================================
8746 dnl Checking for libexttextcat
8747 dnl ===================================================================
8748 AC_MSG_CHECKING([which libexttextcat to use])
8749 if test "$with_system_libexttextcat" = "yes"; then
8750 AC_MSG_RESULT([external])
8751 SYSTEM_LIBEXTTEXTCAT=YES
8752 PKG_CHECK_MODULES([LIBEXTTEXTCAT], [libexttextcat >= 3.1.1])
8753 SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
8755 AC_MSG_RESULT([internal])
8756 SYSTEM_LIBEXTTEXTCAT=NO
8757 BUILD_TYPE="$BUILD_TYPE LIBEXTTEXTCAT"
8759 AC_SUBST(SYSTEM_LIBEXTTEXTCAT)
8760 AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
8761 AC_SUBST(LIBEXTTEXTCAT_CFLAGS)
8762 AC_SUBST(LIBEXTTEXTCAT_LIBS)
8764 dnl ***************************************
8765 dnl testing libc version for Linux...
8766 dnl ***************************************
8767 if test "$_os" = "Linux"; then
8768 AC_MSG_CHECKING([whether libc is >= 2.1.1])
8769 exec 6>/dev/null # no output
8770 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
8771 exec 6>&1 # output on again
8772 if test "$HAVE_LIBC"; then
8773 AC_MSG_RESULT([yes])
8775 AC_MSG_ERROR([no, upgrade libc])
8779 if test "$_os" != "WINNT"; then
8780 AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO])
8781 AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO])
8782 if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then
8790 AC_SUBST(HAVE_GETOPT)
8791 AC_SUBST(HAVE_READDIR_R)
8792 AC_SUBST(SYSTEM_LIBC)
8794 dnl =========================================
8795 dnl Check for the Windows SDK.
8796 dnl =========================================
8797 dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
8798 dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
8799 if test "$_os" = "WINNT"; then
8800 AC_MSG_CHECKING([for Windows SDK])
8801 if test "$build_os" = "cygwin"; then
8802 if test -z "$with_windows_sdk_home"; then
8803 # This first line will detect a February 2003 Microsoft Platform SDK
8804 WINDOWS_SDK_HOME=`./oowintool --windows-sdk-home`
8805 # But there might be also an April 2005 PSDK, unfortunately MS changed
8806 # the registry entry. (we prefer the old version!?)
8807 if test -z "$WINDOWS_SDK_HOME"; then
8808 WINDOWS_SDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
8810 # normalize if found
8811 if test -n "$WINDOWS_SDK_HOME"; then
8812 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
8813 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
8815 # If this sdk is incomplete, lets see if the one
8816 # recommended to be installed is available.
8818 # This refers to the Windows SDK 8 (as distributed
8819 # with Visual Studio 2012, or maybe also
8820 # separately), I assume.
8822 # I wouldn't say that it is "incomplete", it is
8823 # just structured differtently. We do seem to try
8824 # to adapt to that structure below (look for the
8825 # Include/um etc stuff), so rejecting it here is a
8826 # bit premature... *but* then one notices that
8827 # compiling with MSVS2008 and trying to use SDK 8
8828 # leads to horrible errors in ICU at least. Oh
8831 if test ! -x "$WINDOWS_SDK_HOME/bin/msiinfo.exe"; then
8832 WINDOWS_SDK7_HOME=`cat "/proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v7.1/InstallationFolder" 2> /dev/null | tr '\000' '\n' | head -n 1`
8833 if test -n "$WINDOWS_SDK7_HOME"; then
8834 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK7_HOME"`
8835 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
8840 WINDOWS_SDK_HOME=`cygpath -u "$with_windows_sdk_home"`
8843 if test -n "$WINDOWS_SDK_HOME"; then
8844 # Remove a possible trailing backslash
8845 WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
8846 # Problem with current PSDK (iz 49865)
8847 # (What "current" does that mean?)
8848 if test -f "$WINDOWS_SDK_HOME/Lib/libcp.lib"; then
8850 Some modules do not build correctly with MS Platform SDK - April 2005
8851 Edition if the library ($WINDOWS_SDK_HOME/Lib/libcp.lib) is found.
8852 Remove/rename/backup that file and restart configure. Details about this
8853 problem can be found in issue 49856.])
8856 if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
8857 -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
8858 -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
8860 elif test -f "$WINDOWS_SDK_HOME/Include/um/adoint.h" \
8861 -a -f "$WINDOWS_SDK_HOME/Include/um/SqlUcode.h" \
8862 -a -f "$WINDOWS_SDK_HOME/Include/um/usp10.h"; then
8867 if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
8869 elif test -f "$WINDOWS_SDK_HOME/lib/win8/um/$SDK_ARCH/user32.lib"; then
8875 if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
8876 AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
8877 the Windows SDK are installed.])
8880 if test ! -x "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
8881 -o ! -x "$WINDOWS_SDK_HOME/bin/msidb.exe" \
8882 -o ! -x "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
8883 -o ! -x "$WINDOWS_SDK_HOME/bin/msitran.exe"; then :
8884 elif test ! -x "$WINDOWS_SDK_HOME/bin/x86/msiinfo.exe" \
8885 -o ! -x "$WINDOWS_SDK_HOME/bin/x86/msidb.exe" \
8886 -o ! -x "$WINDOWS_SDK_HOME/bin/x86/uuidgen.exe" \
8887 -o ! -x "$WINDOWS_SDK_HOME/bin/x86/msitran.exe"; then :
8889 AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.])
8893 if test -z "$WINDOWS_SDK_HOME"; then
8894 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
8895 elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
8896 WINDOWS_SDK_VERSION=61
8897 AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
8898 elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
8899 WINDOWS_SDK_VERSION=60
8900 AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
8901 elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
8902 WINDOWS_SDK_VERSION=70
8903 AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
8904 elif echo $WINDOWS_SDK_HOME | grep "8.0" >/dev/null 2>/dev/null; then
8905 WINDOWS_SDK_VERSION=80
8906 AC_MSG_RESULT([found Windows SDK 8.0 ($WINDOWS_SDK_HOME)])
8908 AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
8910 PathFormat "$WINDOWS_SDK_HOME"
8911 WINDOWS_SDK_HOME="$formatted_path"
8912 if test "$build_os" = "cygwin"; then
8913 SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include -I$COMPATH/include"
8914 if test -d "$WINDOWS_SDK_HOME/include/um"; then
8915 SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include/um -I$WINDOWS_SDK_HOME/include/shared"
8919 AC_SUBST(WINDOWS_SDK_HOME)
8920 AC_SUBST(WINDOWS_SDK_VERSION)
8922 dnl =========================================
8923 dnl Check for uuidgen
8924 dnl =========================================
8925 if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
8926 if test "$WITH_MINGW" = "yes"; then
8927 AC_PATH_PROG([UUIDGEN], [uuid])
8928 if test -z "$UUIDGEN"; then
8929 AC_MSG_WARN([uuid is needed for dev-install])
8932 # presence is already tested above in the WINDOWS_SDK_HOME check
8937 AC_PATH_PROG([UUIDGEN], [uuidgen])
8938 if test -z "$UUIDGEN"; then
8939 AC_MSG_WARN([uuid is needed for dev-install])
8943 dnl =========================================
8944 dnl Check for the Microsoft DirectX SDK.
8945 dnl =========================================
8946 if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
8947 AC_MSG_CHECKING([for DirectX SDK])
8948 if test "$build_os" = "cygwin"; then
8949 if test -z "$with_directx_home"; then
8950 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
8951 if test -n "$DXSDK_DIR"; then
8952 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
8953 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
8955 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
8956 # the "DirectX SDK not found" error later
8958 DIRECTXSDK_HOME=`cygpath -u "$with_directx_home"`
8960 # Remove a possible trailing backslash
8961 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
8962 elif test -n "$with_directx_home"; then
8963 DIRECTXSDK_HOME="$with_directx_home"
8966 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h"; then
8967 HAVE_DIRECTXSDK_H="yes"
8969 HAVE_DIRECTXSDK_H="no"
8972 if test "$BITNESS_OVERRIDE" = 64; then
8973 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x64"
8975 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
8977 PathFormat "$DIRECTXSDK_LIB"
8978 DIRECTXSDK_LIB="$formatted_path"
8980 if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib"; then
8981 HAVE_DIRECTXSDK_LIB="yes"
8983 HAVE_DIRECTXSDK_LIB="no"
8986 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
8987 AC_MSG_RESULT([found])
8989 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
8991 PathFormat "$DIRECTXSDK_HOME"
8992 DIRECTXSDK_HOME="$formatted_path"
8993 SOLARINC="$SOLARINC -I$DIRECTXSDK_HOME/include"
8995 AC_SUBST(DIRECTXSDK_HOME)
8996 AC_SUBST(DIRECTXSDK_LIB)
8998 dnl ***************************************
8999 dnl Checking for bison and flex
9000 dnl ***************************************
9001 AC_PATH_PROG(BISON, bison)
9003 if test -z "$BISON"; then
9004 AC_MSG_ERROR([no bison found in \$PATH, install it])
9006 AC_MSG_CHECKING([the bison version])
9007 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
9008 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
9009 # Accept newer than 1.875 or older(equal) than 1.75
9010 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
9011 if test "$_bison_version" = "1.875"; then
9012 AC_MSG_WARN([suspect ($BISON $_bison_version)])
9013 add_warning "Suspect ($BISON $_bison_version) suggest upgrade"
9015 AC_MSG_RESULT([checked ($BISON $_bison_version)])
9018 AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
9020 if test "$_bison_longver" -lt 2000; then
9024 AC_SUBST(ANCIENT_BISON)
9026 AC_PATH_PROG(FLEX, flex)
9027 if test -z "$FLEX"; then
9028 AC_MSG_ERROR([no flex found in \$PATH, install it])
9031 dnl ***************************************
9032 dnl Checking for patch
9033 dnl ***************************************
9034 AC_PATH_PROG(PATCH, patch)
9035 if test -z "$PATCH"; then
9036 AC_MSG_ERROR([\"patch\" not found in \$PATH, install it])
9039 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
9040 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
9041 if test -z "$with_gnu_patch"; then
9044 if test -x "$with_gnu_patch"; then
9045 GNUPATCH=$with_gnu_patch
9047 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
9051 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
9052 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
9053 AC_MSG_RESULT([yes])
9055 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
9061 dnl We also need to check for --with-gnu-cp
9063 if test -z "$with_gnu_cp"; then
9064 # check the place where the good stuff is hidden on Solaris...
9065 if test -x /usr/gnu/bin/cp; then
9066 GNUCP=/usr/gnu/bin/cp
9068 AC_PATH_PROGS(GNUCP, gnucp cp)
9070 if test -z $GNUCP; then
9071 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
9074 if test -x "$with_gnu_cp"; then
9077 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
9081 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
9082 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
9083 AC_MSG_RESULT([yes])
9084 elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
9085 AC_MSG_RESULT([yes])
9088 darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*)
9091 AC_MSG_RESULT([no gnucp found - using the system's cp command])
9094 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
9103 dnl ***************************************
9104 dnl testing assembler path
9105 dnl ***************************************
9107 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
9108 if test "$BITNESS_OVERRIDE" = ""; then
9113 assembler_bin=bin/amd64
9115 if test -n "$with_asm_home"; then
9116 with_asm_home=`cygpath -u "$with_asm_home"`
9118 if test -x "$with_asm_home/$assembler"; then
9119 AC_MSG_CHECKING([$assembler assembler path])
9120 AC_MSG_RESULT([$with_asm_home/$assembler])
9121 ML_EXE="$with_asm_home/$assembler"
9123 AC_PATH_PROG(ML_EXE, $assembler)
9124 if test -z "$ML_EXE"; then
9125 AC_MSG_CHECKING([$with_cl_home/$assembler_bin/$assembler])
9126 if test -x "$with_cl_home/$assembler_bin/$assembler"; then
9127 with_asm_home=$with_cl_home/$assembler_bin
9128 AC_MSG_RESULT([found])
9129 ML_EXE="$with_cl_home/$assembler_bin/$assembler"
9131 AC_MSG_ERROR([Configure did not find $assembler assembler.])
9134 with_asm_home="ASM_IN_PATH"
9138 PathFormat "$with_asm_home"
9139 ASM_HOME="$formatted_path"
9146 dnl ===================================================================
9147 dnl We need zip and unzip
9148 dnl ===================================================================
9149 AC_PATH_PROG(ZIP, zip)
9150 test -z "$ZIP" && AC_MSG_ERROR([zip is required])
9151 if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
9152 AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install it and make sure it is the one found first in PATH],,)
9155 AC_PATH_PROG(UNZIP, unzip)
9156 test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
9158 dnl ===================================================================
9159 dnl Zip must be a specific type for different build types.
9160 dnl ===================================================================
9161 if test $build_os = cygwin; then
9162 if test -n "`$ZIP -h | $GREP -i WinNT`"; then
9163 AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
9167 dnl ===================================================================
9168 dnl Test which vclplugs have to be built.
9169 dnl ===================================================================
9174 if test "x$enable_gtk3" = "xyes"; then
9175 if test "$with_system_cairo" != yes; then
9176 AC_MSG_WARN([System cairo required for gtk3 support, please use --with-system-cairo])
9177 add_warning "System cairo required for gtk3 support, please use --with-system-cairo"
9179 PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.2 gtk+-unix-print-3.0 gmodule-no-export-2.0 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="")
9180 if test "x$ENABLE_GTK3" = "xTRUE"; then
9183 AC_MSG_ERROR([gtk3 libraries of the correct versions, not found])
9187 AC_SUBST(GTK3_CFLAGS)
9188 AC_SUBST(ENABLE_GTK3)
9190 AC_MSG_CHECKING([which VCLplugs shall be built])
9191 if test "$GUIBASE" != "unx" -o "$enable_headless" = "yes"; then
9195 if test "x$enable_gtk" = "xyes"; then
9199 AC_SUBST(ENABLE_GTK)
9202 if test "x$enable_tde" = "xyes"; then
9203 # Libs kab and tdeab in connectivity and kdeab and tdeab in shell
9204 # are built from the same sources. So we only allow one of them.
9205 if test "x$enable_kde" = "xyes"; then
9206 AC_MSG_ERROR([enabling both KDE and TDE is not supported])
9211 AC_SUBST(ENABLE_TDE)
9214 if test "x$enable_kde" = "xyes"; then
9218 AC_SUBST(ENABLE_KDE)
9221 if test "x$enable_kde4" = "xyes"; then
9225 AC_SUBST(ENABLE_KDE4)
9228 if test "x$enable_headless" = "xyes"; then
9229 ENABLE_HEADLESS="TRUE"
9230 SCPDEFS="$SCPDEFS -DLIBO_HEADLESS"
9233 AC_SUBST(ENABLE_HEADLESS)
9235 if test -z "$R"; then
9236 AC_MSG_RESULT([none])
9241 dnl ===================================================================
9243 dnl ===================================================================
9246 AC_MSG_CHECKING([whether to enable GConf support])
9247 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gconf" = "yes"; then
9249 AC_MSG_RESULT([yes])
9250 PKG_CHECK_MODULES( GCONF, gconf-2.0 gobject-2.0 )
9254 AC_SUBST(GCONF_LIBS)
9255 AC_SUBST(GCONF_CFLAGS)
9256 AC_SUBST(ENABLE_GCONF)
9258 dnl ===================================================================
9260 dnl ===================================================================
9263 AC_MSG_CHECKING([whether to enable GNOME VFS support])
9264 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" -a "$enable_gconf" = "yes"; then
9265 ENABLE_GNOMEVFS="TRUE"
9266 AC_MSG_RESULT([yes])
9267 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
9271 AC_SUBST(GNOMEVFS_LIBS)
9272 AC_SUBST(GNOMEVFS_CFLAGS)
9273 AC_SUBST(ENABLE_GNOMEVFS)
9275 dnl ===================================================================
9276 dnl check for dbus support
9277 dnl ===================================================================
9282 if test "$enable_dbus" = "no"; then
9286 AC_MSG_CHECKING([whether to enable DBUS support])
9287 if test "$test_dbus" = "yes"; then
9289 AC_MSG_RESULT([yes])
9290 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.70)
9295 AC_SUBST(ENABLE_DBUS)
9296 AC_SUBST(DBUS_CFLAGS)
9299 AC_MSG_CHECKING([whether to enable font install via packagekit])
9300 if test "$ENABLE_DBUS" = "TRUE"; then
9301 if test -n "$enable_packagekit" -a "$enable_packagekit" != "no"; then
9302 ENABLE_PACKAGEKIT=YES
9303 AC_MSG_RESULT([yes])
9305 ENABLE_PACKAGEKIT=NO
9309 AC_MSG_RESULT([no, dbus disabled.])
9311 AC_SUBST(ENABLE_PACKAGEKIT)
9313 AC_MSG_CHECKING([whether to enable Impress remote control])
9314 if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
9315 AC_MSG_RESULT([yes])
9317 AC_MSG_CHECKING([whether to enable Bluetooth support in Impress remote control])
9319 # If not explicitly enabled or disabled, default
9320 if test -z "$enable_sdremote_bluetooth"; then
9323 # Default to yes for these
9324 enable_sdremote_bluetooth=yes
9328 enable_sdremote_bluetooth=no
9332 # $enable_sdremote_bluetooth is guaranteed non-empty now
9334 if test "$enable_sdremote_bluetooth" != "no"; then
9335 if test "$OS" = "LINUX"; then
9336 if test "$ENABLE_DBUS" = "TRUE"; then
9337 AC_MSG_RESULT([yes])
9338 ENABLE_SDREMOTE_BLUETOOTH=YES
9339 dnl ===================================================================
9340 dnl Check for system bluez
9341 dnl ===================================================================
9342 AC_MSG_CHECKING([which Bluetooth header to use])
9343 if test "$with_system_bluez" = "yes"; then
9344 AC_MSG_RESULT([external])
9345 AC_CHECK_HEADER(bluetooth/bluetooth.h, [],
9346 [AC_MSG_ERROR(bluetooth.h not found. install bluez)], [])
9348 AC_MSG_RESULT([internal])
9349 BUILD_TYPE="$BUILD_TYPE BLUEZ"
9352 AC_MSG_RESULT([no, dbus disabled])
9353 ENABLE_SDREMOTE_BLUETOOTH=NO
9356 AC_MSG_RESULT([yes])
9357 ENABLE_SDREMOTE_BLUETOOTH=YES
9361 ENABLE_SDREMOTE_BLUETOOTH=NO
9367 AC_SUBST(ENABLE_SDREMOTE)
9368 AC_SUBST(ENABLE_SDREMOTE_BLUETOOTH)
9370 dnl ===================================================================
9371 dnl Check whether the gtk 2.0 libraries are available.
9372 dnl ===================================================================
9376 ENABLE_SYSTRAY_GTK=""
9377 if test "$test_gtk" = "yes"; then
9379 if test "$ENABLE_GTK" = "TRUE"; then
9380 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]))
9381 PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages]))
9382 BUILD_TYPE="$BUILD_TYPE GTK"
9384 AC_MSG_CHECKING([whether to enable the systray quickstarter])
9385 if test "x$enable_systray" = "xyes"; then
9386 AC_MSG_RESULT([yes])
9387 PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
9388 [ ENABLE_SYSTRAY_GTK="TRUE" ],
9389 [ ENABLE_SYSTRAY_GTK="" ])
9394 AC_MSG_CHECKING([whether to enable Gtk print dialog support])
9395 PKG_CHECK_MODULES([GTK_PRINT], [gtk+-unix-print-2.0 >= 2.10.0],
9396 [ENABLE_GTK_PRINT="TRUE"],
9397 [ENABLE_GTK_PRINT=""])
9399 AC_MSG_CHECKING([whether to enable GIO support])
9400 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
9401 if test "$ENABLE_GNOMEVFS" = "TRUE"; then
9402 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
9405 AC_MSG_RESULT([yes])
9406 PKG_CHECK_MODULES( GIO, gio-2.0 )
9412 AC_SUBST(ENABLE_GIO)
9413 AC_SUBST(GIO_CFLAGS)
9415 AC_SUBST(ENABLE_SYSTRAY_GTK)
9416 AC_SUBST(GTK_CFLAGS)
9418 AC_SUBST(GTHREAD_CFLAGS)
9419 AC_SUBST(GTHREAD_LIBS)
9420 AC_SUBST([ENABLE_GTK_PRINT])
9421 AC_SUBST([GTK_PRINT_CFLAGS])
9422 AC_SUBST([GTK_PRINT_LIBS])
9425 dnl ===================================================================
9426 dnl Check whether the Telepathy libraries are available.
9427 dnl ===================================================================
9433 AC_MSG_CHECKING([whether to enable Telepathy support])
9434 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_telepathy" = "yes"; then
9435 ENABLE_TELEPATHY="TRUE"
9436 AC_MSG_RESULT([yes])
9437 PKG_CHECK_MODULES( TELEPATHY, telepathy-glib >= 0.18.0 glib-2.0 gobject-2.0 gthread-2.0 gio-2.0 )
9442 AC_SUBST(ENABLE_TELEPATHY)
9443 AC_SUBST(TELEPATHY_CFLAGS)
9444 AC_SUBST(TELEPATHY_LIBS)
9447 dnl ===================================================================
9449 PKG_CHECK_MODULES( LIBPNG, libpng, ENABLE_QUICKSTART_LIBPNG="TRUE", ENABLE_QUICKSTART_LIBPNG="" )
9450 AC_SUBST(LIBPNG_LIBS)
9451 AC_SUBST(LIBPNG_CFLAGS)
9453 AC_MSG_CHECKING([whether to enable libpng linking in quickstarter])
9454 if test "x$enable_unix_qstart_libpng" != "xno"; then
9455 AC_MSG_RESULT([yes])
9458 ENABLE_QUICKSTART_LIBPNG=""
9460 AC_SUBST(ENABLE_QUICKSTART_LIBPNG)
9462 SPLIT_APP_MODULES=""
9463 if test "$enable_split_app_modules" = "yes"; then
9464 SPLIT_APP_MODULES="YES"
9466 AC_SUBST(SPLIT_APP_MODULES)
9468 SPLIT_OPT_FEATURES=""
9469 if test "$enable_split_opt_features" = "yes"; then
9470 SPLIT_OPT_FEATURES="YES"
9472 AC_SUBST(SPLIT_OPT_FEATURES)
9474 if test $_os = Darwin -o $_os = WINNT; then
9475 if test "$enable_cairo_canvas" = yes; then
9476 AC_MSG_ERROR([The cairo canvas should not be used for this platform])
9478 enable_cairo_canvas=no
9479 elif test -z "$enable_cairo_canvas"; then
9480 enable_cairo_canvas=yes
9483 ENABLE_CAIRO_CANVAS=""
9484 if test "$enable_cairo_canvas" = "yes"; then
9486 ENABLE_CAIRO_CANVAS="TRUE"
9488 AC_SUBST(ENABLE_CAIRO_CANVAS)
9490 dnl ===================================================================
9491 dnl Check whether the GStreamer libraries are available.
9492 dnl ===================================================================
9496 if test "$build_gstreamer" = "yes"; then
9498 AC_MSG_CHECKING([whether to enable the new GStreamer 1.0 avmedia backend])
9499 if test "x$enable_gstreamer" != "xno"; then
9500 ENABLE_GSTREAMER="TRUE"
9501 AC_MSG_RESULT([yes])
9502 PKG_CHECK_MODULES( GSTREAMER, gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0 )
9507 AC_SUBST(GSTREAMER_CFLAGS)
9508 AC_SUBST(GSTREAMER_LIBS)
9509 AC_SUBST(ENABLE_GSTREAMER)
9512 ENABLE_GSTREAMER_0_10=""
9513 if test "$build_gstreamer_0_10" = "yes"; then
9515 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
9516 if test "x$enable_gstreamer_0_10" != "xno"; then
9517 ENABLE_GSTREAMER_0_10="TRUE"
9518 AC_MSG_RESULT([yes])
9519 PKG_CHECK_MODULES( [GSTREAMER_0_10], [gstreamer-0.10 gstreamer-plugins-base-0.10 gstreamer-interfaces-0.10],, [
9520 PKG_CHECK_MODULES( [GSTREAMER_0_10], [gstreamer-0.10 gstreamer-plugins-base-0.10] )
9527 AC_SUBST(GSTREAMER_0_10_CFLAGS)
9528 AC_SUBST(GSTREAMER_0_10_LIBS)
9529 AC_SUBST(ENABLE_GSTREAMER_0_10)
9531 dnl ===================================================================
9532 dnl Check whether the OpenGL libraries are available
9533 dnl ===================================================================
9535 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
9538 if test "$_os" = "Darwin"; then
9539 # We use frameworks on Mac OS X, no need for detail checks
9541 SYSTEM_MESA_HEADERS=YES
9542 AC_MSG_RESULT([yes])
9544 if test "x$enable_opengl" != "xno"; then
9545 if test "$_os" != "WINNT"; then
9546 save_LDFLAGS=$LDFLAGS
9547 LDFLAGS="$LDFLAGS -lm"
9548 AC_MSG_RESULT([yes])
9549 AC_CHECK_LIB([GL], [main], [:],
9550 [AC_MSG_ERROR(libGL not installed or functional)], [])
9551 AC_CHECK_LIB([GLU], [main], [:],
9552 [AC_MSG_ERROR(libGLU not installed or functional)], [])
9554 LDFLAGS=$save_LDFLAGS
9556 dnl ===================================================================
9557 dnl Check for system Mesa
9558 dnl ===================================================================
9559 AC_MSG_CHECKING([which Mesa headers to use])
9560 if test "$with_system_mesa_headers" = "yes"; then
9561 AC_MSG_RESULT([external])
9562 SYSTEM_MESA_HEADERS=YES
9564 AC_CHECK_HEADER(GL/glxext.h, [],
9565 [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
9566 AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
9567 AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
9570 AC_MSG_RESULT([internal])
9571 SYSTEM_MESA_HEADERS=NO
9572 BUILD_TYPE="$BUILD_TYPE MESA"
9575 AC_MSG_RESULT([not on Windows])
9582 AC_SUBST(SYSTEM_MESA_HEADERS)
9583 AC_SUBST(ENABLE_OPENGL)
9585 # presenter minimizer extension?
9586 AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
9587 if test "x$enable_ext_presenter_minimizer" != "xno" -a "x$enable_extension_integration" != "xno"; then
9588 AC_MSG_RESULT([yes])
9589 ENABLE_MINIMIZER=YES
9593 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MINIMIZER"
9595 AC_SUBST(ENABLE_MINIMIZER)
9598 AC_MSG_CHECKING([whether to build the PDF import])
9599 if test "$_os" != Android -a "$_os" != iOS -a "$ENABLE_PDFIMPORT" != FALSE; then
9600 AC_MSG_RESULT([yes])
9601 ENABLE_PDFIMPORT=TRUE
9603 dnl ===================================================================
9604 dnl Check for system poppler
9605 dnl ===================================================================
9606 AC_MSG_CHECKING([which pdf backend to use])
9607 if test "$with_system_poppler" = "yes"; then
9608 AC_MSG_RESULT([external])
9610 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
9612 save_CXXFLAGS=$CXXFLAGS
9613 save_CPPFLAGS=$CPPFLAGS
9614 CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
9615 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
9616 AC_CHECK_HEADER([cpp/poppler-version.h], [],
9617 [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
9618 CXXFLAGS=$save_CXXFLAGS
9619 CPPFLAGS=$save_CPPFLAGS
9621 libo_MINGW_CHECK_DLL([POPPLER], [libpoppler])
9623 AC_MSG_RESULT([internal])
9625 BUILD_TYPE="$BUILD_TYPE XPDF"
9629 ENABLE_PDFIMPORT=FALSE
9631 AC_SUBST(ENABLE_PDFIMPORT)
9632 AC_SUBST(SYSTEM_POPPLER)
9633 AC_SUBST(POPPLER_CFLAGS)
9634 AC_SUBST(POPPLER_LIBS)
9635 AC_SUBST([MINGW_POPPLER_DLL])
9637 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
9638 if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
9639 AC_MSG_RESULT([yes])
9640 ENABLE_MEDIAWIKI=YES
9641 BUILD_TYPE="$BUILD_TYPE XSLTML"
9642 if test "x$with_java" = "xno"; then
9643 AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
9648 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
9650 AC_SUBST(ENABLE_MEDIAWIKI)
9652 if test "$ENABLE_MEDIAWIKI" = "YES"; then
9653 AC_MSG_CHECKING([which Servlet API Jar to use])
9654 if test "$with_system_servlet_api" = "yes"; then
9655 AC_MSG_RESULT([external])
9656 SYSTEM_SERVLETAPI=YES
9657 if test -z "$SERVLETAPI_JAR"; then
9658 SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
9660 AC_CHECK_FILE($SERVLETAPI_JAR, [],
9661 [AC_MSG_ERROR(servlet-api.jar not found.)], [])
9663 AC_MSG_RESULT([internal])
9664 SYSTEM_SERVLETAPI=NO
9665 BUILD_TYPE="$BUILD_TYPE TOMCAT"
9668 AC_SUBST(SYSTEM_SERVLETAPI)
9669 AC_SUBST(SERVLETAPI_JAR)
9671 AC_MSG_CHECKING([whether to build the Report Builder extension])
9672 if test "$enable_ext_report_builder" != "no" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
9673 AC_MSG_RESULT([yes])
9674 ENABLE_REPORTBUILDER=YES
9675 AC_MSG_CHECKING([which jfreereport libs to use])
9676 if test "$with_system_jfreereport" = "yes"; then
9677 SYSTEM_JFREEREPORT=YES
9678 AC_MSG_RESULT([external])
9679 if test -z $SAC_JAR; then
9680 SAC_JAR=/usr/share/java/sac.jar
9682 AC_CHECK_FILE($SAC_JAR, [],
9683 [AC_MSG_ERROR(sac.jar not found.)], [])
9685 if test -z $LIBXML_JAR; then
9686 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
9687 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
9689 AC_CHECK_FILE(/usr/share/java/libxml.jar,
9690 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
9691 [AC_MSG_ERROR(libxml.jar replacement not found.)]
9696 AC_CHECK_FILE($LIBXML_JAR, [],
9697 [AC_MSG_ERROR(libxml.jar not found.)], [])
9700 if test -z $FLUTE_JAR; then
9701 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
9702 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
9704 AC_CHECK_FILE(/usr/share/java/flute.jar,
9705 [ FLUTE_JAR=/usr/share/java/flute.jar ],
9706 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
9711 AC_CHECK_FILE($FLUTE_JAR, [],
9712 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
9715 if test -z $JFREEREPORT_JAR; then
9716 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
9717 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
9719 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
9720 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
9721 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
9726 AC_CHECK_FILE($JFREEREPORT_JAR, [],
9727 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
9730 if test -z $LIBLAYOUT_JAR; then
9731 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
9732 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
9734 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
9735 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
9736 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
9741 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
9742 [AC_MSG_ERROR(liblayout.jar not found.)], [])
9745 if test -z $LIBLOADER_JAR; then
9746 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
9747 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
9749 AC_CHECK_FILE(/usr/share/java/libloader.jar,
9750 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
9751 [AC_MSG_ERROR(libloader.jar replacement not found.)]
9756 AC_CHECK_FILE($LIBLOADER_JAR, [],
9757 [AC_MSG_ERROR(libloader.jar not found.)], [])
9760 if test -z $LIBFORMULA_JAR; then
9761 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
9762 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
9764 AC_CHECK_FILE(/usr/share/java/libformula.jar,
9765 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
9766 [AC_MSG_ERROR(libformula.jar replacement not found.)]
9771 AC_CHECK_FILE($LIBFORMULA_JAR, [],
9772 [AC_MSG_ERROR(libformula.jar not found.)], [])
9775 if test -z $LIBREPOSITORY_JAR; then
9776 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
9777 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
9779 AC_CHECK_FILE(/usr/share/java/librepository.jar,
9780 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
9781 [AC_MSG_ERROR(librepository.jar replacement not found.)]
9786 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
9787 [AC_MSG_ERROR(librepository.jar not found.)], [])
9790 if test -z $LIBFONTS_JAR; then
9791 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
9792 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
9794 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
9795 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
9796 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
9801 AC_CHECK_FILE($LIBFONTS_JAR, [],
9802 [AC_MSG_ERROR(libfonts.jar not found.)], [])
9805 if test -z $LIBSERIALIZER_JAR; then
9806 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
9807 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
9809 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
9810 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
9811 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
9816 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
9817 [AC_MSG_ERROR(libserializer.jar not found.)], [])
9820 if test -z $LIBBASE_JAR; then
9821 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
9822 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
9824 AC_CHECK_FILE(/usr/share/java/libbase.jar,
9825 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
9826 [AC_MSG_ERROR(libbase.jar replacement not found.)]
9831 AC_CHECK_FILE($LIBBASE_JAR, [],
9832 [AC_MSG_ERROR(libbase.jar not found.)], [])
9836 AC_MSG_RESULT([internal])
9837 SYSTEM_JFREEREPORT=NO
9838 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
9842 ENABLE_REPORTBUILDER=NO
9843 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN"
9844 SYSTEM_JFREEREPORT=NO
9846 AC_SUBST(ENABLE_REPORTBUILDER)
9847 AC_SUBST(SYSTEM_JFREEREPORT)
9849 AC_SUBST(LIBXML_JAR)
9851 AC_SUBST(JFREEREPORT_JAR)
9852 AC_SUBST(LIBBASE_JAR)
9853 AC_SUBST(LIBLAYOUT_JAR)
9854 AC_SUBST(LIBLOADER_JAR)
9855 AC_SUBST(LIBFORMULA_JAR)
9856 AC_SUBST(LIBREPOSITORY_JAR)
9857 AC_SUBST(LIBFONTS_JAR)
9858 AC_SUBST(LIBSERIALIZER_JAR)
9860 # this has to be here because both the Wiki Publisher and the SRB use
9862 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
9863 AC_MSG_CHECKING([which Apache commons-* libs to use])
9864 if test "$with_system_apache_commons" = "yes"; then
9865 SYSTEM_APACHE_COMMONS=YES
9866 AC_MSG_RESULT([external])
9867 if test "$ENABLE_MEDIAWIKI" = "YES"; then
9868 if test -z $COMMONS_CODEC_JAR; then
9869 AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
9870 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
9872 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
9873 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
9874 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
9879 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
9880 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
9883 if test -z $COMMONS_LANG_JAR; then
9884 AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
9885 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
9887 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
9888 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
9889 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
9894 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
9895 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
9898 if test -z $COMMONS_HTTPCLIENT_JAR; then
9899 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
9900 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
9902 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
9903 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
9904 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
9909 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
9910 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
9913 if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
9914 if test -z $COMMONS_LOGGING_JAR; then
9915 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
9916 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
9918 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
9919 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
9920 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
9925 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
9926 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
9930 AC_MSG_RESULT([internal])
9931 SYSTEM_APACHE_COMMONS=NO
9932 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
9935 AC_SUBST(SYSTEM_APACHE_COMMONS)
9936 AC_SUBST(COMMONS_CODEC_JAR)
9937 AC_SUBST(COMMONS_LANG_JAR)
9938 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
9939 AC_SUBST(COMMONS_LOGGING_JAR)
9941 # scripting provider for BeanShell?
9942 AC_MSG_CHECKING([whether to build support for scripts in BeanShell])
9943 if test "${enable_scripting_beanshell}" != "no" -a "x$with_java" != "xno"; then
9944 AC_MSG_RESULT([yes])
9945 ENABLE_SCRIPTING_BEANSHELL=YES
9947 dnl ===================================================================
9948 dnl Check for system beanshell
9949 dnl ===================================================================
9950 AC_MSG_CHECKING([which beanshell to use])
9951 if test "$with_system_beanshell" = "yes"; then
9952 AC_MSG_RESULT([external])
9954 if test -z $BSH_JAR; then
9955 BSH_JAR=/usr/share/java/bsh.jar
9957 AC_CHECK_FILE($BSH_JAR, [],
9958 [AC_MSG_ERROR(bsh.jar not found.)], [])
9960 AC_MSG_RESULT([internal])
9962 BUILD_TYPE="$BUILD_TYPE BSH"
9966 ENABLE_SCRIPTING_BEANSHELL=NO
9967 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_BEANSHELL"
9969 AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
9970 AC_SUBST(SYSTEM_BSH)
9973 # scripting provider for JavaScript?
9974 AC_MSG_CHECKING([whether to build support for scripts in JavaScript])
9975 if test "${enable_scripting_javascript}" != "no" -a "x$with_java" != "xno"; then
9976 AC_MSG_RESULT([yes])
9977 ENABLE_SCRIPTING_JAVASCRIPT=YES
9979 dnl ===================================================================
9980 dnl Check for system rhino
9981 dnl ===================================================================
9982 AC_MSG_CHECKING([which rhino to use])
9983 if test "$with_system_rhino" = "yes"; then
9984 AC_MSG_RESULT([external])
9986 if test -z $RHINO_JAR; then
9987 RHINO_JAR=/usr/share/java/js.jar
9989 AC_CHECK_FILE($RHINO_JAR, [],
9990 [AC_MSG_ERROR(js.jar not found.)], [])
9992 AC_MSG_RESULT([internal])
9994 BUILD_TYPE="$BUILD_TYPE RHINO"
9998 ENABLE_SCRIPTING_JAVASCRIPT=NO
9999 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_JAVASCRIPT"
10001 AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
10002 AC_SUBST(SYSTEM_RHINO)
10003 AC_SUBST(RHINO_JAR)
10005 dnl Scripting provider for Python extension?
10006 dnl We always provide this unless we have disabled Python completely
10007 if test $enable_python = no; then
10008 ENABLE_SCRIPTING_PYTHON=NO
10009 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_PYTHON"
10011 ENABLE_SCRIPTING_PYTHON=YES
10013 AC_SUBST(ENABLE_SCRIPTING_PYTHON)
10016 case "$host_cpu" in
10017 x86_64 | powerpc64 | s390x)
10018 if test "$SIZEOF_LONG" = "8"; then
10019 supports_multilib="yes"
10026 dnl ===================================================================
10027 dnl Check whether the TQt and TDE libraries are available.
10028 dnl ===================================================================
10032 if test "$_os" != "OpenBSD"; then
10035 if test "$test_tde" = "yes" -a "$ENABLE_TDE" = "TRUE"; then
10036 dnl Search paths for TQt and TDE
10037 if test -z "$supports_multilib"; then
10038 tqt_incdirs="$QTINC /usr/local/tqt3/include /usr/include/tqt3 /usr/include /usr/X11R6/include/X11/tqt3 /usr/X11R6/include/tqt3 /usr/lib/tqt3/include /usr/lib/tqt3/include /usr/share/tqt3/include /usr/local/include/X11/tqt3 $x_includes"
10039 tqt_libdirs="$QTLIB /usr/local/tqt3/lib /usr/lib/tqt3 /usr/lib /usr/X11R6/lib/X11/tqt3 /usr/X11R6/lib/tqt3 /usr/lib/tqt3/lib /usr/lib/tqt3/lib /usr/share/tqt3/lib /usr/local/lib/tqt3 $x_libraries"
10041 tqt_incdirs="$QTINC /usr/local/tqt3/include /usr/include/tqt3 /usr/include /usr/X11R6/include/X11/tqt3 /usr/X11R6/include/tqt3 /usr/lib64/tqt3/include /usr/lib64/tqt3/include /usr/share/tqt3/include /usr/lib/tqt3/include /usr/lib/tqt3/include /usr/local/include/X11/tqt3 $x_includes"
10042 tqt_libdirs="$QTLIB /usr/local/tqt3/lib64 /usr/lib64/tqt3 /usr/lib64 /usr/X11R6/lib64/X11/tqt3 /usr/X11R6/lib64/tqt3 /usr/lib64/tqt3/lib64 /usr/lib64/tqt3/lib64 /usr/share/tqt3/lib64 /usr/local/tqt3/lib /usr/lib/tqt3 /usr/lib /usr/X11R6/lib/X11/tqt3 /usr/X11R6/lib/tqt3 /usr/lib/tqt3/lib /usr/lib/tqt3/lib /usr/share/tqt3/lib /usr/local/lib/tqt3 $x_libraries"
10044 if test -n "$TQTDIR"; then
10045 tqt_incdirs="$TQTDIR/include $tqt_incdirs"
10046 if test -z "$supports_multilib"; then
10047 tqt_libdirs="$TQTDIR/lib $tqt_libdirs"
10049 tqt_libdirs="$TQTDIR/lib64 $TQTDIR/lib $tqt_libdirs"
10052 if test -z "$supports_multilib"; then
10053 tde_incdirs="/usr/lib/trinity/include /usr/local/trinity/include /usr/local/include /usr/trinity/include /usr/include/trinity /opt/trinity/include /opt/trinity/include $x_includes"
10054 tde_libdirs="/usr/lib/trinity/lib /usr/local/trinity/lib /usr/trinity/lib /usr/lib/trinity /usr/lib/trinity /usr/X11R6/lib /usr/local/lib /opt/trinity/lib /opt/trinity/lib /usr/X11R6/trinity/lib /usr/lib $x_libraries"
10056 tde_incdirs="/usr/lib64/trinity/include /usr/lib/trinity/include /usr/local/trinity/include /usr/local/include /usr/trinity/include /usr/include/trinity /opt/trinity/include /opt/trinity/include $x_includes"
10057 tde_libdirs="/usr/lib64/trinity/lib64 /usr/local/trinity/lib64 /usr/trinity/lib64 /usr/lib64/trinity /usr/lib64/trinity /usr/X11R6/lib64 /usr/local/lib64 /opt/trinity/lib64 /opt/trinity/lib64 /usr/X11R6/trinity/lib64 /usr/lib/trinity/lib /usr/local/trinity/lib /usr/trinity/lib /usr/lib/trinity /usr/lib/trinity /usr/lib /usr/X11R6/lib /usr/local/lib /opt/trinity/lib /opt/trinity/lib /usr/X11R6/trinity/lib /usr/lib64 $x_libraries"
10059 if test -n "$TDEDIR"; then
10060 tde_incdirs="$TDEDIR/include $tde_incdirs"
10061 if test -z "$supports_multilib"; then
10062 tde_libdirs="$TDEDIR/lib $tde_libdirs"
10064 tde_libdirs="$TDEDIR/lib64 $TDEDIR/lib $tde_libdirs"
10069 tqt_test_include="ntqstyle.h"
10070 tde_test_include="kapp.h"
10072 if test "$_os" != "OpenBSD"; then
10073 tqt_test_library="libtqt-mt.so"
10074 tde_test_library="libDCOP.so"
10076 tqt_test_library="libtqt-mt.so*"
10077 tde_test_library="libDCOP.so*"
10080 dnl Check for TQt headers
10081 AC_MSG_CHECKING([for TQt headers])
10083 for tde_check in $tqt_incdirs; do
10084 if test -r "$tde_check/$tqt_test_include"; then
10085 tqt_incdir="$tde_check"
10089 AC_MSG_RESULT([$tqt_incdir])
10090 if test "x$tqt_incdir" = "xno"; then
10091 AC_MSG_ERROR([TQt headers not found. Please specify the root of
10092 your TQt installation by exporting TQTDIR before running "configure".])
10095 dnl Check for TQt libraries
10096 AC_MSG_CHECKING([for TQt libraries])
10098 for tqt_check in $tqt_libdirs; do
10099 if test -r "`ls $tqt_check/$tqt_test_library 2>/dev/null | head -1`"; then
10100 tqt_libdir="$tqt_check"
10104 AC_MSG_RESULT([$tqt_libdir])
10105 if test "x$tqt_libdir" = "xno"; then
10106 AC_MSG_ERROR([TQt libraries not found. Please specify the root of
10107 your TQt installation by exporting TQTDIR before running "configure".])
10110 dnl Check for Meta Object Compiler
10111 AC_PATH_PROG( MOC, moc, no, [`dirname $tqt_libdir`/bin:$TQTDIR/bin:$PATH] )
10112 if test "$MOC" = "no"; then
10113 AC_MSG_ERROR([TQt Meta Object Compiler not found. Please specify
10114 the root of your TQt installation by exporting TQTDIR before running "configure".])
10117 dnl Check for TDE headers
10118 AC_MSG_CHECKING([for TDE headers])
10120 for tde_check in $tde_incdirs; do
10121 if test -r "$tde_check/$tde_test_include"; then
10122 tde_incdir="$tde_check"
10126 AC_MSG_RESULT([$tde_incdir])
10127 if test "x$tde_incdir" = "xno"; then
10128 AC_MSG_ERROR([TDE headers not found. Please specify the root of
10129 your TDE installation by exporting TDEDIR before running "configure".])
10132 dnl Check for TDE libraries
10133 AC_MSG_CHECKING([for TDE libraries])
10135 for tde_check in $tde_libdirs; do
10136 if test -r "`ls $tde_check/$tde_test_library 2>/dev/null | head -1`"; then
10137 tde_libdir="$tde_check"
10141 AC_MSG_RESULT([$tde_libdir])
10142 if test "x$tde_libdir" = "xno"; then
10143 AC_MSG_ERROR([TDE libraries not found. Please specify the root of
10144 your TDE installation by exporting TDEDIR before running "configure".])
10147 dnl Set the variables
10148 TDE_CFLAGS="-I$tqt_incdir -I$tde_incdir -I/usr/include/tqt -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
10149 TDE_LIBS="-L$tde_libdir -L$tqt_libdir -lkio -ltdeui -ltdecore -ltqt -ltqt-mt"
10151 AC_SUBST(TDE_CFLAGS)
10155 dnl ===================================================================
10156 dnl Check whether the Qt3 and KDE3 libraries are available.
10157 dnl ===================================================================
10161 if test "$_os" != "OpenBSD"; then
10164 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE"; then
10165 dnl Search paths for Qt3 and KDE3
10166 if test -z "$supports_multilib"; then
10167 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 /usr/local/include/X11/qt3 $x_includes"
10168 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 /usr/local/lib/qt3 $x_libraries"
10170 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 /usr/local/include/X11/qt3 $x_includes"
10171 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 /usr/local/lib/qt3 $x_libraries"
10173 if test -n "$QTDIR"; then
10174 qt_incdirs="$QTDIR/include $qt_incdirs"
10175 if test -z "$supports_multilib"; then
10176 qt_libdirs="$QTDIR/lib $qt_libdirs"
10178 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
10181 if test -z "$supports_multilib"; then
10182 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"
10183 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"
10185 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"
10186 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"
10188 if test -n "$KDEDIR"; then
10189 kde_incdirs="$KDEDIR/include $kde_incdirs"
10190 if test -z "$supports_multilib"; then
10191 kde_libdirs="$KDEDIR/lib $kde_libdirs"
10193 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
10198 qt_test_include="qstyle.h"
10199 kde_test_include="kapp.h"
10201 if test "$_os" != "OpenBSD"; then
10202 qt_test_library="libqt-mt.so"
10203 kde_test_library="libDCOP.so"
10205 qt_test_library="libqt-mt.so*"
10206 kde_test_library="libDCOP.so*"
10209 dnl Check for Qt3 headers
10210 AC_MSG_CHECKING([for Qt3 headers])
10212 for kde_check in $qt_incdirs; do
10213 if test -r "$kde_check/$qt_test_include"; then
10214 qt_incdir="$kde_check"
10218 AC_MSG_RESULT([$qt_incdir])
10219 if test "x$qt_incdir" = "xno"; then
10220 AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
10221 your Qt3 installation by exporting QTDIR before running "configure".])
10224 dnl Check for Qt3 libraries
10225 AC_MSG_CHECKING([for Qt3 libraries])
10227 for qt_check in $qt_libdirs; do
10228 if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`"; then
10229 qt_libdir="$qt_check"
10233 AC_MSG_RESULT([$qt_libdir])
10234 if test "x$qt_libdir" = "xno"; then
10235 AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
10236 your Qt3 installation by exporting QTDIR before running "configure".])
10239 dnl Check for Meta Object Compiler
10240 AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
10241 if test "$MOC" = "no"; then
10242 AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
10243 the root of your Qt3 installation by exporting QTDIR before running "configure".])
10246 dnl Check for KDE3 headers
10247 AC_MSG_CHECKING([for KDE3 headers])
10249 for kde_check in $kde_incdirs; do
10250 if test -r "$kde_check/$kde_test_include"; then
10251 kde_incdir="$kde_check"
10255 AC_MSG_RESULT([$kde_incdir])
10256 if test "x$kde_incdir" = "xno"; then
10257 AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
10258 your KDE3 installation by exporting KDEDIR before running "configure".])
10261 dnl Check for KDE3 libraries
10262 AC_MSG_CHECKING([for KDE3 libraries])
10264 for kde_check in $kde_libdirs; do
10265 if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`"; then
10266 kde_libdir="$kde_check"
10270 AC_MSG_RESULT([$kde_libdir])
10271 if test "x$kde_libdir" = "xno"; then
10272 AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
10273 your KDE3 installation by exporting KDEDIR before running "configure".])
10276 dnl Set the variables
10277 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
10278 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
10280 AC_SUBST(KDE_CFLAGS)
10284 dnl ===================================================================
10285 dnl KDE4 Integration
10286 dnl ===================================================================
10295 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE"; then
10296 qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
10297 qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
10299 kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
10300 kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
10302 if test -n "$supports_multilib"; then
10303 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
10304 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
10307 if test -n "$QTDIR"; then
10308 qt_incdirs="$QTDIR/include $qt_incdirs"
10309 if test -z "$supports_multilib"; then
10310 qt_libdirs="$QTDIR/lib $qt_libdirs"
10312 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
10315 if test -n "$QT4DIR"; then
10316 qt_incdirs="$QT4DIR/include $qt_incdirs"
10317 if test -z "$supports_multilib"; then
10318 qt_libdirs="$QT4DIR/lib $qt_libdirs"
10320 qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
10324 if test -n "$KDEDIR"; then
10325 kde_incdirs="$KDEDIR/include $kde_incdirs"
10326 if test -z "$supports_multilib"; then
10327 kde_libdirs="$KDEDIR/lib $kde_libdirs"
10329 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
10332 if test -n "$KDE4DIR"; then
10333 kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
10334 if test -z "$supports_multilib"; then
10335 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
10337 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
10341 qt_test_include="Qt/qobject.h"
10342 qt_test_library="libQtCore.so"
10343 kde_test_include="kwindowsystem.h"
10344 kde_test_library="libsolid.so"
10346 AC_MSG_CHECKING([for Qt4 headers])
10348 for inc_dir in $qt_incdirs; do
10349 if test -r "$inc_dir/$qt_test_include"; then
10350 qt_header_dir="$inc_dir"
10355 AC_MSG_RESULT([$qt_header_dir])
10356 if test "x$qt_header_dir" = "xno"; then
10357 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
10360 dnl Check for qmake
10361 AC_PATH_PROG( QMAKEQT4, qmake-qt4, no, [`dirname $qt_header_dir`/bin:$QT4DIR/bin:$PATH] )
10363 if test "$QMAKE4" = "no"; then
10364 AC_PATH_PROG( QMAKE4, qmake, no, [`dirname $qt_header_dir`/bin:$QT4DIR/bin:$PATH] )
10365 if test "$QMAKE4" = "no"; then
10366 AC_MSG_ERROR([Qmake not found. Please specify
10367 the root of your Qt installation by exporting QT4DIR before running "configure".])
10371 qt_libdirs="`$QMAKE4 -query QT_INSTALL_LIBS` $qt_libdirs"
10372 AC_MSG_CHECKING([for Qt4 libraries])
10374 for lib_dir in $qt_libdirs; do
10375 if test -r "$lib_dir/$qt_test_library"; then
10376 qt_lib_dir="$lib_dir"
10377 PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
10382 AC_MSG_RESULT([$qt_lib_dir])
10384 if test "x$qt_lib_dir" = "xno"; then
10385 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
10388 dnl Check for Meta Object Compiler
10390 AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
10392 if test "$MOC4" = "no"; then
10393 AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
10394 if test "$MOC4" = "no"; then
10395 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
10396 the root of your Qt installation by exporting QT4DIR before running "configure".])
10400 dnl Check for KDE4 headers
10401 AC_MSG_CHECKING([for KDE4 headers])
10403 for kde_check in $kde_incdirs; do
10404 if test -r "$kde_check/$kde_test_include"; then
10405 kde_incdir="$kde_check"
10409 AC_MSG_RESULT([$kde_incdir])
10410 if test "x$kde_incdir" = "xno"; then
10411 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
10414 dnl Check for KDE4 libraries
10415 AC_MSG_CHECKING([for KDE4 libraries])
10417 for kde_check in $kde_libdirs; do
10418 if test -r "$kde_check/$kde_test_library"; then
10419 kde_libdir="$kde_check"
10424 AC_MSG_RESULT([$kde_libdir])
10425 if test "x$kde_libdir" = "xno"; then
10426 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
10429 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
10430 KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkio -lkfile -lkdeui -lkdecore -lQtCore -lQtGui"
10432 AC_LANG_PUSH([C++])
10433 save_CXXFLAGS=$CXXFLAGS
10434 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
10435 AC_MSG_CHECKING([whether KDE is >= 4.2])
10436 AC_RUN_IFELSE([AC_LANG_SOURCE([[
10437 #include <kdeversion.h>
10439 int main(int argc, char **argv) {
10440 if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
10443 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
10444 CXXFLAGS=$save_CXXFLAGS
10447 # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled
10448 PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
10450 AC_MSG_WARN([[No Glib found, KDE4 support will not integrate with Qt's Glib event loop support]]))
10452 AC_SUBST(KDE4_CFLAGS)
10453 AC_SUBST(KDE4_LIBS)
10455 AC_SUBST(KDE_GLIB_CFLAGS)
10456 AC_SUBST(KDE_GLIB_LIBS)
10457 AC_SUBST(KDE_HAVE_GLIB)
10459 dnl ===================================================================
10460 dnl Test for the enabling the lockdown pieces
10461 dnl ===================================================================
10462 AC_MSG_CHECKING([whether to enable the lockdown pieces])
10464 if test -n "$enable_lockdown" -a "$enable_lockdown" != "no"; then
10465 ENABLE_LOCKDOWN=YES
10466 AC_MSG_RESULT([yes])
10468 AC_MSG_RESULT([no])
10470 AC_SUBST(ENABLE_LOCKDOWN)
10472 dnl ===================================================================
10473 dnl Test whether to include Evolution 2 support
10474 dnl ===================================================================
10475 AC_MSG_CHECKING([whether to enable evolution 2 support])
10476 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
10477 AC_MSG_RESULT([yes])
10478 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
10479 ENABLE_EVOAB2="TRUE"
10482 AC_MSG_RESULT([no])
10484 AC_SUBST(ENABLE_EVOAB2)
10485 AC_SUBST(GOBJECT_CFLAGS)
10486 AC_SUBST(GOBJECT_LIBS)
10488 dnl ===================================================================
10489 dnl Test whether to include TDE AB support
10490 dnl ===================================================================
10491 AC_MSG_CHECKING([whether to enable TDE address book support])
10492 if test "$enable_tdeab" = "yes" -a "$enable_tde" = "yes"; then
10493 AC_MSG_RESULT([yes])
10494 AC_LANG_PUSH([C++])
10495 save_CXXFLAGS=$CXXFLAGS
10496 CXXFLAGS="$CXXFLAGS $TDE_CFLAGS"
10497 AC_MSG_CHECKING([whether TDE is at least R14.0])
10498 AC_RUN_IFELSE([AC_LANG_SOURCE([[
10499 #include <tdeversion.h>
10501 int main(int argc, char **argv) {
10502 if (TDE_VERSION_MAJOR >= 14) return 0;
10505 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([TDE version too old or too recent, please use another version of TDE or disable TDE address book support])],[])
10506 CXXFLAGS=$save_CXXFLAGS
10510 AC_MSG_RESULT([no])
10513 AC_SUBST(ENABLE_TDEAB)
10515 dnl ===================================================================
10516 dnl Test whether to include KDE AB support
10517 dnl ===================================================================
10518 AC_MSG_CHECKING([whether to enable KDE address book support])
10519 if test "$enable_kdeab" = "yes" -a "$enable_kde" = "yes"; then
10520 AC_MSG_RESULT([yes])
10521 AC_LANG_PUSH([C++])
10522 save_CXXFLAGS=$CXXFLAGS
10523 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
10524 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
10525 AC_RUN_IFELSE([AC_LANG_SOURCE([[
10526 #include <kdeversion.h>
10528 int main(int argc, char **argv) {
10529 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
10532 ]])],[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])],[])
10533 CXXFLAGS=$save_CXXFLAGS
10537 AC_MSG_RESULT([no])
10540 AC_SUBST(ENABLE_KAB)
10542 dnl ===================================================================
10543 dnl Test whether to include MathMLDTD
10544 dnl ===================================================================
10545 AC_MSG_CHECKING([whether to include MathMLDTD])
10546 if test -n "$enable_mathmldtd"; then
10547 if test "$enable_mathmldtd" = "no"; then
10548 AC_MSG_RESULT([no])
10549 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
10551 AC_MSG_RESULT([yes])
10552 BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
10555 AC_MSG_RESULT([no])
10556 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
10559 dnl ===================================================================
10560 dnl Test which themes to include
10561 dnl ===================================================================
10562 AC_MSG_CHECKING([which themes to include])
10563 # if none given use default subset of available themes
10564 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
10565 with_theme="crystal default hicontrast oxygen tango"
10566 test "$ENABLE_RELEASE_BUILD" = "FALSE" && with_theme="$with_theme tango_testing"
10570 for theme in $with_theme; do
10572 crystal|default|galaxy|hicontrast|human|industrial|oxygen|tango|tango_testing) : ;;
10573 *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
10575 WITH_THEMES="$WITH_THEMES $theme"
10576 SCPDEFS="$SCPDEFS -DTHEME_`echo $theme|tr '[[:lower:]]' '[[:upper:]]'`"
10578 AC_MSG_RESULT([$WITH_THEMES])
10579 AC_SUBST([WITH_THEMES])
10581 dnl ===================================================================
10582 dnl Test whether to integrate helppacks into the product's installer
10583 dnl ===================================================================
10584 AC_MSG_CHECKING([for helppack integration])
10585 if test "$with_helppack_integration" = "no"; then
10586 WITH_HELPPACK_INTEGRATION=NO
10587 AC_MSG_RESULT([no integration])
10589 WITH_HELPPACK_INTEGRATION=YES
10590 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
10591 AC_MSG_RESULT([integration])
10593 AC_SUBST(WITH_HELPPACK_INTEGRATION)
10595 dnl ===================================================================
10596 dnl Test whether to use CoreText framework
10597 dnl ===================================================================
10599 if test "$_os" = "Darwin"; then
10600 AC_MSG_CHECKING([whether to use CoreText framework])
10601 if test "$enable_coretext" = yes -o "$BITNESS_OVERRIDE" = 64; then
10602 AC_MSG_RESULT([yes])
10603 ENABLE_CORETEXT=YES
10605 AC_MSG_RESULT([no])
10608 AC_SUBST(ENABLE_CORETEXT)
10610 ###############################################################################
10611 # Extensions checking
10612 ###############################################################################
10613 dnl ===================================================================
10614 dnl Test whether to integrate extensions into the product's installer
10615 dnl ===================================================================
10616 AC_MSG_CHECKING([for extensions integration])
10617 if test "x$enable_extension_integration" != "xno"; then
10618 WITH_EXTENSION_INTEGRATION=YES
10619 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
10620 AC_MSG_RESULT([yes, use integration])
10622 WITH_EXTENSION_INTEGRATION=NO
10623 AC_MSG_RESULT([no, do not integrate])
10625 AC_SUBST(WITH_EXTENSION_INTEGRATION)
10627 dnl Should any extra extensions be included?
10628 dnl There are standalone tests for each of these below.
10629 WITH_EXTRA_EXTENSIONS=
10630 AC_SUBST([WITH_EXTRA_EXTENSIONS])
10632 dnl ===================================================================
10633 dnl Test whether to include Watch Window extension
10634 dnl ===================================================================
10635 AC_MSG_CHECKING([for Watch Window extension integration])
10636 WATCH_WINDOW_EXTENSION_PACK=
10637 if test "x$enable_ext_watch_window" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10638 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_WATCH_WINDOW"
10639 WATCH_WINDOW_EXTENSION_PACK="23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt"
10640 WITH_EXTRA_EXTENSIONS=YES
10641 AC_MSG_RESULT([yes])
10643 AC_MSG_RESULT([no])
10645 AC_SUBST(WATCH_WINDOW_EXTENSION_PACK)
10647 dnl ===================================================================
10648 dnl Test whether to include SmART Gallery (Diagram) extension
10649 dnl ===================================================================
10650 AC_MSG_CHECKING([for SmART Gallery (Diagram) extension integration])
10651 DIAGRAM_EXTENSION_PACK=
10652 if test "x$enable_ext_diagram" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10653 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_DIAGRAM"
10654 DIAGRAM_EXTENSION_PACK="8d74685d41f8bffe8c3e71fe8deac09d-SmART_0.9.5.oxt"
10655 WITH_EXTRA_EXTENSIONS=YES
10656 AC_MSG_RESULT([yes])
10658 AC_MSG_RESULT([no])
10660 AC_SUBST(DIAGRAM_EXTENSION_PACK)
10662 dnl ===================================================================
10663 dnl Test whether to include Validator extension
10664 dnl ===================================================================
10665 AC_MSG_CHECKING([for Validator extension integration])
10666 VALIDATOR_EXTENSION_PACK=
10667 if test "x$enable_ext_validator" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10668 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_VALIDATOR"
10669 VALIDATOR_EXTENSION_PACK="bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt"
10670 WITH_EXTRA_EXTENSIONS=YES
10671 AC_MSG_RESULT([yes])
10673 AC_MSG_RESULT([no])
10675 AC_SUBST(VALIDATOR_EXTENSION_PACK)
10677 dnl ===================================================================
10678 dnl Test whether to include Barcode extension
10679 dnl ===================================================================
10680 AC_MSG_CHECKING([for Barcode extension integration])
10681 BARCODE_EXTENSION_PACK=
10682 if test "x$enable_ext_barcode" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10683 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_BARCODE"
10684 BARCODE_EXTENSION_PACK="3ed18025a766f1e955707b969c8113a5-Barcode_1.3.5.0.oxt"
10685 WITH_EXTRA_EXTENSIONS=YES
10686 AC_MSG_RESULT([yes])
10688 AC_MSG_RESULT([no])
10690 AC_SUBST([BARCODE_EXTENSION_PACK])
10692 dnl ===================================================================
10693 dnl Test whether to include ConvertTextToNumber extension
10694 dnl ===================================================================
10695 AC_MSG_CHECKING([for ConvertTextToNumber extension integration])
10696 if test "x$enable_ext_ct2n" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10697 BUILD_TYPE="$BUILD_TYPE CT2N"
10698 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N"
10699 AC_MSG_RESULT([yes])
10701 AC_MSG_RESULT([no])
10704 dnl ===================================================================
10705 dnl Test whether to include Numbertext extension
10706 dnl ===================================================================
10707 AC_MSG_CHECKING([for Numbertext extension integration])
10708 NUMBERTEXT_EXTENSION_PACK=
10709 if test "x$enable_ext_numbertext" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10710 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NUMBERTEXT"
10711 NUMBERTEXT_EXTENSION_PACK="b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_0.9.5.oxt"
10712 WITH_EXTRA_EXTENSIONS=YES
10713 AC_MSG_RESULT([yes])
10715 AC_MSG_RESULT([no])
10717 AC_SUBST(NUMBERTEXT_EXTENSION_PACK)
10719 dnl ===================================================================
10720 dnl Test whether to include Hungarian Cross-reference Toolbar extension
10721 dnl ===================================================================
10722 AC_MSG_CHECKING([for Hungarian Cross-reference Toolbar extension integration])
10723 HUNART_EXTENSION_PACK=
10724 if test "x$enable_ext_hunart" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10725 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_HUNART"
10726 HUNART_EXTENSION_PACK="b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt"
10727 WITH_EXTRA_EXTENSIONS=YES
10728 AC_MSG_RESULT([yes])
10730 AC_MSG_RESULT([no])
10732 AC_SUBST(HUNART_EXTENSION_PACK)
10734 dnl ===================================================================
10735 dnl Test whether to include Typography Toolbar extension
10736 dnl ===================================================================
10737 AC_MSG_CHECKING([for Typography Toolbar extension integration])
10738 TYPO_EXTENSION_PACK=
10739 if test "x$enable_ext_typo" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10740 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_TYPO"
10741 TYPO_EXTENSION_PACK="9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt"
10742 WITH_EXTRA_EXTENSIONS=YES
10743 AC_MSG_RESULT([yes])
10745 AC_MSG_RESULT([no])
10747 AC_SUBST(TYPO_EXTENSION_PACK)
10749 dnl ===================================================================
10750 dnl Test whether to include Google Docs extension
10751 dnl ===================================================================
10752 AC_MSG_CHECKING([for Google Docs extension integration])
10753 GOOGLE_DOCS_EXTENSION_PACK=
10754 if test "x$enable_ext_google_docs" = "xyes" -a "x$enable_extension_integration" != "xno"; then
10755 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_GOOGLE_DOCS"
10756 GOOGLE_DOCS_EXTENSION_PACK="27211596cf0ad97cab7321239406fde0-gdocs_3.0.1_modified.oxt"
10757 WITH_EXTRA_EXTENSIONS=YES
10758 AC_MSG_RESULT([yes])
10760 AC_MSG_RESULT([no])
10762 AC_SUBST(GOOGLE_DOCS_EXTENSION_PACK)
10764 dnl ===================================================================
10765 dnl Test whether to include NLPSolver extension
10766 dnl ===================================================================
10767 AC_MSG_CHECKING([for NLPSolver extension integration])
10768 if test "x$enable_ext_nlpsolver" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
10769 BUILD_TYPE="$BUILD_TYPE NLPSOLVER"
10770 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER"
10771 AC_MSG_RESULT([yes])
10773 AC_MSG_RESULT([no])
10776 dnl ===================================================================
10777 dnl Test whether to include LanguageTool extension
10778 dnl ===================================================================
10779 AC_MSG_CHECKING([for LanguageTool extension integration])
10780 if test "x$enable_ext_languagetool" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
10781 BUILD_TYPE="$BUILD_TYPE LANGUAGETOOL"
10782 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL"
10783 AC_MSG_RESULT([yes])
10785 AC_MSG_RESULT([no])
10788 dnl ===================================================================
10789 dnl Test whether to include Sun Professional Template Pack
10790 dnl ===================================================================
10791 AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
10792 if test "$with_sun_templates" = "" -o "$with_sun_templates" = "no"; then
10793 AC_MSG_RESULT([no integration])
10795 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
10796 sun_supported_langs="en-US de it fr es hu"
10797 if test "$with_sun_templates" = "yes"; then
10798 wanted_sun_templates="$sun_supported_langs"
10800 # check whether the langs are supported by Sun
10801 wanted_sun_templates=
10802 for lang in $with_sun_templates; do
10803 if test -n "`echo $sun_supported_langs | grep "$lang"`"; then
10804 wanted_sun_templates="$wanted_sun_templates $lang"
10809 SUNTEMPLATES_DE_PACK=
10810 SUNTEMPLATES_EN_US_PACK=
10811 SUNTEMPLATES_ES_PACK=
10812 SUNTEMPLATES_FR_PACK=
10813 SUNTEMPLATES_HU_PACK=
10814 SUNTEMPLATES_IT_PACK=
10815 # check whether the langs are requested at all
10816 for lang in $wanted_sun_templates; do
10817 if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`"; then
10818 SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
10820 "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
10821 "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
10822 "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
10823 "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
10824 "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
10825 "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
10829 WITH_EXTRA_EXTENSIONS=YES
10830 AC_MSG_RESULT([$SUNTEMPLATES_LANG])
10832 AC_SUBST(SUNTEMPLATES_DE_PACK)
10833 AC_SUBST(SUNTEMPLATES_EN_US_PACK)
10834 AC_SUBST(SUNTEMPLATES_ES_PACK)
10835 AC_SUBST(SUNTEMPLATES_FR_PACK)
10836 AC_SUBST(SUNTEMPLATES_HU_PACK)
10837 AC_SUBST(SUNTEMPLATES_IT_PACK)
10839 dnl ===================================================================
10840 dnl Test whether to include fonts
10841 dnl ===================================================================
10842 AC_MSG_CHECKING([whether to include third-party fonts])
10843 if test "$with_fonts" != "no"; then
10844 AC_MSG_RESULT([yes])
10846 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
10848 AC_MSG_RESULT([no])
10850 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
10852 AC_SUBST(WITH_FONTS)
10855 # The agfa monotype fonts options seems broken
10856 # there is no assocaited entry in Makefile.fetch
10857 # so we do not fetch the dependencies
10858 # there is no tie-up with MORE_FONTS, but in dmake mode
10859 # without more_fonts that option is meaningless
10860 # so I suspect it is not really used anymore, commenting out for now
10861 #AC_MSG_CHECKING([whether to include Agfa Monotype fonts])
10862 #if test "$with_agfa_monotype_fonts" = "yes"; then
10863 # AC_MSG_RESULT([yes])
10864 # WITH_AGFA_MONOTYPE_FONTS=YES
10865 # SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS"
10866 # BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS"
10868 # AC_MSG_RESULT([no])
10869 # WITH_AGFA_MONOTYPE_FONTS=NO
10871 #AC_SUBST(WITH_AGFA_MONOTYPE_FONTS)
10873 dnl ===================================================================
10874 dnl Test whether to include ppds
10875 dnl ===================================================================
10876 AC_MSG_CHECKING([whether to include PPDs])
10877 if test "$with_ppds" != "no"; then
10878 AC_MSG_RESULT([yes])
10880 AC_MSG_RESULT([no])
10882 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
10884 AC_SUBST(WITHOUT_PPDS)
10886 dnl ===================================================================
10887 dnl Test whether to include afms
10888 dnl ===================================================================
10889 AC_MSG_CHECKING([whether to include AFMs])
10890 if test "$with_afms" != "no"; then
10891 AC_MSG_RESULT([yes])
10892 BUILD_TYPE="$BUILD_TYPE AFMS"
10894 AC_MSG_RESULT([no])
10896 SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
10898 AC_SUBST(WITHOUT_AFMS)
10900 dnl ===================================================================
10901 dnl Test whether to include extra galleries
10902 dnl ===================================================================
10903 AC_MSG_CHECKING([whether to include extra galleries])
10904 if test "$enable_extra_gallery" = "" -o "$enable_extra_gallery" = "no"; then
10905 AC_MSG_RESULT([no])
10906 WITH_EXTRA_GALLERY=NO
10907 OOOP_GALLERY_PACK=""
10909 AC_MSG_RESULT([yes])
10910 WITH_EXTRA_GALLERY=YES
10911 BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
10912 SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
10913 OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
10915 AC_SUBST(WITH_EXTRA_GALLERY)
10916 AC_SUBST(OOOP_GALLERY_PACK)
10918 dnl ===================================================================
10919 dnl Test whether to include extra templates
10920 dnl ===================================================================
10921 AC_MSG_CHECKING([whether to include extra templates])
10922 if test "$enable_extra_template" = "" -o "$enable_extra_template" = "no"; then
10923 AC_MSG_RESULT([no])
10924 WITH_EXTRA_TEMPLATE=NO
10925 OOOP_TEMPLATES_PACK=""
10927 AC_MSG_RESULT([yes])
10928 WITH_EXTRA_TEMPLATE=YES
10929 BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
10930 SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
10931 OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
10933 AC_SUBST(WITH_EXTRA_TEMPLATE)
10934 AC_SUBST(OOOP_TEMPLATES_PACK)
10936 dnl ===================================================================
10937 dnl Test whether to include extra samples
10938 dnl ===================================================================
10939 AC_MSG_CHECKING([whether to include extra samples])
10940 if test "$enable_extra_sample" = "" -o "$enable_extra_sample" = "no"; then
10941 AC_MSG_RESULT([no])
10942 WITH_EXTRA_SAMPLE=NO
10943 OOOP_SAMPLES_PACK=""
10945 AC_MSG_RESULT([yes])
10946 WITH_EXTRA_SAMPLE=YES
10947 BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
10948 SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
10949 OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
10951 AC_SUBST(WITH_EXTRA_SAMPLE)
10952 AC_SUBST(OOOP_SAMPLES_PACK)
10954 dnl ===================================================================
10955 dnl Test whether to include extra fonts
10956 dnl ===================================================================
10957 AC_MSG_CHECKING([whether to include extra fonts])
10958 if test "$enable_extra_font" = "" -o "$enable_extra_font" = "no"; then
10959 AC_MSG_RESULT([no])
10963 AC_MSG_RESULT([yes])
10964 WITH_EXTRA_FONT=YES
10965 BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
10966 SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
10967 OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
10969 AC_SUBST(WITH_EXTRA_FONT)
10970 AC_SUBST(OOOP_FONTS_PACK)
10972 dnl ===================================================================
10973 dnl Test whether to enable online update service
10974 dnl ===================================================================
10975 AC_MSG_CHECKING([whether to enable online update])
10976 ENABLE_ONLINE_UPDATE=
10977 if test "$enable_online_update" = ""; then
10978 if test "$_os" = "WINNT" -o "$_os" = "Darwin"; then
10979 AC_MSG_RESULT([yes])
10980 ENABLE_ONLINE_UPDATE="TRUE"
10982 AC_MSG_RESULT([no])
10985 if test "$enable_online_update" = "yes"; then
10986 AC_MSG_RESULT([yes])
10987 ENABLE_ONLINE_UPDATE="TRUE"
10989 AC_MSG_RESULT([no])
10992 AC_SUBST(ENABLE_ONLINE_UPDATE)
10994 dnl ===================================================================
10995 dnl Test whether to create MSI with LIMITUI=1 (silent install)
10996 dnl ===================================================================
10997 AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
10998 if test "$enable_silent_msi" = "" -o "$enable_silent_msi" = "no"; then
10999 AC_MSG_RESULT([no])
11000 ENABLE_SILENT_MSI="FALSE"
11002 AC_MSG_RESULT([yes])
11003 ENABLE_SILENT_MSI="TRUE"
11004 SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
11006 AC_SUBST(ENABLE_SILENT_MSI)
11008 AC_MSG_CHECKING([whether and how to use Xinerama])
11009 if test "$_os" = "Darwin"; then
11011 XINERAMA_LINK=dynamic
11012 AC_MSG_RESULT([yes])
11013 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
11014 if test "$x_libraries" = "default_x_libraries"; then
11015 XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
11016 if test "x$XINERAMALIB" = x; then
11017 XINERAMALIB="/usr/lib"
11020 XINERAMALIB="$x_libraries"
11022 if test -e "$XINERAMALIB/libXinerama.so" -a -e "$XINERAMALIB/libXinerama.a"; then
11023 # we have both versions, let the user decide but use the dynamic one
11026 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
11027 XINERAMA_LINK=dynamic
11029 XINERAMA_LINK=static
11031 elif test -e "$XINERAMALIB/libXinerama.so" -a ! -e "$XINERAMALIB/libXinerama.a"; then
11032 # we have only the dynamic version
11034 XINERAMA_LINK=dynamic
11035 elif test -e "$XINERAMALIB/libXinerama.a"; then
11037 if echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
11039 XINERAMA_LINK=static
11049 if test "$USE_XINERAMA" = "YES"; then
11050 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
11051 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
11052 [AC_MSG_ERROR(Xinerama header not found.)], [])
11053 XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
11054 if test "x$XEXTLIB" = x; then
11055 XEXTLIBS="-L$XLIB -L$XINERAMALIB -lXext"
11057 XINERAMA_EXTRA_LIBS="$XEXTLIBS"
11058 if test "$_os" = "FreeBSD"; then
11059 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
11061 if test "$_os" = "Linux"; then
11062 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
11064 AC_CHECK_LIB([Xinerama], [XineramaIsActive], [:],
11065 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
11067 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
11072 AC_MSG_RESULT([no])
11074 AC_SUBST(USE_XINERAMA)
11075 AC_SUBST(XINERAMA_LINK)
11077 dnl ===================================================================
11078 dnl Test whether to build cairo or rely on the system version
11079 dnl ===================================================================
11081 if test "$GUIBASE" = "unx"; then
11082 # Used in vcl/Library_vclplug_gen.mk
11086 if test "$test_cairo" = "yes"; then
11087 AC_MSG_CHECKING([whether to use the system cairo])
11089 if test "$with_system_cairo" = "yes"; then
11091 AC_MSG_RESULT([yes])
11093 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
11095 if test "$test_xrender" = "yes"; then
11096 if test "$with_system_xextensions_headers" != "no"; then
11097 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
11099 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
11100 #ifdef PictStandardA8
11104 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
11109 libo_MINGW_CHECK_DLL([CAIRO], [libcairo])
11110 libo_MINGW_TRY_DLL([FONTCONFIG], [libfontconfig])
11111 libo_MINGW_TRY_DLL([FREETYPE], [libfreetype])
11112 libo_MINGW_TRY_DLL([PIXMAN], [libpixman])
11113 libo_MINGW_TRY_DLL([PNG15], [libpng15])
11116 AC_MSG_RESULT([no])
11118 BUILD_TYPE="$BUILD_TYPE CAIRO"
11119 SCPDEFS="$SCPDEFS -DNEED_CAIRO"
11123 AC_SUBST(SYSTEM_CAIRO)
11124 AC_SUBST(CAIRO_CFLAGS)
11125 AC_SUBST(CAIRO_LIBS)
11126 AC_SUBST([MINGW_CAIRO_DLL])
11127 AC_SUBST([MINGW_FONTCONFIG_DLL])
11128 AC_SUBST([MINGW_FREETYPE_DLL])
11129 AC_SUBST([MINGW_PIXMAN_DLL])
11130 AC_SUBST([MINGW_PNG15_DLL])
11132 dnl ===================================================================
11133 dnl Test whether to use liblangtag
11134 dnl ===================================================================
11137 AC_MSG_CHECKING([whether to use liblangtag])
11138 if test "$enable_liblangtag" = "yes" -o \( "$enable_liblangtag" = "" -a $_os != Android -a $_os != iOS \); then
11139 ENABLE_LIBLANGTAG=YES
11140 AC_MSG_RESULT([yes])
11141 AC_MSG_CHECKING([whether to use system liblangtag])
11142 if test "$with_system_liblangtag" = yes; then
11143 SYSTEM_LIBLANGTAG=YES
11144 AC_MSG_RESULT([yes])
11145 PKG_CHECK_MODULES( LIBLANGTAG, liblangtag >= 0.4.0)
11146 libo_MINGW_CHECK_DLL([LIBLANGTAG], [liblangtag])
11148 SYSTEM_LIBLANGTAG=NO
11149 AC_MSG_RESULT([no])
11150 BUILD_TYPE="$BUILD_TYPE LIBLANGTAG"
11153 ENABLE_LIBLANGTAG=NO
11154 AC_MSG_RESULT([no])
11156 AC_SUBST(ENABLE_LIBLANGTAG)
11157 AC_SUBST(SYSTEM_LIBLANGTAG)
11158 AC_SUBST(LIBLANGTAG_CFLAGS)
11159 AC_SUBST(LIBLANGTAG_LIBS)
11160 AC_SUBST([MINGW_LIBLANGTAG_DLL])
11162 dnl ===================================================================
11163 dnl Test whether to build libpng or rely on the system version
11164 dnl ===================================================================
11166 AC_MSG_CHECKING([whether to use the system libpng])
11168 dnl How should and does this interact with the checks for libpng
11169 dnl related to use of libpng in the quickstarter above? This needs to
11172 if test "$with_system_libpng" = "auto"; then
11174 WINNT|Darwin|iOS|Android)
11175 with_system_libpng="$with_system_libs"
11178 with_system_libpng=yes
11183 if test "$with_system_libpng" = yes; then
11185 AC_MSG_RESULT([yes])
11188 BUILD_TYPE="$BUILD_TYPE LIBPNG"
11189 AC_MSG_RESULT([no])
11191 AC_SUBST(SYSTEM_LIBPNG)
11193 dnl ===================================================================
11194 dnl Check for runtime JVM search path
11195 dnl ===================================================================
11196 if test "$SOLAR_JAVA" != ""; then
11197 AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
11198 if test -n "$with_jvm_path" -a "$with_jvm_path" != "no"; then
11199 AC_MSG_RESULT([yes])
11200 if ! test -d "$with_jvm_path"; then
11201 AC_MSG_ERROR(["$with_jvm_path" not a directory])
11203 if ! test -d "$with_jvm_path"jvm; then
11204 AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
11206 JVM_ONE_PATH_CHECK="$with_jvm_path"
11207 AC_SUBST(JVM_ONE_PATH_CHECK)
11209 AC_MSG_RESULT([no])
11213 dnl ===================================================================
11214 dnl Test for the presence of Ant and that it works
11215 dnl ===================================================================
11217 if test "$SOLAR_JAVA" != ""; then
11218 ANT_HOME=; export ANT_HOME
11219 WITH_ANT_HOME=; export WITH_ANT_HOME
11220 if test -z "$with_ant_home"; then
11221 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
11223 if test "$_os" = "WINNT"; then
11224 with_ant_home=`cygpath -u "$with_ant_home"`
11226 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
11227 WITH_ANT_HOME=$with_ant_home
11228 ANT_HOME=$with_ant_home
11231 if test -z "$ANT"; then
11232 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
11234 # resolve relative or absolute symlink
11235 while test -h "$ANT"; do
11237 a_basename=`basename "$ANT"`
11238 a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
11239 cd "`dirname "$ANT"`"
11240 cd "`dirname "$a_script"`"
11241 ANT="`pwd`"/"`basename "$a_script"`"
11245 AC_MSG_CHECKING([if $ANT works])
11246 cat > conftest.java << EOF
11247 public class conftest {
11248 int testmethod(int a, int b) {
11254 cat > conftest.xml << EOF
11255 <project name="conftest" default="conftest">
11256 <target name="conftest">
11257 <javac srcdir="." includes="conftest.java">
11263 oldJAVA_HOME=$JAVA_HOME
11264 if test "$JAVACISGCJ" = "yes"; then
11265 JAVA_HOME=; export JAVA_HOME
11266 ant_gcj="-Dbuild.compiler=gcj"
11268 AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
11269 if test $? = 0 -a -f ./conftest.class; then
11270 AC_MSG_RESULT([Ant works])
11271 if test -z "$WITH_ANT_HOME"; then
11272 ANT_HOME=`"$ANT" -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
11273 if test -z "$ANT_HOME"; then
11274 ANT_HOME=`echo "$ANT" | $SED -n "s/\/bin\/ant.*\$//p"`
11277 ANT_HOME="$WITH_ANT_HOME"
11280 echo "configure: Ant test failed" >&5
11281 cat conftest.java >&5
11282 cat conftest.xml >&5
11283 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
11285 add_warning "Ant does not work - Some Java projects will not build!"
11287 JAVA_HOME=$oldJAVA_HOME
11288 rm -f conftest* core core.* *.core
11290 if test -z "$ANT_HOME"; then
11291 ANT_HOME="NO_ANT_HOME"
11293 PathFormat "$ANT_HOME"
11294 ANT_HOME="$formatted_path"
11301 dnl Checking for ant.jar
11302 if test "$ANT_HOME" != "NO_ANT_HOME"; then
11303 AC_MSG_CHECKING([Ant lib directory])
11304 if test -f $ANT_HOME/lib/ant.jar; then
11305 ANT_LIB="$ANT_HOME/lib"
11307 if test -f $ANT_HOME/ant.jar; then
11308 ANT_LIB="$ANT_HOME"
11310 if test -f /usr/share/java/ant.jar; then
11311 ANT_LIB=/usr/share/java
11313 if test -f /usr/share/ant-core/lib/ant.jar; then
11314 ANT_LIB=/usr/share/ant-core/lib
11316 if test -f $ANT_HOME/lib/ant/ant.jar; then
11317 ANT_LIB="$ANT_HOME/lib/ant"
11319 if test -f /usr/share/lib/ant/ant.jar; then
11320 ANT_LIB=/usr/share/lib/ant
11322 AC_MSG_ERROR([Ant libraries not found!])
11329 PathFormat "$ANT_LIB"
11330 ANT_LIB="$formatted_path"
11331 AC_MSG_RESULT([Ant lib directory found.])
11336 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
11338 AC_MSG_CHECKING([whether Ant is >= $ant_minver])
11339 ant_version=`"$ANT" -version | $AWK '{ print $4; }'`
11340 ant_version_major=`echo $ant_version | cut -d. -f1`
11341 ant_version_minor=`echo $ant_version | cut -d. -f2`
11342 echo "configure: ant_version $ant_version " >&5
11343 echo "configure: ant_version_major $ant_version_major " >&5
11344 echo "configure: ant_version_minor $ant_version_minor " >&5
11345 if test "$ant_version_major" -ge "2"; then
11346 AC_MSG_RESULT([yes, $ant_version])
11347 elif test "$ant_version_major" = "1" -a "$ant_version_minor" -ge "$ant_minminor1"; then
11348 AC_MSG_RESULT([yes, $ant_version])
11350 AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
11353 if test "$ENABLE_MEDIAWIKI" = "YES"; then
11354 AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
11357 cat > conftest.java << EOF
11358 public class conftest {
11359 int testmethod(int a, int b) {
11365 cat > conftest.xml << EOF
11366 <project name="conftest" default="conftest">
11367 <target name="conftest" depends="copytest">
11368 <javac srcdir="." includes="conftest.java">
11371 <target name="copytest">
11372 <copy todir="confdir">
11373 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
11375 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
11381 if test "$JAVACISGCJ" = "yes"; then
11382 JAVA_HOME=; export JAVA_HOME
11383 ant_gcj="-Dbuild.compiler=gcj"
11385 AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
11386 if test $? = 0 -a -f ./conftest.class; then
11387 AC_MSG_RESULT([yes])
11390 echo "configure: Ant test failed" >&5
11391 cat conftest.java >&5
11392 cat conftest.xml >&5
11394 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
11397 rm -f conftest* core core.* *.core
11401 if test "$SOLAR_JAVA" != "" -a "$with_junit" != "no"; then
11402 AC_MSG_CHECKING([for JUnit 4])
11403 if test "$with_junit" = "yes"; then
11404 if test -e /usr/share/java/junit4.jar; then
11405 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
11407 if test -e /usr/share/lib/java/junit.jar; then
11408 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
11410 OOO_JUNIT_JAR=/usr/share/java/junit.jar
11414 OOO_JUNIT_JAR=$with_junit
11416 if test "$_os" = "WINNT"; then
11417 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
11419 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
11420 grep org/junit/Before.class > /dev/null 2>&5
11421 if test $? -eq 0; then
11422 # check if either class-path entry is available for hamcrest or
11424 if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |$GREP -q hamcrest || \
11425 "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |$GREP 'Class-Path:' | $GREP -q 'hamcrest'; then
11426 AC_MSG_RESULT([$OOO_JUNIT_JAR])
11428 AC_MSG_ERROR([your junit jar neither sets a classpath nor includes hamcrest; please
11429 provide a full junit jar or use --without-junit])
11432 AC_MSG_RESULT([no])
11433 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
11434 location (/usr/share/java), specify its pathname via
11435 --with-junit=..., or disable it via --without-junit])
11437 if test $OOO_JUNIT_JAR != ""; then
11438 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
11441 AC_SUBST(OOO_JUNIT_JAR)
11443 if test "$enable_odk" = no; then
11446 if test "$with_doxygen" = no; then
11447 AC_MSG_CHECKING([for doxygen])
11449 AC_MSG_RESULT([no])
11451 if test "$with_doxygen" = yes; then
11452 AC_PATH_PROG([DOXYGEN], [doxygen])
11453 if test -z "$DOXYGEN"; then
11454 AC_MSG_RESULT([no])
11455 AC_MSG_ERROR([doxygen not found in \$PATH; specify its pathname via --with-doxygen=..., or disable its use via --without-doxygen])
11458 AC_MSG_CHECKING([for doxygen])
11459 DOXYGEN=$with_doxygen
11460 AC_MSG_RESULT([$DOXYGEN])
11464 AC_SUBST([DOXYGEN])
11469 # check for wget and md5sum
11475 if test "$enable_fetch_external" != "no"; then
11477 CURL=`which curl 2>/dev/null`
11479 for i in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget /opt/sfw/bin/wget /opt/local/bin/wget; do
11480 eval "$i --version" > /dev/null 2>&1
11482 if test $ret -eq 0; then
11488 if test -z "$WGET" -a -z "$CURL"; then
11489 AC_MSG_ERROR([neither wget nor curl found!])
11492 for i in md5 md5sum /usr/local/bin/md5sum gmd5sum /usr/sfw/bin/md5sum /opt/sfw/bin/gmd5sum /opt/local/bin/md5sum; do
11493 if test "$i" = "md5"; then
11494 eval "$i -x" > /dev/null 2>&1
11496 eval "$i --version" > /dev/null 2>&1
11499 if test $ret -eq 0; then
11505 if test "$MD5SUM" = "md5"; then
11506 if md5 -r < /dev/null > /dev/null 2>/dev/null; then
11507 MD5SUM="$MD5SUM -r"
11508 elif md5 -n < /dev/null > /dev/null 2>/dev/null; then
11509 MD5SUM="$MD5SUM -n"
11513 if test -z "$MD5SUM"; then
11514 AC_MSG_WARN([no md5sum: found!])
11515 add_warning "no md5sum: found!"
11524 dnl ===================================================================
11525 dnl Product version
11526 dnl ===================================================================
11527 AC_MSG_CHECKING([for product version])
11528 PRODUCTVERSION=AC_PACKAGE_VERSION
11529 AC_MSG_RESULT([$PRODUCTVERSION])
11530 AC_SUBST(PRODUCTVERSION)
11532 dnl ===================================================================
11533 dnl Dealing with l10n options
11534 dnl ===================================================================
11535 AC_MSG_CHECKING([which languages to be built])
11536 # get list of all languages
11537 # generate shell variable from completelangiso= from solenv/inc/langlist.mk
11538 # the sed command does the following:
11539 # + if a line ends with a backslash, append the next line to it
11540 # + adds " on the beginning of the value (after =)
11541 # + adds " at the end of the value
11542 # + removes en-US; we want to put it on the beginning
11543 # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
11544 [eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' solenv/inc/langlist.mk)]
11545 ALL_LANGS="en-US $completelangiso"
11546 # check the configured localizations
11547 WITH_LANG="$with_lang"
11548 if test -z "$WITH_LANG" -o "$WITH_LANG" = "en-US"; then
11549 AC_MSG_RESULT([en-US])
11551 AC_MSG_RESULT([$WITH_LANG])
11552 GIT_NEEDED_SUBMODULES="translations $GIT_NEEDED_SUBMODULES"
11554 # check that the list is valid
11555 for lang in $WITH_LANG; do
11556 test "$lang" = "ALL" && continue
11557 # need to check for the exact string, so add space before and after the list of all languages
11558 for vl in $ALL_LANGS; do
11559 if test "$vl" = "$lang"; then
11563 if test "$vl" != "$lang"; then
11564 AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS])
11567 # list with substituted ALL
11568 WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
11569 test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
11570 test "$WITH_LANG" = "en-US" && WITH_LANG=
11571 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
11572 test "$WITH_LANG_LIST" = "en-US" || WITH_LANG_LIST=`echo $WITH_LANG_LIST qtz`
11573 ALL_LANGS=`echo $ALL_LANGS qtz`
11575 AC_SUBST(ALL_LANGS)
11576 AC_SUBST(WITH_LANG)
11577 AC_SUBST(WITH_LANG_LIST)
11578 AC_SUBST(GIT_NEEDED_SUBMODULES)
11581 PathFormat "$SRC_ROOT/translations"
11582 L10N_MODULE="$formatted_path"
11583 WITH_POOR_HELP_LOCALIZATIONS=
11584 if test -d "$SRC_ROOT/translations/source"; then
11585 for l in `ls -1 $SRC_ROOT/translations/source`; do
11586 if test ! -d "$SRC_ROOT/translations/source/$l/helpcontent2"; then
11587 WITH_POOR_HELP_LOCALIZATIONS="$WITH_POOR_HELP_LOCALIZATIONS $l"
11591 AC_SUBST(L10N_MODULE)
11592 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
11594 dnl git-new-workdir
11595 dnl ===================================================================
11596 if test -n "${GIT_LINK_SRC}"; then
11597 for repo in ${GIT_NEEDED_SUBMODULES}; do
11598 if ! test -d "${GIT_LINK_SRC}"/${repo}; then
11599 AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
11603 AC_SUBST(GIT_LINK_SRC)
11605 AC_MSG_CHECKING([for custom 'intro' progress bar color])
11607 if test -z "$with_intro_progressbar_color"; then
11608 PROGRESSBARCOLOR="128,128,128"
11609 AC_MSG_RESULT([none])
11611 PROGRESSBARCOLOR="$with_intro_progressbar_color"
11612 AC_MSG_RESULT([$PROGRESSBARCOLOR])
11614 AC_SUBST(PROGRESSBARCOLOR)
11616 AC_MSG_CHECKING([for custom 'intro' progress bar size])
11618 if test -z "$with_intro_progressbar_size"; then
11619 PROGRESSSIZE="409,8"
11620 AC_MSG_RESULT([none])
11622 PROGRESSSIZE="$with_intro_progressbar_size"
11623 AC_MSG_RESULT([$PROGRESSSIZE])
11625 AC_SUBST(PROGRESSSIZE)
11627 AC_MSG_CHECKING([for custom 'intro' progress bar position])
11629 if test -z "$with_intro_progressbar_position"; then
11630 PROGRESSPOSITION="72,189"
11631 AC_MSG_RESULT([none])
11633 PROGRESSPOSITION="$with_intro_progressbar_position"
11634 AC_MSG_RESULT([$PROGRESSPOSITION])
11636 AC_SUBST(PROGRESSPOSITION)
11638 AC_MSG_CHECKING([for custom 'intro' progress bar frame color])
11639 PROGRESSFRAMECOLOR=
11640 if test -z "$with_intro_progressbar_frame_color"; then
11641 PROGRESSFRAMECOLOR="245,245,245"
11642 AC_MSG_RESULT([none])
11644 PROGRESSFRAMECOLOR="$with_intro_progressbar_frame_color"
11645 AC_MSG_RESULT([$PROGRESSFRAMECOLOR])
11647 AC_SUBST(PROGRESSFRAMECOLOR)
11649 AC_MSG_CHECKING([for custom 'intro' progress text color])
11651 if test -z "$with_intro_progressbar_text_color"; then
11652 PROGRESSTEXTCOLOR="255,255,255"
11653 AC_MSG_RESULT([none])
11655 PROGRESSTEXTCOLOR="$with_intro_progressbar_text_color"
11656 AC_MSG_RESULT([$PROGRESSTEXTCOLOR])
11658 AC_SUBST(PROGRESSTEXTCOLOR)
11660 AC_MSG_CHECKING([for custom 'intro' progress text baseline])
11661 PROGRESSTEXTBASELINE=
11662 if test -z "$with_intro_progressbar_text_baseline"; then
11663 PROGRESSTEXTBASELINE="170"
11664 AC_MSG_RESULT([none])
11666 PROGRESSTEXTBASELINE="$with_intro_progressbar_text_baseline"
11667 AC_MSG_RESULT([$PROGRESSTEXTBASELINE])
11669 AC_SUBST(PROGRESSTEXTBASELINE)
11671 AC_MSG_CHECKING([for alternative branding images directory])
11673 ABOUT_BACKGROUND_SVG=
11675 STARTCENTER_LEFT_BITMAP=
11676 STARTCENTER_RIGHT_BITMAP=
11677 STARTCENTER_RTL_LEFT_BITMAP=
11678 STARTCENTER_RTL_RIGHT_BITMAP=
11679 STARTCENTER_SPACE_BITMAP=
11680 if test -z "$with_branding" -o "$with_branding" = "no"; then
11681 AC_MSG_RESULT([none])
11683 INTRO_BITMAP="$with_branding/intro.png"
11684 FLAT_LOGO_SVG="$with_branding/flat_logo.svg"
11685 STARTCENTER_LEFT_BITMAP="$with_branding/backing_left.png"
11686 STARTCENTER_RIGHT_BITMAP="$with_branding/backing_right.png"
11687 STARTCENTER_RTL_LEFT_BITMAP="$with_branding/backing_rtl_left.png"
11688 STARTCENTER_RTL_RIGHT_BITMAP="$with_branding/backing_rtl_right.png"
11689 STARTCENTER_SPACE_BITMAP="$with_branding/backing_space.png"
11690 for i in $INTRO_BITMAP \
11692 $STARTCENTER_LEFT_BITMAP \
11693 $STARTCENTER_RIGHT_BITMAP \
11694 $STARTCENTER_RTL_LEFT_BITMAP \
11695 $STARTCENTER_RTL_RIGHT_BITMAP \
11696 $STARTCENTER_SPACE_BITMAP; do
11697 if test ! -f $i; then
11698 AC_MSG_WARN([Required file $i does not exist!])
11701 AC_MSG_RESULT([$with_branding])
11704 AC_MSG_CHECKING([for yet another 'intro' bitmap])
11705 if test -z "$with_intro_bitmap" -o "$with_intro_bitmap" = "no"; then
11706 if test "$with_intro_bitmap" = "no"; then
11709 AC_MSG_RESULT([none])
11711 case "$with_intro_bitmap" in
11712 *.png) INTRO_BITMAP="$with_intro_bitmap" ;;
11713 *) AC_MSG_WARN([Intro bitmap should be a .png file!]) ;;
11715 AC_MSG_RESULT([$INTRO_BITMAP])
11717 AC_SUBST(INTRO_BITMAP)
11719 AC_MSG_CHECKING([for yet another 'about' svg])
11720 if test -z "$with_about_background_svg" -o "$with_about_background_svg" = "no"; then
11721 if test "$with_about_background_svg" = "no"; then
11722 ABOUT_BACKGROUND_SVG=
11724 AC_MSG_RESULT([none])
11726 case "$with_about_background_svg" in
11727 *.svg) ABOUT_BACKGROUND_SVG="$with_about_background_svg" ;;
11728 *) AC_MSG_WARN([About background SVG should be a .svg file!]) ;;
11730 AC_MSG_RESULT([$ABOUT_BACKGROUND_SVG])
11732 AC_SUBST(ABOUT_BACKGROUND_SVG)
11734 AC_MSG_CHECKING([for yet another 'flat_logo' svg])
11735 if test -z "$with_flat_logo_svg" -o "$with_flat_logo_svg" = "no"; then
11736 if test "$with_flat_logo_svg" = "no"; then
11739 AC_MSG_RESULT([none])
11741 case "$with_flat_logo_svg" in
11742 *.svg) FLAT_LOGO_SVG="$with_flat_logo_svg" ;;
11743 *) AC_MSG_WARN([Flat logo SVG should be a .svg file!]) ;;
11745 AC_MSG_RESULT([$ABOUT_BITMAP])
11747 AC_SUBST(FLAT_LOGO_SVG)
11749 AC_MSG_CHECKING([for yet another 'start center left' bitmap])
11750 if test -z "$with_startcenter_left_bitmap" -o "$with_startcenter_left_bitmap" = "no"; then
11751 if test "$with_startcenter_left_bitmap" = "no"; then
11752 STARTCENTER_LEFT_BITMAP=
11754 AC_MSG_RESULT([none])
11756 case "$with_startcenter_left_bitmap" in
11757 *.png) STARTCENTER_LEFT_BITMAP="$with_startcenter_left_bitmap" ;;
11758 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
11760 AC_MSG_RESULT([$STARTCENTER_LEFT_BITMAP])
11762 AC_SUBST(STARTCENTER_LEFT_BITMAP)
11764 AC_MSG_CHECKING([for yet another 'start center right' bitmap])
11765 if test -z "$with_startcenter_right_bitmap" -o "$with_startcenter_right_bitmap" = "no"; then
11766 if test "$with_startcenter_right_bitmap" = "no"; then
11767 STARTCENTER_RIGHT_BITMAP=
11769 AC_MSG_RESULT([none])
11771 case "$with_startcenter_right_bitmap" in
11772 *.png) STARTCENTER_RIGHT_BITMAP="$with_startcenter_right_bitmap" ;;
11773 *) AC_MSG_WARN([Startcenter right bitmap should be a .png file!]) ;;
11775 AC_MSG_RESULT([$STARTCENTER_RIGHT_BITMAP])
11777 AC_SUBST(STARTCENTER_RIGHT_BITMAP)
11779 AC_MSG_CHECKING([for yet another 'start center rtl left' bitmap])
11780 if test -z "$with_startcenter_rtl_left_bitmap" -o "$with_startcenter_rtl_left_bitmap" = "no"; then
11781 if test "$with_startcenter_rtl_left_bitmap" = "no"; then
11782 STARTCENTER_RTL_LEFT_BITMAP=
11784 AC_MSG_RESULT([none])
11786 case "$with_startcenter_rtl_left_bitmap" in
11787 *.png) STARTCENTER_RTL_LEFT_BITMAP="$with_startcenter_rtl_left_bitmap" ;;
11788 *) AC_MSG_WARN([Startcenter rtl left bitmap should be a .png file!]) ;;
11790 AC_MSG_RESULT([$STARTCENTER_RTL_LEFT_BITMAP])
11792 AC_SUBST(STARTCENTER_RTL_LEFT_BITMAP)
11794 AC_MSG_CHECKING([for yet another 'start center rtl right' bitmap])
11795 if test -z "$with_startcenter_rtl_right_bitmap" -o "$with_startcenter_rtl_right_bitmap" = "no"; then
11796 if test "$with_startcenter_rtl_right_bitmap" = "no"; then
11797 STARTCENTER_RTL_RIGHT_BITMAP=
11799 AC_MSG_RESULT([none])
11801 case "$with_startcenter_rtl_right_bitmap" in
11802 *.png) STARTCENTER_RTL_RIGHT_BITMAP="$with_startcenter_rtl_right_bitmap" ;;
11803 *) AC_MSG_WARN([Startcenter rtl right bitmap should be a .png file!]) ;;
11805 AC_MSG_RESULT([$STARTCENTER_RTL_RIGHT_BITMAP])
11807 AC_SUBST(STARTCENTER_RTL_RIGHT_BITMAP)
11809 AC_MSG_CHECKING([for yet another 'start center space' bitmap])
11810 if test -z "$with_startcenter_space_bitmap" -o "$with_startcenter_space_bitmap" = "no"; then
11811 if test "$with_startcenter_space_bitmap" = "no"; then
11812 STARTCENTER_SPACE_BITMAP=
11814 AC_MSG_RESULT([none])
11816 case "$with_startcenter_space_bitmap" in
11817 *.png) STARTCENTER_SPACE_BITMAP="$with_startcenter_space_bitmap" ;;
11818 *) AC_MSG_WARN([Startcenter left bitmap should be a .png file!]) ;;
11820 AC_MSG_RESULT([$STARTCENTER_SPACE_BITMAP])
11822 AC_SUBST(STARTCENTER_SPACE_BITMAP)
11825 AC_MSG_CHECKING([for extra build ID])
11826 if test -n "$with_extra_buildid" -a "$with_extra_buildid" != "yes" ; then
11827 EXTRA_BUILDID="$with_extra_buildid"
11828 AC_MSG_RESULT([$EXTRA_BUILDID])
11830 AC_MSG_RESULT([not set])
11832 AC_SUBST(EXTRA_BUILDID)
11835 AC_MSG_CHECKING([for vendor])
11836 if test -z "$with_vendor" -o "$with_vendor" = "no"; then
11837 AC_MSG_RESULT([not set])
11839 OOO_VENDOR="$with_vendor"
11840 AC_MSG_RESULT([$OOO_VENDOR])
11842 AC_SUBST(OOO_VENDOR)
11845 AC_MSG_CHECKING([for UNIX wrapper name])
11846 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes"; then
11847 AC_MSG_RESULT([not set])
11849 UNIXWRAPPERNAME="$with_unix_wrapper"
11850 AC_MSG_RESULT([$UNIXWRAPPERNAME])
11852 AC_SUBST(UNIXWRAPPERNAME)
11854 AC_MSG_CHECKING([whether to install the compat oo* wrappers])
11855 if test "$with_compat_oowrappers" = "yes"; then
11856 WITH_COMPAT_OOWRAPPERS=YES
11859 WITH_COMPAT_OOWRAPPERS=
11862 AC_SUBST(WITH_COMPAT_OOWRAPPERS)
11864 AC_MSG_CHECKING([for product name])
11865 PRODUCTNAME=AC_PACKAGE_NAME
11866 AC_MSG_RESULT([$PRODUCTNAME])
11867 AC_SUBST(PRODUCTNAME)
11869 INSTALLDIRNAME=`echo AC_PACKAGE_NAME | tr '[[:upper:]]' '[[:lower:]]'`
11870 AC_MSG_CHECKING([for install dirname])
11871 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes"; then
11872 INSTALLDIRNAME="$with_install_dirname"
11874 AC_MSG_RESULT([$INSTALLDIRNAME])
11875 AC_SUBST(INSTALLDIRNAME)
11877 AC_MSG_CHECKING([for prefix])
11878 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11879 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
11880 PREFIXDIR="$prefix"
11881 AC_MSG_RESULT([$PREFIXDIR])
11882 AC_SUBST(PREFIXDIR)
11884 AC_MSG_CHECKING([for libdir])
11885 LIBDIR=[$(eval echo $(eval echo $libdir))]
11886 AC_MSG_RESULT([$LIBDIR])
11889 AC_MSG_CHECKING([for data dir])
11890 DATADIR=[$(eval echo $(eval echo $datadir))]
11891 AC_MSG_RESULT([$DATADIR])
11894 AC_MSG_CHECKING([for man dir])
11895 MANDIR=[$(eval echo $(eval echo $mandir))]
11896 AC_MSG_RESULT([$MANDIR])
11899 AC_MSG_CHECKING([for doc dir])
11900 DOCDIR=[$(eval echo $(eval echo $docdir))]
11901 AC_MSG_RESULT([$DOCDIR])
11904 AC_MSG_CHECKING([for install dir])
11905 INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
11906 AC_MSG_RESULT([$INSTALLDIR])
11907 AC_SUBST(INSTALLDIR)
11909 AC_MSG_CHECKING([for dev-install dir])
11910 DEVINSTALLDIR="$OUTDIR/installation"
11911 AC_MSG_RESULT([$DEVINSTALLDIR])
11912 AC_SUBST(DEVINSTALLDIR)
11914 # ===================================================================
11915 # De- or increase default verbosity of build process
11916 # ===================================================================
11917 AC_MSG_CHECKING([build verbosity])
11918 if test -n "$enable_verbose"; then
11919 if test "$enable_verbose" = "yes"; then
11921 AC_MSG_RESULT([high])
11923 if test "$enable_verbose" = "no"; then
11925 AC_MSG_RESULT([low])
11928 AC_MSG_RESULT([not set])
11932 dnl ===================================================================
11933 dnl Use zenity during build
11934 dnl ===================================================================
11935 AC_MSG_CHECKING([whether to use zenity during build])
11936 if test "$enable_zenity" = "yes"; then
11937 AC_MSG_RESULT([yes])
11938 AC_PATH_PROGS( ZNTY, zenity )
11939 if test -z "$ZNTY"; then
11940 ENABLE_ZENITY=FALSE
11945 ENABLE_ZENITY=FALSE
11946 AC_MSG_RESULT([no])
11948 AC_SUBST(ENABLE_ZENITY)
11951 dnl ===================================================================
11952 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
11953 dnl --enable-dependency-tracking configure option
11954 dnl ===================================================================
11955 AC_MSG_CHECKING([whether to enable dependency tracking])
11956 if test "$enable_dependency_tracking" = "no"; then
11958 AC_MSG_RESULT([no])
11960 AC_MSG_RESULT([yes])
11964 dnl ===================================================================
11965 dnl Number of CPUs to use during the build
11966 dnl ===================================================================
11967 AC_MSG_CHECKING([for number of processors to use])
11968 # plain --with-parallelism is just the default
11969 if test -n "$with_parallelism" -a "$with_parallelism" != "yes"; then
11970 if test "$with_parallelism" = "no"; then
11973 PARALLELISM=$with_parallelism
11976 if test "$enable_icecream" = "yes"; then
11981 Darwin|FreeBSD|NetBSD|OpenBSD)
11982 PARALLELISM=`sysctl -n hw.ncpu`
11986 PARALLELISM=`getconf _NPROCESSORS_ONLN`
11988 # what else than above does profit here *and* has /proc?
11990 PARALLELISM=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
11994 # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
11995 # unexpected format, 'wc -l' will have returned 0.
11996 if test "$PARALLELISM" -eq 0; then
12002 if test "$no_parallelism_make" = "YES" && test $PARALLELISM -gt 1; then
12003 if test -z "$with_parallelism"; then
12004 AC_MSG_WARN([gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this.])
12005 add_warning "gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this."
12008 add_warning "make 3.81 is prone to crashes with parallelism > 1. Since --with-parallelism was explicitly given, it is honored, but do not complain when make segfaults on you."
12012 AC_MSG_RESULT([$PARALLELISM])
12013 AC_SUBST(PARALLELISM)
12015 # ===================================================================
12016 # Number of parallel jobs to be executed during subsequenttest
12017 # ===================================================================
12018 AC_MSG_CHECKING([for maximum no. of jobs during subsequenttest])
12019 CHECK_PARALLELISM=$PARALLELISM
12020 if test "$with_check_jobs" != ""; then
12021 CHECK_PARALLELISM="$with_check_jobs"
12023 AC_MSG_RESULT([$CHECK_PARALLELISM])
12024 AC_SUBST(CHECK_PARALLELISM)
12027 # Set up ILIB for MSVC build
12029 if test "$build_os" = "cygwin"; then
12030 ILIB=".;${SOLARVER}/$INPATH/lib"
12031 if test -n "$JAVA_HOME" -a "$JAVA_HOME" != "NO_JAVA_HOME"; then
12032 ILIB="$ILIB;$JAVA_HOME/lib"
12034 if test "$BITNESS_OVERRIDE" = 64; then
12035 ILIB="$ILIB;$COMPATH/lib/amd64"
12036 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/x64"
12037 if test "$WINDOWS_SDK_VERSION" = "80"; then
12038 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x64"
12041 ILIB="$ILIB;$COMPATH/lib"
12042 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib"
12043 if test "$WINDOWS_SDK_VERSION" = "80"; then
12044 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x86"
12047 ILIB="$ILIB;$DOTNET_FRAMEWORK_HOME/lib"
12049 if test "$ENABLE_DIRECTX" = "TRUE"; then
12050 ILIB="$ILIB;$DIRECTXSDK_LIB"
12056 # ===================================================================
12057 # Creating bigger shared library to link against
12058 # ===================================================================
12059 AC_MSG_CHECKING([whether to create huge library])
12061 if test "$enable_mergelibs" = "yes"; then
12062 if test $_os != Linux -a $_os != Android -a $_os != WINNT; then
12063 add_warning "--enable-mergelibs is not tested for this platform"
12066 AC_MSG_RESULT([yes])
12068 AC_MSG_RESULT([no])
12070 AC_SUBST(MERGELIBS)
12072 # ===================================================================
12073 # Create hardlinks on deliver instead of copying for smaller size and speed up
12074 # ===================================================================
12075 AC_MSG_CHECKING([whether to create hardlinks for delivering files])
12077 if test "$enable_hardlink_deliver" = "yes"; then
12078 HARDLINKDELIVER="TRUE"
12079 AC_MSG_RESULT([yes])
12081 AC_MSG_RESULT([no])
12083 AC_SUBST(HARDLINKDELIVER)
12085 dnl ===================================================================
12086 dnl icerun is a wrapper that stops us spawning tens of processes
12087 dnl locally - for tools that can't be executed on the compile cluster
12088 dnl this avoids a dozen javac's ganging up on your laptop to kill it.
12089 dnl ===================================================================
12090 AC_MSG_CHECKING([whether to use icerun wrapper])
12092 if test "$enable_icecream" = "yes" && which icerun >/dev/null 2>&1 ; then
12093 ICECREAM_RUN=icerun
12094 AC_MSG_RESULT([yes])
12096 AC_MSG_RESULT([no])
12098 AC_SUBST(ICECREAM_RUN)
12100 dnl ===================================================================
12101 dnl Setting up the environment.
12102 dnl ===================================================================
12103 echo "setting up the build environment variables..."
12107 if test "$build_os" = "cygwin"; then
12108 if test "$DISABLE_ACTIVEX" = "YES"; then
12109 ATL_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE
12110 ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl"
12111 MFC_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE
12112 MFC_INCLUDE="$WINDOWS_SDK_HOME/include/mfc"
12114 ATL_LIB="$COMPATH/atlmfc/lib"
12115 ATL_INCLUDE="$COMPATH/atlmfc/include"
12116 MFC_LIB="$COMPATH/atlmfc/lib"
12117 MFC_INCLUDE="$WINDOWS_SDK_HOME/include/mfc"
12119 if test "$BITNESS_OVERRIDE" = 64; then
12120 ATL_LIB="$ATL_LIB/amd64"
12121 MFC_LIB="$MFC_LIB/amd64"
12123 PathFormat "/usr/bin/grep.exe"
12124 WIN_GREP="$formatted_path"
12125 PathFormat "/usr/bin/find.exe"
12126 WIN_FIND="$formatted_path"
12127 PathFormat "/usr/bin/ls.exe"
12128 WIN_LS="$formatted_path"
12129 PathFormat "/usr/bin/touch.exe"
12130 WIN_TOUCH="$formatted_path"
12133 AC_SUBST(ATL_INCLUDE)
12135 AC_SUBST(MFC_INCLUDE)
12140 AC_SUBST(WIN_TOUCH)
12142 AC_SUBST(BUILD_TYPE)
12147 if test -z "$SOLARINC_FOR_BUILD"; then
12148 SOLARINC_FOR_BUILD="$SOLARINC"
12150 AC_SUBST(SOLARINC_FOR_BUILD)
12152 if test -z "$SOLARLIB_FOR_BUILD"; then
12153 SOLARLIB_FOR_BUILD="$SOLARLIB"
12155 AC_SUBST(SOLARLIB_FOR_BUILD)
12158 PERL="$formatted_path"
12161 if test "$build_os" = "cygwin"; then
12162 TEMP_DIRECTORY=`cygpath -m "/tmp"`
12163 if test -n "$TMP"; then
12164 TMP_DIRECTORY="$TMP"
12166 TMP_DIRECTORY="$TEMP_DIRECTORY"
12169 if test -n "$TMPDIR"; then
12170 TEMP_DIRECTORY="$TMPDIR"
12172 TEMP_DIRECTORY="/tmp"
12175 AC_SUBST(TEMP_DIRECTORY)
12176 AC_SUBST(TMP_DIRECTORY)
12178 # setup the PATH for the environment
12179 if test -n "$LO_PATH_FOR_BUILD"; then
12180 LO_PATH="$LO_PATH_FOR_BUILD"
12186 aix*|dragonfly*|freebsd*|linux-gnu*|*netbsd*|openbsd*)
12187 if test "$SOLAR_JAVA" != "" -a "$JDK"!="gcj"; then
12188 pathmunge "$JAVA_HOME/bin" "after"
12193 pathmunge "$DOTNET_FRAMEWORK_HOME/bin" "before"
12194 pathmunge "$ASM_HOME" "before"
12195 pathmunge "$WINDOWS_SDK_HOME/bin" "before"
12196 pathmunge "$CSC_PATH" "before"
12197 pathmunge "$MIDL_PATH" "before"
12198 pathmunge "$AL_PATH" "before"
12199 pathmunge "$MSPDB_PATH" "before"
12200 if test "$BITNESS_OVERRIDE" = 64; then
12201 pathmunge "$COMPATH/bin/amd64" "before"
12202 pathmunge "$WINDOWS_SDK_HOME/bin/x64" "before"
12204 pathmunge "$COMPATH/bin" "before"
12205 pathmunge "$WINDOWS_SDK_HOME/bin/x86" "before"
12207 if test "$SOLAR_JAVA" != "" -a "$JDK"!="gcj"; then
12208 if test -d "$JAVA_HOME/jre/bin/client"; then
12209 pathmunge "$JAVA_HOME/jre/bin/client" "before"
12211 if test -d "$JAVA_HOME/jre/bin/hotspot"; then
12212 pathmunge "$JAVA_HOME/jre/bin/hotspot" "before"
12214 pathmunge "$JAVA_HOME/bin" "before"
12219 pathmunge "/usr/css/bin" "before"
12220 if test "$SOLAR_JAVA" != "" -a "$JDK"!="gcj"; then
12221 pathmunge "$JAVA_HOME/bin" "after"
12226 pathmunge "$SRC_ROOT/solenv/$OUTPATH/bin" "before"
12227 pathmunge "$SRC_ROOT/solenv/bin" "before"
12228 pathmunge "." "before"
12233 # make sure config.guess is +x; we execute config.guess, so it has to be so
12234 chmod +x ./config.guess
12236 # Generate a configuration timestamp we can use for deps
12237 if test -f config_host.mk; then
12238 mv -f config_host.mk config_host.mk.last
12240 echo > config_host.mk.last
12243 AC_CONFIG_FILES([config_host.mk])
12244 AC_CONFIG_HEADERS([config/config_version.h])
12247 # touch the config timestamp file
12248 if test ! -f config_host.mk.stamp; then
12249 echo > config_host.mk.stamp
12250 elif diff config_host.mk config_host.mk.last >/dev/null 2>&1; then
12251 echo "Configuration unchanged - avoiding scp2 stamp update"
12253 echo > config_host.mk.stamp
12257 if test "$STALE_MAKE" = "TRUE" -a "$build_os" = "cygwin"; then
12259 ****************************************************************************
12261 Your make version is known to be horribly slow, and hard to debug
12262 problems with. To get a reasonably functional make please do:
12264 to install a pre-compiled binary make for cygwin
12266 mkdir -p /opt/lo/bin
12268 wget http://dev-www.libreoffice.org/bin/cygwin/make
12271 to install from source:
12272 place yourself in a working directory of you choice.
12274 git clone git://anongit.freedesktop.org/libreoffice/contrib/dev-tools
12275 cd dev-tools/make-3.82-gbuild
12276 ./configure --prefix=/opt/lo
12280 Then re-run autogen.sh
12282 Note: autogen.sh will try to use /opt/lo/bin/make if the environment variable GNUMAKE is not already defined.
12283 Alternatively, you can install the 'new' make where ever you want and make sure that `which make` finds it.
12289 ****************************************************************************
12298 if test $_os != WINNT -a "$CROSS_COMPILING" != YES; then
12301 To install when the build is finished, issue:
12304 If you want to develop LibreOffice, you might prefer:
12305 $GNUMAKE dev-install
12307 If you want to run the smoketest, issue:
12315 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: