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.3.0.0.beta1],[],[],[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
34 for pf_part in $formatted_path; do
35 if test -z "$pf_part1"; then
41 if test "$pf_conv_to_dos" = "yes"; then
42 formatted_path=`cygpath -d "$formatted_path"`
43 if test $? -ne 0; then
44 AC_MSG_ERROR([path conversion failed for "$1".])
47 fp_count_colon=`echo "$formatted_path" | $GREP -c "[:]"`
48 fp_count_slash=`echo "$formatted_path" | $GREP -c "[/]"`
49 if test "$fp_count_slash$fp_count_colon" != "00"; then
50 if test "$fp_count_colon" = "0"; then
51 formatted_path=`realpath "$formatted_path"`
52 if test $? -ne 0; then
53 AC_MSG_ERROR([realpath failed for "$1".])
56 formatted_path=`cygpath -m "$formatted_path"`
57 if test $? -ne 0; then
58 AC_MSG_ERROR([path conversion failed for "$1".])
66 # There appears to be no simple and portable method to get an absolute and
67 # canonical path, so we try creating the directory if does not exist and
68 # utilizing the shell and pwd.
71 test ! -e "$rel" && mkdir -p "$rel"
72 if test -d "$rel" ; then
73 cd "$rel" || AC_MSG_ERROR([absolute path resolution failed for "$rel".])
74 absolute_path="$(pwd)"
77 AC_MSG_ERROR([Failed to resolve absolute path. "$rel" does not exist or is not a directory.])
85 if test "$have_WARNINGS" = "no"; then
86 echo "*************************************" > warn
88 if which tput >/dev/null 2>/dev/null && test `tput colors` -ge 8; then
89 dnl <esc> as actual byte (U+1b), [ escaped using quadrigraph @<:@
90 COLORWARN='*
\e@<:@1;33;40m WARNING
\e@<:@0m:'
92 COLORWARN="* WARNING :"
95 echo "$COLORWARN $@" >> warn
98 echo "********************************************************************"
100 echo "* Running ${PACKAGE_NAME} build configuration."
102 echo "********************************************************************"
105 dnl ===================================================================
106 dnl checks build and host OSes
107 dnl do this before argument processing to allow for platform dependent defaults
108 dnl ===================================================================
111 AC_MSG_CHECKING([for product name])
112 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
113 PRODUCTNAME=AC_PACKAGE_NAME"Dev"
115 PRODUCTNAME=AC_PACKAGE_NAME
117 AC_MSG_RESULT([$PRODUCTNAME])
118 AC_SUBST(PRODUCTNAME)
120 dnl ===================================================================
121 dnl Our version is defined by the AC_INIT() at the top of this script.
122 dnl ===================================================================
124 set `echo AC_PACKAGE_VERSION | sed "s/\./ /g"`
126 LIBO_VERSION_MAJOR=$1
127 LIBO_VERSION_MINOR=$2
128 LIBO_VERSION_MICRO=$3
129 LIBO_VERSION_PATCH=$4
131 # The CFBundleShortVersionString in Info.plist consists of three integers, so encode the third
132 # as the micro version times 1000 plus the patch number. Unfortunately the LIBO_VERSION_SUFFIX can be anything so
133 # no way to encode that into an integer in general.
134 MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.`expr $LIBO_VERSION_MICRO '*' 1000 + $LIBO_VERSION_PATCH`
136 LIBO_VERSION_SUFFIX=$5
137 # Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently wanted separately in
138 # openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double brackets are for m4's sake,
139 # they get undoubled before actually passed to sed.
140 LIBO_VERSION_SUFFIX_SUFFIX=`echo "$LIBO_VERSION_SUFFIX" | sed -e 's/.*[[a-zA-Z0-9]]\([[^a-zA-Z0-9]]*\)$/\1/'`
141 test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUFFIX%${LIBO_VERSION_SUFFIX_SUFFIX}}"
142 # LIBO_VERSION_SUFFIX, if non-empty, should include the period separator
143 test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX"
145 AC_SUBST(LIBO_VERSION_MAJOR)
146 AC_SUBST(LIBO_VERSION_MINOR)
147 AC_SUBST(LIBO_VERSION_MICRO)
148 AC_SUBST(LIBO_VERSION_PATCH)
149 AC_SUBST(MACOSX_BUNDLE_SHORTVERSION)
150 AC_SUBST(LIBO_VERSION_SUFFIX)
151 AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX)
153 AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR)
154 AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR)
155 AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,$LIBO_VERSION_MICRO)
156 AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,$LIBO_VERSION_PATCH)
158 LIBO_THIS_YEAR=`date +%Y`
159 AC_DEFINE_UNQUOTED(LIBO_THIS_YEAR,$LIBO_THIS_YEAR)
161 # This UPD silly thing must go away soon
162 UPD="${LIBO_VERSION_MAJOR}${LIBO_VERSION_MINOR}0"
165 # This too should go away
166 SOURCEVERSION="OOO$UPD"
167 AC_SUBST(SOURCEVERSION)
169 dnl ===================================================================
171 dnl ===================================================================
172 AC_MSG_CHECKING([for product version])
173 PRODUCTVERSION="$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR"
174 AC_MSG_RESULT([$PRODUCTVERSION])
175 AC_SUBST(PRODUCTVERSION)
178 # AC_PROG_EGREP doesn't set GREP on all systems as well
179 AC_PATH_PROG(GREP, grep)
187 if test "$build_os" = "cygwin"; then
188 PathFormat "$SRC_ROOT"
189 SRC_ROOT="$formatted_path"
190 PathFormat "$BUILDDIR"
191 BUILDDIR="$formatted_path"
198 AC_DEFINE_UNQUOTED(SRCDIR,"$SRC_ROOT")
199 AC_DEFINE_UNQUOTED(BUILDDIR,"$BUILDDIR")
201 if test "z$EUID" = "z0" -a "`uname -o 2>/dev/null`" = "Cygwin"; then
202 AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account])
205 # need sed in os checks...
206 AC_PATH_PROGS(SED, sed)
207 if test -z "$SED"; then
208 AC_MSG_ERROR([install sed to run this script])
211 # Set the ENABLE_LTO variable
212 # ===================================================================
213 AC_MSG_CHECKING([whether to use link-time optimization])
214 if test -n "$enable_lto" -a "$enable_lto" != "no"; then
217 AC_DEFINE(STATIC_LINKING)
224 dnl ===================================================================
225 dnl When building for Android, --with-android-ndk,
226 dnl --with-android-ndk-toolchain-version and --with-android-sdk are
228 dnl ===================================================================
230 AC_ARG_WITH(android-ndk,
231 AS_HELP_STRING([--with-android-ndk],
232 [Specify location of the Android Native Development Kit. Mandatory when building for Android.]),
235 AC_ARG_WITH(android-ndk-toolchain-version,
236 AS_HELP_STRING([--with-android-ndk-toolchain-version],
237 [Specify which toolchain version to use, of those present in the
238 Android NDK you are using. Mandatory if the NDK used has several
239 toolchain versions for the host architecture you are building for.
240 Possible values are 4.6, 4.8, clang3.3 and clang3.4. Only 4.8 has been
241 tested for real...]), ,)
243 AC_ARG_WITH(android-sdk,
244 AS_HELP_STRING([--with-android-sdk],
245 [Specify location of the Android SDK. Mandatory when building for Android,
246 or when building the Impress Remote Android app.]),
250 if test -n "$with_android_ndk"; then
251 ANDROID_NDK_HOME=$with_android_ndk
253 # Set up a lot of pre-canned defaults
255 if test ! -f $ANDROID_NDK_HOME/RELEASE.TXT; then
256 AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT file in $ANDROID_NDK_HOME.])
258 ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_HOME/RELEASE.TXT`
260 case $ANDROID_NDK_VERSION in
264 AC_MSG_ERROR([Unsupported NDK version $ANDROID_NDK_VERSION, only r8* and r9* versions are supported])
268 if test $host_cpu = arm; then
270 android_platform_prefix=$android_cpu-linux-androideabi
271 elif test $host_cpu = mips; then
273 android_platform_prefix=$android_cpu-linux-androideabi
275 # host_cpu is something like "i386" or "i686" I guess, NDK uses
276 # "x86" in some contexts
278 android_platform_prefix=$android_cpu
281 case "$with_android_ndk_toolchain_version" in
283 ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-$with_android_ndk_toolchain_version
284 ANDROID_COMPILER_DIR=$ANDROID_BINUTILS_DIR
287 AC_MSG_WARN([Building with the Clang tool-chain is known to break in the bridges module, fix that please])
288 ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.8
289 ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm-${with_android_ndk_toolchain_version#clang}
290 ANDROID_USING_CLANG=true
293 AC_MSG_ERROR([Unrecognized value for the --with-android-ndk-toolchain-version option])
296 if test ! -d $ANDROID_BINUTILS_DIR; then
297 AC_MSG_ERROR([No directory $ANDROID_BINUTILS_DIR])
298 elif test $ANDROID_COMPILER_DIR != $ANDROID_BINUTILS_DIR -a ! -d $ANDROID_COMPILER_DIR; then
299 AC_MSG_ERROR([No directory $ANDROID_COMPILER_DIR])
302 # Check if there is a 64-bit tool-chain. Google provides a NDK with 64-bit tool-chain binaries in
303 # NDK r8e and later, and for earlier NDKs it was possible to build one yourself. Using a 64-bit
304 # linker is required if you compile large parts of the code with -g. A 32-bit linker just won't
305 # manage to link the (app-specific) single huge .so that is built for the apps in
306 # android/experimental/* if there is debug information in a significant part of the object files.
307 # (A 64-bit ld.gold grows to much over 10 gigabytes of virtual space when linking such a .so if
308 # all objects have been built with debug information.)
310 if test $build_os = linux-gnu; then
311 ANDROID_COMPILER_BIN=$ANDROID_COMPILER_DIR/prebuilt/linux-x86/bin
312 ANDROID_BINUTILS_PREBUILT_ROOT=$ANDROID_BINUTILS_DIR/prebuilt/linux-x86
313 if test $build_cpu = x86_64; then
314 if test -d $ANDROID_COMPILER_DIR/prebuilt/linux-x86_64; then
315 ANDROID_COMPILER_BIN=$ANDROID_COMPILER_DIR/prebuilt/linux-x86_64/bin
317 if test -d $ANDROID_BINUTILS_DIR/prebuilt/linux-x86_64; then
318 ANDROID_BINUTILS_PREBUILT_ROOT=$ANDROID_BINUTILS_DIR/prebuilt/linux-x86_64
321 ANDROID_BINUTILS_BIN=$ANDROID_BINUTILS_PREBUILT_ROOT/bin
324 # This stays empty if there is just one version of the toolchain in the NDK
325 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=
326 case "`echo $ANDROID_NDK_HOME/toolchains/$android_cpu*-*/prebuilt/*/bin`" in
328 # Trailing slash intentional and necessary, compare to how this is used
329 if test -n "$ANDROID_USING_CLANG"; then
330 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=4.8/
332 ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR="${with_android_ndk_toolchain_version}/"
337 if test $host_cpu = arm; then
338 android_gnu_prefix=arm-linux-androideabi
339 elif test $host_cpu = mips; then
340 android_gnu_prefix=mipsel-linux-android
341 elif test $ANDROID_NDK_VERSION = r8; then
342 # The prefix used for the x86 tool-chain changed between NDK r8 and r8b
343 android_gnu_prefix=i686-android-linux
345 android_gnu_prefix=i686-linux-android
348 test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-15/arch-$android_cpu
349 test -z "$AR" && AR=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-ar
350 test -z "$NM" && NM=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-nm
351 test -z "$OBJDUMP" && OBJDUMP=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-objdump
352 test -z "$RANLIB" && RANLIB=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-ranlib
353 test -z "$STRIP" && STRIP=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-strip
355 if test $host_cpu = arm; then
356 ANDROID_APP_ABI=armeabi-v7a
357 if test -n "$ANDROID_USING_CLANG"; then
358 ANDROIDCFLAGS="-gcc-toolchain $ANDROID_BINUTILS_PREBUILT_ROOT"
359 ANDROIDCFLAGS="$ANDROIDCFLAGS -target armv7-none-linux-androideabi"
360 ANDROIDCFLAGS="$ANDROIDCFLAGS -no-canonical-prefixes"
364 ANDROIDCFLAGS="$ANDROIDCFLAGS -mthumb"
365 ANDROIDCFLAGS="$ANDROIDCFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
366 elif test $host_cpu = mips; then
371 ANDROIDCFLAGS="-march=atom"
373 ANDROIDCFLAGS="$ANDROIDCFLAGS -ffunction-sections -fdata-sections"
374 ANDROIDCFLAGS="$ANDROIDCFLAGS -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/$ANDROID_APP_ABI"
375 ANDROIDCFLAGS="$ANDROIDCFLAGS --sysroot $ANDROID_NDK_HOME/platforms/android-15/arch-$android_cpu"
376 ANDROIDCFLAGS="$ANDROIDCFLAGS -Wl,--fix-cortex-a8"
378 if test -n "$ANDROID_USING_CLANG"; then
379 ANDROIDCFLAGS="$ANDROIDCFLAGS -Qunused-arguments"
381 ANDROIDCFLAGS="$ANDROIDCFLAGS -Wno-psabi"
384 # When using the 4.6 or newer toolchain, use the gold linker
385 case "$with_android_ndk_toolchain_version" in
386 4.[[6789]]*|[[56789]].*|clang*)
387 # The NDK doesn't have ld.gold for MIPS for some reason
388 if test "$host_cpu" != mips -a "$ENABLE_LTO" != TRUE; then
389 ANDROIDCFLAGS="$ANDROIDCFLAGS -fuse-ld=gold"
394 if test "$ENABLE_LTO" = TRUE; then
395 # -flto comes from com_GCC_degs.mk, too, but we need to make sure it gets passed as part of
396 # $CC and $CXX when building external libraries
397 ANDROIDCFLAGS="$ANDROIDCFLAGS -flto"
400 # gdbserver can be in different locations
401 if test -f $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver; then
402 ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver
403 elif test -f $ANDROID_NDK_HOME/prebuilt/android-$android_cpu/gdbserver/gdbserver; then
404 ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/prebuilt/android-$android_cpu/gdbserver/gdbserver
406 AC_MSG_ERROR([Can't find gdbserver for your Android target])
409 if test $host_cpu = arm; then
410 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"
411 elif test $host_cpu = mips; then
412 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"
414 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"
417 if test -z "$CC"; then
418 case "$with_android_ndk_toolchain_version" in
420 CC="$ANDROID_COMPILER_BIN/$android_gnu_prefix-gcc $ANDROIDCFLAGS"
423 CC="$ANDROID_COMPILER_BIN/clang $ANDROIDCFLAGS"
426 if test -z "$CXX"; then
427 case "$with_android_ndk_toolchain_version" in
429 CXX="$ANDROID_COMPILER_BIN/$android_gnu_prefix-g++ $ANDROIDCXXFLAGS"
432 CXX="$ANDROID_COMPILER_BIN/clang++ $ANDROIDCXXFLAGS"
437 AC_SUBST(ANDROID_NDK_GDBSERVER)
438 AC_SUBST(ANDROID_APP_ABI)
440 dnl ===================================================================
441 dnl Also --with-android-sdk is mandatory
442 dnl ===================================================================
444 if test -n "$with_android_sdk"; then
445 ANDROID_SDK_HOME=$with_android_sdk
446 PATH="$ANDROID_SDK_HOME/platform-tools:$ANDROID_SDK_HOME/tools:$PATH"
448 AC_SUBST(ANDROID_SDK_HOME)
450 dnl ===================================================================
451 dnl The following is a list of supported systems.
452 dnl Sequential to keep the logic very simple
453 dnl These values may be checked and reset later.
454 dnl ===================================================================
455 #defaults unless the os test overrides this:
463 # Default values, as such probably valid just for Linux, set
464 # differently below just for Mac OSX,but at least better than
465 # hardcoding these as we used to do. Much of this is duplicated also
466 # in solenv for old build system and for gbuild, ideally we should
467 # perhaps define stuff like this only here in configure.ac?
469 LINKFLAGSSHL="-shared"
473 LINKFLAGSNOUNDEFS="-Wl,-z,defs"
483 build_gstreamer_0_10=yes
490 dnl ===========================================================
491 dnl Check whether we're using Solaris 10 - SPARC or Intel.
492 dnl ===========================================================
493 AC_MSG_CHECKING([the Solaris operating system release])
494 _os_release=`echo $host_os | $SED -e s/solaris2\.//`
495 if test "$_os_release" -lt "10"; then
496 AC_MSG_ERROR([use Solaris >= 10 to build LibreOffice])
498 AC_MSG_RESULT([ok ($_os_release)])
501 dnl Check whether we're using a SPARC or i386 processor
502 AC_MSG_CHECKING([the processor type])
503 if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then
504 AC_MSG_RESULT([ok ($host_cpu)])
506 AC_MSG_ERROR([only SPARC and i386 processors are supported])
510 linux-gnu*|k*bsd*-gnu*)
513 build_gstreamer_0_10=yes
527 cygwin*|interix*|mingw32*)
529 # When building on Windows normally with MSVC under Cygwin,
530 # configure thinks that the host platform (the platform the
531 # built code will run on) is Cygwin, even if it obviously is
532 # Windows, which in Autoconf terminology is called
533 # "mingw32". (Which is misleading as MinGW is the name of the
534 # tool-chain, not an operating system.)
536 # Somewhat confusing, yes. But this configure script doesn't
537 # look at $host etc that much, it mostly uses its own $_os
538 # variable, set here in this case statement.
540 # When cross-compiling to Windows from Unix, the host platform
541 # is "mingw32" (because in that case it is the MinGW
542 # tool-chain that is used).
555 # If the host OS matches "mingw32*", that means we are using the
556 # MinGW cross-compiler, because we don't see the point in building
557 # LibreOffice using MinGW on Windows. If you want to build on
558 # Windows, use MSVC. If you want to use MinGW, surely you want to
559 # cross-compile (from Linux or some other Unix).
564 if test -z "$CC"; then
565 CC="$host_cpu-$host_vendor-$host_os-gcc"
567 if test -z "$CXX"; then
568 CXX="$host_cpu-$host_vendor-$host_os-g++"
574 darwin*) # Mac OS X or iOS
581 if test "$host_cpu" = "arm"; then
587 INSTROOTSUFFIX=/$PRODUCTNAME.app/Contents
588 SDKDIRNAME=AC_PACKAGE_NAME${PRODUCTVERSION}_SDK
591 # See comment above the case "$host_os"
592 LINKFLAGSSHL="-dynamiclib -single_module"
599 # -undefined error is the default
606 build_gstreamer_0_10=yes
611 AC_MSG_CHECKING([the FreeBSD operating system release])
612 if test -n "$with_os_version"; then
613 OSVERSION="$with_os_version"
615 OSVERSION=`/sbin/sysctl -n kern.osreldate`
617 AC_MSG_RESULT([found OSVERSION=$OSVERSION])
618 AC_MSG_CHECKING([which thread library to use])
619 if test "$OSVERSION" -lt "500016"; then
620 PTHREAD_CFLAGS="-D_THREAD_SAFE"
621 PTHREAD_LIBS="-pthread"
622 elif test "$OSVERSION" -lt "502102"; then
623 PTHREAD_CFLAGS="-D_THREAD_SAFE"
627 PTHREAD_LIBS="-pthread"
629 AC_MSG_RESULT([$PTHREAD_LIBS])
636 build_gstreamer_0_10=yes
641 PTHREAD_LIBS="-pthread -lpthread"
648 PTHREAD_LIBS=-pthread
657 PTHREAD_CFLAGS="-D_THREAD_SAFE"
658 PTHREAD_LIBS="-pthread"
665 build_gstreamer_0_10=yes
670 PTHREAD_LIBS="-pthread"
676 build_gstreamer_0_10=no
677 enable_lotuswordpro=no
678 enable_mpl_subset=yes
682 enable_report_builder=no
696 if test -z "$with_android_ndk"; then
697 AC_MSG_ERROR([the --with-android-ndk option is mandatory])
700 if test -z "$with_android_ndk_toolchain_version"; then
701 AC_MSG_ERROR([the --with-android-ndk-toolchain-version option is mandatory])
704 # Verify that the NDK and SDK options are proper
705 if test ! -f "$ANDROID_NDK_HOME/platforms/android-15/arch-arm/usr/lib/libc.a"; then
706 AC_MSG_ERROR([the --with-android-ndk option does not point to an Android NDK])
709 AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX)
710 BUILD_TYPE="$BUILD_TYPE FONTCONFIG FREETYPE"
714 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
718 if echo "$host_os" | grep -q linux-android || test "$enable_sdremote_android" = "yes"; then
719 if test -z "$with_android_sdk"; then
720 AC_MSG_ERROR([the --with-android-sdk option is mandatory])
723 if test ! -d "$ANDROID_SDK_HOME/platforms"; then
724 AC_MSG_ERROR([the --with-android-sdk option does not point to an Android SDK])
728 if test "$_os" = "AIX"; then
729 AC_PATH_PROG(GAWK, gawk)
730 if test -z "$GAWK"; then
731 AC_MSG_ERROR([gawk not found in \$PATH])
738 AC_SUBST(PTHREAD_CFLAGS)
739 AC_SUBST(PTHREAD_LIBS)
741 ###############################################################################
742 # Extensions switches --enable/--disable
743 ###############################################################################
744 # By default these should be enabled unless having extra dependencies.
745 # If there is extra dependency over configure options then the enable should
746 # be automagic based on whether the requiring feature is enabled or not.
747 # All this options change anything only with --enable-extension-integration.
749 # The name of this option and its help string makes it sound as if
750 # extensions are built anyway, just not integrated in the installer,
751 # if you use --disable-extension-integration. Is that really the
754 AC_ARG_ENABLE(extension-integration,
755 AS_HELP_STRING([--disable-extension-integration],
756 [Disable integration of the built extensions in the installer of the
757 product. Use this switch to disable the integration.])
760 AC_ARG_ENABLE(export,
761 AS_HELP_STRING([--disable-export],
762 [Disable (some) code for document export. Useful when building viewer-only apps that lack
763 save/export functionality, to avoid having an excessive amount of code and data used
764 only for exporrt linked in. Work in progress, use only if you are hacking on it.])
767 AC_ARG_ENABLE(avmedia,
768 AS_HELP_STRING([--disable-avmedia],
769 [Disable displaying and inserting AV media in documents. Work in progress, use only if you are hacking on it.])
772 AC_ARG_ENABLE(database-connectivity,
773 AS_HELP_STRING([--disable-database-connectivity],
774 [Disable various database connectivity. Work in progress, use only if you are hacking on it.])
777 # This doesn't mean not building (or "integrating") extensions
778 # (although it probably should; i.e. it should imply
779 # --disable-extension-integration I guess), it means not supporting
780 # any extension mechanism at all
781 AC_ARG_ENABLE(extensions,
782 AS_HELP_STRING([--disable-extensions],
783 [Disable all add-on extension functionality. Work in progress, use only if you are hacking on it.])
786 AC_ARG_ENABLE(scripting,
787 AS_HELP_STRING([--disable-scripting],
788 [Disable BASIC, Java and Python. Work in progress, use only if you are hacking on it.])
791 # This is mainly for Android and iOS, but could potentially be used in some
792 # special case otherwise, too, so factored out as a separate setting
794 AC_ARG_ENABLE(dynamic-loading,
795 AS_HELP_STRING([--disable-dynamic-loading],
796 [Disable any use of dynamic loading of code. Work in progress, use only if you are hacking on it.])
799 AC_ARG_ENABLE(ext-mariadb-connector,
800 AS_HELP_STRING([--enable-ext-mariadb-connector],
801 [Enable the build of the MariaDB/MySQL Connector extension.])
804 AC_ARG_ENABLE(report-builder,
805 AS_HELP_STRING([--disable-report-builder],
806 [Disable the Report Builder.])
809 AC_ARG_ENABLE(ext-wiki-publisher,
810 AS_HELP_STRING([--enable-ext-wiki-publisher],
811 [Enable the Wiki Publisher extension.])
814 AC_ARG_ENABLE(lpsolve,
815 AS_HELP_STRING([--disable-lpsolve],
816 [Disable compilation of the lp solve solver ])
818 AC_ARG_ENABLE(coinmp,
819 AS_HELP_STRING([--disable-coinmp],
820 [Disable compilation of the CoinMP solver ])
823 AC_ARG_ENABLE(pdfimport,
824 AS_HELP_STRING([--disable-pdfimport],
825 [Disable building the PDF import feature.])
828 ###############################################################################
830 dnl ---------- *** ----------
832 AC_ARG_ENABLE([hardlink-deliver],
833 AS_HELP_STRING([--enable-hardlink-deliver],
834 [Put files into deliver folder as hardlinks instead of copying them
835 over. Saves space and speeds up build.])
838 AC_ARG_ENABLE(mergelibs,
839 AS_HELP_STRING([--enable-mergelibs=<all/yes>],
840 [Enables linking of big, merged, library. Experimental feature, tested
841 only for Linux at some stage in history, but possibly does not work even
842 for Linux any more. 'all' will link a lot of libraries into libmerged
843 while 'yes' will do it for just a core set of libraries.])
846 AC_ARG_ENABLE(graphite,
847 AS_HELP_STRING([--enable-graphite],
848 [Enables the compilation of Graphite smart font rendering.])
852 AS_HELP_STRING([--enable-orcus],
853 [Enables orcus for extra file import filters for Calc.])
856 AC_ARG_ENABLE(fetch-external,
857 AS_HELP_STRING([--disable-fetch-external],
858 [Disables fetching external tarballs from web sources.])
861 AC_ARG_ENABLE(lockdown,
862 AS_HELP_STRING([--disable-lockdown],
863 [Disables the gconf integration work in LibreOffice.]),
867 AS_HELP_STRING([--disable-vba],
868 [Disables the vba compatibility feature.])
872 AS_HELP_STRING([--enable-pch],
873 [Enables precompiled header support for C++.])
876 AC_ARG_ENABLE(win-mozab-driver,
877 AS_HELP_STRING([--enable-win-mozab-driver],
878 [LibreOffice includes a driver to connect to Mozilla
879 address books under Windows, to build with this version, use this option.])
883 AS_HELP_STRING([--enable-epm],
884 [LibreOffice includes self-packaging code, that requires epm, however epm is
885 useless for large scale package building.])
889 AS_HELP_STRING([--disable-odk],
890 [LibreOffice includes an ODK, office development kit which some packagers may
891 wish to build without.])
894 AC_ARG_ENABLE(mpl-subset,
895 AS_HELP_STRING([--enable-mpl-subset],
896 [Don't compile any pieces which are not MPL or more liberally licensed])
899 AC_ARG_ENABLE(evolution2,
900 AS_HELP_STRING([--enable-evolution2],
901 [Allows the built-in evolution 2 addressbook connectivity build to be
905 AC_ARG_ENABLE(directx,
906 AS_HELP_STRING([--disable-directx],
907 [Remove DirectX implementation for the new XCanvas interface.
908 The DirectX support requires more stuff installed on Windows to
909 compile. (DirectX SDK, GDI+ libs)])
912 AC_ARG_ENABLE(activex,
913 AS_HELP_STRING([--disable-activex],
914 [Disable the use of ActiveX for a Windows build.
915 This switch is mandatory when using an Express edition of Visual Studio.])
919 AS_HELP_STRING([--disable-atl],
920 [Disable the use of ATL for a Windows build.])
922 This switch is mandatory when using an Express edition of Visual Studio.
927 AS_HELP_STRING([--enable-avahi],
928 [Determines whether to use Avahi to advertise Impress to remote controls.]),
931 AC_ARG_ENABLE(werror,
932 AS_HELP_STRING([--enable-werror],
933 [Turn warnings to errors. (Has no effect in modules where the treating
934 of warnings as errors is disabled explicitly.)]),
937 AC_ARG_ENABLE(assert-always-abort,
938 AS_HELP_STRING([--enable-assert-always-abort],
939 [make assert() abort even in release code.]),
942 AC_ARG_ENABLE(dbgutil,
943 AS_HELP_STRING([--enable-dbgutil],
944 [Provide debugging support from --enable-debug and include additional debugging
945 utilities such as object counting or more expensive checks.
946 This is the recommended option for developers.
947 Note that this makes the build ABI incompatible, it is not possible to mix object
948 files or libraries from a --enable-dbgutil and a --disable-dbgutil build.]))
951 AS_HELP_STRING([--enable-debug],
952 [Include debugging information, disable compiler optimization and inlining plus
953 extra debugging code like assertions. Extra large build! (enables -g compiler flag).]))
955 AC_ARG_ENABLE(selective-debuginfo,
956 AS_HELP_STRING([--enable-selective-debuginfo],
957 [If --enable-debug or --enable-dbgutil is used, build debugging information
958 (-g compiler flag) only for the specified gbuild build targets
959 (where all means everything, - prepended means not to enable, / appended means
960 everything in the directory; there is no ordering, more specific overrides
961 more general, and disabling takes precedence).
962 Example: --enable-selective-debuginfo="all -sw/ -Library_sc".]))
964 AC_ARG_ENABLE(symbols,
965 AS_HELP_STRING([--enable-symbols],
966 [Include debugging symbols in output while preserve optimization.
967 This enables -g compiler flag for GCC or equivalent,
968 without changing anything else compared to productive code.]))
970 AC_ARG_ENABLE(runtime-optimizations,
971 AS_HELP_STRING([--disable-runtime-optimizations],
972 [Statically disable certain runtime optimizations (like rtl/alloc.h or
973 JVM JIT) that are known to interact badly with certain dynamic analysis
974 tools (like -fsanitize=address or Valgrind). By default, disabled iff
975 CC contains "-fsanitize=address". (For Valgrind, those runtime
976 optimizations are typcially disabled dynamically via
977 RUNNING_ON_VALGRIND.)]))
979 AC_ARG_ENABLE(compiler-plugins,
980 AS_HELP_STRING([--enable-compiler-plugins],
981 [Enable compiler plugins that will perform additional checks during
982 building. Enabled automatically by --enable-dbgutil.]))
985 AS_HELP_STRING([--disable-ooenv],
986 [Disable ooenv for the instdir installation.]))
989 AS_HELP_STRING([--enable-lto],
990 [Enable link-time optimization. Suitable for (optimised) product builds. Building might take
991 longer but libraries and executables are optimized for speed. (For GCC, best to use GCC 4.6
992 or later and 'gold' linker. Works fine (and is turned on automatically in an optimising
993 build) for MSVC, otherwise experimental work in progress that shouldn't be used unless you
994 are working on it.)]))
996 AC_ARG_ENABLE(crashdump,
997 AS_HELP_STRING([--enable-crashdump],
998 [Enable the crashdump feature.]))
1000 AC_ARG_ENABLE(python,
1001 AS_HELP_STRING([--enable-python=<no/auto/system/internal/fully-internal>],
1002 [Enables or disables Python support at run-time and build-time.
1003 Also specifies what Python to use. 'auto' is the default.
1004 'fully-internal' even forces the internal version for uses of Python
1005 during the build (for testing purposes, mainly).]))
1008 AS_HELP_STRING([--disable-gtk],
1009 [Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available.]),
1013 AS_HELP_STRING([--enable-gtk3],
1014 [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
1017 AC_ARG_ENABLE(systray,
1018 AS_HELP_STRING([--disable-systray],
1019 [Determines whether to build the systray quickstarter.]),
1020 ,enable_systray=yes)
1022 AC_ARG_ENABLE(split-app-modules,
1023 AS_HELP_STRING([--enable-split-app-modules],
1024 [Split file lists for app modules, e.g. base, calc.
1025 Has effect only with make distro-pack-install]),
1028 AC_ARG_ENABLE(split-opt-features,
1029 AS_HELP_STRING([--enable-split-opt-features],
1030 [Split file lists for some optional features, .e.g. pyuno, testtool.
1031 Has effect only with make distro-pack-install]),
1034 AC_ARG_ENABLE(cairo-canvas,
1035 [ --disable-cairo-canvas Determines whether to build the Cairo canvas on
1036 platforms where Cairo is available.
1039 AC_ARG_ENABLE(opengl,
1040 AS_HELP_STRING([--disable-opengl],
1041 [Determines whether to build the OpenGL 3D slide transitions and canvas component.]))
1043 AC_ARG_ENABLE(opencl,
1044 AS_HELP_STRING([--disable-opencl],
1045 [Determines whether to build with OpenCL support.]))
1048 AS_HELP_STRING([--disable-dbus],
1049 [Determines whether to enable features that depend on dbus.
1050 e.g. Presentation mode screensaver control, bluetooth presentation control]),
1053 AC_ARG_ENABLE(packagekit,
1054 AS_HELP_STRING([--enable-packagekit],
1055 [Determines whether to enable features using packagekit.
1056 Right now that is auto font install]),
1059 AC_ARG_ENABLE(sdremote,
1060 AS_HELP_STRING([--disable-sdremote],
1061 [Determines whether to enable Impress remote control (i.e. the server component).]),
1062 ,enable_sdremote=yes)
1064 AC_ARG_ENABLE(sdremote-bluetooth,
1065 AS_HELP_STRING([--disable-sdremote-bluetooth],
1066 [Determines whether to build sdremote with bluetooth support.
1067 Requires dbus on Linux.]))
1069 AC_ARG_ENABLE(sdremote-android,
1070 AS_HELP_STRING([--enable-sdremote-android],
1071 [Determines whether to build the Impress Remote Android app -- requires
1072 a correctly configured android sdk.]),
1073 ,enable_sdremote_android=no)
1075 AC_ARG_ENABLE(gconf,
1076 AS_HELP_STRING([--disable-gconf],
1077 [Determines whether to use the GConf support.]),
1080 AC_ARG_ENABLE(gnome-vfs,
1081 AS_HELP_STRING([--enable-gnome-vfs],
1082 [Determines whether to use the Gnome Virtual Filing System on platforms
1083 where that VFS is available.]),
1084 ,enable_gnome_vfs=no)
1087 AS_HELP_STRING([--disable-gio],
1088 [Determines whether to use the GIO support.]),
1091 AC_ARG_ENABLE(telepathy,
1092 AS_HELP_STRING([--enable-telepathy],
1093 [Determines whether to enable Telepathy for collaboration.]),
1094 ,enable_telepathy=no)
1097 AS_HELP_STRING([--enable-tde],
1098 [Determines whether to use TQt/TDE vclplug on platforms where TQt and
1099 TDE are available.]),
1102 AC_ARG_ENABLE(tdeab,
1103 AS_HELP_STRING([--disable-tdeab],
1104 [Disable the TDE address book support.]),
1106 if test "$enable_tde" = "yes"; then
1112 AS_HELP_STRING([--enable-kde],
1113 [Determines whether to use Qt3/KDE3 vclplug on platforms where Qt3 and
1114 KDE3 are available.]),
1117 AC_ARG_ENABLE(kdeab,
1118 AS_HELP_STRING([--disable-kdeab],
1119 [Disable the KDE3 address book support.]),
1121 if test "$enable_kde" = "yes"; then
1127 AS_HELP_STRING([--enable-kde4],
1128 [Determines whether to use Qt4/KDE4 vclplug on platforms where Qt4 and
1129 KDE4 are available. May be used with --enable-kde if you want to support
1130 both KDE3 and KDE4.]),
1133 AC_ARG_ENABLE(headless,
1134 AS_HELP_STRING([--enable-headless],
1135 [Disable building of GUIs to reduce dependencies. Useful for
1136 server usage. Work in progress, use only if you are hacking on
1137 it. Not related to the --headless option.]), ,)
1139 AC_ARG_ENABLE(randr,
1140 AS_HELP_STRING([--disable-randr],
1141 [Disable RandR support in the vcl project.]),
1144 AC_ARG_ENABLE(randr-link,
1145 AS_HELP_STRING([--disable-randr-link],
1146 [Disable linking with libXrandr, instead dynamically open it at runtime.]),
1147 ,enable_randr_link=yes)
1149 AC_ARG_ENABLE(gstreamer,
1150 AS_HELP_STRING([--enable-gstreamer],
1151 [Enable building with the new gstreamer 1.0 avmedia backend.]),
1152 ,enable_gstreamer=no)
1154 AC_ARG_ENABLE(gstreamer-0-10,
1155 AS_HELP_STRING([--disable-gstreamer-0-10],
1156 [Disable building the gstreamer avmedia backend.]),
1157 ,enable_gstreamer_0_10=yes)
1160 AS_HELP_STRING([--enable-vlc],
1161 [Enable building with the VLC avmedia backend.]),
1165 AS_HELP_STRING([--disable-neon],
1166 [Disable neon and the compilation of webdav binding.]),
1169 AC_ARG_ENABLE([eot],
1170 [AS_HELP_STRING([--enable-eot],
1171 [Enable support for Embedded OpenType fonts.])],
1174 AC_ARG_ENABLE(cve-tests,
1175 AS_HELP_STRING([--disable-cve-tests],
1176 [Prevent CVE tests to be executed]),
1179 AC_ARG_ENABLE(chart-tests,
1180 AS_HELP_STRING([--enable-chart-tests],
1181 [Executes chart XShape tests]),
1184 AC_ARG_ENABLE(build-unowinreg,
1185 AS_HELP_STRING([--enable-build-unowinreg],
1186 [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
1187 compiler is needed on Linux.])
1189 Usage: --enable-build-unowinreg
1193 AC_ARG_ENABLE(verbose,
1194 AS_HELP_STRING([--enable-verbose],
1195 [Increase build verbosity.])[
1196 --disable-verbose Decrease build verbosity.],
1199 AC_ARG_ENABLE(dependency-tracking,
1200 AS_HELP_STRING([--enable-dependency-tracking],
1201 [Do not reject slow dependency extractors.])[
1202 --disable-dependency-tracking
1203 Disables generation of dependency information.
1204 Speed up one-time builds.],
1207 AC_ARG_ENABLE(icecream,
1208 AS_HELP_STRING([--enable-icecream],
1209 [Use the 'icecream' distributed compiling tool to speedup the compilation.
1210 It defaults to /opt/icecream for the location of the icecream gcc/g++
1211 wrappers, you can override that using --with-gcc-home=/the/path switch.]),
1215 AS_HELP_STRING([--disable-cups],
1216 [Do not build cups support.])
1219 AC_ARG_ENABLE(ccache,
1220 AS_HELP_STRING([--disable-ccache],
1221 [Do not try to use ccache automatically.
1222 By default, we will try to detect if ccache is available; in that case if
1223 CC/CXX are not yet set, and --enable-icecream is not given, we
1224 attempt to use ccache. --disable-ccache disables ccache completely.
1228 AC_ARG_ENABLE(64-bit,
1229 AS_HELP_STRING([--enable-64-bit],
1230 [Build a 64-bit LibreOffice on platforms where the normal build is 32-bit. Works fine for OS
1231 X. In other cases this option is experimental and possibly quite broken, use only if you are
1232 hacking on 64-bit support.]), ,)
1234 AC_ARG_ENABLE(extra-gallery,
1235 AS_HELP_STRING([--enable-extra-gallery],
1236 [Add extra gallery content.]),
1239 AC_ARG_ENABLE(extra-template,
1240 AS_HELP_STRING([--enable-extra-template],
1241 [Add extra template content.]),
1244 AC_ARG_ENABLE(extra-sample,
1245 AS_HELP_STRING([--enable-extra-sample],
1246 [Add extra sample content.]),
1249 AC_ARG_ENABLE(extra-font,
1250 AS_HELP_STRING([--enable-extra-font],
1251 [Add extra font content.]),
1254 AC_ARG_ENABLE(online-update,
1255 AS_HELP_STRING([--enable-online-update],
1256 [Enable the online update service that will check for new versions of
1257 LibreOffice. By default, it is on on Windows and Mac, and off on Linux.]),
1260 AC_ARG_ENABLE(release-build,
1261 AS_HELP_STRING([--enable-release-build],
1262 [Enable release build.
1263 See http://wiki.documentfoundation.org/DevBuild]),
1266 AC_ARG_ENABLE(windows-build-signing,
1267 AS_HELP_STRING([--enable-windows-build-signing],
1268 [Enable signing of windows binaries (*.exe, *.dll)]),
1271 AC_ARG_ENABLE(silent-msi,
1272 AS_HELP_STRING([--enable-silent-msi],
1273 [Enable MSI with LIMITUI=1 (silent install).]),
1276 AC_ARG_ENABLE(macosx-retina,
1277 AS_HELP_STRING([--enable-macosx-retina],
1278 [Declare the application as High Resolution Capable. (retina display)
1282 AC_ARG_ENABLE(macosx-code-signing,
1283 AS_HELP_STRING([--enable-macosx-code-signing<=identity>],
1284 [Sign executables, dylibs, frameworks and the app bundle. If you
1285 don't provide an identity the first suitable certificate
1286 in your keychain is used.]),
1289 AC_ARG_ENABLE(macosx-sandbox,
1290 AS_HELP_STRING([--enable-macosx-sandbox],
1291 [Make the app bundle run in a sandbox. Requires code signing.
1292 Is required by apps distributed in the Mac App Store, and implies
1293 adherence to App Store rules.]),
1296 AC_ARG_ENABLE(canonical-installation-tree-structure,
1297 AS_HELP_STRING([--enable-canonical-installation-tree-structure],
1298 [Make the installation tree structure be more canonical for
1299 the platform. Implemented only for OS X. Experimental and currently broken.]),
1303 AC_ARG_WITH(macosx-bundle-identifier,
1304 AS_HELP_STRING([--with-macosx-bundle-identifier=tld.mumble.orifice.TheOffice],
1305 [Define the OS X bundle identifier. Default is the somewhat weird
1306 org.libreoffice.script ("script", huh?).]),
1307 ,with_macosx_bundle_identifier=org.libreoffice.script)
1309 AC_ARG_ENABLE(libc++,
1310 AS_HELP_STRING([--enable-libc++],
1311 [Use the libc++ C++ library instead of GNU libstdc++ on OS X. Only effective
1312 if --with-macosx-version-min-required is 10.7 or later.]),
1315 AC_ARG_ENABLE(ios-simulator,
1316 AS_HELP_STRING([--enable-ios-simulator],
1317 [Build for the iOS Simulator, not iOS device.]),
1320 AC_ARG_ENABLE(readonly-installset,
1321 AS_HELP_STRING([--enable-readonly-installset],
1322 [Prevents any attempts by LibreOffice to write into its installation. That means
1323 at least that no "system-wide" extensions can be added. Experimental work in
1327 AC_ARG_ENABLE(postgresql-sdbc,
1328 AS_HELP_STRING([--disable-postgresql-sdbc],
1329 [Disable the build of the PostgreSQL-SDBC driver.])
1332 AC_ARG_ENABLE(lotuswordpro,
1333 AS_HELP_STRING([--disable-lotuswordpro],
1334 [Disable the build of the Lotus Word Pro filter.]),
1335 ,enable_lotuswordpro=yes)
1337 AC_ARG_ENABLE(firebird-sdbc,
1338 AS_HELP_STRING([--disable-firebird-sdbc],
1339 [Disable the build of the Firebird-SDBC driver if it doesn't compile for you.]),
1340 ,enable_firebird_sdbc=yes)
1342 AC_ARG_ENABLE(winegcc,
1343 AS_HELP_STRING([--enable-winegcc],
1344 [Enable use of winegcc during the build, in order to create msi* tools
1345 needed for MinGW cross-compilation.]),
1348 AC_ARG_ENABLE(liblangtag,
1349 AS_HELP_STRING([--disable-liblangtag],
1350 [Disable use of liblangtag, and instead use an own simple
1354 AC_ARG_ENABLE(bogus-pkg-config,
1355 AS_HELP_STRING([--enable-bogus-pkg-config],
1356 [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.]),
1359 AC_ARG_ENABLE(openssl,
1360 AS_HELP_STRING([--disable-openssl],
1361 [Disable using libssl/libcrypto from OpenSSL. If disabled,
1362 components will either use GNUTLS or NSS. Work in progress,
1363 use only if you are hacking on it.]),
1364 ,enable_openssl=yes)
1366 AC_ARG_ENABLE(library-bin-tar,
1367 AS_HELP_STRING([--enable-library-bin-tar],
1368 [Enable the building and reused of tarball of binary build for some 'external' libraries
1369 Some libraries can save their build result in a tarball
1370 stored in TARFILE_LOCATION. that binary tarball is
1371 uniquely identified by the source tarbal,
1372 the content of the config_host.mk file and the content
1373 of the top-level directory in core for that library
1374 If this option is enabled, then if such a tarfile exist, it will be untarred
1375 isntead of the source tarfile, and the build step will be skipped for that
1377 If a proper tarfile does not exist, then the normal source-based
1378 build is done for taht library and a proper binary tarfile is created
1379 for the next time.]),
1383 AS_HELP_STRING([--disable-gltf],
1384 [Determines whether to build libraries related to glTF 3D model rendering.]))
1386 dnl ===================================================================
1387 dnl Optional Packages (--with/without-)
1388 dnl ===================================================================
1390 AC_ARG_WITH(gnu-patch,
1391 AS_HELP_STRING([--with-gnu-patch],
1392 [Specify location of GNU patch on Solaris or FreeBSD.]),
1395 AC_ARG_WITH(build-platform-configure-options,
1396 [Specify options for the configure script run for the *build* platform in a cross-compilation])
1399 AS_HELP_STRING([--with-gnu-cp],
1400 [Specify location of GNU cp on Solaris or FreeBSD.]),
1403 AC_ARG_WITH(external-tar,
1404 AS_HELP_STRING([--with-external-tar=<TARFILE_PATH>],
1405 [Specify an absolute path of where to find (and store) tarfiles.]),
1406 TARFILE_LOCATION=$withval ,
1409 AC_ARG_WITH(referenced-git,
1410 AS_HELP_STRING([--with-referenced-git=<OTHER_CHECKOUT_DIR>],
1411 [Specify another checkout directory to reference. This makes use of
1412 git submodule update --reference, and saves a lot of diskspace
1413 when having multiple trees side-by-side.]),
1414 GIT_REFERENCE_SRC=$withval ,
1417 AC_ARG_WITH(linked-git,
1418 AS_HELP_STRING([--with-linked-git=<submodules repo basedir>],
1419 [Specify a directory where the repositories of submodules are located.
1420 This uses a method similar to git-new-workdir to get submodules.]),
1421 GIT_LINK_SRC=$withval ,
1424 AC_ARG_WITH(galleries,
1425 AS_HELP_STRING([--with-galleries],
1426 [Specify how galleries should be built. It is possible either to
1427 build these internally from source ("build"),
1428 or to disable them ("no")]),
1432 AS_HELP_STRING([--with-theme="theme1 theme2..."],
1433 [Choose which themes to include. By default those themes with an '*' are included.
1434 Possible choices: *crystal, *default (galaxy), *hicontrast, human, industrial, *oxygen, *sifr, *tango, *tango_testing.]),
1437 AC_ARG_WITH(helppack-integration,
1439 --without-helppack-integration It will not integrate the helppacks to the installer
1441 Please use this switch to use the online help or separate help packages.],
1445 AS_HELP_STRING([--without-fonts],
1446 [LibreOffice includes some third-party fonts to provide a reliable basis for
1447 help content, templates, samples, etc. When these fonts are already
1448 known to be available on the system then you should use this option.]),
1452 AS_HELP_STRING([--without-ppds],
1453 [Removes Postscript Printer definition files from LibreOffice
1454 installation set, for people building for specific distributions where
1455 PPDs are known to be already available (every recent distro with CUPS backend).]),
1459 AS_HELP_STRING([--with-epm],
1460 [Decides which epm to use. Default is to use the one from the system if
1461 one is built. When either this is not there or you say =internal epm
1465 AC_ARG_WITH(package-format,
1466 AS_HELP_STRING([--with-package-format],
1467 [Specify package format(s) for LibreOffice installation sets. The
1468 implicit --without-package-format leads to no installation sets being
1469 generated. Possible values: aix, archive, bsd, deb, dmg,
1470 installed, msi, native, osx, pkg, portable, and rpm.
1471 Example: --with-package-format='deb rpm']),
1475 AS_HELP_STRING([--with-tls],
1476 [Decides which TLS/SSL and cryptographic implementations to use for
1477 LibreOffice's code. Notice that this doesn't apply for depending
1478 libraries like "neon", for example. Default is to use OpenSSL
1479 although NSS is also possible. Notice that selecting NSS restricts
1480 the usage of OpenSSL in LO's code but selecting OpenSSL doesn't
1481 restrict by now the usage of NSS in LO's code. Possible values:
1482 openssl, nss. Example: --with-tls="nss"]),
1485 AC_ARG_WITH(system-libs,
1486 AS_HELP_STRING([--with-system-libs],
1487 [Use libraries already on system -- enables all --with-system-* flags.]),
1490 AC_ARG_WITH(system-headers,
1491 AS_HELP_STRING([--with-system-headers],
1492 [Use headers already on system -- enables all --with-system-* flags for
1493 external packages whose headers are the only entities used i.e.
1494 boost/vigra/odbc/sane-header(s).]),,
1495 [with_system_headers="$with_system_libs"])
1497 AC_ARG_WITH(system-jars,
1498 AS_HELP_STRING([--without-system-jars],
1499 [When building with --with-system-libs, also the needed jars are expected
1500 on the system. Use this to disable that]),,
1501 [with_system_jars="$with_system_libs"])
1503 AC_ARG_WITH(system-cairo,
1504 AS_HELP_STRING([--with-system-cairo],
1505 [Use cairo libraries already on system. Happens automatically for
1506 (implicit) --enable-gtk and for --enable-gtk3.]))
1508 AC_ARG_WITH(myspell-dicts,
1509 AS_HELP_STRING([--with-myspell-dicts],
1510 [Adds myspell dictionaries to the LibreOffice installation set]),
1513 AC_ARG_WITH(system-dicts,
1514 AS_HELP_STRING([--without-system-dicts],
1515 [Do not use dictionaries from system paths.]),
1518 AC_ARG_WITH(external-dict-dir,
1519 AS_HELP_STRING([--with-external-dict-dir],
1520 [Specify external dictionary dir.]),
1523 AC_ARG_WITH(external-hyph-dir,
1524 AS_HELP_STRING([--with-external-hyph-dir],
1525 [Specify external hyphenation pattern dir.]),
1528 AC_ARG_WITH(external-thes-dir,
1529 AS_HELP_STRING([--with-external-thes-dir],
1530 [Specify external thesaurus dir.]),
1533 AC_ARG_WITH(system-zlib,
1534 AS_HELP_STRING([--with-system-zlib],
1535 [Use zlib already on system.]),,
1536 [with_system_zlib=auto])
1538 AC_ARG_WITH(system-jpeg,
1539 AS_HELP_STRING([--with-system-jpeg],
1540 [Use jpeg already on system.]),,
1541 [with_system_jpeg=auto])
1543 AC_ARG_WITH(system-clucene,
1544 AS_HELP_STRING([--with-system-clucene],
1545 [Use clucene already on system.]),,
1546 [with_system_clucene="$with_system_libs"])
1548 AC_ARG_WITH(system-expat,
1549 AS_HELP_STRING([--with-system-expat],
1550 [Use expat already on system.]),,
1551 [with_system_expat="$with_system_libs"])
1553 AC_ARG_WITH(system-libxml,
1554 AS_HELP_STRING([--with-system-libxml],
1555 [Use libxml/libxslt already on system.]),,
1556 [with_system_libxml=auto])
1558 AC_ARG_WITH(system-icu,
1559 AS_HELP_STRING([--with-system-icu],
1560 [Use icu already on system.]),,
1561 [with_system_icu="$with_system_libs"])
1563 AC_ARG_WITH(system-ucpp,
1564 AS_HELP_STRING([--with-system-ucpp],
1565 [Use ucpp already on system.]),,
1568 AC_ARG_WITH(system-openldap,
1569 AS_HELP_STRING([--with-system-openldap],
1570 [Use the OpenLDAP LDAP SDK already on system.]),,
1571 [with_system_openldap="$with_system_libs"])
1573 AC_ARG_WITH(system-poppler,
1574 AS_HELP_STRING([--with-system-poppler],
1575 [Use system poppler (only needed for PDF import).]),,
1576 [with_system_poppler="$with_system_libs"])
1578 AC_ARG_WITH(system-apache-commons,
1579 AS_HELP_STRING([--with-system-apache-commons],
1580 [Use Apache commons libraries already on system.]),,
1581 [with_system_apache_commons="$with_system_jars"])
1583 AC_ARG_WITH(system-mariadb,
1584 AS_HELP_STRING([--with-system-mariadb],
1585 [Use MariaDB/MySQL libraries already on system, for building the MariaDB Connector/LibreOffice
1587 [with_system_mariadb="$with_system_libs"])
1589 AC_ARG_ENABLE(bundle-mariadb,
1590 AS_HELP_STRING([--enable-bundle-mariadb],
1591 [When using MariaDB/MySQL libraries already on system, bundle them with the MariaDB Connector/LibreOffice extension.])
1594 AC_ARG_WITH(system-mysql-cppconn,
1595 AS_HELP_STRING([--with-system-mysql-cppconn],
1596 [Use MySQL C++ Connector libraries already on system.]),,
1597 [with_system_mysql_cppconn="$with_system_libs"])
1599 AC_ARG_WITH(system-postgresql,
1600 AS_HELP_STRING([--with-system-postgresql],
1601 [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC
1602 driver. If pg_config is not in PATH, use PGCONFIG to point to it.]),,
1603 [with_system_postgresql="$with_system_libs"])
1605 AC_ARG_WITH(libpq-path,
1606 AS_HELP_STRING([--with-libpq-path],
1607 [Use this PostgreSQL C interface (libpq) installation for building
1608 the PostgreSQL-SDBC extension.])
1610 Usage: --with-libpq-path=<absolute path to
1611 your libpq installation>
1615 AC_ARG_WITH(system-firebird,
1616 AS_HELP_STRING([--with-system-firebird],
1617 [Use Firebird libraries already on system, for building the Firebird-SDBC
1618 driver. If fb_config is not in PATH, use FBCONFIG to point to it.]),,
1619 [with_system_firebird="$with_system_libs"])
1621 AC_ARG_WITH(system-hsqldb,
1622 AS_HELP_STRING([--with-system-hsqldb],
1623 [Use hsqldb already on system.]))
1625 AC_ARG_WITH(hsqldb-jar,
1626 AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
1627 [Specify path to jarfile manually.]),
1628 HSQLDB_JAR=$withval)
1630 AC_ARG_ENABLE(scripting-beanshell,
1631 AS_HELP_STRING([--disable-scripting-beanshell],
1632 [Disable support for scripts in BeanShell.]),
1636 AC_ARG_WITH(system-beanshell,
1637 AS_HELP_STRING([--with-system-beanshell],
1638 [Use beanshell already on system.]),,
1639 [with_system_beanshell="$with_system_jars"])
1641 AC_ARG_WITH(beanshell-jar,
1642 AS_HELP_STRING([--with-beanshell-jar=JARFILE],
1643 [Specify path to jarfile manually.]),
1646 AC_ARG_ENABLE(scripting-javascript,
1647 AS_HELP_STRING([--disable-scripting-javascript],
1648 [Disable support for scripts in JavaScript.]),
1652 AC_ARG_WITH(system-rhino,
1653 AS_HELP_STRING([--with-system-rhino],
1654 [Use rhino already on system.]),,)
1655 # [with_system_rhino="$with_system_jars"])
1656 # Above is not used as we have different debug interface
1657 # patched into internal rhino. This code needs to be fixed
1658 # before we can enable it by default.
1660 AC_ARG_WITH(rhino-jar,
1661 AS_HELP_STRING([--with-rhino-jar=JARFILE],
1662 [Specify path to jarfile manually.]),
1665 AC_ARG_WITH(commons-codec-jar,
1666 AS_HELP_STRING([--with-commons-codec-jar=JARFILE],
1667 [Specify path to jarfile manually.]),
1668 COMMONS_CODEC_JAR=$withval)
1670 AC_ARG_WITH(commons-lang-jar,
1671 AS_HELP_STRING([--with-commons-lang-jar=JARFILE],
1672 [Specify path to jarfile manually.]),
1673 COMMONS_LANG_JAR=$withval)
1675 AC_ARG_WITH(commons-httpclient-jar,
1676 AS_HELP_STRING([--with-commons-httpclient-jar=JARFILE],
1677 [Specify path to jarfile manually.]),
1678 COMMONS_HTTPCLIENT_JAR=$withval)
1680 AC_ARG_WITH(commons-logging-jar,
1681 AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
1682 [Specify path to jarfile manually.]),
1683 COMMONS_LOGGING_JAR=$withval)
1685 AC_ARG_WITH(system-jfreereport,
1686 AS_HELP_STRING([--with-system-jfreereport],
1687 [Use JFreeReport already on system.]),,
1688 [with_system_jfreereport="$with_system_jars"])
1690 AC_ARG_WITH(sac-jar,
1691 AS_HELP_STRING([--with-sac-jar=JARFILE],
1692 [Specify path to jarfile manually.]),
1695 AC_ARG_WITH(libxml-jar,
1696 AS_HELP_STRING([--with-libxml-jar=JARFILE],
1697 [Specify path to jarfile manually.]),
1698 LIBXML_JAR=$withval)
1700 AC_ARG_WITH(flute-jar,
1701 AS_HELP_STRING([--with-flute-jar=JARFILE],
1702 [Specify path to jarfile manually.]),
1705 AC_ARG_WITH(jfreereport-jar,
1706 AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
1707 [Specify path to jarfile manually.]),
1708 JFREEREPORT_JAR=$withval)
1710 AC_ARG_WITH(liblayout-jar,
1711 AS_HELP_STRING([--with-liblayout-jar=JARFILE],
1712 [Specify path to jarfile manually.]),
1713 LIBLAYOUT_JAR=$withval)
1715 AC_ARG_WITH(libloader-jar,
1716 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1717 [Specify path to jarfile manually.]),
1718 LIBLOADER_JAR=$withval)
1720 AC_ARG_WITH(libloader-jar,
1721 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1722 [Specify path to jarfile manually.]),
1723 LIBLOADER_JAR=$withval)
1725 AC_ARG_WITH(libformula-jar,
1726 AS_HELP_STRING([--with-libformula-jar=JARFILE],
1727 [Specify path to jarfile manually.]),
1728 LIBFORMULA_JAR=$withval)
1730 AC_ARG_WITH(librepository-jar,
1731 AS_HELP_STRING([--with-librepository-jar=JARFILE],
1732 [Specify path to jarfile manually.]),
1733 LIBREPOSITORY_JAR=$withval)
1735 AC_ARG_WITH(libfonts-jar,
1736 AS_HELP_STRING([--with-libfonts-jar=JARFILE],
1737 [Specify path to jarfile manually.]),
1738 LIBFONTS_JAR=$withval)
1740 AC_ARG_WITH(libserializer-jar,
1741 AS_HELP_STRING([--with-libserializer-jar=JARFILE],
1742 [Specify path to jarfile manually.]),
1743 LIBSERIALIZER_JAR=$withval)
1745 AC_ARG_WITH(libbase-jar,
1746 AS_HELP_STRING([--with-libbase-jar=JARFILE],
1747 [Specify path to jarfile manually.]),
1748 LIBBASE_JAR=$withval)
1750 AC_ARG_WITH(system-odbc,
1751 AS_HELP_STRING([--with-system-odbc],
1752 [Use the odbc headers already on system.]),,
1753 [with_system_odbc="$with_system_headers"])
1755 AC_ARG_WITH(system-sane,
1756 AS_HELP_STRING([--with-system-sane],
1757 [Use sane.h already on system.]),,
1758 [with_system_sane="$with_system_headers"])
1760 AC_ARG_WITH(system-bluez,
1761 AS_HELP_STRING([--with-system-bluez],
1762 [Use bluetooth.h already on system.]),,
1763 [with_system_bluez="$with_system_headers"])
1765 AC_ARG_WITH(system-mesa-headers,
1766 AS_HELP_STRING([--with-system-mesa-headers],
1767 [Use Mesa headers already on system.]),,
1768 [with_system_mesa_headers="$with_system_headers"])
1770 AC_ARG_WITH(system-curl,
1771 AS_HELP_STRING([--with-system-curl],
1772 [Use curl already on system.]),,
1773 [with_system_curl=auto])
1775 AC_ARG_WITH(system-boost,
1776 AS_HELP_STRING([--with-system-boost],
1777 [Use boost already on system.]),,
1778 [with_system_boost="$with_system_headers"])
1780 AC_ARG_WITH(system-glm,
1781 AS_HELP_STRING([--with-system-glm],
1782 [Use glm already on system.]),,
1783 [with_system_glm="$with_system_headers"])
1785 AC_ARG_WITH(system-vigra,
1786 AS_HELP_STRING([--with-system-vigra],
1787 [Use vigra already on system.]),,
1788 [with_system_vigra="$with_system_headers"])
1790 AC_ARG_WITH(system-hunspell,
1791 AS_HELP_STRING([--with-system-hunspell],
1792 [Use libhunspell already on system.]),,
1793 [with_system_hunspell="$with_system_libs"])
1795 AC_ARG_WITH(system-mythes,
1796 AS_HELP_STRING([--with-system-mythes],
1797 [Use mythes already on system.]),,
1798 [with_system_mythes="$with_system_libs"])
1800 AC_ARG_WITH(system-altlinuxhyph,
1801 AS_HELP_STRING([--with-system-altlinuxhyph],
1802 [Use ALTLinuxhyph already on system.]),,
1803 [with_system_altlinuxhyph="$with_system_libs"])
1805 AC_ARG_WITH(system-lpsolve,
1806 AS_HELP_STRING([--with-system-lpsolve],
1807 [Use lpsolve already on system.]),,
1808 [with_system_lpsolve="$with_system_libs"])
1810 AC_ARG_WITH(system-liblangtag,
1811 AS_HELP_STRING([--with-system-liblangtag],
1812 [Use liblangtag library already on system.]),,
1813 [with_system_liblangtag="$with_system_libs"])
1815 AC_ARG_WITH(system-npapi-headers,
1816 AS_HELP_STRING([--with-system-npapi-headers],
1817 [Use NPAPI headers provided by system instead of bundled ones. Used in
1818 extensions/source/nsplugin (ENABLE_NPAPI_INTO_BROWSER=TRUE) and
1819 extensions/source/plugin (ENABLE_NPAPI_FROM_BROWSER=TRUE)]),,
1820 [with_system_npapi_headers="$with_system_headers"]
1824 AS_HELP_STRING([--with-webdav],
1825 [Specify which library to use for webdav implementation.
1826 Possible values: "neon", "serf", "no". The default value is "neon".
1827 Example: --with-webdav="serf"]),
1828 WITH_WEBDAV=$withval,
1831 AC_ARG_WITH(linker-hash-style,
1832 AS_HELP_STRING([--with-linker-hash-style],
1833 [Use linker with --hash-style=<style> when linking shared objects.
1834 Possible values: "sysv", "gnu", "both". The default value is "gnu"
1835 if supported on the build system, and "sysv" otherwise.]))
1837 AC_ARG_WITH(jdk-home,
1838 AS_HELP_STRING([--with-jdk-home],
1839 [If you have installed JDK 1.3 or later on your system please supply the
1840 path here. Note that this is not the location of the java command but the
1841 location of the entire distribution.])
1843 Usage: --with-jdk-home=<absolute path to JDK home>
1848 AS_HELP_STRING([--with-help],
1849 [Enable the build of help. There is a special parameter "common" that
1850 can be used to bundle only the common part, .e.g help-specific icons.
1851 This is useful when you build the helpcontent separately.])
1853 Usage: --with-help build the entire local help
1854 --without-help no local help (default)
1855 --with-help=common bundle common files for the local
1856 help but do not build the whole help
1861 AS_HELP_STRING([--with-java],
1862 [Specify the name of the Java interpreter command. Typically "java"
1863 which is the default.
1865 To build without support for Java components, applets, accessibility
1866 or the XML filters written in Java, use --without-java or --with-java=no.])
1868 Usage: --with-java==<java command>
1871 [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
1875 AC_ARG_WITH(jvm-path,
1876 AS_HELP_STRING([--with-jvm-path],
1877 [Use a specific JVM search path at runtime.])
1879 Usage: --with-jvm-path=<absolute path to parent of jvm home>
1881 e. g.: --with-jvm-path=/usr/lib/
1882 to find JRE/JDK in /usr/lib/jvm/
1886 AC_ARG_WITH(ant-home,
1887 AS_HELP_STRING([--with-ant-home],
1888 [If you have installed Jakarta Ant on your system, please supply the path here.
1889 Note that this is not the location of the Ant binary but the location
1890 of the entire distribution.])
1892 Usage: --with-ant-home=<absolute path to Ant home>
1896 AC_ARG_WITH(export-validation,
1897 AS_HELP_STRING([--with-export-validation],
1898 [If you want the exported files to be validated. Right now limited to OOXML files in calc export tests.
1899 Note: You need an executable script officeotron that takes the path to the file.])
1901 Usage: --with-export-validation
1906 AS_HELP_STRING([--with-junit],
1907 [Specifies the JUnit 4 jar file to use for JUnit-based tests.
1908 --without-junit disables those tests. Not relevant in the --without-java case.])
1910 Usage: --with-junit=<absolute path to JUnit 4 jar>
1914 AC_ARG_WITH(perl-home,
1915 AS_HELP_STRING([--with-perl-home],
1916 [If you have installed Perl 5 Distribution, on your system, please
1917 supply the path here. Note that this is not the location of the Perl
1918 binary but the location of the entire distribution.])
1920 Usage: --with-perl-home=<abs. path to Perl 5 home>
1928 [Specifies the doxygen executable to use when generating ODK C/C++
1929 documentation. --without-doxygen disables generation of ODK C/C++
1930 documentation. Not relevant in the --disable-odk case.])
1932 Usage: --with-doxygen=<absolute path to doxygen executable>
1936 AC_ARG_WITH(visual-studio,
1937 AS_HELP_STRING([--with-visual-studio=<2012/2010/2013>],
1938 [Specify which Visual Studio version to use in case several are
1939 are installed. If not specified, the order of preference is
1940 2012, 2010, 2013 (including Express editions).])
1942 Usage: --with-visual-studio=<2012/2010/2013>
1946 AC_ARG_WITH(windows-sdk,
1947 AS_HELP_STRING([--with-windows-sdk=<6.0(A)/7.0(A)/7.1(A)/8.0(A)>],
1948 [Specify which Windows SDK, or "Windows Kit", version to use
1949 in case the one that came with the selected Visual Studio
1950 is not what you want for some reason. Note that not all compiler/SDK
1951 combinations are supported. The intent is that this option should not
1954 Usage: --with-windows-sdk=6.0(A)/7.0(A)/7.1(A)/8.0(A)>
1959 AS_HELP_STRING([--with-lang],
1960 [Use this option to build LibreOffice with additional UI language support.
1961 English (US) is always included by default.
1962 Separate multiple languages with space.
1963 For all languages, use --with-lang=ALL.])
1965 Usage: --with-lang="es sw tu cs sk"
1969 AC_ARG_WITH(locales,
1970 AS_HELP_STRING([--with-locales],
1971 [Use this option to limit the locale information built in.
1972 Separate multiple locales with space.
1973 Very experimental and might well break stuff.
1974 Just a desperate measure to shrink code and data size.
1975 By default all the locales available is included.
1976 This option is completely unrelated to --with-lang.])
1978 Affects also our character encoding conversion
1979 tables for encodings mainly targeted for a
1980 particular locale, like EUC-CN and EUC-TW for
1981 zh, ISO-2022-JP for ja.
1983 Affects also our add-on break iterator data for
1986 For the default, all locales, don't use this switch at all.
1987 Specifying just the language part of a locale means all matching
1988 locales will be included.
1990 Usage: --with-locales="en es pt fr zh kr ja"
1994 # Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
1996 AS_HELP_STRING([--with-krb5],
1997 [Enable MIT Kerberos 5 support in modules that support it.
1998 By default automatically enabled on platforms
1999 where a good system Kerberos 5 is available.]),
2003 AS_HELP_STRING([--with-gssapi],
2004 [Enable GSSAPI support in modules that support it.
2005 By default automatically enabled on platforms
2006 where a good system GSSAPI is available.]),
2009 dnl ===================================================================
2011 dnl ===================================================================
2013 AC_ARG_WITH(branding,
2014 AS_HELP_STRING([--with-branding],
2015 [Use given path to retrieve branding images set.])
2017 Search for intro.png about.svg and flat_logo.svg.
2018 If any is missing, default ones will be used instead.
2020 Search also progress.conf for progress
2021 settings on intro screen :
2023 PROGRESSBARCOLOR="255,255,255" Set color of
2024 progress bar. Comma separated RGB decimal values.
2025 PROGRESSSIZE="407,6" Set size of progress bar.
2026 Comma separated decimal values (width, height).
2027 PROGRESSPOSITION="61,317" Set position of progress
2028 bar from left,top. Comma separated decimal values.
2029 PROGRESSFRAMECOLOR="20,136,3" Set color of progress
2030 bar frame. Comma separated RGB decimal values.
2031 PROGRESSTEXTCOLOR="255,255,255" Set color of progress
2032 bar text. Comma separated RGB decimal values.
2033 PROGRESSTEXTBASELINE="287" Set vertical position of
2034 progress bar text from top. Decimal value.
2036 Default values will be used if not found.
2038 Usage: --with-branding=/path/to/images
2043 AC_ARG_WITH(extra-buildid,
2044 AS_HELP_STRING([--with-extra-buildid],
2045 [Show addition build identification in about dialog.])
2047 Usage: --with-extra-buildid="Tinderbox: Win-x86@6, Branch:master, Date:2012-11-26_00.29.34"
2053 AS_HELP_STRING([--with-vendor],
2054 [Set vendor of the build.])
2056 Usage: --with-vendor="John the Builder"
2060 AC_ARG_WITH(compat-oowrappers,
2061 AS_HELP_STRING([--with-compat-oowrappers],
2062 [Install oo* wrappers in parallel with
2063 lo* ones to keep backward compatibility.
2064 Has effect only with make distro-pack-install]),
2067 AC_ARG_WITH(os-version,
2068 AS_HELP_STRING([--with-os-version],
2069 [For FreeBSD users, use this option option to override the detected OSVERSION.])
2071 Usage: --with-os-version=<OSVERSION>
2075 AC_ARG_WITH(mingw-cross-compiler,
2076 AS_HELP_STRING([--with-mingw-cross-compiler],
2077 [Specify the MinGW cross-compiler to use.])
2079 Usage: --with-mingw-cross-compiler=<mingw32-g++ command>
2081 When building on the ODK on Unix and building unowinreg.dll,
2082 specify the MinGW C++ cross-compiler.
2086 AC_ARG_WITH(idlc-cpp,
2087 AS_HELP_STRING([--with-idlc-cpp],
2088 [Specify the C Preprocessor to use for idlc.])
2090 Usage: --with-idlc-cpp=cpp
2096 AC_ARG_WITH(build-version,
2097 AS_HELP_STRING([--with-build-version],
2098 [Allows the builder to add a custom version tag that will appear in the
2099 Help/About box for QA purposes.])
2101 Usage: --with-build-version="Built by Jim"
2103 with_build_version=$withval ,
2107 AS_HELP_STRING([--with-alloc],
2108 [Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
2109 Note that on FreeBSD/NetBSD system==jemalloc]),
2112 AC_ARG_WITH(sun-templates,
2113 AS_HELP_STRING([--with-sun-templates],
2114 [Integrate Sun template packages.]),
2117 AC_ARG_WITH(parallelism,
2118 AS_HELP_STRING([--with-parallelism],
2119 [Number of jobs to run simultaneously during build. Parallel builds can
2120 save a lot of time on multi-cpu machines. Defaults to the number of
2121 CPUs on the machine, unless you configure --enable-icecream - then to
2125 AC_ARG_WITH(all-tarballs,
2126 AS_HELP_STRING([--with-all-tarballs],
2127 [Download all external tarballs unconditionally]))
2129 AC_ARG_WITH(gdrive-client-id,
2130 AS_HELP_STRING([--with-gdrive-client-id],
2131 [Provides the client id of the application for OAuth2 authentication
2132 on Google Drive. If either this or --with-gdrive-client-secret is
2133 empty, the feature will be disabled]),
2136 AC_ARG_WITH(gdrive-client-secret,
2137 AS_HELP_STRING([--with-gdrive-client-secret],
2138 [Provides the client secret of the application for OAuth2
2139 authentication on Google Drive. If either this or
2140 --with-gdrive-client-id is empty, the feature will be disabled]),
2143 AC_ARG_WITH(alfresco-cloud-client-id,
2144 AS_HELP_STRING([--with-alfresco-cloud-client-id],
2145 [Provides the client id of the application for OAuth2 authentication
2146 on Alfresco Cloud. If either this or --with-alfresco-cloud-client-secret is
2147 empty, the feature will be disabled]),
2150 AC_ARG_WITH(alfresco-cloud-client-secret,
2151 AS_HELP_STRING([--with-alfresco-cloud-client-secret],
2152 [Provides the client secret of the application for OAuth2
2153 authentication on Alfresco Cloud. If either this or
2154 --with-alfresco-cloud-client-id is empty, the feature will be disabled]),
2157 dnl ===================================================================
2158 dnl Do we want to use pre-build binary tarball for recompile
2159 dnl ===================================================================
2161 if test "$enable_library_bin_tar" = "yes" ; then
2162 USE_LIBRARY_BIN_TAR=TRUE
2164 USE_LIBRARY_BIN_TAR=
2166 AC_SUBST(USE_LIBRARY_BIN_TAR)
2168 dnl ===================================================================
2169 dnl Test whether build target is Release Build
2170 dnl ===================================================================
2171 AC_MSG_CHECKING([whether build target is Release Build])
2172 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
2174 ENABLE_RELEASE_BUILD=
2176 AC_MSG_RESULT([yes])
2177 ENABLE_RELEASE_BUILD=TRUE
2179 AC_SUBST(ENABLE_RELEASE_BUILD)
2181 dnl ===================================================================
2182 dnl Test whether to sign Windows Build
2183 dnl ===================================================================
2184 AC_MSG_CHECKING([whether to sign windows build])
2185 if test "$enable_windows_build_signing" = "yes" -a "$_os" = "WINNT" -a "$WITH_MINGW" != "YES" ; then
2186 AC_MSG_RESULT([yes])
2187 WINDOWS_BUILD_SIGNING="TRUE"
2190 WINDOWS_BUILD_SIGNING="FALSE"
2192 AC_SUBST(WINDOWS_BUILD_SIGNING)
2194 dnl ===================================================================
2195 dnl MacOSX build and runtime environment options
2196 dnl ===================================================================
2198 AC_ARG_WITH(macosx-sdk,
2199 AS_HELP_STRING([--with-macosx-sdk],
2200 [Use a specific SDK for building.])
2202 Usage: --with-macosx-sdk=<version>
2204 e. g.: --with-macosx-sdk=10.6
2206 there are 3 options to control the MacOSX build:
2207 --with-macosx-sdk (refered as 'sdk' below)
2208 --with-macosx-version-min-required (refered as 'min' below)
2209 --with-macosx-version-max-allowed (refered as 'max' below)
2211 the connection between these value and the default they take is as follow:
2212 ( ? means not specified on the command line, s means the SDK version found,
2213 constraint: x <= y <= z)
2215 ==========================================
2216 command line || config result
2217 ==========================================
2218 min | max | sdk || min | max | sdk |
2219 ? | ? | ? || 10.6 | 10.s | 10.s |
2220 ? | ? | 10.x || 10.6 | 10.x | 10.x |
2221 ? | 10.x | ? || 10.6 | 10.s | 10.s |
2222 ? | 10.x | 10.y || 10.6 | 10.x | 10.y |
2223 10.x | ? | ? || 10.x | 10.s | 10.s |
2224 10.x | ? | 10.y || 10.x | 10.y | 10.y |
2225 10.x | 10.y | ? || 10.x | 10.y | 10.y |
2226 10.x | 10.y | 10.z || 10.x | 10.y | 10.z |
2229 see: http://developer.apple.com/library/mac/#technotes/tn2064/_index.html
2230 for a detailled technical explanation of these variables
2232 Note: MACOSX_DEPLOYMENT_TARGET will be set to the value of 'min'.
2234 Note that even if in theory using a --with-macosx-version-max-allowed
2235 (i.e. the MAC_OS_X_VERSION_MAX_ALLOWED macro) less than the SDK version
2236 should work, in practice Apple doesn't seem to test that, and at least
2237 compiling with -DMAC_OS_X_VERSION_MAX_ALLOWED=1060 against the 10.7 SDK
2238 fails in a couple of places. Just because of oversights in ifdefs in the SDK
2243 AC_ARG_WITH(macosx-version-min-required,
2244 AS_HELP_STRING([--with-macosx-version-min-required],
2245 [set the minimum OS version needed to run the built LibreOffice])
2247 Usage: --with-macosx-version-min-required=<version>
2249 e. g.: --with-macos-version-min-required=10.6
2250 see --with-macosx-sdk for more info
2254 AC_ARG_WITH(macosx-version-max-allowed,
2255 AS_HELP_STRING([--with-macosx-version-max-allowed],
2256 [set the maximum allowed OS version the LibreOffice compilation can use APIs from])
2258 Usage: --with-macosx-version-max-allowed=<version>
2260 e. g.: --with-macos-version-max-allowed=10.6
2261 see --with-macosx-sdk for more info
2266 dnl ===================================================================
2267 dnl options for stuff used during cross-compilation build
2268 dnl These are superseded by --with-build-platform-configure-options.
2269 dnl Or are they? Look for the complicated tests for "$cross_compiling" = "yes" -a \(
2270 dnl "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \)
2271 dnl far below. Could whoever understands MinGW cross-compilation clean up this please.
2272 dnl ===================================================================
2274 AC_ARG_WITH(system-boost-for-build,
2275 AS_HELP_STRING([--with-system-boost-for-build],
2276 [Use boost already on system for build tools (cross-compilation only).]))
2278 AC_ARG_WITH(system-cppunit-for-build,
2279 AS_HELP_STRING([--with-system-cppunit-for-build],
2280 [Use cppunit already on system for build tools (cross-compilation only).]))
2282 AC_ARG_WITH(system-expat-for-build,
2283 AS_HELP_STRING([--with-system-expat-for-build],
2284 [Use expat already on system for build tools (cross-compilation only).]))
2286 AC_ARG_WITH(system-icu-for-build,
2287 AS_HELP_STRING([--with-system-icu-for-build=yes/no/force],
2288 [Use icu already on system for build tools (cross-compilation only).]))
2290 AC_ARG_WITH(system-libxml-for-build,
2291 AS_HELP_STRING([--with-system-libxml-for-build],
2292 [Use libxml/libxslt already on system for build tools (cross-compilation only).]))
2295 dnl ===================================================================
2296 dnl check for required programs (grep, awk, sed, bash)
2297 dnl ===================================================================
2301 if test -n "$1"; then
2302 if test "$build_os" = "cygwin"; then
2304 new_path=`cygpath -u "$formatted_path"`
2308 if ! echo "$LO_PATH" | $EGREP -q "(^|:)$1($|:)"; then
2309 if test "$2" = "after"; then
2310 LO_PATH="$LO_PATH:$new_path"
2312 LO_PATH="$new_path:$LO_PATH"
2320 AC_PATH_PROG( AWK, $AWK)
2321 if test -z "$AWK"; then
2322 AC_MSG_ERROR([install awk to run this script])
2325 AC_PATH_PROG(BASH, bash)
2326 if test -z "$BASH"; then
2327 AC_MSG_ERROR([bash not found in \$PATH])
2331 AC_MSG_CHECKING([for GNU or BSD tar])
2332 for a in $GNUTAR gtar gnutar tar /usr/sfw/bin/gtar; do
2333 $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
2334 if test $? -eq 0; then
2339 AC_MSG_RESULT($GNUTAR)
2340 if test -z "$GNUTAR"; then
2341 AC_MSG_ERROR([not found. install GNU or BSD tar.])
2345 AC_MSG_CHECKING([for tar's option to strip components])
2346 $GNUTAR --help 2> /dev/null | egrep "bsdtar|strip-components" 2>&1 >/dev/null
2347 if test $? -eq 0; then
2348 STRIP_COMPONENTS="--strip-components"
2350 $GNUTAR --help 2> /dev/null | egrep "strip-path" 2>&1 >/dev/null
2351 if test $? -eq 0; then
2352 STRIP_COMPONENTS="--strip-path"
2354 STRIP_COMPONENTS="unsupported"
2357 AC_MSG_RESULT($STRIP_COMPONENTS)
2358 if test x$STRIP_COMPONENTS = xunsupported; then
2359 AC_MSG_ERROR([you need a tar that is able to strip components.])
2361 AC_SUBST(STRIP_COMPONENTS)
2363 dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
2364 dnl desktop OSes from "mobile" ones.
2366 dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
2367 dnl In other words, that when building for an OS that is not a
2368 dnl "desktop" one but a "mobile" one, we are always cross-compiling.
2370 dnl Note the direction of the implication; there is no assumption that
2371 dnl cross-compiling would imply a non-desktop OS.
2373 if test $_os != iOS -a $_os != Android; then
2374 BUILD_TYPE="$BUILD_TYPE DESKTOP"
2375 AC_DEFINE(HAVE_FEATURE_DESKTOP)
2376 AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
2380 if test "$enable_export" != no; then
2381 BUILD_TYPE="$BUILD_TYPE EXPORT"
2383 DISABLE_EXPORT='TRUE'
2384 SCPDEFS="$SCPDES -DDISABLE_EXPORT"
2386 AC_SUBST(DISABLE_EXPORT)
2388 # Whether to build "avmedia" functionality or not.
2389 # We probably don't want it for non-desktop.
2391 if test -z "$enable_avmedia"; then
2392 if test $_os != iOS -a $_os != Android; then
2397 if test "$enable_avmedia" = yes; then
2398 BUILD_TYPE="$BUILD_TYPE AVMEDIA"
2399 AC_DEFINE(HAVE_FEATURE_AVMEDIA)
2401 SCPDEFS="$SCPDEFS -DDISABLE_AVMEDIA"
2404 # Decide whether to build database connectivity stuff (including
2405 # Base) or not. We probably don't want to on non-desktop OSes.
2407 if test -z "$enable_database_connectivity"; then
2408 # --disable-database-connectivity is unfinished work in progress
2409 # and the iOS test app doesn't link if we actually try to use it.
2410 # if test $_os != iOS -a $_os != Android; then
2411 enable_database_connectivity=yes
2415 if test "$enable_database_connectivity" = yes; then
2416 BUILD_TYPE="$BUILD_TYPE DBCONNECTIVITY"
2417 AC_DEFINE(HAVE_FEATURE_DBCONNECTIVITY)
2420 if test -z "$enable_extensions"; then
2421 # For iOS and Android disable extensions unless specifically overridden with --enable-extensions.
2422 if test $_os != iOS -a $_os != Android; then
2423 enable_extensions=yes
2427 if test "$enable_extensions" = yes; then
2428 BUILD_TYPE="$BUILD_TYPE EXTENSIONS"
2429 AC_DEFINE(HAVE_FEATURE_EXTENSIONS)
2432 if test -z "$enable_scripting"; then
2433 # Disable scripting for iOS unless specifically overridden
2434 # with --enable-scripting.
2435 if test $_os != iOS; then
2436 enable_scripting=yes
2440 DISABLE_SCRIPTING=''
2441 if test "$enable_scripting" = yes; then
2442 BUILD_TYPE="$BUILD_TYPE SCRIPTING"
2444 DISABLE_SCRIPTING='TRUE'
2445 SCPDEFS="$SCPDEFS -DDISABLE_SCRIPTING"
2447 AC_SUBST(DISABLE_SCRIPTING)
2449 if test $_os = iOS -o $_os = Android; then
2450 # Disable dynamic_loading always for iOS and Android
2451 enable_dynamic_loading=no
2452 elif test -z "$enable_dynamic_loading"; then
2453 # Otherwise enable it unless speficically disabled
2454 enable_dynamic_loading=yes
2457 DISABLE_DYNLOADING=''
2458 if test "$enable_dynamic_loading" = yes; then
2459 BUILD_TYPE="$BUILD_TYPE DYNLOADING"
2461 DISABLE_DYNLOADING='TRUE'
2462 SCPDEFS="$SCPDEFS -DDISABLE_DYNLOADING"
2464 AC_SUBST(DISABLE_DYNLOADING)
2466 # remenber SYSBASE value
2469 dnl ===================================================================
2470 dnl Sort out various gallery compilation options
2471 dnl ===================================================================
2472 AC_MSG_CHECKING([how to build and package galleries])
2473 if test -n "${with_galleries}"; then
2474 if test "$with_galleries" = "build"; then
2475 WITH_GALLERY_BUILD=TRUE
2476 AC_MSG_RESULT([build from source images internally])
2477 elif test "$with_galleries" = "no"; then
2479 AC_MSG_RESULT([disable non-internal gallery build])
2481 AC_MSG_ERROR([unknown value --with-galleries=$with_galleries])
2484 if test $_os != iOS -a $_os != Android; then
2485 WITH_GALLERY_BUILD=TRUE
2486 AC_MSG_RESULT([internal src images for desktop])
2489 AC_MSG_RESULT([disable src imgage build])
2492 AC_SUBST(WITH_GALLERY_BUILD)
2494 dnl ===================================================================
2495 dnl Checks if ccache is available
2496 dnl ===================================================================
2497 if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
2498 case "%$CC%$CXX%" in
2499 # If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc),
2500 # assume that's good then
2501 *%ccache[[-_' ']]*|*/ccache[[-_' ']]*)
2502 AC_MSG_NOTICE([ccache seems to be included in a pre-defined CC and/or CXX])
2505 AC_PATH_PROG([CCACHE],[ccache],[not found])
2506 if test "$CCACHE" = "not found"; then
2509 # Need to check for ccache version: otherwise prevents
2510 # caching of the results (like "-x objective-c++" for Mac)
2511 if test $_os = Darwin -o $_os = iOS; then
2512 # Check ccache version
2513 AC_MSG_CHECKING([whether version of ccache is suitable])
2514 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2515 CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2516 if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
2517 AC_MSG_RESULT([yes, $CCACHE_VERSION])
2519 AC_MSG_RESULT([no, $CCACHE_VERSION])
2530 if test "$CCACHE" != ""; then
2531 ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
2532 ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
2533 if test "$ccache_size" = ""; then
2534 ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
2535 if test "$ccache_size" = ""; then
2538 # we could not determine the size or it was less than 1GB -> disable auto-ccache
2539 if test $ccache_size -lt 1024; then
2541 AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-productive: Disabling auto-ccache detection])
2542 add_warning "ccache's cache size is less than 1GB using it is counter-productive: auto-ccache detection disabled"
2544 # warn that ccache may be too small for debug build
2545 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
2546 add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
2549 if test $ccache_size -lt 5; then
2550 #warn that ccache may be too small for debug build
2551 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
2552 add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
2557 dnl ===================================================================
2558 dnl Checks for C compiler,
2559 dnl The check for the C++ compiler is later on.
2560 dnl ===================================================================
2561 if test "$_os" != "WINNT" -a "$WITH_MINGW" != "yes"; then
2563 AC_MSG_CHECKING([gcc home])
2564 if test -z "$with_gcc_home"; then
2565 if test "$enable_icecream" = "yes"; then
2566 if test -d "/usr/lib/icecc/bin"; then
2567 GCC_HOME="/usr/lib/icecc/"
2569 GCC_HOME="/opt/icecream/"
2572 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
2573 GCC_HOME_SET="false"
2576 GCC_HOME="$with_gcc_home"
2578 AC_MSG_RESULT($GCC_HOME)
2581 if test "$GCC_HOME_SET" = "true"; then
2582 if test -z "$CC"; then
2583 CC="$GCC_HOME/bin/gcc"
2585 if test -z "$CXX"; then
2586 CXX="$GCC_HOME/bin/g++"
2591 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
2592 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
2593 # AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that
2599 COMPATH=`dirname "$CC"`
2600 if test "$COMPATH" = "."; then
2601 AC_PATH_PROGS(COMPATH, $CC)
2602 dnl double square bracket to get single because of M4 quote...
2603 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`
2605 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`
2607 dnl ===================================================================
2609 dnl ===================================================================
2610 AC_MSG_CHECKING([whether to build with Java support])
2611 if test "$with_java" != "no"; then
2612 if test "$DISABLE_SCRIPTING" = TRUE; then
2613 AC_MSG_RESULT([no, overridden by --disable-scripting])
2617 AC_MSG_RESULT([yes])
2619 AC_DEFINE(HAVE_FEATURE_JAVA)
2626 AC_SUBST(ENABLE_JAVA)
2628 dnl ENABLE_JAVA="TRUE" if we want there to be *run-time* (and build-time) support for Java
2630 dnl ENABLE_JAVA="" indicate no Java support at all
2632 dnl ===================================================================
2633 dnl Export file validation
2634 dnl ===================================================================
2635 AC_MSG_CHECKING([whether to enable export file validation])
2636 if test "$with_export_validation" = yes; then
2637 AC_MSG_RESULT([yes])
2638 AC_DEFINE(HAVE_EXPORT_VALIDATION)
2643 dnl ===================================================================
2644 dnl Test the Solaris compiler version
2645 dnl ===================================================================
2646 if test "$_os" = "SunOS"; then
2647 if test "$CC" = "cc"; then
2648 AC_PATH_PROGS(_cc, cc)
2649 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
2650 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
2651 dnl cc -V outputs to standard error!!!!
2652 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'`
2653 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
2654 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
2655 if test "$_sunstudio_major" != "5"; then
2656 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2658 _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'`
2659 if test "$_sunstudio_minor" = "false"; then
2660 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2662 dnl compiler will do
2663 AC_MSG_RESULT([checked])
2670 dnl ===================================================================
2671 dnl Check OS X SDK and compiler
2672 dnl ===================================================================
2674 if test $_os = Darwin; then
2676 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
2683 # If no --with-macosx-sdk option is given, look for 10.6,
2684 # 10.7, 10.8 and 10.9 SDKs, in that order. If not found
2685 # in some default locations, try the xcode-select tool.
2686 # 10.5 must be specified explicitely to be considered
2688 # The intent is that for "most" Mac-based developers, a suitable
2689 # SDK will be found automatically without any configure options.
2691 # For developers still using old Xcode in /Developer, either
2692 # because it is the only Xcode they have, or they have that in
2693 # addition to Xcode 4 in /Applications/Xcode.app, the 10.5 SDK
2694 # or 10.6 SDK should be found.
2696 # For developers with a current Xcode, the lowest-numbered SDK
2699 AC_MSG_CHECKING([what Mac OS X SDK to use])
2701 if test -z "$with_macosx_sdk"; then
2702 if test -d /Developer/SDKs/MacOSX10.6.sdk; then
2703 with_macosx_sdk=10.6
2704 elif test -d /Developer-old/SDKs/MacOSX10.6.sdk; then
2705 with_macosx_sdk=10.6
2706 elif test -d /Xcode3/SDKs/MacOSX10.6.sdk; then
2707 with_macosx_sdk=10.6
2708 elif test -d /Developer/SDKs/MacOSX10.7.sdk; then
2709 with_macosx_sdk=10.7
2710 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; then
2711 with_macosx_sdk=10.6
2712 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"; then
2713 with_macosx_sdk=10.7
2714 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"; then
2715 with_macosx_sdk=10.8
2716 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; then
2717 with_macosx_sdk=10.9
2718 elif test -x /usr/bin/xcode-select; then
2719 xcodepath="`xcode-select -print-path`"
2720 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; then
2721 with_macosx_sdk=10.6
2722 elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"; then
2723 with_macosx_sdk=10.7
2724 elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"; then
2725 with_macosx_sdk=10.8
2726 elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; then
2727 with_macosx_sdk=10.9
2730 if test -z "$with_macosx_sdk"; then
2731 AC_MSG_ERROR([Could not figure out the location of a Mac OS X SDK and its version])
2735 case $with_macosx_sdk in
2737 MACOSX_SDK_VERSION=1050
2740 MACOSX_SDK_VERSION=1060
2743 MACOSX_SDK_VERSION=1070
2746 MACOSX_SDK_VERSION=1080
2749 MACOSX_SDK_VERSION=1090
2752 AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported values are 10.5--9])
2756 # Next find it (again, if we deduced its version above by finding
2757 # it... but we need to look for it once more in case
2758 # --with-macosx-sdk was given so that the above search did not
2760 if test -z "$MACOSX_SDK_PATH"; then
2761 case $with_macosx_sdk in
2763 if test -x /usr/bin/xcode-select; then
2764 xcodepath="`xcode-select -print-path`"
2765 if test -d "$xcodepath/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2766 MACOSX_SDK_PATH="$xcodepath/SDKs/MacOSX$with_macosx_sdk.sdk"
2768 elif test -d /Developer/SDKs/MacOSX10.5.sdk; then
2769 MACOSX_SDK_PATH=/Developer/SDKs/MacOSX10.5.sdk
2770 elif test -d /Developer-old/SDKs/MacOSX10.5.sdk; then
2771 MACOSX_SDK_PATH=/Developer-old/SDKs/MacOSX10.5.sdk
2772 elif test -d /Xcode3/SDKs/MacOSX10.5.sdk; then
2773 MACOSX_SDK_PATH=/Xcode3/SDKs/MacOSX10.5.sdk
2777 if test -d /Developer/SDKs/MacOSX10.6.sdk; then
2778 MACOSX_SDK_PATH=/Developer/SDKs/MacOSX10.6.sdk
2779 elif test -d /Developer-old/SDKs/MacOSX10.6.sdk; then
2780 MACOSX_SDK_PATH=/Developer-old/SDKs/MacOSX10.6.sdk
2781 elif test -d /Xcode3/SDKs/MacOSX10.6.sdk; then
2782 MACOSX_SDK_PATH=/Xcode3/SDKs/MacOSX10.6.sdk
2783 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2784 MACOSX_SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk
2785 elif test -x /usr/bin/xcode-select; then
2786 xcodepath="`xcode-select -print-path`"
2787 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2788 MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"
2793 if test -d /Developer/SDKs/MacOSX$with_macosx_sdk.sdk; then
2794 MACOSX_SDK_PATH=/Developer/SDKs/MacOSX$with_macosx_sdk.sdk
2795 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2796 MACOSX_SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk
2797 elif test -x /usr/bin/xcode-select; then
2798 xcodepath="`xcode-select -print-path`"
2799 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2800 MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"
2805 xcodepath="`xcode-select -print-path`"
2806 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2807 MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"
2811 if test -z "$MACOSX_SDK_PATH"; then
2812 AC_MSG_ERROR([Could not figure out the location of Mac OS X $with_macosx_sdk SDK])
2815 AC_MSG_RESULT([SDK $with_macosx_sdk at $MACOSX_SDK_PATH])
2817 if test "$with_macosx_version_min_required" = ""; then
2818 case $with_macosx_sdk in
2820 with_macosx_version_min_required="10.5";;
2822 with_macosx_version_min_required="10.6";;
2826 if test "$with_macosx_version_max_allowed" = ""; then
2827 with_macosx_version_max_allowed="$with_macosx_sdk"
2830 # export this so that "xcrun" invocations later return matching values
2831 DEVELOPER_DIR="${MACOSX_SDK_PATH%/SDKs*}"
2832 DEVELOPER_DIR="${DEVELOPER_DIR%/Platforms*}"
2833 export DEVELOPER_DIR
2834 FRAMEWORKSHOME="$MACOSX_SDK_PATH/System/Library/Frameworks"
2835 MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
2837 case "$with_macosx_version_min_required" in
2839 MAC_OS_X_VERSION_MIN_REQUIRED="1050"
2842 MAC_OS_X_VERSION_MIN_REQUIRED="1060"
2845 MAC_OS_X_VERSION_MIN_REQUIRED="1070"
2848 MAC_OS_X_VERSION_MIN_REQUIRED="1080"
2851 MAC_OS_X_VERSION_MIN_REQUIRED="1090"
2854 AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported values are 10.5--9])
2858 if test "$BITNESS_OVERRIDE" = ""; then
2859 case "$with_macosx_version_min_required" in
2861 case "$with_macosx_sdk" in
2865 AC_MSG_WARN([Building with a SDK > 10.5 possibly breaks 10.5 compatibility.])
2866 add_warning "Building with a SDK > 10.5 possibly breaks 10.5 compatibility."
2871 case "$with_macosx_sdk" in
2875 AC_MSG_WARN([Building with a SDK > 10.6 possibly breaks 10.6 compatibility. Do not use for the TDF build])
2876 add_warning "Building with a SDK > 10.6 possibly breaks 10.6 compatibility. Do not use for the TDF build"
2881 AC_MSG_WARN([Building with a minimum version requirement > 10.6 breaks 10.6 compatibility. Do not use for the TDF build])
2882 add_warning "Building with a minimum version requirement > 10.6 breaks 10.6 compatibility. Do not use for the TDF build"
2887 # If no CC and CXX environment vars, try to guess where the compiler is
2889 INSTALL_NAME_TOOL=install_name_tool
2890 if test -z "$save_CC"; then
2891 AC_MSG_CHECKING([what compiler to use])
2892 case $with_macosx_sdk in
2894 if test "$enable_libc__" = yes; then
2895 AC_MSG_ERROR([--enable-libc++ requires --with-macosx-version-min-required >= 10.7])
2897 CC="${gccprefix}gcc-4.2 $arch -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2898 CXX="${gccprefix}g++-4.2 $arch -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2899 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
2902 if test "$enable_libc__" = yes; then
2903 AC_MSG_ERROR([--enable-libc++ requires --with-macosx-version-min-required >= 10.7])
2905 # did someone copy her 10.6 sdk into xcode 4 (needed on Mountain Lion)?
2906 if test "$(echo $MACOSX_SDK_PATH | cut -c1-23)" = "/Applications/Xcode.app"; then
2907 CC="`xcrun -find gcc` $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2908 CXX="`xcrun -find g++` $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2910 CC="gcc-4.2 $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2911 CXX="g++-4.2 $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2913 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
2917 if test "$enable_libc__" = yes; then
2918 if test "$with_macosx_version_min_required" = 10.6; then
2919 AC_MSG_ERROR([--enable-libc++ requires --with-macosx-version-min-required >= 10.7])
2921 # Use libc++ instead of libstdc++ when possible
2922 stdlib=-stdlib=libc++
2924 if test "$ENABLE_LTO" = TRUE; then
2927 CC="`xcrun -find clang` $bitness $lto -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2928 CXX="`xcrun -find clang++` $bitness $lto $stdlib -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2929 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
2932 STRIP=`xcrun -find strip`
2933 LIBTOOL=`xcrun -find libtool`
2934 RANLIB=`xcrun -find ranlib`
2937 AC_MSG_RESULT([$CC and $CXX])
2940 case "$with_macosx_version_max_allowed" in
2942 MAC_OS_X_VERSION_MAX_ALLOWED="1050"
2945 MAC_OS_X_VERSION_MAX_ALLOWED="1060"
2948 MAC_OS_X_VERSION_MAX_ALLOWED="1070"
2951 MAC_OS_X_VERSION_MAX_ALLOWED="1080"
2954 MAC_OS_X_VERSION_MAX_ALLOWED="1090"
2957 AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.5--9])
2961 AC_MSG_CHECKING([that macosx-version-min-required is coherent with macosx-version-max-allowed])
2962 if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED; then
2963 AC_MSG_ERROR([the version minimumn required must be inferior or equal to the version maximum allowed])
2968 AC_MSG_CHECKING([that macosx-version-max-allowed is coherent with macos-with-sdk])
2969 if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $MACOSX_SDK_VERSION; then
2970 AC_MSG_ERROR([the version maximum allowed cannot be greater thatn the sdk level])
2974 AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED])
2975 AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED])
2977 AC_MSG_CHECKING([whether to do code signing])
2979 if test "$enable_macosx_code_signing" = yes; then
2980 # By default use the first suitable certificate (?).
2982 # http://stackoverflow.com/questions/13196291/difference-between-mac-developer-and-3rd-party-mac-developer-application
2983 # says that the "Mac Developer" certificate is useful just for self-testing. For distribution
2984 # outside the Mac App Store, use the "Developer ID Application" one, and for distribution in
2985 # the App Store, the "3rd Party Mac Developer" one. I think it works best to the the
2986 # "Developer ID Application" one.
2988 identity=`security find-identity -p codesigning -v 2>/dev/null | grep 'Developer ID Application:' | $AWK '{print $2}' |head -1`
2989 if test -n "$identity"; then
2990 MACOSX_CODESIGNING_IDENTITY=$identity
2991 pretty_name=`security find-identity -p codesigning -v | grep "$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
2992 AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
2994 elif test -n "$enable_macosx_code_signing" -a "$enable_macosx_code_signing" != no ; then
2995 MACOSX_CODESIGNING_IDENTITY=$enable_macosx_code_signing
2996 pretty_name=`security find-identity -p codesigning -v | grep "$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
2997 AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
3002 AC_MSG_CHECKING([whether to sandbox the application])
3004 if test -z "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = yes; then
3005 AC_MSG_ERROR([OS X sandboxing requires code signing])
3006 elif test -n "$ENABLE_JAVA" -a "$enable_macosx_sandbox" = yes; then
3007 AC_MSG_ERROR([OS X sandboxing (actually App Store rules) disallows use of Java])
3008 elif test -n "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = yes; then
3009 ENABLE_MACOSX_SANDBOX=TRUE
3010 AC_DEFINE(HAVE_FEATURE_MACOSX_SANDBOX)
3011 AC_MSG_RESULT([yes])
3016 AC_MSG_CHECKING([what OS X app bundle identifier to use])
3018 MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier
3020 AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER])
3022 AC_MSG_CHECKING([build with mac retina support])
3023 if test "$enable_macosx_retina" = yes ; then
3024 MACOSX_HIGH_RESOLUTION_VALUE=true
3026 MACOSX_HIGH_RESOLUTION_VALUE=false
3028 AC_MSG_RESULT([$MACOSX_HIGH_RESOLUTION_VALUE])
3030 AC_SUBST(MACOSX_SDK_PATH)
3031 AC_SUBST(MACOSX_SDK_VERSION)
3032 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
3033 AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
3034 AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED)
3035 AC_SUBST(INSTALL_NAME_TOOL)
3036 AC_SUBST(LIBTOOL) # Note that the OS X libtool command is unrelated to GNU libtool
3037 AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
3038 AC_SUBST(ENABLE_MACOSX_SANDBOX)
3039 AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
3040 AC_SUBST(MACOSX_HIGH_RESOLUTION_VALUE)
3042 dnl ===================================================================
3043 dnl Check iOS SDK and compiler
3044 dnl ===================================================================
3046 if test $_os = iOS; then
3048 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
3054 AC_MSG_CHECKING([what iOS SDK to use])
3056 if test "$enable_ios_simulator" = yes; then
3057 platform=iPhoneSimulator
3062 xcode_developer=`xcode-select -print-path`
3065 for sdkver in 7.1 7.0 6.1 6.0; do
3066 t=$xcode_developer/Platforms/$platform.platform/Developer/SDKs/$platform$sdkver.sdk
3074 if test -z "$sysroot"; then
3075 AC_MSG_ERROR([Could not find iOS SDK, expected something like $xcode_developer/Platforms/$platform.platform/Developer/SDKs/${platform}${pref_sdk_ver}])
3078 AC_MSG_RESULT($sysroot)
3080 if test "$enable_ios_simulator" = yes; then
3081 if test "$BITNESS_OVERRIDE" = 64; then
3083 versionmin=-mios-simulator-version-min=7.0
3088 versionmin=-mios-simulator-version-min=6.1
3091 versionmin=-mmacosx-version-min=10.7
3097 if test "$BITNESS_OVERRIDE" = 64; then
3099 versionmin=-miphoneos-version-min=7.0
3102 versionmin=-miphoneos-version-min=6.1
3106 # LTO is not really recommended for iOS builds,
3107 # the link time will be astronomical
3108 if test "$ENABLE_LTO" = TRUE; then
3111 # Just add -fvisibility=hidden to CC and CXX directly so that the 3rd-party libs also
3112 # get compiled with it, to avoid ld warnings when linking all that together into one
3115 # Use libc++ for iOS 7 SDK and libstdc++ for earlier (but we don't really expect anybody to
3116 # be be using an earlier SDK)
3118 XCODE_CLANG_CXX_LIBRARY=libstdc++
3121 if test "$enable_libc__" = yes; then
3122 AC_MSG_ERROR([--enable-libc++ requires using Xcode 5 and iOS SDK 7 or newer it seems])
3126 if test "$enable_libc__" = no; then
3127 AC_MSG_ERROR([--disable-libc++ not allowed])
3129 XCODE_CLANG_CXX_LIBRARY=libc++
3133 stdlib="-stdlib=$XCODE_CLANG_CXX_LIBRARY"
3135 CC="`xcrun -find clang` -arch $XCODE_ARCHS -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
3136 CXX="`xcrun -find clang++` -arch $XCODE_ARCHS -fvisibility=hidden $stdlib -isysroot $sysroot $lto $versionmin"
3138 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
3141 STRIP=`xcrun -find strip`
3142 LIBTOOL=`xcrun -find libtool`
3143 RANLIB=`xcrun -find ranlib`
3146 AC_SUBST(XCODE_CLANG_CXX_LIBRARY)
3147 AC_SUBST(XCODE_ARCHS)
3149 AC_MSG_CHECKING([whether to treat the installation as read-only])
3151 if test \( -z "$enable_readonly_installset" -a "$ENABLE_MACOSX_SANDBOX" = TRUE \) -o \
3152 "$enable_extensions" != yes; then
3153 enable_readonly_installset=yes
3155 if test "$enable_readonly_installset" = yes; then
3156 AC_MSG_RESULT([yes])
3157 AC_DEFINE(HAVE_FEATURE_READONLY_INSTALLSET)
3162 dnl ===================================================================
3163 dnl Structure of install set
3164 dnl ===================================================================
3166 if test $_os = Darwin -a "$enable_canonical_installation_tree_structure" = yes; then
3167 LIBO_BIN_FOLDER=MacOS
3168 LIBO_ETC_FOLDER=Resources
3169 LIBO_LIBEXEC_FOLDER=MacOS
3170 LIBO_LIB_FOLDER=Frameworks
3171 LIBO_SHARE_FOLDER=Resources
3172 LIBO_SHARE_HELP_FOLDER=Resources/help
3173 LIBO_SHARE_JAVA_FOLDER=Resources/java
3174 LIBO_SHARE_PRESETS_FOLDER=Resources/presets
3175 LIBO_LIB_PYUNO_FOLDER=Resources
3176 LIBO_SHARE_RESOURCE_FOLDER=Resources/resource
3177 LIBO_SHARE_SHELL_FOLDER=Resources/shell
3178 LIBO_URE_BIN_FOLDER=MacOS
3179 LIBO_URE_ETC_FOLDER=Resources/ure/etc
3180 LIBO_URE_LIB_FOLDER=Frameworks
3181 LIBO_URE_SHARE_FOLDER=Resources/ure/share
3182 LIBO_URE_SHARE_JAVA_FOLDER=Resources/java
3183 ENABLE_MACOSX_MACLIKE_APP_STRUCTURE=TRUE
3184 AC_DEFINE(HAVE_FEATURE_MACOSX_MACLIKE_APP_STRUCTURE)
3185 elif test $_os = Darwin; then
3186 LIBO_BIN_FOLDER=MacOS
3187 LIBO_ETC_FOLDER=MacOS
3188 LIBO_LIBEXEC_FOLDER=MacOS
3189 LIBO_LIB_FOLDER=MacOS
3190 LIBO_LIB_PYUNO_FOLDER=MacOS
3191 LIBO_SHARE_FOLDER=share
3192 LIBO_SHARE_HELP_FOLDER=help
3193 LIBO_SHARE_JAVA_FOLDER=MacOS/classes
3194 LIBO_SHARE_PRESETS_FOLDER=presets
3195 LIBO_SHARE_RESOURCE_FOLDER=MacOS/resource
3196 LIBO_SHARE_SHELL_FOLDER=MacOS/shell
3197 LIBO_URE_BIN_FOLDER=ure-link/bin
3198 LIBO_URE_ETC_FOLDER=ure-link/lib
3199 LIBO_URE_LIB_FOLDER=ure-link/lib
3200 LIBO_URE_SHARE_FOLDER=ure-link/share
3201 LIBO_URE_SHARE_JAVA_FOLDER=ure-link/share/java
3202 elif test $_os = WINNT; then
3203 LIBO_BIN_FOLDER=program
3204 LIBO_ETC_FOLDER=program
3205 LIBO_LIBEXEC_FOLDER=program
3206 LIBO_LIB_FOLDER=program
3207 LIBO_LIB_PYUNO_FOLDER=program
3208 LIBO_SHARE_FOLDER=share
3209 LIBO_SHARE_HELP_FOLDER=help
3210 LIBO_SHARE_JAVA_FOLDER=program/classes
3211 LIBO_SHARE_PRESETS_FOLDER=presets
3212 LIBO_SHARE_RESOURCE_FOLDER=program/resource
3213 LIBO_SHARE_SHELL_FOLDER=program/shell
3214 LIBO_URE_BIN_FOLDER=URE/bin
3215 LIBO_URE_ETC_FOLDER=URE/bin
3216 LIBO_URE_LIB_FOLDER=URE/bin
3217 LIBO_URE_SHARE_FOLDER=URE
3218 LIBO_URE_SHARE_JAVA_FOLDER=URE/java
3220 LIBO_BIN_FOLDER=program
3221 LIBO_ETC_FOLDER=program
3222 LIBO_LIBEXEC_FOLDER=program
3223 LIBO_LIB_FOLDER=program
3224 LIBO_LIB_PYUNO_FOLDER=program
3225 LIBO_SHARE_FOLDER=share
3226 LIBO_SHARE_HELP_FOLDER=help
3227 LIBO_SHARE_JAVA_FOLDER=program/classes
3228 LIBO_SHARE_PRESETS_FOLDER=presets
3229 LIBO_SHARE_RESOURCE_FOLDER=program/resource
3230 LIBO_SHARE_SHELL_FOLDER=program/shell
3231 LIBO_URE_BIN_FOLDER=ure/bin
3232 LIBO_URE_ETC_FOLDER=ure/lib
3233 LIBO_URE_LIB_FOLDER=ure/lib
3234 LIBO_URE_SHARE_FOLDER=ure/share
3235 LIBO_URE_SHARE_JAVA_FOLDER=ure/share/java
3237 AC_DEFINE_UNQUOTED(LIBO_BIN_FOLDER,"$LIBO_BIN_FOLDER")
3238 AC_DEFINE_UNQUOTED(LIBO_ETC_FOLDER,"$LIBO_ETC_FOLDER")
3239 AC_DEFINE_UNQUOTED(LIBO_LIBEXEC_FOLDER,"$LIBO_LIBEXEC_FOLDER")
3240 AC_DEFINE_UNQUOTED(LIBO_LIB_FOLDER,"$LIBO_LIB_FOLDER")
3241 AC_DEFINE_UNQUOTED(LIBO_LIB_PYUNO_FOLDER,"$LIBO_LIB_PYUNO_FOLDER")
3242 AC_DEFINE_UNQUOTED(LIBO_SHARE_FOLDER,"$LIBO_SHARE_FOLDER")
3243 AC_DEFINE_UNQUOTED(LIBO_SHARE_HELP_FOLDER,"$LIBO_SHARE_HELP_FOLDER")
3244 AC_DEFINE_UNQUOTED(LIBO_SHARE_JAVA_FOLDER,"$LIBO_SHARE_JAVA_FOLDER")
3245 AC_DEFINE_UNQUOTED(LIBO_SHARE_PRESETS_FOLDER,"$LIBO_SHARE_PRESETS_FOLDER")
3246 AC_DEFINE_UNQUOTED(LIBO_SHARE_RESOURCE_FOLDER,"$LIBO_SHARE_RESOURCE_FOLDER")
3247 AC_DEFINE_UNQUOTED(LIBO_SHARE_SHELL_FOLDER,"$LIBO_SHARE_SHELL_FOLDER")
3248 AC_DEFINE_UNQUOTED(LIBO_URE_BIN_FOLDER,"$LIBO_URE_BIN_FOLDER")
3249 AC_DEFINE_UNQUOTED(LIBO_URE_ETC_FOLDER,"$LIBO_URE_ETC_FOLDER")
3250 AC_DEFINE_UNQUOTED(LIBO_URE_LIB_FOLDER,"$LIBO_URE_LIB_FOLDER")
3251 AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_FOLDER,"$LIBO_URE_SHARE_FOLDER")
3252 AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_JAVA_FOLDER,"$LIBO_URE_SHARE_JAVA_FOLDER")
3254 # Not all of them needed in config_host.mk, add more if need arises
3255 AC_SUBST(LIBO_BIN_FOLDER)
3256 AC_SUBST(LIBO_ETC_FOLDER)
3257 AC_SUBST(LIBO_LIB_FOLDER)
3258 AC_SUBST(LIBO_LIB_PYUNO_FOLDER)
3259 AC_SUBST(LIBO_SHARE_FOLDER)
3260 AC_SUBST(LIBO_SHARE_HELP_FOLDER)
3261 AC_SUBST(LIBO_SHARE_JAVA_FOLDER)
3262 AC_SUBST(LIBO_SHARE_PRESETS_FOLDER)
3263 AC_SUBST(LIBO_SHARE_RESOURCE_FOLDER)
3264 AC_SUBST(LIBO_URE_BIN_FOLDER)
3265 AC_SUBST(LIBO_URE_ETC_FOLDER)
3266 AC_SUBST(LIBO_URE_LIB_FOLDER)
3267 AC_SUBST(LIBO_URE_SHARE_FOLDER)
3268 AC_SUBST(LIBO_URE_SHARE_JAVA_FOLDER)
3269 AC_SUBST(ENABLE_MACOSX_MACLIKE_APP_STRUCTURE)
3271 dnl ===================================================================
3272 dnl Windows specific tests and stuff
3273 dnl ===================================================================
3275 # Get a value from the 32-bit side of the Registry
3278 # Return value: $regvalue
3280 _regvalue=`cat "/proc/registry32/$1" 2> /dev/null`
3282 if test $? -eq 0; then
3287 # Get a value from the 64-bit side of the Registry
3290 # Return value: $regvalue
3292 _regvalue=`cat "/proc/registry64/$1" 2> /dev/null`
3294 if test $? -eq 0; then
3299 if test "$_os" = "WINNT"; then
3300 AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
3301 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
3303 WINDOWS_SDK_ARCH="x86"
3305 AC_MSG_RESULT([yes])
3306 WINDOWS_SDK_ARCH="x64"
3311 if test "$_os" = "WINNT" -a "$WITH_MINGW" != yes; then
3312 AC_MSG_CHECKING([whether to use DirectX])
3313 if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
3314 ENABLE_DIRECTX="TRUE"
3315 AC_MSG_RESULT([yes])
3321 AC_MSG_CHECKING([whether to use ActiveX])
3322 if test "$enable_activex" = "yes" -o "$enable_activex" = ""; then
3324 AC_MSG_RESULT([yes])
3326 DISABLE_ACTIVEX="TRUE"
3330 AC_MSG_CHECKING([whether to use ATL])
3331 if test "$enable_atl" = "yes" -o "$enable_atl" = ""; then
3333 AC_MSG_RESULT([yes])
3340 DISABLE_ACTIVEX="TRUE"
3344 AC_SUBST(ENABLE_DIRECTX)
3345 AC_SUBST(DISABLE_ACTIVEX)
3346 AC_SUBST(DISABLE_ATL)
3348 if test "$cross_compiling" = "yes"; then
3349 export CROSS_COMPILING=TRUE
3350 SCPDEFS="$SCPDEFS -DCROSS_COMPILING"
3353 BUILD_TYPE="$BUILD_TYPE NATIVE"
3355 AC_SUBST(CROSS_COMPILING)
3357 dnl ===================================================================
3358 dnl Is GCC actually Clang?
3359 dnl ===================================================================
3362 if test "$GCC" = "yes"; then
3363 AC_MSG_CHECKING([whether GCC is actually Clang])
3364 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
3370 [AC_MSG_RESULT([yes])
3371 COM_GCC_IS_CLANG=TRUE],
3372 [AC_MSG_RESULT([no])])
3374 if test "$COM_GCC_IS_CLANG" = TRUE; then
3375 AC_MSG_CHECKING([the Clang version])
3376 clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC -E -P -`
3377 CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P -`
3378 CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
3379 AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
3380 AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
3383 AC_SUBST(COM_GCC_IS_CLANG)
3385 if test "$CCACHE" != "" -a "$COM_GCC_IS_CLANG" = TRUE; then
3386 if test -z "$CCACHE_CPP2"; then
3387 AC_MSG_WARN([Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings.])
3388 add_warning "Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings."
3392 dnl ===================================================================
3393 dnl Test the gcc version
3394 dnl ===================================================================
3395 if test "$GCC" = "yes" -a -z "$COM_GCC_IS_CLANG"; then
3396 AC_MSG_CHECKING([the GCC version])
3397 _gcc_version=`$CC -dumpversion`
3398 GCC_VERSION=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
3400 if test "$_os" = "Darwin"; then
3401 if test "$with_macosx_sdk" = "10.5"; then
3402 # use gcc 4.2 for OS X SDK 10.5
3403 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.2"; then
3404 export CC="$GCC_HOME/bin/gcc-4.2" # make CC finally available to config.guess
3406 AC_MSG_RESULT([using CC=$CC])
3409 AC_MSG_RESULT([gcc $_gcc_version])
3412 if test "$GCC_VERSION" -lt 0401; then
3413 AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 4.1.0])
3416 # Explicitly force GCC_VERSION to be empty, even for Clang, to check incorrect uses.
3417 # GCC version should generally be checked only when handling GCC-specific bugs, for testing
3418 # things like features configure checks should be used, otherwise they may e.g. fail with Clang
3419 # (which reports itself as GCC 4.2.1).
3422 AC_SUBST(GCC_VERSION)
3424 # ===================================================================
3425 # check various GCC options that Clang does not support now but maybe
3426 # will somewhen in the future, check them even for GCC, so that the
3428 # ===================================================================
3431 HAVE_GCC_FINLINE_LIMIT=
3432 HAVE_GCC_FNO_INLINE=
3433 if test "$GCC" = "yes"; then
3434 AC_MSG_CHECKING([whether $CC supports -ggdb2])
3435 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3436 # Option just ignored and silly warning that isn't a real
3441 CFLAGS="$CFLAGS -Werror -ggdb2"
3442 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_GGDB2=TRUE ],[])
3445 if test "$HAVE_GCC_GGDB2" = "TRUE"; then
3446 AC_MSG_RESULT([yes])
3451 AC_MSG_CHECKING([whether $CC supports -finline-limit=0])
3452 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3457 CFLAGS="$CFLAGS -Werror -finline-limit=0"
3458 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FINLINE_LIMIT=TRUE ],[])
3461 if test "$HAVE_GCC_FINLINE_LIMIT" = "TRUE"; then
3462 AC_MSG_RESULT([yes])
3467 AC_MSG_CHECKING([whether $CC supports -fno-inline])
3468 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3473 CFLAGS="$CFLAGS -Werror -fno-inline"
3474 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_INLINE=TRUE ],[])
3477 if test "$HAVE_GCC_FNO_INLINE" = "TRUE"; then
3478 AC_MSG_RESULT([yes])
3483 AC_SUBST(HAVE_GCC_GGDB2)
3484 AC_SUBST(HAVE_GCC_FINLINE_LIMIT)
3485 AC_SUBST(HAVE_GCC_FNO_INLINE)
3487 HAVE_LD_BSYMBOLIC_FUNCTIONS=
3488 if test "$GCC" = "yes"; then
3489 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
3490 bsymbolic_functions_ldflags_save=$LDFLAGS
3491 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
3492 AC_LINK_IFELSE([AC_LANG_PROGRAM([
3495 printf ("hello world\n");
3496 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
3497 if test "$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "TRUE"; then
3498 AC_MSG_RESULT( found )
3500 AC_MSG_RESULT( not found )
3502 LDFLAGS=$bsymbolic_functions_ldflags_save
3504 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
3506 # Use -isystem (gcc) if possible, to avoid warnigs in 3rd party headers.
3507 # NOTE: must _not_ be used for bundled external libraries!
3509 if test "$GCC" = "yes"; then
3510 AC_MSG_CHECKING( for -isystem )
3512 CFLAGS="$CFLAGS -Werror"
3513 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ ISYSTEM=-isystem ],[])
3515 if test -n "$ISYSTEM"; then
3521 if test -z "$ISYSTEM"; then
3522 # fall back to using -I
3527 dnl ===================================================================
3528 dnl Check which Visual Studio or MinGW compiler is used
3529 dnl ===================================================================
3531 map_vs_year_to_version()
3533 # Return value: $vsversion
3545 AC_MSG_ERROR([Assertion failure - invalid argument "$1" to map_vs_year_to_version()]);;
3549 vs_versions_to_check()
3551 # Args: $1 (optional) : versions to check, in the order of preference
3552 # Return value: $vsversions
3556 if test -n "$1"; then
3557 map_vs_year_to_version "$1"
3558 vsversions=$vsversion
3560 # By default we prefer 2012, then 2010, then 2013
3561 vsversions="11.0 10.0 12.0"
3567 # Find Visual Studio 2012/2010/2013
3568 # Args: $1 (optional) : versions to check, in the order of preference
3569 # Return value: $vstest
3573 vs_versions_to_check "$1"
3575 for ver in $vsversions; do
3576 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VS/ProductDir
3577 if test -n "$regvalue"; then
3581 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress/$ver/Setup/VS/ProductDir
3582 if test -n "$regvalue"; then
3591 # Find Visual C++ 2012/2010/2013
3592 # Args: $1 (optional) : The VS version year
3593 # Return values: $vctest, $vcyear, $vcnum, $vcnumwithdot
3595 unset vctest vcnum vcnumwithdot
3597 vs_versions_to_check "$1"
3599 for ver in $vsversions; do
3600 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VC/ProductDir
3601 if test -n "$regvalue"; then
3605 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress/$ver/Setup/VC/ProductDir
3606 if test -n "$regvalue"; then
3611 if test -n "$vctest"; then
3613 case "$vcnumwithdot" in
3630 SHOWINCLUDES_PREFIX=
3631 if test "$_os" = "WINNT"; then
3632 if test "$WITH_MINGW" != "yes"; then
3633 AC_MSG_CHECKING([Visual C++])
3635 find_msvc "$with_visual_studio"
3637 if test -z "$vctest"; then
3638 if test -n "$with_visual_studio"; then
3639 AC_MSG_ERROR([No Visual Studio $with_visual_studio installation found])
3641 AC_MSG_ERROR([No Visual Studio 2012, 2010 or 2013 installation found])
3645 if test "$BITNESS_OVERRIDE" = ""; then
3646 if test -f "$vctest/bin/cl.exe"; then
3647 VC_PRODUCT_DIR=$vctest
3649 AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/cl.exe])
3652 if test -f "$vctest/bin/amd64/cl.exe"; then
3653 VC_PRODUCT_DIR=$vctest
3655 AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/amd64/cl.exe])
3659 VC_PRODUCT_DIR=`cygpath -d "$VC_PRODUCT_DIR"`
3660 VC_PRODUCT_DIR=`cygpath -u "$VC_PRODUCT_DIR"`
3661 AC_MSG_RESULT([$VC_PRODUCT_DIR])
3663 dnl ===========================================================
3664 dnl Check for the corresponding mspdb*.dll
3665 dnl ===========================================================
3669 if test "$BITNESS_OVERRIDE" = ""; then
3670 if test "$vcnum" = "120"; then
3671 MSPDB_PATH="$VC_PRODUCT_DIR/../VC/bin"
3673 MSPDB_PATH="$VC_PRODUCT_DIR/../Common7/IDE"
3676 MSPDB_PATH="$VC_PRODUCT_DIR/bin/amd64"
3681 if test ! -e "$MSPDB_PATH/mspdb${mspdbnum}.dll"; then
3682 AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $MSPDB_PATH, Visual Studio installation broken?])
3685 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
3686 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
3688 dnl The path needs to be added before cl is called
3689 PATH="$MSPDB_PATH:$PATH"
3691 AC_MSG_CHECKING([cl.exe])
3693 # Is there really ever a need to pass CC explicitly? Surely we can hope to get all the
3694 # automagical niceness to work OK? If somebody has some unsupported compiler in some weird
3695 # location, isn't it likely that lots of other things needs changes, too, and just setting CC
3698 if test -z "$CC"; then
3699 if test "$BITNESS_OVERRIDE" = ""; then
3700 if test -f "$VC_PRODUCT_DIR/bin/cl.exe"; then
3701 CC="$VC_PRODUCT_DIR/bin/cl.exe"
3704 if test -f "$VC_PRODUCT_DIR/bin/amd64/cl.exe"; then
3705 CC="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
3709 # This gives us a posix path with 8.3 filename restrictions
3710 CC=`cygpath -d "$CC"`
3711 CC=`cygpath -u "$CC"`
3714 if test -n "$CC"; then
3715 # Remove /cl.exe from CC case insensitive
3716 AC_MSG_RESULT([found Visual C++ $vcyear ($CC)])
3717 if test "$BITNESS_OVERRIDE" = ""; then
3718 COMPATH=`echo $CC | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
3720 if test -n "$VC_PRODUCT_DIR"; then
3721 # Huh, why not just an assignment?
3722 COMPATH=`echo $VC_PRODUCT_DIR`
3725 export INCLUDE=`cygpath -d "$COMPATH/Include"`
3727 PathFormat "$COMPATH"
3728 COMPATH="$formatted_path"
3733 # The WINDOWS_SDK_ACCEPTABLE_VERSIONS is mostly an educated guess... Assuming newer ones
3734 # are always "better", we list them in reverse chronological order.
3739 WINDOWS_SDK_ACCEPTABLE_VERSIONS="7.1A 7.1 7.0A 6.0A"
3740 if test "$ENABLE_LTO" = TRUE; then
3742 AC_MSG_WARN([LTO is known to cause problems with MSVC 2010])
3743 add_warning "LTO is known to cause problems with MSVC 2010"
3748 WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.0 7.1A"
3752 WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.1A 8.1 8.0"
3756 # The expectation is that --with-windows-sdk should not need to be used
3757 if test -n "$with_windows_sdk"; then
3758 case " $WINDOWS_SDK_ACCEPTABLE_VERSIONS " in
3759 *" "$with_windows_sdk" "*)
3760 WINDOWS_SDK_ACCEPTABLE_VERSIONS=$with_windows_sdk
3763 AC_MSG_ERROR([Windows SDK $with_windows_sdk is not known to work witn VS $MSVSVER])
3768 # Make AC_COMPILE_IFELSE etc. work (set by AC_PROG_C, which we don't use for MSVC)
3773 AC_MSG_ERROR([Visual C++ not found after all, huh])
3776 dnl We need to guess the prefix of the -showIncludes output, it can be
3778 AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
3779 echo "#include <stdlib.h>" > conftest.c
3780 SHOWINCLUDES_PREFIX=`$CC -c -showIncludes conftest.c 2>/dev/null | \
3781 grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
3782 rm -f conftest.c conftest.obj
3783 if test -z "$SHOWINCLUDES_PREFIX"; then
3784 AC_MSG_ERROR([cannot determine the -showIncludes prefix])
3786 AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
3789 # Check for 64-bit (cross-)compiler to use to build the 64-bit
3790 # version of the Explorer extension (and maybe other small
3791 # bits, too) needed when installing a 32-bit LibreOffice on a
3792 # 64-bit OS. The 64-bit Explorer extension is a feature that
3793 # has been present since long in OOo. Don't confuse it with
3794 # building LibreOffice itself as 64-bit code, which is
3795 # unfinished work and highly experimental.
3801 if test "$BITNESS_OVERRIDE" = ""; then
3802 AC_MSG_CHECKING([for a x64 compiler and libraries for 64-bit Explorer extensions])
3803 if test -f "$VC_PRODUCT_DIR/atlmfc/lib/amd64/atls.lib"; then
3804 # Prefer native x64 compiler to cross-compiler, in case we are running
3805 # the build on a 64-bit OS.
3806 if "$VC_PRODUCT_DIR/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3808 CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
3809 LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/link.exe"
3810 elif "$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3812 CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"
3813 LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/link.exe"
3816 if test "$BUILD_X64" = TRUE; then
3817 AC_MSG_RESULT([found])
3819 AC_MSG_RESULT([not found])
3820 AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
3825 # These are passed to the environment and then used in gbuild/platform/com_MSC_class.mk
3826 AC_SUBST(CXX_X64_BINARY)
3827 AC_SUBST(LINK_X64_BINARY)
3829 AC_MSG_CHECKING([the compiler is MinGW])
3830 MACHINE_PREFIX=`$CC -dumpmachine`
3831 if echo $MACHINE_PREFIX | $GREP -q mingw32; then
3832 COMPATH=`echo "$COMPATH" | sed -e 's,/bin$,,'`
3833 AC_MSG_RESULT([yes])
3835 AC_MSG_ERROR([Compiler is not MinGW.])
3840 PathFormat "$MSPDB_PATH"
3841 MSPDB_PATH="$formatted_path"
3842 AC_SUBST(SHOWINCLUDES_PREFIX)
3847 if test "$_os" = "WINNT"; then
3848 BUILD_TYPE="$BUILD_TYPE DBGHELP"
3854 UNOWINREG_DLL="185d60944ea767075d27247c3162b3bc-unowinreg.dll"
3855 AC_SUBST(UNOWINREG_DLL)
3858 # prefix C with ccache if needed
3860 if test "$CCACHE" != ""; then
3861 AC_MSG_CHECKING([whether $CC is already ccached])
3865 CFLAGS="$CFLAGS --ccache-skip -O2"
3866 dnl an empty program will do, we're checking the compiler flags
3867 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
3868 [use_ccache=yes], [use_ccache=no])
3869 if test $use_ccache = yes; then
3870 AC_MSG_RESULT([yes])
3879 dnl Set the ENABLE_DBGUTIL variable
3880 dnl ===================================================================
3881 AC_MSG_CHECKING([whether to build with additional debug utilities])
3882 if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
3883 ENABLE_DBGUTIL="TRUE"
3884 # this is an extra var so it can have different default on different MSVC
3885 # versions (in case there are version specific problems with it)
3886 MSVC_USE_DEBUG_RUNTIME="TRUE"
3888 AC_MSG_RESULT([yes])
3889 # cppunit and graphite expose STL in public headers
3890 if test "$with_system_cppunit" = "yes"; then
3891 AC_MSG_ERROR([--with-system-cppunit conflicts with --enable-dbgutil])
3893 with_system_cppunit=no
3895 if test "$with_system_graphite" = "yes"; then
3896 AC_MSG_ERROR([--with-system-graphite conflicts with --enable-dbgutil])
3898 with_system_graphite=no
3900 if test "$with_system_mysql_cppconn" = "yes"; then
3901 AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with --enable-dbgutil])
3903 with_system_mysql_cppconn=no
3905 if test "$with_system_orcus" = "yes"; then
3906 AC_MSG_ERROR([--with-system-orcus conflicts with --enable-dbgutil])
3908 with_system_orcus=no
3910 if test "$with_system_libcmis" = "yes"; then
3911 AC_MSG_ERROR([--with-system-libcmis conflicts with --enable-dbgutil])
3913 with_system_libcmis=no
3915 if test "$enable_win_mozab_driver" = "yes"; then
3916 AC_MSG_ERROR([--enable-win-mozab-driver conflicts with --enable-dbgutil])
3920 MSVC_USE_DEBUG_RUNTIME=""
3923 AC_SUBST(ENABLE_DBGUTIL)
3924 AC_SUBST(MSVC_USE_DEBUG_RUNTIME)
3926 dnl Set the ENABLE_DEBUG variable.
3927 dnl ===================================================================
3928 AC_MSG_CHECKING([whether to do a debug build])
3929 if test -n "$enable_debug" && test "$enable_debug" != "yes" && test "$enable_debug" != "no"; then
3930 AC_MSG_ERROR([--enable-debug now accepts only yes or no, use --enable-selective-debuginfo])
3932 if test -n "$ENABLE_DBGUTIL"; then
3933 if test "$enable_debug" = "no"; then
3934 AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil])
3937 AC_MSG_RESULT([yes (dbgutil)])
3938 elif test -n "$enable_debug" && test "$enable_debug" != "no"; then
3940 AC_MSG_RESULT([yes])
3945 AC_SUBST(ENABLE_DEBUG)
3947 dnl Selective debuginfo
3948 ENABLE_DEBUGINFO_FOR=
3949 if test -n "$ENABLE_DEBUG"; then
3950 AC_MSG_CHECKING([whether to use selective debuginfo])
3951 if test -n "$enable_selective_debuginfo" -a "$enable_selective_debuginfo" != "no"; then
3952 ENABLE_DEBUGINFO_FOR="$enable_selective_debuginfo"
3953 AC_MSG_RESULT([for "$enable_selective_debuginfo"])
3955 ENABLE_DEBUGINFO_FOR=all
3956 AC_MSG_RESULT([no, for all])
3959 AC_SUBST(ENABLE_DEBUGINFO_FOR)
3961 dnl Check for enable symbols option
3962 dnl ===================================================================
3963 AC_MSG_CHECKING([whether to include symbols while preserve optimization])
3964 if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
3965 ENABLE_SYMBOLS="TRUE"
3966 if test -n "$ENABLE_DBGUTIL"; then
3967 AC_MSG_ERROR([--enable-dbgutil cannot be used with --enable-symbols])
3968 elif test -n "$ENABLE_DEBUG"; then
3969 AC_MSG_ERROR([--enable-debug cannot be used with --enable-symbols])
3971 AC_MSG_RESULT([yes])
3973 if test -n "$enable_symbols" -a "$enable_symbols" = "no"; then
3974 ENABLE_SYMBOLS="FALSE"
3980 AC_SUBST(ENABLE_SYMBOLS)
3982 # Debug information format for iOS. Running dsymutil takes a long time... you really need a separate
3983 # .dSYM only if running Instruments, I think. (Not for normal debugging in Xcode.) To enable a
3984 # separate .dSYM, either use --enable-release-build or change manually to "DWARF with DSYM" in Xcode.
3985 XCODE_DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
3986 if test "$enable_release_build" != yes -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE_DEBUG" -o -n "$ENABLE_DBGUTIL" \); then
3987 XCODE_DEBUG_INFORMATION_FORMAT=dwarf
3989 AC_SUBST(XCODE_DEBUG_INFORMATION_FORMAT)
3991 # Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
3992 # By default use the ones specified by our build system,
3993 # but explicit override is possible.
3994 AC_MSG_CHECKING(for explicit AFLAGS)
3995 if test -n "$AFLAGS"; then
3996 AC_MSG_RESULT([$AFLAGS])
4002 AC_MSG_CHECKING(for explicit CFLAGS)
4003 if test -n "$CFLAGS"; then
4004 AC_MSG_RESULT([$CFLAGS])
4010 AC_MSG_CHECKING(for explicit CXXFLAGS)
4011 if test -n "$CXXFLAGS"; then
4012 AC_MSG_RESULT([$CXXFLAGS])
4018 AC_MSG_CHECKING(for explicit OBJCFLAGS)
4019 if test -n "$OBJCFLAGS"; then
4020 AC_MSG_RESULT([$OBJCFLAGS])
4026 AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
4027 if test -n "$OBJCXXFLAGS"; then
4028 AC_MSG_RESULT([$OBJCXXFLAGS])
4034 AC_MSG_CHECKING(for explicit LDFLAGS)
4035 if test -n "$LDFLAGS"; then
4036 AC_MSG_RESULT([$LDFLAGS])
4046 AC_SUBST(OBJCXXFLAGS)
4050 AC_SUBST(x_CXXFLAGS)
4051 AC_SUBST(x_OBJCFLAGS)
4052 AC_SUBST(x_OBJCXXFLAGS)
4056 # determine CPUNAME, GUIBASE, ...
4070 PLATFORMID=aix_powerpc
4084 if test "$BITNESS_OVERRIDE" = 64; then
4088 PLATFORMID=windows_x86_64
4089 OUTPATH=wntmscx$COMEX
4093 PLATFORMID=windows_x86
4094 OUTPATH=wntmsci$COMEX
4098 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4101 SCPDEFS="$SCPDEFS -D_MSC_VER"
4123 PLATFORMID=macosx_powerpc
4127 if test "$BITNESS_OVERRIDE" = 64; then
4128 AC_MSG_ERROR([Can't build 64-bit code in 32-bit OS])
4132 PLATFORMID=macosx_x86
4136 if test "$BITNESS_OVERRIDE" = 64; then
4139 PLATFORMID=macosx_x86_64
4144 PLATFORMID=macosx_x86
4149 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4166 PLATFORMID=dragonfly_x86
4171 PLATFORMID=dragonfly_x86_64
4174 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4191 PLATFORMID=freebsd_x86
4197 PLATFORMID=freebsd_x86_64
4200 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4217 PLATFORMID=kfreebsd_x86
4224 PLATFORMID=kfreebsd_x86_64
4228 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4245 PLATFORMID=linux_alpha
4253 PLATFORMID=linux_arm_eabi
4257 PLATFORMID=linux_arm_oabi
4265 PLATFORMID=linux_hppa
4271 PLATFORMID=linux_x86
4277 PLATFORMID=linux_ia64
4284 PLATFORMID=linux_mips_eb
4290 EPM_FLAGS="-a mips64"
4291 PLATFORMID=linux_mips_eb
4297 EPM_FLAGS="-a mips64el"
4298 PLATFORMID=linux_mips_el
4304 EPM_FLAGS="-a mipsel"
4305 PLATFORMID=linux_mips_el
4311 PLATFORMID=linux_m68k
4317 PLATFORMID=linux_powerpc
4324 PLATFORMID=linux_powerpc64
4330 PLATFORMID=linux_sparc
4336 PLATFORMID=linux_s390
4343 PLATFORMID=linux_s390x
4350 PLATFORMID=linux_x86_64
4354 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4371 PLATFORMID=android_arm_eabi
4375 CPUNAME=GODSON # Weird, but maybe that's the LO convention?
4377 PLATFORMID=android_mips_el
4383 PLATFORMID=android_x86
4387 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4401 if test "$BITNESS_OVERRIDE" = 64; then
4404 PLATFORMID=windows_x86_64
4405 OUTPATH=wntgccx$COMEX
4406 SOLARINC="$SOLARINC -I$SRC_ROOT/include/wntgccx"
4410 PLATFORMID=windows_x86
4411 OUTPATH=wntgcci$COMEX
4412 SOLARINC="$SOLARINC -I$SRC_ROOT/include/wntgcci"
4416 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4434 PLATFORMID=netbsd_x86
4439 PLATFORMID=netbsd_powerpc
4444 PLATFORMID=netbsd_sparc
4449 PLATFORMID=netbsd_x86_64
4452 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4469 PLATFORMID=openbsd_x86
4474 PLATFORMID=openbsd_x86_64
4477 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4480 SOLARINC="$SOLARINC -I/usr/local/include"
4495 PLATFORMID=solaris_x86
4501 PLATFORMID=solaris_sparc
4507 PLATFORMID=solaris_sparc64
4511 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4514 SOLARINC="$SOLARINC -I/usr/local/include"
4518 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
4522 if test "$enable_headless" = "yes"; then
4523 if test "$GUIBASE" != "unx"; then
4524 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice with --enable-headless])
4529 WORKDIR="${BUILDDIR}/workdir"
4530 INSTDIR="${BUILDDIR}/instdir"
4531 INSTROOT="${INSTDIR}${INSTROOTSUFFIX}"
4532 SOLARINC="-I. -I$SRC_ROOT/include $SOLARINC"
4540 AC_SUBST([INSTROOT])
4545 AC_SUBST(PLATFORMID)
4546 AC_DEFINE_UNQUOTED(WORKDIR,"$WORKDIR")
4548 dnl ===================================================================
4549 dnl Test which package format to use
4550 dnl ===================================================================
4551 AC_MSG_CHECKING([which package format to use])
4552 if test -n "$with_package_format" -a "$with_package_format" != no; then
4553 for i in $with_package_format; do
4555 aix | bsd | deb | osx | pkg | rpm | native | portable | archive | dmg | installed | msi)
4558 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
4559 aix - AIX software distribution
4560 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
4561 deb - Debian software distribution
4562 osx - MacOS X software distribution
4563 pkg - Solaris software distribution
4564 rpm - RedHat software distribution
4565 native - "Native" software distribution for the platform
4566 portable - Portable software distribution
4568 LibreOffice additionally supports:
4569 archive - .tar.gz or .zip
4571 installed - installation tree
4577 PKGFORMAT="$with_package_format"
4578 AC_MSG_RESULT([$PKGFORMAT])
4581 AC_MSG_RESULT([none])
4585 dnl ===================================================================
4586 dnl Set up a different compiler to produce tools to run on the build
4587 dnl machine when doing cross-compilation
4588 dnl ===================================================================
4590 m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
4591 if test "$cross_compiling" = "yes"; then
4592 AC_MSG_CHECKING([for BUILD platform configuration])
4594 rm -rf CONF-FOR-BUILD config_build.mk
4595 mkdir CONF-FOR-BUILD
4596 # Here must be listed all files needed when running the configure script. In particular, also
4597 # those expanded by the AC_CONFIG_FILES() call near the end of this configure.ac. For clarity,
4598 # keep them in the same order as there.
4599 (cd $SRC_ROOT && tar cf - \
4601 bin/get_config_variables \
4602 solenv/bin/getcompver.awk \
4603 solenv/inc/langlist.mk \
4607 instsetoo_native/util/openoffice.lst.in \
4609 sysui/desktop/macosx/Info.plist.in \
4610 ios/lo.xcconfig.in) \
4611 | (cd CONF-FOR-BUILD && tar xf -)
4612 cp configure CONF-FOR-BUILD
4613 test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host 2>/dev/null
4615 unset COM GUIBASE OS CPUNAME
4616 unset CC CXX SYSBASE CFLAGS
4617 unset AR NM OBJDUMP PKG_CONFIG RANLIB STRIP
4618 unset CPPUNIT_CFLAGS CPPUNIT_LIBS
4619 unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC
4620 test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
4621 test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
4622 test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
4625 test -n "$enable_ccache" && sub_conf_opts="$sub_conf_opts --enable-ccache=$enable_ccache"
4626 test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
4627 test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
4628 test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
4629 test -n "$with_system_boost_for_build" && sub_conf_opts="$sub_conf_opts --with-system-boost"
4630 test -n "$with_system_cppunit_for_build" && sub_conf_opts="$sub_conf_opts --with-system-cppunit"
4631 test -n "$with_system_expat_for_build" && sub_conf_opts="$sub_conf_opts --with-system-expat"
4632 test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu"
4633 test -n "$with_system_libxml_for_build" && sub_conf_opts="$sub_conf_opts --with-system-libxml"
4634 # we need the msi build tools on mingw if we are creating the
4636 if test "$WITH_MINGW" = "yes"; then
4637 enable_winegcc_for_build=
4638 for pkgformat in $PKGFORMAT; do
4639 case "$pkgformat" in
4640 msi|native) enable_winegcc_for_build=yes ;;
4643 test -n "$enable_winegcc_for_build" && sub_conf_opts="$sub_conf_opts --enable-winegcc"
4645 sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
4646 # Don't bother having configure look for stuff not needed for the build platform anyway
4648 --disable-graphite \
4649 --disable-pdfimport \
4650 --disable-postgresql-sdbc \
4651 --with-parallelism="$with_parallelism" \
4656 2>&1 | sed -e 's/^/ /'
4657 test -f ./config_host.mk 2>/dev/null || exit
4658 cp config_host.mk ../config_build.mk
4659 mv config.log ../config.Build.log
4660 mkdir -p ../config_build
4661 mv config_host/*.h ../config_build
4662 . ./bin/get_config_variables CC CXX INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS PATH SDKDIRNAME SYSTEM_LIBXSLT WORKDIR
4664 for V in CC CXX LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS SDKDIRNAME SYSTEM_LIBXSLT; do
4666 VV=`eval "echo $VV"`
4667 if test -n "$VV"; then
4668 line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
4669 echo "$line" >>build-config
4673 for V in INSTDIR INSTROOT WORKDIR; do
4675 VV=`eval "echo $VV"`
4676 VV=`echo $VV | sed -e "s,/CONF-FOR-BUILD/\([[a-z]]*\),/\1_for_build,g"`
4677 if test -n "$VV"; then
4678 line="${V}_FOR_BUILD='$VV'"
4679 echo "$line" >>build-config
4683 line=`echo "LO_PATH_FOR_BUILD=$PATH" | sed -e 's,/CONF-FOR-BUILD,,g'`
4684 echo "$line" >>build-config
4687 test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
4688 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])
4689 perl -pi -e 's,/(workdir|instdir)(/|$),/\1_for_build\2,g;' \
4690 -e 's,/CONF-FOR-BUILD,,g;' config_build.mk
4692 eval `cat CONF-FOR-BUILD/build-config`
4694 AC_MSG_RESULT([checking for BUILD platform configuration... done])
4696 rm -rf CONF-FOR-BUILD
4700 CXX_FOR_BUILD="$CXX"
4701 INSTDIR_FOR_BUILD="$INSTDIR"
4702 INSTROOT_FOR_BUILD="$INSTROOT"
4703 LIBO_BIN_FOLDER_FOR_BUILD="$LIBO_BIN_FOLDER"
4704 LIBO_LIB_FOLDER_FOR_BUILD="$LIBO_LIB_FOLDER"
4705 LIBO_URE_LIB_FOLDER_FOR_BUILD="$LIBO_URE_LIB_FOLDER"
4706 SDKDIRNAME_FOR_BUILD="$SDKDIRNAME"
4707 WORKDIR_FOR_BUILD="$WORKDIR"
4709 AC_SUBST(OS_FOR_BUILD)
4710 AC_SUBST(INSTDIR_FOR_BUILD)
4711 AC_SUBST(INSTROOT_FOR_BUILD)
4712 AC_SUBST(LIBO_BIN_FOLDER_FOR_BUILD)
4713 AC_SUBST(LIBO_LIB_FOLDER_FOR_BUILD)
4714 AC_SUBST(LIBO_URE_LIB_FOLDER_FOR_BUILD)
4715 AC_SUBST(SDKDIRNAME_FOR_BUILD)
4716 AC_SUBST(WORKDIR_FOR_BUILD)
4718 dnl ===================================================================
4719 dnl Check for syslog header
4720 dnl ===================================================================
4721 AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG_H))
4723 dnl ===================================================================
4724 dnl Set the ENABLE_CRASHDUMP variable.
4725 dnl ===================================================================
4726 AC_MSG_CHECKING([whether to enable crashdump feature])
4727 if test "$enable_crashdump" = "yes"; then
4728 ENABLE_CRASHDUMP="TRUE"
4729 BUILD_TYPE="$BUILD_TYPE CRASHREP"
4730 AC_MSG_RESULT([yes])
4735 AC_SUBST(ENABLE_CRASHDUMP)
4738 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
4739 dnl ===================================================================
4740 AC_MSG_CHECKING([whether to turn warnings to errors])
4741 if test -n "$enable_werror" -a "$enable_werror" != "no"; then
4742 ENABLE_WERROR="TRUE"
4743 AC_MSG_RESULT([yes])
4747 AC_SUBST(ENABLE_WERROR)
4749 dnl Set the ASSERT_ALWAYS_ABORT variable. (Activate --enable-assert-always-abort)
4750 dnl ===================================================================
4751 AC_MSG_CHECKING([whether to have assert to abort in release code])
4752 if test -n "$enable_assert_always_abort" -a "$enable_assert_always_abort" = "yes"; then
4753 ASSERT_ALWAYS_ABORT="TRUE"
4754 AC_MSG_RESULT([yes])
4756 ASSERT_ALWAYS_ABORT="FALSE"
4759 AC_SUBST(ASSERT_ALWAYS_ABORT)
4761 # Determine whether to use ooenv for the instdir installation
4762 # ===================================================================
4763 if test $_os != "WINNT" -a $_os != "Darwin"; then
4764 AC_MSG_CHECKING([whether to use ooenv for the instdir installation])
4765 if test "$enable_ooenv" = "no"; then
4769 AC_MSG_RESULT([yes])
4772 AC_SUBST(ENABLE_OOENV)
4774 if test "$enable_headless" = "yes"; then
4775 # be sure to do not mess with uneeded stuff
4783 build_gstreamer_0_10=no
4787 enable_cairo_canvas=no
4791 dnl ===================================================================
4792 dnl check for cups support
4793 dnl ===================================================================
4796 if test "$enable_cups" = "no"; then
4800 AC_MSG_CHECKING([whether to enable CUPS support])
4801 if test "$test_cups" = "yes"; then
4803 AC_MSG_RESULT([yes])
4805 AC_MSG_CHECKING([whether cups support is present])
4806 AC_CHECK_LIB([cups], [cupsPrintFiles], [:])
4807 AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
4808 if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -o "$ac_cv_header_cups_cups_h" != "yes"; then
4809 AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups-devel.])
4816 AC_SUBST(ENABLE_CUPS)
4819 if test "$test_fontconfig" = "yes"; then
4820 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.4.1])
4821 SYSTEM_FONTCONFIG=TRUE
4823 AC_SUBST(FONTCONFIG_CFLAGS)
4824 AC_SUBST(FONTCONFIG_LIBS)
4825 AC_SUBST([SYSTEM_FONTCONFIG])
4827 dnl whether to find & fetch external tarballs?
4828 dnl ===================================================================
4829 if test -z "$TARFILE_LOCATION"; then
4830 if test -d "$SRC_ROOT/src" ; then
4831 mv "$SRC_ROOT/src" "$SRC_ROOT/external/tarballs"
4832 ln -s "$SRC_ROOT/external/tarballs" "$SRC_ROOT/src"
4834 TARFILE_LOCATION="$SRC_ROOT/external/tarballs"
4836 AbsolutePath "$TARFILE_LOCATION"
4837 TARFILE_LOCATION="${absolute_path}"
4839 AC_SUBST(TARFILE_LOCATION)
4841 AC_MSG_CHECKING([whether we want to fetch tarballs])
4842 if test "$enable_fetch_external" != "no"; then
4843 if test "$with_all_tarballs" = "yes"; then
4844 AC_MSG_RESULT(["yes, all of them"])
4845 DO_FETCH_TARBALLS="ALL"
4847 AC_MSG_RESULT(["yes, if we use them"])
4848 DO_FETCH_TARBALLS="TRUE"
4854 AC_SUBST(DO_FETCH_TARBALLS)
4856 AC_MSG_CHECKING([whether to build help])
4857 HELP_COMMON_ONLY=FALSE
4858 if test -n "$with_help" -a "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
4859 BUILD_TYPE="$BUILD_TYPE HELP"
4860 GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
4861 if test "$with_help" = "common" ; then
4862 HELP_COMMON_ONLY=TRUE
4863 AC_MSG_RESULT([common only])
4865 SCPDEFS="$SCPDEFS -DWITH_HELP"
4866 AC_MSG_RESULT([yes])
4871 AC_SUBST(HELP_COMMON_ONLY)
4873 dnl Test whether to include MySpell dictionaries
4874 dnl ===================================================================
4875 AC_MSG_CHECKING([whether to include MySpell dictionaries])
4876 if test "$with_myspell_dicts" = "yes"; then
4877 AC_MSG_RESULT([yes])
4878 WITH_MYSPELL_DICTS=TRUE
4879 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
4880 GIT_NEEDED_SUBMODULES="dictionaries $GIT_NEEDED_SUBMODULES"
4885 AC_SUBST(WITH_MYSPELL_DICTS)
4887 # There are no "system" myspell, hyphen or mythes dictionaries on OS X, Windows, Android or iOS.
4888 if test $_os = Darwin -o $_os = WINNT -o $_os = iOS -o $_os = Android; then
4889 if test "$with_system_dicts" = yes; then
4890 AC_MSG_ERROR([There are no system dicts on this OS in the formats the 3rd-party libs we use expect]);
4892 with_system_dicts=no
4895 AC_MSG_CHECKING([whether to use dicts from external paths])
4896 if test -z "$with_system_dicts" -o "$with_system_dicts" != "no"; then
4897 AC_MSG_RESULT([yes])
4899 AC_MSG_CHECKING([for spelling dictionary directory])
4900 if test -n "$with_external_dict_dir"; then
4901 DICT_SYSTEM_DIR=file://$with_external_dict_dir
4903 DICT_SYSTEM_DIR=file:///usr/share/hunspell
4904 if test ! -d /usr/share/hunspell -a -d /usr/share/myspell; then
4905 DICT_SYSTEM_DIR=file:///usr/share/myspell
4908 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
4909 AC_MSG_CHECKING([for hyphenation patterns directory])
4910 if test -n "$with_external_hyph_dir"; then
4911 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
4913 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
4915 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
4916 AC_MSG_CHECKING([for thesaurus directory])
4917 if test -n "$with_external_thes_dir"; then
4918 THES_SYSTEM_DIR=file://$with_external_thes_dir
4920 THES_SYSTEM_DIR=file:///usr/share/mythes
4922 AC_MSG_RESULT([$THES_SYSTEM_DIR])
4927 AC_SUBST(SYSTEM_DICTS)
4928 AC_SUBST(DICT_SYSTEM_DIR)
4929 AC_SUBST(HYPH_SYSTEM_DIR)
4930 AC_SUBST(THES_SYSTEM_DIR)
4932 dnl ===================================================================
4933 AC_MSG_CHECKING([whether to enable pch feature])
4934 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
4935 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
4937 AC_MSG_RESULT([yes])
4938 elif test "$GCC" = "yes"; then
4940 AC_MSG_RESULT([yes])
4943 AC_MSG_ERROR([Precompiled header not yet supported for your platform/compiler])
4949 AC_SUBST(ENABLE_PCH)
4951 dnl ===================================================================
4952 dnl Search all the common names for GNU make
4953 dnl ===================================================================
4954 AC_MSG_CHECKING([for GNU make])
4956 # try to use our own make if it is available and GNUMAKE was not already defined
4957 if test -z "$GNUMAKE"; then
4958 if test -x "/opt/lo/bin/make"; then
4959 GNUMAKE="/opt/lo/bin/make"
4963 for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do
4964 if test -n "$a"; then
4965 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
4966 if test $? -eq 0; then
4972 AC_MSG_RESULT($GNUMAKE)
4973 if test -z "$GNUMAKE"; then
4974 AC_MSG_ERROR([not found. install GNU make.])
4979 AC_MSG_CHECKING([the GNU make version])
4980 _make_version=`$GNUMAKE --version | grep GNU | $GREP -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
4981 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
4982 if test "$_make_longver" -ge "038200"; then
4983 AC_MSG_RESULT([$GNUMAKE $_make_version])
4985 elif test "$_make_longver" -ge "038100"; then
4986 if test "$build_os" = "cygwin"; then
4987 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.82 needed])
4989 AC_MSG_RESULT([$GNUMAKE $_make_version])
4991 dnl ===================================================================
4992 dnl Search all the common names for sha1sum
4993 dnl ===================================================================
4994 AC_CHECK_PROGS(SHA1SUM, sha1sum sha1 shasum openssl)
4995 if test -z "$SHA1SUM"; then
4996 AC_MSG_ERROR([install the approproate SHA-1 checksumming program for this OS])
4997 elif test "$SHA1SUM" = "openssl"; then
4998 SHA1SUM="openssl sha1"
5000 AC_MSG_CHECKING([for GNU make bug 20033])
5001 TESTGMAKEBUG20033=`mktemp -d tmp.XXXXXX`
5002 $SED -e "s/<TAB>/$TAB/g" > $TESTGMAKEBUG20033/Makefile << EOF
5003 A := \$(wildcard *.a)
5007 <TAB>@echo survived bug20033.
5011 <TAB>@touch 1.a 2.a 3.a 4.a 5.a 6.a
5024 <TAB>\$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | $SHA1SUM))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\
5025 <TAB>\$(call d1,\$(CHECKSUM)),\
5026 <TAB>\$(call d2,\$(CHECKSUM)))
5028 if test -z "`(cd $TESTGMAKEBUG20033 && $GNUMAKE setup && $GNUMAKE -j)|grep survived`"; then
5029 no_parallelism_make="YES"
5030 AC_MSG_RESULT([yes, disable parallelism])
5032 AC_MSG_RESULT([no, keep parallelism enabled])
5034 rm -rf $TESTGMAKEBUG20033
5036 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
5039 # find if gnumake support file function
5040 AC_MSG_CHECKING([whether GNU make supports the 'file' function])
5041 TESTGMAKEFILEFUNC="`mktemp -d -t tst.XXXXXX`"
5042 $SED -e "s/<TAB>/$TAB/" > $TESTGMAKEFILEFUNC/Makefile << EOF
5043 \$(file >test.txt,Success )
5050 $GNUMAKE -C $TESTGMAKEFILEFUNC 2>/dev/null 1>&2
5051 if test -f $TESTGMAKEFILEFUNC/test.txt; then
5052 HAVE_GNUMAKE_FILE_FUNC=TRUE
5053 AC_MSG_RESULT([yes])
5057 rm -rf $TESTGMAKEFILEFUNC
5058 AC_SUBST(HAVE_GNUMAKE_FILE_FUNC)
5061 _make_ver_check=`$GNUMAKE --version | grep LibreOffice`
5064 if test "$_make_ver_check" = ""; then
5068 HAVE_LD_HASH_STYLE=FALSE
5069 WITH_LINKER_HASH_STYLE=
5070 AC_MSG_CHECKING( for --hash-style gcc linker support )
5071 if test "$GCC" = "yes"; then
5072 if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes"; then
5073 hash_styles="gnu sysv"
5074 elif test "$with_linker_hash_style" = "no"; then
5077 hash_styles="$with_linker_hash_style"
5080 for hash_style in $hash_styles; do
5081 test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
5082 hash_style_ldflags_save=$LDFLAGS
5083 LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
5085 AC_LINK_IFELSE([AC_LANG_PROGRAM(
5091 [ if ./conftest$EXEEXT; then
5092 HAVE_LD_HASH_STYLE=TRUE
5093 WITH_LINKER_HASH_STYLE=$hash_style
5095 [HAVE_LD_HASH_STYLE=FALSE])
5096 LDFLAGS=$hash_style_ldflags_save
5099 if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
5100 AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
5104 LDFLAGS=$hash_style_ldflags_save
5108 AC_SUBST(HAVE_LD_HASH_STYLE)
5109 AC_SUBST(WITH_LINKER_HASH_STYLE)
5111 dnl ===================================================================
5112 dnl Check whether there's a Perl version available.
5113 dnl ===================================================================
5114 if test -z "$with_perl_home"; then
5115 AC_PATH_PROG(PERL, perl)
5117 test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
5118 _perl_path="$with_perl_home/bin/perl"
5119 if test -x "$_perl_path"; then
5122 AC_MSG_ERROR([$_perl_path not found])
5126 dnl ===================================================================
5127 dnl Testing for Perl version 5 or greater.
5128 dnl $] is the Perl version variable, it is returned as an integer
5129 dnl ===================================================================
5130 if test "$PERL"; then
5131 AC_MSG_CHECKING([the Perl version])
5132 ${PERL} -e "exit($]);"
5134 if test "$_perl_version" -lt 5; then
5135 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
5137 AC_MSG_RESULT([checked (perl $_perl_version)])
5139 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
5142 dnl ===================================================================
5143 dnl Testing for required Perl modules
5144 dnl ===================================================================
5146 AC_MSG_CHECKING([for required Perl modules])
5147 if `$PERL -e 'use Archive::Zip; use Cwd; use Digest::MD5'>/dev/null 2>&1`; then
5148 AC_MSG_RESULT([all modules found])
5150 AC_MSG_RESULT([failed to find some modules])
5151 # Find out which modules are missing.
5152 missing_perl_modules=
5153 if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then
5154 missing_perl_modules=Archive::Zip
5156 if ! `$PERL -e 'use Cwd;'>/dev/null 2>&1`; then
5157 missing_perl_modules="$missing_perl_modules Cwd"
5159 if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then
5160 missing_perl_modules="$missing_perl_modules Digest::MD5"
5163 The missing Perl modules are: $missing_perl_modules
5164 Install them as superuser/administrator with "cpan -i $missing_perl_modules"])
5167 dnl ===================================================================
5168 dnl Check for pkg-config
5169 dnl ===================================================================
5170 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5174 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5176 # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
5177 # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
5178 # explicitly. Or put /path/to/compiler in PATH yourself.
5180 AC_CHECK_TOOL(AR,ar)
5181 AC_CHECK_TOOL(NM,nm)
5182 AC_CHECK_TOOL(OBJDUMP,objdump)
5183 AC_CHECK_TOOL(RANLIB,ranlib)
5184 AC_CHECK_TOOL(STRIP,strip)
5185 if test "$_os" = "WINNT"; then
5186 AC_CHECK_TOOL(DLLTOOL,dlltool)
5187 AC_CHECK_TOOL(WINDRES,windres)
5194 AC_SUBST(PKG_CONFIG)
5199 dnl ===================================================================
5200 dnl pkg-config checks on Mac OS X
5201 dnl ===================================================================
5203 if test $_os = Darwin; then
5204 AC_MSG_CHECKING([for bogus pkg-config])
5205 if test -n "$PKG_CONFIG"; then
5206 if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | $GREP -q Mono.framework; then
5207 AC_MSG_ERROR([yes, from Mono. This *will* break the build. Please remove or hide $PKG_CONFIG])
5209 if test "$enable_bogus_pkg_config" = "yes"; then
5210 AC_MSG_RESULT([yes, user-approved from unknown origin.])
5212 AC_MSG_ERROR([yes, from unknown origin. This *will* break the build. Please remove or hide $PKG_CONFIG])
5216 AC_MSG_RESULT([no, good])
5222 # Return value: $csctest
5226 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client/InstallPath"
5227 if test -n "$regvalue"; then
5235 # Return value: $altest
5239 for x in `ls /proc/registry32/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft\ SDKs/Windows`; do
5240 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/$x/WinSDK-NetFx40Tools/InstallationFolder"
5241 if test -n "$regvalue" -a \( -f "$regvalue/al.exe" -o -f "$regvalue/bin/al.exe" \); then
5250 # Return value: $frametest (that's a silly name...)
5254 for ver in 1.1 2.0; do
5255 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/.NETFramework/sdkInstallRootv$ver
5256 if test -n "$regvalue"; then
5263 find_winsdk_version()
5265 # Args: $1 : SDK version as in "6.0A", "7.0" etc
5266 # Return value: $winsdktest
5270 # Why we look for them in this particular order I don't know. But OTOH I
5273 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/InstallationFolder"
5274 if test -n "$regvalue"; then
5275 winsdktest=$regvalue
5280 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot"
5281 if test -n "$regvalue"; then
5282 winsdktest=$regvalue
5291 # Args: $1 (optional) : list of acceptable SDK versions
5292 # Return value: $winsdktest
5296 if test -n "$1"; then
5299 sdkversions="$WINDOWS_SDK_ACCEPTABLE_VERSIONS"
5302 for ver in $sdkversions; do
5303 find_winsdk_version $ver
5304 if test -n "$winsdktest"; then
5312 for ver in 10.0 11.0; do
5313 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VS/MSMDir
5314 if test -n "$regvalue"; then
5315 if test -e "$regvalue/Microsoft_VC${VCVER}_CRT_x86.msm"; then
5321 if test -z "$msmdir"; then
5322 AC_MSG_NOTICE([no registry entry for Merge Module directory - trying "${COMMONPROGRAMFILES}/Merge Modules/"])
5323 msmdir="${COMMONPROGRAMFILES}/Merge Modules/"
5325 msmdir=`cygpath -m "$msmdir"`
5326 if test -z "$msmdir"; then
5327 if test "$ENABLE_RELEASE_BUILD" = "TRUE" ; then
5328 AC_MSG_ERROR([Merge modules not found in $msmdir])
5330 AC_MSG_WARN([Merge modules not found in $msmdir])
5336 find_msvc_x64_dlls()
5338 msvcdllpath="$VC_PRODUCT_DIR/redist/x64/Microsoft.VC${VCVER}.CRT"
5339 msvcdlls="msvcp${VCVER}.dll msvcr${VCVER}.dll"
5340 for dll in $msvcdlls; do
5341 if ! test -f "$msvcdllpath/$dll"; then
5342 AC_MSG_ERROR([can not find $dll in $msvcdllpath])
5347 if test "$build_os" = "cygwin"; then
5349 AC_MSG_CHECKING([for midl.exe])
5352 if test -f "$winsdktest/Bin/midl.exe"; then
5353 MIDL_PATH="$winsdktest/Bin"
5354 elif test -f "$winsdktest/Bin/$WINDOWS_SDK_ARCH/midl.exe"; then
5355 MIDL_PATH="$winsdktest/Bin/$WINDOWS_SDK_ARCH"
5357 if test ! -f "$MIDL_PATH/midl.exe"; then
5358 AC_MSG_ERROR([midl.exe not found in $winsdktest/Bin/$WINDOWS_SDK_ARCH, Windows SDK installation broken?])
5360 AC_MSG_RESULT([$MIDL_PATH/midl.exe])
5363 # Convert to posix path with 8.3 filename restrictions ( No spaces )
5364 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
5365 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
5368 AC_MSG_CHECKING([for csc.exe])
5370 if test -f "$csctest/csc.exe"; then
5373 if test ! -f "$CSC_PATH/csc.exe"; then
5374 AC_MSG_ERROR([csc.exe not found as $CSC_PATH/csc.exe])
5376 AC_MSG_RESULT([$CSC_PATH/csc.exe])
5379 CSC_PATH=`cygpath -d "$CSC_PATH"`
5380 CSC_PATH=`cygpath -u "$CSC_PATH"`
5383 AC_MSG_CHECKING([for al.exe])
5385 if test -f "$winsdktest/Bin/al.exe"; then
5386 AL_PATH="$winsdktest/Bin"
5387 elif test -f "$winsdktest/Bin/$WINDOWS_SDK_ARCH/al.exe"; then
5388 AL_PATH="$winsdktest/Bin/$WINDOWS_SDK_ARCH"
5391 if test -z "$AL_PATH"; then
5393 if test -f "$altest/bin/al.exe"; then
5394 AL_PATH="$altest/bin"
5395 elif test -f "$altest/al.exe"; then
5399 if test ! -f "$AL_PATH/al.exe"; then
5400 AC_MSG_ERROR([al.exe not found as $AL_PATH/al.exe])
5402 AC_MSG_RESULT([$AL_PATH/al.exe])
5405 AL_PATH=`cygpath -d "$AL_PATH"`
5406 AL_PATH=`cygpath -u "$AL_PATH"`
5408 dnl Check mscoree.lib / .NET Framework dir
5409 AC_MSG_CHECKING(.NET Framework)
5411 if test -f "$frametest/lib/mscoree.lib"; then
5412 DOTNET_FRAMEWORK_HOME="$frametest"
5415 if test -f "$winsdktest/lib/mscoree.lib" -o -f "$winsdktest/lib/win8/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
5416 DOTNET_FRAMEWORK_HOME="$winsdktest"
5420 if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib" -a ! -f "$DOTNET_FRAMEWORK_HOME/lib/win8/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
5421 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found])
5423 AC_MSG_RESULT(found)
5425 PathFormat "$MIDL_PATH"
5426 MIDL_PATH="$formatted_path"
5428 PathFormat "$AL_PATH"
5429 AL_PATH="$formatted_path"
5431 PathFormat "$DOTNET_FRAMEWORK_HOME"
5432 DOTNET_FRAMEWORK_HOME="$formatted_path"
5434 PathFormat "$CSC_PATH"
5435 CSC_PATH="$formatted_path"
5438 dnl ===================================================================
5439 dnl Check if stdc headers are available excluding MSVC.
5440 dnl ===================================================================
5441 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5445 dnl ===================================================================
5446 dnl Testing for C++ compiler and version...
5447 dnl ===================================================================
5449 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5450 # AC_PROG_CXX sets CXXFLAGS to -g -O2 if not set, avoid that
5451 save_CXXFLAGS=$CXXFLAGS
5453 CXXFLAGS=$save_CXXFLAGS
5455 if test -n "$CC" -a -z "$CXX"; then
5460 dnl check for GNU C++ compiler version
5461 if test "$GXX" = "yes"; then
5462 AC_MSG_CHECKING([the GNU C++ compiler version])
5464 _gpp_version=`$CXX -dumpversion`
5465 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
5467 if test "$_gpp_majmin" -lt "401"; then
5468 AC_MSG_ERROR([You need to use GNU C++ compiler version >= 4.1 to build LibreOffice, you have $_gpp_version.])
5470 AC_MSG_RESULT([checked (g++ $_gpp_version)])
5473 dnl see https://code.google.com/p/android/issues/detail?id=41770
5474 if test "$_gpp_majmin" -ge "401"; then
5478 AC_MSG_CHECKING([whether $CXX is broken with boost.thread])
5479 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
5480 #include <bits/c++config.h>]],[[
5481 #if !defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
5482 && !defined(_GLIBCXX__PTHREADS) \
5483 && !defined(_GLIBCXX_HAS_GTHREADS)
5486 ]])],[AC_MSG_RESULT([yes])
5487 glibcxx_threads=yes],[AC_MSG_RESULT([no])])
5489 if test $glibcxx_threads = yes; then
5490 BOOST_CXXFLAGS="-D_GLIBCXX_HAS_GTHREADS"
5494 AC_SUBST(BOOST_CXXFLAGS)
5497 # prefx CXX with ccache if needed
5499 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5500 if test "$CCACHE" != ""; then
5501 AC_MSG_CHECKING([whether $CXX is already ccached])
5503 save_CXXFLAGS=$CXXFLAGS
5504 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
5505 dnl an empty program will do, we're checking the compiler flags
5506 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
5507 [use_ccache=yes], [use_ccache=no])
5508 if test $use_ccache = yes; then
5509 AC_MSG_RESULT([yes])
5514 CXXFLAGS=$save_CXXFLAGS
5519 dnl ===================================================================
5520 dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
5521 dnl ===================================================================
5523 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5526 dnl Check whether there's a C pre-processor.
5527 dnl ===================================================================
5528 dnl When using SunStudio compiler, there is a bug with the cc
5529 dnl preprocessor, so use CC preprocessor as the cc preprocessor
5530 dnl See Issuezilla #445.
5531 dnl ===================================================================
5532 if test "$_os" = "SunOS"; then
5540 dnl ===================================================================
5541 dnl Find integral type sizes and alignments
5542 dnl ===================================================================
5544 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5546 AC_CHECK_SIZEOF(long)
5547 AC_CHECK_SIZEOF(short)
5548 AC_CHECK_SIZEOF(int)
5549 AC_CHECK_SIZEOF(long long)
5550 AC_CHECK_SIZEOF(double)
5551 AC_CHECK_SIZEOF(void*)
5553 SAL_TYPES_SIZEOFSHORT=$ac_cv_sizeof_short
5554 SAL_TYPES_SIZEOFINT=$ac_cv_sizeof_int
5555 SAL_TYPES_SIZEOFLONG=$ac_cv_sizeof_long
5556 SAL_TYPES_SIZEOFLONGLONG=$ac_cv_sizeof_long_long
5557 SAL_TYPES_SIZEOFPOINTER=$ac_cv_sizeof_voidp
5559 dnl Allow build without AC_CHECK_ALIGNOF, grrr
5560 m4_pattern_allow([AC_CHECK_ALIGNOF])
5561 m4_ifdef([AC_CHECK_ALIGNOF],
5563 AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
5564 AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
5565 AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
5566 AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
5569 case "$_os-$host_cpu" in
5571 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
5572 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
5573 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=4
5574 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=4
5577 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
5578 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
5579 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=8
5580 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=8
5583 if test -z "$ac_cv_alignof_short" -o \
5584 -z "$ac_cv_alignof_int" -o \
5585 -z "$ac_cv_alignof_long" -o \
5586 -z "$ac_cv_alignof_double"; then
5587 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.])
5593 SAL_TYPES_ALIGNMENT2=$ac_cv_alignof_short
5594 SAL_TYPES_ALIGNMENT4=$ac_cv_alignof_int
5595 if test $ac_cv_sizeof_long -eq 8; then
5596 SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_long
5597 elif test $ac_cv_sizeof_double -eq 8; then
5598 SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_double
5600 AC_MSG_ERROR([Cannot find alignment of 8 byte types.])
5603 dnl Check for large file support
5605 if test -n "$ac_cv_sys_file_offset_bits" -a "$ac_cv_sys_file_offset_bits" != "no"; then
5606 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5608 if test -n "$ac_cv_sys_large_files" -a "$ac_cv_sys_large_files" != "no"; then
5609 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
5613 SAL_TYPES_SIZEOFSHORT=2
5614 SAL_TYPES_SIZEOFINT=4
5615 SAL_TYPES_SIZEOFLONG=4
5616 SAL_TYPES_SIZEOFLONGLONG=8
5617 if test "$BITNESS_OVERRIDE" = ""; then
5618 SAL_TYPES_SIZEOFPOINTER=4
5620 SAL_TYPES_SIZEOFPOINTER=8
5622 SAL_TYPES_ALIGNMENT2=2
5623 SAL_TYPES_ALIGNMENT4=4
5624 SAL_TYPES_ALIGNMENT8=8
5627 AC_SUBST(LFS_CFLAGS)
5629 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFSHORT,$SAL_TYPES_SIZEOFSHORT)
5630 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFINT,$SAL_TYPES_SIZEOFINT)
5631 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONG,$SAL_TYPES_SIZEOFLONG)
5632 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONGLONG,$SAL_TYPES_SIZEOFLONGLONG)
5633 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFPOINTER,$SAL_TYPES_SIZEOFPOINTER)
5634 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT2,$SAL_TYPES_ALIGNMENT2)
5635 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT4,$SAL_TYPES_ALIGNMENT4)
5636 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT8,$SAL_TYPES_ALIGNMENT8)
5638 dnl ===================================================================
5639 dnl Check whether to enable runtime optimizations
5640 dnl ===================================================================
5641 ENABLE_RUNTIME_OPTIMIZATIONS=
5642 AC_MSG_CHECKING([whether to enable runtime optimizations])
5643 if test -z "$enable_runtime_optimizations"; then
5647 enable_runtime_optimizations=no
5653 if test "$enable_runtime_optimizations" != no; then
5654 ENABLE_RUNTIME_OPTIMIZATIONS=TRUE
5655 AC_DEFINE(ENABLE_RUNTIME_OPTIMIZATIONS)
5656 AC_MSG_RESULT([yes])
5660 AC_SUBST([ENABLE_RUNTIME_OPTIMIZATIONS])
5662 dnl ===================================================================
5663 dnl Check if valgrind headers are available
5664 dnl ===================================================================
5666 if test "$cross_compiling" != yes; then
5667 prev_cppflags=$CPPFLAGS
5668 # Is VALGRIND_CFLAGS something one is supposed to have in the environment,
5669 # or where does it come from?
5670 CPPFLAGS="$CPPFLAGS $VALGRIND_CFLAGS"
5671 AC_CHECK_HEADER([valgrind/valgrind.h],
5672 [ENABLE_VALGRIND=TRUE])
5673 CPPFLAGS=$prev_cppflags
5675 AC_SUBST([ENABLE_VALGRIND])
5676 if test -z "$ENABLE_VALGRIND"; then
5679 AC_SUBST([VALGRIND_CFLAGS])
5682 dnl ===================================================================
5683 dnl Check if SDT probes (for systemtap, gdb, dtrace) are available
5684 dnl ===================================================================
5686 # We need at least the sys/sdt.h include header.
5687 AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='TRUE'], [SDT_H_FOUND='FALSE'])
5688 if test "$SDT_H_FOUND" = "TRUE"; then
5689 # Found sys/sdt.h header, now make sure the c++ compiler works.
5690 # Old g++ versions had problems with probes in constructors/destructors.
5691 AC_MSG_CHECKING([working sys/sdt.h and c++ support])
5693 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5694 #include <sys/sdt.h>
5702 ProbeClass(int& v, const char *n) : ref(v), name(n)
5704 DTRACE_PROBE2(_test_, cons, name, ref);
5707 void method(int min)
5709 DTRACE_PROBE3(_test_, meth, name, ref, min);
5715 DTRACE_PROBE2(_test_, dest, name, ref);
5720 DTRACE_PROBE1(_test_, call, i);
5721 ProbeClass inst = ProbeClass(i, "call");
5723 ]])], [AC_MSG_RESULT([yes]); AC_DEFINE([USE_SDT_PROBES])],
5724 [AC_MSG_RESULT([no, sdt.h or c++ compiler too old])])
5727 AC_CONFIG_HEADERS([config_host/config_probes.h])
5729 dnl ===================================================================
5730 dnl Set the MinGW sys-root
5731 dnl ===================================================================
5732 if test "$WITH_MINGW" = "yes"; then
5733 AC_MSG_CHECKING([for MinGW sysroot])
5734 sysroot=`$CC -print-sysroot`
5735 AS_IF([test -d "$sysroot"/mingw],
5736 [MINGW_SYSROOT="$sysroot"/mingw
5737 AC_MSG_RESULT([$MINGW_SYSROOT])],
5738 [AC_MSG_RESULT([not found])
5739 AC_MSG_ERROR([cannot determine MinGW sysroot])])
5741 AC_SUBST([MINGW_DLLS])
5742 AC_SUBST([MINGW_SYSROOT])
5744 dnl ===================================================================
5745 dnl Set the MinGW include directories
5746 dnl ===================================================================
5747 if test "$WITH_MINGW" = "yes"; then
5748 AC_MSG_CHECKING([for MinGW include path])
5749 cat >conftest.$ac_ext <<_ACEOF
5751 #include <bits/c++config.h>
5753 _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`
5755 if test -z "$_mingw_lib_include_path"; then
5756 _mingw_lib_include_path="NO_LIB_INCLUDE"
5757 AC_MSG_RESULT([no MinGW include path])
5759 AC_MSG_RESULT([$_mingw_lib_include_path])
5761 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
5762 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
5766 AC_MSG_CHECKING([for dynamic libgcc])
5767 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5769 using namespace std;
5770 ]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[
5771 MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's@.*DLL Name: @@'`
5772 if test -n "$MINGW_GCCDLL"; then
5773 MINGW_SHARED_GCCLIB=TRUE
5774 AC_MSG_RESULT([ $MINGW_GCCDLL])
5776 MINGW_SHARED_GCCLIB=
5779 ],[ AC_MSG_RESULT([no])
5783 AC_MSG_CHECKING([for dynamic libstdc++])
5784 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5786 using namespace std;
5787 ]], [[ cout << "Hello there." << endl; ]])],[
5788 MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's@.*DLL Name: @@'`
5789 if test -n "$MINGW_GXXDLL"; then
5790 mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
5791 mingw_gxxdll_root=${mingw_gxxdll_root#lib}
5792 if test "$CROSS_COMPILING" = "TRUE"; then
5794 mingw_gxxdll_root=${mingw_gxxdll_root%-[[0-9]]}
5796 MINGW_SHARED_LIBSTDCPP=-l$mingw_gxxdll_root
5797 MINGW_SHARED_GXXLIB=TRUE
5798 AC_MSG_RESULT([$MINGW_GXXDLL])
5800 MINGW_SHARED_GXXLIB=
5803 ],[ AC_MSG_RESULT([no])
5809 AC_SUBST(MINGW_SHARED_GCCLIB)
5810 AC_SUBST(MINGW_SHARED_GXXLIB)
5811 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
5812 AC_SUBST(MINGW_GCCDLL)
5813 AC_SUBST(MINGW_GXXDLL)
5816 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
5817 AC_DEFINE(HAVE_FMERGENEUTRALITEMS)
5820 if test "$WITH_MINGW" = "yes"; then
5821 AC_MSG_CHECKING([for fMergeNeutralItems in SCRIPT_CONTROL])
5822 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
5828 c.fMergeNeutralItems = 1;
5832 AC_DEFINE(HAVE_FMERGENEUTRALITEMS)
5834 [AC_MSG_RESULT(no)])
5837 dnl ===================================================================
5838 dnl Extra checking for the SunOS compiler
5839 dnl ===================================================================
5840 if test "$_os" = "SunOS"; then
5841 dnl SunStudio C++ compiler packaged with SunStudio C compiler
5842 if test "$CC" = "cc"; then
5843 AC_MSG_CHECKING([SunStudio C++ Compiler])
5844 if test "$CXX" != "CC"; then
5845 AC_MSG_WARN([SunStudio C++ was not found])
5846 add_warning "SunStudio C++ was not found"
5848 AC_MSG_RESULT([checked])
5853 dnl *************************************************************
5854 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
5855 dnl *************************************************************
5856 if test "$WITH_MINGW" = "yes"; then
5857 AC_MSG_CHECKING([exception type])
5859 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
5861 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
5863 ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
5865 AC_MSG_RESULT($exceptions_type)
5869 EXCEPTIONS="$exceptions_type"
5870 AC_SUBST(EXCEPTIONS)
5872 dnl ===================================================================
5873 dnl thread-safe statics
5874 dnl ===================================================================
5875 AC_MSG_CHECKING([whether $CXX supports thread safe statics])
5876 unset HAVE_THREADSAFE_STATICS
5877 if test "$GCC" = "yes"; then
5878 dnl -fthreadsafe-statics is available since GCC 4, so always available for
5879 dnl us. However, some C++ runtimes use a single lock for all static
5880 dnl variables, which can cause deadlock in multi-threaded applications.
5881 dnl This is not easily tested here; for POSIX-based systems, if executing
5882 dnl the following C++ program does not terminate then the tool chain
5883 dnl apparently has this problem:
5885 dnl #include <pthread.h>
5886 dnl int h() { return 0; }
5887 dnl void * g(void * unused) {
5888 dnl static int n = h();
5893 dnl pthread_create(&t, 0, g, 0);
5894 dnl pthread_join(t, 0);
5898 dnl static int n = f();
5902 dnl Mac OS X up to at least 10.7.1 is known to have this problem, as is at
5903 dnl least one instance of GCC 4.2.4 (used on a "Linux ooobuild1.osuosl.org
5904 dnl 2.6.9-101.plus.c4smp #1 SMP Thu Jul 21 19:08:15 EDT 2011 i686 i686 i386
5905 dnl GNU/Linux" machine); see the definition of __cxa_guard_acquire in GCC's
5906 dnl libstdc++-v3/libsupc++/guard.cc for what #ifdefs actually make a
5907 dnl difference there. Conservative advice from Jakub Jelinek is to assume
5908 dnl it working in GCC >= 4.3, so conservative way to check here is to use
5909 dnl GCC_VERSION for GCC but resort to __GLIBCXX__ corresponding to libstdc++
5910 dnl shipped with GCC 4.3.0 (cf. <http://gcc.gnu.org/onlinedocs/libstdc++/
5911 dnl manual/abi.html#abi.versioning.history>; 4.3.0 is 20080306, 4.2.4 is
5912 dnl 20080519, 4.3.1 is 20080606) for Clang (for which GCC_VERSION is notoriously
5914 if test "$_os" != Darwin -a "$_os" != Android; then
5915 if test "$COM_GCC_IS_CLANG" = TRUE; then
5917 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5919 #if !defined __GLIBCXX__ ||(__GLIBCXX__ < 20080606 && __GLIBCXX__ != 20080306)
5922 ]])],[HAVE_THREADSAFE_STATICS=TRUE],[])
5924 elif test "${GCC_VERSION?}" -ge 0403; then
5925 HAVE_THREADSAFE_STATICS=TRUE
5928 if test "$HAVE_THREADSAFE_STATICS" = TRUE; then
5929 AC_DEFINE(HAVE_THREADSAFE_STATICS)
5930 AC_MSG_RESULT([yes])
5932 AC_MSG_RESULT([broken (i.e., no)])
5935 AC_MSG_RESULT([unknown (assuming no)])
5937 AC_SUBST(HAVE_THREADSAFE_STATICS)
5939 dnl ===================================================================
5940 dnl visibility and other gcc features
5941 dnl ===================================================================
5942 if test "$GCC" = "yes"; then
5943 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
5945 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
5946 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_VISIBILITY_FEATURE=TRUE ],[])
5949 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
5950 AC_MSG_RESULT([yes])
5955 AC_MSG_CHECKING([whether $CC supports -Wno-long-double])
5957 CFLAGS="$CFLAGS -Werror -Wno-long-double"
5958 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_NO_LONG_DOUBLE=TRUE ],[])
5960 if test "$HAVE_GCC_NO_LONG_DOUBLE" = "TRUE"; then
5961 AC_MSG_RESULT([yes])
5966 AC_MSG_CHECKING([whether $CC supports -mno-avx])
5968 CFLAGS="$CFLAGS -Werror -mno-avx"
5969 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
5971 if test "$HAVE_GCC_AVX" = "TRUE"; then
5972 AC_MSG_RESULT([yes])
5977 AC_MSG_CHECKING([whether $CC supports atomic functions])
5978 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
5980 if (__sync_add_and_fetch(&v, 1) != 1 ||
5981 __sync_sub_and_fetch(&v, 1) != 0)
5983 __sync_synchronize();
5984 if (__sync_val_compare_and_swap(&v, 0, 1) != 0 ||
5988 ]])],[HAVE_GCC_BUILTIN_ATOMIC=TRUE],[])
5989 if test "$HAVE_GCC_BUILTIN_ATOMIC" = "TRUE"; then
5990 AC_MSG_RESULT([yes])
5991 AC_DEFINE(HAVE_GCC_BUILTIN_ATOMIC)
5997 [whether $CC supports pragma GCC diagnostic error/ignored/warning])
5999 CFLAGS="$CFLAGS -Werror -Wunknown-pragmas -Wunused-parameter"
6000 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6001 #pragma GCC diagnostic ignored "-Wunused-parameter"
6002 void dummy(int n) {}
6004 AC_DEFINE([HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY],[1])
6005 AC_MSG_RESULT([yes])
6006 ], [AC_MSG_RESULT([no])])
6009 AC_MSG_CHECKING([whether $CC supports pragma GCC diagnostic push/pop])
6011 CFLAGS="$CFLAGS -Werror -Wunknown-pragmas -Wunused-parameter"
6012 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6013 #pragma GCC diagnostic push
6014 #pragma GCC diagnostic ignored "-Wunused-parameter"
6015 void dummy(int n) {}
6016 #pragma GCC diagnostic pop
6018 AC_DEFINE([HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE],[1])
6019 AC_MSG_RESULT([yes])
6020 ], [AC_MSG_RESULT([no])])
6023 AC_MSG_CHECKING([whether $CC supports __attribute__((deprecated(message)))])
6025 CFLAGS="$CFLAGS -Werror"
6026 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6027 __attribute__((deprecated("test"))) void f();
6029 AC_DEFINE([HAVE_GCC_DEPRECATED_MESSAGE],[1])
6030 AC_MSG_RESULT([yes])
6031 ], [AC_MSG_RESULT([no])])
6034 AC_MSG_CHECKING([whether $CXX declares __cxa_allocate_exception in cxxabi.h])
6036 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6038 void * f() { return __cxxabiv1::__cxa_allocate_exception(0); }
6040 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION],[1])
6041 AC_MSG_RESULT([yes])
6042 ], [AC_MSG_RESULT([no])])
6045 AC_MSG_CHECKING([whether $CXX declares __cxa_get_globals in cxxabi.h])
6047 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6049 void * f() { return __cxxabiv1::__cxa_get_globals(); }
6051 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS],[1])
6052 AC_MSG_RESULT([yes])
6053 ], [AC_MSG_RESULT([no])])
6056 AC_MSG_CHECKING([whether $CXX declares __cxa_throw in cxxabi.h])
6058 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6060 void f() { __cxxabiv1::__cxa_throw(0, 0, 0); }
6062 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_THROW],[1])
6063 AC_MSG_RESULT([yes])
6064 ], [AC_MSG_RESULT([no])])
6067 AC_MSG_CHECKING([whether $CXX supports __attribute__((warn_unused))])
6069 save_CXXFLAGS=$CXXFLAGS
6070 CXXFLAGS="$CFLAGS -Werror -Wunknown-pragmas"
6071 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6072 struct __attribute__((warn_unused)) dummy {};
6074 AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED],[1])
6075 AC_MSG_RESULT([yes])
6076 ], [AC_MSG_RESULT([no])])
6077 CXXFLAGS=$save_CXXFLAGS
6080 AC_MSG_CHECKING([whether STL uses __attribute__((warn_unused))])
6082 save_CXXFLAGS=$CXXFLAGS
6083 CXXFLAGS="$CFLAGS -Werror -Wunused"
6084 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6086 void f() { std::string s; }
6090 AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL],[1])
6091 AC_MSG_RESULT([yes])])
6092 CXXFLAGS=$save_CXXFLAGS
6096 AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
6097 AC_SUBST(HAVE_GCC_AVX)
6098 AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
6100 dnl ===================================================================
6101 dnl Identify the C++ library
6102 dnl ===================================================================
6104 AC_MSG_CHECKING([What the C++ library is])
6106 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6112 [CPP_LIBRARY=GLIBCXX
6113 cpp_library_name="GNU libstdc++"
6115 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6117 #ifndef _LIBCPP_VERSION
6122 cpp_library_name="LLVM libc++"
6124 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6131 cpp_library_name="Microsoft"
6133 AC_MSG_ERROR([Could not figure out what C++ library this is]))))
6134 AC_MSG_RESULT([$cpp_library_name])
6136 AC_SUBST(CPP_LIBRARY)
6138 dnl ===================================================================
6140 dnl ===================================================================
6144 if test "$COM" = MSC; then
6145 AC_MSG_CHECKING([whether $CXX supports C++11])
6147 # MSVC supports (a subset of) CXX11 without any switch
6150 elif test "$GCC" = "yes"; then
6152 AC_MSG_CHECKING([whether $CXX supports C++11])
6153 for flag in -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do
6154 save_CXXFLAGS=$CXXFLAGS
6155 CXXFLAGS="$CXXFLAGS $flag -Werror"
6157 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void f() {}]])],[CXXFLAGS_CXX11=$flag])
6159 CXXFLAGS=$save_CXXFLAGS
6160 if test -n "$CXXFLAGS_CXX11"; then
6165 if test "$HAVE_CXX11" = TRUE; then
6166 AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
6172 if test $CPP_LIBRARY = GLIBCXX -a "$HAVE_CXX11" = TRUE; then
6173 AC_MSG_CHECKING([whether using C++11 causes libstdc++ 4.7.0/4.7.1 ABI breakage])
6175 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6177 #if !defined(__GLIBCXX__)
6179 #elif __GLIBCXX__ < 20111004
6180 /* before breakage */
6181 #elif __GLIBCXX__ > 20120703
6182 /* after breakage */
6186 ]])], [AC_MSG_RESULT(no, ok)],
6187 [AC_MSG_RESULT(yes, disabling C++11)
6192 if test "$HAVE_CXX11" = TRUE; then
6193 AC_MSG_CHECKING([whether $CXX supports C++11 without Language Defect 757])
6194 save_CXXFLAGS=$CXXFLAGS
6195 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6198 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6201 template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
6217 a thinga[]={{0,0}, {1,1}};
6218 b thingb[]={{0,0}, {1,1}};
6219 size_t i = sizeof(sal_n_array_size(thinga));
6220 size_t j = sizeof(sal_n_array_size(thingb));
6221 return !(i != 0 && j != 0);
6223 ], [ AC_MSG_RESULT(yes) ],
6228 CXXFLAGS=$save_CXXFLAGS
6231 if test "$HAVE_CXX11" = TRUE; then
6232 AC_MSG_CHECKING([whether $CXX supports C++11 without __float128 compile error])
6233 save_CXXFLAGS=$CXXFLAGS
6234 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6237 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6239 // some Clang fail when compiling against libstdc++ headers with -std=gnu++0x
6242 ],[ AC_MSG_RESULT(yes) ],
6245 # The only reason why libstdc++ headers fail with Clang in C++11 mode is because
6246 # they use the __float128 type that Clang doesn't know (libstdc++ checks whether
6247 # __float128 is available during its build, but it's usually built using GCC,
6248 # and so c++config.h hardcodes __float128 being supported). As the only place
6249 # where __float128 is actually used is in a template specialization,
6250 # -D__float128=void will avoid the problem there while still causing a problem
6251 # if somebody actually uses the type.
6252 AC_MSG_CHECKING([whether -D__float128=void workaround helps])
6253 CXXFLAGS="$CXXFLAGS -D__float128=void"
6254 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6256 // some Clang fail when compiling against libstdc++ headers with -std=gnu++0x
6262 CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -D__float128=void"
6271 CXXFLAGS=$save_CXXFLAGS
6274 if test "$HAVE_CXX11" = "TRUE"; then
6275 AC_DEFINE(HAVE_CXX11)
6276 elif test -n "$CXXFLAGS_CXX11"; then
6277 AC_MSG_NOTICE([Disabling C++11 support])
6279 elif test "$CPP_LIBRARY" = LIBCPP -a $_os = Darwin; then
6280 AC_MSG_ERROR([Selected libc++ but C++11 support broken])
6283 AC_SUBST(CXXFLAGS_CXX11)
6284 AC_SUBST(HAVE_CXX11)
6286 AC_MSG_CHECKING([for std::shared_ptr])
6287 if test "$HAVE_CXX11" = "TRUE" -a "$GCC" = "yes"; then
6288 save_CXXFLAGS=$CXXFLAGS
6289 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6291 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
6293 using std::shared_ptr;
6295 [ have_std_shared_ptr=yes ],
6296 [ have_std_shared_ptr=no ]
6299 CXXFLAGS=$save_CXXFLAGS
6300 elif test "$COM" = "MSC"; then
6301 have_std_shared_ptr=yes
6303 have_std_shared_ptr=no
6305 AC_MSG_RESULT([$have_std_shared_ptr])
6307 dnl ==================================
6308 dnl Check for C++11 "= delete" support
6309 dnl ==================================
6311 if test "$HAVE_CXX11" = "TRUE"; then
6312 AC_MSG_CHECKING([whether $CXX supports C++11 = delete syntax])
6313 save_CXXFLAGS=$CXXFLAGS
6314 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6316 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6319 void test() = delete;
6321 ]])],[HAVE_CXX11_DELETE=TRUE],[])
6324 CXXFLAGS=$save_CXXFLAGS
6325 if test "$HAVE_CXX11_DELETE" = "TRUE"; then
6326 AC_MSG_RESULT([yes])
6327 AC_DEFINE([HAVE_CXX11_DELETE])
6333 dnl ==================================
6334 dnl Check for C++11 "override" support
6335 dnl ==================================
6337 if test "$HAVE_CXX11" = "TRUE"; then
6338 AC_MSG_CHECKING([whether $CXX supports C++11 "override" syntax])
6339 save_CXXFLAGS=$CXXFLAGS
6340 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6342 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6345 virtual void test();
6350 virtual void test() override;
6352 ]])],[HAVE_CXX11_OVERRIDE=TRUE],[])
6355 CXXFLAGS=$save_CXXFLAGS
6356 if test "$HAVE_CXX11_OVERRIDE" = "TRUE"; then
6357 AC_MSG_RESULT([yes])
6358 AC_DEFINE([HAVE_CXX11_OVERRIDE])
6364 dnl ==================================
6365 dnl Check for C++11 "final" support
6366 dnl ==================================
6368 if test "$HAVE_CXX11" = "TRUE"; then
6369 AC_MSG_CHECKING([whether $CXX supports C++11 "final" syntax])
6370 save_CXXFLAGS=$CXXFLAGS
6371 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6373 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6374 // First check that this correct program that uses "final" compiles
6381 virtual void test();
6388 ]])],[have_final=yes],[])
6390 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6391 // Then check that the "final" works as expected,
6392 // that this program fails to compile
6400 ]])],[],[final_class_works=yes])
6402 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6403 // Also this should fail to compile
6406 virtual void test();
6418 ]])],[],[final_method_works=yes])
6421 CXXFLAGS=$save_CXXFLAGS
6423 if test "$have_final" = yes -a "$final_class_works" = yes -a "$final_method_works" = yes; then
6424 AC_MSG_RESULT([yes])
6425 AC_DEFINE([HAVE_CXX11_FINAL])
6431 dnl ===================================================================
6432 dnl Check for C++11 perfect forwarding support
6433 dnl ===================================================================
6434 if test "$HAVE_CXX11" = "TRUE"; then
6435 AC_MSG_CHECKING([whether $CXX supports C++11 perfect forwarding])
6436 save_CXXFLAGS=$CXXFLAGS
6437 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6439 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6441 template<typename T, typename... Args> T * f(Args &&... v) {
6442 return new T(std::forward<Args>(v)...);
6446 ]])], [perfect_forwarding=yes], [perfect_forwarding=no])
6448 CXXFLAGS=$save_CXXFLAGS
6449 AC_MSG_RESULT([$perfect_forwarding])
6450 if test "$perfect_forwarding" = yes; then
6451 AC_DEFINE([HAVE_CXX11_PERFECT_FORWARDING])
6455 HAVE_GCC_PRAGMA_OPERATOR=
6456 dnl _Pragma support (may require C++11)
6457 if test "$GCC" = "yes"; then
6458 AC_MSG_CHECKING([whether $CXX supports _Pragma operator])
6460 save_CXXFLAGS=$CXXFLAGS
6461 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 -Werror"
6462 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6463 _Pragma("GCC diagnostic ignored \"-Wformat\"")
6465 AC_DEFINE([HAVE_GCC_PRAGMA_OPERATOR],[1])
6466 HAVE_GCC_PRAGMA_OPERATOR=1
6467 AC_MSG_RESULT([yes])
6468 ], [AC_MSG_RESULT([no])])
6470 CXXFLAGS=$save_CXXFLAGS
6472 AC_SUBST(HAVE_GCC_PRAGMA_OPERATOR)
6474 dnl ===================================================================
6475 dnl system stl sanity tests
6476 dnl ===================================================================
6477 HAVE_GCC_VISIBILITY_BROKEN=
6478 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \); then
6482 save_CPPFLAGS="$CPPFLAGS"
6483 if test -n "$MACOSX_SDK_PATH"; then
6484 CPPFLAGS="-isysroot $MACOSX_SDK_PATH $CPPFLAGS"
6487 # Assume visibility is not broken with libc++. The below test is very much designed for libstdc++
6489 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$CPP_LIBRARY" = GLIBCXX; then
6490 dnl gcc#19664, gcc#22482, rhbz#162935
6491 AC_MSG_CHECKING([if STL headers are visibility safe (GCC bug 22482)])
6492 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
6493 AC_MSG_RESULT([$stlvisok])
6494 if test "$stlvisok" = "no"; then
6495 AC_MSG_WARN([Your libstdc++ headers are not visibility safe. Disabling visibility])
6496 add_warning "Your libstdc++ headers are not visibility safe. Disabling visibility"
6497 unset HAVE_GCC_VISIBILITY_FEATURE
6501 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
6502 sharedlink_ldflags_save=$LDFLAGS
6503 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden $PICSWITCH $LINKFLAGSSHL"
6505 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
6506 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
6508 using namespace std;
6510 istringstream strm( "test" ); return 0;
6512 # Ugh, surely bad to assume an error message will contain
6513 # the word "unresolvable", a problem with
6514 # -fvisibility-inlines-hidden and STL headers might cause
6515 # some more obscure message on some platform, and anway,
6516 # the error message could be localised.
6517 [$EGREP -q unresolvable conftest.err;
6518 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi],[gccvisok=no
6520 AC_MSG_RESULT([$gccvisok])
6521 if test "$gccvisok" = "no"; then
6522 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
6523 add_warning "Your gcc is not -fvisibility-inlines-hidden safe, disabling that."
6524 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
6527 LDFLAGS=$sharedlink_ldflags_save
6530 # As the below test checks things when linking self-compiled dynamic libraries, it presumably is irrelevant
6531 # when we don't make any dynamic libraries?
6532 if test "$DISABLE_DYNLOADING" = "" -a "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$HAVE_GCC_VISIBILITY_BROKEN" != "TRUE"; then
6533 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe (Clang bug 11250)])
6534 cat > conftestlib1.cc <<_ACEOF
6535 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
6536 struct S2: S1<int> { virtual ~S2(); };
6539 cat > conftestlib2.cc <<_ACEOF
6540 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
6541 struct S2: S1<int> { virtual ~S2(); };
6542 struct S3: S2 { virtual ~S3(); }; S3::~S3() {}
6544 gccvisinlineshiddenok=yes
6545 if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST >/dev/null 2>&5; then
6546 gccvisinlineshiddenok=no
6548 dnl At least Clang -fsanitize=address is known to not work with
6549 dnl -z defs (unsetting which makes the test moot, though):
6550 my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS
6551 if test "$COM_GCC_IS_CLANG" = TRUE; then
6555 my_linkflagsnoundefs=
6561 if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 $my_linkflagsnoundefs -o libconftest2$DLLPOST >/dev/null 2>&5; then
6562 gccvisinlineshiddenok=no
6567 AC_MSG_RESULT([$gccvisinlineshiddenok])
6568 if test "$gccvisinlineshiddenok" = "no"; then
6569 AC_MSG_WARN([Your gcc/clang is not -fvisibility-inlines-hidden safe, disabling that.])
6570 add_warning "Your gcc/clang is not -fvisibility-inlines-hidden safe, disabling that."
6571 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
6575 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
6576 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
6577 cat >visibility.cxx <<_ACEOF
6578 #pragma GCC visibility push(hidden)
6579 struct __attribute__ ((visibility ("default"))) TestStruct {
6582 __attribute__ ((visibility ("default"))) void TestFunc() {
6586 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
6591 if test "$_os" = "Darwin" -o "$WITH_MINGW" = "yes"; then
6594 if $EGREP -q '@PLT|@GOT' visibility.s; then
6606 rm -f visibility.s visibility.cxx
6608 AC_MSG_RESULT([$gccvisbroken])
6609 if test "$gccvisbroken" = "yes"; then
6610 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
6611 add_warning "Your gcc is not -fvisibility=hidden safe. Disabling visibility"
6612 unset HAVE_GCC_VISIBILITY_FEATURE
6616 CPPFLAGS="$save_CPPFLAGS"
6621 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
6622 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
6624 dnl ===================================================================
6626 dnl ===================================================================
6628 HAVE_GCC_FNO_DEFAULT_INLINE=
6629 HAVE_GCC_FNO_ENFORCE_EH_SPECS=
6630 if test "$GCC" = "yes"; then
6631 AC_MSG_CHECKING([whether $CXX supports -fno-default-inline])
6632 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
6633 # Option just ignored and silly warning that isn't a real
6638 save_CXXFLAGS=$CXXFLAGS
6639 CXXFLAGS="$CFLAGS -Werror -fno-default-inline"
6640 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_DEFAULT_INLINE=TRUE ],[])
6641 CXXFLAGS=$save_CXXFLAGS
6644 if test "$HAVE_GCC_FNO_DEFAULT_INLINE" = "TRUE"; then
6645 AC_MSG_RESULT([yes])
6650 AC_MSG_CHECKING([whether $CXX supports -fno-enforce-eh-specs])
6651 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
6656 save_CXXFLAGS=$CXXFLAGS
6657 CXXFLAGS="$CFLAGS -Werror -fno-enforce-eh-specs"
6658 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_ENFORCE_EH_SPECS=TRUE ],[])
6659 CXXFLAGS=$save_CXXFLAGS
6662 if test "$HAVE_GCC_FNO_ENFORCE_EH_SPECS" = "TRUE"; then
6663 AC_MSG_RESULT([yes])
6668 AC_SUBST(HAVE_GCC_FNO_DEFAULT_INLINE)
6669 AC_SUBST(HAVE_GCC_FNO_ENFORCE_EH_SPECS)
6671 dnl ===================================================================
6672 dnl Compiler plugins
6673 dnl ===================================================================
6676 # currently only Clang
6677 if test "$COM_GCC_IS_CLANG" = "TRUE"; then
6678 if test -n "$enable_compiler_plugins"; then
6679 compiler_plugins="$enable_compiler_plugins"
6680 elif test -n "$ENABLE_DBGUTIL"; then
6681 compiler_plugins=test
6685 if test "$compiler_plugins" != "no"; then
6686 dnl The prefix where Clang resides, override to where Clang resides if
6687 dnl using a source build:
6688 if test -z "$CLANGDIR"; then
6692 save_CPPFLAGS=$CPPFLAGS
6694 # compiler plugins must be built with "native" bitness of clang
6695 # because they link against clang libraries
6696 CXX=`echo $CXX | sed -e s/-m64// -e s/-m32//`
6697 CPPFLAGS="$CPPFLAGS $CXXFLAGS_CXX11 -I$CLANGDIR/include -I$CLANGDIR/tools/clang/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
6698 AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
6699 [COMPILER_PLUGINS=TRUE],
6701 if test "$compiler_plugins" = "yes"; then
6702 AC_MSG_ERROR([Cannot find Clang headers to build compiler plugins.])
6704 AC_MSG_WARN([Cannot find Clang headers to build compiler plugins, plugins disabled])
6705 add_warning "Cannot find Clang headers to build compiler plugins, plugins disabled."
6709 CPPFLAGS=$save_CPPFLAGS
6713 if test "$enable_compiler_plugins" = "yes"; then
6714 AC_MSG_ERROR([Compiler plugins are currently supported only with the Clang compiler.])
6717 AC_SUBST(COMPILER_PLUGINS)
6720 # Plugin to help linker.
6721 # Add something like LD_PLUGIN=/usr/lib64/LLVMgold.so to your autogen.input.
6722 # This makes --enable-lto build with clang work.
6725 dnl ===================================================================
6727 dnl ===================================================================
6728 AC_MSG_CHECKING([which memory allocator to use])
6729 if test "$with_alloc" = "system"; then
6730 AC_MSG_RESULT([system])
6733 if test "$with_alloc" = "tcmalloc"; then
6734 AC_MSG_RESULT(tcmalloc)
6735 if ! echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6736 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
6738 AC_CHECK_LIB([tcmalloc], [malloc], [:],
6739 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
6742 if test "$with_alloc" = "jemalloc"; then
6743 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
6744 AC_MSG_RESULT(jemalloc)
6746 CFLAGS="$CFLAGS -pthread"
6747 AC_CHECK_LIB([jemalloc], [malloc], [:],
6748 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
6752 AC_MSG_RESULT([system])
6756 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
6757 AC_MSG_RESULT([internal])
6759 AC_CHECK_FUNCS(posix_fallocate, HAVE_POSIX_FALLOCATE=YES, [HAVE_POSIX_FALLOCATE=NO])
6760 AC_SUBST(HAVE_POSIX_FALLOCATE)
6763 dnl ===================================================================
6764 dnl Custom build version
6765 dnl ===================================================================
6767 AC_MSG_CHECKING([whether to add custom build version])
6768 if test "$with_build_version" != ""; then
6769 BUILD_VER_STRING=$with_build_version
6770 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
6775 AC_SUBST(BUILD_VER_STRING)
6777 JITC_PROCESSOR_TYPE=""
6778 if test "$_os" = "Linux" -a "$host_cpu" = "powerpc"; then
6779 # IBMs JDK needs this...
6780 JITC_PROCESSOR_TYPE=6
6781 export JITC_PROCESSOR_TYPE
6783 AC_SUBST([JITC_PROCESSOR_TYPE])
6785 # Misc Windows Stuff
6786 if test $_os = "WINNT" -a "$WITH_MINGW" != yes; then
6789 MSVC_DLL_PATH="$msvcdllpath"
6790 MSVC_DLLS="$msvcdlls"
6792 SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
6795 AC_SUBST(MSVC_DLL_PATH)
6799 dnl ===================================================================
6801 dnl ===================================================================
6802 if test "$ENABLE_JAVA" != ""; then
6804 # Windows-specific tests
6805 if test "$build_os" = "cygwin"; then
6806 if test "$BITNESS_OVERRIDE" = 64; then
6812 if test -z "$with_jdk_home"; then
6813 for ver in 1.8 1.7 1.6; do
6814 reg_get_value_$bitness "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
6815 if test -n "$regvalue"; then
6820 if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
6821 with_jdk_home="$_jdk_home"
6822 howfound="found automatically"
6824 AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $bitness-bit JDK])
6827 test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
6828 howfound="you passed"
6832 JAVA_HOME=; export JAVA_HOME
6833 if test -z "$with_jdk_home"; then
6834 AC_PATH_PROG(JAVAINTERPRETER, $with_java)
6836 _java_path="$with_jdk_home/bin/$with_java"
6837 dnl Check if there is a Java interpreter at all.
6838 if test -x "$_java_path"; then
6839 JAVAINTERPRETER=$_java_path
6841 AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
6845 if test "$build_os" = "cygwin"; then
6846 # Check that the JDK found is correct architecture
6847 # Why is this necessary, we don't link with any library from the JDK I think,
6849 shortjdkhome=`cygpath -d "$with_jdk_home"`
6850 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
6851 AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
6852 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
6853 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
6854 AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
6855 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
6858 if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then
6859 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
6861 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
6862 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
6863 elif test $_os = Darwin -a "$BITNESS_OVERRIDE" = ""; then
6864 dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X,
6865 dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
6866 dnl to run in 32 bit mode and be able to load LibreOffice jnilibs:
6867 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
6868 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
6869 AC_MSG_RESULT([yes])
6878 dnl ===================================================================
6880 dnl ===================================================================
6882 # Note that JAVA_HOME as for now always means the *build* platform's
6883 # JAVA_HOME. Whether all the complexity here actually is needed any
6884 # more or not, no idea.
6886 if test "$ENABLE_JAVA" != ""; then
6888 AC_MSG_CHECKING([the installed JDK])
6889 if test -n "$JAVAINTERPRETER"; then
6890 dnl java -version sends output to stderr!
6891 if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
6892 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
6893 elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then
6895 AC_MSG_RESULT([checked (gcj)])
6896 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
6897 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
6899 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "BEA"` -gt 0; then
6900 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
6901 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "IBM"` -gt 0; then
6904 dnl IBM JDK specific tests
6905 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
6906 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
6908 if test "$_jdk_ver" -lt 10500; then
6909 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
6911 if test "$_jdk_ver" -ge 10600; then
6915 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
6917 if test "$with_jdk_home" = ""; then
6918 AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
6919 you must use the "--with-jdk-home" configure option explicitly])
6922 JAVA_HOME=$with_jdk_home
6927 dnl Sun JDK specific tests
6928 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
6929 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
6931 if test "$_jdk_ver" -lt 10500; then
6932 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
6934 if test "$_jdk_ver" -gt 10600; then
6935 JAVA_CLASSPATH_NOT_SET="1"
6937 if test "$_jdk_ver" -ge 10600; then
6941 AC_MSG_RESULT([checked (JDK $_jdk)])
6942 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
6943 if test "$_os" = "WINNT"; then
6944 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
6948 AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
6952 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
6954 AC_SUBST([HAVE_JAVA6])
6956 dnl ===================================================================
6957 dnl Set target Java bytecode version
6958 dnl ===================================================================
6959 if test "$ENABLE_JAVA" != ""; then
6960 _java_target_ver="1.5"
6962 JAVA_SOURCE_VER="$_java_target_ver"
6963 JAVA_TARGET_VER="$_java_target_ver"
6966 dnl ===================================================================
6967 dnl Checks for javac
6968 dnl ===================================================================
6969 if test "$ENABLE_JAVA" != ""; then
6970 if test "$JDK" = "gcj"; then
6971 javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
6973 javacompiler="javac"
6975 if test -z "$with_jdk_home"; then
6976 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
6978 _javac_path="$with_jdk_home/bin/$javacompiler"
6979 dnl Check if there is a Java compiler at all.
6980 if test -x "$_javac_path"; then
6981 JAVACOMPILER=$_javac_path
6984 if test -z "$JAVACOMPILER"; then
6985 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
6987 if test "$build_os" = "cygwin"; then
6988 if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then
6989 JAVACOMPILER="${JAVACOMPILER}.exe"
6991 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
6992 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
6995 if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Eclipse Java Compiler"` -gt 0; then
6996 AC_MSG_CHECKING([re-checking JDK])
6998 AC_MSG_RESULT([checked (ecj)])
6999 _gij_longver="40200"
7004 dnl ===================================================================
7005 dnl Checks that javac is gcj
7006 dnl ===================================================================
7007 if test "$ENABLE_JAVA" != ""; then
7008 if test `$JAVACOMPILER --version 2>&1 | $GREP -c "GCC"` -gt 0; then
7012 AC_SUBST(JAVACISGCJ)
7014 dnl ===================================================================
7015 dnl Checks for javadoc
7016 dnl ===================================================================
7017 if test "$ENABLE_JAVA" != ""; then
7018 if test -z "$with_jdk_home"; then
7019 AC_PATH_PROG(JAVADOC, javadoc)
7021 _javadoc_path="$with_jdk_home/bin/javadoc"
7022 dnl Check if there is a javadoc at all.
7023 if test -x "$_javadoc_path"; then
7024 JAVADOC=$_javadoc_path
7026 AC_PATH_PROG(JAVADOC, javadoc)
7029 if test -z "$JAVADOC"; then
7030 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
7032 if test "$build_os" = "cygwin"; then
7033 if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
7034 JAVADOC="${JAVADOC}.exe"
7036 JAVADOC=`cygpath -d "$JAVADOC"`
7037 JAVADOC=`cygpath -u "$JAVADOC"`
7040 if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
7041 JAVADOCISGJDOC="yes"
7044 AC_SUBST(JAVADOCISGJDOC)
7046 if test "$ENABLE_JAVA" != ""; then
7047 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
7048 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
7049 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
7050 # try to recover first by looking whether we have a alternatives
7051 # system as in Debian or newer SuSEs where following /usr/bin/javac
7052 # over /etc/alternatives/javac leads to the right bindir where we
7053 # just need to strip a bit away to get a valid JAVA_HOME
7054 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
7055 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
7056 # maybe only one level of symlink (e.g. on Mac)
7057 JAVA_HOME=$(readlink $JAVACOMPILER)
7058 if test "$(dirname $JAVA_HOME)" = "."; then
7059 # we've got no path to trim back
7064 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
7065 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
7066 add_warning "JAVA_HOME is set to /usr - this is very likely to be incorrect"
7067 add_warning "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home"
7069 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
7070 if test "$JAVA_HOME" != "/usr"; then
7071 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
7072 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
7073 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
7074 dnl Tiger already returns a JDK path..
7075 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
7077 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
7081 # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
7083 dnl now if JAVA_HOME has been set to empty, then call findhome to find it
7084 if test -z "$JAVA_HOME"; then
7085 if test "x$with_jdk_home" = "x"; then
7086 cat > findhome.java <<_ACEOF
7087 [import java.io.File;
7091 public static void main(String args[])
7093 String jrelocation = System.getProperty("java.home");
7094 File jre = new File(jrelocation);
7095 System.out.println(jre.getParent());
7099 AC_MSG_CHECKING([if javac works])
7100 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
7101 AC_TRY_EVAL(javac_cmd)
7102 if test $? = 0 -a -f ./findhome.class; then
7103 AC_MSG_RESULT([javac works])
7105 echo "configure: javac test failed" >&5
7106 cat findhome.java >&5
7107 AC_MSG_ERROR([javac does not work - java projects will not build!])
7109 AC_MSG_CHECKING([if gij knows its java.home])
7110 JAVA_HOME=`$JAVAINTERPRETER findhome`
7111 if test $? = 0 -a "$JAVA_HOME" != ""; then
7112 AC_MSG_RESULT([$JAVA_HOME])
7114 echo "configure: java test failed" >&5
7115 cat findhome.java >&5
7116 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
7118 # clean-up after ourselves
7119 rm -f ./findhome.java ./findhome.class
7121 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
7125 dnl second sanity check JAVA_HOME if possible
7126 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
7127 # now check if $JAVA_HOME is really valid
7128 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
7129 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
7132 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
7135 if test "$JAVA_HOME_OK" = "NO"; then
7136 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
7137 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
7138 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
7139 add_warning "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script"
7140 add_warning "attempted to find JAVA_HOME automatically, but apparently it failed"
7141 add_warning "in case JAVA_HOME is incorrectly set, some projects with not be built correctly"
7144 PathFormat "$JAVA_HOME"
7145 JAVA_HOME="$formatted_path"
7148 if test -z "$JAWTLIB" -a -n "$ENABLE_JAVA" -a "$_os" != Android -a \
7151 AC_MSG_CHECKING([for JAWT lib])
7152 if test "$_os" = WINNT; then
7153 if test "$WITH_MINGW" = yes; then
7154 # The path is taken care of in gb_LinkTarget__use_jawt
7155 # in RepositoryExternal.mk:
7158 # The path to $JAVA_HOME/lib/$JAWTLIB is part of $ILIB:
7182 my_java_arch=$host_cpu
7185 JAWTLIB="-L$JAVA_HOME/jre/lib/$my_java_arch -ljawt"
7187 AC_MSG_RESULT([$JAWTLIB])
7191 if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
7195 JAVAINC="-I$JAVA_HOME/include"
7196 JAVAINC="$JAVAINC -I$JAVA_HOME/include/aix"
7197 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7201 JAVAINC="-I$JAVA_HOME/include/win32"
7202 JAVAINC="$JAVAINC -I$JAVA_HOME/include"
7206 JAVAINC="${ISYSTEM}$FRAMEWORKSHOME/JavaVM.framework/Versions/Current/Headers ${ISYSTEM}$FRAMEWORKSHOME/JavaVM/Headers"
7210 JAVAINC="-I$JAVA_HOME/include"
7211 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7215 JAVAINC="-I$JAVA_HOME/include"
7216 JAVAINC="$JAVAINC -I$JAVA_HOME/include/freebsd"
7217 JAVAINC="$JAVAINC -I$JAVA_HOME/include/bsd"
7218 JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
7219 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7223 JAVAINC="-I$JAVA_HOME/include"
7224 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7228 JAVAINC="-I$JAVA_HOME/include"
7229 JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
7230 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7234 JAVAINC="-I$JAVA_HOME/include"
7238 JAVAINC="-I$JAVA_HOME/include"
7239 JAVAINC="$JAVAINC -I$JAVA_HOME/include/netbsd"
7240 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7244 JAVAINC="-I$JAVA_HOME/include"
7245 JAVAINC="$JAVAINC -I$JAVA_HOME/include/openbsd"
7246 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7250 JAVAINC="-I$JAVA_HOME/include"
7251 JAVAINC="$JAVAINC -I$JAVA_HOME/include/solaris"
7252 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7256 SOLARINC="$SOLARINC $JAVAINC"
7258 AC_SUBST(JAVACOMPILER)
7260 AC_SUBST(JAVAINTERPRETER)
7261 AC_SUBST(JAVAIFLAGS)
7262 AC_SUBST(JAVA_CLASSPATH_NOT_SET)
7264 AC_SUBST(JAVA_SOURCE_VER)
7265 AC_SUBST(JAVA_TARGET_VER)
7268 AC_MSG_CHECKING([which C preprocessor to use in idlc])
7269 if test -n "$with_idlc_cpp"; then
7270 AC_MSG_RESULT([$with_idlc_cpp])
7271 AC_PATH_PROG(SYSTEM_UCPP, $with_idlc_cpp)
7273 AC_MSG_RESULT([ucpp])
7274 AC_MSG_CHECKING([which ucpp tp use])
7275 if test -n "$with_system_ucpp" -a "$with_system_ucpp" != "no"; then
7276 AC_MSG_RESULT([external])
7277 AC_PATH_PROG(SYSTEM_UCPP, ucpp)
7279 AC_MSG_RESULT([internal])
7280 BUILD_TYPE="$BUILD_TYPE UCPP"
7283 AC_SUBST(SYSTEM_UCPP)
7285 dnl ===================================================================
7286 dnl Check for epm (not needed for Windows)
7287 dnl ===================================================================
7288 AC_MSG_CHECKING([whether to enable EPM for packing])
7289 if test "$enable_epm" = "yes"; then
7290 AC_MSG_RESULT([yes])
7291 if test "$_os" != "WINNT"; then
7292 if test $_os = Darwin; then
7294 elif test -n "$with_epm"; then
7297 AC_PATH_PROG(EPM, epm, no)
7299 if test "$EPM" = "no" -o "$EPM" = "internal"; then
7300 echo "EPM will be built."
7301 BUILD_TYPE="$BUILD_TYPE EPM"
7302 EPM=${WORKDIR}/UnpackedTarball/epm/epm
7304 # Gentoo has some epm which is something different...
7305 AC_MSG_CHECKING([whether the found epm is the right epm])
7306 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
7307 AC_MSG_RESULT([yes])
7309 AC_MSG_ERROR([no. Install ESP Package Manager (http://www.msweet.org/projects.php?Z2) and/or specify the path to the right epm])
7311 AC_MSG_CHECKING([epm version])
7312 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
7313 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
7314 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
7315 AC_MSG_RESULT([OK, >= 3.7])
7317 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
7318 AC_MSG_ERROR([Install ESP Package Manager (http://www.msweet.org/projects.php?Z2) and/or specify the path to the right epm])
7323 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
7324 AC_MSG_CHECKING([for rpm])
7325 for a in "$RPM" rpmbuild rpm; do
7326 $a --usage >/dev/null 2> /dev/null
7327 if test $? -eq 0; then
7331 $a --version >/dev/null 2> /dev/null
7332 if test $? -eq 0; then
7338 if test -z "$RPM"; then
7339 AC_MSG_ERROR([not found])
7340 elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
7341 RPM_PATH=`which $RPM`
7342 AC_MSG_RESULT([$RPM_PATH])
7343 SCPDEFS="$SCPDEFS -DWITH_RPM"
7345 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
7348 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
7349 AC_PATH_PROG(DPKG, dpkg, no)
7350 if test "$DPKG" = "no"; then
7351 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
7354 if echo "$PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
7355 if test "$_os" = "Darwin"; then
7356 AC_MSG_CHECKING([for PackageMaker availability])
7357 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
7358 AC_MSG_ERROR([not installed. Please install Apples Dev Tools])
7363 AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...])
7366 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
7367 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
7368 if test "$with_epm" = "no" -a "$_os" != "Darwin"; then
7369 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
7370 AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
7371 if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then
7372 AC_MSG_RESULT([yes])
7375 if echo "$PKGFORMAT" | $GREP -q rpm; then
7377 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
7378 add_warning "the rpms will need to be installed with --nodeps"
7382 AC_MSG_WARN([the ${_pt}s will not be relocateable])
7383 add_warning "the ${_pt}s will not be relocateable"
7384 AC_MSG_WARN([if you want to make sure installation without --nodeps and
7385 relocation will work, you need to patch your epm with the
7386 patch in epm/epm-3.7.patch or build with
7387 --with-epm=internal which will build a suitable epm])
7392 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
7393 AC_PATH_PROG(PKGMK, pkgmk, no)
7394 if test "$PKGMK" = "no"; then
7395 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
7402 for i in $PKGFORMAT; do
7404 aix | bsd | deb | osx | pkg | rpm | native | portable)
7406 [--with-package-format='$PKGFORMAT' requires --enable-epm])
7415 dnl ===================================================================
7416 dnl We need winegcc when building MinGW build to be able to cross-build msi tools
7417 dnl ===================================================================
7419 if test "$enable_winegcc" = "yes"; then
7420 AC_PATH_PROG(WINEGCC, winegcc)
7421 if test "$WINEGCC" = ""; then
7422 AC_MSG_ERROR([winegcc was not found, please install wine-devel, or wine-devel-32bit])
7425 ac_exeext_save="$ac_exeext"
7428 AC_LINK_IFELSE([AC_LANG_PROGRAM([
7431 printf ("hello world\n");
7433 [AC_MSG_ERROR([winegcc cannot build 32bit binaries, please install glibc-devel-32bit and gcc-32bit])]
7436 ac_exeext="$ac_exeext_save"
7440 if test $_os = iOS; then
7441 enable_mpl_subset=yes
7443 enable_lotuswordpro=no
7446 enable_postgresql_sdbc=no
7447 enable_extension_integration=no
7448 enable_report_builder=no
7454 if test "$enable_lotuswordpro" = "yes"; then
7456 SCPDEFS="$SCPDEFS -DDISABLE_LWP"
7458 AC_SUBST(ENABLE_LWP)
7460 dnl ===================================================================
7462 dnl ===================================================================
7463 AC_PATH_PROG(GPERF, gperf)
7464 if test -z "$GPERF"; then
7465 AC_MSG_ERROR([gperf not found but needed. Install it.])
7467 AC_MSG_CHECKING([gperf version])
7468 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
7471 AC_MSG_ERROR([too old, you need at least 3.0.0])
7475 dnl ===================================================================
7476 dnl Check for building ODK
7477 dnl ===================================================================
7478 if test "$enable_odk" = no; then
7481 if test "$with_doxygen" = no; then
7482 AC_MSG_CHECKING([for doxygen])
7486 if test "$with_doxygen" = yes; then
7487 AC_PATH_PROG([DOXYGEN], [doxygen])
7488 if test -z "$DOXYGEN"; then
7489 if test "$enable_odk" = "" ; then
7492 AC_MSG_ERROR([doxygen not found in \$PATH; specify its pathname via --with-doxygen=..., or disable its use via --without-doxygen])
7496 AC_MSG_CHECKING([for doxygen])
7497 DOXYGEN=$with_doxygen
7498 AC_MSG_RESULT([$DOXYGEN])
7500 if test -n "$DOXYGEN"; then
7501 DOXYGEN_VERSION=`$DOXYGEN --version 2>/dev/null`
7502 DOXYGEN_NUMVERSION=`echo $DOXYGEN_VERSION | $AWK -F. '{ print \$1*10000 + \$2*100 + \$3 }'`
7503 if ! test "$DOXYGEN_NUMVERSION" -ge "10804" ; then
7504 AC_MSG_ERROR([found doxygen is too old; need at least version 1.8.4 or specify --without-doxygen])
7511 AC_MSG_CHECKING([whether to build the ODK])
7512 if test "$enable_odk" = "" -o "$enable_odk" != "no"; then
7513 AC_MSG_RESULT([yes])
7515 if test "$with_java" != "no"; then
7516 AC_MSG_CHECKING([whether to build unowinreg.dll])
7517 if test "$_os" = "WINNT" -a "$enable_build_unowinreg" = ""; then
7518 # build on Win by default
7519 enable_build_unowinreg=yes
7521 if test "$enable_build_unowinreg" = "" -o "$enable_build_unowinreg" = "no"; then
7525 AC_MSG_RESULT([yes])
7526 BUILD_UNOWINREG=TRUE
7528 if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "TRUE"; then
7529 if test -z "$with_mingw_cross_compiler"; then
7531 AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
7532 elif test -x "$with_mingw_cross_compiler"; then
7533 MINGWCXX="$with_mingw_cross_compiler"
7535 AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
7538 if test "$MINGWCXX" = "false"; then
7539 AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
7542 mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
7543 if test -x "$mingwstrip_test"; then
7544 MINGWSTRIP="$mingwstrip_test"
7546 AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
7549 if test "$MINGWSTRIP" = "false"; then
7550 AC_MSG_ERROR(MinGW32 binutils not found.)
7554 BUILD_TYPE="$BUILD_TYPE ODK"
7559 AC_SUBST(BUILD_UNOWINREG)
7561 AC_SUBST(MINGWSTRIP)
7563 dnl ===================================================================
7564 dnl Check for system zlib
7565 dnl ===================================================================
7566 if test "$with_system_zlib" = "auto"; then
7569 with_system_zlib="$with_system_libs"
7572 with_system_zlib=yes
7577 dnl we want to use libo_CHECK_SYSTEM_MODULE here too, but OS X is too stupid
7578 dnl and has no pkg-config for it at least on some tinderboxes,
7579 dnl so leaving that out for now
7580 dnl libo_CHECK_SYSTEM_MODULE([zlib],[ZLIB],[zlib])
7581 AC_MSG_CHECKING([which zlib to use])
7582 if test "$with_system_zlib" = "yes"; then
7583 AC_MSG_RESULT([external])
7585 AC_CHECK_HEADER(zlib.h, [],
7586 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
7587 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
7588 [AC_MSG_ERROR(zlib not found or functional)], [])
7590 AC_MSG_RESULT([internal])
7592 BUILD_TYPE="$BUILD_TYPE ZLIB"
7593 ZLIB_CFLAGS="-I${WORKDIR}/UnpackedTarball/zlib"
7596 AC_SUBST(ZLIB_CFLAGS)
7598 AC_SUBST(SYSTEM_ZLIB)
7600 dnl ===================================================================
7601 dnl Check for system jpeg
7602 dnl ===================================================================
7603 AC_MSG_CHECKING([which jpeg to use])
7604 if test "$with_system_jpeg" = "auto"; then
7606 WINNT|Darwin|iOS|Android)
7607 with_system_jpeg="$with_system_libs"
7610 with_system_jpeg=yes
7615 if test "$with_system_jpeg" = "yes"; then
7616 AC_MSG_RESULT([external])
7618 AC_CHECK_HEADER(jpeglib.h, [],
7619 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
7620 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
7621 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
7622 libo_MINGW_CHECK_DLL([libjpeg])
7624 AC_MSG_RESULT([internal])
7626 BUILD_TYPE="$BUILD_TYPE JPEG"
7628 AC_SUBST(SYSTEM_JPEG)
7631 dnl ===================================================================
7632 dnl Check for system clucene
7633 dnl ===================================================================
7634 dnl we should rather be using
7635 dnl libo_CHECK_SYSTEM_MODULE([clucence],[CLUCENE],[liblucence-core]) here
7636 dnl but the contribs-lib check seems tricky
7637 AC_MSG_CHECKING([which clucene to use])
7638 if test "$with_system_clucene" = "yes"; then
7639 AC_MSG_RESULT([external])
7641 PKG_CHECK_MODULES(CLUCENE, libclucene-core)
7642 CLUCENE_CFLAGS=[$(printf '%s' "$CLUCENE_CFLAGS" | sed -e 's@-I[^ ]*/CLucene/ext@@' -e "s/-I/${ISYSTEM?}/g")]
7644 save_CXXFLAGS=$CXXFLAGS
7645 save_CPPFLAGS=$CPPFLAGS
7646 CXXFLAGS="$CXXFLAGS $CLUCENE_CFLAGS"
7647 CPPFLAGS="$CPPFLAGS $CLUCENE_CFLAGS"
7648 dnl http://sourceforge.net/tracker/index.php?func=detail&aid=3392466&group_id=80013&atid=558446
7649 dnl https://bugzilla.redhat.com/show_bug.cgi?id=794795
7650 AC_CHECK_HEADER([CLucene/analysis/cjk/CJKAnalyzer.h], [],
7651 [AC_MSG_ERROR([Your version of libclucene has contribs-lib missing.])], [#include <CLucene.h>])
7652 CXXFLAGS=$save_CXXFLAGS
7653 CPPFLAGS=$save_CPPFLAGS
7656 CLUCENE_LIBS="$CLUCENE_LIBS -lclucene-contribs-lib"
7658 AC_MSG_RESULT([internal])
7660 BUILD_TYPE="$BUILD_TYPE CLUCENE"
7662 AC_SUBST(SYSTEM_CLUCENE)
7663 AC_SUBST(CLUCENE_CFLAGS)
7664 AC_SUBST(CLUCENE_LIBS)
7666 dnl ===================================================================
7667 dnl Check for system expat
7668 dnl ===================================================================
7669 dnl we should use libo_CHECK_SYSTEM_MODULE, but e.g. the mingw tinderbox has no
7670 dnl proper pkg-config for it. It should really be fixed on the tinderbox though.
7671 AC_MSG_CHECKING([which expat to use])
7672 if test "$with_system_expat" = "yes"; then
7673 AC_MSG_RESULT([external])
7675 AC_CHECK_HEADER(expat.h, [],
7676 [AC_MSG_ERROR(expat.h not found. install expat)], [])
7677 AC_CHECK_LIB([expat], [XML_ParserCreate], [:],
7678 [AC_MSG_RESULT(expat library not found or functional.)], [])
7679 libo_MINGW_CHECK_DLL([libexpat])
7681 AC_MSG_RESULT([internal])
7683 BUILD_TYPE="$BUILD_TYPE EXPAT"
7685 AC_SUBST(SYSTEM_EXPAT)
7687 AC_MSG_CHECKING([whether to enable Embedded OpenType support])
7688 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_eot" = "yes"; then
7690 AC_DEFINE([ENABLE_EOT])
7691 AC_MSG_RESULT([yes])
7693 libo_CHECK_SYSTEM_MODULE([libeot],[LIBEOT],[libeot >= 0.01])
7698 AC_SUBST([ENABLE_EOT])
7700 dnl ===================================================================
7701 dnl Check for system libe-book
7702 dnl ===================================================================
7703 libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.0 >= 0.0.2],["-I${WORKDIR}/UnpackedTarball/libebook/inc"],["-L${WORKDIR}/UnpackedTarball/libebook/src/lib/.libs -le-book-0.0"])
7705 dnl ===================================================================
7706 dnl Check for system libetonyek
7707 dnl ===================================================================
7708 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.0],["-I${WORKDIR}/UnpackedTarball/libetonyek/inc"],["-L${WORKDIR}/UnpackedTarball/libetonyek/src/lib/.libs -letonyek-0.0"])
7710 dnl ===================================================================
7711 dnl Check for system libfreehand
7712 dnl ===================================================================
7713 libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.0],["-I${WORKDIR}/UnpackedTarball/libfreehand/inc"],["-L${WORKDIR}/UnpackedTarball/libfreehand/src/lib/.libs -lfreehand-0.0"])
7715 dnl ===================================================================
7716 dnl Check for system libodfgen
7717 dnl ===================================================================
7718 libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.0 >= 0.0.3])
7720 dnl ===================================================================
7721 dnl Check for system libcdr
7722 dnl ===================================================================
7723 libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.0 >= 0.0.5])
7725 dnl ===================================================================
7726 dnl Check for system libmspub
7727 dnl ===================================================================
7728 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.0])
7730 dnl ===================================================================
7731 dnl Check for system libmwaw
7732 dnl ===================================================================
7733 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.2])
7735 dnl ===================================================================
7736 dnl Check for system libvisio
7737 dnl ===================================================================
7738 libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.0])
7740 dnl ===================================================================
7741 dnl Check for system libcmis
7742 dnl ===================================================================
7743 # libcmis requires curl and we can't build curl for iOS
7744 if test $_os != iOS; then
7745 libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.4 >= 0.4.0])
7750 AC_SUBST(ENABLE_CMIS)
7752 dnl ===================================================================
7753 dnl Check for system libwpd
7754 dnl ===================================================================
7755 libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 >= 0.9.5 libwpd-stream-0.9 >= 0.9.5],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.9"])
7757 dnl ===================================================================
7758 dnl Check for system lcms2
7759 dnl ===================================================================
7760 if test "$with_system_lcms2" = "yes"; then
7761 libo_MINGW_CHECK_DLL([liblcms2])
7765 libo_CHECK_SYSTEM_MODULE([lcms2],[LCMS2],[lcms2],["-I${WORKDIR}/UnpackedTarball/lcms2/include"],["-L${WORKDIR}/UnpackedTarball/lcms2/src/.libs -llcms2"])
7766 if test "$GCC" = "yes"; then
7767 LCMS2_CFLAGS="${LCMS2_CFLAGS} -Wno-long-long"
7769 if test "$COM" = "MSC"; then # override the above
7770 LCMS2_LIBS=${WORKDIR}/UnpackedTarball/lcms2/bin/lcms2.lib
7773 dnl ===================================================================
7774 dnl Check for system cppunit
7775 dnl ===================================================================
7776 if test "$cross_compiling" != "yes"; then
7777 libo_CHECK_SYSTEM_MODULE([cppunit],[CPPUNIT],[cppunit >= 1.12.0])
7780 dnl ===================================================================
7781 dnl Check whether freetype is available
7782 dnl ===================================================================
7783 if test "$test_freetype" = "yes"; then
7784 AC_MSG_CHECKING([whether freetype is available])
7785 # FreeType has 3 different kinds of versions
7786 # * release, like 2.4.10
7787 # * libtool, like 13.0.7 (this what pkg-config returns)
7789 # FreeType's docs/VERSION.DLL provides a table mapping between the three
7792 PKG_CHECK_MODULES(FREETYPE, freetype2 >= 9.9.3)
7793 FREETYPE_CFLAGS=$(printf '%s' "$FREETYPE_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7794 SYSTEM_FREETYPE=TRUE
7796 _save_cflags="$CFLAGS"
7797 LIBS="$LIBS $FREETYPE_LIBS"
7798 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
7799 AC_CHECK_FUNC(FT_Face_GetCharVariantIndex, AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX), [])
7801 CFLAGS="$_save_cflags"
7803 AC_SUBST(FREETYPE_CFLAGS)
7804 AC_SUBST(FREETYPE_LIBS)
7805 AC_SUBST([SYSTEM_FREETYPE])
7807 dnl ===================================================================
7808 dnl Check for system libabw
7809 dnl ===================================================================
7810 libo_CHECK_SYSTEM_MODULE([libabw],[ABW],[libabw-0.0],["-I${WORKDIR}/UnpackedTarball/libabw/inc"],["-L${WORKDIR}/UnpackedTarball/libabw/src/lib/.libs -labw-0.0"])
7812 dnl ===================================================================
7813 dnl Check for system libwps
7814 dnl ===================================================================
7815 libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.2],["-I${WORKDIR}/UnpackedTarball/libwps/inc"],["-L${WORKDIR}/UnpackedTarball/libwps/src/lib/.libs -lwps-0.2"])
7817 dnl ===================================================================
7818 dnl Check for system libwpg
7819 dnl ===================================================================
7820 libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.2],["-I${WORKDIR}/UnpackedTarball/libwpg/inc"],["-L${WORKDIR}/UnpackedTarball/libwpg/src/lib/.libs -lwpg-0.2"])
7822 # ===================================================================
7823 # Check for system libxslt
7824 # to prevent incompatibilities between internal libxml2 and external libxslt,
7825 # or vice versa, use with_system_libxml here
7826 # ===================================================================
7827 if test "$with_system_libxml" = "auto"; then
7830 with_system_libxml="$with_system_libs"
7833 if test "$_os" = "Darwin" -a $MAC_OS_X_VERSION_MAX_ALLOWED -lt 1060; then
7834 with_system_libxml=no
7836 with_system_libxml=yes
7842 AC_MSG_CHECKING([which libxslt to use])
7843 if test "$with_system_libxml" = "yes"; then
7844 AC_MSG_RESULT([external])
7846 if test "$_os" = "Darwin"; then
7847 dnl make sure to use SDK path
7848 LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
7849 LIBEXSLT_CFLAGS="$LIBXSLT_CFLAGS"
7851 LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
7852 LIBEXSLT_LIBS="-lexslt $LIBXSLT_LIBS"
7854 PKG_CHECK_MODULES(LIBXSLT, libxslt)
7855 LIBXSLT_CFLAGS=$(printf '%s' "$LIBXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7856 PKG_CHECK_MODULES(LIBEXSLT, libexslt)
7857 LIBEXSLT_CFLAGS=$(printf '%s' "$LIBEXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7860 dnl Check for xsltproc
7861 AC_PATH_PROG(XSLTPROC, xsltproc, no)
7862 if test "$XSLTPROC" = "no"; then
7863 AC_MSG_ERROR([xsltproc is required])
7866 libo_MINGW_CHECK_DLL([libxslt])
7867 libo_MINGW_CHECK_DLL([libexslt])
7868 libo_MINGW_TRY_DLL([iconv])
7870 AC_MSG_RESULT([internal])
7872 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
7874 if test "$cross_compiling" = "yes"; then
7875 AC_PATH_PROG(XSLTPROC, xsltproc, no)
7876 if test "$XSLTPROC" = "no"; then
7877 AC_MSG_ERROR([xsltproc is required])
7881 AC_SUBST(SYSTEM_LIBXSLT)
7882 if test -z "$SYSTEM_LIBXSLT_FOR_BUILD"; then
7883 SYSTEM_LIBXSLT_FOR_BUILD="$SYSTEM_LIBXSLT"
7885 AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
7887 AC_SUBST(LIBEXSLT_CFLAGS)
7888 AC_SUBST(LIBEXSLT_LIBS)
7889 AC_SUBST(LIBXSLT_CFLAGS)
7890 AC_SUBST(LIBXSLT_LIBS)
7893 # ===================================================================
7894 # Check for system libxml
7895 # ===================================================================
7896 AC_MSG_CHECKING([which libxml to use])
7897 if test "$with_system_libxml" = "yes"; then
7898 AC_MSG_RESULT([external])
7900 if test "$_os" = "Darwin"; then
7901 dnl make sure to use SDK path
7902 LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
7904 LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
7905 elif test $_os = iOS; then
7906 dnl make sure to use SDK path
7907 usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
7908 LIBXML_CFLAGS="-I$usr/include/libxml2"
7909 LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
7911 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
7912 LIBXML_CFLAGS=$(printf '%s' "$LIBXML_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7915 dnl Check for xmllint
7916 AC_PATH_PROG(XMLLINT, xmllint, no)
7917 if test "$XMLLINT" = "no"; then
7918 AC_MSG_ERROR([xmllint is required])
7921 libo_MINGW_CHECK_DLL([libxml2])
7922 libo_MINGW_TRY_DLL([zlib1])
7924 AC_MSG_RESULT([internal])
7926 BUILD_TYPE="$BUILD_TYPE LIBXML2"
7928 AC_SUBST(SYSTEM_LIBXML)
7929 AC_SUBST(LIBXML_CFLAGS)
7930 AC_SUBST(LIBXML_LIBS)
7933 # =====================================================================
7934 # Checking for a Python interpreter with version >= 2.5 needed to build LO.
7935 # runtime requires Python 3 compatible version (>= 2.6)
7936 # Optionally user can pass an option to configure, i. e.
7937 # ./configure PYTHON=/usr/bin/python
7938 # =====================================================================
7939 if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
7940 # This allows a lack of system python with no error, we use internal one in that case.
7941 AM_PATH_PYTHON([2.5],, [:])
7942 # Clean PYTHON_VERSION checked below if cross-compiling
7944 if test "$PYTHON" != ":"; then
7945 PYTHON_FOR_BUILD=$PYTHON
7948 AC_SUBST(PYTHON_FOR_BUILD)
7950 # Checks for Python to use for Pyuno
7951 AC_MSG_CHECKING([which Python to use for Pyuno])
7952 case "$enable_python" in
7954 if test -z $PYTHON_FOR_BUILD; then
7955 # Python is required to build LibreOffice. In theory we could separate the build-time Python
7956 # requirement from the choice whether to include Python stuff in the installer, but why
7958 AC_MSG_ERROR([Python is required at build time.])
7961 AC_MSG_RESULT([none])
7964 if test "$DISABLE_SCRIPTING" = TRUE -a -n "$PYTHON_FOR_BUILD"; then
7965 AC_MSG_RESULT([no, overridden by --disable-scripting])
7967 elif test $build_os = cygwin; then
7968 dnl When building on Windows we don't attempt to use any installed
7969 dnl "system" Python.
7971 dnl (When cross-compiling to Windows from Linux using the mingw32-cross
7972 dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
7973 dnl MinGW cross-compilation setups.)
7974 AC_MSG_RESULT([fully internal])
7975 enable_python=internal
7976 elif test "$cross_compiling" = yes; then
7977 AC_MSG_RESULT([system])
7978 enable_python=system
7980 # Unset variables set by the above AM_PATH_PYTHON so that
7981 # we actually do check anew.
7982 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
7983 AM_PATH_PYTHON([3.3],, [:])
7984 if test "$PYTHON" = :; then
7985 AC_MSG_RESULT([internal])
7986 enable_python=internal
7988 AC_MSG_RESULT([system])
7989 enable_python=system
7994 AC_MSG_RESULT([internal])
7997 AC_MSG_RESULT([fully internal])
7998 enable_python=internal
8001 AC_MSG_RESULT([system])
8004 AC_MSG_ERROR([Incorrect --enable-python option])
8008 if test $enable_python != no; then
8009 BUILD_TYPE="$BUILD_TYPE PYUNO"
8012 if test $enable_python = system; then
8013 if test -z "$PYTHON_CFLAGS" -a $_os = Darwin; then
8014 # We already have logic above to make sure the system Python
8015 # is used only when building against SDK 10.6 or newer.
8017 # Make sure we use the 2.6 Python when building against the
8019 case $with_macosx_sdk in
8021 python_version=2.6;;
8023 python_version=2.7;;
8026 python_version=2.7;;
8028 PYTHON=python$python_version
8029 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX${with_macosx_sdk}.sdk/System/Library/Frameworks/Python.framework/Versions/${python_version}/include/python${python_version}"
8030 PYTHON_LIBS="-framework Python"
8032 if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
8033 # Fallback: Accept these in the environment, or as set above
8036 elif test "$cross_compiling" != yes; then
8037 # Unset variables set by the above AM_PATH_PYTHON so that
8038 # we actually do check anew.
8039 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
8040 # This causes an error if no python command is found
8041 AM_PATH_PYTHON([3.3])
8042 python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
8043 python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
8044 python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
8045 python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
8046 if test -z "$PKG_CONFIG"; then
8047 PYTHON_CFLAGS="-I$python_include"
8048 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
8049 elif $PKG_CONFIG --exists python-$python_version; then
8050 PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
8051 PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version` $python_libs"
8053 PYTHON_CFLAGS="-I$python_include"
8054 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
8057 dnl How to find out the cross-compilation Python installation path?
8058 dnl Let's hardocode what we know for different distributions for now...
8059 for python_version in 2.6; do
8060 if test -f ${MINGW_SYSROOT}/include/python${python_version}/Python.h; then
8061 PYTHON_CFLAGS="-I${MINGW_SYSROOT}/include/python$python_version"
8062 PYTHON_LIBS="-L${MINGW_SYSROOT}/lib -lpython$python_version $python_libs"
8063 AC_MSG_CHECKING([for python.exe])
8064 libo_MINGW_CHECK_DLL([libpython$python_version])
8065 libo_MINGW_CHECK_DLL([libreadline6])
8066 libo_MINGW_CHECK_DLL([libtermcap])
8067 # could we somehow extract the really mingw python version from
8068 # actual distro package?
8069 # 2.6.2 currently on OpenSUSE 12.1?
8070 # rpm -q mingw32-python => mingw32-python-2.6.2-17.17.noarch
8071 PYTHON_VERSION=$python_version.2
8072 PYTHON_VERSION_MAJOR=`echo $python_version | cut -d . -f 1`
8073 PYTHON_VERSION_MINOR=`echo $python_version | cut -d . -f 2`
8077 AC_MSG_CHECKING([for python version])
8078 AS_IF([test -n "$PYTHON_VERSION"],
8079 [AC_MSG_RESULT([$PYTHON_VERSION])],
8080 [AC_MSG_RESULT([not found])
8081 AC_MSG_ERROR([no usable python found])])
8082 test -n "$PYTHON_CFLAGS" && break
8084 # let the PYTHON_FOR_BUILD match the same python installation that
8085 # provides PYTHON_CFLAGS/PYTHON_LDFLAGS for pyuno, which should be
8086 # better for PythonTests.
8087 PYTHON_FOR_BUILD=$PYTHON
8090 dnl By now enable_python should be "system", "internal" or "no"
8091 case $enable_python in
8095 if test "$CROSS_COMPILING" != TRUE; then
8096 dnl Check if the headers really work
8097 save_CPPFLAGS="$CPPFLAGS"
8098 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
8099 AC_CHECK_HEADER(Python.h, [],
8100 [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
8102 CPPFLAGS="$save_CPPFLAGS"
8105 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8106 AC_MSG_CHECKING([for correct python library version])
8107 AC_RUN_IFELSE([AC_LANG_SOURCE([[
8110 int main(int argc, char **argv) {
8111 if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 6) ||
8112 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0;
8115 ]])],[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])],[])
8119 dnl FIXME Check if the Python library can be linked with, too?
8125 PYTHON_VERSION_MAJOR=3
8126 PYTHON_VERSION_MINOR=3
8127 PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.3
8128 BUILD_TYPE="$BUILD_TYPE PYTHON"
8129 # Embedded Python dies without Home set
8130 if test "$HOME" = ""; then
8133 # bz2 tarball and bzip2 is not standard
8134 if test -z "$BZIP2"; then
8135 AC_PATH_PROG( BZIP2, bzip2)
8136 if test -z "$BZIP2"; then
8137 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
8146 AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
8150 AC_SUBST(DISABLE_PYTHON)
8151 AC_SUBST(SYSTEM_PYTHON)
8152 AC_SUBST(PYTHON_CFLAGS)
8153 AC_SUBST(PYTHON_LIBS)
8154 AC_SUBST(PYTHON_VERSION)
8155 AC_SUBST(PYTHON_VERSION_MAJOR)
8156 AC_SUBST(PYTHON_VERSION_MINOR)
8158 AC_MSG_CHECKING([whether to build the MariaDB/MySQL Connector extension])
8159 if test "x$enable_ext_mariadb_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8160 AC_MSG_RESULT([yes])
8161 ENABLE_MARIADBC=TRUE
8165 BUILD_TYPE="$BUILD_TYPE MARIADBC"
8170 AC_SUBST(ENABLE_MARIADBC)
8171 AC_SUBST(MARIADBC_MAJOR)
8172 AC_SUBST(MARIADBC_MINOR)
8173 AC_SUBST(MARIADBC_MICRO)
8175 if test "$ENABLE_MARIADBC" = "TRUE"; then
8177 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MARIADBC"
8179 dnl ===================================================================
8180 dnl Check for system MariaDB
8181 dnl ===================================================================
8182 AC_MSG_CHECKING([which MariaDB to use])
8183 if test "$with_system_mariadb" = "yes"; then
8184 AC_MSG_RESULT([external])
8186 #AC_PATH_PROG(MARIADBCONFIG, [mariadb_config])
8187 if test -z "$MARIADBCONFIG"; then
8188 AC_PATH_PROG(MARIADBCONFIG, [mysql_config])
8189 if test -z "$MARIADBCONFIG"; then
8190 #AC_MSG_ERROR([mariadb_config and mysql_config are missing. Install MariaDB or MySQL package.])
8191 AC_MSG_ERROR([mysql_config is missing. Install MySQL client library development package.])
8194 AC_MSG_CHECKING([MariaDB version])
8195 MARIADB_VERSION=`$MARIADBCONFIG --version`
8196 MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1`
8197 if test "$MARIADB_MAJOR" -ge "5"; then
8200 AC_MSG_ERROR([too old, use 5.0.x or later])
8202 AC_MSG_CHECKING([for MariaDB Client library])
8203 MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`
8204 if test "$COM_GCC_IS_CLANG" = TRUE; then
8205 MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//)
8207 MARIADB_LIBS=`$MARIADBCONFIG --libs_r`
8208 dnl At least mariadb-5.5.34-3.fc20.x86_64 plus
8209 dnl mariadb-5.5.34-3.fc20.i686 reports 64-bit specific output even under
8211 if test "$OS" = LINUX -a "$CPUNAME" = INTEL; then
8212 MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-m64//)
8213 MARIADB_LIBS=$(printf '%s' "$MARIADB_LIBS" \
8214 | sed -e 's|/lib64/|/lib/|')
8216 AC_MSG_RESULT([includes '$MARIADB_CFLAGS', libraries '$MARIADB_LIBS'])
8217 AC_MSG_CHECKING([whether to bundle the MySQL/MariaDB client library])
8218 if test "$enable_bundle_mariadb" = "yes"; then
8219 AC_MSG_RESULT([yes])
8221 LIBMARIADB=lib$(echo "${MARIADB_LIBS}" | sed -e 's/[[[:space:]]]\+-l/\n/g' | grep -E '(mysqlclient|mariadb)')
8222 if test "$_os" = "Darwin"; then
8223 LIBMARIADB=${LIBMARIADB}.dylib
8224 elif test "$_os" = "WINNT"; then
8225 LIBMARIADB=${LIBMARIADB}.dll
8227 LIBMARIADB=${LIBMARIADB}.so
8229 LIBMARIADB_PATH=$($MARIADBCONFIG --variable=pkglibdir)
8230 AC_MSG_CHECKING([for $LIBMARIADB in $LIBMARIADB_PATH])
8231 if test -e "$LIBMARIADB_PATH/$LIBMARIADB"; then
8232 AC_MSG_RESULT([found.])
8233 PathFormat "$LIBMARIADB_PATH"
8234 LIBMARIADB_PATH="$formatted_path"
8236 AC_MSG_ERROR([not found.])
8243 AC_MSG_RESULT([internal])
8244 AC_MSG_ERROR([libmariadb is known to be broken as of 2013-10; use libmysqlclient])
8246 MARIADB_CFLAGS="-I${WORKDIR}/UnpackedTarball/mariadb/include"
8247 MARIADB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lmariadblib"
8248 BUILD_TYPE="$BUILD_TYPE MARIADB"
8251 AC_SUBST(SYSTEM_MARIADB)
8252 AC_SUBST(MARIADB_CFLAGS)
8253 AC_SUBST(MARIADB_LIBS)
8254 AC_SUBST(LIBMARIADB)
8255 AC_SUBST(LIBMARIADB_PATH)
8256 AC_SUBST(BUNDLE_MARIADB)
8259 dnl ===================================================================
8260 dnl Check for system MySQL C++ Connector
8261 dnl ===================================================================
8263 # who thought this too-generic cppconn dir was a good idea?
8264 AC_MSG_CHECKING([MySQL Connector/C++])
8265 if test "$with_system_mysql_cppconn" = "yes"; then
8266 AC_MSG_RESULT([external])
8267 SYSTEM_MYSQL_CPPCONN=TRUE
8269 AC_CHECK_HEADER(mysql_driver.h, [],
8270 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
8271 AC_CHECK_LIB([mysqlcppconn], [main], [:],
8272 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
8274 LIBS="$LIBS -lmysqlcppconn"
8275 AC_MSG_CHECKING([version])
8276 AC_RUN_IFELSE([AC_LANG_SOURCE([[
8277 #include <mysql_driver.h>
8279 int main(int argc, char **argv) {
8280 sql::Driver *driver;
8281 driver = get_driver_instance();
8282 if (driver->getMajorVersion() > 1 || \
8283 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
8284 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
8289 ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[])
8294 AC_MSG_RESULT([internal])
8295 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
8296 SYSTEM_MYSQL_CPPCONN=
8300 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
8302 dnl ===================================================================
8303 dnl Check for system hsqldb
8304 dnl ===================================================================
8305 if test "$with_java" != "no"; then
8306 HSQLDB_USE_JDBC_4_1=
8307 AC_MSG_CHECKING([which hsqldb to use])
8308 if test "$with_system_hsqldb" = "yes"; then
8309 AC_MSG_RESULT([external])
8311 if test -z $HSQLDB_JAR; then
8312 HSQLDB_JAR=/usr/share/java/hsqldb.jar
8314 AC_CHECK_FILE($HSQLDB_JAR, [],
8315 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
8316 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
8318 if $PERL -e 'use Archive::Zip;
8319 my $file = "$ENV{'HSQLDB_JAR'}";
8320 my $zip = Archive::Zip->new( $file );
8321 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
8322 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
8323 push @l, split(/\n/, $mf);
8324 foreach my $line (@l) {
8325 if ($line =~ m/Specification-Version:/) {
8326 ($t, $version) = split (/:/,$line);
8327 $version =~ s/^\s//;
8328 ($a, $b, $c, $d) = split (/\./,$version);
8329 if ($c == "0" && $d > "8") {
8339 AC_MSG_RESULT([yes])
8341 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
8344 AC_MSG_RESULT([internal])
8346 BUILD_TYPE="$BUILD_TYPE HSQLDB"
8347 AC_MSG_CHECKING([whether hsqldb should be built with JDBC 4.1])
8348 javanumver=`$JAVAINTERPRETER -version 2>&1 | $AWK -v num=true -f $SRC_ROOT/solenv/bin/getcompver.awk`
8349 if expr "$javanumver" '>=' 000100060000 > /dev/null; then
8350 AC_MSG_RESULT([yes])
8351 HSQLDB_USE_JDBC_4_1=TRUE
8356 AC_SUBST(SYSTEM_HSQLDB)
8357 AC_SUBST(HSQLDB_JAR)
8358 AC_SUBST([HSQLDB_USE_JDBC_4_1])
8361 dnl ===================================================================
8362 dnl Check for PostgreSQL stuff
8363 dnl ===================================================================
8364 if test "x$enable_postgresql_sdbc" != "xno"; then
8365 SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
8367 if test "$with_krb5" = "yes" -a "$enable_openssl" = "no"; then
8368 AC_MSG_ERROR([krb5 needs OpenSSL, but --disable-openssl was given.])
8370 if test "$with_gssapi" = "yes" -a "$enable_openssl" = "no"; then
8371 AC_MSG_ERROR([GSSAPI needs OpenSSL, but --disable-openssl was given.])
8374 AC_MSG_CHECKING([PostgreSQL C interface])
8375 if test "$with_system_postgresql" = "yes"; then
8376 AC_MSG_RESULT([external PostgreSQL])
8377 SYSTEM_POSTGRESQL=TRUE
8378 if test "$_os" = Darwin; then
8380 for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
8381 pg_supp_path="$P_SEP$d$pg_supp_path"
8384 AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
8385 if test -z "$PGCONFIG"; then
8386 AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
8388 POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
8389 POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
8391 # if/when anything else than PostgreSQL uses Kerberos,
8392 # move this out of `test "x$enable_postgresql_sdbc" != "xno"'
8397 # MacOS X has system MIT Kerberos 5 since 10.4
8398 if test "$with_krb5" != "no"; then
8401 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8402 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5, try installing libcom_err devel package])])
8405 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8406 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5, try installing krb5 devel package])])
8407 KRB5_LIBS="$KRB5_LIBS $LIBS"
8410 if test "$with_gssapi" != "no"; then
8413 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8414 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8420 if test "$with_krb5" = "yes" -o "$with_gssapi" = "yes"; then
8421 AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Windows.])
8424 Linux|GNU|*BSD|DragonFly)
8425 if test "$with_krb5" != "no"; then
8428 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8429 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
8432 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8433 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
8434 KRB5_LIBS="$KRB5_LIBS $LIBS"
8437 if test "$with_gssapi" != "no"; then
8440 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8441 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8447 if test "$with_krb5" = "yes"; then
8450 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8451 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
8454 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8455 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
8456 KRB5_LIBS="$KRB5_LIBS $LIBS"
8459 if test "$with_gssapi" = "yes"; then
8462 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8463 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8469 if test -n "$with_libpq_path"; then
8470 SYSTEM_POSTGRESQL=TRUE
8471 AC_MSG_RESULT([external libpq])
8472 POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
8473 POSTGRESQL_INC=-I"${with_libpq_path}/include/"
8476 AC_MSG_RESULT([internal])
8478 POSTGRESQL_INC="%OVERRIDE_ME%"
8479 BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
8482 if test "${SYSTEM_POSTGRESQL}" = "TRUE"; then
8483 AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
8485 save_CPPFLAGS=$CPPFLAGS
8487 CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
8488 LIBS="${LIBS} ${POSTGRESQL_LIB}"
8489 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
8490 AC_CHECK_LIB([pq], [PQconnectdbParams], [:],
8491 [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
8493 CPPFLAGS=$save_CPPFLAGS
8496 BUILD_POSTGRESQL_SDBC=TRUE
8499 AC_SUBST(WITH_GSSAPI)
8500 AC_SUBST(GSSAPI_LIBS)
8502 AC_SUBST(BUILD_POSTGRESQL_SDBC)
8503 AC_SUBST(SYSTEM_POSTGRESQL)
8504 AC_SUBST(POSTGRESQL_INC)
8505 AC_SUBST(POSTGRESQL_LIB)
8507 dnl ===================================================================
8508 dnl Check for Firebird stuff
8509 dnl ===================================================================
8510 ENABLE_FIREBIRD_SDBC=""
8511 if test "x$enable_firebird_sdbc" = "xyes"; then
8512 SCPDEFS="$SCPDEFS -DWITH_FIREBIRD_SDBC"
8514 dnl ===================================================================
8515 dnl Check for system Firebird
8516 dnl ===================================================================
8517 AC_MSG_CHECKING([which Firebird to use])
8518 if test "$with_system_firebird" = "yes"; then
8519 AC_MSG_RESULT([external])
8520 SYSTEM_FIREBIRD=TRUE
8521 AC_PATH_PROG(FIREBIRDCONFIG, [fb_config])
8522 if test -z "$FIREBIRDCONFIG"; then
8523 AC_MSG_NOTICE([No fb_config -- using pkg-config])
8524 PKG_CHECK_MODULES(FIREBIRD, fbembed)
8525 FIREBIRD_VERSION=`pkg-config --modversion fbembed`
8527 AC_MSG_NOTICE([fb_config found])
8528 FIREBIRD_VERSION=`$FIREBIRDCONFIG --version`
8529 AC_MSG_CHECKING([for Firebird Client library])
8530 FIREBIRD_CFLAGS=`$FIREBIRDCONFIG --cflags`
8531 FIREBIRD_LIBS=`$FIREBIRDCONFIG --embedlibs`
8533 AC_MSG_RESULT([includes `$FIREBIRD_CFLAGS', libraries `$FIREBIRD_LIBS'])
8534 AC_MSG_CHECKING([Firebird version])
8535 if test -n "${FIREBIRD_VERSION}"; then
8536 FIREBIRD_MAJOR=`echo $FIREBIRD_VERSION | cut -d"." -f1`
8537 FIREBIRD_MINOR=`echo $FIREBIRD_VERSION | cut -d"." -f2`
8538 if test "$FIREBIRD_MAJOR" -eq "2" -a "$FIREBIRD_MINOR" -eq "5"; then
8541 AC_MSG_ERROR([Ensure firebird 2.5.x is installed])
8544 __save_CFLAGS="${CFLAGS}"
8545 CFLAGS="${CFLAGS} ${FIREBIRD_CFLAGS}"
8546 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ibase.h>
8547 #if defined(FB_API_VER) && FB_API_VER == 25
8549 #error "Wrong Firebird API version"
8550 #endif]])],AC_MSG_RESULT([OK]),AC_MSG_ERROR([Ensure firebird 2.5.x is installed]))
8551 CFLAGS="${__save_CFLAGS}"
8553 ENABLE_FIREBIRD_SDBC="TRUE"
8554 elif test "$enable_database_connectivity" != yes; then
8555 AC_MSG_RESULT([none])
8556 elif test "$cross_compiling" = "yes"; then
8557 AC_MSG_RESULT([none])
8559 dnl We need libatomic-ops for any non X86/X64 system
8560 if test "${CPUNAME}" != INTEL -a "${CPUNAME}" != X86_64; then
8561 dnl ===================================================================
8562 dnl Check for system libatomic-ops
8563 dnl ===================================================================
8564 libo_CHECK_SYSTEM_MODULE([libatomic_ops],[ATOMIC_OPS],[atomic_ops >= 0.7.2])
8565 if test "$with_system_libatomic_ops" = "yes"; then
8566 SYSTEM_LIBATOMIC_OPS=TRUE
8567 AC_CHECK_HEADERS(atomic_ops.h, [],
8568 [AC_MSG_ERROR(atomic_ops.h not found. install libatomic-ops)], [])
8570 SYSTEM_LIBATOMIC_OPS=
8571 LIBATOMIC_OPS_CFLAGS="-I${WORKDIR}/UnpackedTarball/libatomic_ops/include"
8572 LIBATOMIC_OPS_LIBS="-latomic_ops"
8573 BUILD_TYPE="$BUILD_TYPE LIBATOMIC_OPS"
8577 AC_MSG_RESULT([internal])
8579 FIREBIRD_CFLAGS="-I${WORKDIR}/UnpackedTarball/firebird/include"
8580 FIREBIRD_LIBS="-lfbembed"
8582 BUILD_TYPE="$BUILD_TYPE FIREBIRD"
8583 ENABLE_FIREBIRD_SDBC="TRUE"
8587 AC_SUBST(ENABLE_FIREBIRD_SDBC)
8588 AC_SUBST(SYSTEM_LIBATOMIC_OPS)
8589 AC_SUBST(LIBATOMIC_OPS_CFLAGS)
8590 AC_SUBST(LIBATOMIC_OPS_LIBS)
8591 AC_SUBST(SYSTEM_FIREBIRD)
8592 AC_SUBST(FIREBIRD_CFLAGS)
8593 AC_SUBST(FIREBIRD_LIBS)
8594 dnl AC_SUBST([TOMMATH_CFLAGS])
8595 dnl AC_SUBST([TOMMATH_LIBS])
8597 dnl ===================================================================
8598 dnl Check for system curl
8599 dnl ===================================================================
8600 AC_MSG_CHECKING([which libcurl to use])
8601 if test "$with_system_curl" = "auto"; then
8602 with_system_curl="$with_system_libs"
8605 if test "$with_system_curl" = "yes"; then
8606 AC_MSG_RESULT([external])
8609 AC_MSG_CHECKING([whether libcurl is >= 7.19.4])
8611 # First try PKGCONFIG and then fall back
8612 PKG_CHECK_MODULES(CURL, libcurl >= 7.19.4,, [:])
8614 if test -n "$CURL_PKG_ERRORS"; then
8615 AC_PATH_PROG(CURLCONFIG, curl-config)
8616 if test -z "$CURLCONFIG"; then
8617 AC_MSG_ERROR([curl developement files not found])
8619 CURL_LIBS=`$CURLCONFIG --libs`
8620 CURL_CFLAGS=$("$CURLCONFIG" --cflags | sed -e "s/-I/${ISYSTEM?}/g")
8621 curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
8623 case $curl_version in
8624 dnl brackets doubled below because Autoconf uses them as m4 quote characters,
8625 dnl so they need to be doubled to end up in the configure script
8626 7.19.4|7.19.[[5-9]]|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
8629 AC_MSG_ERROR([no, you have $curl_version])
8633 AC_MSG_RESULT([yes])
8635 libo_MINGW_CHECK_DLL([libcurl])
8636 libo_MINGW_TRY_DLL([libintl])
8637 libo_MINGW_TRY_DLL([libidn])
8638 libo_MINGW_TRY_DLL([libnspr4])
8639 libo_MINGW_TRY_DLL([nssutil3])
8640 libo_MINGW_TRY_DLL([libplc4])
8641 libo_MINGW_TRY_DLL([libplds4])
8642 libo_MINGW_TRY_DLL([nss3])
8643 libo_MINGW_TRY_DLL([ssl3])
8644 libo_MINGW_TRY_DLL([libgpg-error])
8645 libo_MINGW_TRY_DLL([libgcrypt])
8646 libo_MINGW_TRY_DLL([libssh2])
8648 elif test $_os = iOS; then
8649 # Let's see if we need curl, I think not?
8650 AC_MSG_RESULT([none])
8653 AC_MSG_RESULT([internal])
8655 BUILD_TYPE="$BUILD_TYPE CURL"
8658 AC_SUBST(SYSTEM_CURL)
8659 AC_SUBST(CURL_CFLAGS)
8661 AC_SUBST(ENABLE_CURL)
8663 dnl ===================================================================
8664 dnl Check for system boost
8665 dnl ===================================================================
8666 AC_MSG_CHECKING([which boost to use])
8667 if test "$with_system_boost" = "yes"; then
8668 AC_MSG_RESULT([external])
8673 mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
8674 libo_MINGW_TRY_DLL([$mingw_boost_date_time_dll])
8675 if test -z "$MINGW_BOOST_DATE_TIME_DLL"; then
8676 # if not found, try again with 'lib' prefix
8677 libo_MINGW_CHECK_DLL([lib$mingw_boost_date_time_dll])
8680 save_CXXFLAGS=$CXXFLAGS
8681 CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS"
8682 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
8683 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
8684 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
8685 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
8686 AC_CHECK_HEADER(boost/function.hpp, [],
8687 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
8688 CXXFLAGS="$CXXFLAGS -fno-exceptions"
8689 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
8690 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
8691 ]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
8692 if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
8693 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
8695 AC_MSG_RESULT([yes])
8697 CXXFLAGS=$save_CXXFLAGS
8700 AC_MSG_RESULT([internal])
8701 BUILD_TYPE="$BUILD_TYPE BOOST"
8704 AC_SUBST(SYSTEM_BOOST)
8706 dnl ===================================================================
8707 dnl Check for system mdds
8708 dnl ===================================================================
8709 libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds >= 0.10.3], ["-I${WORKDIR}/UnpackedTarball/mdds/include"])
8711 dnl ===================================================================
8712 dnl Check for system glm
8713 dnl ===================================================================
8714 AC_MSG_CHECKING([which glm to use])
8715 if test "$with_system_glm" = "yes"; then
8716 AC_MSG_RESULT([external])
8719 AC_CHECK_HEADER([glm/glm.hpp], [],
8720 [AC_MSG_ERROR([glm/glm.hpp not found. install glm])], [])
8723 AC_MSG_RESULT([internal])
8724 BUILD_TYPE="$BUILD_TYPE GLM"
8727 AC_SUBST([SYSTEM_GLM])
8729 dnl ===================================================================
8730 dnl Check for system glew
8731 dnl ===================================================================
8732 libo_CHECK_SYSTEM_MODULE([glew], [GLEW], [glew >= 1.10.0])
8734 dnl ===================================================================
8735 dnl Check for system vigra
8736 dnl ===================================================================
8737 AC_MSG_CHECKING([which vigra to use])
8738 if test "$with_system_vigra" = "yes"; then
8739 AC_MSG_RESULT([external])
8742 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
8743 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
8746 AC_MSG_RESULT([internal])
8747 BUILD_TYPE="$BUILD_TYPE VIGRA"
8750 AC_SUBST(SYSTEM_VIGRA)
8752 dnl ===================================================================
8753 dnl Check for system odbc
8754 dnl ===================================================================
8755 AC_MSG_CHECKING([which odbc headers to use])
8756 if test "$with_system_odbc" = "yes"; then
8757 AC_MSG_RESULT([external])
8758 SYSTEM_ODBC_HEADERS=TRUE
8760 AC_CHECK_HEADER(sqlext.h, [],
8761 [AC_MSG_ERROR(odbc not found. install odbc)], [])
8762 elif test "$enable_database_connectivity" != yes; then
8763 AC_MSG_RESULT([none])
8765 AC_MSG_RESULT([internal])
8766 SYSTEM_ODBC_HEADERS=
8768 AC_SUBST(SYSTEM_ODBC_HEADERS)
8771 dnl ===================================================================
8772 dnl Check for system openldap
8773 dnl ===================================================================
8775 if test "$_os" != "WINNT" -a "$_os" != "iOS" -a "$_os" != "Android"; then
8776 AC_MSG_CHECKING([which openldap library to use])
8777 if test "$with_system_openldap" = "yes"; then
8778 AC_MSG_RESULT([external])
8779 SYSTEM_OPENLDAP=TRUE
8780 AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
8781 AC_CHECK_LIB([ldap], [ldap_simple_bind_s], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
8782 AC_CHECK_LIB([ldap], [ldap_set_option], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
8784 AC_MSG_RESULT([internal])
8786 BUILD_TYPE="$BUILD_TYPE OPENLDAP"
8789 AC_SUBST(SYSTEM_OPENLDAP)
8791 dnl ===================================================================
8792 dnl Check for mozilla ab connectivity for windows
8793 dnl ===================================================================
8795 if test "$_os" = "WINNT"; then
8796 AC_MSG_CHECKING([whether to enable build of Mozilla addressbook connectivity driver for Windows])
8797 if test "$enable_win_mozab_driver" = "yes" -a "$WITH_MINGW" != "YES" ; then
8799 AC_MSG_RESULT([yes, internal (old windows mozab driver)])
8800 BUILD_TYPE="$BUILD_TYPE MOZ"
8801 MSVC80_DLLS="msvcp80.dll msvcr80.dll Microsoft.VC80.CRT.manifest"
8802 MSVC80_DLL_PATH=`cygpath -u "$TARFILE_LOCATION"`
8803 for dll in $MSVC80_DLLS; do
8804 if ! test -f "$MSVC80_DLL_PATH/$dll"; then
8805 AC_MSG_ERROR([can not find $dll in $MSVC80_DLL_PATH needed for the pre-built Mozilla libraries])
8813 AC_SUBST(WITH_MOZAB4WIN)
8814 AC_SUBST(MSVC80_DLLS)
8815 AC_SUBST(MSVC80_DLL_PATH)
8817 dnl ===================================================================
8818 dnl Check for TLS/SSL and cryptographic implementation to use
8819 dnl ===================================================================
8820 AC_MSG_CHECKING([which TLS/SSL and cryptographic implementation to use])
8821 if test -n "$with_tls"; then
8824 AC_DEFINE(USE_TLS_OPENSSL)
8827 if test "$enable_openssl" != "yes"; then
8828 AC_MSG_ERROR(["Disabling OpenSSL was requested, but the requested TLS to use is actually OpenSSL."])
8831 # warn that OpenSSL has been selected but not all TLS code has this option
8832 AC_MSG_WARN([TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS])
8833 add_warning "TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS"
8836 AC_DEFINE(USE_TLS_NSS)
8840 AC_MSG_ERROR([unsupported implementation $with_tls. Supported are:
8842 nss - Mozilla's Network Security Services (NSS)
8846 elif test $_os = iOS -o $_os = Android; then
8847 # We don't build NSS for iOS and Android
8848 AC_DEFINE(USE_TLS_OPENSSL)
8851 # default to using NSS, it results in smaller oox lib
8852 AC_DEFINE(USE_TLS_NSS)
8855 AC_MSG_RESULT([$TLS])
8858 dnl ===================================================================
8859 dnl Check for system NSS
8860 dnl ===================================================================
8861 libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
8862 if test "$with_system_nss" = "yes"; then
8863 libo_MINGW_CHECK_DLL([libnspr4])
8864 libo_MINGW_CHECK_DLL([libplc4])
8865 libo_MINGW_CHECK_DLL([libplds4])
8866 libo_MINGW_CHECK_DLL([nss3])
8867 libo_MINGW_CHECK_DLL([nssutil3])
8868 libo_MINGW_CHECK_DLL([smime3])
8869 libo_MINGW_CHECK_DLL([ssl3])
8872 dnl ===================================================================
8873 dnl Check for system mozilla headers
8874 dnl ===================================================================
8875 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=
8876 AC_MSG_CHECKING([which NPAPI headers to use])
8878 if test "$with_system_npapi_headers" = "yes"; then
8879 AC_MSG_RESULT([external])
8880 SYSTEM_NPAPI_HEADERS=TRUE
8881 # First try npapi-sdk:
8882 PKG_CHECK_MODULES(NPAPI_HEADERS, npapi-sdk, [LOCATED=yes], [LOCATED=no])
8883 # Then go with libxul:
8884 if test "x$LOCATED" != "xyes"; then
8885 PKG_CHECK_MODULES(NPAPI_HEADERS, libxul, [LOCATED=yes], [LOCATED=no])
8887 if test "x$LOCATED" != "xyes"; then
8888 PKG_CHECK_MODULES(NPAPI_HEADERS, mozilla-plugin, [LOCATED=yes], [LOCATED=no])
8890 # if still not found bail out
8891 if test "x$LOCATED" != "xyes"; then
8892 AC_MSG_ERROR([npapi.h header file not found])
8897 CFLAGS="$CFLAGS $NPAPI_HEADERS_CFLAGS"
8898 AC_MSG_CHECKING([for NPP_GetMIMEDescription return type])
8903 const char* NPP_GetMIMEDescription(void) { return "foo"; }
8905 [AC_MSG_RESULT([const char*])],
8907 AC_MSG_RESULT([char*])
8908 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=TRUE
8912 NPAPI_HEADERS_CFLAGS=$(printf '%s' "$NPAPI_HEADERS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
8914 AC_MSG_RESULT([internal])
8915 dnl ...but will not be built/used unless ENABLE_NPAPI_FROM_BROWSER or
8916 dnl ENABLE_NPAPI_INTO_BROWSER is TRUE
8917 SYSTEM_NPAPI_HEADERS=
8919 AC_SUBST(NPAPI_HEADERS_CFLAGS)
8920 AC_SUBST(SYSTEM_NPAPI_HEADERS)
8921 AC_SUBST(HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION)
8923 dnl ===================================================================
8924 dnl Check for system sane
8925 dnl ===================================================================
8926 AC_MSG_CHECKING([which sane header to use])
8927 if test "$with_system_sane" = "yes"; then
8928 AC_MSG_RESULT([external])
8929 AC_CHECK_HEADER(sane/sane.h, [],
8930 [AC_MSG_ERROR(sane not found. install sane)], [])
8932 AC_MSG_RESULT([internal])
8933 BUILD_TYPE="$BUILD_TYPE SANE"
8936 dnl ===================================================================
8937 dnl Check for system icu
8938 dnl ===================================================================
8945 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="TRUE"
8946 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
8947 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
8948 ICU_RECLASSIFIED_HEBREW_LETTER="TRUE"
8949 AC_MSG_CHECKING([which icu to use])
8950 if test "$with_system_icu" = "yes"; then
8951 AC_MSG_RESULT([external])
8954 AC_MSG_CHECKING([for unicode/rbbi.h])
8955 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
8958 if test "$cross_compiling" != "yes" -o "$WITH_MINGW" = "yes"; then
8960 if test "$WITH_MINGW" = "yes"; then
8961 ICUPATH=`$CC -print-sysroot`/mingw/bin:"$ICUPATH"
8963 AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
8965 AC_MSG_CHECKING([ICU version])
8966 ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
8967 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
8968 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
8970 if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "2" \); then
8971 AC_MSG_RESULT([OK, $ICU_VERSION])
8973 AC_MSG_ERROR([not suitable, only >= 4.2 supported currently])
8977 if test "$cross_compiling" = "yes" -a \( "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \); then
8978 AC_PATH_PROG([ICUCONFIG_FOR_BUILD], [icu-config], [], [$PATH:/usr/sbin:/sbin])
8979 ICU_VERSION_FOR_BUILD=`$ICUCONFIG_FOR_BUILD --noverify --version 2>/dev/null || $ICUCONFIG_FOR_BUILD --version`
8980 ICU_MAJOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f1`
8981 ICU_MINOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f2`
8982 AC_MSG_CHECKING([if MinGW and system versions of ICU are compatible])
8983 if test "$ICU_MAJOR" -eq "$ICU_MAJOR_FOR_BUILD" -a "$ICU_MINOR" -eq "$ICU_MINOR_FOR_BUILD"; then
8984 AC_MSG_RESULT([yes])
8987 if test "$with_system_icu_for_build" != "force"; then
8988 AC_MSG_ERROR([System ICU is not version-compatible with MinGW ICU.
8989 You can use --with-system-icu-for-build=force to use it anyway.])
8994 if test "$cross_compiling" != "yes" -o "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force"; then
8995 # using the system icu tools can lead to version confusion, use the
8996 # ones from the build environment when cross-compiling
8997 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
8998 if test -z "$SYSTEM_GENBRK"; then
8999 AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
9001 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
9002 if test -z "$SYSTEM_GENCCODE"; then
9003 AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
9005 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
9006 if test -z "$SYSTEM_GENCMN"; then
9007 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
9009 if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4" \); then
9010 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="TRUE"
9012 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=
9014 if test "$ICU_MAJOR" -ge "49"; then
9015 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
9016 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
9017 ICU_RECLASSIFIED_HEBREW_LETTER="TRUE"
9019 ICU_RECLASSIFIED_PREPEND_SET_EMPTY=
9020 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER=
9021 ICU_RECLASSIFIED_HEBREW_LETTER=
9025 if test "$cross_compiling" = "yes"; then
9026 if test "$ICU_MAJOR" -ge "50"; then
9027 AC_MSG_RESULT([Ignore ICU_MINOR as obviously the libraries don't include the minor version in their names any more])
9032 libo_MINGW_CHECK_DLL([icudata][$ICU_MAJOR][$ICU_MINOR])
9033 libo_MINGW_CHECK_DLL([icui18n][$ICU_MAJOR][$ICU_MINOR])
9034 libo_MINGW_CHECK_DLL([icuuc][$ICU_MAJOR][$ICU_MINOR])
9036 AC_MSG_RESULT([internal])
9038 BUILD_TYPE="$BUILD_TYPE ICU"
9039 # surprisingly set these only for "internal" (to be used by various other
9040 # external libs): the system icu-config is quite unhelpful and spits out
9041 # dozens of weird flags and also default path -I/usr/include
9042 ICU_CFLAGS="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
9043 ICU_LIBS="-L${WORKDIR}/UnpackedTarball/icu/source/lib"
9045 AC_SUBST(SYSTEM_ICU)
9046 AC_SUBST(SYSTEM_GENBRK)
9047 AC_SUBST(SYSTEM_GENCCODE)
9048 AC_SUBST(SYSTEM_GENCMN)
9051 AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
9052 AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
9053 AC_SUBST(ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER)
9054 AC_SUBST(ICU_RECLASSIFIED_HEBREW_LETTER)
9055 AC_SUBST(ICU_CFLAGS)
9058 dnl ===================================================================
9060 dnl ===================================================================
9062 AC_MSG_CHECKING([whether to enable graphite support])
9063 if test $_os != Darwin -a $_os != Android -a $_os != iOS -a \( -z "$enable_graphite" -o "$enable_graphite" != no \); then
9064 AC_MSG_RESULT([yes])
9065 ENABLE_GRAPHITE="TRUE"
9066 AC_DEFINE(ENABLE_GRAPHITE)
9067 libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3])
9068 if test "$with_system_graphite" = "yes"; then
9069 libo_MINGW_CHECK_DLL([libgraphite2])
9074 AC_SUBST(ENABLE_GRAPHITE)
9076 dnl ===================================================================
9078 dnl ===================================================================
9080 AC_MSG_CHECKING([whether to enable orcus])
9081 if test -z "$enable_orcus" -o "$enable_orcus" != no; then
9082 AC_MSG_RESULT([yes])
9084 AC_DEFINE(ENABLE_ORCUS)
9086 libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.8 >= 0.7.0])
9087 if test "$with_system_orcus" != "yes"; then
9088 if test "$SYSTEM_BOOST" = "TRUE"; then
9089 # ===========================================================
9090 # Determine if we are going to need to link with Boost.System
9091 # ===========================================================
9092 dnl This seems to be necessary since boost 1.50 (1.48 does not need it,
9093 dnl 1.49 is untested). The macro BOOST_THREAD_DONT_USE_SYSTEM mentioned
9094 dnl in documentation has no effect.
9095 AC_MSG_CHECKING([if we need to link with Boost.System])
9097 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
9098 @%:@include <boost/version.hpp>
9100 #if BOOST_VERSION >= 105000
9101 # error yes, we need to link with Boost.System
9106 AC_MSG_RESULT([yes])
9112 dnl FIXME by renaming SYSTEM_LIBORCUS to SYSTEM_ORCUS in the build system world
9113 SYSTEM_LIBORCUS=$SYSTEM_ORCUS
9114 AC_SUBST([BOOST_SYSTEM_LIB])
9115 AC_SUBST(SYSTEM_LIBORCUS)
9120 AC_SUBST(ENABLE_ORCUS)
9122 dnl ===================================================================
9124 dnl ===================================================================
9125 AC_MSG_CHECKING([whether to enable HarfBuzz support])
9126 if test $_os != WINNT -a $_os != Darwin -a $_os != iOS; then
9127 AC_MSG_RESULT([yes])
9128 ENABLE_HARFBUZZ="TRUE"
9129 if $PKG_CONFIG --atleast-version 0.9.18 harfbuzz; then
9130 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"])
9132 libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz >= 0.9.10],[-I${WORKDIR}/UnpackedTarball/harfbuzz/src],["-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz -lharfbuzz-icu"])
9137 AC_SUBST(ENABLE_HARFBUZZ)
9139 dnl ===================================================================
9140 dnl Check for NPAPI interface to plug browser plugins into LibreOffice documents
9141 dnl ===================================================================
9142 AC_MSG_CHECKING([whether to plug browser plugins into LibreOffice documents])
9143 # Obviously no such thing on iOS or Android. Also not possible when building
9144 # 64-bit OS X code as the plugin code uses QuickTime and Carbon.
9145 if test "$_os" != Android -a "$_os" != iOS -a \( $_os != Darwin -o "$BITNESS_OVERRIDE" = "" \) -a \
9146 "$enable_headless" != yes -a "$enable_mpl_subset" != yes
9148 AC_MSG_RESULT([yes])
9149 ENABLE_NPAPI_FROM_BROWSER=TRUE
9152 ENABLE_NPAPI_FROM_BROWSER=
9154 AC_SUBST(ENABLE_NPAPI_FROM_BROWSER)
9156 dnl ===================================================================
9157 dnl Check for NPAPI interface to plug LibreOffice into browser windows
9158 dnl ===================================================================
9159 AC_MSG_CHECKING([whether to plug LibreOffice into browser windows])
9160 if test "$enable_mpl_subset" != yes -a \( "$_os" = WINNT -o "$_os" != Android -a "$_os" != Darwin -a "$_os" != iOS -a \
9161 "$enable_headless" != yes -a "$enable_gtk" != no \)
9163 AC_MSG_RESULT([yes])
9164 ENABLE_NPAPI_INTO_BROWSER=TRUE
9167 ENABLE_NPAPI_INTO_BROWSER=
9169 AC_SUBST(ENABLE_NPAPI_INTO_BROWSER)
9171 AC_MSG_CHECKING([whether to use X11])
9172 dnl ***************************************
9173 dnl testing for X libraries and includes...
9174 dnl ***************************************
9176 if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS -a "$enable_headless" != "yes"; then
9178 AC_DEFINE(HAVE_FEATURE_X11)
9180 AC_MSG_RESULT([$WANT_X11])
9182 if test "$WANT_X11" = "yes"; then
9185 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9187 if test -z "$x_includes"; then
9188 x_includes="default_x_includes"
9190 if test -z "$x_libraries"; then
9191 x_libraries="default_x_libraries"
9193 CFLAGS="$CFLAGS $X_CFLAGS"
9194 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
9195 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
9197 x_includes="no_x_includes"
9198 x_libraries="no_x_libraries"
9201 if test "$WANT_X11" = "yes"; then
9202 dnl ===================================================================
9203 dnl Check for Composite.h for Mozilla plugin
9204 dnl ===================================================================
9205 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
9206 [#include <X11/Intrinsic.h>])
9208 # ENABLE_NPAPI_FROM_BROWSER requires Xt library
9209 AC_CHECK_LIB([Xt], [XtToolkitInitialize], [:],
9210 [AC_MSG_ERROR(Xt library not found)])
9212 dnl ===================================================================
9213 dnl Check for extension headers
9214 dnl ===================================================================
9215 AC_CHECK_HEADERS(X11/extensions/shape.h,[],[AC_MSG_ERROR([libXext headers not found])],
9216 [#include <X11/extensions/shape.h>])
9218 # vcl needs ICE and SM
9219 AC_CHECK_HEADERS(X11/ICE/ICElib.h,[],[AC_MSG_ERROR([libICE headers not found])])
9220 AC_CHECK_LIB([ICE], [IceConnectionNumber], [:],
9221 [AC_MSG_ERROR(ICE library not found)])
9222 AC_CHECK_HEADERS(X11/SM/SMlib.h,[],[AC_MSG_ERROR([libSM headers not found])])
9223 AC_CHECK_LIB([SM], [SmcOpenConnection], [:],
9224 [AC_MSG_ERROR(SM library not found)])
9227 dnl ===================================================================
9228 dnl Check for system Xrender
9229 dnl ===================================================================
9230 AC_MSG_CHECKING([whether to use Xrender])
9231 if test "$WANT_X11" = "yes" -a "$test_xrender" = "yes"; then
9232 AC_MSG_RESULT([yes])
9233 PKG_CHECK_MODULES(XRENDER, xrender)
9234 XRENDER_CFLAGS=$(printf '%s' "$XRENDER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9235 AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
9236 [AC_MSG_ERROR(libXrender not found or functional)], [])
9237 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
9238 [AC_MSG_ERROR(Xrender not found. install X)], [])
9242 AC_SUBST(XRENDER_CFLAGS)
9243 AC_SUBST(XRENDER_LIBS)
9245 dnl ===================================================================
9246 dnl Check for XRandr
9247 dnl ===================================================================
9248 AC_MSG_CHECKING([whether to enable RandR support])
9249 if test "$WANT_X11" = "yes" -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \); then
9250 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
9251 XRANDR_DLOPEN="TRUE"
9252 AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
9254 AC_MSG_RESULT([yes])
9255 XRANDR_DLOPEN="FALSE"
9256 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
9257 if test "$ENABLE_RANDR" != "TRUE"; then
9258 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
9259 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
9261 AC_CHECK_LIB([Xrandr], [XRRQueryExtension], [:],
9262 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
9263 XRANDR_LIBS="-lXrandr "
9266 XRANDR_CFLAGS=$(printf '%s' "$XRANDR_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9272 AC_SUBST(XRANDR_DLOPEN)
9273 AC_SUBST(XRANDR_CFLAGS)
9274 AC_SUBST(XRANDR_LIBS)
9275 AC_SUBST(ENABLE_RANDR)
9277 if test "$enable_neon" = "no" -o "$enable_mpl_subset" = "yes"; then
9280 if test $_os = iOS -o $_os = Android; then
9283 AC_MSG_CHECKING([for webdav library])
9284 case "$WITH_WEBDAV" in
9286 AC_MSG_RESULT([serf])
9287 # Check for system apr-util
9288 libo_CHECK_SYSTEM_MODULE([apr],[APR],[apr-util-1],
9289 ["-I${WORKDIR}/UnpackedTarball/apr/include -I${WORKDIR}/UnpackedTarball/apr_util/include"],
9290 ["-L${WORKDIR}/UnpackedTarball/apr/.libs -lapr-1 -L${WORKDIR}/UnpackedTarball/apr_util/.libs -laprutil-1"])
9291 if test "$COM" = "MSC"; then
9293 test -n "${MSVC_USE_DEBUG_RUNTIME}" && APR_LIB_DIR="LibD"
9294 APR_LIBS="${WORKDIR}/UnpackedTarball/apr/${APR_LIB_DIR}/apr-1.lib ${WORKDIR}/UnpackedTarball/apr_util/${APR_LIB_DIR}/aprutil-1.lib"
9297 # Check for system serf
9298 libo_CHECK_SYSTEM_MODULE([serf],[SERF],[serf-1 >= 1.1.0],["-I${WORKDIR}/UnpackedTarball/serf"],
9299 ["-L${WORKDIR}/UnpackedTarball/serf/.libs -lserf-1"])
9300 if test "$COM" = "MSC"; then
9301 SERF_LIB_DIR="Release"
9302 test -n "${MSVC_USE_DEBUG_RUNTIME}" && SERF_LIB_DIR="Debug"
9303 SERF_LIBS="${WORKDIR}/UnpackedTarball/serf/${SERF_LIB_DIR}/serf-1.lib"
9307 AC_MSG_RESULT([neon])
9308 # Check for system neon
9309 libo_CHECK_SYSTEM_MODULE([neon],[NEON],[neon >= 0.26.0])
9310 if test "$with_system_neon" = "yes"; then
9311 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
9312 libo_MINGW_CHECK_DLL([libneon])
9313 libo_MINGW_TRY_DLL([libtasn1])
9314 libo_MINGW_TRY_DLL([libgnutls])
9318 AC_SUBST(NEON_VERSION)
9321 AC_MSG_RESULT([none, disabled])
9325 AC_SUBST(WITH_WEBDAV)
9327 dnl ===================================================================
9328 dnl Check for disabling cve_tests
9329 dnl ===================================================================
9330 AC_MSG_CHECKING([whether to execute CVE tests])
9331 if test "$enable_cve_tests" = "no"; then
9333 DISABLE_CVE_TESTS=TRUE
9334 AC_SUBST(DISABLE_CVE_TESTS)
9336 AC_MSG_RESULT([yes])
9339 dnl ===================================================================
9340 dnl Check for enabling chart XShape tests
9341 dnl ===================================================================
9342 AC_MSG_CHECKING([whether to execute chart XShape tests])
9343 if test "$enable_chart_tests" = "yes"; then
9344 AC_MSG_RESULT([yes])
9345 ENABLE_CHART_TESTS=TRUE
9346 AC_SUBST(ENABLE_CHART_TESTS)
9351 dnl ===================================================================
9352 dnl Check for system openssl
9353 dnl ===================================================================
9355 AC_MSG_CHECKING([whether to disable OpenSSL usage])
9356 if test "$enable_openssl" = "yes"; then
9358 if test "$_os" = Darwin -a "${MAC_OS_X_VERSION_MIN_REQUIRED:-0}" -ge 1070; then
9359 # OpenSSL is deprecated when building for 10.7 or later.
9361 # http://stackoverflow.com/questions/7406946/why-is-apple-deprecating-openssl-in-macos-10-7-lion
9362 # http://stackoverflow.com/questions/7475914/libcrypto-deprecated-on-mac-os-x-10-7-lion
9364 with_system_openssl=no
9365 libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
9366 elif test "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o "$_os" = "DragonFly" \
9367 && test "$with_system_openssl" != "no"; then
9368 with_system_openssl=yes
9371 OPENSSL_LIBS="-lssl -lcrypto"
9373 libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
9375 if test "$with_system_openssl" = "yes"; then
9376 libo_MINGW_CHECK_DLL([libssl])
9377 libo_MINGW_CHECK_DLL([libcrypto])
9378 AC_MSG_CHECKING([whether openssl supports SHA512])
9380 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/sha.h>]],[[
9382 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, openssl too old. Need >= 0.9.8.])])
9386 AC_MSG_RESULT([yes])
9387 DISABLE_OPENSSL=TRUE
9389 # warn that although OpenSSL is disabled, system libraries may be depending on it
9390 AC_MSG_WARN([OpenSSL has been disabled. No code compiled by LibO will make use of it but system librares may create indirect dependencies])
9391 add_warning "OpenSSL has been disabled. No code compiled by LibO will make use of it but system librares may create indirect dependencies"
9394 AC_SUBST([DISABLE_OPENSSL])
9396 dnl ===================================================================
9397 dnl Check for building gnutls
9398 dnl ===================================================================
9399 AC_MSG_CHECKING([whether to use gnutls])
9400 if test "$WITH_WEBDAV" = "neon" && test "$enable_openssl" = "no"; then
9401 AC_MSG_RESULT([yes])
9403 PKG_CHECK_MODULES(GNUTLS, [gnutls],,
9404 AC_MSG_ERROR([[Disabling OpenSSL was requested, but GNUTLS is not
9405 available in the system to use as replacement.]]))
9408 AC_SUBST([LIBGCRYPT_CFLAGS])
9409 AC_SUBST([LIBGCRYPT_LIBS])
9411 dnl ===================================================================
9412 dnl Check for system redland
9413 dnl ===================================================================
9414 dnl redland: versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
9415 dnl raptor2: need at least 2.0.7 for CVE-2012-0037
9416 libo_CHECK_SYSTEM_MODULE([redland],[REDLAND],[redland >= 1.0.8 raptor2 >= 2.0.7])
9417 if test "$with_system_redland" = "yes"; then
9418 libo_MINGW_CHECK_DLL([librdf])
9419 AC_CHECK_LIB([rdf], [librdf_world_set_raptor_init_handler], [:],
9420 [AC_MSG_ERROR(librdf too old. Need >= 1.16)], [])
9421 libo_MINGW_TRY_DLL([libraptor])
9422 libo_MINGW_TRY_DLL([librasqal])
9423 libo_MINGW_TRY_DLL([libsqlite3])
9429 AC_SUBST(RAPTOR_MAJOR)
9430 AC_SUBST(RASQAL_MAJOR)
9431 AC_SUBST(REDLAND_MAJOR)
9433 dnl ===================================================================
9434 dnl Check for system hunspell
9435 dnl ===================================================================
9436 AC_MSG_CHECKING([which libhunspell to use])
9437 if test "$with_system_hunspell" = "yes"; then
9438 AC_MSG_RESULT([external])
9439 SYSTEM_HUNSPELL=TRUE
9441 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
9442 if test "$HUNSPELL_PC" != "TRUE"; then
9443 AC_CHECK_HEADER(hunspell.hxx, [],
9445 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
9446 [AC_MSG_ERROR(hunspell headers not found.)], [])
9448 AC_CHECK_LIB([hunspell], [main], [:],
9449 [ AC_MSG_ERROR(hunspell library not found.) ], [])
9450 HUNSPELL_LIBS=-lhunspell
9453 libo_MINGW_CHECK_DLL([libhunspell-1.3])
9454 HUNSPELL_CFLAGS=$(printf '%s' "$HUNSPELL_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9456 AC_MSG_RESULT([internal])
9458 HUNSPELL_CFLAGS="-I${WORKDIR}/UnpackedTarball/hunspell/src/hunspell"
9459 if test "$COM" = "MSC"; then
9460 HUNSPELL_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/hunspell.lib"
9462 HUNSPELL_LIBS="-L${WORKDIR}/UnpackedTarball/hunspell/src/hunspell/.libs -lhunspell-1.3"
9464 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
9466 AC_SUBST(SYSTEM_HUNSPELL)
9467 AC_SUBST(HUNSPELL_CFLAGS)
9468 AC_SUBST(HUNSPELL_LIBS)
9470 dnl ===================================================================
9471 dnl Checking for altlinuxhyph
9472 dnl ===================================================================
9473 AC_MSG_CHECKING([which altlinuxhyph to use])
9474 if test "$with_system_altlinuxhyph" = "yes"; then
9475 AC_MSG_RESULT([external])
9477 AC_CHECK_HEADER(hyphen.h, [],
9478 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
9479 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
9480 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
9481 [#include <hyphen.h>])
9482 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
9483 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9484 if test -z "$HYPHEN_LIB"; then
9485 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
9486 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9488 if test -z "$HYPHEN_LIB"; then
9489 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
9490 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9492 libo_MINGW_CHECK_DLL([libhyphen])
9494 AC_MSG_RESULT([internal])
9496 BUILD_TYPE="$BUILD_TYPE HYPHEN"
9497 if test "$COM" = "MSC"; then
9498 HYPHEN_LIB="${WORKDIR}/LinkTarget/StaticLibrary/hyphen.lib"
9500 HYPHEN_LIB="-L${WORKDIR}/UnpackedTarball/hyphen/.libs -lhyphen"
9503 AC_SUBST(SYSTEM_HYPH)
9504 AC_SUBST(HYPHEN_LIB)
9506 dnl ===================================================================
9507 dnl Checking for mythes
9508 dnl ===================================================================
9509 AC_MSG_CHECKING([which mythes to use])
9510 if test "$with_system_mythes" = "yes"; then
9511 AC_MSG_RESULT([external])
9514 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
9515 if test "$MYTHES_PKGCONFIG" = "no"; then
9516 AC_CHECK_HEADER(mythes.hxx, [],
9517 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
9518 AC_CHECK_LIB([mythes-1.2], [main], [:],
9519 [ MYTHES_FOUND=no], [])
9520 if test "$MYTHES_FOUND" = "no"; then
9521 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
9522 [ MYTHES_FOUND=no], [])
9524 if test "$MYTHES_FOUND" = "no"; then
9525 AC_MSG_ERROR([mythes library not found!.])
9529 libo_MINGW_CHECK_DLL([libmythes-1.2])
9530 MYTHES_CFLAGS=$(printf '%s' "$MYTHES_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9532 AC_MSG_RESULT([internal])
9534 BUILD_TYPE="$BUILD_TYPE MYTHES"
9535 if test "$COM" = "MSC"; then
9536 MYTHES_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/mythes.lib"
9538 MYTHES_LIBS="-L${WORKDIR}/UnpackedTarball/mythes/.libs -lmythes-1.2"
9541 AC_SUBST(SYSTEM_MYTHES)
9542 AC_SUBST(MYTHES_CFLAGS)
9543 AC_SUBST(MYTHES_LIBS)
9545 dnl ===================================================================
9546 dnl How should we build the linear programming solver ?
9547 dnl ===================================================================
9550 AC_MSG_CHECKING([whether to build with CoinMP])
9551 if test "$enable_coinmp" != "no"; then
9553 AC_MSG_RESULT([yes])
9554 # Should we check for system CoinMP ? How to do that ?
9555 BUILD_TYPE="$BUILD_TYPE COINMP"
9559 AC_SUBST(ENABLE_COINMP)
9562 AC_MSG_CHECKING([whether to build with lpsolve])
9563 if test "$enable_lpsolve" != "no"; then
9565 AC_MSG_RESULT([yes])
9569 AC_SUBST(ENABLE_LPSOLVE)
9571 if test "$ENABLE_LPSOLVE" = TRUE; then
9572 AC_MSG_CHECKING([which lpsolve to use])
9573 if test "$with_system_lpsolve" = "yes"; then
9574 AC_MSG_RESULT([external])
9576 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
9577 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
9579 # some systems need this. Like Ubuntu....
9580 AC_CHECK_LIB(m, floor)
9581 AC_CHECK_LIB(dl, dlopen)
9582 AC_CHECK_LIB([lpsolve55], [make_lp], [:],
9583 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
9585 libo_MINGW_CHECK_DLL([lpsolve55])
9587 AC_MSG_RESULT([internal])
9589 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
9592 AC_SUBST(SYSTEM_LPSOLVE)
9594 dnl ===================================================================
9595 dnl Checking for libexttextcat
9596 dnl ===================================================================
9597 libo_CHECK_SYSTEM_MODULE([libexttextcat],[LIBEXTTEXTCAT],[libexttextcat >= 3.1.1])
9598 if test "$with_system_libexttextcat" = "yes"; then
9599 SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
9601 AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
9603 dnl ***************************************
9604 dnl testing libc version for Linux...
9605 dnl ***************************************
9606 if test "$_os" = "Linux"; then
9607 AC_MSG_CHECKING([whether libc is >= 2.1.1])
9608 exec 6>/dev/null # no output
9609 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
9610 exec 6>&1 # output on again
9611 if test "$HAVE_LIBC"; then
9612 AC_MSG_RESULT([yes])
9614 AC_MSG_ERROR([no, upgrade libc])
9618 dnl =========================================
9619 dnl Check for the Windows SDK.
9620 dnl =========================================
9621 dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
9622 dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
9623 if test "$_os" = "WINNT"; then
9624 AC_MSG_CHECKING([for Windows SDK])
9625 if test "$build_os" = "cygwin"; then
9627 WINDOWS_SDK_HOME=$winsdktest
9629 # normalize if found
9630 if test -n "$WINDOWS_SDK_HOME"; then
9631 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
9632 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
9636 if test -n "$WINDOWS_SDK_HOME"; then
9637 # Remove a possible trailing backslash
9638 WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
9640 if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
9641 -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
9642 -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
9643 have_windows_sdk_headers=yes
9644 elif test -f "$WINDOWS_SDK_HOME/Include/um/adoint.h" \
9645 -a -f "$WINDOWS_SDK_HOME/Include/um/SqlUcode.h" \
9646 -a -f "$WINDOWS_SDK_HOME/Include/um/usp10.h"; then
9647 have_windows_sdk_headers=yes
9649 have_windows_sdk_headers=no
9652 if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
9653 have_windows_sdk_libs=yes
9654 elif test -f "$WINDOWS_SDK_HOME/lib/win8/um/$WINDOWS_SDK_ARCH/user32.lib"; then
9655 have_windows_sdk_libs=yes
9657 have_windows_sdk_libs=no
9660 if test $have_windows_sdk_headers = no -o $have_windows_sdk_libs = no; then
9661 AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
9662 the Windows SDK are installed.])
9665 if test ! -f "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
9666 -o ! -f "$WINDOWS_SDK_HOME/bin/msidb.exe" \
9667 -o ! -f "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
9668 -o ! -f "$WINDOWS_SDK_HOME/bin/msitran.exe"; then :
9669 elif test ! -f "$WINDOWS_SDK_HOME/bin/x86/msiinfo.exe" \
9670 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/msidb.exe" \
9671 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/uuidgen.exe" \
9672 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/msitran.exe"; then :
9674 AC_MSG_ERROR([Some (all?) Windows Installer tools in the Windows SDK are missing, please install.])
9678 if test -z "$WINDOWS_SDK_HOME"; then
9679 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway!?])
9680 elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
9681 WINDOWS_SDK_VERSION=60
9682 AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
9683 elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
9684 WINDOWS_SDK_VERSION=61
9685 AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
9686 elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
9687 WINDOWS_SDK_VERSION=70
9688 AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
9689 elif echo $WINDOWS_SDK_HOME | grep "8.0" >/dev/null 2>/dev/null; then
9690 WINDOWS_SDK_VERSION=80
9691 AC_MSG_RESULT([found Windows SDK 8.0 ($WINDOWS_SDK_HOME)])
9692 # compatibility warning if usind VS 2012 and not explicitly choosing the 80 SDK
9693 if test "$VCVER" = "110" -a -z "$with_windows_sdk"; then
9694 AC_MSG_WARN([If a build created with VS 2012 should run on Windows XP,])
9695 AC_MSG_WARN([use --with-windows-sdk=7.1A (requires VS 2012 Update 1 or newer)])
9696 add_warning "If a build created with VS 2012 should run on Windows XP,"
9697 add_warning "use --with-windows-sdk=7.1A (requires VS 2012 Update 1 or newer)"
9700 AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
9702 PathFormat "$WINDOWS_SDK_HOME"
9703 WINDOWS_SDK_HOME="$formatted_path"
9704 if test "$build_os" = "cygwin"; then
9705 SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include -I$COMPATH/include"
9706 if test -d "$WINDOWS_SDK_HOME/include/um"; then
9707 SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include/um -I$WINDOWS_SDK_HOME/include/shared"
9711 dnl TODO: solenv/bin/modules/installer/windows/msiglobal.pm wants to use a
9712 dnl WiLangId.vbs that is included only in some SDKs (e.g., included in v7.1
9713 dnl but not in v8.0), so allow this to be overridden with a
9714 dnl WINDOWS_SDK_WILANGID for now; a full-blown --with-windows-sdk-wilangid
9715 dnl and configuration error if no WiLangId.vbs is found would arguably be
9716 dnl better, but I do not know under which conditions exactly it is needed by
9718 if test -z "$WINDOWS_SDK_WILANGID" -a -n "$WINDOWS_SDK_HOME"; then
9719 WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/Samples/sysmgmt/msi/scripts/WiLangId.vbs
9720 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9721 WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs
9723 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9724 WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.0/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs")
9726 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9727 AC_MSG_WARN([WiLangId.vbs not found - building translated packages will fail])
9728 add_warning "WiLangId.vbs not found - building translated packages will fail"
9732 AC_SUBST(WINDOWS_SDK_HOME)
9733 AC_SUBST(WINDOWS_SDK_VERSION)
9734 AC_SUBST(WINDOWS_SDK_WILANGID)
9736 dnl =========================================
9737 dnl Check for uuidgen
9738 dnl =========================================
9739 if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
9740 if test "$WITH_MINGW" = "yes"; then
9741 AC_PATH_PROG([UUIDGEN], [uuid])
9742 if test -z "$UUIDGEN"; then
9743 AC_MSG_WARN([uuid is needed for dev-install])
9746 # presence is already tested above in the WINDOWS_SDK_HOME check
9751 AC_PATH_PROG([UUIDGEN], [uuidgen])
9752 if test -z "$UUIDGEN"; then
9753 AC_MSG_WARN([uuid is needed for dev-install])
9757 dnl =========================================
9758 dnl Check for the Microsoft DirectX SDK.
9759 dnl =========================================
9760 if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
9761 AC_MSG_CHECKING([for DirectX SDK])
9762 if test "$build_os" = "cygwin"; then
9763 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
9764 if test -n "$DXSDK_DIR"; then
9765 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
9766 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
9768 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
9769 # the "DirectX SDK not found" error later.
9772 # Remove a possible trailing backslash
9773 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
9776 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h"; then
9777 HAVE_DIRECTXSDK_H="yes"
9779 HAVE_DIRECTXSDK_H="no"
9782 if test "$BITNESS_OVERRIDE" = 64; then
9783 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x64"
9785 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
9787 PathFormat "$DIRECTXSDK_LIB"
9788 DIRECTXSDK_LIB="$formatted_path"
9790 if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib"; then
9791 HAVE_DIRECTXSDK_LIB="yes"
9793 HAVE_DIRECTXSDK_LIB="no"
9796 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
9797 AC_MSG_RESULT([found])
9799 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
9801 if test -n "$DIRECTXSDK_HOME"; then
9802 PathFormat "$DIRECTXSDK_HOME"
9803 DIRECTXSDK_HOME="$formatted_path"
9804 SOLARINC="$SOLARINC -I$DIRECTXSDK_HOME/include"
9807 AC_SUBST(DIRECTXSDK_HOME)
9809 dnl ***************************************
9810 dnl Checking for bison and flex
9811 dnl ***************************************
9812 AC_PATH_PROG(BISON, bison)
9813 if test -z "$BISON"; then
9814 AC_MSG_ERROR([no bison found in \$PATH, install it])
9816 AC_MSG_CHECKING([the bison version])
9817 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
9818 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
9819 # Accept newer than 2.0
9820 if test "$_bison_longver" -lt 2000; then
9821 AC_MSG_ERROR([failed ($BISON $_bison_version need 2.0+)])
9825 AC_PATH_PROG(FLEX, flex)
9826 if test -z "$FLEX"; then
9827 AC_MSG_ERROR([no flex found in \$PATH, install it])
9829 AC_MSG_CHECKING([the flex version])
9830 _flex_version=$($FLEX --version | $SED -e 's/^.*\([[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\).*$/\1/')
9831 if test $(echo $_flex_version | $AWK -F. '{printf("%d%03d%03d", $1, $2, $3)}') -lt 2005035; then
9832 AC_MSG_ERROR([failed ($FLEX $_flex_version found, but need at least 2.5.35)])
9836 dnl ***************************************
9837 dnl Checking for patch
9838 dnl ***************************************
9839 AC_PATH_PROG(PATCH, patch)
9840 if test -z "$PATCH"; then
9841 AC_MSG_ERROR([\"patch\" not found in \$PATH, install it])
9844 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
9845 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
9846 if test -z "$with_gnu_patch"; then
9849 if test -x "$with_gnu_patch"; then
9850 GNUPATCH=$with_gnu_patch
9852 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
9856 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
9857 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
9858 AC_MSG_RESULT([yes])
9860 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
9866 dnl We also need to check for --with-gnu-cp
9868 if test -z "$with_gnu_cp"; then
9869 # check the place where the good stuff is hidden on Solaris...
9870 if test -x /usr/gnu/bin/cp; then
9871 GNUCP=/usr/gnu/bin/cp
9873 AC_PATH_PROGS(GNUCP, gnucp cp)
9875 if test -z $GNUCP; then
9876 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
9879 if test -x "$with_gnu_cp"; then
9882 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
9886 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
9887 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
9888 AC_MSG_RESULT([yes])
9889 elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
9890 AC_MSG_RESULT([yes])
9893 darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*)
9896 AC_MSG_RESULT([no gnucp found - using the system's cp command])
9899 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
9908 dnl ***************************************
9909 dnl testing assembler path
9910 dnl ***************************************
9912 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
9913 if test "$BITNESS_OVERRIDE" = ""; then
9918 assembler_bin=bin/amd64
9921 AC_MSG_CHECKING([$VC_PRODUCT_DIR/$assembler_bin/$assembler])
9922 if test -f "$VC_PRODUCT_DIR/$assembler_bin/$assembler"; then
9923 ASM_HOME=$VC_PRODUCT_DIR/$assembler_bin
9924 AC_MSG_RESULT([found])
9925 ML_EXE="$VC_PRODUCT_DIR/$assembler_bin/$assembler"
9927 AC_MSG_ERROR([Configure did not find $assembler assembler.])
9930 PathFormat "$ASM_HOME"
9931 ASM_HOME="$formatted_path"
9938 dnl ===================================================================
9939 dnl We need zip and unzip
9940 dnl ===================================================================
9941 AC_PATH_PROG(ZIP, zip)
9942 test -z "$ZIP" && AC_MSG_ERROR([zip is required])
9943 if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
9944 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],,)
9947 AC_PATH_PROG(UNZIP, unzip)
9948 test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
9950 dnl ===================================================================
9951 dnl Zip must be a specific type for different build types.
9952 dnl ===================================================================
9953 if test $build_os = cygwin; then
9954 if test -n "`$ZIP -h | $GREP -i WinNT`"; then
9955 AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
9959 dnl ===================================================================
9960 dnl We need touch with -h option support.
9961 dnl ===================================================================
9962 AC_PATH_PROG(TOUCH, touch)
9963 test -z "$TOUCH" && AC_MSG_ERROR([touch is required])
9965 if ! "$TOUCH" -h warn 2>/dev/null > /dev/null; then
9966 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],,)
9969 dnl ===================================================================
9970 dnl Test which vclplugs have to be built.
9971 dnl ===================================================================
9976 if test "x$enable_gtk3" = "xyes"; then
9977 if test "$with_system_cairo" = no; then
9978 AC_MSG_ERROR([System cairo required for gtk3 support, do not combine --enable-gtk3 with --without-system-cairo])
9980 : ${with_system_cairo:=yes}
9981 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="")
9982 if test "x$ENABLE_GTK3" = "xTRUE"; then
9985 AC_MSG_ERROR([gtk3 libraries of the correct versions, not found])
9987 GTK3_CFLAGS=$(printf '%s' "$GTK3_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9990 AC_SUBST(GTK3_CFLAGS)
9991 AC_SUBST(ENABLE_GTK3)
9993 AC_MSG_CHECKING([which VCLplugs shall be built])
9994 if test "$GUIBASE" != "unx" -o "$enable_headless" = "yes"; then
9998 if test "x$enable_gtk" = "xyes"; then
9999 if test "$with_system_cairo" = no; then
10000 AC_MSG_ERROR([System cairo required for gtk support, do not use --without-system-cairo or use --disable-gtk])
10002 : ${with_system_cairo:=yes}
10004 AC_DEFINE(ENABLE_GTK)
10007 AC_SUBST(ENABLE_GTK)
10010 if test "x$enable_tde" = "xyes"; then
10011 # Libs kab and tdeab in connectivity and kdeab and tdeab in shell
10012 # are built from the same sources. So we only allow one of them.
10013 if test "x$enable_kde" = "xyes"; then
10014 AC_MSG_ERROR([enabling both KDE and TDE is not supported])
10017 AC_DEFINE(ENABLE_TDE)
10020 AC_SUBST(ENABLE_TDE)
10023 if test "x$enable_kde" = "xyes"; then
10025 AC_DEFINE(ENABLE_KDE)
10028 AC_SUBST(ENABLE_KDE)
10031 if test "x$enable_kde4" = "xyes"; then
10033 AC_DEFINE(ENABLE_KDE4)
10036 AC_SUBST(ENABLE_KDE4)
10039 if test "x$enable_headless" = "xyes"; then
10040 ENABLE_HEADLESS="TRUE"
10041 SCPDEFS="$SCPDEFS -DLIBO_HEADLESS"
10044 AC_SUBST(ENABLE_HEADLESS)
10046 if test -z "$R"; then
10047 AC_MSG_RESULT([none])
10049 AC_MSG_RESULT([$R])
10052 dnl ===================================================================
10054 dnl ===================================================================
10057 AC_MSG_CHECKING([whether to enable GConf support])
10058 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "iOS" -a "$enable_gconf" = "yes"; then
10059 ENABLE_GCONF="TRUE"
10060 AC_MSG_RESULT([yes])
10061 PKG_CHECK_MODULES( GCONF, gconf-2.0 gobject-2.0 )
10062 GCONF_CFLAGS=$(printf '%s' "$GCONF_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10064 AC_MSG_RESULT([no])
10066 AC_SUBST(GCONF_LIBS)
10067 AC_SUBST(GCONF_CFLAGS)
10068 AC_SUBST(ENABLE_GCONF)
10070 dnl ===================================================================
10071 dnl Gnome VFS check
10072 dnl ===================================================================
10075 AC_MSG_CHECKING([whether to enable GNOME VFS support])
10076 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" -a "$enable_gconf" = "yes"; then
10077 ENABLE_GNOMEVFS="TRUE"
10078 AC_MSG_RESULT([yes])
10079 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
10080 GNOMEVFS_CFLAGS=$(printf '%s' "$GNOMEVFS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10081 AC_DEFINE(ENABLE_GNOME_VFS)
10083 AC_MSG_RESULT([no])
10085 AC_SUBST(GNOMEVFS_LIBS)
10086 AC_SUBST(GNOMEVFS_CFLAGS)
10087 AC_SUBST(ENABLE_GNOMEVFS)
10089 dnl ===================================================================
10090 dnl check for dbus support
10091 dnl ===================================================================
10096 if test "$enable_dbus" = "no"; then
10100 AC_MSG_CHECKING([whether to enable DBUS support])
10101 if test "$test_dbus" = "yes"; then
10103 AC_MSG_RESULT([yes])
10104 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.70)
10105 DBUS_CFLAGS=$(printf '%s' "$DBUS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10107 AC_MSG_RESULT([no])
10110 AC_SUBST(ENABLE_DBUS)
10111 AC_SUBST(DBUS_CFLAGS)
10112 AC_SUBST(DBUS_LIBS)
10114 AC_MSG_CHECKING([whether to enable font install via packagekit])
10115 if test "$ENABLE_DBUS" = "TRUE"; then
10116 if test -n "$enable_packagekit" -a "$enable_packagekit" != "no"; then
10117 ENABLE_PACKAGEKIT=TRUE
10118 AC_MSG_RESULT([yes])
10121 AC_MSG_RESULT([no])
10124 AC_MSG_RESULT([no, dbus disabled.])
10126 AC_SUBST(ENABLE_PACKAGEKIT)
10128 AC_MSG_CHECKING([whether to enable Impress remote control])
10129 if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
10130 AC_MSG_RESULT([yes])
10131 ENABLE_SDREMOTE=TRUE
10132 AC_MSG_CHECKING([whether to enable Bluetooth support in Impress remote control])
10134 # If not explicitly enabled or disabled, default
10135 if test -z "$enable_sdremote_bluetooth"; then
10138 # Default to yes for these
10139 enable_sdremote_bluetooth=yes
10143 enable_sdremote_bluetooth=no
10147 # $enable_sdremote_bluetooth is guaranteed non-empty now
10149 if test "$enable_sdremote_bluetooth" != "no"; then
10150 if test "$OS" = "LINUX"; then
10151 if test "$ENABLE_DBUS" = "TRUE"; then
10152 AC_MSG_RESULT([yes])
10153 ENABLE_SDREMOTE_BLUETOOTH=TRUE
10154 dnl ===================================================================
10155 dnl Check for system bluez
10156 dnl ===================================================================
10157 AC_MSG_CHECKING([which Bluetooth header to use])
10158 if test "$with_system_bluez" = "yes"; then
10159 AC_MSG_RESULT([external])
10160 AC_CHECK_HEADER(bluetooth/bluetooth.h, [],
10161 [AC_MSG_ERROR(bluetooth.h not found. install bluez)], [])
10164 AC_MSG_RESULT([internal])
10168 AC_MSG_RESULT([no, dbus disabled])
10169 ENABLE_SDREMOTE_BLUETOOTH=
10173 AC_MSG_RESULT([yes])
10174 ENABLE_SDREMOTE_BLUETOOTH=TRUE
10178 AC_MSG_RESULT([no])
10179 ENABLE_SDREMOTE_BLUETOOTH=
10185 AC_MSG_RESULT([no])
10187 AC_SUBST(ENABLE_SDREMOTE)
10188 AC_SUBST(ENABLE_SDREMOTE_BLUETOOTH)
10189 AC_SUBST(SYSTEM_BLUEZ)
10191 AC_MSG_CHECKING([whether to enable Impress remote control android app])
10192 if echo "$host_os" | grep -q linux-android || test "$enable_sdremote_android" = "yes"; then
10193 AC_MSG_RESULT([yes])
10194 ENABLE_SDREMOTE_ANDROID=TRUE
10196 AC_MSG_RESULT([no])
10197 ENABLE_SDREMOTE_ANDROID=
10199 AC_SUBST(ENABLE_SDREMOTE_ANDROID)
10201 dnl ===================================================================
10202 dnl Check whether the gtk 2.0 libraries are available.
10203 dnl ===================================================================
10207 ENABLE_SYSTRAY_GTK=""
10208 if test "$test_gtk" = "yes"; then
10210 if test "$ENABLE_GTK" = "TRUE"; then
10211 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages]))
10212 GTK_CFLAGS=$(printf '%s' "$GTK_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10213 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]))
10214 BUILD_TYPE="$BUILD_TYPE GTK"
10215 GTHREAD_CFLAGS=$(printf '%s' "$GTK_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10217 AC_MSG_CHECKING([whether to enable the systray quickstarter])
10218 if test "x$enable_systray" = "xyes"; then
10219 AC_MSG_RESULT([yes])
10220 PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
10221 [ ENABLE_SYSTRAY_GTK="TRUE" ],
10222 [ ENABLE_SYSTRAY_GTK="" ])
10224 AC_MSG_RESULT([no])
10227 AC_MSG_CHECKING([whether to enable Gtk print dialog support])
10228 PKG_CHECK_MODULES([GTK_PRINT], [gtk+-unix-print-2.0 >= 2.10.0],
10229 [ENABLE_GTK_PRINT="TRUE"],
10230 [ENABLE_GTK_PRINT=""])
10231 GTK_PRINT_CFLAGS=$(printf '%s' "$GTK_PRINT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10233 AC_MSG_CHECKING([whether to enable GIO support])
10234 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
10235 if test "$ENABLE_GNOMEVFS" = "TRUE"; then
10236 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
10238 dnl Need at least 2.26 for the dbus support.
10239 PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.26],
10240 [ENABLE_GIO="TRUE"], [ENABLE_GIO=""])
10241 if test "$ENABLE_GIO" = "TRUE"; then
10242 AC_DEFINE(ENABLE_GIO)
10243 GIO_CFLAGS=$(printf '%s' "$GIO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10246 AC_MSG_RESULT([no])
10250 AC_SUBST(ENABLE_GIO)
10251 AC_SUBST(GIO_CFLAGS)
10253 AC_SUBST(ENABLE_SYSTRAY_GTK)
10254 AC_SUBST(GTK_CFLAGS)
10256 AC_SUBST(GTHREAD_CFLAGS)
10257 AC_SUBST(GTHREAD_LIBS)
10258 AC_SUBST([ENABLE_GTK_PRINT])
10259 AC_SUBST([GTK_PRINT_CFLAGS])
10260 AC_SUBST([GTK_PRINT_LIBS])
10263 dnl ===================================================================
10264 dnl Check whether the Telepathy libraries are available.
10265 dnl ===================================================================
10267 ENABLE_TELEPATHY=""
10268 TELEPATHY_CFLAGS=""
10271 AC_MSG_CHECKING([whether to enable Telepathy support])
10272 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_telepathy" = "yes"; then
10273 ENABLE_TELEPATHY="TRUE"
10274 AC_DEFINE(ENABLE_TELEPATHY)
10275 AC_MSG_RESULT([yes])
10276 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 )
10277 TELEPATHY_CFLAGS=$(printf '%s' "$TELEPATHY_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10279 AC_MSG_RESULT([no])
10282 AC_SUBST(ENABLE_TELEPATHY)
10283 AC_SUBST(TELEPATHY_CFLAGS)
10284 AC_SUBST(TELEPATHY_LIBS)
10287 dnl ===================================================================
10289 SPLIT_APP_MODULES=""
10290 if test "$enable_split_app_modules" = "yes"; then
10291 SPLIT_APP_MODULES="TRUE"
10293 AC_SUBST(SPLIT_APP_MODULES)
10295 SPLIT_OPT_FEATURES=""
10296 if test "$enable_split_opt_features" = "yes"; then
10297 SPLIT_OPT_FEATURES="TRUE"
10299 AC_SUBST(SPLIT_OPT_FEATURES)
10301 if test $_os = Darwin -o $_os = WINNT -o $_os = iOS; then
10302 if test "$enable_cairo_canvas" = yes; then
10303 AC_MSG_ERROR([The cairo canvas should not be used for this platform])
10305 enable_cairo_canvas=no
10306 elif test -z "$enable_cairo_canvas"; then
10307 enable_cairo_canvas=yes
10310 ENABLE_CAIRO_CANVAS=""
10311 if test "$enable_cairo_canvas" = "yes"; then
10313 ENABLE_CAIRO_CANVAS="TRUE"
10315 AC_SUBST(ENABLE_CAIRO_CANVAS)
10317 dnl ===================================================================
10318 dnl Check whether the GStreamer libraries are available.
10319 dnl ===================================================================
10321 ENABLE_GSTREAMER=""
10323 if test "$build_gstreamer" = "yes"; then
10325 AC_MSG_CHECKING([whether to enable the new GStreamer 1.0 avmedia backend])
10326 if test "$enable_avmedia" = yes -a "$enable_gstreamer" != no; then
10327 ENABLE_GSTREAMER="TRUE"
10328 AC_MSG_RESULT([yes])
10329 PKG_CHECK_MODULES( GSTREAMER, gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0 )
10330 GSTREAMER_CFLAGS=$(printf '%s' "$GSTREAMER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10332 AC_MSG_RESULT([no])
10335 AC_SUBST(GSTREAMER_CFLAGS)
10336 AC_SUBST(GSTREAMER_LIBS)
10337 AC_SUBST(ENABLE_GSTREAMER)
10340 ENABLE_GSTREAMER_0_10=""
10341 if test "$build_gstreamer_0_10" = "yes"; then
10343 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
10344 if test "$enable_avmedia" = yes -a "$enable_gstreamer_0_10" != no; then
10345 ENABLE_GSTREAMER_0_10="TRUE"
10346 AC_MSG_RESULT([yes])
10347 PKG_CHECK_MODULES( [GSTREAMER_0_10], [gstreamer-0.10 gstreamer-plugins-base-0.10 gstreamer-interfaces-0.10],, [
10348 PKG_CHECK_MODULES( [GSTREAMER_0_10], [gstreamer-0.10 gstreamer-plugins-base-0.10] )
10350 GSTREAMER_0_10_CFLAGS=$(printf '%s' "$GSTREAMER_0_10_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10352 AC_MSG_RESULT([no])
10356 AC_SUBST(GSTREAMER_0_10_CFLAGS)
10357 AC_SUBST(GSTREAMER_0_10_LIBS)
10358 AC_SUBST(ENABLE_GSTREAMER_0_10)
10360 dnl ===================================================================
10361 dnl Check whether to build the VLC avmedia backend
10362 dnl ===================================================================
10366 AC_MSG_CHECKING([whether to enable the VLC avmedia backend])
10367 if test "$enable_avmedia" = yes -a $_os != iOS -a $_os != Android -a "$enable_vlc" = yes; then
10369 AC_MSG_RESULT([yes])
10371 AC_MSG_RESULT([no])
10373 AC_SUBST(ENABLE_VLC)
10375 dnl ===================================================================
10376 dnl Check whether the OpenGL libraries are available
10377 dnl ===================================================================
10379 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
10382 if test -z "$enable_opengl"; then
10383 if test $_os = WINNT; then
10384 # By default disable the OpenGL transitions for Windows (the code compiles but works very
10385 # badly and crashes). In other words, use --enable-opengl only if you plan to hack on that
10386 # code for Windows.
10388 elif test $_os = iOS; then
10389 # As such with some suitable minor tweaks the Mac OpenGL transitions code would presumably
10390 # build fine for iOS, too, but let's leave that for later
10392 elif test "$enable_headless" = "yes"; then
10399 if test "x$enable_opengl" = "xno"; then
10400 AC_MSG_RESULT([no])
10401 elif test "$_os" = "Darwin"; then
10402 # We use frameworks on Mac OS X, no need for detail checks
10404 ENABLE_OPENGL_CANVAS=
10405 add_warning "openGL canvas not adapted for Mac yet - disabling"
10406 SYSTEM_MESA_HEADERS=TRUE
10407 AC_MSG_RESULT([yes])
10408 elif test $_os = WINNT; then
10409 # Experimental: try to use OpenGL on Windows
10411 ENABLE_OPENGL_CANVAS=TRUE
10412 # We need the internal "Mesa" headers.
10413 SYSTEM_MESA_HEADERS=
10414 BUILD_TYPE="$BUILD_TYPE MESA"
10415 AC_MSG_RESULT([yes])
10417 save_LDFLAGS=$LDFLAGS
10418 LDFLAGS="$LDFLAGS -lm"
10419 AC_MSG_RESULT([yes])
10420 AC_CHECK_LIB([GL], [main],
10421 [AC_CHECK_LIB([GL], [glCreateShader], [ENABLE_OPENGL_CANVAS=TRUE],
10422 [add_warning "no shader support in libGL - will enable openGL transitions, but not openGL canvas"
10423 AC_MSG_WARN([no shader support in libGL - will enable openGL transitions, but not openGL canvas])
10424 ENABLE_OPENGL_CANVAS=], [])],
10425 [AC_MSG_ERROR(libGL not installed or functional)], [])
10426 LDFLAGS="$LDFLAGS -lGL"
10427 AC_CHECK_LIB([GLU], [main], [:],
10428 [AC_MSG_ERROR(libGLU not installed or functional)], [])
10430 LDFLAGS=$save_LDFLAGS
10432 dnl ===================================================================
10433 dnl Check for system Mesa
10434 dnl ===================================================================
10435 AC_MSG_CHECKING([which Mesa headers to use])
10436 if test "$with_system_mesa_headers" = "yes"; then
10437 AC_MSG_RESULT([external])
10438 SYSTEM_MESA_HEADERS=TRUE
10440 AC_CHECK_HEADER(GL/glxext.h, [],
10441 [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
10442 AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
10443 AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
10446 AC_MSG_RESULT([internal])
10447 SYSTEM_MESA_HEADERS=
10448 BUILD_TYPE="$BUILD_TYPE MESA"
10452 AC_SUBST(SYSTEM_MESA_HEADERS)
10453 AC_SUBST(ENABLE_OPENGL)
10454 AC_SUBST(ENABLE_OPENGL_CANVAS)
10456 dnl =================================================
10457 dnl Check whether to build with OpenCL support.
10458 dnl =================================================
10460 AC_MSG_CHECKING([whether to build with the OpenCL support.])
10463 if test $_os != iOS -a $_os != Android -a "x$enable_opencl" != "xno"; then
10464 if test $_os = Darwin -a "$with_macosx_sdk" = "10.5"; then
10465 AC_MSG_RESULT([disabled on OS X 10.5])
10467 AC_MSG_RESULT([yes])
10469 AC_DEFINE(HAVE_FEATURE_OPENCL)
10472 AC_MSG_RESULT([no])
10475 AC_SUBST(ENABLE_OPENCL)
10477 dnl ===================================================================
10478 dnl Check whether to enable glTF support
10479 dnl ===================================================================
10482 AC_MSG_CHECKING([whether to enable glTF support])
10483 if test "x$enable_gltf" != "xno"; then
10485 AC_MSG_RESULT([yes])
10486 BUILD_TYPE="$BUILD_TYPE LIBGLTF"
10487 if test "$test_freetype" = "no"; then
10488 BUILD_TYPE="$BUILD_TYPE FREETYPE"
10489 if test "$COM" = "MSC"; then
10490 test -n "${MSVC_USE_DEBUG_RUNTIME}" && FREETYPE_LIB_DEBUGLIB_SUFFIX="_D"
10491 FREETYPE_LIBS="${WORKDIR}/UnpackedTarball/freetype/objs/win32/vc2010/freetype248$FREETYPE_LIB_DEBUGLIB_SUFFIX.lib"
10494 # otherwise build fails in collada2gltf external because of std::shared_ptr
10495 if test "$have_std_shared_ptr" = "yes"; then
10496 BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF"
10499 AC_MSG_RESULT([no])
10501 AC_SUBST(ENABLE_GLTF)
10504 AC_MSG_CHECKING([whether to build the PDF import feature])
10506 if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = yes \); then
10507 AC_MSG_RESULT([yes])
10508 ENABLE_PDFIMPORT=TRUE
10510 dnl ===================================================================
10511 dnl Check for system poppler
10512 dnl ===================================================================
10513 AC_MSG_CHECKING([which PDF import backend to use])
10514 if test "$with_system_poppler" = "yes"; then
10515 AC_MSG_RESULT([external])
10516 SYSTEM_POPPLER=TRUE
10517 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
10518 AC_LANG_PUSH([C++])
10519 save_CXXFLAGS=$CXXFLAGS
10520 save_CPPFLAGS=$CPPFLAGS
10521 CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
10522 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
10523 AC_CHECK_HEADER([cpp/poppler-version.h], [],
10524 [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
10525 CXXFLAGS=$save_CXXFLAGS
10526 CPPFLAGS=$save_CPPFLAGS
10528 libo_MINGW_CHECK_DLL([libpoppler])
10529 POPPLER_CFLAGS=$(printf '%s' "$POPPLER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10531 AC_MSG_RESULT([internal])
10533 BUILD_TYPE="$BUILD_TYPE POPPLER"
10536 AC_MSG_RESULT([no])
10538 AC_SUBST(ENABLE_PDFIMPORT)
10539 AC_SUBST(SYSTEM_POPPLER)
10540 AC_SUBST(POPPLER_CFLAGS)
10541 AC_SUBST(POPPLER_LIBS)
10543 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
10544 if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
10545 AC_MSG_RESULT([yes])
10546 ENABLE_MEDIAWIKI=TRUE
10547 BUILD_TYPE="$BUILD_TYPE XSLTML"
10548 if test "x$with_java" = "xno"; then
10549 AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
10552 AC_MSG_RESULT([no])
10554 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
10556 AC_SUBST(ENABLE_MEDIAWIKI)
10558 AC_MSG_CHECKING([whether to build the Report Builder])
10559 if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
10560 AC_MSG_RESULT([yes])
10561 ENABLE_REPORTBUILDER=TRUE
10562 AC_MSG_CHECKING([which jfreereport libs to use])
10563 if test "$with_system_jfreereport" = "yes"; then
10564 SYSTEM_JFREEREPORT=TRUE
10565 AC_MSG_RESULT([external])
10566 if test -z $SAC_JAR; then
10567 SAC_JAR=/usr/share/java/sac.jar
10569 AC_CHECK_FILE($SAC_JAR, [],
10570 [AC_MSG_ERROR(sac.jar not found.)], [])
10572 if test -z $LIBXML_JAR; then
10573 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
10574 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
10576 AC_CHECK_FILE(/usr/share/java/libxml.jar,
10577 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
10578 [AC_MSG_ERROR(libxml.jar replacement not found.)]
10583 AC_CHECK_FILE($LIBXML_JAR, [],
10584 [AC_MSG_ERROR(libxml.jar not found.)], [])
10587 if test -z $FLUTE_JAR; then
10588 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
10589 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
10591 AC_CHECK_FILE(/usr/share/java/flute.jar,
10592 [ FLUTE_JAR=/usr/share/java/flute.jar ],
10593 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
10598 AC_CHECK_FILE($FLUTE_JAR, [],
10599 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
10602 if test -z $JFREEREPORT_JAR; then
10603 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
10604 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
10606 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
10607 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
10608 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
10613 AC_CHECK_FILE($JFREEREPORT_JAR, [],
10614 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
10617 if test -z $LIBLAYOUT_JAR; then
10618 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
10619 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
10621 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
10622 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
10623 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
10628 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
10629 [AC_MSG_ERROR(liblayout.jar not found.)], [])
10632 if test -z $LIBLOADER_JAR; then
10633 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
10634 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
10636 AC_CHECK_FILE(/usr/share/java/libloader.jar,
10637 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
10638 [AC_MSG_ERROR(libloader.jar replacement not found.)]
10643 AC_CHECK_FILE($LIBLOADER_JAR, [],
10644 [AC_MSG_ERROR(libloader.jar not found.)], [])
10647 if test -z $LIBFORMULA_JAR; then
10648 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
10649 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
10651 AC_CHECK_FILE(/usr/share/java/libformula.jar,
10652 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
10653 [AC_MSG_ERROR(libformula.jar replacement not found.)]
10658 AC_CHECK_FILE($LIBFORMULA_JAR, [],
10659 [AC_MSG_ERROR(libformula.jar not found.)], [])
10662 if test -z $LIBREPOSITORY_JAR; then
10663 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
10664 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
10666 AC_CHECK_FILE(/usr/share/java/librepository.jar,
10667 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
10668 [AC_MSG_ERROR(librepository.jar replacement not found.)]
10673 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
10674 [AC_MSG_ERROR(librepository.jar not found.)], [])
10677 if test -z $LIBFONTS_JAR; then
10678 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
10679 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
10681 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
10682 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
10683 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
10688 AC_CHECK_FILE($LIBFONTS_JAR, [],
10689 [AC_MSG_ERROR(libfonts.jar not found.)], [])
10692 if test -z $LIBSERIALIZER_JAR; then
10693 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
10694 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
10696 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
10697 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
10698 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
10703 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
10704 [AC_MSG_ERROR(libserializer.jar not found.)], [])
10707 if test -z $LIBBASE_JAR; then
10708 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
10709 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
10711 AC_CHECK_FILE(/usr/share/java/libbase.jar,
10712 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
10713 [AC_MSG_ERROR(libbase.jar replacement not found.)]
10718 AC_CHECK_FILE($LIBBASE_JAR, [],
10719 [AC_MSG_ERROR(libbase.jar not found.)], [])
10723 AC_MSG_RESULT([internal])
10724 SYSTEM_JFREEREPORT=
10725 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
10728 AC_MSG_RESULT([no])
10729 ENABLE_REPORTBUILDER=
10730 SYSTEM_JFREEREPORT=
10732 AC_SUBST(ENABLE_REPORTBUILDER)
10733 AC_SUBST(SYSTEM_JFREEREPORT)
10735 AC_SUBST(LIBXML_JAR)
10736 AC_SUBST(FLUTE_JAR)
10737 AC_SUBST(JFREEREPORT_JAR)
10738 AC_SUBST(LIBBASE_JAR)
10739 AC_SUBST(LIBLAYOUT_JAR)
10740 AC_SUBST(LIBLOADER_JAR)
10741 AC_SUBST(LIBFORMULA_JAR)
10742 AC_SUBST(LIBREPOSITORY_JAR)
10743 AC_SUBST(LIBFONTS_JAR)
10744 AC_SUBST(LIBSERIALIZER_JAR)
10746 # this has to be here because both the Wiki Publisher and the SRB use
10748 if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = "TRUE"; then
10749 AC_MSG_CHECKING([which Apache commons-* libs to use])
10750 if test "$with_system_apache_commons" = "yes"; then
10751 SYSTEM_APACHE_COMMONS=TRUE
10752 AC_MSG_RESULT([external])
10753 if test "$ENABLE_MEDIAWIKI" = "TRUE"; then
10754 if test -z $COMMONS_CODEC_JAR; then
10755 _commons_codec_path=""
10756 if test "$HAVE_JAVA6" = "TRUE"; then
10757 _commons_codec_path="/usr/share/java/commons-codec-1.9.jar"
10759 _commons_codec_path="/usr/share/java/commons-codec-1.6.jar"
10761 AC_CHECK_FILE($_commons_codec_path,
10762 [ COMMONS_CODEC_JAR=$_commons_codec_path ],
10764 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
10765 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
10766 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
10771 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
10772 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
10775 if test -z $COMMONS_LANG_JAR; then
10776 _commons_lang_path=""
10777 if test "$HAVE_JAVA6" = "TRUE"; then
10778 _commons_lang_path="/usr/share/java/commons-lang3-3.3.1-src.tar.gz"
10780 _commons_lang_path="/usr/share/java/commons-lang-2.4.jar"
10782 AC_CHECK_FILE($_commons_lang_path,
10783 [ COMMONS_LANG_JAR=$commons_lang_path ],
10785 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
10786 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
10787 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
10792 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
10793 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
10796 if test -z $COMMONS_HTTPCLIENT_JAR; then
10797 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
10798 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
10800 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
10801 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
10802 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
10807 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
10808 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
10811 if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = "TRUE"; then
10812 if test -z $COMMONS_LOGGING_JAR; then
10813 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.3.jar,
10814 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.3.jar ],
10816 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
10817 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
10818 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
10823 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
10824 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
10828 AC_MSG_RESULT([internal])
10829 SYSTEM_APACHE_COMMONS=
10830 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
10833 AC_SUBST(SYSTEM_APACHE_COMMONS)
10834 AC_SUBST(COMMONS_CODEC_JAR)
10835 AC_SUBST(COMMONS_LANG_JAR)
10836 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
10837 AC_SUBST(COMMONS_LOGGING_JAR)
10839 # scripting provider for BeanShell?
10840 AC_MSG_CHECKING([whether to build support for scripts in BeanShell])
10841 if test "${enable_scripting_beanshell}" != "no" -a "x$with_java" != "xno"; then
10842 AC_MSG_RESULT([yes])
10843 ENABLE_SCRIPTING_BEANSHELL=TRUE
10845 dnl ===================================================================
10846 dnl Check for system beanshell
10847 dnl ===================================================================
10848 AC_MSG_CHECKING([which beanshell to use])
10849 if test "$with_system_beanshell" = "yes"; then
10850 AC_MSG_RESULT([external])
10852 if test -z $BSH_JAR; then
10853 BSH_JAR=/usr/share/java/bsh.jar
10855 AC_CHECK_FILE($BSH_JAR, [],
10856 [AC_MSG_ERROR(bsh.jar not found.)], [])
10858 AC_MSG_RESULT([internal])
10860 BUILD_TYPE="$BUILD_TYPE BSH"
10863 AC_MSG_RESULT([no])
10864 ENABLE_SCRIPTING_BEANSHELL=
10865 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_BEANSHELL"
10867 AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
10868 AC_SUBST(SYSTEM_BSH)
10871 # scripting provider for JavaScript?
10872 AC_MSG_CHECKING([whether to build support for scripts in JavaScript])
10873 if test "${enable_scripting_javascript}" != "no" -a "x$with_java" != "xno"; then
10874 AC_MSG_RESULT([yes])
10875 ENABLE_SCRIPTING_JAVASCRIPT=TRUE
10877 dnl ===================================================================
10878 dnl Check for system rhino
10879 dnl ===================================================================
10880 AC_MSG_CHECKING([which rhino to use])
10881 if test "$with_system_rhino" = "yes"; then
10882 AC_MSG_RESULT([external])
10884 if test -z $RHINO_JAR; then
10885 RHINO_JAR=/usr/share/java/js.jar
10887 AC_CHECK_FILE($RHINO_JAR, [],
10888 [AC_MSG_ERROR(js.jar not found.)], [])
10890 AC_MSG_RESULT([internal])
10892 BUILD_TYPE="$BUILD_TYPE RHINO"
10895 AC_MSG_RESULT([no])
10896 ENABLE_SCRIPTING_JAVASCRIPT=
10897 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_JAVASCRIPT"
10899 AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
10900 AC_SUBST(SYSTEM_RHINO)
10901 AC_SUBST(RHINO_JAR)
10904 case "$host_cpu" in
10905 x86_64 | powerpc64 | s390x)
10906 if test "$SAL_TYPES_SIZEOFLONG" = "8"; then
10907 supports_multilib="yes"
10914 dnl ===================================================================
10915 dnl Check whether the TQt and TDE libraries are available.
10916 dnl ===================================================================
10920 if test "$_os" != "OpenBSD"; then
10923 if test "$test_tde" = "yes" -a "$ENABLE_TDE" = "TRUE"; then
10924 dnl Search paths for TQt and TDE
10925 if test -z "$supports_multilib"; then
10926 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"
10927 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"
10929 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"
10930 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"
10932 if test -n "$TQTDIR"; then
10933 tqt_incdirs="$TQTDIR/include $tqt_incdirs"
10934 if test -z "$supports_multilib"; then
10935 tqt_libdirs="$TQTDIR/lib $tqt_libdirs"
10937 tqt_libdirs="$TQTDIR/lib64 $TQTDIR/lib $tqt_libdirs"
10940 if test -z "$supports_multilib"; then
10941 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"
10942 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"
10944 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"
10945 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"
10947 if test -n "$TDEDIR"; then
10948 tde_incdirs="$TDEDIR/include $tde_incdirs"
10949 if test -z "$supports_multilib"; then
10950 tde_libdirs="$TDEDIR/lib $tde_libdirs"
10952 tde_libdirs="$TDEDIR/lib64 $TDEDIR/lib $tde_libdirs"
10957 tqt_test_include="ntqstyle.h"
10958 tde_test_include="kapp.h"
10960 if test "$_os" != "OpenBSD"; then
10961 tqt_test_library="libtqt-mt.so"
10962 tde_test_library="libDCOP.so"
10964 tqt_test_library="libtqt-mt.so*"
10965 tde_test_library="libDCOP.so*"
10968 dnl Check for TQt headers
10969 AC_MSG_CHECKING([for TQt headers])
10971 for tde_check in $tqt_incdirs; do
10972 if test -r "$tde_check/$tqt_test_include"; then
10973 tqt_incdir="$tde_check"
10977 AC_MSG_RESULT([$tqt_incdir])
10978 if test "x$tqt_incdir" = "xno"; then
10979 AC_MSG_ERROR([TQt headers not found. Please specify the root of
10980 your TQt installation by exporting TQTDIR before running "configure".])
10983 dnl Check for TQt libraries
10984 AC_MSG_CHECKING([for TQt libraries])
10986 for tqt_check in $tqt_libdirs; do
10987 if test -r "`ls $tqt_check/$tqt_test_library 2>/dev/null | head -1`"; then
10988 tqt_libdir="$tqt_check"
10992 AC_MSG_RESULT([$tqt_libdir])
10993 if test "x$tqt_libdir" = "xno"; then
10994 AC_MSG_ERROR([TQt libraries not found. Please specify the root of
10995 your TQt installation by exporting TQTDIR before running "configure".])
10998 dnl Check for Meta Object Compiler
10999 AC_PATH_PROG( MOC, moc, no, [`dirname $tqt_libdir`/bin:$TQTDIR/bin:$PATH] )
11000 if test "$MOC" = "no"; then
11001 AC_MSG_ERROR([TQt Meta Object Compiler not found. Please specify
11002 the root of your TQt installation by exporting TQTDIR before running "configure".])
11005 dnl Check for TDE headers
11006 AC_MSG_CHECKING([for TDE headers])
11008 for tde_check in $tde_incdirs; do
11009 if test -r "$tde_check/$tde_test_include"; then
11010 tde_incdir="$tde_check"
11014 AC_MSG_RESULT([$tde_incdir])
11015 if test "x$tde_incdir" = "xno"; then
11016 AC_MSG_ERROR([TDE headers not found. Please specify the root of
11017 your TDE installation by exporting TDEDIR before running "configure".])
11020 dnl Check for TDE libraries
11021 AC_MSG_CHECKING([for TDE libraries])
11023 for tde_check in $tde_libdirs; do
11024 if test -r "`ls $tde_check/$tde_test_library 2>/dev/null | head -1`"; then
11025 tde_libdir="$tde_check"
11029 AC_MSG_RESULT([$tde_libdir])
11030 if test "x$tde_libdir" = "xno"; then
11031 AC_MSG_ERROR([TDE libraries not found. Please specify the root of
11032 your TDE installation by exporting TDEDIR before running "configure".])
11035 dnl Set the variables
11036 TDE_CFLAGS="-I$tqt_incdir -I$tde_incdir -I/usr/include/tqt -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
11037 TDE_LIBS="-L$tde_libdir -L$tqt_libdir -ltdeio -ltdeui -ltdecore -ltqt -ltqt-mt"
11039 AC_SUBST(TDE_CFLAGS)
11043 dnl ===================================================================
11044 dnl Check whether the Qt3 and KDE3 libraries are available.
11045 dnl ===================================================================
11049 if test "$_os" != "OpenBSD"; then
11052 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE"; then
11053 dnl Search paths for Qt3 and KDE3
11054 if test -z "$supports_multilib"; then
11055 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"
11056 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"
11058 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"
11059 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"
11061 if test -n "$QTDIR"; then
11062 qt_incdirs="$QTDIR/include $qt_incdirs"
11063 if test -z "$supports_multilib"; then
11064 qt_libdirs="$QTDIR/lib $qt_libdirs"
11066 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
11069 if test -z "$supports_multilib"; then
11070 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"
11071 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"
11073 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"
11074 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"
11076 if test -n "$KDEDIR"; then
11077 kde_incdirs="$KDEDIR/include $kde_incdirs"
11078 if test -z "$supports_multilib"; then
11079 kde_libdirs="$KDEDIR/lib $kde_libdirs"
11081 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
11086 qt_test_include="qstyle.h"
11087 kde_test_include="kapp.h"
11089 if test "$_os" != "OpenBSD"; then
11090 qt_test_library="libqt-mt.so"
11091 kde_test_library="libDCOP.so"
11093 qt_test_library="libqt-mt.so*"
11094 kde_test_library="libDCOP.so*"
11097 dnl Check for Qt3 headers
11098 AC_MSG_CHECKING([for Qt3 headers])
11100 for kde_check in $qt_incdirs; do
11101 if test -r "$kde_check/$qt_test_include"; then
11102 qt_incdir="$kde_check"
11106 AC_MSG_RESULT([$qt_incdir])
11107 if test "x$qt_incdir" = "xno"; then
11108 AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
11109 your Qt3 installation by exporting QTDIR before running "configure".])
11112 dnl Check for Qt3 libraries
11113 AC_MSG_CHECKING([for Qt3 libraries])
11115 for qt_check in $qt_libdirs; do
11116 if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`"; then
11117 qt_libdir="$qt_check"
11121 AC_MSG_RESULT([$qt_libdir])
11122 if test "x$qt_libdir" = "xno"; then
11123 AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
11124 your Qt3 installation by exporting QTDIR before running "configure".])
11127 dnl Check for Meta Object Compiler
11128 AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
11129 if test "$MOC" = "no"; then
11130 AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
11131 the root of your Qt3 installation by exporting QTDIR before running "configure".])
11134 dnl Check for KDE3 headers
11135 AC_MSG_CHECKING([for KDE3 headers])
11137 for kde_check in $kde_incdirs; do
11138 if test -r "$kde_check/$kde_test_include"; then
11139 kde_incdir="$kde_check"
11143 AC_MSG_RESULT([$kde_incdir])
11144 if test "x$kde_incdir" = "xno"; then
11145 AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
11146 your KDE3 installation by exporting KDEDIR before running "configure".])
11149 dnl Check for KDE3 libraries
11150 AC_MSG_CHECKING([for KDE3 libraries])
11152 for kde_check in $kde_libdirs; do
11153 if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`"; then
11154 kde_libdir="$kde_check"
11158 AC_MSG_RESULT([$kde_libdir])
11159 if test "x$kde_libdir" = "xno"; then
11160 AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
11161 your KDE3 installation by exporting KDEDIR before running "configure".])
11164 dnl Set the variables
11165 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
11166 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
11167 KDE_CFLAGS=$(printf '%s' "$KDE_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11169 AC_SUBST(KDE_CFLAGS)
11173 dnl ===================================================================
11174 dnl KDE4 Integration
11175 dnl ===================================================================
11184 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE"; then
11185 qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
11186 qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
11188 kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
11189 kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
11191 if test -n "$supports_multilib"; then
11192 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
11193 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
11196 if test -n "$QTDIR"; then
11197 qt_incdirs="$QTDIR/include $qt_incdirs"
11198 if test -z "$supports_multilib"; then
11199 qt_libdirs="$QTDIR/lib $qt_libdirs"
11201 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
11204 if test -n "$QT4DIR"; then
11205 qt_incdirs="$QT4DIR/include $qt_incdirs"
11206 if test -z "$supports_multilib"; then
11207 qt_libdirs="$QT4DIR/lib $qt_libdirs"
11209 qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
11213 if test -n "$KDEDIR"; then
11214 kde_incdirs="$KDEDIR/include $kde_incdirs"
11215 if test -z "$supports_multilib"; then
11216 kde_libdirs="$KDEDIR/lib $kde_libdirs"
11218 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
11221 if test -n "$KDE4DIR"; then
11222 kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
11223 if test -z "$supports_multilib"; then
11224 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
11226 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
11230 qt_test_include="Qt/qobject.h"
11231 qt_test_library="libQtNetwork.so"
11232 kde_test_include="kwindowsystem.h"
11233 kde_test_library="libsolid.so"
11235 AC_MSG_CHECKING([for Qt4 headers])
11237 for inc_dir in $qt_incdirs; do
11238 if test -r "$inc_dir/$qt_test_include"; then
11239 qt_header_dir="$inc_dir"
11244 AC_MSG_RESULT([$qt_header_dir])
11245 if test "x$qt_header_dir" = "xno"; then
11246 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
11249 dnl Check for qmake
11250 AC_PATH_PROG( QMAKEQT4, qmake-qt4, no, [`dirname $qt_header_dir`/bin:$QT4DIR/bin:$PATH] )
11252 if test "$QMAKE4" = "no"; then
11253 AC_PATH_PROG( QMAKE4, qmake, no, [`dirname $qt_header_dir`/bin:$QT4DIR/bin:$PATH] )
11254 if test "$QMAKE4" = "no"; then
11255 AC_MSG_ERROR([Qmake not found. Please specify
11256 the root of your Qt installation by exporting QT4DIR before running "configure".])
11260 qt_libdirs="`$QMAKE4 -query QT_INSTALL_LIBS` $qt_libdirs"
11261 AC_MSG_CHECKING([for Qt4 libraries])
11263 for lib_dir in $qt_libdirs; do
11264 if test -r "$lib_dir/$qt_test_library"; then
11265 qt_lib_dir="$lib_dir"
11266 PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
11271 AC_MSG_RESULT([$qt_lib_dir])
11273 if test "x$qt_lib_dir" = "xno"; then
11274 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
11277 dnl Check for Meta Object Compiler
11279 AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
11281 if test "$MOC4" = "no"; then
11282 AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
11283 if test "$MOC4" = "no"; then
11284 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
11285 the root of your Qt installation by exporting QT4DIR before running "configure".])
11289 dnl Check for KDE4 headers
11290 AC_MSG_CHECKING([for KDE4 headers])
11292 for kde_check in $kde_incdirs; do
11293 if test -r "$kde_check/$kde_test_include"; then
11294 kde_incdir="$kde_check"
11298 AC_MSG_RESULT([$kde_incdir])
11299 if test "x$kde_incdir" = "xno"; then
11300 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
11303 dnl Check for KDE4 libraries
11304 AC_MSG_CHECKING([for KDE4 libraries])
11306 for kde_check in $kde_libdirs; do
11307 if test -r "$kde_check/$kde_test_library"; then
11308 kde_libdir="$kde_check"
11313 AC_MSG_RESULT([$kde_libdir])
11314 if test "x$kde_libdir" = "xno"; then
11315 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
11318 PKG_CHECK_MODULES([QT4],[QtNetwork QtGui])
11319 KDE4_CFLAGS="-I$kde_incdir $QT4_CFLAGS -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
11320 KDE4_LIBS="-L$kde_libdir -lkio -lkfile -lkdeui -lkdecore -L$qt_lib_dir $QT4_LIBS"
11321 KDE4_CFLAGS=$(printf '%s' "$KDE4_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11323 AC_LANG_PUSH([C++])
11324 save_CXXFLAGS=$CXXFLAGS
11325 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
11326 AC_MSG_CHECKING([whether KDE is >= 4.2])
11327 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11328 #include <kdeversion.h>
11330 int main(int argc, char **argv) {
11331 if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
11334 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
11335 CXXFLAGS=$save_CXXFLAGS
11338 # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled.
11339 # Sets also KDE_GLIB_CFLAGS/KDE_GLIB_LIBS if successful.
11340 PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
11343 AC_DEFINE(KDE_HAVE_GLIB,1)
11344 KDE_GLIB_CFLAGS=$(printf '%s' "$KDE_GLIB_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11348 AC_LANG_PUSH([C++])
11349 save_CXXFLAGS=$CXXFLAGS
11350 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
11352 LIBS="$LIBS $KDE4_LIBS"
11353 AC_MSG_CHECKING([whether Qt has fixed ExcludeSocketNotifiers])
11355 # Prepare meta object data
11356 TSTBASE="tst_exclude_socket_notifiers"
11357 TSTMOC="${SRC_ROOT}/vcl/unx/kde4/${TSTBASE}"
11358 ln -fs "${TSTMOC}.hxx"
11359 $MOC4 "${TSTBASE}.hxx" -o "${TSTBASE}.moc"
11361 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11362 #include "tst_exclude_socket_notifiers.moc"
11364 int main(int argc, char *argv[])
11366 QCoreApplication app(argc, argv);
11367 exit(tst_processEventsExcludeSocket());
11371 AC_MSG_RESULT([yes])
11373 AC_MSG_RESULT([no])
11374 AC_MSG_WARN([native KDE4 file pickers will be disabled at runtime])
11375 if test -z "$qt4_fix_warning"; then
11376 add_warning "native KDE4 file pickers will be disabled at runtime, Qt4 fixes needed"
11379 add_warning " https://bugreports.qt-project.org/browse/QTBUG-37380 (needed)"
11382 # Remove meta object data
11383 rm -f "${TSTBASE}."*
11385 AC_MSG_CHECKING([whether Qt avoids QClipboard recursion caused by posted events])
11387 # Prepare meta object data
11388 TSTBASE="tst_exclude_posted_events"
11389 TSTMOC="${SRC_ROOT}/vcl/unx/kde4/${TSTBASE}"
11390 ln -fs "${TSTMOC}.hxx"
11391 $MOC4 "${TSTBASE}.hxx" -o "${TSTBASE}.moc"
11393 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11394 #include "tst_exclude_posted_events.moc"
11396 int main(int argc, char *argv[])
11398 QCoreApplication app(argc, argv);
11399 exit(tst_excludePostedEvents());
11403 AC_MSG_RESULT([yes])
11405 AC_MSG_RESULT([no])
11406 AC_MSG_WARN([native KDE4 file pickers will be disabled at runtime])
11407 if test -z "$qt4_fix_warning"; then
11408 add_warning "native KDE4 file pickers will be disabled at runtime, Qt4 fixes needed"
11411 add_warning " https://bugreports.qt-project.org/browse/QTBUG-34614 (needed)"
11414 # Remove meta object data
11415 rm -f "${TSTBASE}."*
11417 if test -n "$qt4_fix_warning"; then
11418 add_warning " https://bugreports.qt-project.org/browse/QTBUG-38585 (recommended)"
11422 CXXFLAGS=$save_CXXFLAGS
11425 AC_MSG_WARN([[No Glib found, KDE4 support will not use native file pickers!]]))
11427 AC_SUBST(KDE4_CFLAGS)
11428 AC_SUBST(KDE4_LIBS)
11430 AC_SUBST(KDE_GLIB_CFLAGS)
11431 AC_SUBST(KDE_GLIB_LIBS)
11432 AC_SUBST(KDE_HAVE_GLIB)
11434 dnl ===================================================================
11435 dnl Test for the enabling the lockdown pieces
11436 dnl ===================================================================
11437 AC_MSG_CHECKING([whether to enable the lockdown pieces])
11439 if test -n "$enable_lockdown" -a "$enable_lockdown" != "no"; then
11440 ENABLE_LOCKDOWN=TRUE
11441 AC_MSG_RESULT([yes])
11443 AC_MSG_RESULT([no])
11445 AC_SUBST(ENABLE_LOCKDOWN)
11447 dnl ===================================================================
11448 dnl Test whether to include Evolution 2 support
11449 dnl ===================================================================
11450 AC_MSG_CHECKING([whether to enable evolution 2 support])
11451 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
11452 AC_MSG_RESULT([yes])
11453 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
11454 GOBJECT_CFLAGS=$(printf '%s' "$GOBJECT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11455 ENABLE_EVOAB2="TRUE"
11458 AC_MSG_RESULT([no])
11460 AC_SUBST(ENABLE_EVOAB2)
11461 AC_SUBST(GOBJECT_CFLAGS)
11462 AC_SUBST(GOBJECT_LIBS)
11464 dnl ===================================================================
11465 dnl Test whether to include TDE AB support
11466 dnl ===================================================================
11467 AC_MSG_CHECKING([whether to enable TDE address book support])
11468 if test "$enable_tdeab" = "yes" -a "$enable_tde" = "yes"; then
11469 AC_MSG_RESULT([yes])
11470 AC_LANG_PUSH([C++])
11471 save_CXXFLAGS=$CXXFLAGS
11472 CXXFLAGS="$CXXFLAGS $TDE_CFLAGS"
11473 AC_MSG_CHECKING([whether TDE is at least R14.0])
11474 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11475 #include <tdeversion.h>
11477 int main(int argc, char **argv) {
11478 if (TDE_VERSION_MAJOR >= 14) return 0;
11481 ]])],[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])],[])
11482 CXXFLAGS=$save_CXXFLAGS
11486 AC_MSG_RESULT([no])
11489 AC_SUBST(ENABLE_TDEAB)
11491 dnl ===================================================================
11492 dnl Test whether to include KDE AB support
11493 dnl ===================================================================
11494 AC_MSG_CHECKING([whether to enable KDE address book support])
11495 if test "$enable_kdeab" = "yes" -a "$enable_kde" = "yes"; then
11496 AC_MSG_RESULT([yes])
11497 AC_LANG_PUSH([C++])
11498 save_CXXFLAGS=$CXXFLAGS
11499 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
11500 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
11501 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11502 #include <kdeversion.h>
11504 int main(int argc, char **argv) {
11505 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
11508 ]])],[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])],[])
11509 CXXFLAGS=$save_CXXFLAGS
11513 AC_MSG_RESULT([no])
11516 AC_SUBST(ENABLE_KAB)
11518 dnl ===================================================================
11519 dnl Test which themes to include
11520 dnl ===================================================================
11521 AC_MSG_CHECKING([which themes to include])
11522 # if none given use default subset of available themes
11523 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
11524 with_theme="crystal default hicontrast oxygen tango sifr"
11525 test -z "$ENABLE_RELEASE_BUILD" && with_theme="$with_theme tango_testing"
11529 if test "x$with_theme" != "xno"; then
11530 for theme in $with_theme; do
11532 crystal|default|galaxy|hicontrast|human|industrial|oxygen|sifr|tango|tango_testing) : ;;
11533 *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
11535 WITH_THEMES="$WITH_THEMES $theme"
11538 AC_MSG_RESULT([$WITH_THEMES])
11539 AC_SUBST([WITH_THEMES])
11541 dnl ===================================================================
11542 dnl Test whether to integrate helppacks into the product's installer
11543 dnl ===================================================================
11544 AC_MSG_CHECKING([for helppack integration])
11545 if test "$with_helppack_integration" = "no"; then
11546 WITH_HELPPACK_INTEGRATION=
11547 AC_MSG_RESULT([no integration])
11549 WITH_HELPPACK_INTEGRATION=TRUE
11550 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
11551 AC_MSG_RESULT([integration])
11553 AC_SUBST(WITH_HELPPACK_INTEGRATION)
11555 ###############################################################################
11556 # Extensions checking
11557 ###############################################################################
11558 AC_MSG_CHECKING([for extensions integration])
11559 if test "x$enable_extension_integration" != "xno"; then
11560 WITH_EXTENSION_INTEGRATION=TRUE
11561 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
11562 AC_MSG_RESULT([yes, use integration])
11564 WITH_EXTENSION_INTEGRATION=
11565 AC_MSG_RESULT([no, do not integrate])
11567 AC_SUBST(WITH_EXTENSION_INTEGRATION)
11569 dnl Should any extra extensions be included?
11570 dnl There are standalone tests for each of these below.
11571 WITH_EXTRA_EXTENSIONS=
11572 AC_SUBST([WITH_EXTRA_EXTENSIONS])
11574 libo_CHECK_EXTENSION([Watch Window],[WATCH_WINDOW],[watch_window],[watch-window],[23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt])
11575 libo_CHECK_EXTENSION([SmART Gallery (Diagram)],[DIAGRAM],[diagram],[diagram],[8d74685d41f8bffe8c3e71fe8deac09d-SmART_0.9.5.oxt])
11576 libo_CHECK_EXTENSION([Validator],[VALIDATOR],[validator],[validator],[bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt])
11577 libo_CHECK_EXTENSION([Barcode],[BARCODE],[barcode],[barcode],[3ed18025a766f1e955707b969c8113a5-Barcode_1.3.5.0.oxt])
11578 libo_CHECK_EXTENSION([ConvertTextToNumber],[CT2N],[ct2n],[ct2n],[])
11579 libo_CHECK_EXTENSION([Numbertext],[NUMBERTEXT],[numbertext],[numbertext],[b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_0.9.5.oxt])
11580 libo_CHECK_EXTENSION([Hungarian Cross-reference Toolbar],[HUNART],[hunart],[hunart],[b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt])
11581 libo_CHECK_EXTENSION([Typography Toolbar],[TYPO],[typo],[typo],[9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt])
11582 libo_CHECK_EXTENSION([Google Docs],[GOOGLE_DOCS],[google_docs],[google-docs],[27211596cf0ad97cab7321239406fde0-gdocs_3.0.1_modified.oxt])
11583 if test "x$with_java" != "xno"; then
11584 libo_CHECK_EXTENSION([NLPSolver],[NLPSOLVER],[nlpsolver],[nlpsolver],[])
11585 libo_CHECK_EXTENSION([LanguageTool],[LANGUAGETOOL],[languagetool],[languagetool],[])
11588 dnl ===================================================================
11589 dnl Test whether to include Sun Professional Template Pack
11590 dnl ===================================================================
11591 AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
11592 if test "$with_sun_templates" = "" -o "$with_sun_templates" = "no"; then
11593 AC_MSG_RESULT([no integration])
11595 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
11596 sun_supported_langs="en-US de it fr es hu"
11597 if test "$with_sun_templates" = "yes"; then
11598 wanted_sun_templates="$sun_supported_langs"
11600 # check whether the langs are supported by Sun
11601 wanted_sun_templates=
11602 for lang in $with_sun_templates; do
11603 if test -n "`echo $sun_supported_langs | grep "$lang"`"; then
11604 wanted_sun_templates="$wanted_sun_templates $lang"
11609 SUNTEMPLATES_DE_PACK=
11610 SUNTEMPLATES_EN_US_PACK=
11611 SUNTEMPLATES_ES_PACK=
11612 SUNTEMPLATES_FR_PACK=
11613 SUNTEMPLATES_HU_PACK=
11614 SUNTEMPLATES_IT_PACK=
11615 # check whether the langs are requested at all
11616 for lang in $wanted_sun_templates; do
11617 if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`"; then
11618 SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
11620 "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
11621 "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
11622 "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
11623 "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
11624 "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
11625 "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
11629 WITH_EXTRA_EXTENSIONS=TRUE
11630 AC_MSG_RESULT([$SUNTEMPLATES_LANG])
11632 AC_SUBST(SUNTEMPLATES_DE_PACK)
11633 AC_SUBST(SUNTEMPLATES_EN_US_PACK)
11634 AC_SUBST(SUNTEMPLATES_ES_PACK)
11635 AC_SUBST(SUNTEMPLATES_FR_PACK)
11636 AC_SUBST(SUNTEMPLATES_HU_PACK)
11637 AC_SUBST(SUNTEMPLATES_IT_PACK)
11639 TEST_FONTS_MISSING=0
11642 # $2+ = accepted font mappings
11646 AC_MSG_CHECKING([font mapping for '$FONT'])
11647 FONTFILE="$(basename `$FCMATCH -f '%{file}' "$FONT"`)"
11648 FONTFILE_LOWER="$(echo $FONTFILE | $AWK '{print tolower($0)}')"
11650 TESTEXPR="'${FONTFILE_LOWER}' = '$(echo $FONT | $AWK '{print tolower($0)}').ttf'"
11652 MAPPING="$(echo $1 | $AWK '{print tolower($0)}')"; shift
11653 test -n "$MAPPING" || break
11654 TESTEXPR="${TESTEXPR} -o '${FONTFILE_LOWER}' = '$MAPPING-regular.ttf'"
11658 AC_MSG_RESULT([ok])
11660 AC_MSG_RESULT([unknown ($FONTFILE)])
11661 TEST_FONTS_MISSING=1
11665 dnl ===================================================================
11666 dnl Test whether to include fonts
11667 dnl ===================================================================
11668 AC_MSG_CHECKING([whether to include third-party fonts])
11669 if test "$with_fonts" != "no"; then
11670 AC_MSG_RESULT([yes])
11672 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
11674 AC_MSG_RESULT([no])
11676 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
11677 if test "$test_fontconfig" = "yes"; then
11678 AC_PATH_PROG([FCMATCH], [fc-match])
11679 if test -z "$FCMATCH"; then
11680 AC_MSG_WARN([Unable to query installed fonts - unit tests disabled.])
11681 TEST_FONTS_MISSING=1
11683 test_font_map 'Calibri' 'Carlito'
11684 if test ${TEST_FONTS_MISSING} -eq 1
11686 AC_MSG_WARN([Unknown font mappings - unit tests disabled.])
11690 TEST_FONTS_MISSING=0
11693 AC_SUBST(WITH_FONTS)
11694 AC_DEFINE_UNQUOTED([TEST_FONTS_MISSING], $TEST_FONTS_MISSING)
11696 dnl ===================================================================
11697 dnl Test whether to include ppds
11698 dnl ===================================================================
11699 AC_MSG_CHECKING([whether to include PPDs])
11700 if test "$with_ppds" != "no"; then
11701 AC_MSG_RESULT([yes])
11704 AC_MSG_RESULT([no])
11706 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
11708 AC_SUBST(WITHOUT_PPDS)
11710 dnl ===================================================================
11711 dnl Test whether to include extra galleries
11712 dnl ===================================================================
11713 AC_MSG_CHECKING([whether to include extra galleries])
11714 if test "$enable_extra_gallery" = "" -o "$enable_extra_gallery" = "no"; then
11715 AC_MSG_RESULT([no])
11716 WITH_EXTRA_GALLERY=
11717 OOOP_GALLERY_PACK=""
11719 AC_MSG_RESULT([yes])
11720 WITH_EXTRA_GALLERY=TRUE
11721 BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
11722 SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
11723 OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
11725 AC_SUBST(WITH_EXTRA_GALLERY)
11726 AC_SUBST(OOOP_GALLERY_PACK)
11728 dnl ===================================================================
11729 dnl Test whether to include extra templates
11730 dnl ===================================================================
11731 AC_MSG_CHECKING([whether to include extra templates])
11732 if test "$enable_extra_template" = "" -o "$enable_extra_template" = "no"; then
11733 AC_MSG_RESULT([no])
11734 WITH_EXTRA_TEMPLATE=
11735 OOOP_TEMPLATES_PACK=""
11737 AC_MSG_RESULT([yes])
11738 WITH_EXTRA_TEMPLATE=TRUE
11739 BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
11740 SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
11741 OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
11743 AC_SUBST(WITH_EXTRA_TEMPLATE)
11744 AC_SUBST(OOOP_TEMPLATES_PACK)
11746 dnl ===================================================================
11747 dnl Test whether to include extra samples
11748 dnl ===================================================================
11749 AC_MSG_CHECKING([whether to include extra samples])
11750 if test "$enable_extra_sample" = "" -o "$enable_extra_sample" = "no"; then
11751 AC_MSG_RESULT([no])
11753 OOOP_SAMPLES_PACK=""
11755 AC_MSG_RESULT([yes])
11756 WITH_EXTRA_SAMPLE=TRUE
11757 BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
11758 SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
11759 OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
11761 AC_SUBST(WITH_EXTRA_SAMPLE)
11762 AC_SUBST(OOOP_SAMPLES_PACK)
11764 dnl ===================================================================
11765 dnl Test whether to include extra fonts
11766 dnl ===================================================================
11767 AC_MSG_CHECKING([whether to include extra fonts])
11768 if test "$enable_extra_font" = "" -o "$enable_extra_font" = "no"; then
11769 AC_MSG_RESULT([no])
11773 AC_MSG_RESULT([yes])
11774 WITH_EXTRA_FONT=TRUE
11775 BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
11776 SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
11777 OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
11779 AC_SUBST(WITH_EXTRA_FONT)
11780 AC_SUBST(OOOP_FONTS_PACK)
11782 dnl ===================================================================
11783 dnl Test whether to enable online update service
11784 dnl ===================================================================
11785 AC_MSG_CHECKING([whether to enable online update])
11786 ENABLE_ONLINE_UPDATE=
11787 if test "$enable_online_update" = ""; then
11788 if test "$_os" = "WINNT" -o "$_os" = "Darwin"; then
11789 AC_MSG_RESULT([yes])
11790 ENABLE_ONLINE_UPDATE="TRUE"
11792 AC_MSG_RESULT([no])
11795 if test "$enable_online_update" = "yes"; then
11796 AC_MSG_RESULT([yes])
11797 ENABLE_ONLINE_UPDATE="TRUE"
11799 AC_MSG_RESULT([no])
11802 AC_SUBST(ENABLE_ONLINE_UPDATE)
11804 dnl ===================================================================
11805 dnl Test whether to create MSI with LIMITUI=1 (silent install)
11806 dnl ===================================================================
11807 AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
11808 if test "$enable_silent_msi" = "" -o "$enable_silent_msi" = "no"; then
11809 AC_MSG_RESULT([no])
11812 AC_MSG_RESULT([yes])
11813 ENABLE_SILENT_MSI=TRUE
11814 SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
11816 AC_SUBST(ENABLE_SILENT_MSI)
11818 AC_MSG_CHECKING([whether and how to use Xinerama])
11819 if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
11820 if test "$x_libraries" = "default_x_libraries"; then
11821 XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
11822 if test "x$XINERAMALIB" = x; then
11823 XINERAMALIB="/usr/lib"
11826 XINERAMALIB="$x_libraries"
11828 if test -e "$XINERAMALIB/libXinerama.so" -a -e "$XINERAMALIB/libXinerama.a"; then
11829 # we have both versions, let the user decide but use the dynamic one
11832 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
11833 XINERAMA_LINK=dynamic
11835 XINERAMA_LINK=static
11837 elif test -e "$XINERAMALIB/libXinerama.so" -a ! -e "$XINERAMALIB/libXinerama.a"; then
11838 # we have only the dynamic version
11840 XINERAMA_LINK=dynamic
11841 elif test -e "$XINERAMALIB/libXinerama.a"; then
11843 if echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
11845 XINERAMA_LINK=static
11855 if test "$USE_XINERAMA" = "TRUE"; then
11856 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
11857 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
11858 [AC_MSG_ERROR(Xinerama header not found.)], [])
11859 XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
11860 if test "x$XEXTLIB" = x; then
11861 XEXTLIBS="-L$XLIB -L$XINERAMALIB -lXext"
11863 XINERAMA_EXTRA_LIBS="$XEXTLIBS"
11864 if test "$_os" = "FreeBSD"; then
11865 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
11867 if test "$_os" = "Linux"; then
11868 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
11870 AC_CHECK_LIB([Xinerama], [XineramaIsActive], [:],
11871 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
11873 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
11878 AC_MSG_RESULT([no])
11880 AC_SUBST(USE_XINERAMA)
11881 AC_SUBST(XINERAMA_LINK)
11883 dnl ===================================================================
11884 dnl Test whether to build cairo or rely on the system version
11885 dnl ===================================================================
11887 if test "$GUIBASE" = "unx"; then
11888 # Used in vcl/Library_vclplug_gen.mk
11892 if test "$test_cairo" = "yes"; then
11893 AC_MSG_CHECKING([whether to use the system cairo])
11895 : ${with_system_cairo:=$with_system_libs}
11896 if test "$with_system_cairo" = "yes"; then
11898 AC_MSG_RESULT([yes])
11900 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
11901 CAIRO_CFLAGS=$(printf '%s' "$CAIRO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11903 if test "$test_xrender" = "yes"; then
11904 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
11906 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
11907 #ifdef PictStandardA8
11911 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
11915 libo_MINGW_CHECK_DLL([libcairo])
11916 libo_MINGW_TRY_DLL([libfontconfig])
11917 libo_MINGW_TRY_DLL([libfreetype])
11918 libo_MINGW_TRY_DLL([libpixman])
11919 libo_MINGW_TRY_DLL([libpng15])
11922 AC_MSG_RESULT([no])
11924 BUILD_TYPE="$BUILD_TYPE CAIRO"
11925 SCPDEFS="$SCPDEFS -DNEED_CAIRO"
11929 AC_SUBST(SYSTEM_CAIRO)
11930 AC_SUBST(CAIRO_CFLAGS)
11931 AC_SUBST(CAIRO_LIBS)
11933 dnl ===================================================================
11934 dnl Test whether to use avahi
11935 dnl ===================================================================
11936 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_avahi" = "yes"; then
11937 PKG_CHECK_MODULES([AVAHI], [avahi-client >= 0.6.10],
11938 [ENABLE_AVAHI="TRUE"])
11939 AC_DEFINE(HAVE_FEATURE_AVAHI)
11940 AVAHI_CFLAGS=$(printf '%s' "$AVAHI_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11943 AC_SUBST(ENABLE_AVAHI)
11944 AC_SUBST(AVAHI_CFLAGS)
11945 AC_SUBST(AVAHI_LIBS)
11947 dnl ===================================================================
11948 dnl Test whether to use liblangtag
11949 dnl ===================================================================
11952 AC_MSG_CHECKING([whether to use liblangtag])
11953 if test "$enable_liblangtag" = "yes" -o \( "$enable_liblangtag" = "" -a $_os != Android -a $_os != iOS \); then
11954 ENABLE_LIBLANGTAG=TRUE
11955 AC_MSG_RESULT([yes])
11956 AC_MSG_CHECKING([whether to use system liblangtag])
11957 if test "$with_system_liblangtag" = yes; then
11958 SYSTEM_LIBLANGTAG=TRUE
11959 AC_MSG_RESULT([yes])
11960 PKG_CHECK_MODULES( LIBLANGTAG, liblangtag >= 0.4.0)
11961 LIBLANGTAG_CFLAGS=$(printf '%s' "$LIBLANGTAG_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11962 libo_MINGW_CHECK_DLL([liblangtag])
11965 AC_MSG_RESULT([no])
11966 BUILD_TYPE="$BUILD_TYPE LIBLANGTAG"
11967 if test "$COM" = "MSC"; then
11968 LIBLANGTAG_LIBS="${WORKDIR}/UnpackedTarball/langtag/liblangtag/.libs/liblangtag.lib"
11970 LIBLANGTAG_LIBS="-L${WORKDIR}/UnpackedTarball/langtag/liblangtag/.libs -llangtag"
11974 AC_MSG_RESULT([no])
11976 AC_SUBST(ENABLE_LIBLANGTAG)
11977 AC_SUBST(SYSTEM_LIBLANGTAG)
11978 AC_SUBST(LIBLANGTAG_CFLAGS)
11979 AC_SUBST(LIBLANGTAG_LIBS)
11981 dnl ===================================================================
11982 dnl Test whether to build libpng or rely on the system version
11983 dnl ===================================================================
11985 libo_CHECK_SYSTEM_MODULE([libpng],[LIBPNG],[libpng],["-I${WORKDIR}/UnpackedTarball/png"],["-L${WORKDIR}/LinkTarget/StaticLibrary -lpng"])
11987 dnl ===================================================================
11988 dnl Check for runtime JVM search path
11989 dnl ===================================================================
11990 if test "$ENABLE_JAVA" != ""; then
11991 AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
11992 if test -n "$with_jvm_path" -a "$with_jvm_path" != "no"; then
11993 AC_MSG_RESULT([yes])
11994 if ! test -d "$with_jvm_path"; then
11995 AC_MSG_ERROR(["$with_jvm_path" not a directory])
11997 if ! test -d "$with_jvm_path"jvm; then
11998 AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
12000 JVM_ONE_PATH_CHECK="$with_jvm_path"
12001 AC_SUBST(JVM_ONE_PATH_CHECK)
12003 AC_MSG_RESULT([no])
12007 dnl ===================================================================
12008 dnl Test for the presence of Ant and that it works
12009 dnl ===================================================================
12011 if test "$ENABLE_JAVA" != ""; then
12012 ANT_HOME=; export ANT_HOME
12013 WITH_ANT_HOME=; export WITH_ANT_HOME
12014 if test -z "$with_ant_home"; then
12015 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
12017 if test "$_os" = "WINNT"; then
12018 with_ant_home=`cygpath -u "$with_ant_home"`
12020 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
12021 WITH_ANT_HOME=$with_ant_home
12022 ANT_HOME=$with_ant_home
12025 if test -z "$ANT"; then
12026 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
12028 # resolve relative or absolute symlink
12029 while test -h "$ANT"; do
12031 a_basename=`basename "$ANT"`
12032 a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
12033 cd "`dirname "$ANT"`"
12034 cd "`dirname "$a_script"`"
12035 ANT="`pwd`"/"`basename "$a_script"`"
12039 AC_MSG_CHECKING([if $ANT works])
12040 cat > conftest.java << EOF
12041 public class conftest {
12042 int testmethod(int a, int b) {
12048 cat > conftest.xml << EOF
12049 <project name="conftest" default="conftest">
12050 <target name="conftest">
12051 <javac srcdir="." includes="conftest.java">
12057 oldJAVA_HOME=$JAVA_HOME
12058 if test "$JAVACISGCJ" = "yes"; then
12059 JAVA_HOME=; export JAVA_HOME
12060 ant_gcj="-Dbuild.compiler=gcj"
12062 AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
12063 if test $? = 0 -a -f ./conftest.class; then
12064 AC_MSG_RESULT([Ant works])
12065 if test -z "$WITH_ANT_HOME"; then
12066 ANT_HOME=`"$ANT" -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
12067 if test -z "$ANT_HOME"; then
12068 ANT_HOME=`echo "$ANT" | $SED -n "s/\/bin\/ant.*\$//p"`
12071 ANT_HOME="$WITH_ANT_HOME"
12074 echo "configure: Ant test failed" >&5
12075 cat conftest.java >&5
12076 cat conftest.xml >&5
12077 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
12079 add_warning "Ant does not work - Some Java projects will not build!"
12081 JAVA_HOME=$oldJAVA_HOME
12082 rm -f conftest* core core.* *.core
12084 if test -z "$ANT_HOME"; then
12085 ANT_HOME="NO_ANT_HOME"
12087 PathFormat "$ANT_HOME"
12088 ANT_HOME="$formatted_path"
12095 dnl Checking for ant.jar
12096 if test "$ANT_HOME" != "NO_ANT_HOME"; then
12097 AC_MSG_CHECKING([Ant lib directory])
12098 if test -f $ANT_HOME/lib/ant.jar; then
12099 ANT_LIB="$ANT_HOME/lib"
12101 if test -f $ANT_HOME/ant.jar; then
12102 ANT_LIB="$ANT_HOME"
12104 if test -f /usr/share/java/ant.jar; then
12105 ANT_LIB=/usr/share/java
12107 if test -f /usr/share/ant-core/lib/ant.jar; then
12108 ANT_LIB=/usr/share/ant-core/lib
12110 if test -f $ANT_HOME/lib/ant/ant.jar; then
12111 ANT_LIB="$ANT_HOME/lib/ant"
12113 if test -f /usr/share/lib/ant/ant.jar; then
12114 ANT_LIB=/usr/share/lib/ant
12116 AC_MSG_ERROR([Ant libraries not found!])
12123 PathFormat "$ANT_LIB"
12124 ANT_LIB="$formatted_path"
12125 AC_MSG_RESULT([Ant lib directory found.])
12130 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
12132 AC_MSG_CHECKING([whether Ant is >= $ant_minver])
12133 ant_version=`"$ANT" -version | $AWK '{ print $4; }'`
12134 ant_version_major=`echo $ant_version | cut -d. -f1`
12135 ant_version_minor=`echo $ant_version | cut -d. -f2`
12136 echo "configure: ant_version $ant_version " >&5
12137 echo "configure: ant_version_major $ant_version_major " >&5
12138 echo "configure: ant_version_minor $ant_version_minor " >&5
12139 if test "$ant_version_major" -ge "2"; then
12140 AC_MSG_RESULT([yes, $ant_version])
12141 elif test "$ant_version_major" = "1" -a "$ant_version_minor" -ge "$ant_minminor1"; then
12142 AC_MSG_RESULT([yes, $ant_version])
12144 AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
12147 if test "$ENABLE_MEDIAWIKI" = "TRUE"; then
12148 AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
12151 cat > conftest.java << EOF
12152 public class conftest {
12153 int testmethod(int a, int b) {
12159 cat > conftest.xml << EOF
12160 <project name="conftest" default="conftest">
12161 <target name="conftest" depends="copytest">
12162 <javac srcdir="." includes="conftest.java">
12165 <target name="copytest">
12166 <copy todir="confdir">
12167 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
12169 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
12175 if test "$JAVACISGCJ" = "yes"; then
12176 JAVA_HOME=; export JAVA_HOME
12177 ant_gcj="-Dbuild.compiler=gcj"
12179 AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
12180 if test $? = 0 -a -f ./conftest.class; then
12181 AC_MSG_RESULT([yes])
12184 echo "configure: Ant test failed" >&5
12185 cat conftest.java >&5
12186 cat conftest.xml >&5
12188 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
12191 rm -f conftest* core core.* *.core
12195 if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
12196 AC_MSG_CHECKING([for JUnit 4])
12197 if test "$with_junit" = "yes"; then
12198 if test -e /usr/share/java/junit4.jar; then
12199 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
12201 if test -e /usr/share/lib/java/junit.jar; then
12202 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
12204 OOO_JUNIT_JAR=/usr/share/java/junit.jar
12208 OOO_JUNIT_JAR=$with_junit
12210 if test "$_os" = "WINNT"; then
12211 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
12213 printf 'import org.junit.Before; import org.hamcrest.BaseDescription;' \
12215 if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
12216 AC_MSG_RESULT([$OOO_JUNIT_JAR])
12219 [cannot find JUnit 4 jar, or JUnit 4 jar does not provide Hamcrest; please
12220 install one in the default location (/usr/share/java), specify its pathname via
12221 --with-junit=..., or disable it via --without-junit])
12223 rm -f conftestj.class conftestj.java
12224 if test $OOO_JUNIT_JAR != ""; then
12225 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
12228 AC_SUBST(OOO_JUNIT_JAR)
12234 # check for wget and curl
12239 if test "$enable_fetch_external" != "no"; then
12241 CURL=`which curl 2>/dev/null`
12243 for i in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget /opt/sfw/bin/wget /opt/local/bin/wget; do
12244 eval "$i --version" > /dev/null 2>&1
12246 if test $ret -eq 0; then
12252 if test -z "$WGET" -a -z "$CURL"; then
12253 AC_MSG_ERROR([neither wget nor curl found!])
12266 for i in md5 md5sum /usr/local/bin/md5sum gmd5sum /usr/sfw/bin/md5sum /opt/sfw/bin/gmd5sum /opt/local/bin/md5sum; do
12267 if test "$i" = "md5"; then
12268 eval "$i -x" > /dev/null 2>&1
12270 eval "$i --version" > /dev/null 2>&1
12273 if test $ret -eq 0; then
12279 if test "$MD5SUM" = "md5"; then
12280 if md5 -r < /dev/null > /dev/null 2>/dev/null; then
12281 MD5SUM="$MD5SUM -r"
12282 elif md5 -n < /dev/null > /dev/null 2>/dev/null; then
12283 MD5SUM="$MD5SUM -n"
12287 if test -z "$MD5SUM"; then
12288 AC_MSG_ERROR([no md5sum: found!])
12293 dnl ===================================================================
12294 dnl Dealing with l10n options
12295 dnl ===================================================================
12296 AC_MSG_CHECKING([which languages to be built])
12297 # get list of all languages
12298 # generate shell variable from completelangiso= from solenv/inc/langlist.mk
12299 # the sed command does the following:
12300 # + if a line ends with a backslash, append the next line to it
12301 # + adds " on the beginning of the value (after =)
12302 # + adds " at the end of the value
12303 # + removes en-US; we want to put it on the beginning
12304 # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
12305 [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)]
12306 ALL_LANGS="en-US $completelangiso"
12307 # check the configured localizations
12308 WITH_LANG="$with_lang"
12309 if test -z "$WITH_LANG" -o "$WITH_LANG" = "en-US"; then
12310 AC_MSG_RESULT([en-US])
12312 AC_MSG_RESULT([$WITH_LANG])
12313 GIT_NEEDED_SUBMODULES="translations $GIT_NEEDED_SUBMODULES"
12315 # check that the list is valid
12316 for lang in $WITH_LANG; do
12317 test "$lang" = "ALL" && continue
12318 # need to check for the exact string, so add space before and after the list of all languages
12319 for vl in $ALL_LANGS; do
12320 if test "$vl" = "$lang"; then
12324 if test "$vl" != "$lang"; then
12325 # if you're reading this - you prolly quoted your languages remove the quotes ...
12326 AC_MSG_ERROR([invalid language: '$lang' (vs '$v1'); supported languages are: $ALL_LANGS])
12329 if test -n "$WITH_LANG" -a "$WITH_LANG" != "ALL"; then
12330 echo $WITH_LANG | grep -q en-US
12331 test $? -ne 1 || WITH_LANG=`echo $WITH_LANG en-US`
12333 # list with substituted ALL
12334 WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
12335 test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
12336 test "$WITH_LANG" = "en-US" && WITH_LANG=
12337 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
12338 test "$WITH_LANG_LIST" = "en-US" || WITH_LANG_LIST=`echo $WITH_LANG_LIST qtz`
12339 ALL_LANGS=`echo $ALL_LANGS qtz`
12341 AC_SUBST(ALL_LANGS)
12342 AC_SUBST(WITH_LANG)
12343 AC_SUBST(WITH_LANG_LIST)
12344 AC_SUBST(GIT_NEEDED_SUBMODULES)
12346 WITH_POOR_HELP_LOCALIZATIONS=
12347 if test -d "$SRC_ROOT/translations/source"; then
12348 for l in `ls -1 $SRC_ROOT/translations/source`; do
12349 if test ! -d "$SRC_ROOT/translations/source/$l/helpcontent2"; then
12350 WITH_POOR_HELP_LOCALIZATIONS="$WITH_POOR_HELP_LOCALIZATIONS $l"
12354 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
12356 if test -n "$with_locales"; then
12357 WITH_LOCALES="$with_locales"
12359 just_langs="`echo $WITH_LOCALES | sed -e 's/_[A-Z]*//g'`"
12360 # Only languages and scripts for which we actually have ifdefs need to be handled. Also see
12361 # config_host/config_locales.h.in
12362 for locale in $WITH_LOCALES; do
12365 AC_DEFINE_UNQUOTED(WITH_LOCALE_$lang, 1)
12369 AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Deva)
12372 AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Cyrl)
12377 AC_DEFINE(WITH_LOCALE_ALL)
12379 AC_SUBST(WITH_LOCALES)
12381 dnl git submodule update --reference
12382 dnl ===================================================================
12383 if test -n "${GIT_REFERENCE_SRC}"; then
12384 for repo in ${GIT_NEEDED_SUBMODULES}; do
12385 if ! test -d "${GIT_REFERENCE_SRC}"/${repo}; then
12386 AC_MSG_ERROR([referenced git: required repository does not exist: ${GIT_REFERENCE_SRC}/${repo}])
12390 AC_SUBST(GIT_REFERENCE_SRC)
12392 dnl git submodules linked dirs
12393 dnl ===================================================================
12394 if test -n "${GIT_LINK_SRC}"; then
12395 for repo in ${GIT_NEEDED_SUBMODULES}; do
12396 if ! test -d "${GIT_LINK_SRC}"/${repo}; then
12397 AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
12401 AC_SUBST(GIT_LINK_SRC)
12404 dnl ===================================================================
12405 AC_MSG_CHECKING([for alternative branding images directory])
12406 # initialize mapped arrays
12407 BRAND_INTRO_IMAGES="flat_logo.svg intro.png"
12408 brand_files="$BRAND_INTRO_IMAGES about.svg"
12410 if test -z "$with_branding" -o "$with_branding" = "no"; then
12411 AC_MSG_RESULT([none])
12412 DEFAULT_BRAND_IMAGES="$brand_files"
12414 if ! test -d $with_branding ; then
12415 AC_MSG_ERROR([No directory $with_branding, falling back to default branding])
12417 AC_MSG_RESULT([$with_branding])
12418 CUSTOM_BRAND_DIR="$with_branding"
12419 for lfile in $brand_files
12421 if ! test -f $with_branding/$lfile ; then
12422 AC_MSG_WARN([Branded file $lfile does not exist, using the default one])
12423 DEFAULT_BRAND_IMAGES="$DEFAULT_BRAND_IMAGES $lfile"
12425 CUSTOM_BRAND_IMAGES="$CUSTOM_BRAND_IMAGES $lfile"
12428 check_for_progress="yes"
12431 AC_SUBST([BRAND_INTRO_IMAGES])
12432 AC_SUBST([CUSTOM_BRAND_DIR])
12433 AC_SUBST([CUSTOM_BRAND_IMAGES])
12434 AC_SUBST([DEFAULT_BRAND_IMAGES])
12437 AC_MSG_CHECKING([for 'intro' progress settings])
12441 PROGRESSFRAMECOLOR=
12443 PROGRESSTEXTBASELINE=
12445 if test "$check_for_progress" = "yes" -a -f "$with_branding/progress.conf" ; then
12446 source "$with_branding/progress.conf"
12447 AC_MSG_RESULT([settings found in $with_branding/progress.conf])
12449 AC_MSG_RESULT([none])
12452 AC_SUBST(PROGRESSBARCOLOR)
12453 AC_SUBST(PROGRESSSIZE)
12454 AC_SUBST(PROGRESSPOSITION)
12455 AC_SUBST(PROGRESSFRAMECOLOR)
12456 AC_SUBST(PROGRESSTEXTCOLOR)
12457 AC_SUBST(PROGRESSTEXTBASELINE)
12460 AC_MSG_CHECKING([for extra build ID])
12461 if test -n "$with_extra_buildid" -a "$with_extra_buildid" != "yes" ; then
12462 EXTRA_BUILDID="$with_extra_buildid"
12464 # in tinderboxes, it is easier to set EXTRA_BUILDID via the environment variable instead of configure switch
12465 if test -n "$EXTRA_BUILDID" ; then
12466 AC_MSG_RESULT([$EXTRA_BUILDID])
12468 AC_MSG_RESULT([not set])
12470 AC_DEFINE_UNQUOTED([EXTRA_BUILDID], ["$EXTRA_BUILDID"])
12473 AC_MSG_CHECKING([for vendor])
12474 if test -z "$with_vendor" -o "$with_vendor" = "no"; then
12475 OOO_VENDOR="$USERNAME"
12477 if test -z "$OOO_VENDOR"; then
12481 if test -z "$OOO_VENDOR"; then
12482 OOO_VENDOR="`id -u -n`"
12485 AC_MSG_RESULT([not set, using $OOO_VENDOR])
12487 OOO_VENDOR="$with_vendor"
12488 AC_MSG_RESULT([$OOO_VENDOR])
12490 AC_SUBST(OOO_VENDOR)
12492 AC_MSG_CHECKING([whether to install the compat oo* wrappers])
12493 if test "$with_compat_oowrappers" = "yes"; then
12494 WITH_COMPAT_OOWRAPPERS=TRUE
12497 WITH_COMPAT_OOWRAPPERS=
12500 AC_SUBST(WITH_COMPAT_OOWRAPPERS)
12502 INSTALLDIRNAME=`echo AC_PACKAGE_NAME | $AWK '{print tolower($0)}'`
12503 AC_MSG_CHECKING([for install dirname])
12504 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes"; then
12505 INSTALLDIRNAME="$with_install_dirname"
12507 AC_MSG_RESULT([$INSTALLDIRNAME])
12508 AC_SUBST(INSTALLDIRNAME)
12510 AC_MSG_CHECKING([for prefix])
12511 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12512 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
12513 PREFIXDIR="$prefix"
12514 AC_MSG_RESULT([$PREFIXDIR])
12515 AC_SUBST(PREFIXDIR)
12517 LIBDIR=[$(eval echo $(eval echo $libdir))]
12520 DATADIR=[$(eval echo $(eval echo $datadir))]
12523 MANDIR=[$(eval echo $(eval echo $mandir))]
12526 DOCDIR=[$(eval echo $(eval echo $docdir))]
12529 INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
12530 AC_SUBST(INSTALLDIR)
12532 TESTINSTALLDIR="${BUILDDIR}/test-install"
12533 AC_SUBST(TESTINSTALLDIR)
12536 # ===================================================================
12537 # OAuth2 id and secrets
12538 # ===================================================================
12540 AC_MSG_CHECKING([for Google Drive client id and secret])
12541 GDRIVE_CLIENT_ID="\"$with_gdrive_client_id\""
12542 GDRIVE_CLIENT_SECRET="\"$with_gdrive_client_secret\""
12543 if test "$with_gdrive_client_id" = "no" -o -z "$with_gdrive_client_id"; then
12544 GDRIVE_CLIENT_ID="\"\""
12547 if test "$with_gdrive_client_secret" = "no" -o -z "$with_gdrive_client_secret"; then
12548 GDRIVE_CLIENT_SECRET="\"\""
12551 if test -z "$GDRIVE_CLIENT_ID" -o -z "$GDRIVE_CLIENT_SECRET"; then
12552 AC_MSG_RESULT([not set])
12554 AC_MSG_RESULT([set])
12557 AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_ID, $GDRIVE_CLIENT_ID)
12558 AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_SECRET, $GDRIVE_CLIENT_SECRET)
12560 AC_MSG_CHECKING([for Alfresco Cloud client id and secret])
12561 ALFRESCO_CLOUD_CLIENT_ID="\"$with_alfresco_cloud_client_id\""
12562 ALFRESCO_CLOUD_CLIENT_SECRET="\"$with_alfresco_cloud_client_secret\""
12563 if test "$with_alfresco_cloud_client_id" = "no" -o -z "$with_alfresco_cloud_client_id"; then
12564 ALFRESCO_CLOUD_CLIENT_ID="\"\""
12567 if test "$with_alfresco_cloud_client_secret" = "no" -o -z "$with_alfresco_cloud_client_secret"; then
12568 ALFRESCO_CLOUD_CLIENT_SECRET="\"\""
12571 if test -z "$ALFRESCO_CLOUD_CLIENT_ID" -o -z "$ALFRESCO_CLOUD_CLIENT_SECRET"; then
12572 AC_MSG_RESULT([not set])
12574 AC_MSG_RESULT([set])
12576 AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_ID, $ALFRESCO_CLOUD_CLIENT_ID)
12577 AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_SECRET, $ALFRESCO_CLOUD_CLIENT_SECRET)
12579 # ===================================================================
12580 # De- or increase default verbosity of build process
12581 # ===================================================================
12582 AC_MSG_CHECKING([build verbosity])
12583 if test -n "$enable_verbose"; then
12584 if test "$enable_verbose" = "yes"; then
12586 AC_MSG_RESULT([high])
12588 if test "$enable_verbose" = "no"; then
12590 AC_MSG_RESULT([low])
12593 AC_MSG_RESULT([not set])
12597 dnl ===================================================================
12598 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
12599 dnl --enable-dependency-tracking configure option
12600 dnl ===================================================================
12601 AC_MSG_CHECKING([whether to enable dependency tracking])
12602 if test "$enable_dependency_tracking" = "no"; then
12604 AC_MSG_RESULT([no])
12606 AC_MSG_RESULT([yes])
12610 dnl ===================================================================
12611 dnl Number of CPUs to use during the build
12612 dnl ===================================================================
12613 AC_MSG_CHECKING([for number of processors to use])
12614 # plain --with-parallelism is just the default
12615 if test -n "$with_parallelism" -a "$with_parallelism" != "yes"; then
12616 if test "$with_parallelism" = "no"; then
12619 PARALLELISM=$with_parallelism
12622 if test "$enable_icecream" = "yes"; then
12627 Darwin|FreeBSD|NetBSD|OpenBSD)
12628 PARALLELISM=`sysctl -n hw.ncpu`
12632 PARALLELISM=`getconf _NPROCESSORS_ONLN`
12634 # what else than above does profit here *and* has /proc?
12636 PARALLELISM=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
12640 # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
12641 # unexpected format, 'wc -l' will have returned 0 (and we won't use -j at all).
12645 if test "$no_parallelism_make" = "YES" && test $PARALLELISM -gt 1; then
12646 if test -z "$with_parallelism"; then
12647 AC_MSG_WARN([gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this.])
12648 add_warning "gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this."
12651 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."
12655 if test $PARALLELISM -eq 0; then
12656 AC_MSG_RESULT([explicit make -j option needed])
12658 AC_MSG_RESULT([$PARALLELISM])
12660 AC_SUBST(PARALLELISM)
12663 # Set up ILIB for MSVC build
12665 if test "$build_os" = "cygwin"; then
12667 if test -n "$JAVA_HOME" -a "$JAVA_HOME" != "NO_JAVA_HOME"; then
12668 ILIB="$ILIB;$JAVA_HOME/lib"
12670 if test "$BITNESS_OVERRIDE" = 64; then
12671 ILIB="$ILIB;$COMPATH/lib/amd64"
12672 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/x64"
12673 if test "$WINDOWS_SDK_VERSION" = "80"; then
12674 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x64"
12677 ILIB="$ILIB;$COMPATH/lib"
12678 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib"
12679 if test "$WINDOWS_SDK_VERSION" = "80"; then
12680 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x86"
12683 ILIB="$ILIB;$DOTNET_FRAMEWORK_HOME/lib"
12685 if test "$ENABLE_DIRECTX" = "TRUE"; then
12686 ILIB="$ILIB;$DIRECTXSDK_LIB"
12692 # ===================================================================
12693 # Creating bigger shared library to link against
12694 # ===================================================================
12695 AC_MSG_CHECKING([whether to create huge library])
12698 if test $_os = iOS -o $_os = Android; then
12699 # Never any point in mergelibs for these as we build just static
12700 # libraries anyway...
12701 enable_mergelibs=no
12704 if test -n "$enable_mergelibs" -a "$enable_mergelibs" != "no"; then
12705 if test $_os != Linux -a $_os != WINNT; then
12706 add_warning "--enable-mergelibs is not tested for this platform"
12708 if test "$enable_mergelibs" = "all"; then
12711 AC_DEFINE(STATIC_LINKING)
12715 AC_MSG_RESULT([yes])
12717 AC_MSG_RESULT([no])
12719 AC_SUBST([MERGELIBS])
12720 AC_SUBST([URELIBS])
12722 # ===================================================================
12723 # Create hardlinks on deliver instead of copying for smaller size and speed up
12724 # ===================================================================
12725 AC_MSG_CHECKING([whether to create hardlinks for delivering files])
12727 if test "$enable_hardlink_deliver" = "yes"; then
12728 HARDLINKDELIVER="TRUE"
12729 AC_MSG_RESULT([yes])
12731 AC_MSG_RESULT([no])
12733 AC_SUBST(HARDLINKDELIVER)
12735 dnl ===================================================================
12736 dnl icerun is a wrapper that stops us spawning tens of processes
12737 dnl locally - for tools that can't be executed on the compile cluster
12738 dnl this avoids a dozen javac's ganging up on your laptop to kill it.
12739 dnl ===================================================================
12740 AC_MSG_CHECKING([whether to use icerun wrapper])
12742 if test "$enable_icecream" = "yes" && which icerun >/dev/null 2>&1 ; then
12743 ICECREAM_RUN=icerun
12744 AC_MSG_RESULT([yes])
12746 AC_MSG_RESULT([no])
12748 AC_SUBST(ICECREAM_RUN)
12750 dnl ===================================================================
12752 AC_MSG_CHECKING([MPL subset])
12755 if test "$enable_mpl_subset" = "yes"; then
12757 if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
12759 elif test "$ENABLE_REPORTBUILDER" = "TRUE"; then
12762 if test "$warn_report" = "true"; then
12763 AC_MSG_ERROR([need to --disable-report-builder - extended database report builder.])
12765 if test "x$enable_postgresql_sdbc" != "xno"; then
12766 AC_MSG_ERROR([need to --disable-postgresql-sdbc - the postgress database backend.])
12768 if test "$enable_lotuswordpro" = "yes"; then
12769 AC_MSG_ERROR([need to --disable-lotuswordpro - a Lotus Word Pro file format import filter.])
12771 if test "$WITH_WEBDAV" = "neon"; then
12772 AC_MSG_ERROR([need --with-webdav=serf or --without-webdav - webdav support.])
12774 if test "x$enable_ext_mariadb_connector" = "xyes"; then
12775 AC_MSG_ERROR([need to --disable-ext-mariadb-connector - mariadb/mysql support.])
12777 if test -n "$ENABLE_PDFIMPORT"; then
12778 if test "x$SYSTEM_POPPLER" != "x"; then
12779 AC_MSG_ERROR([need to disable PDF import via poppler or use system library])
12782 # cf. m4/libo_check_extension.m4
12783 if test "x$WITH_EXTRA_EXTENSIONS" != "x"; then
12784 AC_MSG_ERROR([need to disable extra extensions '$WITH_EXTRA_EXTENSIONS'])
12786 for theme in $WITH_THEMES; do
12788 crystal|default|hicontrast|human|oxygen|sifr)
12789 AC_MSG_ERROR([need to disable icon themes from '$WITH_THEMES': $theme present, use --with-theme=tango]) ;;
12793 if test "$enable_opengl" != "no" -o "x$ENABLE_OPENGL" = "xTRUE"; then
12794 AC_MSG_ERROR([need to --disable-opengl - GL transitions support.])
12796 if test "$enable_lpsolve" != "no" -o "x$ENABLE_LPSOLVE" = "xTRUE"; then
12797 AC_MSG_ERROR([need to --disable-lpsolve - calc linear programming solver.])
12801 AC_DEFINE(MPL_HAVE_SUBSET)
12802 AC_MSG_RESULT([only])
12804 AC_MSG_RESULT([no restrictions])
12806 AC_SUBST(MPL_SUBSET)
12809 dnl ===================================================================
12810 dnl Setting up the environment.
12811 dnl ===================================================================
12812 echo "setting up the build environment variables..."
12816 if test "$build_os" = "cygwin"; then
12817 if test "$DISABLE_ACTIVEX" = "TRUE"; then
12818 ATL_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE
12819 ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl"
12821 ATL_LIB="$COMPATH/atlmfc/lib"
12822 ATL_INCLUDE="$COMPATH/atlmfc/include"
12824 if test "$BITNESS_OVERRIDE" = 64; then
12825 ATL_LIB="$ATL_LIB/amd64"
12827 PathFormat "/usr/bin/grep.exe"
12828 WIN_GREP="$formatted_path"
12829 PathFormat "/usr/bin/find.exe"
12830 WIN_FIND="$formatted_path"
12831 PathFormat "/usr/bin/ls.exe"
12832 WIN_LS="$formatted_path"
12833 PathFormat "/usr/bin/touch.exe"
12834 WIN_TOUCH="$formatted_path"
12837 AC_SUBST(ATL_INCLUDE)
12842 AC_SUBST(WIN_TOUCH)
12844 AC_SUBST(BUILD_TYPE)
12849 PERL="$formatted_path"
12852 if test -n "$TMPDIR"; then
12853 TEMP_DIRECTORY="$TMPDIR"
12855 TEMP_DIRECTORY="/tmp"
12857 if test "$build_os" = "cygwin"; then
12858 TEMP_DIRECTORY=`cygpath -m "$TEMP_DIRECTORY"`
12860 AC_SUBST(TEMP_DIRECTORY)
12862 # setup the PATH for the environment
12863 if test -n "$LO_PATH_FOR_BUILD"; then
12864 LO_PATH="$LO_PATH_FOR_BUILD"
12870 aix*|dragonfly*|freebsd*|linux-gnu*|*netbsd*|openbsd*)
12871 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12872 pathmunge "$JAVA_HOME/bin" "after"
12877 pathmunge "$DOTNET_FRAMEWORK_HOME/bin" "before"
12878 pathmunge "$ASM_HOME" "before"
12879 pathmunge "$WINDOWS_SDK_HOME/bin" "before"
12880 pathmunge "$CSC_PATH" "before"
12881 pathmunge "$MIDL_PATH" "before"
12882 pathmunge "$AL_PATH" "before"
12883 pathmunge "$MSPDB_PATH" "before"
12884 if test "$BITNESS_OVERRIDE" = 64; then
12885 pathmunge "$COMPATH/bin/amd64" "before"
12886 pathmunge "$WINDOWS_SDK_HOME/bin/x64" "before"
12888 pathmunge "$COMPATH/bin" "before"
12889 pathmunge "$WINDOWS_SDK_HOME/bin/x86" "before"
12891 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12892 if test -d "$JAVA_HOME/jre/bin/client"; then
12893 pathmunge "$JAVA_HOME/jre/bin/client" "before"
12895 if test -d "$JAVA_HOME/jre/bin/hotspot"; then
12896 pathmunge "$JAVA_HOME/jre/bin/hotspot" "before"
12898 pathmunge "$JAVA_HOME/bin" "before"
12903 pathmunge "/usr/css/bin" "before"
12904 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12905 pathmunge "$JAVA_HOME/bin" "after"
12910 pathmunge "$SRC_ROOT/solenv/bin" "before"
12911 pathmunge "." "before"
12916 # Generate a configuration md5 we can use for deps
12917 if test -f config_host.mk; then
12918 config_md5=`$MD5SUM config_host.mk | sed "s/ .*//"`
12921 AC_CONFIG_FILES([config_host.mk
12924 instsetoo_native/util/openoffice.lst
12925 sysui/desktop/macosx/Info.plist
12927 AC_CONFIG_HEADERS([config_host/config_buildid.h])
12928 AC_CONFIG_HEADERS([config_host/config_clang.h])
12929 AC_CONFIG_HEADERS([config_host/config_eot.h])
12930 AC_CONFIG_HEADERS([config_host/config_features.h])
12931 AC_CONFIG_HEADERS([config_host/config_folders.h])
12932 AC_CONFIG_HEADERS([config_host/config_gcc.h])
12933 AC_CONFIG_HEADERS([config_host/config_global.h])
12934 AC_CONFIG_HEADERS([config_host/config_graphite.h])
12935 AC_CONFIG_HEADERS([config_host/config_lgpl.h])
12936 AC_CONFIG_HEADERS([config_host/config_locales.h])
12937 AC_CONFIG_HEADERS([config_host/config_mpl.h])
12938 AC_CONFIG_HEADERS([config_host/config_orcus.h])
12939 AC_CONFIG_HEADERS([config_host/config_kde4.h])
12940 AC_CONFIG_HEADERS([config_host/config_mingw.h])
12941 AC_CONFIG_HEADERS([config_host/config_oox.h])
12942 AC_CONFIG_HEADERS([config_host/config_options.h])
12943 AC_CONFIG_HEADERS([config_host/config_test.h])
12944 AC_CONFIG_HEADERS([config_host/config_telepathy.h])
12945 AC_CONFIG_HEADERS([config_host/config_typesizes.h])
12946 AC_CONFIG_HEADERS([config_host/config_vclplug.h])
12947 AC_CONFIG_HEADERS([config_host/config_version.h])
12948 AC_CONFIG_HEADERS([config_host/config_oauth2.h])
12951 if test "$CROSS_COMPILING" = TRUE; then
12952 (echo; echo export BUILD_TYPE_FOR_HOST=$BUILD_TYPE) >>config_build.mk
12955 # touch the config timestamp file
12956 if test ! -f config_host.mk.stamp; then
12957 echo > config_host.mk.stamp
12958 elif test "$config_md5" = `$MD5SUM config_host.mk | sed "s/ .*//"`; then
12959 echo "Configuration unchanged - avoiding scp2 stamp update"
12961 echo > config_host.mk.stamp
12965 if test "$STALE_MAKE" = "TRUE" -a "$build_os" = "cygwin"; then
12967 ****************************************************************************
12969 Your make version is known to be horribly slow, and hard to debug
12970 problems with. To get a reasonably functional make please do:
12972 to install a pre-compiled binary make for cygwin
12974 mkdir -p /opt/lo/bin
12976 wget http://dev-www.libreoffice.org/bin/cygwin/make
12979 to install from source:
12980 place yourself in a working directory of you choice.
12982 git clone git://anongit.freedesktop.org/libreoffice/contrib/dev-tools
12983 cd dev-tools/make-3.82-gbuild
12984 ./configure --prefix=/opt/lo
12988 Then re-run autogen.sh
12990 Note: autogen.sh will try to use /opt/lo/bin/make if the environment variable GNUMAKE is not already defined.
12991 Alternatively, you can install the 'new' make where ever you want and make sure that `which make` finds it.
12997 ****************************************************************************
13007 if test $_os != WINNT -a "$CROSS_COMPILING" != TRUE; then
13009 After the build has finished, you can immediately run it using:
13010 instdir/program/soffice
13012 If you want to run the smoketest, issue:
13018 if test -f warn; then
13023 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: