diff options
author | Karl Berry <karl@freefriends.org> | 2011-03-28 23:08:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-03-28 23:08:12 +0000 |
commit | 03775873b0e5e4ad16c41464c9c2b658be812323 (patch) | |
tree | 58d8bfe0ac7a492822001868626e8a56777233a6 /Build/source/utils/biber/configure.ac | |
parent | 1300ac09adb33d6453e4ab09d12238f277912cb7 (diff) |
only install freebsd binary if current freebsd system is new enough
git-svn-id: svn://tug.org/texlive/trunk@21865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/biber/configure.ac')
-rw-r--r-- | Build/source/utils/biber/configure.ac | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/Build/source/utils/biber/configure.ac b/Build/source/utils/biber/configure.ac index 497e70e1d62..a8f01e2f23f 100644 --- a/Build/source/utils/biber/configure.ac +++ b/Build/source/utils/biber/configure.ac @@ -28,7 +28,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 |