dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 100 -*- dnl configure.ac serves as input for the GNU autoconf package dnl in order to create a configure script. # The version number in the second argument to AC_INIT should be four numbers separated by # periods. Some parts of the code requires the first one to be less than 128 and the others to be less # than 256. The four numbers can optionally be followed by a period and a free-form string containing # no spaces or periods, like "frobozz-mumble-42" or "alpha0". If the free-form string ends with one or # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. AC_INIT([LibreOffice],[24.2.2.2],[],[],[http://documentfoundation.org/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard dnl so check for the version of autoconf that is actually used to create the configure script AC_PREREQ([2.59]) m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.68]), -1, [AC_MSG_ERROR([at least autoconf version 2.68 is needed (you can use AUTOCONF environment variable to point to a suitable one)])]) if test -n "$BUILD_TYPE"; then AC_MSG_ERROR([You have sourced config_host.mk in this shell. This may lead to trouble, please run in a fresh (login) shell.]) fi save_CC=$CC save_CXX=$CXX first_arg_basename() { for i in $1; do basename "$i" break done } CC_BASE=`first_arg_basename "$CC"` CXX_BASE=`first_arg_basename "$CXX"` BUILD_TYPE="LibO" SCPDEFS="" GIT_NEEDED_SUBMODULES="" LO_PATH= # used by path_munge to construct a PATH variable FilterLibs() { # Return value: $filteredlibs filteredlibs= if test "$COM" = "MSC"; then for f in $1; do if test "x$f" != "x${f#-L}"; then filteredlibs="$filteredlibs -LIBPATH:${f:2}" elif test "x$f" != "x${f#-l}"; then filteredlibs="$filteredlibs ${f:2}.lib" else filteredlibs="$filteredlibs $f" fi done else for f in $1; do case "$f" in # let's start with Fedora's paths for now -L/lib|-L/lib/|-L/lib64|-L/lib64/|-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/) # ignore it: on UNIXoids it is searched by default anyway # but if it's given explicitly then it may override other paths # (on macOS it would be an error to use it instead of SDK) ;; *) filteredlibs="$filteredlibs $f" ;; esac done fi } PathFormat() { # Args: $1: A pathname. On Cygwin and WSL, in either the Unix or the Windows format. Note that this # function is called also on Unix. # # Return value: $formatted_path and $formatted_path_unix. # # $formatted_path is the argument in Windows format, but using forward slashes instead of # backslashes, using 8.3 pathname components if necessary (if it otherwise would contains spaces # or shell metacharacters). # # $formatted_path_unix is the argument in a form usable in Cygwin or WSL, using 8.3 components if # necessary. On Cygwin, it is the same as $formatted_path, but on WSL it is $formatted_path as a # Unix pathname. # # Errors out if 8.3 names are needed but aren't present for some of the path components. # Examples: # # /home/tml/lo/master-optimised => C:/cygwin64/home/tml/lo/master-optimised # # C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe => C:/PROGRA~2/MICROS~3/INSTAL~1/vswhere.exe # # C:\Program Files (x86)\Microsoft Visual Studio\2019\Community => C:/PROGRA~2/MICROS~3/2019/COMMUN~1 # # C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/ucrt => C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/ucrt # # /cygdrive/c/PROGRA~2/WI3CF2~1/10 => C:/PROGRA~2/WI3CF2~1/10 # # C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\ => C:/PROGRA~2/WI3CF2~1/NETFXSDK/4.8/ # # /usr/bin/find.exe => C:/cygwin64/bin/find.exe if test -n "$UNITTEST_WSL_PATHFORMAT"; then printf "PathFormat $1 ==> " fi formatted_path="$1" if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then if test "$build_os" = "wsl"; then formatted_path=$(echo "$formatted_path" | tr -d '\r') fi pf_conv_to_dos= # spaces,parentheses,brackets,braces are problematic in pathname # so are backslashes case "$formatted_path" in *\ * | *\)* | *\(* | *\{* | *\}* | *\[* | *\]* | *\\* ) pf_conv_to_dos="yes" ;; esac if test "$pf_conv_to_dos" = "yes"; then if test "$build_os" = "wsl"; then case "$formatted_path" in /*) formatted_path=$(wslpath -w "$formatted_path") ;; esac formatted_path=$($WSL_LO_HELPER --8.3 "$formatted_path") elif test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then formatted_path=`cygpath -sm "$formatted_path"` else formatted_path=`cygpath -d "$formatted_path"` fi if test $? -ne 0; then AC_MSG_ERROR([path conversion failed for "$1".]) fi fi fp_count_colon=`echo "$formatted_path" | $GREP -c "[:]"` fp_count_slash=`echo "$formatted_path" | $GREP -c "[/]"` if test "$fp_count_slash$fp_count_colon" != "00"; then if test "$fp_count_colon" = "0"; then new_formatted_path=`realpath "$formatted_path"` if test $? -ne 0; then AC_MSG_WARN([realpath failed for "$formatted_path", not necessarily a problem.]) else formatted_path="$new_formatted_path" fi fi if test "$build_os" = "wsl"; then if test "$fp_count_colon" != "0"; then formatted_path=$(wslpath "$formatted_path") local final_slash= case "$formatted_path" in */) final_slash=/ ;; esac formatted_path=$(wslpath -m $formatted_path) case "$formatted_path" in */) ;; *) formatted_path="$formatted_path"$final_slash ;; esac else formatted_path=$(wslpath -m "$formatted_path") fi else formatted_path=`cygpath -m "$formatted_path"` fi if test $? -ne 0; then AC_MSG_ERROR([path conversion failed for "$1".]) fi fi fp_count_space=`echo "$formatted_path" | $GREP -c "[ ]"` if test "$fp_count_space" != "0"; then AC_MSG_ERROR([converted path "$formatted_path" still contains spaces. Short filenames (8.3 filenames) support was disabled on this system?]) fi fi if test "$build_os" = "wsl"; then # WSL can't run Windows binaries from Windows pathnames so we need a separate return value in Unix format formatted_path_unix=$(wslpath "$formatted_path") else # But Cygwin can formatted_path_unix="$formatted_path" fi } AbsolutePath() { # There appears to be no simple and portable method to get an absolute and # canonical path, so we try creating the directory if does not exist and # utilizing the shell and pwd. # Args: $1: A possibly relative pathname # Return value: $absolute_path # Convert to unix path, mkdir would treat c:/path as a relative path. PathFormat "$1" local rel="$formatted_path_unix" absolute_path="" test ! -e "$rel" && mkdir -p "$rel" if test -d "$rel" ; then cd "$rel" || AC_MSG_ERROR([absolute path resolution failed for "$rel".]) absolute_path="$(pwd)" cd - > /dev/null else AC_MSG_ERROR([Failed to resolve absolute path. "$rel" does not exist or is not a directory.]) fi } WARNINGS_FILE=config.warn WARNINGS_FILE_FOR_BUILD=config.Build.warn rm -f "$WARNINGS_FILE" "$WARNINGS_FILE_FOR_BUILD" have_WARNINGS="no" add_warning() { if test "$have_WARNINGS" = "no"; then echo "*************************************" > "$WARNINGS_FILE" have_WARNINGS="yes" if which tput >/dev/null && test "`tput colors 2>/dev/null || echo 0`" -ge 8; then dnl as actual byte (U+1b), [ escaped using quadrigraph @<:@ COLORWARN='*@<:@1;33;40m WARNING @<:@0m:' else COLORWARN="* WARNING :" fi fi echo "$COLORWARN $@" >> "$WARNINGS_FILE" } dnl Some Mac User have the bad habit of letting a lot of crap dnl accumulate in their PATH and even adding stuff in /usr/local/bin dnl that confuse the build. dnl For the ones that use LODE, let's be nice and protect them dnl from themselves mac_sanitize_path() { mac_path="$LODE_HOME/opt/bin:/usr/bin:/bin:/usr/sbin:/sbin" dnl a common but nevertheless necessary thing that may be in a fancy dnl path location is git, so make sure we have it mac_git_path=`which git 2>/dev/null` if test -n "$mac_git_path" -a -x "$mac_git_path" -a "$mac_git_path" != "/usr/bin/git" ; then mac_path="$mac_path:`dirname $mac_git_path`" fi dnl a not so common but nevertheless quite helpful thing that may be in a fancy dnl path location is gpg, so make sure we find it mac_gpg_path=`which gpg 2>/dev/null` if test -n "$mac_gpg_path" -a -x "$mac_gpg_path" -a "$mac_gpg_path" != "/usr/bin/gpg" ; then mac_path="$mac_path:`dirname $mac_gpg_path`" fi PATH="$mac_path" unset mac_path unset mac_git_path unset mac_gpg_path } dnl semantically test a three digits version dnl $1 - $3 = minimal version dnl $4 - $6 = current version check_semantic_version_three() { test "$4" -gt "$1" \ -o \( "$4" -eq "$1" -a "$5" -gt "$2" \) \ -o \( "$4" -eq "$1" -a "$5" -eq "$2" -a "$6" -ge "$3" \) return $? } dnl calls check_semantic_version_three with digits in named variables $1_MAJOR, $1_MINOR, $1_TINY dnl $1 = current version prefix, e.g. EMSCRIPTEN => EMSCRIPTEN_ dnl $2 = postfix to $1, e.g. MIN => EMSCRIPTEN_MIN_ check_semantic_version_three_prefixed() { eval local MIN_MAJOR="\$${1}_${2}_MAJOR" eval local MIN_MINOR="\$${1}_${2}_MINOR" eval local MIN_TINY="\$${1}_${2}_TINY" eval local CUR_MAJOR="\$${1}_MAJOR" eval local CUR_MINOR="\$${1}_MINOR" eval local CUR_TINY="\$${1}_TINY" check_semantic_version_three $MIN_MAJOR $MIN_MINOR $MIN_TINY $CUR_MAJOR $CUR_MINOR $CUR_TINY return $? } echo "********************************************************************" echo "*" echo "* Running ${PACKAGE_NAME} build configuration." echo "*" echo "********************************************************************" echo "" dnl =================================================================== dnl checks build and host OSes dnl do this before argument processing to allow for platform dependent defaults dnl =================================================================== # Check for WSL (version 2, at least). But if --host is explicitly specified (to really do build for # Linux on WSL) trust that. if test -z "$host" -a -z "$build" -a "`wslsys -v 2>/dev/null`" != ""; then ac_cv_host="x86_64-pc-wsl" ac_cv_host_cpu="x86_64" ac_cv_host_os="wsl" ac_cv_build="$ac_cv_host" ac_cv_build_cpu="$ac_cv_host_cpu" ac_cv_build_os="$ac_cv_host_os" # Emulation of Cygwin's cygpath command for WSL. cygpath() { if test -n "$UNITTEST_WSL_CYGPATH"; then echo -n cygpath "$@" "==> " fi # Cygwin's real cygpath has a plethora of options but we use only a few here. local args="$@" local opt local opt_d opt_m opt_u opt_w opt_l opt_s opt_p OPTIND=1 while getopts dmuwlsp opt; do case "$opt" in \?) AC_MSG_ERROR([Unimplemented cygpath emulation option in invocation: cygpath $args]) ;; ?) eval opt_$opt=yes ;; esac done shift $((OPTIND-1)) if test $# -ne 1; then AC_MSG_ERROR([Invalid cygpath emulation invocation: Pathname missing]); fi local input="$1" local result if test -n "$opt_d" -o -n "$opt_m" -o -n "$opt_w"; then # Print Windows path, possibly in 8.3 form (-d) or with forward slashes (-m) if test -n "$opt_u"; then AC_MSG_ERROR([Invalid cygpath invocation: Both Windows and Unix path output requested]) fi case "$input" in /mnt/*) # A Windows file in WSL format input=$(wslpath -w "$input") ;; [[a-zA-Z]]:\\* | \\* | [[a-zA-Z]]:/* | /*) # Already in Windows format ;; /*) input=$(wslpath -w "$input") ;; *) AC_MSG_ERROR([Invalid cygpath invocation: Path '$input' is not absolute]) ;; esac if test -n "$opt_d" -o -n "$opt_s"; then input=$($WSL_LO_HELPER --8.3 "$input") fi if test -n "$opt_m"; then input="${input//\\//}" fi echo "$input" else # Print Unix path case "$input" in [[a-zA-Z]]:\\* | \\* | [[a-zA-Z]]:/* | /*) wslpath -u "$input" ;; /) echo "$input" ;; *) AC_MSG_ERROR([Invalid cygpath invocation: Path '$input' is not absolute]) ;; esac fi } if test -n "$UNITTEST_WSL_CYGPATH"; then BUILDDIR=. # Nothing special with these file names, just arbitrary ones picked to test with cygpath -d /usr/lib64/ld-linux-x86-64.so.2 cygpath -w /usr/lib64/ld-linux-x86-64.so.2 cygpath -m /usr/lib64/ld-linux-x86-64.so.2 cygpath -m -s /usr/lib64/ld-linux-x86-64.so.2 # At least on my machine for instance this file does have an 8.3 name cygpath -d /mnt/c/windows/WindowsUpdate.log # But for instance this one doesn't cygpath -w /mnt/c/windows/system32/AboutSettingsHandlers.dll cygpath -ws /mnt/c/windows/WindowsUpdate.log cygpath -m /mnt/c/windows/system32/AboutSettingsHandlers.dll cygpath -ms /mnt/c/windows/WindowsUpdate.log cygpath -u 'c:\windows\system32\AboutSettingsHandlers.dll' cygpath -u 'c:/windows/system32/AboutSettingsHandlers.dll' exit 0 fi if test -z "$WSL_LO_HELPER"; then if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/wsl-lo-helper" ; then WSL_LO_HELPER="$LODE_HOME/opt/bin/wsl-lo-helper" elif test -x "/opt/lo/bin/wsl-lo-helper"; then WSL_LO_HELPER="/opt/lo/bin/wsl-lo-helper" fi fi if test -z "$WSL_LO_HELPER"; then AC_MSG_ERROR([wsl-lo-helper not found. See solenv/wsl/README.]) fi fi AC_CANONICAL_HOST AC_CANONICAL_BUILD if test -n "$UNITTEST_WSL_PATHFORMAT"; then BUILDDIR=. GREP=grep # Use of PathFormat must be after AC_CANONICAL_BUILD above PathFormat / printf "$formatted_path , $formatted_path_unix\n" PathFormat $PWD printf "$formatted_path , $formatted_path_unix\n" PathFormat "$PROGRAMFILESX86" printf "$formatted_path , $formatted_path_unix\n" exit 0 fi AC_MSG_CHECKING([for product name]) PRODUCTNAME="AC_PACKAGE_NAME" if test -n "$with_product_name" -a "$with_product_name" != no; then PRODUCTNAME="$with_product_name" fi if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then PRODUCTNAME="${PRODUCTNAME}Dev" fi AC_MSG_RESULT([$PRODUCTNAME]) AC_SUBST(PRODUCTNAME) PRODUCTNAME_WITHOUT_SPACES=$(printf %s "$PRODUCTNAME" | sed 's/ //g') AC_SUBST(PRODUCTNAME_WITHOUT_SPACES) dnl =================================================================== dnl Our version is defined by the AC_INIT() at the top of this script. dnl =================================================================== AC_MSG_CHECKING([for package version]) if test -n "$with_package_version" -a "$with_package_version" != no; then PACKAGE_VERSION="$with_package_version" fi AC_MSG_RESULT([$PACKAGE_VERSION]) set `echo "$PACKAGE_VERSION" | sed "s/\./ /g"` LIBO_VERSION_MAJOR=$1 LIBO_VERSION_MINOR=$2 LIBO_VERSION_MICRO=$3 LIBO_VERSION_PATCH=$4 LIBO_VERSION_SUFFIX=$5 # Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently wanted separately in # openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double brackets are for m4's sake, # they get undoubled before actually passed to sed. LIBO_VERSION_SUFFIX_SUFFIX=`echo "$LIBO_VERSION_SUFFIX" | sed -e 's/.*[[a-zA-Z0-9]]\([[^a-zA-Z0-9]]*\)$/\1/'` test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUFFIX%${LIBO_VERSION_SUFFIX_SUFFIX}}" # LIBO_VERSION_SUFFIX, if non-empty, should include the period separator test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX" # The value for key CFBundleVersion in the Info.plist file must be a period-separated list of at most # three non-negative integers. Please find more information about CFBundleVersion at # https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion # The value for key CFBundleShortVersionString in the Info.plist file must be a period-separated list # of at most three non-negative integers. Please find more information about # CFBundleShortVersionString at # https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring # But that is enforced only in the App Store, and we apparently want to break the rules otherwise. if test "$enable_macosx_sandbox" = yes; then MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.`expr $LIBO_VERSION_MICRO '*' 1000 + $LIBO_VERSION_PATCH` MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION else MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.$LIBO_VERSION_MICRO.$LIBO_VERSION_PATCH MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION$LIBO_VERSION_SUFFIX fi AC_SUBST(LIBO_VERSION_MAJOR) AC_SUBST(LIBO_VERSION_MINOR) AC_SUBST(LIBO_VERSION_MICRO) AC_SUBST(LIBO_VERSION_PATCH) AC_SUBST(LIBO_VERSION_SUFFIX) AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX) AC_SUBST(MACOSX_BUNDLE_SHORTVERSION) AC_SUBST(MACOSX_BUNDLE_VERSION) AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR) AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR) AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,$LIBO_VERSION_MICRO) AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,$LIBO_VERSION_PATCH) git_date=`git log -1 --pretty=format:"%cd" --date=format:'%Y' 2>&/dev/null` LIBO_THIS_YEAR=${git_date:-2024} AC_DEFINE_UNQUOTED(LIBO_THIS_YEAR,$LIBO_THIS_YEAR) dnl =================================================================== dnl Product version dnl =================================================================== AC_MSG_CHECKING([for product version]) PRODUCTVERSION="$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR" AC_MSG_RESULT([$PRODUCTVERSION]) AC_SUBST(PRODUCTVERSION) AC_PROG_EGREP # AC_PROG_EGREP doesn't set GREP on all systems as well AC_PATH_PROG(GREP, grep) BUILDDIR=`pwd` cd $srcdir SRC_ROOT=`pwd` cd $BUILDDIR x_Cygwin=[\#] dnl ====================================== dnl Required GObject introspection version dnl ====================================== INTROSPECTION_REQUIRED_VERSION=1.32.0 dnl =================================================================== dnl Search all the common names for GNU Make dnl =================================================================== AC_MSG_CHECKING([for GNU Make]) # try to use our own make if it is available and GNUMAKE was not already defined if test -z "$GNUMAKE"; then if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/make" ; then GNUMAKE="$LODE_HOME/opt/bin/make" elif test -x "/opt/lo/bin/make"; then GNUMAKE="/opt/lo/bin/make" fi fi GNUMAKE_WIN_NATIVE= for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do if test -n "$a"; then $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null if test $? -eq 0; then if test "$build_os" = "cygwin"; then if test -n "$($a -v | grep 'Built for Windows')" ; then GNUMAKE="$(cygpath -m "$(which "$(cygpath -u $a)")")" GNUMAKE_WIN_NATIVE="TRUE" else GNUMAKE=`which $a` fi else GNUMAKE=`which $a` fi break fi fi done AC_MSG_RESULT($GNUMAKE) if test -z "$GNUMAKE"; then AC_MSG_ERROR([not found. install GNU Make.]) else if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then AC_MSG_NOTICE([Using a native Win32 GNU Make version.]) fi fi win_short_path_for_make() { local short_path="$1" if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then cygpath -sm "$short_path" else cygpath -u "$(cygpath -d "$short_path")" fi } if test "$build_os" = "cygwin"; then PathFormat "$SRC_ROOT" SRC_ROOT="$formatted_path" PathFormat "$BUILDDIR" BUILDDIR="$formatted_path" x_Cygwin= AC_MSG_CHECKING(for explicit COMSPEC) if test -z "$COMSPEC"; then AC_MSG_ERROR([COMSPEC not set in environment, please set it and rerun]) else AC_MSG_RESULT([found: $COMSPEC]) fi fi AC_SUBST(SRC_ROOT) AC_SUBST(BUILDDIR) AC_SUBST(x_Cygwin) AC_DEFINE_UNQUOTED(SRCDIR,"$SRC_ROOT") AC_DEFINE_UNQUOTED(SRC_ROOT,"$SRC_ROOT") AC_DEFINE_UNQUOTED(BUILDDIR,"$BUILDDIR") if test "z$EUID" = "z0" -a "`uname -o 2>/dev/null`" = "Cygwin"; then AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account]) fi # need sed in os checks... AC_PATH_PROGS(SED, sed) if test -z "$SED"; then AC_MSG_ERROR([install sed to run this script]) fi # Set the ENABLE_LTO variable # =================================================================== AC_MSG_CHECKING([whether to use link-time optimization]) if test -n "$enable_lto" -a "$enable_lto" != "no"; then ENABLE_LTO="TRUE" AC_MSG_RESULT([yes]) else ENABLE_LTO="" AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_LTO) AC_ARG_ENABLE(fuzz-options, AS_HELP_STRING([--enable-fuzz-options], [Randomly enable or disable each of those configurable options that are supposed to be freely selectable without interdependencies, or where bad interaction from interdependencies is automatically avoided.]) ) dnl =================================================================== dnl When building for Android, --with-android-ndk, dnl --with-android-ndk-toolchain-version and --with-android-sdk are dnl mandatory dnl =================================================================== AC_ARG_WITH(android-ndk, AS_HELP_STRING([--with-android-ndk], [Specify location of the Android Native Development Kit. Mandatory when building for Android.]), ,) AC_ARG_WITH(android-ndk-toolchain-version, AS_HELP_STRING([--with-android-ndk-toolchain-version], [Specify which toolchain version to use, of those present in the Android NDK you are using. The default (and only supported version currently) is "clang5.0"]),, with_android_ndk_toolchain_version=clang5.0) AC_ARG_WITH(android-sdk, AS_HELP_STRING([--with-android-sdk], [Specify location of the Android SDK. Mandatory when building for Android.]), ,) AC_ARG_WITH(android-api-level, AS_HELP_STRING([--with-android-api-level], [Specify the API level when building for Android. Defaults to 16 for ARM and x86 and to 21 for ARM64 and x86-64]), ,) ANDROID_NDK_DIR= if test -z "$with_android_ndk" -a -e "$SRC_ROOT/external/android-ndk" -a "$build" != "$host"; then with_android_ndk="$SRC_ROOT/external/android-ndk" fi if test -n "$with_android_ndk"; then eval ANDROID_NDK_DIR=$with_android_ndk ANDROID_API_LEVEL=21 if test -n "$with_android_api_level" ; then ANDROID_API_LEVEL="$with_android_api_level" fi if test $host_cpu = arm; then LLVM_TRIPLE=armv7a-linux-androideabi ANDROID_SYSROOT_PLATFORM=arm-linux-androideabi ANDROID_APP_ABI=armeabi-v7a ANDROIDCFLAGS="-mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wl,--fix-cortex-a8" elif test $host_cpu = aarch64; then LLVM_TRIPLE=aarch64-linux-android ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE ANDROID_APP_ABI=arm64-v8a elif test $host_cpu = x86_64; then LLVM_TRIPLE=x86_64-linux-android ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE ANDROID_APP_ABI=x86_64 else # host_cpu is something like "i386" or "i686" I guess, NDK uses # "x86" in some contexts LLVM_TRIPLE=i686-linux-android ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE ANDROID_APP_ABI=x86 fi # Set up a lot of pre-canned defaults if test ! -f $ANDROID_NDK_DIR/RELEASE.TXT; then if test ! -f $ANDROID_NDK_DIR/source.properties; then AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or source.properties file in $ANDROID_NDK_DIR.]) fi ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' $ANDROID_NDK_DIR/source.properties` else ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_DIR/RELEASE.TXT` fi if test -z "$ANDROID_NDK_VERSION"; then AC_MSG_ERROR([Failed to determine Android NDK version. Please check your installation.]) fi case $ANDROID_NDK_VERSION in r9*|r10*) AC_MSG_ERROR([Building for Android requires NDK version >= 23.*]) ;; 11.1.*|12.1.*|13.1.*|14.1.*|16.*|17.*|18.*|19.*|20.*|21.*|22.*) AC_MSG_ERROR([Building for Android requires NDK version >= 23.*]) ;; 23.*|24.*|25.*) ;; *) AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* to 25.* have been used successfully. Proceed at your own risk.]) add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* to 25.* have been used successfully. Proceed at your own risk." ;; esac case "$with_android_ndk_toolchain_version" in clang5.0) ANDROID_GCC_TOOLCHAIN_VERSION=4.9 ;; *) AC_MSG_ERROR([Unrecognized value for the --with-android-ndk-toolchain-version option. Building for Android is only supported with Clang 5.*]) esac AC_MSG_NOTICE([using the Android API level... $ANDROID_API_LEVEL]) # NDK 15 or later toolchain is 64bit-only, except for Windows that we don't support. Using a 64-bit # linker is required if you compile large parts of the code with -g. A 32-bit linker just won't # manage to link the (app-specific) single huge .so that is built for the app in # android/source/ if there is debug information in a significant part of the object files. # (A 64-bit ld.gold grows too much over 10 gigabytes of virtual space when linking such a .so if # all objects have been built with debug information.) case $build_os in linux-gnu*) android_HOST_TAG=linux-x86_64 ;; darwin*) android_HOST_TAG=darwin-x86_64 ;; *) AC_MSG_ERROR([We only support building for Android from Linux or macOS]) # ndk would also support windows and windows-x86_64 ;; esac ANDROID_TOOLCHAIN=$ANDROID_NDK_DIR/toolchains/llvm/prebuilt/$android_HOST_TAG ANDROID_COMPILER_BIN=$ANDROID_TOOLCHAIN/bin test -z "$AR" && AR=$ANDROID_COMPILER_BIN/llvm-ar test -z "$NM" && NM=$ANDROID_COMPILER_BIN/llvm-nm test -z "$OBJDUMP" && OBJDUMP=$ANDROID_COMPILER_BIN/llvm-objdump test -z "$RANLIB" && RANLIB=$ANDROID_COMPILER_BIN/llvm-ranlib test -z "$STRIP" && STRIP=$ANDROID_COMPILER_BIN/llvm-strip ANDROIDCFLAGS="$ANDROIDCFLAGS -target ${LLVM_TRIPLE}${ANDROID_API_LEVEL}" ANDROIDCFLAGS="$ANDROIDCFLAGS -no-canonical-prefixes -ffunction-sections -fdata-sections -Qunused-arguments" if test "$ENABLE_LTO" = TRUE; then # -flto comes from com_GCC_defs.mk, too, but we need to make sure it gets passed as part of # $CC and $CXX when building external libraries ANDROIDCFLAGS="$ANDROIDCFLAGS -flto -fuse-linker-plugin -O2" fi ANDROIDCXXFLAGS="$ANDROIDCFLAGS -stdlib=libc++" if test -z "$CC"; then CC="$ANDROID_COMPILER_BIN/clang $ANDROIDCFLAGS" CC_BASE="clang" fi if test -z "$CXX"; then CXX="$ANDROID_COMPILER_BIN/clang++ $ANDROIDCXXFLAGS" CXX_BASE="clang++" fi fi AC_SUBST(ANDROID_NDK_DIR) AC_SUBST(ANDROID_API_LEVEL) AC_SUBST(ANDROID_APP_ABI) AC_SUBST(ANDROID_GCC_TOOLCHAIN_VERSION) AC_SUBST(ANDROID_SYSROOT_PLATFORM) AC_SUBST(ANDROID_TOOLCHAIN) dnl =================================================================== dnl --with-android-sdk dnl =================================================================== ANDROID_SDK_DIR= if test -z "$with_android_sdk" -a -e "$SRC_ROOT/external/android-sdk-linux" -a "$build" != "$host"; then with_android_sdk="$SRC_ROOT/external/android-sdk-linux" fi if test -n "$with_android_sdk"; then eval ANDROID_SDK_DIR=$with_android_sdk PATH="$ANDROID_SDK_DIR/platform-tools:$ANDROID_SDK_DIR/tools:$PATH" fi AC_SUBST(ANDROID_SDK_DIR) AC_ARG_ENABLE([android-lok], AS_HELP_STRING([--enable-android-lok], [The Android app from the android/ subdir needs several tweaks all over the place that break the LOK when used in the Online-based Android app. This switch indicates that the intent of this build is actually the Online-based, non-modified LOK.]) ) ENABLE_ANDROID_LOK= if test -n "$ANDROID_NDK_DIR" ; then if test "$enable_android_lok" = yes; then ENABLE_ANDROID_LOK=TRUE AC_DEFINE(HAVE_FEATURE_ANDROID_LOK) AC_MSG_NOTICE([building the Android version... for the Online-based Android app]) else AC_MSG_NOTICE([building the Android version... for the app from the android/ subdir]) fi fi AC_SUBST([ENABLE_ANDROID_LOK]) libo_FUZZ_ARG_ENABLE([android-editing], AS_HELP_STRING([--enable-android-editing], [Enable the experimental editing feature on Android.]) ) ENABLE_ANDROID_EDITING= if test "$enable_android_editing" = yes; then ENABLE_ANDROID_EDITING=TRUE fi AC_SUBST([ENABLE_ANDROID_EDITING]) disable_database_connectivity_dependencies() { enable_evolution2=no enable_firebird_sdbc=no enable_mariadb_sdbc=no enable_postgresql_sdbc=no enable_report_builder=no } # =================================================================== # # Start initial platform setup # # The using_* variables reflect platform support and should not be # changed after the "End initial platform setup" block. # This is also true for most test_* variables. # =================================================================== build_crypto=yes test_clucene=no test_gdb_index=no test_openldap=yes test_split_debug=no test_webdav=yes usable_dlapi=yes # There is currently just iOS not using salplug, so this explicitly enables it. # must: using_freetype_fontconfig # may: using_headless_plugin defaults to $using_freetype_fontconfig # must: using_x11 # Default values, as such probably valid just for Linux, set # differently below just for Mac OSX, but at least better than # hardcoding these as we used to do. Much of this is duplicated also # in solenv for old build system and for gbuild, ideally we should # perhaps define stuff like this only here in configure.ac? LINKFLAGSSHL="-shared" PICSWITCH="-fpic" DLLPOST=".so" LINKFLAGSNOUNDEFS="-Wl,-z,defs" INSTROOTBASESUFFIX= INSTROOTCONTENTSUFFIX= SDKDIRNAME=sdk HOST_PLATFORM="$host" host_cpu_for_clang="$host_cpu" case "$host_os" in solaris*) using_freetype_fontconfig=yes using_x11=yes build_skia=yes _os=SunOS dnl =========================================================== dnl Check whether we're using Solaris 10 - SPARC or Intel. dnl =========================================================== AC_MSG_CHECKING([the Solaris operating system release]) _os_release=`echo $host_os | $SED -e s/solaris2\.//` if test "$_os_release" -lt "10"; then AC_MSG_ERROR([use Solaris >= 10 to build LibreOffice]) else AC_MSG_RESULT([ok ($_os_release)]) fi dnl Check whether we're using a SPARC or i386 processor AC_MSG_CHECKING([the processor type]) if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then AC_MSG_RESULT([ok ($host_cpu)]) else AC_MSG_ERROR([only SPARC and i386 processors are supported]) fi ;; linux-gnu*|k*bsd*-gnu*|linux-musl*) using_freetype_fontconfig=yes using_x11=yes build_skia=yes test_gdb_index=yes test_split_debug=yes if test "$enable_fuzzers" = yes; then test_system_freetype=no fi _os=Linux ;; gnu) using_freetype_fontconfig=yes using_x11=no _os=GNU ;; cygwin*|wsl*) # When building on Windows normally with MSVC under Cygwin, # configure thinks that the host platform (the platform the # built code will run on) is Cygwin, even if it obviously is # Windows, which in Autoconf terminology is called # "mingw32". (Which is misleading as MinGW is the name of the # tool-chain, not an operating system.) # Somewhat confusing, yes. But this configure script doesn't # look at $host etc that much, it mostly uses its own $_os # variable, set here in this case statement. using_freetype_fontconfig=no using_x11=no test_unix_dlapi=no test_openldap=no enable_pagein=no build_skia=yes _os=WINNT DLLPOST=".dll" LINKFLAGSNOUNDEFS= if test "$host_cpu" = "aarch64"; then build_skia=no enable_gpgmepp=no enable_coinmp=no enable_firebird_sdbc=no fi ;; darwin*) # macOS using_freetype_fontconfig=no using_x11=no build_skia=yes enable_pagein=no if test -n "$LODE_HOME" ; then mac_sanitize_path AC_MSG_NOTICE([sanitized the PATH to $PATH]) fi _os=Darwin INSTROOTBASESUFFIX=/$PRODUCTNAME_WITHOUT_SPACES.app INSTROOTCONTENTSUFFIX=/Contents SDKDIRNAME=${PRODUCTNAME_WITHOUT_SPACES}${PRODUCTVERSION}_SDK # See "Default values, as such probably valid just for Linux" comment above the case "$host_os" LINKFLAGSSHL="-dynamiclib" # -fPIC is default PICSWITCH="" DLLPOST=".dylib" # -undefined error is the default LINKFLAGSNOUNDEFS="" case "$host_cpu" in aarch64|arm64) # Apple's Clang uses "arm64" host_cpu_for_clang=arm64 esac ;; ios*) # iOS using_freetype_fontconfig=no using_x11=no build_crypto=no test_libcmis=no test_openldap=no test_webdav=no if test -n "$LODE_HOME" ; then mac_sanitize_path AC_MSG_NOTICE([sanitized the PATH to $PATH]) fi enable_gpgmepp=no _os=iOS enable_mpl_subset=yes enable_lotuswordpro=no disable_database_connectivity_dependencies enable_coinmp=no enable_lpsolve=no enable_extension_integration=no enable_xmlhelp=no with_ppds=no if test "$enable_ios_simulator" = "yes"; then host=x86_64-apple-darwin fi # See "Default values, as such probably valid just for Linux" comment above the case "$host_os" LINKFLAGSSHL="-dynamiclib" # -fPIC is default PICSWITCH="" DLLPOST=".dylib" # -undefined error is the default LINKFLAGSNOUNDEFS="" # HOST_PLATFORM is used for external projects and their configury typically doesn't like the "ios" # part, so use aarch64-apple-darwin for now. HOST_PLATFORM=aarch64-apple-darwin # Apple's Clang uses "arm64" host_cpu_for_clang=arm64 ;; freebsd*) using_freetype_fontconfig=yes using_x11=yes build_skia=yes AC_MSG_CHECKING([the FreeBSD operating system release]) if test -n "$with_os_version"; then OSVERSION="$with_os_version" else OSVERSION=`/sbin/sysctl -n kern.osreldate` fi AC_MSG_RESULT([found OSVERSION=$OSVERSION]) AC_MSG_CHECKING([which thread library to use]) if test "$OSVERSION" -lt "500016"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-pthread" elif test "$OSVERSION" -lt "502102"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-lc_r" else PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" fi AC_MSG_RESULT([$PTHREAD_LIBS]) _os=FreeBSD ;; *netbsd*) using_freetype_fontconfig=yes using_x11=yes test_gtk3_kde5=no build_skia=yes PTHREAD_LIBS="-pthread -lpthread" _os=NetBSD ;; openbsd*) using_freetype_fontconfig=yes using_x11=yes PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-pthread" _os=OpenBSD ;; dragonfly*) using_freetype_fontconfig=yes using_x11=yes build_skia=yes PTHREAD_LIBS="-pthread" _os=DragonFly ;; linux-android*) # API exists, but seems not really usable since Android 7 AFAIK usable_dlapi=no using_freetype_fontconfig=yes using_headless_plugin=no using_x11=no build_crypto=no test_openldap=no test_system_freetype=no test_webdav=no disable_database_connectivity_dependencies enable_lotuswordpro=no enable_mpl_subset=yes enable_cairo_canvas=no enable_coinmp=yes enable_lpsolve=no enable_odk=no enable_python=no enable_xmlhelp=no _os=Android ;; haiku*) using_freetype_fontconfig=yes using_x11=no test_gtk3=no test_gtk3_kde5=no test_kf5=yes test_kf6=yes enable_odk=no enable_coinmp=no enable_pdfium=no enable_sdremote=no enable_postgresql_sdbc=no enable_firebird_sdbc=no _os=Haiku ;; emscripten) # API currently just exists in headers, not code usable_dlapi=no using_freetype_fontconfig=yes using_x11=yes test_openldap=no test_qt5=yes test_split_debug=yes test_system_freetype=no enable_compiler_plugins=no enable_customtarget_components=yes enable_split_debug=yes enable_wasm_strip=yes with_system_zlib=no with_theme="colibre" _os=Emscripten ;; *) AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!]) ;; esac AC_SUBST(HOST_PLATFORM) if test -z "$using_x11" -o -z "$using_freetype_fontconfig"; then AC_MSG_ERROR([You must set \$using_freetype_fontconfig and \$using_x11 for your platform]) fi # Set defaults, if not set by platform test "${test_cups+set}" = set || test_cups="$using_x11" test "${test_dbus+set}" = set || test_dbus="$using_x11" test "${test_gen+set}" = set || test_gen="$using_x11" test "${test_gstreamer_1_0+set}" = set || test_gstreamer_1_0="$using_x11" test "${test_gtk3+set}" = set || test_gtk3="$using_x11" test "${test_gtk4+set}" = set || test_gtk4="$using_x11" test "${test_kf5+set}" = set || test_kf5="$using_x11" test "${test_kf6+set}" = set || test_kf6="$using_x11" # don't handle test_qt5, so it can disable test_kf5 later test "${test_qt6+set}" = set || test_qt6="$using_x11" test "${test_randr+set}" = set || test_randr="$using_x11" test "${test_xrender+set}" = set || test_xrender="$using_x11" test "${using_headless_plugin+set}" = set || using_headless_plugin="$using_freetype_fontconfig" test "${test_gtk3_kde5+set}" != set -a "$test_kf5" = yes -a "$test_gtk3" = yes && test_gtk3_kde5="yes" # Make sure fontconfig and freetype test both either system or not test "${test_system_fontconfig+set}" != set -a "${test_system_freetype+set}" = set && test_system_fontconfig="$test_system_freetype" test "${test_system_freetype+set}" != set -a "${test_system_fontconfig+set}" = set && test_system_freetype="$test_system_fontconfig" # convenience / platform overriding "fixes" # Don't sort! test "$test_kf5" = yes -a "$test_qt5" = no && test_kf5=no test "$test_kf5" = yes && test_qt5=yes test "$test_gtk3" != yes && enable_gtk3=no test "$test_gtk3" != yes -o "$test_kf5" != yes && test_gtk3_kde5=no test "$using_freetype_fontconfig" = no && using_headless_plugin=no test "$using_freetype_fontconfig" = yes && test_cairo=yes # Keep in sync with the above $using_x11 depending test default list disable_x11_tests() { test_cups=no test_dbus=no test_gen=no test_gstreamer_1_0=no test_gtk3_kde5=no test_gtk3=no test_gtk4=no test_kf5=no test_kf6=no test_qt5=no test_qt6=no test_randr=no test_xrender=no } test "$using_x11" = yes && USING_X11=TRUE if test "$using_freetype_fontconfig" = yes; then AC_DEFINE(USE_HEADLESS_CODE) USE_HEADLESS_CODE=TRUE if test "$using_headless_plugin" = yes; then AC_DEFINE(ENABLE_HEADLESS) ENABLE_HEADLESS=TRUE fi else test_fontconfig=no test_freetype=no fi AC_SUBST(ENABLE_HEADLESS) AC_SUBST(USE_HEADLESS_CODE) AC_MSG_NOTICE([VCL platform has a usable dynamic loading API: $usable_dlapi]) AC_MSG_NOTICE([VCL platform uses freetype+fontconfig: $using_freetype_fontconfig]) AC_MSG_NOTICE([VCL platform uses headless plugin: $using_headless_plugin]) AC_MSG_NOTICE([VCL platform uses X11: $using_x11]) # =================================================================== # # End initial platform setup # # =================================================================== if test "$_os" = "Android" ; then # Verify that the NDK and SDK options are proper if test -z "$with_android_ndk"; then AC_MSG_ERROR([the --with-android-ndk option is mandatory, unless it is available at external/android-ndk/.]) elif test ! -f "$ANDROID_NDK_DIR/meta/abis.json"; then AC_MSG_ERROR([the --with-android-ndk option does not point to an Android NDK]) fi if test -z "$ANDROID_SDK_DIR"; then AC_MSG_ERROR([the --with-android-sdk option is mandatory, unless it is available at external/android-sdk-linux/.]) elif test ! -d "$ANDROID_SDK_DIR/platforms"; then AC_MSG_ERROR([the --with-android-sdk option does not point to an Android SDK]) fi fi AC_SUBST(SDKDIRNAME) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_LIBS) # Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS. # By default use the ones specified by our build system, # but explicit override is possible. AC_MSG_CHECKING(for explicit AFLAGS) if test -n "$AFLAGS"; then AC_MSG_RESULT([$AFLAGS]) x_AFLAGS= else AC_MSG_RESULT(no) x_AFLAGS=[\#] fi AC_MSG_CHECKING(for explicit CFLAGS) if test -n "$CFLAGS"; then AC_MSG_RESULT([$CFLAGS]) x_CFLAGS= else AC_MSG_RESULT(no) x_CFLAGS=[\#] fi AC_MSG_CHECKING(for explicit CXXFLAGS) if test -n "$CXXFLAGS"; then AC_MSG_RESULT([$CXXFLAGS]) x_CXXFLAGS= else AC_MSG_RESULT(no) x_CXXFLAGS=[\#] fi AC_MSG_CHECKING(for explicit OBJCFLAGS) if test -n "$OBJCFLAGS"; then AC_MSG_RESULT([$OBJCFLAGS]) x_OBJCFLAGS= else AC_MSG_RESULT(no) x_OBJCFLAGS=[\#] fi AC_MSG_CHECKING(for explicit OBJCXXFLAGS) if test -n "$OBJCXXFLAGS"; then AC_MSG_RESULT([$OBJCXXFLAGS]) x_OBJCXXFLAGS= else AC_MSG_RESULT(no) x_OBJCXXFLAGS=[\#] fi AC_MSG_CHECKING(for explicit LDFLAGS) if test -n "$LDFLAGS"; then AC_MSG_RESULT([$LDFLAGS]) x_LDFLAGS= else AC_MSG_RESULT(no) x_LDFLAGS=[\#] fi AC_SUBST(AFLAGS) AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(OBJCFLAGS) AC_SUBST(OBJCXXFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(x_AFLAGS) AC_SUBST(x_CFLAGS) AC_SUBST(x_CXXFLAGS) AC_SUBST(x_OBJCFLAGS) AC_SUBST(x_OBJCXXFLAGS) AC_SUBST(x_LDFLAGS) dnl These are potentially set for MSVC, in the code checking for UCRT below: my_original_CFLAGS=$CFLAGS my_original_CXXFLAGS=$CXXFLAGS my_original_CPPFLAGS=$CPPFLAGS dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32) dnl Needs to precede the AC_C_BIGENDIAN and AC_SEARCH_LIBS calls below, which apparently call dnl AC_PROG_CC internally. if test "$_os" != "WINNT"; then # AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that save_CFLAGS=$CFLAGS AC_PROG_CC CFLAGS=$save_CFLAGS if test -z "$CC_BASE"; then CC_BASE=`first_arg_basename "$CC"` fi fi if test "$_os" != "WINNT"; then AC_C_BIGENDIAN([ENDIANNESS=big], [ENDIANNESS=little]) else ENDIANNESS=little fi AC_SUBST(ENDIANNESS) if test "$usable_dlapi" != no; then AC_DEFINE([HAVE_DLAPI]) if test "$test_unix_dlapi" != no; then save_LIBS="$LIBS" AC_SEARCH_LIBS([dlsym], [dl], [case "$ac_cv_search_dlsym" in -l*) UNIX_DLAPI_LIBS="$ac_cv_search_dlsym";; esac], [AC_MSG_ERROR([dlsym not found in either libc nor libdl])]) LIBS="$save_LIBS" AC_DEFINE([HAVE_UNIX_DLAPI]) fi fi AC_SUBST(UNIX_DLAPI_LIBS) # Check for a (GNU) backtrace implementation AC_ARG_VAR([BACKTRACE_CFLAGS], [Compiler flags needed to use backtrace(3)]) AC_ARG_VAR([BACKTRACE_LIBS], [Linker flags needed to use backtrace(3)]) AS_IF([test "x$BACKTRACE_LIBS$BACKTRACE_CFLAGS" = x], [ save_LIBS="$LIBS" AC_SEARCH_LIBS([backtrace], [libexecinfo], [case "$ac_cv_search_backtrace" in -l*) BACKTRACE_LIBS="$ac_cv_search_backtrace";; esac], [PKG_CHECK_MODULES([BACKTRACE], [libexecinfo], [ac_cv_search_backtrace=], [:])]) LIBS="$save_LIBS" ]) AS_IF([test "x$ac_cv_search_backtrace" != xno ], [ AC_DEFINE([HAVE_FEATURE_BACKTRACE]) ]) dnl =================================================================== dnl Sanity checks for Emscripten SDK setup dnl =================================================================== EMSCRIPTEN_MIN_MAJOR=2 EMSCRIPTEN_MIN_MINOR=0 EMSCRIPTEN_MIN_TINY=31 EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRIPTEN_MIN_TINY}" if test "$_os" = "Emscripten"; then AC_MSG_CHECKING([if Emscripten is at least $EMSCRIPTEN_MIN_VERSION]) AS_IF([test -z "$EMSDK"], [AC_MSG_ERROR([No \$EMSDK environment variable.])]) EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h if test -f "$EMSCRIPTEN_VERSION_H"; then EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') else EMSCRIPTEN_DEFINES=$(echo | emcc -dM -E - | $GREP __EMSCRIPTEN_) EMSCRIPTEN_MAJOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') EMSCRIPTEN_MINOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') EMSCRIPTEN_TINY=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') fi EMSCRIPTEN_VERSION="${EMSCRIPTEN_MAJOR}.${EMSCRIPTEN_MINOR}.${EMSCRIPTEN_TINY}" check_semantic_version_three_prefixed EMSCRIPTEN MIN if test $? -eq 0; then AC_MSG_RESULT([yes ($EMSCRIPTEN_VERSION)]) else AC_MSG_ERROR([no, found $EMSCRIPTEN_VERSION]) fi EMSCRIPTEN_ERROR=0 if ! which emconfigure >/dev/null 2>&1; then AC_MSG_WARN([emconfigure must be in your \$PATH]) EMSCRIPTEN_ERROR=1 fi if test -z "$EMMAKEN_JUST_CONFIGURE"; then AC_MSG_WARN(["\$EMMAKEN_JUST_CONFIGURE wasn't set by emconfigure. Prefix configure or use autogen.sh]) EMSCRIPTEN_ERROR=1 fi EMSDK_FILE_PACKAGER="$(em-config EMSCRIPTEN_ROOT)"/tools/file_packager if ! test -x "$EMSDK_FILE_PACKAGER"; then AC_MSG_WARN([No file_packager found in $(em-config EMSCRIPTEN_ROOT)/tools/file_packager.]) EMSCRIPTEN_ERROR=1 fi if test $EMSCRIPTEN_ERROR -ne 0; then AC_MSG_ERROR(["Please fix your EMSDK setup to build with Emscripten!"]) fi fi AC_SUBST(EMSDK_FILE_PACKAGER) ############################################################################### # Extensions switches --enable/--disable ############################################################################### # By default these should be enabled unless having extra dependencies. # If there is extra dependency over configure options then the enable should # be automagic based on whether the requiring feature is enabled or not. # All this options change anything only with --enable-extension-integration. # The name of this option and its help string makes it sound as if # extensions are built anyway, just not integrated in the installer, # if you use --disable-extension-integration. Is that really the # case? AC_ARG_ENABLE(ios-simulator, AS_HELP_STRING([--enable-ios-simulator], [build for iOS simulator]) ) libo_FUZZ_ARG_ENABLE(extension-integration, AS_HELP_STRING([--disable-extension-integration], [Disable integration of the built extensions in the installer of the product. Use this switch to disable the integration.]) ) AC_ARG_ENABLE(avmedia, AS_HELP_STRING([--disable-avmedia], [Disable displaying and inserting AV media in documents. Work in progress, use only if you are hacking on it.]), ,test "${enable_avmedia+set}" = set || enable_avmedia=yes) AC_ARG_ENABLE(database-connectivity, AS_HELP_STRING([--disable-database-connectivity], [Disable various database connectivity. Work in progress, use only if you are hacking on it.]) ) # This doesn't mean not building (or "integrating") extensions # (although it probably should; i.e. it should imply # --disable-extension-integration I guess), it means not supporting # any extension mechanism at all libo_FUZZ_ARG_ENABLE(extensions, AS_HELP_STRING([--disable-extensions], [Disable all add-on extension functionality. Work in progress, use only if you are hacking on it.]) ) AC_ARG_ENABLE(scripting, AS_HELP_STRING([--disable-scripting], [Disable BASIC, Java and Python. Work in progress, use only if you are hacking on it.]), ,test "${enable_scripting+set}" = set || enable_scripting=yes) # This is mainly for Android and iOS, but could potentially be used in some # special case otherwise, too, so factored out as a separate setting AC_ARG_ENABLE(dynamic-loading, AS_HELP_STRING([--disable-dynamic-loading], [Disable any use of dynamic loading of code. Work in progress, use only if you are hacking on it.]) ) libo_FUZZ_ARG_ENABLE(report-builder, AS_HELP_STRING([--disable-report-builder], [Disable the Report Builder.]) ) libo_FUZZ_ARG_ENABLE(ext-wiki-publisher, AS_HELP_STRING([--enable-ext-wiki-publisher], [Enable the Wiki Publisher extension.]) ) libo_FUZZ_ARG_ENABLE(lpsolve, AS_HELP_STRING([--disable-lpsolve], [Disable compilation of the lp solve solver ]) ) libo_FUZZ_ARG_ENABLE(coinmp, AS_HELP_STRING([--disable-coinmp], [Disable compilation of the CoinMP solver ]) ) libo_FUZZ_ARG_ENABLE(pdfimport, AS_HELP_STRING([--disable-pdfimport], [Disable building the PDF import feature.]) ) libo_FUZZ_ARG_ENABLE(pdfium, AS_HELP_STRING([--disable-pdfium], [Disable building PDFium. Results in unsecure PDF signature verification.]) ) libo_FUZZ_ARG_ENABLE(skia, AS_HELP_STRING([--disable-skia], [Disable building Skia. Use --enable-skia=debug to build without optimizations.]) ) ############################################################################### dnl ---------- *** ---------- libo_FUZZ_ARG_ENABLE(mergelibs, AS_HELP_STRING([--enable-mergelibs], [Merge several of the smaller libraries into one big, "merged", one.]) ) libo_FUZZ_ARG_ENABLE(breakpad, AS_HELP_STRING([--enable-breakpad], [Enables breakpad for crash reporting.]) ) libo_FUZZ_ARG_ENABLE(crashdump, AS_HELP_STRING([--disable-crashdump], [Disable dump.ini and dump-file, when --enable-breakpad]) ) AC_ARG_ENABLE(fetch-external, AS_HELP_STRING([--disable-fetch-external], [Disables fetching external tarballs from web sources.]) ) AC_ARG_ENABLE(fuzzers, AS_HELP_STRING([--enable-fuzzers], [Enables building libfuzzer targets for fuzz testing.]) ) libo_FUZZ_ARG_ENABLE(pch, AS_HELP_STRING([--enable-pch=], [Enables precompiled header support for C++. Forced default on Windows/VC build. Using 'system' will include only external headers, 'base' will add also headers from base modules, 'normal' will also add all headers except from the module built, 'full' will use all suitable headers even from a module itself.]) ) libo_FUZZ_ARG_ENABLE(epm, AS_HELP_STRING([--enable-epm], [LibreOffice includes self-packaging code, that requires epm, however epm is useless for large scale package building.]) ) libo_FUZZ_ARG_ENABLE(odk, AS_HELP_STRING([--enable-odk], [Enable building the Office Development Kit, the part that extensions need to build against]) ) AC_ARG_ENABLE(mpl-subset, AS_HELP_STRING([--enable-mpl-subset], [Don't compile any pieces which are not MPL or more liberally licensed]) ) libo_FUZZ_ARG_ENABLE(evolution2, AS_HELP_STRING([--enable-evolution2], [Allows the built-in evolution 2 addressbook connectivity build to be enabled.]) ) AC_ARG_ENABLE(avahi, AS_HELP_STRING([--enable-avahi], [Determines whether to use Avahi to advertise Impress to remote controls.]) ) libo_FUZZ_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], [Turn warnings to errors. (Has no effect in modules where the treating of warnings as errors is disabled explicitly.)]), ,) libo_FUZZ_ARG_ENABLE(assert-always-abort, AS_HELP_STRING([--enable-assert-always-abort], [make assert() failures abort even when building without --enable-debug or --enable-dbgutil.]), ,) libo_FUZZ_ARG_ENABLE(dbgutil, AS_HELP_STRING([--enable-dbgutil], [Provide debugging support from --enable-debug and include additional debugging utilities such as object counting or more expensive checks. This is the recommended option for developers. Note that this makes the build ABI incompatible, it is not possible to mix object files or libraries from a --enable-dbgutil and a --disable-dbgutil build.])) libo_FUZZ_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Include debugging information, disable compiler optimization and inlining plus extra debugging code like assertions. Extra large build! (enables -g compiler flag).])) libo_FUZZ_ARG_ENABLE(split-debug, AS_HELP_STRING([--disable-split-debug], [Disable using split debug information (-gsplit-dwarf compile flag). Split debug information saves disk space and build time, but requires tools that support it (both build tools and debuggers).])) libo_FUZZ_ARG_ENABLE(gdb-index, AS_HELP_STRING([--disable-gdb-index], [Disables creating debug information in the gdb index format, which makes gdb start faster. The feature requires a linker that supports the --gdb-index option.])) libo_FUZZ_ARG_ENABLE(sal-log, AS_HELP_STRING([--enable-sal-log], [Make SAL_INFO and SAL_WARN calls do something even in a non-debug build.])) libo_FUZZ_ARG_ENABLE(symbols, AS_HELP_STRING([--enable-symbols], [Generate debug information. By default, enabled for --enable-debug and --enable-dbgutil, disabled otherwise. It is possible to explicitly specify gbuild build targets (where 'all' means everything, '-' prepended means to not enable, '/' appended means everything in the directory; there is no ordering, more specific overrides more general, and disabling takes precedence). Example: --enable-symbols="all -sw/ -Library_sc".])) libo_FUZZ_ARG_ENABLE(optimized, AS_HELP_STRING([--enable-optimized=], [Whether to compile with optimization flags. By default, disabled for --enable-debug and --enable-dbgutil, enabled otherwise. Using 'debug' will try to use only optimizations that should not interfere with debugging. For Emscripten we default to optimized (-O1) debug build, as otherwise binaries become too large.])) libo_FUZZ_ARG_ENABLE(runtime-optimizations, AS_HELP_STRING([--disable-runtime-optimizations], [Statically disable certain runtime optimizations (like rtl/alloc.h or JVM JIT) that are known to interact badly with certain dynamic analysis tools (like -fsanitize=address or Valgrind). By default, disabled iff CC contains "-fsanitize=*". (For Valgrind, those runtime optimizations are typically disabled dynamically via RUNNING_ON_VALGRIND.)])) AC_ARG_WITH(valgrind, AS_HELP_STRING([--with-valgrind], [Make availability of Valgrind headers a hard requirement.])) libo_FUZZ_ARG_ENABLE(compiler-plugins, AS_HELP_STRING([--enable-compiler-plugins], [Enable compiler plugins that will perform additional checks during building. Enabled automatically by --enable-dbgutil. Use --enable-compiler-plugins=debug to also enable debug code in the plugins.])) COMPILER_PLUGINS_DEBUG= if test "$enable_compiler_plugins" = debug; then enable_compiler_plugins=yes COMPILER_PLUGINS_DEBUG=TRUE fi libo_FUZZ_ARG_ENABLE(compiler-plugins-analyzer-pch, AS_HELP_STRING([--disable-compiler-plugins-analyzer-pch], [Disable use of precompiled headers when running the Clang compiler plugin analyzer. Not relevant in the --disable-compiler-plugins case.])) libo_FUZZ_ARG_ENABLE(ooenv, AS_HELP_STRING([--enable-ooenv], [Enable ooenv for the instdir installation.])) AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable link-time optimization. Suitable for (optimised) product builds. Building might take longer but libraries and executables are optimized for speed. For GCC, best to use the 'gold' linker.)])) AC_ARG_ENABLE(python, AS_HELP_STRING([--enable-python=], [Enables or disables Python support at run-time. Also specifies what Python to use at build-time. 'fully-internal' even forces the internal version for uses of Python during the build. On macOS the only choices are 'internal' (default) or 'fully-internal'. Otherwise the default is 'auto'. ])) libo_FUZZ_ARG_ENABLE(gtk3, AS_HELP_STRING([--disable-gtk3], [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]), ,test "${test_gtk3}" = no -o "${enable_gtk3+set}" = set || enable_gtk3=yes) AC_ARG_ENABLE(gtk4, AS_HELP_STRING([--enable-gtk4], [Determines whether to use Gtk+ 4.0 vclplug on platforms where Gtk+ 4.0 is available.])) AC_ARG_ENABLE(atspi-tests, AS_HELP_STRING([--disable-atspi-tests], [Determines whether to enable AT-SPI2 tests for the GTK3 vclplug.])) AC_ARG_ENABLE(introspection, AS_HELP_STRING([--enable-introspection], [Generate files for GObject introspection. Requires --enable-gtk3. (Typically used by Linux distributions.)])) AC_ARG_ENABLE(split-app-modules, AS_HELP_STRING([--enable-split-app-modules], [Split file lists for app modules, e.g. base, calc. Has effect only with make distro-pack-install]), ,) AC_ARG_ENABLE(split-opt-features, AS_HELP_STRING([--enable-split-opt-features], [Split file lists for some optional features, e.g. pyuno, testtool. Has effect only with make distro-pack-install]), ,) libo_FUZZ_ARG_ENABLE(cairo-canvas, AS_HELP_STRING([--disable-cairo-canvas], [Determines whether to build the Cairo canvas on platforms where Cairo is available.]), ,) libo_FUZZ_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [Determines whether to enable features that depend on dbus. e.g. Presentation mode screensaver control, bluetooth presentation control, automatic font install]), ,test "${enable_dbus+set}" = set || enable_dbus=yes) libo_FUZZ_ARG_ENABLE(sdremote, AS_HELP_STRING([--disable-sdremote], [Determines whether to enable Impress remote control (i.e. the server component).]), ,test "${enable_sdremote+set}" = set || enable_sdremote=yes) libo_FUZZ_ARG_ENABLE(sdremote-bluetooth, AS_HELP_STRING([--disable-sdremote-bluetooth], [Determines whether to build sdremote with bluetooth support. Requires dbus on Linux.])) libo_FUZZ_ARG_ENABLE(gio, AS_HELP_STRING([--disable-gio], [Determines whether to use the GIO support.]), ,test "${enable_gio+set}" = set || enable_gio=yes) AC_ARG_ENABLE(qt5, AS_HELP_STRING([--enable-qt5], [Determines whether to use Qt5 vclplug on platforms where Qt5 is available.]), ,) AC_ARG_ENABLE(qt6, AS_HELP_STRING([--enable-qt6], [Determines whether to use Qt6 vclplug on platforms where Qt6 is available.]), ,) AC_ARG_ENABLE(kf5, AS_HELP_STRING([--enable-kf5], [Determines whether to use Qt5/KF5 vclplug on platforms where Qt5 and KF5 are available.]), ,) AC_ARG_ENABLE(kf6, AS_HELP_STRING([--enable-kf6], [Determines whether to use KF6 vclplug on platforms where Qt6 and KF6 are available.]), ,) AC_ARG_ENABLE(gtk3_kde5, AS_HELP_STRING([--enable-gtk3-kde5], [Determines whether to use Gtk3 vclplug with KF5 file dialogs on platforms where Gtk3, Qt5 and Plasma is available.]), ,) AC_ARG_ENABLE(gen, AS_HELP_STRING([--enable-gen], [To select the gen backend in case of --disable-dynamic-loading. Per default auto-enabled when X11 is used.]), ,test "${test_gen}" = no -o "${enable_gen+set}" = set || enable_gen=yes) AC_ARG_ENABLE(gui, AS_HELP_STRING([--disable-gui], [Disable use of X11 or Wayland to reduce dependencies (e.g. for building LibreOfficeKit).]), ,enable_gui=yes) libo_FUZZ_ARG_ENABLE(randr, AS_HELP_STRING([--disable-randr], [Disable RandR support in the vcl project.]), ,test "${enable_randr+set}" = set || enable_randr=yes) libo_FUZZ_ARG_ENABLE(gstreamer-1-0, AS_HELP_STRING([--disable-gstreamer-1-0], [Disable building with the gstreamer 1.0 avmedia backend.]), ,test "${enable_gstreamer_1_0+set}" = set || enable_gstreamer_1_0=yes) libo_FUZZ_ARG_ENABLE([eot], [AS_HELP_STRING([--enable-eot], [Enable support for Embedded OpenType fonts.])], ,test "${enable_eot+set}" = set || enable_eot=no) libo_FUZZ_ARG_ENABLE(cve-tests, AS_HELP_STRING([--disable-cve-tests], [Prevent CVE tests to be executed]), ,) AC_ARG_ENABLE(build-opensymbol, AS_HELP_STRING([--enable-build-opensymbol], [Do not use the prebuilt opens___.ttf. Build it instead. This needs fontforge installed.]), ,) AC_ARG_ENABLE(dependency-tracking, AS_HELP_STRING([--enable-dependency-tracking], [Do not reject slow dependency extractors.])[ --disable-dependency-tracking Disables generation of dependency information. Speed up one-time builds.], ,) AC_ARG_ENABLE(icecream, AS_HELP_STRING([--enable-icecream], [Use the 'icecream' distributed compiling tool to speedup the compilation. It defaults to /opt/icecream for the location of the icecream gcc/g++ wrappers, you can override that using --with-gcc-home=/the/path switch.]), ,) AC_ARG_ENABLE(ld, AS_HELP_STRING([--enable-ld=], [Use the specified linker. Both 'gold' and 'lld' linkers generally use less memory and link faster. By default tries to use the best linker possible, use --disable-ld to use the default linker. If contains any ':', the part before the first ':' is used as the value of -fuse-ld, while the part after the first ':' is used as the value of --ld-path (which is needed for Clang 12).]), ,) libo_FUZZ_ARG_ENABLE(cups, AS_HELP_STRING([--disable-cups], [Do not build cups support.]) ) AC_ARG_ENABLE(ccache, AS_HELP_STRING([--disable-ccache], [Do not try to use ccache automatically. By default we will try to detect if ccache is available; in that case if CC/CXX are not yet set, and --enable-icecream is not given, we attempt to use ccache. --disable-ccache disables ccache completely. Additionally ccache's depend mode is enabled if possible, use --enable-ccache=nodepend to enable ccache without depend mode. ]), ,) AC_ARG_ENABLE(z7-debug, AS_HELP_STRING([--enable-z7-debug], [Makes the MSVC compiler use -Z7 for debugging instead of the default -Zi. Using this option takes more disk spaces but allows to use ccache. Final PDB files are created even with this option enabled. Enabled by default if ccache is detected.])) libo_FUZZ_ARG_ENABLE(online-update, AS_HELP_STRING([--enable-online-update], [Enable the online update service that will check for new versions of LibreOffice. Disabled by default. Requires --with-privacy-policy-url to be set.]), ,) libo_FUZZ_ARG_ENABLE(online-update-mar, AS_HELP_STRING([--enable-online-update-mar], [Enable the experimental Mozilla-like online update service that will check for new versions of LibreOffice. Disabled by default.]), ,) libo_FUZZ_ARG_WITH(online-update-mar-baseurl, AS_HELP_STRING([--with-online-update-mar-baseurl=...], [Set the base URL value for --enable-online-update-mar. (Can be left off for debug purposes, even if that may render the feature non-functional.)]), ,) libo_FUZZ_ARG_WITH(online-update-mar-certificateder, AS_HELP_STRING([--with-online-update-mar-certificateder=...], [Set the certificate DER value for --enable-online-update-mar. (Can be left off for debug purposes, even if that may render the feature non-functional.)]), ,) libo_FUZZ_ARG_WITH(online-update-mar-certificatename, AS_HELP_STRING([--with-online-update-mar-certificatename=...], [Set the certificate name value for --enable-online-update-mar. (Can be left off for debug purposes, even if that may render the feature non-functional.)]), ,) libo_FUZZ_ARG_WITH(online-update-mar-certificatepath, AS_HELP_STRING([--with-online-update-mar-certificatepath=...], [Set the certificate path value for --enable-online-update-mar. (Can be left off for debug purposes, even if that may render the feature non-functional.)]), ,) libo_FUZZ_ARG_WITH(online-update-mar-uploadurl, AS_HELP_STRING([--with-online-update-mar-uploadurl=...], [Set the upload URL value for --enable-online-update-mar. (Can be left off for debug purposes, even if that may render the feature non-functional.)]), ,) libo_FUZZ_ARG_ENABLE(extension-update, AS_HELP_STRING([--disable-extension-update], [Disable possibility to update installed extensions.]), ,) libo_FUZZ_ARG_ENABLE(release-build, AS_HELP_STRING([--enable-release-build], [Enable release build. Note that the "release build" choice is orthogonal to whether symbols are present, debug info is generated, or optimization is done. See https://wiki.documentfoundation.org/Development/DevBuild]), ,) AC_ARG_ENABLE(windows-build-signing, AS_HELP_STRING([--enable-windows-build-signing], [Enable signing of windows binaries (*.exe, *.dll)]), ,) AC_ARG_ENABLE(silent-msi, AS_HELP_STRING([--enable-silent-msi], [Enable MSI with LIMITUI=1 (silent install).]), ,) AC_ARG_ENABLE(wix, AS_HELP_STRING([--enable-wix], [Build Windows installer using WiX.]), ,) AC_ARG_ENABLE(macosx-code-signing, AS_HELP_STRING([--enable-macosx-code-signing=], [Sign executables, dylibs, frameworks and the app bundle. If you don't provide an identity the first suitable certificate in your keychain is used.]), ,) AC_ARG_ENABLE(macosx-package-signing, AS_HELP_STRING([--enable-macosx-package-signing=], [Create a .pkg suitable for uploading to the Mac App Store and sign it. If you don't provide an identity the first suitable certificate in your keychain is used.]), ,) AC_ARG_ENABLE(macosx-sandbox, AS_HELP_STRING([--enable-macosx-sandbox], [Make the app bundle run in a sandbox. Requires code signing. Is required by apps distributed in the Mac App Store, and implies adherence to App Store rules.]), ,) AC_ARG_WITH(macosx-bundle-identifier, AS_HELP_STRING([--with-macosx-bundle-identifier=tld.mumble.orifice.TheOffice], [Define the macOS bundle identifier. Default is the somewhat weird org.libreoffice.script ("script", huh?).]), ,with_macosx_bundle_identifier=org.libreoffice.script) AC_ARG_WITH(macosx-provisioning-profile, AS_HELP_STRING([--with-macosx-provisioning-profile=/path/to/mac.provisionprofile], [Specify the path to a provisioning profile to use]), ,) AC_ARG_WITH(product-name, AS_HELP_STRING([--with-product-name='My Own Office Suite'], [Define the product name. Default is AC_PACKAGE_NAME.]), ,with_product_name=$PRODUCTNAME) libo_FUZZ_ARG_ENABLE(community-flavor, AS_HELP_STRING([--disable-community-flavor], [Disable the Community branding.]), ,) AC_ARG_WITH(package-version, AS_HELP_STRING([--with-package-version='3.1.4.5'], [Define the package version. Default is AC_PACKAGE_VERSION. Use only if you distribute an own build for macOS.]), ,) libo_FUZZ_ARG_ENABLE(readonly-installset, AS_HELP_STRING([--enable-readonly-installset], [Prevents any attempts by LibreOffice to write into its installation. That means at least that no "system-wide" extensions can be added. Partly experimental work in progress, probably not fully implemented. Always enabled for macOS.]), ,) libo_FUZZ_ARG_ENABLE(mariadb-sdbc, AS_HELP_STRING([--disable-mariadb-sdbc], [Disable the build of the MariaDB/MySQL-SDBC driver.]) ) libo_FUZZ_ARG_ENABLE(postgresql-sdbc, AS_HELP_STRING([--disable-postgresql-sdbc], [Disable the build of the PostgreSQL-SDBC driver.]) ) libo_FUZZ_ARG_ENABLE(lotuswordpro, AS_HELP_STRING([--disable-lotuswordpro], [Disable the build of the Lotus Word Pro filter.]), ,test "${enable_lotuswordpro+set}" = set || enable_lotuswordpro=yes) libo_FUZZ_ARG_ENABLE(firebird-sdbc, AS_HELP_STRING([--disable-firebird-sdbc], [Disable the build of the Firebird-SDBC driver if it doesn't compile for you.]), ,test "${enable_firebird_sdbc+set}" = set || enable_firebird_sdbc=yes) AC_ARG_ENABLE(bogus-pkg-config, AS_HELP_STRING([--enable-bogus-pkg-config], [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.]), ) AC_ARG_ENABLE(openssl, AS_HELP_STRING([--disable-openssl], [Disable using libssl/libcrypto from OpenSSL. If disabled, components will use NSS. Work in progress, use only if you are hacking on it.]), ,enable_openssl=yes) libo_FUZZ_ARG_ENABLE(cipher-openssl-backend, AS_HELP_STRING([--enable-cipher-openssl-backend], [Enable using OpenSSL as the actual implementation of the rtl/cipher.h functionality. Requires --enable-openssl.])) AC_ARG_ENABLE(nss, AS_HELP_STRING([--disable-nss], [Disable using NSS. If disabled, components will use openssl. Work in progress, use only if you are hacking on it.]), ,enable_nss=yes) AC_ARG_ENABLE(library-bin-tar, AS_HELP_STRING([--enable-library-bin-tar], [Enable the building and reused of tarball of binary build for some 'external' libraries. Some libraries can save their build result in a tarball stored in TARFILE_LOCATION. That binary tarball is uniquely identified by the source tarball, the content of the config_host.mk file and the content of the top-level directory in core for that library If this option is enabled, then if such a tarfile exist, it will be untarred instead of the source tarfile, and the build step will be skipped for that library. If a proper tarfile does not exist, then the normal source-based build is done for that library and a proper binary tarfile is created for the next time.]), ) AC_ARG_ENABLE(dconf, AS_HELP_STRING([--disable-dconf], [Disable the dconf configuration backend (enabled by default where available).])) libo_FUZZ_ARG_ENABLE(formula-logger, AS_HELP_STRING( [--enable-formula-logger], [Enable formula logger for logging formula calculation flow in Calc.] ) ) AC_ARG_ENABLE(ldap, AS_HELP_STRING([--disable-ldap], [Disable LDAP support.]), ,enable_ldap=yes) AC_ARG_ENABLE(opencl, AS_HELP_STRING([--disable-opencl], [Disable OpenCL support.]), ,enable_opencl=yes) libo_FUZZ_ARG_ENABLE(librelogo, AS_HELP_STRING([--disable-librelogo], [Do not build LibreLogo.]), ,enable_librelogo=yes) AC_ARG_ENABLE(wasm-strip, AS_HELP_STRING([--enable-wasm-strip], [Strip the static build like for WASM/emscripten platform.]), ,) AC_ARG_WITH(main-module, AS_HELP_STRING([--with-main-module=], [Specify which main module to build for wasm. Default value is 'writer'.]), ,) AC_ARG_ENABLE(wasm-exceptions, AS_HELP_STRING([--enable-wasm-exceptions], [Build with native WASM exceptions (AKA -fwasm-exceptions), matter of fact, this is currently not finished by any implementation) (see https://webassembly.org/roadmap/ for the current state]), ,) AC_ARG_ENABLE(xmlhelp, AS_HELP_STRING([--disable-xmlhelp], [Disable XML help support]), ,enable_xmlhelp=yes) AC_ARG_ENABLE(customtarget-components, AS_HELP_STRING([--enable-customtarget-components], [Generates the static UNO object constructor mapping from the build.])) dnl =================================================================== dnl Optional Packages (--with/without-) dnl =================================================================== AC_ARG_WITH(gcc-home, AS_HELP_STRING([--with-gcc-home], [Specify the location of gcc/g++ manually. This can be used in conjunction with --enable-icecream when icecream gcc/g++ wrappers are installed in a non-default path.]), ,) AC_ARG_WITH(gnu-patch, AS_HELP_STRING([--with-gnu-patch], [Specify location of GNU patch on Solaris or FreeBSD.]), ,) AC_ARG_WITH(build-platform-configure-options, AS_HELP_STRING([--with-build-platform-configure-options], [Specify options for the configure script run for the *build* platform in a cross-compilation]), ,) AC_ARG_WITH(gnu-cp, AS_HELP_STRING([--with-gnu-cp], [Specify location of GNU cp on Solaris or FreeBSD.]), ,) AC_ARG_WITH(external-tar, AS_HELP_STRING([--with-external-tar=], [Specify an absolute path of where to find (and store) tarfiles.]), TARFILE_LOCATION=$withval , ) AC_ARG_WITH(referenced-git, AS_HELP_STRING([--with-referenced-git=], [Specify another checkout directory to reference. This makes use of git submodule update --reference, and saves a lot of diskspace when having multiple trees side-by-side.]), GIT_REFERENCE_SRC=$withval , ) AC_ARG_WITH(linked-git, AS_HELP_STRING([--with-linked-git=], [Specify a directory where the repositories of submodules are located. This uses a method similar to git-new-workdir to get submodules.]), GIT_LINK_SRC=$withval , ) AC_ARG_WITH(galleries, AS_HELP_STRING([--with-galleries], [Specify how galleries should be built. It is possible either to build these internally from source ("build"), or to disable them ("no")]), ) AC_ARG_WITH(templates, AS_HELP_STRING([--with-templates], [Specify we build with or without template files. It is possible either to build with templates ("yes"), or to disable them ("no")]), ) AC_ARG_WITH(theme, AS_HELP_STRING([--with-theme="theme1 theme2..."], [Choose which themes to include. By default those themes with an '*' are included. Possible choices: *breeze, *breeze_dark, *breeze_dark_svg, *breeze_svg, *colibre, *colibre_svg, *colibre_dark, *colibre_dark_svg, *elementary, *elementary_svg, *karasa_jaga, *karasa_jaga_svg, *sifr, *sifr_dark, *sifr_dark_svg, *sifr_svg, *sukapura, *sukapura_dark, *sukapura_dark_svg, *sukapura_svg.]), ,) libo_FUZZ_ARG_WITH(helppack-integration, AS_HELP_STRING([--without-helppack-integration], [It will not integrate the helppacks to the installer of the product. Please use this switch to use the online help or separate help packages.]), ,) libo_FUZZ_ARG_WITH(fonts, AS_HELP_STRING([--without-fonts], [LibreOffice includes some third-party fonts to provide a reliable basis for help content, templates, samples, etc. When these fonts are already known to be available on the system then you should use this option.]), ,) AC_ARG_WITH(epm, AS_HELP_STRING([--with-epm], [Decides which epm to use. Default is to use the one from the system if one is built. When either this is not there or you say =internal epm will be built.]), ,) AC_ARG_WITH(package-format, AS_HELP_STRING([--with-package-format], [Specify package format(s) for LibreOffice installation sets. The implicit --without-package-format leads to no installation sets being generated. Possible values: archive, bsd, deb, dmg, installed, msi, pkg, and rpm. Example: --with-package-format='deb rpm']), ,) AC_ARG_WITH(tls, AS_HELP_STRING([--with-tls], [Decides which TLS/SSL and cryptographic implementations to use for LibreOffice's code. Default is to use NSS although OpenSSL is also possible. Notice that selecting NSS restricts the usage of OpenSSL in LO's code but selecting OpenSSL doesn't restrict by now the usage of NSS in LO's code. Possible values: openssl, nss. Example: --with-tls="nss"]), ,) AC_ARG_WITH(system-libs, AS_HELP_STRING([--with-system-libs], [Use libraries already on system -- enables all --with-system-* flags.]), ,) AC_ARG_WITH(system-bzip2, AS_HELP_STRING([--with-system-bzip2], [Use bzip2 already on system. Used when --enable-online-update-mar or --enable-python=internal]),, [with_system_bzip2="$with_system_libs"]) AC_ARG_WITH(system-headers, AS_HELP_STRING([--with-system-headers], [Use headers already on system -- enables all --with-system-* flags for external packages whose headers are the only entities used i.e. boost/odbc/sane-header(s).]),, [with_system_headers="$with_system_libs"]) AC_ARG_WITH(system-jars, AS_HELP_STRING([--without-system-jars], [When building with --with-system-libs, also the needed jars are expected on the system. Use this to disable that]),, [with_system_jars="$with_system_libs"]) AC_ARG_WITH(system-cairo, AS_HELP_STRING([--with-system-cairo], [Use cairo libraries already on system. Happens automatically for (implicit) --enable-gtk3.])) AC_ARG_WITH(system-epoxy, AS_HELP_STRING([--with-system-epoxy], [Use epoxy libraries already on system. Happens automatically for (implicit) --enable-gtk3.]),, [with_system_epoxy="$with_system_libs"]) AC_ARG_WITH(myspell-dicts, AS_HELP_STRING([--with-myspell-dicts], [Adds myspell dictionaries to the LibreOffice installation set]), ,) AC_ARG_WITH(system-dicts, AS_HELP_STRING([--without-system-dicts], [Do not use dictionaries from system paths.]), ,) AC_ARG_WITH(external-dict-dir, AS_HELP_STRING([--with-external-dict-dir], [Specify external dictionary dir.]), ,) AC_ARG_WITH(external-hyph-dir, AS_HELP_STRING([--with-external-hyph-dir], [Specify external hyphenation pattern dir.]), ,) AC_ARG_WITH(external-thes-dir, AS_HELP_STRING([--with-external-thes-dir], [Specify external thesaurus dir.]), ,) AC_ARG_WITH(system-zlib, AS_HELP_STRING([--with-system-zlib], [Use zlib already on system.]),, [with_system_zlib=auto]) AC_ARG_WITH(system-jpeg, AS_HELP_STRING([--with-system-jpeg], [Use jpeg already on system.]),, [with_system_jpeg="$with_system_libs"]) AC_ARG_WITH(system-expat, AS_HELP_STRING([--with-system-expat], [Use expat already on system.]),, [with_system_expat="$with_system_libs"]) AC_ARG_WITH(system-libxml, AS_HELP_STRING([--with-system-libxml], [Use libxml/libxslt already on system.]),, [with_system_libxml=auto]) AC_ARG_WITH(system-openldap, AS_HELP_STRING([--with-system-openldap], [Use the OpenLDAP LDAP SDK already on system.]),, [with_system_openldap="$with_system_libs"]) libo_FUZZ_ARG_ENABLE(poppler, AS_HELP_STRING([--disable-poppler], [Disable building Poppler.]) ) AC_ARG_WITH(system-poppler, AS_HELP_STRING([--with-system-poppler], [Use system poppler (only needed for PDF import).]),, [with_system_poppler="$with_system_libs"]) AC_ARG_WITH(system-abseil, AS_HELP_STRING([--with-system-abseil], [Use the abseil libraries already on system.]),, [with_system_abseil="$with_system_libs"]) AC_ARG_WITH(system-openjpeg, AS_HELP_STRING([--with-system-openjpeg], [Use the OpenJPEG library already on system.]),, [with_system_openjpeg="$with_system_libs"]) libo_FUZZ_ARG_ENABLE(gpgmepp, AS_HELP_STRING([--disable-gpgmepp], [Disable building gpgmepp. Do not use in normal cases unless you want to fix potential problems it causes.]) ) AC_ARG_WITH(system-gpgmepp, AS_HELP_STRING([--with-system-gpgmepp], [Use gpgmepp already on system]),, [with_system_gpgmepp="$with_system_libs"]) AC_ARG_WITH(system-mariadb, AS_HELP_STRING([--with-system-mariadb], [Use MariaDB/MySQL libraries already on system.]),, [with_system_mariadb="$with_system_libs"]) AC_ARG_ENABLE(bundle-mariadb, AS_HELP_STRING([--enable-bundle-mariadb], [When using MariaDB/MySQL libraries already on system, bundle them with the MariaDB Connector/LibreOffice.]) ) AC_ARG_WITH(system-postgresql, AS_HELP_STRING([--with-system-postgresql], [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC driver. If pg_config is not in PATH, use PGCONFIG to point to it.]),, [with_system_postgresql="$with_system_libs"]) AC_ARG_WITH(libpq-path, AS_HELP_STRING([--with-libpq-path=], [Use this PostgreSQL C interface (libpq) installation for building the PostgreSQL-SDBC extension.]), ,) AC_ARG_WITH(system-firebird, AS_HELP_STRING([--with-system-firebird], [Use Firebird libraries already on system, for building the Firebird-SDBC driver. If fb_config is not in PATH, use FBCONFIG to point to it.]),, [with_system_firebird="$with_system_libs"]) AC_ARG_WITH(system-libtommath, AS_HELP_STRING([--with-system-libtommath], [Use libtommath already on system]),, [with_system_libtommath="$with_system_libs"]) AC_ARG_WITH(system-hsqldb, AS_HELP_STRING([--with-system-hsqldb], [Use hsqldb already on system.])) AC_ARG_WITH(hsqldb-jar, AS_HELP_STRING([--with-hsqldb-jar=JARFILE], [Specify path to jarfile manually.]), HSQLDB_JAR=$withval) libo_FUZZ_ARG_ENABLE(scripting-beanshell, AS_HELP_STRING([--disable-scripting-beanshell], [Disable support for scripts in BeanShell.]), , ) AC_ARG_WITH(system-beanshell, AS_HELP_STRING([--with-system-beanshell], [Use beanshell already on system.]),, [with_system_beanshell="$with_system_jars"]) AC_ARG_WITH(beanshell-jar, AS_HELP_STRING([--with-beanshell-jar=JARFILE], [Specify path to jarfile manually.]), BSH_JAR=$withval) libo_FUZZ_ARG_ENABLE(scripting-javascript, AS_HELP_STRING([--disable-scripting-javascript], [Disable support for scripts in JavaScript.]), , ) AC_ARG_WITH(system-rhino, AS_HELP_STRING([--with-system-rhino], [Use rhino already on system.]),,) # [with_system_rhino="$with_system_jars"]) # Above is not used as we have different debug interface # patched into internal rhino. This code needs to be fixed # before we can enable it by default. AC_ARG_WITH(rhino-jar, AS_HELP_STRING([--with-rhino-jar=JARFILE], [Specify path to jarfile manually.]), RHINO_JAR=$withval) AC_ARG_WITH(system-jfreereport, AS_HELP_STRING([--with-system-jfreereport], [Use JFreeReport already on system.]),, [with_system_jfreereport="$with_system_jars"]) AC_ARG_WITH(sac-jar, AS_HELP_STRING([--with-sac-jar=JARFILE], [Specify path to jarfile manually.]), SAC_JAR=$withval) AC_ARG_WITH(libxml-jar, AS_HELP_STRING([--with-libxml-jar=JARFILE], [Specify path to jarfile manually.]), LIBXML_JAR=$withval) AC_ARG_WITH(flute-jar, AS_HELP_STRING([--with-flute-jar=JARFILE], [Specify path to jarfile manually.]), FLUTE_JAR=$withval) AC_ARG_WITH(jfreereport-jar, AS_HELP_STRING([--with-jfreereport-jar=JARFILE], [Specify path to jarfile manually.]), JFREEREPORT_JAR=$withval) AC_ARG_WITH(liblayout-jar, AS_HELP_STRING([--with-liblayout-jar=JARFILE], [Specify path to jarfile manually.]), LIBLAYOUT_JAR=$withval) AC_ARG_WITH(libloader-jar, AS_HELP_STRING([--with-libloader-jar=JARFILE], [Specify path to jarfile manually.]), LIBLOADER_JAR=$withval) AC_ARG_WITH(libformula-jar, AS_HELP_STRING([--with-libformula-jar=JARFILE], [Specify path to jarfile manually.]), LIBFORMULA_JAR=$withval) AC_ARG_WITH(librepository-jar, AS_HELP_STRING([--with-librepository-jar=JARFILE], [Specify path to jarfile manually.]), LIBREPOSITORY_JAR=$withval) AC_ARG_WITH(libfonts-jar, AS_HELP_STRING([--with-libfonts-jar=JARFILE], [Specify path to jarfile manually.]), LIBFONTS_JAR=$withval) AC_ARG_WITH(libserializer-jar, AS_HELP_STRING([--with-libserializer-jar=JARFILE], [Specify path to jarfile manually.]), LIBSERIALIZER_JAR=$withval) AC_ARG_WITH(libbase-jar, AS_HELP_STRING([--with-libbase-jar=JARFILE], [Specify path to jarfile manually.]), LIBBASE_JAR=$withval) AC_ARG_WITH(system-odbc, AS_HELP_STRING([--with-system-odbc], [Use the odbc headers already on system.]),, [with_system_odbc="auto"]) AC_ARG_WITH(system-sane, AS_HELP_STRING([--with-system-sane], [Use sane.h already on system.]),, [with_system_sane="$with_system_headers"]) AC_ARG_WITH(system-bluez, AS_HELP_STRING([--with-system-bluez], [Use bluetooth.h already on system.]),, [with_system_bluez="$with_system_headers"]) AC_ARG_WITH(system-boost, AS_HELP_STRING([--with-system-boost], [Use boost already on system.]),, [with_system_boost="$with_system_headers"]) AC_ARG_WITH(system-dragonbox, AS_HELP_STRING([--with-system-dragonbox], [Use dragonbox already on system.]),, [with_system_dragonbox="$with_system_headers"]) AC_ARG_WITH(system-frozen, AS_HELP_STRING([--with-system-frozen], [Use frozen already on system.]),, [with_system_frozen="$with_system_headers"]) AC_ARG_WITH(system-libfixmath, AS_HELP_STRING([--with-system-libfixmath], [Use libfixmath already on system.]),, [with_system_libfixmath="$with_system_libs"]) AC_ARG_WITH(system-glm, AS_HELP_STRING([--with-system-glm], [Use glm already on system.]),, [with_system_glm="$with_system_headers"]) AC_ARG_WITH(system-hunspell, AS_HELP_STRING([--with-system-hunspell], [Use libhunspell already on system.]),, [with_system_hunspell="$with_system_libs"]) libo_FUZZ_ARG_ENABLE(cairo-rgba, AS_HELP_STRING([--enable-cairo-rgba], [Use RGBA order, instead of default BRGA. Not possible with --with-system-cairo])) libo_FUZZ_ARG_ENABLE(zxing, AS_HELP_STRING([--disable-zxing], [Disable use of zxing external library.])) AC_ARG_WITH(system-zxing, AS_HELP_STRING([--with-system-zxing], [Use libzxing already on system.]),, [with_system_zxing="$with_system_libs"]) AC_ARG_WITH(system-zxcvbn, AS_HELP_STRING([--with-system-zxcvbn], [Use libzxcvbn already on system.]),, [with_system_zxcvbn="$with_system_libs"]) AC_ARG_WITH(system-box2d, AS_HELP_STRING([--with-system-box2d], [Use box2d already on system.]),, [with_system_box2d="$with_system_libs"]) AC_ARG_WITH(system-mythes, AS_HELP_STRING([--with-system-mythes], [Use mythes already on system.]),, [with_system_mythes="$with_system_libs"]) AC_ARG_WITH(system-altlinuxhyph, AS_HELP_STRING([--with-system-altlinuxhyph], [Use ALTLinuxhyph already on system.]),, [with_system_altlinuxhyph="$with_system_libs"]) AC_ARG_WITH(system-lpsolve, AS_HELP_STRING([--with-system-lpsolve], [Use lpsolve already on system.]),, [with_system_lpsolve="$with_system_libs"]) AC_ARG_WITH(system-coinmp, AS_HELP_STRING([--with-system-coinmp], [Use CoinMP already on system.]),, [with_system_coinmp="$with_system_libs"]) AC_ARG_WITH(system-liblangtag, AS_HELP_STRING([--with-system-liblangtag], [Use liblangtag library already on system.]),, [with_system_liblangtag="$with_system_libs"]) AC_ARG_WITH(system-lockfile, AS_HELP_STRING([--with-system-lockfile[=file]], [Detect a system lockfile program or use the \$file argument.])) AC_ARG_WITH(webdav, AS_HELP_STRING([--without-webdav], [Disable WebDAV support in the UCB.])) AC_ARG_WITH(linker-hash-style, AS_HELP_STRING([--with-linker-hash-style], [Use linker with --hash-style=