-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
103 lines (92 loc) · 3.22 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
# -*- Autoconf -*-
# Feijuca - A generic algorithms and data structures library
# Copyright (C) 2005 - Ronaldo Faria Lima
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
# USA
#
# Author: Ronaldo Faria Lima <[email protected]>
# $Id: configure.ac,v 1.21 2006-02-04 16:06:42 harq_al_ada Exp $
AC_PREREQ(2.68)
AC_INIT([feijuca], [1.0.0], [[email protected]])
AM_INIT_AUTOMAKE([subdir-objects])
AM_SILENT_RULES([yes])
LT_INIT
AC_CONFIG_SRCDIR([include/fjc_common.h])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
# Creates conditionals for the library. This is used to let you
# compile the library without any optmization and with all debug
# information inside
# Create the ability to put debugging code into the library
AC_ARG_ENABLE(debug,
[ --enable-debug Turn on debugging of the library],
[case "${enableval}" in
yes) debug=true;;
no) debug=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug);;
esac], [debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
if test x$debug = xtrue; then
AC_SUBST([CFLAGS], [-g])
else
AC_SUBST([CFLAGS], [-DNDEBUG])
fi
# Disable assertions for debugging purposes
AC_ARG_ENABLE(assertions,
[ --disable-assertions Disable assertions in the code],
[case "${enableval}" in
no) assertions=true;;
yes) assertions=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-assertions);;
esac], [assertions=false])
AM_CONDITIONAL(DEBUG, test x$assertions = xtrue)
if test x$assertions = xtrue; then
AC_SUBST([CFLAGS], [-DNDEBUG])
fi
# Create the ability to profile the library
AC_ARG_ENABLE(profiling,
[ --enable-profiling Turn on profiling of the library],
[case "${enableval}" in
yes) profiling=true;;
no) profiling=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling);;
esac], [profiling=false])
AM_CONDITIONAL(DEBUG, test x$profiling = xtrue)
if test x$profiling = xtrue; then
AC_SUBST([CFLAGS], [-pg])
fi
AC_CONFIG_FILES([Makefile
src/Makefile
src/list/Makefile
src/dlist/Makefile
src/clist/Makefile
src/ivector/Makefile
src/stack/Makefile
src/queue/Makefile
src/deque/Makefile
src/dclist/Makefile
doc/Makefile])
AC_OUTPUT