Changeset 5d9f34e in mod_gnutls


Ignore:
Timestamp:
Feb 2, 2016, 2:28:43 AM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
db6bac4
Parents:
1bb6b1c
Message:

configure: Check if flock supports --timeout

This builds on the manual disable ("--disable-flock", see commit
412ee84200f0b47786f9ff80ff05835dc6310f76) but does not require any
user action. This should fix the

flock: cannot set up timer: Function not implemented
./runtests failed at line 176!

problem seen on Debian GNU/Hurd without any change to the packaging.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r1bb6b1c r5d9f34e  
    6565        (some exotic architectures don't support it)]),
    6666        [use_flock=$enableval], [use_flock=yes])
    67 dnl If flock is not disabled, make sure it's available
    68 if test "$enable_flock" != "no"; then
    69         AC_PATH_PROG([FLOCK], [flock], [no])
    70         use_flock=${FLOCK}
    71 fi
    72 AM_CONDITIONAL([DISABLE_FLOCK], [test "$enable_flock" = "no"])
     67# Check if flock is available and supports --timeout
     68AC_PATH_PROG([FLOCK], [flock], [no])
     69AS_IF([test "${FLOCK}" != "no"],
     70      [
     71        AC_MSG_CHECKING([whether ${FLOCK} supports --timeout])
     72        lockfile="$(mktemp)"
     73        AS_IF([${FLOCK} --timeout 1 ${lockfile} true >&AS_MESSAGE_LOG_FD 2>&1],
     74              [flock_works="yes"], [flock_works="no"])
     75        rm "${lockfile}"
     76        AC_MSG_RESULT([$flock_works])
     77      ],
     78      [flock_works="no"])
     79# disable flock if requested by user or it doesn't support timeout
     80AM_CONDITIONAL([DISABLE_FLOCK],
     81               [test "$enable_flock" = "no" || test "$flock_works" = "no"])
    7382
    7483dnl Enable test namespaces? Default is "yes".
  • test/README

    r1bb6b1c r5d9f34e  
    139139
    140140If you are building on an exotic architecture which does not support
    141 flock (or timeouts using flock -w), you can disable it by passing
     141flock (or timeouts using flock -w), ./configure should detect that and
     142disable locking, or you can disable it manually by passing
    142143"--disable-flock" to ./configure. This will force serial execution of
    143144tests, including environment setup.
Note: See TracChangeset for help on using the changeset viewer.