diff options
Diffstat (limited to 'Build/source/utils/biber/configure')
-rwxr-xr-x | Build/source/utils/biber/configure | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/Build/source/utils/biber/configure b/Build/source/utils/biber/configure index 06f34ee1d1f..c3b56e3d6f7 100755 --- a/Build/source/utils/biber/configure +++ b/Build/source/utils/biber/configure @@ -3514,7 +3514,35 @@ biber_bin="bin/$TL_PLATFORM/biber" if test -n "$ac_exeext" && test -r "$srcdir/$biber_bin$ac_exeext"; then BIBER_BINARY="$biber_bin$ac_exeext" elif test -r "$srcdir/$biber_bin"; then - BIBER_BINARY="$biber_bin" + if echo "$TL_PLATFORM" | grep freebsd >/dev/null 2>&1; then + + # on freebsd, we don't want to install the binary if the current + # version is too old. The standard way to do this is to look in + # sys/param.h. Use standard FreeBSD program locations since that's + # what they do. + : ${AWK=/usr/bin/awk} + : ${SYSCTL=/sbin/sysctl} + if test -n "$OSVERSION"; then + if test -r /usr/include/sys/param.h; then + OSVERSION=`$AWK '/^\#define[[:blank:]]__FreeBSD_version/ {print $3}'\ + </usr/include/sys/param.h` + elif test -r /usr/src/sys/sys/param.h; then + OSVERSION=`$AWK '/^\#define[[:blank:]]__FreeBSD_version/ {print $3}'\ + </usr/src/sys/sys/param.h` + else + OSVERSION=`${SYSCTL} -n kern.osreldate` + fi + fi + # check if freebsd os version is new enough. + if test "$OSVERSION" -ge 701000; then + BIBER_BINARY="$biber_bin" + else + BIBER_BINARY= # too old, skip it + fi + else + # not freebsd, just take it. + BIBER_BINARY="$biber_bin" + fi else BIBER_BINARY= fi |