-
Notifications
You must be signed in to change notification settings - Fork 313
/
configure.ac
113 lines (105 loc) · 3.7 KB
/
configure.ac
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([libcstl],[2.3.0],[[email protected]])
AC_COPYRIGHT([Copyright (C) 2008 - 2014 Wangbo.])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
#LT_INIT
AC_CONFIG_SRCDIR([src/cstl_vector.c])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
LT_INIT
# Checks for libraries.
# Checks for header files.
AC_HEADER_ASSERT
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_PROG_CC_C99
AC_C_CONST
# Checks for library functions.
AC_FUNC_MALLOC
# Checks for user options
# CSTL_MEMORY_MANAGEMENT : use memory management.
AC_ARG_WITH(
[memory-management],
[AS_HELP_STRING([--with-memory-management],[use libcstl memory management(default is no).])],
[AC_DEFINE([CSTL_MEMORY_MANAGEMENT], [1], [Define to 1 if you use libcstl memory management.])]#,
# []
)
# CSTL_STACK_VECTOR_SEQUENCE : implement stack using vector.
# CSTL_STACK_LIST_SEQUENCE : implement stack using list.
AC_ARG_ENABLE(
[stack-implementation],
[AS_HELP_STRING([--enable-stack-implementation[=ARGUMENT]],[select stack implementation(the ARGUMENTs are vector and list, deque is the default).])],
[case "$enableval" in
vector)
AC_DEFINE([CSTL_STACK_VECTOR_SEQUENCE], [1], [Define to 1 if you implement stack using vector.])
;;
list)
AC_DEFINE([CSTL_STACK_LIST_SEQUENCE], [1], [Define to 1 if you implement stack using list.])
;;
esac]
)
# CSTL_QUEUE_LIST_SEQUENCE : implement queue using list.
AC_ARG_ENABLE(
[queue-implementation],
[AS_HELP_STRING([--enable-queue-implementation[=ARGUMENT]],[select queue implementation(the ARGUMENT is list, deque is the default).])],
[case "$enableval" in
list)
AC_DEFINE([CSTL_QUEUE_LIST_SEQUENCE], [1], [Define to 1 if you implement queue using list.])
;;
esac]
)
# CSTL_SET_AVL_TREE : implement set using avl-tree.
AC_ARG_ENABLE(
[set-implementation],
[AS_HELP_STRING([--enable-set-implementation[=ARGUMENT]],[select set implementation(the ARGUMENT is avl-tree, rb-tree is the default).])],
[case "$enableval" in
avl-tree)
AC_DEFINE([CSTL_SET_AVL_TREE], [1], [Define to 1 if you implement set using avl-tree.])
;;
esac]
)
# CSTL_MULTISET_AVL_TREE : implement multiset using avl-tree.
AC_ARG_ENABLE(
[multiset-implementation],
[AS_HELP_STRING([--enable-multiset-implementation[=ARGUMENT]],[select multiset implementation(the ARGUMENT is avl-tree, rb-tree is the default).])],
[case "$enableval" in
avl-tree)
AC_DEFINE([CSTL_MULTISET_AVL_TREE], [1], [Define to 1 if you implement multiset using avl-tree.])
;;
esac]
)
# CSTL_MAP_AVL_TREE : implement map using avl-tree.
AC_ARG_ENABLE(
[map-implementation],
[AS_HELP_STRING([--enable-map-implementation[=ARGUMENT]],[select map implementation(the ARGUMENT is avl-tree, rb-tree is the default).])],
[case "$enableval" in
avl-tree)
AC_DEFINE([CSTL_MAP_AVL_TREE], [1], [Define to 1 if you implement map using avl-tree.])
;;
esac]
)
# CSTL_MULTIMAP_AVL_TREE : implement multimap using avl-tree.
AC_ARG_ENABLE(
[multimap-implementation],
[AS_HELP_STRING([--enable-multimap-implementation[=ARGUMENT]],[select multimap implementation(the ARGUMENT is avl-tree, rb-tree is the default).])],
[case "$enableval" in
avl-tree)
AC_DEFINE([CSTL_MULTIMAP_AVL_TREE], [1], [Define to 1 if you implement multimap using avl-tree.])
;;
esac]
)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
cstl/Makefile
src/Makefile
build-win/Makefile
build-win/vc8/Makefile
build-win/vc9/Makefile
test/Makefile
test/ut/Makefile
])
AC_OUTPUT