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.10.5],[],[],[https://libreoffice-from-collabora.com/])
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-package-signing,
1290 AS_HELP_STRING([--enable-macosx-package-signing=<identity>],
1291 [Create a .pkg suitable for uploading to the Mac App Store and sign
1292 it. If you don't provide an identity the first suitable certificate
1293 in your keychain is used.]),
1296 AC_ARG_ENABLE(macosx-sandbox,
1297 AS_HELP_STRING([--enable-macosx-sandbox],
1298 [Make the app bundle run in a sandbox. Requires code signing.
1299 Is required by apps distributed in the Mac App Store, and implies
1300 adherence to App Store rules.]),
1303 AC_ARG_WITH(macosx-teamid,
1304 AS_HELP_STRING([--with-macosx-teamid=<teamid>],
1305 [The "team id" to be used for com.apple.application-identifier
1306 in the entitlements when building a sandboxed LibreOffice.]),
1309 AC_ARG_ENABLE(canonical-installation-tree-structure,
1310 AS_HELP_STRING([--enable-canonical-installation-tree-structure],
1311 [Make the installation tree structure be more canonical for
1312 the platform. Implemented only for OS X. Experimental and currently broken.]),
1316 AC_ARG_WITH(macosx-bundle-identifier,
1317 AS_HELP_STRING([--with-macosx-bundle-identifier=tld.mumble.orifice.TheOffice],
1318 [Define the OS X bundle identifier. Default is the somewhat weird
1319 org.libreoffice.script ("script", huh?).]),
1320 ,with_macosx_bundle_identifier=org.libreoffice.script)
1322 AC_ARG_WITH(macosx-app-name,
1323 AS_HELP_STRING([--with-macosx-app-name='My Own Office Suite'],
1324 [Define the OS X app name. Default is AC_PACKAGE_NAME.]),
1325 ,with_macosx_app_name=$PRODUCTNAME)
1327 AC_ARG_ENABLE(libc++,
1328 AS_HELP_STRING([--enable-libc++],
1329 [Use the libc++ C++ library instead of GNU libstdc++ on OS X. Only effective
1330 if --with-macosx-version-min-required is 10.7 or later.]),
1333 AC_ARG_ENABLE(ios-simulator,
1334 AS_HELP_STRING([--enable-ios-simulator],
1335 [Build for the iOS Simulator, not iOS device.]),
1338 AC_ARG_ENABLE(readonly-installset,
1339 AS_HELP_STRING([--enable-readonly-installset],
1340 [Prevents any attempts by LibreOffice to write into its installation. That means
1341 at least that no "system-wide" extensions can be added. Experimental work in
1345 AC_ARG_ENABLE(postgresql-sdbc,
1346 AS_HELP_STRING([--disable-postgresql-sdbc],
1347 [Disable the build of the PostgreSQL-SDBC driver.])
1350 AC_ARG_ENABLE(lotuswordpro,
1351 AS_HELP_STRING([--disable-lotuswordpro],
1352 [Disable the build of the Lotus Word Pro filter.]),
1353 ,enable_lotuswordpro=yes)
1355 AC_ARG_ENABLE(firebird-sdbc,
1356 AS_HELP_STRING([--disable-firebird-sdbc],
1357 [Disable the build of the Firebird-SDBC driver if it doesn't compile for you.]),
1358 ,enable_firebird_sdbc=yes)
1360 AC_ARG_ENABLE(winegcc,
1361 AS_HELP_STRING([--enable-winegcc],
1362 [Enable use of winegcc during the build, in order to create msi* tools
1363 needed for MinGW cross-compilation.]),
1366 AC_ARG_ENABLE(liblangtag,
1367 AS_HELP_STRING([--disable-liblangtag],
1368 [Disable use of liblangtag, and instead use an own simple
1372 AC_ARG_ENABLE(bogus-pkg-config,
1373 AS_HELP_STRING([--enable-bogus-pkg-config],
1374 [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.]),
1377 AC_ARG_ENABLE(openssl,
1378 AS_HELP_STRING([--disable-openssl],
1379 [Disable using libssl/libcrypto from OpenSSL. If disabled,
1380 components will either use GNUTLS or NSS. Work in progress,
1381 use only if you are hacking on it.]),
1382 ,enable_openssl=yes)
1384 AC_ARG_ENABLE(library-bin-tar,
1385 AS_HELP_STRING([--enable-library-bin-tar],
1386 [Enable the building and reused of tarball of binary build for some 'external' libraries
1387 Some libraries can save their build result in a tarball
1388 stored in TARFILE_LOCATION. that binary tarball is
1389 uniquely identified by the source tarbal,
1390 the content of the config_host.mk file and the content
1391 of the top-level directory in core for that library
1392 If this option is enabled, then if such a tarfile exist, it will be untarred
1393 isntead of the source tarfile, and the build step will be skipped for that
1395 If a proper tarfile does not exist, then the normal source-based
1396 build is done for taht library and a proper binary tarfile is created
1397 for the next time.]),
1401 AS_HELP_STRING([--disable-gltf],
1402 [Determines whether to build libraries related to glTF 3D model rendering.]))
1404 AC_ARG_ENABLE(collada,
1405 AS_HELP_STRING([--disable-collada],
1406 [Disable collada support (Rendering 3D models stored in *.dae and *.kmz format).]))
1408 dnl ===================================================================
1409 dnl Optional Packages (--with/without-)
1410 dnl ===================================================================
1412 AC_ARG_WITH(gnu-patch,
1413 AS_HELP_STRING([--with-gnu-patch],
1414 [Specify location of GNU patch on Solaris or FreeBSD.]),
1417 AC_ARG_WITH(build-platform-configure-options,
1418 [Specify options for the configure script run for the *build* platform in a cross-compilation])
1421 AS_HELP_STRING([--with-gnu-cp],
1422 [Specify location of GNU cp on Solaris or FreeBSD.]),
1425 AC_ARG_WITH(external-tar,
1426 AS_HELP_STRING([--with-external-tar=<TARFILE_PATH>],
1427 [Specify an absolute path of where to find (and store) tarfiles.]),
1428 TARFILE_LOCATION=$withval ,
1431 AC_ARG_WITH(referenced-git,
1432 AS_HELP_STRING([--with-referenced-git=<OTHER_CHECKOUT_DIR>],
1433 [Specify another checkout directory to reference. This makes use of
1434 git submodule update --reference, and saves a lot of diskspace
1435 when having multiple trees side-by-side.]),
1436 GIT_REFERENCE_SRC=$withval ,
1439 AC_ARG_WITH(linked-git,
1440 AS_HELP_STRING([--with-linked-git=<submodules repo basedir>],
1441 [Specify a directory where the repositories of submodules are located.
1442 This uses a method similar to git-new-workdir to get submodules.]),
1443 GIT_LINK_SRC=$withval ,
1446 AC_ARG_WITH(galleries,
1447 AS_HELP_STRING([--with-galleries],
1448 [Specify how galleries should be built. It is possible either to
1449 build these internally from source ("build"),
1450 or to disable them ("no")]),
1454 AS_HELP_STRING([--with-theme="theme1 theme2..."],
1455 [Choose which themes to include. By default those themes with an '*' are included.
1456 Possible choices: *crystal, *default (galaxy), *hicontrast, human, industrial, *oxygen, *sifr, *tango, *tango_testing.]),
1459 AC_ARG_WITH(helppack-integration,
1461 --without-helppack-integration It will not integrate the helppacks to the installer
1463 Please use this switch to use the online help or separate help packages.],
1467 AS_HELP_STRING([--without-fonts],
1468 [LibreOffice includes some third-party fonts to provide a reliable basis for
1469 help content, templates, samples, etc. When these fonts are already
1470 known to be available on the system then you should use this option.]),
1474 AS_HELP_STRING([--without-ppds],
1475 [Removes Postscript Printer definition files from LibreOffice
1476 installation set, for people building for specific distributions where
1477 PPDs are known to be already available (every recent distro with CUPS backend).]),
1481 AS_HELP_STRING([--with-epm],
1482 [Decides which epm to use. Default is to use the one from the system if
1483 one is built. When either this is not there or you say =internal epm
1487 AC_ARG_WITH(package-format,
1488 AS_HELP_STRING([--with-package-format],
1489 [Specify package format(s) for LibreOffice installation sets. The
1490 implicit --without-package-format leads to no installation sets being
1491 generated. Possible values: aix, archive, bsd, deb, dmg,
1492 installed, msi, native, pkg, portable, and rpm.
1493 Example: --with-package-format='deb rpm']),
1497 AS_HELP_STRING([--with-tls],
1498 [Decides which TLS/SSL and cryptographic implementations to use for
1499 LibreOffice's code. Notice that this doesn't apply for depending
1500 libraries like "neon", for example. Default is to use OpenSSL
1501 although NSS is also possible. Notice that selecting NSS restricts
1502 the usage of OpenSSL in LO's code but selecting OpenSSL doesn't
1503 restrict by now the usage of NSS in LO's code. Possible values:
1504 openssl, nss. Example: --with-tls="nss"]),
1507 AC_ARG_WITH(system-libs,
1508 AS_HELP_STRING([--with-system-libs],
1509 [Use libraries already on system -- enables all --with-system-* flags.]),
1512 AC_ARG_WITH(system-headers,
1513 AS_HELP_STRING([--with-system-headers],
1514 [Use headers already on system -- enables all --with-system-* flags for
1515 external packages whose headers are the only entities used i.e.
1516 boost/vigra/odbc/sane-header(s).]),,
1517 [with_system_headers="$with_system_libs"])
1519 AC_ARG_WITH(system-jars,
1520 AS_HELP_STRING([--without-system-jars],
1521 [When building with --with-system-libs, also the needed jars are expected
1522 on the system. Use this to disable that]),,
1523 [with_system_jars="$with_system_libs"])
1525 AC_ARG_WITH(system-cairo,
1526 AS_HELP_STRING([--with-system-cairo],
1527 [Use cairo libraries already on system. Happens automatically for
1528 (implicit) --enable-gtk and for --enable-gtk3.]))
1530 AC_ARG_WITH(myspell-dicts,
1531 AS_HELP_STRING([--with-myspell-dicts],
1532 [Adds myspell dictionaries to the LibreOffice installation set]),
1535 AC_ARG_WITH(system-dicts,
1536 AS_HELP_STRING([--without-system-dicts],
1537 [Do not use dictionaries from system paths.]),
1540 AC_ARG_WITH(external-dict-dir,
1541 AS_HELP_STRING([--with-external-dict-dir],
1542 [Specify external dictionary dir.]),
1545 AC_ARG_WITH(external-hyph-dir,
1546 AS_HELP_STRING([--with-external-hyph-dir],
1547 [Specify external hyphenation pattern dir.]),
1550 AC_ARG_WITH(external-thes-dir,
1551 AS_HELP_STRING([--with-external-thes-dir],
1552 [Specify external thesaurus dir.]),
1555 AC_ARG_WITH(system-zlib,
1556 AS_HELP_STRING([--with-system-zlib],
1557 [Use zlib already on system.]),,
1558 [with_system_zlib=auto])
1560 AC_ARG_WITH(system-jpeg,
1561 AS_HELP_STRING([--with-system-jpeg],
1562 [Use jpeg already on system.]),,
1563 [with_system_jpeg="$with_system_libs"])
1565 AC_ARG_WITH(system-libgltf,
1566 AS_HELP_STRING([--with-system-libgltf],
1567 [Use libgltf already on system.]),,
1568 [with_system_libgltf=auto])
1570 AC_ARG_WITH(system-clucene,
1571 AS_HELP_STRING([--with-system-clucene],
1572 [Use clucene already on system.]),,
1573 [with_system_clucene="$with_system_libs"])
1575 AC_ARG_WITH(system-expat,
1576 AS_HELP_STRING([--with-system-expat],
1577 [Use expat already on system.]),,
1578 [with_system_expat="$with_system_libs"])
1580 AC_ARG_WITH(system-libxml,
1581 AS_HELP_STRING([--with-system-libxml],
1582 [Use libxml/libxslt already on system.]),,
1583 [with_system_libxml=auto])
1585 AC_ARG_WITH(system-icu,
1586 AS_HELP_STRING([--with-system-icu],
1587 [Use icu already on system.]),,
1588 [with_system_icu="$with_system_libs"])
1590 AC_ARG_WITH(system-ucpp,
1591 AS_HELP_STRING([--with-system-ucpp],
1592 [Use ucpp already on system.]),,
1595 AC_ARG_WITH(system-openldap,
1596 AS_HELP_STRING([--with-system-openldap],
1597 [Use the OpenLDAP LDAP SDK already on system.]),,
1598 [with_system_openldap="$with_system_libs"])
1600 AC_ARG_WITH(system-poppler,
1601 AS_HELP_STRING([--with-system-poppler],
1602 [Use system poppler (only needed for PDF import).]),,
1603 [with_system_poppler="$with_system_libs"])
1605 AC_ARG_WITH(system-apache-commons,
1606 AS_HELP_STRING([--with-system-apache-commons],
1607 [Use Apache commons libraries already on system.]),,
1608 [with_system_apache_commons="$with_system_jars"])
1610 AC_ARG_WITH(system-mariadb,
1611 AS_HELP_STRING([--with-system-mariadb],
1612 [Use MariaDB/MySQL libraries already on system, for building the MariaDB Connector/LibreOffice
1614 [with_system_mariadb="$with_system_libs"])
1616 AC_ARG_ENABLE(bundle-mariadb,
1617 AS_HELP_STRING([--enable-bundle-mariadb],
1618 [When using MariaDB/MySQL libraries already on system, bundle them with the MariaDB Connector/LibreOffice extension.])
1621 AC_ARG_WITH(system-mysql-cppconn,
1622 AS_HELP_STRING([--with-system-mysql-cppconn],
1623 [Use MySQL C++ Connector libraries already on system.]),,
1624 [with_system_mysql_cppconn="$with_system_libs"])
1626 AC_ARG_WITH(system-postgresql,
1627 AS_HELP_STRING([--with-system-postgresql],
1628 [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC
1629 driver. If pg_config is not in PATH, use PGCONFIG to point to it.]),,
1630 [with_system_postgresql="$with_system_libs"])
1632 AC_ARG_WITH(libpq-path,
1633 AS_HELP_STRING([--with-libpq-path],
1634 [Use this PostgreSQL C interface (libpq) installation for building
1635 the PostgreSQL-SDBC extension.])
1637 Usage: --with-libpq-path=<absolute path to
1638 your libpq installation>
1642 AC_ARG_WITH(system-firebird,
1643 AS_HELP_STRING([--with-system-firebird],
1644 [Use Firebird libraries already on system, for building the Firebird-SDBC
1645 driver. If fb_config is not in PATH, use FBCONFIG to point to it.]),,
1646 [with_system_firebird="$with_system_libs"])
1648 AC_ARG_WITH(system-hsqldb,
1649 AS_HELP_STRING([--with-system-hsqldb],
1650 [Use hsqldb already on system.]))
1652 AC_ARG_WITH(hsqldb-jar,
1653 AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
1654 [Specify path to jarfile manually.]),
1655 HSQLDB_JAR=$withval)
1657 AC_ARG_ENABLE(scripting-beanshell,
1658 AS_HELP_STRING([--disable-scripting-beanshell],
1659 [Disable support for scripts in BeanShell.]),
1663 AC_ARG_WITH(system-beanshell,
1664 AS_HELP_STRING([--with-system-beanshell],
1665 [Use beanshell already on system.]),,
1666 [with_system_beanshell="$with_system_jars"])
1668 AC_ARG_WITH(beanshell-jar,
1669 AS_HELP_STRING([--with-beanshell-jar=JARFILE],
1670 [Specify path to jarfile manually.]),
1673 AC_ARG_ENABLE(scripting-javascript,
1674 AS_HELP_STRING([--disable-scripting-javascript],
1675 [Disable support for scripts in JavaScript.]),
1679 AC_ARG_WITH(system-rhino,
1680 AS_HELP_STRING([--with-system-rhino],
1681 [Use rhino already on system.]),,)
1682 # [with_system_rhino="$with_system_jars"])
1683 # Above is not used as we have different debug interface
1684 # patched into internal rhino. This code needs to be fixed
1685 # before we can enable it by default.
1687 AC_ARG_WITH(rhino-jar,
1688 AS_HELP_STRING([--with-rhino-jar=JARFILE],
1689 [Specify path to jarfile manually.]),
1692 AC_ARG_WITH(commons-codec-jar,
1693 AS_HELP_STRING([--with-commons-codec-jar=JARFILE],
1694 [Specify path to jarfile manually.]),
1695 COMMONS_CODEC_JAR=$withval)
1697 AC_ARG_WITH(commons-lang-jar,
1698 AS_HELP_STRING([--with-commons-lang-jar=JARFILE],
1699 [Specify path to jarfile manually.]),
1700 COMMONS_LANG_JAR=$withval)
1702 AC_ARG_WITH(commons-httpclient-jar,
1703 AS_HELP_STRING([--with-commons-httpclient-jar=JARFILE],
1704 [Specify path to jarfile manually.]),
1705 COMMONS_HTTPCLIENT_JAR=$withval)
1707 AC_ARG_WITH(commons-logging-jar,
1708 AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
1709 [Specify path to jarfile manually.]),
1710 COMMONS_LOGGING_JAR=$withval)
1712 AC_ARG_WITH(system-jfreereport,
1713 AS_HELP_STRING([--with-system-jfreereport],
1714 [Use JFreeReport already on system.]),,
1715 [with_system_jfreereport="$with_system_jars"])
1717 AC_ARG_WITH(sac-jar,
1718 AS_HELP_STRING([--with-sac-jar=JARFILE],
1719 [Specify path to jarfile manually.]),
1722 AC_ARG_WITH(libxml-jar,
1723 AS_HELP_STRING([--with-libxml-jar=JARFILE],
1724 [Specify path to jarfile manually.]),
1725 LIBXML_JAR=$withval)
1727 AC_ARG_WITH(flute-jar,
1728 AS_HELP_STRING([--with-flute-jar=JARFILE],
1729 [Specify path to jarfile manually.]),
1732 AC_ARG_WITH(jfreereport-jar,
1733 AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
1734 [Specify path to jarfile manually.]),
1735 JFREEREPORT_JAR=$withval)
1737 AC_ARG_WITH(liblayout-jar,
1738 AS_HELP_STRING([--with-liblayout-jar=JARFILE],
1739 [Specify path to jarfile manually.]),
1740 LIBLAYOUT_JAR=$withval)
1742 AC_ARG_WITH(libloader-jar,
1743 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1744 [Specify path to jarfile manually.]),
1745 LIBLOADER_JAR=$withval)
1747 AC_ARG_WITH(libloader-jar,
1748 AS_HELP_STRING([--with-libloader-jar=JARFILE],
1749 [Specify path to jarfile manually.]),
1750 LIBLOADER_JAR=$withval)
1752 AC_ARG_WITH(libformula-jar,
1753 AS_HELP_STRING([--with-libformula-jar=JARFILE],
1754 [Specify path to jarfile manually.]),
1755 LIBFORMULA_JAR=$withval)
1757 AC_ARG_WITH(librepository-jar,
1758 AS_HELP_STRING([--with-librepository-jar=JARFILE],
1759 [Specify path to jarfile manually.]),
1760 LIBREPOSITORY_JAR=$withval)
1762 AC_ARG_WITH(libfonts-jar,
1763 AS_HELP_STRING([--with-libfonts-jar=JARFILE],
1764 [Specify path to jarfile manually.]),
1765 LIBFONTS_JAR=$withval)
1767 AC_ARG_WITH(libserializer-jar,
1768 AS_HELP_STRING([--with-libserializer-jar=JARFILE],
1769 [Specify path to jarfile manually.]),
1770 LIBSERIALIZER_JAR=$withval)
1772 AC_ARG_WITH(libbase-jar,
1773 AS_HELP_STRING([--with-libbase-jar=JARFILE],
1774 [Specify path to jarfile manually.]),
1775 LIBBASE_JAR=$withval)
1777 AC_ARG_WITH(system-odbc,
1778 AS_HELP_STRING([--with-system-odbc],
1779 [Use the odbc headers already on system.]),,
1780 [with_system_odbc="$with_system_headers"])
1782 AC_ARG_WITH(system-sane,
1783 AS_HELP_STRING([--with-system-sane],
1784 [Use sane.h already on system.]),,
1785 [with_system_sane="$with_system_headers"])
1787 AC_ARG_WITH(system-bluez,
1788 AS_HELP_STRING([--with-system-bluez],
1789 [Use bluetooth.h already on system.]),,
1790 [with_system_bluez="$with_system_headers"])
1792 AC_ARG_WITH(system-mesa-headers,
1793 AS_HELP_STRING([--with-system-mesa-headers],
1794 [Use Mesa headers already on system.]),,
1795 [with_system_mesa_headers="$with_system_headers"])
1797 AC_ARG_WITH(system-curl,
1798 AS_HELP_STRING([--with-system-curl],
1799 [Use curl already on system.]),,
1800 [with_system_curl=auto])
1802 AC_ARG_WITH(system-boost,
1803 AS_HELP_STRING([--with-system-boost],
1804 [Use boost already on system.]),,
1805 [with_system_boost="$with_system_headers"])
1807 AC_ARG_WITH(system-glm,
1808 AS_HELP_STRING([--with-system-glm],
1809 [Use glm already on system.]),,
1810 [with_system_glm="$with_system_headers"])
1812 AC_ARG_WITH(system-vigra,
1813 AS_HELP_STRING([--with-system-vigra],
1814 [Use vigra already on system.]),,
1815 [with_system_vigra="$with_system_headers"])
1817 AC_ARG_WITH(system-hunspell,
1818 AS_HELP_STRING([--with-system-hunspell],
1819 [Use libhunspell already on system.]),,
1820 [with_system_hunspell="$with_system_libs"])
1822 AC_ARG_WITH(system-mythes,
1823 AS_HELP_STRING([--with-system-mythes],
1824 [Use mythes already on system.]),,
1825 [with_system_mythes="$with_system_libs"])
1827 AC_ARG_WITH(system-altlinuxhyph,
1828 AS_HELP_STRING([--with-system-altlinuxhyph],
1829 [Use ALTLinuxhyph already on system.]),,
1830 [with_system_altlinuxhyph="$with_system_libs"])
1832 AC_ARG_WITH(system-lpsolve,
1833 AS_HELP_STRING([--with-system-lpsolve],
1834 [Use lpsolve already on system.]),,
1835 [with_system_lpsolve="$with_system_libs"])
1837 AC_ARG_WITH(system-liblangtag,
1838 AS_HELP_STRING([--with-system-liblangtag],
1839 [Use liblangtag library already on system.]),,
1840 [with_system_liblangtag="$with_system_libs"])
1842 AC_ARG_WITH(system-npapi-headers,
1843 AS_HELP_STRING([--with-system-npapi-headers],
1844 [Use NPAPI headers provided by system instead of bundled ones. Used in
1845 extensions/source/nsplugin (ENABLE_NPAPI_INTO_BROWSER=TRUE) and
1846 extensions/source/plugin (ENABLE_NPAPI_FROM_BROWSER=TRUE)]),,
1847 [with_system_npapi_headers="$with_system_headers"]
1851 AS_HELP_STRING([--with-webdav],
1852 [Specify which library to use for webdav implementation.
1853 Possible values: "neon", "serf", "no". The default value is "neon".
1854 Example: --with-webdav="serf"]),
1855 WITH_WEBDAV=$withval,
1858 AC_ARG_WITH(linker-hash-style,
1859 AS_HELP_STRING([--with-linker-hash-style],
1860 [Use linker with --hash-style=<style> when linking shared objects.
1861 Possible values: "sysv", "gnu", "both". The default value is "gnu"
1862 if supported on the build system, and "sysv" otherwise.]))
1864 AC_ARG_WITH(jdk-home,
1865 AS_HELP_STRING([--with-jdk-home],
1866 [If you have installed JDK 1.3 or later on your system please supply the
1867 path here. Note that this is not the location of the java command but the
1868 location of the entire distribution.])
1870 Usage: --with-jdk-home=<absolute path to JDK home>
1875 AS_HELP_STRING([--with-help],
1876 [Enable the build of help. There is a special parameter "common" that
1877 can be used to bundle only the common part, .e.g help-specific icons.
1878 This is useful when you build the helpcontent separately.])
1880 Usage: --with-help build the entire local help
1881 --without-help no local help (default)
1882 --with-help=common bundle common files for the local
1883 help but do not build the whole help
1888 AS_HELP_STRING([--with-java],
1889 [Specify the name of the Java interpreter command. Typically "java"
1890 which is the default.
1892 To build without support for Java components, applets, accessibility
1893 or the XML filters written in Java, use --without-java or --with-java=no.])
1895 Usage: --with-java==<java command>
1898 [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
1902 AC_ARG_WITH(jvm-path,
1903 AS_HELP_STRING([--with-jvm-path],
1904 [Use a specific JVM search path at runtime.])
1906 Usage: --with-jvm-path=<absolute path to parent of jvm home>
1908 e. g.: --with-jvm-path=/usr/lib/
1909 to find JRE/JDK in /usr/lib/jvm/
1913 AC_ARG_WITH(ant-home,
1914 AS_HELP_STRING([--with-ant-home],
1915 [If you have installed Jakarta Ant on your system, please supply the path here.
1916 Note that this is not the location of the Ant binary but the location
1917 of the entire distribution.])
1919 Usage: --with-ant-home=<absolute path to Ant home>
1923 AC_ARG_WITH(export-validation,
1924 AS_HELP_STRING([--with-export-validation],
1925 [If you want the exported files to be validated. Right now limited to OOXML files in calc export tests.
1926 Note: You need an executable script officeotron that takes the path to the file.])
1928 Usage: --with-export-validation
1933 AS_HELP_STRING([--with-junit],
1934 [Specifies the JUnit 4 jar file to use for JUnit-based tests.
1935 --without-junit disables those tests. Not relevant in the --without-java case.])
1937 Usage: --with-junit=<absolute path to JUnit 4 jar>
1941 AC_ARG_WITH(perl-home,
1942 AS_HELP_STRING([--with-perl-home],
1943 [If you have installed Perl 5 Distribution, on your system, please
1944 supply the path here. Note that this is not the location of the Perl
1945 binary but the location of the entire distribution.])
1947 Usage: --with-perl-home=<abs. path to Perl 5 home>
1955 [Specifies the doxygen executable to use when generating ODK C/C++
1956 documentation. --without-doxygen disables generation of ODK C/C++
1957 documentation. Not relevant in the --disable-odk case.])
1959 Usage: --with-doxygen=<absolute path to doxygen executable>
1963 AC_ARG_WITH(visual-studio,
1964 AS_HELP_STRING([--with-visual-studio=<2012/2010/2013>],
1965 [Specify which Visual Studio version to use in case several are
1966 are installed. If not specified, the order of preference is
1967 2012, 2010, 2013 (including Express editions).])
1969 Usage: --with-visual-studio=<2012/2010/2013>
1973 AC_ARG_WITH(windows-sdk,
1974 AS_HELP_STRING([--with-windows-sdk=<6.0(A)/7.0(A)/7.1(A)/8.0(A)>],
1975 [Specify which Windows SDK, or "Windows Kit", version to use
1976 in case the one that came with the selected Visual Studio
1977 is not what you want for some reason. Note that not all compiler/SDK
1978 combinations are supported. The intent is that this option should not
1981 Usage: --with-windows-sdk=6.0(A)/7.0(A)/7.1(A)/8.0(A)>
1986 AS_HELP_STRING([--with-lang],
1987 [Use this option to build LibreOffice with additional UI language support.
1988 English (US) is always included by default.
1989 Separate multiple languages with space.
1990 For all languages, use --with-lang=ALL.])
1992 Usage: --with-lang="es sw tu cs sk"
1996 AC_ARG_WITH(locales,
1997 AS_HELP_STRING([--with-locales],
1998 [Use this option to limit the locale information built in.
1999 Separate multiple locales with space.
2000 Very experimental and might well break stuff.
2001 Just a desperate measure to shrink code and data size.
2002 By default all the locales available is included.
2003 This option is completely unrelated to --with-lang.])
2005 Affects also our character encoding conversion
2006 tables for encodings mainly targeted for a
2007 particular locale, like EUC-CN and EUC-TW for
2008 zh, ISO-2022-JP for ja.
2010 Affects also our add-on break iterator data for
2013 For the default, all locales, don't use this switch at all.
2014 Specifying just the language part of a locale means all matching
2015 locales will be included.
2017 Usage: --with-locales="en es pt fr zh kr ja"
2021 # Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
2023 AS_HELP_STRING([--with-krb5],
2024 [Enable MIT Kerberos 5 support in modules that support it.
2025 By default automatically enabled on platforms
2026 where a good system Kerberos 5 is available.]),
2030 AS_HELP_STRING([--with-gssapi],
2031 [Enable GSSAPI support in modules that support it.
2032 By default automatically enabled on platforms
2033 where a good system GSSAPI is available.]),
2036 dnl ===================================================================
2038 dnl ===================================================================
2040 AC_ARG_WITH(branding,
2041 AS_HELP_STRING([--with-branding],
2042 [Use given path to retrieve branding images set.])
2044 Search for intro.png about.svg and flat_logo.svg.
2045 If any is missing, default ones will be used instead.
2047 Search also progress.conf for progress
2048 settings on intro screen :
2050 PROGRESSBARCOLOR="255,255,255" Set color of
2051 progress bar. Comma separated RGB decimal values.
2052 PROGRESSSIZE="407,6" Set size of progress bar.
2053 Comma separated decimal values (width, height).
2054 PROGRESSPOSITION="61,317" Set position of progress
2055 bar from left,top. Comma separated decimal values.
2056 PROGRESSFRAMECOLOR="20,136,3" Set color of progress
2057 bar frame. Comma separated RGB decimal values.
2058 PROGRESSTEXTCOLOR="255,255,255" Set color of progress
2059 bar text. Comma separated RGB decimal values.
2060 PROGRESSTEXTBASELINE="287" Set vertical position of
2061 progress bar text from top. Decimal value.
2063 Default values will be used if not found.
2065 Usage: --with-branding=/path/to/images
2070 AC_ARG_WITH(extra-buildid,
2071 AS_HELP_STRING([--with-extra-buildid],
2072 [Show addition build identification in about dialog.])
2074 Usage: --with-extra-buildid="Tinderbox: Win-x86@6, Branch:master, Date:2012-11-26_00.29.34"
2080 AS_HELP_STRING([--with-vendor],
2081 [Set vendor of the build.])
2083 Usage: --with-vendor="John the Builder"
2087 AC_ARG_WITH(compat-oowrappers,
2088 AS_HELP_STRING([--with-compat-oowrappers],
2089 [Install oo* wrappers in parallel with
2090 lo* ones to keep backward compatibility.
2091 Has effect only with make distro-pack-install]),
2094 AC_ARG_WITH(os-version,
2095 AS_HELP_STRING([--with-os-version],
2096 [For FreeBSD users, use this option option to override the detected OSVERSION.])
2098 Usage: --with-os-version=<OSVERSION>
2102 AC_ARG_WITH(mingw-cross-compiler,
2103 AS_HELP_STRING([--with-mingw-cross-compiler],
2104 [Specify the MinGW cross-compiler to use.])
2106 Usage: --with-mingw-cross-compiler=<mingw32-g++ command>
2108 When building on the ODK on Unix and building unowinreg.dll,
2109 specify the MinGW C++ cross-compiler.
2113 AC_ARG_WITH(idlc-cpp,
2114 AS_HELP_STRING([--with-idlc-cpp],
2115 [Specify the C Preprocessor to use for idlc.])
2117 Usage: --with-idlc-cpp=cpp
2123 AC_ARG_WITH(build-version,
2124 AS_HELP_STRING([--with-build-version],
2125 [Allows the builder to add a custom version tag that will appear in the
2126 Help/About box for QA purposes.])
2128 Usage: --with-build-version="Built by Jim"
2130 with_build_version=$withval ,
2134 AS_HELP_STRING([--with-alloc],
2135 [Define which allocator to build with (choices are oo, system, tcmalloc, jemalloc).
2136 Note that on FreeBSD/NetBSD system==jemalloc]),
2139 AC_ARG_WITH(sun-templates,
2140 AS_HELP_STRING([--with-sun-templates],
2141 [Integrate Sun template packages.]),
2144 AC_ARG_WITH(parallelism,
2145 AS_HELP_STRING([--with-parallelism],
2146 [Number of jobs to run simultaneously during build. Parallel builds can
2147 save a lot of time on multi-cpu machines. Defaults to the number of
2148 CPUs on the machine, unless you configure --enable-icecream - then to
2152 AC_ARG_WITH(all-tarballs,
2153 AS_HELP_STRING([--with-all-tarballs],
2154 [Download all external tarballs unconditionally]))
2156 AC_ARG_WITH(gdrive-client-id,
2157 AS_HELP_STRING([--with-gdrive-client-id],
2158 [Provides the client id of the application for OAuth2 authentication
2159 on Google Drive. If either this or --with-gdrive-client-secret is
2160 empty, the feature will be disabled]),
2163 AC_ARG_WITH(gdrive-client-secret,
2164 AS_HELP_STRING([--with-gdrive-client-secret],
2165 [Provides the client secret of the application for OAuth2
2166 authentication on Google Drive. If either this or
2167 --with-gdrive-client-id is empty, the feature will be disabled]),
2170 AC_ARG_WITH(alfresco-cloud-client-id,
2171 AS_HELP_STRING([--with-alfresco-cloud-client-id],
2172 [Provides the client id of the application for OAuth2 authentication
2173 on Alfresco Cloud. If either this or --with-alfresco-cloud-client-secret is
2174 empty, the feature will be disabled]),
2177 AC_ARG_WITH(alfresco-cloud-client-secret,
2178 AS_HELP_STRING([--with-alfresco-cloud-client-secret],
2179 [Provides the client secret of the application for OAuth2
2180 authentication on Alfresco Cloud. If either this or
2181 --with-alfresco-cloud-client-id is empty, the feature will be disabled]),
2184 dnl ===================================================================
2185 dnl Do we want to use pre-build binary tarball for recompile
2186 dnl ===================================================================
2188 if test "$enable_library_bin_tar" = "yes" ; then
2189 USE_LIBRARY_BIN_TAR=TRUE
2191 USE_LIBRARY_BIN_TAR=
2193 AC_SUBST(USE_LIBRARY_BIN_TAR)
2195 dnl ===================================================================
2196 dnl Test whether build target is Release Build
2197 dnl ===================================================================
2198 AC_MSG_CHECKING([whether build target is Release Build])
2199 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
2201 ENABLE_RELEASE_BUILD=
2203 AC_MSG_RESULT([yes])
2204 ENABLE_RELEASE_BUILD=TRUE
2206 AC_SUBST(ENABLE_RELEASE_BUILD)
2208 dnl ===================================================================
2209 dnl Test whether to sign Windows Build
2210 dnl ===================================================================
2211 AC_MSG_CHECKING([whether to sign windows build])
2212 if test "$enable_windows_build_signing" = "yes" -a "$_os" = "WINNT" -a "$WITH_MINGW" != "YES" ; then
2213 AC_MSG_RESULT([yes])
2214 WINDOWS_BUILD_SIGNING="TRUE"
2217 WINDOWS_BUILD_SIGNING="FALSE"
2219 AC_SUBST(WINDOWS_BUILD_SIGNING)
2221 dnl ===================================================================
2222 dnl MacOSX build and runtime environment options
2223 dnl ===================================================================
2225 AC_ARG_WITH(macosx-sdk,
2226 AS_HELP_STRING([--with-macosx-sdk],
2227 [Use a specific SDK for building.])
2229 Usage: --with-macosx-sdk=<version>
2231 e. g.: --with-macosx-sdk=10.6
2233 there are 3 options to control the MacOSX build:
2234 --with-macosx-sdk (refered as 'sdk' below)
2235 --with-macosx-version-min-required (refered as 'min' below)
2236 --with-macosx-version-max-allowed (refered as 'max' below)
2238 the connection between these value and the default they take is as follow:
2239 ( ? means not specified on the command line, s means the SDK version found,
2240 constraint: x <= y <= z)
2242 ==========================================
2243 command line || config result
2244 ==========================================
2245 min | max | sdk || min | max | sdk |
2246 ? | ? | ? || 10.6 | 10.s | 10.s |
2247 ? | ? | 10.x || 10.6 | 10.x | 10.x |
2248 ? | 10.x | ? || 10.6 | 10.s | 10.s |
2249 ? | 10.x | 10.y || 10.6 | 10.x | 10.y |
2250 10.x | ? | ? || 10.x | 10.s | 10.s |
2251 10.x | ? | 10.y || 10.x | 10.y | 10.y |
2252 10.x | 10.y | ? || 10.x | 10.y | 10.y |
2253 10.x | 10.y | 10.z || 10.x | 10.y | 10.z |
2256 see: http://developer.apple.com/library/mac/#technotes/tn2064/_index.html
2257 for a detailled technical explanation of these variables
2259 Note: MACOSX_DEPLOYMENT_TARGET will be set to the value of 'min'.
2261 Note that even if in theory using a --with-macosx-version-max-allowed
2262 (i.e. the MAC_OS_X_VERSION_MAX_ALLOWED macro) less than the SDK version
2263 should work, in practice Apple doesn't seem to test that, and at least
2264 compiling with -DMAC_OS_X_VERSION_MAX_ALLOWED=1060 against the 10.7 SDK
2265 fails in a couple of places. Just because of oversights in ifdefs in the SDK
2270 AC_ARG_WITH(macosx-version-min-required,
2271 AS_HELP_STRING([--with-macosx-version-min-required],
2272 [set the minimum OS version needed to run the built LibreOffice])
2274 Usage: --with-macosx-version-min-required=<version>
2276 e. g.: --with-macos-version-min-required=10.6
2277 see --with-macosx-sdk for more info
2281 AC_ARG_WITH(macosx-version-max-allowed,
2282 AS_HELP_STRING([--with-macosx-version-max-allowed],
2283 [set the maximum allowed OS version the LibreOffice compilation can use APIs from])
2285 Usage: --with-macosx-version-max-allowed=<version>
2287 e. g.: --with-macos-version-max-allowed=10.6
2288 see --with-macosx-sdk for more info
2293 dnl ===================================================================
2294 dnl options for stuff used during cross-compilation build
2295 dnl These are superseded by --with-build-platform-configure-options.
2296 dnl Or are they? Look for the complicated tests for "$cross_compiling" = "yes" -a \(
2297 dnl "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \)
2298 dnl far below. Could whoever understands MinGW cross-compilation clean up this please.
2299 dnl ===================================================================
2301 AC_ARG_WITH(system-boost-for-build,
2302 AS_HELP_STRING([--with-system-boost-for-build],
2303 [Use boost already on system for build tools (cross-compilation only).]))
2305 AC_ARG_WITH(system-cppunit-for-build,
2306 AS_HELP_STRING([--with-system-cppunit-for-build],
2307 [Use cppunit already on system for build tools (cross-compilation only).]))
2309 AC_ARG_WITH(system-expat-for-build,
2310 AS_HELP_STRING([--with-system-expat-for-build],
2311 [Use expat already on system for build tools (cross-compilation only).]))
2313 AC_ARG_WITH(system-icu-for-build,
2314 AS_HELP_STRING([--with-system-icu-for-build=yes/no/force],
2315 [Use icu already on system for build tools (cross-compilation only).]))
2317 AC_ARG_WITH(system-libxml-for-build,
2318 AS_HELP_STRING([--with-system-libxml-for-build],
2319 [Use libxml/libxslt already on system for build tools (cross-compilation only).]))
2322 dnl ===================================================================
2323 dnl check for required programs (grep, awk, sed, bash)
2324 dnl ===================================================================
2328 if test -n "$1"; then
2329 if test "$build_os" = "cygwin"; then
2331 new_path=`cygpath -u "$formatted_path"`
2335 if ! echo "$LO_PATH" | $EGREP -q "(^|:)$1($|:)"; then
2336 if test "$2" = "after"; then
2337 LO_PATH="$LO_PATH:$new_path"
2339 LO_PATH="$new_path:$LO_PATH"
2347 AC_PATH_PROG( AWK, $AWK)
2348 if test -z "$AWK"; then
2349 AC_MSG_ERROR([install awk to run this script])
2352 AC_PATH_PROG(BASH, bash)
2353 if test -z "$BASH"; then
2354 AC_MSG_ERROR([bash not found in \$PATH])
2358 AC_MSG_CHECKING([for GNU or BSD tar])
2359 for a in $GNUTAR gtar gnutar tar /usr/sfw/bin/gtar; do
2360 $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
2361 if test $? -eq 0; then
2366 AC_MSG_RESULT($GNUTAR)
2367 if test -z "$GNUTAR"; then
2368 AC_MSG_ERROR([not found. install GNU or BSD tar.])
2372 AC_MSG_CHECKING([for tar's option to strip components])
2373 $GNUTAR --help 2> /dev/null | egrep "bsdtar|strip-components" 2>&1 >/dev/null
2374 if test $? -eq 0; then
2375 STRIP_COMPONENTS="--strip-components"
2377 $GNUTAR --help 2> /dev/null | egrep "strip-path" 2>&1 >/dev/null
2378 if test $? -eq 0; then
2379 STRIP_COMPONENTS="--strip-path"
2381 STRIP_COMPONENTS="unsupported"
2384 AC_MSG_RESULT($STRIP_COMPONENTS)
2385 if test x$STRIP_COMPONENTS = xunsupported; then
2386 AC_MSG_ERROR([you need a tar that is able to strip components.])
2388 AC_SUBST(STRIP_COMPONENTS)
2390 dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
2391 dnl desktop OSes from "mobile" ones.
2393 dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
2394 dnl In other words, that when building for an OS that is not a
2395 dnl "desktop" one but a "mobile" one, we are always cross-compiling.
2397 dnl Note the direction of the implication; there is no assumption that
2398 dnl cross-compiling would imply a non-desktop OS.
2400 if test $_os != iOS -a $_os != Android; then
2401 BUILD_TYPE="$BUILD_TYPE DESKTOP"
2402 AC_DEFINE(HAVE_FEATURE_DESKTOP)
2403 AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
2407 if test "$enable_export" != no; then
2408 BUILD_TYPE="$BUILD_TYPE EXPORT"
2410 DISABLE_EXPORT='TRUE'
2411 SCPDEFS="$SCPDES -DDISABLE_EXPORT"
2413 AC_SUBST(DISABLE_EXPORT)
2415 # Whether to build "avmedia" functionality or not.
2416 # We probably don't want it for non-desktop.
2418 if test -z "$enable_avmedia"; then
2419 if test $_os != iOS -a $_os != Android; then
2424 if test "$enable_avmedia" = yes; then
2425 BUILD_TYPE="$BUILD_TYPE AVMEDIA"
2426 AC_DEFINE(HAVE_FEATURE_AVMEDIA)
2428 SCPDEFS="$SCPDEFS -DDISABLE_AVMEDIA"
2431 # Decide whether to build database connectivity stuff (including
2432 # Base) or not. We probably don't want to on non-desktop OSes.
2434 if test -z "$enable_database_connectivity"; then
2435 # --disable-database-connectivity is unfinished work in progress
2436 # and the iOS test app doesn't link if we actually try to use it.
2437 # if test $_os != iOS -a $_os != Android; then
2438 enable_database_connectivity=yes
2442 if test "$enable_database_connectivity" = yes; then
2443 BUILD_TYPE="$BUILD_TYPE DBCONNECTIVITY"
2444 AC_DEFINE(HAVE_FEATURE_DBCONNECTIVITY)
2447 if test -z "$enable_extensions"; then
2448 # For iOS and Android disable extensions unless specifically overridden with --enable-extensions.
2449 if test $_os != iOS -a $_os != Android; then
2450 enable_extensions=yes
2454 if test "$enable_extensions" = yes; then
2455 BUILD_TYPE="$BUILD_TYPE EXTENSIONS"
2456 AC_DEFINE(HAVE_FEATURE_EXTENSIONS)
2459 if test -z "$enable_scripting"; then
2460 # Disable scripting for iOS unless specifically overridden
2461 # with --enable-scripting.
2462 if test $_os != iOS; then
2463 enable_scripting=yes
2467 DISABLE_SCRIPTING=''
2468 if test "$enable_scripting" = yes; then
2469 BUILD_TYPE="$BUILD_TYPE SCRIPTING"
2471 DISABLE_SCRIPTING='TRUE'
2472 SCPDEFS="$SCPDEFS -DDISABLE_SCRIPTING"
2474 AC_SUBST(DISABLE_SCRIPTING)
2476 if test $_os = iOS -o $_os = Android; then
2477 # Disable dynamic_loading always for iOS and Android
2478 enable_dynamic_loading=no
2479 elif test -z "$enable_dynamic_loading"; then
2480 # Otherwise enable it unless speficically disabled
2481 enable_dynamic_loading=yes
2484 DISABLE_DYNLOADING=''
2485 if test "$enable_dynamic_loading" = yes; then
2486 BUILD_TYPE="$BUILD_TYPE DYNLOADING"
2488 DISABLE_DYNLOADING='TRUE'
2489 SCPDEFS="$SCPDEFS -DDISABLE_DYNLOADING"
2491 AC_SUBST(DISABLE_DYNLOADING)
2493 # remenber SYSBASE value
2496 dnl ===================================================================
2497 dnl Sort out various gallery compilation options
2498 dnl ===================================================================
2499 AC_MSG_CHECKING([how to build and package galleries])
2500 if test -n "${with_galleries}"; then
2501 if test "$with_galleries" = "build"; then
2502 WITH_GALLERY_BUILD=TRUE
2503 AC_MSG_RESULT([build from source images internally])
2504 elif test "$with_galleries" = "no"; then
2506 AC_MSG_RESULT([disable non-internal gallery build])
2508 AC_MSG_ERROR([unknown value --with-galleries=$with_galleries])
2511 if test $_os != iOS -a $_os != Android; then
2512 WITH_GALLERY_BUILD=TRUE
2513 AC_MSG_RESULT([internal src images for desktop])
2516 AC_MSG_RESULT([disable src imgage build])
2519 AC_SUBST(WITH_GALLERY_BUILD)
2521 dnl ===================================================================
2522 dnl Checks if ccache is available
2523 dnl ===================================================================
2524 if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
2525 case "%$CC%$CXX%" in
2526 # If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc),
2527 # assume that's good then
2528 *%ccache[[-_' ']]*|*/ccache[[-_' ']]*)
2529 AC_MSG_NOTICE([ccache seems to be included in a pre-defined CC and/or CXX])
2532 AC_PATH_PROG([CCACHE],[ccache],[not found])
2533 if test "$CCACHE" = "not found"; then
2536 # Need to check for ccache version: otherwise prevents
2537 # caching of the results (like "-x objective-c++" for Mac)
2538 if test $_os = Darwin -o $_os = iOS; then
2539 # Check ccache version
2540 AC_MSG_CHECKING([whether version of ccache is suitable])
2541 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
2542 CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
2543 if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
2544 AC_MSG_RESULT([yes, $CCACHE_VERSION])
2546 AC_MSG_RESULT([no, $CCACHE_VERSION])
2557 if test "$CCACHE" != ""; then
2558 ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
2559 ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
2560 if test "$ccache_size" = ""; then
2561 ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
2562 if test "$ccache_size" = ""; then
2565 # we could not determine the size or it was less than 1GB -> disable auto-ccache
2566 if test $ccache_size -lt 1024; then
2568 AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-productive: Disabling auto-ccache detection])
2569 add_warning "ccache's cache size is less than 1GB using it is counter-productive: auto-ccache detection disabled"
2571 # warn that ccache may be too small for debug build
2572 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
2573 add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
2576 if test $ccache_size -lt 5; then
2577 #warn that ccache may be too small for debug build
2578 AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
2579 add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
2584 dnl ===================================================================
2585 dnl Checks for C compiler,
2586 dnl The check for the C++ compiler is later on.
2587 dnl ===================================================================
2588 if test "$_os" != "WINNT" -a "$WITH_MINGW" != "yes"; then
2590 AC_MSG_CHECKING([gcc home])
2591 if test -z "$with_gcc_home"; then
2592 if test "$enable_icecream" = "yes"; then
2593 if test -d "/usr/lib/icecc/bin"; then
2594 GCC_HOME="/usr/lib/icecc/"
2596 GCC_HOME="/opt/icecream/"
2599 GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
2600 GCC_HOME_SET="false"
2603 GCC_HOME="$with_gcc_home"
2605 AC_MSG_RESULT($GCC_HOME)
2608 if test "$GCC_HOME_SET" = "true"; then
2609 if test -z "$CC"; then
2610 CC="$GCC_HOME/bin/gcc"
2612 if test -z "$CXX"; then
2613 CXX="$GCC_HOME/bin/g++"
2618 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
2619 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
2620 # AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that
2626 COMPATH=`dirname "$CC"`
2627 if test "$COMPATH" = "."; then
2628 AC_PATH_PROGS(COMPATH, $CC)
2629 dnl double square bracket to get single because of M4 quote...
2630 COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`
2632 COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`
2634 dnl ===================================================================
2636 dnl ===================================================================
2637 AC_MSG_CHECKING([whether to build with Java support])
2638 if test "$with_java" != "no"; then
2639 if test "$DISABLE_SCRIPTING" = TRUE; then
2640 AC_MSG_RESULT([no, overridden by --disable-scripting])
2644 AC_MSG_RESULT([yes])
2646 AC_DEFINE(HAVE_FEATURE_JAVA)
2653 AC_SUBST(ENABLE_JAVA)
2655 dnl ENABLE_JAVA="TRUE" if we want there to be *run-time* (and build-time) support for Java
2657 dnl ENABLE_JAVA="" indicate no Java support at all
2659 dnl ===================================================================
2660 dnl Export file validation
2661 dnl ===================================================================
2662 AC_MSG_CHECKING([whether to enable export file validation])
2663 if test "$with_export_validation" = yes; then
2664 AC_MSG_RESULT([yes])
2665 AC_DEFINE(HAVE_EXPORT_VALIDATION)
2670 dnl ===================================================================
2671 dnl Test the Solaris compiler version
2672 dnl ===================================================================
2673 if test "$_os" = "SunOS"; then
2674 if test "$CC" = "cc"; then
2675 AC_PATH_PROGS(_cc, cc)
2676 COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"`
2677 AC_MSG_CHECKING([the SunStudio C/C++ compiler version])
2678 dnl cc -V outputs to standard error!!!!
2679 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'`
2680 _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'`
2681 _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'`
2682 if test "$_sunstudio_major" != "5"; then
2683 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2685 _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" }'`
2686 if test "$_sunstudio_minor" = "false"; then
2687 AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler])
2689 dnl compiler will do
2690 AC_MSG_RESULT([checked])
2697 dnl ===================================================================
2698 dnl Check OS X SDK and compiler
2699 dnl ===================================================================
2701 if test $_os = Darwin; then
2703 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
2710 # If no --with-macosx-sdk option is given, look for 10.6,
2711 # 10.7, 10.8 and 10.9 SDKs, in that order. If not found
2712 # in some default locations, try the xcode-select tool.
2713 # 10.5 must be specified explicitely to be considered
2715 # The intent is that for "most" Mac-based developers, a suitable
2716 # SDK will be found automatically without any configure options.
2718 # For developers still using old Xcode in /Developer, either
2719 # because it is the only Xcode they have, or they have that in
2720 # addition to Xcode 4 in /Applications/Xcode.app, the 10.5 SDK
2721 # or 10.6 SDK should be found.
2723 # For developers with a current Xcode, the lowest-numbered SDK
2726 AC_MSG_CHECKING([what Mac OS X SDK to use])
2728 if test -z "$with_macosx_sdk"; then
2729 if test -d /Developer/SDKs/MacOSX10.6.sdk; then
2730 with_macosx_sdk=10.6
2731 elif test -d /Developer-old/SDKs/MacOSX10.6.sdk; then
2732 with_macosx_sdk=10.6
2733 elif test -d /Xcode3/SDKs/MacOSX10.6.sdk; then
2734 with_macosx_sdk=10.6
2735 elif test -d /Developer/SDKs/MacOSX10.7.sdk; then
2736 with_macosx_sdk=10.7
2737 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; then
2738 with_macosx_sdk=10.6
2739 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"; then
2740 with_macosx_sdk=10.7
2741 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"; then
2742 with_macosx_sdk=10.8
2743 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; then
2744 with_macosx_sdk=10.9
2745 elif test -x /usr/bin/xcode-select; then
2746 xcodepath="`xcode-select -print-path`"
2747 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; then
2748 with_macosx_sdk=10.6
2749 elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"; then
2750 with_macosx_sdk=10.7
2751 elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"; then
2752 with_macosx_sdk=10.8
2753 elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; then
2754 with_macosx_sdk=10.9
2757 if test -z "$with_macosx_sdk"; then
2758 AC_MSG_ERROR([Could not figure out the location of a Mac OS X SDK and its version])
2762 case $with_macosx_sdk in
2764 MACOSX_SDK_VERSION=1050
2767 MACOSX_SDK_VERSION=1060
2770 MACOSX_SDK_VERSION=1070
2773 MACOSX_SDK_VERSION=1080
2776 MACOSX_SDK_VERSION=1090
2779 MACOSX_SDK_VERSION=101000
2782 AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported values are 10.5--10])
2786 # Next find it (again, if we deduced its version above by finding
2787 # it... but we need to look for it once more in case
2788 # --with-macosx-sdk was given so that the above search did not
2790 if test -z "$MACOSX_SDK_PATH"; then
2791 case $with_macosx_sdk in
2793 if test -x /usr/bin/xcode-select; then
2794 xcodepath="`xcode-select -print-path`"
2795 if test -d "$xcodepath/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2796 MACOSX_SDK_PATH="$xcodepath/SDKs/MacOSX$with_macosx_sdk.sdk"
2798 elif test -d /Developer/SDKs/MacOSX10.5.sdk; then
2799 MACOSX_SDK_PATH=/Developer/SDKs/MacOSX10.5.sdk
2800 elif test -d /Developer-old/SDKs/MacOSX10.5.sdk; then
2801 MACOSX_SDK_PATH=/Developer-old/SDKs/MacOSX10.5.sdk
2802 elif test -d /Xcode3/SDKs/MacOSX10.5.sdk; then
2803 MACOSX_SDK_PATH=/Xcode3/SDKs/MacOSX10.5.sdk
2807 if test -d /Developer/SDKs/MacOSX10.6.sdk; then
2808 MACOSX_SDK_PATH=/Developer/SDKs/MacOSX10.6.sdk
2809 elif test -d /Developer-old/SDKs/MacOSX10.6.sdk; then
2810 MACOSX_SDK_PATH=/Developer-old/SDKs/MacOSX10.6.sdk
2811 elif test -d /Xcode3/SDKs/MacOSX10.6.sdk; then
2812 MACOSX_SDK_PATH=/Xcode3/SDKs/MacOSX10.6.sdk
2813 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2814 MACOSX_SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk
2815 elif test -x /usr/bin/xcode-select; then
2816 xcodepath="`xcode-select -print-path`"
2817 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2818 MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"
2823 if test -d /Developer/SDKs/MacOSX$with_macosx_sdk.sdk; then
2824 MACOSX_SDK_PATH=/Developer/SDKs/MacOSX$with_macosx_sdk.sdk
2825 elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2826 MACOSX_SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk
2827 elif test -x /usr/bin/xcode-select; then
2828 xcodepath="`xcode-select -print-path`"
2829 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2830 MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"
2835 xcodepath="`xcode-select -print-path`"
2836 if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
2837 MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"
2841 if test -z "$MACOSX_SDK_PATH"; then
2842 AC_MSG_ERROR([Could not figure out the location of Mac OS X $with_macosx_sdk SDK])
2845 AC_MSG_RESULT([SDK $with_macosx_sdk at $MACOSX_SDK_PATH])
2847 if test "$with_macosx_version_min_required" = ""; then
2848 case $with_macosx_sdk in
2850 with_macosx_version_min_required="10.5";;
2852 with_macosx_version_min_required="10.6";;
2856 if test "$with_macosx_version_max_allowed" = ""; then
2857 with_macosx_version_max_allowed="$with_macosx_sdk"
2860 # export this so that "xcrun" invocations later return matching values
2861 DEVELOPER_DIR="${MACOSX_SDK_PATH%/SDKs*}"
2862 DEVELOPER_DIR="${DEVELOPER_DIR%/Platforms*}"
2863 export DEVELOPER_DIR
2864 FRAMEWORKSHOME="$MACOSX_SDK_PATH/System/Library/Frameworks"
2865 MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
2867 case "$with_macosx_version_min_required" in
2869 MAC_OS_X_VERSION_MIN_REQUIRED="1050"
2872 MAC_OS_X_VERSION_MIN_REQUIRED="1060"
2875 MAC_OS_X_VERSION_MIN_REQUIRED="1070"
2878 MAC_OS_X_VERSION_MIN_REQUIRED="1080"
2881 MAC_OS_X_VERSION_MIN_REQUIRED="1090"
2884 MAC_OS_X_VERSION_MIN_REQUIRED="101000"
2887 AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported values are 10.5--10])
2891 if test "$BITNESS_OVERRIDE" = ""; then
2892 case "$with_macosx_version_min_required" in
2894 case "$with_macosx_sdk" in
2898 AC_MSG_WARN([Building with a SDK > 10.5 possibly breaks 10.5 compatibility.])
2899 add_warning "Building with a SDK > 10.5 possibly breaks 10.5 compatibility."
2904 case "$with_macosx_sdk" in
2908 AC_MSG_WARN([Building with a SDK > 10.6 possibly breaks 10.6 compatibility. Do not use for the TDF build])
2909 add_warning "Building with a SDK > 10.6 possibly breaks 10.6 compatibility. Do not use for the TDF build"
2914 AC_MSG_WARN([Building with a minimum version requirement > 10.6 breaks 10.6 compatibility. Do not use for the TDF build])
2915 add_warning "Building with a minimum version requirement > 10.6 breaks 10.6 compatibility. Do not use for the TDF build"
2920 # If no CC and CXX environment vars, try to guess where the compiler is
2922 INSTALL_NAME_TOOL=install_name_tool
2923 if test -z "$save_CC"; then
2924 AC_MSG_CHECKING([what compiler to use])
2925 case $with_macosx_sdk in
2927 if test "$enable_libc__" = yes; then
2928 AC_MSG_ERROR([--enable-libc++ requires --with-macosx-version-min-required >= 10.7])
2930 CC="${gccprefix}gcc-4.2 $arch -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2931 CXX="${gccprefix}g++-4.2 $arch -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2932 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
2935 if test "$enable_libc__" = yes; then
2936 AC_MSG_ERROR([--enable-libc++ requires --with-macosx-version-min-required >= 10.7])
2938 # did someone copy her 10.6 sdk into xcode 4 (needed on Mountain Lion)?
2939 if test "$(echo $MACOSX_SDK_PATH | cut -c1-23)" = "/Applications/Xcode.app"; then
2940 CC="`xcrun -find gcc` $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2941 CXX="`xcrun -find g++` $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2943 CC="gcc-4.2 $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2944 CXX="g++-4.2 $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2946 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
2949 10.7|10.8|10.9|10.10)
2950 if test "$enable_libc__" = yes; then
2951 if test "$with_macosx_version_min_required" = 10.6; then
2952 AC_MSG_ERROR([--enable-libc++ requires --with-macosx-version-min-required >= 10.7])
2954 # Use libc++ instead of libstdc++ when possible
2955 stdlib=-stdlib=libc++
2957 if test "$ENABLE_LTO" = TRUE; then
2960 CC="`xcrun -find clang` $bitness $lto -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2961 CXX="`xcrun -find clang++` $bitness $lto $stdlib -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
2962 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
2965 STRIP=`xcrun -find strip`
2966 LIBTOOL=`xcrun -find libtool`
2967 RANLIB=`xcrun -find ranlib`
2970 AC_MSG_RESULT([$CC and $CXX])
2973 case "$with_macosx_version_max_allowed" in
2975 MAC_OS_X_VERSION_MAX_ALLOWED="1050"
2978 MAC_OS_X_VERSION_MAX_ALLOWED="1060"
2981 MAC_OS_X_VERSION_MAX_ALLOWED="1070"
2984 MAC_OS_X_VERSION_MAX_ALLOWED="1080"
2987 MAC_OS_X_VERSION_MAX_ALLOWED="1090"
2990 MAC_OS_X_VERSION_MAX_ALLOWED="101000"
2993 AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.5--10])
2997 AC_MSG_CHECKING([that macosx-version-min-required is coherent with macosx-version-max-allowed])
2998 if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED; then
2999 AC_MSG_ERROR([the version minimumn required must be inferior or equal to the version maximum allowed])
3004 AC_MSG_CHECKING([that macosx-version-max-allowed is coherent with macos-with-sdk])
3005 if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $MACOSX_SDK_VERSION; then
3006 AC_MSG_ERROR([the version maximum allowed cannot be greater thatn the sdk level])
3010 AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED])
3011 AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED])
3013 AC_MSG_CHECKING([whether to do code signing])
3015 if test "$enable_macosx_code_signing" = yes; then
3016 # By default use the first suitable certificate (?).
3018 # http://stackoverflow.com/questions/13196291/difference-between-mac-developer-and-3rd-party-mac-developer-application
3019 # says that the "Mac Developer" certificate is useful just for self-testing. For distribution
3020 # outside the Mac App Store, use the "Developer ID Application" one, and for distribution in
3021 # the App Store, the "3rd Party Mac Developer" one. I think it works best to the the
3022 # "Developer ID Application" one.
3024 identity=`security find-identity -p codesigning -v 2>/dev/null | grep 'Developer ID Application:' | $AWK '{print $2}' |head -1`
3025 if test -n "$identity"; then
3026 MACOSX_CODESIGNING_IDENTITY=$identity
3027 pretty_name=`security find-identity -p codesigning -v | grep "$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
3028 AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
3030 elif test -n "$enable_macosx_code_signing" -a "$enable_macosx_code_signing" != no ; then
3031 MACOSX_CODESIGNING_IDENTITY=$enable_macosx_code_signing
3032 pretty_name=`security find-identity -p codesigning -v | grep "$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
3033 AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
3038 AC_MSG_CHECKING([whether to create a Mac App Store package])
3040 if test -n "$enable_macosx_package_signing" -a -z "$MACOSX_CODESIGNING_IDENTITY"; then
3041 AC_MSG_ERROR([You forgot --enable-macosx-code-signing])
3042 elif test "$enable_macosx_package_signing" = yes; then
3043 # By default use the first suitable certificate.
3044 # It should be a "3rd Party Mac Developer Installer" one
3046 identity=`security find-identity -v 2>/dev/null | grep '3rd Party Mac Developer Installer:' | awk '{print $2}' |head -1`
3047 if test -n "$identity"; then
3048 MACOSX_PACKAGE_SIGNING_IDENTITY=$identity
3049 pretty_name=`security find-identity -v | grep "$MACOSX_PACKAGE_SIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
3050 AC_MSG_RESULT([yes, using the identity $MACOSX_PACKAGE_SIGNING_IDENTITY for $pretty_name])
3052 AC_MSG_ERROR([Could not find any suitable '3rd Party Mac Developer Installer' certificate])
3054 elif test -n "$enable_macosx_package_signing"; then
3055 MACOSX_PACKAGE_SIGNING_IDENTITY=$enable_macosx_package_signing
3056 pretty_name=`security find-identity -v | grep "$MACOSX_PACKAGE_SIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
3057 AC_MSG_RESULT([yes, using the identity $MACOSX_PACKAGE_SIGNING_IDENTITY for $pretty_name])
3062 if test -n "$MACOSX_CODESIGNING_IDENTITY" -a -n "$MACOSX_PACKAGE_SIGNING_IDENTITY" -a "$MACOSX_CODESIGNING_IDENTITY" = "$MACOSX_PACKAGE_SIGNING_IDENTITY"; then
3063 AC_MSG_ERROR([You should not use the same identity for code and package signing])
3066 AC_MSG_CHECKING([whether to sandbox the application])
3068 if test -n "$with_macosx_teamid" -a "$with_macosx_teamid != yes -a "$with_macosx_teamid != no; then
3069 MACOSX_TEAMID="$with_macosx_teamid"
3072 if test -z "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = yes; then
3073 AC_MSG_ERROR([OS X sandboxing requires code signing])
3074 elif test -z "$MACOSX_TEAMID" -a "$enable_macosx_sandbox" = yes; then
3075 AC_MSG_ERROR([OS X sandboxing requires a team id])
3076 elif test -n "$ENABLE_JAVA" -a "$enable_macosx_sandbox" = yes; then
3077 AC_MSG_ERROR([OS X sandboxing (actually App Store rules) disallows use of Java])
3078 elif test -n "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = yes; then
3079 ENABLE_MACOSX_SANDBOX=TRUE
3080 AC_DEFINE(HAVE_FEATURE_MACOSX_SANDBOX)
3081 AC_MSG_RESULT([yes])
3086 AC_MSG_CHECKING([what OS X app bundle identifier to use])
3087 MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier
3088 AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER])
3090 AC_MSG_CHECKING([what OS X app name to use])
3091 MACOSX_APP_NAME="$with_macosx_app_name"
3092 AC_MSG_RESULT([$MACOSX_APP_NAME])
3094 AC_MSG_CHECKING([build with mac retina support])
3095 if test "$enable_macosx_retina" = yes ; then
3096 MACOSX_HIGH_RESOLUTION_VALUE=true
3098 MACOSX_HIGH_RESOLUTION_VALUE=false
3100 AC_MSG_RESULT([$MACOSX_HIGH_RESOLUTION_VALUE])
3102 AC_SUBST(MACOSX_SDK_PATH)
3103 AC_SUBST(MACOSX_SDK_VERSION)
3104 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
3105 AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
3106 AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED)
3107 AC_SUBST(INSTALL_NAME_TOOL)
3108 AC_SUBST(LIBTOOL) # Note that the OS X libtool command is unrelated to GNU libtool
3109 AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
3110 AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY)
3111 AC_SUBST(ENABLE_MACOSX_SANDBOX)
3112 AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
3113 AC_SUBST(MACOSX_TEAMID)
3114 AC_SUBST(MACOSX_APP_NAME)
3115 AC_SUBST(MACOSX_HIGH_RESOLUTION_VALUE)
3117 dnl ===================================================================
3118 dnl Check iOS SDK and compiler
3119 dnl ===================================================================
3121 if test $_os = iOS; then
3123 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
3129 AC_MSG_CHECKING([what iOS SDK to use])
3131 if test "$enable_ios_simulator" = yes; then
3132 platform=iPhoneSimulator
3137 xcode_developer=`xcode-select -print-path`
3140 for sdkver in 7.1 7.0 6.1 6.0; do
3141 t=$xcode_developer/Platforms/$platform.platform/Developer/SDKs/$platform$sdkver.sdk
3149 if test -z "$sysroot"; then
3150 AC_MSG_ERROR([Could not find iOS SDK, expected something like $xcode_developer/Platforms/$platform.platform/Developer/SDKs/${platform}${pref_sdk_ver}])
3153 AC_MSG_RESULT($sysroot)
3155 if test "$enable_ios_simulator" = yes; then
3156 if test "$BITNESS_OVERRIDE" = 64; then
3158 versionmin=-mios-simulator-version-min=7.0
3163 versionmin=-mios-simulator-version-min=6.1
3166 versionmin=-mmacosx-version-min=10.7
3172 if test "$BITNESS_OVERRIDE" = 64; then
3174 versionmin=-miphoneos-version-min=7.0
3177 versionmin=-miphoneos-version-min=6.1
3181 # LTO is not really recommended for iOS builds,
3182 # the link time will be astronomical
3183 if test "$ENABLE_LTO" = TRUE; then
3186 # Just add -fvisibility=hidden to CC and CXX directly so that the 3rd-party libs also
3187 # get compiled with it, to avoid ld warnings when linking all that together into one
3190 # Use libc++ for iOS 7 SDK and libstdc++ for earlier (but we don't really expect anybody to
3191 # be be using an earlier SDK)
3193 XCODE_CLANG_CXX_LIBRARY=libstdc++
3196 if test "$enable_libc__" = yes; then
3197 AC_MSG_ERROR([--enable-libc++ requires using Xcode 5 and iOS SDK 7 or newer it seems])
3201 if test "$enable_libc__" = no; then
3202 AC_MSG_ERROR([--disable-libc++ not allowed])
3204 XCODE_CLANG_CXX_LIBRARY=libc++
3208 stdlib="-stdlib=$XCODE_CLANG_CXX_LIBRARY"
3210 CC="`xcrun -find clang` -arch $XCODE_ARCHS -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
3211 CXX="`xcrun -find clang++` -arch $XCODE_ARCHS -fvisibility=hidden $stdlib -isysroot $sysroot $lto $versionmin"
3213 INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
3216 STRIP=`xcrun -find strip`
3217 LIBTOOL=`xcrun -find libtool`
3218 RANLIB=`xcrun -find ranlib`
3221 AC_SUBST(XCODE_CLANG_CXX_LIBRARY)
3222 AC_SUBST(XCODE_ARCHS)
3224 AC_MSG_CHECKING([whether to treat the installation as read-only])
3226 if test \( -z "$enable_readonly_installset" -a "$ENABLE_MACOSX_SANDBOX" = TRUE \) -o \
3227 "$enable_extensions" != yes; then
3228 enable_readonly_installset=yes
3230 if test "$enable_readonly_installset" = yes; then
3231 AC_MSG_RESULT([yes])
3232 AC_DEFINE(HAVE_FEATURE_READONLY_INSTALLSET)
3237 dnl ===================================================================
3238 dnl Structure of install set
3239 dnl ===================================================================
3241 if test $_os = Darwin -a "$enable_canonical_installation_tree_structure" = yes; then
3242 LIBO_BIN_FOLDER=MacOS
3243 LIBO_ETC_FOLDER=Resources
3244 LIBO_LIBEXEC_FOLDER=MacOS
3245 LIBO_LIB_FOLDER=Frameworks
3246 LIBO_SHARE_FOLDER=Resources
3247 LIBO_SHARE_HELP_FOLDER=Resources/help
3248 LIBO_SHARE_JAVA_FOLDER=Resources/java
3249 LIBO_SHARE_PRESETS_FOLDER=Resources/presets
3250 LIBO_LIB_PYUNO_FOLDER=Resources
3251 LIBO_SHARE_RESOURCE_FOLDER=Resources/resource
3252 LIBO_SHARE_SHELL_FOLDER=Resources/shell
3253 LIBO_URE_BIN_FOLDER=MacOS
3254 LIBO_URE_ETC_FOLDER=Resources/ure/etc
3255 LIBO_URE_LIB_FOLDER=Frameworks
3256 LIBO_URE_SHARE_FOLDER=Resources/ure/share
3257 LIBO_URE_SHARE_JAVA_FOLDER=Resources/java
3258 ENABLE_MACOSX_MACLIKE_APP_STRUCTURE=TRUE
3259 AC_DEFINE(HAVE_FEATURE_MACOSX_MACLIKE_APP_STRUCTURE)
3260 elif test $_os = Darwin; then
3261 LIBO_BIN_FOLDER=MacOS
3262 LIBO_ETC_FOLDER=MacOS
3263 LIBO_LIBEXEC_FOLDER=MacOS
3264 LIBO_LIB_FOLDER=MacOS
3265 LIBO_LIB_PYUNO_FOLDER=MacOS
3266 LIBO_SHARE_FOLDER=share
3267 LIBO_SHARE_HELP_FOLDER=help
3268 LIBO_SHARE_JAVA_FOLDER=MacOS/classes
3269 LIBO_SHARE_PRESETS_FOLDER=presets
3270 LIBO_SHARE_RESOURCE_FOLDER=MacOS/resource
3271 LIBO_SHARE_SHELL_FOLDER=MacOS/shell
3272 LIBO_URE_BIN_FOLDER=ure-link/bin
3273 LIBO_URE_ETC_FOLDER=ure-link/lib
3274 LIBO_URE_LIB_FOLDER=ure-link/lib
3275 LIBO_URE_SHARE_FOLDER=ure-link/share
3276 LIBO_URE_SHARE_JAVA_FOLDER=ure-link/share/java
3277 elif test $_os = WINNT; then
3278 LIBO_BIN_FOLDER=program
3279 LIBO_ETC_FOLDER=program
3280 LIBO_LIBEXEC_FOLDER=program
3281 LIBO_LIB_FOLDER=program
3282 LIBO_LIB_PYUNO_FOLDER=program
3283 LIBO_SHARE_FOLDER=share
3284 LIBO_SHARE_HELP_FOLDER=help
3285 LIBO_SHARE_JAVA_FOLDER=program/classes
3286 LIBO_SHARE_PRESETS_FOLDER=presets
3287 LIBO_SHARE_RESOURCE_FOLDER=program/resource
3288 LIBO_SHARE_SHELL_FOLDER=program/shell
3289 LIBO_URE_BIN_FOLDER=URE/bin
3290 LIBO_URE_ETC_FOLDER=URE/bin
3291 LIBO_URE_LIB_FOLDER=URE/bin
3292 LIBO_URE_SHARE_FOLDER=URE
3293 LIBO_URE_SHARE_JAVA_FOLDER=URE/java
3295 LIBO_BIN_FOLDER=program
3296 LIBO_ETC_FOLDER=program
3297 LIBO_LIBEXEC_FOLDER=program
3298 LIBO_LIB_FOLDER=program
3299 LIBO_LIB_PYUNO_FOLDER=program
3300 LIBO_SHARE_FOLDER=share
3301 LIBO_SHARE_HELP_FOLDER=help
3302 LIBO_SHARE_JAVA_FOLDER=program/classes
3303 LIBO_SHARE_PRESETS_FOLDER=presets
3304 LIBO_SHARE_RESOURCE_FOLDER=program/resource
3305 LIBO_SHARE_SHELL_FOLDER=program/shell
3306 LIBO_URE_BIN_FOLDER=ure/bin
3307 LIBO_URE_ETC_FOLDER=ure/lib
3308 LIBO_URE_LIB_FOLDER=ure/lib
3309 LIBO_URE_SHARE_FOLDER=ure/share
3310 LIBO_URE_SHARE_JAVA_FOLDER=ure/share/java
3312 AC_DEFINE_UNQUOTED(LIBO_BIN_FOLDER,"$LIBO_BIN_FOLDER")
3313 AC_DEFINE_UNQUOTED(LIBO_ETC_FOLDER,"$LIBO_ETC_FOLDER")
3314 AC_DEFINE_UNQUOTED(LIBO_LIBEXEC_FOLDER,"$LIBO_LIBEXEC_FOLDER")
3315 AC_DEFINE_UNQUOTED(LIBO_LIB_FOLDER,"$LIBO_LIB_FOLDER")
3316 AC_DEFINE_UNQUOTED(LIBO_LIB_PYUNO_FOLDER,"$LIBO_LIB_PYUNO_FOLDER")
3317 AC_DEFINE_UNQUOTED(LIBO_SHARE_FOLDER,"$LIBO_SHARE_FOLDER")
3318 AC_DEFINE_UNQUOTED(LIBO_SHARE_HELP_FOLDER,"$LIBO_SHARE_HELP_FOLDER")
3319 AC_DEFINE_UNQUOTED(LIBO_SHARE_JAVA_FOLDER,"$LIBO_SHARE_JAVA_FOLDER")
3320 AC_DEFINE_UNQUOTED(LIBO_SHARE_PRESETS_FOLDER,"$LIBO_SHARE_PRESETS_FOLDER")
3321 AC_DEFINE_UNQUOTED(LIBO_SHARE_RESOURCE_FOLDER,"$LIBO_SHARE_RESOURCE_FOLDER")
3322 AC_DEFINE_UNQUOTED(LIBO_SHARE_SHELL_FOLDER,"$LIBO_SHARE_SHELL_FOLDER")
3323 AC_DEFINE_UNQUOTED(LIBO_URE_BIN_FOLDER,"$LIBO_URE_BIN_FOLDER")
3324 AC_DEFINE_UNQUOTED(LIBO_URE_ETC_FOLDER,"$LIBO_URE_ETC_FOLDER")
3325 AC_DEFINE_UNQUOTED(LIBO_URE_LIB_FOLDER,"$LIBO_URE_LIB_FOLDER")
3326 AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_FOLDER,"$LIBO_URE_SHARE_FOLDER")
3327 AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_JAVA_FOLDER,"$LIBO_URE_SHARE_JAVA_FOLDER")
3329 # Not all of them needed in config_host.mk, add more if need arises
3330 AC_SUBST(LIBO_BIN_FOLDER)
3331 AC_SUBST(LIBO_ETC_FOLDER)
3332 AC_SUBST(LIBO_LIB_FOLDER)
3333 AC_SUBST(LIBO_LIB_PYUNO_FOLDER)
3334 AC_SUBST(LIBO_SHARE_FOLDER)
3335 AC_SUBST(LIBO_SHARE_HELP_FOLDER)
3336 AC_SUBST(LIBO_SHARE_JAVA_FOLDER)
3337 AC_SUBST(LIBO_SHARE_PRESETS_FOLDER)
3338 AC_SUBST(LIBO_SHARE_RESOURCE_FOLDER)
3339 AC_SUBST(LIBO_URE_BIN_FOLDER)
3340 AC_SUBST(LIBO_URE_ETC_FOLDER)
3341 AC_SUBST(LIBO_URE_LIB_FOLDER)
3342 AC_SUBST(LIBO_URE_SHARE_FOLDER)
3343 AC_SUBST(LIBO_URE_SHARE_JAVA_FOLDER)
3344 AC_SUBST(ENABLE_MACOSX_MACLIKE_APP_STRUCTURE)
3346 dnl ===================================================================
3347 dnl Windows specific tests and stuff
3348 dnl ===================================================================
3350 # Get a value from the 32-bit side of the Registry
3353 # Return value: $regvalue
3355 _regvalue=`cat "/proc/registry32/$1" 2> /dev/null`
3357 if test $? -eq 0; then
3362 # Get a value from the 64-bit side of the Registry
3365 # Return value: $regvalue
3367 _regvalue=`cat "/proc/registry64/$1" 2> /dev/null`
3369 if test $? -eq 0; then
3374 if test "$_os" = "WINNT"; then
3375 AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
3376 if test "$enable_64_bit" = "" -o "$enable_64_bit" = "no"; then
3378 WINDOWS_SDK_ARCH="x86"
3380 AC_MSG_RESULT([yes])
3381 WINDOWS_SDK_ARCH="x64"
3386 if test "$_os" = "WINNT" -a "$WITH_MINGW" != yes; then
3387 AC_MSG_CHECKING([whether to use DirectX])
3388 if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
3389 ENABLE_DIRECTX="TRUE"
3390 AC_MSG_RESULT([yes])
3396 AC_MSG_CHECKING([whether to use ActiveX])
3397 if test "$enable_activex" = "yes" -o "$enable_activex" = ""; then
3399 AC_MSG_RESULT([yes])
3401 DISABLE_ACTIVEX="TRUE"
3405 AC_MSG_CHECKING([whether to use ATL])
3406 if test "$enable_atl" = "yes" -o "$enable_atl" = ""; then
3408 AC_MSG_RESULT([yes])
3415 DISABLE_ACTIVEX="TRUE"
3419 AC_SUBST(ENABLE_DIRECTX)
3420 AC_SUBST(DISABLE_ACTIVEX)
3421 AC_SUBST(DISABLE_ATL)
3423 if test "$cross_compiling" = "yes"; then
3424 export CROSS_COMPILING=TRUE
3425 SCPDEFS="$SCPDEFS -DCROSS_COMPILING"
3428 BUILD_TYPE="$BUILD_TYPE NATIVE"
3430 AC_SUBST(CROSS_COMPILING)
3432 dnl ===================================================================
3433 dnl Is GCC actually Clang?
3434 dnl ===================================================================
3437 if test "$GCC" = "yes"; then
3438 AC_MSG_CHECKING([whether GCC is actually Clang])
3439 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
3445 [AC_MSG_RESULT([yes])
3446 COM_GCC_IS_CLANG=TRUE],
3447 [AC_MSG_RESULT([no])])
3449 if test "$COM_GCC_IS_CLANG" = TRUE; then
3450 AC_MSG_CHECKING([the Clang version])
3451 clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC -E -P -`
3452 CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P -`
3453 CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
3454 AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
3455 AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
3458 AC_SUBST(COM_GCC_IS_CLANG)
3460 if test "$CCACHE" != "" -a "$COM_GCC_IS_CLANG" = TRUE; then
3461 if test -z "$CCACHE_CPP2"; then
3462 AC_MSG_WARN([Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings.])
3463 add_warning "Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings."
3467 dnl ===================================================================
3468 dnl Test the gcc version
3469 dnl ===================================================================
3470 if test "$GCC" = "yes" -a -z "$COM_GCC_IS_CLANG"; then
3471 AC_MSG_CHECKING([the GCC version])
3472 _gcc_version=`$CC -dumpversion`
3473 GCC_VERSION=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
3475 if test "$_os" = "Darwin"; then
3476 if test "$with_macosx_sdk" = "10.5"; then
3477 # use gcc 4.2 for OS X SDK 10.5
3478 if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.2"; then
3479 export CC="$GCC_HOME/bin/gcc-4.2" # make CC finally available to config.guess
3481 AC_MSG_RESULT([using CC=$CC])
3484 AC_MSG_RESULT([gcc $_gcc_version])
3487 if test "$GCC_VERSION" -lt 0401; then
3488 AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 4.1.0])
3491 # Explicitly force GCC_VERSION to be empty, even for Clang, to check incorrect uses.
3492 # GCC version should generally be checked only when handling GCC-specific bugs, for testing
3493 # things like features configure checks should be used, otherwise they may e.g. fail with Clang
3494 # (which reports itself as GCC 4.2.1).
3497 AC_SUBST(GCC_VERSION)
3499 # ===================================================================
3500 # check various GCC options that Clang does not support now but maybe
3501 # will somewhen in the future, check them even for GCC, so that the
3503 # ===================================================================
3506 HAVE_GCC_FINLINE_LIMIT=
3507 HAVE_GCC_FNO_INLINE=
3508 if test "$GCC" = "yes"; then
3509 AC_MSG_CHECKING([whether $CC supports -ggdb2])
3510 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3511 # Option just ignored and silly warning that isn't a real
3516 CFLAGS="$CFLAGS -Werror -ggdb2"
3517 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_GGDB2=TRUE ],[])
3520 if test "$HAVE_GCC_GGDB2" = "TRUE"; then
3521 AC_MSG_RESULT([yes])
3526 AC_MSG_CHECKING([whether $CC supports -finline-limit=0])
3527 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3532 CFLAGS="$CFLAGS -Werror -finline-limit=0"
3533 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FINLINE_LIMIT=TRUE ],[])
3536 if test "$HAVE_GCC_FINLINE_LIMIT" = "TRUE"; then
3537 AC_MSG_RESULT([yes])
3542 AC_MSG_CHECKING([whether $CC supports -fno-inline])
3543 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
3548 CFLAGS="$CFLAGS -Werror -fno-inline"
3549 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_INLINE=TRUE ],[])
3552 if test "$HAVE_GCC_FNO_INLINE" = "TRUE"; then
3553 AC_MSG_RESULT([yes])
3558 AC_SUBST(HAVE_GCC_GGDB2)
3559 AC_SUBST(HAVE_GCC_FINLINE_LIMIT)
3560 AC_SUBST(HAVE_GCC_FNO_INLINE)
3562 HAVE_LD_BSYMBOLIC_FUNCTIONS=
3563 if test "$GCC" = "yes"; then
3564 AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
3565 bsymbolic_functions_ldflags_save=$LDFLAGS
3566 LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo"
3567 AC_LINK_IFELSE([AC_LANG_PROGRAM([
3570 printf ("hello world\n");
3571 ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
3572 if test "$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "TRUE"; then
3573 AC_MSG_RESULT( found )
3575 AC_MSG_RESULT( not found )
3577 LDFLAGS=$bsymbolic_functions_ldflags_save
3579 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
3581 # Use -isystem (gcc) if possible, to avoid warnigs in 3rd party headers.
3582 # NOTE: must _not_ be used for bundled external libraries!
3584 if test "$GCC" = "yes"; then
3585 AC_MSG_CHECKING( for -isystem )
3587 CFLAGS="$CFLAGS -Werror"
3588 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ ISYSTEM=-isystem ],[])
3590 if test -n "$ISYSTEM"; then
3596 if test -z "$ISYSTEM"; then
3597 # fall back to using -I
3602 dnl ===================================================================
3603 dnl Check which Visual Studio or MinGW compiler is used
3604 dnl ===================================================================
3606 map_vs_year_to_version()
3608 # Return value: $vsversion
3620 AC_MSG_ERROR([Assertion failure - invalid argument "$1" to map_vs_year_to_version()]);;
3624 vs_versions_to_check()
3626 # Args: $1 (optional) : versions to check, in the order of preference
3627 # Return value: $vsversions
3631 if test -n "$1"; then
3632 map_vs_year_to_version "$1"
3633 vsversions=$vsversion
3635 # By default we prefer 2012, then 2010, then 2013
3636 vsversions="11.0 10.0 12.0"
3642 # Find Visual Studio 2012/2010/2013
3643 # Args: $1 (optional) : versions to check, in the order of preference
3644 # Return value: $vstest
3648 vs_versions_to_check "$1"
3650 for ver in $vsversions; do
3651 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VS/ProductDir
3652 if test -n "$regvalue"; then
3656 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress/$ver/Setup/VS/ProductDir
3657 if test -n "$regvalue"; then
3666 # Find Visual C++ 2012/2010/2013
3667 # Args: $1 (optional) : The VS version year
3668 # Return values: $vctest, $vcyear, $vcnum, $vcnumwithdot
3670 unset vctest vcnum vcnumwithdot
3672 vs_versions_to_check "$1"
3674 for ver in $vsversions; do
3675 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VC/ProductDir
3676 if test -n "$regvalue"; then
3680 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress/$ver/Setup/VC/ProductDir
3681 if test -n "$regvalue"; then
3686 if test -n "$vctest"; then
3688 case "$vcnumwithdot" in
3705 SHOWINCLUDES_PREFIX=
3706 if test "$_os" = "WINNT"; then
3707 if test "$WITH_MINGW" != "yes"; then
3708 AC_MSG_CHECKING([Visual C++])
3710 find_msvc "$with_visual_studio"
3712 if test -z "$vctest"; then
3713 if test -n "$with_visual_studio"; then
3714 AC_MSG_ERROR([No Visual Studio $with_visual_studio installation found])
3716 AC_MSG_ERROR([No Visual Studio 2012, 2010 or 2013 installation found])
3720 if test "$BITNESS_OVERRIDE" = ""; then
3721 if test -f "$vctest/bin/cl.exe"; then
3722 VC_PRODUCT_DIR=$vctest
3724 AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/cl.exe])
3727 if test -f "$vctest/bin/amd64/cl.exe"; then
3728 VC_PRODUCT_DIR=$vctest
3730 AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/amd64/cl.exe])
3734 VC_PRODUCT_DIR=`cygpath -d "$VC_PRODUCT_DIR"`
3735 VC_PRODUCT_DIR=`cygpath -u "$VC_PRODUCT_DIR"`
3736 AC_MSG_RESULT([$VC_PRODUCT_DIR])
3738 dnl ===========================================================
3739 dnl Check for the corresponding mspdb*.dll
3740 dnl ===========================================================
3744 if test "$BITNESS_OVERRIDE" = ""; then
3745 if test "$vcnum" = "120"; then
3746 MSPDB_PATH="$VC_PRODUCT_DIR/../VC/bin"
3748 MSPDB_PATH="$VC_PRODUCT_DIR/../Common7/IDE"
3751 MSPDB_PATH="$VC_PRODUCT_DIR/bin/amd64"
3756 if test ! -e "$MSPDB_PATH/mspdb${mspdbnum}.dll"; then
3757 AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $MSPDB_PATH, Visual Studio installation broken?])
3760 MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
3761 MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
3763 dnl The path needs to be added before cl is called
3764 PATH="$MSPDB_PATH:$PATH"
3766 AC_MSG_CHECKING([cl.exe])
3768 # Is there really ever a need to pass CC explicitly? Surely we can hope to get all the
3769 # automagical niceness to work OK? If somebody has some unsupported compiler in some weird
3770 # location, isn't it likely that lots of other things needs changes, too, and just setting CC
3773 if test -z "$CC"; then
3774 if test "$BITNESS_OVERRIDE" = ""; then
3775 if test -f "$VC_PRODUCT_DIR/bin/cl.exe"; then
3776 CC="$VC_PRODUCT_DIR/bin/cl.exe"
3779 if test -f "$VC_PRODUCT_DIR/bin/amd64/cl.exe"; then
3780 CC="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
3784 # This gives us a posix path with 8.3 filename restrictions
3785 CC=`cygpath -d "$CC"`
3786 CC=`cygpath -u "$CC"`
3789 if test -n "$CC"; then
3790 # Remove /cl.exe from CC case insensitive
3791 AC_MSG_RESULT([found Visual C++ $vcyear ($CC)])
3792 if test "$BITNESS_OVERRIDE" = ""; then
3793 COMPATH=`echo $CC | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
3795 if test -n "$VC_PRODUCT_DIR"; then
3796 # Huh, why not just an assignment?
3797 COMPATH=`echo $VC_PRODUCT_DIR`
3800 if test "$BITNESS_OVERRIDE" = "" -a "$vcnum" != "100"; then
3801 CC="$CC -arch:SSE" # MSVC 2012 default for x86 is -arch:SSE2
3803 export INCLUDE=`cygpath -d "$COMPATH/Include"`
3805 PathFormat "$COMPATH"
3806 COMPATH="$formatted_path"
3811 # The WINDOWS_SDK_ACCEPTABLE_VERSIONS is mostly an educated guess... Assuming newer ones
3812 # are always "better", we list them in reverse chronological order.
3817 WINDOWS_SDK_ACCEPTABLE_VERSIONS="7.1A 7.1 7.0A 6.0A"
3818 if test "$ENABLE_LTO" = TRUE; then
3820 AC_MSG_WARN([LTO is known to cause problems with MSVC 2010])
3821 add_warning "LTO is known to cause problems with MSVC 2010"
3826 WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.0 7.1A"
3830 WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.1A 8.1 8.0"
3834 # The expectation is that --with-windows-sdk should not need to be used
3835 if test -n "$with_windows_sdk"; then
3836 case " $WINDOWS_SDK_ACCEPTABLE_VERSIONS " in
3837 *" "$with_windows_sdk" "*)
3838 WINDOWS_SDK_ACCEPTABLE_VERSIONS=$with_windows_sdk
3841 AC_MSG_ERROR([Windows SDK $with_windows_sdk is not known to work witn VS $MSVSVER])
3846 # Make AC_COMPILE_IFELSE etc. work (set by AC_PROG_C, which we don't use for MSVC)
3851 AC_MSG_ERROR([Visual C++ not found after all, huh])
3854 dnl We need to guess the prefix of the -showIncludes output, it can be
3856 AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
3857 echo "#include <stdlib.h>" > conftest.c
3858 SHOWINCLUDES_PREFIX=`$CC -c -showIncludes conftest.c 2>/dev/null | \
3859 grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
3860 rm -f conftest.c conftest.obj
3861 if test -z "$SHOWINCLUDES_PREFIX"; then
3862 AC_MSG_ERROR([cannot determine the -showIncludes prefix])
3864 AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
3867 # Check for 64-bit (cross-)compiler to use to build the 64-bit
3868 # version of the Explorer extension (and maybe other small
3869 # bits, too) needed when installing a 32-bit LibreOffice on a
3870 # 64-bit OS. The 64-bit Explorer extension is a feature that
3871 # has been present since long in OOo. Don't confuse it with
3872 # building LibreOffice itself as 64-bit code, which is
3873 # unfinished work and highly experimental.
3879 if test "$BITNESS_OVERRIDE" = ""; then
3880 AC_MSG_CHECKING([for a x64 compiler and libraries for 64-bit Explorer extensions])
3881 if test -f "$VC_PRODUCT_DIR/atlmfc/lib/amd64/atls.lib"; then
3882 # Prefer native x64 compiler to cross-compiler, in case we are running
3883 # the build on a 64-bit OS.
3884 if "$VC_PRODUCT_DIR/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3886 CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
3887 LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/link.exe"
3888 elif "$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
3890 CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"
3891 LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/link.exe"
3894 if test "$BUILD_X64" = TRUE; then
3895 AC_MSG_RESULT([found])
3897 AC_MSG_RESULT([not found])
3898 AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
3903 # These are passed to the environment and then used in gbuild/platform/com_MSC_class.mk
3904 AC_SUBST(CXX_X64_BINARY)
3905 AC_SUBST(LINK_X64_BINARY)
3907 AC_MSG_CHECKING([the compiler is MinGW])
3908 MACHINE_PREFIX=`$CC -dumpmachine`
3909 if echo $MACHINE_PREFIX | $GREP -q mingw32; then
3910 COMPATH=`echo "$COMPATH" | sed -e 's,/bin$,,'`
3911 AC_MSG_RESULT([yes])
3913 AC_MSG_ERROR([Compiler is not MinGW.])
3918 PathFormat "$MSPDB_PATH"
3919 MSPDB_PATH="$formatted_path"
3920 AC_SUBST(SHOWINCLUDES_PREFIX)
3925 if test "$_os" = "WINNT"; then
3926 BUILD_TYPE="$BUILD_TYPE DBGHELP"
3932 UNOWINREG_DLL="185d60944ea767075d27247c3162b3bc-unowinreg.dll"
3933 AC_SUBST(UNOWINREG_DLL)
3936 # prefix C with ccache if needed
3938 if test "$CCACHE" != ""; then
3939 AC_MSG_CHECKING([whether $CC is already ccached])
3943 CFLAGS="$CFLAGS --ccache-skip -O2"
3944 dnl an empty program will do, we're checking the compiler flags
3945 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
3946 [use_ccache=yes], [use_ccache=no])
3947 if test $use_ccache = yes; then
3948 AC_MSG_RESULT([yes])
3957 dnl Set the ENABLE_DBGUTIL variable
3958 dnl ===================================================================
3959 AC_MSG_CHECKING([whether to build with additional debug utilities])
3960 if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
3961 ENABLE_DBGUTIL="TRUE"
3962 # this is an extra var so it can have different default on different MSVC
3963 # versions (in case there are version specific problems with it)
3964 MSVC_USE_DEBUG_RUNTIME="TRUE"
3966 AC_MSG_RESULT([yes])
3967 # cppunit and graphite expose STL in public headers
3968 if test "$with_system_cppunit" = "yes"; then
3969 AC_MSG_ERROR([--with-system-cppunit conflicts with --enable-dbgutil])
3971 with_system_cppunit=no
3973 if test "$with_system_graphite" = "yes"; then
3974 AC_MSG_ERROR([--with-system-graphite conflicts with --enable-dbgutil])
3976 with_system_graphite=no
3978 if test "$with_system_mysql_cppconn" = "yes"; then
3979 AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with --enable-dbgutil])
3981 with_system_mysql_cppconn=no
3983 if test "$with_system_orcus" = "yes"; then
3984 AC_MSG_ERROR([--with-system-orcus conflicts with --enable-dbgutil])
3986 with_system_orcus=no
3988 if test "$with_system_libcmis" = "yes"; then
3989 AC_MSG_ERROR([--with-system-libcmis conflicts with --enable-dbgutil])
3991 with_system_libcmis=no
3993 if test "$enable_win_mozab_driver" = "yes"; then
3994 AC_MSG_ERROR([--enable-win-mozab-driver conflicts with --enable-dbgutil])
3998 MSVC_USE_DEBUG_RUNTIME=""
4001 AC_SUBST(ENABLE_DBGUTIL)
4002 AC_SUBST(MSVC_USE_DEBUG_RUNTIME)
4004 dnl Set the ENABLE_DEBUG variable.
4005 dnl ===================================================================
4006 AC_MSG_CHECKING([whether to do a debug build])
4007 if test -n "$enable_debug" && test "$enable_debug" != "yes" && test "$enable_debug" != "no"; then
4008 AC_MSG_ERROR([--enable-debug now accepts only yes or no, use --enable-selective-debuginfo])
4010 if test -n "$ENABLE_DBGUTIL"; then
4011 if test "$enable_debug" = "no"; then
4012 AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil])
4015 AC_MSG_RESULT([yes (dbgutil)])
4016 elif test -n "$enable_debug" && test "$enable_debug" != "no"; then
4018 AC_MSG_RESULT([yes])
4023 AC_SUBST(ENABLE_DEBUG)
4025 dnl Selective debuginfo
4026 ENABLE_DEBUGINFO_FOR=
4027 if test -n "$ENABLE_DEBUG"; then
4028 AC_MSG_CHECKING([whether to use selective debuginfo])
4029 if test -n "$enable_selective_debuginfo" -a "$enable_selective_debuginfo" != "no"; then
4030 ENABLE_DEBUGINFO_FOR="$enable_selective_debuginfo"
4031 AC_MSG_RESULT([for "$enable_selective_debuginfo"])
4033 ENABLE_DEBUGINFO_FOR=all
4034 AC_MSG_RESULT([no, for all])
4037 AC_SUBST(ENABLE_DEBUGINFO_FOR)
4039 dnl Check for enable symbols option
4040 dnl ===================================================================
4041 AC_MSG_CHECKING([whether to include symbols while preserve optimization])
4042 if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
4043 ENABLE_SYMBOLS="TRUE"
4044 if test -n "$ENABLE_DBGUTIL"; then
4045 AC_MSG_ERROR([--enable-dbgutil cannot be used with --enable-symbols])
4046 elif test -n "$ENABLE_DEBUG"; then
4047 AC_MSG_ERROR([--enable-debug cannot be used with --enable-symbols])
4049 AC_MSG_RESULT([yes])
4051 if test -n "$enable_symbols" -a "$enable_symbols" = "no"; then
4052 ENABLE_SYMBOLS="FALSE"
4058 AC_SUBST(ENABLE_SYMBOLS)
4060 # Debug information format for iOS. Running dsymutil takes a long time... you really need a separate
4061 # .dSYM only if running Instruments, I think. (Not for normal debugging in Xcode.) To enable a
4062 # separate .dSYM, either use --enable-release-build or change manually to "DWARF with DSYM" in Xcode.
4063 XCODE_DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
4064 if test "$enable_release_build" != yes -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE_DEBUG" -o -n "$ENABLE_DBGUTIL" \); then
4065 XCODE_DEBUG_INFORMATION_FORMAT=dwarf
4067 AC_SUBST(XCODE_DEBUG_INFORMATION_FORMAT)
4069 # Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
4070 # By default use the ones specified by our build system,
4071 # but explicit override is possible.
4072 AC_MSG_CHECKING(for explicit AFLAGS)
4073 if test -n "$AFLAGS"; then
4074 AC_MSG_RESULT([$AFLAGS])
4080 AC_MSG_CHECKING(for explicit CFLAGS)
4081 if test -n "$CFLAGS"; then
4082 AC_MSG_RESULT([$CFLAGS])
4088 AC_MSG_CHECKING(for explicit CXXFLAGS)
4089 if test -n "$CXXFLAGS"; then
4090 AC_MSG_RESULT([$CXXFLAGS])
4096 AC_MSG_CHECKING(for explicit OBJCFLAGS)
4097 if test -n "$OBJCFLAGS"; then
4098 AC_MSG_RESULT([$OBJCFLAGS])
4104 AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
4105 if test -n "$OBJCXXFLAGS"; then
4106 AC_MSG_RESULT([$OBJCXXFLAGS])
4112 AC_MSG_CHECKING(for explicit LDFLAGS)
4113 if test -n "$LDFLAGS"; then
4114 AC_MSG_RESULT([$LDFLAGS])
4124 AC_SUBST(OBJCXXFLAGS)
4128 AC_SUBST(x_CXXFLAGS)
4129 AC_SUBST(x_OBJCFLAGS)
4130 AC_SUBST(x_OBJCXXFLAGS)
4134 # determine CPUNAME, GUIBASE, ...
4148 PLATFORMID=aix_powerpc
4162 if test "$BITNESS_OVERRIDE" = 64; then
4166 PLATFORMID=windows_x86_64
4167 OUTPATH=wntmscx$COMEX
4171 PLATFORMID=windows_x86
4172 OUTPATH=wntmsci$COMEX
4176 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4179 SCPDEFS="$SCPDEFS -D_MSC_VER"
4201 PLATFORMID=macosx_powerpc
4205 if test "$BITNESS_OVERRIDE" = 64; then
4206 AC_MSG_ERROR([Can't build 64-bit code in 32-bit OS])
4210 PLATFORMID=macosx_x86
4214 if test "$BITNESS_OVERRIDE" = 64; then
4217 PLATFORMID=macosx_x86_64
4222 PLATFORMID=macosx_x86
4227 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4244 PLATFORMID=dragonfly_x86
4249 PLATFORMID=dragonfly_x86_64
4252 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4269 PLATFORMID=freebsd_x86
4275 PLATFORMID=freebsd_x86_64
4278 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4295 PLATFORMID=kfreebsd_x86
4302 PLATFORMID=kfreebsd_x86_64
4306 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4323 PLATFORMID=linux_alpha
4331 PLATFORMID=linux_arm_eabi
4335 PLATFORMID=linux_arm_oabi
4343 PLATFORMID=linux_hppa
4349 PLATFORMID=linux_x86
4355 PLATFORMID=linux_ia64
4362 PLATFORMID=linux_mips_eb
4368 EPM_FLAGS="-a mips64"
4369 PLATFORMID=linux_mips_eb
4375 EPM_FLAGS="-a mips64el"
4376 PLATFORMID=linux_mips_el
4382 EPM_FLAGS="-a mipsel"
4383 PLATFORMID=linux_mips_el
4389 PLATFORMID=linux_m68k
4395 PLATFORMID=linux_powerpc
4402 PLATFORMID=linux_powerpc64
4407 RTL_ARCH=PowerPC_64_LE
4409 PLATFORMID=linux_powerpc64_le
4415 PLATFORMID=linux_sparc
4421 PLATFORMID=linux_s390
4428 PLATFORMID=linux_s390x
4435 PLATFORMID=linux_x86_64
4439 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4456 PLATFORMID=android_arm_eabi
4460 CPUNAME=GODSON # Weird, but maybe that's the LO convention?
4462 PLATFORMID=android_mips_el
4468 PLATFORMID=android_x86
4472 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4486 if test "$BITNESS_OVERRIDE" = 64; then
4489 PLATFORMID=windows_x86_64
4490 OUTPATH=wntgccx$COMEX
4491 SOLARINC="$SOLARINC -I$SRC_ROOT/include/wntgccx"
4495 PLATFORMID=windows_x86
4496 OUTPATH=wntgcci$COMEX
4497 SOLARINC="$SOLARINC -I$SRC_ROOT/include/wntgcci"
4501 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4519 PLATFORMID=netbsd_x86
4524 PLATFORMID=netbsd_powerpc
4529 PLATFORMID=netbsd_sparc
4534 PLATFORMID=netbsd_x86_64
4537 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4554 PLATFORMID=openbsd_x86
4559 PLATFORMID=openbsd_x86_64
4562 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4565 SOLARINC="$SOLARINC -I/usr/local/include"
4580 PLATFORMID=solaris_x86
4586 PLATFORMID=solaris_sparc
4592 PLATFORMID=solaris_sparc64
4596 AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
4599 SOLARINC="$SOLARINC -I/usr/local/include"
4603 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
4607 if test "$enable_headless" = "yes"; then
4608 if test "$GUIBASE" != "unx"; then
4609 AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice with --enable-headless])
4614 WORKDIR="${BUILDDIR}/workdir"
4615 INSTDIR="${BUILDDIR}/instdir"
4616 INSTROOT="${INSTDIR}${INSTROOTSUFFIX}"
4617 SOLARINC="-I. -I$SRC_ROOT/include $SOLARINC"
4625 AC_SUBST([INSTROOT])
4630 AC_SUBST(PLATFORMID)
4631 AC_DEFINE_UNQUOTED(WORKDIR,"$WORKDIR")
4633 dnl ===================================================================
4634 dnl Test which package format to use
4635 dnl ===================================================================
4636 AC_MSG_CHECKING([which package format to use])
4637 if test -n "$with_package_format" -a "$with_package_format" != no; then
4638 for i in $with_package_format; do
4640 aix | bsd | deb | pkg | rpm | native | portable | archive | dmg | installed | msi)
4643 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
4644 aix - AIX software distribution
4645 bsd - FreeBSD, NetBSD, or OpenBSD software distribution
4646 deb - Debian software distribution
4647 pkg - Solaris software distribution
4648 rpm - RedHat software distribution
4649 native - "Native" software distribution for the platform
4650 portable - Portable software distribution
4652 LibreOffice additionally supports:
4653 archive - .tar.gz or .zip
4655 installed - installation tree
4661 PKGFORMAT="$with_package_format"
4662 AC_MSG_RESULT([$PKGFORMAT])
4665 AC_MSG_RESULT([none])
4669 dnl ===================================================================
4670 dnl Set up a different compiler to produce tools to run on the build
4671 dnl machine when doing cross-compilation
4672 dnl ===================================================================
4674 m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
4675 if test "$cross_compiling" = "yes"; then
4676 AC_MSG_CHECKING([for BUILD platform configuration])
4678 rm -rf CONF-FOR-BUILD config_build.mk
4679 mkdir CONF-FOR-BUILD
4680 # Here must be listed all files needed when running the configure script. In particular, also
4681 # those expanded by the AC_CONFIG_FILES() call near the end of this configure.ac. For clarity,
4682 # keep them in the same order as there.
4683 (cd $SRC_ROOT && tar cf - \
4685 bin/get_config_variables \
4686 solenv/bin/getcompver.awk \
4687 solenv/inc/langlist.mk \
4691 instsetoo_native/util/openoffice.lst.in \
4693 sysui/desktop/macosx/Info.plist.in \
4694 ios/lo.xcconfig.in \
4695 ure/source/unorc.in) \
4696 | (cd CONF-FOR-BUILD && tar xf -)
4697 cp configure CONF-FOR-BUILD
4698 test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host 2>/dev/null
4700 unset COM GUIBASE OS CPUNAME
4701 unset CC CXX SYSBASE CFLAGS
4702 unset AR NM OBJDUMP PKG_CONFIG RANLIB READELF STRIP
4703 unset CPPUNIT_CFLAGS CPPUNIT_LIBS
4704 unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC
4705 test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
4706 test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
4707 test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
4710 test -n "$enable_ccache" && sub_conf_opts="$sub_conf_opts --enable-ccache=$enable_ccache"
4711 test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
4712 test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
4713 test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
4714 test -n "$with_system_boost_for_build" && sub_conf_opts="$sub_conf_opts --with-system-boost"
4715 test -n "$with_system_cppunit_for_build" && sub_conf_opts="$sub_conf_opts --with-system-cppunit"
4716 test -n "$with_system_expat_for_build" && sub_conf_opts="$sub_conf_opts --with-system-expat"
4717 test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu"
4718 test -n "$with_system_libxml_for_build" && sub_conf_opts="$sub_conf_opts --with-system-libxml"
4719 # we need the msi build tools on mingw if we are creating the
4721 if test "$WITH_MINGW" = "yes"; then
4722 enable_winegcc_for_build=
4723 for pkgformat in $PKGFORMAT; do
4724 case "$pkgformat" in
4725 msi|native) enable_winegcc_for_build=yes ;;
4728 test -n "$enable_winegcc_for_build" && sub_conf_opts="$sub_conf_opts --enable-winegcc"
4730 sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
4731 # Don't bother having configure look for stuff not needed for the build platform anyway
4733 --disable-graphite \
4734 --disable-pdfimport \
4735 --disable-postgresql-sdbc \
4736 --with-parallelism="$with_parallelism" \
4741 2>&1 | sed -e 's/^/ /'
4742 test -f ./config_host.mk 2>/dev/null || exit
4743 cp config_host.mk ../config_build.mk
4744 mv config.log ../config.Build.log
4745 mkdir -p ../config_build
4746 mv config_host/*.h ../config_build
4747 . ./bin/get_config_variables CC CXX INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS PATH SDKDIRNAME SYSTEM_LIBXSLT WORKDIR
4749 for V in CC CXX LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS SDKDIRNAME SYSTEM_LIBXSLT; do
4751 VV=`eval "echo $VV"`
4752 if test -n "$VV"; then
4753 line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
4754 echo "$line" >>build-config
4758 for V in INSTDIR INSTROOT WORKDIR; do
4760 VV=`eval "echo $VV"`
4761 VV=`echo $VV | sed -e "s,/CONF-FOR-BUILD/\([[a-z]]*\),/\1_for_build,g"`
4762 if test -n "$VV"; then
4763 line="${V}_FOR_BUILD='$VV'"
4764 echo "$line" >>build-config
4768 line=`echo "LO_PATH_FOR_BUILD=$PATH" | sed -e 's,/CONF-FOR-BUILD,,g'`
4769 echo "$line" >>build-config
4772 test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
4773 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])
4774 perl -pi -e 's,/(workdir|instdir)(/|$),/\1_for_build\2,g;' \
4775 -e 's,/CONF-FOR-BUILD,,g;' config_build.mk
4777 eval `cat CONF-FOR-BUILD/build-config`
4779 AC_MSG_RESULT([checking for BUILD platform configuration... done])
4781 rm -rf CONF-FOR-BUILD
4785 CXX_FOR_BUILD="$CXX"
4786 INSTDIR_FOR_BUILD="$INSTDIR"
4787 INSTROOT_FOR_BUILD="$INSTROOT"
4788 LIBO_BIN_FOLDER_FOR_BUILD="$LIBO_BIN_FOLDER"
4789 LIBO_LIB_FOLDER_FOR_BUILD="$LIBO_LIB_FOLDER"
4790 LIBO_URE_LIB_FOLDER_FOR_BUILD="$LIBO_URE_LIB_FOLDER"
4791 SDKDIRNAME_FOR_BUILD="$SDKDIRNAME"
4792 WORKDIR_FOR_BUILD="$WORKDIR"
4794 AC_SUBST(OS_FOR_BUILD)
4795 AC_SUBST(INSTDIR_FOR_BUILD)
4796 AC_SUBST(INSTROOT_FOR_BUILD)
4797 AC_SUBST(LIBO_BIN_FOLDER_FOR_BUILD)
4798 AC_SUBST(LIBO_LIB_FOLDER_FOR_BUILD)
4799 AC_SUBST(LIBO_URE_LIB_FOLDER_FOR_BUILD)
4800 AC_SUBST(SDKDIRNAME_FOR_BUILD)
4801 AC_SUBST(WORKDIR_FOR_BUILD)
4803 dnl ===================================================================
4804 dnl Check for syslog header
4805 dnl ===================================================================
4806 AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG_H))
4808 dnl ===================================================================
4809 dnl Set the ENABLE_CRASHDUMP variable.
4810 dnl ===================================================================
4811 AC_MSG_CHECKING([whether to enable crashdump feature])
4812 if test "$enable_crashdump" = "yes"; then
4813 ENABLE_CRASHDUMP="TRUE"
4814 BUILD_TYPE="$BUILD_TYPE CRASHREP"
4815 AC_MSG_RESULT([yes])
4820 AC_SUBST(ENABLE_CRASHDUMP)
4823 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
4824 dnl ===================================================================
4825 AC_MSG_CHECKING([whether to turn warnings to errors])
4826 if test -n "$enable_werror" -a "$enable_werror" != "no"; then
4827 ENABLE_WERROR="TRUE"
4828 AC_MSG_RESULT([yes])
4832 AC_SUBST(ENABLE_WERROR)
4834 dnl Set the ASSERT_ALWAYS_ABORT variable. (Activate --enable-assert-always-abort)
4835 dnl ===================================================================
4836 AC_MSG_CHECKING([whether to have assert to abort in release code])
4837 if test -n "$enable_assert_always_abort" -a "$enable_assert_always_abort" = "yes"; then
4838 ASSERT_ALWAYS_ABORT="TRUE"
4839 AC_MSG_RESULT([yes])
4841 ASSERT_ALWAYS_ABORT="FALSE"
4844 AC_SUBST(ASSERT_ALWAYS_ABORT)
4846 # Determine whether to use ooenv for the instdir installation
4847 # ===================================================================
4848 if test $_os != "WINNT" -a $_os != "Darwin"; then
4849 AC_MSG_CHECKING([whether to use ooenv for the instdir installation])
4850 if test "$enable_ooenv" = "no"; then
4854 AC_MSG_RESULT([yes])
4857 AC_SUBST(ENABLE_OOENV)
4859 if test "$enable_headless" = "yes"; then
4860 # be sure to do not mess with uneeded stuff
4868 build_gstreamer_0_10=no
4872 enable_cairo_canvas=no
4876 dnl ===================================================================
4877 dnl check for cups support
4878 dnl ===================================================================
4881 if test "$enable_cups" = "no"; then
4885 AC_MSG_CHECKING([whether to enable CUPS support])
4886 if test "$test_cups" = "yes"; then
4888 AC_MSG_RESULT([yes])
4890 AC_MSG_CHECKING([whether cups support is present])
4891 AC_CHECK_LIB([cups], [cupsPrintFiles], [:])
4892 AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
4893 if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -o "$ac_cv_header_cups_cups_h" != "yes"; then
4894 AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups-devel.])
4901 AC_SUBST(ENABLE_CUPS)
4904 if test "$test_fontconfig" = "yes"; then
4905 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.4.1])
4906 SYSTEM_FONTCONFIG=TRUE
4908 AC_SUBST(FONTCONFIG_CFLAGS)
4909 AC_SUBST(FONTCONFIG_LIBS)
4910 AC_SUBST([SYSTEM_FONTCONFIG])
4912 dnl whether to find & fetch external tarballs?
4913 dnl ===================================================================
4914 if test -z "$TARFILE_LOCATION"; then
4915 if test -d "$SRC_ROOT/src" ; then
4916 mv "$SRC_ROOT/src" "$SRC_ROOT/external/tarballs"
4917 ln -s "$SRC_ROOT/external/tarballs" "$SRC_ROOT/src"
4919 TARFILE_LOCATION="$SRC_ROOT/external/tarballs"
4921 AbsolutePath "$TARFILE_LOCATION"
4922 TARFILE_LOCATION="${absolute_path}"
4924 AC_SUBST(TARFILE_LOCATION)
4926 AC_MSG_CHECKING([whether we want to fetch tarballs])
4927 if test "$enable_fetch_external" != "no"; then
4928 if test "$with_all_tarballs" = "yes"; then
4929 AC_MSG_RESULT(["yes, all of them"])
4930 DO_FETCH_TARBALLS="ALL"
4932 AC_MSG_RESULT(["yes, if we use them"])
4933 DO_FETCH_TARBALLS="TRUE"
4939 AC_SUBST(DO_FETCH_TARBALLS)
4941 AC_MSG_CHECKING([whether to build help])
4942 HELP_COMMON_ONLY=FALSE
4943 if test -n "$with_help" -a "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
4944 BUILD_TYPE="$BUILD_TYPE HELP"
4945 GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
4946 if test "$with_help" = "common" ; then
4947 HELP_COMMON_ONLY=TRUE
4948 AC_MSG_RESULT([common only])
4950 SCPDEFS="$SCPDEFS -DWITH_HELP"
4951 AC_MSG_RESULT([yes])
4956 AC_SUBST(HELP_COMMON_ONLY)
4958 dnl Test whether to include MySpell dictionaries
4959 dnl ===================================================================
4960 AC_MSG_CHECKING([whether to include MySpell dictionaries])
4961 if test "$with_myspell_dicts" = "yes"; then
4962 AC_MSG_RESULT([yes])
4963 WITH_MYSPELL_DICTS=TRUE
4964 BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
4965 GIT_NEEDED_SUBMODULES="dictionaries $GIT_NEEDED_SUBMODULES"
4970 AC_SUBST(WITH_MYSPELL_DICTS)
4972 # There are no "system" myspell, hyphen or mythes dictionaries on OS X, Windows, Android or iOS.
4973 if test $_os = Darwin -o $_os = WINNT -o $_os = iOS -o $_os = Android; then
4974 if test "$with_system_dicts" = yes; then
4975 AC_MSG_ERROR([There are no system dicts on this OS in the formats the 3rd-party libs we use expect]);
4977 with_system_dicts=no
4980 AC_MSG_CHECKING([whether to use dicts from external paths])
4981 if test -z "$with_system_dicts" -o "$with_system_dicts" != "no"; then
4982 AC_MSG_RESULT([yes])
4984 AC_MSG_CHECKING([for spelling dictionary directory])
4985 if test -n "$with_external_dict_dir"; then
4986 DICT_SYSTEM_DIR=file://$with_external_dict_dir
4988 DICT_SYSTEM_DIR=file:///usr/share/hunspell
4989 if test ! -d /usr/share/hunspell -a -d /usr/share/myspell; then
4990 DICT_SYSTEM_DIR=file:///usr/share/myspell
4993 AC_MSG_RESULT([$DICT_SYSTEM_DIR])
4994 AC_MSG_CHECKING([for hyphenation patterns directory])
4995 if test -n "$with_external_hyph_dir"; then
4996 HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
4998 HYPH_SYSTEM_DIR=file:///usr/share/hyphen
5000 AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
5001 AC_MSG_CHECKING([for thesaurus directory])
5002 if test -n "$with_external_thes_dir"; then
5003 THES_SYSTEM_DIR=file://$with_external_thes_dir
5005 THES_SYSTEM_DIR=file:///usr/share/mythes
5007 AC_MSG_RESULT([$THES_SYSTEM_DIR])
5012 AC_SUBST(SYSTEM_DICTS)
5013 AC_SUBST(DICT_SYSTEM_DIR)
5014 AC_SUBST(HYPH_SYSTEM_DIR)
5015 AC_SUBST(THES_SYSTEM_DIR)
5017 dnl ===================================================================
5018 AC_MSG_CHECKING([whether to enable pch feature])
5019 if test -n "$enable_pch" && test "$enable_pch" != "no"; then
5020 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
5022 AC_MSG_RESULT([yes])
5023 elif test "$GCC" = "yes"; then
5025 AC_MSG_RESULT([yes])
5028 AC_MSG_ERROR([Precompiled header not yet supported for your platform/compiler])
5034 AC_SUBST(ENABLE_PCH)
5036 dnl ===================================================================
5037 dnl Search all the common names for GNU make
5038 dnl ===================================================================
5039 AC_MSG_CHECKING([for GNU make])
5041 # try to use our own make if it is available and GNUMAKE was not already defined
5042 if test -z "$GNUMAKE"; then
5043 if test -x "/opt/lo/bin/make"; then
5044 GNUMAKE="/opt/lo/bin/make"
5048 for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do
5049 if test -n "$a"; then
5050 $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
5051 if test $? -eq 0; then
5052 if test "$build_os" = "cygwin"; then
5053 if test -n "$($a -v | grep 'Built for Windows')" ; then
5054 AC_MSG_NOTICE([$a is a native Win32 make, which is not supported on this old branch.])
5067 AC_MSG_RESULT($GNUMAKE)
5068 if test -z "$GNUMAKE"; then
5069 AC_MSG_ERROR([not found. install GNU make.])
5074 AC_MSG_CHECKING([the GNU make version])
5075 _make_version=`$GNUMAKE --version | grep GNU | $GREP -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
5076 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
5077 if test "$_make_longver" -ge "038200"; then
5078 AC_MSG_RESULT([$GNUMAKE $_make_version])
5080 elif test "$_make_longver" -ge "038100"; then
5081 if test "$build_os" = "cygwin"; then
5082 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.82 needed])
5084 AC_MSG_RESULT([$GNUMAKE $_make_version])
5086 dnl ===================================================================
5087 dnl Search all the common names for sha1sum
5088 dnl ===================================================================
5089 AC_CHECK_PROGS(SHA1SUM, sha1sum sha1 shasum openssl)
5090 if test -z "$SHA1SUM"; then
5091 AC_MSG_ERROR([install the approproate SHA-1 checksumming program for this OS])
5092 elif test "$SHA1SUM" = "openssl"; then
5093 SHA1SUM="openssl sha1"
5095 AC_MSG_CHECKING([for GNU make bug 20033])
5096 TESTGMAKEBUG20033=`mktemp -d tmp.XXXXXX`
5097 $SED -e "s/<TAB>/$TAB/g" > $TESTGMAKEBUG20033/Makefile << EOF
5098 A := \$(wildcard *.a)
5102 <TAB>@echo survived bug20033.
5106 <TAB>@touch 1.a 2.a 3.a 4.a 5.a 6.a
5119 <TAB>\$(eval CHECKSUM := \$(word 1,\$(shell cat \$^ | $SHA1SUM))) \$(if \$(wildcard \$(CACHEDIR)/\$(CHECKSUM)),\
5120 <TAB>\$(call d1,\$(CHECKSUM)),\
5121 <TAB>\$(call d2,\$(CHECKSUM)))
5123 if test -z "`(cd $TESTGMAKEBUG20033 && $GNUMAKE setup && $GNUMAKE -j)|grep survived`"; then
5124 no_parallelism_make="YES"
5125 AC_MSG_RESULT([yes, disable parallelism])
5127 AC_MSG_RESULT([no, keep parallelism enabled])
5129 rm -rf $TESTGMAKEBUG20033
5131 AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
5134 # find if gnumake support file function
5135 AC_MSG_CHECKING([whether GNU make supports the 'file' function])
5136 TESTGMAKEFILEFUNC="`mktemp -d -t tst.XXXXXX`"
5137 $SED -e "s/<TAB>/$TAB/" > $TESTGMAKEFILEFUNC/Makefile << EOF
5138 \$(file >test.txt,Success )
5145 $GNUMAKE -C $TESTGMAKEFILEFUNC 2>/dev/null 1>&2
5146 if test -f $TESTGMAKEFILEFUNC/test.txt; then
5147 HAVE_GNUMAKE_FILE_FUNC=TRUE
5148 AC_MSG_RESULT([yes])
5152 rm -rf $TESTGMAKEFILEFUNC
5153 AC_SUBST(HAVE_GNUMAKE_FILE_FUNC)
5156 _make_ver_check=`$GNUMAKE --version | grep LibreOffice`
5159 if test "$_make_ver_check" = ""; then
5163 HAVE_LD_HASH_STYLE=FALSE
5164 WITH_LINKER_HASH_STYLE=
5165 AC_MSG_CHECKING( for --hash-style gcc linker support )
5166 if test "$GCC" = "yes"; then
5167 if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes"; then
5168 hash_styles="gnu sysv"
5169 elif test "$with_linker_hash_style" = "no"; then
5172 hash_styles="$with_linker_hash_style"
5175 for hash_style in $hash_styles; do
5176 test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
5177 hash_style_ldflags_save=$LDFLAGS
5178 LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
5180 AC_LINK_IFELSE([AC_LANG_PROGRAM(
5186 [ if ./conftest$EXEEXT; then
5187 HAVE_LD_HASH_STYLE=TRUE
5188 WITH_LINKER_HASH_STYLE=$hash_style
5190 [HAVE_LD_HASH_STYLE=FALSE])
5191 LDFLAGS=$hash_style_ldflags_save
5194 if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
5195 AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
5199 LDFLAGS=$hash_style_ldflags_save
5203 AC_SUBST(HAVE_LD_HASH_STYLE)
5204 AC_SUBST(WITH_LINKER_HASH_STYLE)
5206 dnl ===================================================================
5207 dnl Check whether there's a Perl version available.
5208 dnl ===================================================================
5209 if test -z "$with_perl_home"; then
5210 AC_PATH_PROG(PERL, perl)
5212 test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
5213 _perl_path="$with_perl_home/bin/perl"
5214 if test -x "$_perl_path"; then
5217 AC_MSG_ERROR([$_perl_path not found])
5221 dnl ===================================================================
5222 dnl Testing for Perl version 5 or greater.
5223 dnl $] is the Perl version variable, it is returned as an integer
5224 dnl ===================================================================
5225 if test "$PERL"; then
5226 AC_MSG_CHECKING([the Perl version])
5227 ${PERL} -e "exit($]);"
5229 if test "$_perl_version" -lt 5; then
5230 AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl])
5232 AC_MSG_RESULT([checked (perl $_perl_version)])
5234 AC_MSG_ERROR([Perl not found, install version 5 of Perl])
5237 dnl ===================================================================
5238 dnl Testing for required Perl modules
5239 dnl ===================================================================
5241 AC_MSG_CHECKING([for required Perl modules])
5242 if `$PERL -e 'use Archive::Zip; use Cwd; use Digest::MD5'>/dev/null 2>&1`; then
5243 AC_MSG_RESULT([all modules found])
5245 AC_MSG_RESULT([failed to find some modules])
5246 # Find out which modules are missing.
5247 missing_perl_modules=
5248 if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then
5249 missing_perl_modules=Archive::Zip
5251 if ! `$PERL -e 'use Cwd;'>/dev/null 2>&1`; then
5252 missing_perl_modules="$missing_perl_modules Cwd"
5254 if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then
5255 missing_perl_modules="$missing_perl_modules Digest::MD5"
5258 The missing Perl modules are: $missing_perl_modules
5259 Install them as superuser/administrator with "cpan -i $missing_perl_modules"])
5262 dnl ===================================================================
5263 dnl Check for pkg-config
5264 dnl ===================================================================
5265 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5269 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5271 # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
5272 # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
5273 # explicitly. Or put /path/to/compiler in PATH yourself.
5275 AC_CHECK_TOOL(AR,ar)
5276 AC_CHECK_TOOL(NM,nm)
5277 AC_CHECK_TOOL(OBJDUMP,objdump)
5278 AC_CHECK_TOOL(RANLIB,ranlib)
5279 AC_CHECK_TOOL(READELF,readelf)
5280 AC_CHECK_TOOL(STRIP,strip)
5281 if test "$_os" = "WINNT"; then
5282 AC_CHECK_TOOL(DLLTOOL,dlltool)
5283 AC_CHECK_TOOL(WINDRES,windres)
5290 AC_SUBST(PKG_CONFIG)
5296 dnl ===================================================================
5297 dnl pkg-config checks on Mac OS X
5298 dnl ===================================================================
5300 if test $_os = Darwin; then
5301 AC_MSG_CHECKING([for bogus pkg-config])
5302 if test -n "$PKG_CONFIG"; then
5303 if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | $GREP -q Mono.framework; then
5304 AC_MSG_ERROR([yes, from Mono. This *will* break the build. Please remove or hide $PKG_CONFIG])
5306 if test "$enable_bogus_pkg_config" = "yes"; then
5307 AC_MSG_RESULT([yes, user-approved from unknown origin.])
5309 AC_MSG_ERROR([yes, from unknown origin. This *will* break the build. Please remove or hide $PKG_CONFIG])
5313 AC_MSG_RESULT([no, good])
5319 # Return value: $csctest
5323 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client/InstallPath"
5324 if test -n "$regvalue"; then
5332 # Return value: $altest
5336 for x in `ls /proc/registry32/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft\ SDKs/Windows`; do
5337 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/$x/WinSDK-NetFx40Tools/InstallationFolder"
5338 if test -n "$regvalue" -a \( -f "$regvalue/al.exe" -o -f "$regvalue/bin/al.exe" \); then
5347 # Return value: $frametest (that's a silly name...)
5351 for ver in 1.1 2.0; do
5352 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/.NETFramework/sdkInstallRootv$ver
5353 if test -n "$regvalue"; then
5360 find_winsdk_version()
5362 # Args: $1 : SDK version as in "6.0A", "7.0" etc
5363 # Return value: $winsdktest
5367 # Why we look for them in this particular order I don't know. But OTOH I
5370 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/InstallationFolder"
5371 if test -n "$regvalue"; then
5372 winsdktest=$regvalue
5377 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot"
5378 if test -n "$regvalue"; then
5379 winsdktest=$regvalue
5388 # Args: $1 (optional) : list of acceptable SDK versions
5389 # Return value: $winsdktest
5393 if test -n "$1"; then
5396 sdkversions="$WINDOWS_SDK_ACCEPTABLE_VERSIONS"
5399 for ver in $sdkversions; do
5400 find_winsdk_version $ver
5401 if test -n "$winsdktest"; then
5409 for ver in 10.0 11.0; do
5410 reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VS/MSMDir
5411 if test -n "$regvalue"; then
5412 if test -e "$regvalue/Microsoft_VC${VCVER}_CRT_x86.msm"; then
5418 if test -z "$msmdir"; then
5419 AC_MSG_NOTICE([no registry entry for Merge Module directory - trying "${COMMONPROGRAMFILES}/Merge Modules/"])
5420 msmdir="${COMMONPROGRAMFILES}/Merge Modules/"
5422 msmdir=`cygpath -m "$msmdir"`
5423 if test -z "$msmdir"; then
5424 if test "$ENABLE_RELEASE_BUILD" = "TRUE" ; then
5425 AC_MSG_ERROR([Merge modules not found in $msmdir])
5427 AC_MSG_WARN([Merge modules not found in $msmdir])
5433 find_msvc_x64_dlls()
5435 msvcdllpath="$VC_PRODUCT_DIR/redist/x64/Microsoft.VC${VCVER}.CRT"
5436 msvcdlls="msvcp${VCVER}.dll msvcr${VCVER}.dll"
5437 for dll in $msvcdlls; do
5438 if ! test -f "$msvcdllpath/$dll"; then
5439 AC_MSG_ERROR([can not find $dll in $msvcdllpath])
5444 if test "$build_os" = "cygwin"; then
5446 AC_MSG_CHECKING([for midl.exe])
5449 if test -f "$winsdktest/Bin/midl.exe"; then
5450 MIDL_PATH="$winsdktest/Bin"
5451 elif test -f "$winsdktest/Bin/$WINDOWS_SDK_ARCH/midl.exe"; then
5452 MIDL_PATH="$winsdktest/Bin/$WINDOWS_SDK_ARCH"
5454 if test ! -f "$MIDL_PATH/midl.exe"; then
5455 AC_MSG_ERROR([midl.exe not found in $winsdktest/Bin/$WINDOWS_SDK_ARCH, Windows SDK installation broken?])
5457 AC_MSG_RESULT([$MIDL_PATH/midl.exe])
5460 # Convert to posix path with 8.3 filename restrictions ( No spaces )
5461 MIDL_PATH=`cygpath -d "$MIDL_PATH"`
5462 MIDL_PATH=`cygpath -u "$MIDL_PATH"`
5465 AC_MSG_CHECKING([for csc.exe])
5467 if test -f "$csctest/csc.exe"; then
5470 if test ! -f "$CSC_PATH/csc.exe"; then
5471 AC_MSG_ERROR([csc.exe not found as $CSC_PATH/csc.exe])
5473 AC_MSG_RESULT([$CSC_PATH/csc.exe])
5476 CSC_PATH=`cygpath -d "$CSC_PATH"`
5477 CSC_PATH=`cygpath -u "$CSC_PATH"`
5480 AC_MSG_CHECKING([for al.exe])
5482 if test -f "$winsdktest/Bin/al.exe"; then
5483 AL_PATH="$winsdktest/Bin"
5484 elif test -f "$winsdktest/Bin/$WINDOWS_SDK_ARCH/al.exe"; then
5485 AL_PATH="$winsdktest/Bin/$WINDOWS_SDK_ARCH"
5488 if test -z "$AL_PATH"; then
5490 if test -f "$altest/bin/al.exe"; then
5491 AL_PATH="$altest/bin"
5492 elif test -f "$altest/al.exe"; then
5496 if test ! -f "$AL_PATH/al.exe"; then
5497 AC_MSG_ERROR([al.exe not found as $AL_PATH/al.exe])
5499 AC_MSG_RESULT([$AL_PATH/al.exe])
5502 AL_PATH=`cygpath -d "$AL_PATH"`
5503 AL_PATH=`cygpath -u "$AL_PATH"`
5505 dnl Check mscoree.lib / .NET Framework dir
5506 AC_MSG_CHECKING(.NET Framework)
5508 if test -f "$frametest/lib/mscoree.lib"; then
5509 DOTNET_FRAMEWORK_HOME="$frametest"
5512 if test -f "$winsdktest/lib/mscoree.lib" -o -f "$winsdktest/lib/win8/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
5513 DOTNET_FRAMEWORK_HOME="$winsdktest"
5517 if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib" -a ! -f "$DOTNET_FRAMEWORK_HOME/lib/win8/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
5518 AC_MSG_ERROR([mscoree.lib (.NET Framework) not found])
5520 AC_MSG_RESULT(found)
5522 PathFormat "$MIDL_PATH"
5523 MIDL_PATH="$formatted_path"
5525 PathFormat "$AL_PATH"
5526 AL_PATH="$formatted_path"
5528 PathFormat "$DOTNET_FRAMEWORK_HOME"
5529 DOTNET_FRAMEWORK_HOME="$formatted_path"
5531 PathFormat "$CSC_PATH"
5532 CSC_PATH="$formatted_path"
5535 dnl ===================================================================
5536 dnl Check if stdc headers are available excluding MSVC.
5537 dnl ===================================================================
5538 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5542 dnl ===================================================================
5543 dnl Testing for C++ compiler and version...
5544 dnl ===================================================================
5546 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5547 # AC_PROG_CXX sets CXXFLAGS to -g -O2 if not set, avoid that
5548 save_CXXFLAGS=$CXXFLAGS
5550 CXXFLAGS=$save_CXXFLAGS
5552 if test -n "$CC" -a -z "$CXX"; then
5557 dnl check for GNU C++ compiler version
5558 if test "$GXX" = "yes"; then
5559 AC_MSG_CHECKING([the GNU C++ compiler version])
5561 _gpp_version=`$CXX -dumpversion`
5562 _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
5564 if test "$_gpp_majmin" -lt "401"; then
5565 AC_MSG_ERROR([You need to use GNU C++ compiler version >= 4.1 to build LibreOffice, you have $_gpp_version.])
5567 AC_MSG_RESULT([checked (g++ $_gpp_version)])
5570 dnl see https://code.google.com/p/android/issues/detail?id=41770
5571 if test "$_gpp_majmin" -ge "401"; then
5575 AC_MSG_CHECKING([whether $CXX is broken with boost.thread])
5576 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
5577 #include <bits/c++config.h>]],[[
5578 #if !defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
5579 && !defined(_GLIBCXX__PTHREADS) \
5580 && !defined(_GLIBCXX_HAS_GTHREADS)
5583 ]])],[AC_MSG_RESULT([yes])
5584 glibcxx_threads=yes],[AC_MSG_RESULT([no])])
5586 if test $glibcxx_threads = yes; then
5587 BOOST_CXXFLAGS="-D_GLIBCXX_HAS_GTHREADS"
5591 AC_SUBST(BOOST_CXXFLAGS)
5594 # prefx CXX with ccache if needed
5596 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5597 if test "$CCACHE" != ""; then
5598 AC_MSG_CHECKING([whether $CXX is already ccached])
5600 save_CXXFLAGS=$CXXFLAGS
5601 CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
5602 dnl an empty program will do, we're checking the compiler flags
5603 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
5604 [use_ccache=yes], [use_ccache=no])
5605 if test $use_ccache = yes; then
5606 AC_MSG_RESULT([yes])
5611 CXXFLAGS=$save_CXXFLAGS
5616 dnl ===================================================================
5617 dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
5618 dnl ===================================================================
5620 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5623 dnl Check whether there's a C pre-processor.
5624 dnl ===================================================================
5625 dnl When using SunStudio compiler, there is a bug with the cc
5626 dnl preprocessor, so use CC preprocessor as the cc preprocessor
5627 dnl See Issuezilla #445.
5628 dnl ===================================================================
5629 if test "$_os" = "SunOS"; then
5637 dnl ===================================================================
5638 dnl Find integral type sizes and alignments
5639 dnl ===================================================================
5641 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
5643 AC_CHECK_SIZEOF(long)
5644 AC_CHECK_SIZEOF(short)
5645 AC_CHECK_SIZEOF(int)
5646 AC_CHECK_SIZEOF(long long)
5647 AC_CHECK_SIZEOF(double)
5648 AC_CHECK_SIZEOF(void*)
5650 SAL_TYPES_SIZEOFSHORT=$ac_cv_sizeof_short
5651 SAL_TYPES_SIZEOFINT=$ac_cv_sizeof_int
5652 SAL_TYPES_SIZEOFLONG=$ac_cv_sizeof_long
5653 SAL_TYPES_SIZEOFLONGLONG=$ac_cv_sizeof_long_long
5654 SAL_TYPES_SIZEOFPOINTER=$ac_cv_sizeof_voidp
5656 dnl Allow build without AC_CHECK_ALIGNOF, grrr
5657 m4_pattern_allow([AC_CHECK_ALIGNOF])
5658 m4_ifdef([AC_CHECK_ALIGNOF],
5660 AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
5661 AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
5662 AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
5663 AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
5666 case "$_os-$host_cpu" in
5668 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
5669 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
5670 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=4
5671 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=4
5674 test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
5675 test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
5676 test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=8
5677 test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=8
5680 if test -z "$ac_cv_alignof_short" -o \
5681 -z "$ac_cv_alignof_int" -o \
5682 -z "$ac_cv_alignof_long" -o \
5683 -z "$ac_cv_alignof_double"; then
5684 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.])
5690 SAL_TYPES_ALIGNMENT2=$ac_cv_alignof_short
5691 SAL_TYPES_ALIGNMENT4=$ac_cv_alignof_int
5692 if test $ac_cv_sizeof_long -eq 8; then
5693 SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_long
5694 elif test $ac_cv_sizeof_double -eq 8; then
5695 SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_double
5697 AC_MSG_ERROR([Cannot find alignment of 8 byte types.])
5700 dnl Check for large file support
5702 if test -n "$ac_cv_sys_file_offset_bits" -a "$ac_cv_sys_file_offset_bits" != "no"; then
5703 LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5705 if test -n "$ac_cv_sys_large_files" -a "$ac_cv_sys_large_files" != "no"; then
5706 LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
5710 SAL_TYPES_SIZEOFSHORT=2
5711 SAL_TYPES_SIZEOFINT=4
5712 SAL_TYPES_SIZEOFLONG=4
5713 SAL_TYPES_SIZEOFLONGLONG=8
5714 if test "$BITNESS_OVERRIDE" = ""; then
5715 SAL_TYPES_SIZEOFPOINTER=4
5717 SAL_TYPES_SIZEOFPOINTER=8
5719 SAL_TYPES_ALIGNMENT2=2
5720 SAL_TYPES_ALIGNMENT4=4
5721 SAL_TYPES_ALIGNMENT8=8
5724 AC_SUBST(LFS_CFLAGS)
5726 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFSHORT,$SAL_TYPES_SIZEOFSHORT)
5727 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFINT,$SAL_TYPES_SIZEOFINT)
5728 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONG,$SAL_TYPES_SIZEOFLONG)
5729 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONGLONG,$SAL_TYPES_SIZEOFLONGLONG)
5730 AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFPOINTER,$SAL_TYPES_SIZEOFPOINTER)
5731 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT2,$SAL_TYPES_ALIGNMENT2)
5732 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT4,$SAL_TYPES_ALIGNMENT4)
5733 AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT8,$SAL_TYPES_ALIGNMENT8)
5735 dnl ===================================================================
5736 dnl Check whether to enable runtime optimizations
5737 dnl ===================================================================
5738 ENABLE_RUNTIME_OPTIMIZATIONS=
5739 AC_MSG_CHECKING([whether to enable runtime optimizations])
5740 if test -z "$enable_runtime_optimizations"; then
5744 enable_runtime_optimizations=no
5750 if test "$enable_runtime_optimizations" != no; then
5751 ENABLE_RUNTIME_OPTIMIZATIONS=TRUE
5752 AC_DEFINE(ENABLE_RUNTIME_OPTIMIZATIONS)
5753 AC_MSG_RESULT([yes])
5757 AC_SUBST([ENABLE_RUNTIME_OPTIMIZATIONS])
5759 dnl ===================================================================
5760 dnl Check if valgrind headers are available
5761 dnl ===================================================================
5763 if test "$cross_compiling" != yes; then
5764 prev_cppflags=$CPPFLAGS
5765 # Is VALGRIND_CFLAGS something one is supposed to have in the environment,
5766 # or where does it come from?
5767 CPPFLAGS="$CPPFLAGS $VALGRIND_CFLAGS"
5768 AC_CHECK_HEADER([valgrind/valgrind.h],
5769 [ENABLE_VALGRIND=TRUE])
5770 CPPFLAGS=$prev_cppflags
5772 AC_SUBST([ENABLE_VALGRIND])
5773 if test -z "$ENABLE_VALGRIND"; then
5776 AC_SUBST([VALGRIND_CFLAGS])
5779 dnl ===================================================================
5780 dnl Check if SDT probes (for systemtap, gdb, dtrace) are available
5781 dnl ===================================================================
5783 # We need at least the sys/sdt.h include header.
5784 AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='TRUE'], [SDT_H_FOUND='FALSE'])
5785 if test "$SDT_H_FOUND" = "TRUE"; then
5786 # Found sys/sdt.h header, now make sure the c++ compiler works.
5787 # Old g++ versions had problems with probes in constructors/destructors.
5788 AC_MSG_CHECKING([working sys/sdt.h and c++ support])
5790 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5791 #include <sys/sdt.h>
5799 ProbeClass(int& v, const char *n) : ref(v), name(n)
5801 DTRACE_PROBE2(_test_, cons, name, ref);
5804 void method(int min)
5806 DTRACE_PROBE3(_test_, meth, name, ref, min);
5812 DTRACE_PROBE2(_test_, dest, name, ref);
5817 DTRACE_PROBE1(_test_, call, i);
5818 ProbeClass inst = ProbeClass(i, "call");
5820 ]])], [AC_MSG_RESULT([yes]); AC_DEFINE([USE_SDT_PROBES])],
5821 [AC_MSG_RESULT([no, sdt.h or c++ compiler too old])])
5824 AC_CONFIG_HEADERS([config_host/config_probes.h])
5826 dnl ===================================================================
5827 dnl Set the MinGW sys-root
5828 dnl ===================================================================
5829 if test "$WITH_MINGW" = "yes"; then
5830 AC_MSG_CHECKING([for MinGW sysroot])
5831 sysroot=`$CC -print-sysroot`
5832 AS_IF([test -d "$sysroot"/mingw],
5833 [MINGW_SYSROOT="$sysroot"/mingw
5834 AC_MSG_RESULT([$MINGW_SYSROOT])],
5835 [AC_MSG_RESULT([not found])
5836 AC_MSG_ERROR([cannot determine MinGW sysroot])])
5838 AC_SUBST([MINGW_DLLS])
5839 AC_SUBST([MINGW_SYSROOT])
5841 dnl ===================================================================
5842 dnl Set the MinGW include directories
5843 dnl ===================================================================
5844 if test "$WITH_MINGW" = "yes"; then
5845 AC_MSG_CHECKING([for MinGW include path])
5846 cat >conftest.$ac_ext <<_ACEOF
5848 #include <bits/c++config.h>
5850 _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`
5852 if test -z "$_mingw_lib_include_path"; then
5853 _mingw_lib_include_path="NO_LIB_INCLUDE"
5854 AC_MSG_RESULT([no MinGW include path])
5856 AC_MSG_RESULT([$_mingw_lib_include_path])
5858 MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
5859 AC_SUBST(MINGW_LIB_INCLUDE_PATH)
5863 AC_MSG_CHECKING([for dynamic libgcc])
5864 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5866 using namespace std;
5867 ]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[
5868 MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's@.*DLL Name: @@'`
5869 if test -n "$MINGW_GCCDLL"; then
5870 MINGW_SHARED_GCCLIB=TRUE
5871 AC_MSG_RESULT([ $MINGW_GCCDLL])
5873 MINGW_SHARED_GCCLIB=
5876 ],[ AC_MSG_RESULT([no])
5880 AC_MSG_CHECKING([for dynamic libstdc++])
5881 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5883 using namespace std;
5884 ]], [[ cout << "Hello there." << endl; ]])],[
5885 MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's@.*DLL Name: @@'`
5886 if test -n "$MINGW_GXXDLL"; then
5887 mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
5888 mingw_gxxdll_root=${mingw_gxxdll_root#lib}
5889 if test "$CROSS_COMPILING" = "TRUE"; then
5891 mingw_gxxdll_root=${mingw_gxxdll_root%-[[0-9]]}
5893 MINGW_SHARED_LIBSTDCPP=-l$mingw_gxxdll_root
5894 MINGW_SHARED_GXXLIB=TRUE
5895 AC_MSG_RESULT([$MINGW_GXXDLL])
5897 MINGW_SHARED_GXXLIB=
5900 ],[ AC_MSG_RESULT([no])
5906 AC_SUBST(MINGW_SHARED_GCCLIB)
5907 AC_SUBST(MINGW_SHARED_GXXLIB)
5908 AC_SUBST(MINGW_SHARED_LIBSTDCPP)
5909 AC_SUBST(MINGW_GCCDLL)
5910 AC_SUBST(MINGW_GXXDLL)
5913 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
5914 AC_DEFINE(HAVE_FMERGENEUTRALITEMS)
5917 if test "$WITH_MINGW" = "yes"; then
5918 AC_MSG_CHECKING([for fMergeNeutralItems in SCRIPT_CONTROL])
5919 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
5925 c.fMergeNeutralItems = 1;
5929 AC_DEFINE(HAVE_FMERGENEUTRALITEMS)
5931 [AC_MSG_RESULT(no)])
5934 dnl ===================================================================
5935 dnl Extra checking for the SunOS compiler
5936 dnl ===================================================================
5937 if test "$_os" = "SunOS"; then
5938 dnl SunStudio C++ compiler packaged with SunStudio C compiler
5939 if test "$CC" = "cc"; then
5940 AC_MSG_CHECKING([SunStudio C++ Compiler])
5941 if test "$CXX" != "CC"; then
5942 AC_MSG_WARN([SunStudio C++ was not found])
5943 add_warning "SunStudio C++ was not found"
5945 AC_MSG_RESULT([checked])
5950 dnl *************************************************************
5951 dnl Testing for exception handling - dwarf2 or sjlj exceptions...
5952 dnl *************************************************************
5953 if test "$WITH_MINGW" = "yes"; then
5954 AC_MSG_CHECKING([exception type])
5956 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
5958 extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
5960 ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
5962 AC_MSG_RESULT($exceptions_type)
5966 EXCEPTIONS="$exceptions_type"
5967 AC_SUBST(EXCEPTIONS)
5969 dnl ===================================================================
5970 dnl thread-safe statics
5971 dnl ===================================================================
5972 AC_MSG_CHECKING([whether $CXX supports thread safe statics])
5973 unset HAVE_THREADSAFE_STATICS
5974 if test "$GCC" = "yes"; then
5975 dnl -fthreadsafe-statics is available since GCC 4, so always available for
5976 dnl us. However, some C++ runtimes use a single lock for all static
5977 dnl variables, which can cause deadlock in multi-threaded applications.
5978 dnl This is not easily tested here; for POSIX-based systems, if executing
5979 dnl the following C++ program does not terminate then the tool chain
5980 dnl apparently has this problem:
5982 dnl #include <pthread.h>
5983 dnl int h() { return 0; }
5984 dnl void * g(void * unused) {
5985 dnl static int n = h();
5990 dnl pthread_create(&t, 0, g, 0);
5991 dnl pthread_join(t, 0);
5995 dnl static int n = f();
5999 dnl Mac OS X up to at least 10.7.1 is known to have this problem, as is at
6000 dnl least one instance of GCC 4.2.4 (used on a "Linux ooobuild1.osuosl.org
6001 dnl 2.6.9-101.plus.c4smp #1 SMP Thu Jul 21 19:08:15 EDT 2011 i686 i686 i386
6002 dnl GNU/Linux" machine); see the definition of __cxa_guard_acquire in GCC's
6003 dnl libstdc++-v3/libsupc++/guard.cc for what #ifdefs actually make a
6004 dnl difference there. Conservative advice from Jakub Jelinek is to assume
6005 dnl it working in GCC >= 4.3, so conservative way to check here is to use
6006 dnl GCC_VERSION for GCC but resort to __GLIBCXX__ corresponding to libstdc++
6007 dnl shipped with GCC 4.3.0 (cf. <http://gcc.gnu.org/onlinedocs/libstdc++/
6008 dnl manual/abi.html#abi.versioning.history>; 4.3.0 is 20080306, 4.2.4 is
6009 dnl 20080519, 4.3.1 is 20080606) for Clang (for which GCC_VERSION is notoriously
6011 if test "$_os" != Darwin -a "$_os" != Android; then
6012 if test "$COM_GCC_IS_CLANG" = TRUE; then
6014 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6016 #if !defined __GLIBCXX__ ||(__GLIBCXX__ < 20080606 && __GLIBCXX__ != 20080306)
6019 ]])],[HAVE_THREADSAFE_STATICS=TRUE],[])
6021 elif test "${GCC_VERSION?}" -ge 0403; then
6022 HAVE_THREADSAFE_STATICS=TRUE
6025 if test "$HAVE_THREADSAFE_STATICS" = TRUE; then
6026 AC_DEFINE(HAVE_THREADSAFE_STATICS)
6027 AC_MSG_RESULT([yes])
6029 AC_MSG_RESULT([broken (i.e., no)])
6032 AC_MSG_RESULT([unknown (assuming no)])
6034 AC_SUBST(HAVE_THREADSAFE_STATICS)
6036 dnl ===================================================================
6037 dnl visibility and other gcc features
6038 dnl ===================================================================
6039 if test "$GCC" = "yes"; then
6040 AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
6042 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
6043 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_VISIBILITY_FEATURE=TRUE ],[])
6046 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
6047 AC_MSG_RESULT([yes])
6052 AC_MSG_CHECKING([whether $CC supports -Wno-long-double])
6054 CFLAGS="$CFLAGS -Werror -Wno-long-double"
6055 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_NO_LONG_DOUBLE=TRUE ],[])
6057 if test "$HAVE_GCC_NO_LONG_DOUBLE" = "TRUE"; then
6058 AC_MSG_RESULT([yes])
6063 AC_MSG_CHECKING([whether $CC supports -mno-avx])
6065 CFLAGS="$CFLAGS -Werror -mno-avx"
6066 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
6068 if test "$HAVE_GCC_AVX" = "TRUE"; then
6069 AC_MSG_RESULT([yes])
6074 AC_MSG_CHECKING([whether $CC supports atomic functions])
6075 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
6077 if (__sync_add_and_fetch(&v, 1) != 1 ||
6078 __sync_sub_and_fetch(&v, 1) != 0)
6080 __sync_synchronize();
6081 if (__sync_val_compare_and_swap(&v, 0, 1) != 0 ||
6085 ]])],[HAVE_GCC_BUILTIN_ATOMIC=TRUE],[])
6086 if test "$HAVE_GCC_BUILTIN_ATOMIC" = "TRUE"; then
6087 AC_MSG_RESULT([yes])
6088 AC_DEFINE(HAVE_GCC_BUILTIN_ATOMIC)
6094 [whether $CC supports pragma GCC diagnostic error/ignored/warning])
6096 CFLAGS="$CFLAGS -Werror -Wunknown-pragmas -Wunused-parameter"
6097 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6098 #pragma GCC diagnostic ignored "-Wunused-parameter"
6099 void dummy(int n) {}
6101 AC_DEFINE([HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY],[1])
6102 AC_MSG_RESULT([yes])
6103 ], [AC_MSG_RESULT([no])])
6106 AC_MSG_CHECKING([whether $CC supports pragma GCC diagnostic push/pop])
6108 CFLAGS="$CFLAGS -Werror -Wunknown-pragmas -Wunused-parameter"
6109 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6110 #pragma GCC diagnostic push
6111 #pragma GCC diagnostic ignored "-Wunused-parameter"
6112 void dummy(int n) {}
6113 #pragma GCC diagnostic pop
6115 AC_DEFINE([HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE],[1])
6116 AC_MSG_RESULT([yes])
6117 ], [AC_MSG_RESULT([no])])
6120 AC_MSG_CHECKING([whether $CC supports __attribute__((deprecated(message)))])
6122 CFLAGS="$CFLAGS -Werror"
6123 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6124 __attribute__((deprecated("test"))) void f();
6126 AC_DEFINE([HAVE_GCC_DEPRECATED_MESSAGE],[1])
6127 AC_MSG_RESULT([yes])
6128 ], [AC_MSG_RESULT([no])])
6131 AC_MSG_CHECKING([whether $CXX declares __cxa_allocate_exception in cxxabi.h])
6133 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6135 void * f() { return __cxxabiv1::__cxa_allocate_exception(0); }
6137 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION],[1])
6138 AC_MSG_RESULT([yes])
6139 ], [AC_MSG_RESULT([no])])
6142 AC_MSG_CHECKING([whether $CXX declares __cxa_get_globals in cxxabi.h])
6144 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6146 void * f() { return __cxxabiv1::__cxa_get_globals(); }
6148 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS],[1])
6149 AC_MSG_RESULT([yes])
6150 ], [AC_MSG_RESULT([no])])
6153 AC_MSG_CHECKING([whether $CXX declares __cxa_throw in cxxabi.h])
6155 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6157 void f() { __cxxabiv1::__cxa_throw(0, 0, 0); }
6159 AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_THROW],[1])
6160 AC_MSG_RESULT([yes])
6161 ], [AC_MSG_RESULT([no])])
6164 AC_MSG_CHECKING([whether $CXX supports __attribute__((warn_unused))])
6166 save_CXXFLAGS=$CXXFLAGS
6167 CXXFLAGS="$CFLAGS -Werror -Wunknown-pragmas"
6168 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6169 struct __attribute__((warn_unused)) dummy {};
6171 AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED],[1])
6172 AC_MSG_RESULT([yes])
6173 ], [AC_MSG_RESULT([no])])
6174 CXXFLAGS=$save_CXXFLAGS
6177 AC_MSG_CHECKING([whether STL uses __attribute__((warn_unused))])
6179 save_CXXFLAGS=$CXXFLAGS
6180 CXXFLAGS="$CFLAGS -Werror -Wunused"
6181 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6183 void f() { std::string s; }
6187 AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL],[1])
6188 AC_MSG_RESULT([yes])])
6189 CXXFLAGS=$save_CXXFLAGS
6193 AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
6194 AC_SUBST(HAVE_GCC_AVX)
6195 AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
6197 dnl ===================================================================
6198 dnl Identify the C++ library
6199 dnl ===================================================================
6201 AC_MSG_CHECKING([What the C++ library is])
6203 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6209 [CPP_LIBRARY=GLIBCXX
6210 cpp_library_name="GNU libstdc++"
6212 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6214 #ifndef _LIBCPP_VERSION
6219 cpp_library_name="LLVM libc++"
6221 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6228 cpp_library_name="Microsoft"
6230 AC_MSG_ERROR([Could not figure out what C++ library this is]))))
6231 AC_MSG_RESULT([$cpp_library_name])
6233 AC_SUBST(CPP_LIBRARY)
6235 dnl ===================================================================
6237 dnl ===================================================================
6241 if test "$COM" = MSC; then
6242 AC_MSG_CHECKING([whether $CXX supports C++11])
6244 # MSVC supports (a subset of) CXX11 without any switch
6247 elif test "$GCC" = "yes"; then
6249 AC_MSG_CHECKING([whether $CXX supports C++11])
6250 for flag in -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do
6251 save_CXXFLAGS=$CXXFLAGS
6252 CXXFLAGS="$CXXFLAGS $flag -Werror"
6254 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void f() {}]])],[CXXFLAGS_CXX11=$flag])
6256 CXXFLAGS=$save_CXXFLAGS
6257 if test -n "$CXXFLAGS_CXX11"; then
6262 if test "$HAVE_CXX11" = TRUE; then
6263 AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
6269 if test $CPP_LIBRARY = GLIBCXX -a "$HAVE_CXX11" = TRUE; then
6270 AC_MSG_CHECKING([whether using C++11 causes libstdc++ 4.7.0/4.7.1 ABI breakage])
6272 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6274 #if !defined(__GLIBCXX__)
6276 #elif __GLIBCXX__ < 20111004
6277 /* before breakage */
6278 #elif __GLIBCXX__ > 20120703
6279 /* after breakage */
6283 ]])], [AC_MSG_RESULT(no, ok)],
6284 [AC_MSG_RESULT(yes, disabling C++11)
6289 if test "$HAVE_CXX11" = TRUE; then
6290 AC_MSG_CHECKING([whether $CXX supports C++11 without Language Defect 757])
6291 save_CXXFLAGS=$CXXFLAGS
6292 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6295 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6298 template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
6314 a thinga[]={{0,0}, {1,1}};
6315 b thingb[]={{0,0}, {1,1}};
6316 size_t i = sizeof(sal_n_array_size(thinga));
6317 size_t j = sizeof(sal_n_array_size(thingb));
6318 return !(i != 0 && j != 0);
6320 ], [ AC_MSG_RESULT(yes) ],
6325 CXXFLAGS=$save_CXXFLAGS
6328 if test "$HAVE_CXX11" = TRUE; then
6329 AC_MSG_CHECKING([whether $CXX supports C++11 without __float128 compile error])
6330 save_CXXFLAGS=$CXXFLAGS
6331 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6334 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6336 // some Clang fail when compiling against libstdc++ headers with -std=gnu++0x
6339 ],[ AC_MSG_RESULT(yes) ],
6342 # The only reason why libstdc++ headers fail with Clang in C++11 mode is because
6343 # they use the __float128 type that Clang doesn't know (libstdc++ checks whether
6344 # __float128 is available during its build, but it's usually built using GCC,
6345 # and so c++config.h hardcodes __float128 being supported). As the only place
6346 # where __float128 is actually used is in a template specialization,
6347 # -D__float128=void will avoid the problem there while still causing a problem
6348 # if somebody actually uses the type.
6349 AC_MSG_CHECKING([whether -D__float128=void workaround helps])
6350 CXXFLAGS="$CXXFLAGS -D__float128=void"
6351 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6353 // some Clang fail when compiling against libstdc++ headers with -std=gnu++0x
6359 CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -D__float128=void"
6368 CXXFLAGS=$save_CXXFLAGS
6371 if test "$HAVE_CXX11" = "TRUE"; then
6372 AC_DEFINE(HAVE_CXX11)
6373 elif test -n "$CXXFLAGS_CXX11"; then
6374 AC_MSG_NOTICE([Disabling C++11 support])
6376 elif test "$CPP_LIBRARY" = LIBCPP -a $_os = Darwin; then
6377 AC_MSG_ERROR([Selected libc++ but C++11 support broken])
6380 AC_SUBST(CXXFLAGS_CXX11)
6381 AC_SUBST(HAVE_CXX11)
6383 dnl ==================================
6384 dnl Check for C++11 "= delete" support
6385 dnl ==================================
6387 if test "$HAVE_CXX11" = "TRUE"; then
6388 AC_MSG_CHECKING([whether $CXX supports C++11 = delete syntax])
6389 save_CXXFLAGS=$CXXFLAGS
6390 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6392 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6395 void test() = delete;
6397 ]])],[HAVE_CXX11_DELETE=TRUE],[])
6400 CXXFLAGS=$save_CXXFLAGS
6401 if test "$HAVE_CXX11_DELETE" = "TRUE"; then
6402 AC_MSG_RESULT([yes])
6403 AC_DEFINE([HAVE_CXX11_DELETE])
6409 dnl ==================================
6410 dnl Check for C++11 "override" support
6411 dnl ==================================
6413 if test "$HAVE_CXX11" = "TRUE"; then
6414 AC_MSG_CHECKING([whether $CXX supports C++11 "override" syntax])
6415 save_CXXFLAGS=$CXXFLAGS
6416 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6418 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6421 virtual void test();
6426 virtual void test() override;
6428 ]])],[HAVE_CXX11_OVERRIDE=TRUE],[])
6431 CXXFLAGS=$save_CXXFLAGS
6432 if test "$HAVE_CXX11_OVERRIDE" = "TRUE"; then
6433 AC_MSG_RESULT([yes])
6434 AC_DEFINE([HAVE_CXX11_OVERRIDE])
6440 dnl ==================================
6441 dnl Check for C++11 "final" support
6442 dnl ==================================
6444 if test "$HAVE_CXX11" = "TRUE"; then
6445 AC_MSG_CHECKING([whether $CXX supports C++11 "final" syntax])
6446 save_CXXFLAGS=$CXXFLAGS
6447 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6449 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6450 // First check that this correct program that uses "final" compiles
6457 virtual void test();
6464 ]])],[have_final=yes],[])
6466 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6467 // Then check that the "final" works as expected,
6468 // that this program fails to compile
6476 ]])],[],[final_class_works=yes])
6478 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6479 // Also this should fail to compile
6482 virtual void test();
6494 ]])],[],[final_method_works=yes])
6497 CXXFLAGS=$save_CXXFLAGS
6499 if test "$have_final" = yes -a "$final_class_works" = yes -a "$final_method_works" = yes; then
6500 AC_MSG_RESULT([yes])
6501 AC_DEFINE([HAVE_CXX11_FINAL])
6507 dnl ===================================================================
6508 dnl Check for C++11 perfect forwarding support
6509 dnl ===================================================================
6510 if test "$HAVE_CXX11" = "TRUE"; then
6511 AC_MSG_CHECKING([whether $CXX supports C++11 perfect forwarding])
6512 save_CXXFLAGS=$CXXFLAGS
6513 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
6515 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6517 template<typename T, typename... Args> T * f(Args &&... v) {
6518 return new T(std::forward<Args>(v)...);
6522 ]])], [perfect_forwarding=yes], [perfect_forwarding=no])
6524 CXXFLAGS=$save_CXXFLAGS
6525 AC_MSG_RESULT([$perfect_forwarding])
6526 if test "$perfect_forwarding" = yes; then
6527 AC_DEFINE([HAVE_CXX11_PERFECT_FORWARDING])
6531 HAVE_GCC_PRAGMA_OPERATOR=
6532 dnl _Pragma support (may require C++11)
6533 if test "$GCC" = "yes"; then
6534 AC_MSG_CHECKING([whether $CXX supports _Pragma operator])
6536 save_CXXFLAGS=$CXXFLAGS
6537 CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 -Werror"
6538 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
6539 _Pragma("GCC diagnostic ignored \"-Wformat\"")
6541 AC_DEFINE([HAVE_GCC_PRAGMA_OPERATOR],[1])
6542 HAVE_GCC_PRAGMA_OPERATOR=1
6543 AC_MSG_RESULT([yes])
6544 ], [AC_MSG_RESULT([no])])
6546 CXXFLAGS=$save_CXXFLAGS
6548 AC_SUBST(HAVE_GCC_PRAGMA_OPERATOR)
6550 dnl ===================================================================
6551 dnl system stl sanity tests
6552 dnl ===================================================================
6553 HAVE_GCC_VISIBILITY_BROKEN=
6554 if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \); then
6558 save_CPPFLAGS="$CPPFLAGS"
6559 if test -n "$MACOSX_SDK_PATH"; then
6560 CPPFLAGS="-isysroot $MACOSX_SDK_PATH $CPPFLAGS"
6563 # Assume visibility is not broken with libc++. The below test is very much designed for libstdc++
6565 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$CPP_LIBRARY" = GLIBCXX; then
6566 dnl gcc#19664, gcc#22482, rhbz#162935
6567 AC_MSG_CHECKING([if STL headers are visibility safe (GCC bug 22482)])
6568 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
6569 AC_MSG_RESULT([$stlvisok])
6570 if test "$stlvisok" = "no"; then
6571 AC_MSG_WARN([Your libstdc++ headers are not visibility safe. Disabling visibility])
6572 add_warning "Your libstdc++ headers are not visibility safe. Disabling visibility"
6573 unset HAVE_GCC_VISIBILITY_FEATURE
6577 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
6578 sharedlink_ldflags_save=$LDFLAGS
6579 LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden $PICSWITCH $LINKFLAGSSHL"
6581 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
6582 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
6584 using namespace std;
6586 istringstream strm( "test" ); return 0;
6588 # Ugh, surely bad to assume an error message will contain
6589 # the word "unresolvable", a problem with
6590 # -fvisibility-inlines-hidden and STL headers might cause
6591 # some more obscure message on some platform, and anway,
6592 # the error message could be localised.
6593 [$EGREP -q unresolvable conftest.err;
6594 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi],[gccvisok=no
6596 AC_MSG_RESULT([$gccvisok])
6597 if test "$gccvisok" = "no"; then
6598 AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
6599 add_warning "Your gcc is not -fvisibility-inlines-hidden safe, disabling that."
6600 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
6603 LDFLAGS=$sharedlink_ldflags_save
6606 # As the below test checks things when linking self-compiled dynamic libraries, it presumably is irrelevant
6607 # when we don't make any dynamic libraries?
6608 if test "$DISABLE_DYNLOADING" = "" -a "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$HAVE_GCC_VISIBILITY_BROKEN" != "TRUE"; then
6609 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe (Clang bug 11250)])
6610 cat > conftestlib1.cc <<_ACEOF
6611 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
6612 struct S2: S1<int> { virtual ~S2(); };
6615 cat > conftestlib2.cc <<_ACEOF
6616 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
6617 struct S2: S1<int> { virtual ~S2(); };
6618 struct S3: S2 { virtual ~S3(); }; S3::~S3() {}
6620 gccvisinlineshiddenok=yes
6621 if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST >/dev/null 2>&5; then
6622 gccvisinlineshiddenok=no
6624 dnl At least Clang -fsanitize=address is known to not work with
6625 dnl -z defs (unsetting which makes the test moot, though):
6626 my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS
6627 if test "$COM_GCC_IS_CLANG" = TRUE; then
6631 my_linkflagsnoundefs=
6637 if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 $my_linkflagsnoundefs -o libconftest2$DLLPOST >/dev/null 2>&5; then
6638 gccvisinlineshiddenok=no
6643 AC_MSG_RESULT([$gccvisinlineshiddenok])
6644 if test "$gccvisinlineshiddenok" = "no"; then
6645 AC_MSG_WARN([Your gcc/clang is not -fvisibility-inlines-hidden safe, disabling that.])
6646 add_warning "Your gcc/clang is not -fvisibility-inlines-hidden safe, disabling that."
6647 HAVE_GCC_VISIBILITY_BROKEN="TRUE"
6651 if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
6652 AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)])
6653 cat >visibility.cxx <<_ACEOF
6654 #pragma GCC visibility push(hidden)
6655 struct __attribute__ ((visibility ("default"))) TestStruct {
6658 __attribute__ ((visibility ("default"))) void TestFunc() {
6662 if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then
6667 if test "$_os" = "Darwin" -o "$WITH_MINGW" = "yes"; then
6670 if $EGREP -q '@PLT|@GOT' visibility.s; then
6682 rm -f visibility.s visibility.cxx
6684 AC_MSG_RESULT([$gccvisbroken])
6685 if test "$gccvisbroken" = "yes"; then
6686 AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility])
6687 add_warning "Your gcc is not -fvisibility=hidden safe. Disabling visibility"
6688 unset HAVE_GCC_VISIBILITY_FEATURE
6692 CPPFLAGS="$save_CPPFLAGS"
6697 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
6698 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
6700 dnl ===================================================================
6702 dnl ===================================================================
6704 HAVE_GCC_FNO_DEFAULT_INLINE=
6705 HAVE_GCC_FNO_ENFORCE_EH_SPECS=
6706 if test "$GCC" = "yes"; then
6707 AC_MSG_CHECKING([whether $CXX supports -fno-default-inline])
6708 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
6709 # Option just ignored and silly warning that isn't a real
6714 save_CXXFLAGS=$CXXFLAGS
6715 CXXFLAGS="$CFLAGS -Werror -fno-default-inline"
6716 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_DEFAULT_INLINE=TRUE ],[])
6717 CXXFLAGS=$save_CXXFLAGS
6720 if test "$HAVE_GCC_FNO_DEFAULT_INLINE" = "TRUE"; then
6721 AC_MSG_RESULT([yes])
6726 AC_MSG_CHECKING([whether $CXX supports -fno-enforce-eh-specs])
6727 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
6732 save_CXXFLAGS=$CXXFLAGS
6733 CXXFLAGS="$CFLAGS -Werror -fno-enforce-eh-specs"
6734 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_ENFORCE_EH_SPECS=TRUE ],[])
6735 CXXFLAGS=$save_CXXFLAGS
6738 if test "$HAVE_GCC_FNO_ENFORCE_EH_SPECS" = "TRUE"; then
6739 AC_MSG_RESULT([yes])
6744 AC_SUBST(HAVE_GCC_FNO_DEFAULT_INLINE)
6745 AC_SUBST(HAVE_GCC_FNO_ENFORCE_EH_SPECS)
6747 dnl ===================================================================
6748 dnl Compiler plugins
6749 dnl ===================================================================
6752 # currently only Clang
6753 if test "$COM_GCC_IS_CLANG" = "TRUE"; then
6754 if test -n "$enable_compiler_plugins"; then
6755 compiler_plugins="$enable_compiler_plugins"
6756 elif test -n "$ENABLE_DBGUTIL"; then
6757 compiler_plugins=test
6761 if test "$compiler_plugins" != "no"; then
6762 dnl The prefix where Clang resides, override to where Clang resides if
6763 dnl using a source build:
6764 if test -z "$CLANGDIR"; then
6768 save_CPPFLAGS=$CPPFLAGS
6770 # compiler plugins must be built with "native" bitness of clang
6771 # because they link against clang libraries
6772 CXX=`echo $CXX | sed -e s/-m64// -e s/-m32//`
6773 CPPFLAGS="$CPPFLAGS $CXXFLAGS_CXX11 -I$CLANGDIR/include -I$CLANGDIR/tools/clang/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
6774 AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
6775 [COMPILER_PLUGINS=TRUE],
6777 if test "$compiler_plugins" = "yes"; then
6778 AC_MSG_ERROR([Cannot find Clang headers to build compiler plugins.])
6780 AC_MSG_WARN([Cannot find Clang headers to build compiler plugins, plugins disabled])
6781 add_warning "Cannot find Clang headers to build compiler plugins, plugins disabled."
6785 CPPFLAGS=$save_CPPFLAGS
6789 if test "$enable_compiler_plugins" = "yes"; then
6790 AC_MSG_ERROR([Compiler plugins are currently supported only with the Clang compiler.])
6793 AC_SUBST(COMPILER_PLUGINS)
6796 # Plugin to help linker.
6797 # Add something like LD_PLUGIN=/usr/lib64/LLVMgold.so to your autogen.input.
6798 # This makes --enable-lto build with clang work.
6801 dnl ===================================================================
6803 dnl ===================================================================
6804 AC_MSG_CHECKING([which memory allocator to use])
6805 if test "$with_alloc" = "system"; then
6806 AC_MSG_RESULT([system])
6809 if test "$with_alloc" = "tcmalloc"; then
6810 AC_MSG_RESULT(tcmalloc)
6811 if ! echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
6812 AC_MSG_ERROR([tcmalloc only available/usable on ix86])
6814 AC_CHECK_LIB([tcmalloc], [malloc], [:],
6815 [AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
6818 if test "$with_alloc" = "jemalloc"; then
6819 if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
6820 AC_MSG_RESULT(jemalloc)
6822 CFLAGS="$CFLAGS -pthread"
6823 AC_CHECK_LIB([jemalloc], [malloc], [:],
6824 [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
6828 AC_MSG_RESULT([system])
6832 if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
6833 AC_MSG_RESULT([internal])
6835 AC_CHECK_FUNCS(posix_fallocate, HAVE_POSIX_FALLOCATE=YES, [HAVE_POSIX_FALLOCATE=NO])
6836 AC_SUBST(HAVE_POSIX_FALLOCATE)
6839 dnl ===================================================================
6840 dnl Custom build version
6841 dnl ===================================================================
6843 AC_MSG_CHECKING([whether to add custom build version])
6844 if test "$with_build_version" != ""; then
6845 BUILD_VER_STRING=$with_build_version
6846 AC_MSG_RESULT([yes, $BUILD_VER_STRING])
6851 AC_SUBST(BUILD_VER_STRING)
6853 JITC_PROCESSOR_TYPE=""
6854 if test "$_os" = "Linux" -a "$host_cpu" = "powerpc"; then
6855 # IBMs JDK needs this...
6856 JITC_PROCESSOR_TYPE=6
6857 export JITC_PROCESSOR_TYPE
6859 AC_SUBST([JITC_PROCESSOR_TYPE])
6861 # Misc Windows Stuff
6862 if test $_os = "WINNT" -a "$WITH_MINGW" != yes; then
6865 MSVC_DLL_PATH="$msvcdllpath"
6866 MSVC_DLLS="$msvcdlls"
6868 SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
6871 AC_SUBST(MSVC_DLL_PATH)
6875 dnl ===================================================================
6877 dnl ===================================================================
6878 if test "$ENABLE_JAVA" != ""; then
6880 # Windows-specific tests
6881 if test "$build_os" = "cygwin"; then
6882 if test "$BITNESS_OVERRIDE" = 64; then
6888 if test -z "$with_jdk_home"; then
6889 for ver in 1.8 1.7 1.6; do
6890 reg_get_value_$bitness "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
6891 if test -n "$regvalue"; then
6896 if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
6897 with_jdk_home="$_jdk_home"
6898 howfound="found automatically"
6900 AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $bitness-bit JDK])
6903 test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
6904 howfound="you passed"
6908 JAVA_HOME=; export JAVA_HOME
6909 if test -z "$with_jdk_home"; then
6910 AC_PATH_PROG(JAVAINTERPRETER, $with_java)
6912 _java_path="$with_jdk_home/bin/$with_java"
6913 dnl Check if there is a Java interpreter at all.
6914 if test -x "$_java_path"; then
6915 JAVAINTERPRETER=$_java_path
6917 AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
6921 if test "$build_os" = "cygwin"; then
6922 # Check that the JDK found is correct architecture
6923 # Why is this necessary, we don't link with any library from the JDK I think,
6925 shortjdkhome=`cygpath -d "$with_jdk_home"`
6926 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
6927 AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
6928 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
6929 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
6930 AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
6931 AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
6934 if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then
6935 JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
6937 JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
6938 JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
6939 elif test $_os = Darwin -a "$BITNESS_OVERRIDE" = ""; then
6940 dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X,
6941 dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
6942 dnl to run in 32 bit mode and be able to load LibreOffice jnilibs:
6943 AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
6944 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
6945 AC_MSG_RESULT([yes])
6954 dnl ===================================================================
6956 dnl ===================================================================
6958 # Note that JAVA_HOME as for now always means the *build* platform's
6959 # JAVA_HOME. Whether all the complexity here actually is needed any
6960 # more or not, no idea.
6962 if test "$ENABLE_JAVA" != ""; then
6964 AC_MSG_CHECKING([the installed JDK])
6965 if test -n "$JAVAINTERPRETER"; then
6966 dnl java -version sends output to stderr!
6967 if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
6968 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
6969 elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then
6971 AC_MSG_RESULT([checked (gcj)])
6972 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
6973 _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
6975 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "BEA"` -gt 0; then
6976 AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
6977 elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "IBM"` -gt 0; then
6980 dnl IBM JDK specific tests
6981 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
6982 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
6984 if test "$_jdk_ver" -lt 10500; then
6985 AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
6987 if test "$_jdk_ver" -ge 10600; then
6991 AC_MSG_RESULT([checked (IBM JDK $_jdk)])
6993 if test "$with_jdk_home" = ""; then
6994 AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
6995 you must use the "--with-jdk-home" configure option explicitly])
6998 JAVA_HOME=$with_jdk_home
7003 dnl Sun JDK specific tests
7004 _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
7005 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
7007 if test "$_jdk_ver" -lt 10500; then
7008 AC_MSG_ERROR([JDK is too old, you need at least 1.5])
7010 if test "$_jdk_ver" -gt 10600; then
7011 JAVA_CLASSPATH_NOT_SET="1"
7013 if test "$_jdk_ver" -ge 10600; then
7017 AC_MSG_RESULT([checked (JDK $_jdk)])
7018 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
7019 if test "$_os" = "WINNT"; then
7020 JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
7024 AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
7028 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
7030 AC_SUBST([HAVE_JAVA6])
7032 dnl ===================================================================
7033 dnl Set target Java bytecode version
7034 dnl ===================================================================
7035 if test "$ENABLE_JAVA" != ""; then
7036 _java_target_ver="1.5"
7038 JAVA_SOURCE_VER="$_java_target_ver"
7039 JAVA_TARGET_VER="$_java_target_ver"
7042 dnl ===================================================================
7043 dnl Checks for javac
7044 dnl ===================================================================
7045 if test "$ENABLE_JAVA" != ""; then
7046 if test "$JDK" = "gcj"; then
7047 javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
7049 javacompiler="javac"
7051 if test -z "$with_jdk_home"; then
7052 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
7054 _javac_path="$with_jdk_home/bin/$javacompiler"
7055 dnl Check if there is a Java compiler at all.
7056 if test -x "$_javac_path"; then
7057 JAVACOMPILER=$_javac_path
7060 if test -z "$JAVACOMPILER"; then
7061 AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
7063 if test "$build_os" = "cygwin"; then
7064 if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then
7065 JAVACOMPILER="${JAVACOMPILER}.exe"
7067 JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
7068 JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
7071 if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Eclipse Java Compiler"` -gt 0; then
7072 AC_MSG_CHECKING([re-checking JDK])
7074 AC_MSG_RESULT([checked (ecj)])
7075 _gij_longver="40200"
7080 dnl ===================================================================
7081 dnl Checks that javac is gcj
7082 dnl ===================================================================
7083 if test "$ENABLE_JAVA" != ""; then
7084 if test `$JAVACOMPILER --version 2>&1 | $GREP -c "GCC"` -gt 0; then
7088 AC_SUBST(JAVACISGCJ)
7090 dnl ===================================================================
7091 dnl Checks for javadoc
7092 dnl ===================================================================
7093 if test "$ENABLE_JAVA" != ""; then
7094 if test -z "$with_jdk_home"; then
7095 AC_PATH_PROG(JAVADOC, javadoc)
7097 _javadoc_path="$with_jdk_home/bin/javadoc"
7098 dnl Check if there is a javadoc at all.
7099 if test -x "$_javadoc_path"; then
7100 JAVADOC=$_javadoc_path
7102 AC_PATH_PROG(JAVADOC, javadoc)
7105 if test -z "$JAVADOC"; then
7106 AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
7108 if test "$build_os" = "cygwin"; then
7109 if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
7110 JAVADOC="${JAVADOC}.exe"
7112 JAVADOC=`cygpath -d "$JAVADOC"`
7113 JAVADOC=`cygpath -u "$JAVADOC"`
7116 if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
7117 JAVADOCISGJDOC="yes"
7120 AC_SUBST(JAVADOCISGJDOC)
7122 if test "$ENABLE_JAVA" != ""; then
7123 # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
7124 if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
7125 if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
7126 # try to recover first by looking whether we have a alternatives
7127 # system as in Debian or newer SuSEs where following /usr/bin/javac
7128 # over /etc/alternatives/javac leads to the right bindir where we
7129 # just need to strip a bit away to get a valid JAVA_HOME
7130 JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
7131 elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
7132 # maybe only one level of symlink (e.g. on Mac)
7133 JAVA_HOME=$(readlink $JAVACOMPILER)
7134 if test "$(dirname $JAVA_HOME)" = "."; then
7135 # we've got no path to trim back
7140 AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
7141 AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
7142 add_warning "JAVA_HOME is set to /usr - this is very likely to be incorrect"
7143 add_warning "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home"
7145 dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
7146 if test "$JAVA_HOME" != "/usr"; then
7147 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
7148 dnl Leopard returns a non-suitable path with readlink - points to "Current" only
7149 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
7150 dnl Tiger already returns a JDK path..
7151 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
7153 JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
7157 # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
7159 dnl now if JAVA_HOME has been set to empty, then call findhome to find it
7160 if test -z "$JAVA_HOME"; then
7161 if test "x$with_jdk_home" = "x"; then
7162 cat > findhome.java <<_ACEOF
7163 [import java.io.File;
7167 public static void main(String args[])
7169 String jrelocation = System.getProperty("java.home");
7170 File jre = new File(jrelocation);
7171 System.out.println(jre.getParent());
7175 AC_MSG_CHECKING([if javac works])
7176 javac_cmd="$JAVACOMPILER findhome.java 1>&2"
7177 AC_TRY_EVAL(javac_cmd)
7178 if test $? = 0 -a -f ./findhome.class; then
7179 AC_MSG_RESULT([javac works])
7181 echo "configure: javac test failed" >&5
7182 cat findhome.java >&5
7183 AC_MSG_ERROR([javac does not work - java projects will not build!])
7185 AC_MSG_CHECKING([if gij knows its java.home])
7186 JAVA_HOME=`$JAVAINTERPRETER findhome`
7187 if test $? = 0 -a "$JAVA_HOME" != ""; then
7188 AC_MSG_RESULT([$JAVA_HOME])
7190 echo "configure: java test failed" >&5
7191 cat findhome.java >&5
7192 AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
7194 # clean-up after ourselves
7195 rm -f ./findhome.java ./findhome.class
7197 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
7201 dnl second sanity check JAVA_HOME if possible
7202 if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
7203 # now check if $JAVA_HOME is really valid
7204 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
7205 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
7208 elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
7211 if test "$JAVA_HOME_OK" = "NO"; then
7212 AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
7213 AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
7214 AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
7215 add_warning "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script"
7216 add_warning "attempted to find JAVA_HOME automatically, but apparently it failed"
7217 add_warning "in case JAVA_HOME is incorrectly set, some projects with not be built correctly"
7220 PathFormat "$JAVA_HOME"
7221 JAVA_HOME="$formatted_path"
7224 if test -z "$JAWTLIB" -a -n "$ENABLE_JAVA" -a "$_os" != Android -a \
7227 AC_MSG_CHECKING([for JAWT lib])
7228 if test "$_os" = WINNT; then
7229 if test "$WITH_MINGW" = yes; then
7230 # The path is taken care of in gb_LinkTarget__use_jawt
7231 # in RepositoryExternal.mk:
7234 # The path to $JAVA_HOME/lib/$JAWTLIB is part of $ILIB:
7258 my_java_arch=$host_cpu
7261 JAWTLIB="-L$JAVA_HOME/jre/lib/$my_java_arch -ljawt"
7263 AC_MSG_RESULT([$JAWTLIB])
7267 if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
7271 JAVAINC="-I$JAVA_HOME/include"
7272 JAVAINC="$JAVAINC -I$JAVA_HOME/include/aix"
7273 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7277 JAVAINC="-I$JAVA_HOME/include/win32"
7278 JAVAINC="$JAVAINC -I$JAVA_HOME/include"
7282 JAVAINC="${ISYSTEM}$FRAMEWORKSHOME/JavaVM.framework/Versions/Current/Headers ${ISYSTEM}$FRAMEWORKSHOME/JavaVM/Headers"
7286 JAVAINC="-I$JAVA_HOME/include"
7287 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7291 JAVAINC="-I$JAVA_HOME/include"
7292 JAVAINC="$JAVAINC -I$JAVA_HOME/include/freebsd"
7293 JAVAINC="$JAVAINC -I$JAVA_HOME/include/bsd"
7294 JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
7295 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7299 JAVAINC="-I$JAVA_HOME/include"
7300 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7304 JAVAINC="-I$JAVA_HOME/include"
7305 JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
7306 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7310 JAVAINC="-I$JAVA_HOME/include"
7314 JAVAINC="-I$JAVA_HOME/include"
7315 JAVAINC="$JAVAINC -I$JAVA_HOME/include/netbsd"
7316 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7320 JAVAINC="-I$JAVA_HOME/include"
7321 JAVAINC="$JAVAINC -I$JAVA_HOME/include/openbsd"
7322 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7326 JAVAINC="-I$JAVA_HOME/include"
7327 JAVAINC="$JAVAINC -I$JAVA_HOME/include/solaris"
7328 test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
7332 SOLARINC="$SOLARINC $JAVAINC"
7334 AC_SUBST(JAVACOMPILER)
7336 AC_SUBST(JAVAINTERPRETER)
7337 AC_SUBST(JAVAIFLAGS)
7338 AC_SUBST(JAVA_CLASSPATH_NOT_SET)
7340 AC_SUBST(JAVA_SOURCE_VER)
7341 AC_SUBST(JAVA_TARGET_VER)
7344 AC_MSG_CHECKING([which C preprocessor to use in idlc])
7345 if test -n "$with_idlc_cpp"; then
7346 AC_MSG_RESULT([$with_idlc_cpp])
7347 AC_PATH_PROG(SYSTEM_UCPP, $with_idlc_cpp)
7349 AC_MSG_RESULT([ucpp])
7350 AC_MSG_CHECKING([which ucpp tp use])
7351 if test -n "$with_system_ucpp" -a "$with_system_ucpp" != "no"; then
7352 AC_MSG_RESULT([external])
7353 AC_PATH_PROG(SYSTEM_UCPP, ucpp)
7355 AC_MSG_RESULT([internal])
7356 BUILD_TYPE="$BUILD_TYPE UCPP"
7359 AC_SUBST(SYSTEM_UCPP)
7361 dnl ===================================================================
7362 dnl Check for epm (not needed for Windows)
7363 dnl ===================================================================
7364 AC_MSG_CHECKING([whether to enable EPM for packing])
7365 if test "$enable_epm" = "yes"; then
7366 AC_MSG_RESULT([yes])
7367 if test "$_os" != "WINNT"; then
7368 if test $_os = Darwin; then
7370 elif test -n "$with_epm"; then
7373 AC_PATH_PROG(EPM, epm, no)
7375 if test "$EPM" = "no" -o "$EPM" = "internal"; then
7376 echo "EPM will be built."
7377 BUILD_TYPE="$BUILD_TYPE EPM"
7378 EPM=${WORKDIR}/UnpackedTarball/epm/epm
7380 # Gentoo has some epm which is something different...
7381 AC_MSG_CHECKING([whether the found epm is the right epm])
7382 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
7383 AC_MSG_RESULT([yes])
7385 AC_MSG_ERROR([no. Install ESP Package Manager (http://www.msweet.org/projects.php?Z2) and/or specify the path to the right epm])
7387 AC_MSG_CHECKING([epm version])
7388 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
7389 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
7390 test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
7391 AC_MSG_RESULT([OK, >= 3.7])
7393 AC_MSG_RESULT([too old. epm >= 3.7 is required.])
7394 AC_MSG_ERROR([Install ESP Package Manager (http://www.msweet.org/projects.php?Z2) and/or specify the path to the right epm])
7399 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
7400 AC_MSG_CHECKING([for rpm])
7401 for a in "$RPM" rpmbuild rpm; do
7402 $a --usage >/dev/null 2> /dev/null
7403 if test $? -eq 0; then
7407 $a --version >/dev/null 2> /dev/null
7408 if test $? -eq 0; then
7414 if test -z "$RPM"; then
7415 AC_MSG_ERROR([not found])
7416 elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
7417 RPM_PATH=`which $RPM`
7418 AC_MSG_RESULT([$RPM_PATH])
7419 SCPDEFS="$SCPDEFS -DWITH_RPM"
7421 AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
7424 if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
7425 AC_PATH_PROG(DPKG, dpkg, no)
7426 if test "$DPKG" = "no"; then
7427 AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
7430 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
7431 echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
7432 if test "$with_epm" = "no" -a "$_os" != "Darwin"; then
7433 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
7434 AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
7435 if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then
7436 AC_MSG_RESULT([yes])
7439 if echo "$PKGFORMAT" | $GREP -q rpm; then
7441 AC_MSG_WARN([the rpms will need to be installed with --nodeps])
7442 add_warning "the rpms will need to be installed with --nodeps"
7446 AC_MSG_WARN([the ${_pt}s will not be relocateable])
7447 add_warning "the ${_pt}s will not be relocateable"
7448 AC_MSG_WARN([if you want to make sure installation without --nodeps and
7449 relocation will work, you need to patch your epm with the
7450 patch in epm/epm-3.7.patch or build with
7451 --with-epm=internal which will build a suitable epm])
7456 if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
7457 AC_PATH_PROG(PKGMK, pkgmk, no)
7458 if test "$PKGMK" = "no"; then
7459 AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
7466 for i in $PKGFORMAT; do
7468 aix | bsd | deb | pkg | rpm | native | portable)
7470 [--with-package-format='$PKGFORMAT' requires --enable-epm])
7479 dnl ===================================================================
7480 dnl We need winegcc when building MinGW build to be able to cross-build msi tools
7481 dnl ===================================================================
7483 if test "$enable_winegcc" = "yes"; then
7484 AC_PATH_PROG(WINEGCC, winegcc)
7485 if test "$WINEGCC" = ""; then
7486 AC_MSG_ERROR([winegcc was not found, please install wine-devel, or wine-devel-32bit])
7489 ac_exeext_save="$ac_exeext"
7492 AC_LINK_IFELSE([AC_LANG_PROGRAM([
7495 printf ("hello world\n");
7497 [AC_MSG_ERROR([winegcc cannot build 32bit binaries, please install glibc-devel-32bit and gcc-32bit])]
7500 ac_exeext="$ac_exeext_save"
7504 if test $_os = iOS; then
7505 enable_mpl_subset=yes
7507 enable_lotuswordpro=no
7510 enable_postgresql_sdbc=no
7511 enable_extension_integration=no
7512 enable_report_builder=no
7518 if test "$enable_lotuswordpro" = "yes"; then
7520 SCPDEFS="$SCPDEFS -DDISABLE_LWP"
7522 AC_SUBST(ENABLE_LWP)
7524 dnl ===================================================================
7526 dnl ===================================================================
7527 AC_PATH_PROG(GPERF, gperf)
7528 if test -z "$GPERF"; then
7529 AC_MSG_ERROR([gperf not found but needed. Install it.])
7531 AC_MSG_CHECKING([gperf version])
7532 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
7535 AC_MSG_ERROR([too old, you need at least 3.0.0])
7539 dnl ===================================================================
7540 dnl Check for building ODK
7541 dnl ===================================================================
7542 if test "$enable_odk" = no; then
7545 if test "$with_doxygen" = no; then
7546 AC_MSG_CHECKING([for doxygen])
7550 if test "$with_doxygen" = yes; then
7551 AC_PATH_PROG([DOXYGEN], [doxygen])
7552 if test -z "$DOXYGEN"; then
7553 if test "$enable_odk" = "" ; then
7556 AC_MSG_ERROR([doxygen not found in \$PATH; specify its pathname via --with-doxygen=..., or disable its use via --without-doxygen])
7560 AC_MSG_CHECKING([for doxygen])
7561 DOXYGEN=$with_doxygen
7562 AC_MSG_RESULT([$DOXYGEN])
7564 if test -n "$DOXYGEN"; then
7565 DOXYGEN_VERSION=`$DOXYGEN --version 2>/dev/null`
7566 DOXYGEN_NUMVERSION=`echo $DOXYGEN_VERSION | $AWK -F. '{ print \$1*10000 + \$2*100 + \$3 }'`
7567 if ! test "$DOXYGEN_NUMVERSION" -ge "10804" ; then
7568 AC_MSG_ERROR([found doxygen is too old; need at least version 1.8.4 or specify --without-doxygen])
7575 AC_MSG_CHECKING([whether to build the ODK])
7576 if test "$enable_odk" = "" -o "$enable_odk" != "no"; then
7577 AC_MSG_RESULT([yes])
7579 if test "$with_java" != "no"; then
7580 AC_MSG_CHECKING([whether to build unowinreg.dll])
7581 if test "$_os" = "WINNT" -a "$enable_build_unowinreg" = ""; then
7582 # build on Win by default
7583 enable_build_unowinreg=yes
7585 if test "$enable_build_unowinreg" = "" -o "$enable_build_unowinreg" = "no"; then
7589 AC_MSG_RESULT([yes])
7590 BUILD_UNOWINREG=TRUE
7592 if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "TRUE"; then
7593 if test -z "$with_mingw_cross_compiler"; then
7595 AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
7596 elif test -x "$with_mingw_cross_compiler"; then
7597 MINGWCXX="$with_mingw_cross_compiler"
7599 AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
7602 if test "$MINGWCXX" = "false"; then
7603 AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
7606 mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
7607 if test -x "$mingwstrip_test"; then
7608 MINGWSTRIP="$mingwstrip_test"
7610 AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
7613 if test "$MINGWSTRIP" = "false"; then
7614 AC_MSG_ERROR(MinGW32 binutils not found.)
7618 BUILD_TYPE="$BUILD_TYPE ODK"
7623 AC_SUBST(BUILD_UNOWINREG)
7625 AC_SUBST(MINGWSTRIP)
7627 dnl ===================================================================
7628 dnl Check for system zlib
7629 dnl ===================================================================
7630 if test "$with_system_zlib" = "auto"; then
7633 with_system_zlib="$with_system_libs"
7636 with_system_zlib=yes
7641 dnl we want to use libo_CHECK_SYSTEM_MODULE here too, but OS X is too stupid
7642 dnl and has no pkg-config for it at least on some tinderboxes,
7643 dnl so leaving that out for now
7644 dnl libo_CHECK_SYSTEM_MODULE([zlib],[ZLIB],[zlib])
7645 AC_MSG_CHECKING([which zlib to use])
7646 if test "$with_system_zlib" = "yes"; then
7647 AC_MSG_RESULT([external])
7649 AC_CHECK_HEADER(zlib.h, [],
7650 [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
7651 AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
7652 [AC_MSG_ERROR(zlib not found or functional)], [])
7654 AC_MSG_RESULT([internal])
7656 BUILD_TYPE="$BUILD_TYPE ZLIB"
7657 ZLIB_CFLAGS="-I${WORKDIR}/UnpackedTarball/zlib"
7660 AC_SUBST(ZLIB_CFLAGS)
7662 AC_SUBST(SYSTEM_ZLIB)
7664 dnl ===================================================================
7665 dnl Check for system jpeg
7666 dnl ===================================================================
7667 if test "$with_system_jpeg" = "yes"; then
7668 AC_MSG_RESULT([external])
7670 AC_CHECK_HEADER(jpeglib.h, [],
7671 [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
7672 AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
7673 [AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
7674 libo_MINGW_CHECK_DLL([libjpeg])
7676 AC_MSG_RESULT([internal])
7678 BUILD_TYPE="$BUILD_TYPE JPEG"
7680 AC_SUBST(SYSTEM_JPEG)
7683 dnl ===================================================================
7684 dnl Check for system clucene
7685 dnl ===================================================================
7686 dnl we should rather be using
7687 dnl libo_CHECK_SYSTEM_MODULE([clucence],[CLUCENE],[liblucence-core]) here
7688 dnl but the contribs-lib check seems tricky
7689 AC_MSG_CHECKING([which clucene to use])
7690 if test "$with_system_clucene" = "yes"; then
7691 AC_MSG_RESULT([external])
7693 PKG_CHECK_MODULES(CLUCENE, libclucene-core)
7694 CLUCENE_CFLAGS=[$(printf '%s' "$CLUCENE_CFLAGS" | sed -e 's@-I[^ ]*/CLucene/ext@@' -e "s/-I/${ISYSTEM?}/g")]
7696 save_CXXFLAGS=$CXXFLAGS
7697 save_CPPFLAGS=$CPPFLAGS
7698 CXXFLAGS="$CXXFLAGS $CLUCENE_CFLAGS"
7699 CPPFLAGS="$CPPFLAGS $CLUCENE_CFLAGS"
7700 dnl http://sourceforge.net/tracker/index.php?func=detail&aid=3392466&group_id=80013&atid=558446
7701 dnl https://bugzilla.redhat.com/show_bug.cgi?id=794795
7702 AC_CHECK_HEADER([CLucene/analysis/cjk/CJKAnalyzer.h], [],
7703 [AC_MSG_ERROR([Your version of libclucene has contribs-lib missing.])], [#include <CLucene.h>])
7704 CXXFLAGS=$save_CXXFLAGS
7705 CPPFLAGS=$save_CPPFLAGS
7708 CLUCENE_LIBS="$CLUCENE_LIBS -lclucene-contribs-lib"
7710 AC_MSG_RESULT([internal])
7712 BUILD_TYPE="$BUILD_TYPE CLUCENE"
7714 AC_SUBST(SYSTEM_CLUCENE)
7715 AC_SUBST(CLUCENE_CFLAGS)
7716 AC_SUBST(CLUCENE_LIBS)
7718 dnl ===================================================================
7719 dnl Check for system expat
7720 dnl ===================================================================
7721 dnl we should use libo_CHECK_SYSTEM_MODULE, but e.g. the mingw tinderbox has no
7722 dnl proper pkg-config for it. It should really be fixed on the tinderbox though.
7723 AC_MSG_CHECKING([which expat to use])
7724 if test "$with_system_expat" = "yes"; then
7725 AC_MSG_RESULT([external])
7727 AC_CHECK_HEADER(expat.h, [],
7728 [AC_MSG_ERROR(expat.h not found. install expat)], [])
7729 AC_CHECK_LIB([expat], [XML_ParserCreate], [:],
7730 [AC_MSG_RESULT(expat library not found or functional.)], [])
7731 libo_MINGW_CHECK_DLL([libexpat])
7733 AC_MSG_RESULT([internal])
7735 BUILD_TYPE="$BUILD_TYPE EXPAT"
7737 AC_SUBST(SYSTEM_EXPAT)
7739 AC_MSG_CHECKING([whether to enable Embedded OpenType support])
7740 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_eot" = "yes"; then
7742 AC_DEFINE([ENABLE_EOT])
7743 AC_MSG_RESULT([yes])
7745 libo_CHECK_SYSTEM_MODULE([libeot],[LIBEOT],[libeot >= 0.01])
7750 AC_SUBST([ENABLE_EOT])
7752 dnl ===================================================================
7753 dnl Check for system librevenge
7754 dnl ===================================================================
7755 AS_IF([test "$COM" = "MSC"],
7756 [librevenge_libdir="${WORKDIR}/LinkTarget/Library"],
7757 [librevenge_libdir="${WORKDIR}/UnpackedTarball/librevenge/src/lib/.libs"]
7759 libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0 >= 0.0.1],["-I${WORKDIR}/UnpackedTarball/librevenge/inc"],["-L${librevenge_libdir} -lrevenge-0.0"])
7761 dnl ===================================================================
7762 dnl Check for system libe-book
7763 dnl ===================================================================
7764 libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.1 >= 0.1.1])
7766 dnl ===================================================================
7767 dnl Check for system libetonyek
7768 dnl ===================================================================
7769 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1 >= 0.1.1])
7771 dnl ===================================================================
7772 dnl Check for system libfreehand
7773 dnl ===================================================================
7774 libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1])
7776 dnl ===================================================================
7777 dnl Check for system libodfgen
7778 dnl ===================================================================
7779 libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.1])
7781 dnl ===================================================================
7782 dnl Check for system libcdr
7783 dnl ===================================================================
7784 libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
7786 dnl ===================================================================
7787 dnl Check for system libmspub
7788 dnl ===================================================================
7789 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
7791 dnl ===================================================================
7792 dnl Check for system libmwaw
7793 dnl ===================================================================
7794 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
7796 dnl ===================================================================
7797 dnl Check for system libvisio
7798 dnl ===================================================================
7799 libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.1])
7801 dnl ===================================================================
7802 dnl Check for system libcmis
7803 dnl ===================================================================
7804 # libcmis requires curl and we can't build curl for iOS
7805 if test $_os != iOS; then
7806 libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.4 >= 0.4.0])
7811 AC_SUBST(ENABLE_CMIS)
7813 dnl ===================================================================
7814 dnl Check for system libwpd
7815 dnl ===================================================================
7816 libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.10],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.10"])
7818 dnl ===================================================================
7819 dnl Check for system lcms2
7820 dnl ===================================================================
7821 if test "$with_system_lcms2" = "yes"; then
7822 libo_MINGW_CHECK_DLL([liblcms2])
7826 libo_CHECK_SYSTEM_MODULE([lcms2],[LCMS2],[lcms2],["-I${WORKDIR}/UnpackedTarball/lcms2/include"],["-L${WORKDIR}/UnpackedTarball/lcms2/src/.libs -llcms2"])
7827 if test "$GCC" = "yes"; then
7828 LCMS2_CFLAGS="${LCMS2_CFLAGS} -Wno-long-long"
7830 if test "$COM" = "MSC"; then # override the above
7831 LCMS2_LIBS=${WORKDIR}/UnpackedTarball/lcms2/bin/lcms2.lib
7834 dnl ===================================================================
7835 dnl Check for system cppunit
7836 dnl ===================================================================
7837 if test "$cross_compiling" != "yes"; then
7838 libo_CHECK_SYSTEM_MODULE([cppunit],[CPPUNIT],[cppunit >= 1.12.0])
7841 dnl ===================================================================
7842 dnl Check whether freetype is available
7843 dnl ===================================================================
7844 if test "$test_freetype" = "yes"; then
7845 AC_MSG_CHECKING([whether freetype is available])
7846 # FreeType has 3 different kinds of versions
7847 # * release, like 2.4.10
7848 # * libtool, like 13.0.7 (this what pkg-config returns)
7850 # FreeType's docs/VERSION.DLL provides a table mapping between the three
7853 PKG_CHECK_MODULES(FREETYPE, freetype2 >= 9.9.3)
7854 FREETYPE_CFLAGS=$(printf '%s' "$FREETYPE_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7855 SYSTEM_FREETYPE=TRUE
7857 _save_cflags="$CFLAGS"
7858 LIBS="$LIBS $FREETYPE_LIBS"
7859 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
7860 AC_CHECK_FUNC(FT_Face_GetCharVariantIndex, AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX), [])
7862 CFLAGS="$_save_cflags"
7864 AC_SUBST(FREETYPE_CFLAGS)
7865 AC_SUBST(FREETYPE_LIBS)
7866 AC_SUBST([SYSTEM_FREETYPE])
7868 dnl ===================================================================
7869 dnl Check for system libabw
7870 dnl ===================================================================
7871 libo_CHECK_SYSTEM_MODULE([libabw],[ABW],[libabw-0.1])
7873 dnl ===================================================================
7874 dnl Check for system libwps
7875 dnl ===================================================================
7876 libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.3])
7878 dnl ===================================================================
7879 dnl Check for system libwpg
7880 dnl ===================================================================
7881 libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.3])
7883 # ===================================================================
7884 # Check for system libxslt
7885 # to prevent incompatibilities between internal libxml2 and external libxslt,
7886 # or vice versa, use with_system_libxml here
7887 # ===================================================================
7888 if test "$with_system_libxml" = "auto"; then
7891 with_system_libxml="$with_system_libs"
7894 if test "$_os" = "Darwin" -a $MAC_OS_X_VERSION_MAX_ALLOWED -lt 1060; then
7895 with_system_libxml=no
7897 with_system_libxml=yes
7903 AC_MSG_CHECKING([which libxslt to use])
7904 if test "$with_system_libxml" = "yes"; then
7905 AC_MSG_RESULT([external])
7907 if test "$_os" = "Darwin"; then
7908 dnl make sure to use SDK path
7909 LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
7910 LIBEXSLT_CFLAGS="$LIBXSLT_CFLAGS"
7912 LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
7913 LIBEXSLT_LIBS="-lexslt $LIBXSLT_LIBS"
7915 PKG_CHECK_MODULES(LIBXSLT, libxslt)
7916 LIBXSLT_CFLAGS=$(printf '%s' "$LIBXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7917 PKG_CHECK_MODULES(LIBEXSLT, libexslt)
7918 LIBEXSLT_CFLAGS=$(printf '%s' "$LIBEXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7921 dnl Check for xsltproc
7922 AC_PATH_PROG(XSLTPROC, xsltproc, no)
7923 if test "$XSLTPROC" = "no"; then
7924 AC_MSG_ERROR([xsltproc is required])
7927 libo_MINGW_CHECK_DLL([libxslt])
7928 libo_MINGW_CHECK_DLL([libexslt])
7929 libo_MINGW_TRY_DLL([iconv])
7931 AC_MSG_RESULT([internal])
7933 BUILD_TYPE="$BUILD_TYPE LIBXSLT"
7935 if test "$cross_compiling" = "yes"; then
7936 AC_PATH_PROG(XSLTPROC, xsltproc, no)
7937 if test "$XSLTPROC" = "no"; then
7938 AC_MSG_ERROR([xsltproc is required])
7942 AC_SUBST(SYSTEM_LIBXSLT)
7943 if test -z "$SYSTEM_LIBXSLT_FOR_BUILD"; then
7944 SYSTEM_LIBXSLT_FOR_BUILD="$SYSTEM_LIBXSLT"
7946 AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
7948 AC_SUBST(LIBEXSLT_CFLAGS)
7949 AC_SUBST(LIBEXSLT_LIBS)
7950 AC_SUBST(LIBXSLT_CFLAGS)
7951 AC_SUBST(LIBXSLT_LIBS)
7954 # ===================================================================
7955 # Check for system libxml
7956 # ===================================================================
7957 AC_MSG_CHECKING([which libxml to use])
7958 if test "$with_system_libxml" = "yes"; then
7959 AC_MSG_RESULT([external])
7961 if test "$_os" = "Darwin"; then
7962 dnl make sure to use SDK path
7963 LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
7965 LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
7966 elif test $_os = iOS; then
7967 dnl make sure to use SDK path
7968 usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
7969 LIBXML_CFLAGS="-I$usr/include/libxml2"
7970 LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
7972 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
7973 LIBXML_CFLAGS=$(printf '%s' "$LIBXML_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
7976 dnl Check for xmllint
7977 AC_PATH_PROG(XMLLINT, xmllint, no)
7978 if test "$XMLLINT" = "no"; then
7979 AC_MSG_ERROR([xmllint is required])
7982 libo_MINGW_CHECK_DLL([libxml2])
7983 libo_MINGW_TRY_DLL([zlib1])
7985 AC_MSG_RESULT([internal])
7987 LIBXML_CFLAGS="-I${WORKDIR}/UnpackedTarball/xml2/include"
7988 if test "$COM" = "MSC"; then
7989 LIBXML_CFLAGS="${LIBXML_CFLAGS} -I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
7991 if test "$COM" = "MSC"; then
7992 LIBXML_LIBS="${WORKDIR}/UnpackedTarball/xml2/win32/bin.msvc/libxml2.lib"
7994 LIBXML_LIBS="-L${WORKDIR}/UnpackedTarball/xml2/.libs -lxml2"
7996 BUILD_TYPE="$BUILD_TYPE LIBXML2"
7998 AC_SUBST(SYSTEM_LIBXML)
7999 AC_SUBST(LIBXML_CFLAGS)
8000 AC_SUBST(LIBXML_LIBS)
8003 # =====================================================================
8004 # Checking for a Python interpreter with version >= 2.5 needed to build LO.
8005 # runtime requires Python 3 compatible version (>= 2.6)
8006 # Optionally user can pass an option to configure, i. e.
8007 # ./configure PYTHON=/usr/bin/python
8008 # =====================================================================
8009 if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
8010 # This allows a lack of system python with no error, we use internal one in that case.
8011 AM_PATH_PYTHON([2.5],, [:])
8012 # Clean PYTHON_VERSION checked below if cross-compiling
8014 if test "$PYTHON" != ":"; then
8015 PYTHON_FOR_BUILD=$PYTHON
8018 AC_SUBST(PYTHON_FOR_BUILD)
8020 # Checks for Python to use for Pyuno
8021 AC_MSG_CHECKING([which Python to use for Pyuno])
8022 case "$enable_python" in
8024 if test -z $PYTHON_FOR_BUILD; then
8025 # Python is required to build LibreOffice. In theory we could separate the build-time Python
8026 # requirement from the choice whether to include Python stuff in the installer, but why
8028 AC_MSG_ERROR([Python is required at build time.])
8031 AC_MSG_RESULT([none])
8034 if test "$DISABLE_SCRIPTING" = TRUE -a -n "$PYTHON_FOR_BUILD"; then
8035 AC_MSG_RESULT([no, overridden by --disable-scripting])
8037 elif test $build_os = cygwin; then
8038 dnl When building on Windows we don't attempt to use any installed
8039 dnl "system" Python.
8041 dnl (When cross-compiling to Windows from Linux using the mingw32-cross
8042 dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
8043 dnl MinGW cross-compilation setups.)
8044 AC_MSG_RESULT([fully internal])
8045 enable_python=internal
8046 elif test "$cross_compiling" = yes; then
8047 AC_MSG_RESULT([system])
8048 enable_python=system
8050 # Unset variables set by the above AM_PATH_PYTHON so that
8051 # we actually do check anew.
8052 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
8053 AM_PATH_PYTHON([3.3],, [:])
8054 if test "$PYTHON" = :; then
8055 AC_MSG_RESULT([internal])
8056 enable_python=internal
8058 AC_MSG_RESULT([system])
8059 enable_python=system
8064 AC_MSG_RESULT([internal])
8067 AC_MSG_RESULT([fully internal])
8068 enable_python=internal
8071 AC_MSG_RESULT([system])
8074 AC_MSG_ERROR([Incorrect --enable-python option])
8078 if test $enable_python != no; then
8079 BUILD_TYPE="$BUILD_TYPE PYUNO"
8082 if test $enable_python = system; then
8083 if test -z "$PYTHON_CFLAGS" -a $_os = Darwin; then
8084 # We already have logic above to make sure the system Python
8085 # is used only when building against SDK 10.6 or newer.
8087 # Make sure we use the 2.6 Python when building against the
8089 case $with_macosx_sdk in
8091 python_version=2.6;;
8093 python_version=2.7;;
8096 python_version=2.7;;
8098 PYTHON=python$python_version
8099 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX${with_macosx_sdk}.sdk/System/Library/Frameworks/Python.framework/Versions/${python_version}/include/python${python_version}"
8100 PYTHON_LIBS="-framework Python"
8102 if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
8103 # Fallback: Accept these in the environment, or as set above
8106 elif test "$cross_compiling" != yes; then
8107 # Unset variables set by the above AM_PATH_PYTHON so that
8108 # we actually do check anew.
8109 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
8110 # This causes an error if no python command is found
8111 AM_PATH_PYTHON([3.3])
8112 python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
8113 python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
8114 python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
8115 python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
8116 if test -z "$PKG_CONFIG"; then
8117 PYTHON_CFLAGS="-I$python_include"
8118 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
8119 elif $PKG_CONFIG --exists python-$python_version; then
8120 PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
8121 PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version` $python_libs"
8123 PYTHON_CFLAGS="-I$python_include"
8124 PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
8127 dnl How to find out the cross-compilation Python installation path?
8128 dnl Let's hardocode what we know for different distributions for now...
8129 for python_version in 2.6; do
8130 if test -f ${MINGW_SYSROOT}/include/python${python_version}/Python.h; then
8131 PYTHON_CFLAGS="-I${MINGW_SYSROOT}/include/python$python_version"
8132 PYTHON_LIBS="-L${MINGW_SYSROOT}/lib -lpython$python_version $python_libs"
8133 AC_MSG_CHECKING([for python.exe])
8134 libo_MINGW_CHECK_DLL([libpython$python_version])
8135 libo_MINGW_CHECK_DLL([libreadline6])
8136 libo_MINGW_CHECK_DLL([libtermcap])
8137 # could we somehow extract the really mingw python version from
8138 # actual distro package?
8139 # 2.6.2 currently on OpenSUSE 12.1?
8140 # rpm -q mingw32-python => mingw32-python-2.6.2-17.17.noarch
8141 PYTHON_VERSION=$python_version.2
8142 PYTHON_VERSION_MAJOR=`echo $python_version | cut -d . -f 1`
8143 PYTHON_VERSION_MINOR=`echo $python_version | cut -d . -f 2`
8147 AC_MSG_CHECKING([for python version])
8148 AS_IF([test -n "$PYTHON_VERSION"],
8149 [AC_MSG_RESULT([$PYTHON_VERSION])],
8150 [AC_MSG_RESULT([not found])
8151 AC_MSG_ERROR([no usable python found])])
8152 test -n "$PYTHON_CFLAGS" && break
8154 # let the PYTHON_FOR_BUILD match the same python installation that
8155 # provides PYTHON_CFLAGS/PYTHON_LDFLAGS for pyuno, which should be
8156 # better for PythonTests.
8157 PYTHON_FOR_BUILD=$PYTHON
8160 dnl By now enable_python should be "system", "internal" or "no"
8161 case $enable_python in
8165 if test "$CROSS_COMPILING" != TRUE; then
8166 dnl Check if the headers really work
8167 save_CPPFLAGS="$CPPFLAGS"
8168 CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
8169 AC_CHECK_HEADER(Python.h, [],
8170 [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
8172 CPPFLAGS="$save_CPPFLAGS"
8175 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8176 AC_MSG_CHECKING([for correct python library version])
8177 AC_RUN_IFELSE([AC_LANG_SOURCE([[
8180 int main(int argc, char **argv) {
8181 if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 6) ||
8182 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0;
8185 ]])],[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])],[])
8189 dnl FIXME Check if the Python library can be linked with, too?
8195 PYTHON_VERSION_MAJOR=3
8196 PYTHON_VERSION_MINOR=3
8197 PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.3
8198 BUILD_TYPE="$BUILD_TYPE PYTHON"
8199 # Embedded Python dies without Home set
8200 if test "$HOME" = ""; then
8203 # bz2 tarball and bzip2 is not standard
8204 if test -z "$BZIP2"; then
8205 AC_PATH_PROG( BZIP2, bzip2)
8206 if test -z "$BZIP2"; then
8207 AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
8216 AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
8220 AC_SUBST(DISABLE_PYTHON)
8221 AC_SUBST(SYSTEM_PYTHON)
8222 AC_SUBST(PYTHON_CFLAGS)
8223 AC_SUBST(PYTHON_LIBS)
8224 AC_SUBST(PYTHON_VERSION)
8225 AC_SUBST(PYTHON_VERSION_MAJOR)
8226 AC_SUBST(PYTHON_VERSION_MINOR)
8228 AC_MSG_CHECKING([whether to build the MariaDB/MySQL Connector extension])
8229 if test "x$enable_ext_mariadb_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
8230 AC_MSG_RESULT([yes])
8231 ENABLE_MARIADBC=TRUE
8235 BUILD_TYPE="$BUILD_TYPE MARIADBC"
8240 AC_SUBST(ENABLE_MARIADBC)
8241 AC_SUBST(MARIADBC_MAJOR)
8242 AC_SUBST(MARIADBC_MINOR)
8243 AC_SUBST(MARIADBC_MICRO)
8245 if test "$ENABLE_MARIADBC" = "TRUE"; then
8247 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MARIADBC"
8249 dnl ===================================================================
8250 dnl Check for system MariaDB
8251 dnl ===================================================================
8252 AC_MSG_CHECKING([which MariaDB to use])
8253 if test "$with_system_mariadb" = "yes"; then
8254 AC_MSG_RESULT([external])
8256 #AC_PATH_PROG(MARIADBCONFIG, [mariadb_config])
8257 if test -z "$MARIADBCONFIG"; then
8258 AC_PATH_PROG(MARIADBCONFIG, [mysql_config])
8259 if test -z "$MARIADBCONFIG"; then
8260 #AC_MSG_ERROR([mariadb_config and mysql_config are missing. Install MariaDB or MySQL package.])
8261 AC_MSG_ERROR([mysql_config is missing. Install MySQL client library development package.])
8264 AC_MSG_CHECKING([MariaDB version])
8265 MARIADB_VERSION=`$MARIADBCONFIG --version`
8266 MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1`
8267 if test "$MARIADB_MAJOR" -ge "5"; then
8270 AC_MSG_ERROR([too old, use 5.0.x or later])
8272 AC_MSG_CHECKING([for MariaDB Client library])
8273 MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`
8274 if test "$COM_GCC_IS_CLANG" = TRUE; then
8275 MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//)
8277 MARIADB_LIBS=`$MARIADBCONFIG --libs_r`
8278 dnl At least mariadb-5.5.34-3.fc20.x86_64 plus
8279 dnl mariadb-5.5.34-3.fc20.i686 reports 64-bit specific output even under
8281 if test "$OS" = LINUX -a "$CPUNAME" = INTEL; then
8282 MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-m64//)
8283 MARIADB_LIBS=$(printf '%s' "$MARIADB_LIBS" \
8284 | sed -e 's|/lib64/|/lib/|')
8286 AC_MSG_RESULT([includes '$MARIADB_CFLAGS', libraries '$MARIADB_LIBS'])
8287 AC_MSG_CHECKING([whether to bundle the MySQL/MariaDB client library])
8288 if test "$enable_bundle_mariadb" = "yes"; then
8289 AC_MSG_RESULT([yes])
8291 LIBMARIADB=lib$(echo "${MARIADB_LIBS}" | sed -e 's/[[[:space:]]]\+-l/\n/g' | grep -E '(mysqlclient|mariadb)')
8292 if test "$_os" = "Darwin"; then
8293 LIBMARIADB=${LIBMARIADB}.dylib
8294 elif test "$_os" = "WINNT"; then
8295 LIBMARIADB=${LIBMARIADB}.dll
8297 LIBMARIADB=${LIBMARIADB}.so
8299 LIBMARIADB_PATH=$($MARIADBCONFIG --variable=pkglibdir)
8300 AC_MSG_CHECKING([for $LIBMARIADB in $LIBMARIADB_PATH])
8301 if test -e "$LIBMARIADB_PATH/$LIBMARIADB"; then
8302 AC_MSG_RESULT([found.])
8303 PathFormat "$LIBMARIADB_PATH"
8304 LIBMARIADB_PATH="$formatted_path"
8306 AC_MSG_ERROR([not found.])
8313 AC_MSG_RESULT([internal])
8314 AC_MSG_ERROR([libmariadb is known to be broken as of 2013-10; use libmysqlclient])
8316 MARIADB_CFLAGS="-I${WORKDIR}/UnpackedTarball/mariadb/include"
8317 MARIADB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lmariadblib"
8318 BUILD_TYPE="$BUILD_TYPE MARIADB"
8321 AC_SUBST(SYSTEM_MARIADB)
8322 AC_SUBST(MARIADB_CFLAGS)
8323 AC_SUBST(MARIADB_LIBS)
8324 AC_SUBST(LIBMARIADB)
8325 AC_SUBST(LIBMARIADB_PATH)
8326 AC_SUBST(BUNDLE_MARIADB)
8329 dnl ===================================================================
8330 dnl Check for system MySQL C++ Connector
8331 dnl ===================================================================
8333 # who thought this too-generic cppconn dir was a good idea?
8334 AC_MSG_CHECKING([MySQL Connector/C++])
8335 if test "$with_system_mysql_cppconn" = "yes"; then
8336 AC_MSG_RESULT([external])
8337 SYSTEM_MYSQL_CPPCONN=TRUE
8339 AC_CHECK_HEADER(mysql_driver.h, [],
8340 [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], [])
8341 AC_CHECK_LIB([mysqlcppconn], [main], [:],
8342 [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
8344 LIBS="$LIBS -lmysqlcppconn"
8345 AC_MSG_CHECKING([version])
8346 AC_RUN_IFELSE([AC_LANG_SOURCE([[
8347 #include <mysql_driver.h>
8349 int main(int argc, char **argv) {
8350 sql::Driver *driver;
8351 driver = get_driver_instance();
8352 if (driver->getMajorVersion() > 1 || \
8353 (driver->getMajorVersion() == 1 && driver->getMinorVersion() > 0) || \
8354 (driver->getMajorVersion() == 1 && driver->getMinorVersion() == 0 && driver->getPatchVersion() >= 6))
8359 ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[])
8364 AC_MSG_RESULT([internal])
8365 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
8366 SYSTEM_MYSQL_CPPCONN=
8370 AC_SUBST(SYSTEM_MYSQL_CPPCONN)
8372 dnl ===================================================================
8373 dnl Check for system hsqldb
8374 dnl ===================================================================
8375 if test "$with_java" != "no"; then
8376 HSQLDB_USE_JDBC_4_1=
8377 AC_MSG_CHECKING([which hsqldb to use])
8378 if test "$with_system_hsqldb" = "yes"; then
8379 AC_MSG_RESULT([external])
8381 if test -z $HSQLDB_JAR; then
8382 HSQLDB_JAR=/usr/share/java/hsqldb.jar
8384 AC_CHECK_FILE($HSQLDB_JAR, [],
8385 [AC_MSG_ERROR(hsqldb.jar not found.)], [])
8386 AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
8388 if $PERL -e 'use Archive::Zip;
8389 my $file = "$ENV{'HSQLDB_JAR'}";
8390 my $zip = Archive::Zip->new( $file );
8391 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
8392 if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
8393 push @l, split(/\n/, $mf);
8394 foreach my $line (@l) {
8395 if ($line =~ m/Specification-Version:/) {
8396 ($t, $version) = split (/:/,$line);
8397 $version =~ s/^\s//;
8398 ($a, $b, $c, $d) = split (/\./,$version);
8399 if ($c == "0" && $d > "8") {
8409 AC_MSG_RESULT([yes])
8411 AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
8414 AC_MSG_RESULT([internal])
8416 BUILD_TYPE="$BUILD_TYPE HSQLDB"
8417 AC_MSG_CHECKING([whether hsqldb should be built with JDBC 4.1])
8418 javanumver=`$JAVAINTERPRETER -version 2>&1 | $AWK -v num=true -f $SRC_ROOT/solenv/bin/getcompver.awk`
8419 if expr "$javanumver" '>=' 000100060000 > /dev/null; then
8420 AC_MSG_RESULT([yes])
8421 HSQLDB_USE_JDBC_4_1=TRUE
8426 AC_SUBST(SYSTEM_HSQLDB)
8427 AC_SUBST(HSQLDB_JAR)
8428 AC_SUBST([HSQLDB_USE_JDBC_4_1])
8431 dnl ===================================================================
8432 dnl Check for PostgreSQL stuff
8433 dnl ===================================================================
8434 if test "x$enable_postgresql_sdbc" != "xno"; then
8435 SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
8437 if test "$with_krb5" = "yes" -a "$enable_openssl" = "no"; then
8438 AC_MSG_ERROR([krb5 needs OpenSSL, but --disable-openssl was given.])
8440 if test "$with_gssapi" = "yes" -a "$enable_openssl" = "no"; then
8441 AC_MSG_ERROR([GSSAPI needs OpenSSL, but --disable-openssl was given.])
8444 AC_MSG_CHECKING([PostgreSQL C interface])
8445 if test "$with_system_postgresql" = "yes"; then
8446 AC_MSG_RESULT([external PostgreSQL])
8447 SYSTEM_POSTGRESQL=TRUE
8448 if test "$_os" = Darwin; then
8450 for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
8451 pg_supp_path="$P_SEP$d$pg_supp_path"
8454 AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
8455 if test -z "$PGCONFIG"; then
8456 AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
8458 POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
8459 POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
8461 # if/when anything else than PostgreSQL uses Kerberos,
8462 # move this out of `test "x$enable_postgresql_sdbc" != "xno"'
8467 # MacOS X has system MIT Kerberos 5 since 10.4
8468 if test "$with_krb5" != "no"; then
8471 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8472 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5, try installing libcom_err devel package])])
8475 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8476 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5, try installing krb5 devel package])])
8477 KRB5_LIBS="$KRB5_LIBS $LIBS"
8480 if test "$with_gssapi" != "no"; then
8483 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8484 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8490 if test "$with_krb5" = "yes" -o "$with_gssapi" = "yes"; then
8491 AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Windows.])
8494 Linux|GNU|*BSD|DragonFly)
8495 if test "$with_krb5" != "no"; then
8498 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8499 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
8502 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8503 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
8504 KRB5_LIBS="$KRB5_LIBS $LIBS"
8507 if test "$with_gssapi" != "no"; then
8510 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8511 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8517 if test "$with_krb5" = "yes"; then
8520 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8521 [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
8524 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
8525 [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
8526 KRB5_LIBS="$KRB5_LIBS $LIBS"
8529 if test "$with_gssapi" = "yes"; then
8532 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
8533 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
8539 if test -n "$with_libpq_path"; then
8540 SYSTEM_POSTGRESQL=TRUE
8541 AC_MSG_RESULT([external libpq])
8542 POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
8543 POSTGRESQL_INC=-I"${with_libpq_path}/include/"
8546 AC_MSG_RESULT([internal])
8548 POSTGRESQL_INC="%OVERRIDE_ME%"
8549 BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
8552 if test "${SYSTEM_POSTGRESQL}" = "TRUE"; then
8553 AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
8555 save_CPPFLAGS=$CPPFLAGS
8557 CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
8558 LIBS="${LIBS} ${POSTGRESQL_LIB}"
8559 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
8560 AC_CHECK_LIB([pq], [PQconnectdbParams], [:],
8561 [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
8563 CPPFLAGS=$save_CPPFLAGS
8566 BUILD_POSTGRESQL_SDBC=TRUE
8569 AC_SUBST(WITH_GSSAPI)
8570 AC_SUBST(GSSAPI_LIBS)
8572 AC_SUBST(BUILD_POSTGRESQL_SDBC)
8573 AC_SUBST(SYSTEM_POSTGRESQL)
8574 AC_SUBST(POSTGRESQL_INC)
8575 AC_SUBST(POSTGRESQL_LIB)
8577 dnl ===================================================================
8578 dnl Check for Firebird stuff
8579 dnl ===================================================================
8580 ENABLE_FIREBIRD_SDBC=""
8581 if test "x$enable_firebird_sdbc" = "xyes"; then
8582 SCPDEFS="$SCPDEFS -DWITH_FIREBIRD_SDBC"
8584 dnl ===================================================================
8585 dnl Check for system Firebird
8586 dnl ===================================================================
8587 AC_MSG_CHECKING([which Firebird to use])
8588 if test "$with_system_firebird" = "yes"; then
8589 AC_MSG_RESULT([external])
8590 SYSTEM_FIREBIRD=TRUE
8591 AC_PATH_PROG(FIREBIRDCONFIG, [fb_config])
8592 if test -z "$FIREBIRDCONFIG"; then
8593 AC_MSG_NOTICE([No fb_config -- using pkg-config])
8594 PKG_CHECK_MODULES(FIREBIRD, fbembed)
8595 FIREBIRD_VERSION=`pkg-config --modversion fbembed`
8597 AC_MSG_NOTICE([fb_config found])
8598 FIREBIRD_VERSION=`$FIREBIRDCONFIG --version`
8599 AC_MSG_CHECKING([for Firebird Client library])
8600 FIREBIRD_CFLAGS=`$FIREBIRDCONFIG --cflags`
8601 FIREBIRD_LIBS=`$FIREBIRDCONFIG --embedlibs`
8603 AC_MSG_RESULT([includes `$FIREBIRD_CFLAGS', libraries `$FIREBIRD_LIBS'])
8604 AC_MSG_CHECKING([Firebird version])
8605 if test -n "${FIREBIRD_VERSION}"; then
8606 FIREBIRD_MAJOR=`echo $FIREBIRD_VERSION | cut -d"." -f1`
8607 FIREBIRD_MINOR=`echo $FIREBIRD_VERSION | cut -d"." -f2`
8608 if test "$FIREBIRD_MAJOR" -eq "2" -a "$FIREBIRD_MINOR" -eq "5"; then
8611 AC_MSG_ERROR([Ensure firebird 2.5.x is installed])
8614 __save_CFLAGS="${CFLAGS}"
8615 CFLAGS="${CFLAGS} ${FIREBIRD_CFLAGS}"
8616 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ibase.h>
8617 #if defined(FB_API_VER) && FB_API_VER == 25
8619 #error "Wrong Firebird API version"
8620 #endif]])],AC_MSG_RESULT([OK]),AC_MSG_ERROR([Ensure firebird 2.5.x is installed]))
8621 CFLAGS="${__save_CFLAGS}"
8623 ENABLE_FIREBIRD_SDBC="TRUE"
8624 elif test "$enable_database_connectivity" != yes; then
8625 AC_MSG_RESULT([none])
8626 elif test "$cross_compiling" = "yes"; then
8627 AC_MSG_RESULT([none])
8629 dnl We need libatomic-ops for any non X86/X64 system
8630 if test "${CPUNAME}" != INTEL -a "${CPUNAME}" != X86_64; then
8631 dnl ===================================================================
8632 dnl Check for system libatomic-ops
8633 dnl ===================================================================
8634 libo_CHECK_SYSTEM_MODULE([libatomic_ops],[ATOMIC_OPS],[atomic_ops >= 0.7.2])
8635 if test "$with_system_libatomic_ops" = "yes"; then
8636 SYSTEM_LIBATOMIC_OPS=TRUE
8637 AC_CHECK_HEADERS(atomic_ops.h, [],
8638 [AC_MSG_ERROR(atomic_ops.h not found. install libatomic-ops)], [])
8640 SYSTEM_LIBATOMIC_OPS=
8641 LIBATOMIC_OPS_CFLAGS="-I${WORKDIR}/UnpackedTarball/libatomic_ops/include"
8642 LIBATOMIC_OPS_LIBS="-latomic_ops"
8643 BUILD_TYPE="$BUILD_TYPE LIBATOMIC_OPS"
8647 AC_MSG_RESULT([internal])
8649 FIREBIRD_CFLAGS="-I${WORKDIR}/UnpackedTarball/firebird/include"
8650 FIREBIRD_LIBS="-lfbembed"
8652 BUILD_TYPE="$BUILD_TYPE FIREBIRD"
8653 ENABLE_FIREBIRD_SDBC="TRUE"
8657 AC_SUBST(ENABLE_FIREBIRD_SDBC)
8658 AC_SUBST(SYSTEM_LIBATOMIC_OPS)
8659 AC_SUBST(LIBATOMIC_OPS_CFLAGS)
8660 AC_SUBST(LIBATOMIC_OPS_LIBS)
8661 AC_SUBST(SYSTEM_FIREBIRD)
8662 AC_SUBST(FIREBIRD_CFLAGS)
8663 AC_SUBST(FIREBIRD_LIBS)
8664 dnl AC_SUBST([TOMMATH_CFLAGS])
8665 dnl AC_SUBST([TOMMATH_LIBS])
8667 dnl ===================================================================
8668 dnl Check for system curl
8669 dnl ===================================================================
8670 AC_MSG_CHECKING([which libcurl to use])
8671 if test "$with_system_curl" = "auto"; then
8672 with_system_curl="$with_system_libs"
8675 if test "$with_system_curl" = "yes"; then
8676 AC_MSG_RESULT([external])
8679 AC_MSG_CHECKING([whether libcurl is >= 7.19.4])
8681 # First try PKGCONFIG and then fall back
8682 PKG_CHECK_MODULES(CURL, libcurl >= 7.19.4,, [:])
8684 if test -n "$CURL_PKG_ERRORS"; then
8685 AC_PATH_PROG(CURLCONFIG, curl-config)
8686 if test -z "$CURLCONFIG"; then
8687 AC_MSG_ERROR([curl developement files not found])
8689 CURL_LIBS=`$CURLCONFIG --libs`
8690 CURL_CFLAGS=$("$CURLCONFIG" --cflags | sed -e "s/-I/${ISYSTEM?}/g")
8691 curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
8693 case $curl_version in
8694 dnl brackets doubled below because Autoconf uses them as m4 quote characters,
8695 dnl so they need to be doubled to end up in the configure script
8696 7.19.4|7.19.[[5-9]]|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
8699 AC_MSG_ERROR([no, you have $curl_version])
8703 AC_MSG_RESULT([yes])
8705 libo_MINGW_CHECK_DLL([libcurl])
8706 libo_MINGW_TRY_DLL([libintl])
8707 libo_MINGW_TRY_DLL([libidn])
8708 libo_MINGW_TRY_DLL([libnspr4])
8709 libo_MINGW_TRY_DLL([nssutil3])
8710 libo_MINGW_TRY_DLL([libplc4])
8711 libo_MINGW_TRY_DLL([libplds4])
8712 libo_MINGW_TRY_DLL([nss3])
8713 libo_MINGW_TRY_DLL([ssl3])
8714 libo_MINGW_TRY_DLL([libgpg-error])
8715 libo_MINGW_TRY_DLL([libgcrypt])
8716 libo_MINGW_TRY_DLL([libssh2])
8718 elif test $_os = iOS; then
8719 # Let's see if we need curl, I think not?
8720 AC_MSG_RESULT([none])
8723 AC_MSG_RESULT([internal])
8725 BUILD_TYPE="$BUILD_TYPE CURL"
8728 AC_SUBST(SYSTEM_CURL)
8729 AC_SUBST(CURL_CFLAGS)
8731 AC_SUBST(ENABLE_CURL)
8733 dnl ===================================================================
8734 dnl Check for system boost
8735 dnl ===================================================================
8736 AC_MSG_CHECKING([which boost to use])
8737 if test "$with_system_boost" = "yes"; then
8738 AC_MSG_RESULT([external])
8743 mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
8744 libo_MINGW_TRY_DLL([$mingw_boost_date_time_dll])
8745 if test -z "$MINGW_BOOST_DATE_TIME_DLL"; then
8746 # if not found, try again with 'lib' prefix
8747 libo_MINGW_CHECK_DLL([lib$mingw_boost_date_time_dll])
8750 save_CXXFLAGS=$CXXFLAGS
8751 CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS"
8752 AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
8753 [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
8754 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
8755 [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
8756 AC_CHECK_HEADER(boost/function.hpp, [],
8757 [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
8758 CXXFLAGS="$CXXFLAGS -fno-exceptions"
8759 AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
8760 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
8761 ]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
8762 if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
8763 AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
8765 AC_MSG_RESULT([yes])
8767 CXXFLAGS=$save_CXXFLAGS
8770 AC_MSG_RESULT([internal])
8771 BUILD_TYPE="$BUILD_TYPE BOOST"
8774 AC_SUBST(SYSTEM_BOOST)
8776 dnl ===================================================================
8777 dnl Check for system mdds
8778 dnl ===================================================================
8779 libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds >= 0.10.3], ["-I${WORKDIR}/UnpackedTarball/mdds/include"])
8781 dnl ===================================================================
8782 dnl Check for system glm
8783 dnl ===================================================================
8784 AC_MSG_CHECKING([which glm to use])
8785 if test "$with_system_glm" = "yes"; then
8786 AC_MSG_RESULT([external])
8789 AC_CHECK_HEADER([glm/glm.hpp], [],
8790 [AC_MSG_ERROR([glm/glm.hpp not found. install glm])], [])
8793 AC_MSG_RESULT([internal])
8794 BUILD_TYPE="$BUILD_TYPE GLM"
8797 AC_SUBST([SYSTEM_GLM])
8799 dnl ===================================================================
8800 dnl Check for system glew
8801 dnl ===================================================================
8802 libo_CHECK_SYSTEM_MODULE([glew], [GLEW], [glew >= 1.10.0])
8804 dnl ===================================================================
8805 dnl Check for system vigra
8806 dnl ===================================================================
8807 AC_MSG_CHECKING([which vigra to use])
8808 if test "$with_system_vigra" = "yes"; then
8809 AC_MSG_RESULT([external])
8812 AC_CHECK_HEADER(vigra/copyimage.hxx, [],
8813 [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], [])
8816 AC_MSG_RESULT([internal])
8817 BUILD_TYPE="$BUILD_TYPE VIGRA"
8820 AC_SUBST(SYSTEM_VIGRA)
8822 dnl ===================================================================
8823 dnl Check for system odbc
8824 dnl ===================================================================
8825 AC_MSG_CHECKING([which odbc headers to use])
8826 if test "$with_system_odbc" = "yes"; then
8827 AC_MSG_RESULT([external])
8828 SYSTEM_ODBC_HEADERS=TRUE
8830 AC_CHECK_HEADER(sqlext.h, [],
8831 [AC_MSG_ERROR(odbc not found. install odbc)], [])
8832 elif test "$enable_database_connectivity" != yes; then
8833 AC_MSG_RESULT([none])
8835 AC_MSG_RESULT([internal])
8836 SYSTEM_ODBC_HEADERS=
8838 AC_SUBST(SYSTEM_ODBC_HEADERS)
8841 dnl ===================================================================
8842 dnl Check for system openldap
8843 dnl ===================================================================
8845 if test "$_os" != "WINNT" -a "$_os" != "iOS" -a "$_os" != "Android"; then
8846 AC_MSG_CHECKING([which openldap library to use])
8847 if test "$with_system_openldap" = "yes"; then
8848 AC_MSG_RESULT([external])
8849 SYSTEM_OPENLDAP=TRUE
8850 AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
8851 AC_CHECK_LIB([ldap], [ldap_simple_bind_s], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
8852 AC_CHECK_LIB([ldap], [ldap_set_option], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
8854 AC_MSG_RESULT([internal])
8856 BUILD_TYPE="$BUILD_TYPE OPENLDAP"
8859 AC_SUBST(SYSTEM_OPENLDAP)
8861 dnl ===================================================================
8862 dnl Check for mozilla ab connectivity for windows
8863 dnl ===================================================================
8865 if test "$_os" = "WINNT"; then
8866 AC_MSG_CHECKING([whether to enable build of Mozilla addressbook connectivity driver for Windows])
8867 if test "$enable_win_mozab_driver" = "yes" -a "$WITH_MINGW" != "YES" ; then
8869 AC_MSG_RESULT([yes, internal (old windows mozab driver)])
8870 BUILD_TYPE="$BUILD_TYPE MOZ"
8871 MSVC80_DLLS="msvcp80.dll msvcr80.dll Microsoft.VC80.CRT.manifest"
8872 MSVC80_DLL_PATH=`cygpath -u "$TARFILE_LOCATION"`
8873 for dll in $MSVC80_DLLS; do
8874 if ! test -f "$MSVC80_DLL_PATH/$dll"; then
8875 AC_MSG_ERROR([can not find $dll in $MSVC80_DLL_PATH needed for the pre-built Mozilla libraries])
8883 AC_SUBST(WITH_MOZAB4WIN)
8884 AC_SUBST(MSVC80_DLLS)
8885 AC_SUBST(MSVC80_DLL_PATH)
8887 dnl ===================================================================
8888 dnl Check for TLS/SSL and cryptographic implementation to use
8889 dnl ===================================================================
8890 AC_MSG_CHECKING([which TLS/SSL and cryptographic implementation to use])
8891 if test -n "$with_tls"; then
8894 AC_DEFINE(USE_TLS_OPENSSL)
8897 if test "$enable_openssl" != "yes"; then
8898 AC_MSG_ERROR(["Disabling OpenSSL was requested, but the requested TLS to use is actually OpenSSL."])
8901 # warn that OpenSSL has been selected but not all TLS code has this option
8902 AC_MSG_WARN([TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS])
8903 add_warning "TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS"
8906 AC_DEFINE(USE_TLS_NSS)
8910 AC_MSG_ERROR([unsupported implementation $with_tls. Supported are:
8912 nss - Mozilla's Network Security Services (NSS)
8916 elif test $_os = iOS -o $_os = Android; then
8917 # We don't build NSS for iOS and Android
8918 AC_DEFINE(USE_TLS_OPENSSL)
8921 # default to using NSS, it results in smaller oox lib
8922 AC_DEFINE(USE_TLS_NSS)
8925 AC_MSG_RESULT([$TLS])
8928 dnl ===================================================================
8929 dnl Check for system NSS
8930 dnl ===================================================================
8931 libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
8932 if test "$with_system_nss" = "yes"; then
8933 libo_MINGW_CHECK_DLL([libnspr4])
8934 libo_MINGW_CHECK_DLL([libplc4])
8935 libo_MINGW_CHECK_DLL([libplds4])
8936 libo_MINGW_CHECK_DLL([nss3])
8937 libo_MINGW_CHECK_DLL([nssutil3])
8938 libo_MINGW_CHECK_DLL([smime3])
8939 libo_MINGW_CHECK_DLL([ssl3])
8942 dnl ===================================================================
8943 dnl Check for system mozilla headers
8944 dnl ===================================================================
8945 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=
8946 AC_MSG_CHECKING([which NPAPI headers to use])
8948 if test "$with_system_npapi_headers" = "yes"; then
8949 AC_MSG_RESULT([external])
8950 SYSTEM_NPAPI_HEADERS=TRUE
8951 # First try npapi-sdk:
8952 PKG_CHECK_MODULES(NPAPI_HEADERS, npapi-sdk, [LOCATED=yes], [LOCATED=no])
8953 # Then go with libxul:
8954 if test "x$LOCATED" != "xyes"; then
8955 PKG_CHECK_MODULES(NPAPI_HEADERS, libxul, [LOCATED=yes], [LOCATED=no])
8957 if test "x$LOCATED" != "xyes"; then
8958 PKG_CHECK_MODULES(NPAPI_HEADERS, mozilla-plugin, [LOCATED=yes], [LOCATED=no])
8960 # if still not found bail out
8961 if test "x$LOCATED" != "xyes"; then
8962 AC_MSG_ERROR([npapi.h header file not found])
8967 CFLAGS="$CFLAGS $NPAPI_HEADERS_CFLAGS"
8968 AC_MSG_CHECKING([for NPP_GetMIMEDescription return type])
8973 const char* NPP_GetMIMEDescription(void) { return "foo"; }
8975 [AC_MSG_RESULT([const char*])],
8977 AC_MSG_RESULT([char*])
8978 HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=TRUE
8982 NPAPI_HEADERS_CFLAGS=$(printf '%s' "$NPAPI_HEADERS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
8984 AC_MSG_RESULT([internal])
8985 dnl ...but will not be built/used unless ENABLE_NPAPI_FROM_BROWSER or
8986 dnl ENABLE_NPAPI_INTO_BROWSER is TRUE
8987 SYSTEM_NPAPI_HEADERS=
8989 AC_SUBST(NPAPI_HEADERS_CFLAGS)
8990 AC_SUBST(SYSTEM_NPAPI_HEADERS)
8991 AC_SUBST(HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION)
8993 dnl ===================================================================
8994 dnl Check for system sane
8995 dnl ===================================================================
8996 AC_MSG_CHECKING([which sane header to use])
8997 if test "$with_system_sane" = "yes"; then
8998 AC_MSG_RESULT([external])
8999 AC_CHECK_HEADER(sane/sane.h, [],
9000 [AC_MSG_ERROR(sane not found. install sane)], [])
9002 AC_MSG_RESULT([internal])
9003 BUILD_TYPE="$BUILD_TYPE SANE"
9006 dnl ===================================================================
9007 dnl Check for system icu
9008 dnl ===================================================================
9015 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="TRUE"
9016 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
9017 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
9018 ICU_RECLASSIFIED_HEBREW_LETTER="TRUE"
9019 AC_MSG_CHECKING([which icu to use])
9020 if test "$with_system_icu" = "yes"; then
9021 AC_MSG_RESULT([external])
9024 AC_MSG_CHECKING([for unicode/rbbi.h])
9025 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
9028 if test "$cross_compiling" != "yes" -o "$WITH_MINGW" = "yes"; then
9030 if test "$WITH_MINGW" = "yes"; then
9031 ICUPATH=`$CC -print-sysroot`/mingw/bin:"$ICUPATH"
9033 AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
9035 AC_MSG_CHECKING([ICU version])
9036 ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
9037 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
9038 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
9040 if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "2" \); then
9041 AC_MSG_RESULT([OK, $ICU_VERSION])
9043 AC_MSG_ERROR([not suitable, only >= 4.2 supported currently])
9047 if test "$cross_compiling" = "yes" -a \( "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \); then
9048 AC_PATH_PROG([ICUCONFIG_FOR_BUILD], [icu-config], [], [$PATH:/usr/sbin:/sbin])
9049 ICU_VERSION_FOR_BUILD=`$ICUCONFIG_FOR_BUILD --noverify --version 2>/dev/null || $ICUCONFIG_FOR_BUILD --version`
9050 ICU_MAJOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f1`
9051 ICU_MINOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f2`
9052 AC_MSG_CHECKING([if MinGW and system versions of ICU are compatible])
9053 if test "$ICU_MAJOR" -eq "$ICU_MAJOR_FOR_BUILD" -a "$ICU_MINOR" -eq "$ICU_MINOR_FOR_BUILD"; then
9054 AC_MSG_RESULT([yes])
9057 if test "$with_system_icu_for_build" != "force"; then
9058 AC_MSG_ERROR([System ICU is not version-compatible with MinGW ICU.
9059 You can use --with-system-icu-for-build=force to use it anyway.])
9064 if test "$cross_compiling" != "yes" -o "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force"; then
9065 # using the system icu tools can lead to version confusion, use the
9066 # ones from the build environment when cross-compiling
9067 AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
9068 if test -z "$SYSTEM_GENBRK"; then
9069 AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
9071 AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
9072 if test -z "$SYSTEM_GENCCODE"; then
9073 AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
9075 AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
9076 if test -z "$SYSTEM_GENCMN"; then
9077 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
9079 if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4" \); then
9080 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="TRUE"
9082 ICU_RECLASSIFIED_CLOSE_PARENTHESIS=
9084 if test "$ICU_MAJOR" -ge "49"; then
9085 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
9086 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
9087 ICU_RECLASSIFIED_HEBREW_LETTER="TRUE"
9089 ICU_RECLASSIFIED_PREPEND_SET_EMPTY=
9090 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER=
9091 ICU_RECLASSIFIED_HEBREW_LETTER=
9095 if test "$cross_compiling" = "yes"; then
9096 if test "$ICU_MAJOR" -ge "50"; then
9097 AC_MSG_RESULT([Ignore ICU_MINOR as obviously the libraries don't include the minor version in their names any more])
9102 libo_MINGW_CHECK_DLL([icudata][$ICU_MAJOR][$ICU_MINOR])
9103 libo_MINGW_CHECK_DLL([icui18n][$ICU_MAJOR][$ICU_MINOR])
9104 libo_MINGW_CHECK_DLL([icuuc][$ICU_MAJOR][$ICU_MINOR])
9106 AC_MSG_RESULT([internal])
9108 BUILD_TYPE="$BUILD_TYPE ICU"
9109 # surprisingly set these only for "internal" (to be used by various other
9110 # external libs): the system icu-config is quite unhelpful and spits out
9111 # dozens of weird flags and also default path -I/usr/include
9112 ICU_CFLAGS="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
9113 ICU_LIBS="-L${WORKDIR}/UnpackedTarball/icu/source/lib"
9115 AC_SUBST(SYSTEM_ICU)
9116 AC_SUBST(SYSTEM_GENBRK)
9117 AC_SUBST(SYSTEM_GENCCODE)
9118 AC_SUBST(SYSTEM_GENCMN)
9121 AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
9122 AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
9123 AC_SUBST(ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER)
9124 AC_SUBST(ICU_RECLASSIFIED_HEBREW_LETTER)
9125 AC_SUBST(ICU_CFLAGS)
9128 dnl ===================================================================
9130 dnl ===================================================================
9132 AC_MSG_CHECKING([whether to enable graphite support])
9133 if test $_os != Darwin -a $_os != Android -a $_os != iOS -a \( -z "$enable_graphite" -o "$enable_graphite" != no \); then
9134 AC_MSG_RESULT([yes])
9135 ENABLE_GRAPHITE="TRUE"
9136 AC_DEFINE(ENABLE_GRAPHITE)
9137 libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3])
9138 if test "$with_system_graphite" = "yes"; then
9139 libo_MINGW_CHECK_DLL([libgraphite2])
9144 AC_SUBST(ENABLE_GRAPHITE)
9146 dnl ===================================================================
9148 dnl ===================================================================
9150 AC_MSG_CHECKING([whether to enable orcus])
9151 if test -z "$enable_orcus" -o "$enable_orcus" != no; then
9152 AC_MSG_RESULT([yes])
9154 AC_DEFINE(ENABLE_ORCUS)
9156 libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.8 >= 0.7.0])
9157 if test "$with_system_orcus" != "yes"; then
9158 if test "$SYSTEM_BOOST" = "TRUE"; then
9159 # ===========================================================
9160 # Determine if we are going to need to link with Boost.System
9161 # ===========================================================
9162 dnl This seems to be necessary since boost 1.50 (1.48 does not need it,
9163 dnl 1.49 is untested). The macro BOOST_THREAD_DONT_USE_SYSTEM mentioned
9164 dnl in documentation has no effect.
9165 AC_MSG_CHECKING([if we need to link with Boost.System])
9167 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
9168 @%:@include <boost/version.hpp>
9170 #if BOOST_VERSION >= 105000
9171 # error yes, we need to link with Boost.System
9176 AC_MSG_RESULT([yes])
9182 dnl FIXME by renaming SYSTEM_LIBORCUS to SYSTEM_ORCUS in the build system world
9183 SYSTEM_LIBORCUS=$SYSTEM_ORCUS
9184 AC_SUBST([BOOST_SYSTEM_LIB])
9185 AC_SUBST(SYSTEM_LIBORCUS)
9190 AC_SUBST(ENABLE_ORCUS)
9192 dnl ===================================================================
9194 dnl ===================================================================
9195 AC_MSG_CHECKING([whether to enable HarfBuzz support])
9196 if test $_os != WINNT -a $_os != Darwin -a $_os != iOS; then
9197 AC_MSG_RESULT([yes])
9198 ENABLE_HARFBUZZ="TRUE"
9199 if $PKG_CONFIG --atleast-version 0.9.18 harfbuzz; then
9200 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"])
9202 libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz >= 0.9.10],[-I${WORKDIR}/UnpackedTarball/harfbuzz/src],["-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz -lharfbuzz-icu"])
9207 AC_SUBST(ENABLE_HARFBUZZ)
9209 dnl ===================================================================
9210 dnl Check for NPAPI interface to plug browser plugins into LibreOffice documents
9211 dnl ===================================================================
9212 AC_MSG_CHECKING([whether to plug browser plugins into LibreOffice documents])
9213 # Obviously no such thing on iOS or Android. Also not possible when building
9214 # 64-bit OS X code as the plugin code uses QuickTime and Carbon.
9215 if test "$_os" != Android -a "$_os" != iOS -a \( $_os != Darwin -o "$BITNESS_OVERRIDE" = "" \) -a \
9216 "$enable_headless" != yes -a "$enable_mpl_subset" != yes
9218 AC_MSG_RESULT([yes])
9219 ENABLE_NPAPI_FROM_BROWSER=TRUE
9222 ENABLE_NPAPI_FROM_BROWSER=
9224 AC_SUBST(ENABLE_NPAPI_FROM_BROWSER)
9226 dnl ===================================================================
9227 dnl Check for NPAPI interface to plug LibreOffice into browser windows
9228 dnl ===================================================================
9229 AC_MSG_CHECKING([whether to plug LibreOffice into browser windows])
9230 if test "$enable_mpl_subset" != yes -a \( "$_os" = WINNT -o "$_os" != Android -a "$_os" != Darwin -a "$_os" != iOS -a \
9231 "$enable_headless" != yes -a "$enable_gtk" != no \)
9233 AC_MSG_RESULT([yes])
9234 ENABLE_NPAPI_INTO_BROWSER=TRUE
9237 ENABLE_NPAPI_INTO_BROWSER=
9239 AC_SUBST(ENABLE_NPAPI_INTO_BROWSER)
9241 AC_MSG_CHECKING([whether to use X11])
9242 dnl ***************************************
9243 dnl testing for X libraries and includes...
9244 dnl ***************************************
9246 if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS -a "$enable_headless" != "yes"; then
9248 AC_DEFINE(HAVE_FEATURE_X11)
9250 AC_MSG_RESULT([$WANT_X11])
9252 if test "$WANT_X11" = "yes"; then
9255 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9257 if test -z "$x_includes"; then
9258 x_includes="default_x_includes"
9260 if test -z "$x_libraries"; then
9261 x_libraries="default_x_libraries"
9263 CFLAGS="$CFLAGS $X_CFLAGS"
9264 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
9265 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
9267 x_includes="no_x_includes"
9268 x_libraries="no_x_libraries"
9271 if test "$WANT_X11" = "yes"; then
9272 dnl ===================================================================
9273 dnl Check for Composite.h for Mozilla plugin
9274 dnl ===================================================================
9275 AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
9276 [#include <X11/Intrinsic.h>])
9278 # ENABLE_NPAPI_FROM_BROWSER requires Xt library
9279 AC_CHECK_LIB([Xt], [XtToolkitInitialize], [:],
9280 [AC_MSG_ERROR(Xt library not found)])
9282 dnl ===================================================================
9283 dnl Check for extension headers
9284 dnl ===================================================================
9285 AC_CHECK_HEADERS(X11/extensions/shape.h,[],[AC_MSG_ERROR([libXext headers not found])],
9286 [#include <X11/extensions/shape.h>])
9288 # vcl needs ICE and SM
9289 AC_CHECK_HEADERS(X11/ICE/ICElib.h,[],[AC_MSG_ERROR([libICE headers not found])])
9290 AC_CHECK_LIB([ICE], [IceConnectionNumber], [:],
9291 [AC_MSG_ERROR(ICE library not found)])
9292 AC_CHECK_HEADERS(X11/SM/SMlib.h,[],[AC_MSG_ERROR([libSM headers not found])])
9293 AC_CHECK_LIB([SM], [SmcOpenConnection], [:],
9294 [AC_MSG_ERROR(SM library not found)])
9297 dnl ===================================================================
9298 dnl Check for system Xrender
9299 dnl ===================================================================
9300 AC_MSG_CHECKING([whether to use Xrender])
9301 if test "$WANT_X11" = "yes" -a "$test_xrender" = "yes"; then
9302 AC_MSG_RESULT([yes])
9303 PKG_CHECK_MODULES(XRENDER, xrender)
9304 XRENDER_CFLAGS=$(printf '%s' "$XRENDER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9305 AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
9306 [AC_MSG_ERROR(libXrender not found or functional)], [])
9307 AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
9308 [AC_MSG_ERROR(Xrender not found. install X)], [])
9312 AC_SUBST(XRENDER_CFLAGS)
9313 AC_SUBST(XRENDER_LIBS)
9315 dnl ===================================================================
9316 dnl Check for XRandr
9317 dnl ===================================================================
9318 AC_MSG_CHECKING([whether to enable RandR support])
9319 if test "$WANT_X11" = "yes" -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \); then
9320 if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
9321 XRANDR_DLOPEN="TRUE"
9322 AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
9324 AC_MSG_RESULT([yes])
9325 XRANDR_DLOPEN="FALSE"
9326 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
9327 if test "$ENABLE_RANDR" != "TRUE"; then
9328 AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
9329 [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
9331 AC_CHECK_LIB([Xrandr], [XRRQueryExtension], [:],
9332 [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
9333 XRANDR_LIBS="-lXrandr "
9336 XRANDR_CFLAGS=$(printf '%s' "$XRANDR_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9342 AC_SUBST(XRANDR_DLOPEN)
9343 AC_SUBST(XRANDR_CFLAGS)
9344 AC_SUBST(XRANDR_LIBS)
9345 AC_SUBST(ENABLE_RANDR)
9347 if test "$enable_neon" = "no" -o "$enable_mpl_subset" = "yes"; then
9350 if test $_os = iOS -o $_os = Android; then
9353 AC_MSG_CHECKING([for webdav library])
9354 case "$WITH_WEBDAV" in
9356 AC_MSG_RESULT([serf])
9357 # Check for system apr-util
9358 libo_CHECK_SYSTEM_MODULE([apr],[APR],[apr-util-1],
9359 ["-I${WORKDIR}/UnpackedTarball/apr/include -I${WORKDIR}/UnpackedTarball/apr_util/include"],
9360 ["-L${WORKDIR}/UnpackedTarball/apr/.libs -lapr-1 -L${WORKDIR}/UnpackedTarball/apr_util/.libs -laprutil-1"])
9361 if test "$COM" = "MSC"; then
9363 test -n "${MSVC_USE_DEBUG_RUNTIME}" && APR_LIB_DIR="LibD"
9364 APR_LIBS="${WORKDIR}/UnpackedTarball/apr/${APR_LIB_DIR}/apr-1.lib ${WORKDIR}/UnpackedTarball/apr_util/${APR_LIB_DIR}/aprutil-1.lib"
9367 # Check for system serf
9368 libo_CHECK_SYSTEM_MODULE([serf],[SERF],[serf-1 >= 1.1.0],["-I${WORKDIR}/UnpackedTarball/serf"],
9369 ["-L${WORKDIR}/UnpackedTarball/serf/.libs -lserf-1"])
9370 if test "$COM" = "MSC"; then
9371 SERF_LIB_DIR="Release"
9372 test -n "${MSVC_USE_DEBUG_RUNTIME}" && SERF_LIB_DIR="Debug"
9373 SERF_LIBS="${WORKDIR}/UnpackedTarball/serf/${SERF_LIB_DIR}/serf-1.lib"
9377 AC_MSG_RESULT([neon])
9378 # Check for system neon
9379 libo_CHECK_SYSTEM_MODULE([neon],[NEON],[neon >= 0.26.0])
9380 if test "$with_system_neon" = "yes"; then
9381 NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
9382 libo_MINGW_CHECK_DLL([libneon])
9383 libo_MINGW_TRY_DLL([libtasn1])
9384 libo_MINGW_TRY_DLL([libgnutls])
9388 AC_SUBST(NEON_VERSION)
9391 AC_MSG_RESULT([none, disabled])
9395 AC_SUBST(WITH_WEBDAV)
9397 dnl ===================================================================
9398 dnl Check for disabling cve_tests
9399 dnl ===================================================================
9400 AC_MSG_CHECKING([whether to execute CVE tests])
9401 if test "$enable_cve_tests" = "no"; then
9403 DISABLE_CVE_TESTS=TRUE
9404 AC_SUBST(DISABLE_CVE_TESTS)
9406 AC_MSG_RESULT([yes])
9409 dnl ===================================================================
9410 dnl Check for enabling chart XShape tests
9411 dnl ===================================================================
9412 AC_MSG_CHECKING([whether to execute chart XShape tests])
9413 if test "$enable_chart_tests" = "yes"; then
9414 AC_MSG_RESULT([yes])
9415 ENABLE_CHART_TESTS=TRUE
9416 AC_SUBST(ENABLE_CHART_TESTS)
9421 dnl ===================================================================
9422 dnl Check for system openssl
9423 dnl ===================================================================
9425 AC_MSG_CHECKING([whether to disable OpenSSL usage])
9426 if test "$enable_openssl" = "yes"; then
9428 if test "$_os" = Darwin -a "${MAC_OS_X_VERSION_MIN_REQUIRED:-0}" -ge 1070; then
9429 # OpenSSL is deprecated when building for 10.7 or later.
9431 # http://stackoverflow.com/questions/7406946/why-is-apple-deprecating-openssl-in-macos-10-7-lion
9432 # http://stackoverflow.com/questions/7475914/libcrypto-deprecated-on-mac-os-x-10-7-lion
9434 with_system_openssl=no
9435 libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
9436 elif test "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o "$_os" = "DragonFly" \
9437 && test "$with_system_openssl" != "no"; then
9438 with_system_openssl=yes
9441 OPENSSL_LIBS="-lssl -lcrypto"
9443 libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
9445 if test "$with_system_openssl" = "yes"; then
9446 libo_MINGW_CHECK_DLL([libssl])
9447 libo_MINGW_CHECK_DLL([libcrypto])
9448 AC_MSG_CHECKING([whether openssl supports SHA512])
9450 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/sha.h>]],[[
9452 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, openssl too old. Need >= 0.9.8.])])
9456 AC_MSG_RESULT([yes])
9457 DISABLE_OPENSSL=TRUE
9459 # warn that although OpenSSL is disabled, system libraries may be depending on it
9460 AC_MSG_WARN([OpenSSL has been disabled. No code compiled by LibO will make use of it but system librares may create indirect dependencies])
9461 add_warning "OpenSSL has been disabled. No code compiled by LibO will make use of it but system librares may create indirect dependencies"
9464 AC_SUBST([DISABLE_OPENSSL])
9466 dnl ===================================================================
9467 dnl Check for building gnutls
9468 dnl ===================================================================
9469 AC_MSG_CHECKING([whether to use gnutls])
9470 if test "$WITH_WEBDAV" = "neon" && test "$enable_openssl" = "no"; then
9471 AC_MSG_RESULT([yes])
9473 PKG_CHECK_MODULES(GNUTLS, [gnutls],,
9474 AC_MSG_ERROR([[Disabling OpenSSL was requested, but GNUTLS is not
9475 available in the system to use as replacement.]]))
9478 AC_SUBST([LIBGCRYPT_CFLAGS])
9479 AC_SUBST([LIBGCRYPT_LIBS])
9481 dnl ===================================================================
9482 dnl Check for system redland
9483 dnl ===================================================================
9484 dnl redland: versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
9485 dnl raptor2: need at least 2.0.7 for CVE-2012-0037
9486 libo_CHECK_SYSTEM_MODULE([redland],[REDLAND],[redland >= 1.0.8 raptor2 >= 2.0.7])
9487 if test "$with_system_redland" = "yes"; then
9488 libo_MINGW_CHECK_DLL([librdf])
9489 AC_CHECK_LIB([rdf], [librdf_world_set_raptor_init_handler], [:],
9490 [AC_MSG_ERROR(librdf too old. Need >= 1.16)], [])
9491 libo_MINGW_TRY_DLL([libraptor])
9492 libo_MINGW_TRY_DLL([librasqal])
9493 libo_MINGW_TRY_DLL([libsqlite3])
9499 AC_SUBST(RAPTOR_MAJOR)
9500 AC_SUBST(RASQAL_MAJOR)
9501 AC_SUBST(REDLAND_MAJOR)
9503 dnl ===================================================================
9504 dnl Check for system hunspell
9505 dnl ===================================================================
9506 AC_MSG_CHECKING([which libhunspell to use])
9507 if test "$with_system_hunspell" = "yes"; then
9508 AC_MSG_RESULT([external])
9509 SYSTEM_HUNSPELL=TRUE
9511 PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
9512 if test "$HUNSPELL_PC" != "TRUE"; then
9513 AC_CHECK_HEADER(hunspell.hxx, [],
9515 AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
9516 [AC_MSG_ERROR(hunspell headers not found.)], [])
9518 AC_CHECK_LIB([hunspell], [main], [:],
9519 [ AC_MSG_ERROR(hunspell library not found.) ], [])
9520 HUNSPELL_LIBS=-lhunspell
9523 libo_MINGW_CHECK_DLL([libhunspell-1.3])
9524 HUNSPELL_CFLAGS=$(printf '%s' "$HUNSPELL_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9526 AC_MSG_RESULT([internal])
9528 HUNSPELL_CFLAGS="-I${WORKDIR}/UnpackedTarball/hunspell/src/hunspell"
9529 if test "$COM" = "MSC"; then
9530 HUNSPELL_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/hunspell.lib"
9532 HUNSPELL_LIBS="-L${WORKDIR}/UnpackedTarball/hunspell/src/hunspell/.libs -lhunspell-1.3"
9534 BUILD_TYPE="$BUILD_TYPE HUNSPELL"
9536 AC_SUBST(SYSTEM_HUNSPELL)
9537 AC_SUBST(HUNSPELL_CFLAGS)
9538 AC_SUBST(HUNSPELL_LIBS)
9540 dnl ===================================================================
9541 dnl Checking for altlinuxhyph
9542 dnl ===================================================================
9543 AC_MSG_CHECKING([which altlinuxhyph to use])
9544 if test "$with_system_altlinuxhyph" = "yes"; then
9545 AC_MSG_RESULT([external])
9547 AC_CHECK_HEADER(hyphen.h, [],
9548 [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
9549 AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
9550 [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
9551 [#include <hyphen.h>])
9552 AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
9553 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9554 if test -z "$HYPHEN_LIB"; then
9555 AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
9556 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9558 if test -z "$HYPHEN_LIB"; then
9559 AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
9560 [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
9562 libo_MINGW_CHECK_DLL([libhyphen])
9564 AC_MSG_RESULT([internal])
9566 BUILD_TYPE="$BUILD_TYPE HYPHEN"
9567 if test "$COM" = "MSC"; then
9568 HYPHEN_LIB="${WORKDIR}/LinkTarget/StaticLibrary/hyphen.lib"
9570 HYPHEN_LIB="-L${WORKDIR}/UnpackedTarball/hyphen/.libs -lhyphen"
9573 AC_SUBST(SYSTEM_HYPH)
9574 AC_SUBST(HYPHEN_LIB)
9576 dnl ===================================================================
9577 dnl Checking for mythes
9578 dnl ===================================================================
9579 AC_MSG_CHECKING([which mythes to use])
9580 if test "$with_system_mythes" = "yes"; then
9581 AC_MSG_RESULT([external])
9584 PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
9585 if test "$MYTHES_PKGCONFIG" = "no"; then
9586 AC_CHECK_HEADER(mythes.hxx, [],
9587 [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
9588 AC_CHECK_LIB([mythes-1.2], [main], [:],
9589 [ MYTHES_FOUND=no], [])
9590 if test "$MYTHES_FOUND" = "no"; then
9591 AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
9592 [ MYTHES_FOUND=no], [])
9594 if test "$MYTHES_FOUND" = "no"; then
9595 AC_MSG_ERROR([mythes library not found!.])
9599 libo_MINGW_CHECK_DLL([libmythes-1.2])
9600 MYTHES_CFLAGS=$(printf '%s' "$MYTHES_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
9602 AC_MSG_RESULT([internal])
9604 BUILD_TYPE="$BUILD_TYPE MYTHES"
9605 if test "$COM" = "MSC"; then
9606 MYTHES_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/mythes.lib"
9608 MYTHES_LIBS="-L${WORKDIR}/UnpackedTarball/mythes/.libs -lmythes-1.2"
9611 AC_SUBST(SYSTEM_MYTHES)
9612 AC_SUBST(MYTHES_CFLAGS)
9613 AC_SUBST(MYTHES_LIBS)
9615 dnl ===================================================================
9616 dnl How should we build the linear programming solver ?
9617 dnl ===================================================================
9620 AC_MSG_CHECKING([whether to build with CoinMP])
9621 if test "$enable_coinmp" != "no"; then
9623 AC_MSG_RESULT([yes])
9624 # Should we check for system CoinMP ? How to do that ?
9625 BUILD_TYPE="$BUILD_TYPE COINMP"
9629 AC_SUBST(ENABLE_COINMP)
9632 AC_MSG_CHECKING([whether to build with lpsolve])
9633 if test "$enable_lpsolve" != "no"; then
9635 AC_MSG_RESULT([yes])
9639 AC_SUBST(ENABLE_LPSOLVE)
9641 if test "$ENABLE_LPSOLVE" = TRUE; then
9642 AC_MSG_CHECKING([which lpsolve to use])
9643 if test "$with_system_lpsolve" = "yes"; then
9644 AC_MSG_RESULT([external])
9646 AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
9647 [ AC_MSG_ERROR(lpsolve headers not found.)], [])
9649 # some systems need this. Like Ubuntu....
9650 AC_CHECK_LIB(m, floor)
9651 AC_CHECK_LIB(dl, dlopen)
9652 AC_CHECK_LIB([lpsolve55], [make_lp], [:],
9653 [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
9655 libo_MINGW_CHECK_DLL([lpsolve55])
9657 AC_MSG_RESULT([internal])
9659 BUILD_TYPE="$BUILD_TYPE LPSOLVE"
9662 AC_SUBST(SYSTEM_LPSOLVE)
9664 dnl ===================================================================
9665 dnl Checking for libexttextcat
9666 dnl ===================================================================
9667 libo_CHECK_SYSTEM_MODULE([libexttextcat],[LIBEXTTEXTCAT],[libexttextcat >= 3.1.1])
9668 if test "$with_system_libexttextcat" = "yes"; then
9669 SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
9671 AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
9673 dnl ***************************************
9674 dnl testing libc version for Linux...
9675 dnl ***************************************
9676 if test "$_os" = "Linux"; then
9677 AC_MSG_CHECKING([whether libc is >= 2.1.1])
9678 exec 6>/dev/null # no output
9679 AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
9680 exec 6>&1 # output on again
9681 if test "$HAVE_LIBC"; then
9682 AC_MSG_RESULT([yes])
9684 AC_MSG_ERROR([no, upgrade libc])
9688 dnl =========================================
9689 dnl Check for the Windows SDK.
9690 dnl =========================================
9691 dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
9692 dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
9693 if test "$_os" = "WINNT"; then
9694 AC_MSG_CHECKING([for Windows SDK])
9695 if test "$build_os" = "cygwin"; then
9697 WINDOWS_SDK_HOME=$winsdktest
9699 # normalize if found
9700 if test -n "$WINDOWS_SDK_HOME"; then
9701 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
9702 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
9706 if test -n "$WINDOWS_SDK_HOME"; then
9707 # Remove a possible trailing backslash
9708 WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
9710 if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
9711 -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
9712 -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
9713 have_windows_sdk_headers=yes
9714 elif test -f "$WINDOWS_SDK_HOME/Include/um/adoint.h" \
9715 -a -f "$WINDOWS_SDK_HOME/Include/um/SqlUcode.h" \
9716 -a -f "$WINDOWS_SDK_HOME/Include/um/usp10.h"; then
9717 have_windows_sdk_headers=yes
9719 have_windows_sdk_headers=no
9722 if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
9723 have_windows_sdk_libs=yes
9724 elif test -f "$WINDOWS_SDK_HOME/lib/win8/um/$WINDOWS_SDK_ARCH/user32.lib"; then
9725 have_windows_sdk_libs=yes
9727 have_windows_sdk_libs=no
9730 if test $have_windows_sdk_headers = no -o $have_windows_sdk_libs = no; then
9731 AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
9732 the Windows SDK are installed.])
9735 if test ! -f "$WINDOWS_SDK_HOME/bin/msiinfo.exe" \
9736 -o ! -f "$WINDOWS_SDK_HOME/bin/msidb.exe" \
9737 -o ! -f "$WINDOWS_SDK_HOME/bin/uuidgen.exe" \
9738 -o ! -f "$WINDOWS_SDK_HOME/bin/msitran.exe"; then :
9739 elif test ! -f "$WINDOWS_SDK_HOME/bin/x86/msiinfo.exe" \
9740 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/msidb.exe" \
9741 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/uuidgen.exe" \
9742 -o ! -f "$WINDOWS_SDK_HOME/bin/x86/msitran.exe"; then :
9744 AC_MSG_ERROR([Some (all?) Windows Installer tools in the Windows SDK are missing, please install.])
9748 if test -z "$WINDOWS_SDK_HOME"; then
9749 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway!?])
9750 elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
9751 WINDOWS_SDK_VERSION=60
9752 AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
9753 elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
9754 WINDOWS_SDK_VERSION=61
9755 AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
9756 elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
9757 WINDOWS_SDK_VERSION=70
9758 AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
9759 elif echo $WINDOWS_SDK_HOME | grep "8.0" >/dev/null 2>/dev/null; then
9760 WINDOWS_SDK_VERSION=80
9761 AC_MSG_RESULT([found Windows SDK 8.0 ($WINDOWS_SDK_HOME)])
9762 # compatibility warning if usind VS 2012 and not explicitly choosing the 80 SDK
9763 if test "$VCVER" = "110" -a -z "$with_windows_sdk"; then
9764 AC_MSG_WARN([If a build created with VS 2012 should run on Windows XP,])
9765 AC_MSG_WARN([use --with-windows-sdk=7.1A (requires VS 2012 Update 1 or newer)])
9766 add_warning "If a build created with VS 2012 should run on Windows XP,"
9767 add_warning "use --with-windows-sdk=7.1A (requires VS 2012 Update 1 or newer)"
9770 AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
9772 PathFormat "$WINDOWS_SDK_HOME"
9773 WINDOWS_SDK_HOME="$formatted_path"
9774 if test "$build_os" = "cygwin"; then
9775 SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include -I$COMPATH/include"
9776 if test -d "$WINDOWS_SDK_HOME/include/um"; then
9777 SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include/um -I$WINDOWS_SDK_HOME/include/shared"
9781 dnl TODO: solenv/bin/modules/installer/windows/msiglobal.pm wants to use a
9782 dnl WiLangId.vbs that is included only in some SDKs (e.g., included in v7.1
9783 dnl but not in v8.0), so allow this to be overridden with a
9784 dnl WINDOWS_SDK_WILANGID for now; a full-blown --with-windows-sdk-wilangid
9785 dnl and configuration error if no WiLangId.vbs is found would arguably be
9786 dnl better, but I do not know under which conditions exactly it is needed by
9788 if test -z "$WINDOWS_SDK_WILANGID" -a -n "$WINDOWS_SDK_HOME"; then
9789 WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/Samples/sysmgmt/msi/scripts/WiLangId.vbs
9790 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9791 WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs
9793 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9794 WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.0/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs")
9796 if ! test -e "$WINDOWS_SDK_WILANGID" ; then
9797 AC_MSG_WARN([WiLangId.vbs not found - building translated packages will fail])
9798 add_warning "WiLangId.vbs not found - building translated packages will fail"
9802 AC_SUBST(WINDOWS_SDK_HOME)
9803 AC_SUBST(WINDOWS_SDK_VERSION)
9804 AC_SUBST(WINDOWS_SDK_WILANGID)
9806 dnl =========================================
9807 dnl Check for uuidgen
9808 dnl =========================================
9809 if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
9810 if test "$WITH_MINGW" = "yes"; then
9811 AC_PATH_PROG([UUIDGEN], [uuid])
9812 if test -z "$UUIDGEN"; then
9813 AC_MSG_WARN([uuid is needed for dev-install])
9816 # presence is already tested above in the WINDOWS_SDK_HOME check
9821 AC_PATH_PROG([UUIDGEN], [uuidgen])
9822 if test -z "$UUIDGEN"; then
9823 AC_MSG_WARN([uuid is needed for dev-install])
9827 dnl =========================================
9828 dnl Check for the Microsoft DirectX SDK.
9829 dnl =========================================
9830 if test -n "$ENABLE_DIRECTX" -a "$_os" = "WINNT"; then
9831 AC_MSG_CHECKING([for DirectX SDK])
9832 if test "$build_os" = "cygwin"; then
9833 dnl A standard installation of the DirectX SDK sets $DXSDK_DIR
9834 if test -n "$DXSDK_DIR"; then
9835 DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
9836 DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
9838 # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
9839 # the "DirectX SDK not found" error later.
9842 # Remove a possible trailing backslash
9843 DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`
9846 if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" -o -f "$DIRECTXSDK_HOME/Include/d3d9.h"; then
9847 HAVE_DIRECTXSDK_H="yes"
9849 HAVE_DIRECTXSDK_H="no"
9852 if test "$BITNESS_OVERRIDE" = 64; then
9853 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x64"
9855 DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
9857 PathFormat "$DIRECTXSDK_LIB"
9858 DIRECTXSDK_LIB="$formatted_path"
9860 if test -f "$DIRECTXSDK_LIB/ddraw.lib" -o -f "$DIRECTXSDK_LIB/d3d9.lib"; then
9861 HAVE_DIRECTXSDK_LIB="yes"
9863 HAVE_DIRECTXSDK_LIB="no"
9866 if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
9867 AC_MSG_RESULT([found])
9869 AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
9871 if test -n "$DIRECTXSDK_HOME"; then
9872 PathFormat "$DIRECTXSDK_HOME"
9873 DIRECTXSDK_HOME="$formatted_path"
9874 SOLARINC="$SOLARINC -I$DIRECTXSDK_HOME/include"
9877 AC_SUBST(DIRECTXSDK_HOME)
9879 dnl ***************************************
9880 dnl Checking for bison and flex
9881 dnl ***************************************
9882 AC_PATH_PROG(BISON, bison)
9883 if test -z "$BISON"; then
9884 AC_MSG_ERROR([no bison found in \$PATH, install it])
9886 AC_MSG_CHECKING([the bison version])
9887 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
9888 _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
9889 # Accept newer than 2.0
9890 if test "$_bison_longver" -lt 2000; then
9891 AC_MSG_ERROR([failed ($BISON $_bison_version need 2.0+)])
9895 AC_PATH_PROG(FLEX, flex)
9896 if test -z "$FLEX"; then
9897 AC_MSG_ERROR([no flex found in \$PATH, install it])
9899 AC_MSG_CHECKING([the flex version])
9900 _flex_version=$($FLEX --version | $SED -e 's/^.*\([[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\).*$/\1/')
9901 if test $(echo $_flex_version | $AWK -F. '{printf("%d%03d%03d", $1, $2, $3)}') -lt 2005035; then
9902 AC_MSG_ERROR([failed ($FLEX $_flex_version found, but need at least 2.5.35)])
9906 dnl ***************************************
9907 dnl Checking for patch
9908 dnl ***************************************
9909 AC_PATH_PROG(PATCH, patch)
9910 if test -z "$PATCH"; then
9911 AC_MSG_ERROR([\"patch\" not found in \$PATH, install it])
9914 dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used
9915 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
9916 if test -z "$with_gnu_patch"; then
9919 if test -x "$with_gnu_patch"; then
9920 GNUPATCH=$with_gnu_patch
9922 AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
9926 AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
9927 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
9928 AC_MSG_RESULT([yes])
9930 AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
9936 dnl We also need to check for --with-gnu-cp
9938 if test -z "$with_gnu_cp"; then
9939 # check the place where the good stuff is hidden on Solaris...
9940 if test -x /usr/gnu/bin/cp; then
9941 GNUCP=/usr/gnu/bin/cp
9943 AC_PATH_PROGS(GNUCP, gnucp cp)
9945 if test -z $GNUCP; then
9946 AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
9949 if test -x "$with_gnu_cp"; then
9952 AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
9956 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
9957 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
9958 AC_MSG_RESULT([yes])
9959 elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
9960 AC_MSG_RESULT([yes])
9963 darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*)
9966 AC_MSG_RESULT([no gnucp found - using the system's cp command])
9969 AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
9978 dnl ***************************************
9979 dnl testing assembler path
9980 dnl ***************************************
9982 if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
9983 if test "$BITNESS_OVERRIDE" = ""; then
9988 assembler_bin=bin/amd64
9991 AC_MSG_CHECKING([$VC_PRODUCT_DIR/$assembler_bin/$assembler])
9992 if test -f "$VC_PRODUCT_DIR/$assembler_bin/$assembler"; then
9993 ASM_HOME=$VC_PRODUCT_DIR/$assembler_bin
9994 AC_MSG_RESULT([found])
9995 ML_EXE="$VC_PRODUCT_DIR/$assembler_bin/$assembler"
9997 AC_MSG_ERROR([Configure did not find $assembler assembler.])
10000 PathFormat "$ASM_HOME"
10001 ASM_HOME="$formatted_path"
10008 dnl ===================================================================
10009 dnl We need zip and unzip
10010 dnl ===================================================================
10011 AC_PATH_PROG(ZIP, zip)
10012 test -z "$ZIP" && AC_MSG_ERROR([zip is required])
10013 if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
10014 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],,)
10017 AC_PATH_PROG(UNZIP, unzip)
10018 test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
10020 dnl ===================================================================
10021 dnl Zip must be a specific type for different build types.
10022 dnl ===================================================================
10023 if test $build_os = cygwin; then
10024 if test -n "`$ZIP -h | $GREP -i WinNT`"; then
10025 AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
10029 dnl ===================================================================
10030 dnl We need touch with -h option support.
10031 dnl ===================================================================
10032 AC_PATH_PROG(TOUCH, touch)
10033 test -z "$TOUCH" && AC_MSG_ERROR([touch is required])
10035 if ! "$TOUCH" -h warn 2>/dev/null > /dev/null; then
10036 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],,)
10039 dnl ===================================================================
10040 dnl Test which vclplugs have to be built.
10041 dnl ===================================================================
10046 if test "x$enable_gtk3" = "xyes"; then
10047 if test "$with_system_cairo" = no; then
10048 AC_MSG_ERROR([System cairo required for gtk3 support, do not combine --enable-gtk3 with --without-system-cairo])
10050 : ${with_system_cairo:=yes}
10051 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="")
10052 if test "x$ENABLE_GTK3" = "xTRUE"; then
10055 AC_MSG_ERROR([gtk3 libraries of the correct versions, not found])
10057 GTK3_CFLAGS=$(printf '%s' "$GTK3_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10059 AC_SUBST(GTK3_LIBS)
10060 AC_SUBST(GTK3_CFLAGS)
10061 AC_SUBST(ENABLE_GTK3)
10063 AC_MSG_CHECKING([which VCLplugs shall be built])
10064 if test "$GUIBASE" != "unx" -o "$enable_headless" = "yes"; then
10068 if test "x$enable_gtk" = "xyes"; then
10069 if test "$with_system_cairo" = no; then
10070 AC_MSG_ERROR([System cairo required for gtk support, do not use --without-system-cairo or use --disable-gtk])
10072 : ${with_system_cairo:=yes}
10074 AC_DEFINE(ENABLE_GTK)
10077 AC_SUBST(ENABLE_GTK)
10080 if test "x$enable_tde" = "xyes"; then
10081 # Libs kab and tdeab in connectivity and kdeab and tdeab in shell
10082 # are built from the same sources. So we only allow one of them.
10083 if test "x$enable_kde" = "xyes"; then
10084 AC_MSG_ERROR([enabling both KDE and TDE is not supported])
10087 AC_DEFINE(ENABLE_TDE)
10090 AC_SUBST(ENABLE_TDE)
10093 if test "x$enable_kde" = "xyes"; then
10095 AC_DEFINE(ENABLE_KDE)
10098 AC_SUBST(ENABLE_KDE)
10101 if test "x$enable_kde4" = "xyes"; then
10103 AC_DEFINE(ENABLE_KDE4)
10106 AC_SUBST(ENABLE_KDE4)
10109 if test "x$enable_headless" = "xyes"; then
10110 ENABLE_HEADLESS="TRUE"
10111 SCPDEFS="$SCPDEFS -DLIBO_HEADLESS"
10114 AC_SUBST(ENABLE_HEADLESS)
10116 if test -z "$R"; then
10117 AC_MSG_RESULT([none])
10119 AC_MSG_RESULT([$R])
10122 dnl ===================================================================
10124 dnl ===================================================================
10127 AC_MSG_CHECKING([whether to enable GConf support])
10128 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "iOS" -a "$enable_gconf" = "yes"; then
10129 ENABLE_GCONF="TRUE"
10130 AC_MSG_RESULT([yes])
10131 PKG_CHECK_MODULES( GCONF, gconf-2.0 gobject-2.0 )
10132 GCONF_CFLAGS=$(printf '%s' "$GCONF_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10134 AC_MSG_RESULT([no])
10136 AC_SUBST(GCONF_LIBS)
10137 AC_SUBST(GCONF_CFLAGS)
10138 AC_SUBST(ENABLE_GCONF)
10140 dnl ===================================================================
10141 dnl Gnome VFS check
10142 dnl ===================================================================
10145 AC_MSG_CHECKING([whether to enable GNOME VFS support])
10146 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" -a "$enable_gconf" = "yes"; then
10147 ENABLE_GNOMEVFS="TRUE"
10148 AC_MSG_RESULT([yes])
10149 PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
10150 GNOMEVFS_CFLAGS=$(printf '%s' "$GNOMEVFS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10151 AC_DEFINE(ENABLE_GNOME_VFS)
10153 AC_MSG_RESULT([no])
10155 AC_SUBST(GNOMEVFS_LIBS)
10156 AC_SUBST(GNOMEVFS_CFLAGS)
10157 AC_SUBST(ENABLE_GNOMEVFS)
10159 dnl ===================================================================
10160 dnl check for dbus support
10161 dnl ===================================================================
10166 if test "$enable_dbus" = "no"; then
10170 AC_MSG_CHECKING([whether to enable DBUS support])
10171 if test "$test_dbus" = "yes"; then
10173 AC_MSG_RESULT([yes])
10174 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.70)
10175 DBUS_CFLAGS=$(printf '%s' "$DBUS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10177 AC_MSG_RESULT([no])
10180 AC_SUBST(ENABLE_DBUS)
10181 AC_SUBST(DBUS_CFLAGS)
10182 AC_SUBST(DBUS_LIBS)
10184 AC_MSG_CHECKING([whether to enable font install via packagekit])
10185 if test "$ENABLE_DBUS" = "TRUE"; then
10186 if test -n "$enable_packagekit" -a "$enable_packagekit" != "no"; then
10187 ENABLE_PACKAGEKIT=TRUE
10188 AC_MSG_RESULT([yes])
10191 AC_MSG_RESULT([no])
10194 AC_MSG_RESULT([no, dbus disabled.])
10196 AC_SUBST(ENABLE_PACKAGEKIT)
10198 AC_MSG_CHECKING([whether to enable Impress remote control])
10199 if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
10200 AC_MSG_RESULT([yes])
10201 ENABLE_SDREMOTE=TRUE
10202 AC_MSG_CHECKING([whether to enable Bluetooth support in Impress remote control])
10204 # If not explicitly enabled or disabled, default
10205 if test -z "$enable_sdremote_bluetooth"; then
10208 # Default to yes for these
10209 enable_sdremote_bluetooth=yes
10213 enable_sdremote_bluetooth=no
10217 # $enable_sdremote_bluetooth is guaranteed non-empty now
10219 if test "$enable_sdremote_bluetooth" != "no"; then
10220 if test "$OS" = "LINUX"; then
10221 if test "$ENABLE_DBUS" = "TRUE"; then
10222 AC_MSG_RESULT([yes])
10223 ENABLE_SDREMOTE_BLUETOOTH=TRUE
10224 dnl ===================================================================
10225 dnl Check for system bluez
10226 dnl ===================================================================
10227 AC_MSG_CHECKING([which Bluetooth header to use])
10228 if test "$with_system_bluez" = "yes"; then
10229 AC_MSG_RESULT([external])
10230 AC_CHECK_HEADER(bluetooth/bluetooth.h, [],
10231 [AC_MSG_ERROR(bluetooth.h not found. install bluez)], [])
10234 AC_MSG_RESULT([internal])
10238 AC_MSG_RESULT([no, dbus disabled])
10239 ENABLE_SDREMOTE_BLUETOOTH=
10243 AC_MSG_RESULT([yes])
10244 ENABLE_SDREMOTE_BLUETOOTH=TRUE
10248 AC_MSG_RESULT([no])
10249 ENABLE_SDREMOTE_BLUETOOTH=
10255 AC_MSG_RESULT([no])
10257 AC_SUBST(ENABLE_SDREMOTE)
10258 AC_SUBST(ENABLE_SDREMOTE_BLUETOOTH)
10259 AC_SUBST(SYSTEM_BLUEZ)
10261 AC_MSG_CHECKING([whether to enable Impress remote control android app])
10262 if echo "$host_os" | grep -q linux-android || test "$enable_sdremote_android" = "yes"; then
10263 AC_MSG_RESULT([yes])
10264 ENABLE_SDREMOTE_ANDROID=TRUE
10266 AC_MSG_RESULT([no])
10267 ENABLE_SDREMOTE_ANDROID=
10269 AC_SUBST(ENABLE_SDREMOTE_ANDROID)
10271 dnl ===================================================================
10272 dnl Check whether the gtk 2.0 libraries are available.
10273 dnl ===================================================================
10277 ENABLE_SYSTRAY_GTK=""
10278 if test "$test_gtk" = "yes"; then
10280 if test "$ENABLE_GTK" = "TRUE"; then
10281 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]))
10282 GTK_CFLAGS=$(printf '%s' "$GTK_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10283 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]))
10284 BUILD_TYPE="$BUILD_TYPE GTK"
10285 GTHREAD_CFLAGS=$(printf '%s' "$GTK_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10287 AC_MSG_CHECKING([whether to enable the systray quickstarter])
10288 if test "x$enable_systray" = "xyes"; then
10289 AC_MSG_RESULT([yes])
10290 PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0,
10291 [ ENABLE_SYSTRAY_GTK="TRUE" ],
10292 [ ENABLE_SYSTRAY_GTK="" ])
10294 AC_MSG_RESULT([no])
10297 AC_MSG_CHECKING([whether to enable Gtk print dialog support])
10298 PKG_CHECK_MODULES([GTK_PRINT], [gtk+-unix-print-2.0 >= 2.10.0],
10299 [ENABLE_GTK_PRINT="TRUE"],
10300 [ENABLE_GTK_PRINT=""])
10301 GTK_PRINT_CFLAGS=$(printf '%s' "$GTK_PRINT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10303 AC_MSG_CHECKING([whether to enable GIO support])
10304 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
10305 if test "$ENABLE_GNOMEVFS" = "TRUE"; then
10306 AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.])
10308 dnl Need at least 2.26 for the dbus support.
10309 PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.26],
10310 [ENABLE_GIO="TRUE"], [ENABLE_GIO=""])
10311 if test "$ENABLE_GIO" = "TRUE"; then
10312 AC_DEFINE(ENABLE_GIO)
10313 GIO_CFLAGS=$(printf '%s' "$GIO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10316 AC_MSG_RESULT([no])
10320 AC_SUBST(ENABLE_GIO)
10321 AC_SUBST(GIO_CFLAGS)
10323 AC_SUBST(ENABLE_SYSTRAY_GTK)
10324 AC_SUBST(GTK_CFLAGS)
10326 AC_SUBST(GTHREAD_CFLAGS)
10327 AC_SUBST(GTHREAD_LIBS)
10328 AC_SUBST([ENABLE_GTK_PRINT])
10329 AC_SUBST([GTK_PRINT_CFLAGS])
10330 AC_SUBST([GTK_PRINT_LIBS])
10333 dnl ===================================================================
10334 dnl Check whether the Telepathy libraries are available.
10335 dnl ===================================================================
10337 ENABLE_TELEPATHY=""
10338 TELEPATHY_CFLAGS=""
10341 AC_MSG_CHECKING([whether to enable Telepathy support])
10342 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_telepathy" = "yes"; then
10343 ENABLE_TELEPATHY="TRUE"
10344 AC_DEFINE(ENABLE_TELEPATHY)
10345 AC_MSG_RESULT([yes])
10346 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 )
10347 TELEPATHY_CFLAGS=$(printf '%s' "$TELEPATHY_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10349 AC_MSG_RESULT([no])
10352 AC_SUBST(ENABLE_TELEPATHY)
10353 AC_SUBST(TELEPATHY_CFLAGS)
10354 AC_SUBST(TELEPATHY_LIBS)
10357 dnl ===================================================================
10359 SPLIT_APP_MODULES=""
10360 if test "$enable_split_app_modules" = "yes"; then
10361 SPLIT_APP_MODULES="TRUE"
10363 AC_SUBST(SPLIT_APP_MODULES)
10365 SPLIT_OPT_FEATURES=""
10366 if test "$enable_split_opt_features" = "yes"; then
10367 SPLIT_OPT_FEATURES="TRUE"
10369 AC_SUBST(SPLIT_OPT_FEATURES)
10371 if test $_os = Darwin -o $_os = WINNT -o $_os = iOS; then
10372 if test "$enable_cairo_canvas" = yes; then
10373 AC_MSG_ERROR([The cairo canvas should not be used for this platform])
10375 enable_cairo_canvas=no
10376 elif test -z "$enable_cairo_canvas"; then
10377 enable_cairo_canvas=yes
10380 ENABLE_CAIRO_CANVAS=""
10381 if test "$enable_cairo_canvas" = "yes"; then
10383 ENABLE_CAIRO_CANVAS="TRUE"
10385 AC_SUBST(ENABLE_CAIRO_CANVAS)
10387 dnl ===================================================================
10388 dnl Check whether the GStreamer libraries are available.
10389 dnl ===================================================================
10391 ENABLE_GSTREAMER=""
10393 if test "$build_gstreamer" = "yes"; then
10395 AC_MSG_CHECKING([whether to enable the new GStreamer 1.0 avmedia backend])
10396 if test "$enable_avmedia" = yes -a "$enable_gstreamer" != no; then
10397 ENABLE_GSTREAMER="TRUE"
10398 AC_MSG_RESULT([yes])
10399 PKG_CHECK_MODULES( GSTREAMER, gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0 )
10400 GSTREAMER_CFLAGS=$(printf '%s' "$GSTREAMER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10402 AC_MSG_RESULT([no])
10405 AC_SUBST(GSTREAMER_CFLAGS)
10406 AC_SUBST(GSTREAMER_LIBS)
10407 AC_SUBST(ENABLE_GSTREAMER)
10410 ENABLE_GSTREAMER_0_10=""
10411 if test "$build_gstreamer_0_10" = "yes"; then
10413 AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
10414 if test "$enable_avmedia" = yes -a "$enable_gstreamer_0_10" != no; then
10415 ENABLE_GSTREAMER_0_10="TRUE"
10416 AC_MSG_RESULT([yes])
10417 PKG_CHECK_MODULES( [GSTREAMER_0_10], [gstreamer-0.10 gstreamer-plugins-base-0.10 gstreamer-interfaces-0.10],, [
10418 PKG_CHECK_MODULES( [GSTREAMER_0_10], [gstreamer-0.10 gstreamer-plugins-base-0.10] )
10420 GSTREAMER_0_10_CFLAGS=$(printf '%s' "$GSTREAMER_0_10_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10422 AC_MSG_RESULT([no])
10426 AC_SUBST(GSTREAMER_0_10_CFLAGS)
10427 AC_SUBST(GSTREAMER_0_10_LIBS)
10428 AC_SUBST(ENABLE_GSTREAMER_0_10)
10430 dnl ===================================================================
10431 dnl Check whether to build the VLC avmedia backend
10432 dnl ===================================================================
10436 AC_MSG_CHECKING([whether to enable the VLC avmedia backend])
10437 if test "$enable_avmedia" = yes -a $_os != iOS -a $_os != Android -a "$enable_vlc" = yes; then
10439 AC_MSG_RESULT([yes])
10441 AC_MSG_RESULT([no])
10443 AC_SUBST(ENABLE_VLC)
10445 dnl ===================================================================
10446 dnl Check whether the OpenGL libraries are available
10447 dnl ===================================================================
10449 AC_MSG_CHECKING([whether to build the OpenGL Transitions component])
10452 if test -z "$enable_opengl"; then
10453 if test $_os = WINNT; then
10454 # By default disable the OpenGL transitions for Windows (the code compiles but works very
10455 # badly and crashes). In other words, use --enable-opengl only if you plan to hack on that
10456 # code for Windows.
10458 elif test $_os = iOS; then
10459 # As such with some suitable minor tweaks the Mac OpenGL transitions code would presumably
10460 # build fine for iOS, too, but let's leave that for later
10462 elif test "$enable_headless" = "yes"; then
10469 if test "x$enable_opengl" = "xno"; then
10470 AC_MSG_RESULT([no])
10471 elif test "$_os" = "Darwin"; then
10472 # We use frameworks on Mac OS X, no need for detail checks
10474 ENABLE_OPENGL_CANVAS=
10475 add_warning "openGL canvas not adapted for Mac yet - disabling"
10476 SYSTEM_MESA_HEADERS=TRUE
10477 AC_MSG_RESULT([yes])
10478 elif test $_os = WINNT; then
10479 # Experimental: try to use OpenGL on Windows
10481 ENABLE_OPENGL_CANVAS=TRUE
10482 # We need the internal "Mesa" headers.
10483 SYSTEM_MESA_HEADERS=
10484 BUILD_TYPE="$BUILD_TYPE MESA"
10485 AC_MSG_RESULT([yes])
10487 save_LDFLAGS=$LDFLAGS
10488 LDFLAGS="$LDFLAGS -lm"
10489 AC_MSG_RESULT([yes])
10490 AC_CHECK_LIB([GL], [main],
10491 [AC_CHECK_LIB([GL], [glCreateShader], [ENABLE_OPENGL_CANVAS=TRUE],
10492 [add_warning "no shader support in libGL - will enable openGL transitions, but not openGL canvas"
10493 AC_MSG_WARN([no shader support in libGL - will enable openGL transitions, but not openGL canvas])
10494 ENABLE_OPENGL_CANVAS=], [])],
10495 [AC_MSG_ERROR(libGL not installed or functional)], [])
10496 LDFLAGS="$LDFLAGS -lGL"
10497 AC_CHECK_LIB([GLU], [main], [:],
10498 [AC_MSG_ERROR(libGLU not installed or functional)], [])
10500 LDFLAGS=$save_LDFLAGS
10502 dnl ===================================================================
10503 dnl Check for system Mesa
10504 dnl ===================================================================
10505 AC_MSG_CHECKING([which Mesa headers to use])
10506 if test "$with_system_mesa_headers" = "yes"; then
10507 AC_MSG_RESULT([external])
10508 SYSTEM_MESA_HEADERS=TRUE
10510 AC_CHECK_HEADER(GL/glxext.h, [],
10511 [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
10512 AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
10513 AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
10516 AC_MSG_RESULT([internal])
10517 SYSTEM_MESA_HEADERS=
10518 BUILD_TYPE="$BUILD_TYPE MESA"
10522 AC_SUBST(SYSTEM_MESA_HEADERS)
10523 AC_SUBST(ENABLE_OPENGL)
10524 AC_SUBST(ENABLE_OPENGL_CANVAS)
10526 dnl =================================================
10527 dnl Check whether to build with OpenCL support.
10528 dnl =================================================
10530 AC_MSG_CHECKING([whether to build with the OpenCL support.])
10533 if test $_os != iOS -a $_os != Android -a "x$enable_opencl" != "xno"; then
10534 if test $_os = Darwin -a "$with_macosx_sdk" = "10.5"; then
10535 AC_MSG_RESULT([disabled on OS X 10.5])
10537 AC_MSG_RESULT([yes])
10539 AC_DEFINE(HAVE_FEATURE_OPENCL)
10542 AC_MSG_RESULT([no])
10545 AC_SUBST(ENABLE_OPENCL)
10547 dnl ===================================================================
10548 dnl Check whether to enable glTF support
10549 dnl ===================================================================
10550 AC_MSG_CHECKING([whether to enable glTF support])
10552 if test "x$enable_gltf" != "xno" -a $_os != Darwin -a $_os != iOS -a $_os != Android; then
10554 AC_MSG_RESULT([yes])
10555 AC_DEFINE(HAVE_FEATURE_GLTF,1)
10556 if test "$with_system_libgltf" = "yes"; then
10557 SYSTEM_LIBGLTF=TRUE
10558 PKG_CHECK_MODULES( LIBGLTF, [libgltf-0.0 >= 0.0.1] )
10560 BUILD_TYPE="$BUILD_TYPE LIBGLTF"
10563 AC_MSG_RESULT([no])
10565 AC_SUBST(ENABLE_GLTF)
10566 AC_SUBST(SYSTEM_LIBGLTF)
10567 AC_SUBST(LIBGLTF_CFLAGS)
10568 AC_SUBST(LIBGLTF_LIBS)
10570 dnl ===================================================================
10571 dnl Check whether to enable COLLADA support
10572 dnl ===================================================================
10573 AC_MSG_CHECKING([whether to enable COLLADA support])
10575 if test "$enable_collada" != "no" -a "$ENABLE_GLTF" = "TRUE"; then
10576 AC_MSG_RESULT([yes])
10577 ENABLE_COLLADA=TRUE
10578 AC_DEFINE(HAVE_FEATURE_COLLADA,1)
10579 BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF"
10581 AC_MSG_RESULT([no])
10583 AC_SUBST(ENABLE_COLLADA)
10586 AC_MSG_CHECKING([whether to build the PDF import feature])
10588 if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = yes \); then
10589 AC_MSG_RESULT([yes])
10590 ENABLE_PDFIMPORT=TRUE
10592 dnl ===================================================================
10593 dnl Check for system poppler
10594 dnl ===================================================================
10595 AC_MSG_CHECKING([which PDF import backend to use])
10596 if test "$with_system_poppler" = "yes"; then
10597 AC_MSG_RESULT([external])
10598 SYSTEM_POPPLER=TRUE
10599 PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
10600 AC_LANG_PUSH([C++])
10601 save_CXXFLAGS=$CXXFLAGS
10602 save_CPPFLAGS=$CPPFLAGS
10603 CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
10604 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
10605 AC_CHECK_HEADER([cpp/poppler-version.h], [],
10606 [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
10607 CXXFLAGS=$save_CXXFLAGS
10608 CPPFLAGS=$save_CPPFLAGS
10610 libo_MINGW_CHECK_DLL([libpoppler])
10611 POPPLER_CFLAGS=$(printf '%s' "$POPPLER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
10613 AC_MSG_RESULT([internal])
10615 BUILD_TYPE="$BUILD_TYPE POPPLER"
10618 AC_MSG_RESULT([no])
10620 AC_SUBST(ENABLE_PDFIMPORT)
10621 AC_SUBST(SYSTEM_POPPLER)
10622 AC_SUBST(POPPLER_CFLAGS)
10623 AC_SUBST(POPPLER_LIBS)
10625 AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
10626 if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
10627 AC_MSG_RESULT([yes])
10628 ENABLE_MEDIAWIKI=TRUE
10629 BUILD_TYPE="$BUILD_TYPE XSLTML"
10630 if test "x$with_java" = "xno"; then
10631 AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
10634 AC_MSG_RESULT([no])
10636 SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
10638 AC_SUBST(ENABLE_MEDIAWIKI)
10640 AC_MSG_CHECKING([whether to build the Report Builder])
10641 if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
10642 AC_MSG_RESULT([yes])
10643 ENABLE_REPORTBUILDER=TRUE
10644 AC_MSG_CHECKING([which jfreereport libs to use])
10645 if test "$with_system_jfreereport" = "yes"; then
10646 SYSTEM_JFREEREPORT=TRUE
10647 AC_MSG_RESULT([external])
10648 if test -z $SAC_JAR; then
10649 SAC_JAR=/usr/share/java/sac.jar
10651 AC_CHECK_FILE($SAC_JAR, [],
10652 [AC_MSG_ERROR(sac.jar not found.)], [])
10654 if test -z $LIBXML_JAR; then
10655 AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
10656 [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
10658 AC_CHECK_FILE(/usr/share/java/libxml.jar,
10659 [ LIBXML_JAR=/usr/share/java/libxml.jar ],
10660 [AC_MSG_ERROR(libxml.jar replacement not found.)]
10665 AC_CHECK_FILE($LIBXML_JAR, [],
10666 [AC_MSG_ERROR(libxml.jar not found.)], [])
10669 if test -z $FLUTE_JAR; then
10670 AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
10671 [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
10673 AC_CHECK_FILE(/usr/share/java/flute.jar,
10674 [ FLUTE_JAR=/usr/share/java/flute.jar ],
10675 [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
10680 AC_CHECK_FILE($FLUTE_JAR, [],
10681 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
10684 if test -z $JFREEREPORT_JAR; then
10685 AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
10686 [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
10688 AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
10689 [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
10690 [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
10695 AC_CHECK_FILE($JFREEREPORT_JAR, [],
10696 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
10699 if test -z $LIBLAYOUT_JAR; then
10700 AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
10701 [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
10703 AC_CHECK_FILE(/usr/share/java/liblayout.jar,
10704 [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
10705 [AC_MSG_ERROR(liblayout.jar replacement not found.)]
10710 AC_CHECK_FILE($LIBLAYOUT_JAR, [],
10711 [AC_MSG_ERROR(liblayout.jar not found.)], [])
10714 if test -z $LIBLOADER_JAR; then
10715 AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
10716 [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
10718 AC_CHECK_FILE(/usr/share/java/libloader.jar,
10719 [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
10720 [AC_MSG_ERROR(libloader.jar replacement not found.)]
10725 AC_CHECK_FILE($LIBLOADER_JAR, [],
10726 [AC_MSG_ERROR(libloader.jar not found.)], [])
10729 if test -z $LIBFORMULA_JAR; then
10730 AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
10731 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
10733 AC_CHECK_FILE(/usr/share/java/libformula.jar,
10734 [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
10735 [AC_MSG_ERROR(libformula.jar replacement not found.)]
10740 AC_CHECK_FILE($LIBFORMULA_JAR, [],
10741 [AC_MSG_ERROR(libformula.jar not found.)], [])
10744 if test -z $LIBREPOSITORY_JAR; then
10745 AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
10746 [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
10748 AC_CHECK_FILE(/usr/share/java/librepository.jar,
10749 [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
10750 [AC_MSG_ERROR(librepository.jar replacement not found.)]
10755 AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
10756 [AC_MSG_ERROR(librepository.jar not found.)], [])
10759 if test -z $LIBFONTS_JAR; then
10760 AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
10761 [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
10763 AC_CHECK_FILE(/usr/share/java/libfonts.jar,
10764 [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
10765 [AC_MSG_ERROR(libfonts.jar replacement not found.)]
10770 AC_CHECK_FILE($LIBFONTS_JAR, [],
10771 [AC_MSG_ERROR(libfonts.jar not found.)], [])
10774 if test -z $LIBSERIALIZER_JAR; then
10775 AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
10776 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
10778 AC_CHECK_FILE(/usr/share/java/libserializer.jar,
10779 [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
10780 [AC_MSG_ERROR(libserializer.jar replacement not found.)]
10785 AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
10786 [AC_MSG_ERROR(libserializer.jar not found.)], [])
10789 if test -z $LIBBASE_JAR; then
10790 AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
10791 [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
10793 AC_CHECK_FILE(/usr/share/java/libbase.jar,
10794 [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
10795 [AC_MSG_ERROR(libbase.jar replacement not found.)]
10800 AC_CHECK_FILE($LIBBASE_JAR, [],
10801 [AC_MSG_ERROR(libbase.jar not found.)], [])
10805 AC_MSG_RESULT([internal])
10806 SYSTEM_JFREEREPORT=
10807 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
10810 AC_MSG_RESULT([no])
10811 ENABLE_REPORTBUILDER=
10812 SYSTEM_JFREEREPORT=
10814 AC_SUBST(ENABLE_REPORTBUILDER)
10815 AC_SUBST(SYSTEM_JFREEREPORT)
10817 AC_SUBST(LIBXML_JAR)
10818 AC_SUBST(FLUTE_JAR)
10819 AC_SUBST(JFREEREPORT_JAR)
10820 AC_SUBST(LIBBASE_JAR)
10821 AC_SUBST(LIBLAYOUT_JAR)
10822 AC_SUBST(LIBLOADER_JAR)
10823 AC_SUBST(LIBFORMULA_JAR)
10824 AC_SUBST(LIBREPOSITORY_JAR)
10825 AC_SUBST(LIBFONTS_JAR)
10826 AC_SUBST(LIBSERIALIZER_JAR)
10828 # this has to be here because both the Wiki Publisher and the SRB use
10830 if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = "TRUE"; then
10831 AC_MSG_CHECKING([which Apache commons-* libs to use])
10832 if test "$with_system_apache_commons" = "yes"; then
10833 SYSTEM_APACHE_COMMONS=TRUE
10834 AC_MSG_RESULT([external])
10835 if test "$ENABLE_MEDIAWIKI" = "TRUE"; then
10836 if test -z $COMMONS_CODEC_JAR; then
10837 _commons_codec_path=""
10838 if test "$HAVE_JAVA6" = "TRUE"; then
10839 _commons_codec_path="/usr/share/java/commons-codec-1.9.jar"
10841 _commons_codec_path="/usr/share/java/commons-codec-1.6.jar"
10843 AC_CHECK_FILE($_commons_codec_path,
10844 [ COMMONS_CODEC_JAR=$_commons_codec_path ],
10846 AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
10847 [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
10848 [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
10853 AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
10854 [AC_MSG_ERROR(commons-codec.jar not found.)], [])
10857 if test -z $COMMONS_LANG_JAR; then
10858 _commons_lang_path=""
10859 if test "$HAVE_JAVA6" = "TRUE"; then
10860 _commons_lang_path="/usr/share/java/commons-lang3-3.3.1-src.tar.gz"
10862 _commons_lang_path="/usr/share/java/commons-lang-2.4.jar"
10864 AC_CHECK_FILE($_commons_lang_path,
10865 [ COMMONS_LANG_JAR=$commons_lang_path ],
10867 AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
10868 [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
10869 [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
10874 AC_CHECK_FILE($COMMONS_LANG_JAR, [],
10875 [AC_MSG_ERROR(commons-lang.jar not found.)], [])
10878 if test -z $COMMONS_HTTPCLIENT_JAR; then
10879 AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
10880 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
10882 AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
10883 [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
10884 [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
10889 AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
10890 [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
10893 if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = "TRUE"; then
10894 if test -z $COMMONS_LOGGING_JAR; then
10895 AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.3.jar,
10896 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.3.jar ],
10898 AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
10899 [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
10900 [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
10905 AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
10906 [AC_MSG_ERROR(commons-logging.jar not found.)], [])
10910 AC_MSG_RESULT([internal])
10911 SYSTEM_APACHE_COMMONS=
10912 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
10915 AC_SUBST(SYSTEM_APACHE_COMMONS)
10916 AC_SUBST(COMMONS_CODEC_JAR)
10917 AC_SUBST(COMMONS_LANG_JAR)
10918 AC_SUBST(COMMONS_HTTPCLIENT_JAR)
10919 AC_SUBST(COMMONS_LOGGING_JAR)
10921 # scripting provider for BeanShell?
10922 AC_MSG_CHECKING([whether to build support for scripts in BeanShell])
10923 if test "${enable_scripting_beanshell}" != "no" -a "x$with_java" != "xno"; then
10924 AC_MSG_RESULT([yes])
10925 ENABLE_SCRIPTING_BEANSHELL=TRUE
10927 dnl ===================================================================
10928 dnl Check for system beanshell
10929 dnl ===================================================================
10930 AC_MSG_CHECKING([which beanshell to use])
10931 if test "$with_system_beanshell" = "yes"; then
10932 AC_MSG_RESULT([external])
10934 if test -z $BSH_JAR; then
10935 BSH_JAR=/usr/share/java/bsh.jar
10937 AC_CHECK_FILE($BSH_JAR, [],
10938 [AC_MSG_ERROR(bsh.jar not found.)], [])
10940 AC_MSG_RESULT([internal])
10942 BUILD_TYPE="$BUILD_TYPE BSH"
10945 AC_MSG_RESULT([no])
10946 ENABLE_SCRIPTING_BEANSHELL=
10947 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_BEANSHELL"
10949 AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
10950 AC_SUBST(SYSTEM_BSH)
10953 # scripting provider for JavaScript?
10954 AC_MSG_CHECKING([whether to build support for scripts in JavaScript])
10955 if test "${enable_scripting_javascript}" != "no" -a "x$with_java" != "xno"; then
10956 AC_MSG_RESULT([yes])
10957 ENABLE_SCRIPTING_JAVASCRIPT=TRUE
10959 dnl ===================================================================
10960 dnl Check for system rhino
10961 dnl ===================================================================
10962 AC_MSG_CHECKING([which rhino to use])
10963 if test "$with_system_rhino" = "yes"; then
10964 AC_MSG_RESULT([external])
10966 if test -z $RHINO_JAR; then
10967 RHINO_JAR=/usr/share/java/js.jar
10969 AC_CHECK_FILE($RHINO_JAR, [],
10970 [AC_MSG_ERROR(js.jar not found.)], [])
10972 AC_MSG_RESULT([internal])
10974 BUILD_TYPE="$BUILD_TYPE RHINO"
10977 AC_MSG_RESULT([no])
10978 ENABLE_SCRIPTING_JAVASCRIPT=
10979 SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_JAVASCRIPT"
10981 AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
10982 AC_SUBST(SYSTEM_RHINO)
10983 AC_SUBST(RHINO_JAR)
10986 case "$host_cpu" in
10987 x86_64 | powerpc64 | s390x)
10988 if test "$SAL_TYPES_SIZEOFLONG" = "8"; then
10989 supports_multilib="yes"
10996 dnl ===================================================================
10997 dnl Check whether the TQt and TDE libraries are available.
10998 dnl ===================================================================
11002 if test "$_os" != "OpenBSD"; then
11005 if test "$test_tde" = "yes" -a "$ENABLE_TDE" = "TRUE"; then
11006 dnl Search paths for TQt and TDE
11007 if test -z "$supports_multilib"; then
11008 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"
11009 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"
11011 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"
11012 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"
11014 if test -n "$TQTDIR"; then
11015 tqt_incdirs="$TQTDIR/include $tqt_incdirs"
11016 if test -z "$supports_multilib"; then
11017 tqt_libdirs="$TQTDIR/lib $tqt_libdirs"
11019 tqt_libdirs="$TQTDIR/lib64 $TQTDIR/lib $tqt_libdirs"
11022 if test -z "$supports_multilib"; then
11023 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"
11024 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"
11026 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"
11027 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"
11029 if test -n "$TDEDIR"; then
11030 tde_incdirs="$TDEDIR/include $tde_incdirs"
11031 if test -z "$supports_multilib"; then
11032 tde_libdirs="$TDEDIR/lib $tde_libdirs"
11034 tde_libdirs="$TDEDIR/lib64 $TDEDIR/lib $tde_libdirs"
11039 tqt_test_include="ntqstyle.h"
11040 tde_test_include="kapp.h"
11042 if test "$_os" != "OpenBSD"; then
11043 tqt_test_library="libtqt-mt.so"
11044 tde_test_library="libDCOP.so"
11046 tqt_test_library="libtqt-mt.so*"
11047 tde_test_library="libDCOP.so*"
11050 dnl Check for TQt headers
11051 AC_MSG_CHECKING([for TQt headers])
11053 for tde_check in $tqt_incdirs; do
11054 if test -r "$tde_check/$tqt_test_include"; then
11055 tqt_incdir="$tde_check"
11059 AC_MSG_RESULT([$tqt_incdir])
11060 if test "x$tqt_incdir" = "xno"; then
11061 AC_MSG_ERROR([TQt headers not found. Please specify the root of
11062 your TQt installation by exporting TQTDIR before running "configure".])
11065 dnl Check for TQt libraries
11066 AC_MSG_CHECKING([for TQt libraries])
11068 for tqt_check in $tqt_libdirs; do
11069 if test -r "`ls $tqt_check/$tqt_test_library 2>/dev/null | head -1`"; then
11070 tqt_libdir="$tqt_check"
11074 AC_MSG_RESULT([$tqt_libdir])
11075 if test "x$tqt_libdir" = "xno"; then
11076 AC_MSG_ERROR([TQt libraries not found. Please specify the root of
11077 your TQt installation by exporting TQTDIR before running "configure".])
11080 dnl Check for Meta Object Compiler
11081 AC_PATH_PROG( MOC, moc, no, [`dirname $tqt_libdir`/bin:$TQTDIR/bin:$PATH] )
11082 if test "$MOC" = "no"; then
11083 AC_MSG_ERROR([TQt Meta Object Compiler not found. Please specify
11084 the root of your TQt installation by exporting TQTDIR before running "configure".])
11087 dnl Check for TDE headers
11088 AC_MSG_CHECKING([for TDE headers])
11090 for tde_check in $tde_incdirs; do
11091 if test -r "$tde_check/$tde_test_include"; then
11092 tde_incdir="$tde_check"
11096 AC_MSG_RESULT([$tde_incdir])
11097 if test "x$tde_incdir" = "xno"; then
11098 AC_MSG_ERROR([TDE headers not found. Please specify the root of
11099 your TDE installation by exporting TDEDIR before running "configure".])
11102 dnl Check for TDE libraries
11103 AC_MSG_CHECKING([for TDE libraries])
11105 for tde_check in $tde_libdirs; do
11106 if test -r "`ls $tde_check/$tde_test_library 2>/dev/null | head -1`"; then
11107 tde_libdir="$tde_check"
11111 AC_MSG_RESULT([$tde_libdir])
11112 if test "x$tde_libdir" = "xno"; then
11113 AC_MSG_ERROR([TDE libraries not found. Please specify the root of
11114 your TDE installation by exporting TDEDIR before running "configure".])
11117 dnl Set the variables
11118 TDE_CFLAGS="-I$tqt_incdir -I$tde_incdir -I/usr/include/tqt -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
11119 TDE_LIBS="-L$tde_libdir -L$tqt_libdir -ltdeio -ltdeui -ltdecore -ltqt -ltqt-mt"
11121 AC_SUBST(TDE_CFLAGS)
11125 dnl ===================================================================
11126 dnl Check whether the Qt3 and KDE3 libraries are available.
11127 dnl ===================================================================
11131 if test "$_os" != "OpenBSD"; then
11134 if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE"; then
11135 dnl Search paths for Qt3 and KDE3
11136 if test -z "$supports_multilib"; then
11137 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"
11138 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"
11140 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"
11141 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"
11143 if test -n "$QTDIR"; then
11144 qt_incdirs="$QTDIR/include $qt_incdirs"
11145 if test -z "$supports_multilib"; then
11146 qt_libdirs="$QTDIR/lib $qt_libdirs"
11148 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
11151 if test -z "$supports_multilib"; then
11152 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"
11153 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"
11155 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"
11156 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"
11158 if test -n "$KDEDIR"; then
11159 kde_incdirs="$KDEDIR/include $kde_incdirs"
11160 if test -z "$supports_multilib"; then
11161 kde_libdirs="$KDEDIR/lib $kde_libdirs"
11163 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
11168 qt_test_include="qstyle.h"
11169 kde_test_include="kapp.h"
11171 if test "$_os" != "OpenBSD"; then
11172 qt_test_library="libqt-mt.so"
11173 kde_test_library="libDCOP.so"
11175 qt_test_library="libqt-mt.so*"
11176 kde_test_library="libDCOP.so*"
11179 dnl Check for Qt3 headers
11180 AC_MSG_CHECKING([for Qt3 headers])
11182 for kde_check in $qt_incdirs; do
11183 if test -r "$kde_check/$qt_test_include"; then
11184 qt_incdir="$kde_check"
11188 AC_MSG_RESULT([$qt_incdir])
11189 if test "x$qt_incdir" = "xno"; then
11190 AC_MSG_ERROR([Qt3 headers not found. Please specify the root of
11191 your Qt3 installation by exporting QTDIR before running "configure".])
11194 dnl Check for Qt3 libraries
11195 AC_MSG_CHECKING([for Qt3 libraries])
11197 for qt_check in $qt_libdirs; do
11198 if test -r "`ls $qt_check/$qt_test_library 2>/dev/null | head -1`"; then
11199 qt_libdir="$qt_check"
11203 AC_MSG_RESULT([$qt_libdir])
11204 if test "x$qt_libdir" = "xno"; then
11205 AC_MSG_ERROR([Qt3 libraries not found. Please specify the root of
11206 your Qt3 installation by exporting QTDIR before running "configure".])
11209 dnl Check for Meta Object Compiler
11210 AC_PATH_PROG( MOC, moc, no, [`dirname $qt_libdir`/bin:$QTDIR/bin:$PATH] )
11211 if test "$MOC" = "no"; then
11212 AC_MSG_ERROR([Qt3 Meta Object Compiler not found. Please specify
11213 the root of your Qt3 installation by exporting QTDIR before running "configure".])
11216 dnl Check for KDE3 headers
11217 AC_MSG_CHECKING([for KDE3 headers])
11219 for kde_check in $kde_incdirs; do
11220 if test -r "$kde_check/$kde_test_include"; then
11221 kde_incdir="$kde_check"
11225 AC_MSG_RESULT([$kde_incdir])
11226 if test "x$kde_incdir" = "xno"; then
11227 AC_MSG_ERROR([KDE3 headers not found. Please specify the root of
11228 your KDE3 installation by exporting KDEDIR before running "configure".])
11231 dnl Check for KDE3 libraries
11232 AC_MSG_CHECKING([for KDE3 libraries])
11234 for kde_check in $kde_libdirs; do
11235 if test -r "`ls $kde_check/$kde_test_library 2>/dev/null | head -1`"; then
11236 kde_libdir="$kde_check"
11240 AC_MSG_RESULT([$kde_libdir])
11241 if test "x$kde_libdir" = "xno"; then
11242 AC_MSG_ERROR([KDE3 libraries not found. Please specify the root of
11243 your KDE3 installation by exporting KDEDIR before running "configure".])
11246 dnl Set the variables
11247 KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
11248 KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
11249 KDE_CFLAGS=$(printf '%s' "$KDE_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11251 AC_SUBST(KDE_CFLAGS)
11255 dnl ===================================================================
11256 dnl KDE4 Integration
11257 dnl ===================================================================
11266 if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE"; then
11267 qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
11268 qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
11270 kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
11271 kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
11273 if test -n "$supports_multilib"; then
11274 qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
11275 kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel"
11278 if test -n "$QTDIR"; then
11279 qt_incdirs="$QTDIR/include $qt_incdirs"
11280 if test -z "$supports_multilib"; then
11281 qt_libdirs="$QTDIR/lib $qt_libdirs"
11283 qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
11286 if test -n "$QT4DIR"; then
11287 qt_incdirs="$QT4DIR/include $qt_incdirs"
11288 if test -z "$supports_multilib"; then
11289 qt_libdirs="$QT4DIR/lib $qt_libdirs"
11291 qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs"
11295 if test -n "$KDEDIR"; then
11296 kde_incdirs="$KDEDIR/include $kde_incdirs"
11297 if test -z "$supports_multilib"; then
11298 kde_libdirs="$KDEDIR/lib $kde_libdirs"
11300 kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
11303 if test -n "$KDE4DIR"; then
11304 kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs"
11305 if test -z "$supports_multilib"; then
11306 kde_libdirs="$KDE4DIR/lib $kde_libdirs"
11308 kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs"
11312 qt_test_include="Qt/qobject.h"
11313 qt_test_library="libQtNetwork.so"
11314 kde_test_include="kwindowsystem.h"
11315 kde_test_library="libsolid.so"
11317 AC_MSG_CHECKING([for Qt4 headers])
11319 for inc_dir in $qt_incdirs; do
11320 if test -r "$inc_dir/$qt_test_include"; then
11321 qt_header_dir="$inc_dir"
11326 AC_MSG_RESULT([$qt_header_dir])
11327 if test "x$qt_header_dir" = "xno"; then
11328 AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
11331 dnl Check for qmake
11332 AC_PATH_PROG( QMAKEQT4, qmake-qt4, no, [`dirname $qt_header_dir`/bin:$QT4DIR/bin:$PATH] )
11334 if test "$QMAKE4" = "no"; then
11335 AC_PATH_PROG( QMAKE4, qmake, no, [`dirname $qt_header_dir`/bin:$QT4DIR/bin:$PATH] )
11336 if test "$QMAKE4" = "no"; then
11337 AC_MSG_ERROR([Qmake not found. Please specify
11338 the root of your Qt installation by exporting QT4DIR before running "configure".])
11342 qt_libdirs="`$QMAKE4 -query QT_INSTALL_LIBS` $qt_libdirs"
11343 AC_MSG_CHECKING([for Qt4 libraries])
11345 for lib_dir in $qt_libdirs; do
11346 if test -r "$lib_dir/$qt_test_library"; then
11347 qt_lib_dir="$lib_dir"
11348 PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
11353 AC_MSG_RESULT([$qt_lib_dir])
11355 if test "x$qt_lib_dir" = "xno"; then
11356 AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".])
11359 dnl Check for Meta Object Compiler
11361 AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
11363 if test "$MOC4" = "no"; then
11364 AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] )
11365 if test "$MOC4" = "no"; then
11366 AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
11367 the root of your Qt installation by exporting QT4DIR before running "configure".])
11371 dnl Check for KDE4 headers
11372 AC_MSG_CHECKING([for KDE4 headers])
11374 for kde_check in $kde_incdirs; do
11375 if test -r "$kde_check/$kde_test_include"; then
11376 kde_incdir="$kde_check"
11380 AC_MSG_RESULT([$kde_incdir])
11381 if test "x$kde_incdir" = "xno"; then
11382 AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
11385 dnl Check for KDE4 libraries
11386 AC_MSG_CHECKING([for KDE4 libraries])
11388 for kde_check in $kde_libdirs; do
11389 if test -r "$kde_check/$kde_test_library"; then
11390 kde_libdir="$kde_check"
11395 AC_MSG_RESULT([$kde_libdir])
11396 if test "x$kde_libdir" = "xno"; then
11397 AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".])
11400 PKG_CHECK_MODULES([QT4],[QtNetwork QtGui])
11401 KDE4_CFLAGS="-I$kde_incdir $QT4_CFLAGS -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
11402 KDE4_LIBS="-L$kde_libdir -lkio -lkfile -lkdeui -lkdecore -L$qt_lib_dir $QT4_LIBS"
11403 KDE4_CFLAGS=$(printf '%s' "$KDE4_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11405 AC_LANG_PUSH([C++])
11406 save_CXXFLAGS=$CXXFLAGS
11407 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
11408 AC_MSG_CHECKING([whether KDE is >= 4.2])
11409 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11410 #include <kdeversion.h>
11412 int main(int argc, char **argv) {
11413 if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
11416 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
11417 CXXFLAGS=$save_CXXFLAGS
11420 # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled.
11421 # Sets also KDE_GLIB_CFLAGS/KDE_GLIB_LIBS if successful.
11422 PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4],
11425 AC_DEFINE(KDE_HAVE_GLIB,1)
11426 KDE_GLIB_CFLAGS=$(printf '%s' "$KDE_GLIB_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11430 AC_LANG_PUSH([C++])
11431 save_CXXFLAGS=$CXXFLAGS
11432 CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
11434 LIBS="$LIBS $KDE4_LIBS"
11435 AC_MSG_CHECKING([whether Qt has fixed ExcludeSocketNotifiers])
11437 # Prepare meta object data
11438 TSTBASE="tst_exclude_socket_notifiers"
11439 TSTMOC="${SRC_ROOT}/vcl/unx/kde4/${TSTBASE}"
11440 ln -fs "${TSTMOC}.hxx"
11441 $MOC4 "${TSTBASE}.hxx" -o "${TSTBASE}.moc"
11443 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11444 #include "tst_exclude_socket_notifiers.moc"
11446 int main(int argc, char *argv[])
11448 QCoreApplication app(argc, argv);
11449 exit(tst_processEventsExcludeSocket());
11453 AC_MSG_RESULT([yes])
11455 AC_MSG_RESULT([no])
11456 AC_MSG_WARN([native KDE4 file pickers will be disabled at runtime])
11457 if test -z "$qt4_fix_warning"; then
11458 add_warning "native KDE4 file pickers will be disabled at runtime, Qt4 fixes needed"
11461 add_warning " https://bugreports.qt-project.org/browse/QTBUG-37380 (needed)"
11464 # Remove meta object data
11465 rm -f "${TSTBASE}."*
11467 AC_MSG_CHECKING([whether Qt avoids QClipboard recursion caused by posted events])
11469 # Prepare meta object data
11470 TSTBASE="tst_exclude_posted_events"
11471 TSTMOC="${SRC_ROOT}/vcl/unx/kde4/${TSTBASE}"
11472 ln -fs "${TSTMOC}.hxx"
11473 $MOC4 "${TSTBASE}.hxx" -o "${TSTBASE}.moc"
11475 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11476 #include "tst_exclude_posted_events.moc"
11478 int main(int argc, char *argv[])
11480 QCoreApplication app(argc, argv);
11481 exit(tst_excludePostedEvents());
11485 AC_MSG_RESULT([yes])
11487 AC_MSG_RESULT([no])
11488 AC_MSG_WARN([native KDE4 file pickers will be disabled at runtime])
11489 if test -z "$qt4_fix_warning"; then
11490 add_warning "native KDE4 file pickers will be disabled at runtime, Qt4 fixes needed"
11493 add_warning " https://bugreports.qt-project.org/browse/QTBUG-34614 (needed)"
11496 # Remove meta object data
11497 rm -f "${TSTBASE}."*
11499 if test -n "$qt4_fix_warning"; then
11500 add_warning " https://bugreports.qt-project.org/browse/QTBUG-38585 (recommended)"
11504 CXXFLAGS=$save_CXXFLAGS
11507 AC_MSG_WARN([[No Glib found, KDE4 support will not use native file pickers!]]))
11509 AC_SUBST(KDE4_CFLAGS)
11510 AC_SUBST(KDE4_LIBS)
11512 AC_SUBST(KDE_GLIB_CFLAGS)
11513 AC_SUBST(KDE_GLIB_LIBS)
11514 AC_SUBST(KDE_HAVE_GLIB)
11516 dnl ===================================================================
11517 dnl Test for the enabling the lockdown pieces
11518 dnl ===================================================================
11519 AC_MSG_CHECKING([whether to enable the lockdown pieces])
11521 if test -n "$enable_lockdown" -a "$enable_lockdown" != "no"; then
11522 ENABLE_LOCKDOWN=TRUE
11523 AC_MSG_RESULT([yes])
11525 AC_MSG_RESULT([no])
11527 AC_SUBST(ENABLE_LOCKDOWN)
11529 dnl ===================================================================
11530 dnl Test whether to include Evolution 2 support
11531 dnl ===================================================================
11532 AC_MSG_CHECKING([whether to enable evolution 2 support])
11533 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
11534 AC_MSG_RESULT([yes])
11535 PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
11536 GOBJECT_CFLAGS=$(printf '%s' "$GOBJECT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11537 ENABLE_EVOAB2="TRUE"
11540 AC_MSG_RESULT([no])
11542 AC_SUBST(ENABLE_EVOAB2)
11543 AC_SUBST(GOBJECT_CFLAGS)
11544 AC_SUBST(GOBJECT_LIBS)
11546 dnl ===================================================================
11547 dnl Test whether to include TDE AB support
11548 dnl ===================================================================
11549 AC_MSG_CHECKING([whether to enable TDE address book support])
11550 if test "$enable_tdeab" = "yes" -a "$enable_tde" = "yes"; then
11551 AC_MSG_RESULT([yes])
11552 AC_LANG_PUSH([C++])
11553 save_CXXFLAGS=$CXXFLAGS
11554 CXXFLAGS="$CXXFLAGS $TDE_CFLAGS"
11555 AC_MSG_CHECKING([whether TDE is at least R14.0])
11556 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11557 #include <tdeversion.h>
11559 int main(int argc, char **argv) {
11560 if (TDE_VERSION_MAJOR >= 14) return 0;
11563 ]])],[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])],[])
11564 CXXFLAGS=$save_CXXFLAGS
11568 AC_MSG_RESULT([no])
11571 AC_SUBST(ENABLE_TDEAB)
11573 dnl ===================================================================
11574 dnl Test whether to include KDE AB support
11575 dnl ===================================================================
11576 AC_MSG_CHECKING([whether to enable KDE address book support])
11577 if test "$enable_kdeab" = "yes" -a "$enable_kde" = "yes"; then
11578 AC_MSG_RESULT([yes])
11579 AC_LANG_PUSH([C++])
11580 save_CXXFLAGS=$CXXFLAGS
11581 CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
11582 AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
11583 AC_RUN_IFELSE([AC_LANG_SOURCE([[
11584 #include <kdeversion.h>
11586 int main(int argc, char **argv) {
11587 if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
11590 ]])],[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])],[])
11591 CXXFLAGS=$save_CXXFLAGS
11595 AC_MSG_RESULT([no])
11598 AC_SUBST(ENABLE_KAB)
11600 dnl ===================================================================
11601 dnl Test which themes to include
11602 dnl ===================================================================
11603 AC_MSG_CHECKING([which themes to include])
11604 # if none given use default subset of available themes
11605 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
11606 with_theme="crystal default galaxy hicontrast oxygen tango sifr"
11607 test -z "$ENABLE_RELEASE_BUILD" && with_theme="$with_theme tango_testing"
11611 if test "x$with_theme" != "xno"; then
11612 for theme in $with_theme; do
11614 crystal|default|galaxy|hicontrast|human|industrial|oxygen|sifr|tango|tango_testing) : ;;
11615 *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
11617 WITH_THEMES="$WITH_THEMES $theme"
11620 AC_MSG_RESULT([$WITH_THEMES])
11621 AC_SUBST([WITH_THEMES])
11623 dnl ===================================================================
11624 dnl Test whether to integrate helppacks into the product's installer
11625 dnl ===================================================================
11626 AC_MSG_CHECKING([for helppack integration])
11627 if test "$with_helppack_integration" = "no"; then
11628 WITH_HELPPACK_INTEGRATION=
11629 AC_MSG_RESULT([no integration])
11631 WITH_HELPPACK_INTEGRATION=TRUE
11632 SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
11633 AC_MSG_RESULT([integration])
11635 AC_SUBST(WITH_HELPPACK_INTEGRATION)
11637 ###############################################################################
11638 # Extensions checking
11639 ###############################################################################
11640 AC_MSG_CHECKING([for extensions integration])
11641 if test "x$enable_extension_integration" != "xno"; then
11642 WITH_EXTENSION_INTEGRATION=TRUE
11643 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
11644 AC_MSG_RESULT([yes, use integration])
11646 WITH_EXTENSION_INTEGRATION=
11647 AC_MSG_RESULT([no, do not integrate])
11649 AC_SUBST(WITH_EXTENSION_INTEGRATION)
11651 dnl Should any extra extensions be included?
11652 dnl There are standalone tests for each of these below.
11653 WITH_EXTRA_EXTENSIONS=
11654 AC_SUBST([WITH_EXTRA_EXTENSIONS])
11656 libo_CHECK_EXTENSION([Watch Window],[WATCH_WINDOW],[watch_window],[watch-window],[23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt])
11657 libo_CHECK_EXTENSION([SmART Gallery (Diagram)],[DIAGRAM],[diagram],[diagram],[8d74685d41f8bffe8c3e71fe8deac09d-SmART_0.9.5.oxt])
11658 libo_CHECK_EXTENSION([Validator],[VALIDATOR],[validator],[validator],[bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt])
11659 libo_CHECK_EXTENSION([Barcode],[BARCODE],[barcode],[barcode],[3ed18025a766f1e955707b969c8113a5-Barcode_1.3.5.0.oxt])
11660 libo_CHECK_EXTENSION([ConvertTextToNumber],[CT2N],[ct2n],[ct2n],[])
11661 libo_CHECK_EXTENSION([Numbertext],[NUMBERTEXT],[numbertext],[numbertext],[b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_0.9.5.oxt])
11662 libo_CHECK_EXTENSION([Hungarian Cross-reference Toolbar],[HUNART],[hunart],[hunart],[b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt])
11663 libo_CHECK_EXTENSION([Typography Toolbar],[TYPO],[typo],[typo],[9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt])
11664 libo_CHECK_EXTENSION([Google Docs],[GOOGLE_DOCS],[google_docs],[google-docs],[27211596cf0ad97cab7321239406fde0-gdocs_3.0.1_modified.oxt])
11665 if test "x$with_java" != "xno"; then
11666 libo_CHECK_EXTENSION([NLPSolver],[NLPSOLVER],[nlpsolver],[nlpsolver],[])
11667 libo_CHECK_EXTENSION([LanguageTool],[LANGUAGETOOL],[languagetool],[languagetool],[])
11670 dnl ===================================================================
11671 dnl Test whether to include Sun Professional Template Pack
11672 dnl ===================================================================
11673 AC_MSG_CHECKING([for Sun Professional Template Pack integration (only supported languages displayed)])
11674 if test "$with_sun_templates" = "" -o "$with_sun_templates" = "no"; then
11675 AC_MSG_RESULT([no integration])
11677 SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK"
11678 sun_supported_langs="en-US de it fr es hu"
11679 if test "$with_sun_templates" = "yes"; then
11680 wanted_sun_templates="$sun_supported_langs"
11682 # check whether the langs are supported by Sun
11683 wanted_sun_templates=
11684 for lang in $with_sun_templates; do
11685 if test -n "`echo $sun_supported_langs | grep "$lang"`"; then
11686 wanted_sun_templates="$wanted_sun_templates $lang"
11691 SUNTEMPLATES_DE_PACK=
11692 SUNTEMPLATES_EN_US_PACK=
11693 SUNTEMPLATES_ES_PACK=
11694 SUNTEMPLATES_FR_PACK=
11695 SUNTEMPLATES_HU_PACK=
11696 SUNTEMPLATES_IT_PACK=
11697 # check whether the langs are requested at all
11698 for lang in $wanted_sun_templates; do
11699 if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`"; then
11700 SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang"
11702 "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";;
11703 "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";;
11704 "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";;
11705 "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";;
11706 "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";;
11707 "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";;
11711 WITH_EXTRA_EXTENSIONS=TRUE
11712 AC_MSG_RESULT([$SUNTEMPLATES_LANG])
11714 AC_SUBST(SUNTEMPLATES_DE_PACK)
11715 AC_SUBST(SUNTEMPLATES_EN_US_PACK)
11716 AC_SUBST(SUNTEMPLATES_ES_PACK)
11717 AC_SUBST(SUNTEMPLATES_FR_PACK)
11718 AC_SUBST(SUNTEMPLATES_HU_PACK)
11719 AC_SUBST(SUNTEMPLATES_IT_PACK)
11721 TEST_FONTS_MISSING=0
11724 # $2+ = accepted font mappings
11728 AC_MSG_CHECKING([font mapping for '$FONT'])
11729 FONTFILE="$(basename `$FCMATCH -f '%{file}' "$FONT"`)"
11730 FONTFILE_LOWER="$(echo $FONTFILE | $AWK '{print tolower($0)}')"
11732 TESTEXPR="'${FONTFILE_LOWER}' = '$(echo $FONT | $AWK '{print tolower($0)}').ttf'"
11734 MAPPING="$(echo $1 | $AWK '{print tolower($0)}')"; shift
11735 test -n "$MAPPING" || break
11736 TESTEXPR="${TESTEXPR} -o '${FONTFILE_LOWER}' = '$MAPPING-regular.ttf'"
11740 AC_MSG_RESULT([ok])
11742 AC_MSG_RESULT([unknown ($FONTFILE)])
11743 TEST_FONTS_MISSING=1
11747 dnl ===================================================================
11748 dnl Test whether to include fonts
11749 dnl ===================================================================
11750 AC_MSG_CHECKING([whether to include third-party fonts])
11751 if test "$with_fonts" != "no"; then
11752 AC_MSG_RESULT([yes])
11754 BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
11756 AC_MSG_RESULT([no])
11758 SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
11759 if test "$test_fontconfig" = "yes"; then
11760 AC_PATH_PROG([FCMATCH], [fc-match])
11761 if test -z "$FCMATCH"; then
11762 AC_MSG_WARN([Unable to query installed fonts - unit tests disabled.])
11763 TEST_FONTS_MISSING=1
11765 test_font_map 'Calibri' 'Carlito'
11766 if test ${TEST_FONTS_MISSING} -eq 1
11768 AC_MSG_WARN([Unknown font mappings - unit tests disabled.])
11772 TEST_FONTS_MISSING=0
11775 AC_SUBST(WITH_FONTS)
11776 AC_DEFINE_UNQUOTED([TEST_FONTS_MISSING], $TEST_FONTS_MISSING)
11778 dnl ===================================================================
11779 dnl Test whether to include ppds
11780 dnl ===================================================================
11781 AC_MSG_CHECKING([whether to include PPDs])
11782 if test "$with_ppds" != "no"; then
11783 AC_MSG_RESULT([yes])
11786 AC_MSG_RESULT([no])
11788 SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
11790 AC_SUBST(WITHOUT_PPDS)
11792 dnl ===================================================================
11793 dnl Test whether to include extra galleries
11794 dnl ===================================================================
11795 AC_MSG_CHECKING([whether to include extra galleries])
11796 if test "$enable_extra_gallery" = "" -o "$enable_extra_gallery" = "no"; then
11797 AC_MSG_RESULT([no])
11798 WITH_EXTRA_GALLERY=
11799 OOOP_GALLERY_PACK=""
11801 AC_MSG_RESULT([yes])
11802 WITH_EXTRA_GALLERY=TRUE
11803 BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY"
11804 SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY"
11805 OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip"
11807 AC_SUBST(WITH_EXTRA_GALLERY)
11808 AC_SUBST(OOOP_GALLERY_PACK)
11810 dnl ===================================================================
11811 dnl Test whether to include extra templates
11812 dnl ===================================================================
11813 AC_MSG_CHECKING([whether to include extra templates])
11814 if test "$enable_extra_template" = "" -o "$enable_extra_template" = "no"; then
11815 AC_MSG_RESULT([no])
11816 WITH_EXTRA_TEMPLATE=
11817 OOOP_TEMPLATES_PACK=""
11819 AC_MSG_RESULT([yes])
11820 WITH_EXTRA_TEMPLATE=TRUE
11821 BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE"
11822 SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE"
11823 OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip"
11825 AC_SUBST(WITH_EXTRA_TEMPLATE)
11826 AC_SUBST(OOOP_TEMPLATES_PACK)
11828 dnl ===================================================================
11829 dnl Test whether to include extra samples
11830 dnl ===================================================================
11831 AC_MSG_CHECKING([whether to include extra samples])
11832 if test "$enable_extra_sample" = "" -o "$enable_extra_sample" = "no"; then
11833 AC_MSG_RESULT([no])
11835 OOOP_SAMPLES_PACK=""
11837 AC_MSG_RESULT([yes])
11838 WITH_EXTRA_SAMPLE=TRUE
11839 BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE"
11840 SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE"
11841 OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip"
11843 AC_SUBST(WITH_EXTRA_SAMPLE)
11844 AC_SUBST(OOOP_SAMPLES_PACK)
11846 dnl ===================================================================
11847 dnl Test whether to include extra fonts
11848 dnl ===================================================================
11849 AC_MSG_CHECKING([whether to include extra fonts])
11850 if test "$enable_extra_font" = "" -o "$enable_extra_font" = "no"; then
11851 AC_MSG_RESULT([no])
11855 AC_MSG_RESULT([yes])
11856 WITH_EXTRA_FONT=TRUE
11857 BUILD_TYPE="$BUILD_TYPE EXTRA_FONT"
11858 SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
11859 OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip"
11861 AC_SUBST(WITH_EXTRA_FONT)
11862 AC_SUBST(OOOP_FONTS_PACK)
11864 dnl ===================================================================
11865 dnl Test whether to enable online update service
11866 dnl ===================================================================
11867 AC_MSG_CHECKING([whether to enable online update])
11868 ENABLE_ONLINE_UPDATE=
11869 if test "$enable_online_update" = ""; then
11870 if test "$_os" = "WINNT" -o "$_os" = "Darwin"; then
11871 AC_MSG_RESULT([yes])
11872 ENABLE_ONLINE_UPDATE="TRUE"
11874 AC_MSG_RESULT([no])
11877 if test "$enable_online_update" = "yes"; then
11878 AC_MSG_RESULT([yes])
11879 ENABLE_ONLINE_UPDATE="TRUE"
11881 AC_MSG_RESULT([no])
11884 AC_SUBST(ENABLE_ONLINE_UPDATE)
11886 dnl ===================================================================
11887 dnl Test whether to create MSI with LIMITUI=1 (silent install)
11888 dnl ===================================================================
11889 AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
11890 if test "$enable_silent_msi" = "" -o "$enable_silent_msi" = "no"; then
11891 AC_MSG_RESULT([no])
11894 AC_MSG_RESULT([yes])
11895 ENABLE_SILENT_MSI=TRUE
11896 SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
11898 AC_SUBST(ENABLE_SILENT_MSI)
11900 AC_MSG_CHECKING([whether and how to use Xinerama])
11901 if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
11902 if test "$x_libraries" = "default_x_libraries"; then
11903 XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
11904 if test "x$XINERAMALIB" = x; then
11905 XINERAMALIB="/usr/lib"
11908 XINERAMALIB="$x_libraries"
11910 if test -e "$XINERAMALIB/libXinerama.so" -a -e "$XINERAMALIB/libXinerama.a"; then
11911 # we have both versions, let the user decide but use the dynamic one
11914 if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
11915 XINERAMA_LINK=dynamic
11917 XINERAMA_LINK=static
11919 elif test -e "$XINERAMALIB/libXinerama.so" -a ! -e "$XINERAMALIB/libXinerama.a"; then
11920 # we have only the dynamic version
11922 XINERAMA_LINK=dynamic
11923 elif test -e "$XINERAMALIB/libXinerama.a"; then
11925 if echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
11927 XINERAMA_LINK=static
11937 if test "$USE_XINERAMA" = "TRUE"; then
11938 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
11939 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
11940 [AC_MSG_ERROR(Xinerama header not found.)], [])
11941 XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
11942 if test "x$XEXTLIB" = x; then
11943 XEXTLIBS="-L$XLIB -L$XINERAMALIB -lXext"
11945 XINERAMA_EXTRA_LIBS="$XEXTLIBS"
11946 if test "$_os" = "FreeBSD"; then
11947 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
11949 if test "$_os" = "Linux"; then
11950 XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
11952 AC_CHECK_LIB([Xinerama], [XineramaIsActive], [:],
11953 [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
11955 AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
11960 AC_MSG_RESULT([no])
11962 AC_SUBST(USE_XINERAMA)
11963 AC_SUBST(XINERAMA_LINK)
11965 dnl ===================================================================
11966 dnl Test whether to build cairo or rely on the system version
11967 dnl ===================================================================
11969 if test "$GUIBASE" = "unx"; then
11970 # Used in vcl/Library_vclplug_gen.mk
11974 if test "$test_cairo" = "yes"; then
11975 AC_MSG_CHECKING([whether to use the system cairo])
11977 : ${with_system_cairo:=$with_system_libs}
11978 if test "$with_system_cairo" = "yes"; then
11980 AC_MSG_RESULT([yes])
11982 PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
11983 CAIRO_CFLAGS=$(printf '%s' "$CAIRO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
11985 if test "$test_xrender" = "yes"; then
11986 AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
11988 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
11989 #ifdef PictStandardA8
11993 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
11997 libo_MINGW_CHECK_DLL([libcairo])
11998 libo_MINGW_TRY_DLL([libfontconfig])
11999 libo_MINGW_TRY_DLL([libfreetype])
12000 libo_MINGW_TRY_DLL([libpixman])
12001 libo_MINGW_TRY_DLL([libpng15])
12004 AC_MSG_RESULT([no])
12006 BUILD_TYPE="$BUILD_TYPE CAIRO"
12007 SCPDEFS="$SCPDEFS -DNEED_CAIRO"
12011 AC_SUBST(SYSTEM_CAIRO)
12012 AC_SUBST(CAIRO_CFLAGS)
12013 AC_SUBST(CAIRO_LIBS)
12015 dnl ===================================================================
12016 dnl Test whether to use avahi
12017 dnl ===================================================================
12018 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_avahi" = "yes"; then
12019 PKG_CHECK_MODULES([AVAHI], [avahi-client >= 0.6.10],
12020 [ENABLE_AVAHI="TRUE"])
12021 AC_DEFINE(HAVE_FEATURE_AVAHI)
12022 AVAHI_CFLAGS=$(printf '%s' "$AVAHI_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
12025 AC_SUBST(ENABLE_AVAHI)
12026 AC_SUBST(AVAHI_CFLAGS)
12027 AC_SUBST(AVAHI_LIBS)
12029 dnl ===================================================================
12030 dnl Test whether to use liblangtag
12031 dnl ===================================================================
12034 AC_MSG_CHECKING([whether to use liblangtag])
12035 if test "$enable_liblangtag" = "yes" -o \( "$enable_liblangtag" = "" -a $_os != Android -a $_os != iOS \); then
12036 ENABLE_LIBLANGTAG=TRUE
12037 AC_MSG_RESULT([yes])
12038 AC_MSG_CHECKING([whether to use system liblangtag])
12039 if test "$with_system_liblangtag" = yes; then
12040 SYSTEM_LIBLANGTAG=TRUE
12041 AC_MSG_RESULT([yes])
12042 PKG_CHECK_MODULES( LIBLANGTAG, liblangtag >= 0.4.0)
12043 LIBLANGTAG_CFLAGS=$(printf '%s' "$LIBLANGTAG_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
12044 libo_MINGW_CHECK_DLL([liblangtag])
12047 AC_MSG_RESULT([no])
12048 BUILD_TYPE="$BUILD_TYPE LIBLANGTAG"
12049 if test "$COM" = "MSC"; then
12050 LIBLANGTAG_LIBS="${WORKDIR}/UnpackedTarball/langtag/liblangtag/.libs/liblangtag.lib"
12052 LIBLANGTAG_LIBS="-L${WORKDIR}/UnpackedTarball/langtag/liblangtag/.libs -llangtag"
12056 AC_MSG_RESULT([no])
12058 AC_SUBST(ENABLE_LIBLANGTAG)
12059 AC_SUBST(SYSTEM_LIBLANGTAG)
12060 AC_SUBST(LIBLANGTAG_CFLAGS)
12061 AC_SUBST(LIBLANGTAG_LIBS)
12063 dnl ===================================================================
12064 dnl Test whether to build libpng or rely on the system version
12065 dnl ===================================================================
12067 libo_CHECK_SYSTEM_MODULE([libpng],[LIBPNG],[libpng],["-I${WORKDIR}/UnpackedTarball/png"],["-L${WORKDIR}/LinkTarget/StaticLibrary -lpng"])
12069 dnl ===================================================================
12070 dnl Check for runtime JVM search path
12071 dnl ===================================================================
12072 if test "$ENABLE_JAVA" != ""; then
12073 AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
12074 if test -n "$with_jvm_path" -a "$with_jvm_path" != "no"; then
12075 AC_MSG_RESULT([yes])
12076 if ! test -d "$with_jvm_path"; then
12077 AC_MSG_ERROR(["$with_jvm_path" not a directory])
12079 if ! test -d "$with_jvm_path"jvm; then
12080 AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
12082 JVM_ONE_PATH_CHECK="$with_jvm_path"
12083 AC_SUBST(JVM_ONE_PATH_CHECK)
12085 AC_MSG_RESULT([no])
12089 dnl ===================================================================
12090 dnl Test for the presence of Ant and that it works
12091 dnl ===================================================================
12093 if test "$ENABLE_JAVA" != ""; then
12094 ANT_HOME=; export ANT_HOME
12095 WITH_ANT_HOME=; export WITH_ANT_HOME
12096 if test -z "$with_ant_home"; then
12097 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
12099 if test "$_os" = "WINNT"; then
12100 with_ant_home=`cygpath -u "$with_ant_home"`
12102 AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
12103 WITH_ANT_HOME=$with_ant_home
12104 ANT_HOME=$with_ant_home
12107 if test -z "$ANT"; then
12108 AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
12110 # resolve relative or absolute symlink
12111 while test -h "$ANT"; do
12113 a_basename=`basename "$ANT"`
12114 a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
12115 cd "`dirname "$ANT"`"
12116 cd "`dirname "$a_script"`"
12117 ANT="`pwd`"/"`basename "$a_script"`"
12121 AC_MSG_CHECKING([if $ANT works])
12122 cat > conftest.java << EOF
12123 public class conftest {
12124 int testmethod(int a, int b) {
12130 cat > conftest.xml << EOF
12131 <project name="conftest" default="conftest">
12132 <target name="conftest">
12133 <javac srcdir="." includes="conftest.java">
12139 oldJAVA_HOME=$JAVA_HOME
12140 if test "$JAVACISGCJ" = "yes"; then
12141 JAVA_HOME=; export JAVA_HOME
12142 ant_gcj="-Dbuild.compiler=gcj"
12144 AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
12145 if test $? = 0 -a -f ./conftest.class; then
12146 AC_MSG_RESULT([Ant works])
12147 if test -z "$WITH_ANT_HOME"; then
12148 ANT_HOME=`"$ANT" -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
12149 if test -z "$ANT_HOME"; then
12150 ANT_HOME=`echo "$ANT" | $SED -n "s/\/bin\/ant.*\$//p"`
12153 ANT_HOME="$WITH_ANT_HOME"
12156 echo "configure: Ant test failed" >&5
12157 cat conftest.java >&5
12158 cat conftest.xml >&5
12159 AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
12161 add_warning "Ant does not work - Some Java projects will not build!"
12163 JAVA_HOME=$oldJAVA_HOME
12164 rm -f conftest* core core.* *.core
12166 if test -z "$ANT_HOME"; then
12167 ANT_HOME="NO_ANT_HOME"
12169 PathFormat "$ANT_HOME"
12170 ANT_HOME="$formatted_path"
12177 dnl Checking for ant.jar
12178 if test "$ANT_HOME" != "NO_ANT_HOME"; then
12179 AC_MSG_CHECKING([Ant lib directory])
12180 if test -f $ANT_HOME/lib/ant.jar; then
12181 ANT_LIB="$ANT_HOME/lib"
12183 if test -f $ANT_HOME/ant.jar; then
12184 ANT_LIB="$ANT_HOME"
12186 if test -f /usr/share/java/ant.jar; then
12187 ANT_LIB=/usr/share/java
12189 if test -f /usr/share/ant-core/lib/ant.jar; then
12190 ANT_LIB=/usr/share/ant-core/lib
12192 if test -f $ANT_HOME/lib/ant/ant.jar; then
12193 ANT_LIB="$ANT_HOME/lib/ant"
12195 if test -f /usr/share/lib/ant/ant.jar; then
12196 ANT_LIB=/usr/share/lib/ant
12198 AC_MSG_ERROR([Ant libraries not found!])
12205 PathFormat "$ANT_LIB"
12206 ANT_LIB="$formatted_path"
12207 AC_MSG_RESULT([Ant lib directory found.])
12212 ant_minminor1=`echo $ant_minver | cut -d"." -f2`
12214 AC_MSG_CHECKING([whether Ant is >= $ant_minver])
12215 ant_version=`"$ANT" -version | $AWK '{ print $4; }'`
12216 ant_version_major=`echo $ant_version | cut -d. -f1`
12217 ant_version_minor=`echo $ant_version | cut -d. -f2`
12218 echo "configure: ant_version $ant_version " >&5
12219 echo "configure: ant_version_major $ant_version_major " >&5
12220 echo "configure: ant_version_minor $ant_version_minor " >&5
12221 if test "$ant_version_major" -ge "2"; then
12222 AC_MSG_RESULT([yes, $ant_version])
12223 elif test "$ant_version_major" = "1" -a "$ant_version_minor" -ge "$ant_minminor1"; then
12224 AC_MSG_RESULT([yes, $ant_version])
12226 AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
12229 if test "$ENABLE_MEDIAWIKI" = "TRUE"; then
12230 AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
12233 cat > conftest.java << EOF
12234 public class conftest {
12235 int testmethod(int a, int b) {
12241 cat > conftest.xml << EOF
12242 <project name="conftest" default="conftest">
12243 <target name="conftest" depends="copytest">
12244 <javac srcdir="." includes="conftest.java">
12247 <target name="copytest">
12248 <copy todir="confdir">
12249 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
12251 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
12257 if test "$JAVACISGCJ" = "yes"; then
12258 JAVA_HOME=; export JAVA_HOME
12259 ant_gcj="-Dbuild.compiler=gcj"
12261 AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
12262 if test $? = 0 -a -f ./conftest.class; then
12263 AC_MSG_RESULT([yes])
12266 echo "configure: Ant test failed" >&5
12267 cat conftest.java >&5
12268 cat conftest.xml >&5
12270 AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
12273 rm -f conftest* core core.* *.core
12277 if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
12278 AC_MSG_CHECKING([for JUnit 4])
12279 if test "$with_junit" = "yes"; then
12280 if test -e /usr/share/java/junit4.jar; then
12281 OOO_JUNIT_JAR=/usr/share/java/junit4.jar
12283 if test -e /usr/share/lib/java/junit.jar; then
12284 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
12286 OOO_JUNIT_JAR=/usr/share/java/junit.jar
12290 OOO_JUNIT_JAR=$with_junit
12292 if test "$_os" = "WINNT"; then
12293 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
12295 printf 'import org.junit.Before; import org.hamcrest.BaseDescription;' \
12297 if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
12298 AC_MSG_RESULT([$OOO_JUNIT_JAR])
12301 [cannot find JUnit 4 jar, or JUnit 4 jar does not provide Hamcrest; please
12302 install one in the default location (/usr/share/java), specify its pathname via
12303 --with-junit=..., or disable it via --without-junit])
12305 rm -f conftestj.class conftestj.java
12306 if test $OOO_JUNIT_JAR != ""; then
12307 BUILD_TYPE="$BUILD_TYPE QADEVOOO"
12310 AC_SUBST(OOO_JUNIT_JAR)
12316 # check for wget and curl
12321 if test "$enable_fetch_external" != "no"; then
12323 CURL=`which curl 2>/dev/null`
12325 for i in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget /opt/sfw/bin/wget /opt/local/bin/wget; do
12326 eval "$i --version" > /dev/null 2>&1
12328 if test $ret -eq 0; then
12334 if test -z "$WGET" -a -z "$CURL"; then
12335 AC_MSG_ERROR([neither wget nor curl found!])
12348 for i in md5 md5sum /usr/local/bin/md5sum gmd5sum /usr/sfw/bin/md5sum /opt/sfw/bin/gmd5sum /opt/local/bin/md5sum; do
12349 if test "$i" = "md5"; then
12350 eval "$i -x" > /dev/null 2>&1
12352 eval "$i --version" > /dev/null 2>&1
12355 if test $ret -eq 0; then
12361 if test "$MD5SUM" = "md5"; then
12362 if md5 -r < /dev/null > /dev/null 2>/dev/null; then
12363 MD5SUM="$MD5SUM -r"
12364 elif md5 -n < /dev/null > /dev/null 2>/dev/null; then
12365 MD5SUM="$MD5SUM -n"
12369 if test -z "$MD5SUM"; then
12370 AC_MSG_ERROR([no md5sum: found!])
12375 dnl ===================================================================
12376 dnl Dealing with l10n options
12377 dnl ===================================================================
12378 AC_MSG_CHECKING([which languages to be built])
12379 # get list of all languages
12380 # generate shell variable from completelangiso= from solenv/inc/langlist.mk
12381 # the sed command does the following:
12382 # + if a line ends with a backslash, append the next line to it
12383 # + adds " on the beginning of the value (after =)
12384 # + adds " at the end of the value
12385 # + removes en-US; we want to put it on the beginning
12386 # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
12387 [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)]
12388 ALL_LANGS="en-US $completelangiso"
12389 # check the configured localizations
12390 WITH_LANG="$with_lang"
12391 if test -z "$WITH_LANG" -o "$WITH_LANG" = "en-US"; then
12392 AC_MSG_RESULT([en-US])
12394 AC_MSG_RESULT([$WITH_LANG])
12395 GIT_NEEDED_SUBMODULES="translations $GIT_NEEDED_SUBMODULES"
12397 # check that the list is valid
12398 for lang in $WITH_LANG; do
12399 test "$lang" = "ALL" && continue
12400 # need to check for the exact string, so add space before and after the list of all languages
12401 for vl in $ALL_LANGS; do
12402 if test "$vl" = "$lang"; then
12406 if test "$vl" != "$lang"; then
12407 # if you're reading this - you prolly quoted your languages remove the quotes ...
12408 AC_MSG_ERROR([invalid language: '$lang' (vs '$v1'); supported languages are: $ALL_LANGS])
12411 if test -n "$WITH_LANG" -a "$WITH_LANG" != "ALL"; then
12412 echo $WITH_LANG | grep -q en-US
12413 test $? -ne 1 || WITH_LANG=`echo $WITH_LANG en-US`
12415 # list with substituted ALL
12416 WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
12417 test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
12418 test "$WITH_LANG" = "en-US" && WITH_LANG=
12419 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
12420 test "$WITH_LANG_LIST" = "en-US" || WITH_LANG_LIST=`echo $WITH_LANG_LIST qtz`
12421 ALL_LANGS=`echo $ALL_LANGS qtz`
12423 AC_SUBST(ALL_LANGS)
12424 AC_SUBST(WITH_LANG)
12425 AC_SUBST(WITH_LANG_LIST)
12426 AC_SUBST(GIT_NEEDED_SUBMODULES)
12428 WITH_POOR_HELP_LOCALIZATIONS=
12429 if test -d "$SRC_ROOT/translations/source"; then
12430 for l in `ls -1 $SRC_ROOT/translations/source`; do
12431 if test ! -d "$SRC_ROOT/translations/source/$l/helpcontent2"; then
12432 WITH_POOR_HELP_LOCALIZATIONS="$WITH_POOR_HELP_LOCALIZATIONS $l"
12436 AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
12438 if test -n "$with_locales"; then
12439 WITH_LOCALES="$with_locales"
12441 just_langs="`echo $WITH_LOCALES | sed -e 's/_[A-Z]*//g'`"
12442 # Only languages and scripts for which we actually have ifdefs need to be handled. Also see
12443 # config_host/config_locales.h.in
12444 for locale in $WITH_LOCALES; do
12447 AC_DEFINE_UNQUOTED(WITH_LOCALE_$lang, 1)
12451 AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Deva)
12454 AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Cyrl)
12459 AC_DEFINE(WITH_LOCALE_ALL)
12461 AC_SUBST(WITH_LOCALES)
12463 dnl git submodule update --reference
12464 dnl ===================================================================
12465 if test -n "${GIT_REFERENCE_SRC}"; then
12466 for repo in ${GIT_NEEDED_SUBMODULES}; do
12467 if ! test -d "${GIT_REFERENCE_SRC}"/${repo}; then
12468 AC_MSG_ERROR([referenced git: required repository does not exist: ${GIT_REFERENCE_SRC}/${repo}])
12472 AC_SUBST(GIT_REFERENCE_SRC)
12474 dnl git submodules linked dirs
12475 dnl ===================================================================
12476 if test -n "${GIT_LINK_SRC}"; then
12477 for repo in ${GIT_NEEDED_SUBMODULES}; do
12478 if ! test -d "${GIT_LINK_SRC}"/${repo}; then
12479 AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
12483 AC_SUBST(GIT_LINK_SRC)
12486 dnl ===================================================================
12487 AC_MSG_CHECKING([for alternative branding images directory])
12488 # initialize mapped arrays
12489 BRAND_INTRO_IMAGES="flat_logo.svg intro.png"
12490 brand_files="$BRAND_INTRO_IMAGES about.svg"
12492 if test -z "$with_branding" -o "$with_branding" = "no"; then
12493 AC_MSG_RESULT([none])
12494 DEFAULT_BRAND_IMAGES="$brand_files"
12496 if ! test -d $with_branding ; then
12497 AC_MSG_ERROR([No directory $with_branding, falling back to default branding])
12499 AC_MSG_RESULT([$with_branding])
12500 CUSTOM_BRAND_DIR="$with_branding"
12501 for lfile in $brand_files
12503 if ! test -f $with_branding/$lfile ; then
12504 AC_MSG_WARN([Branded file $lfile does not exist, using the default one])
12505 DEFAULT_BRAND_IMAGES="$DEFAULT_BRAND_IMAGES $lfile"
12507 CUSTOM_BRAND_IMAGES="$CUSTOM_BRAND_IMAGES $lfile"
12510 check_for_progress="yes"
12513 AC_SUBST([BRAND_INTRO_IMAGES])
12514 AC_SUBST([CUSTOM_BRAND_DIR])
12515 AC_SUBST([CUSTOM_BRAND_IMAGES])
12516 AC_SUBST([DEFAULT_BRAND_IMAGES])
12519 AC_MSG_CHECKING([for 'intro' progress settings])
12523 PROGRESSFRAMECOLOR=
12525 PROGRESSTEXTBASELINE=
12527 if test "$check_for_progress" = "yes" -a -f "$with_branding/progress.conf" ; then
12528 source "$with_branding/progress.conf"
12529 AC_MSG_RESULT([settings found in $with_branding/progress.conf])
12531 AC_MSG_RESULT([none])
12534 AC_SUBST(PROGRESSBARCOLOR)
12535 AC_SUBST(PROGRESSSIZE)
12536 AC_SUBST(PROGRESSPOSITION)
12537 AC_SUBST(PROGRESSFRAMECOLOR)
12538 AC_SUBST(PROGRESSTEXTCOLOR)
12539 AC_SUBST(PROGRESSTEXTBASELINE)
12542 AC_MSG_CHECKING([for extra build ID])
12543 if test -n "$with_extra_buildid" -a "$with_extra_buildid" != "yes" ; then
12544 EXTRA_BUILDID="$with_extra_buildid"
12546 # in tinderboxes, it is easier to set EXTRA_BUILDID via the environment variable instead of configure switch
12547 if test -n "$EXTRA_BUILDID" ; then
12548 AC_MSG_RESULT([$EXTRA_BUILDID])
12550 AC_MSG_RESULT([not set])
12552 AC_DEFINE_UNQUOTED([EXTRA_BUILDID], ["$EXTRA_BUILDID"])
12555 AC_MSG_CHECKING([for vendor])
12556 if test -z "$with_vendor" -o "$with_vendor" = "no"; then
12557 OOO_VENDOR="$USERNAME"
12559 if test -z "$OOO_VENDOR"; then
12563 if test -z "$OOO_VENDOR"; then
12564 OOO_VENDOR="`id -u -n`"
12567 AC_MSG_RESULT([not set, using $OOO_VENDOR])
12569 OOO_VENDOR="$with_vendor"
12570 AC_MSG_RESULT([$OOO_VENDOR])
12572 AC_SUBST(OOO_VENDOR)
12574 AC_MSG_CHECKING([whether to install the compat oo* wrappers])
12575 if test "$with_compat_oowrappers" = "yes"; then
12576 WITH_COMPAT_OOWRAPPERS=TRUE
12579 WITH_COMPAT_OOWRAPPERS=
12582 AC_SUBST(WITH_COMPAT_OOWRAPPERS)
12584 INSTALLDIRNAME=`echo AC_PACKAGE_NAME | $AWK '{print tolower($0)}'`
12585 AC_MSG_CHECKING([for install dirname])
12586 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes"; then
12587 INSTALLDIRNAME="$with_install_dirname"
12589 AC_MSG_RESULT([$INSTALLDIRNAME])
12590 AC_SUBST(INSTALLDIRNAME)
12592 AC_MSG_CHECKING([for prefix])
12593 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12594 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
12595 PREFIXDIR="$prefix"
12596 AC_MSG_RESULT([$PREFIXDIR])
12597 AC_SUBST(PREFIXDIR)
12599 LIBDIR=[$(eval echo $(eval echo $libdir))]
12602 DATADIR=[$(eval echo $(eval echo $datadir))]
12605 MANDIR=[$(eval echo $(eval echo $mandir))]
12608 DOCDIR=[$(eval echo $(eval echo $docdir))]
12611 INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
12612 AC_SUBST(INSTALLDIR)
12614 TESTINSTALLDIR="${BUILDDIR}/test-install"
12615 AC_SUBST(TESTINSTALLDIR)
12618 # ===================================================================
12619 # OAuth2 id and secrets
12620 # ===================================================================
12622 AC_MSG_CHECKING([for Google Drive client id and secret])
12623 GDRIVE_CLIENT_ID="\"$with_gdrive_client_id\""
12624 GDRIVE_CLIENT_SECRET="\"$with_gdrive_client_secret\""
12625 if test "$with_gdrive_client_id" = "no" -o -z "$with_gdrive_client_id"; then
12626 GDRIVE_CLIENT_ID="\"\""
12629 if test "$with_gdrive_client_secret" = "no" -o -z "$with_gdrive_client_secret"; then
12630 GDRIVE_CLIENT_SECRET="\"\""
12633 if test -z "$GDRIVE_CLIENT_ID" -o -z "$GDRIVE_CLIENT_SECRET"; then
12634 AC_MSG_RESULT([not set])
12636 AC_MSG_RESULT([set])
12639 AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_ID, $GDRIVE_CLIENT_ID)
12640 AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_SECRET, $GDRIVE_CLIENT_SECRET)
12642 AC_MSG_CHECKING([for Alfresco Cloud client id and secret])
12643 ALFRESCO_CLOUD_CLIENT_ID="\"$with_alfresco_cloud_client_id\""
12644 ALFRESCO_CLOUD_CLIENT_SECRET="\"$with_alfresco_cloud_client_secret\""
12645 if test "$with_alfresco_cloud_client_id" = "no" -o -z "$with_alfresco_cloud_client_id"; then
12646 ALFRESCO_CLOUD_CLIENT_ID="\"\""
12649 if test "$with_alfresco_cloud_client_secret" = "no" -o -z "$with_alfresco_cloud_client_secret"; then
12650 ALFRESCO_CLOUD_CLIENT_SECRET="\"\""
12653 if test -z "$ALFRESCO_CLOUD_CLIENT_ID" -o -z "$ALFRESCO_CLOUD_CLIENT_SECRET"; then
12654 AC_MSG_RESULT([not set])
12656 AC_MSG_RESULT([set])
12658 AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_ID, $ALFRESCO_CLOUD_CLIENT_ID)
12659 AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_SECRET, $ALFRESCO_CLOUD_CLIENT_SECRET)
12661 # ===================================================================
12662 # De- or increase default verbosity of build process
12663 # ===================================================================
12664 AC_MSG_CHECKING([build verbosity])
12665 if test -n "$enable_verbose"; then
12666 if test "$enable_verbose" = "yes"; then
12668 AC_MSG_RESULT([high])
12670 if test "$enable_verbose" = "no"; then
12672 AC_MSG_RESULT([low])
12675 AC_MSG_RESULT([not set])
12679 dnl ===================================================================
12680 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
12681 dnl --enable-dependency-tracking configure option
12682 dnl ===================================================================
12683 AC_MSG_CHECKING([whether to enable dependency tracking])
12684 if test "$enable_dependency_tracking" = "no"; then
12686 AC_MSG_RESULT([no])
12688 AC_MSG_RESULT([yes])
12692 dnl ===================================================================
12693 dnl Number of CPUs to use during the build
12694 dnl ===================================================================
12695 AC_MSG_CHECKING([for number of processors to use])
12696 # plain --with-parallelism is just the default
12697 if test -n "$with_parallelism" -a "$with_parallelism" != "yes"; then
12698 if test "$with_parallelism" = "no"; then
12701 PARALLELISM=$with_parallelism
12704 if test "$enable_icecream" = "yes"; then
12709 Darwin|FreeBSD|NetBSD|OpenBSD)
12710 PARALLELISM=`sysctl -n hw.ncpu`
12714 PARALLELISM=`getconf _NPROCESSORS_ONLN`
12716 # what else than above does profit here *and* has /proc?
12718 PARALLELISM=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
12722 # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
12723 # unexpected format, 'wc -l' will have returned 0 (and we won't use -j at all).
12727 if test "$no_parallelism_make" = "YES" && test $PARALLELISM -gt 1; then
12728 if test -z "$with_parallelism"; then
12729 AC_MSG_WARN([gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this.])
12730 add_warning "gmake 3.81 crashes with parallelism > 1, reducing it to 1. upgrade to 3.82 to avoid this."
12733 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."
12737 if test $PARALLELISM -eq 0; then
12738 AC_MSG_RESULT([explicit make -j option needed])
12740 AC_MSG_RESULT([$PARALLELISM])
12742 AC_SUBST(PARALLELISM)
12745 # Set up ILIB for MSVC build
12747 if test "$build_os" = "cygwin"; then
12749 if test -n "$JAVA_HOME" -a "$JAVA_HOME" != "NO_JAVA_HOME"; then
12750 ILIB="$ILIB;$JAVA_HOME/lib"
12752 if test "$BITNESS_OVERRIDE" = 64; then
12753 ILIB="$ILIB;$COMPATH/lib/amd64"
12754 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/x64"
12755 if test "$WINDOWS_SDK_VERSION" = "80"; then
12756 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x64"
12759 ILIB="$ILIB;$COMPATH/lib"
12760 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib"
12761 if test "$WINDOWS_SDK_VERSION" = "80"; then
12762 ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x86"
12765 ILIB="$ILIB;$DOTNET_FRAMEWORK_HOME/lib"
12767 if test "$ENABLE_DIRECTX" = "TRUE"; then
12768 ILIB="$ILIB;$DIRECTXSDK_LIB"
12774 # ===================================================================
12775 # Creating bigger shared library to link against
12776 # ===================================================================
12777 AC_MSG_CHECKING([whether to create huge library])
12780 if test $_os = iOS -o $_os = Android; then
12781 # Never any point in mergelibs for these as we build just static
12782 # libraries anyway...
12783 enable_mergelibs=no
12786 if test -n "$enable_mergelibs" -a "$enable_mergelibs" != "no"; then
12787 if test $_os != Linux -a $_os != WINNT; then
12788 add_warning "--enable-mergelibs is not tested for this platform"
12790 if test "$enable_mergelibs" = "all"; then
12793 AC_DEFINE(STATIC_LINKING)
12797 AC_MSG_RESULT([yes])
12799 AC_MSG_RESULT([no])
12801 AC_SUBST([MERGELIBS])
12802 AC_SUBST([URELIBS])
12804 # ===================================================================
12805 # Create hardlinks on deliver instead of copying for smaller size and speed up
12806 # ===================================================================
12807 AC_MSG_CHECKING([whether to create hardlinks for delivering files])
12809 if test "$enable_hardlink_deliver" = "yes"; then
12810 HARDLINKDELIVER="TRUE"
12811 AC_MSG_RESULT([yes])
12813 AC_MSG_RESULT([no])
12815 AC_SUBST(HARDLINKDELIVER)
12817 dnl ===================================================================
12818 dnl icerun is a wrapper that stops us spawning tens of processes
12819 dnl locally - for tools that can't be executed on the compile cluster
12820 dnl this avoids a dozen javac's ganging up on your laptop to kill it.
12821 dnl ===================================================================
12822 AC_MSG_CHECKING([whether to use icerun wrapper])
12824 if test "$enable_icecream" = "yes" && which icerun >/dev/null 2>&1 ; then
12825 ICECREAM_RUN=icerun
12826 AC_MSG_RESULT([yes])
12828 AC_MSG_RESULT([no])
12830 AC_SUBST(ICECREAM_RUN)
12832 dnl ===================================================================
12834 AC_MSG_CHECKING([MPL subset])
12837 if test "$enable_mpl_subset" = "yes"; then
12839 if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
12841 elif test "$ENABLE_REPORTBUILDER" = "TRUE"; then
12844 if test "$warn_report" = "true"; then
12845 AC_MSG_ERROR([need to --disable-report-builder - extended database report builder.])
12847 if test "x$enable_postgresql_sdbc" != "xno"; then
12848 AC_MSG_ERROR([need to --disable-postgresql-sdbc - the postgress database backend.])
12850 if test "$enable_lotuswordpro" = "yes"; then
12851 AC_MSG_ERROR([need to --disable-lotuswordpro - a Lotus Word Pro file format import filter.])
12853 if test "$WITH_WEBDAV" = "neon"; then
12854 AC_MSG_ERROR([need --with-webdav=serf or --without-webdav - webdav support.])
12856 if test "x$enable_ext_mariadb_connector" = "xyes"; then
12857 AC_MSG_ERROR([need to --disable-ext-mariadb-connector - mariadb/mysql support.])
12859 if test -n "$ENABLE_PDFIMPORT"; then
12860 if test "x$SYSTEM_POPPLER" = "x"; then
12861 AC_MSG_ERROR([need to disable PDF import via poppler or use system library])
12864 # cf. m4/libo_check_extension.m4
12865 if test "x$WITH_EXTRA_EXTENSIONS" != "x"; then
12866 AC_MSG_ERROR([need to disable extra extensions '$WITH_EXTRA_EXTENSIONS'])
12868 for theme in $WITH_THEMES; do
12870 crystal|default|hicontrast|human|oxygen|sifr)
12871 AC_MSG_ERROR([need to disable icon themes from '$WITH_THEMES': $theme present, use --with-theme=tango]) ;;
12875 if test "$enable_opengl" != "no" -o "x$ENABLE_OPENGL" = "xTRUE"; then
12876 AC_MSG_ERROR([need to --disable-opengl - GL transitions support.])
12878 if test "$enable_lpsolve" != "no" -o "x$ENABLE_LPSOLVE" = "xTRUE"; then
12879 AC_MSG_ERROR([need to --disable-lpsolve - calc linear programming solver.])
12883 AC_DEFINE(MPL_HAVE_SUBSET)
12884 AC_MSG_RESULT([only])
12886 AC_MSG_RESULT([no restrictions])
12888 AC_SUBST(MPL_SUBSET)
12891 dnl ===================================================================
12892 dnl Setting up the environment.
12893 dnl ===================================================================
12894 echo "setting up the build environment variables..."
12898 if test "$build_os" = "cygwin"; then
12899 if test "$DISABLE_ACTIVEX" = "TRUE"; then
12900 ATL_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE
12901 ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl"
12903 ATL_LIB="$COMPATH/atlmfc/lib"
12904 ATL_INCLUDE="$COMPATH/atlmfc/include"
12906 if test "$BITNESS_OVERRIDE" = 64; then
12907 ATL_LIB="$ATL_LIB/amd64"
12909 PathFormat "/usr/bin/grep.exe"
12910 WIN_GREP="$formatted_path"
12911 PathFormat "/usr/bin/find.exe"
12912 WIN_FIND="$formatted_path"
12913 PathFormat "/usr/bin/ls.exe"
12914 WIN_LS="$formatted_path"
12915 PathFormat "/usr/bin/touch.exe"
12916 WIN_TOUCH="$formatted_path"
12919 AC_SUBST(ATL_INCLUDE)
12924 AC_SUBST(WIN_TOUCH)
12926 AC_SUBST(BUILD_TYPE)
12931 PERL="$formatted_path"
12934 if test -n "$TMPDIR"; then
12935 TEMP_DIRECTORY="$TMPDIR"
12937 TEMP_DIRECTORY="/tmp"
12939 if test "$build_os" = "cygwin"; then
12940 TEMP_DIRECTORY=`cygpath -m "$TEMP_DIRECTORY"`
12942 AC_SUBST(TEMP_DIRECTORY)
12944 # setup the PATH for the environment
12945 if test -n "$LO_PATH_FOR_BUILD"; then
12946 LO_PATH="$LO_PATH_FOR_BUILD"
12952 aix*|dragonfly*|freebsd*|linux-gnu*|*netbsd*|openbsd*)
12953 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12954 pathmunge "$JAVA_HOME/bin" "after"
12959 pathmunge "$DOTNET_FRAMEWORK_HOME/bin" "before"
12960 pathmunge "$ASM_HOME" "before"
12961 pathmunge "$WINDOWS_SDK_HOME/bin" "before"
12962 pathmunge "$CSC_PATH" "before"
12963 pathmunge "$MIDL_PATH" "before"
12964 pathmunge "$AL_PATH" "before"
12965 pathmunge "$MSPDB_PATH" "before"
12966 if test "$BITNESS_OVERRIDE" = 64; then
12967 pathmunge "$COMPATH/bin/amd64" "before"
12968 pathmunge "$WINDOWS_SDK_HOME/bin/x64" "before"
12970 pathmunge "$COMPATH/bin" "before"
12971 pathmunge "$WINDOWS_SDK_HOME/bin/x86" "before"
12973 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12974 if test -d "$JAVA_HOME/jre/bin/client"; then
12975 pathmunge "$JAVA_HOME/jre/bin/client" "before"
12977 if test -d "$JAVA_HOME/jre/bin/hotspot"; then
12978 pathmunge "$JAVA_HOME/jre/bin/hotspot" "before"
12980 pathmunge "$JAVA_HOME/bin" "before"
12985 pathmunge "/usr/css/bin" "before"
12986 if test "$ENABLE_JAVA" != "" -a "$JDK"!="gcj"; then
12987 pathmunge "$JAVA_HOME/bin" "after"
12992 pathmunge "$SRC_ROOT/solenv/bin" "before"
12993 pathmunge "." "before"
12998 # Generate a configuration md5 we can use for deps
12999 if test -f config_host.mk; then
13000 config_md5=`$MD5SUM config_host.mk | sed "s/ .*//"`
13003 AC_CONFIG_FILES([config_host.mk
13006 instsetoo_native/util/openoffice.lst
13007 sysui/desktop/macosx/Info.plist
13010 AC_CONFIG_HEADERS([config_host/config_buildid.h])
13011 AC_CONFIG_HEADERS([config_host/config_clang.h])
13012 AC_CONFIG_HEADERS([config_host/config_eot.h])
13013 AC_CONFIG_HEADERS([config_host/config_features.h])
13014 AC_CONFIG_HEADERS([config_host/config_folders.h])
13015 AC_CONFIG_HEADERS([config_host/config_gcc.h])
13016 AC_CONFIG_HEADERS([config_host/config_global.h])
13017 AC_CONFIG_HEADERS([config_host/config_graphite.h])
13018 AC_CONFIG_HEADERS([config_host/config_lgpl.h])
13019 AC_CONFIG_HEADERS([config_host/config_locales.h])
13020 AC_CONFIG_HEADERS([config_host/config_mpl.h])
13021 AC_CONFIG_HEADERS([config_host/config_orcus.h])
13022 AC_CONFIG_HEADERS([config_host/config_kde4.h])
13023 AC_CONFIG_HEADERS([config_host/config_mingw.h])
13024 AC_CONFIG_HEADERS([config_host/config_oox.h])
13025 AC_CONFIG_HEADERS([config_host/config_options.h])
13026 AC_CONFIG_HEADERS([config_host/config_test.h])
13027 AC_CONFIG_HEADERS([config_host/config_telepathy.h])
13028 AC_CONFIG_HEADERS([config_host/config_typesizes.h])
13029 AC_CONFIG_HEADERS([config_host/config_vclplug.h])
13030 AC_CONFIG_HEADERS([config_host/config_version.h])
13031 AC_CONFIG_HEADERS([config_host/config_oauth2.h])
13034 if test "$CROSS_COMPILING" = TRUE; then
13035 (echo; echo export BUILD_TYPE_FOR_HOST=$BUILD_TYPE) >>config_build.mk
13038 # touch the config timestamp file
13039 if test ! -f config_host.mk.stamp; then
13040 echo > config_host.mk.stamp
13041 elif test "$config_md5" = `$MD5SUM config_host.mk | sed "s/ .*//"`; then
13042 echo "Configuration unchanged - avoiding scp2 stamp update"
13044 echo > config_host.mk.stamp
13048 if test "$STALE_MAKE" = "TRUE" -a "$build_os" = "cygwin"; then
13050 ****************************************************************************
13052 Your make version is known to be horribly slow, and hard to debug
13053 problems with. To get a reasonably functional make please do:
13055 to install a pre-compiled binary make for cygwin
13057 mkdir -p /opt/lo/bin
13059 wget http://dev-www.libreoffice.org/bin/cygwin/make
13062 to install from source:
13063 place yourself in a working directory of you choice.
13065 git clone git://anongit.freedesktop.org/libreoffice/contrib/dev-tools
13066 cd dev-tools/make-3.82-gbuild
13067 ./configure --prefix=/opt/lo
13071 Then re-run autogen.sh
13073 Note: autogen.sh will try to use /opt/lo/bin/make if the environment variable GNUMAKE is not already defined.
13074 Alternatively, you can install the 'new' make where ever you want and make sure that `which make` finds it.
13080 ****************************************************************************
13090 if test $_os != WINNT -a "$CROSS_COMPILING" != TRUE; then
13092 After the build has finished, you can immediately run it using:
13093 instdir/program/soffice
13095 If you want to run the smoketest, issue:
13101 if test -f warn; then
13106 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: