-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.in
79 lines (58 loc) · 1.9 KB
/
configure.in
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
68
69
70
71
72
73
74
75
76
77
78
79
dnl Process this file with autoconf to produce a configure script.
AC_REVISION($Revision: 1.7 $)dnl
AC_INIT(redblack.c)
REDBLACK_MAJOR_VERSION=1
REDBLACK_MINOR_VERSION=3
REDBLACK_VERSION=$REDBLACK_MAJOR_VERSION.$REDBLACK_MINOR_VERSION
dnl Library version info
dnl This should be one more than REDBLACK_MAJOR_VERSION
dnl incremented each time there is a major change to the interface
REDBLACK_LIB_CURRENT=2
dnl This should be set to zero everytime we DELETE from the interface
dnl It should be incremented every time we ADD to the interface
REDBLACK_LIB_AGE=2
dnl This should be incremented with every source code change
REDBLACK_LIB_REVISION=$REDBLACK_MINOR_VERSION
# For automake.
VERSION=$REDBLACK_VERSION
PACKAGE=libredblack
dnl Initialize the automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AC_SUBST(REDBLACK_LIB_CURRENT)
AC_SUBST(REDBLACK_LIB_REVISION)
AC_SUBST(REDBLACK_LIB_AGE)
AC_SUBST(REDBLACK_VERSION)
AM_CONFIG_HEADER(config.h)
output_files="Makefile libredblack.spec"
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
# --with-rbgen
AC_ARG_WITH(rbgen,
[ --with-rbgen Enable RB Code Generator (needs python)],
[], [with_rbgen=yes]
)
if test "$with_rbgen" = "yes"; then
# --with-python=PATH
AC_ARG_WITH(python,
[ --with-python=PATH Specify path to Python interpretor],
[PATH_PYTHON_PROG="$withval"],
[AC_PATH_PROGS(PATH_PYTHON_PROG, python python2.4 python2.3 python2.2 \
python2.1 python2.0 python1.6 python1.5 python1.4, false)]
)
if test "$PATH_PYTHON_PROG" = false
then
with_rbgen=no
fi
fi
dnl Initialize libtool
AM_PROG_LIBTOOL
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl Checks for library functions.
AC_CHECK_FUNCS(strdup)
AM_CONDITIONAL(USE_RBGEN, test "$with_rbgen" = "yes")
AC_OUTPUT(Makefile libredblack.spec rbgen, [chmod a+x rbgen])