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
|
dnl -*- bash -*-
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) 2009 Sun Microsystems
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; version 2 of the License.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
AC_PREREQ(2.59)dnl Minimum Autoconf version required.
dnl Version from the AC_INIT call below is overridden later
dnl So don't update it here
AC_INIT([drizzle],[7],[http://bugs.launchpad.net/drizzle])
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, use-gnulib, require-cxx, force-gcc42, skip-visibility, version-from-vc)
dnl Set the default datadir location to /usr/local/var/drizzle. If a
dnl localstatedir is explicitly given, just use that.
AS_IF([test "x${localstatedir}" = 'x${prefix}/var'],[
localstatedir='${prefix}/var/drizzle'
])
AC_PATH_PROG(GPERF, gperf)
AS_IF([test "x$GPERF" = "x"],
AC_MSG_ERROR("Drizzle requires gperf to build."))
AC_CHECK_PROGS(YACC, ['bison -y'])
AS_IF([test "x$YACC" = "x" -a "$ac_cv_building_from_bzr" = "yes"],[
AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
])
PANDORA_WITH_GETTEXT
PANDORA_RUN_CPPLINT
PANDORA_REQUIRE_LIBPROTOBUF
PANDORA_PROTOBUF_REQUIRE_VERSION([2.1.0])
PANDORA_REQUIRE_PROTOC
AC_LANG_PUSH(C++)
PANDORA_REQUIRE_PTHREAD
PANDORA_REQUIRE_LIBUUID
PANDORA_REQUIRE_LIBDRIZZLE
PANDORA_REQUIRE_LIBZ
PANDORA_REQUIRE_LIBPCRE
PANDORA_REQUIRE_LIBREADLINE
PANDORA_REQUIRE_LIBDL
AC_LANG_POP
PANDORA_USE_BETTER_MALLOC
PANDORA_DRIZZLE_BUILD
AC_ARG_WITH([server-suffix],
[AS_HELP_STRING([--with-server-suffix],
[Append value to the version string.])],
[ DRIZZLE_SERVER_SUFFIX="$withval" ]
[ DRIZZLE_SERVER_SUFFIX= ])
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
[Append value to the version string])
AC_ARG_WITH([drizzled-user],
[AS_HELP_STRING([--with-drizzled-user=username],
[What user the drizzled daemon shall be run as.
@<:@default=drizzle@:>@])],
[ DRIZZLED_USER="$withval" ],
[ DRIZZLED_USER=drizzle ])
AC_SUBST(DRIZZLED_USER)
AC_ARG_WITH([comment],
[AS_HELP_STRING([--with-comment],
[Comment about compilation environment. @<:@default=off@:>@])],
[with_comment=$withval],
[with_comment=no])
AS_IF([test "$with_comment" != "no"],[
COMPILATION_COMMENT=$with_comment
],[
COMPILATION_COMMENT="Source distribution (${PANDORA_RELEASE_COMMENT})"
])
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
[Comment about compilation environment])
AC_ARG_WITH([max-indexes],
AS_HELP_STRING([--with-max-indexes=N],
[Sets the maximum number of indexes per table, default 64]),
[max_indexes="$withval"],
[max_indexes=64])
AC_MSG_CHECKING([max indexes per table])
AC_DEFINE_UNQUOTED([MAX_INDEXES], [$max_indexes],
[Maximum number of indexes per table])
AC_MSG_RESULT([$max_indexes])
#########################################################################
dnl Has to be done late, as the plugin may need to check for existence of
dnl functions tested above
PANDORA_PLUGINS([drizzled/plugin/config.h])
dnl GCC Precompiled Header Support
dnl re-enable later
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
AC_CONFIG_FILES(Makefile dnl
gnulib/Makefile dnl
po/Makefile.in dnl
tests/Makefile dnl
support-files/drizzle.server support-files/drizzle-log-rotate
support-files/smf/install.sh dnl
support-files/smf/drizzle.xml dnl
support-files/smf/drizzle)
scheduling_plugins_available="
pool_of_threads
single_thread
"
for sched_plugin in $scheduling_plugins_available
do
varname="\${with_plugin_${sched_plugin}}"
result=`eval "echo $varname"`
if test "x$result" = "xyes"
then
scheduling_plugins="$sched_plugin $scheduling_plugins"
fi
done
AC_OUTPUT
echo "---"
echo "Configuration summary for $PACKAGE_NAME version $VERSION $PANDORA_RELEASE_COMMENT"
echo ""
echo " * Installation prefix: $prefix"
echo " * System type: $host_vendor-$host_os"
echo " * Host CPU: $host_cpu"
echo " * C Compiler: $CC_VERSION"
echo " * C++ Compiler: $CXX_VERSION"
echo " * Build auth_pam: $ac_cv_libpam"
echo " * Assertions enabled: $ac_cv_assert"
echo " * Debug enabled: $with_debug"
echo " * Profiling enabled: $ac_profiling"
echo " * Coverage enabled: $ac_coverage"
echo " * Warnings as failure: $ac_cv_warnings_as_errors"
echo " * C++ cstdint location: $ac_cv_cxx_cstdint"
echo " * C++ hash_map location: $ac_cv_cxx_hash_map"
echo " * C++ hash namespace: $ac_cv_cxx_hash_namespace"
echo " * C++ shared_ptr namespace: $ac_cv_shared_ptr_namespace"
echo ""
echo "---"
dnl libtoolize scans configure.ac and needs to see some text
m4_define([LIBTOOLIZE_AC_INIT], [])
|