diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-05-14 15:26:39 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-01 13:06:55 +0100 |
commit | e050b09c7ef193da9da4441d9984c793e35b5a8a (patch) | |
tree | 4dd5b57161afc89adc8399a8aaca9387cf397310 /configure.ac | |
parent | 47cdd3ba605324072db617c6ae2d1a647b8bdce6 (diff) |
gbuild: serialize dynamic link for static builds
This is a hack, because make has no way to serialize processing
of a target (just .NOTPARALLEL for the whole Makefile).
It uses the lockfile tool / liblockfile 1.17. Since that polls
the file, I adjusted the poll timeout to 5s max, because I found
the 60s wait much too long. Guess even 1s would be ok...
Since it's just a small build tool, I simply copied and patched
its source, instead of creating an external project. And there
is --with-system-lockfile=... to use an external binary instead.
Change-Id: I16bc4579a273dcf1aac811ae4723ca325a0b9eba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126152
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ac76f505ea8a..ce0f76f5c27e 100644 --- a/configure.ac +++ b/configure.ac @@ -2413,6 +2413,10 @@ AC_ARG_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([--with-webdav], [Specify which library to use for webdav implementation. @@ -5455,6 +5459,7 @@ if test "$cross_compiling" = "yes"; then config_host/*.in \ sysui/desktop/macosx/Info.plist.in \ .vscode/vs-code-template.code-workspace.in \ + solenv/lockfile/autoconf.h.in \ ) \ | (cd CONF-FOR-BUILD && tar xf -) cp configure CONF-FOR-BUILD @@ -5504,6 +5509,7 @@ if test "$cross_compiling" = "yes"; then test -n "$with_help" -a "$with_help" != "no" && sub_conf_opts="$sub_conf_opts --with-help=$with_help" test "$enable_extensions" = yes || sub_conf_opts="$sub_conf_opts --disable-extensions" test "$enable_wasm_strip" = "yes" && sub_conf_opts="$sub_conf_opts --enable-wasm-strip" + test "${with_system_lockfile+set}" = set && sub_conf_opts="$sub_conf_opts --with-system-lockfile=${with_system_lockfile}" # Don't bother having configure look for stuff not needed for the build platform anyway sub_conf_defaults=" \ @@ -5620,6 +5626,7 @@ if test "$cross_compiling" = "yes"; then JAVACOMPILER JAVADOC JAVADOCISGJDOC + LOCKFILE " # these need some special handling EXTRA_HANDLED_SETTINGS=" @@ -5703,6 +5710,40 @@ AC_SUBST(CXX_FOR_BUILD) AC_SUBST(CPPU_ENV_FOR_BUILD) dnl =================================================================== +dnl Check for lockfile deps +dnl =================================================================== +if test -z "$CROSS_COMPILING"; then + test -n "$LOCKFILE" -a "${with_system_lockfile+set}" != set && with_system_lockfile="$LOCKFILE" + test "${with_system_lockfile+set}" = set || with_system_lockfile=no + AC_MSG_CHECKING([whick lockfile binary to use]) + case "$with_system_lockfile" in + yes) + AC_MSG_RESULT([external]) + AC_PATH_PROGS([LOCKFILE],[dotlockfile lockfile]) + ;; + no) + AC_MSG_RESULT([internal]) + ;; + *) + if test -x "$with_system_lockfile"; then + LOCKFILE="$with_system_lockfile" + else + AC_MSG_ERROR(['$with_system_lockfile' is not executable.]) + fi + AC_MSG_RESULT([$with_system_lockfile]) + ;; + esac +fi + +if test -n "$LOCKFILE" -a "$DISABLE_DYNLOADING" = TRUE; then + add_warning "The default system lockfile has increasing poll intervals up to 60s, so linking executables may be delayed." +fi + +AC_CHECK_HEADERS([getopt.h paths.h sys/param.h]) +AC_CHECK_FUNCS([utime utimes]) +AC_SUBST(LOCKFILE) + +dnl =================================================================== dnl Check for syslog header dnl =================================================================== AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG_H)) @@ -14627,6 +14668,7 @@ AC_CONFIG_HEADERS([config_host/config_oauth2.h]) AC_CONFIG_HEADERS([config_host/config_poppler.h]) AC_CONFIG_HEADERS([config_host/config_python.h]) AC_CONFIG_HEADERS([config_host/config_writerperfect.h]) +AC_CONFIG_HEADERS([solenv/lockfile/autoconf.h]) AC_OUTPUT if test "$CROSS_COMPILING" = TRUE; then |