blob: a8f01e2f23fa66bfd11d3ea3dcd1bba6cc95b127 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
dnl See ./README for our basic strategy here.
dnl
dnl Copyright (C) 2011 Karl Berry <tex-live@tug.org>
dnl
dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
AC_INIT([Biber], [TeX Live], [tex-k@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([TeXLive/TLConfig.pm])
AC_CONFIG_AUX_DIR([../../build-aux])
AC_CONFIG_MACRO_DIR([../../m4])
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl Determine the TeX Live platform name.
KPSE_TL_PLATFORM
dnl Check if we have an executable for this platform.
AC_MSG_CHECKING([for a biber binary])
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
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
AC_MSG_RESULT([$BIBER_BINARY])
AC_SUBST([BIBER_BINARY])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|