-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure.in
More file actions
197 lines (153 loc) · 4.64 KB
/
configure.in
File metadata and controls
197 lines (153 loc) · 4.64 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
AC_INIT(STLdb4/stldb4.hh)
HAVE_CORRECT_ARGS=yes
AC_ARG_ENABLE(wrapdebug,
[--enable-wrapdebug embedded db4.1 option],
[ echo -n "" ],
[ echo -n "" ],
])
dnl AC_ARG_ENABLE(wrapdebug,
dnl [--enable-wrapdebug Option that is needed for use of embedded db4.1],
dnl [ echo -n "" ],
dnl [
dnl HAVE_CORRECT_ARGS=no
dnl ])
AC_ARG_ENABLE(rpc,
[--enable-rpc Option that is needed for use of embedded db4.1],
[ echo -n "" ],
[])
AC_ARG_WITH(uniquename,
[ --with-uniquename=stldb4 Option that is needed for use of embedded db4.1],
[ FOOEY="$withval" ],
[ HAVE_CORRECT_ARGS=no ] )
if test "x$HAVE_CORRECT_ARGS" = "xno"; then
AC_MSG_ERROR([Fatal Error: Run configure with atleast --enable-wrapdebug --enable-rpc --with-uniquename=stldb4 ])
fi
STLDB4_MAJOR=0
STLDB4_MINOR=6
STLDB4_BETA=0
AC_SUBST(STLDB4_MAJOR)
AC_SUBST(STLDB4_MINOR)
AC_SUBST(STLDB4_BETA)
cd ${srcdir}; absolute_srcdir=`pwd`; cd -;
LIBSTLDB4_LA=" \$(top_builddir)/STLdb4/libstldb4.la "
AC_SUBST(LIBSTLDB4_LA)
STLDB4_VERSION=$STLDB4_MAJOR.$STLDB4_MINOR.$STLDB4_BETA
STLDB4_FULLV=$STLDB4_VERSION
AC_SUBST(STLDB4_FULLV)
AC_SUBST(STLDB4_VERSION)
VERSION_INFO="-release $STLDB4_MAJOR$STLDB4_MINOR:0:0"
AC_SUBST(VERSION_INFO)
dnl libtool versioning
LT_RELEASE=$STLDB4_MAJOR.$STLDB4_MINOR
AC_SUBST(LT_RELEASE)
VERSION=$STLDB4_VERSION
PACKAGE=stldb4
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_ISC_POSIX
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_STDC_HEADERS
AC_SYS_LARGEFILE
#AC_ARG_PROGRAM
#AC_DISABLE_FAST_INSTALL
AC_DISABLE_STATIC
AM_PROG_LIBTOOL
STLDB4_CF=" -O3 -pipe -DNDEBUG -I/nothing -DG_DISABLE_ASSERT -ffast-math "
STLDB4_LD=""
smartptr_assert=""
AC_ARG_ENABLE(wrapdebug,
[--enable-wrapdebug compile with -g and -O0 debug information],
[
if test x$enableval = xyes; then
echo setting debug mode to on...;
STLDB4_CF=" -O0 -g -pipe -Wall ";
smartptr_assert="if( !val ) { assert(val); }";
else
echo setting debug mode to off...
fi
])
AC_ARG_ENABLE(profile,
[--enable-profile compile with profile debug information],
[
if test x$enableval = xyes; then
echo setting profile mode to on...
STLDB4_CF=" -O0 -g -pg -fprofile-arcs -ftest-coverage ";
else
echo setting profile mode to off...
fi
])
AC_SUBST( STLDB4_SMARTPTR_ASSERT, $smartptr_assert )
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
AM_FERRIS_LOKI( 2.1.0 )
AM_FERRIS_STREAMS( 0.4.0 )
###############################################################################
###############################################################################
###############################################################################
###############################################################################
CFLAGS=" $CFLAGS $STLDB4_CF $LOKI_CFLAGS "
CXXFLAGS=" $CXXFLAGS $STLDB4_CF $LOKI_CFLAGS "
LDFLAGS=" $LDFLAGS $STLDB4_LD $LOKI_LIBS -lpthread "
AC_ARG_ENABLE(hiddensymbols,
[--enable-hiddensymbols use hidden symbols for private APIs],
[
if test x$enableval = xyes; then
echo setting hidden symbol support...;
CXXFLAGS=" $CXXFLAGS -DGCC_HASCLASSVISIBILITY -fvisibility=hidden -fvisibility-inlines-hidden ";
AC_DEFINE(GCC_HASCLASSVISIBILITY)
fi
])
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(CXXCPPFLAGS)
REQUIREMENTS="ferrisloki >= 2.0.3 ferrisstreams >= 0.3.6 "
if test x"$have_stlport" = xyes; then
REQUIREMENTS="$REQUIREMENTS stlport >= 4.5.3"
fi
AC_SUBST(REQUIREMENTS)
AC_CONFIG_SUBDIRS( db-4.6.21/build_unix )
#
# All done.
#
AC_OUTPUT([
Makefile
db-4.6.21/Makefile
STLdb4/Makefile
testsuite/Makefile
testsuite/config/Makefile
testsuite/stldb4.test/Makefile
testsuite/sampledata/Makefile
stldb4.spec
stldb4.pc
stldb4-config
],
[
chmod +x stldb4-config
])
echo "
Configuration:
Source code location: ${srcdir}
Compiler: ${CC}
CFLAGS: ${CFLAGS}
LDFLAGS: ${LDFLAGS}
IOSIZE: ${IOSIZE}
"
if test x"$IOSIZE" = x32; then
echo " WARNING, 32bit IO. Will only work for files and data <2Gb in size"
fi
echo "
The $PACKAGE version $STLDB4_VERSION software package is GPLv3+
and Copyright (C) 2003-2010 Ben Martin
"