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 # The version number in the second argumemnt to AC_INIT should be four numbers separated by
6 # periods. Some parts of the code requires the first one to be less than 128 and the others to be less
7 # than 256. The four numbers can optionally be followed by a period and a free-form string containing
8 # no spaces or periods, like "frobozz-mumble-42" or "alpha0". If the free-form string ends with one or
9 # several non-alphanumeric characters, those are split off and used only for the
10 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
12 AC_INIT([LibreOffice],[4.4.4.1],[],[],[http://documentfoundation.org/])
16 if test -n "$BUILD_TYPE"; then
17 AC_MSG_ERROR([You have sourced config_host.mk in this shell. This may lead to trouble, please run in a fresh (login) shell.])
25 GIT_NEEDED_SUBMODULES=""
26 LO_PATH= # used by path_munge to construct a PATH variable
31 if test "$build_os" = "cygwin"; then
33 # spaces,parentheses,brackets,braces are problematic in pathname
35 case "$formatted_path" in
36 *\ * | *\)* | *\(* | *\{* | *\}* | *\[* | *\]* | *\\* )
40 if test "$pf_conv_to_dos" = "yes"; then
41 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
42 formatted_path=`cygpath -sm "$formatted_path"`
44 formatted_path=`cygpath -d "$formatted_path"`
46 if test $? -ne 0; then
47 AC_MSG_ERROR([path conversion failed for "$1".])
50 fp_count_colon=`echo "$formatted_path" | $GREP -c "[:]"`
51 fp_count_slash=`echo "$formatted_path" | $GREP -c "[/]"`
52 if test "$fp_count_slash$fp_count_colon" != "00"; then
53 if test "$fp_count_colon" = "0"; then
54 new_formatted_path=`realpath "$formatted_path"`
55 if test $? -ne 0; then
56 AC_MSG_WARN([realpath failed for "$1", not necessarily a problem.])
58 formatted_path="$new_formatted_path"
61 formatted_path=`cygpath -m "$formatted_path"`
62 if test $? -ne 0; then
63 AC_MSG_ERROR([path conversion failed for "$1".])
71 # There appears to be no simple and portable method to get an absolute and
72 # canonical path, so we try creating the directory if does not exist and
73 # utilizing the shell and pwd.
76 test ! -e "$rel" && mkdir -p "$rel"
77 if test -d "$rel" ; then
78 cd "$rel" || AC_MSG_ERROR([absolute path resolution failed for "$rel".])
79 absolute_path="$(pwd)"
82 AC_MSG_ERROR([Failed to resolve absolute path. "$rel" does not exist or is not a directory.])
90 if test "$have_WARNINGS" = "no"; then
91 echo "*************************************" > warn
93 if which tput >/dev/null 2>/dev/null && test `tput colors` -ge 8; then
94 dnl <esc> as actual byte (U+1b), [ escaped using quadrigraph @<:@
95 COLORWARN='*
\e@<:@1;33;40m WARNING
\e@<:@0m:'
97 COLORWARN="* WARNING :"
100 echo "$COLORWARN $@" >> warn
103 echo "********************************************************************"
105 echo "* Running ${PACKAGE_NAME} build configuration."
107 echo "********************************************************************"
110 dnl ===================================================================
111 dnl checks build and host OSes
112 dnl do this before argument processing to allow for platform dependent defaults
113 dnl ===================================================================
116 AC_MSG_CHECKING([for product name])
117 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
118 PRODUCTNAME=AC_PACKAGE_NAME"Dev"
120 PRODUCTNAME=AC_PACKAGE_NAME
122 AC_MSG_RESULT([$PRODUCTNAME])
123 AC_SUBST(PRODUCTNAME)
125 dnl ===================================================================
126 dnl Our version is defined by the AC_INIT() at the top of this script.
127 dnl ===================================================================
129 set `echo AC_PACKAGE_VERSION | sed "s/\./ /g"`
131 LIBO_VERSION_MAJOR=$1
132 LIBO_VERSION_MINOR=$2
133 LIBO_VERSION_MICRO=$3
134 LIBO_VERSION_PATCH=$4
136 # The CFBundleShortVersionString in Info.plist consists of three integers, so encode the third
137 # as the micro version times 1000 plus the patch number. Unfortunately the LIBO_VERSION_SUFFIX can be anything so
138 # no way to encode that into an integer in general.
139 MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.`expr $LIBO_VERSION_MICRO '*' 1000 + $LIBO_VERSION_PATCH`
141 LIBO_VERSION_SUFFIX=$5
142 # Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently wanted separately in
143 # openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double brackets are for m4's sake,
144 # they get undoubled before actually passed to sed.
145 LIBO_VERSION_SUFFIX_SUFFIX=`echo "$LIBO_VERSION_SUFFIX" | sed -e 's/.*[[a-zA-Z0-9]]\([[^a-zA-Z0-9]]*\)$/\1/'`
146 test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUFFIX%${LIBO_VERSION_SUFFIX_SUFFIX}}"
147 # LIBO_VERSION_SUFFIX, if non-empty, should include the period separator
148 test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX"
150 AC_SUBST(LIBO_VERSION_MAJOR)
151 AC_SUBST(LIBO_VERSION_MINOR)
152 AC_SUBST(LIBO_VERSION_MICRO)
153 AC_SUBST(LIBO_VERSION_PATCH)
154 AC_SUBST(MACOSX_BUNDLE_SHORTVERSION)
155 AC_SUBST(LIBO_VERSION_SUFFIX)
156 AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX)
158 AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR)
159 AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR)
160 AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,$LIBO_VERSION_MICRO)
161 AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,$LIBO_VERSION_PATCH)
163 LIBO_THIS_YEAR=`date +%Y`
164 AC_DEFINE_UNQUOTED(LIBO_THIS_YEAR,$LIBO_THIS_YEAR)
166 dnl ===================================================================
168 dnl ===================================================================
169 AC_MSG_CHECKING([for product version])
170 PRODUCTVERSION="$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR"
171 AC_MSG_RESULT([$PRODUCTVERSION])
172 AC_SUBST(PRODUCTVERSION)
175 # AC_PROG_EGREP doesn't set GREP on all systems as well
176 AC_PATH_PROG(GREP, grep)
184 dnl ===================================================================
185 dnl Search all the common names for GNU Make
186 dnl ===================================================================
187 AC_MSG_CHECKING([for GNU Make])
189 # try to use our own make if it is available and GNUMAKE was not already defined
190 if test -z "$GNUMAKE"; then
191 if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/make" ; then
192 GNUMAKE="$LODE_HOME/opt/bin/make"
193 elif test -x "/opt/lo/bin/make"; then
194 GNUMAKE="/opt/lo/bin/make"
199 for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do
200 if test -n "$a"; then
201 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
202 if test $? -eq 0; then
203 if test "$build_os" = "cygwin"; then
204 if test -n "$($a -v | grep 'Built for Windows')" ; then
205 GNUMAKE="$(cygpath -m "$(which "$(cygpath -u $a)")")"
206 GNUMAKE_WIN_NATIVE="TRUE"
217 AC_MSG_RESULT($GNUMAKE)
218 if test -z "$GNUMAKE"; then
219 AC_MSG_ERROR([not found. install GNU Make.])
221 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
222 AC_MSG_NOTICE([Using a native Win32 GNU Make version.])
226 win_short_path_for_make()
228 local_short_path="$1"
229 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
230 cygpath -sm "$local_short_path"
232 cygpath -u "$(cygpath -d "$local_short_path")"
237 if test "$build_os" = "cygwin"; then
238 PathFormat "$SRC_ROOT"
239 SRC_ROOT="$formatted_path"
240 PathFormat "$BUILDDIR"
241 BUILDDIR="$formatted_path"
248 AC_DEFINE_UNQUOTED(SRCDIR,"$SRC_ROOT")
249 AC_DEFINE_UNQUOTED(BUILDDIR,"$BUILDDIR")
251 if test "z$EUID" = "z0" -a "`uname -o 2>/dev/null`" = "Cygwin"; then
252 AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account])
255 # need sed in os checks...
256 AC_PATH_PROGS(SED, sed)
257 if test -z "$SED"; then
258 AC_MSG_ERROR([install sed to run this script])
261 # Set the ENABLE_LTO variable
262 # ===================================================================
263 AC_MSG_CHECKING([whether to use link-time optimization])
264 if test -n "$enable_lto" -a "$enable_lto" != "no"; then
267 AC_DEFINE(STATIC_LINKING)
274 dnl ===================================================================
275 dnl When building for Android, --with-android-ndk,
276 dnl --with-android-ndk-toolchain-version and --with-android-sdk are
278 dnl ===================================================================
280 AC_ARG_WITH(android-ndk,
281 AS_HELP_STRING([--with-android-ndk],
282 [Specify location of the Android Native Development Kit. Mandatory when building for Android.]),
285 AC_ARG_WITH(android-ndk-toolchain-version,
286 AS_HELP_STRING([--with-android-ndk-toolchain-version],
287 [Specify which toolchain version to use, of those present in the
288 Android NDK you are using. Mandatory if the NDK used has several
289 toolchain versions for the host architecture you are building for.
290 Possible values are 4.6, 4.8, clang3.3 and clang3.4. Only 4.8 has been
291 tested for real...]), ,)
293 AC_ARG_WITH(android-sdk,
294 AS_HELP_STRING([--with-android-sdk],
295 [Specify location of the Android SDK. Mandatory when building for Android,
296 or when building the Impress Remote Android app.]),
300 if test -n "$with_android_ndk"; then
301 ANDROID_NDK_HOME=$with_android_ndk
303 # Set up a lot of pre-canned defaults
305 if test ! -f $ANDROID_NDK_HOME/RELEASE.TXT; then
306 AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT file in $ANDROID_NDK_HOME.])
308 ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_HOME/RELEASE.TXT`
310 case $ANDROID_NDK_VERSION in
314 AC_MSG_ERROR([Unsupported NDK version $ANDROID_NDK_VERSION, only r9* and r10* versions are supported])
318 if test $host_cpu = arm; then
320 android_platform_prefix=$android_cpu-linux-androideabi
321 elif test $host_cpu = aarch64; then
323 android_platform_prefix=$android_cpu-linux-android
324 elif test $host_cpu = mips; then
326 android_platform_prefix=$android_cpu-linux-androideabi
328 # host_cpu is something like "i386" or "i686" I guess, NDK uses
329 # "x86" in some contexts
331 android_platform_prefix=$android_cpu
334 case "$with_android_ndk_toolchain_version" in
336 ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-$with_android_ndk_toolchain_version
337 ANDROID_COMPILER_DIR=$ANDROID_BINUTILS_DIR
340 AC_MSG_WARN([Building with the Clang tool-chain is known to break in the bridges module, fix that please])
341 ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.8
342 ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm-${with_android_ndk_toolchain_version#clang}
343 ANDROID_USING_CLANG=true
346 AC_MSG_ERROR([Unrecognized value for the --with-android-ndk-toolchain-version option])
349 if test ! -d $ANDROID_BINUTILS_DIR; then
350 AC_MSG_ERROR([No directory $ANDROID_BINUTILS_DIR])
351 elif test $ANDROID_COMPILER_DIR != $ANDROID_BINUTILS_DIR -a ! -d $ANDROID_COMPILER_DIR; then
352 AC_MSG_ERROR([No directory $ANDROID_COMPILER_DIR])
355 # Check if there is a 64-bit tool-chain. Google provides a NDK with 64-bit tool-chain binaries in
356 # NDK r8e and later, and for earlier NDKs it was possible to build one yourself. Using a 64-bit
357 # linker is required if you compile large parts of the code with -g. A 32-bit linker just won't
358 # manage to link the (app-specific) single huge .so that is built for the apps in
359 # android/experimental/* if there is debug information in a significant part of the object files.
360 # (A 64-bit ld.gold grows to much over 10 gigabytes of virtual space when linking such a .so if
361 # all objects have been built with debug information.)
363 if test $build_os = linux-gnu; then
364 ANDROID_COMPILER_BIN=$ANDROID_COMPILER_DIR/prebuilt/linux-x86/bin
365 ANDROID_BINUTILS_PREBUILT_ROOT=$ANDROID_BINUTILS_DIR/prebuilt/linux-x86
366 if test $build_cpu = x86_64; then
367 if test -d $ANDROID_COMPILER_DIR/prebuilt/linux-x86_64; then
368 ANDROID_COMPILER_BIN=$ANDROID_COMPILER_DIR/prebuilt/linux-x86_64/bin
370 if test -d $ANDROID_BINUTILS_DIR/prebuilt/linux-x86_64; then
371 ANDROID_BINUTILS_PREBUILT_ROOT=$ANDROID_BINUTILS_DIR/prebuilt/linux-x86_64
374 ANDROID_BINUTILS_BIN=$ANDROID_BINUTILS_PREBUILT_ROOT/bin
377 # This stays empty if there is just one version of the toolchain in the NDK
378 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=
379 case "`echo $ANDROID_NDK_HOME/toolchains/$android_cpu*-*/prebuilt/*/bin`" in
381 # Trailing slash intentional and necessary, compare to how this is used
382 if test -n "$ANDROID_USING_CLANG"; then
383 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=4.8/
385 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR="${with_android_ndk_toolchain_version}/"
391 if test $host_cpu = arm; then
392 android_gnu_prefix=arm-linux-androideabi
393 elif test $host_cpu = aarch64; then
394 android_gnu_prefix=aarch64-linux-android
395 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR="${with_android_ndk_toolchain_version}/"
397 elif test $host_cpu = mips; then
398 android_gnu_prefix=mipsel-linux-android
399 elif test $ANDROID_NDK_VERSION = r8; then
400 # The prefix used for the x86 tool-chain changed between NDK r8 and r8b
401 android_gnu_prefix=i686-android-linux
403 android_gnu_prefix=i686-linux-android
406 ANDROID_ARCH=$android_cpu
407 if test $host_cpu = arm; then
408 ANDROID_APP_ABI=armeabi-v7a
409 if test -n "$ANDROID_USING_CLANG"; then
410 ANDROIDCFLAGS="-gcc-toolchain $ANDROID_BINUTILS_PREBUILT_ROOT"
411 ANDROIDCFLAGS="$ANDROIDCFLAGS -target armv7-none-linux-androideabi"
412 ANDROIDCFLAGS="$ANDROIDCFLAGS -no-canonical-prefixes"
416 ANDROIDCFLAGS="$ANDROIDCFLAGS -mthumb"
417 ANDROIDCFLAGS="$ANDROIDCFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
418 ANDROIDCFLAGS="$ANDROIDCFLAGS -Wl,--fix-cortex-a8"
419 elif test $host_cpu = aarch64; then
420 ANDROID_APP_ABI=arm64-v8a
422 elif test $host_cpu = mips; then
427 ANDROIDCFLAGS="-march=atom"
429 ANDROIDCFLAGS="$ANDROIDCFLAGS -ffunction-sections -fdata-sections"
430 ANDROIDCFLAGS="$ANDROIDCFLAGS -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/$ANDROID_APP_ABI"
431 ANDROIDCFLAGS="$ANDROIDCFLAGS --sysroot $ANDROID_NDK_HOME/platforms/android-${ANDROID_API_LEVEL}/arch-${ANDROID_ARCH}"
433 if test -n "$ANDROID_USING_CLANG"; then
434 ANDROIDCFLAGS="$ANDROIDCFLAGS -Qunused-arguments"
436 ANDROIDCFLAGS="$ANDROIDCFLAGS -Wno-psabi"
439 test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-${ANDROID_API_LEVEL}/arch-${ANDROID_ARCH}
440 test -z "$AR" && AR=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-ar
441 test -z "$NM" && NM=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-nm
442 test -z "$OBJDUMP" && OBJDUMP=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-objdump
443 test -z "$RANLIB" && RANLIB=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-ranlib
444 test -z "$STRIP" && STRIP=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-strip
446 # When using the 4.6 or newer toolchain, use the gold linker
447 case "$with_android_ndk_toolchain_version" in
448 4.[[6789]]*|[[56789]].*|clang*)
449 if test "$host_cpu" = arm -a "$ENABLE_LTO" != TRUE; then
450 ANDROIDCFLAGS="$ANDROIDCFLAGS -fuse-ld=gold"
455 if test "$ENABLE_LTO" = TRUE; then
456 # -flto comes from com_GCC_degs.mk, too, but we need to make sure it gets passed as part of
457 # $CC and $CXX when building external libraries
458 ANDROIDCFLAGS="$ANDROIDCFLAGS -flto"
461 # gdbserver can be in different locations
462 if test -f $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver; then
463 ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver
464 elif test -f $ANDROID_NDK_HOME/prebuilt/android-$android_cpu/gdbserver/gdbserver; then
465 ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/prebuilt/android-$android_cpu/gdbserver/gdbserver
466 elif test $android_cpu = aarch64; then
467 ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/prebuilt/android-arm64/gdbserver/gdbserver
469 AC_MSG_ERROR([Can't find gdbserver for your Android target])
472 if test $host_cpu = arm; then
473 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"
474 elif test $host_cpu = mips; then
475 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"
477 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"
480 if test -z "$CC"; then
481 case "$with_android_ndk_toolchain_version" in
483 CC="$ANDROID_COMPILER_BIN/$android_gnu_prefix-gcc $ANDROIDCFLAGS"
486 CC="$ANDROID_COMPILER_BIN/clang $ANDROIDCFLAGS"
489 if test -z "$CXX"; then
490 case "$with_android_ndk_toolchain_version" in
492 CXX="$ANDROID_COMPILER_BIN/$android_gnu_prefix-g++ $ANDROIDCXXFLAGS"
495 CXX="$ANDROID_COMPILER_BIN/clang++ $ANDROIDCXXFLAGS"
500 AC_SUBST(ANDROID_NDK_GDBSERVER)
501 AC_SUBST(ANDROID_APP_ABI)
503 dnl ===================================================================
504 dnl Also --with-android-sdk is mandatory
505 dnl ===================================================================
507 if test -n "$with_android_sdk"; then
508 ANDROID_SDK_HOME=$with_android_sdk
509 PATH="$ANDROID_SDK_HOME/platform-tools:$ANDROID_SDK_HOME/tools:$PATH"
511 AC_SUBST(ANDROID_SDK_HOME)
513 dnl ===================================================================
514 dnl The following is a list of supported systems.
515 dnl Sequential to keep the logic very simple
516 dnl These values may be checked and reset later.
517 dnl ===================================================================
518 #defaults unless the os test overrides this:
526 # Default values, as such probably valid just for Linux, set
527 # differently below just for Mac OSX,but at least better than
528 # hardcoding these as we used to do. Much of this is duplicated also
529 # in solenv for old build system and for gbuild, ideally we should
530 # perhaps define stuff like this only here in configure.ac?
532 LINKFLAGSSHL="-shared"
536 LINKFLAGSNOUNDEFS="-Wl,-z,defs"
545 build_gstreamer_1_0=yes
546 build_gstreamer_0_10=yes
552 dnl ===========================================================
553 dnl Check whether we're using Solaris 10 - SPARC or Intel.
554 dnl ===========================================================
555 AC_MSG_CHECKING([the Solaris operating system release])
556 _os_release=`echo $host_os | $SED -e s/solaris2\.//`
557 if test "$_os_release" -lt "10"; then
558 AC_MSG_ERROR([use Solaris >= 10 to build LibreOffice])
560 AC_MSG_RESULT([ok ($_os_release)])
563 dnl Check whether we're using a SPARC or i386 processor
564 AC_MSG_CHECKING([the processor type])
565 if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then
566 AC_MSG_RESULT([ok ($host_cpu)])
568 AC_MSG_ERROR([only SPARC and i386 processors are supported])
572 linux-gnu*|k*bsd*-gnu*)
574 build_gstreamer_1_0=yes
575 build_gstreamer_0_10=yes
589 cygwin*|interix*|mingw32*)
591 # When building on Windows normally with MSVC under Cygwin,
592 # configure thinks that the host platform (the platform the
593 # built code will run on) is Cygwin, even if it obviously is
594 # Windows, which in Autoconf terminology is called
595 # "mingw32". (Which is misleading as MinGW is the name of the
596 # tool-chain, not an operating system.)
598 # Somewhat confusing, yes. But this configure script doesn't
599 # look at $host etc that much, it mostly uses its own $_os
600 # variable, set here in this case statement.
602 # When cross-compiling to Windows from Unix, the host platform
603 # is "mingw32" (because in that case it is the MinGW
604 # tool-chain that is used).
617 # If the host OS matches "mingw32*", that means we are using the
618 # MinGW cross-compiler, because we don't see the point in building
619 # LibreOffice using MinGW on Windows. If you want to build on
620 # Windows, use MSVC. If you want to use MinGW, surely you want to
621 # cross-compile (from Linux or some other Unix).
626 if test -z "$CC"; then
627 CC="$host_cpu-$host_vendor-$host_os-gcc"
629 if test -z "$CXX"; then
630 CXX="$host_cpu-$host_vendor-$host_os-g++"
636 darwin*) # Mac OS X or iOS
643 if test "$host_cpu" = "arm"; then
649 INSTROOTSUFFIX=/$PRODUCTNAME.app/Contents
650 SDKDIRNAME=AC_PACKAGE_NAME${PRODUCTVERSION}_SDK
653 # See comment above the case "$host_os"
654 LINKFLAGSSHL="-dynamiclib -single_module"
661 # -undefined error is the default
667 build_gstreamer_1_0=yes
668 build_gstreamer_0_10=yes
673 AC_MSG_CHECKING([the FreeBSD operating system release])
674 if test -n "$with_os_version"; then
675 OSVERSION="$with_os_version"
677 OSVERSION=`/sbin/sysctl -n kern.osreldate`
679 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
680 AC_MSG_CHECKING([which thread library to use])
681 if test "$OSVERSION" -lt "500016"; then
682 PTHREAD_CFLAGS="-D_THREAD_SAFE"
683 PTHREAD_LIBS="-pthread"
684 elif test "$OSVERSION" -lt "502102"; then
685 PTHREAD_CFLAGS="-D_THREAD_SAFE"
689 PTHREAD_LIBS="-pthread"
691 AC_MSG_RESULT([$PTHREAD_LIBS])
697 build_gstreamer_1_0=yes
698 build_gstreamer_0_10=yes
703 PTHREAD_LIBS="-pthread -lpthread"
710 PTHREAD_LIBS=-pthread
719 PTHREAD_CFLAGS="-D_THREAD_SAFE"
720 PTHREAD_LIBS="-pthread"
726 build_gstreamer_1_0=yes
727 build_gstreamer_0_10=yes
732 PTHREAD_LIBS="-pthread"
737 build_gstreamer_1_0=no
738 build_gstreamer_0_10=no
739 enable_lotuswordpro=no
740 enable_mpl_subset=yes
743 enable_report_builder=no
757 if test -z "$with_android_ndk"; then
758 AC_MSG_ERROR([the --with-android-ndk option is mandatory])
761 if test -z "$with_android_ndk_toolchain_version"; then
762 AC_MSG_ERROR([the --with-android-ndk-toolchain-version option is mandatory])
765 # Verify that the NDK and SDK options are proper
766 if test ! -f "$ANDROID_NDK_HOME/platforms/android-${ANDROID_API_LEVEL}/arch-${ANDROID_ARCH}/usr/lib/libc.a"; then
767 AC_MSG_ERROR([the --with-android-ndk option does not point to an Android NDK])
770 AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX)
771 BUILD_TYPE="$BUILD_TYPE FONTCONFIG FREETYPE"
775 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
779 if echo "$host_os" | grep -q linux-android ; then
780 if test -z "$with_android_sdk"; then
781 AC_MSG_ERROR([the --with-android-sdk option is mandatory])
784 if test ! -d "$ANDROID_SDK_HOME/platforms"; then
785 AC_MSG_ERROR([the --with-android-sdk option does not point to an Android SDK])
789 if test "$_os" = "AIX"; then
790 AC_PATH_PROG(GAWK, gawk)
791 if test -z "$GAWK"; then
792 AC_MSG_ERROR([gawk not found in \$PATH])
799 AC_SUBST(PTHREAD_CFLAGS)
800 AC_SUBST(PTHREAD_LIBS)
802 ###############################################################################
803 # Extensions switches --enable/--disable
804 ###############################################################################
805 # By default these should be enabled unless having extra dependencies.
806 # If there is extra dependency over configure options then the enable should
807 # be automagic based on whether the requiring feature is enabled or not.
808 # All this options change anything only with --enable-extension-integration.
810 # The name of this option and its help string makes it sound as if
811 # extensions are built anyway, just not integrated in the installer,
812 # if you use --disable-extension-integration. Is that really the
815 AC_ARG_ENABLE(extension-integration,
816 AS_HELP_STRING([--disable-extension-integration],
817 [Disable integration of the built extensions in the installer of the
818 product. Use this switch to disable the integration.])
821 AC_ARG_ENABLE(export,
822 AS_HELP_STRING([--disable-export],
823 [Disable (some) code for document export. Useful when building viewer-only apps that lack
824 save/export functionality, to avoid having an excessive amount of code and data used
825 only for exporrt linked in. Work in progress, use only if you are hacking on it.])
828 AC_ARG_ENABLE(avmedia,
829 AS_HELP_STRING([--disable-avmedia],
830 [Disable displaying and inserting AV media in documents. Work in progress, use only if you are hacking on it.])
833 AC_ARG_ENABLE(database-connectivity,
834 AS_HELP_STRING([--disable-database-connectivity],
835 [Disable various database connectivity. Work in progress, use only if you are hacking on it.])
838 # This doesn't mean not building (or "integrating") extensions
839 # (although it probably should; i.e. it should imply
840 # --disable-extension-integration I guess), it means not supporting
841 # any extension mechanism at all
842 AC_ARG_ENABLE(extensions,
843 AS_HELP_STRING([--disable-extensions],
844 [Disable all add-on extension functionality. Work in progress, use only if you are hacking on it.])
847 AC_ARG_ENABLE(scripting,
848 AS_HELP_STRING([--disable-scripting],
849 [Disable BASIC, Java and Python. Work in progress, use only if you are hacking on it.])
852 # This is mainly for Android and iOS, but could potentially be used in some
853 # special case otherwise, too, so factored out as a separate setting
855 AC_ARG_ENABLE(dynamic-loading,
856 AS_HELP_STRING([--disable-dynamic-loading],
857 [Disable any use of dynamic loading of code. Work in progress, use only if you are hacking on it.])
860 AC_ARG_ENABLE(ext-mariadb-connector,
861 AS_HELP_STRING([--enable-ext-mariadb-connector],
862 [Enable the build of the MariaDB/MySQL Connector extension.])
865 AC_ARG_ENABLE(report-builder,
866 AS_HELP_STRING([--disable-report-builder],
867 [Disable the Report Builder.])
870 AC_ARG_ENABLE(ext-wiki-publisher,
871 AS_HELP_STRING([--enable-ext-wiki-publisher],
872 [Enable the Wiki Publisher extension.])
875 AC_ARG_ENABLE(lpsolve,
876 AS_HELP_STRING([--disable-lpsolve],
877 [Disable compilation of the lp solve solver ])
879 AC_ARG_ENABLE(coinmp,
880 AS_HELP_STRING([--disable-coinmp],
881 [Disable compilation of the CoinMP solver ])
884 AC_ARG_ENABLE(pdfimport,
885 AS_HELP_STRING([--disable-pdfimport],
886 [Disable building the PDF import feature.])
889 ###############################################################################
891 dnl ---------- *** ----------
893 AC_ARG_ENABLE([hardlink-deliver],
894 AS_HELP_STRING([--enable-hardlink-deliver],
895 [Put files into deliver folder as hardlinks instead of copying them
896 over. Saves space and speeds up build.])
899 AC_ARG_ENABLE(mergelibs,
900 AS_HELP_STRING([--enable-mergelibs=<all/yes>],
901 [Enables linking of big, merged, library. Experimental feature, tested
902 only for Linux at some stage in history, but possibly does not work even
903 for Linux any more. 'all' will link a lot of libraries into libmerged
904 while 'yes' will do it for just a core set of libraries.])
907 AC_ARG_ENABLE(graphite,
908 AS_HELP_STRING([--enable-graphite],
909 [Enables the compilation of Graphite smart font rendering.])
913 AS_HELP_STRING([--enable-orcus],
914 [Enables orcus for extra file import filters for Calc.])
917 AC_ARG_ENABLE(fetch-external,
918 AS_HELP_STRING([--disable-fetch-external],
919 [Disables fetching external tarballs from web sources.])
922 AC_ARG_ENABLE(lockdown,
923 AS_HELP_STRING([--disable-lockdown],
924 [Disables the gconf integration work in LibreOffice.]),
928 AS_HELP_STRING([--enable-pch],
929 [Enables precompiled header support for C++.])
932 AC_ARG_ENABLE(win-mozab-driver,
933 AS_HELP_STRING([--enable-win-mozab-driver],
934 [LibreOffice includes a driver to connect to Mozilla
935 address books under Windows, to build with this version, use this option.])
939 AS_HELP_STRING([--enable-epm],
940 [LibreOffice includes self-packaging code, that requires epm, however epm is
941 useless for large scale package building.])
945 AS_HELP_STRING([--disable-odk],
946 [LibreOffice includes an ODK, office development kit which some packagers may
947 wish to build without.])
950 AC_ARG_ENABLE(mpl-subset,
951 AS_HELP_STRING([--enable-mpl-subset],
952 [Don't compile any pieces which are not MPL or more liberally licensed])
955 AC_ARG_ENABLE(evolution2,
956 AS_HELP_STRING([--enable-evolution2],
957 [Allows the built-in evolution 2 addressbook connectivity build to be
961 AC_ARG_ENABLE(directx,
962 AS_HELP_STRING([--disable-directx],
963 [Remove DirectX implementation for the new XCanvas interface.
964 The DirectX support requires more stuff installed on Windows to
965 compile. (DirectX SDK, GDI+ libs)])
968 AC_ARG_ENABLE(activex,
969 AS_HELP_STRING([--disable-activex],
970 [Disable the use of ActiveX for a Windows build.
971 This switch is mandatory when using an Express edition of Visual Studio.])
975 AS_HELP_STRING([--disable-atl],
976 [Disable the use of ATL for a Windows build.])
978 This switch is mandatory when using an Express edition of Visual Studio.
983 AS_HELP_STRING([--enable-avahi],
984 [Determines whether to use Avahi to advertise Impress to remote controls.]),
987 AC_ARG_ENABLE(werror,
988 AS_HELP_STRING([--enable-werror],
989 [Turn warnings to errors. (Has no effect in modules where the treating
990 of warnings as errors is disabled explicitly.)]),
993 AC_ARG_ENABLE(assert-always-abort,
994 AS_HELP_STRING([--enable-assert-always-abort],
995 [make assert() abort even in release code.]),
998 AC_ARG_ENABLE(dbgutil,
999 AS_HELP_STRING([--enable-dbgutil],
1000 [Provide debugging support from --enable-debug and include additional debugging
1001 utilities such as object counting or more expensive checks.
1002 This is the recommended option for developers.
1003 Note that this makes the build ABI incompatible, it is not possible to mix object
1004 files or libraries from a --enable-dbgutil and a --disable-dbgutil build.]))
1006 AC_ARG_ENABLE(debug,
1007 AS_HELP_STRING([--enable-debug],
1008 [Include debugging information, disable compiler optimization and inlining plus
1009 extra debugging code like assertions. Extra large build! (enables -g compiler flag).]))
1011 AC_ARG_ENABLE(sal-log,
1012 AS_HELP_STRING([--enable-sal-log],
1013 [Make SAL_INFO and SAL_WARN calls do something even in a non-debug build.]))
1015 AC_ARG_ENABLE(selective-debuginfo,
1016 AS_HELP_STRING([--enable-selective-debuginfo],
1017 [If --enable-debug or --enable-dbgutil is used, build debugging information
1018 (-g compiler flag) only for the specified gbuild build targets
1019 (where all means everything, - prepended means not to enable, / appended means
1020 everything in the directory; there is no ordering, more specific overrides
1021 more general, and disabling takes precedence).
1022 Example: --enable-selective-debuginfo="all -sw/ -Library_sc".]))
1024 AC_ARG_ENABLE(symbols,
1025 AS_HELP_STRING([--enable-symbols],
1026 [Include debugging symbols in output while preserve optimization.
1027 This enables -g compiler flag for GCC or equivalent,
1028 without changing anything else compared to productive code.]))
1030 AC_ARG_ENABLE(runtime-optimizations,
1031 AS_HELP_STRING([--disable-runtime-optimizations],
1032 [Statically disable certain runtime optimizations (like rtl/alloc.h or
1033 JVM JIT) that are known to interact badly with certain dynamic analysis
1034 tools (like -fsanitize=address or Valgrind). By default, disabled iff
1035 CC contains "-fsanitize=*". (For Valgrind, those runtime optimizations
1036 are typcially disabled dynamically via RUNNING_ON_VALGRIND.)]))
1038 AC_ARG_ENABLE(compiler-plugins,
1039 AS_HELP_STRING([--enable-compiler-plugins],
1040 [Enable compiler plugins that will perform additional checks during
1041 building. Enabled automatically by --enable-dbgutil.]))
1043 AC_ARG_ENABLE(ooenv,
1044 AS_HELP_STRING([--disable-ooenv],
1045 [Disable ooenv for the instdir installation.]))
1048 AS_HELP_STRING([--enable-lto],
1049 [Enable link-time optimization. Suitable for (optimised) product builds. Building might take
1050 longer but libraries and executables are optimized for speed. (For GCC, best to use GCC 4.6
1051 or later and 'gold' linker. Works fine (and is turned on automatically in an optimising
1052 build) for MSVC, otherwise experimental work in progress that shouldn't be used unless you
1053 are working on it.)]))
1055 AC_ARG_ENABLE(crashdump,
1056 AS_HELP_STRING([--enable-crashdump],
1057 [Enable the crashdump feature.]))
1059 AC_ARG_ENABLE(python,
1060 AS_HELP_STRING([--enable-python=<no/auto/system/internal/fully-internal>],
1061 [Enables or disables Python support at run-time and build-time.
1062 Also specifies what Python to use. 'auto' is the default.
1063 'fully-internal' even forces the internal version for uses of Python
1064 during the build.]))
1067 AS_HELP_STRING([--disable-gtk],
1068 [Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available.]),
1072 AS_HELP_STRING([--enable-gtk3],
1073 [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.
1074 This is experimental and may not work.]),
1077 AC_ARG_ENABLE(systray,
1078 AS_HELP_STRING([--disable-systray],
1079 [Determines whether to build the systray quickstarter.]),
1080 ,enable_systray=yes)
1082 AC_ARG_ENABLE(split-app-modules,
1083 AS_HELP_STRING([--enable-split-app-modules],
1084 [Split file lists for app modules, e.g. base, calc.
1085 Has effect only with make distro-pack-install]),
1088 AC_ARG_ENABLE(split-opt-features,
1089 AS_HELP_STRING([--enable-split-opt-features],
1090 [Split file lists for some optional features, .e.g. pyuno, testtool.
1091 Has effect only with make distro-pack-install]),
1094 AC_ARG_ENABLE(cairo-canvas,
1095 [ --disable-cairo-canvas Determines whether to build the Cairo canvas on
1096 platforms where Cairo is available.
1100 AS_HELP_STRING([--disable-dbus],
1101 [Determines whether to enable features that depend on dbus.
1102 e.g. Presentation mode screensaver control, bluetooth presentation control]),
1105 AC_ARG_ENABLE(packagekit,
1106 AS_HELP_STRING([--enable-packagekit],
1107 [Determines whether to enable features using packagekit.
1108 Right now that is auto font install]),
1111 AC_ARG_ENABLE(sdremote,
1112 AS_HELP_STRING([--disable-sdremote],
1113 [Determines whether to enable Impress remote control (i.e. the server component).]),
1114 ,enable_sdremote=yes)
1116 AC_ARG_ENABLE(sdremote-bluetooth,
1117 AS_HELP_STRING([--disable-sdremote-bluetooth],
1118 [Determines whether to build sdremote with bluetooth support.
1119 Requires dbus on Linux.]))
1121 AC_ARG_ENABLE(gconf,
1122 AS_HELP_STRING([--disable-gconf],
1123 [Determines whether to use the GConf support.]),
1126 AC_ARG_ENABLE(gnome-vfs,
1127 AS_HELP_STRING([--enable-gnome-vfs],
1128 [Determines whether to use the Gnome Virtual Filing System on platforms
1129 where that VFS is available.]),
1130 ,enable_gnome_vfs=no)
1133 AS_HELP_STRING([--disable-gio],
1134 [Determines whether to use the GIO support.]),
1137 AC_ARG_ENABLE(telepathy,
1138 AS_HELP_STRING([--enable-telepathy],
1139 [Determines whether to enable Telepathy for collaboration.]),
1140 ,enable_telepathy=no)
1143 AS_HELP_STRING([--enable-tde],
1144 [Determines whether to use TQt/TDE vclplug on platforms where TQt and
1145 TDE are available.]),
1148 AC_ARG_ENABLE(tdeab,
1149 AS_HELP_STRING([--disable-tdeab],
1150 [Disable the TDE address book support.]),
1152 if test "$enable_tde" = "yes"; then
1158 AS_HELP_STRING([--enable-kde],
1159 [Determines whether to use Qt3/KDE3 vclplug on platforms where Qt3 and
1160 KDE3 are available.]),
1163 AC_ARG_ENABLE(kdeab,
1164 AS_HELP_STRING([--disable-kdeab],
1165 [Disable the KDE3 address book support.]),
1167 if test "$enable_kde" = "yes"; then
1173 AS_HELP_STRING([--enable-kde4],
1174 [Determines whether to use Qt4/KDE4 vclplug on platforms where Qt4 and
1175 KDE4 are available. May be used with --enable-kde if you want to support
1176 both KDE3 and KDE4.]),
1179 AC_ARG_ENABLE(randr,
1180 AS_HELP_STRING([--disable-randr],
1181 [Disable RandR support in the vcl project.]),
1184 AC_ARG_ENABLE(randr-link,
1185 AS_HELP_STRING([--disable-randr-link],
1186 [Disable linking with libXrandr, instead dynamically open it at runtime.]),
1187 ,enable_randr_link=yes)
1189 AC_ARG_ENABLE(gstreamer-1-0,
1190 AS_HELP_STRING([--disable-gstreamer-1-0],
1191 [Disable building with the new gstreamer 1.0 avmedia backend.]),
1192 ,enable_gstreamer_1_0=yes)
1194 AC_ARG_ENABLE(gstreamer-0-10,
1195 AS_HELP_STRING([--enable-gstreamer-0-10],
1196 [Enable building with the gstreamer 0.10 avmedia backend.]),
1197 ,enable_gstreamer_0_10=no)
1200 AS_HELP_STRING([--enable-vlc],
1201 [Enable building with the VLC avmedia backend.]),
1205 AS_HELP_STRING([--disable-neon],
1206 [Disable neon and the compilation of webdav binding.]),
1209 AC_ARG_ENABLE([eot],
1210 [AS_HELP_STRING([--enable-eot],
1211 [Enable support for Embedded OpenType fonts.])],
1214 AC_ARG_ENABLE(cve-tests,
1215 AS_HELP_STRING([--disable-cve-tests],
1216 [Prevent CVE tests to be executed]),
1219 AC_ARG_ENABLE(chart-tests,
1220 AS_HELP_STRING([--enable-chart-tests],
1221 [Executes chart XShape tests. In a perfect world these tests would be
1222 stable and everyone could run them, in reality it is best to run them
1223 only on a few machines that are known to work and maintained by people
1224 who can judge if a test failure is a regression or not.]),
1227 AC_ARG_ENABLE(build-unowinreg,
1228 AS_HELP_STRING([--enable-build-unowinreg],
1229 [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
1230 compiler is needed on Linux.])
1232 Usage: --enable-build-unowinreg
1236 AC_ARG_ENABLE(verbose,
1237 AS_HELP_STRING([--enable-verbose],
1238 [Increase build verbosity.])[
1239 --disable-verbose Decrease build verbosity.],
1242 AC_ARG_ENABLE(dependency-tracking,
1243 AS_HELP_STRING([--enable-dependency-tracking],
1244 [Do not reject slow dependency extractors.])[
1245 --disable-dependency-tracking
1246 Disables generation of dependency information.
1247 Speed up one-time builds.],
1250 AC_ARG_ENABLE(icecream,
1251 AS_HELP_STRING([--enable-icecream],
1252 [Use the 'icecream' distributed compiling tool to speedup the compilation.
1253 It defaults to /opt/icecream for the location of the icecream gcc/g++
1254 wrappers, you can override that using --with-gcc-home=/the/path switch.]),
1258 AS_HELP_STRING([--disable-cups],
1259 [Do not build cups support.])
1262 AC_ARG_ENABLE(ccache,
1263 AS_HELP_STRING([--disable-ccache],
1264 [Do not try to use ccache automatically.
1265 By default, we will try to detect if ccache is available; in that case if
1266 CC/CXX are not yet set, and --enable-icecream is not given, we
1267 attempt to use ccache. --disable-ccache disables ccache completely.
1271 AC_ARG_ENABLE(64-bit,
1272 AS_HELP_STRING([--enable-64-bit],
1273 [Build a 64-bit LibreOffice on platforms where the normal build is 32-bit.
1274 At the moment meaningful only for iOS and Windows. On Windows this option is
1275 experimental and possibly quite broken, and you should use it only if you are
1276 hacking on 64-bitness support.]), ,)
1278 AC_ARG_ENABLE(extra-gallery,
1279 AS_HELP_STRING([--enable-extra-gallery],
1280 [Add extra gallery content.]),
1283 AC_ARG_ENABLE(extra-template,
1284 AS_HELP_STRING([--enable-extra-template],
1285 [Add extra template content.]),
1288 AC_ARG_ENABLE(extra-sample,
1289 AS_HELP_STRING([--enable-extra-sample],
1290 [Add extra sample content.]),
1293 AC_ARG_ENABLE(extra-font,
1294 AS_HELP_STRING([--enable-extra-font],
1295 [Add extra font content.]),
1298 AC_ARG_ENABLE(online-update,
1299 AS_HELP_STRING([--enable-online-update],
1300 [Enable the online update service that will check for new versions of
1301 LibreOffice. By default, it is enabled on Windows and Mac, disabled on Linux.]),
1304 AC_ARG_ENABLE(release-build,
1305 AS_HELP_STRING([--enable-release-build],
1306 [Enable release build.
1307 See http://wiki.documentfoundation.org/DevBuild]),
1310 AC_ARG_ENABLE(windows-build-signing,
1311 AS_HELP_STRING([--enable-windows-build-signing],
1312 [Enable signing of windows binaries (*.exe, *.dll)]),
1315 AC_ARG_ENABLE(silent-msi,
1316 AS_HELP_STRING([--enable-silent-msi],
1317 [Enable MSI with LIMITUI=1 (silent install).]),
1320 AC_ARG_ENABLE(macosx-retina,
1321 AS_HELP_STRING([--enable-macosx-retina],
1322 [deprecated... enabled by default now. Kept for backward compat only.
1326 AC_ARG_ENABLE(macosx-code-signing,
1327 AS_HELP_STRING([--enable-macosx-code-signing=<identity>],
1328 [Sign executables, dylibs, frameworks and the app bundle. If you
1329 don't provide an identity the first suitable certificate
1330 in your keychain is used.]),
1333 AC_ARG_ENABLE(macosx-package-signing,
1334 AS_HELP_STRING([--enable-macosx-package-signing=<identity>],
1335 [Create a .pkg suitable for uploading to the Mac App Store and sign
1336 it. If you don't provide an identity the first suitable certificate
1337 in your keychain is used.]),
1340 AC_ARG_ENABLE(macosx-sandbox,
1341 AS_HELP_STRING([--enable-macosx-sandbox],
1342 [Make the app bundle run in a sandbox. Requires code signing.
1343 Is required by apps distributed in the Mac App Store, and implies
1344 adherence to App Store rules.]),
1347 AC_ARG_WITH(macosx-bundle-identifier,
1348 AS_HELP_STRING([--with-macosx-bundle-identifier=tld.mumble.orifice.TheOffice],
1349 [Define the OS X bundle identifier. Default is the somewhat weird
1350 org.libreoffice.script ("script", huh?).]),
1351 ,with_macosx_bundle_identifier=org.libreoffice.script)
1353 AC_ARG_WITH(macosx-app-name,
1354 AS_HELP_STRING([--with-macosx-app-name='My Own Office Suite'],
1355 [Define the OS X app name. Default is AC_PACKAGE_NAME.]),
1356 ,with_macosx_app_name=$PRODUCTNAME)
1358 AC_ARG_ENABLE(ios-simulator,
1359 AS_HELP_STRING([--enable-ios-simulator],
1360 [Build for the iOS Simulator, not iOS device.]),
1363 AC_ARG_ENABLE(readonly-installset,
1364 AS_HELP_STRING([--enable-readonly-installset],
1365 [Prevents any attempts by LibreOffice to write into its installation. That means
1366 at least that no "system-wide" extensions can be added. Experimental work in
1370 AC_ARG_ENABLE(postgresql-sdbc,
1371 AS_HELP_STRING([--disable-postgresql-sdbc],
1372 [Disable the build of the PostgreSQL-SDBC driver.])
1375 AC_ARG_ENABLE(lotuswordpro,
1376 AS_HELP_STRING([--disable-lotuswordpro],
1377 [Disable the build of the Lotus Word Pro filter.]),
1378 ,enable_lotuswordpro=yes)
1380 AC_ARG_ENABLE(firebird-sdbc,
1381 AS_HELP_STRING([--disable-firebird-sdbc],
1382 [Disable the build of the Firebird-SDBC driver if it doesn't compile for you.]),
1383 ,enable_firebird_sdbc=yes)
1385 AC_ARG_ENABLE(winegcc,
1386 AS_HELP_STRING([--enable-winegcc],
1387 [Enable use of winegcc during the build, in order to create msi* tools
1388 needed for MinGW cross-compilation.]),
1391 AC_ARG_ENABLE(liblangtag,
1392 AS_HELP_STRING([--disable-liblangtag],
1393 [Disable use of liblangtag, and instead use an own simple
1397 AC_ARG_ENABLE(bogus-pkg-config,
1398 AS_HELP_STRING([--enable-bogus-pkg-config],
1399 [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.]),
1402 AC_ARG_ENABLE(openssl,
1403 AS_HELP_STRING([--disable-openssl],
1404 [Disable using libssl/libcrypto from OpenSSL. If disabled,
1405 components will either use GNUTLS or NSS. Work in progress,
1406 use only if you are hacking on it.]),
1407 ,enable_openssl=yes)
1409 AC_ARG_ENABLE(library-bin-tar,
1410 AS_HELP_STRING([--enable-library-bin-tar],
1411 [Enable the building and reused of tarball of binary build for some 'external' libraries
1412 Some libraries can save their build result in a tarball
1413 stored in TARFILE_LOCATION. that binary tarball is
1414 uniquely identified by the source tarbal,
1415 the content of the config_host.mk file and the content
1416 of the top-level directory in core for that library
1417 If this option is enabled, then if such a tarfile exist, it will be untarred
1418 instead of the source tarfile, and the build step will be skipped for that
1420 If a proper tarfile does not exist, then the normal source-based
1421 build is done for that library and a proper binary tarfile is created
1422 for the next time.]),
1426 AS_HELP_STRING([--disable-gltf],
1427 [Determines whether to build libraries related to glTF 3D model rendering.]))
1429 AC_ARG_ENABLE(collada,
1430 AS_HELP_STRING([--disable-collada],
1431 [Disable collada support (Rendering 3D models stored in *.dae and *.kmz format).]))
1433 dnl ===================================================================
1434 dnl Optional Packages (--with/without-)
1435 dnl ===================================================================
1437 AC_ARG_WITH(gnu-patch,
1438 AS_HELP_STRING([--with-gnu-patch],
1439 [Specify location of GNU patch on Solaris or FreeBSD.]),
1442 AC_ARG_WITH(build-platform-configure-options,
1443 AS_HELP_STRING([--with-build-platform-configure-options],
1444 [Specify options for the configure script run for the *build* platform in a cross-compilation]),
1448 AS_HELP_STRING([--with-gnu-cp],
1449 [Specify location of GNU cp on Solaris or FreeBSD.]),
1452 AC_ARG_WITH(external-tar,
1453 AS_HELP_STRING([--with-external-tar=<TARFILE_PATH>],
1454 [Specify an absolute path of where to find (and store) tarfiles.]),
1455 TARFILE_LOCATION=$withval ,
1458 AC_ARG_WITH(referenced-git,
1459 AS_HELP_STRING([--with-referenced-git=<OTHER_CHECKOUT_DIR>],
1460 [Specify another checkout directory to reference. This makes use of
1461 git submodule update --reference, and saves a lot of diskspace
1462 when having multiple trees side-by-side.]),
1463 GIT_REFERENCE_SRC=$withval ,
1466 AC_ARG_WITH(linked-git,
1467 AS_HELP_STRING([--with-linked-git=<submodules repo basedir>],
1468 [Specify a directory where the repositories of submodules are located.
1469 This uses a method similar to git-new-workdir to get submodules.]),
1470 GIT_LINK_SRC=$withval ,
1473 AC_ARG_WITH(galleries,
1474 AS_HELP_STRING([--with-galleries],
1475 [Specify how galleries should be built. It is possible either to
1476 build these internally from source ("build"),
1477 or to disable them ("no")]),
1481 AS_HELP_STRING([--with-theme="theme1 theme2..."],
1482 [Choose which themes to include. By default those themes with an '*' are included.
1483 Possible choices: *crystal, *galaxy, *hicontrast, human, industrial, *oxygen, *sifr, *tango, *tango_testing.]),
1486 AC_ARG_WITH(helppack-integration,
1488 --without-helppack-integration It will not integrate the helppacks to the installer
1490 Please use this switch to use the online help or separate help packages.],
1494 AS_HELP_STRING([--without-fonts],
1495 [LibreOffice includes some third-party fonts to provide a reliable basis for
1496 help content, templates, samples, etc. When these fonts are already
1497 known to be available on the system then you should use this option.]),
1501 AS_HELP_STRING([--with-epm],
1502 [Decides which epm to use. Default is to use the one from the system if
1503 one is built. When either this is not there or you say =internal epm
1507 AC_ARG_WITH(package-format,
1508 AS_HELP_STRING([--with-package-format],
1509 [Specify package format(s) for LibreOffice installation sets. The
1510 implicit --without-package-format leads to no installation sets being
1511 generated. Possible values: aix, archive, bsd, deb, dmg,
1512 installed, msi, pkg, and rpm.
1513 Example: --with-package-format='deb rpm']),
1517 AS_HELP_STRING([--with-tls],
1518 [Decides which TLS/SSL and cryptographic implementations to use for
1519 LibreOffice's code. Notice that this doesn't apply for depending
1520 libraries like "neon", for example. Default is to use OpenSSL
1521 although NSS is also possible. Notice that selecting NSS restricts
1522 the usage of OpenSSL in LO's code but selecting OpenSSL doesn't
1523 restrict by now the usage of NSS in LO's code. Possible values:
1524 openssl, nss. Example: --with-tls="nss"]),
1527 AC_ARG_WITH(system-libs,
1528 AS_HELP_STRING([--with-system-libs],
1529 [Use libraries already on system -- enables all --with-system-* flags.]),
1532 AC_ARG_WITH(system-headers,
1533 AS_HELP_STRING([--with-system-headers],
1534 [Use headers already on system -- enables all --with-system-* flags for
1535 external packages whose headers are the only entities used i.e.
1536 boost/vigra/odbc/sane-header(s).]),,
1537 [with_system_headers="$with_system_libs"])
1539 AC_ARG_WITH(system-jars,
1540 AS_HELP_STRING([--without-system-jars],
1541 [When building with --with-system-libs, also the needed jars are expected
1542 on the system. Use this to disable that]),,
1543 [with_system_jars="$with_system_libs"])
1545 AC_ARG_WITH(system-cairo,
1546 AS_HELP_STRING([--with-system-cairo],
1547 [Use cairo libraries already on system. Happens automatically for
1548 (implicit) --enable-gtk and for --enable-gtk3.]))
1550 AC_ARG_WITH(myspell-dicts,
1551 AS_HELP_STRING([--with-myspell-dicts],
1552 [Adds myspell dictionaries to the LibreOffice installation set]),
1555 AC_ARG_WITH(system-dicts,
1556 AS_HELP_STRING([--without-system-dicts],
1557 [Do not use dictionaries from system paths.]),
1560 AC_ARG_WITH(external-dict-dir,
1561 AS_HELP_STRING([--with-external-dict-dir],
1562 [Specify external dictionary dir.]),
1565 AC_ARG_WITH(external-hyph-dir,
1566 AS_HELP_STRING([--with-external-hyph-dir],
1567 [Specify external hyphenation pattern dir.]),
1570 AC_ARG_WITH(external-thes-dir,
1571 AS_HELP_STRING([--with-external-thes-dir],
1572 [Specify external thesaurus dir.]),
1575 AC_ARG_WITH(system-zlib,
1576 AS_HELP_STRING([--with-system-zlib],
1577 [Use zlib already on system.]),,
1578 [with_system_zlib=auto])
1580 AC_ARG_WITH(system-jpeg,
1581 AS_HELP_STRING([--with-system-jpeg],
1582 [Use jpeg already on system.]),,
1583 [with_system_jpeg="$with_system_libs"])
1585 AC_ARG_WITH(system-libgltf,
1586 AS_HELP_STRING([--with-system-libgltf],
1587 [Use libgltf already on system.]),,
1588 [with_system_libgltf="$with_system_libs"])
1590 AC_ARG_WITH(system-clucene,
1591 AS_HELP_STRING([--with-system-clucene],
1592 [Use clucene already on system.]),,
1593 [with_system_clucene="$with_system_libs"])
1595 AC_ARG_WITH(system-expat,
1596 AS_HELP_STRING([--with-system-expat],
1597 [Use expat already on system.]),,
1598 [with_system_expat="$with_system_libs"])
1600 AC_ARG_WITH(system-libxml,
1601 AS_HELP_STRING([--with-system-libxml],
1602 [Use libxml/libxslt already on system.]),,
1603 [with_system_libxml=auto])
1605 AC_ARG_WITH(system-icu,
1606 AS_HELP_STRING([--with-system-icu],
1607 [Use icu already on system.]),,
1608 [with_system_icu="$with_system_libs"])
1610 AC_ARG_WITH(system-ucpp,
1611 AS_HELP_STRING([--with-system-ucpp],
1612 [Use ucpp already on system.]),,
1615 AC_ARG_WITH(system-opencollada,
1616 AS_HELP_STRING([--with-system-opencollada],
1617 [Use openCOLLADA already on system.]),,
1618 [with_system_opencollada=no])
1620 AC_ARG_WITH(system-openldap,
1621 AS_HELP_STRING([--with-system-openldap],
1622 [Use the OpenLDAP LDAP SDK already on system.]),,
1623 [with_system_openldap="$with_system_libs"])
1625 AC_ARG_WITH(system-poppler,
1626 AS_HELP_STRING([--with-system-poppler],
1627 [Use system poppler (only needed for PDF import).]),,
1628 [with_system_poppler="$with_system_libs"])
1630 AC_ARG_WITH(system-apache-commons,
1631 AS_HELP_STRING([--with-system-apache-commons],
1632 [Use Apache commons libraries already on system.]),,
1633 [with_system_apache_commons="$with_system_jars"])
1635 AC_ARG_WITH(system-mariadb,
1636 AS_HELP_STRING([--with-system-mariadb],
1637 [Use MariaDB/MySQL libraries already on system, for building the MariaDB Connector/LibreOffice
1639 [with_system_mariadb="$with_system_libs"])
1641 AC_ARG_ENABLE(bundle-mariadb,
1642 AS_HELP_STRING([--enable-bundle-mariadb],
1643 [When using MariaDB/MySQL libraries already on system, bundle them with the MariaDB Connector/LibreOffice extension.])
1646 AC_ARG_WITH(system-mysql-cppconn,
1647 AS_HELP_STRING([--with-system-mysql-cppconn],
1648 [Use MySQL C++ Connector libraries already on system.]),,
1649 [with_system_mysql_cppconn="$with_system_libs"])
1651 AC_ARG_WITH(system-postgresql,
1652 AS_HELP_STRING([--with-system-postgresql],
1653 [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC
1654 driver. If pg_config is not in PATH, use PGCONFIG to point to it.]),,
1655 [with_system_postgresql="$with_system_libs"])
1657 AC_ARG_WITH(libpq-path,
1658 AS_HELP_STRING([--with-libpq-path],
1659 [Use this PostgreSQL C interface (libpq) installation for building
1660 the PostgreSQL-SDBC extension.])
1662 Usage: --with-libpq-path=<absolute path to
1663 your libpq installation>
1667 AC_ARG_WITH(system-firebird,
1668 AS_HELP_STRING([--with-system-firebird],
1669 [Use Firebird libraries already on system, for building the Firebird-SDBC
1670 driver. If fb_config is not in PATH, use FBCONFIG to point to it.]),,
1671 [with_system_firebird="$with_system_libs"])
1673 AC_ARG_WITH(system-hsqldb,
1674 AS_HELP_STRING([--with-system-hsqldb],
1675 [Use hsqldb already on system.]))
1677 AC_ARG_WITH(hsqldb-jar,
1678 AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
1679 [Specify path to jarfile manually.]),
1680 HSQLDB_JAR=$withval)
1682 AC_ARG_ENABLE(scripting-beanshell,
1683 AS_HELP_STRING([--disable-scripting-beanshell],
1684 [Disable support for scripts in BeanShell.]),
1688 AC_ARG_WITH(system-beanshell,
1689 AS_HELP_STRING([--with-system-beanshell],
1690 [Use beanshell already on system.]),,
1691 [with_system_beanshell="$with_system_jars"])
1693 AC_ARG_WITH(beanshell-jar,
1694 AS_HELP_STRING([--with-beanshell-jar=JARFILE],
1695 [Specify path to jarfile manually.]),
1698 AC_ARG_ENABLE(scripting-javascript,
1699 AS_HELP_STRING([--disable-scripting-javascript],
1700 [Disable support for scripts in JavaScript.]),
1704 AC_ARG_WITH(system-rhino,
1705 AS_HELP_STRING([--with-system-rhino],
1706 [Use rhino already on system.]),,)
1707 # [with_system_rhino="$with_system_jars"])
1708 # Above is not used as we have different debug interface
1709 # patched into internal rhino. This code needs to be fixed
1710 # before we can enable it by default.
1712 AC_ARG_WITH(rhino-jar,
1713 AS_HELP_STRING([--with-rhino-jar=JARFILE],
1714 [Specify path to jarfile manually.]),
1717 AC_ARG_WITH(commons-codec-jar,
1718 AS_HELP_STRING([--with-commons-codec-jar=JARFILE],
1719 [Specify path to jarfile manually.]),
1720 COMMONS_CODEC_JAR=$withval)
1722 AC_ARG_WITH(commons-lang-jar,
1723 AS_HELP_STRING([--with-commons-lang-jar=JARFILE],
1724 [Specify path to jarfile manually.]),
1725 COMMONS_LANG_JAR=$withval)
1727 AC_ARG_WITH(commons-httpclient-jar,
1728 AS_HELP_STRING([--with-commons-httpclient-jar=JARFILE],
1729 [Specify path to jarfile manually.]),
1730 COMMONS_HTTPCLIENT_JAR=$withval)
1732 AC_ARG_WITH(commons-logging-jar,
1733 AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
1734 [Specify path to jarfile manually.]),
1735 COMMONS_LOGGING_JAR=$withval)
1737 AC_ARG_WITH(system-jfreereport,
1738 AS_HELP_STRING([--with-system-jfreereport],
1739 [Use JFreeReport already on system.]),,
1740 [with_system_jfreereport="$with_system_jars"])
1742 AC_ARG_WITH(sac-jar,
1743 AS_HELP_STRING([--with-sac-jar=JARFILE],
1744 [Specify path to jarfile manually.]),
1747 AC_ARG_WITH(libxml-jar,
1748 AS_HELP_STRING([--with-libxml-jar=JARFILE],
1749 [Specify path to jarfile manually.]),
1750 LIBXML_JAR=$withval)
1752 AC_ARG_WITH(flute-jar,
1753 AS_HELP_STRING([--with-flute-jar=JARFILE],
1754 [Specify path to jarfile manually.]),
1757 AC_ARG_WITH(jfreereport-jar,
1758 AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
1759 [Specify path to jarfile manually.]),
1760 JFREEREPORT_JAR=$withval)
1762 AC_ARG_WITH(liblayout-jar,
1763 AS_HELP_STRING([--with-liblayout-jar=JARFILE],
1764 [Specify path to jarfile manually.]),
1765 LIBLAYOUT_JAR=$withval)
1767 AC_ARG_WITH(libloader-jar,
1768 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1769 [Specify path to jarfile manually.]),
1770 LIBLOADER_JAR=$withval)
1772 AC_ARG_WITH(libloader-jar,
1773 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1774 [Specify path to jarfile manually.]),
1775 LIBLOADER_JAR=$withval)
1777 AC_ARG_WITH(libformula-jar,
1778 AS_HELP_STRING([--with-libformula-jar=JARFILE],
1779 [Specify path to jarfile manually.]),
1780 LIBFORMULA_JAR=$withval)
1782 AC_ARG_WITH(librepository-jar,
1783 AS_HELP_STRING([--with-librepository-jar=JARFILE],
1784 [Specify path to jarfile manually.]),
1785 LIBREPOSITORY_JAR=$withval)
1787 AC_ARG_WITH(libfonts-jar,
1788 AS_HELP_STRING([--with-libfonts-jar=JARFILE],
1789 [Specify path to jarfile manually.]),
1790 LIBFONTS_JAR=$withval)
1792 AC_ARG_WITH(libserializer-jar,
1793 AS_HELP_STRING([--with-libserializer-jar=JARFILE],
1794 [Specify path to jarfile manually.]),
1795 LIBSERIALIZER_JAR=$withval)
1797 AC_ARG_WITH(libbase-jar,
1798 AS_HELP_STRING([--with-libbase-jar=JARFILE],
1799 [Specify path to jarfile manually.]),
1800 LIBBASE_JAR=$withval)
1802 AC_ARG_WITH(system-odbc,
1803 AS_HELP_STRING([--with-system-odbc],
1804 [Use the odbc headers already on system.]),,
1805 [with_system_odbc="auto"])
1807 AC_ARG_WITH(system-sane,
1808 AS_HELP_STRING([--with-system-sane],
1809 [Use sane.h already on system.]),,
1810 [with_system_sane="$with_system_headers"])
1812 AC_ARG_WITH(system-bluez,
1813 AS_HELP_STRING([--with-system-bluez],
1814 [Use bluetooth.h already on system.]),,
1815 [with_system_bluez="$with_system_headers"])
1817 AC_ARG_WITH(system-mesa-headers,
1818 AS_HELP_STRING([--with-system-mesa-headers],
1819 [Use Mesa headers already on system.]),,
1820 [with_system_mesa_headers="$with_system_headers"])
1822 AC_ARG_WITH(system-curl,
1823 AS_HELP_STRING([--with-system-curl],
1824 [Use curl already on system.]),,
1825 [with_system_curl=auto])
1827 AC_ARG_WITH(system-boost,
1828 AS_HELP_STRING([--with-system-boost],
1829 [Use boost already on system.]),,
1830 [with_system_boost="$with_system_headers"])
1832 AC_ARG_WITH(system-glm,
1833 AS_HELP_STRING([--with-system-glm],
1834 [Use glm already on system.]),,
1835 [with_system_glm="$with_system_headers"])
1837 AC_ARG_WITH(system-vigra,
1838 AS_HELP_STRING([--with-system-vigra],
1839 [Use vigra already on system.]),,
1840 [with_system_vigra="$with_system_headers"])
1842 AC_ARG_WITH(system-hunspell,
1843 AS_HELP_STRING([--with-system-hunspell],
1844 [Use libhunspell already on system.]),,
1845 [with_system_hunspell="$with_system_libs"])
1847 AC_ARG_WITH(system-mythes,
1848 AS_HELP_STRING([--with-system-mythes],
1849 [Use mythes already on system.]),,
1850 [with_system_mythes="$with_system_libs"])
1852 AC_ARG_WITH(system-altlinuxhyph,
1853 AS_HELP_STRING([--with-system-altlinuxhyph],
1854 [Use ALTLinuxhyph already on system.]),,
1855 [with_system_altlinuxhyph="$with_system_libs"])
1857 AC_ARG_WITH(system-lpsolve,
1858 AS_HELP_STRING([--with-system-lpsolve],
1859 [Use lpsolve already on system.]),,
1860 [with_system_lpsolve="$with_system_libs"])
1862 AC_ARG_WITH(system-coinmp,
1863 AS_HELP_STRING([--with-system-coinmp],
1864 [Use CoinMP already on system.]),,
1865 [with_system_coinmp="$with_system_libs"])
1867 AC_ARG_WITH(system-liblangtag,
1868 AS_HELP_STRING([--with-system-liblangtag],
1869 [Use liblangtag library already on system.]),,
1870 [with_system_liblangtag="$with_system_libs"])
1872 AC_ARG_WITH(system-npapi-headers,
1873 AS_HELP_STRING([--with-system-npapi-headers],
1874 [Use NPAPI headers provided by system instead of bundled ones. Used in
1875 extensions/source/plugin (ENABLE_NPAPI_FROM_BROWSER=TRUE)]),,
1876 [with_system_npapi_headers="$with_system_headers"]
1879 AC_ARG_WITH(jpeg-turbo,
1880 AS_HELP_STRING([--with-jpeg-turbo],
1881 [Use internal libjpeg-turbo library.]),,
1882 [with_jpeg_turbo=auto])
1885 AS_HELP_STRING([--with-webdav],
1886 [Specify which library to use for webdav implementation.
1887 Possible values: "neon", "serf", "no". The default value is "neon".
1888 Example: --with-webdav="serf"]),
1889 WITH_WEBDAV=$withval,
1892 AC_ARG_WITH(linker-hash-style,
1893 AS_HELP_STRING([--with-linker-hash-style],
1894 [Use linker with --hash-style=<style> when linking shared objects.
1895 Possible values: "sysv", "gnu", "both". The default value is "gnu"
1896 if supported on the build system, and "sysv" otherwise.]))
1898 AC_ARG_WITH(jdk-home,
1899 AS_HELP_STRING([--with-jdk-home],
1900 [If you have installed JDK 1.3 or later on your system please supply the
1901 path here. Note that this is not the location of the java command but the
1902 location of the entire distribution.])
1904 Usage: --with-jdk-home=<absolute path to JDK home>
1909 AS_HELP_STRING([--with-help],
1910 [Enable the build of help. There is a special parameter "common" that
1911 can be used to bundle only the common part, .e.g help-specific icons.
1912 This is useful when you build the helpcontent separately.])
1914 Usage: --with-help build the entire local help
1915 --without-help no local help (default)
1916 --with-help=common bundle common files for the local
1917 help but do not build the whole help
1922 AS_HELP_STRING([--with-java],
1923 [Specify the name of the Java interpreter command. Typically "java"
1924 which is the default.
1926 To build without support for Java components, applets, accessibility
1927 or the XML filters written in Java, use --without-java or --with-java=no.])
1929 Usage: --with-java==<java command>
1932 [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
1936 AC_ARG_WITH(jvm-path,
1937 AS_HELP_STRING([--with-jvm-path],
1938 [Use a specific JVM search path at runtime.])
1940 Usage: --with-jvm-path=<absolute path to parent of jvm home>
1942 e. g.: --with-jvm-path=/usr/lib/
1943 to find JRE/JDK in /usr/lib/jvm/
1947 AC_ARG_WITH(ant-home,
1948 AS_HELP_STRING([--with-ant-home],
1949 [If you have installed Jakarta Ant on your system, please supply the path here.
1950 Note that this is not the location of the Ant binary but the location
1951 of the entire distribution.])
1953 Usage: --with-ant-home=<absolute path to Ant home>
1957 AC_ARG_WITH(export-validation,
1958 AS_HELP_STRING([--with-export-validation],
1959 [If you want the exported files to be validated. Right now limited to OOXML files in calc export tests.
1960 Note: You need an executable script officeotron that takes the path to the file.])
1962 Usage: --with-export-validation
1967 AS_HELP_STRING([--with-junit],
1968 [Specifies the JUnit 4 jar file to use for JUnit-based tests.
1969 --without-junit disables those tests. Not relevant in the --without-java case.])
1971 Usage: --with-junit=<absolute path to JUnit 4 jar>
1975 AC_ARG_WITH(hamcrest,
1976 AS_HELP_STRING([--with-hamcrest],
1977 [Specifies the hamcrest jar file to use for JUnit-based tests.
1978 --without-junit disables those tests. Not relevant in the --without-java case.])
1980 Usage: --with-hamcrest=<absolute path to hamcrest jar>
1984 AC_ARG_WITH(perl-home,
1985 AS_HELP_STRING([--with-perl-home],
1986 [If you have installed Perl 5 Distribution, on your system, please
1987 supply the path here. Note that this is not the location of the Perl
1988 binary but the location of the entire distribution.])
1990 Usage: --with-perl-home=<abs. path to Perl 5 home>
1998 [Specifies the doxygen executable to use when generating ODK C/C++
1999 documentation. --without-doxygen disables generation of ODK C/C++
2000 documentation. Not relevant in the --disable-odk case.])
2002 Usage: --with-doxygen=<absolute path to doxygen executable>
2006 AC_ARG_WITH(visual-studio,
2007 AS_HELP_STRING([--with-visual-studio=<2013/2012>],
2008 [Specify which Visual Studio version to use in case several are
2009 are installed. If not specified, the order of preference is
2010 2013, 2012 (including Express editions). Note that it is
2011 unclear whether using 2013 actually works as intended.])
2013 Usage: --with-visual-studio=<2013/2012>
2017 AC_ARG_WITH(windows-sdk,
2018 AS_HELP_STRING([--with-windows-sdk=<6.0(A)/7.0(A)/7.1(A)/8.0(A)>],
2019 [Specify which Windows SDK, or "Windows Kit", version to use
2020 in case the one that came with the selected Visual Studio
2021 is not what you want for some reason. Note that not all compiler/SDK
2022 combinations are supported. The intent is that this option should not
2025 Usage: --with-windows-sdk=6.0(A)/7.0(A)/7.1(A)/8.0(A)>
2030 AS_HELP_STRING([--with-lang],
2031 [Use this option to build LibreOffice with additional UI language support.
2032 English (US) is always included by default.
2033 Separate multiple languages with space.
2034 For all languages, use --with-lang=ALL.])
2036 Usage: --with-lang="es sw tu cs sk"
2040 AC_ARG_WITH(locales,
2041 AS_HELP_STRING([--with-locales],
2042 [Use this option to limit the locale information built in.
2043 Separate multiple locales with space.
2044 Very experimental and might well break stuff.
2045 Just a desperate measure to shrink code and data size.
2046 By default all the locales available is included.
2047 This option is completely unrelated to --with-lang.])
2049 Affects also our character encoding conversion
2050 tables for encodings mainly targeted for a
2051 particular locale, like EUC-CN and EUC-TW for
2052 zh, ISO-2022-JP for ja.
2054 Affects also our add-on break iterator data for
2057 For the default, all locales, don't use this switch at all.
2058 Specifying just the language part of a locale means all matching
2059 locales will be included.
2061 Usage: --with-locales="en es pt fr zh kr ja"
2065 # Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
2067 AS_HELP_STRING([--with-krb5],
2068 [Enable MIT Kerberos 5 support in modules that support it.
2069 By default automatically enabled on platforms
2070 where a good system Kerberos 5 is available.]),
2074 AS_HELP_STRING([--with-gssapi],
2075 [Enable GSSAPI support in modules that support it.
2076 By default automatically enabled on platforms
2077 where a good system GSSAPI is available.]),
2081 AS_HELP_STRING([--with-iwyu],
2082 [Provide IWYU binary path to check unneeded includes instead of building.
2083 Use only if you are hacking on it.]),
2086 dnl ===================================================================
2088 dnl ===================================================================
2090 AC_ARG_WITH(branding,
2091 AS_HELP_STRING([--with-branding],
2092 [Use given path to retrieve branding images set.])
2094 Search for intro.png about.svg and flat_logo.svg.
2095 If any is missing, default ones will be used instead.
2097 Search also progress.conf for progress
2098 settings on intro screen :
2100 PROGRESSBARCOLOR="255,255,255" Set color of
2101 progress bar. Comma separated RGB decimal values.
2102 PROGRESSSIZE="407,6" Set size of progress bar.
2103 Comma separated decimal values (width, height).
2104 PROGRESSPOSITION="61,317" Set position of progress
2105 bar from left,top. Comma separated decimal values.
2106 PROGRESSFRAMECOLOR="20,136,3" Set color of progress
2107 bar frame. Comma separated RGB decimal values.
2108 PROGRESSTEXTCOLOR="255,255,255" Set color of progress
2109 bar text. Comma separated RGB decimal values.
2110 PROGRESSTEXTBASELINE="287" Set vertical position of
2111 progress bar text from top. Decimal value.
2113 Default values will be used if not found.
2115 Usage: --with-branding=/path/to/images
2120 AC_ARG_WITH(extra-buildid,
2121 AS_HELP_STRING([--with-extra-buildid],
2122 [Show addition build identification in about dialog.])
2124 Usage: --with-extra-buildid="Tinderbox: Win-x86@6, Branch:master, Date:2012-11-26_00.29.34"
2130 AS_HELP_STRING([--with-vendor],
2131 [Set vendor of the build.])
2133 Usage: --with-vendor="John the Builder"
2137 AC_ARG_WITH(compat-oowrappers,
2138 AS_HELP_STRING([--with-compat-oowrappers],
2139 [Install oo* wrappers in parallel with
2140 lo* ones to keep backward compatibility.
2141 Has effect only with make distro-pack-install]),
2144 AC_ARG_WITH(os-version,
2145 AS_HELP_STRING([--with-os-version],
2146 [For FreeBSD users, use this option option to override the detected OSVERSION.])
2148 Usage: --with-os-version=<OSVERSION>
2152 AC_ARG_WITH(mingw-cross-compiler,
2153 AS_HELP_STRING([--with-mingw-cross-compiler],
2154 [Specify the MinGW cross-compiler to use.])
2156 Usage: --with-mingw-cross-compiler=<mingw32-g++ command>
2158 When building on the ODK on Unix and building unowinreg.dll,
2159 specify the MinGW C++ cross-compiler.
2163 AC_ARG_WITH(idlc-cpp,
2164 AS_HELP_STRING([--with-idlc-cpp],
2165 [Specify the C Preprocessor to use for idlc.])
2167 Usage: --with-idlc-cpp=cpp
2173 AC_ARG_WITH(build-version,
2174 AS_HELP_STRING([--with-build-version],
2175 [Allows the builder to add a custom version tag that will appear in the
2176 Help/About box for QA purposes.])
2178 Usage: --with-build-version="Built by Jim"
2180 with_build_version=$withval ,
2184 AS_HELP_STRING([--with-alloc],
2185 [Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
2186 Note that on FreeBSD/NetBSD system==jemalloc]),
2189 AC_ARG_WITH(sun-templates,
2190 AS_HELP_STRING([--with-sun-templates],
2191 [Integrate Sun template packages.]),
2194 AC_ARG_WITH(parallelism,
2195 AS_HELP_STRING([--with-parallelism],
2196 [Number of jobs to run simultaneously during build. Parallel builds can
2197 save a lot of time on multi-cpu machines. Defaults to the number of
2198 CPUs on the machine, unless you configure --enable-icecream - then to
2202 AC_ARG_WITH(all-tarballs,
2203 AS_HELP_STRING([--with-all-tarballs],
2204 [Download all external tarballs unconditionally]))
2206 AC_ARG_WITH(gdrive-client-id,
2207 AS_HELP_STRING([--with-gdrive-client-id],
2208 [Provides the client id of the application for OAuth2 authentication
2209 on Google Drive. If either this or --with-gdrive-client-secret is
2210 empty, the feature will be disabled]),
2213 AC_ARG_WITH(gdrive-client-secret,
2214 AS_HELP_STRING([--with-gdrive-client-secret],
2215 [Provides the client secret of the application for OAuth2
2216 authentication on Google Drive. If either this or
2217 --with-gdrive-client-id is empty, the feature will be disabled]),
2220 AC_ARG_WITH(alfresco-cloud-client-id,
2221 AS_HELP_STRING([--with-alfresco-cloud-client-id],
2222 [Provides the client id of the application for OAuth2 authentication
2223 on Alfresco Cloud. If either this or --with-alfresco-cloud-client-secret is
2224 empty, the feature will be disabled]),
2227 AC_ARG_WITH(alfresco-cloud-client-secret,
2228 AS_HELP_STRING([--with-alfresco-cloud-client-secret],
2229 [Provides the client secret of the application for OAuth2
2230 authentication on Alfresco Cloud. If either this or
2231 --with-alfresco-cloud-client-id is empty, the feature will be disabled]),
2234 AC_ARG_WITH(onedrive-client-id,
2235 AS_HELP_STRING([--with-onedrive-client-id],
2236 [Provides the client id of the application for OAuth2 authentication
2237 on OneDrive. If either this or --with-onedrive-client-secret is
2238 empty, the feature will be disabled]),
2241 AC_ARG_WITH(onedrive-client-secret,
2242 AS_HELP_STRING([--with-onedrive-client-secret],
2243 [Provides the client secret of the application for OAuth2
2244 authentication on OneDrive. If either this or
2245 --with-onedrive-client-id is empty, the feature will be disabled]),
2247 dnl ===================================================================
2248 dnl Do we want to use pre-build binary tarball for recompile
2249 dnl ===================================================================
2251 if test "$enable_library_bin_tar" = "yes" ; then
2252 USE_LIBRARY_BIN_TAR=TRUE
2254 USE_LIBRARY_BIN_TAR=
2256 AC_SUBST(USE_LIBRARY_BIN_TAR)
2258 dnl ===================================================================
2259 dnl Test whether build target is Release Build
2260 dnl ===================================================================
2261 AC_MSG_CHECKING([whether build target is Release Build])
2262 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
2264 ENABLE_RELEASE_BUILD=
2266 AC_MSG_RESULT([yes])
2267 ENABLE_RELEASE_BUILD=TRUE
2269 AC_SUBST(ENABLE_RELEASE_BUILD)
2271 dnl ===================================================================
2272 dnl Test whether to sign Windows Build
2273 dnl ===================================================================
2274 AC_MSG_CHECKING([whether to sign windows build])
2275 if test "$enable_windows_build_signing" = "yes" -a "$_os" = "WINNT" -a "$WITH_MINGW" != "YES" ; then
2276 AC_MSG_RESULT([yes])
2277 WINDOWS_BUILD_SIGNING="TRUE"
2280 WINDOWS_BUILD_SIGNING="FALSE"
2282 AC_SUBST(WINDOWS_BUILD_SIGNING)
2284 dnl ===================================================================
2285 dnl MacOSX build and runtime environment options
2286 dnl ===================================================================
2288 AC_ARG_WITH(macosx-sdk,
2289 AS_HELP_STRING([--with-macosx-sdk],
2290 [Use a specific SDK for building.])
2292 Usage: --with-macosx-sdk=<version>
2294 e. g.: --with-macosx-sdk=10.8
2296 there are 3 options to control the MacOSX build:
2297 --with-macosx-sdk (referred as 'sdk' below)
2298 --with-macosx-version-min-required (referred as 'min' below)
2299 --with-macosx-version-max-allowed (referred as 'max' below)
2301 the connection between these value and the default they take is as follow:
2302 ( ? means not specified on the command line, s means the SDK version found,
2303 constraint: 8 <= x <= y <= z)
2305 ==========================================
2306 command line || config result
2307 ==========================================
2308 min | max | sdk || min | max | sdk |
2309 ? | ? | ? || 10.8 | 10.s | 10.s |
2310 ? | ? | 10.x || 10.8 | 10.x | 10.x |
2311 ? | 10.x | ? || 10.8 | 10.s | 10.s |
2312 ? | 10.x | 10.y || 10.8 | 10.x | 10.y |
2313 10.x | ? | ? || 10.x | 10.s | 10.s |
2314 10.x | ? | 10.y || 10.x | 10.y | 10.y |
2315 10.x | 10.y | ? || 10.x | 10.y | 10.y |
2316 10.x | 10.y | 10.z || 10.x | 10.y | 10.z |
2319 see: http://developer.apple.com/library/mac/#technotes/tn2064/_index.html
2320 for a detailed technical explanation of these variables
2322 Note: MACOSX_DEPLOYMENT_TARGET will be set to the value of 'min'.
2326 AC_ARG_WITH(macosx-version-min-required,
2327 AS_HELP_STRING([--with-macosx-version-min-required],
2328 [set the minimum OS version needed to run the built LibreOffice])
2330 Usage: --with-macosx-version-min-required=<version>
2332 e. g.: --with-macos-version-min-required=10.8
2333 see --with-macosx-sdk for more info
2337 AC_ARG_WITH(macosx-version-max-allowed,
2338 AS_HELP_STRING([--with-macosx-version-max-allowed],
2339 [set the maximum allowed OS version the LibreOffice compilation can use APIs from])
2341 Usage: --with-macosx-version-max-allowed=<version>
2343 e. g.: --with-macos-version-max-allowed=10.8
2344 see --with-macosx-sdk for more info
2349 dnl ===================================================================
2350 dnl options for stuff used during cross-compilation build
2351 dnl Not quite superseded by --with-build-platform-configure-options.
2352 dnl TODO: check, if the "force" option is still needed anywhere.
2353 dnl ===================================================================
2355 AC_ARG_WITH(system-icu-for-build,
2356 AS_HELP_STRING([--with-system-icu-for-build=yes/no/force],
2357 [Use icu already on system for build tools (cross-compilation only).]))
2360 dnl ===================================================================
2361 dnl check for required programs (grep, awk, sed, bash)
2362 dnl ===================================================================
2366 if test -n "$1"; then
2367 if test "$build_os" = "cygwin"; then
2368 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
2370 new_path=`cygpath -sm "$formatted_path"`
2373 new_path=`cygpath -u "$formatted_path"`
2378 if ! echo "$LO_PATH" | $EGREP -q "(^|:)$1($|:)"; then
2379 if test "$2" = "after"; then
2380 LO_PATH="$LO_PATH${P_SEP}$new_path"
2382 LO_PATH="$new_path${P_SEP}$LO_PATH"
2390 AC_PATH_PROG( AWK, $AWK)
2391 if test -z "$AWK"; then
2392 AC_MSG_ERROR([install awk to run this script])
2395 AC_PATH_PROG(BASH, bash)
2396 if test -z "$BASH"; then
2397 AC_MSG_ERROR([bash not found in \$PATH])
2401 AC_MSG_CHECKING([for GNU or BSD tar])
2402 for a in $GNUTAR gtar gnutar tar /usr/sfw/bin/gtar; do
2403 $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
2404 if test $? -eq 0; then
2409 AC_MSG_RESULT($GNUTAR)
2410 if test -z "$GNUTAR"; then
2411 AC_MSG_ERROR([not found. install GNU or BSD tar.])
2415 AC_MSG_CHECKING([for tar's option to strip components])
2416 $GNUTAR --help 2> /dev/null | egrep "bsdtar|strip-components" 2>&1 >/dev/null
2417 if test $? -eq 0; then
2418 STRIP_COMPONENTS="--strip-components"
2420 $GNUTAR --help 2> /dev/null | egrep "strip-path" 2>&1 >/dev/null
2421 if test $? -eq 0; then
2422 STRIP_COMPONENTS="--strip-path"
2424 STRIP_COMPONENTS="unsupported"
2427 AC_MSG_RESULT($STRIP_COMPONENTS)
2428 if test x$STRIP_COMPONENTS = xunsupported; then
2429 AC_MSG_ERROR([you need a tar that is able to strip components.])
2431 AC_SUBST(STRIP_COMPONENTS)
2433 dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
2434 dnl desktop OSes from "mobile" ones.
2436 dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
2437 dnl In other words, that when building for an OS that is not a
2438 dnl "desktop" one but a "mobile" one, we are always cross-compiling.
2440 dnl Note the direction of the implication; there is no assumption that
2441 dnl cross-compiling would imply a non-desktop OS.
2443 if test $_os != iOS -a $_os != Android; then
2444 BUILD_TYPE="$BUILD_TYPE DESKTOP"
2445 AC_DEFINE(HAVE_FEATURE_DESKTOP)
2446 AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
2450 if test "$enable_export" != no; then
2451 BUILD_TYPE="$BUILD_TYPE EXPORT"
2453 DISABLE_EXPORT='TRUE'
2454 SCPDEFS="$SCPDES -DDISABLE_EXPORT"
2456 AC_SUBST(DISABLE_EXPORT)
2458 # Whether to build "avmedia" functionality or not.
2460 if test -z "$enable_avmedia"; then
2464 if test "$enable_avmedia" = yes; then
2465 BUILD_TYPE="$BUILD_TYPE AVMEDIA"
2466 AC_DEFINE(HAVE_FEATURE_AVMEDIA)
2468 SCPDEFS="$SCPDEFS -DDISABLE_AVMEDIA"
2471 # Decide whether to build database connectivity stuff (including
2472 # Base) or not. We probably don't want to on non-desktop OSes.
2474 if test -z "$enable_database_connectivity"; then
2475 # --disable-database-connectivity is unfinished work in progress
2476 # and the iOS test app doesn't link if we actually try to use it.
2477 # if test $_os != iOS -a $_os != Android; then
2478 enable_database_connectivity=yes
2482 if test "$enable_database_connectivity" = yes; then
2483 BUILD_TYPE="$BUILD_TYPE DBCONNECTIVITY"
2484 AC_DEFINE(HAVE_FEATURE_DBCONNECTIVITY)
2487 if test -z "$enable_extensions"; then
2488 # For iOS and Android disable extensions unless specifically overridden with --enable-extensions.
2489 if test $_os != iOS -a $_os != Android; then
2490 enable_extensions=yes
2494 if test "$enable_extensions" = yes; then
2495 BUILD_TYPE="$BUILD_TYPE EXTENSIONS"
2496 AC_DEFINE(HAVE_FEATURE_EXTENSIONS)
2499 if test -z "$enable_scripting"; then
2500 # Disable scripting for iOS unless specifically overridden
2501 # with --enable-scripting.
2502 if test $_os != iOS; then
2503 enable_scripting=yes
2507 DISABLE_SCRIPTING=''
2508 if test "$enable_scripting" = yes; then
2509 BUILD_TYPE="$BUILD_TYPE SCRIPTING"
2510 AC_DEFINE(HAVE_FEATURE_SCRIPTING)
2512 DISABLE_SCRIPTING='TRUE'
2513 SCPDEFS="$SCPDEFS -DDISABLE_SCRIPTING"
2516 if test $_os = iOS -o $_os = Android; then
2517 # Disable dynamic_loading always for iOS and Android
2518 enable_dynamic_loading=no
2519 elif test -z "$enable_dynamic_loading"; then
2520 # Otherwise enable it unless speficically disabled
2521 enable_dynamic_loading=yes
2524 DISABLE_DYNLOADING=''
2525 if test "$enable_dynamic_loading" = yes; then
2526 BUILD_TYPE="$BUILD_TYPE DYNLOADING"
2528 DISABLE_DYNLOADING='TRUE'
2529 SCPDEFS="$SCPDEFS -DDISABLE_DYNLOADING"
2531 AC_SUBST(DISABLE_DYNLOADING)
2533 # remenber SYSBASE value
2536 dnl ===================================================================
2537 dnl Sort out various gallery compilation options
2538 dnl ===================================================================
2539 AC_MSG_CHECKING([how to build and package galleries])
2540 if test -n "${with_galleries}"; then
2541 if test "$with_galleries" = "build"; then
2542 WITH_GALLERY_BUILD=TRUE
2543 AC_MSG_RESULT([build from source images internally])
2544 elif test "$with_galleries" = "no"; then
2546 AC_MSG_RESULT([disable non-internal gallery build])
2548 AC_MSG_ERROR([unknown value --with-galleries=$with_galleries])
2551 if test $_os != iOS -a $_os != Android; then
2552 WITH_GALLERY_BUILD=TRUE
2553 AC_MSG_RESULT([internal src images for desktop])
2556 AC_MSG_RESULT([disable src imgage build])
2559 AC_SUBST(WITH_GALLERY_BUILD)
2561 dnl ===================================================================
2562 dnl Checks if ccache is available
2563 dnl ===================================================================
2564 if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
2565 case "%$CC%$CXX%" in
2566 # If $CC and/or $CXX already contain "ccache" (possibly suffixed with some version number etc),
2567 # assume that's good then
2568 *%ccache[[-_' ']]*|*/ccache[[-_' ']]*)
2569 AC_MSG_NOTICE([ccache seems to be included in a pre-defined CC and/or CXX])
2572 AC_PATH_PROG([CCACHE],[ccache],[not found])
2573 if test "$CCACHE" = "not found"; then
2576 # Need to check for ccache version: otherwise prevents
2577 # caching of the results (like "-x objective-c++" for Mac)
2578 if test $_os = Darwin -o $_os = iOS; then
2579 # Check ccache version
2580 AC_MSG_CHECKING([whether version of ccache is suitable])
2581 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2582 CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2583 if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
2584 AC_MSG_RESULT([yes, $CCACHE_VERSION])
2586 AC_MSG_RESULT([no, $CCACHE_VERSION])
2597 if test "$CCACHE" != ""; then
2598 ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
2599 ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
2600 if test "$ccache_size" = ""; then
2601 ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
2602 if test "$ccache_size" = ""; then
2605 # we could not determine the size or it was less than 1GB -> disable auto-ccache
2606 if test $ccache_size -lt 1024; then
2608 AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-productive: Disabling auto-ccache detection])
2609 add_warning "ccache's cache size is less than 1GB using it is counter-productive: auto-ccache detection disabled"
2611 # warn that ccache may be too small for debug build
2612 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
2613 add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
2616 if test $ccache_size -lt 5; then
2617 #warn that ccache may be too small for debug build
2618 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
2619 add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
2624 dnl ===================================================================
2625 dnl Checks for C compiler,
2626 dnl The check for the C++ compiler is later on.
2627 dnl ===================================================================
2628 if test "$_os" != "WINNT" -a "$WITH_MINGW" != "yes"; then
2630 AC_MSG_CHECKING([gcc home])
2631 if test -z "$with_gcc_home"; then
2632 if test "$enable_icecream" = "yes"; then
2633 if test -d "/usr/lib/icecc/bin"; then
2634 GCC_HOME="/usr/lib/icecc/"
2636 GCC_HOME="/opt/icecream/"
2639 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
2640 GCC_HOME_SET="false"
2643 GCC_HOME="$with_gcc_home"
2645 AC_MSG_RESULT($GCC_HOME)
2648 if test "$GCC_HOME_SET" = "true"; then
2649 if test -z "$CC"; then
2650 CC="$GCC_HOME/bin/gcc"
2652 if test -z "$CXX"; then
2653 CXX="$GCC_HOME/bin/g++"
2658 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
2659 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
2660 # AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that
2666 COMPATH=`dirname "$CC"`
2667 if test "$COMPATH" = "."; then
2668 AC_PATH_PROGS(COMPATH, $CC)
2669 dnl double square bracket to get single because of M4 quote...
2670 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`
2672 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`
2674 dnl ===================================================================
2676 dnl ===================================================================
2677 AC_MSG_CHECKING([whether to build with Java support])
2678 if test "$with_java" != "no"; then
2679 if test "$DISABLE_SCRIPTING" = TRUE; then
2680 AC_MSG_RESULT([no, overridden by --disable-scripting])
2684 AC_MSG_RESULT([yes])
2686 AC_DEFINE(HAVE_FEATURE_JAVA)
2693 AC_SUBST(ENABLE_JAVA)
2695 dnl ENABLE_JAVA="TRUE" if we want there to be *run-time* (and build-time) support for Java
2697 dnl ENABLE_JAVA="" indicate no Java support at all
2699 dnl ===================================================================
2700 dnl Export file validation
2701 dnl ===================================================================
2702 AC_MSG_CHECKING([whether to enable export file validation])
2703 if test "$with_export_validation" = yes; then
2704 AC_MSG_RESULT([yes])
2705 AC_DEFINE(HAVE_EXPORT_VALIDATION)
2711 dnl ===================================================================
2712 dnl Check OS X SDK and compiler
2713 dnl ===================================================================
2715 if test $_os = Darwin; then
2717 # If no --with-macosx-sdk option is given, look for one
2719 # The intent is that for "most" Mac-based developers, a suitable
2720 # SDK will be found automatically without any configure options.
2722 # For developers with a current Xcode, the lowest-numbered SDK
2723 # higher than or equal to the minimum required should be found.
2725 AC_MSG_CHECKING([what Mac OS X SDK to use])
2727 for _macosx_sdk in $with_macosx_sdk 10.8 10.9 10.10; do
2728 MACOSX_SDK_PATH=`xcrun --sdk macosx${_macosx_sdk} --show-sdk-path 2> /dev/null`
2729 if test -d "$MACOSX_SDK_PATH"; then
2730 with_macosx_sdk="${_macosx_sdk}"
2733 MACOSX_SDK_PATH="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${_macosx_sdk}.sdk"
2734 if test -d "$MACOSX_SDK_PATH"; then
2735 with_macosx_sdk="${_macosx_sdk}"
2740 if test ! -d "$MACOSX_SDK_PATH"; then
2741 AC_MSG_ERROR([Could not figure out the location of a Mac OS X SDK and its version])
2743 AC_MSG_RESULT([SDK $with_macosx_sdk at $MACOSX_SDK_PATH])
2745 case $with_macosx_sdk in
2747 MACOSX_SDK_VERSION=1080
2750 MACOSX_SDK_VERSION=1090
2753 MACOSX_SDK_VERSION=101000
2756 AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported values are 10.8--10])
2760 if test "$with_macosx_version_min_required" = "" ; then
2761 with_macosx_version_min_required="10.8";
2764 if test "$with_macosx_version_max_allowed" = "" ; then
2765 with_macosx_version_max_allowed="$with_macosx_sdk"
2768 # export this so that "xcrun" invocations later return matching values
2769 DEVELOPER_DIR="${MACOSX_SDK_PATH%/SDKs*}"
2770 DEVELOPER_DIR="${DEVELOPER_DIR%/Platforms*}"
2771 export DEVELOPER_DIR
2772 FRAMEWORKSHOME="$MACOSX_SDK_PATH/System/Library/Frameworks"
2773 MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
2775 case "$with_macosx_version_min_required" in
2777 MAC_OS_X_VERSION_MIN_REQUIRED="1080"
2780 MAC_OS_X_VERSION_MIN_REQUIRED="1090"
2783 MAC_OS_X_VERSION_MIN_REQUIRED="101000"
2786 AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported values are 10.8--10])
2791 INSTALL_NAME_TOOL=install_name_tool
2792 if test -z "$save_CC"; then
2793 AC_MSG_CHECKING([what compiler to use])
2794 stdlib=-stdlib=libc++
2795 if test "$ENABLE_LTO" = TRUE; then
2798 CC="`xcrun -find clang` -m64 $lto -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2799 CXX="`xcrun -find clang++` -m64 $lto $stdlib -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2800 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
2803 STRIP=`xcrun -find strip`
2804 LIBTOOL=`xcrun -find libtool`
2805 RANLIB=`xcrun -find ranlib`
2806 AC_MSG_RESULT([$CC and $CXX])
2809 case "$with_macosx_version_max_allowed" in
2811 MAC_OS_X_VERSION_MAX_ALLOWED="1080"
2814 MAC_OS_X_VERSION_MAX_ALLOWED="1090"
2817 MAC_OS_X_VERSION_MAX_ALLOWED="101000"
2820 AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.8--10])
2824 AC_MSG_CHECKING([that macosx-version-min-required is coherent with macosx-version-max-allowed])
2825 if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED; then
2826 AC_MSG_ERROR([the version minimumn required must be inferior or equal to the version maximum allowed])
2831 AC_MSG_CHECKING([that macosx-version-max-allowed is coherent with macos-with-sdk])
2832 if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $MACOSX_SDK_VERSION; then
2833 AC_MSG_ERROR([the version maximum allowed cannot be greater thatn the sdk level])
2837 AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED])
2838 AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED])
2840 AC_MSG_CHECKING([whether to do code signing])
2842 if test "$enable_macosx_code_signing" = yes; then
2843 # By default use the first suitable certificate (?).
2845 # http://stackoverflow.com/questions/13196291/difference-between-mac-developer-and-3rd-party-mac-developer-application
2846 # says that the "Mac Developer" certificate is useful just for self-testing. For distribution
2847 # outside the Mac App Store, use the "Developer ID Application" one, and for distribution in
2848 # the App Store, the "3rd Party Mac Developer" one. I think it works best to the
2849 # "Developer ID Application" one.
2851 identity=`security find-identity -p codesigning -v 2>/dev/null | grep 'Developer ID Application:' | $AWK '{print $2}' |head -1`
2852 if test -n "$identity"; then
2853 MACOSX_CODESIGNING_IDENTITY=$identity
2854 pretty_name=`security find-identity -p codesigning -v | grep "$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
2855 AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
2857 elif test -n "$enable_macosx_code_signing" -a "$enable_macosx_code_signing" != no ; then
2858 MACOSX_CODESIGNING_IDENTITY=$enable_macosx_code_signing
2859 pretty_name=`security find-identity -p codesigning -v | grep "$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
2860 AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
2865 AC_MSG_CHECKING([whether to create a Mac App Store package])
2867 if test -n "$enable_macosx_package_signing" -a -z "$MACOSX_CODESIGNING_IDENTITY"; then
2868 AC_MSG_ERROR([You forgot --enable-macosx-code-signing])
2869 elif test "$enable_macosx_package_signing" = yes; then
2870 # By default use the first suitable certificate.
2871 # It should be a "3rd Party Mac Developer Installer" one
2873 identity=`security find-identity -v 2>/dev/null | grep '3rd Party Mac Developer Installer:' | awk '{print $2}' |head -1`
2874 if test -n "$identity"; then
2875 MACOSX_PACKAGE_SIGNING_IDENTITY=$identity
2876 pretty_name=`security find-identity -v | grep "$MACOSX_PACKAGE_SIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
2877 AC_MSG_RESULT([yes, using the identity $MACOSX_PACKAGE_SIGNING_IDENTITY for $pretty_name])
2879 AC_MSG_ERROR([Could not find any suitable '3rd Party Mac Developer Installer' certificate])
2881 elif test -n "$enable_macosx_package_signing"; then
2882 MACOSX_PACKAGE_SIGNING_IDENTITY=$enable_macosx_package_signing
2883 pretty_name=`security find-identity -v | grep "$MACOSX_PACKAGE_SIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
2884 AC_MSG_RESULT([yes, using the identity $MACOSX_PACKAGE_SIGNING_IDENTITY for $pretty_name])
2889 if test -n "$MACOSX_CODESIGNING_IDENTITY" -a -n "$MACOSX_PACKAGE_SIGNING_IDENTITY" -a "$MACOSX_CODESIGNING_IDENTITY" = "$MACOSX_PACKAGE_SIGNING_IDENTITY"; then
2890 AC_MSG_ERROR([You should not use the same identity for code and package signing])
2893 AC_MSG_CHECKING([whether to sandbox the application])
2895 if test -z "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = yes; then
2896 AC_MSG_ERROR([OS X sandboxing requires code signing])
2897 elif test -n "$ENABLE_JAVA" -a "$enable_macosx_sandbox" = yes; then
2898 AC_MSG_ERROR([OS X sandboxing (actually App Store rules) disallows use of Java])
2899 elif test -n "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = yes; then
2900 ENABLE_MACOSX_SANDBOX=TRUE
2901 AC_DEFINE(HAVE_FEATURE_MACOSX_SANDBOX)
2902 AC_MSG_RESULT([yes])
2907 AC_MSG_CHECKING([what OS X app bundle identifier to use])
2908 MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier
2909 AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER])
2911 AC_MSG_CHECKING([what OS X app name to use])
2912 MACOSX_APP_NAME="$with_macosx_app_name"
2913 AC_MSG_RESULT([$MACOSX_APP_NAME])
2916 AC_SUBST(MACOSX_SDK_PATH)
2917 AC_SUBST(MACOSX_SDK_VERSION)
2918 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
2919 AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
2920 AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED)
2921 AC_SUBST(INSTALL_NAME_TOOL)
2922 AC_SUBST(LIBTOOL) # Note that the OS X libtool command is unrelated to GNU libtool
2923 AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
2924 AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY)
2925 AC_SUBST(ENABLE_MACOSX_SANDBOX)
2926 AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
2927 AC_SUBST(MACOSX_APP_NAME)
2928 AC_SUBST(MACOSX_HIGH_RESOLUTION_VALUE)
2930 dnl ===================================================================
2931 dnl Check iOS SDK and compiler
2932 dnl ===================================================================
2934 if test $_os = iOS; then
2936 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
2942 AC_MSG_CHECKING([what iOS SDK to use])
2944 if test "$enable_ios_simulator" = yes; then
2945 platform=iPhoneSimulator
2950 xcode_developer=`xcode-select -print-path`
2953 for sdkver in 8.1 8.0; do
2954 t=$xcode_developer/Platforms/$platform.platform/Developer/SDKs/$platform$sdkver.sdk
2962 if test -z "$sysroot"; then
2963 AC_MSG_ERROR([Could not find iOS SDK, expected something like $xcode_developer/Platforms/$platform.platform/Developer/SDKs/${platform}${current_sdk_ver}])
2966 AC_MSG_RESULT($sysroot)
2968 XCODEBUILD_SDK=`echo $platform | tr A-Z a-z`$ios_sdk
2970 if test "$enable_ios_simulator" = yes; then
2971 if test "$BITNESS_OVERRIDE" = 64; then
2973 versionmin=-mios-simulator-version-min=7.0
2976 versionmin=-mios-simulator-version-min=7.0
2980 if test "$BITNESS_OVERRIDE" = 64; then
2985 versionmin=-miphoneos-version-min=7.0
2988 # LTO is not really recommended for iOS builds,
2989 # the link time will be astronomical
2990 if test "$ENABLE_LTO" = TRUE; then
2993 # Just add -fvisibility=hidden to CC and CXX directly so that the 3rd-party libs also
2994 # get compiled with it, to avoid ld warnings when linking all that together into one
2997 XCODE_CLANG_CXX_LIBRARY=libc++
2998 stdlib="-stdlib=$XCODE_CLANG_CXX_LIBRARY"
3000 CC="`xcrun -find clang` -arch $XCODE_ARCHS -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
3001 CXX="`xcrun -find clang++` -arch $XCODE_ARCHS -fvisibility=hidden $stdlib -isysroot $sysroot $lto $versionmin"
3003 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
3006 STRIP=`xcrun -find strip`
3007 LIBTOOL=`xcrun -find libtool`
3008 RANLIB=`xcrun -find ranlib`
3011 AC_SUBST(XCODE_CLANG_CXX_LIBRARY)
3012 AC_SUBST(XCODE_ARCHS)
3013 AC_SUBST(XCODEBUILD_SDK)
3015 AC_MSG_CHECKING([whether to treat the installation as read-only])
3017 if test \( -z "$enable_readonly_installset" -a "$ENABLE_MACOSX_SANDBOX" = TRUE \) -o \
3018 "$enable_extensions" != yes; then
3019 enable_readonly_installset=yes
3021 if test "$enable_readonly_installset" = yes; then
3022 AC_MSG_RESULT([yes])
3023 AC_DEFINE(HAVE_FEATURE_READONLY_INSTALLSET)
3028 dnl ===================================================================
3029 dnl Structure of install set
3030 dnl ===================================================================
3032 if test $_os = Darwin; then
3033 LIBO_BIN_FOLDER=MacOS
3034 LIBO_ETC_FOLDER=Resources
3035 LIBO_LIBEXEC_FOLDER=MacOS
3036 LIBO_LIB_FOLDER=Frameworks
3037 LIBO_SHARE_FOLDER=Resources
3038 LIBO_SHARE_HELP_FOLDER=Resources/help
3039 LIBO_SHARE_JAVA_FOLDER=Resources/java
3040 LIBO_SHARE_PRESETS_FOLDER=Resources/presets
3041 LIBO_LIB_PYUNO_FOLDER=Resources
3042 LIBO_SHARE_RESOURCE_FOLDER=Resources/resource
3043 LIBO_SHARE_SHELL_FOLDER=Resources/shell
3044 LIBO_URE_BIN_FOLDER=MacOS
3045 LIBO_URE_ETC_FOLDER=Resources/ure/etc
3046 LIBO_URE_LIB_FOLDER=Frameworks
3047 LIBO_URE_SHARE_FOLDER=Resources/ure/share
3048 LIBO_URE_SHARE_JAVA_FOLDER=Resources/java
3049 elif test $_os = WINNT; then
3050 LIBO_BIN_FOLDER=program
3051 LIBO_ETC_FOLDER=program
3052 LIBO_LIBEXEC_FOLDER=program
3053 LIBO_LIB_FOLDER=program
3054 LIBO_LIB_PYUNO_FOLDER=program
3055 LIBO_SHARE_FOLDER=share
3056 LIBO_SHARE_HELP_FOLDER=help
3057 LIBO_SHARE_JAVA_FOLDER=program/classes
3058 LIBO_SHARE_PRESETS_FOLDER=presets
3059 LIBO_SHARE_RESOURCE_FOLDER=program/resource
3060 LIBO_SHARE_SHELL_FOLDER=program/shell
3061 LIBO_URE_BIN_FOLDER=URE/bin
3062 LIBO_URE_ETC_FOLDER=URE/bin
3063 LIBO_URE_LIB_FOLDER=URE/bin
3064 LIBO_URE_SHARE_FOLDER=URE
3065 LIBO_URE_SHARE_JAVA_FOLDER=URE/java
3067 LIBO_BIN_FOLDER=program
3068 LIBO_ETC_FOLDER=program
3069 LIBO_LIBEXEC_FOLDER=program
3070 LIBO_LIB_FOLDER=program
3071 LIBO_LIB_PYUNO_FOLDER=program
3072 LIBO_SHARE_FOLDER=share
3073 LIBO_SHARE_HELP_FOLDER=help
3074 LIBO_SHARE_JAVA_FOLDER=program/classes
3075 LIBO_SHARE_PRESETS_FOLDER=presets
3076 LIBO_SHARE_RESOURCE_FOLDER=program/resource
3077 LIBO_SHARE_SHELL_FOLDER=program/shell
3078 LIBO_URE_BIN_FOLDER=ure/bin
3079 LIBO_URE_ETC_FOLDER=ure/lib
3080 LIBO_URE_LIB_FOLDER=ure/lib
3081 LIBO_URE_SHARE_FOLDER=ure/share
3082 LIBO_URE_SHARE_JAVA_FOLDER=ure/share/java
3084 AC_DEFINE_UNQUOTED(LIBO_BIN_FOLDER,"$LIBO_BIN_FOLDER")
3085 AC_DEFINE_UNQUOTED(LIBO_ETC_FOLDER,"$LIBO_ETC_FOLDER")
3086 AC_DEFINE_UNQUOTED(LIBO_LIBEXEC_FOLDER,"$LIBO_LIBEXEC_FOLDER")
3087 AC_DEFINE_UNQUOTED(LIBO_LIB_FOLDER,"$LIBO_LIB_FOLDER")
3088 AC_DEFINE_UNQUOTED(LIBO_LIB_PYUNO_FOLDER,"$LIBO_LIB_PYUNO_FOLDER")
3089 AC_DEFINE_UNQUOTED(LIBO_SHARE_FOLDER,"$LIBO_SHARE_FOLDER")
3090 AC_DEFINE_UNQUOTED(LIBO_SHARE_HELP_FOLDER,"$LIBO_SHARE_HELP_FOLDER")
3091 AC_DEFINE_UNQUOTED(LIBO_SHARE_JAVA_FOLDER,"$LIBO_SHARE_JAVA_FOLDER")
3092 AC_DEFINE_UNQUOTED(LIBO_SHARE_PRESETS_FOLDER,"$LIBO_SHARE_PRESETS_FOLDER")
3093 AC_DEFINE_UNQUOTED(LIBO_SHARE_RESOURCE_FOLDER,"$LIBO_SHARE_RESOURCE_FOLDER")
3094 AC_DEFINE_UNQUOTED(LIBO_SHARE_SHELL_FOLDER,"$LIBO_SHARE_SHELL_FOLDER")
3095 AC_DEFINE_UNQUOTED(LIBO_URE_BIN_FOLDER,"$LIBO_URE_BIN_FOLDER")
3096 AC_DEFINE_UNQUOTED(LIBO_URE_ETC_FOLDER,"$LIBO_URE_ETC_FOLDER")
3097 AC_DEFINE_UNQUOTED(LIBO_URE_LIB_FOLDER,"$LIBO_URE_LIB_FOLDER")
3098 AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_FOLDER,"$LIBO_URE_SHARE_FOLDER")
3099 AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_JAVA_FOLDER,"$LIBO_URE_SHARE_JAVA_FOLDER")
3101 # Not all of them needed in config_host.mk, add more if need arises
3102 AC_SUBST(LIBO_BIN_FOLDER)
3103 AC_SUBST(LIBO_ETC_FOLDER)
3104 AC_SUBST(LIBO_LIB_FOLDER)
3105 AC_SUBST(LIBO_LIB_PYUNO_FOLDER)
3106 AC_SUBST(LIBO_SHARE_FOLDER)
3107 AC_SUBST(LIBO_SHARE_HELP_FOLDER)
3108 AC_SUBST(LIBO_SHARE_JAVA_FOLDER)
3109 AC_SUBST(LIBO_SHARE_PRESETS_FOLDER)
3110 AC_SUBST(LIBO_SHARE_RESOURCE_FOLDER)
3111 AC_SUBST(LIBO_URE_BIN_FOLDER)
3112 AC_SUBST(LIBO_URE_ETC_FOLDER)
3113 AC_SUBST(LIBO_URE_LIB_FOLDER)
3114 AC_SUBST(LIBO_URE_SHARE_FOLDER)
3115 AC_SUBST(LIBO_URE_SHARE_JAVA_FOLDER)
3117 dnl ===================================================================
3118 dnl Windows specific tests and stuff
3119 dnl ===================================================================
3121 # Get a value from the 32-bit side of the Registry
3124 # Return value: $regvalue
3126 _regvalue=`cat "/proc/registry32/$1" 2> /dev/null`
3128 if test $? -eq 0; then
3133 # Get a value from the 64-bit side of the Registry
3136 # Return value: $regvalue
3138 _regvalue=`cat "/proc/registry64/$1" 2> /dev/null`
3140 if test $? -eq 0; then
3145 if test "$_os" = "WINNT"; then
3146 AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
3147 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
3149 WINDOWS_SDK_ARCH="x86"
3151 AC_MSG_RESULT([yes])
3152 WINDOWS_SDK_ARCH="x64"
3157 if test "$cross_compiling" = "yes"; then
3158 export CROSS_COMPILING=TRUE
3159 SCPDEFS="$SCPDEFS -DCROSS_COMPILING"
3162 BUILD_TYPE="$BUILD_TYPE NATIVE"
3164 AC_SUBST(CROSS_COMPILING)
3166 dnl ===================================================================
3167 dnl Is GCC actually Clang?
3168 dnl ===================================================================
3171 if test "$GCC" = "yes"; then
3172 AC_MSG_CHECKING([whether GCC is actually Clang])
3173 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
3179 [AC_MSG_RESULT([yes])
3180 COM_GCC_IS_CLANG=TRUE],
3181 [AC_MSG_RESULT([no])])
3183 if test "$COM_GCC_IS_CLANG" = TRUE; then
3184 AC_MSG_CHECKING([the Clang version])
3185 clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC -E -P -`
3186 CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P -`
3187 CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
3188 AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
3189 AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
3192 AC_SUBST(COM_GCC_IS_CLANG)
3194 if test "$CCACHE" != "" -a "$COM_GCC_IS_CLANG" = TRUE; then
3195 if test -z "$CCACHE_CPP2"; then
3196 AC_MSG_WARN([Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings.])
3197 add_warning "Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings."
3201 dnl ===================================================================
3202 dnl Test the gcc version
3203 dnl ===================================================================
3204 if test "$GCC" = "yes" -a -z "$COM_GCC_IS_CLANG"; then
3205 AC_MSG_CHECKING([the GCC version])
3206 _gcc_version=`$CC -dumpversion`
3207 GCC_VERSION=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
3209 AC_MSG_RESULT([gcc $_gcc_version])
3211 if test "$GCC_VERSION" -lt 0406; then
3212 AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 4.6.0])
3215 # Explicitly force GCC_VERSION to be empty, even for Clang, to check incorrect uses.
3216 # GCC version should generally be checked only when handling GCC-specific bugs, for testing
3217 # things like features configure checks should be used, otherwise they may e.g. fail with Clang
3218 # (which reports itself as GCC 4.2.1).
3221 AC_SUBST(GCC_VERSION)
3223 # ===================================================================
3224 # check various GCC options that Clang does not support now but maybe
3225 # will somewhen in the future, check them even for GCC, so that the
3227 # ===================================================================
3230 HAVE_GCC_FINLINE_LIMIT=
3231 HAVE_GCC_FNO_INLINE=
3232 if test "$GCC" = "yes"; then
3233 AC_MSG_CHECKING([whether $CC supports -ggdb2])
3234 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3235 # Option just ignored and silly warning that isn't a real
3240 CFLAGS="$CFLAGS -Werror -ggdb2"
3241 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_GGDB2=TRUE ],[])
3244 if test "$HAVE_GCC_GGDB2" = "TRUE"; then
3245 AC_MSG_RESULT([yes])
3250 AC_MSG_CHECKING([whether $CC supports -finline-limit=0])
3251 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3256 CFLAGS="$CFLAGS -Werror -finline-limit=0"
3257 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FINLINE_LIMIT=TRUE ],[])
3260 if test "$HAVE_GCC_FINLINE_LIMIT" = "TRUE"; then
3261 AC_MSG_RESULT([yes])
3266 AC_MSG_CHECKING([whether $CC supports -fno-inline])
3267 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3272 CFLAGS="$CFLAGS -Werror -fno-inline"
3273 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_INLINE=TRUE ],[])
3276 if test "$HAVE_GCC_FNO_INLINE" = "TRUE"; then
3277 AC_MSG_RESULT([yes])
3282 AC_SUBST(HAVE_GCC_GGDB2)
3283 AC_SUBST(HAVE_GCC_FINLINE_LIMIT)
3284 AC_SUBST(HAVE_GCC_FNO_INLINE)
3286 HAVE_LD_BSYMBOLIC_FUNCTIONS=
3287 if test "$GCC" = "yes"; then
3288 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
3289 bsymbolic_functions_ldflags_save=$LDFLAGS
3290 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
3291 AC_LINK_IFELSE([AC_LANG_PROGRAM([
3294 printf ("hello world\n");
3295 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
3296 if test "$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "TRUE"; then
3297 AC_MSG_RESULT( found )
3299 AC_MSG_RESULT( not found )
3301 LDFLAGS=$bsymbolic_functions_ldflags_save
3303 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
3305 # Use -isystem (gcc) if possible, to avoid warnigs in 3rd party headers.
3306 # NOTE: must _not_ be used for bundled external libraries!
3308 if test "$GCC" = "yes"; then
3309 AC_MSG_CHECKING( for -isystem )
3311 CFLAGS="$CFLAGS -Werror"
3312 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ ISYSTEM="-isystem " ],[])
3314 if test -n "$ISYSTEM"; then
3320 if test -z "$ISYSTEM"; then
3321 # fall back to using -I
3326 dnl ===================================================================
3327 dnl Check which Visual Studio or MinGW compiler is used
3328 dnl ===================================================================
3330 map_vs_year_to_version()
3332 # Return value: $vsversion
3342 AC_MSG_ERROR([Assertion failure - invalid argument "$1" to map_vs_year_to_version()]);;
3346 vs_versions_to_check()
3348 # Args: $1 (optional) : versions to check, in the order of preference
3349 # Return value: $vsversions
3353 if test -n "$1"; then
3354 map_vs_year_to_version "$1"
3355 vsversions=$vsversion
3357 # By default we prefer 2013, then 2012
3358 vsversions="12.0 11.0"
3364 # Find Visual Studio 2013/2012
3365 # Args: $1 (optional) : versions to check, in the order of preference
3366 # Return value: $vstest
3370 vs_versions_to_check "$1"
3372 for ver in $vsversions; do
3373 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VS/ProductDir
3374 if test -n "$regvalue"; then
3378 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress/$ver/Setup/VS/ProductDir
3379 if test -n "$regvalue"; then
3388 # Find Visual C++ 2013/2012
3389 # Args: $1 (optional) : The VS version year
3390 # Return values: $vctest, $vcyear, $vcnum, $vcnumwithdot
3392 unset vctest vcnum vcnumwithdot vcexpress
3394 vs_versions_to_check "$1"
3396 for ver in $vsversions; do
3397 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VC/ProductDir
3398 if test -n "$regvalue"; then
3402 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress/$ver/Setup/VC/ProductDir
3403 if test -n "$regvalue"; then
3408 if test -n "$vctest"; then
3410 case "$vcnumwithdot" in
3420 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress/$vcnumwithdot/Setup/VC/ProductDir
3421 if test -n "$regvalue" -a "$regvalue" = "$vctest" ; then
3427 SHOWINCLUDES_PREFIX=
3429 if test "$_os" = "WINNT"; then
3430 if test "$WITH_MINGW" != "yes"; then
3431 AC_MSG_CHECKING([Visual C++])
3433 find_msvc "$with_visual_studio"
3435 if test -z "$vctest"; then
3436 if test -n "$with_visual_studio"; then
3437 AC_MSG_ERROR([No Visual Studio $with_visual_studio installation found])
3439 AC_MSG_ERROR([No Visual Studio 2012 or 2013 installation found])
3443 if test "$BITNESS_OVERRIDE" = ""; then
3444 if test -f "$vctest/bin/cl.exe"; then
3445 VC_PRODUCT_DIR=$vctest
3447 AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/cl.exe])
3450 if test -f "$vctest/bin/amd64/cl.exe"; then
3451 VC_PRODUCT_DIR=$vctest
3453 AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/amd64/cl.exe])
3457 VC_PRODUCT_DIR=`win_short_path_for_make "$VC_PRODUCT_DIR"`
3458 AC_MSG_RESULT([$VC_PRODUCT_DIR])
3460 AC_MSG_CHECKING([Is Visual C++ Express])
3461 if test "$vcexpress" = "Express" ; then
3462 AC_MSG_RESULT([Yes])
3467 # Find the proper version of MSBuild.exe to use based on the VS version
3468 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSBuild/$vcnumwithdot/MSBuildOverrideTasksPath
3469 if test -n "$regvalue" ; then
3470 MSBUILD_PATH=`win_short_path_for_make "$regvalue"`
3473 dnl ===========================================================
3474 dnl Check for the corresponding mspdb*.dll
3475 dnl ===========================================================
3479 if test "$BITNESS_OVERRIDE" = ""; then
3480 if test "$vcnum" = "120"; then
3481 MSPDB_PATH="$VC_PRODUCT_DIR/../VC/bin"
3483 MSPDB_PATH="$VC_PRODUCT_DIR/../Common7/IDE"
3486 MSPDB_PATH="$VC_PRODUCT_DIR/bin/amd64"
3491 if test ! -e "$MSPDB_PATH/mspdb${mspdbnum}.dll"; then
3492 AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $MSPDB_PATH, Visual Studio installation broken?])
3495 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
3496 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
3498 dnl The path needs to be added before cl is called
3499 PATH="$MSPDB_PATH:$PATH"
3501 AC_MSG_CHECKING([cl.exe])
3503 # Is there really ever a need to pass CC explicitly? Surely we can hope to get all the
3504 # automagical niceness to work OK? If somebody has some unsupported compiler in some weird
3505 # location, isn't it likely that lots of other things needs changes, too, and just setting CC
3508 if test -z "$CC"; then
3509 if test "$BITNESS_OVERRIDE" = ""; then
3510 if test -f "$VC_PRODUCT_DIR/bin/cl.exe"; then
3511 CC="$VC_PRODUCT_DIR/bin/cl.exe"
3514 if test -f "$VC_PRODUCT_DIR/bin/amd64/cl.exe"; then
3515 CC="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
3519 # This gives us a posix path with 8.3 filename restrictions
3520 CC=`win_short_path_for_make "$CC"`
3523 if test -n "$CC"; then
3524 # Remove /cl.exe from CC case insensitive
3525 AC_MSG_RESULT([found Visual C++ $vcyear $vcexpress ($CC)])
3526 if test "$BITNESS_OVERRIDE" = ""; then
3527 COMPATH=`echo $CC | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
3529 if test -n "$VC_PRODUCT_DIR"; then
3530 # Huh, why not just an assignment?
3531 COMPATH=`echo $VC_PRODUCT_DIR`
3534 if test "$BITNESS_OVERRIDE" = ""; then
3535 CC="$CC -arch:SSE" # MSVC 2012 default for x86 is -arch:SSE2
3537 export INCLUDE=`cygpath -d "$COMPATH/Include"`
3539 PathFormat "$COMPATH"
3540 COMPATH="$formatted_path"
3545 # The WINDOWS_SDK_ACCEPTABLE_VERSIONS is mostly an educated guess... Assuming newer ones
3546 # are always "better", we list them in reverse chronological order.
3551 WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.0 7.1A"
3555 WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.1A 8.1 8.0"
3559 # The expectation is that --with-windows-sdk should not need to be used
3560 if test -n "$with_windows_sdk"; then
3561 case " $WINDOWS_SDK_ACCEPTABLE_VERSIONS " in
3562 *" "$with_windows_sdk" "*)
3563 WINDOWS_SDK_ACCEPTABLE_VERSIONS=$with_windows_sdk
3566 AC_MSG_ERROR([Windows SDK $with_windows_sdk is not known to work with VS $MSVSVER])
3571 # Make AC_COMPILE_IFELSE etc. work (set by AC_PROG_C, which we don't use for MSVC)
3576 AC_MSG_ERROR([Visual C++ not found after all, huh])
3579 dnl We need to guess the prefix of the -showIncludes output, it can be
3581 AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
3582 echo "#include <stdlib.h>" > conftest.c
3583 SHOWINCLUDES_PREFIX=`$CC -c -showIncludes conftest.c 2>/dev/null | \
3584 grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
3585 rm -f conftest.c conftest.obj
3586 if test -z "$SHOWINCLUDES_PREFIX"; then
3587 AC_MSG_ERROR([cannot determine the -showIncludes prefix])
3589 AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
3592 # Check for 64-bit (cross-)compiler to use to build the 64-bit
3593 # version of the Explorer extension (and maybe other small
3594 # bits, too) needed when installing a 32-bit LibreOffice on a
3595 # 64-bit OS. The 64-bit Explorer extension is a feature that
3596 # has been present since long in OOo. Don't confuse it with
3597 # building LibreOffice itself as 64-bit code, which is
3598 # unfinished work and highly experimental.
3604 if test "$BITNESS_OVERRIDE" = ""; then
3605 AC_MSG_CHECKING([for a x64 compiler and libraries for 64-bit Explorer extensions])
3606 if test -f "$VC_PRODUCT_DIR/atlmfc/lib/amd64/atls.lib"; then
3607 # Prefer native x64 compiler to cross-compiler, in case we are running
3608 # the build on a 64-bit OS.
3609 if "$VC_PRODUCT_DIR/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3611 CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
3612 LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/link.exe"
3613 elif "$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3615 CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"
3616 LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/link.exe"
3619 if test "$BUILD_X64" = TRUE; then
3620 AC_MSG_RESULT([found])
3622 AC_MSG_RESULT([not found])
3623 AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
3628 # These are passed to the environment and then used in gbuild/platform/com_MSC_class.mk
3629 AC_SUBST(CXX_X64_BINARY)
3630 AC_SUBST(LINK_X64_BINARY)
3632 AC_MSG_CHECKING([the compiler is MinGW])
3633 MACHINE_PREFIX=`$CC -dumpmachine`
3634 if echo $MACHINE_PREFIX | $GREP -q mingw32; then
3635 COMPATH=`echo "$COMPATH" | sed -e 's,/bin$,,'`
3636 AC_MSG_RESULT([yes])
3638 AC_MSG_ERROR([Compiler is not MinGW.])
3643 PathFormat "$MSPDB_PATH"
3644 MSPDB_PATH="$formatted_path"
3645 AC_SUBST(SHOWINCLUDES_PREFIX)
3647 if test "$_os" = "WINNT" -a "$WITH_MINGW" != yes; then
3648 AC_MSG_CHECKING([whether to use DirectX])
3649 if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
3650 ENABLE_DIRECTX="TRUE"
3651 AC_MSG_RESULT([yes])
3657 AC_MSG_CHECKING([whether to use ActiveX])
3658 if test "$enable_activex" = "yes" -o "$enable_activex" = "" -a "$vcexpress" != Express; then
3660 AC_MSG_RESULT([yes])
3662 DISABLE_ACTIVEX="TRUE"
3666 AC_MSG_CHECKING([whether to use ATL])
3667 if test "$enable_atl" = "yes" -o "$enable_atl" = "" -a "$vcexpress" != Express; then
3669 AC_MSG_RESULT([yes])
3676 DISABLE_ACTIVEX="TRUE"
3680 AC_SUBST(ENABLE_DIRECTX)
3681 AC_SUBST(DISABLE_ACTIVEX)
3682 AC_SUBST(DISABLE_ATL)
3687 if test "$_os" = "WINNT"; then
3688 BUILD_TYPE="$BUILD_TYPE DBGHELP"
3694 UNOWINREG_DLL="185d60944ea767075d27247c3162b3bc-unowinreg.dll"
3695 AC_SUBST(UNOWINREG_DLL)
3698 # prefix C with ccache if needed
3700 if test "$CCACHE" != ""; then
3701 AC_MSG_CHECKING([whether $CC is already ccached])
3705 CFLAGS="$CFLAGS --ccache-skip -O2"
3706 dnl an empty program will do, we're checking the compiler flags
3707 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
3708 [use_ccache=yes], [use_ccache=no])
3709 if test $use_ccache = yes; then
3710 AC_MSG_RESULT([yes])
3719 dnl Set the ENABLE_DBGUTIL variable
3720 dnl ===================================================================
3721 AC_MSG_CHECKING([whether to build with additional debug utilities])
3722 if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
3723 ENABLE_DBGUTIL="TRUE"
3724 # this is an extra var so it can have different default on different MSVC
3725 # versions (in case there are version specific problems with it)
3726 MSVC_USE_DEBUG_RUNTIME="TRUE"
3728 AC_MSG_RESULT([yes])
3729 # cppunit and graphite expose STL in public headers
3730 if test "$with_system_cppunit" = "yes"; then
3731 AC_MSG_ERROR([--with-system-cppunit conflicts with --enable-dbgutil])
3733 with_system_cppunit=no
3735 if test "$with_system_graphite" = "yes"; then
3736 AC_MSG_ERROR([--with-system-graphite conflicts with --enable-dbgutil])
3738 with_system_graphite=no
3740 if test "$with_system_mysql_cppconn" = "yes"; then
3741 AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with --enable-dbgutil])
3743 with_system_mysql_cppconn=no
3745 if test "$with_system_orcus" = "yes"; then
3746 AC_MSG_ERROR([--with-system-orcus conflicts with --enable-dbgutil])
3748 with_system_orcus=no
3750 if test "$with_system_libcmis" = "yes"; then
3751 AC_MSG_ERROR([--with-system-libcmis conflicts with --enable-dbgutil])
3753 with_system_libcmis=no
3755 if test "$with_system_libgltf" = "yes"; then
3756 AC_MSG_ERROR([--with-system-libgltf conflicts with --enable-dbgutil])
3758 with_system_libgltf=no
3760 if test "$enable_win_mozab_driver" = "yes"; then
3761 AC_MSG_ERROR([--enable-win-mozab-driver conflicts with --enable-dbgutil])
3765 MSVC_USE_DEBUG_RUNTIME=""
3768 AC_SUBST(ENABLE_DBGUTIL)
3769 AC_SUBST(MSVC_USE_DEBUG_RUNTIME)
3771 dnl Set the ENABLE_DEBUG variable.
3772 dnl ===================================================================
3773 AC_MSG_CHECKING([whether to do a debug build])
3774 if test -n "$enable_debug" && test "$enable_debug" != "yes" && test "$enable_debug" != "no"; then
3775 AC_MSG_ERROR([--enable-debug now accepts only yes or no, use --enable-selective-debuginfo])
3777 if test -n "$ENABLE_DBGUTIL" -a "$enable_debug" = "no"; then
3778 AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil])
3781 if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no" \) ; then
3783 ANDROID_DEBUGGABLE='android:debuggable="true"'
3784 ANDROID_INSTALL_LOCATION='android:installLocation="internalOnly"'
3785 if test -n "$ENABLE_DBGUTIL" ; then
3786 AC_MSG_RESULT([yes (dbgutil)])
3788 AC_MSG_RESULT([yes])
3792 ANDROID_DEBUGGABLE=""
3793 ANDROID_INSTALL_LOCATION='android:installLocation="preferExternal"'
3796 AC_SUBST(ENABLE_DEBUG)
3797 AC_SUBST(ANDROID_DEBUGGABLE)
3798 AC_SUBST(ANDROID_INSTALL_LOCATION)
3800 if test "$enable_sal_log" = yes; then
3803 AC_SUBST(ENABLE_SAL_LOG)
3805 dnl Selective debuginfo
3806 ENABLE_DEBUGINFO_FOR=
3807 if test -n "$ENABLE_DEBUG"; then
3808 AC_MSG_CHECKING([whether to use selective debuginfo])
3809 if test -n "$enable_selective_debuginfo" -a "$enable_selective_debuginfo" != "no"; then
3810 ENABLE_DEBUGINFO_FOR="$enable_selective_debuginfo"
3811 AC_MSG_RESULT([for "$enable_selective_debuginfo"])
3813 ENABLE_DEBUGINFO_FOR=all
3814 AC_MSG_RESULT([no, for all])
3817 AC_SUBST(ENABLE_DEBUGINFO_FOR)
3819 dnl Check for enable symbols option
3820 dnl ===================================================================
3821 AC_MSG_CHECKING([whether to include symbols while preserve optimization])
3822 if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
3823 ENABLE_SYMBOLS="TRUE"
3824 if test -n "$ENABLE_DBGUTIL"; then
3825 AC_MSG_ERROR([--enable-dbgutil cannot be used with --enable-symbols])
3826 elif test -n "$ENABLE_DEBUG"; then
3827 AC_MSG_ERROR([--enable-debug cannot be used with --enable-symbols])
3829 AC_MSG_RESULT([yes])
3831 if test -n "$enable_symbols" -a "$enable_symbols" = "no"; then
3832 ENABLE_SYMBOLS="FALSE"
3838 AC_SUBST(ENABLE_SYMBOLS)
3840 # Debug information format for iOS. Running dsymutil takes a long time... you really need a separate
3841 # .dSYM only if running Instruments, I think. (Not for normal debugging in Xcode.) To enable a
3842 # separate .dSYM, either use --enable-release-build or change manually to "DWARF with DSYM" in Xcode.
3843 XCODE_DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
3844 if test "$enable_release_build" != yes -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE_DEBUG" -o -n "$ENABLE_DBGUTIL" \); then
3845 XCODE_DEBUG_INFORMATION_FORMAT=dwarf
3847 AC_SUBST(XCODE_DEBUG_INFORMATION_FORMAT)
3849 # Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
3850 # By default use the ones specified by our build system,
3851 # but explicit override is possible.
3852 AC_MSG_CHECKING(for explicit AFLAGS)
3853 if test -n "$AFLAGS"; then
3854 AC_MSG_RESULT([$AFLAGS])
3860 AC_MSG_CHECKING(for explicit CFLAGS)
3861 if test -n "$CFLAGS"; then
3862 AC_MSG_RESULT([$CFLAGS])
3868 AC_MSG_CHECKING(for explicit CXXFLAGS)
3869 if test -n "$CXXFLAGS"; then
3870 AC_MSG_RESULT([$CXXFLAGS])
3876 AC_MSG_CHECKING(for explicit OBJCFLAGS)
3877 if test -n "$OBJCFLAGS"; then
3878 AC_MSG_RESULT([$OBJCFLAGS])
3884 AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
3885 if test -n "$OBJCXXFLAGS"; then
3886 AC_MSG_RESULT([$OBJCXXFLAGS])
3892 AC_MSG_CHECKING(for explicit LDFLAGS)
3893 if test -n "$LDFLAGS"; then
3894 AC_MSG_RESULT([$LDFLAGS])
3904 AC_SUBST(OBJCXXFLAGS)
3908 AC_SUBST(x_CXXFLAGS)
3909 AC_SUBST(x_OBJCFLAGS)
3910 AC_SUBST(x_OBJCXXFLAGS)
3914 # determine CPUNAME, GUIBASE, ...
3927 PLATFORMID=aix_powerpc
3936 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
3943 if test "$BITNESS_OVERRIDE" = 64; then
3946 PLATFORMID=windows_x86_64
3950 PLATFORMID=windows_x86
3954 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3957 SCPDEFS="$SCPDEFS -D_MSC_VER"
3975 AC_MSG_ERROR([Can't build 64-bit code in 32-bit OS])
3980 PLATFORMID=macosx_x86_64
3983 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
3999 PLATFORMID=dragonfly_x86
4004 PLATFORMID=dragonfly_x86_64
4007 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4023 PLATFORMID=freebsd_x86
4028 PLATFORMID=freebsd_x86_64
4031 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4048 PLATFORMID=kfreebsd_x86
4053 PLATFORMID=kfreebsd_x86_64
4056 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4072 PLATFORMID=linux_aarch64
4078 PLATFORMID=linux_alpha
4084 PLATFORMID=linux_arm_eabi
4088 PLATFORMID=linux_arm_oabi
4096 PLATFORMID=linux_hppa
4101 PLATFORMID=linux_x86
4106 PLATFORMID=linux_ia64
4112 PLATFORMID=linux_mips_eb
4117 EPM_FLAGS="-a mips64"
4118 PLATFORMID=linux_mips_eb
4123 EPM_FLAGS="-a mips64el"
4124 PLATFORMID=linux_mips_el
4129 EPM_FLAGS="-a mipsel"
4130 PLATFORMID=linux_mips_el
4135 PLATFORMID=linux_m68k
4140 PLATFORMID=linux_powerpc
4145 PLATFORMID=linux_powerpc64
4149 RTL_ARCH=PowerPC_64_LE
4150 PLATFORMID=linux_powerpc64_le
4155 PLATFORMID=linux_sparc
4160 PLATFORMID=linux_s390
4165 PLATFORMID=linux_s390x
4170 PLATFORMID=linux_x86_64
4173 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4190 PLATFORMID=android_arm_eabi
4195 PLATFORMID=android_aarch64
4198 CPUNAME=GODSON # Weird, but maybe that's the LO convention?
4200 PLATFORMID=android_mips_el
4205 PLATFORMID=android_x86
4208 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4222 if test "$BITNESS_OVERRIDE" = 64; then
4225 PLATFORMID=windows_x86_64
4226 SOLARINC="$SOLARINC -I$SRC_ROOT/include/wntgccx"
4230 PLATFORMID=windows_x86
4231 SOLARINC="$SOLARINC -I$SRC_ROOT/include/wntgcci"
4235 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4252 PLATFORMID=netbsd_x86
4257 PLATFORMID=netbsd_powerpc
4262 PLATFORMID=netbsd_sparc
4267 PLATFORMID=netbsd_x86_64
4270 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4286 PLATFORMID=openbsd_x86
4291 PLATFORMID=openbsd_x86_64
4294 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4297 SOLARINC="$SOLARINC -I/usr/local/include"
4312 PLATFORMID=solaris_x86
4317 PLATFORMID=solaris_sparc
4322 PLATFORMID=solaris_sparc64
4325 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4328 SOLARINC="$SOLARINC -I/usr/local/include"
4332 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
4336 if test "$with_x" = "no"; then
4337 if test "$GUIBASE" != "unx"; then
4338 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice with --without-x])
4343 WORKDIR="${BUILDDIR}/workdir"
4344 INSTDIR="${BUILDDIR}/instdir"
4345 INSTROOT="${INSTDIR}${INSTROOTSUFFIX}"
4346 SOLARINC="-I. -I$SRC_ROOT/include $SOLARINC"
4354 AC_SUBST([INSTROOT])
4358 AC_SUBST(PLATFORMID)
4359 AC_DEFINE_UNQUOTED(WORKDIR,"$WORKDIR")
4361 dnl ===================================================================
4362 dnl Test which package format to use
4363 dnl ===================================================================
4364 AC_MSG_CHECKING([which package format to use])
4365 if test -n "$with_package_format" -a "$with_package_format" != no; then
4366 for i in $with_package_format; do
4368 aix | bsd | deb | pkg | rpm | archive | dmg | installed | msi)
4371 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
4372 aix - AIX software distribution
4373 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
4374 deb - Debian software distribution
4375 pkg - Solaris software distribution
4376 rpm - RedHat software distribution
4378 LibreOffice additionally supports:
4379 archive - .tar.gz or .zip
4381 installed - installation tree
4387 PKGFORMAT="$with_package_format"
4388 AC_MSG_RESULT([$PKGFORMAT])
4391 AC_MSG_RESULT([none])
4395 dnl ===================================================================
4396 dnl Set up a different compiler to produce tools to run on the build
4397 dnl machine when doing cross-compilation
4398 dnl ===================================================================
4400 m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
4401 if test "$cross_compiling" = "yes"; then
4402 AC_MSG_CHECKING([for BUILD platform configuration])
4404 rm -rf CONF-FOR-BUILD config_build.mk
4405 mkdir CONF-FOR-BUILD
4406 # Here must be listed all files needed when running the configure script. In particular, also
4407 # those expanded by the AC_CONFIG_FILES() call near the end of this configure.ac. For clarity,
4408 # keep them in the same order as there.
4409 (cd $SRC_ROOT && tar cf - \
4411 bin/get_config_variables \
4412 solenv/bin/getcompver.awk \
4413 solenv/inc/langlist.mk \
4414 android/experimental/LOAndroid3/AndroidManifest.xml.in \
4418 instsetoo_native/util/openoffice.lst.in \
4420 sysui/desktop/macosx/Info.plist.in \
4421 ios/lo.xcconfig.in) \
4422 | (cd CONF-FOR-BUILD && tar xf -)
4423 cp configure CONF-FOR-BUILD
4424 test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host 2>/dev/null
4426 unset COM GUIBASE OS CPUNAME
4427 unset CC CXX SYSBASE CFLAGS
4428 unset AR NM OBJDUMP PKG_CONFIG RANLIB READELF STRIP
4429 unset CPPUNIT_CFLAGS CPPUNIT_LIBS
4430 unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC
4431 test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
4432 test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
4433 test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
4436 test -n "$enable_ccache" && sub_conf_opts="$sub_conf_opts --enable-ccache=$enable_ccache"
4437 test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
4438 test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
4439 test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
4440 test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu"
4441 # we need the msi build tools on mingw if we are creating the
4443 if test "$WITH_MINGW" = "yes"; then
4444 enable_winegcc_for_build=
4445 for pkgformat in $PKGFORMAT; do
4446 case "$pkgformat" in
4447 msi|native) enable_winegcc_for_build=yes ;;
4450 test -n "$enable_winegcc_for_build" && sub_conf_opts="$sub_conf_opts --enable-winegcc"
4452 sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
4453 # Don't bother having configure look for stuff not needed for the build platform anyway
4456 --disable-graphite \
4457 --disable-pdfimport \
4458 --disable-postgresql-sdbc \
4459 --with-parallelism="$with_parallelism" \
4464 2>&1 | sed -e 's/^/ /'
4465 test -f ./config_host.mk 2>/dev/null || exit
4466 cp config_host.mk ../config_build.mk
4467 mv config.log ../config.Build.log
4468 mkdir -p ../config_build
4469 mv config_host/*.h ../config_build
4470 . ./bin/get_config_variables CC CXX INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS PATH SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT WORKDIR
4472 for V in CC CXX LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT; do
4474 VV=`eval "echo $VV"`
4475 if test -n "$VV"; then
4476 line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
4477 echo "$line" >>build-config
4481 for V in INSTDIR INSTROOT WORKDIR; do
4483 VV=`eval "echo $VV"`
4484 VV=`echo $VV | sed -e "s,/CONF-FOR-BUILD/\([[a-z]]*\),/\1_for_build,g"`
4485 if test -n "$VV"; then
4486 line="${V}_FOR_BUILD='$VV'"
4487 echo "$line" >>build-config
4491 line=`echo "LO_PATH_FOR_BUILD=$PATH" | sed -e 's,/CONF-FOR-BUILD,,g'`
4492 echo "$line" >>build-config
4495 test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
4496 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])
4497 perl -pi -e 's,/(workdir|instdir)(/|$),/\1_for_build\2,g;' \
4498 -e 's,/CONF-FOR-BUILD,,g;' config_build.mk
4500 eval `cat CONF-FOR-BUILD/build-config`
4502 AC_MSG_RESULT([checking for BUILD platform configuration... done])
4504 rm -rf CONF-FOR-BUILD
4508 CXX_FOR_BUILD="$CXX"
4509 INSTDIR_FOR_BUILD="$INSTDIR"
4510 INSTROOT_FOR_BUILD="$INSTROOT"
4511 LIBO_BIN_FOLDER_FOR_BUILD="$LIBO_BIN_FOLDER"
4512 LIBO_LIB_FOLDER_FOR_BUILD="$LIBO_LIB_FOLDER"
4513 LIBO_URE_LIB_FOLDER_FOR_BUILD="$LIBO_URE_LIB_FOLDER"
4514 SDKDIRNAME_FOR_BUILD="$SDKDIRNAME"
4515 WORKDIR_FOR_BUILD="$WORKDIR"
4517 AC_SUBST(OS_FOR_BUILD)
4518 AC_SUBST(INSTDIR_FOR_BUILD)
4519 AC_SUBST(INSTROOT_FOR_BUILD)
4520 AC_SUBST(LIBO_BIN_FOLDER_FOR_BUILD)
4521 AC_SUBST(LIBO_LIB_FOLDER_FOR_BUILD)
4522 AC_SUBST(LIBO_URE_LIB_FOLDER_FOR_BUILD)
4523 AC_SUBST(SDKDIRNAME_FOR_BUILD)
4524 AC_SUBST(WORKDIR_FOR_BUILD)
4526 dnl ===================================================================
4527 dnl Check for syslog header
4528 dnl ===================================================================
4529 AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG_H))
4531 dnl ===================================================================
4532 dnl Set the ENABLE_CRASHDUMP variable.
4533 dnl ===================================================================
4534 AC_MSG_CHECKING([whether to enable crashdump feature])
4535 if test "$enable_crashdump" = "yes"; then
4536 ENABLE_CRASHDUMP="TRUE"
4537 BUILD_TYPE="$BUILD_TYPE CRASHREP"
4538 AC_MSG_RESULT([yes])
4539 AC_DEFINE(HAVE_FEATURE_CRASHDUMP)
4544 AC_SUBST(ENABLE_CRASHDUMP)
4547 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
4548 dnl ===================================================================
4549 AC_MSG_CHECKING([whether to turn warnings to errors])
4550 if test -n "$enable_werror" -a "$enable_werror" != "no"; then
4551 ENABLE_WERROR="TRUE"
4552 AC_MSG_RESULT([yes])
4556 AC_SUBST(ENABLE_WERROR)
4558 dnl Set the ASSERT_ALWAYS_ABORT variable. (Activate --enable-assert-always-abort)
4559 dnl ===================================================================
4560 AC_MSG_CHECKING([whether to have assert to abort in release code])
4561 if test -n "$enable_assert_always_abort" -a "$enable_assert_always_abort" = "yes"; then
4562 ASSERT_ALWAYS_ABORT="TRUE"
4563 AC_MSG_RESULT([yes])
4565 ASSERT_ALWAYS_ABORT="FALSE"
4568 AC_SUBST(ASSERT_ALWAYS_ABORT)
4570 # Determine whether to use ooenv for the instdir installation
4571 # ===================================================================
4572 if test $_os != "WINNT" -a $_os != "Darwin"; then
4573 AC_MSG_CHECKING([whether to use ooenv for the instdir installation])
4574 if test "$enable_ooenv" = "no"; then
4578 AC_MSG_RESULT([yes])
4581 AC_SUBST(ENABLE_OOENV)
4583 if test "$with_x" = "no"; then
4584 # be sure to do not mess with uneeded stuff
4591 build_gstreamer_1_0=no
4592 build_gstreamer_0_10=no
4596 enable_cairo_canvas=no
4600 dnl ===================================================================
4601 dnl check for cups support
4602 dnl ===================================================================
4605 if test "$enable_cups" = "no"; then
4609 AC_MSG_CHECKING([whether to enable CUPS support])
4610 if test "$test_cups" = "yes"; then
4612 AC_MSG_RESULT([yes])
4614 AC_MSG_CHECKING([whether cups support is present])
4615 AC_CHECK_LIB([cups], [cupsPrintFiles], [:])
4616 AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
4617 if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -o "$ac_cv_header_cups_cups_h" != "yes"; then
4618 AC_MSG_ERROR([Could not find CUPS. Install libcups2-dev or cups-devel.])
4625 AC_SUBST(ENABLE_CUPS)
4628 if test "$test_fontconfig" = "yes"; then
4629 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.4.1])
4630 SYSTEM_FONTCONFIG=TRUE
4632 AC_SUBST(FONTCONFIG_CFLAGS)
4633 AC_SUBST(FONTCONFIG_LIBS)
4634 AC_SUBST([SYSTEM_FONTCONFIG])
4636 dnl whether to find & fetch external tarballs?
4637 dnl ===================================================================
4638 if test -z "$TARFILE_LOCATION" -a -n "$LODE_HOME" ; then
4639 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
4640 TARFILE_LOCATION="`cygpath -m $LODE_HOME/ext_tar`"
4642 TARFILE_LOCATION="$LODE_HOME/ext_tar"
4645 if test -z "$TARFILE_LOCATION"; then
4646 if test -d "$SRC_ROOT/src" ; then
4647 mv "$SRC_ROOT/src" "$SRC_ROOT/external/tarballs"
4648 ln -s "$SRC_ROOT/external/tarballs" "$SRC_ROOT/src"
4650 TARFILE_LOCATION="$SRC_ROOT/external/tarballs"
4652 AbsolutePath "$TARFILE_LOCATION"
4653 PathFormat "${absolute_path}"
4654 TARFILE_LOCATION="${formatted_path}"
4656 AC_SUBST(TARFILE_LOCATION)
4658 AC_MSG_CHECKING([whether we want to fetch tarballs])
4659 if test "$enable_fetch_external" != "no"; then
4660 if test "$with_all_tarballs" = "yes"; then
4661 AC_MSG_RESULT(["yes, all of them"])
4662 DO_FETCH_TARBALLS="ALL"
4664 AC_MSG_RESULT(["yes, if we use them"])
4665 DO_FETCH_TARBALLS="TRUE"
4671 AC_SUBST(DO_FETCH_TARBALLS)
4673 AC_MSG_CHECKING([whether to build help])
4674 HELP_COMMON_ONLY=FALSE
4675 if test -n "$with_help" -a "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
4676 BUILD_TYPE="$BUILD_TYPE HELP"
4677 GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
4678 if test "$with_help" = "common" ; then
4679 HELP_COMMON_ONLY=TRUE
4680 AC_MSG_RESULT([common only])
4682 SCPDEFS="$SCPDEFS -DWITH_HELP"
4683 AC_MSG_RESULT([yes])
4688 AC_SUBST(HELP_COMMON_ONLY)
4690 dnl Test whether to include MySpell dictionaries
4691 dnl ===================================================================
4692 AC_MSG_CHECKING([whether to include MySpell dictionaries])
4693 if test "$with_myspell_dicts" = "yes"; then
4694 AC_MSG_RESULT([yes])
4695 WITH_MYSPELL_DICTS=TRUE
4696 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
4697 GIT_NEEDED_SUBMODULES="dictionaries $GIT_NEEDED_SUBMODULES"
4702 AC_SUBST(WITH_MYSPELL_DICTS)
4704 # There are no "system" myspell, hyphen or mythes dictionaries on OS X, Windows, Android or iOS.
4705 if test $_os = Darwin -o $_os = WINNT -o $_os = iOS -o $_os = Android; then
4706 if test "$with_system_dicts" = yes; then
4707 AC_MSG_ERROR([There are no system dicts on this OS in the formats the 3rd-party libs we use expect]);
4709 with_system_dicts=no
4712 AC_MSG_CHECKING([whether to use dicts from external paths])
4713 if test -z "$with_system_dicts" -o "$with_system_dicts" != "no"; then
4714 AC_MSG_RESULT([yes])
4716 AC_MSG_CHECKING([for spelling dictionary directory])
4717 if test -n "$with_external_dict_dir"; then
4718 DICT_SYSTEM_DIR=file://$with_external_dict_dir
4720 DICT_SYSTEM_DIR=file:///usr/share/hunspell
4721 if test ! -d /usr/share/hunspell -a -d /usr/share/myspell; then
4722 DICT_SYSTEM_DIR=file:///usr/share/myspell
4725 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
4726 AC_MSG_CHECKING([for hyphenation patterns directory])
4727 if test -n "$with_external_hyph_dir"; then
4728 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
4730 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
4732 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
4733 AC_MSG_CHECKING([for thesaurus directory])
4734 if test -n "$with_external_thes_dir"; then
4735 THES_SYSTEM_DIR=file://$with_external_thes_dir
4737 THES_SYSTEM_DIR=file:///usr/share/mythes
4739 AC_MSG_RESULT([$THES_SYSTEM_DIR])
4744 AC_SUBST(SYSTEM_DICTS)
4745 AC_SUBST(DICT_SYSTEM_DIR)
4746 AC_SUBST(HYPH_SYSTEM_DIR)
4747 AC_SUBST(THES_SYSTEM_DIR)
4749 dnl ===================================================================
4750 AC_MSG_CHECKING([whether to enable pch feature])
4751 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
4752 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
4754 AC_MSG_RESULT([yes])
4755 elif test "$GCC" = "yes"; then
4757 AC_MSG_RESULT([yes])
4760 AC_MSG_ERROR([Precompiled header not yet supported for your platform/compiler])
4766 AC_SUBST(ENABLE_PCH)
4770 AC_MSG_CHECKING([the GNU Make version])
4771 _make_version=`$GNUMAKE --version | grep GNU | $GREP -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
4772 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
4773 if test "$_make_longver" -ge "038200"; then
4774 AC_MSG_RESULT([$GNUMAKE $_make_version])
4776 elif test "$_make_longver" -ge "038100"; then
4777 if test "$build_os" = "cygwin"; then
4778 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.82 needed])
4780 AC_MSG_RESULT([$GNUMAKE $_make_version])
4782 dnl ===================================================================
4783 dnl Search all the common names for sha1sum
4784 dnl ===================================================================
4785 AC_CHECK_PROGS(SHA1SUM, sha1sum sha1 shasum openssl)
4786 if test -z "$SHA1SUM"; then
4787 AC_MSG_ERROR([install the approproate SHA-1 checksumming program for this OS])
4788 elif test "$SHA1SUM" = "openssl"; then
4789 SHA1SUM="openssl sha1"
4791 AC_MSG_CHECKING([for GNU Make bug 20033])
4792 TESTGMAKEBUG20033=`mktemp -d tmp.XXXXXX`
4793 $SED -e "s/<TAB>/$TAB/g" > $TESTGMAKEBUG20033/Makefile << EOF
4794 A := \$(wildcard *.a)
4798 <TAB>@echo survived bug20033.
4802 <TAB>@touch 1.a 2.a 3.a 4.a 5.a 6.a
4815 <TAB>\$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | $SHA1SUM))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\
4816 <TAB>\$(call d1,\$(CHECKSUM)),\
4817 <TAB>\$(call d2,\$(CHECKSUM)))
4819 if test -z "`(cd $TESTGMAKEBUG20033 && $GNUMAKE setup && $GNUMAKE -j)|grep survived`"; then
4820 no_parallelism_make="YES"
4821 AC_MSG_RESULT([yes, disable parallelism])
4823 AC_MSG_RESULT([no, keep parallelism enabled])
4825 rm -rf $TESTGMAKEBUG20033
4827 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
4830 # find if gnumake support file function
4831 AC_MSG_CHECKING([whether GNU Make supports the 'file' function])
4832 TESTGMAKEFILEFUNC="`mktemp -d -t tst.XXXXXX`"
4833 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
4834 TESTGMAKEFILEFUNC=`cygpath -m $TESTGMAKEFILEFUNC`
4836 $SED -e "s/<TAB>/$TAB/" > $TESTGMAKEFILEFUNC/Makefile << EOF
4837 \$(file >test.txt,Success )
4844 $GNUMAKE -C $TESTGMAKEFILEFUNC 2>/dev/null 1>&2
4845 if test -f $TESTGMAKEFILEFUNC/test.txt; then
4846 HAVE_GNUMAKE_FILE_FUNC=TRUE
4847 AC_MSG_RESULT([yes])
4851 rm -rf $TESTGMAKEFILEFUNC
4852 AC_SUBST(HAVE_GNUMAKE_FILE_FUNC)
4853 AC_SUBST(GNUMAKE_WIN_NATIVE)
4855 _make_ver_check=`$GNUMAKE --version | grep "Built for Windows"`
4857 if test "$_make_ver_check" = ""; then
4861 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
4862 SHELL_BASH=$(cygpath -m $(which bash))
4864 SHELL_BASH=`which bash`
4866 AC_SUBST(SHELL_BASH)
4868 HAVE_LD_HASH_STYLE=FALSE
4869 WITH_LINKER_HASH_STYLE=
4870 AC_MSG_CHECKING( for --hash-style gcc linker support )
4871 if test "$GCC" = "yes"; then
4872 if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes"; then
4873 hash_styles="gnu sysv"
4874 elif test "$with_linker_hash_style" = "no"; then
4877 hash_styles="$with_linker_hash_style"
4880 for hash_style in $hash_styles; do
4881 test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
4882 hash_style_ldflags_save=$LDFLAGS
4883 LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
4885 AC_RUN_IFELSE([AC_LANG_PROGRAM(
4892 HAVE_LD_HASH_STYLE=TRUE
4893 WITH_LINKER_HASH_STYLE=$hash_style
4895 [HAVE_LD_HASH_STYLE=FALSE],
4896 [HAVE_LD_HASH_STYLE=FALSE])
4897 LDFLAGS=$hash_style_ldflags_save
4900 if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
4901 AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
4905 LDFLAGS=$hash_style_ldflags_save
4909 AC_SUBST(HAVE_LD_HASH_STYLE)
4910 AC_SUBST(WITH_LINKER_HASH_STYLE)
4912 dnl ===================================================================
4913 dnl Check whether there's a Perl version available.
4914 dnl ===================================================================
4915 if test -z "$with_perl_home"; then
4916 AC_PATH_PROG(PERL, perl)
4918 test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
4919 _perl_path="$with_perl_home/bin/perl"
4920 if test -x "$_perl_path"; then
4923 AC_MSG_ERROR([$_perl_path not found])
4927 dnl ===================================================================
4928 dnl Testing for Perl version 5 or greater.
4929 dnl $] is the Perl version variable, it is returned as an integer
4930 dnl ===================================================================
4931 if test "$PERL"; then
4932 AC_MSG_CHECKING([the Perl version])
4933 ${PERL} -e "exit($]);"
4935 if test "$_perl_version" -lt 5; then
4936 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
4938 AC_MSG_RESULT([checked (perl $_perl_version)])
4940 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
4943 dnl ===================================================================
4944 dnl Testing for required Perl modules
4945 dnl ===================================================================
4947 AC_MSG_CHECKING([for required Perl modules])
4948 if `$PERL -e 'use Archive::Zip; use Cwd; use Digest::MD5'>/dev/null 2>&1`; then
4949 AC_MSG_RESULT([all modules found])
4951 AC_MSG_RESULT([failed to find some modules])
4952 # Find out which modules are missing.
4953 missing_perl_modules=
4954 if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then
4955 missing_perl_modules=Archive::Zip
4957 if ! `$PERL -e 'use Cwd;'>/dev/null 2>&1`; then
4958 missing_perl_modules="$missing_perl_modules Cwd"
4960 if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then
4961 missing_perl_modules="$missing_perl_modules Digest::MD5"
4964 The missing Perl modules are: $missing_perl_modules
4965 Install them as superuser/administrator with "cpan -i $missing_perl_modules"])
4968 dnl ===================================================================
4969 dnl Check for pkg-config
4970 dnl ===================================================================
4971 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
4975 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
4977 # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
4978 # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
4979 # explicitly. Or put /path/to/compiler in PATH yourself.
4981 AC_CHECK_TOOL(AR,ar)
4982 AC_CHECK_TOOL(NM,nm)
4983 AC_CHECK_TOOL(OBJDUMP,objdump)
4984 AC_CHECK_TOOL(RANLIB,ranlib)
4985 AC_CHECK_TOOL(READELF,readelf)
4986 AC_CHECK_TOOL(STRIP,strip)
4987 if test "$_os" = "WINNT"; then
4988 AC_CHECK_TOOL(DLLTOOL,dlltool)
4989 AC_CHECK_TOOL(WINDRES,windres)
4996 AC_SUBST(PKG_CONFIG)
5002 dnl ===================================================================
5003 dnl pkg-config checks on Mac OS X
5004 dnl ===================================================================
5006 if test $_os = Darwin; then
5007 AC_MSG_CHECKING([for bogus pkg-config])
5008 if test -n "$PKG_CONFIG"; then
5009 if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | $GREP -q Mono.framework; then
5010 AC_MSG_ERROR([yes, from Mono. This *will* break the build. Please remove or hide $PKG_CONFIG])
5012 if test "$enable_bogus_pkg_config" = "yes"; then
5013 AC_MSG_RESULT([yes, user-approved from unknown origin.])
5015 AC_MSG_ERROR([yes, from unknown origin. This *will* break the build. Please remove or hide $PKG_CONFIG])
5019 AC_MSG_RESULT([no, good])
5025 # Return value: $csctest
5029 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client/InstallPath"
5030 if test -n "$regvalue"; then
5038 # Return value: $altest
5042 for x in `ls /proc/registry32/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft\ SDKs/Windows`; do
5043 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/$x/WinSDK-NetFx40Tools/InstallationFolder"
5044 if test -n "$regvalue" -a \( -f "$regvalue/al.exe" -o -f "$regvalue/bin/al.exe" \); then
5053 # Return value: $frametest (that's a silly name...)
5057 for ver in 1.1 2.0; do
5058 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/.NETFramework/sdkInstallRootv$ver
5059 if test -n "$regvalue"; then
5066 find_winsdk_version()
5068 # Args: $1 : SDK version as in "6.0A", "7.0" etc
5069 # Return values: $winsdktest, $winsdklibsubdir
5071 unset winsdktest winsdklibsubdir
5073 # Why we look for them in this particular order I don't know. But OTOH I
5076 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/InstallationFolder"
5077 if test -n "$regvalue"; then
5078 winsdktest=$regvalue
5084 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot81"
5085 if test -n "$regvalue"; then
5086 winsdktest=$regvalue
5087 winsdklibsubdir=winv6.3
5092 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot"
5093 if test -n "$regvalue"; then
5094 winsdktest=$regvalue
5095 winsdklibsubdir=win8
5104 # Args: $1 (optional) : list of acceptable SDK versions
5105 # Return value: $winsdktest
5109 if test -n "$1"; then
5112 sdkversions="$WINDOWS_SDK_ACCEPTABLE_VERSIONS"
5115 for ver in $sdkversions; do
5116 find_winsdk_version $ver
5117 if test -n "$winsdktest"; then
5125 for ver in 10.0 11.0; do
5126 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VS/MSMDir
5127 if test -n "$regvalue"; then
5128 if test -e "$regvalue/Microsoft_VC${VCVER}_CRT_x86.msm"; then
5134 if test -z "$msmdir"; then
5135 AC_MSG_NOTICE([no registry entry for Merge Module directory - trying "${COMMONPROGRAMFILES}/Merge Modules/"])
5136 msmdir="${COMMONPROGRAMFILES}/Merge Modules/"
5138 msmdir=`cygpath -m "$msmdir"`
5139 if test -z "$msmdir"; then
5140 if test "$ENABLE_RELEASE_BUILD" = "TRUE" ; then
5141 AC_MSG_ERROR([Merge modules not found in $msmdir])
5143 AC_MSG_WARN([Merge modules not found in $msmdir])
5149 find_msvc_x64_dlls()
5151 msvcdllpath="$VC_PRODUCT_DIR/redist/x64/Microsoft.VC${VCVER}.CRT"
5152 msvcdlls="msvcp${VCVER}.dll msvcr${VCVER}.dll"
5153 for dll in $msvcdlls; do
5154 if ! test -f "$msvcdllpath/$dll"; then
5155 AC_MSG_ERROR([can not find $dll in $msvcdllpath])
5160 if test "$build_os" = "cygwin"; then
5162 AC_MSG_CHECKING([for midl.exe])
5165 if test -f "$winsdktest/Bin/midl.exe"; then
5166 MIDL_PATH="$winsdktest/Bin"
5167 elif test -f "$winsdktest/Bin/$WINDOWS_SDK_ARCH/midl.exe"; then
5168 MIDL_PATH="$winsdktest/Bin/$WINDOWS_SDK_ARCH"
5170 if test ! -f "$MIDL_PATH/midl.exe"; then
5171 AC_MSG_ERROR([midl.exe not found in $winsdktest/Bin/$WINDOWS_SDK_ARCH, Windows SDK installation broken?])
5173 AC_MSG_RESULT([$MIDL_PATH/midl.exe])
5176 # Convert to posix path with 8.3 filename restrictions ( No spaces )
5177 MIDL_PATH=`win_short_path_for_make "$MIDL_PATH"`
5180 AC_MSG_CHECKING([for csc.exe])
5182 if test -f "$csctest/csc.exe"; then
5185 if test ! -f "$CSC_PATH/csc.exe"; then
5186 AC_MSG_ERROR([csc.exe not found as $CSC_PATH/csc.exe])
5188 AC_MSG_RESULT([$CSC_PATH/csc.exe])
5191 CSC_PATH=`win_short_path_for_make "$CSC_PATH"`
5194 AC_MSG_CHECKING([for al.exe])
5196 if test -f "$winsdktest/Bin/al.exe"; then
5197 AL_PATH="$winsdktest/Bin"
5198 elif test -f "$winsdktest/Bin/$WINDOWS_SDK_ARCH/al.exe"; then
5199 AL_PATH="$winsdktest/Bin/$WINDOWS_SDK_ARCH"
5202 if test -z "$AL_PATH"; then
5204 if test -f "$altest/bin/al.exe"; then
5205 AL_PATH="$altest/bin"
5206 elif test -f "$altest/al.exe"; then
5210 if test ! -f "$AL_PATH/al.exe"; then
5211 AC_MSG_ERROR([al.exe not found as $AL_PATH/al.exe])
5213 AC_MSG_RESULT([$AL_PATH/al.exe])
5216 AL_PATH=`win_short_path_for_make "$AL_PATH"`
5218 dnl Check mscoree.lib / .NET Framework dir
5219 AC_MSG_CHECKING(.NET Framework)
5221 if test -f "$frametest/lib/mscoree.lib"; then
5222 DOTNET_FRAMEWORK_HOME="$frametest"
5225 if test -f "$winsdktest/lib/mscoree.lib" -o -f "$winsdktest/lib/$winsdklibsubdir/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
5226 DOTNET_FRAMEWORK_HOME="$winsdktest"
5230 if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib" -a ! -f "$DOTNET_FRAMEWORK_HOME/lib/$winsdklibsubdir/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
5231 AC_MSG_ERROR([mscoree.lib not found])
5233 AC_MSG_RESULT(found)
5235 PathFormat "$MIDL_PATH"
5236 MIDL_PATH="$formatted_path"
5238 PathFormat "$AL_PATH"
5239 AL_PATH="$formatted_path"
5241 PathFormat "$DOTNET_FRAMEWORK_HOME"
5242 DOTNET_FRAMEWORK_HOME="$formatted_path"
5244 PathFormat "$CSC_PATH"
5245 CSC_PATH="$formatted_path"
5248 dnl ===================================================================
5249 dnl Check if stdc headers are available excluding MSVC.
5250 dnl ===================================================================
5251 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5255 dnl ===================================================================
5256 dnl Testing for C++ compiler and version...
5257 dnl ===================================================================
5259 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5260 # AC_PROG_CXX sets CXXFLAGS to -g -O2 if not set, avoid that
5261 save_CXXFLAGS=$CXXFLAGS
5263 CXXFLAGS=$save_CXXFLAGS
5265 if test -n "$CC" -a -z "$CXX"; then
5270 dnl check for GNU C++ compiler version
5271 if test "$GXX" = "yes"; then
5272 AC_MSG_CHECKING([the GNU C++ compiler version])
5274 _gpp_version=`$CXX -dumpversion`
5275 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
5277 if test "$_gpp_majmin" -lt "401"; then
5278 AC_MSG_ERROR([You need to use GNU C++ compiler version >= 4.1 to build LibreOffice, you have $_gpp_version.])
5280 AC_MSG_RESULT([checked (g++ $_gpp_version)])
5283 dnl see https://code.google.com/p/android/issues/detail?id=41770
5284 if test "$_gpp_majmin" -ge "401"; then
5288 AC_MSG_CHECKING([whether $CXX is broken with boost.thread])
5289 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
5290 #include <bits/c++config.h>]],[[
5291 #if !defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
5292 && !defined(_GLIBCXX__PTHREADS) \
5293 && !defined(_GLIBCXX_HAS_GTHREADS)
5296 ]])],[AC_MSG_RESULT([yes])
5297 glibcxx_threads=yes],[AC_MSG_RESULT([no])])
5299 if test $glibcxx_threads = yes; then
5300 BOOST_CXXFLAGS="-D_GLIBCXX_HAS_GTHREADS"
5304 AC_SUBST(BOOST_CXXFLAGS)
5307 # prefx CXX with ccache if needed
5309 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5310 if test "$CCACHE" != ""; then
5311 AC_MSG_CHECKING([whether $CXX is already ccached])
5313 save_CXXFLAGS=$CXXFLAGS
5314 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
5315 dnl an empty program will do, we're checking the compiler flags
5316 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
5317 [use_ccache=yes], [use_ccache=no])
5318 if test $use_ccache = yes; then
5319 AC_MSG_RESULT([yes])
5324 CXXFLAGS=$save_CXXFLAGS
5329 dnl ===================================================================
5330 dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
5331 dnl ===================================================================
5333 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5336 dnl Check whether there's a C pre-processor.
5341 dnl ===================================================================
5342 dnl Find integral type sizes and alignments
5343 dnl ===================================================================
5345 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5347 AC_CHECK_SIZEOF(long)
5348 AC_CHECK_SIZEOF(short)
5349 AC_CHECK_SIZEOF(int)
5350 AC_CHECK_SIZEOF(long long)
5351 AC_CHECK_SIZEOF(double)
5352 AC_CHECK_SIZEOF(void*)
5354 SAL_TYPES_SIZEOFSHORT=$ac_cv_sizeof_short
5355 SAL_TYPES_SIZEOFINT=$ac_cv_sizeof_int
5356 SAL_TYPES_SIZEOFLONG=$ac_cv_sizeof_long
5357 SAL_TYPES_SIZEOFLONGLONG=$ac_cv_sizeof_long_long
5358 SAL_TYPES_SIZEOFPOINTER=$ac_cv_sizeof_voidp
5360 dnl Allow build without AC_CHECK_ALIGNOF, grrr
5361 m4_pattern_allow([AC_CHECK_ALIGNOF])
5362 m4_ifdef([AC_CHECK_ALIGNOF],
5364 AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
5365 AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
5366 AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
5367 AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
5370 case "$_os-$host_cpu" in
5372 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
5373 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
5374 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=4
5375 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=4
5378 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
5379 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
5380 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=8
5381 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=8
5384 if test -z "$ac_cv_alignof_short" -o \
5385 -z "$ac_cv_alignof_int" -o \
5386 -z "$ac_cv_alignof_long" -o \
5387 -z "$ac_cv_alignof_double"; then
5388 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.])
5394 SAL_TYPES_ALIGNMENT2=$ac_cv_alignof_short
5395 SAL_TYPES_ALIGNMENT4=$ac_cv_alignof_int
5396 if test $ac_cv_sizeof_long -eq 8; then
5397 SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_long
5398 elif test $ac_cv_sizeof_double -eq 8; then
5399 SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_double
5401 AC_MSG_ERROR([Cannot find alignment of 8 byte types.])
5404 dnl Check for large file support
5406 if test -n "$ac_cv_sys_file_offset_bits" -a "$ac_cv_sys_file_offset_bits" != "no"; then
5407 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5409 if test -n "$ac_cv_sys_large_files" -a "$ac_cv_sys_large_files" != "no"; then
5410 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
5414 SAL_TYPES_SIZEOFSHORT=2
5415 SAL_TYPES_SIZEOFINT=4
5416 SAL_TYPES_SIZEOFLONG=4
5417 SAL_TYPES_SIZEOFLONGLONG=8
5418 if test "$BITNESS_OVERRIDE" = ""; then
5419 SAL_TYPES_SIZEOFPOINTER=4
5421 SAL_TYPES_SIZEOFPOINTER=8
5423 SAL_TYPES_ALIGNMENT2=2
5424 SAL_TYPES_ALIGNMENT4=4
5425 SAL_TYPES_ALIGNMENT8=8
5428 AC_SUBST(LFS_CFLAGS)
5430 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFSHORT,$SAL_TYPES_SIZEOFSHORT)
5431 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFINT,$SAL_TYPES_SIZEOFINT)
5432 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONG,$SAL_TYPES_SIZEOFLONG)
5433 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONGLONG,$SAL_TYPES_SIZEOFLONGLONG)
5434 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFPOINTER,$SAL_TYPES_SIZEOFPOINTER)
5435 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT2,$SAL_TYPES_ALIGNMENT2)
5436 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT4,$SAL_TYPES_ALIGNMENT4)
5437 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT8,$SAL_TYPES_ALIGNMENT8)
5439 dnl ===================================================================
5440 dnl Check whether to enable runtime optimizations
5441 dnl ===================================================================
5442 ENABLE_RUNTIME_OPTIMIZATIONS=
5443 AC_MSG_CHECKING([whether to enable runtime optimizations])
5444 if test -z "$enable_runtime_optimizations"; then
5448 enable_runtime_optimizations=no
5454 if test "$enable_runtime_optimizations" != no; then
5455 ENABLE_RUNTIME_OPTIMIZATIONS=TRUE
5456 AC_DEFINE(ENABLE_RUNTIME_OPTIMIZATIONS)
5457 AC_MSG_RESULT([yes])
5461 AC_SUBST([ENABLE_RUNTIME_OPTIMIZATIONS])
5463 dnl ===================================================================
5464 dnl Check if valgrind headers are available
5465 dnl ===================================================================
5467 if test "$cross_compiling" != yes; then
5468 prev_cppflags=$CPPFLAGS
5469 # Is VALGRIND_CFLAGS something one is supposed to have in the environment,
5470 # or where does it come from?
5471 CPPFLAGS="$CPPFLAGS $VALGRIND_CFLAGS"
5472 AC_CHECK_HEADER([valgrind/valgrind.h],
5473 [ENABLE_VALGRIND=TRUE])
5474 CPPFLAGS=$prev_cppflags
5476 AC_SUBST([ENABLE_VALGRIND])
5477 if test -z "$ENABLE_VALGRIND"; then
5480 AC_SUBST([VALGRIND_CFLAGS])
5483 dnl ===================================================================
5484 dnl Check if SDT probes (for systemtap, gdb, dtrace) are available
5485 dnl ===================================================================
5487 # We need at least the sys/sdt.h include header.
5488 AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='TRUE'], [SDT_H_FOUND='FALSE'])
5489 if test "$SDT_H_FOUND" = "TRUE"; then
5490 # Found sys/sdt.h header, now make sure the c++ compiler works.
5491 # Old g++ versions had problems with probes in constructors/destructors.
5492 AC_MSG_CHECKING([working sys/sdt.h and c++ support])
5494 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5495 #include <sys/sdt.h>
5503 ProbeClass(int& v, const char *n) : ref(v), name(n)
5505 DTRACE_PROBE2(_test_, cons, name, ref);
5508 void method(int min)
5510 DTRACE_PROBE3(_test_, meth, name, ref, min);
5516 DTRACE_PROBE2(_test_, dest, name, ref);
5521 DTRACE_PROBE1(_test_, call, i);
5522 ProbeClass inst = ProbeClass(i, "call");
5524 ]])], [AC_MSG_RESULT([yes]); AC_DEFINE([USE_SDT_PROBES])],
5525 [AC_MSG_RESULT([no, sdt.h or c++ compiler too old])])
5528 AC_CONFIG_HEADERS([config_host/config_probes.h])
5530 dnl ===================================================================
5531 dnl Set the MinGW sys-root
5532 dnl ===================================================================
5533 if test "$WITH_MINGW" = "yes"; then
5534 AC_MSG_CHECKING([for MinGW sysroot])
5535 sysroot=`$CC -print-sysroot`
5536 AS_IF([test -d "$sysroot"/mingw],
5537 [MINGW_SYSROOT="$sysroot"/mingw
5538 AC_MSG_RESULT([$MINGW_SYSROOT])],
5539 [AC_MSG_RESULT([not found])
5540 AC_MSG_ERROR([cannot determine MinGW sysroot])])
5542 AC_SUBST([MINGW_DLLS])
5543 AC_SUBST([MINGW_SYSROOT])
5545 dnl ===================================================================
5546 dnl Set the MinGW include directories
5547 dnl ===================================================================
5548 if test "$WITH_MINGW" = "yes"; then
5549 AC_MSG_CHECKING([for MinGW include path])
5550 cat >conftest.$ac_ext <<_ACEOF
5552 #include <bits/c++config.h>
5554 _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`
5556 if test -z "$_mingw_lib_include_path"; then
5557 _mingw_lib_include_path="NO_LIB_INCLUDE"
5558 AC_MSG_RESULT([no MinGW include path])
5560 AC_MSG_RESULT([$_mingw_lib_include_path])
5562 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
5563 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
5567 AC_MSG_CHECKING([for dynamic libgcc])
5568 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5570 using namespace std;
5571 ]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[
5572 MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's@.*DLL Name: @@'`
5573 if test -n "$MINGW_GCCDLL"; then
5574 MINGW_SHARED_GCCLIB=TRUE
5575 AC_MSG_RESULT([ $MINGW_GCCDLL])
5577 MINGW_SHARED_GCCLIB=
5580 ],[ AC_MSG_RESULT([no])
5584 AC_MSG_CHECKING([for dynamic libstdc++])
5585 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5587 using namespace std;
5588 ]], [[ cout << "Hello there." << endl; ]])],[
5589 MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's@.*DLL Name: @@'`
5590 if test -n "$MINGW_GXXDLL"; then
5591 mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
5592 mingw_gxxdll_root=${mingw_gxxdll_root#lib}
5593 if test "$CROSS_COMPILING" = "TRUE"; then
5595 mingw_gxxdll_root=${mingw_gxxdll_root%-[[0-9]]}
5597 MINGW_SHARED_LIBSTDCPP=-l$mingw_gxxdll_root
5598 MINGW_SHARED_GXXLIB=TRUE
5599 AC_MSG_RESULT([$MINGW_GXXDLL])
5601 MINGW_SHARED_GXXLIB=
5604 ],[ AC_MSG_RESULT([no])
5610 AC_SUBST(MINGW_SHARED_GCCLIB)
5611 AC_SUBST(MINGW_SHARED_GXXLIB)
5612 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
5613 AC_SUBST(MINGW_GCCDLL)
5614 AC_SUBST(MINGW_GXXDLL)
5617 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
5618 AC_DEFINE(HAVE_FMERGENEUTRALITEMS)
5621 if test "$WITH_MINGW" = "yes"; then
5622 AC_MSG_CHECKING([for fMergeNeutralItems in SCRIPT_CONTROL])
5623 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
5629 c.fMergeNeutralItems = 1;
5633 AC_DEFINE(HAVE_FMERGENEUTRALITEMS)
5635 [AC_MSG_RESULT(no)])
5638 dnl *************************************************************
5639 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
5640 dnl *************************************************************
5641 if test "$WITH_MINGW" = "yes"; then
5642 AC_MSG_CHECKING([exception type])
5644 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
5646 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
5648 ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
5650 AC_MSG_RESULT($exceptions_type)
5654 EXCEPTIONS="$exceptions_type"
5655 AC_SUBST(EXCEPTIONS)
5657 dnl ===================================================================
5658 dnl thread-safe statics
5659 dnl ===================================================================
5660 AC_MSG_CHECKING([whether $CXX supports thread safe statics])
5661 unset HAVE_THREADSAFE_STATICS
5662 if test "$GCC" = "yes"; then
5663 dnl -fthreadsafe-statics is available since GCC 4, so always available for
5664 dnl us. However, some C++ runtimes use a single lock for all static
5665 dnl variables, which can cause deadlock in multi-threaded applications.
5666 dnl This is not easily tested here; for POSIX-based systems, if executing
5667 dnl the following C++ program does not terminate then the tool chain
5668 dnl apparently has this problem:
5670 dnl #include <pthread.h>
5671 dnl int h() { return 0; }
5672 dnl void * g(void * unused) {
5673 dnl static int n = h();
5678 dnl pthread_create(&t, 0, g, 0);
5679 dnl pthread_join(t, 0);
5683 dnl static int n = f();
5687 dnl Mac OS X up to at least 10.7.1 is known to have this problem, as is at
5688 dnl least one instance of GCC 4.2.4 (used on a "Linux ooobuild1.osuosl.org
5689 dnl 2.6.9-101.plus.c4smp #1 SMP Thu Jul 21 19:08:15 EDT 2011 i686 i686 i386
5690 dnl GNU/Linux" machine); see the definition of __cxa_guard_acquire in GCC's
5691 dnl libstdc++-v3/libsupc++/guard.cc for what #ifdefs actually make a
5692 dnl difference there. Conservative advice from Jakub Jelinek is to assume
5693 dnl it working in GCC >= 4.3, so conservative way to check here is to use
5694 dnl GCC_VERSION for GCC but resort to __GLIBCXX__ corresponding to libstdc++
5695 dnl shipped with GCC 4.3.0 (cf. <http://gcc.gnu.org/onlinedocs/libstdc++/
5696 dnl manual/abi.html#abi.versioning.history>; 4.3.0 is 20080306, 4.2.4 is
5697 dnl 20080519, 4.3.1 is 20080606) for Clang (for which GCC_VERSION is notoriously
5699 if test "$_os" = Darwin; then
5700 dnl On Mac OS X, both /usr/lib/libstdc++.6.dylib and
5701 dnl /usr/lib/libc++1.dylib delegate to /usr/lib/libc++abi.dylib for the
5702 dnl __cxa_guard_* functionality; up to 10.8, libc++abi.dylib is
5703 dnl apparently provided by a libcppabi project that has broken semantics
5704 dnl (cf. <http://www.opensource.apple.com/source/libcppabi/libcppabi-26/
5705 dnl src/cxa_guard.cxx>), while in 10.9 (verified at least on 10.9.4) it
5706 dnl is apparently provided by LLVM's libcxxabi project, which has good
5707 dnl semantics (cf. <http://llvm.org/svn/llvm-project/libcxxabi/trunk/
5708 dnl src/cxa_guard.cpp>):
5709 if test "$MAC_OS_X_VERSION_MIN_REQUIRED" -ge 1090; then
5710 HAVE_THREADSAFE_STATICS=TRUE
5712 elif test "$_os" != Android; then
5713 if test "$COM_GCC_IS_CLANG" = TRUE; then
5715 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5717 #if !defined __GLIBCXX__ ||(__GLIBCXX__ < 20080606 && __GLIBCXX__ != 20080306)
5720 ]])],[HAVE_THREADSAFE_STATICS=TRUE],[])
5722 else # known to work in GCC since version 4.3
5723 HAVE_THREADSAFE_STATICS=TRUE
5726 if test "$HAVE_THREADSAFE_STATICS" = TRUE; then
5727 AC_DEFINE(HAVE_THREADSAFE_STATICS)
5728 AC_MSG_RESULT([yes])
5730 AC_MSG_RESULT([broken (i.e., no)])
5733 AC_MSG_RESULT([unknown (assuming no)])
5735 AC_SUBST(HAVE_THREADSAFE_STATICS)
5737 dnl ===================================================================
5738 dnl visibility and other gcc features
5739 dnl ===================================================================
5740 if test "$GCC" = "yes"; then
5741 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
5743 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
5744 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_VISIBILITY_FEATURE=TRUE ],[])
5747 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
5748 AC_MSG_RESULT([yes])
5753 AC_MSG_CHECKING([whether $CC supports -mno-avx])
5755 CFLAGS="$CFLAGS -Werror -mno-avx"
5756 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
5758 if test "$HAVE_GCC_AVX" = "TRUE"; then
5759 AC_MSG_RESULT([yes])
5764 AC_MSG_CHECKING([whether $CC supports atomic functions])
5765 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
5767 if (__sync_add_and_fetch(&v, 1) != 1 ||
5768 __sync_sub_and_fetch(&v, 1) != 0)
5770 __sync_synchronize();
5771 if (__sync_val_compare_and_swap(&v, 0, 1) != 0 ||
5775 ]])],[HAVE_GCC_BUILTIN_ATOMIC=TRUE],[])
5776 if test "$HAVE_GCC_BUILTIN_ATOMIC" = "TRUE"; then
5777 AC_MSG_RESULT([yes])
5778 AC_DEFINE(HAVE_GCC_BUILTIN_ATOMIC)
5783 AC_MSG_CHECKING([whether $CC supports __attribute__((deprecated(message)))])
5785 CFLAGS="$CFLAGS -Werror"
5786 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
5787 __attribute__((deprecated("test"))) void f();
5789 AC_DEFINE([HAVE_GCC_DEPRECATED_MESSAGE],[1])
5790 AC_MSG_RESULT([yes])
5791 ], [AC_MSG_RESULT([no])])
5794 AC_MSG_CHECKING([whether $CXX declares __cxa_allocate_exception in cxxabi.h])
5796 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
5798 void * f() { return __cxxabiv1::__cxa_allocate_exception(0); }
5800 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION],[1])
5801 AC_MSG_RESULT([yes])
5802 ], [AC_MSG_RESULT([no])])
5805 AC_MSG_CHECKING([whether $CXX declares __cxa_get_globals in cxxabi.h])
5807 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
5809 void * f() { return __cxxabiv1::__cxa_get_globals(); }
5811 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS],[1])
5812 AC_MSG_RESULT([yes])
5813 ], [AC_MSG_RESULT([no])])
5816 AC_MSG_CHECKING([whether $CXX declares __cxa_throw in cxxabi.h])
5818 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
5820 void f() { __cxxabiv1::__cxa_throw(0, 0, 0); }
5822 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_THROW],[1])
5823 AC_MSG_RESULT([yes])
5824 ], [AC_MSG_RESULT([no])])
5827 AC_MSG_CHECKING([whether $CXX supports __attribute__((warn_unused))])
5829 save_CXXFLAGS=$CXXFLAGS
5830 CXXFLAGS="$CXXFLAGS -Werror -Wunknown-pragmas"
5831 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
5832 struct __attribute__((warn_unused)) dummy {};
5834 AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED],[1])
5835 AC_MSG_RESULT([yes])
5836 ], [AC_MSG_RESULT([no])])
5837 CXXFLAGS=$save_CXXFLAGS
5840 AC_MSG_CHECKING([whether STL uses __attribute__((warn_unused))])
5842 save_CXXFLAGS=$CXXFLAGS
5843 CXXFLAGS="$CXXFLAGS -Werror -Wunused"
5844 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
5846 void f() { std::string s; }
5850 AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL],[1])
5851 AC_MSG_RESULT([yes])])
5852 CXXFLAGS=$save_CXXFLAGS
5856 AC_SUBST(HAVE_GCC_AVX)
5857 AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
5859 dnl ===================================================================
5860 dnl Identify the C++ library
5861 dnl ===================================================================
5863 AC_MSG_CHECKING([What the C++ library is])
5865 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5871 [CPP_LIBRARY=GLIBCXX
5872 cpp_library_name="GNU libstdc++"
5874 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5876 #ifndef _LIBCPP_VERSION
5881 cpp_library_name="LLVM libc++"
5883 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5890 cpp_library_name="Microsoft"
5892 AC_MSG_ERROR([Could not figure out what C++ library this is]))))
5893 AC_MSG_RESULT([$cpp_library_name])
5895 AC_SUBST(CPP_LIBRARY)
5897 dnl ===================================================================
5899 dnl ===================================================================
5902 if test "$COM" = MSC; then
5903 AC_MSG_CHECKING([whether $CXX supports C++11])
5905 # MSVC supports (a subset of) CXX11 without any switch
5907 elif test "$GCC" = "yes"; then
5910 AC_MSG_CHECKING([whether $CXX supports C++11])
5911 for flag in -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do
5912 save_CXXFLAGS=$CXXFLAGS
5913 CXXFLAGS="$CXXFLAGS $flag -Werror"
5915 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void f() {}]])],[CXXFLAGS_CXX11=$flag])
5917 CXXFLAGS=$save_CXXFLAGS
5918 if test -n "$CXXFLAGS_CXX11"; then
5923 if test "$HAVE_CXX11" = TRUE; then
5924 AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
5930 dnl Test for temporarily incompatible libstdc++ 4.7.{0,1}, where
5931 dnl <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=179528> introduced
5932 dnl an additional member _M_size into C++11 std::list towards 4.7.0 and
5933 dnl <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=189186> removed it
5934 dnl again towards 4.7.2:
5935 if test $CPP_LIBRARY = GLIBCXX; then
5936 AC_MSG_CHECKING([whether using C++11 causes libstdc++ 4.7.0/4.7.1 ABI breakage])
5938 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5940 #if !defined __GLIBCXX__ || (__GLIBCXX__ != 20120322 && __GLIBCXX__ != 20120614)
5941 // according to <https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html>:
5942 // GCC 4.7.0: 20120322
5943 // GCC 4.7.1: 20120614
5944 // and using a range check is not possible as the mapping between
5945 // __GLIBCXX__ values and GCC versions is not monotonic
5950 ]])], [AC_MSG_RESULT(no, ok)],
5951 [AC_MSG_ERROR(yes)])
5955 AC_MSG_CHECKING([whether $CXX supports C++11 without Language Defect 757])
5956 save_CXXFLAGS=$CXXFLAGS
5957 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
5960 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5963 template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
5979 a thinga[]={{0,0}, {1,1}};
5980 b thingb[]={{0,0}, {1,1}};
5981 size_t i = sizeof(sal_n_array_size(thinga));
5982 size_t j = sizeof(sal_n_array_size(thingb));
5983 return !(i != 0 && j != 0);
5985 ], [ AC_MSG_RESULT(yes) ],
5986 [ AC_MSG_ERROR(no)])
5988 CXXFLAGS=$save_CXXFLAGS
5990 AC_MSG_CHECKING([whether $CXX supports C++11 without __float128 compile error])
5991 save_CXXFLAGS=$CXXFLAGS
5992 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
5995 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5997 // some Clang fail when compiling against libstdc++ headers with -std=gnu++0x
6000 ],[ AC_MSG_RESULT(yes) ],
6003 # The only reason why libstdc++ headers fail with Clang in C++11 mode is because
6004 # they use the __float128 type that Clang doesn't know (libstdc++ checks whether
6005 # __float128 is available during its build, but it's usually built using GCC,
6006 # and so c++config.h hardcodes __float128 being supported). As the only place
6007 # where __float128 is actually used is in a template specialization,
6008 # -D__float128=void will avoid the problem there while still causing a problem
6009 # if somebody actually uses the type.
6010 AC_MSG_CHECKING([whether -D__float128=void workaround helps])
6011 CXXFLAGS="$CXXFLAGS -D__float128=void"
6012 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6014 // some Clang fail when compiling against libstdc++ headers with -std=gnu++0x
6020 CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -D__float128=void"
6028 CXXFLAGS=$save_CXXFLAGS
6030 AC_SUBST(CXXFLAGS_CXX11)
6032 dnl ==================================
6033 dnl Check for C++11 "= delete" support
6034 dnl ==================================
6036 AC_MSG_CHECKING([whether $CXX supports C++11 = delete syntax])
6037 save_CXXFLAGS=$CXXFLAGS
6038 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6040 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6043 void test() = delete;
6045 ]])],[HAVE_CXX11_DELETE=TRUE],[])
6048 CXXFLAGS=$save_CXXFLAGS
6049 if test "$HAVE_CXX11_DELETE" = "TRUE"; then
6050 AC_MSG_RESULT([yes])
6051 AC_DEFINE([HAVE_CXX11_DELETE])
6056 dnl ==================================
6057 dnl Check for C++11 "override" support
6058 dnl ==================================
6060 AC_MSG_CHECKING([whether $CXX supports C++11 "override" syntax])
6061 save_CXXFLAGS=$CXXFLAGS
6062 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6064 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6067 virtual void test();
6072 virtual void test() override;
6074 ]])],[HAVE_CXX11_OVERRIDE=TRUE],[])
6077 CXXFLAGS=$save_CXXFLAGS
6078 if test "$HAVE_CXX11_OVERRIDE" = "TRUE"; then
6079 AC_MSG_RESULT([yes])
6080 AC_DEFINE([HAVE_CXX11_OVERRIDE])
6085 dnl ==================================
6086 dnl Check for C++11 "final" support
6087 dnl ==================================
6089 AC_MSG_CHECKING([whether $CXX supports C++11 "final" syntax])
6090 save_CXXFLAGS=$CXXFLAGS
6091 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6093 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6094 // First check that this correct program that uses "final" compiles
6101 virtual void test();
6108 ]])],[have_final=yes],[])
6110 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6111 // Then check that the "final" works as expected,
6112 // that this program fails to compile
6120 ]])],[],[final_class_works=yes])
6122 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6123 // Also this should fail to compile
6126 virtual void test();
6138 ]])],[],[final_method_works=yes])
6141 CXXFLAGS=$save_CXXFLAGS
6143 if test "$have_final" = yes -a "$final_class_works" = yes -a "$final_method_works" = yes; then
6144 AC_MSG_RESULT([yes])
6145 AC_DEFINE([HAVE_CXX11_FINAL])
6150 dnl ===================================================================
6151 dnl Check for C++11 perfect forwarding support
6152 dnl ===================================================================
6153 AC_MSG_CHECKING([whether $CXX supports C++11 perfect forwarding])
6154 save_CXXFLAGS=$CXXFLAGS
6155 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6157 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6159 template<typename T, typename... Args> T * f(Args &&... v) {
6160 return new T(std::forward<Args>(v)...);
6164 ]])], [perfect_forwarding=yes], [perfect_forwarding=no])
6166 CXXFLAGS=$save_CXXFLAGS
6167 AC_MSG_RESULT([$perfect_forwarding])
6168 if test "$perfect_forwarding" = yes; then
6169 AC_DEFINE([HAVE_CXX11_PERFECT_FORWARDING])
6172 HAVE_GCC_PRAGMA_OPERATOR=
6173 dnl _Pragma support (may require C++11)
6174 if test "$GCC" = "yes"; then
6175 AC_MSG_CHECKING([whether $CXX supports _Pragma operator])
6177 save_CXXFLAGS=$CXXFLAGS
6178 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 -Werror"
6179 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6180 _Pragma("GCC diagnostic ignored \"-Wformat\"")
6182 AC_DEFINE([HAVE_GCC_PRAGMA_OPERATOR],[1])
6183 HAVE_GCC_PRAGMA_OPERATOR=1
6184 AC_MSG_RESULT([yes])
6185 ], [AC_MSG_RESULT([no])])
6187 CXXFLAGS=$save_CXXFLAGS
6189 AC_SUBST(HAVE_GCC_PRAGMA_OPERATOR)
6191 dnl ===================================================================
6192 dnl system stl sanity tests
6193 dnl ===================================================================
6194 HAVE_GCC_VISIBILITY_BROKEN=
6195 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \); then
6199 save_CPPFLAGS="$CPPFLAGS"
6200 if test -n "$MACOSX_SDK_PATH"; then
6201 CPPFLAGS="-isysroot $MACOSX_SDK_PATH $CPPFLAGS"
6204 # Assume visibility is not broken with libc++. The below test is very much designed for libstdc++
6206 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$CPP_LIBRARY" = GLIBCXX; then
6207 dnl gcc#19664, gcc#22482, rhbz#162935
6208 AC_MSG_CHECKING([if STL headers are visibility safe (GCC bug 22482)])
6209 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
6210 AC_MSG_RESULT([$stlvisok])
6211 if test "$stlvisok" = "no"; then
6212 AC_MSG_WARN([Your libstdc++ headers are not visibility safe. Disabling visibility])
6213 add_warning "Your libstdc++ headers are not visibility safe. Disabling visibility"
6214 unset HAVE_GCC_VISIBILITY_FEATURE
6218 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
6219 sharedlink_ldflags_save=$LDFLAGS
6220 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden $PICSWITCH $LINKFLAGSSHL"
6222 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
6223 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
6225 using namespace std;
6227 istringstream strm( "test" ); return 0;
6229 # Ugh, surely bad to assume an error message will contain
6230 # the word "unresolvable", a problem with
6231 # -fvisibility-inlines-hidden and STL headers might cause
6232 # some more obscure message on some platform, and anway,
6233 # the error message could be localised.
6234 [$EGREP -q unresolvable conftest.err;
6235 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi],[gccvisok=no
6237 AC_MSG_RESULT([$gccvisok])
6238 if test "$gccvisok" = "no"; then
6239 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
6240 add_warning "Your gcc is not -fvisibility-inlines-hidden safe, disabling that."
6241 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
6244 LDFLAGS=$sharedlink_ldflags_save
6247 # As the below test checks things when linking self-compiled dynamic libraries, it presumably is irrelevant
6248 # when we don't make any dynamic libraries?
6249 if test "$DISABLE_DYNLOADING" = "" -a "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$HAVE_GCC_VISIBILITY_BROKEN" != "TRUE"; then
6250 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe (Clang bug 11250)])
6251 cat > conftestlib1.cc <<_ACEOF
6252 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
6253 struct S2: S1<int> { virtual ~S2(); };
6256 cat > conftestlib2.cc <<_ACEOF
6257 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
6258 struct S2: S1<int> { virtual ~S2(); };
6259 struct S3: S2 { virtual ~S3(); }; S3::~S3() {}
6261 gccvisinlineshiddenok=yes
6262 if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST >/dev/null 2>&5; then
6263 gccvisinlineshiddenok=no
6265 dnl At least Clang -fsanitize=address and -fsanitize=undefined are
6266 dnl known to not work with -z defs (unsetting which makes the test
6268 my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS
6269 if test "$COM_GCC_IS_CLANG" = TRUE; then
6273 my_linkflagsnoundefs=
6279 if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 $my_linkflagsnoundefs -o libconftest2$DLLPOST >/dev/null 2>&5; then
6280 gccvisinlineshiddenok=no
6285 AC_MSG_RESULT([$gccvisinlineshiddenok])
6286 if test "$gccvisinlineshiddenok" = "no"; then
6287 AC_MSG_WARN([Your gcc/clang is not -fvisibility-inlines-hidden safe, disabling that.])
6288 add_warning "Your gcc/clang is not -fvisibility-inlines-hidden safe, disabling that."
6289 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
6293 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
6294 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
6295 cat >visibility.cxx <<_ACEOF
6296 #pragma GCC visibility push(hidden)
6297 struct __attribute__ ((visibility ("default"))) TestStruct {
6300 __attribute__ ((visibility ("default"))) void TestFunc() {
6304 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
6309 if test "$_os" = "Darwin" -o "$WITH_MINGW" = "yes"; then
6312 if $EGREP -q '@PLT|@GOT' visibility.s; then
6324 rm -f visibility.s visibility.cxx
6326 AC_MSG_RESULT([$gccvisbroken])
6327 if test "$gccvisbroken" = "yes"; then
6328 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
6329 add_warning "Your gcc is not -fvisibility=hidden safe. Disabling visibility"
6330 unset HAVE_GCC_VISIBILITY_FEATURE
6334 CPPFLAGS="$save_CPPFLAGS"
6339 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
6340 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
6342 dnl ===================================================================
6344 dnl ===================================================================
6346 HAVE_GCC_FNO_DEFAULT_INLINE=
6347 HAVE_GCC_FNO_ENFORCE_EH_SPECS=
6348 if test "$GCC" = "yes"; then
6349 AC_MSG_CHECKING([whether $CXX supports -fno-default-inline])
6350 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
6351 # Option just ignored and silly warning that isn't a real
6356 save_CXXFLAGS=$CXXFLAGS
6357 CXXFLAGS="$CFLAGS -Werror -fno-default-inline"
6358 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_DEFAULT_INLINE=TRUE ],[])
6359 CXXFLAGS=$save_CXXFLAGS
6362 if test "$HAVE_GCC_FNO_DEFAULT_INLINE" = "TRUE"; then
6363 AC_MSG_RESULT([yes])
6368 AC_MSG_CHECKING([whether $CXX supports -fno-enforce-eh-specs])
6369 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
6374 save_CXXFLAGS=$CXXFLAGS
6375 CXXFLAGS="$CFLAGS -Werror -fno-enforce-eh-specs"
6376 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_ENFORCE_EH_SPECS=TRUE ],[])
6377 CXXFLAGS=$save_CXXFLAGS
6380 if test "$HAVE_GCC_FNO_ENFORCE_EH_SPECS" = "TRUE"; then
6381 AC_MSG_RESULT([yes])
6386 AC_SUBST(HAVE_GCC_FNO_DEFAULT_INLINE)
6387 AC_SUBST(HAVE_GCC_FNO_ENFORCE_EH_SPECS)
6389 dnl ===================================================================
6390 dnl Compiler plugins
6391 dnl ===================================================================
6394 # currently only Clang
6395 if test "$COM_GCC_IS_CLANG" = "TRUE"; then
6396 if test -n "$enable_compiler_plugins"; then
6397 compiler_plugins="$enable_compiler_plugins"
6398 elif test -n "$ENABLE_DBGUTIL"; then
6399 compiler_plugins=test
6403 if test "$compiler_plugins" != "no"; then
6404 dnl The prefix where Clang resides, override to where Clang resides if
6405 dnl using a source build:
6406 if test -z "$CLANGDIR"; then
6410 save_CPPFLAGS=$CPPFLAGS
6412 # compiler plugins must be built with "native" bitness of clang
6413 # because they link against clang libraries
6414 CXX=`echo $CXX | sed -e s/-m64// -e s/-m32//`
6415 CPPFLAGS="$CPPFLAGS $CXXFLAGS_CXX11 -I$CLANGDIR/include -I$CLANGDIR/tools/clang/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
6416 AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
6417 [COMPILER_PLUGINS=TRUE],
6419 if test "$compiler_plugins" = "yes"; then
6420 AC_MSG_ERROR([Cannot find Clang headers to build compiler plugins.])
6422 AC_MSG_WARN([Cannot find Clang headers to build compiler plugins, plugins disabled])
6423 add_warning "Cannot find Clang headers to build compiler plugins, plugins disabled."
6427 CPPFLAGS=$save_CPPFLAGS
6431 if test "$enable_compiler_plugins" = "yes"; then
6432 AC_MSG_ERROR([Compiler plugins are currently supported only with the Clang compiler.])
6435 AC_SUBST(COMPILER_PLUGINS)
6438 # Plugin to help linker.
6439 # Add something like LD_PLUGIN=/usr/lib64/LLVMgold.so to your autogen.input.
6440 # This makes --enable-lto build with clang work.
6443 dnl ===================================================================
6445 dnl ===================================================================
6446 AC_MSG_CHECKING([which memory allocator to use])
6447 if test "$with_alloc" = "system"; then
6448 AC_MSG_RESULT([system])
6451 if test "$with_alloc" = "tcmalloc"; then
6452 AC_MSG_RESULT(tcmalloc)
6453 if ! echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6454 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
6456 AC_CHECK_LIB([tcmalloc], [malloc], [:],
6457 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
6460 if test "$with_alloc" = "jemalloc"; then
6461 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
6462 AC_MSG_RESULT(jemalloc)
6464 CFLAGS="$CFLAGS -pthread"
6465 AC_CHECK_LIB([jemalloc], [malloc], [:],
6466 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
6470 AC_MSG_RESULT([system])
6474 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
6475 AC_MSG_RESULT([internal])
6477 AC_CHECK_FUNCS(posix_fallocate, HAVE_POSIX_FALLOCATE=YES, [HAVE_POSIX_FALLOCATE=NO])
6478 AC_SUBST(HAVE_POSIX_FALLOCATE)
6481 dnl ===================================================================
6482 dnl Custom build version
6483 dnl ===================================================================
6485 AC_MSG_CHECKING([whether to add custom build version])
6486 if test "$with_build_version" != ""; then
6487 BUILD_VER_STRING=$with_build_version
6488 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
6493 AC_SUBST(BUILD_VER_STRING)
6495 JITC_PROCESSOR_TYPE=""
6496 if test "$_os" = "Linux" -a "$host_cpu" = "powerpc"; then
6497 # IBMs JDK needs this...
6498 JITC_PROCESSOR_TYPE=6
6499 export JITC_PROCESSOR_TYPE
6501 AC_SUBST([JITC_PROCESSOR_TYPE])
6503 # Misc Windows Stuff
6504 if test $_os = "WINNT" -a "$WITH_MINGW" != yes; then
6507 MSVC_DLL_PATH="$msvcdllpath"
6508 MSVC_DLLS="$msvcdlls"
6510 SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
6513 AC_SUBST(MSVC_DLL_PATH)
6517 dnl ===================================================================
6519 dnl ===================================================================
6520 if test "$ENABLE_JAVA" != ""; then
6522 # Windows-specific tests
6523 if test "$build_os" = "cygwin"; then
6524 if test "$BITNESS_OVERRIDE" = 64; then
6530 if test -z "$with_jdk_home"; then
6531 for ver in 1.8 1.7 1.6; do
6532 reg_get_value_$bitness "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
6533 if test -n "$regvalue"; then
6538 if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
6539 with_jdk_home="$_jdk_home"
6540 howfound="found automatically"
6542 AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $bitness-bit JDK])
6545 test "$build_os" = "cygwin" && with_jdk_home=`win_short_path_for_make "$with_jdk_home"`
6546 howfound="you passed"
6550 # MacOS X: /usr/libexec/java_home helps to set the current JDK_HOME. Actually JDK_HOME should NOT be set where java (/usr/bin/java) is located.
6551 # /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java, but /usr does not contain the JDK libraries
6552 if test -z "$with_jdk_home" -a "$_os" = "Darwin" -a -x /usr/libexec/java_home; then
6553 with_jdk_home=`/usr/libexec/java_home`
6556 JAVA_HOME=; export JAVA_HOME
6557 if test -z "$with_jdk_home"; then
6558 AC_PATH_PROG(JAVAINTERPRETER, $with_java)
6560 _java_path="$with_jdk_home/bin/$with_java"
6561 dnl Check if there is a Java interpreter at all.
6562 if test -x "$_java_path"; then
6563 JAVAINTERPRETER=$_java_path
6565 AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
6569 if test "$build_os" = "cygwin"; then
6570 # Check that the JDK found is correct architecture
6571 # Why is this necessary, we don't link with any library from the JDK I think,
6573 shortjdkhome=`cygpath -d "$with_jdk_home"`
6574 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
6575 AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
6576 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
6577 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
6578 AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
6579 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
6582 if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then
6583 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
6585 JAVAINTERPRETER=`win_short_path_for_make "$JAVAINTERPRETER"`
6586 elif test "$cross_compiling" != "yes"; then
6587 # at least 2 reasons to check: officebean needs to link -ljawt,
6588 # and libjpipe.so needs to be loaded by java to run JunitTests.
6590 AARCH64|AXP|X86_64|HPPA|IA64|POWERPC64|S390X|SPARC64)
6591 if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
6592 AC_MSG_WARN([You are building 64-bit binaries but the JDK $JAVAINTERPRETER is 32-bit])
6593 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
6596 *) # assumption: everything else 32-bit
6597 if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" != "" >/dev/null; then
6598 AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
6599 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
6608 dnl ===================================================================
6610 dnl ===================================================================
6612 # Note that JAVA_HOME as for now always means the *build* platform's
6613 # JAVA_HOME. Whether all the complexity here actually is needed any
6614 # more or not, no idea.
6616 if test "$ENABLE_JAVA" != ""; then
6618 AC_MSG_CHECKING([the installed JDK])
6619 if test -n "$JAVAINTERPRETER"; then
6620 dnl java -version sends output to stderr!
6621 if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
6622 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
6623 elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then
6625 AC_MSG_RESULT([checked (gcj)])
6626 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
6627 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
6629 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "BEA"` -gt 0; then
6630 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
6631 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "IBM"` -gt 0; then
6634 dnl IBM JDK specific tests
6635 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
6636 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
6638 if test "$_jdk_ver" -lt 10500; then
6639 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
6641 if test "$_jdk_ver" -ge 10600; then
6645 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
6647 if test "$with_jdk_home" = ""; then
6648 AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
6649 you must use the "--with-jdk-home" configure option explicitly])
6652 JAVA_HOME=$with_jdk_home
6656 dnl Sun JDK specific tests
6657 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
6658 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
6660 if test "$_jdk_ver" -lt 10500; then
6661 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
6663 if test "$_jdk_ver" -gt 10600; then
6664 JAVA_CLASSPATH_NOT_SET="1"
6666 if test "$_jdk_ver" -ge 10600; then
6669 if test "$_jdk_ver" -ge 10900; then
6673 AC_MSG_RESULT([checked (JDK $_jdk)])
6674 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
6675 if test "$_os" = "WINNT"; then
6676 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
6679 # set to limit VM usage for JunitTests
6681 # set to limit VM usage for javac
6682 JAVAFLAGS=-J-Xmx128M
6685 AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
6689 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
6691 AC_SUBST([HAVE_JAVA6])
6692 AC_SUBST([HAVE_JAVA9])
6694 dnl ===================================================================
6695 dnl Set target Java bytecode version
6696 dnl ===================================================================
6697 if test "$ENABLE_JAVA" != ""; then
6698 if test "$HAVE_JAVA9" == "TRUE"; then
6699 _java_target_ver="1.6"
6701 _java_target_ver="1.5"
6703 JAVA_SOURCE_VER="$_java_target_ver"
6704 JAVA_TARGET_VER="$_java_target_ver"
6707 dnl ===================================================================
6708 dnl Checks for javac
6709 dnl ===================================================================
6710 if test "$ENABLE_JAVA" != ""; then
6711 if test "$JDK" = "gcj"; then
6712 javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
6714 javacompiler="javac"
6716 if test -z "$with_jdk_home"; then
6717 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
6719 _javac_path="$with_jdk_home/bin/$javacompiler"
6720 dnl Check if there is a Java compiler at all.
6721 if test -x "$_javac_path"; then
6722 JAVACOMPILER=$_javac_path
6725 if test -z "$JAVACOMPILER"; then
6726 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
6728 if test "$build_os" = "cygwin"; then
6729 if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then
6730 JAVACOMPILER="${JAVACOMPILER}.exe"
6732 JAVACOMPILER=`win_short_path_for_make "$JAVACOMPILER"`
6735 if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Eclipse Java Compiler"` -gt 0; then
6736 AC_MSG_CHECKING([re-checking JDK])
6738 AC_MSG_RESULT([checked (ecj)])
6739 _gij_longver="40200"
6744 dnl ===================================================================
6745 dnl Checks that javac is gcj
6746 dnl ===================================================================
6747 if test "$ENABLE_JAVA" != ""; then
6748 if test `$JAVACOMPILER --version 2>&1 | $GREP -c "GCC"` -gt 0; then
6752 AC_SUBST(JAVACISGCJ)
6754 dnl ===================================================================
6755 dnl Checks for javadoc
6756 dnl ===================================================================
6757 if test "$ENABLE_JAVA" != ""; then
6758 if test -z "$with_jdk_home"; then
6759 AC_PATH_PROG(JAVADOC, javadoc)
6761 _javadoc_path="$with_jdk_home/bin/javadoc"
6762 dnl Check if there is a javadoc at all.
6763 if test -x "$_javadoc_path"; then
6764 JAVADOC=$_javadoc_path
6766 AC_PATH_PROG(JAVADOC, javadoc)
6769 if test -z "$JAVADOC"; then
6770 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
6772 if test "$build_os" = "cygwin"; then
6773 if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
6774 JAVADOC="${JAVADOC}.exe"
6776 JAVADOC=`win_short_path_for_make "$JAVADOC"`
6779 if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
6780 JAVADOCISGJDOC="yes"
6783 AC_SUBST(JAVADOCISGJDOC)
6785 if test "$ENABLE_JAVA" != ""; then
6786 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
6787 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
6788 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
6789 # try to recover first by looking whether we have a alternatives
6790 # system as in Debian or newer SuSEs where following /usr/bin/javac
6791 # over /etc/alternatives/javac leads to the right bindir where we
6792 # just need to strip a bit away to get a valid JAVA_HOME
6793 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
6794 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
6795 # maybe only one level of symlink (e.g. on Mac)
6796 JAVA_HOME=$(readlink $JAVACOMPILER)
6797 if test "$(dirname $JAVA_HOME)" = "."; then
6798 # we've got no path to trim back
6803 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
6804 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
6805 add_warning "JAVA_HOME is set to /usr - this is very likely to be incorrect"
6806 add_warning "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home"
6808 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
6809 if test "$JAVA_HOME" != "/usr"; then
6810 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
6811 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
6812 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
6813 dnl Tiger already returns a JDK path..
6814 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
6816 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
6820 # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
6822 dnl now if JAVA_HOME has been set to empty, then call findhome to find it
6823 if test -z "$JAVA_HOME"; then
6824 if test "x$with_jdk_home" = "x"; then
6825 cat > findhome.java <<_ACEOF
6826 [import java.io.File;
6830 public static void main(String args[])
6832 String jrelocation = System.getProperty("java.home");
6833 File jre = new File(jrelocation);
6834 System.out.println(jre.getParent());
6838 AC_MSG_CHECKING([if javac works])
6839 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
6840 AC_TRY_EVAL(javac_cmd)
6841 if test $? = 0 -a -f ./findhome.class; then
6842 AC_MSG_RESULT([javac works])
6844 echo "configure: javac test failed" >&5
6845 cat findhome.java >&5
6846 AC_MSG_ERROR([javac does not work - java projects will not build!])
6848 AC_MSG_CHECKING([if gij knows its java.home])
6849 JAVA_HOME=`$JAVAINTERPRETER findhome`
6850 if test $? = 0 -a "$JAVA_HOME" != ""; then
6851 AC_MSG_RESULT([$JAVA_HOME])
6853 echo "configure: java test failed" >&5
6854 cat findhome.java >&5
6855 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
6857 # clean-up after ourselves
6858 rm -f ./findhome.java ./findhome.class
6860 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
6864 dnl second sanity check JAVA_HOME if possible
6865 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
6866 # now check if $JAVA_HOME is really valid
6867 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
6868 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
6871 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
6874 if test "$JAVA_HOME_OK" = "NO"; then
6875 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
6876 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
6877 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
6878 add_warning "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script"
6879 add_warning "attempted to find JAVA_HOME automatically, but apparently it failed"
6880 add_warning "in case JAVA_HOME is incorrectly set, some projects with not be built correctly"
6883 PathFormat "$JAVA_HOME"
6884 JAVA_HOME="$formatted_path"
6887 if test -z "$JAWTLIB" -a -n "$ENABLE_JAVA" -a "$_os" != Android -a \
6890 AC_MSG_CHECKING([for JAWT lib])
6891 if test "$_os" = WINNT; then
6892 if test "$WITH_MINGW" = yes; then
6893 # The path is taken care of in gb_LinkTarget__use_jawt
6894 # in RepositoryExternal.mk:
6897 # The path to $JAVA_HOME/lib/$JAWTLIB is part of $ILIB:
6921 my_java_arch=$host_cpu
6924 JAWTLIB="-L$JAVA_HOME/jre/lib/$my_java_arch -ljawt"
6926 AC_MSG_RESULT([$JAWTLIB])
6930 if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
6934 JAVAINC="-I$JAVA_HOME/include"
6935 JAVAINC="$JAVAINC -I$JAVA_HOME/include/aix"
6936 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
6940 JAVAINC="-I$JAVA_HOME/include/win32"
6941 JAVAINC="$JAVAINC -I$JAVA_HOME/include"
6945 if test -d "$JAVA_HOME/include/darwin"; then
6946 JAVAINC="-I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
6948 JAVAINC=${ISYSTEM}$FRAMEWORKSHOME/JavaVM.framework/Versions/Current/Headers
6953 JAVAINC="-I$JAVA_HOME/include"
6954 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
6958 JAVAINC="-I$JAVA_HOME/include"
6959 JAVAINC="$JAVAINC -I$JAVA_HOME/include/freebsd"
6960 JAVAINC="$JAVAINC -I$JAVA_HOME/include/bsd"
6961 JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
6962 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
6966 JAVAINC="-I$JAVA_HOME/include"
6967 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
6971 JAVAINC="-I$JAVA_HOME/include"
6972 JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
6973 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
6977 JAVAINC="-I$JAVA_HOME/include"
6981 JAVAINC="-I$JAVA_HOME/include"
6982 JAVAINC="$JAVAINC -I$JAVA_HOME/include/netbsd"
6983 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
6987 JAVAINC="-I$JAVA_HOME/include"
6988 JAVAINC="$JAVAINC -I$JAVA_HOME/include/openbsd"
6989 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
6993 JAVAINC="-I$JAVA_HOME/include"
6994 JAVAINC="$JAVAINC -I$JAVA_HOME/include/solaris"
6995 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
6999 SOLARINC="$SOLARINC $JAVAINC"
7001 AC_SUBST(JAVACOMPILER)
7003 AC_SUBST(JAVAINTERPRETER)
7004 AC_SUBST(JAVAIFLAGS)
7006 AC_SUBST(JAVA_CLASSPATH_NOT_SET)
7008 AC_SUBST(JAVA_SOURCE_VER)
7009 AC_SUBST(JAVA_TARGET_VER)
7012 AC_MSG_CHECKING([which C preprocessor to use in idlc])
7013 if test -n "$with_idlc_cpp"; then
7014 AC_MSG_RESULT([$with_idlc_cpp])
7015 AC_PATH_PROG(SYSTEM_UCPP, $with_idlc_cpp)
7017 AC_MSG_RESULT([ucpp])
7018 AC_MSG_CHECKING([which ucpp tp use])
7019 if test -n "$with_system_ucpp" -a "$with_system_ucpp" != "no"; then
7020 AC_MSG_RESULT([external])
7021 AC_PATH_PROG(SYSTEM_UCPP, ucpp)
7023 AC_MSG_RESULT([internal])
7024 BUILD_TYPE="$BUILD_TYPE UCPP"
7027 AC_SUBST(SYSTEM_UCPP)
7029 dnl ===================================================================
7030 dnl Check for epm (not needed for Windows)
7031 dnl ===================================================================
7032 AC_MSG_CHECKING([whether to enable EPM for packing])
7033 if test "$enable_epm" = "yes"; then
7034 AC_MSG_RESULT([yes])
7035 if test "$_os" != "WINNT"; then
7036 if test $_os = Darwin; then
7038 elif test -n "$with_epm"; then
7041 AC_PATH_PROG(EPM, epm, no)
7043 if test "$EPM" = "no" -o "$EPM" = "internal"; then
7044 echo "EPM will be built."
7045 BUILD_TYPE="$BUILD_TYPE EPM"
7046 EPM=${WORKDIR}/UnpackedTarball/epm/epm
7048 # Gentoo has some epm which is something different...
7049 AC_MSG_CHECKING([whether the found epm is the right epm])
7050 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
7051 AC_MSG_RESULT([yes])
7053 AC_MSG_ERROR([no. Install ESP Package Manager (http://www.msweet.org/projects.php?Z2) and/or specify the path to the right epm])
7055 AC_MSG_CHECKING([epm version])
7056 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
7057 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
7058 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
7059 AC_MSG_RESULT([OK, >= 3.7])
7061 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
7062 AC_MSG_ERROR([Install ESP Package Manager (http://www.msweet.org/projects.php?Z2) and/or specify the path to the right epm])
7067 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
7068 AC_MSG_CHECKING([for rpm])
7069 for a in "$RPM" rpmbuild rpm; do
7070 $a --usage >/dev/null 2> /dev/null
7071 if test $? -eq 0; then
7075 $a --version >/dev/null 2> /dev/null
7076 if test $? -eq 0; then
7082 if test -z "$RPM"; then
7083 AC_MSG_ERROR([not found])
7084 elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
7085 RPM_PATH=`which $RPM`
7086 AC_MSG_RESULT([$RPM_PATH])
7087 SCPDEFS="$SCPDEFS -DWITH_RPM"
7089 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
7092 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
7093 AC_PATH_PROG(DPKG, dpkg, no)
7094 if test "$DPKG" = "no"; then
7095 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
7098 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
7099 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
7100 if test "$with_epm" = "no" -a "$_os" != "Darwin"; then
7101 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
7102 AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
7103 if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then
7104 AC_MSG_RESULT([yes])
7107 if echo "$PKGFORMAT" | $GREP -q rpm; then
7109 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
7110 add_warning "the rpms will need to be installed with --nodeps"
7114 AC_MSG_WARN([the ${_pt}s will not be relocateable])
7115 add_warning "the ${_pt}s will not be relocateable"
7116 AC_MSG_WARN([if you want to make sure installation without --nodeps and
7117 relocation will work, you need to patch your epm with the
7118 patch in epm/epm-3.7.patch or build with
7119 --with-epm=internal which will build a suitable epm])
7124 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
7125 AC_PATH_PROG(PKGMK, pkgmk, no)
7126 if test "$PKGMK" = "no"; then
7127 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
7134 for i in $PKGFORMAT; do
7136 aix | bsd | deb | pkg | rpm | native | portable)
7138 [--with-package-format='$PKGFORMAT' requires --enable-epm])
7147 dnl ===================================================================
7148 dnl We need winegcc when building MinGW build to be able to cross-build msi tools
7149 dnl ===================================================================
7151 if test "$enable_winegcc" = "yes"; then
7152 AC_PATH_PROG(WINEGCC, winegcc)
7153 if test "$WINEGCC" = ""; then
7154 AC_MSG_ERROR([winegcc was not found, please install wine-devel, or wine-devel-32bit])
7157 ac_exeext_save="$ac_exeext"
7160 AC_LINK_IFELSE([AC_LANG_PROGRAM([
7163 printf ("hello world\n");
7165 [AC_MSG_ERROR([winegcc cannot build 32bit binaries, please install glibc-devel-32bit and gcc-32bit])]
7168 ac_exeext="$ac_exeext_save"
7172 if test $_os = iOS; then
7173 enable_mpl_subset=yes
7174 enable_lotuswordpro=no
7177 enable_postgresql_sdbc=no
7178 enable_extension_integration=no
7179 enable_report_builder=no
7185 if test "$enable_lotuswordpro" = "yes"; then
7187 SCPDEFS="$SCPDEFS -DDISABLE_LWP"
7189 AC_SUBST(ENABLE_LWP)
7191 dnl ===================================================================
7193 dnl ===================================================================
7194 AC_PATH_PROG(GPERF, gperf)
7195 if test -z "$GPERF"; then
7196 AC_MSG_ERROR([gperf not found but needed. Install it.])
7198 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
7199 GPERF=`cygpath -m $GPERF`
7201 AC_MSG_CHECKING([gperf version])
7202 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
7205 AC_MSG_ERROR([too old, you need at least 3.0.0])
7209 dnl ===================================================================
7210 dnl Check for building ODK
7211 dnl ===================================================================
7212 if test "$enable_odk" = no; then
7215 if test "$with_doxygen" = no; then
7216 AC_MSG_CHECKING([for doxygen])
7220 if test "$with_doxygen" = yes; then
7221 AC_PATH_PROG([DOXYGEN], [doxygen])
7222 if test -z "$DOXYGEN"; then
7223 if test "$enable_odk" = "" ; then
7226 AC_MSG_ERROR([doxygen not found in \$PATH; specify its pathname via --with-doxygen=..., or disable its use via --without-doxygen])
7230 AC_MSG_CHECKING([for doxygen])
7231 DOXYGEN=$with_doxygen
7232 AC_MSG_RESULT([$DOXYGEN])
7234 if test -n "$DOXYGEN"; then
7235 DOXYGEN_VERSION=`$DOXYGEN --version 2>/dev/null`
7236 DOXYGEN_NUMVERSION=`echo $DOXYGEN_VERSION | $AWK -F. '{ print \$1*10000 + \$2*100 + \$3 }'`
7237 if ! test "$DOXYGEN_NUMVERSION" -ge "10804" ; then
7238 AC_MSG_ERROR([found doxygen is too old; need at least version 1.8.4 or specify --without-doxygen])
7245 AC_MSG_CHECKING([whether to build the ODK])
7246 if test "$enable_odk" = "" -o "$enable_odk" != "no"; then
7247 AC_MSG_RESULT([yes])
7249 if test "$with_java" != "no"; then
7250 AC_MSG_CHECKING([whether to build unowinreg.dll])
7251 if test "$_os" = "WINNT" -a "$enable_build_unowinreg" = ""; then
7252 # build on Win by default
7253 enable_build_unowinreg=yes
7255 if test "$enable_build_unowinreg" = "" -o "$enable_build_unowinreg" = "no"; then
7259 AC_MSG_RESULT([yes])
7260 BUILD_UNOWINREG=TRUE
7262 if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "TRUE"; then
7263 if test -z "$with_mingw_cross_compiler"; then
7265 AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
7266 elif test -x "$with_mingw_cross_compiler"; then
7267 MINGWCXX="$with_mingw_cross_compiler"
7269 AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
7272 if test "$MINGWCXX" = "false"; then
7273 AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
7276 mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
7277 if test -x "$mingwstrip_test"; then
7278 MINGWSTRIP="$mingwstrip_test"
7280 AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
7283 if test "$MINGWSTRIP" = "false"; then
7284 AC_MSG_ERROR(MinGW32 binutils not found.)
7288 BUILD_TYPE="$BUILD_TYPE ODK"
7293 AC_SUBST(BUILD_UNOWINREG)
7295 AC_SUBST(MINGWSTRIP)
7297 dnl ===================================================================
7298 dnl Check for system zlib
7299 dnl ===================================================================
7300 if test "$with_system_zlib" = "auto"; then
7303 with_system_zlib="$with_system_libs"
7306 with_system_zlib=yes
7311 dnl we want to use libo_CHECK_SYSTEM_MODULE here too, but OS X is too stupid
7312 dnl and has no pkg-config for it at least on some tinderboxes,
7313 dnl so leaving that out for now
7314 dnl libo_CHECK_SYSTEM_MODULE([zlib],[ZLIB],[zlib])
7315 AC_MSG_CHECKING([which zlib to use])
7316 if test "$with_system_zlib" = "yes"; then
7317 AC_MSG_RESULT([external])
7319 AC_CHECK_HEADER(zlib.h, [],
7320 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
7321 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
7322 [AC_MSG_ERROR(zlib not found or functional)], [])
7324 AC_MSG_RESULT([internal])
7326 BUILD_TYPE="$BUILD_TYPE ZLIB"
7327 ZLIB_CFLAGS="-I${WORKDIR}/UnpackedTarball/zlib"
7330 AC_SUBST(ZLIB_CFLAGS)
7332 AC_SUBST(SYSTEM_ZLIB)
7334 dnl ===================================================================
7335 dnl Check for system jpeg
7336 dnl ===================================================================
7337 if test "$with_jpeg_turbo" = "auto"; then
7338 # TODO use jpeg-turbo on Darwin too
7349 if test "$with_system_jpeg" = "yes"; then
7350 AC_MSG_RESULT([external])
7352 AC_CHECK_HEADER(jpeglib.h, [],
7353 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
7354 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
7355 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
7356 libo_MINGW_CHECK_DLL([libjpeg])
7359 if test "$with_jpeg_turbo" = "yes"; then
7360 AC_MSG_RESULT([internal, jpeg-turbo])
7361 WITH_JPEG_TURBO=TRUE
7362 BUILD_TYPE="$BUILD_TYPE JPEG_TURBO"
7363 AC_CHECK_PROGS(NASM, [nasm nasmw yasm])
7364 if test -z "$NASM" -a "$build_os" = "cygwin" -a -x "/opt/lo/bin/nasm"; then
7365 NASM="/opt/lo/bin/nasm"
7367 if test -z "$NASM"; then
7369 ****************************************************************************
7370 You need nasm (Netwide Assembler) to build internal jpeg library.
7371 To get one please do:
7374 if test "$build_os" = "cygwin"; then
7376 install a pre-compiled binary for Win32
7378 mkdir -p /opt/lo/bin
7380 wget http://dev-www.libreoffice.org/bin/cygwin/nasm.exe
7385 consult http://svn.code.sf.net/p/libjpeg-turbo/code/trunk/BUILDING.txt
7390 or get and install one from http://www.nasm.us/
7392 Then re-run autogen.sh
7394 Note: autogen.sh will try to use /opt/lo/bin/nasm if the environment variable NASM is not already defined.
7395 Alternatively, you can install the 'new' nasm where ever you want and make sure that \`which nasm\` finds it.
7398 AC_MSG_ERROR([no nasm (Netwide Assembler) found])
7401 AC_MSG_RESULT([internal, jpeg])
7402 BUILD_TYPE="$BUILD_TYPE JPEG"
7406 AC_SUBST(SYSTEM_JPEG)
7407 AC_SUBST(WITH_JPEG_TURBO)
7409 dnl ===================================================================
7410 dnl Check for system clucene
7411 dnl ===================================================================
7412 dnl we should rather be using
7413 dnl libo_CHECK_SYSTEM_MODULE([clucence],[CLUCENE],[liblucence-core]) here
7414 dnl but the contribs-lib check seems tricky
7415 AC_MSG_CHECKING([which clucene to use])
7416 if test "$with_system_clucene" = "yes"; then
7417 AC_MSG_RESULT([external])
7419 PKG_CHECK_MODULES(CLUCENE, libclucene-core)
7420 CLUCENE_CFLAGS=[$(printf '%s' "$CLUCENE_CFLAGS" | sed -e 's@-I[^ ]*/CLucene/ext@@' -e "s/-I/${ISYSTEM?}/g")]
7422 save_CXXFLAGS=$CXXFLAGS
7423 save_CPPFLAGS=$CPPFLAGS
7424 CXXFLAGS="$CXXFLAGS $CLUCENE_CFLAGS"
7425 CPPFLAGS="$CPPFLAGS $CLUCENE_CFLAGS"
7426 dnl http://sourceforge.net/tracker/index.php?func=detail&aid=3392466&group_id=80013&atid=558446
7427 dnl https://bugzilla.redhat.com/show_bug.cgi?id=794795
7428 AC_CHECK_HEADER([CLucene/analysis/cjk/CJKAnalyzer.h], [],
7429 [AC_MSG_ERROR([Your version of libclucene has contribs-lib missing.])], [#include <CLucene.h>])
7430 CXXFLAGS=$save_CXXFLAGS
7431 CPPFLAGS=$save_CPPFLAGS
7434 CLUCENE_LIBS="$CLUCENE_LIBS -lclucene-contribs-lib"
7436 AC_MSG_RESULT([internal])
7438 BUILD_TYPE="$BUILD_TYPE CLUCENE"
7440 AC_SUBST(SYSTEM_CLUCENE)
7441 AC_SUBST(CLUCENE_CFLAGS)
7442 AC_SUBST(CLUCENE_LIBS)
7444 dnl ===================================================================
7445 dnl Check for system expat
7446 dnl ===================================================================
7447 dnl we should use libo_CHECK_SYSTEM_MODULE, but e.g. the mingw tinderbox has no
7448 dnl proper pkg-config for it. It should really be fixed on the tinderbox though.
7449 AC_MSG_CHECKING([which expat to use])
7450 if test "$with_system_expat" = "yes"; then
7451 AC_MSG_RESULT([external])
7453 AC_CHECK_HEADER(expat.h, [],
7454 [AC_MSG_ERROR(expat.h not found. install expat)], [])
7455 AC_CHECK_LIB([expat], [XML_ParserCreate], [:],
7456 [AC_MSG_RESULT(expat library not found or functional.)], [])
7457 libo_MINGW_CHECK_DLL([libexpat])
7459 AC_MSG_RESULT([internal])
7461 BUILD_TYPE="$BUILD_TYPE EXPAT"
7463 AC_SUBST(SYSTEM_EXPAT)
7465 AC_MSG_CHECKING([whether to enable Embedded OpenType support])
7466 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_eot" = "yes"; then
7468 AC_DEFINE([ENABLE_EOT])
7469 AC_MSG_RESULT([yes])
7471 libo_CHECK_SYSTEM_MODULE([libeot],[LIBEOT],[libeot >= 0.01])
7476 AC_SUBST([ENABLE_EOT])
7478 dnl ===================================================================
7479 dnl Check for system librevenge
7480 dnl ===================================================================
7481 AS_IF([test "$COM" = "MSC"],
7482 [librevenge_libdir="${WORKDIR}/LinkTarget/Library"],
7483 [librevenge_libdir="${WORKDIR}/UnpackedTarball/librevenge/src/lib/.libs"]
7485 libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0 >= 0.0.1],["-I${WORKDIR}/UnpackedTarball/librevenge/inc"],["-L${librevenge_libdir} -lrevenge-0.0"])
7487 dnl ===================================================================
7488 dnl Check for system libe-book
7489 dnl ===================================================================
7490 libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.1 >= 0.1.1])
7492 dnl ===================================================================
7493 dnl Check for system libetonyek
7494 dnl ===================================================================
7495 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1 >= 0.1.1])
7497 dnl ===================================================================
7498 dnl Check for system libfreehand
7499 dnl ===================================================================
7500 libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1])
7502 dnl ===================================================================
7503 dnl Check for system libodfgen
7504 dnl ===================================================================
7505 libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.1])
7507 dnl ===================================================================
7508 dnl Check for system libcdr
7509 dnl ===================================================================
7510 libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
7512 dnl ===================================================================
7513 dnl Check for system libmspub
7514 dnl ===================================================================
7515 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
7517 dnl ===================================================================
7518 dnl Check for system libmwaw
7519 dnl ===================================================================
7520 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.4])
7522 dnl ===================================================================
7523 dnl Check for system libpagemaker
7524 dnl ===================================================================
7525 libo_CHECK_SYSTEM_MODULE([libpagemaker],[PAGEMAKER],[libpagemaker-0.0])
7527 dnl ===================================================================
7528 dnl Check for system libvisio
7529 dnl ===================================================================
7530 libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.1])
7532 dnl ===================================================================
7533 dnl Check for system libcmis
7534 dnl ===================================================================
7535 # libcmis requires curl and we can't build curl for iOS
7536 if test $_os != iOS; then
7537 libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.5 >= 0.5.0])
7542 AC_SUBST(ENABLE_CMIS)
7544 dnl ===================================================================
7545 dnl Check for system libwpd
7546 dnl ===================================================================
7547 libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.10],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.10"])
7549 dnl ===================================================================
7550 dnl Check for system lcms2
7551 dnl ===================================================================
7552 if test "$with_system_lcms2" = "yes"; then
7553 libo_MINGW_CHECK_DLL([liblcms2])
7557 libo_CHECK_SYSTEM_MODULE([lcms2],[LCMS2],[lcms2],["-I${WORKDIR}/UnpackedTarball/lcms2/include"],["-L${WORKDIR}/UnpackedTarball/lcms2/src/.libs -llcms2"])
7558 if test "$GCC" = "yes"; then
7559 LCMS2_CFLAGS="${LCMS2_CFLAGS} -Wno-long-long"
7561 if test "$COM" = "MSC"; then # override the above
7562 LCMS2_LIBS=${WORKDIR}/UnpackedTarball/lcms2/bin/lcms2.lib
7565 dnl ===================================================================
7566 dnl Check for system cppunit
7567 dnl ===================================================================
7568 if test "$cross_compiling" != "yes"; then
7569 libo_CHECK_SYSTEM_MODULE([cppunit],[CPPUNIT],[cppunit >= 1.12.0])
7572 dnl ===================================================================
7573 dnl Check whether freetype is available
7574 dnl ===================================================================
7575 if test "$test_freetype" = "yes"; then
7576 AC_MSG_CHECKING([whether freetype is available])
7577 # FreeType has 3 different kinds of versions
7578 # * release, like 2.4.10
7579 # * libtool, like 13.0.7 (this what pkg-config returns)
7581 # FreeType's docs/VERSION.DLL provides a table mapping between the three
7584 PKG_CHECK_MODULES(FREETYPE, freetype2 >= 9.9.3)
7585 FREETYPE_CFLAGS=$(printf '%s' "$FREETYPE_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7586 SYSTEM_FREETYPE=TRUE
7588 _save_cflags="$CFLAGS"
7589 LIBS="$LIBS $FREETYPE_LIBS"
7590 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
7591 AC_CHECK_FUNC(FT_Face_GetCharVariantIndex, AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX), [])
7593 CFLAGS="$_save_cflags"
7595 AC_SUBST(FREETYPE_CFLAGS)
7596 AC_SUBST(FREETYPE_LIBS)
7597 AC_SUBST([SYSTEM_FREETYPE])
7599 dnl ===================================================================
7600 dnl Check for system libabw
7601 dnl ===================================================================
7602 libo_CHECK_SYSTEM_MODULE([libabw],[ABW],[libabw-0.1])
7604 dnl ===================================================================
7605 dnl Check for system libwps
7606 dnl ===================================================================
7607 libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.3])
7609 dnl ===================================================================
7610 dnl Check for system libwpg
7611 dnl ===================================================================
7612 libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.3])
7614 # ===================================================================
7615 # Check for system libxslt
7616 # to prevent incompatibilities between internal libxml2 and external libxslt,
7617 # or vice versa, use with_system_libxml here
7618 # ===================================================================
7619 if test "$with_system_libxml" = "auto"; then
7622 with_system_libxml="$with_system_libs"
7625 with_system_libxml=yes
7630 AC_MSG_CHECKING([which libxslt to use])
7631 if test "$with_system_libxml" = "yes"; then
7632 AC_MSG_RESULT([external])
7634 if test "$_os" = "Darwin"; then
7635 dnl make sure to use SDK path
7636 LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
7637 LIBEXSLT_CFLAGS="$LIBXSLT_CFLAGS"
7639 LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
7640 LIBEXSLT_LIBS="-lexslt $LIBXSLT_LIBS"
7642 PKG_CHECK_MODULES(LIBXSLT, libxslt)
7643 LIBXSLT_CFLAGS=$(printf '%s' "$LIBXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7644 PKG_CHECK_MODULES(LIBEXSLT, libexslt)
7645 LIBEXSLT_CFLAGS=$(printf '%s' "$LIBEXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7648 dnl Check for xsltproc
7649 AC_PATH_PROG(XSLTPROC, xsltproc, no)
7650 if test "$XSLTPROC" = "no"; then
7651 AC_MSG_ERROR([xsltproc is required])
7654 libo_MINGW_CHECK_DLL([libxslt])
7655 libo_MINGW_CHECK_DLL([libexslt])
7656 libo_MINGW_TRY_DLL([iconv])
7658 AC_MSG_RESULT([internal])
7660 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
7662 if test "$cross_compiling" = "yes"; then
7663 AC_PATH_PROG(XSLTPROC, xsltproc, no)
7664 if test "$XSLTPROC" = "no"; then
7665 AC_MSG_ERROR([xsltproc is required])
7669 AC_SUBST(SYSTEM_LIBXSLT)
7670 if test -z "$SYSTEM_LIBXSLT_FOR_BUILD"; then
7671 SYSTEM_LIBXSLT_FOR_BUILD="$SYSTEM_LIBXSLT"
7673 AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
7675 AC_SUBST(LIBEXSLT_CFLAGS)
7676 AC_SUBST(LIBEXSLT_LIBS)
7677 AC_SUBST(LIBXSLT_CFLAGS)
7678 AC_SUBST(LIBXSLT_LIBS)
7681 # ===================================================================
7682 # Check for system libxml
7683 # ===================================================================
7684 AC_MSG_CHECKING([which libxml to use])
7685 if test "$with_system_libxml" = "yes"; then
7686 AC_MSG_RESULT([external])
7688 if test "$_os" = "Darwin"; then
7689 dnl make sure to use SDK path
7690 LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
7692 LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
7693 elif test $_os = iOS; then
7694 dnl make sure to use SDK path
7695 usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
7696 LIBXML_CFLAGS="-I$usr/include/libxml2"
7697 LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
7699 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
7700 LIBXML_CFLAGS=$(printf '%s' "$LIBXML_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7703 dnl Check for xmllint
7704 AC_PATH_PROG(XMLLINT, xmllint, no)
7705 if test "$XMLLINT" = "no"; then
7706 AC_MSG_ERROR([xmllint is required])
7709 libo_MINGW_CHECK_DLL([libxml2])
7710 libo_MINGW_TRY_DLL([zlib1])
7712 AC_MSG_RESULT([internal])
7714 LIBXML_CFLAGS="-I${WORKDIR}/UnpackedTarball/xml2/include"
7715 if test "$COM" = "MSC"; then
7716 LIBXML_CFLAGS="${LIBXML_CFLAGS} -I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
7718 if test "$COM" = "MSC"; then
7719 LIBXML_LIBS="${WORKDIR}/UnpackedTarball/xml2/win32/bin.msvc/libxml2.lib"
7721 LIBXML_LIBS="-L${WORKDIR}/UnpackedTarball/xml2/.libs -lxml2"
7723 BUILD_TYPE="$BUILD_TYPE LIBXML2"
7725 AC_SUBST(SYSTEM_LIBXML)
7726 if test -z "$SYSTEM_LIBXML_FOR_BUILD"; then
7727 SYSTEM_LIBXML_FOR_BUILD="$SYSTEM_LIBXML"
7729 AC_SUBST(SYSTEM_LIBXML_FOR_BUILD)
7730 AC_SUBST(LIBXML_CFLAGS)
7731 AC_SUBST(LIBXML_LIBS)
7734 # =====================================================================
7735 # Checking for a Python interpreter with version >= 2.6.
7736 # Build and runtime requires Python 3 compatible version (>= 2.6).
7737 # Optionally user can pass an option to configure, i. e.
7738 # ./configure PYTHON=/usr/bin/python
7739 # =====================================================================
7740 if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
7741 # This allows a lack of system python with no error, we use internal one in that case.
7742 AM_PATH_PYTHON([2.6],, [:])
7743 # Clean PYTHON_VERSION checked below if cross-compiling
7745 if test "$PYTHON" != ":"; then
7746 PYTHON_FOR_BUILD=$PYTHON
7749 AC_SUBST(PYTHON_FOR_BUILD)
7751 # Checks for Python to use for Pyuno
7752 AC_MSG_CHECKING([which Python to use for Pyuno])
7753 case "$enable_python" in
7755 if test -z $PYTHON_FOR_BUILD; then
7756 # Python is required to build LibreOffice. In theory we could separate the build-time Python
7757 # requirement from the choice whether to include Python stuff in the installer, but why
7759 AC_MSG_ERROR([Python is required at build time.])
7762 AC_MSG_RESULT([none])
7765 if test "$DISABLE_SCRIPTING" = TRUE -a -n "$PYTHON_FOR_BUILD"; then
7766 AC_MSG_RESULT([no, overridden by --disable-scripting])
7768 elif test $build_os = cygwin; then
7769 dnl When building on Windows we don't attempt to use any installed
7770 dnl "system" Python.
7772 dnl (When cross-compiling to Windows from Linux using the mingw32-cross
7773 dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
7774 dnl MinGW cross-compilation setups.)
7775 AC_MSG_RESULT([fully internal])
7776 enable_python=internal
7777 elif test "$cross_compiling" = yes; then
7778 AC_MSG_RESULT([system])
7779 enable_python=system
7781 # Unset variables set by the above AM_PATH_PYTHON so that
7782 # we actually do check anew.
7783 unset PYTHON am_cv_pathless_PYTHON ac_cv_path_PYTHON am_cv_python_version am_cv_python_platform am_cv_python_pythondir am_cv_python_pyexecdir
7784 AM_PATH_PYTHON([3.3],, [:])
7785 if test "$PYTHON" = ":"; then
7786 if test -z "$PYTHON_FOR_BUILD"; then
7787 AC_MSG_RESULT([fully internal])
7789 AC_MSG_RESULT([internal])
7791 enable_python=internal
7793 AC_MSG_RESULT([system])
7794 enable_python=system
7799 AC_MSG_RESULT([internal])
7802 AC_MSG_RESULT([fully internal])
7803 enable_python=internal
7806 AC_MSG_RESULT([system])
7809 AC_MSG_ERROR([Incorrect --enable-python option])
7813 if test $enable_python != no; then
7814 BUILD_TYPE="$BUILD_TYPE PYUNO"
7817 if test $enable_python = system; then
7818 if test -z "$PYTHON_CFLAGS" -a $_os = Darwin; then
7820 PYTHON=python$python_version
7821 if test -d "$FRAMEWORKSHOME/Python.framework/Versions/${python_version}/include/python${python_version}"; then
7822 PYTHON_CFLAGS="-I$FRAMEWORKSHOME/Python.framework/Versions/${python_version}/include/python${python_version}"
7823 PYTHON_LIBS="-framework Python"
7825 PYTHON_CFLAGS="`$PYTHON-config --includes`"
7826 PYTHON_LIBS="`$PYTHON-config --libs`"
7829 if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
7830 # Fallback: Accept these in the environment, or as set above
7833 elif test "$cross_compiling" != yes; then
7834 # Unset variables set by the above AM_PATH_PYTHON so that
7835 # we actually do check anew.
7836 unset PYTHON am_cv_pathless_PYTHON ac_cv_path_PYTHON am_cv_python_version am_cv_python_platform am_cv_python_pythondir am_cv_python_pyexecdir
7837 # This causes an error if no python command is found
7838 AM_PATH_PYTHON([3.3])
7839 python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
7840 python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
7841 python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
7842 python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
7843 if test -z "$PKG_CONFIG"; then
7844 PYTHON_CFLAGS="-I$python_include"
7845 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
7846 elif $PKG_CONFIG --exists python-$python_version; then
7847 PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
7848 PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version` $python_libs"
7850 PYTHON_CFLAGS="-I$python_include"
7851 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
7854 dnl How to find out the cross-compilation Python installation path?
7855 dnl Let's hardocode what we know for different distributions for now...
7856 for python_version in 2.6; do
7857 if test -f ${MINGW_SYSROOT}/include/python${python_version}/Python.h; then
7858 PYTHON_CFLAGS="-I${MINGW_SYSROOT}/include/python$python_version"
7859 PYTHON_LIBS="-L${MINGW_SYSROOT}/lib -lpython$python_version $python_libs"
7860 AC_MSG_CHECKING([for python.exe])
7861 libo_MINGW_CHECK_DLL([libpython$python_version])
7862 libo_MINGW_CHECK_DLL([libreadline6])
7863 libo_MINGW_CHECK_DLL([libtermcap])
7864 # could we somehow extract the really mingw python version from
7865 # actual distro package?
7866 # 2.6.2 currently on OpenSUSE 12.1?
7867 # rpm -q mingw32-python => mingw32-python-2.6.2-17.17.noarch
7868 PYTHON_VERSION=$python_version.2
7869 PYTHON_VERSION_MAJOR=`echo $python_version | cut -d . -f 1`
7870 PYTHON_VERSION_MINOR=`echo $python_version | cut -d . -f 2`
7874 AC_MSG_CHECKING([for python version])
7875 AS_IF([test -n "$PYTHON_VERSION"],
7876 [AC_MSG_RESULT([$PYTHON_VERSION])],
7877 [AC_MSG_RESULT([not found])
7878 AC_MSG_ERROR([no usable python found])])
7879 test -n "$PYTHON_CFLAGS" && break
7881 # let the PYTHON_FOR_BUILD match the same python installation that
7882 # provides PYTHON_CFLAGS/PYTHON_LDFLAGS for pyuno, which should be
7883 # better for PythonTests.
7884 PYTHON_FOR_BUILD=$PYTHON
7887 dnl By now enable_python should be "system", "internal" or "no"
7888 case $enable_python in
7892 if test "$CROSS_COMPILING" != TRUE; then
7893 dnl Check if the headers really work
7894 save_CPPFLAGS="$CPPFLAGS"
7895 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
7896 AC_CHECK_HEADER(Python.h, [],
7897 [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
7899 CPPFLAGS="$save_CPPFLAGS"
7902 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
7903 AC_MSG_CHECKING([for correct python library version])
7904 AC_RUN_IFELSE([AC_LANG_SOURCE([[
7907 int main(int argc, char **argv) {
7908 if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 6) ||
7909 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0;
7912 ]])],[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])],[])
7916 dnl FIXME Check if the Python library can be linked with, too?
7922 PYTHON_VERSION_MAJOR=3
7923 PYTHON_VERSION_MINOR=3
7924 PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.3
7925 BUILD_TYPE="$BUILD_TYPE PYTHON"
7926 # Embedded Python dies without Home set
7927 if test "$HOME" = ""; then
7930 # bz2 tarball and bzip2 is not standard
7931 if test -z "$BZIP2"; then
7932 AC_PATH_PROG( BZIP2, bzip2)
7933 if test -z "$BZIP2"; then
7934 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
7943 AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
7947 AC_SUBST(DISABLE_PYTHON)
7948 AC_SUBST(SYSTEM_PYTHON)
7949 AC_SUBST(PYTHON_CFLAGS)
7950 AC_SUBST(PYTHON_LIBS)
7951 AC_SUBST(PYTHON_VERSION)
7952 AC_SUBST(PYTHON_VERSION_MAJOR)
7953 AC_SUBST(PYTHON_VERSION_MINOR)
7955 AC_MSG_CHECKING([whether to build the MariaDB/MySQL Connector extension])
7956 if test "x$enable_ext_mariadb_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
7957 AC_MSG_RESULT([yes])
7958 ENABLE_MARIADBC=TRUE
7962 BUILD_TYPE="$BUILD_TYPE MARIADBC"
7967 AC_SUBST(ENABLE_MARIADBC)
7968 AC_SUBST(MARIADBC_MAJOR)
7969 AC_SUBST(MARIADBC_MINOR)
7970 AC_SUBST(MARIADBC_MICRO)
7972 if test "$ENABLE_MARIADBC" = "TRUE"; then
7974 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MARIADBC"
7976 dnl ===================================================================
7977 dnl Check for system MariaDB
7978 dnl ===================================================================
7979 AC_MSG_CHECKING([which MariaDB to use])
7980 if test "$with_system_mariadb" = "yes"; then
7981 AC_MSG_RESULT([external])
7983 #AC_PATH_PROG(MARIADBCONFIG, [mariadb_config])
7984 if test -z "$MARIADBCONFIG"; then
7985 AC_PATH_PROG(MARIADBCONFIG, [mysql_config])
7986 if test -z "$MARIADBCONFIG"; then
7987 AC_MSG_ERROR([mysql_config is missing. Install MySQL client library development package.])
7988 #AC_MSG_ERROR([mariadb_config and mysql_config are missing. Install MariaDB or MySQL client library development package.])
7991 AC_MSG_CHECKING([MariaDB version])
7992 MARIADB_VERSION=`$MARIADBCONFIG --version`
7993 MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1`
7994 if test "$MARIADB_MAJOR" -ge "5"; then
7997 AC_MSG_ERROR([too old, use 5.0.x or later])
7999 AC_MSG_CHECKING([for MariaDB Client library])
8000 MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`
8001 if test "$COM_GCC_IS_CLANG" = TRUE; then
8002 MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//)
8004 MARIADB_LIBS=`$MARIADBCONFIG --libs_r`
8005 dnl At least mariadb-5.5.34-3.fc20.x86_64 plus
8006 dnl mariadb-5.5.34-3.fc20.i686 reports 64-bit specific output even under
8008 if test "$OS" = LINUX -a "$CPUNAME" = INTEL; then
8009 MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-m64//)
8010 MARIADB_LIBS=$(printf '%s' "$MARIADB_LIBS" \
8011 | sed -e 's|/lib64/|/lib/|')
8013 AC_MSG_RESULT([includes '$MARIADB_CFLAGS', libraries '$MARIADB_LIBS'])
8014 AC_MSG_CHECKING([whether to bundle the MySQL/MariaDB client library])
8015 if test "$enable_bundle_mariadb" = "yes"; then
8016 AC_MSG_RESULT([yes])
8018 LIBMARIADB=lib$(echo "${MARIADB_LIBS}" | sed -e 's/[[[:space:]]]\{1,\}-l\([[^[:space:]]]\{1,\}\)/\
8020 /g' -e 's/^-l\([[^[:space:]]]\{1,\}\)[[[:space:]]]*/\
8022 /g' | grep -E '(mysqlclient|mariadb)')
8023 if test "$_os" = "Darwin"; then
8024 LIBMARIADB=${LIBMARIADB}.dylib
8025 elif test "$_os" = "WINNT"; then
8026 LIBMARIADB=${LIBMARIADB}.dll
8028 LIBMARIADB=${LIBMARIADB}.so
8030 LIBMARIADB_PATH=$($MARIADBCONFIG --variable=pkglibdir)
8031 AC_MSG_CHECKING([for $LIBMARIADB in $LIBMARIADB_PATH])
8032 if test -e "$LIBMARIADB_PATH/$LIBMARIADB"; then
8033 AC_MSG_RESULT([found.])
8034 PathFormat "$LIBMARIADB_PATH"
8035 LIBMARIADB_PATH="$formatted_path"
8037 AC_MSG_ERROR([not found.])
8044 AC_MSG_RESULT([internal])
8046 MARIADB_CFLAGS="-I${WORKDIR}/UnpackedTarball/mariadb/include"
8047 MARIADB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lmariadblib"
8048 BUILD_TYPE="$BUILD_TYPE MARIADB"
8051 AC_SUBST(SYSTEM_MARIADB)
8052 AC_SUBST(MARIADB_CFLAGS)
8053 AC_SUBST(MARIADB_LIBS)
8054 AC_SUBST(LIBMARIADB)
8055 AC_SUBST(LIBMARIADB_PATH)
8056 AC_SUBST(BUNDLE_MARIADB)
8059 dnl ===================================================================
8060 dnl Check for system MySQL C++ Connector
8061 dnl ===================================================================
8063 # who thought this too-generic cppconn dir was a good idea?
8064 AC_MSG_CHECKING([MySQL Connector/C++])
8065 if test "$with_system_mysql_cppconn" = "yes"; then
8066 AC_MSG_RESULT([external])
8067 SYSTEM_MYSQL_CPPCONN=TRUE
8069 AC_CHECK_HEADER(mysql_driver.h, [],
8070 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
8071 AC_CHECK_LIB([mysqlcppconn], [main], [:],
8072 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
8074 LIBS="$LIBS -lmysqlcppconn"
8075 AC_MSG_CHECKING([version])
8076 AC_RUN_IFELSE([AC_LANG_SOURCE([[
8077 #include <mysql_driver.h>
8079 int main(int argc, char **argv) {
8080 sql::Driver *driver;
8081 driver = get_driver_instance();
8082 if (driver->getMajorVersion() > 1 || \
8083 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
8084 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
8089 ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[])
8094 AC_MSG_RESULT([internal])
8095 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
8096 SYSTEM_MYSQL_CPPCONN=
8100 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
8102 dnl ===================================================================
8103 dnl Check for system hsqldb
8104 dnl ===================================================================
8105 if test "$with_java" != "no"; then
8106 HSQLDB_USE_JDBC_4_1=
8107 AC_MSG_CHECKING([which hsqldb to use])
8108 if test "$with_system_hsqldb" = "yes"; then
8109 AC_MSG_RESULT([external])
8111 if test -z $HSQLDB_JAR; then
8112 HSQLDB_JAR=/usr/share/java/hsqldb.jar
8114 AC_CHECK_FILE($HSQLDB_JAR, [],
8115 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
8116 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
8120 my $file = "$ENV{'HSQLDB_JAR'}";
8121 my $zip = Archive::Zip->new( $file );
8122 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
8123 if ( $mf =~ m/Specification-Version: 1.8.*/ )
8125 push @l, split(/\n/, $mf);
8126 foreach my $line (@l)
8128 if ($line =~ m/Specification-Version:/)
8130 ($t, $version) = split (/:/,$line);
8131 $version =~ s/^\s//;
8132 ($a, $b, $c, $d) = split (/\./,$version);
8133 if ($c == "0" && $d > "8")
8148 AC_MSG_RESULT([yes])
8150 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
8153 AC_MSG_RESULT([internal])
8155 BUILD_TYPE="$BUILD_TYPE HSQLDB"
8156 AC_MSG_CHECKING([whether hsqldb should be built with JDBC 4.1])
8157 javanumver=`$JAVAINTERPRETER -version 2>&1 | $AWK -v num=true -f $SRC_ROOT/solenv/bin/getcompver.awk`
8158 if expr "$javanumver" '>=' 000100060000 > /dev/null; then
8159 AC_MSG_RESULT([yes])
8160 HSQLDB_USE_JDBC_4_1=TRUE
8165 AC_SUBST(SYSTEM_HSQLDB)
8166 AC_SUBST(HSQLDB_JAR)
8167 AC_SUBST([HSQLDB_USE_JDBC_4_1])
8170 dnl ===================================================================
8171 dnl Check for PostgreSQL stuff
8172 dnl ===================================================================
8173 if test "x$enable_postgresql_sdbc" != "xno"; then
8174 SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
8176 if test "$with_krb5" = "yes" -a "$enable_openssl" = "no"; then
8177 AC_MSG_ERROR([krb5 needs OpenSSL, but --disable-openssl was given.])
8179 if test "$with_gssapi" = "yes" -a "$enable_openssl" = "no"; then
8180 AC_MSG_ERROR([GSSAPI needs OpenSSL, but --disable-openssl was given.])
8183 AC_MSG_CHECKING([PostgreSQL C interface])
8184 if test "$with_system_postgresql" = "yes"; then
8185 AC_MSG_RESULT([external PostgreSQL])
8186 SYSTEM_POSTGRESQL=TRUE
8187 if test "$_os" = Darwin; then
8189 for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
8190 pg_supp_path="$P_SEP$d$pg_supp_path"
8193 AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
8194 if test -z "$PGCONFIG"; then
8195 AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
8197 POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
8198 POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
8200 # if/when anything else than PostgreSQL uses Kerberos,
8201 # move this out of `test "x$enable_postgresql_sdbc" != "xno"'
8206 # MacOS X has system MIT Kerberos 5 since 10.4
8207 if test "$with_krb5" != "no"; then
8210 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8211 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5, try installing libcom_err devel package])])
8214 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8215 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5, try installing krb5 devel package])])
8216 KRB5_LIBS="$KRB5_LIBS $LIBS"
8219 if test "$with_gssapi" != "no"; then
8222 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8223 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8229 if test "$with_krb5" = "yes" -o "$with_gssapi" = "yes"; then
8230 AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Windows.])
8233 Linux|GNU|*BSD|DragonFly)
8234 if test "$with_krb5" != "no"; then
8237 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8238 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
8241 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8242 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
8243 KRB5_LIBS="$KRB5_LIBS $LIBS"
8246 if test "$with_gssapi" != "no"; then
8249 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8250 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8256 if test "$with_krb5" = "yes"; then
8259 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8260 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
8263 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8264 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
8265 KRB5_LIBS="$KRB5_LIBS $LIBS"
8268 if test "$with_gssapi" = "yes"; then
8271 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8272 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8278 if test -n "$with_libpq_path"; then
8279 SYSTEM_POSTGRESQL=TRUE
8280 AC_MSG_RESULT([external libpq])
8281 POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
8282 POSTGRESQL_INC=-I"${with_libpq_path}/include/"
8285 AC_MSG_RESULT([internal])
8287 POSTGRESQL_INC="%OVERRIDE_ME%"
8288 BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
8291 if test "${SYSTEM_POSTGRESQL}" = "TRUE"; then
8292 AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
8294 save_CPPFLAGS=$CPPFLAGS
8296 CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
8297 LIBS="${LIBS} ${POSTGRESQL_LIB}"
8298 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
8299 AC_CHECK_LIB([pq], [PQconnectdbParams], [:],
8300 [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
8302 CPPFLAGS=$save_CPPFLAGS
8305 BUILD_POSTGRESQL_SDBC=TRUE
8308 AC_SUBST(WITH_GSSAPI)
8309 AC_SUBST(GSSAPI_LIBS)
8311 AC_SUBST(BUILD_POSTGRESQL_SDBC)
8312 AC_SUBST(SYSTEM_POSTGRESQL)
8313 AC_SUBST(POSTGRESQL_INC)
8314 AC_SUBST(POSTGRESQL_LIB)
8316 dnl ===================================================================
8317 dnl Check for Firebird stuff
8318 dnl ===================================================================
8319 ENABLE_FIREBIRD_SDBC=""
8320 if test "x$enable_firebird_sdbc" = "xyes"; then
8321 SCPDEFS="$SCPDEFS -DWITH_FIREBIRD_SDBC"
8323 dnl ===================================================================
8324 dnl Check for system Firebird
8325 dnl ===================================================================
8326 AC_MSG_CHECKING([which Firebird to use])
8327 if test "$with_system_firebird" = "yes"; then
8328 AC_MSG_RESULT([external])
8329 SYSTEM_FIREBIRD=TRUE
8330 AC_PATH_PROG(FIREBIRDCONFIG, [fb_config])
8331 if test -z "$FIREBIRDCONFIG"; then
8332 AC_MSG_NOTICE([No fb_config -- using pkg-config])
8333 PKG_CHECK_MODULES(FIREBIRD, fbembed)
8334 FIREBIRD_VERSION=`pkg-config --modversion fbembed`
8336 AC_MSG_NOTICE([fb_config found])
8337 FIREBIRD_VERSION=`$FIREBIRDCONFIG --version`
8338 AC_MSG_CHECKING([for Firebird Client library])
8339 FIREBIRD_CFLAGS=`$FIREBIRDCONFIG --cflags`
8340 FIREBIRD_LIBS=`$FIREBIRDCONFIG --embedlibs`
8342 AC_MSG_RESULT([includes `$FIREBIRD_CFLAGS', libraries `$FIREBIRD_LIBS'])
8343 AC_MSG_CHECKING([Firebird version])
8344 if test -n "${FIREBIRD_VERSION}"; then
8345 FIREBIRD_MAJOR=`echo $FIREBIRD_VERSION | cut -d"." -f1`
8346 FIREBIRD_MINOR=`echo $FIREBIRD_VERSION | cut -d"." -f2`
8347 if test "$FIREBIRD_MAJOR" -eq "2" -a "$FIREBIRD_MINOR" -eq "5"; then
8350 AC_MSG_ERROR([Ensure firebird 2.5.x is installed])
8353 __save_CFLAGS="${CFLAGS}"
8354 CFLAGS="${CFLAGS} ${FIREBIRD_CFLAGS}"
8355 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ibase.h>
8356 #if defined(FB_API_VER) && FB_API_VER == 25
8358 #error "Wrong Firebird API version"
8359 #endif]])],AC_MSG_RESULT([OK]),AC_MSG_ERROR([Ensure firebird 2.5.x is installed]))
8360 CFLAGS="${__save_CFLAGS}"
8362 ENABLE_FIREBIRD_SDBC="TRUE"
8363 elif test "$enable_database_connectivity" != yes; then
8364 AC_MSG_RESULT([none])
8365 elif test "$cross_compiling" = "yes"; then
8366 AC_MSG_RESULT([none])
8368 dnl We need libatomic-ops for any non X86/X64 system
8369 if test "${CPUNAME}" != INTEL -a "${CPUNAME}" != X86_64; then
8370 dnl ===================================================================
8371 dnl Check for system libatomic-ops
8372 dnl ===================================================================
8373 libo_CHECK_SYSTEM_MODULE([libatomic_ops],[ATOMIC_OPS],[atomic_ops >= 0.7.2])
8374 if test "$with_system_libatomic_ops" = "yes"; then
8375 SYSTEM_LIBATOMIC_OPS=TRUE
8376 AC_CHECK_HEADERS(atomic_ops.h, [],
8377 [AC_MSG_ERROR(atomic_ops.h not found. install libatomic-ops)], [])
8379 SYSTEM_LIBATOMIC_OPS=
8380 LIBATOMIC_OPS_CFLAGS="-I${WORKDIR}/UnpackedTarball/libatomic_ops/include"
8381 LIBATOMIC_OPS_LIBS="-latomic_ops"
8382 BUILD_TYPE="$BUILD_TYPE LIBATOMIC_OPS"
8386 AC_MSG_RESULT([internal])
8388 FIREBIRD_CFLAGS="-I${WORKDIR}/UnpackedTarball/firebird/include"
8389 FIREBIRD_LIBS="-lfbembed"
8391 BUILD_TYPE="$BUILD_TYPE FIREBIRD"
8392 ENABLE_FIREBIRD_SDBC="TRUE"
8395 AC_SUBST(ENABLE_FIREBIRD_SDBC)
8396 AC_SUBST(SYSTEM_LIBATOMIC_OPS)
8397 AC_SUBST(LIBATOMIC_OPS_CFLAGS)
8398 AC_SUBST(LIBATOMIC_OPS_LIBS)
8399 AC_SUBST(SYSTEM_FIREBIRD)
8400 AC_SUBST(FIREBIRD_CFLAGS)
8401 AC_SUBST(FIREBIRD_LIBS)
8402 dnl AC_SUBST([TOMMATH_CFLAGS])
8403 dnl AC_SUBST([TOMMATH_LIBS])
8405 dnl ===================================================================
8406 dnl Check for system curl
8407 dnl ===================================================================
8408 AC_MSG_CHECKING([which libcurl to use])
8409 if test "$with_system_curl" = "auto"; then
8410 with_system_curl="$with_system_libs"
8413 if test "$with_system_curl" = "yes"; then
8414 AC_MSG_RESULT([external])
8417 AC_MSG_CHECKING([whether libcurl is >= 7.19.4])
8419 # First try PKGCONFIG and then fall back
8420 PKG_CHECK_MODULES(CURL, libcurl >= 7.19.4,, [:])
8422 if test -n "$CURL_PKG_ERRORS"; then
8423 AC_PATH_PROG(CURLCONFIG, curl-config)
8424 if test -z "$CURLCONFIG"; then
8425 AC_MSG_ERROR([curl development files not found])
8427 CURL_LIBS=`$CURLCONFIG --libs`
8428 CURL_CFLAGS=$("$CURLCONFIG" --cflags | sed -e "s/-I/${ISYSTEM?}/g")
8429 curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
8431 case $curl_version in
8432 dnl brackets doubled below because Autoconf uses them as m4 quote characters,
8433 dnl so they need to be doubled to end up in the configure script
8434 7.19.4|7.19.[[5-9]]|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
8437 AC_MSG_ERROR([no, you have $curl_version])
8441 AC_MSG_RESULT([yes])
8443 libo_MINGW_CHECK_DLL([libcurl])
8444 libo_MINGW_TRY_DLL([libintl])
8445 libo_MINGW_TRY_DLL([libidn])
8446 libo_MINGW_TRY_DLL([libnspr4])
8447 libo_MINGW_TRY_DLL([nssutil3])
8448 libo_MINGW_TRY_DLL([libplc4])
8449 libo_MINGW_TRY_DLL([libplds4])
8450 libo_MINGW_TRY_DLL([nss3])
8451 libo_MINGW_TRY_DLL([ssl3])
8452 libo_MINGW_TRY_DLL([libgpg-error])
8453 libo_MINGW_TRY_DLL([libgcrypt])
8454 libo_MINGW_TRY_DLL([libssh2])
8456 elif test $_os = iOS; then
8457 # Let's see if we need curl, I think not?
8458 AC_MSG_RESULT([none])
8461 AC_MSG_RESULT([internal])
8463 BUILD_TYPE="$BUILD_TYPE CURL"
8466 AC_SUBST(SYSTEM_CURL)
8467 AC_SUBST(CURL_CFLAGS)
8469 AC_SUBST(ENABLE_CURL)
8471 dnl ===================================================================
8472 dnl Check for system boost
8473 dnl ===================================================================
8474 AC_MSG_CHECKING([which boost to use])
8475 if test "$with_system_boost" = "yes"; then
8476 AC_MSG_RESULT([external])
8481 mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
8482 libo_MINGW_TRY_DLL([$mingw_boost_date_time_dll])
8483 if test -z "$MINGW_BOOST_DATE_TIME_DLL"; then
8484 # if not found, try again with 'lib' prefix
8485 libo_MINGW_CHECK_DLL([lib$mingw_boost_date_time_dll])
8488 save_CXXFLAGS=$CXXFLAGS
8489 CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS $CXXFLAGS_CXX11"
8490 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
8491 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
8492 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
8493 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
8494 AC_CHECK_HEADER(boost/function.hpp, [],
8495 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
8496 AC_MSG_CHECKING([whether boost signals2 works])
8497 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/signals2/signal.hpp>]],
8498 [[ boost::signals2::signal<void()> s; s(); ]])],
8499 [AC_MSG_RESULT([yes])],
8500 [AC_MSG_ERROR([no, install boost >= 1.55 or use --without-system-boost])])
8501 CXXFLAGS="$CXXFLAGS -fno-exceptions"
8502 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
8503 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
8504 ]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
8505 if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
8506 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
8508 AC_MSG_RESULT([yes])
8510 CXXFLAGS=$save_CXXFLAGS
8513 AC_MSG_RESULT([internal])
8514 BUILD_TYPE="$BUILD_TYPE BOOST"
8517 AC_SUBST(SYSTEM_BOOST)
8519 dnl ===================================================================
8520 dnl Check for system mdds
8521 dnl ===================================================================
8522 libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds >= 0.11.2], ["-I${WORKDIR}/UnpackedTarball/mdds/include"])
8524 dnl ===================================================================
8525 dnl Check for system glm
8526 dnl ===================================================================
8527 AC_MSG_CHECKING([which glm to use])
8528 if test "$with_system_glm" = "yes"; then
8529 AC_MSG_RESULT([external])
8532 AC_CHECK_HEADER([glm/glm.hpp], [],
8533 [AC_MSG_ERROR([glm/glm.hpp not found. install glm])], [])
8536 AC_MSG_RESULT([internal])
8537 BUILD_TYPE="$BUILD_TYPE GLM"
8540 AC_SUBST([SYSTEM_GLM])
8542 dnl ===================================================================
8543 dnl Check for system glew
8544 dnl ===================================================================
8545 libo_CHECK_SYSTEM_MODULE([glew], [GLEW], [glew >= 1.10.0])
8547 dnl ===================================================================
8548 dnl Check for system vigra
8549 dnl ===================================================================
8550 AC_MSG_CHECKING([which vigra to use])
8551 if test "$with_system_vigra" = "yes"; then
8552 AC_MSG_RESULT([external])
8555 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
8556 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
8559 AC_MSG_RESULT([internal])
8560 BUILD_TYPE="$BUILD_TYPE VIGRA"
8563 AC_SUBST(SYSTEM_VIGRA)
8565 dnl ===================================================================
8566 dnl Check for system odbc
8567 dnl ===================================================================
8568 AC_MSG_CHECKING([which odbc headers to use])
8569 if test "$with_system_odbc" = "yes" -o '(' "$with_system_headers" = "yes" -a "$with_system_odbc" = "auto" ')' -o '(' "$_os" = "WINNT" -a "$with_system_odbc" != "no" ')'; then
8570 AC_MSG_RESULT([external])
8571 SYSTEM_ODBC_HEADERS=TRUE
8573 if test "$build_os" = "cygwin"; then
8574 save_CPPFLAGS=$CPPFLAGS
8576 PathFormat "$winsdktest"
8577 CPPFLAGS="$CPPFLAGS -I$formatted_path/include/um -I$formatted_path/include -I$formatted_path/include/shared"
8578 AC_CHECK_HEADER(sqlext.h, [],
8579 [AC_MSG_ERROR(odbc not found. install odbc)],
8580 [#include <windows.h>])
8581 CPPFLAGS=$save_CPPFLAGS
8583 AC_CHECK_HEADER(sqlext.h, [],
8584 [AC_MSG_ERROR(odbc not found. install odbc)],[])
8586 elif test "$enable_database_connectivity" != yes; then
8587 AC_MSG_RESULT([none])
8589 AC_MSG_RESULT([internal])
8590 SYSTEM_ODBC_HEADERS=
8592 AC_SUBST(SYSTEM_ODBC_HEADERS)
8595 dnl ===================================================================
8596 dnl Check for system openldap
8597 dnl ===================================================================
8599 if test "$_os" != "WINNT" -a "$_os" != "iOS" -a "$_os" != "Android"; then
8600 AC_MSG_CHECKING([which openldap library to use])
8601 if test "$with_system_openldap" = "yes"; then
8602 AC_MSG_RESULT([external])
8603 SYSTEM_OPENLDAP=TRUE
8604 AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
8605 AC_CHECK_LIB([ldap], [ldap_simple_bind_s], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
8606 AC_CHECK_LIB([ldap], [ldap_set_option], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
8608 AC_MSG_RESULT([internal])
8610 BUILD_TYPE="$BUILD_TYPE OPENLDAP"
8613 AC_SUBST(SYSTEM_OPENLDAP)
8615 dnl ===================================================================
8616 dnl Check for mozilla ab connectivity for windows
8617 dnl ===================================================================
8619 if test "$_os" = "WINNT"; then
8620 AC_MSG_CHECKING([whether to enable build of Mozilla addressbook connectivity driver for Windows])
8621 if test "$enable_win_mozab_driver" = "yes" -a "$WITH_MINGW" != "YES" ; then
8623 AC_MSG_RESULT([yes, internal (old windows mozab driver)])
8624 BUILD_TYPE="$BUILD_TYPE MOZ"
8625 MSVC80_DLLS="msvcp80.dll msvcr80.dll Microsoft.VC80.CRT.manifest"
8626 MSVC80_DLL_PATH=`cygpath -u "$TARFILE_LOCATION"`
8627 for dll in $MSVC80_DLLS; do
8628 if ! test -f "$MSVC80_DLL_PATH/$dll"; then
8629 AC_MSG_ERROR([can not find $dll in $MSVC80_DLL_PATH needed for the pre-built Mozilla libraries])
8637 AC_SUBST(WITH_MOZAB4WIN)
8638 AC_SUBST(MSVC80_DLLS)
8639 AC_SUBST(MSVC80_DLL_PATH)
8641 dnl ===================================================================
8642 dnl Check for TLS/SSL and cryptographic implementation to use
8643 dnl ===================================================================
8644 AC_MSG_CHECKING([which TLS/SSL and cryptographic implementation to use])
8645 if test -n "$with_tls"; then
8648 AC_DEFINE(USE_TLS_OPENSSL)
8651 if test "$enable_openssl" != "yes"; then
8652 AC_MSG_ERROR(["Disabling OpenSSL was requested, but the requested TLS to use is actually OpenSSL."])
8655 # warn that OpenSSL has been selected but not all TLS code has this option
8656 AC_MSG_WARN([TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS])
8657 add_warning "TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS"
8660 AC_DEFINE(USE_TLS_NSS)
8664 AC_MSG_ERROR([unsupported implementation $with_tls. Supported are:
8666 nss - Mozilla's Network Security Services (NSS)
8670 elif test $_os = iOS -o $_os = Android; then
8671 # We don't build NSS for iOS and Android
8672 AC_DEFINE(USE_TLS_OPENSSL)
8675 # default to using NSS, it results in smaller oox lib
8676 AC_DEFINE(USE_TLS_NSS)
8679 AC_MSG_RESULT([$TLS])
8682 dnl ===================================================================
8683 dnl Check for system NSS
8684 dnl ===================================================================
8685 libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
8686 if test "$with_system_nss" = "yes"; then
8687 libo_MINGW_CHECK_DLL([libnspr4])
8688 libo_MINGW_CHECK_DLL([libplc4])
8689 libo_MINGW_CHECK_DLL([libplds4])
8690 libo_MINGW_CHECK_DLL([nss3])
8691 libo_MINGW_CHECK_DLL([nssutil3])
8692 libo_MINGW_CHECK_DLL([smime3])
8693 libo_MINGW_CHECK_DLL([ssl3])
8696 dnl ===================================================================
8697 dnl Check for system mozilla headers
8698 dnl ===================================================================
8699 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=
8700 AC_MSG_CHECKING([which NPAPI headers to use])
8702 if test "$with_system_npapi_headers" = "yes"; then
8703 AC_MSG_RESULT([external])
8704 SYSTEM_NPAPI_HEADERS=TRUE
8705 # First try npapi-sdk:
8706 PKG_CHECK_MODULES(NPAPI_HEADERS, npapi-sdk, [LOCATED=yes], [LOCATED=no])
8707 # Then go with libxul:
8708 if test "x$LOCATED" != "xyes"; then
8709 PKG_CHECK_MODULES(NPAPI_HEADERS, libxul, [LOCATED=yes], [LOCATED=no])
8711 if test "x$LOCATED" != "xyes"; then
8712 PKG_CHECK_MODULES(NPAPI_HEADERS, mozilla-plugin, [LOCATED=yes], [LOCATED=no])
8714 # if still not found bail out
8715 if test "x$LOCATED" != "xyes"; then
8716 AC_MSG_ERROR([npapi.h header file not found])
8721 CFLAGS="$CFLAGS $NPAPI_HEADERS_CFLAGS"
8722 AC_MSG_CHECKING([for NPP_GetMIMEDescription return type])
8727 const char* NPP_GetMIMEDescription(void) { return "foo"; }
8729 [AC_MSG_RESULT([const char*])],
8731 AC_MSG_RESULT([char*])
8732 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=TRUE
8736 NPAPI_HEADERS_CFLAGS=$(printf '%s' "$NPAPI_HEADERS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
8738 AC_MSG_RESULT([internal])
8739 dnl ...but will not be built/used unless ENABLE_NPAPI_FROM_BROWSER
8740 SYSTEM_NPAPI_HEADERS=
8742 AC_SUBST(NPAPI_HEADERS_CFLAGS)
8743 AC_SUBST(SYSTEM_NPAPI_HEADERS)
8744 AC_SUBST(HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION)
8746 dnl ===================================================================
8747 dnl Check for system sane
8748 dnl ===================================================================
8749 AC_MSG_CHECKING([which sane header to use])
8750 if test "$with_system_sane" = "yes"; then
8751 AC_MSG_RESULT([external])
8752 AC_CHECK_HEADER(sane/sane.h, [],
8753 [AC_MSG_ERROR(sane not found. install sane)], [])
8755 AC_MSG_RESULT([internal])
8756 BUILD_TYPE="$BUILD_TYPE SANE"
8759 dnl ===================================================================
8760 dnl Check for system icu
8761 dnl ===================================================================
8768 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="TRUE"
8769 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
8770 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
8771 ICU_RECLASSIFIED_HEBREW_LETTER="TRUE"
8772 AC_MSG_CHECKING([which icu to use])
8773 if test "$with_system_icu" = "yes"; then
8774 AC_MSG_RESULT([external])
8777 AC_MSG_CHECKING([for unicode/rbbi.h])
8778 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
8781 if test "$cross_compiling" != "yes" -o "$WITH_MINGW" = "yes"; then
8783 if test "$WITH_MINGW" = "yes"; then
8784 ICUPATH=`$CC -print-sysroot`/mingw/bin:"$ICUPATH"
8786 AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
8788 AC_MSG_CHECKING([ICU version])
8789 ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
8790 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
8791 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
8793 if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "2" \); then
8794 AC_MSG_RESULT([OK, $ICU_VERSION])
8796 AC_MSG_ERROR([not suitable, only >= 4.2 supported currently])
8800 if test "$cross_compiling" = "yes" -a \( "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \); then
8801 AC_PATH_PROG([ICUCONFIG_FOR_BUILD], [icu-config], [], [$PATH:/usr/sbin:/sbin])
8802 ICU_VERSION_FOR_BUILD=`$ICUCONFIG_FOR_BUILD --noverify --version 2>/dev/null || $ICUCONFIG_FOR_BUILD --version`
8803 ICU_MAJOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f1`
8804 ICU_MINOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f2`
8805 AC_MSG_CHECKING([if MinGW and system versions of ICU are compatible])
8806 if test "$ICU_MAJOR" -eq "$ICU_MAJOR_FOR_BUILD" -a "$ICU_MINOR" -eq "$ICU_MINOR_FOR_BUILD"; then
8807 AC_MSG_RESULT([yes])
8810 if test "$with_system_icu_for_build" != "force"; then
8811 AC_MSG_ERROR([System ICU is not version-compatible with MinGW ICU.
8812 You can use --with-system-icu-for-build=force to use it anyway.])
8817 if test "$cross_compiling" != "yes" -o "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force"; then
8818 # using the system icu tools can lead to version confusion, use the
8819 # ones from the build environment when cross-compiling
8820 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
8821 if test -z "$SYSTEM_GENBRK"; then
8822 AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
8824 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
8825 if test -z "$SYSTEM_GENCCODE"; then
8826 AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
8828 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
8829 if test -z "$SYSTEM_GENCMN"; then
8830 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
8832 if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4" \); then
8833 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="TRUE"
8835 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=
8837 if test "$ICU_MAJOR" -ge "49"; then
8838 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
8839 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
8840 ICU_RECLASSIFIED_HEBREW_LETTER="TRUE"
8842 ICU_RECLASSIFIED_PREPEND_SET_EMPTY=
8843 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER=
8844 ICU_RECLASSIFIED_HEBREW_LETTER=
8848 if test "$cross_compiling" = "yes"; then
8849 if test "$ICU_MAJOR" -ge "50"; then
8850 AC_MSG_RESULT([Ignore ICU_MINOR as obviously the libraries don't include the minor version in their names any more])
8855 libo_MINGW_CHECK_DLL([icudata][$ICU_MAJOR][$ICU_MINOR])
8856 libo_MINGW_CHECK_DLL([icui18n][$ICU_MAJOR][$ICU_MINOR])
8857 libo_MINGW_CHECK_DLL([icuuc][$ICU_MAJOR][$ICU_MINOR])
8859 AC_MSG_RESULT([internal])
8861 BUILD_TYPE="$BUILD_TYPE ICU"
8862 # surprisingly set these only for "internal" (to be used by various other
8863 # external libs): the system icu-config is quite unhelpful and spits out
8864 # dozens of weird flags and also default path -I/usr/include
8865 ICU_CFLAGS="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
8866 ICU_LIBS="-L${WORKDIR}/UnpackedTarball/icu/source/lib"
8868 AC_SUBST(SYSTEM_ICU)
8869 AC_SUBST(SYSTEM_GENBRK)
8870 AC_SUBST(SYSTEM_GENCCODE)
8871 AC_SUBST(SYSTEM_GENCMN)
8874 AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
8875 AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
8876 AC_SUBST(ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER)
8877 AC_SUBST(ICU_RECLASSIFIED_HEBREW_LETTER)
8878 AC_SUBST(ICU_CFLAGS)
8881 dnl ===================================================================
8883 dnl ===================================================================
8885 AC_MSG_CHECKING([whether to enable graphite support])
8886 if test $_os != Darwin -a $_os != Android -a $_os != iOS -a \( -z "$enable_graphite" -o "$enable_graphite" != no \); then
8887 AC_MSG_RESULT([yes])
8888 ENABLE_GRAPHITE="TRUE"
8889 AC_DEFINE(ENABLE_GRAPHITE)
8890 libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3])
8891 if test "$with_system_graphite" = "yes"; then
8892 libo_MINGW_CHECK_DLL([libgraphite2])
8897 AC_SUBST(ENABLE_GRAPHITE)
8899 dnl ===================================================================
8901 dnl ===================================================================
8903 AC_MSG_CHECKING([whether to enable orcus])
8904 if test -z "$enable_orcus" -o "$enable_orcus" != no; then
8905 AC_MSG_RESULT([yes])
8907 AC_DEFINE(ENABLE_ORCUS)
8909 libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.8 >= 0.7.0])
8910 if test "$with_system_orcus" != "yes"; then
8911 if test "$SYSTEM_BOOST" = "TRUE"; then
8912 # ===========================================================
8913 # Determine if we are going to need to link with Boost.System
8914 # ===========================================================
8915 dnl This seems to be necessary since boost 1.50 (1.48 does not need it,
8916 dnl 1.49 is untested). The macro BOOST_THREAD_DONT_USE_SYSTEM mentioned
8917 dnl in documentation has no effect.
8918 AC_MSG_CHECKING([if we need to link with Boost.System])
8920 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
8921 @%:@include <boost/version.hpp>
8923 #if BOOST_VERSION >= 105000
8924 # error yes, we need to link with Boost.System
8929 AC_MSG_RESULT([yes])
8935 dnl FIXME by renaming SYSTEM_LIBORCUS to SYSTEM_ORCUS in the build system world
8936 SYSTEM_LIBORCUS=$SYSTEM_ORCUS
8937 AC_SUBST([BOOST_SYSTEM_LIB])
8938 AC_SUBST(SYSTEM_LIBORCUS)
8943 AC_SUBST(ENABLE_ORCUS)
8945 dnl ===================================================================
8947 dnl ===================================================================
8948 AC_MSG_CHECKING([whether to enable HarfBuzz support])
8949 if test $_os != WINNT -a $_os != Darwin -a $_os != iOS; then
8950 AC_MSG_RESULT([yes])
8951 ENABLE_HARFBUZZ="TRUE"
8952 if $PKG_CONFIG --atleast-version 0.9.18 harfbuzz; then
8953 libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 0.9.18],["-I${WORKDIR}/UnpackedTarball/harfbuzz/src"],["-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz -lharfbuzz-icu"])
8955 libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz >= 0.9.10],[-I${WORKDIR}/UnpackedTarball/harfbuzz/src],["-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz -lharfbuzz-icu"])
8960 AC_SUBST(ENABLE_HARFBUZZ)
8962 dnl ===================================================================
8963 dnl Check for NPAPI interface to plug browser plugins into LibreOffice documents
8964 dnl ===================================================================
8965 AC_MSG_CHECKING([whether to plug browser plugins into LibreOffice documents])
8966 # Obviously no such thing on iOS or Android. Also not possible when building
8967 # 64-bit OS X code as the plugin code uses QuickTime and Carbon.
8968 if test "$_os" != Android -a "$_os" != iOS -a $_os != Darwin -a \
8969 "$with_x" != "no" -a "$enable_mpl_subset" != yes
8971 AC_MSG_RESULT([yes])
8972 ENABLE_NPAPI_FROM_BROWSER=TRUE
8975 ENABLE_NPAPI_FROM_BROWSER=
8977 AC_SUBST(ENABLE_NPAPI_FROM_BROWSER)
8979 AC_MSG_CHECKING([whether to use X11])
8980 dnl ***************************************
8981 dnl testing for X libraries and includes...
8982 dnl ***************************************
8984 if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS -a "$with_x" != "no"; then
8986 AC_DEFINE(HAVE_FEATURE_X11)
8988 AC_MSG_RESULT([$WANT_X11])
8990 if test "$WANT_X11" = "yes"; then
8993 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8995 if test -z "$x_includes"; then
8996 x_includes="default_x_includes"
8998 if test -z "$x_libraries"; then
8999 x_libraries="default_x_libraries"
9001 CFLAGS="$CFLAGS $X_CFLAGS"
9002 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
9003 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
9005 x_includes="no_x_includes"
9006 x_libraries="no_x_libraries"
9009 if test "$WANT_X11" = "yes"; then
9010 dnl ===================================================================
9011 dnl Check for Composite.h for Mozilla plugin
9012 dnl ===================================================================
9013 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
9014 [#include <X11/Intrinsic.h>])
9016 # ENABLE_NPAPI_FROM_BROWSER requires Xt library
9017 AC_CHECK_LIB([Xt], [XtToolkitInitialize], [:],
9018 [AC_MSG_ERROR(Xt library not found)])
9020 dnl ===================================================================
9021 dnl Check for extension headers
9022 dnl ===================================================================
9023 AC_CHECK_HEADERS(X11/extensions/shape.h,[],[AC_MSG_ERROR([libXext headers not found])],
9024 [#include <X11/extensions/shape.h>])
9026 # vcl needs ICE and SM
9027 AC_CHECK_HEADERS(X11/ICE/ICElib.h,[],[AC_MSG_ERROR([libICE headers not found])])
9028 AC_CHECK_LIB([ICE], [IceConnectionNumber], [:],
9029 [AC_MSG_ERROR(ICE library not found)])
9030 AC_CHECK_HEADERS(X11/SM/SMlib.h,[],[AC_MSG_ERROR([libSM headers not found])])
9031 AC_CHECK_LIB([SM], [SmcOpenConnection], [:],
9032 [AC_MSG_ERROR(SM library not found)])
9035 dnl ===================================================================
9036 dnl Check for system Xrender
9037 dnl ===================================================================
9038 AC_MSG_CHECKING([whether to use Xrender])
9039 if test "$WANT_X11" = "yes" -a "$test_xrender" = "yes"; then
9040 AC_MSG_RESULT([yes])
9041 PKG_CHECK_MODULES(XRENDER, xrender)
9042 XRENDER_CFLAGS=$(printf '%s' "$XRENDER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9043 AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
9044 [AC_MSG_ERROR(libXrender not found or functional)], [])
9045 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
9046 [AC_MSG_ERROR(Xrender not found. install X)], [])
9050 AC_SUBST(XRENDER_CFLAGS)
9051 AC_SUBST(XRENDER_LIBS)
9053 dnl ===================================================================
9054 dnl Check for XRandr
9055 dnl ===================================================================
9056 AC_MSG_CHECKING([whether to enable RandR support])
9057 if test "$WANT_X11" = "yes" -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \); then
9058 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
9059 XRANDR_DLOPEN="TRUE"
9060 AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
9062 AC_MSG_RESULT([yes])
9063 XRANDR_DLOPEN="FALSE"
9064 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
9065 if test "$ENABLE_RANDR" != "TRUE"; then
9066 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
9067 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
9069 AC_CHECK_LIB([Xrandr], [XRRQueryExtension], [:],
9070 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
9071 XRANDR_LIBS="-lXrandr "
9074 XRANDR_CFLAGS=$(printf '%s' "$XRANDR_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9080 AC_SUBST(XRANDR_DLOPEN)
9081 AC_SUBST(XRANDR_CFLAGS)
9082 AC_SUBST(XRANDR_LIBS)
9083 AC_SUBST(ENABLE_RANDR)
9085 if test "$enable_neon" = "no" -o "$enable_mpl_subset" = "yes"; then
9088 if test $_os = iOS -o $_os = Android; then
9091 AC_MSG_CHECKING([for webdav library])
9092 case "$WITH_WEBDAV" in
9094 AC_MSG_RESULT([serf])
9095 # Check for system apr-util
9096 libo_CHECK_SYSTEM_MODULE([apr],[APR],[apr-util-1],
9097 ["-I${WORKDIR}/UnpackedTarball/apr/include -I${WORKDIR}/UnpackedTarball/apr_util/include"],
9098 ["-L${WORKDIR}/UnpackedTarball/apr/.libs -lapr-1 -L${WORKDIR}/UnpackedTarball/apr_util/.libs -laprutil-1"])
9099 if test "$COM" = "MSC"; then
9101 test -n "${MSVC_USE_DEBUG_RUNTIME}" && APR_LIB_DIR="LibD"
9102 APR_LIBS="${WORKDIR}/UnpackedTarball/apr/${APR_LIB_DIR}/apr-1.lib ${WORKDIR}/UnpackedTarball/apr_util/${APR_LIB_DIR}/aprutil-1.lib"
9105 # Check for system serf
9106 libo_CHECK_SYSTEM_MODULE([serf],[SERF],[serf-1 >= 1.1.0],["-I${WORKDIR}/UnpackedTarball/serf"],
9107 ["-L${WORKDIR}/UnpackedTarball/serf/.libs -lserf-1"])
9108 if test "$COM" = "MSC"; then
9109 SERF_LIB_DIR="Release"
9110 test -n "${MSVC_USE_DEBUG_RUNTIME}" && SERF_LIB_DIR="Debug"
9111 SERF_LIBS="${WORKDIR}/UnpackedTarball/serf/${SERF_LIB_DIR}/serf-1.lib"
9115 AC_MSG_RESULT([neon])
9116 # Check for system neon
9117 libo_CHECK_SYSTEM_MODULE([neon],[NEON],[neon >= 0.26.0])
9118 if test "$with_system_neon" = "yes"; then
9119 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
9120 libo_MINGW_CHECK_DLL([libneon])
9121 libo_MINGW_TRY_DLL([libtasn1])
9122 libo_MINGW_TRY_DLL([libgnutls])
9126 AC_SUBST(NEON_VERSION)
9129 AC_MSG_RESULT([none, disabled])
9133 AC_SUBST(WITH_WEBDAV)
9135 dnl ===================================================================
9136 dnl Check for disabling cve_tests
9137 dnl ===================================================================
9138 AC_MSG_CHECKING([whether to execute CVE tests])
9139 # If not explicitly enabled or disabled, default
9140 if test -z "$enable_cve_tests"; then
9143 # Default cves off for windows with its wild and wonderful
9144 # varienty of AV software kicking in and panicing
9149 enable_cve_tests=yes
9153 if test "$enable_cve_tests" = "no"; then
9155 DISABLE_CVE_TESTS=TRUE
9156 AC_SUBST(DISABLE_CVE_TESTS)
9158 AC_MSG_RESULT([yes])
9161 dnl ===================================================================
9162 dnl Check for enabling chart XShape tests
9163 dnl ===================================================================
9164 AC_MSG_CHECKING([whether to execute chart XShape tests])
9165 if test "$enable_chart_tests" = "yes"; then
9166 AC_MSG_RESULT([yes])
9167 ENABLE_CHART_TESTS=TRUE
9168 AC_SUBST(ENABLE_CHART_TESTS)
9173 dnl ===================================================================
9174 dnl Check for system openssl
9175 dnl ===================================================================
9177 AC_MSG_CHECKING([whether to disable OpenSSL usage])
9178 if test "$enable_openssl" = "yes"; then
9180 if test "$_os" = Darwin ; then
9181 # OpenSSL is deprecated when building for 10.7 or later.
9183 # http://stackoverflow.com/questions/7406946/why-is-apple-deprecating-openssl-in-macos-10-7-lion
9184 # http://stackoverflow.com/questions/7475914/libcrypto-deprecated-on-mac-os-x-10-7-lion
9186 with_system_openssl=no
9187 libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
9188 elif test "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o "$_os" = "DragonFly" \
9189 && test "$with_system_openssl" != "no"; then
9190 with_system_openssl=yes
9193 OPENSSL_LIBS="-lssl -lcrypto"
9195 libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
9197 if test "$with_system_openssl" = "yes"; then
9198 libo_MINGW_CHECK_DLL([libssl])
9199 libo_MINGW_CHECK_DLL([libcrypto])
9200 AC_MSG_CHECKING([whether openssl supports SHA512])
9202 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/sha.h>]],[[
9204 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, openssl too old. Need >= 0.9.8.])])
9208 AC_MSG_RESULT([yes])
9209 DISABLE_OPENSSL=TRUE
9211 # warn that although OpenSSL is disabled, system libraries may be depending on it
9212 AC_MSG_WARN([OpenSSL has been disabled. No code compiled by LibO will make use of it but system librares may create indirect dependencies])
9213 add_warning "OpenSSL has been disabled. No code compiled by LibO will make use of it but system librares may create indirect dependencies"
9216 AC_SUBST([DISABLE_OPENSSL])
9218 dnl ===================================================================
9219 dnl Check for building gnutls
9220 dnl ===================================================================
9221 AC_MSG_CHECKING([whether to use gnutls])
9222 if test "$WITH_WEBDAV" = "neon" -a "$with_system_neon" = no -a "$enable_openssl" = "no"; then
9223 AC_MSG_RESULT([yes])
9225 PKG_CHECK_MODULES(GNUTLS, [gnutls],,
9226 AC_MSG_ERROR([[Disabling OpenSSL was requested, but GNUTLS is not
9227 available in the system to use as replacement.]]))
9230 AC_SUBST([LIBGCRYPT_CFLAGS])
9231 AC_SUBST([LIBGCRYPT_LIBS])
9233 dnl ===================================================================
9234 dnl Check for system redland
9235 dnl ===================================================================
9236 dnl redland: versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
9237 dnl raptor2: need at least 2.0.7 for CVE-2012-0037
9238 libo_CHECK_SYSTEM_MODULE([redland],[REDLAND],[redland >= 1.0.8 raptor2 >= 2.0.7])
9239 if test "$with_system_redland" = "yes"; then
9240 libo_MINGW_CHECK_DLL([librdf])
9241 AC_CHECK_LIB([rdf], [librdf_world_set_raptor_init_handler], [:],
9242 [AC_MSG_ERROR(librdf too old. Need >= 1.0.16)], [])
9243 libo_MINGW_TRY_DLL([libraptor])
9244 libo_MINGW_TRY_DLL([librasqal])
9245 libo_MINGW_TRY_DLL([libsqlite3])
9251 AC_SUBST(RAPTOR_MAJOR)
9252 AC_SUBST(RASQAL_MAJOR)
9253 AC_SUBST(REDLAND_MAJOR)
9255 dnl ===================================================================
9256 dnl Check for system hunspell
9257 dnl ===================================================================
9258 AC_MSG_CHECKING([which libhunspell to use])
9259 if test "$with_system_hunspell" = "yes"; then
9260 AC_MSG_RESULT([external])
9261 SYSTEM_HUNSPELL=TRUE
9263 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
9264 if test "$HUNSPELL_PC" != "TRUE"; then
9265 AC_CHECK_HEADER(hunspell.hxx, [],
9267 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
9268 [AC_MSG_ERROR(hunspell headers not found.)], [])
9270 AC_CHECK_LIB([hunspell], [main], [:],
9271 [ AC_MSG_ERROR(hunspell library not found.) ], [])
9272 HUNSPELL_LIBS=-lhunspell
9275 libo_MINGW_CHECK_DLL([libhunspell-1.3])
9276 HUNSPELL_CFLAGS=$(printf '%s' "$HUNSPELL_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9278 AC_MSG_RESULT([internal])
9280 HUNSPELL_CFLAGS="-I${WORKDIR}/UnpackedTarball/hunspell/src/hunspell"
9281 if test "$COM" = "MSC"; then
9282 HUNSPELL_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/hunspell.lib"
9284 HUNSPELL_LIBS="-L${WORKDIR}/UnpackedTarball/hunspell/src/hunspell/.libs -lhunspell-1.3"
9286 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
9288 AC_SUBST(SYSTEM_HUNSPELL)
9289 AC_SUBST(HUNSPELL_CFLAGS)
9290 AC_SUBST(HUNSPELL_LIBS)
9292 dnl ===================================================================
9293 dnl Checking for altlinuxhyph
9294 dnl ===================================================================
9295 AC_MSG_CHECKING([which altlinuxhyph to use])
9296 if test "$with_system_altlinuxhyph" = "yes"; then
9297 AC_MSG_RESULT([external])
9299 AC_CHECK_HEADER(hyphen.h, [],
9300 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
9301 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
9302 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
9303 [#include <hyphen.h>])
9304 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
9305 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9306 if test -z "$HYPHEN_LIB"; then
9307 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
9308 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9310 if test -z "$HYPHEN_LIB"; then
9311 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
9312 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9314 libo_MINGW_CHECK_DLL([libhyphen])
9316 AC_MSG_RESULT([internal])
9318 BUILD_TYPE="$BUILD_TYPE HYPHEN"
9319 if test "$COM" = "MSC"; then
9320 HYPHEN_LIB="${WORKDIR}/LinkTarget/StaticLibrary/hyphen.lib"
9322 HYPHEN_LIB="-L${WORKDIR}/UnpackedTarball/hyphen/.libs -lhyphen"
9325 AC_SUBST(SYSTEM_HYPH)
9326 AC_SUBST(HYPHEN_LIB)
9328 dnl ===================================================================
9329 dnl Checking for mythes
9330 dnl ===================================================================
9331 AC_MSG_CHECKING([which mythes to use])
9332 if test "$with_system_mythes" = "yes"; then
9333 AC_MSG_RESULT([external])
9336 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
9337 if test "$MYTHES_PKGCONFIG" = "no"; then
9338 AC_CHECK_HEADER(mythes.hxx, [],
9339 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
9340 AC_CHECK_LIB([mythes-1.2], [main], [:],
9341 [ MYTHES_FOUND=no], [])
9342 if test "$MYTHES_FOUND" = "no"; then
9343 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
9344 [ MYTHES_FOUND=no], [])
9346 if test "$MYTHES_FOUND" = "no"; then
9347 AC_MSG_ERROR([mythes library not found!.])
9351 libo_MINGW_CHECK_DLL([libmythes-1.2])
9352 MYTHES_CFLAGS=$(printf '%s' "$MYTHES_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9354 AC_MSG_RESULT([internal])
9356 BUILD_TYPE="$BUILD_TYPE MYTHES"
9357 if test "$COM" = "MSC"; then
9358 MYTHES_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/mythes.lib"
9360 MYTHES_LIBS="-L${WORKDIR}/UnpackedTarball/mythes/.libs -lmythes-1.2"
9363 AC_SUBST(SYSTEM_MYTHES)
9364 AC_SUBST(MYTHES_CFLAGS)
9365 AC_SUBST(MYTHES_LIBS)
9367 dnl ===================================================================
9368 dnl How should we build the linear programming solver ?
9369 dnl ===================================================================
9372 AC_MSG_CHECKING([whether to build with CoinMP])
9373 if test "$enable_coinmp" != "no"; then
9375 AC_MSG_RESULT([yes])
9376 if test "$with_system_coinmp" = "yes"; then
9378 PKG_CHECK_MODULES( COINMP, coinmp )
9380 BUILD_TYPE="$BUILD_TYPE COINMP"
9385 AC_SUBST(ENABLE_COINMP)
9386 AC_SUBST(SYSTEM_COINMP)
9387 AC_SUBST(COINMP_CFLAGS)
9388 AC_SUBST(COINMP_LIBS)
9391 AC_MSG_CHECKING([whether to build with lpsolve])
9392 if test "$enable_lpsolve" != "no"; then
9394 AC_MSG_RESULT([yes])
9398 AC_SUBST(ENABLE_LPSOLVE)
9400 if test "$ENABLE_LPSOLVE" = TRUE; then
9401 AC_MSG_CHECKING([which lpsolve to use])
9402 if test "$with_system_lpsolve" = "yes"; then
9403 AC_MSG_RESULT([external])
9405 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
9406 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
9408 # some systems need this. Like Ubuntu....
9409 AC_CHECK_LIB(m, floor)
9410 AC_CHECK_LIB(dl, dlopen)
9411 AC_CHECK_LIB([lpsolve55], [make_lp], [:],
9412 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
9414 libo_MINGW_CHECK_DLL([lpsolve55])
9416 AC_MSG_RESULT([internal])
9418 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
9421 AC_SUBST(SYSTEM_LPSOLVE)
9423 dnl ===================================================================
9424 dnl Checking for libexttextcat
9425 dnl ===================================================================
9426 libo_CHECK_SYSTEM_MODULE([libexttextcat],[LIBEXTTEXTCAT],[libexttextcat >= 3.1.1])
9427 if test "$with_system_libexttextcat" = "yes"; then
9428 SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
9430 AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
9432 dnl ***************************************
9433 dnl testing libc version for Linux...
9434 dnl ***************************************
9435 if test "$_os" = "Linux"; then
9436 AC_MSG_CHECKING([whether libc is >= 2.1.1])
9437 exec 6>/dev/null # no output
9438 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
9439 exec 6>&1 # output on again
9440 if test "$HAVE_LIBC"; then
9441 AC_MSG_RESULT([yes])
9443 AC_MSG_ERROR([no, upgrade libc])
9447 dnl =========================================
9448 dnl Check for the Windows SDK.
9449 dnl =========================================
9450 dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
9451 dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
9452 if test "$_os" = "WINNT"; then
9453 AC_MSG_CHECKING([for Windows SDK])
9454 if test "$build_os" = "cygwin"; then
9456 WINDOWS_SDK_HOME=$winsdktest
9458 # normalize if found
9459 if test -n "$WINDOWS_SDK_HOME"; then
9460 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
9461 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
9464 WINDOWS_SDK_LIB_SUBDIR=$winsdklibsubdir
9467 if test -n "$WINDOWS_SDK_HOME"; then
9468 # Remove a possible trailing backslash
9469 WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
9471 if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
9472 -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
9473 -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
9474 have_windows_sdk_headers=yes
9475 elif test -f "$WINDOWS_SDK_HOME/Include/um/adoint.h" \
9476 -a -f "$WINDOWS_SDK_HOME/Include/um/SqlUcode.h" \
9477 -a -f "$WINDOWS_SDK_HOME/Include/um/usp10.h"; then
9478 have_windows_sdk_headers=yes
9480 have_windows_sdk_headers=no
9483 if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
9484 have_windows_sdk_libs=yes
9485 elif test -f "$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WINDOWS_SDK_ARCH/user32.lib"; then
9486 have_windows_sdk_libs=yes
9488 have_windows_sdk_libs=no
9491 if test $have_windows_sdk_headers = no -o $have_windows_sdk_libs = no; then
9492 AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
9493 the Windows SDK are installed.])
9496 if test ! -f "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
9497 -o ! -f "$WINDOWS_SDK_HOME/bin/msidb.exe" \
9498 -o ! -f "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
9499 -o ! -f "$WINDOWS_SDK_HOME/bin/msitran.exe"; then :
9500 elif test ! -f "$WINDOWS_SDK_HOME/bin/x86/msiinfo.exe" \
9501 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/msidb.exe" \
9502 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/uuidgen.exe" \
9503 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/msitran.exe"; then :
9505 AC_MSG_ERROR([Some (all?) Windows Installer tools in the Windows SDK are missing, please install.])
9509 if test -z "$WINDOWS_SDK_HOME"; then
9510 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway!?])
9511 elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
9512 WINDOWS_SDK_VERSION=60
9513 AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
9514 elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
9515 WINDOWS_SDK_VERSION=61
9516 AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
9517 elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
9518 WINDOWS_SDK_VERSION=70
9519 AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
9520 elif echo $WINDOWS_SDK_HOME | grep "8.0" >/dev/null 2>/dev/null; then
9521 WINDOWS_SDK_VERSION=80
9522 AC_MSG_RESULT([found Windows SDK 8.0 ($WINDOWS_SDK_HOME)])
9523 # compatibility warning if usind VS 2012 and not explicitly choosing the 80 SDK
9524 if test "$VCVER" = "110" -a -z "$with_windows_sdk"; then
9525 AC_MSG_WARN([If a build created with VS 2012 should run on Windows XP,])
9526 AC_MSG_WARN([use --with-windows-sdk=7.1A (requires VS 2012 Update 1 or newer)])
9527 add_warning "If a build created with VS 2012 should run on Windows XP,"
9528 add_warning "use --with-windows-sdk=7.1A (requires VS 2012 Update 1 or newer)"
9530 elif echo $WINDOWS_SDK_HOME | grep "8.1" >/dev/null 2>/dev/null; then
9531 WINDOWS_SDK_VERSION=81
9532 AC_MSG_RESULT([found Windows SDK 8.1 ($WINDOWS_SDK_HOME)])
9534 AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
9536 PathFormat "$WINDOWS_SDK_HOME"
9537 WINDOWS_SDK_HOME="$formatted_path"
9538 if test "$build_os" = "cygwin"; then
9539 SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include -I$COMPATH/include"
9540 if test -d "$WINDOWS_SDK_HOME/include/um"; then
9541 SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include/um -I$WINDOWS_SDK_HOME/include/shared"
9545 dnl TODO: solenv/bin/modules/installer/windows/msiglobal.pm wants to use a
9546 dnl WiLangId.vbs that is included only in some SDKs (e.g., included in v7.1
9547 dnl but not in v8.0), so allow this to be overridden with a
9548 dnl WINDOWS_SDK_WILANGID for now; a full-blown --with-windows-sdk-wilangid
9549 dnl and configuration error if no WiLangId.vbs is found would arguably be
9550 dnl better, but I do not know under which conditions exactly it is needed by
9552 if test -z "$WINDOWS_SDK_WILANGID" -a -n "$WINDOWS_SDK_HOME"; then
9553 WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/Samples/sysmgmt/msi/scripts/WiLangId.vbs
9554 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9555 WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs
9557 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9558 WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.0/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs")
9560 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9561 AC_MSG_WARN([WiLangId.vbs not found - building translated packages will fail])
9562 add_warning "WiLangId.vbs not found - building translated packages will fail"
9566 AC_SUBST(WINDOWS_SDK_HOME)
9567 AC_SUBST(WINDOWS_SDK_LIB_SUBDIR)
9568 AC_SUBST(WINDOWS_SDK_VERSION)
9569 AC_SUBST(WINDOWS_SDK_WILANGID)
9571 dnl =========================================
9572 dnl Check for uuidgen
9573 dnl =========================================
9574 if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
9575 if test "$WITH_MINGW" = "yes"; then
9576 AC_PATH_PROG([UUIDGEN], [uuid])
9577 if test -z "$UUIDGEN"; then
9578 AC_MSG_WARN([uuid is needed for building installation sets])
9581 # presence is already tested above in the WINDOWS_SDK_HOME check
9586 AC_PATH_PROG([UUIDGEN], [uuidgen])
9587 if test -z "$UUIDGEN"; then
9588 AC_MSG_WARN([uuid is needed for building installation sets])
9592 dnl =========================================
9593 dnl Check for the Microsoft DirectX SDK.
9594 dnl =========================================
9595 if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
9596 AC_MSG_CHECKING([for DirectX SDK])
9597 if test "$build_os" = "cygwin"; then
9598 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
9599 if test -n "$DXSDK_DIR"; then
9600 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
9601 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
9603 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
9604 # the "DirectX SDK not found" error later.
9607 # Remove a possible trailing backslash
9608 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
9611 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h"; then
9612 HAVE_DIRECTXSDK_H="yes"
9614 HAVE_DIRECTXSDK_H="no"
9617 if test "$BITNESS_OVERRIDE" = 64; then
9618 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x64"
9620 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
9622 PathFormat "$DIRECTXSDK_LIB"
9623 DIRECTXSDK_LIB="$formatted_path"
9625 if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib"; then
9626 HAVE_DIRECTXSDK_LIB="yes"
9628 HAVE_DIRECTXSDK_LIB="no"
9631 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
9632 AC_MSG_RESULT([found])
9634 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
9636 if test -n "$DIRECTXSDK_HOME"; then
9637 PathFormat "$DIRECTXSDK_HOME"
9638 DIRECTXSDK_HOME="$formatted_path"
9639 SOLARINC="$SOLARINC -I$DIRECTXSDK_HOME/include"
9642 AC_SUBST(DIRECTXSDK_HOME)
9644 dnl ***************************************
9645 dnl Checking for bison and flex
9646 dnl ***************************************
9647 AC_PATH_PROG(BISON, bison)
9648 if test -z "$BISON"; then
9649 AC_MSG_ERROR([no bison found in \$PATH, install it])
9651 AC_MSG_CHECKING([the bison version])
9652 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
9653 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
9654 # Accept newer than 2.0
9655 if test "$_bison_longver" -lt 2000; then
9656 AC_MSG_ERROR([failed ($BISON $_bison_version need 2.0+)])
9660 AC_PATH_PROG(FLEX, flex)
9661 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
9662 FLEX=`cygpath -m $FLEX`
9664 if test -z "$FLEX"; then
9665 AC_MSG_ERROR([no flex found in \$PATH, install it])
9667 AC_MSG_CHECKING([the flex version])
9668 _flex_version=$($FLEX --version | $SED -e 's/^.*\([[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\).*$/\1/')
9669 if test $(echo $_flex_version | $AWK -F. '{printf("%d%03d%03d", $1, $2, $3)}') -lt 2005035; then
9670 AC_MSG_ERROR([failed ($FLEX $_flex_version found, but need at least 2.5.35)])
9674 dnl ***************************************
9675 dnl Checking for patch
9676 dnl ***************************************
9677 AC_PATH_PROG(PATCH, patch)
9678 if test -z "$PATCH"; then
9679 AC_MSG_ERROR(["patch" not found in \$PATH, install it])
9682 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
9683 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
9684 if test -z "$with_gnu_patch"; then
9687 if test -x "$with_gnu_patch"; then
9688 GNUPATCH=$with_gnu_patch
9690 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
9694 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
9695 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
9696 AC_MSG_RESULT([yes])
9698 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
9704 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
9705 GNUPATCH=`cygpath -m $GNUPATCH`
9708 dnl We also need to check for --with-gnu-cp
9710 if test -z "$with_gnu_cp"; then
9711 # check the place where the good stuff is hidden on Solaris...
9712 if test -x /usr/gnu/bin/cp; then
9713 GNUCP=/usr/gnu/bin/cp
9715 AC_PATH_PROGS(GNUCP, gnucp cp)
9717 if test -z $GNUCP; then
9718 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
9721 if test -x "$with_gnu_cp"; then
9724 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
9728 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
9729 GNUCP=`cygpath -m $GNUCP`
9732 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
9733 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
9734 AC_MSG_RESULT([yes])
9735 elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
9736 AC_MSG_RESULT([yes])
9739 darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*)
9742 AC_MSG_RESULT([no gnucp found - using the system's cp command])
9745 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
9754 dnl ***************************************
9755 dnl testing assembler path
9756 dnl ***************************************
9758 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
9759 if test "$BITNESS_OVERRIDE" = ""; then
9764 assembler_bin=bin/amd64
9767 AC_MSG_CHECKING([$VC_PRODUCT_DIR/$assembler_bin/$assembler])
9768 if test -f "$VC_PRODUCT_DIR/$assembler_bin/$assembler"; then
9769 ASM_HOME=$VC_PRODUCT_DIR/$assembler_bin
9770 AC_MSG_RESULT([found])
9771 ML_EXE="$VC_PRODUCT_DIR/$assembler_bin/$assembler"
9773 AC_MSG_ERROR([Configure did not find $assembler assembler.])
9776 PathFormat "$ASM_HOME"
9777 ASM_HOME="$formatted_path"
9784 dnl ===================================================================
9785 dnl We need zip and unzip
9786 dnl ===================================================================
9787 AC_PATH_PROG(ZIP, zip)
9788 test -z "$ZIP" && AC_MSG_ERROR([zip is required])
9789 if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
9790 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],,)
9793 AC_PATH_PROG(UNZIP, unzip)
9794 test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
9796 dnl ===================================================================
9797 dnl Zip must be a specific type for different build types.
9798 dnl ===================================================================
9799 if test $build_os = cygwin; then
9800 if test -n "`$ZIP -h | $GREP -i WinNT`"; then
9801 AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
9805 dnl ===================================================================
9806 dnl We need touch with -h option support.
9807 dnl ===================================================================
9808 AC_PATH_PROG(TOUCH, touch)
9809 test -z "$TOUCH" && AC_MSG_ERROR([touch is required])
9811 if ! "$TOUCH" -h warn 2>/dev/null > /dev/null; then
9812 AC_MSG_ERROR([touch version with -h option support is required to build, please install it and make sure it is the one found first in PATH],,)
9815 dnl ===================================================================
9816 dnl Set vcl option: coordinate device in double or sal_Int32
9817 dnl ===================================================================
9819 AC_MSG_CHECKING([Type to use for Device Pixel coordinates])
9820 if test "$_os" = "Darwin" -o $_os = iOS ; then
9821 AC_DEFINE(VCL_FLOAT_DEVICE_PIXEL)
9822 AC_MSG_RESULT([double])
9824 AC_MSG_RESULT([sal_Int32])
9827 dnl ===================================================================
9828 dnl Test which vclplugs have to be built.
9829 dnl ===================================================================
9834 if test "x$enable_gtk3" = "xyes"; then
9835 if test "$with_system_cairo" = no; then
9836 AC_MSG_ERROR([System cairo required for gtk3 support, do not combine --enable-gtk3 with --without-system-cairo])
9838 : ${with_system_cairo:=yes}
9839 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="")
9840 if test "x$ENABLE_GTK3" = "xTRUE"; then
9843 AC_MSG_ERROR([gtk3 libraries of the correct versions, not found])
9845 GTK3_CFLAGS=$(printf '%s' "$GTK3_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9848 AC_SUBST(GTK3_CFLAGS)
9849 AC_SUBST(ENABLE_GTK3)
9851 AC_MSG_CHECKING([which VCLplugs shall be built])
9852 if test "$GUIBASE" != "unx" -o "$with_x" = "no"; then
9856 if test "x$enable_gtk" = "xyes"; then
9857 if test "$with_system_cairo" = no; then
9858 AC_MSG_ERROR([System cairo required for gtk support, do not use --without-system-cairo or use --disable-gtk])
9860 : ${with_system_cairo:=yes}
9862 AC_DEFINE(ENABLE_GTK)
9865 AC_SUBST(ENABLE_GTK)
9868 if test "x$enable_tde" = "xyes"; then
9869 # Libs kab and tdeab in connectivity and kdeab and tdeab in shell
9870 # are built from the same sources. So we only allow one of them.
9871 if test "x$enable_kde" = "xyes"; then
9872 AC_MSG_ERROR([enabling both KDE and TDE is not supported])
9875 AC_DEFINE(ENABLE_TDE)
9878 AC_SUBST(ENABLE_TDE)
9881 if test "x$enable_kde" = "xyes"; then
9883 AC_DEFINE(ENABLE_KDE)
9886 AC_SUBST(ENABLE_KDE)
9889 if test "x$enable_kde4" = "xyes"; then
9891 AC_DEFINE(ENABLE_KDE4)
9894 AC_SUBST(ENABLE_KDE4)
9897 if test "x$with_x" = "xno"; then
9898 ENABLE_HEADLESS="TRUE"
9899 SCPDEFS="$SCPDEFS -DLIBO_HEADLESS"
9902 AC_SUBST(ENABLE_HEADLESS)
9904 if test -z "$R"; then
9905 AC_MSG_RESULT([none])
9910 dnl ===================================================================
9912 dnl ===================================================================
9915 AC_MSG_CHECKING([whether to enable GConf support])
9916 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "iOS" -a "$enable_gconf" = "yes"; then
9918 AC_MSG_RESULT([yes])
9919 PKG_CHECK_MODULES( GCONF, gconf-2.0 gobject-2.0 )
9920 GCONF_CFLAGS=$(printf '%s' "$GCONF_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9924 AC_SUBST(GCONF_LIBS)
9925 AC_SUBST(GCONF_CFLAGS)
9926 AC_SUBST(ENABLE_GCONF)
9928 dnl ===================================================================
9930 dnl ===================================================================
9933 AC_MSG_CHECKING([whether to enable GNOME VFS support])
9934 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" -a "$enable_gconf" = "yes"; then
9935 ENABLE_GNOMEVFS="TRUE"
9936 AC_MSG_RESULT([yes])
9937 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
9938 GNOMEVFS_CFLAGS=$(printf '%s' "$GNOMEVFS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9939 AC_DEFINE(ENABLE_GNOME_VFS)
9943 AC_SUBST(GNOMEVFS_LIBS)
9944 AC_SUBST(GNOMEVFS_CFLAGS)
9945 AC_SUBST(ENABLE_GNOMEVFS)
9947 dnl ===================================================================
9948 dnl check for dbus support
9949 dnl ===================================================================
9954 if test "$enable_dbus" = "no"; then
9958 AC_MSG_CHECKING([whether to enable DBUS support])
9959 if test "$test_dbus" = "yes"; then
9961 AC_MSG_RESULT([yes])
9962 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.70)
9963 DBUS_CFLAGS=$(printf '%s' "$DBUS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9968 AC_SUBST(ENABLE_DBUS)
9969 AC_SUBST(DBUS_CFLAGS)
9972 AC_MSG_CHECKING([whether to enable font install via packagekit])
9973 if test "$ENABLE_DBUS" = "TRUE"; then
9974 if test -n "$enable_packagekit" -a "$enable_packagekit" != "no"; then
9975 ENABLE_PACKAGEKIT=TRUE
9976 AC_MSG_RESULT([yes])
9982 AC_MSG_RESULT([no, dbus disabled.])
9984 AC_SUBST(ENABLE_PACKAGEKIT)
9986 AC_MSG_CHECKING([whether to enable Impress remote control])
9987 if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
9988 AC_MSG_RESULT([yes])
9989 ENABLE_SDREMOTE=TRUE
9990 AC_MSG_CHECKING([whether to enable Bluetooth support in Impress remote control])
9992 # If not explicitly enabled or disabled, default
9993 if test -z "$enable_sdremote_bluetooth"; then
9996 # Default to yes for these
9997 enable_sdremote_bluetooth=yes
10001 enable_sdremote_bluetooth=no
10005 # $enable_sdremote_bluetooth is guaranteed non-empty now
10007 if test "$enable_sdremote_bluetooth" != "no"; then
10008 if test "$OS" = "LINUX"; then
10009 if test "$ENABLE_DBUS" = "TRUE"; then
10010 AC_MSG_RESULT([yes])
10011 ENABLE_SDREMOTE_BLUETOOTH=TRUE
10012 dnl ===================================================================
10013 dnl Check for system bluez
10014 dnl ===================================================================
10015 AC_MSG_CHECKING([which Bluetooth header to use])
10016 if test "$with_system_bluez" = "yes"; then
10017 AC_MSG_RESULT([external])
10018 AC_CHECK_HEADER(bluetooth/bluetooth.h, [],
10019 [AC_MSG_ERROR(bluetooth.h not found. install bluez)], [])
10022 AC_MSG_RESULT([internal])
10026 AC_MSG_RESULT([no, dbus disabled])
10027 ENABLE_SDREMOTE_BLUETOOTH=
10031 AC_MSG_RESULT([yes])
10032 ENABLE_SDREMOTE_BLUETOOTH=TRUE
10036 AC_MSG_RESULT([no])
10037 ENABLE_SDREMOTE_BLUETOOTH=
10043 AC_MSG_RESULT([no])
10045 AC_SUBST(ENABLE_SDREMOTE)
10046 AC_SUBST(ENABLE_SDREMOTE_BLUETOOTH)
10047 AC_SUBST(SYSTEM_BLUEZ)
10049 dnl ===================================================================
10050 dnl Check whether the gtk 2.0 libraries are available.
10051 dnl ===================================================================
10055 ENABLE_SYSTRAY_GTK=""
10056 if test "$test_gtk" = "yes"; then
10058 if test "$ENABLE_GTK" = "TRUE"; then
10059 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gdk-pixbuf-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages]))
10060 GTK_CFLAGS=$(printf '%s' "$GTK_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10061 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]))
10062 BUILD_TYPE="$BUILD_TYPE GTK"
10063 GTHREAD_CFLAGS=$(printf '%s' "$GTK_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10065 AC_MSG_CHECKING([whether to enable the systray quickstarter])
10066 if test "x$enable_systray" = "xyes"; then
10067 AC_MSG_RESULT([yes])
10068 PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
10069 [ ENABLE_SYSTRAY_GTK="TRUE" ],
10070 [ ENABLE_SYSTRAY_GTK="" ])
10072 AC_MSG_RESULT([no])
10075 AC_MSG_CHECKING([whether to enable Gtk print dialog support])
10076 PKG_CHECK_MODULES([GTK_PRINT], [gtk+-unix-print-2.0 >= 2.10.0],
10077 [ENABLE_GTK_PRINT="TRUE"],
10078 [ENABLE_GTK_PRINT=""])
10079 GTK_PRINT_CFLAGS=$(printf '%s' "$GTK_PRINT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10081 AC_MSG_CHECKING([whether to enable GIO support])
10082 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
10083 if test "$ENABLE_GNOMEVFS" = "TRUE"; then
10084 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
10086 dnl Need at least 2.26 for the dbus support.
10087 PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.26],
10088 [ENABLE_GIO="TRUE"], [ENABLE_GIO=""])
10089 if test "$ENABLE_GIO" = "TRUE"; then
10090 AC_DEFINE(ENABLE_GIO)
10091 GIO_CFLAGS=$(printf '%s' "$GIO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10094 AC_MSG_RESULT([no])
10098 AC_SUBST(ENABLE_GIO)
10099 AC_SUBST(GIO_CFLAGS)
10101 AC_SUBST(ENABLE_SYSTRAY_GTK)
10102 AC_SUBST(GTK_CFLAGS)
10104 AC_SUBST(GTHREAD_CFLAGS)
10105 AC_SUBST(GTHREAD_LIBS)
10106 AC_SUBST([ENABLE_GTK_PRINT])
10107 AC_SUBST([GTK_PRINT_CFLAGS])
10108 AC_SUBST([GTK_PRINT_LIBS])
10111 dnl ===================================================================
10112 dnl Check whether the Telepathy libraries are available.
10113 dnl ===================================================================
10115 ENABLE_TELEPATHY=""
10116 TELEPATHY_CFLAGS=""
10119 AC_MSG_CHECKING([whether to enable Telepathy support])
10120 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_telepathy" = "yes"; then
10121 ENABLE_TELEPATHY="TRUE"
10122 AC_DEFINE(ENABLE_TELEPATHY)
10123 AC_MSG_RESULT([yes])
10124 PKG_CHECK_MODULES( TELEPATHY, telepathy-glib >= 0.18.0 glib-2.0 gobject-2.0 gthread-2.0 gio-2.0 gtk+-2.0 >= 2.4 )
10125 TELEPATHY_CFLAGS=$(printf '%s' "$TELEPATHY_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10127 AC_MSG_RESULT([no])
10130 AC_SUBST(ENABLE_TELEPATHY)
10131 AC_SUBST(TELEPATHY_CFLAGS)
10132 AC_SUBST(TELEPATHY_LIBS)
10135 dnl ===================================================================
10137 SPLIT_APP_MODULES=""
10138 if test "$enable_split_app_modules" = "yes"; then
10139 SPLIT_APP_MODULES="TRUE"
10141 AC_SUBST(SPLIT_APP_MODULES)
10143 SPLIT_OPT_FEATURES=""
10144 if test "$enable_split_opt_features" = "yes"; then
10145 SPLIT_OPT_FEATURES="TRUE"
10147 AC_SUBST(SPLIT_OPT_FEATURES)
10149 if test $_os = Darwin -o $_os = WINNT -o $_os = iOS; then
10150 if test "$enable_cairo_canvas" = yes; then
10151 AC_MSG_ERROR([The cairo canvas should not be used for this platform])
10153 enable_cairo_canvas=no
10154 elif test -z "$enable_cairo_canvas"; then
10155 enable_cairo_canvas=yes
10158 ENABLE_CAIRO_CANVAS=""
10159 if test "$enable_cairo_canvas" = "yes"; then
10161 ENABLE_CAIRO_CANVAS="TRUE"
10163 AC_SUBST(ENABLE_CAIRO_CANVAS)
10165 dnl ===================================================================
10166 dnl Check whether the GStreamer libraries are available.
10167 dnl It's possible to build avmedia with both GStreamer backends!
10168 dnl ===================================================================
10170 ENABLE_GSTREAMER_1_0=""
10172 if test "$build_gstreamer_1_0" = "yes"; then
10174 AC_MSG_CHECKING([whether to enable the new GStreamer 1.0 avmedia backend])
10175 if test "$enable_avmedia" = yes -a "$enable_gstreamer_1_0" != no; then
10176 ENABLE_GSTREAMER_1_0="TRUE"
10177 AC_MSG_RESULT([yes])
10178 PKG_CHECK_MODULES( [GSTREAMER_1_0], [gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0] )
10179 GSTREAMER_1_0_CFLAGS=$(printf '%s' "$GSTREAMER_1_0_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10181 AC_MSG_RESULT([no])
10184 AC_SUBST(GSTREAMER_1_0_CFLAGS)
10185 AC_SUBST(GSTREAMER_1_0_LIBS)
10186 AC_SUBST(ENABLE_GSTREAMER_1_0)
10189 ENABLE_GSTREAMER_0_10=""
10190 if test "$build_gstreamer_0_10" = "yes"; then
10192 AC_MSG_CHECKING([whether to enable the GStreamer 0.10 avmedia backend])
10193 if test "$enable_avmedia" = yes -a "$enable_gstreamer_0_10" != no; then
10194 ENABLE_GSTREAMER_0_10="TRUE"
10195 AC_MSG_RESULT([yes])
10196 PKG_CHECK_MODULES( [GSTREAMER_0_10], [gstreamer-0.10 gstreamer-plugins-base-0.10 gstreamer-interfaces-0.10],, [
10197 PKG_CHECK_MODULES( [GSTREAMER_0_10], [gstreamer-0.10 gstreamer-plugins-base-0.10] )
10199 GSTREAMER_0_10_CFLAGS=$(printf '%s' "$GSTREAMER_0_10_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10201 AC_MSG_RESULT([no])
10205 AC_SUBST(GSTREAMER_0_10_CFLAGS)
10206 AC_SUBST(GSTREAMER_0_10_LIBS)
10207 AC_SUBST(ENABLE_GSTREAMER_0_10)
10209 dnl ===================================================================
10210 dnl Check whether to build the VLC avmedia backend
10211 dnl ===================================================================
10215 AC_MSG_CHECKING([whether to enable the VLC avmedia backend])
10216 if test "$enable_avmedia" = yes -a $_os != iOS -a $_os != Android -a "$enable_vlc" = yes; then
10218 AC_MSG_RESULT([yes])
10220 AC_MSG_RESULT([no])
10222 AC_SUBST(ENABLE_VLC)
10225 if test $_os = iOS -o $_os = Android; then
10227 elif test "$_os" = "Darwin"; then
10228 # We use frameworks on Mac OS X, no need for detail checks
10230 ENABLE_OPENGL_CANVAS=TRUE
10231 SYSTEM_MESA_HEADERS=TRUE
10232 elif test $_os = WINNT; then
10233 # Experimental: try to use OpenGL on Windows
10235 ENABLE_OPENGL_CANVAS=TRUE
10236 # We need the internal "Mesa" headers.
10237 SYSTEM_MESA_HEADERS=
10238 BUILD_TYPE="$BUILD_TYPE MESA"
10241 ENABLE_OPENGL_CANVAS=TRUE
10243 dnl ===================================================================
10244 dnl Check for system Mesa
10245 dnl ===================================================================
10246 AC_MSG_CHECKING([which Mesa headers to use])
10247 if test "$with_system_mesa_headers" = "yes"; then
10248 AC_MSG_RESULT([external])
10249 SYSTEM_MESA_HEADERS=TRUE
10251 AC_CHECK_HEADER(GL/glxext.h, [],
10252 [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
10253 AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
10254 AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
10257 AC_MSG_RESULT([internal])
10258 SYSTEM_MESA_HEADERS=
10259 BUILD_TYPE="$BUILD_TYPE MESA"
10263 AC_SUBST(SYSTEM_MESA_HEADERS)
10264 AC_SUBST(ENABLE_OPENGL)
10265 AC_SUBST(ENABLE_OPENGL_CANVAS)
10267 dnl =================================================
10268 dnl Check whether to build with OpenCL support.
10269 dnl =================================================
10271 if test $_os != iOS -a $_os != Android; then
10272 # OPENCL in BUILD_TYPE tells that OpenCL is potentially available on the platform (optional at run-time,
10273 # used through clew).
10274 BUILD_TYPE="$BUILD_TYPE OPENCL"
10275 AC_DEFINE(HAVE_FEATURE_OPENCL)
10278 dnl ===================================================================
10279 dnl Check whether to enable glTF support
10280 dnl ===================================================================
10281 AC_MSG_CHECKING([whether to enable glTF support])
10283 if test "x$enable_gltf" != "xno" -a $_os != iOS -a $_os != Android; then
10285 AC_MSG_RESULT([yes])
10286 AC_DEFINE(HAVE_FEATURE_GLTF,1)
10287 if test "$with_system_libgltf" = "yes"; then
10288 SYSTEM_LIBGLTF=TRUE
10289 PKG_CHECK_MODULES( LIBGLTF, [libgltf-0.0 >= 0.0.1] )
10291 BUILD_TYPE="$BUILD_TYPE LIBGLTF"
10294 AC_MSG_RESULT([no])
10296 AC_SUBST(ENABLE_GLTF)
10297 AC_SUBST(SYSTEM_LIBGLTF)
10298 AC_SUBST(LIBGLTF_CFLAGS)
10299 AC_SUBST(LIBGLTF_LIBS)
10301 dnl ===================================================================
10302 dnl Check whether to enable COLLADA support
10303 dnl ===================================================================
10304 AC_MSG_CHECKING([whether to enable COLLADA support])
10306 if test "$enable_collada" != "no" -a "$ENABLE_GLTF" = "TRUE"; then
10307 AC_MSG_RESULT([yes])
10308 ENABLE_COLLADA=TRUE
10309 AC_DEFINE(HAVE_FEATURE_COLLADA,1)
10310 AC_MSG_CHECKING([which OPENCOLLADA to use])
10311 if test "$with_system_opencollada" = "yes"; then
10312 AC_MSG_RESULT([external])
10313 SYSTEM_OPENCOLLADA=TRUE
10314 AS_IF([test -n "$OPENCOLLADA_CFLAGS"],[],[AC_MSG_ERROR([export OPENCOLLADA_CFLAGS])])
10315 AS_IF([test -n "$OPENCOLLADA_LIBS"],[],[AC_MSG_ERROR([export OPENCOLLADA_LIBS])])
10316 AC_LANG_PUSH([C++])
10317 save_CXXFLAGS=$CXXFLAGS
10318 save_CPPFLAGS=$CPPFLAGS
10319 CXXFLAGS="$CXXFLAGS $OPENCOLLADA_CFLAGS"
10320 CPPFLAGS="$CPPFLAGS $OPENCOLLADA_CFLAGS"
10324 COLLADASaxFWLLoader.h \
10325 GeneratedSaxParser.h,
10327 [AC_MSG_ERROR([openCOLLADA headers not found. Install openCOLLADA])],
10329 CXXFLAGS=$save_CXXFLAGS
10330 CPPFLAGS=$save_CPPFLAGS
10332 OPENCOLLADA_CFLAGS=$(printf '%s' "$OPENCOLLADA_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10334 AC_MSG_RESULT([internal])
10335 BUILD_TYPE="$BUILD_TYPE OPENCOLLADA"
10337 BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF"
10339 AC_MSG_RESULT([no])
10341 AC_SUBST(ENABLE_COLLADA)
10342 AC_SUBST([OPENCOLLADA_CFLAGS])
10343 AC_SUBST([OPENCOLLADA_LIBS])
10344 AC_SUBST([SYSTEM_OPENCOLLADA])
10347 AC_MSG_CHECKING([whether to build the PDF import feature])
10349 if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = yes \); then
10350 AC_MSG_RESULT([yes])
10351 ENABLE_PDFIMPORT=TRUE
10353 dnl ===================================================================
10354 dnl Check for system poppler
10355 dnl ===================================================================
10356 AC_MSG_CHECKING([which PDF import backend to use])
10357 if test "$with_system_poppler" = "yes"; then
10358 AC_MSG_RESULT([external])
10359 SYSTEM_POPPLER=TRUE
10360 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
10361 AC_LANG_PUSH([C++])
10362 save_CXXFLAGS=$CXXFLAGS
10363 save_CPPFLAGS=$CPPFLAGS
10364 CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
10365 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
10366 AC_CHECK_HEADER([cpp/poppler-version.h], [],
10367 [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
10368 CXXFLAGS=$save_CXXFLAGS
10369 CPPFLAGS=$save_CPPFLAGS
10371 libo_MINGW_CHECK_DLL([libpoppler])
10372 POPPLER_CFLAGS=$(printf '%s' "$POPPLER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10374 AC_MSG_RESULT([internal])
10376 BUILD_TYPE="$BUILD_TYPE POPPLER"
10379 AC_MSG_RESULT([no])
10381 AC_SUBST(ENABLE_PDFIMPORT)
10382 AC_SUBST(SYSTEM_POPPLER)
10383 AC_SUBST(POPPLER_CFLAGS)
10384 AC_SUBST(POPPLER_LIBS)
10386 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
10387 if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
10388 AC_MSG_RESULT([yes])
10389 ENABLE_MEDIAWIKI=TRUE
10390 BUILD_TYPE="$BUILD_TYPE XSLTML"
10391 if test "x$with_java" = "xno"; then
10392 AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
10395 AC_MSG_RESULT([no])
10397 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
10399 AC_SUBST(ENABLE_MEDIAWIKI)
10401 AC_MSG_CHECKING([whether to build the Report Builder])
10402 if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
10403 AC_MSG_RESULT([yes])
10404 ENABLE_REPORTBUILDER=TRUE
10405 AC_MSG_CHECKING([which jfreereport libs to use])
10406 if test "$with_system_jfreereport" = "yes"; then
10407 SYSTEM_JFREEREPORT=TRUE
10408 AC_MSG_RESULT([external])
10409 if test -z $SAC_JAR; then
10410 SAC_JAR=/usr/share/java/sac.jar
10412 AC_CHECK_FILE($SAC_JAR, [],
10413 [AC_MSG_ERROR(sac.jar not found.)], [])
10415 if test -z $LIBXML_JAR; then
10416 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
10417 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
10419 AC_CHECK_FILE(/usr/share/java/libxml.jar,
10420 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
10421 [AC_MSG_ERROR(libxml.jar replacement not found.)]
10426 AC_CHECK_FILE($LIBXML_JAR, [],
10427 [AC_MSG_ERROR(libxml.jar not found.)], [])
10430 if test -z $FLUTE_JAR; then
10431 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
10432 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
10434 AC_CHECK_FILE(/usr/share/java/flute.jar,
10435 [ FLUTE_JAR=/usr/share/java/flute.jar ],
10436 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
10441 AC_CHECK_FILE($FLUTE_JAR, [],
10442 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
10445 if test -z $JFREEREPORT_JAR; then
10446 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
10447 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
10449 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
10450 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
10451 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
10456 AC_CHECK_FILE($JFREEREPORT_JAR, [],
10457 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
10460 if test -z $LIBLAYOUT_JAR; then
10461 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
10462 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
10464 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
10465 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
10466 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
10471 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
10472 [AC_MSG_ERROR(liblayout.jar not found.)], [])
10475 if test -z $LIBLOADER_JAR; then
10476 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
10477 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
10479 AC_CHECK_FILE(/usr/share/java/libloader.jar,
10480 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
10481 [AC_MSG_ERROR(libloader.jar replacement not found.)]
10486 AC_CHECK_FILE($LIBLOADER_JAR, [],
10487 [AC_MSG_ERROR(libloader.jar not found.)], [])
10490 if test -z $LIBFORMULA_JAR; then
10491 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
10492 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
10494 AC_CHECK_FILE(/usr/share/java/libformula.jar,
10495 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
10496 [AC_MSG_ERROR(libformula.jar replacement not found.)]
10501 AC_CHECK_FILE($LIBFORMULA_JAR, [],
10502 [AC_MSG_ERROR(libformula.jar not found.)], [])
10505 if test -z $LIBREPOSITORY_JAR; then
10506 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
10507 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
10509 AC_CHECK_FILE(/usr/share/java/librepository.jar,
10510 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
10511 [AC_MSG_ERROR(librepository.jar replacement not found.)]
10516 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
10517 [AC_MSG_ERROR(librepository.jar not found.)], [])
10520 if test -z $LIBFONTS_JAR; then
10521 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
10522 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
10524 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
10525 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
10526 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
10531 AC_CHECK_FILE($LIBFONTS_JAR, [],
10532 [AC_MSG_ERROR(libfonts.jar not found.)], [])
10535 if test -z $LIBSERIALIZER_JAR; then
10536 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
10537 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
10539 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
10540 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
10541 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
10546 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
10547 [AC_MSG_ERROR(libserializer.jar not found.)], [])
10550 if test -z $LIBBASE_JAR; then
10551 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
10552 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
10554 AC_CHECK_FILE(/usr/share/java/libbase.jar,
10555 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
10556 [AC_MSG_ERROR(libbase.jar replacement not found.)]
10561 AC_CHECK_FILE($LIBBASE_JAR, [],
10562 [AC_MSG_ERROR(libbase.jar not found.)], [])
10566 AC_MSG_RESULT([internal])
10567 SYSTEM_JFREEREPORT=
10568 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
10571 AC_MSG_RESULT([no])
10572 ENABLE_REPORTBUILDER=
10573 SYSTEM_JFREEREPORT=
10575 AC_SUBST(ENABLE_REPORTBUILDER)
10576 AC_SUBST(SYSTEM_JFREEREPORT)
10578 AC_SUBST(LIBXML_JAR)
10579 AC_SUBST(FLUTE_JAR)
10580 AC_SUBST(JFREEREPORT_JAR)
10581 AC_SUBST(LIBBASE_JAR)
10582 AC_SUBST(LIBLAYOUT_JAR)
10583 AC_SUBST(LIBLOADER_JAR)
10584 AC_SUBST(LIBFORMULA_JAR)
10585 AC_SUBST(LIBREPOSITORY_JAR)
10586 AC_SUBST(LIBFONTS_JAR)
10587 AC_SUBST(LIBSERIALIZER_JAR)
10589 # this has to be here because both the Wiki Publisher and the SRB use
10591 COMMONS_LOGGING_VERSION=1.2
10592 if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = "TRUE"; then
10593 AC_MSG_CHECKING([which Apache commons-* libs to use])
10594 if test "$with_system_apache_commons" = "yes"; then
10595 SYSTEM_APACHE_COMMONS=TRUE
10596 AC_MSG_RESULT([external])
10597 if test "$ENABLE_MEDIAWIKI" = "TRUE"; then
10598 if test -z $COMMONS_CODEC_JAR; then
10599 _commons_codec_path=""
10600 if test "$HAVE_JAVA6" = "TRUE"; then
10601 _commons_codec_path="/usr/share/java/commons-codec-1.9.jar"
10603 _commons_codec_path="/usr/share/java/commons-codec-1.6.jar"
10605 AC_CHECK_FILE($_commons_codec_path,
10606 [ COMMONS_CODEC_JAR=$_commons_codec_path ],
10608 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
10609 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
10610 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
10615 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
10616 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
10619 if test -z $COMMONS_LANG_JAR; then
10620 _commons_lang_path=""
10621 if test "$HAVE_JAVA6" = "TRUE"; then
10622 _commons_lang_path="/usr/share/java/commons-lang3-3.3.1-src.tar.gz"
10624 _commons_lang_path="/usr/share/java/commons-lang-2.4.jar"
10626 AC_CHECK_FILE($_commons_lang_path,
10627 [ COMMONS_LANG_JAR=$commons_lang_path ],
10629 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
10630 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
10631 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
10636 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
10637 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
10640 if test -z $COMMONS_HTTPCLIENT_JAR; then
10641 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
10642 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
10644 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
10645 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
10646 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
10651 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
10652 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
10655 if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = "TRUE"; then
10656 if test -z $COMMONS_LOGGING_JAR; then
10657 AC_CHECK_FILE(/usr/share/java/commons-logging-${COMMONS_LOGGING_VERSION}.jar,
10658 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-${COMMONS_LOGGING_VERSION}.jar ],
10660 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
10661 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
10662 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
10667 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
10668 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
10672 AC_MSG_RESULT([internal])
10673 SYSTEM_APACHE_COMMONS=
10674 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
10677 AC_SUBST(SYSTEM_APACHE_COMMONS)
10678 AC_SUBST(COMMONS_CODEC_JAR)
10679 AC_SUBST(COMMONS_LANG_JAR)
10680 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
10681 AC_SUBST(COMMONS_LOGGING_JAR)
10682 AC_SUBST(COMMONS_LOGGING_VERSION)
10684 # scripting provider for BeanShell?
10685 AC_MSG_CHECKING([whether to build support for scripts in BeanShell])
10686 if test "${enable_scripting_beanshell}" != "no" -a "x$with_java" != "xno"; then
10687 AC_MSG_RESULT([yes])
10688 ENABLE_SCRIPTING_BEANSHELL=TRUE
10690 dnl ===================================================================
10691 dnl Check for system beanshell
10692 dnl ===================================================================
10693 AC_MSG_CHECKING([which beanshell to use])
10694 if test "$with_system_beanshell" = "yes"; then
10695 AC_MSG_RESULT([external])
10697 if test -z $BSH_JAR; then
10698 BSH_JAR=/usr/share/java/bsh.jar
10700 AC_CHECK_FILE($BSH_JAR, [],
10701 [AC_MSG_ERROR(bsh.jar not found.)], [])
10703 AC_MSG_RESULT([internal])
10705 BUILD_TYPE="$BUILD_TYPE BSH"
10708 AC_MSG_RESULT([no])
10709 ENABLE_SCRIPTING_BEANSHELL=
10710 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_BEANSHELL"
10712 AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
10713 AC_SUBST(SYSTEM_BSH)
10716 # scripting provider for JavaScript?
10717 AC_MSG_CHECKING([whether to build support for scripts in JavaScript])
10718 if test "${enable_scripting_javascript}" != "no" -a "x$with_java" != "xno"; then
10719 AC_MSG_RESULT([yes])
10720 ENABLE_SCRIPTING_JAVASCRIPT=TRUE
10722 dnl ===================================================================
10723 dnl Check for system rhino
10724 dnl ===================================================================
10725 AC_MSG_CHECKING([which rhino to use])
10726 if test "$with_system_rhino" = "yes"; then
10727 AC_MSG_RESULT([external])
10729 if test -z $RHINO_JAR; then
10730 RHINO_JAR=/usr/share/java/js.jar
10732 AC_CHECK_FILE($RHINO_JAR, [],
10733 [AC_MSG_ERROR(js.jar not found.)], [])
10735 AC_MSG_RESULT([internal])
10737 BUILD_TYPE="$BUILD_TYPE RHINO"
10740 AC_MSG_RESULT([no])
10741 ENABLE_SCRIPTING_JAVASCRIPT=
10742 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_JAVASCRIPT"
10744 AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
10745 AC_SUBST(SYSTEM_RHINO)
10746 AC_SUBST(RHINO_JAR)
10748 # This is only used in KDE3/KDE4/TDE checks to determine if /usr/lib64
10749 # paths should be added to library search path. So lets put all 64-bit
10752 case "$host_cpu" in
10753 x86_64 | powerpc64 | powerpc64le | s390x | aarch64)
10754 if test "$SAL_TYPES_SIZEOFLONG" = "8"; then
10755 supports_multilib="yes"
10762 dnl ===================================================================
10763 dnl Check whether the TQt and TDE libraries are available.
10764 dnl ===================================================================
10768 if test "$_os" != "OpenBSD"; then
10771 if test "$test_tde" = "yes" -a "$ENABLE_TDE" = "TRUE"; then
10772 dnl Search paths for TQt and TDE
10773 if test -z "$supports_multilib"; then
10774 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"
10775 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"
10777 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"
10778 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"
10780 if test -n "$TQTDIR"; then
10781 tqt_incdirs="$TQTDIR/include $tqt_incdirs"
10782 if test -z "$supports_multilib"; then
10783 tqt_libdirs="$TQTDIR/lib $tqt_libdirs"
10785 tqt_libdirs="$TQTDIR/lib64 $TQTDIR/lib $tqt_libdirs"
10788 if test -z "$supports_multilib"; then
10789 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"
10790 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"
10792 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"
10793 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"
10795 if test -n "$TDEDIR"; then
10796 tde_incdirs="$TDEDIR/include $tde_incdirs"
10797 if test -z "$supports_multilib"; then
10798 tde_libdirs="$TDEDIR/lib $tde_libdirs"
10800 tde_libdirs="$TDEDIR/lib64 $TDEDIR/lib $tde_libdirs"
10805 tqt_test_include="ntqstyle.h"
10806 tde_test_include="kapp.h"
10808 if test "$_os" != "OpenBSD"; then
10809 tqt_test_library="libtqt-mt.so"
10810 tde_test_library="libDCOP.so"
10812 tqt_test_library="libtqt-mt.so*"
10813 tde_test_library="libDCOP.so*"
10816 dnl Check for TQt headers
10817 AC_MSG_CHECKING([for TQt headers])
10819 for tde_check in $tqt_incdirs; do
10820 if test -r "$tde_check/$tqt_test_include"; then
10821 tqt_incdir="$tde_check"
10825 AC_MSG_RESULT([$tqt_incdir])
10826 if test "x$tqt_incdir" = "xno"; then
10827 AC_MSG_ERROR([TQt headers not found. Please specify the root of
10828 your TQt installation by exporting TQTDIR before running "configure".])
10831 dnl Check for TQt libraries
10832 AC_MSG_CHECKING([for TQt libraries])
10834 for tqt_check in $tqt_libdirs; do
10835 if test -r "`ls $tqt_check/$tqt_test_library 2>/dev/null | head -1`"; then
10836 tqt_libdir="$tqt_check"
10840 AC_MSG_RESULT([$tqt_libdir])
10841 if test "x$tqt_libdir" = "xno"; then
10842 AC_MSG_ERROR([TQt libraries not found. Please specify the root of
10843 your TQt installation by exporting TQTDIR before running "configure".])
10846 dnl Check for Meta Object Compiler
10847 AC_PATH_PROG( MOC, moc, no, [`dirname $tqt_libdir`/bin:$TQTDIR/bin:$PATH] )
10848 if test "$MOC" = "no"; then
10849 AC_MSG_ERROR([TQt Meta Object Compiler not found. Please specify
10850 the root of your TQt installation by exporting TQTDIR before running "configure".])
10853 dnl Check for TDE headers
10854 AC_MSG_CHECKING([for TDE headers])
10856 for tde_check in $tde_incdirs; do
10857 if test -r "$tde_check/$tde_test_include"; then
10858 tde_incdir="$tde_check"
10862 AC_MSG_RESULT([$tde_incdir])
10863 if test "x$tde_incdir" = "xno"; then
10864 AC_MSG_ERROR([TDE headers not found. Please specify the root of
10865 your TDE installation by exporting TDEDIR before running "configure".])
10868 dnl Check for TDE libraries
10869 AC_MSG_CHECKING([for TDE libraries])
10871 for tde_check in $tde_libdirs; do
10872 if test -r "`ls $tde_check/$tde_test_library 2>/dev/null | head -1`"; then
10873 tde_libdir="$tde_check"
10877 AC_MSG_RESULT([$tde_libdir])
10878 if test "x$tde_libdir" = "xno"; then
10879 AC_MSG_ERROR([TDE libraries not found. Please specify the root of
10880 your TDE installation by exporting TDEDIR before running "configure".])
10883 dnl Set the variables
10884 TDE_CFLAGS="-I$tqt_incdir -I$tde_incdir -I/usr/include/tqt -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
10885 TDE_LIBS="-L$tde_libdir -L$tqt_libdir -ltdeio -ltdeui -ltdecore -ltqt -ltqt-mt"
10887 AC_SUBST(TDE_CFLAGS)
10891 dnl ===================================================================
10892 dnl Check whether the Qt3 and KDE3 libraries are available.
10893 dnl ===================================================================
10897 if test "$_os" != "OpenBSD"; then
10900 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE"; then
10901 dnl Search paths for Qt3 and KDE3
10902 if test -z "$supports_multilib"; then
10903 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"
10904 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"
10906 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"
10907 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"
10909 if test -n "$QTDIR"; then
10910 qt_incdirs="$QTDIR/include $qt_incdirs"
10911 if test -z "$supports_multilib"; then
10912 qt_libdirs="$QTDIR/lib $qt_libdirs"
10914 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
10917 if test -z "$supports_multilib"; then
10918 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"
10919 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"
10921 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"
10922 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"
10924 if test -n "$KDEDIR"; then
10925 kde_incdirs="$KDEDIR/include $kde_incdirs"
10926 if test -z "$supports_multilib"; then
10927 kde_libdirs="$KDEDIR/lib $kde_libdirs"
10929 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
10934 qt_test_include="qstyle.h"
10935 kde_test_include="kapp.h"
10937 if test "$_os" != "OpenBSD"; then
10938 qt_test_library="libqt-mt.so"
10939 kde_test_library="libDCOP.so"
10941 qt_test_library="libqt-mt.so*"
10942 kde_test_library="libDCOP.so*"
10945 dnl Check for Qt3 headers
10946 AC_MSG_CHECKING([for Qt3 headers])
10948 for kde_check in $qt_incdirs; do
10949 if test -r "$kde_check/$qt_test_include"; then
10950 qt_incdir="$kde_check"
10954 AC_MSG_RESULT([$qt_incdir])
10955 if test "x$qt_incdir" = "xno"; then
10956 AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
10957 your Qt3 installation by exporting QTDIR before running "configure".])
10960 dnl Check for Qt3 libraries
10961 AC_MSG_CHECKING([for Qt3 libraries])
10963 for qt_check in $qt_libdirs; do
10964 if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`"; then
10965 qt_libdir="$qt_check"
10969 AC_MSG_RESULT([$qt_libdir])
10970 if test "x$qt_libdir" = "xno"; then
10971 AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
10972 your Qt3 installation by exporting QTDIR before running "configure".])
10975 dnl Check for Meta Object Compiler
10976 AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
10977 if test "$MOC" = "no"; then
10978 AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
10979 the root of your Qt3 installation by exporting QTDIR before running "configure".])
10982 dnl Check for KDE3 headers
10983 AC_MSG_CHECKING([for KDE3 headers])
10985 for kde_check in $kde_incdirs; do
10986 if test -r "$kde_check/$kde_test_include"; then
10987 kde_incdir="$kde_check"
10991 AC_MSG_RESULT([$kde_incdir])
10992 if test "x$kde_incdir" = "xno"; then
10993 AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
10994 your KDE3 installation by exporting KDEDIR before running "configure".])
10997 dnl Check for KDE3 libraries
10998 AC_MSG_CHECKING([for KDE3 libraries])
11000 for kde_check in $kde_libdirs; do
11001 if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`"; then
11002 kde_libdir="$kde_check"
11006 AC_MSG_RESULT([$kde_libdir])
11007 if test "x$kde_libdir" = "xno"; then
11008 AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
11009 your KDE3 installation by exporting KDEDIR before running "configure".])
11012 dnl Set the variables
11013 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
11014 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
11015 KDE_CFLAGS=$(printf '%s' "$KDE_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11017 AC_SUBST(KDE_CFLAGS)
11021 dnl ===================================================================
11022 dnl KDE4 Integration
11023 dnl ===================================================================
11032 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE"; then
11033 qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
11034 qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
11036 kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
11037 kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
11039 if test -n "$supports_multilib"; then
11040 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
11041 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
11044 if test -n "$QTDIR"; then
11045 qt_incdirs="$QTDIR/include $qt_incdirs"
11046 if test -z "$supports_multilib"; then
11047 qt_libdirs="$QTDIR/lib $qt_libdirs"
11049 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
11052 if test -n "$QT4DIR"; then
11053 qt_incdirs="$QT4DIR/include $qt_incdirs"
11054 if test -z "$supports_multilib"; then
11055 qt_libdirs="$QT4DIR/lib $qt_libdirs"
11057 qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
11061 if test -n "$KDEDIR"; then
11062 kde_incdirs="$KDEDIR/include $kde_incdirs"
11063 if test -z "$supports_multilib"; then
11064 kde_libdirs="$KDEDIR/lib $kde_libdirs"
11066 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
11069 if test -n "$KDE4DIR"; then
11070 kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
11071 if test -z "$supports_multilib"; then
11072 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
11074 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
11078 qt_test_include="Qt/qobject.h"
11079 qt_test_library="libQtNetwork.so"
11080 kde_test_include="kwindowsystem.h"
11081 kde_test_library="libsolid.so"
11083 AC_MSG_CHECKING([for Qt4 headers])
11085 for inc_dir in $qt_incdirs; do
11086 if test -r "$inc_dir/$qt_test_include"; then
11087 qt_header_dir="$inc_dir"
11092 AC_MSG_RESULT([$qt_header_dir])
11093 if test "x$qt_header_dir" = "xno"; then
11094 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
11097 dnl Check for qmake
11098 AC_PATH_PROG( QMAKEQT4, qmake-qt4, no, [`dirname $qt_header_dir`/bin:$QT4DIR/bin:$PATH] )
11100 if test "$QMAKE4" = "no"; then
11101 AC_PATH_PROG( QMAKE4, qmake, no, [`dirname $qt_header_dir`/bin:$QT4DIR/bin:$PATH] )
11102 if test "$QMAKE4" = "no"; then
11103 AC_MSG_ERROR([Qmake not found. Please specify
11104 the root of your Qt installation by exporting QT4DIR before running "configure".])
11108 qt_libdirs="`$QMAKE4 -query QT_INSTALL_LIBS` $qt_libdirs"
11109 AC_MSG_CHECKING([for Qt4 libraries])
11111 for lib_dir in $qt_libdirs; do
11112 if test -r "$lib_dir/$qt_test_library"; then
11113 qt_lib_dir="$lib_dir"
11114 PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
11119 AC_MSG_RESULT([$qt_lib_dir])
11121 if test "x$qt_lib_dir" = "xno"; then
11122 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
11125 dnl Check for Meta Object Compiler
11127 AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
11129 if test "$MOC4" = "no"; then
11130 AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
11131 if test "$MOC4" = "no"; then
11132 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
11133 the root of your Qt installation by exporting QT4DIR before running "configure".])
11137 dnl Check for KDE4 headers
11138 AC_MSG_CHECKING([for KDE4 headers])
11140 for kde_check in $kde_incdirs; do
11141 if test -r "$kde_check/$kde_test_include"; then
11142 kde_incdir="$kde_check"
11146 AC_MSG_RESULT([$kde_incdir])
11147 if test "x$kde_incdir" = "xno"; then
11148 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
11151 dnl Check for KDE4 libraries
11152 AC_MSG_CHECKING([for KDE4 libraries])
11154 for kde_check in $kde_libdirs; do
11155 if test -r "$kde_check/$kde_test_library"; then
11156 kde_libdir="$kde_check"
11161 AC_MSG_RESULT([$kde_libdir])
11162 if test "x$kde_libdir" = "xno"; then
11163 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
11166 PKG_CHECK_MODULES([QT4],[QtNetwork QtGui])
11167 KDE4_CFLAGS="-I$kde_incdir $QT4_CFLAGS -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
11168 KDE4_LIBS="-L$kde_libdir -lkio -lkfile -lkdeui -lkdecore -L$qt_lib_dir $QT4_LIBS"
11169 KDE4_CFLAGS=$(printf '%s' "$KDE4_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11171 AC_LANG_PUSH([C++])
11172 save_CXXFLAGS=$CXXFLAGS
11173 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
11174 AC_MSG_CHECKING([whether KDE is >= 4.2])
11175 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11176 #include <kdeversion.h>
11178 int main(int argc, char **argv) {
11179 if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
11182 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
11183 CXXFLAGS=$save_CXXFLAGS
11186 # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled.
11187 # Sets also KDE_GLIB_CFLAGS/KDE_GLIB_LIBS if successful.
11188 PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
11191 AC_DEFINE(KDE_HAVE_GLIB,1)
11192 KDE_GLIB_CFLAGS=$(printf '%s' "$KDE_GLIB_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11196 AC_LANG_PUSH([C++])
11197 # tst_exclude_socket_notifiers.moc:70:28: runtime error: member access within address 0x60d00000bb20 which does not point to an object of type 'QObjectData'
11198 # 0x60d00000bb20: note: object is of type 'QObjectPrivate'
11199 # 02 00 80 3a 90 8a 4e d2 3a 00 00 00 f0 b4 b9 a7 ff 7f 00 00 00 00 00 00 00 00 00 00 20 d8 4e d2
11200 # ^~~~~~~~~~~~~~~~~~~~~~~
11201 # vptr for 'QObjectPrivate'
11203 CXX=$(printf %s "$CXX" | sed -e s/-fno-sanitize-recover//)
11204 save_CXXFLAGS=$CXXFLAGS
11205 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
11207 LIBS="$LIBS $KDE4_LIBS"
11208 AC_MSG_CHECKING([whether Qt has fixed ExcludeSocketNotifiers])
11210 # Prepare meta object data
11211 TSTBASE="tst_exclude_socket_notifiers"
11212 TSTMOC="${SRC_ROOT}/vcl/unx/kde4/${TSTBASE}"
11213 ln -fs "${TSTMOC}.hxx"
11214 $MOC4 "${TSTBASE}.hxx" -o "${TSTBASE}.moc"
11216 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11217 #define SAL_OVERRIDE
11218 #include "tst_exclude_socket_notifiers.moc"
11220 int main(int argc, char *argv[])
11222 QCoreApplication app(argc, argv);
11223 exit(tst_processEventsExcludeSocket());
11227 AC_MSG_RESULT([yes])
11229 AC_MSG_RESULT([no])
11230 AC_MSG_WARN([native KDE4 file pickers will be disabled at runtime])
11231 if test -z "$qt4_fix_warning"; then
11232 add_warning "native KDE4 file pickers will be disabled at runtime, Qt4 fixes needed"
11235 add_warning " https://bugreports.qt-project.org/browse/QTBUG-37380 (needed)"
11238 # Remove meta object data
11239 rm -f "${TSTBASE}."*
11241 AC_MSG_CHECKING([whether Qt avoids QClipboard recursion caused by posted events])
11243 # Prepare meta object data
11244 TSTBASE="tst_exclude_posted_events"
11245 TSTMOC="${SRC_ROOT}/vcl/unx/kde4/${TSTBASE}"
11246 ln -fs "${TSTMOC}.hxx"
11247 $MOC4 "${TSTBASE}.hxx" -o "${TSTBASE}.moc"
11249 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11250 #define SAL_OVERRIDE
11251 #include "tst_exclude_posted_events.moc"
11253 int main(int argc, char *argv[])
11255 QCoreApplication app(argc, argv);
11256 exit(tst_excludePostedEvents());
11260 AC_MSG_RESULT([yes])
11262 AC_MSG_RESULT([no])
11263 AC_MSG_WARN([native KDE4 file pickers will be disabled at runtime])
11264 if test -z "$qt4_fix_warning"; then
11265 add_warning "native KDE4 file pickers will be disabled at runtime, Qt4 fixes needed"
11268 add_warning " https://bugreports.qt-project.org/browse/QTBUG-34614 (needed)"
11271 # Remove meta object data
11272 rm -f "${TSTBASE}."*
11274 if test -n "$qt4_fix_warning"; then
11275 add_warning " https://bugreports.qt-project.org/browse/QTBUG-38585 (recommended)"
11279 CXXFLAGS=$save_CXXFLAGS
11283 AC_MSG_WARN([[No Glib found, KDE4 support will not use native file pickers!]]))
11285 AC_SUBST(KDE4_CFLAGS)
11286 AC_SUBST(KDE4_LIBS)
11288 AC_SUBST(KDE_GLIB_CFLAGS)
11289 AC_SUBST(KDE_GLIB_LIBS)
11290 AC_SUBST(KDE_HAVE_GLIB)
11292 dnl ===================================================================
11293 dnl Test for the enabling the lockdown pieces
11294 dnl ===================================================================
11295 AC_MSG_CHECKING([whether to enable the lockdown pieces])
11297 if test -n "$enable_lockdown" -a "$enable_lockdown" != "no"; then
11298 ENABLE_LOCKDOWN=TRUE
11299 AC_MSG_RESULT([yes])
11301 AC_MSG_RESULT([no])
11303 AC_SUBST(ENABLE_LOCKDOWN)
11305 dnl ===================================================================
11306 dnl Test whether to include Evolution 2 support
11307 dnl ===================================================================
11308 AC_MSG_CHECKING([whether to enable evolution 2 support])
11309 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
11310 AC_MSG_RESULT([yes])
11311 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
11312 GOBJECT_CFLAGS=$(printf '%s' "$GOBJECT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11313 ENABLE_EVOAB2="TRUE"
11316 AC_MSG_RESULT([no])
11318 AC_SUBST(ENABLE_EVOAB2)
11319 AC_SUBST(GOBJECT_CFLAGS)
11320 AC_SUBST(GOBJECT_LIBS)
11322 dnl ===================================================================
11323 dnl Test whether to include TDE AB support
11324 dnl ===================================================================
11325 AC_MSG_CHECKING([whether to enable TDE address book support])
11326 if test "$enable_tdeab" = "yes" -a "$enable_tde" = "yes"; then
11327 AC_MSG_RESULT([yes])
11328 AC_LANG_PUSH([C++])
11329 save_CXXFLAGS=$CXXFLAGS
11330 CXXFLAGS="$CXXFLAGS $TDE_CFLAGS"
11331 AC_MSG_CHECKING([whether TDE is at least R14.0])
11332 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11333 #include <tdeversion.h>
11335 int main(int argc, char **argv) {
11336 if (TDE_VERSION_MAJOR >= 14) return 0;
11339 ]])],[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])],[])
11340 CXXFLAGS=$save_CXXFLAGS
11344 AC_MSG_RESULT([no])
11347 AC_SUBST(ENABLE_TDEAB)
11349 dnl ===================================================================
11350 dnl Test whether to include KDE AB support
11351 dnl ===================================================================
11352 AC_MSG_CHECKING([whether to enable KDE address book support])
11353 if test "$enable_kdeab" = "yes" -a "$enable_kde" = "yes"; then
11354 AC_MSG_RESULT([yes])
11355 AC_LANG_PUSH([C++])
11356 save_CXXFLAGS=$CXXFLAGS
11357 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
11358 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
11359 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11360 #include <kdeversion.h>
11362 int main(int argc, char **argv) {
11363 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
11366 ]])],[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])],[])
11367 CXXFLAGS=$save_CXXFLAGS
11371 AC_MSG_RESULT([no])
11374 AC_SUBST(ENABLE_KAB)
11376 dnl ===================================================================
11377 dnl Test which themes to include
11378 dnl ===================================================================
11379 AC_MSG_CHECKING([which themes to include])
11380 # if none given use default subset of available themes
11381 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
11382 with_theme="crystal galaxy hicontrast oxygen tango sifr"
11383 test -z "$ENABLE_RELEASE_BUILD" && with_theme="$with_theme tango_testing"
11387 if test "x$with_theme" != "xno"; then
11388 for theme in $with_theme; do
11390 crystal|galaxy|hicontrast|human|industrial|oxygen|sifr|tango|tango_testing) real_theme="$theme" ;;
11391 default) real_theme=galaxy ;;
11392 *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
11394 WITH_THEMES=`echo "$WITH_THEMES $real_theme"|tr '\ ' '\n'|sort|uniq|tr '\n' '\ '`
11397 AC_MSG_RESULT([$WITH_THEMES])
11398 AC_SUBST([WITH_THEMES])
11399 # FIXME: remove this, and the convenience default->galaxy remapping after a crace period
11400 for theme in $with_theme; do
11402 default) AC_MSG_WARN([--with-theme=default is deprecated and will be removed, use --with-theme=galaxy]) ;;
11407 dnl ===================================================================
11408 dnl Test whether to integrate helppacks into the product's installer
11409 dnl ===================================================================
11410 AC_MSG_CHECKING([for helppack integration])
11411 if test "$with_helppack_integration" = "no"; then
11412 WITH_HELPPACK_INTEGRATION=
11413 AC_MSG_RESULT([no integration])
11415 WITH_HELPPACK_INTEGRATION=TRUE
11416 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
11417 AC_MSG_RESULT([integration])
11419 AC_SUBST(WITH_HELPPACK_INTEGRATION)
11421 ###############################################################################
11422 # Extensions checking
11423 ###############################################################################
11424 AC_MSG_CHECKING([for extensions integration])
11425 if test "x$enable_extension_integration" != "xno"; then
11426 WITH_EXTENSION_INTEGRATION=TRUE
11427 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
11428 AC_MSG_RESULT([yes, use integration])
11430 WITH_EXTENSION_INTEGRATION=
11431 AC_MSG_RESULT([no, do not integrate])
11433 AC_SUBST(WITH_EXTENSION_INTEGRATION)
11435 dnl Should any extra extensions be included?
11436 dnl There are standalone tests for each of these below.
11437 WITH_EXTRA_EXTENSIONS=
11438 AC_SUBST([WITH_EXTRA_EXTENSIONS])
11440 libo_CHECK_EXTENSION([Watch Window],[WATCH_WINDOW],[watch_window],[watch-window],[23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt])
11441 libo_CHECK_EXTENSION([SmART Gallery (Diagram)],[DIAGRAM],[diagram],[diagram],[8d74685d41f8bffe8c3e71fe8deac09d-SmART_0.9.5.oxt])
11442 libo_CHECK_EXTENSION([Validator],[VALIDATOR],[validator],[validator],[bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt])
11443 libo_CHECK_EXTENSION([Barcode],[BARCODE],[barcode],[barcode],[3ed18025a766f1e955707b969c8113a5-Barcode_1.3.5.0.oxt])
11444 libo_CHECK_EXTENSION([ConvertTextToNumber],[CT2N],[ct2n],[ct2n],[])
11445 libo_CHECK_EXTENSION([Numbertext],[NUMBERTEXT],[numbertext],[numbertext],[b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_0.9.5.oxt])
11446 libo_CHECK_EXTENSION([Hungarian Cross-reference Toolbar],[HUNART],[hunart],[hunart],[b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt])
11447 libo_CHECK_EXTENSION([Typography Toolbar],[TYPO],[typo],[typo],[9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt])
11448 libo_CHECK_EXTENSION([Google Docs],[GOOGLE_DOCS],[google_docs],[google-docs],[27211596cf0ad97cab7321239406fde0-gdocs_3.0.1_modified.oxt])
11449 if test "x$with_java" != "xno"; then
11450 libo_CHECK_EXTENSION([NLPSolver],[NLPSOLVER],[nlpsolver],[nlpsolver],[])
11451 libo_CHECK_EXTENSION([LanguageTool],[LANGUAGETOOL],[languagetool],[languagetool],[])
11454 dnl ===================================================================
11455 dnl Test whether to include Sun Professional Template Pack
11456 dnl ===================================================================
11457 AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
11458 if test "$with_sun_templates" = "" -o "$with_sun_templates" = "no"; then
11459 AC_MSG_RESULT([no integration])
11461 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
11462 sun_supported_langs="en-US de it fr es hu"
11463 if test "$with_sun_templates" = "yes"; then
11464 wanted_sun_templates="$sun_supported_langs"
11466 # check whether the langs are supported by Sun
11467 wanted_sun_templates=
11468 for lang in $with_sun_templates; do
11469 if test -n "`echo $sun_supported_langs | grep "$lang"`"; then
11470 wanted_sun_templates="$wanted_sun_templates $lang"
11475 SUNTEMPLATES_DE_PACK=
11476 SUNTEMPLATES_EN_US_PACK=
11477 SUNTEMPLATES_ES_PACK=
11478 SUNTEMPLATES_FR_PACK=
11479 SUNTEMPLATES_HU_PACK=
11480 SUNTEMPLATES_IT_PACK=
11481 # check whether the langs are requested at all
11482 for lang in $wanted_sun_templates; do
11483 if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`"; then
11484 SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
11486 "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
11487 "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
11488 "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
11489 "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
11490 "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
11491 "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
11495 WITH_EXTRA_EXTENSIONS=TRUE
11496 AC_MSG_RESULT([$SUNTEMPLATES_LANG])
11498 AC_SUBST(SUNTEMPLATES_DE_PACK)
11499 AC_SUBST(SUNTEMPLATES_EN_US_PACK)
11500 AC_SUBST(SUNTEMPLATES_ES_PACK)
11501 AC_SUBST(SUNTEMPLATES_FR_PACK)
11502 AC_SUBST(SUNTEMPLATES_HU_PACK)
11503 AC_SUBST(SUNTEMPLATES_IT_PACK)
11505 TEST_FONTS_MISSING=0
11508 # $2+ = accepted font mappings
11512 AC_MSG_CHECKING([font mapping for '$FONT'])
11513 FONTFILE="$(basename `$FCMATCH -f '%{file}' "$FONT"`)"
11514 FONTFILE_LOWER="$(echo $FONTFILE | $AWK '{print tolower($0)}')"
11516 TESTEXPR="'${FONTFILE_LOWER}' = '$(echo $FONT | $AWK '{print tolower($0)}').ttf'"
11518 MAPPING="$(echo $1 | $AWK '{print tolower($0)}')"; shift
11519 test -n "$MAPPING" || break
11520 TESTEXPR="${TESTEXPR} -o '${FONTFILE_LOWER}' = '$MAPPING-regular.ttf'"
11524 AC_MSG_RESULT([ok])
11526 AC_MSG_RESULT([unknown ($FONTFILE)])
11527 TEST_FONTS_MISSING=1
11531 dnl ===================================================================
11532 dnl Test whether to include fonts
11533 dnl ===================================================================
11534 AC_MSG_CHECKING([whether to include third-party fonts])
11535 if test "$with_fonts" != "no"; then
11536 AC_MSG_RESULT([yes])
11538 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
11540 AC_MSG_RESULT([no])
11542 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
11543 if test "$test_fontconfig" = "yes"; then
11544 AC_PATH_PROG([FCMATCH], [fc-match])
11545 if test -z "$FCMATCH"; then
11546 AC_MSG_WARN([Unable to query installed fonts - unit tests disabled.])
11547 TEST_FONTS_MISSING=1
11549 test_font_map 'Calibri' 'Carlito'
11550 if test ${TEST_FONTS_MISSING} -eq 1
11552 AC_MSG_WARN([Unknown font mappings - unit tests disabled.])
11556 TEST_FONTS_MISSING=0
11559 AC_SUBST(WITH_FONTS)
11560 AC_DEFINE_UNQUOTED([TEST_FONTS_MISSING], $TEST_FONTS_MISSING)
11562 dnl ===================================================================
11563 dnl Test whether to include extra galleries
11564 dnl ===================================================================
11565 AC_MSG_CHECKING([whether to include extra galleries])
11566 if test "$enable_extra_gallery" = "" -o "$enable_extra_gallery" = "no"; then
11567 AC_MSG_RESULT([no])
11568 WITH_EXTRA_GALLERY=
11569 OOOP_GALLERY_PACK=""
11571 AC_MSG_RESULT([yes])
11572 WITH_EXTRA_GALLERY=TRUE
11573 BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
11574 SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
11575 OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
11577 AC_SUBST(WITH_EXTRA_GALLERY)
11578 AC_SUBST(OOOP_GALLERY_PACK)
11580 dnl ===================================================================
11581 dnl Test whether to include extra templates
11582 dnl ===================================================================
11583 AC_MSG_CHECKING([whether to include extra templates])
11584 if test "$enable_extra_template" = "" -o "$enable_extra_template" = "no"; then
11585 AC_MSG_RESULT([no])
11586 WITH_EXTRA_TEMPLATE=
11587 OOOP_TEMPLATES_PACK=""
11589 AC_MSG_RESULT([yes])
11590 WITH_EXTRA_TEMPLATE=TRUE
11591 BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
11592 SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
11593 OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
11595 AC_SUBST(WITH_EXTRA_TEMPLATE)
11596 AC_SUBST(OOOP_TEMPLATES_PACK)
11598 dnl ===================================================================
11599 dnl Test whether to include extra samples
11600 dnl ===================================================================
11601 AC_MSG_CHECKING([whether to include extra samples])
11602 if test "$enable_extra_sample" = "" -o "$enable_extra_sample" = "no"; then
11603 AC_MSG_RESULT([no])
11605 OOOP_SAMPLES_PACK=""
11607 AC_MSG_RESULT([yes])
11608 WITH_EXTRA_SAMPLE=TRUE
11609 BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
11610 SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
11611 OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
11613 AC_SUBST(WITH_EXTRA_SAMPLE)
11614 AC_SUBST(OOOP_SAMPLES_PACK)
11616 dnl ===================================================================
11617 dnl Test whether to include extra fonts
11618 dnl ===================================================================
11619 AC_MSG_CHECKING([whether to include extra fonts])
11620 if test "$enable_extra_font" = "" -o "$enable_extra_font" = "no"; then
11621 AC_MSG_RESULT([no])
11625 AC_MSG_RESULT([yes])
11626 WITH_EXTRA_FONT=TRUE
11627 BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
11628 SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
11629 OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
11631 AC_SUBST(WITH_EXTRA_FONT)
11632 AC_SUBST(OOOP_FONTS_PACK)
11634 dnl ===================================================================
11635 dnl Test whether to enable online update service
11636 dnl ===================================================================
11637 AC_MSG_CHECKING([whether to enable online update])
11638 ENABLE_ONLINE_UPDATE=
11639 if test "$enable_online_update" = ""; then
11640 if test "$_os" = "WINNT" -o "$_os" = "Darwin"; then
11641 AC_MSG_RESULT([yes])
11642 ENABLE_ONLINE_UPDATE="TRUE"
11644 AC_MSG_RESULT([no])
11647 if test "$enable_online_update" = "yes"; then
11648 AC_MSG_RESULT([yes])
11649 ENABLE_ONLINE_UPDATE="TRUE"
11651 AC_MSG_RESULT([no])
11654 AC_SUBST(ENABLE_ONLINE_UPDATE)
11656 dnl ===================================================================
11657 dnl Test whether to create MSI with LIMITUI=1 (silent install)
11658 dnl ===================================================================
11659 AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
11660 if test "$enable_silent_msi" = "" -o "$enable_silent_msi" = "no"; then
11661 AC_MSG_RESULT([no])
11664 AC_MSG_RESULT([yes])
11665 ENABLE_SILENT_MSI=TRUE
11666 SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
11668 AC_SUBST(ENABLE_SILENT_MSI)
11670 AC_MSG_CHECKING([whether and how to use Xinerama])
11671 if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
11672 if test "$x_libraries" = "default_x_libraries"; then
11673 XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
11674 if test "x$XINERAMALIB" = x; then
11675 XINERAMALIB="/usr/lib"
11678 XINERAMALIB="$x_libraries"
11680 if test -e "$XINERAMALIB/libXinerama.so" -a -e "$XINERAMALIB/libXinerama.a"; then
11681 # we have both versions, let the user decide but use the dynamic one
11684 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
11685 XINERAMA_LINK=dynamic
11687 XINERAMA_LINK=static
11689 elif test -e "$XINERAMALIB/libXinerama.so" -a ! -e "$XINERAMALIB/libXinerama.a"; then
11690 # we have only the dynamic version
11692 XINERAMA_LINK=dynamic
11693 elif test -e "$XINERAMALIB/libXinerama.a"; then
11695 if echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
11697 XINERAMA_LINK=static
11707 if test "$USE_XINERAMA" = "TRUE"; then
11708 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
11709 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
11710 [AC_MSG_ERROR(Xinerama header not found.)], [])
11711 XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
11712 if test "x$XEXTLIB" = x; then
11713 XEXTLIBS="-L$XLIB -L$XINERAMALIB -lXext"
11715 XINERAMA_EXTRA_LIBS="$XEXTLIBS"
11716 if test "$_os" = "FreeBSD"; then
11717 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
11719 if test "$_os" = "Linux"; then
11720 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
11722 AC_CHECK_LIB([Xinerama], [XineramaIsActive], [:],
11723 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
11725 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
11730 AC_MSG_RESULT([no])
11732 AC_SUBST(USE_XINERAMA)
11733 AC_SUBST(XINERAMA_LINK)
11735 dnl ===================================================================
11736 dnl Test whether to build cairo or rely on the system version
11737 dnl ===================================================================
11739 if test "$GUIBASE" = "unx"; then
11740 # Used in vcl/Library_vclplug_gen.mk
11744 if test "$test_cairo" = "yes"; then
11745 AC_MSG_CHECKING([whether to use the system cairo])
11747 : ${with_system_cairo:=$with_system_libs}
11748 if test "$with_system_cairo" = "yes"; then
11750 AC_MSG_RESULT([yes])
11752 PKG_CHECK_MODULES( CAIRO, cairo >= 1.2.0 )
11753 CAIRO_CFLAGS=$(printf '%s' "$CAIRO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11755 if test "$test_xrender" = "yes"; then
11756 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
11758 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
11759 #ifdef PictStandardA8
11763 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
11767 libo_MINGW_CHECK_DLL([libcairo])
11768 libo_MINGW_TRY_DLL([libfontconfig])
11769 libo_MINGW_TRY_DLL([libfreetype])
11770 libo_MINGW_TRY_DLL([libpixman])
11771 libo_MINGW_TRY_DLL([libpng15])
11774 AC_MSG_RESULT([no])
11776 BUILD_TYPE="$BUILD_TYPE CAIRO"
11777 SCPDEFS="$SCPDEFS -DNEED_CAIRO"
11781 AC_SUBST(SYSTEM_CAIRO)
11782 AC_SUBST(CAIRO_CFLAGS)
11783 AC_SUBST(CAIRO_LIBS)
11785 dnl ===================================================================
11786 dnl Test whether to use avahi
11787 dnl ===================================================================
11788 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_avahi" = "yes"; then
11789 PKG_CHECK_MODULES([AVAHI], [avahi-client >= 0.6.10],
11790 [ENABLE_AVAHI="TRUE"])
11791 AC_DEFINE(HAVE_FEATURE_AVAHI)
11792 AVAHI_CFLAGS=$(printf '%s' "$AVAHI_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11795 AC_SUBST(ENABLE_AVAHI)
11796 AC_SUBST(AVAHI_CFLAGS)
11797 AC_SUBST(AVAHI_LIBS)
11799 dnl ===================================================================
11800 dnl Test whether to use liblangtag
11801 dnl ===================================================================
11804 AC_MSG_CHECKING([whether to use liblangtag])
11805 if test "$enable_liblangtag" = "yes" -o \( "$enable_liblangtag" = "" -a $_os != Android -a $_os != iOS \); then
11806 ENABLE_LIBLANGTAG=TRUE
11807 AC_MSG_RESULT([yes])
11808 AC_MSG_CHECKING([whether to use system liblangtag])
11809 if test "$with_system_liblangtag" = yes; then
11810 SYSTEM_LIBLANGTAG=TRUE
11811 AC_MSG_RESULT([yes])
11812 PKG_CHECK_MODULES( LIBLANGTAG, liblangtag >= 0.4.0)
11813 LIBLANGTAG_CFLAGS=$(printf '%s' "$LIBLANGTAG_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11814 libo_MINGW_CHECK_DLL([liblangtag])
11817 AC_MSG_RESULT([no])
11818 BUILD_TYPE="$BUILD_TYPE LIBLANGTAG"
11819 if test "$COM" = "MSC"; then
11820 LIBLANGTAG_LIBS="${WORKDIR}/UnpackedTarball/langtag/liblangtag/.libs/liblangtag.lib"
11822 LIBLANGTAG_LIBS="-L${WORKDIR}/UnpackedTarball/langtag/liblangtag/.libs -llangtag"
11826 AC_MSG_RESULT([no])
11828 AC_SUBST(ENABLE_LIBLANGTAG)
11829 AC_SUBST(SYSTEM_LIBLANGTAG)
11830 AC_SUBST(LIBLANGTAG_CFLAGS)
11831 AC_SUBST(LIBLANGTAG_LIBS)
11833 dnl ===================================================================
11834 dnl Test whether to build libpng or rely on the system version
11835 dnl ===================================================================
11837 libo_CHECK_SYSTEM_MODULE([libpng],[LIBPNG],[libpng],["-I${WORKDIR}/UnpackedTarball/png"],["-L${WORKDIR}/LinkTarget/StaticLibrary -lpng"])
11839 dnl ===================================================================
11840 dnl Check for runtime JVM search path
11841 dnl ===================================================================
11842 if test "$ENABLE_JAVA" != ""; then
11843 AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
11844 if test -n "$with_jvm_path" -a "$with_jvm_path" != "no"; then
11845 AC_MSG_RESULT([yes])
11846 if ! test -d "$with_jvm_path"; then
11847 AC_MSG_ERROR(["$with_jvm_path" not a directory])
11849 if ! test -d "$with_jvm_path"jvm; then
11850 AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
11852 JVM_ONE_PATH_CHECK="$with_jvm_path"
11853 AC_SUBST(JVM_ONE_PATH_CHECK)
11855 AC_MSG_RESULT([no])
11859 dnl ===================================================================
11860 dnl Test for the presence of Ant and that it works
11861 dnl ===================================================================
11863 if test "$ENABLE_JAVA" != ""; then
11864 ANT_HOME=; export ANT_HOME
11865 WITH_ANT_HOME=; export WITH_ANT_HOME
11866 if test -z "$with_ant_home" -a -n "$LODE_HOME" ; then
11867 if test -x "$LODE_HOME/opt/ant/bin/ant" ; then
11868 if test "$_os" = "WINNT"; then
11869 with_ant_home="`cygpath -m $LODE_HOME/opt/ant`"
11871 with_ant_home="$LODE_HOME/opt/ant"
11873 elif test -x "$LODE_HOME/opt/bin/ant" ; then
11874 with_ant_home="$LODE_HOME/opt/ant"
11877 if test -z "$with_ant_home"; then
11878 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
11880 if test "$_os" = "WINNT"; then
11881 # AC_PATH_PROGS needs unix path
11882 with_ant_home=`cygpath -u "$with_ant_home"`
11884 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
11885 WITH_ANT_HOME=$with_ant_home
11886 ANT_HOME=$with_ant_home
11889 if test -z "$ANT"; then
11890 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
11892 # resolve relative or absolute symlink
11893 while test -h "$ANT"; do
11895 a_basename=`basename "$ANT"`
11896 a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
11897 cd "`dirname "$ANT"`"
11898 cd "`dirname "$a_script"`"
11899 ANT="`pwd`"/"`basename "$a_script"`"
11903 AC_MSG_CHECKING([if $ANT works])
11904 cat > conftest.java << EOF
11905 public class conftest {
11906 int testmethod(int a, int b) {
11912 cat > conftest.xml << EOF
11913 <project name="conftest" default="conftest">
11914 <target name="conftest">
11915 <javac srcdir="." includes="conftest.java">
11921 oldJAVA_HOME=$JAVA_HOME
11922 if test "$JAVACISGCJ" = "yes"; then
11923 JAVA_HOME=; export JAVA_HOME
11924 ant_gcj="-Dbuild.compiler=gcj"
11926 AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
11927 if test $? = 0 -a -f ./conftest.class; then
11928 AC_MSG_RESULT([Ant works])
11929 if test -z "$WITH_ANT_HOME"; then
11930 ANT_HOME=`"$ANT" -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
11931 if test -z "$ANT_HOME"; then
11932 ANT_HOME=`echo "$ANT" | $SED -n "s/\/bin\/ant.*\$//p"`
11935 ANT_HOME="$WITH_ANT_HOME"
11938 echo "configure: Ant test failed" >&5
11939 cat conftest.java >&5
11940 cat conftest.xml >&5
11941 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
11943 add_warning "Ant does not work - Some Java projects will not build!"
11945 JAVA_HOME=$oldJAVA_HOME
11946 rm -f conftest* core core.* *.core
11948 if test -z "$ANT_HOME"; then
11949 ANT_HOME="NO_ANT_HOME"
11951 PathFormat "$ANT_HOME"
11952 ANT_HOME="$formatted_path"
11954 ANT="$formatted_path"
11959 dnl Checking for ant.jar
11960 if test "$ANT_HOME" != "NO_ANT_HOME"; then
11961 AC_MSG_CHECKING([Ant lib directory])
11962 if test -f $ANT_HOME/lib/ant.jar; then
11963 ANT_LIB="$ANT_HOME/lib"
11965 if test -f $ANT_HOME/ant.jar; then
11966 ANT_LIB="$ANT_HOME"
11968 if test -f /usr/share/java/ant.jar; then
11969 ANT_LIB=/usr/share/java
11971 if test -f /usr/share/ant-core/lib/ant.jar; then
11972 ANT_LIB=/usr/share/ant-core/lib
11974 if test -f $ANT_HOME/lib/ant/ant.jar; then
11975 ANT_LIB="$ANT_HOME/lib/ant"
11977 if test -f /usr/share/lib/ant/ant.jar; then
11978 ANT_LIB=/usr/share/lib/ant
11980 AC_MSG_ERROR([Ant libraries not found!])
11987 PathFormat "$ANT_LIB"
11988 ANT_LIB="$formatted_path"
11989 AC_MSG_RESULT([Ant lib directory found.])
11994 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
11996 AC_MSG_CHECKING([whether Ant is >= $ant_minver])
11997 ant_version=`"$ANT" -version | $AWK '{ print $4; }'`
11998 ant_version_major=`echo $ant_version | cut -d. -f1`
11999 ant_version_minor=`echo $ant_version | cut -d. -f2`
12000 echo "configure: ant_version $ant_version " >&5
12001 echo "configure: ant_version_major $ant_version_major " >&5
12002 echo "configure: ant_version_minor $ant_version_minor " >&5
12003 if test "$ant_version_major" -ge "2"; then
12004 AC_MSG_RESULT([yes, $ant_version])
12005 elif test "$ant_version_major" = "1" -a "$ant_version_minor" -ge "$ant_minminor1"; then
12006 AC_MSG_RESULT([yes, $ant_version])
12008 AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
12011 rm -f conftest* core core.* *.core
12015 if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
12016 AC_MSG_CHECKING([for JUnit 4])
12017 if test "$with_junit" = "yes"; then
12018 if test -n "$LODE_HOME" -a -e "$LODE_HOME/opt/share/java/junit.jar" ; then
12019 OOO_JUNIT_JAR="$LODE_HOME/opt/share/java/junit.jar"
12020 elif test -e /usr/share/java/junit4.jar; then
12021 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
12023 if test -e /usr/share/lib/java/junit.jar; then
12024 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
12026 OOO_JUNIT_JAR=/usr/share/java/junit.jar
12030 OOO_JUNIT_JAR=$with_junit
12032 if test "$_os" = "WINNT"; then
12033 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
12035 printf 'import org.junit.Before;' > conftest.java
12036 if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
12037 AC_MSG_RESULT([$OOO_JUNIT_JAR])
12040 [cannot find JUnit 4 jar; please install one in the default location (/usr/share/java),
12041 specify its pathname via --with-junit=..., or disable it via --without-junit])
12043 rm -f conftest.class conftest.java
12044 if test $OOO_JUNIT_JAR != ""; then
12045 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
12048 AC_SUBST(OOO_JUNIT_JAR)
12051 if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
12052 AC_MSG_CHECKING([for included Hamcrest])
12053 printf 'import org.hamcrest.BaseDescription;' > conftest.java
12054 if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
12055 AC_MSG_RESULT([Included in $OOO_JUNIT_JAR])
12057 AC_MSG_RESULT([Not included])
12058 AC_MSG_CHECKING([for standalone hamcrest jar.])
12059 if test "$with_hamcrest" = "yes"; then
12060 if test -e /usr/share/lib/java/hamcrest.jar; then
12061 HAMCREST_JAR=/usr/share/lib/java/hamcrest.jar
12062 elif test -e /usr/share/java/hamcrest/core.jar; then
12063 HAMCREST_JAR=/usr/share/java/hamcrest/core.jar
12065 HAMCREST_JAR=/usr/share/java/hamcrest.jar
12068 HAMCREST_JAR=$with_hamcrest
12070 if test "$_os" = "WINNT"; then
12071 HAMCREST_JAR=`cygpath -m "$HAMCREST_JAR"`
12073 if "$JAVACOMPILER" -classpath "$HAMCREST_JAR" conftest.java >&5 2>&5; then
12074 AC_MSG_RESULT([$HAMCREST_JAR])
12076 AC_MSG_ERROR([junit does not contain hamcrest; please use a junit jar that includes hamcrest, install a hamcrest jar in the default location (/usr/share/java),
12077 specify its path with --with-hamcrest=..., or disable junit with --without-junit])
12080 rm -f conftest.class conftest.java
12082 AC_SUBST(HAMCREST_JAR)
12088 # check for wget and curl
12093 if test "$enable_fetch_external" != "no"; then
12095 CURL=`which curl 2>/dev/null`
12097 for i in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget /opt/sfw/bin/wget /opt/local/bin/wget; do
12098 eval "$i --version" > /dev/null 2>&1
12100 if test $ret -eq 0; then
12106 if test -z "$WGET" -a -z "$CURL"; then
12107 AC_MSG_ERROR([neither wget nor curl found!])
12120 for i in md5 md5sum /usr/local/bin/md5sum gmd5sum /usr/sfw/bin/md5sum /opt/sfw/bin/gmd5sum /opt/local/bin/md5sum; do
12121 if test "$i" = "md5"; then
12122 eval "$i -x" > /dev/null 2>&1
12124 eval "$i --version" > /dev/null 2>&1
12127 if test $ret -eq 0; then
12133 if test "$MD5SUM" = "md5"; then
12134 if md5 -r < /dev/null > /dev/null 2>/dev/null; then
12135 MD5SUM="$MD5SUM -r"
12136 elif md5 -n < /dev/null > /dev/null 2>/dev/null; then
12137 MD5SUM="$MD5SUM -n"
12141 if test -z "$MD5SUM"; then
12142 AC_MSG_ERROR([no md5sum found!])
12147 dnl ===================================================================
12148 dnl Dealing with l10n options
12149 dnl ===================================================================
12150 AC_MSG_CHECKING([which languages to be built])
12151 # get list of all languages
12152 # generate shell variable from completelangiso= from solenv/inc/langlist.mk
12153 # the sed command does the following:
12154 # + if a line ends with a backslash, append the next line to it
12155 # + adds " on the beginning of the value (after =)
12156 # + adds " at the end of the value
12157 # + removes en-US; we want to put it on the beginning
12158 # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
12159 [eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' $SRC_ROOT/solenv/inc/langlist.mk)]
12160 ALL_LANGS="en-US $completelangiso"
12161 # check the configured localizations
12162 WITH_LANG="$with_lang"
12163 if test -z "$WITH_LANG" -o "$WITH_LANG" = "en-US"; then
12164 AC_MSG_RESULT([en-US])
12166 AC_MSG_RESULT([$WITH_LANG])
12167 GIT_NEEDED_SUBMODULES="translations $GIT_NEEDED_SUBMODULES"
12169 # check that the list is valid
12170 for lang in $WITH_LANG; do
12171 test "$lang" = "ALL" && continue
12172 # need to check for the exact string, so add space before and after the list of all languages
12173 for vl in $ALL_LANGS; do
12174 if test "$vl" = "$lang"; then
12178 if test "$vl" != "$lang"; then
12179 # if you're reading this - you prolly quoted your languages remove the quotes ...
12180 AC_MSG_ERROR([invalid language: '$lang' (vs '$v1'); supported languages are: $ALL_LANGS])
12183 if test -n "$WITH_LANG" -a "$WITH_LANG" != "ALL"; then
12184 echo $WITH_LANG | grep -q en-US
12185 test $? -ne 1 || WITH_LANG=`echo $WITH_LANG en-US`
12187 # list with substituted ALL
12188 WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
12189 test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
12190 test "$WITH_LANG" = "en-US" && WITH_LANG=
12191 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
12192 test "$WITH_LANG_LIST" = "en-US" || WITH_LANG_LIST=`echo $WITH_LANG_LIST qtz`
12193 ALL_LANGS=`echo $ALL_LANGS qtz`
12195 AC_SUBST(ALL_LANGS)
12196 AC_SUBST(WITH_LANG)
12197 AC_SUBST(WITH_LANG_LIST)
12198 AC_SUBST(GIT_NEEDED_SUBMODULES)
12200 WITH_POOR_HELP_LOCALIZATIONS=
12201 if test -d "$SRC_ROOT/translations/source"; then
12202 for l in `ls -1 $SRC_ROOT/translations/source`; do
12203 if test ! -d "$SRC_ROOT/translations/source/$l/helpcontent2"; then
12204 WITH_POOR_HELP_LOCALIZATIONS="$WITH_POOR_HELP_LOCALIZATIONS $l"
12208 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
12210 if test -n "$with_locales"; then
12211 WITH_LOCALES="$with_locales"
12213 just_langs="`echo $WITH_LOCALES | sed -e 's/_[A-Z]*//g'`"
12214 # Only languages and scripts for which we actually have ifdefs need to be handled. Also see
12215 # config_host/config_locales.h.in
12216 for locale in $WITH_LOCALES; do
12219 AC_DEFINE_UNQUOTED(WITH_LOCALE_$lang, 1)
12223 AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Deva)
12226 AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Cyrl)
12231 AC_DEFINE(WITH_LOCALE_ALL)
12233 AC_SUBST(WITH_LOCALES)
12235 dnl git submodule update --reference
12236 dnl ===================================================================
12237 if test -n "${GIT_REFERENCE_SRC}"; then
12238 for repo in ${GIT_NEEDED_SUBMODULES}; do
12239 if ! test -d "${GIT_REFERENCE_SRC}"/${repo}; then
12240 AC_MSG_ERROR([referenced git: required repository does not exist: ${GIT_REFERENCE_SRC}/${repo}])
12244 AC_SUBST(GIT_REFERENCE_SRC)
12246 dnl git submodules linked dirs
12247 dnl ===================================================================
12248 if test -n "${GIT_LINK_SRC}"; then
12249 for repo in ${GIT_NEEDED_SUBMODULES}; do
12250 if ! test -d "${GIT_LINK_SRC}"/${repo}; then
12251 AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
12255 AC_SUBST(GIT_LINK_SRC)
12258 dnl ===================================================================
12259 AC_MSG_CHECKING([for alternative branding images directory])
12260 # initialize mapped arrays
12261 BRAND_INTRO_IMAGES="flat_logo.svg intro.png"
12262 brand_files="$BRAND_INTRO_IMAGES about.svg"
12264 if test -z "$with_branding" -o "$with_branding" = "no"; then
12265 AC_MSG_RESULT([none])
12266 DEFAULT_BRAND_IMAGES="$brand_files"
12268 if ! test -d $with_branding ; then
12269 AC_MSG_ERROR([No directory $with_branding, falling back to default branding])
12271 AC_MSG_RESULT([$with_branding])
12272 CUSTOM_BRAND_DIR="$with_branding"
12273 for lfile in $brand_files
12275 if ! test -f $with_branding/$lfile ; then
12276 AC_MSG_WARN([Branded file $lfile does not exist, using the default one])
12277 DEFAULT_BRAND_IMAGES="$DEFAULT_BRAND_IMAGES $lfile"
12279 CUSTOM_BRAND_IMAGES="$CUSTOM_BRAND_IMAGES $lfile"
12282 check_for_progress="yes"
12285 AC_SUBST([BRAND_INTRO_IMAGES])
12286 AC_SUBST([CUSTOM_BRAND_DIR])
12287 AC_SUBST([CUSTOM_BRAND_IMAGES])
12288 AC_SUBST([DEFAULT_BRAND_IMAGES])
12291 AC_MSG_CHECKING([for 'intro' progress settings])
12295 PROGRESSFRAMECOLOR=
12297 PROGRESSTEXTBASELINE=
12299 if test "$check_for_progress" = "yes" -a -f "$with_branding/progress.conf" ; then
12300 source "$with_branding/progress.conf"
12301 AC_MSG_RESULT([settings found in $with_branding/progress.conf])
12303 AC_MSG_RESULT([none])
12306 AC_SUBST(PROGRESSBARCOLOR)
12307 AC_SUBST(PROGRESSSIZE)
12308 AC_SUBST(PROGRESSPOSITION)
12309 AC_SUBST(PROGRESSFRAMECOLOR)
12310 AC_SUBST(PROGRESSTEXTCOLOR)
12311 AC_SUBST(PROGRESSTEXTBASELINE)
12314 AC_MSG_CHECKING([for extra build ID])
12315 if test -n "$with_extra_buildid" -a "$with_extra_buildid" != "yes" ; then
12316 EXTRA_BUILDID="$with_extra_buildid"
12318 # in tinderboxes, it is easier to set EXTRA_BUILDID via the environment variable instead of configure switch
12319 if test -n "$EXTRA_BUILDID" ; then
12320 AC_MSG_RESULT([$EXTRA_BUILDID])
12322 AC_MSG_RESULT([not set])
12324 AC_DEFINE_UNQUOTED([EXTRA_BUILDID], ["$EXTRA_BUILDID"])
12327 AC_MSG_CHECKING([for vendor])
12328 if test -z "$with_vendor" -o "$with_vendor" = "no"; then
12329 OOO_VENDOR="$USERNAME"
12331 if test -z "$OOO_VENDOR"; then
12335 if test -z "$OOO_VENDOR"; then
12336 OOO_VENDOR="`id -u -n`"
12339 AC_MSG_RESULT([not set, using $OOO_VENDOR])
12341 OOO_VENDOR="$with_vendor"
12342 AC_MSG_RESULT([$OOO_VENDOR])
12344 AC_SUBST(OOO_VENDOR)
12346 AC_MSG_CHECKING([whether to install the compat oo* wrappers])
12347 if test "$with_compat_oowrappers" = "yes"; then
12348 WITH_COMPAT_OOWRAPPERS=TRUE
12351 WITH_COMPAT_OOWRAPPERS=
12354 AC_SUBST(WITH_COMPAT_OOWRAPPERS)
12356 INSTALLDIRNAME=`echo AC_PACKAGE_NAME | $AWK '{print tolower($0)}'`
12357 AC_MSG_CHECKING([for install dirname])
12358 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes"; then
12359 INSTALLDIRNAME="$with_install_dirname"
12361 AC_MSG_RESULT([$INSTALLDIRNAME])
12362 AC_SUBST(INSTALLDIRNAME)
12364 AC_MSG_CHECKING([for prefix])
12365 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12366 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
12367 PREFIXDIR="$prefix"
12368 AC_MSG_RESULT([$PREFIXDIR])
12369 AC_SUBST(PREFIXDIR)
12371 LIBDIR=[$(eval echo $(eval echo $libdir))]
12374 DATADIR=[$(eval echo $(eval echo $datadir))]
12377 MANDIR=[$(eval echo $(eval echo $mandir))]
12380 DOCDIR=[$(eval echo $(eval echo $docdir))]
12383 INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
12384 AC_SUBST(INSTALLDIR)
12386 TESTINSTALLDIR="${BUILDDIR}/test-install"
12387 AC_SUBST(TESTINSTALLDIR)
12390 # ===================================================================
12391 # OAuth2 id and secrets
12392 # ===================================================================
12394 AC_MSG_CHECKING([for Google Drive client id and secret])
12395 GDRIVE_CLIENT_ID="\"$with_gdrive_client_id\""
12396 GDRIVE_CLIENT_SECRET="\"$with_gdrive_client_secret\""
12397 if test "$with_gdrive_client_id" = "no" -o -z "$with_gdrive_client_id"; then
12398 GDRIVE_CLIENT_ID="\"\""
12401 if test "$with_gdrive_client_secret" = "no" -o -z "$with_gdrive_client_secret"; then
12402 GDRIVE_CLIENT_SECRET="\"\""
12405 if test -z "$GDRIVE_CLIENT_ID" -o -z "$GDRIVE_CLIENT_SECRET"; then
12406 AC_MSG_RESULT([not set])
12408 AC_MSG_RESULT([set])
12411 AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_ID, $GDRIVE_CLIENT_ID)
12412 AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_SECRET, $GDRIVE_CLIENT_SECRET)
12414 AC_MSG_CHECKING([for Alfresco Cloud client id and secret])
12415 ALFRESCO_CLOUD_CLIENT_ID="\"$with_alfresco_cloud_client_id\""
12416 ALFRESCO_CLOUD_CLIENT_SECRET="\"$with_alfresco_cloud_client_secret\""
12417 if test "$with_alfresco_cloud_client_id" = "no" -o -z "$with_alfresco_cloud_client_id"; then
12418 ALFRESCO_CLOUD_CLIENT_ID="\"\""
12421 if test "$with_alfresco_cloud_client_secret" = "no" -o -z "$with_alfresco_cloud_client_secret"; then
12422 ALFRESCO_CLOUD_CLIENT_SECRET="\"\""
12425 if test -z "$ALFRESCO_CLOUD_CLIENT_ID" -o -z "$ALFRESCO_CLOUD_CLIENT_SECRET"; then
12426 AC_MSG_RESULT([not set])
12428 AC_MSG_RESULT([set])
12430 AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_ID, $ALFRESCO_CLOUD_CLIENT_ID)
12431 AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_SECRET, $ALFRESCO_CLOUD_CLIENT_SECRET)
12433 AC_MSG_CHECKING([for OneDrive client id and secret])
12434 ONEDRIVE_CLIENT_ID="\"$with_onedrive_client_id\""
12435 ONEDRIVE_CLIENT_SECRET="\"$with_onedrive_client_secret\""
12436 if test "$with_onedrive_client_id" = "no" -o -z "$with_onedrive_client_id"; then
12437 ONEDRIVE_CLIENT_ID="\"\""
12440 if test "$with_onedrive_client_secret" = "no" -o -z "$with_onedrive_client_secret"; then
12441 ONEDRIVE_CLIENT_SECRET="\"\""
12444 if test -z "$ONEDRIVE_CLIENT_ID" -o -z "$ONEDRIVE_CLIENT_SECRET"; then
12445 AC_MSG_RESULT([not set])
12447 AC_MSG_RESULT([set])
12449 AC_DEFINE_UNQUOTED(ONEDRIVE_CLIENT_ID, $ONEDRIVE_CLIENT_ID)
12450 AC_DEFINE_UNQUOTED(ONEDRIVE_CLIENT_SECRET, $ONEDRIVE_CLIENT_SECRET)
12453 # ===================================================================
12454 # De- or increase default verbosity of build process
12455 # ===================================================================
12456 AC_MSG_CHECKING([build verbosity])
12457 if test -n "$enable_verbose"; then
12458 if test "$enable_verbose" = "yes"; then
12460 AC_MSG_RESULT([high])
12462 if test "$enable_verbose" = "no"; then
12464 AC_MSG_RESULT([low])
12467 AC_MSG_RESULT([not set])
12471 dnl ===================================================================
12472 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
12473 dnl --enable-dependency-tracking configure option
12474 dnl ===================================================================
12475 AC_MSG_CHECKING([whether to enable dependency tracking])
12476 if test "$enable_dependency_tracking" = "no"; then
12478 AC_MSG_RESULT([no])
12480 AC_MSG_RESULT([yes])
12484 dnl ===================================================================
12485 dnl Number of CPUs to use during the build
12486 dnl ===================================================================
12487 AC_MSG_CHECKING([for number of processors to use])
12488 # plain --with-parallelism is just the default
12489 if test -n "$with_parallelism" -a "$with_parallelism" != "yes"; then
12490 if test "$with_parallelism" = "no"; then
12493 PARALLELISM=$with_parallelism
12496 if test "$enable_icecream" = "yes"; then
12501 Darwin|FreeBSD|NetBSD|OpenBSD)
12502 PARALLELISM=`sysctl -n hw.ncpu`
12506 PARALLELISM=`getconf _NPROCESSORS_ONLN`
12508 # what else than above does profit here *and* has /proc?
12510 PARALLELISM=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
12514 # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
12515 # unexpected format, 'wc -l' will have returned 0 (and we won't use -j at all).
12519 if test "$no_parallelism_make" = "YES" && test $PARALLELISM -gt 1; then
12520 if test -z "$with_parallelism"; then
12521 AC_MSG_WARN([gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this.])
12522 add_warning "gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this."
12525 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."
12529 if test $PARALLELISM -eq 0; then
12530 AC_MSG_RESULT([explicit make -j option needed])
12532 AC_MSG_RESULT([$PARALLELISM])
12534 AC_SUBST(PARALLELISM)
12536 IWYU_PATH="$with_iwyu"
12537 AC_SUBST(IWYU_PATH)
12539 # Set up ILIB for MSVC build
12541 if test "$build_os" = "cygwin"; then
12543 if test -n "$JAVA_HOME" -a "$JAVA_HOME" != "NO_JAVA_HOME"; then
12544 ILIB="$ILIB;$JAVA_HOME/lib"
12546 if test "$BITNESS_OVERRIDE" = 64; then
12547 ILIB="$ILIB;$COMPATH/lib/amd64"
12548 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/x64"
12549 if test $WINDOWS_SDK_VERSION = 80 -o $WINDOWS_SDK_VERSION = 81; then
12550 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/x64"
12553 ILIB="$ILIB;$COMPATH/lib"
12554 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib"
12555 if test $WINDOWS_SDK_VERSION = 80 -o $WINDOWS_SDK_VERSION = 81; then
12556 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/x86"
12559 ILIB="$ILIB;$DOTNET_FRAMEWORK_HOME/lib"
12561 if test "$ENABLE_DIRECTX" = "TRUE" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
12562 ILIB="$ILIB;$DIRECTXSDK_LIB"
12568 # ===================================================================
12569 # Creating bigger shared library to link against
12570 # ===================================================================
12571 AC_MSG_CHECKING([whether to create huge library])
12574 if test $_os = iOS -o $_os = Android; then
12575 # Never any point in mergelibs for these as we build just static
12576 # libraries anyway...
12577 enable_mergelibs=no
12580 if test -n "$enable_mergelibs" -a "$enable_mergelibs" != "no"; then
12581 if test $_os != Linux -a $_os != WINNT; then
12582 add_warning "--enable-mergelibs is not tested for this platform"
12584 if test "$enable_mergelibs" = "all"; then
12587 AC_DEFINE(STATIC_LINKING)
12591 AC_MSG_RESULT([yes])
12593 AC_MSG_RESULT([no])
12595 AC_SUBST([MERGELIBS])
12596 AC_SUBST([URELIBS])
12598 # ===================================================================
12599 # Create hardlinks on deliver instead of copying for smaller size and speed up
12600 # ===================================================================
12601 AC_MSG_CHECKING([whether to create hardlinks for delivering files])
12603 if test "$enable_hardlink_deliver" = "yes"; then
12604 HARDLINKDELIVER="TRUE"
12605 AC_MSG_RESULT([yes])
12607 AC_MSG_RESULT([no])
12609 AC_SUBST(HARDLINKDELIVER)
12611 dnl ===================================================================
12612 dnl icerun is a wrapper that stops us spawning tens of processes
12613 dnl locally - for tools that can't be executed on the compile cluster
12614 dnl this avoids a dozen javac's ganging up on your laptop to kill it.
12615 dnl ===================================================================
12616 AC_MSG_CHECKING([whether to use icerun wrapper])
12618 if test "$enable_icecream" = "yes" && which icerun >/dev/null 2>&1 ; then
12619 ICECREAM_RUN=icerun
12620 AC_MSG_RESULT([yes])
12622 AC_MSG_RESULT([no])
12624 AC_SUBST(ICECREAM_RUN)
12626 dnl ===================================================================
12628 AC_MSG_CHECKING([MPL subset])
12631 if test "$enable_mpl_subset" = "yes"; then
12633 if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
12635 elif test "$ENABLE_REPORTBUILDER" = "TRUE"; then
12638 if test "$warn_report" = "true"; then
12639 AC_MSG_ERROR([need to --disable-report-builder - extended database report builder.])
12641 if test "x$enable_postgresql_sdbc" != "xno"; then
12642 AC_MSG_ERROR([need to --disable-postgresql-sdbc - the postgress database backend.])
12644 if test "$enable_lotuswordpro" = "yes"; then
12645 AC_MSG_ERROR([need to --disable-lotuswordpro - a Lotus Word Pro file format import filter.])
12647 if test "$WITH_WEBDAV" = "neon"; then
12648 AC_MSG_ERROR([need --with-webdav=serf or --without-webdav - webdav support.])
12650 if test "x$enable_ext_mariadb_connector" = "xyes"; then
12651 AC_MSG_ERROR([need to --disable-ext-mariadb-connector - mariadb/mysql support.])
12653 if test -n "$ENABLE_PDFIMPORT"; then
12654 if test "x$SYSTEM_POPPLER" != "x"; then
12655 AC_MSG_ERROR([need to disable PDF import via poppler or use system library])
12658 # cf. m4/libo_check_extension.m4
12659 if test "x$WITH_EXTRA_EXTENSIONS" != "x"; then
12660 AC_MSG_ERROR([need to disable extra extensions '$WITH_EXTRA_EXTENSIONS'])
12662 for theme in $WITH_THEMES; do
12664 crystal|default|hicontrast|human|oxygen|sifr)
12665 AC_MSG_ERROR([need to disable icon themes from '$WITH_THEMES': $theme present, use --with-theme=tango]) ;;
12672 if test "$enable_lpsolve" != "no" -o "x$ENABLE_LPSOLVE" = "xTRUE"; then
12673 AC_MSG_ERROR([need to --disable-lpsolve - calc linear programming solver.])
12677 AC_DEFINE(MPL_HAVE_SUBSET)
12678 AC_MSG_RESULT([only])
12680 AC_MSG_RESULT([no restrictions])
12682 AC_SUBST(MPL_SUBSET)
12685 dnl ===================================================================
12686 dnl Setting up the environment.
12687 dnl ===================================================================
12688 echo "setting up the build environment variables..."
12692 if test "$build_os" = "cygwin"; then
12693 if test "$DISABLE_ACTIVEX" = "TRUE"; then
12694 ATL_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE
12695 ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl"
12697 ATL_LIB="$COMPATH/atlmfc/lib"
12698 ATL_INCLUDE="$COMPATH/atlmfc/include"
12700 if test "$BITNESS_OVERRIDE" = 64; then
12701 ATL_LIB="$ATL_LIB/amd64"
12703 PathFormat "/usr/bin/grep.exe"
12704 WIN_GREP="$formatted_path"
12705 PathFormat "/usr/bin/find.exe"
12706 WIN_FIND="$formatted_path"
12707 PathFormat "/usr/bin/ls.exe"
12708 WIN_LS="$formatted_path"
12709 PathFormat "/usr/bin/touch.exe"
12710 WIN_TOUCH="$formatted_path"
12713 AC_SUBST(ATL_INCLUDE)
12718 AC_SUBST(WIN_TOUCH)
12720 AC_SUBST(BUILD_TYPE)
12725 PERL="$formatted_path"
12728 if test -n "$TMPDIR"; then
12729 TEMP_DIRECTORY="$TMPDIR"
12731 TEMP_DIRECTORY="/tmp"
12733 if test "$build_os" = "cygwin"; then
12734 TEMP_DIRECTORY=`cygpath -m "$TEMP_DIRECTORY"`
12736 AC_SUBST(TEMP_DIRECTORY)
12738 # setup the PATH for the environment
12739 if test -n "$LO_PATH_FOR_BUILD"; then
12740 LO_PATH="$LO_PATH_FOR_BUILD"
12746 aix*|dragonfly*|freebsd*|linux-gnu*|*netbsd*|openbsd*)
12747 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12748 pathmunge "$JAVA_HOME/bin" "after"
12753 # Win32 make needs native paths
12754 if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
12755 LO_PATH=`cygpath -p -m "$PATH"`
12757 pathmunge "$DOTNET_FRAMEWORK_HOME/bin" "before"
12758 pathmunge "$ASM_HOME" "before"
12759 pathmunge "$WINDOWS_SDK_HOME/bin" "before"
12760 pathmunge "$CSC_PATH" "before"
12761 pathmunge "$MIDL_PATH" "before"
12762 pathmunge "$AL_PATH" "before"
12763 pathmunge "$MSPDB_PATH" "before"
12764 if test -n "$MSBUILD_PATH" ; then
12765 pathmunge "$MSBUILD_PATH" "before"
12767 if test "$BITNESS_OVERRIDE" = 64; then
12768 pathmunge "$COMPATH/bin/amd64" "before"
12769 pathmunge "$WINDOWS_SDK_HOME/bin/x64" "before"
12771 pathmunge "$COMPATH/bin" "before"
12772 pathmunge "$WINDOWS_SDK_HOME/bin/x86" "before"
12774 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12775 if test -d "$JAVA_HOME/jre/bin/client"; then
12776 pathmunge "$JAVA_HOME/jre/bin/client" "before"
12778 if test -d "$JAVA_HOME/jre/bin/hotspot"; then
12779 pathmunge "$JAVA_HOME/jre/bin/hotspot" "before"
12781 pathmunge "$JAVA_HOME/bin" "before"
12786 pathmunge "/usr/css/bin" "before"
12787 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12788 pathmunge "$JAVA_HOME/bin" "after"
12793 pathmunge "$SRC_ROOT/solenv/bin" "before"
12794 pathmunge "." "before"
12799 # Generate a configuration md5 we can use for deps
12800 if test -f config_host.mk; then
12801 config_md5=`$MD5SUM config_host.mk | sed "s/ .*//"`
12804 AC_CONFIG_FILES([android/experimental/LOAndroid3/AndroidManifest.xml
12808 instsetoo_native/util/openoffice.lst
12809 sysui/desktop/macosx/Info.plist
12811 AC_CONFIG_HEADERS([config_host/config_buildid.h])
12812 AC_CONFIG_HEADERS([config_host/config_clang.h])
12813 AC_CONFIG_HEADERS([config_host/config_eot.h])
12814 AC_CONFIG_HEADERS([config_host/config_features.h])
12815 AC_CONFIG_HEADERS([config_host/config_folders.h])
12816 AC_CONFIG_HEADERS([config_host/config_gcc.h])
12817 AC_CONFIG_HEADERS([config_host/config_global.h])
12818 AC_CONFIG_HEADERS([config_host/config_graphite.h])
12819 AC_CONFIG_HEADERS([config_host/config_lgpl.h])
12820 AC_CONFIG_HEADERS([config_host/config_locales.h])
12821 AC_CONFIG_HEADERS([config_host/config_mpl.h])
12822 AC_CONFIG_HEADERS([config_host/config_orcus.h])
12823 AC_CONFIG_HEADERS([config_host/config_kde4.h])
12824 AC_CONFIG_HEADERS([config_host/config_mingw.h])
12825 AC_CONFIG_HEADERS([config_host/config_oox.h])
12826 AC_CONFIG_HEADERS([config_host/config_options.h])
12827 AC_CONFIG_HEADERS([config_host/config_test.h])
12828 AC_CONFIG_HEADERS([config_host/config_telepathy.h])
12829 AC_CONFIG_HEADERS([config_host/config_typesizes.h])
12830 AC_CONFIG_HEADERS([config_host/config_vcl.h])
12831 AC_CONFIG_HEADERS([config_host/config_vclplug.h])
12832 AC_CONFIG_HEADERS([config_host/config_version.h])
12833 AC_CONFIG_HEADERS([config_host/config_oauth2.h])
12836 if test "$CROSS_COMPILING" = TRUE; then
12837 (echo; echo export BUILD_TYPE_FOR_HOST=$BUILD_TYPE) >>config_build.mk
12840 # touch the config timestamp file
12841 if test ! -f config_host.mk.stamp; then
12842 echo > config_host.mk.stamp
12843 elif test "$config_md5" = `$MD5SUM config_host.mk | sed "s/ .*//"`; then
12844 echo "Configuration unchanged - avoiding scp2 stamp update"
12846 echo > config_host.mk.stamp
12850 if test "$STALE_MAKE" = "TRUE" -a "$build_os" = "cygwin"; then
12853 ****************************************************************************
12855 Your make version is known to be horribly slow, and hard to debug
12856 problems with. To get a reasonably functional make please do:
12858 to install a pre-compiled binary make for Win32
12860 mkdir -p /opt/lo/bin
12862 wget http://dev-www.libreoffice.org/bin/cygwin/make-85047eb-msvc.exe
12863 cp make-85047eb-msvc.exe make
12866 to install from source:
12867 place yourself in a working directory of you choice.
12869 git clone git://git.savannah.gnu.org/make.git
12871 [go to Start menu, click on "VS2012 x86 Native Tools Command Prompt"]
12872 set PATH=%PATH%;C:\Cygwin\bin
12873 cd .../path/to/make_git
12874 build_w32.bat --without-guile
12876 should result in a WinRel/gnumake.exe
12878 Then re-run autogen.sh
12880 Note: autogen.sh will try to use /opt/lo/bin/make if the environment variable GNUMAKE is not already defined.
12881 Alternatively, you can install the 'new' make where ever you want and make sure that `which make` finds it.
12887 ****************************************************************************
12897 if test $_os != WINNT -a "$CROSS_COMPILING" != TRUE; then
12899 After the build has finished, you can immediately run it using:
12900 instdir/program/soffice
12902 If you want to run the smoketest, issue:
12908 if test -f warn; then
12913 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: