~drizzle-trunk/drizzle/development

575.4.7 by Monty Taylor
More header cleanup.
1
dnl -*- bash -*-
1 by brian
clean slate
2
dnl Process this file with autoconf to produce a configure script.
3
992.1.25 by Monty Taylor
Moved myisam to new plugin system.
4
dnl  Copyright (C) 2009 Sun Microsystems
5
dnl
6
dnl  This program is free software; you can redistribute it and/or modify
7
dnl  it under the terms of the GNU General Public License as published by
8
dnl  the Free Software Foundation; version 2 of the License.
9
dnl
10
dnl  This program is distributed in the hope that it will be useful,
11
dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
dnl  GNU General Public License for more details.
14
dnl
15
dnl  You should have received a copy of the GNU General Public License
16
dnl  along with this program; if not, write to the Free Software
17
dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
19
77.1.65 by Monty Taylor
We don't really require 2.61, 2.59 is actually fine.
20
AC_PREREQ(2.59)dnl		Minimum Autoconf version required.
1192.3.6 by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking.
21
dnl Version from the AC_INIT call below is overridden later
22
dnl So don't update it here
23
AC_INIT([drizzle],[7],[http://bugs.launchpad.net/drizzle])
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
24
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
25
AC_CONFIG_AUX_DIR([config])
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
26
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
27
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, require-cxx, force-gcc42, skip-visibility, version-from-vc)
873.2.41 by Monty Taylor
Fixed the ol build for ol Solaris.
28
1192.3.51 by Monty Taylor
Fixes the default datadir location.
29
dnl Set the default datadir location to /usr/local/var/drizzle. If a
30
dnl localstatedir is explicitly given, just use that.
31
AS_IF([test "x${localstatedir}" = 'x${prefix}/var'],[
32
  localstatedir='${prefix}/var/drizzle'
33
])
1 by brian
clean slate
34
873.2.4 by Monty Taylor
Fixed some configure errors.
35
AC_PATH_PROG(GPERF, gperf)
36
AS_IF([test "x$GPERF" = "x"],
917.1.5 by Monty Taylor
Added more verbose failure messages.
37
      AC_MSG_ERROR("Drizzle requires gperf to build."))
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
38
629.1.1 by Monty Taylor
More solaris fixes.
39
AC_CHECK_PROGS(YACC, ['bison -y'])
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
40
AS_IF([test "x$YACC" = "x" -a "$pandora_building_from_bzr" = "yes"],[
77.1.70 by Monty Taylor
Added a failure if you don't have bison and you're building from a .bzr branch.
41
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
1093.9.22 by Monty Taylor
Made bison check better.
42
])
1 by brian
clean slate
43
971.4.1 by Monty Taylor
GCC on Solaris build fixes.
44
1192.6.2 by Robert Collins
Merged in lifeless' fix for parallel lint and only linting changed files.
45
PANDORA_RUN_CPPLINT
919.2.22 by Monty Taylor
Fixed the latest stuff on Solaris.
46
1099.1.6 by Monty Taylor
pandora-build v0.25
47
PANDORA_REQUIRE_LIBPROTOBUF
1200.1.1 by Jay Pipes
Update required protobuf library version to 2.1.0
48
PANDORA_PROTOBUF_REQUIRE_VERSION([2.1.0])
1099.1.6 by Monty Taylor
pandora-build v0.25
49
PANDORA_REQUIRE_PROTOC
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
50
1081.1.1 by Monty Taylor
Whole boat-load of build fixes.
51
AC_LANG_PUSH(C++)
1192.3.28 by Monty Taylor
pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
52
PANDORA_REQUIRE_PTHREAD
1273.13.96 by Brian Aker
Merge Stewart.
53
PANDORA_REQUIRE_LIBUUID
1093.2.1 by Monty Taylor
pandora-build v0.16
54
PANDORA_REQUIRE_LIBDRIZZLE
1192.3.28 by Monty Taylor
pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
55
PANDORA_REQUIRE_LIBZ
56
PANDORA_REQUIRE_LIBPCRE
57
PANDORA_REQUIRE_LIBREADLINE
58
PANDORA_REQUIRE_LIBDL
1081.1.1 by Monty Taylor
Whole boat-load of build fixes.
59
AC_LANG_POP
779.1.15 by Monty Taylor
Added libdrizzle configure support.
60
1192.3.28 by Monty Taylor
pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
61
PANDORA_USE_BETTER_MALLOC
62
63
PANDORA_DRIZZLE_BUILD
1241.9.4 by Monty Taylor
Beginnings of what we need to do to support -fvisibility=hidden.
64
AC_DEFINE([BUILDING_DRIZZLE],[1],
65
          [Define indicating we are building and not consuming drizzle.])
1081.1.1 by Monty Taylor
Whole boat-load of build fixes.
66
1 by brian
clean slate
67
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
68
AC_ARG_WITH([server-suffix],
69
    [AS_HELP_STRING([--with-server-suffix],
70
      [Append value to the version string.])],
1192.3.41 by Monty Taylor
Removed more unused bits.
71
    [ DRIZZLE_SERVER_SUFFIX="$withval" ]
72
    [ DRIZZLE_SERVER_SUFFIX= ])
73
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
74
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
75
                   [Append value to the version string])
1 by brian
clean slate
76
1192.3.28 by Monty Taylor
pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
77
572.2.1 by ysano
Replace --with-mysqld-user configure option with --with-drizzled-user.
78
AC_ARG_WITH([drizzled-user],
79
    [AS_HELP_STRING([--with-drizzled-user=username],
80
            [What user the drizzled daemon shall be run as.
81
		@<:@default=drizzle@:>@])],
1192.3.41 by Monty Taylor
Removed more unused bits.
82
    [ DRIZZLED_USER="$withval" ],
83
    [ DRIZZLED_USER=drizzle ])
572.2.1 by ysano
Replace --with-mysqld-user configure option with --with-drizzled-user.
84
AC_SUBST(DRIZZLED_USER)
1 by brian
clean slate
85
86
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
87
AC_ARG_WITH([comment],
88
    [AS_HELP_STRING([--with-comment],
89
            [Comment about compilation environment. @<:@default=off@:>@])],
1 by brian
clean slate
90
    [with_comment=$withval],
91
    [with_comment=no])
1192.3.28 by Monty Taylor
pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
92
AS_IF([test "$with_comment" != "no"],[
1 by brian
clean slate
93
  COMPILATION_COMMENT=$with_comment
1192.3.28 by Monty Taylor
pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
94
],[
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
95
  COMPILATION_COMMENT="Source distribution (${PANDORA_RELEASE_COMMENT})"
1192.3.28 by Monty Taylor
pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
96
])
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
97
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
98
                   [Comment about compilation environment])
1 by brian
clean slate
99
1192.3.28 by Monty Taylor
pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
100
1 by brian
clean slate
101
#########################################################################
102
103
1093.9.13 by Monty Taylor
pandora-build v0.42 - Started splitting out plugin system into pandora-build
104
dnl Has to be done late, as the plugin may need to check for existence of
105
dnl functions tested above
1241.9.1 by Monty Taylor
Removed global.h. Fixed all the headers.
106
PANDORA_PLUGINS([drizzled/plugin/load_list.h])
1093.9.12 by Monty Taylor
Moved InnoDB specific code to InnoDB.
107
492.1.7 by Monty Taylor
Moved test() to its own file.
108
dnl GCC Precompiled Header Support
584.4.3 by Monty Taylor
Disabled pre-compiled headers for now.
109
dnl re-enable later
632.1.25 by Monty Taylor
Removed AM_CONDITIONAL from SEARCH_FOR_LIB. Aligned naming of AM_CONDITIONALS.
110
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
111
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
492.1.7 by Monty Taylor
Moved test() to its own file.
112
992.1.17 by Monty Taylor
Moved extra/ into root Makefile.am
113
AC_CONFIG_FILES(Makefile dnl
815.1.1 by Monty Taylor
Add timegm which is missing on Solaris.
114
 gnulib/Makefile dnl
575.2.2 by Monty Taylor
Moved vio stuff into libdrizzle.
115
 po/Makefile.in dnl
1192.3.67 by Monty Taylor
Added convenience Makefile for hudson compat.
116
 tests/Makefile dnl
1253.2.1 by Monty Taylor
Moved plugin versioning out of drizzled/configmake.h and into drizzled/plugin/version.h. Also fixed header include paths.
117
 drizzled/plugin/version.h dnl
1025.1.1 by Trond Norbye
Add configuration files to integrate to Solaris SMF
118
 support-files/drizzle.server support-files/drizzle-log-rotate
119
 support-files/smf/install.sh dnl
1286.1.2 by Brian Aker
Added very basic RPM support.
120
 support-files/drizzle.spec dnl
1025.1.1 by Trond Norbye
Add configuration files to integrate to Solaris SMF
121
 support-files/smf/drizzle.xml dnl
122
 support-files/smf/drizzle)
1 by brian
clean slate
123
512.2.2 by C.J. Adams-Collier
added checks to determine which threading plugins have been enabled on
124
scheduling_plugins_available="
125
  pool_of_threads 
126
  single_thread
127
"
128
129
for sched_plugin in $scheduling_plugins_available
130
do
131
  varname="\${with_plugin_${sched_plugin}}"
132
  result=`eval "echo $varname"`
133
  if test "x$result" = "xyes"
134
  then
135
    scheduling_plugins="$sched_plugin $scheduling_plugins"
136
  fi
137
done
138
1 by brian
clean slate
139
AC_OUTPUT
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
140
141
echo "---"
1192.3.6 by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking.
142
echo "Configuration summary for $PACKAGE_NAME version $VERSION $PANDORA_RELEASE_COMMENT"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
143
echo ""
144
echo "   * Installation prefix:       $prefix"
1081.1.1 by Monty Taylor
Whole boat-load of build fixes.
145
echo "   * System type:               $host_vendor-$host_os"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
146
echo "   * Host CPU:                  $host_cpu"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
147
echo "   * C Compiler:                $CC_VERSION"
632.1.21 by Monty Taylor
Cleaned up compiler version checking.
148
echo "   * C++ Compiler:              $CXX_VERSION"
1085.1.3 by Monty Taylor
Split out warnings - start using the pandora build system.
149
echo "   * Build auth_pam:            $ac_cv_libpam"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
150
echo "   * Assertions enabled:        $ac_cv_assert"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
151
echo "   * Debug enabled:             $with_debug"
152
echo "   * Profiling enabled:         $ac_profiling"
153
echo "   * Coverage enabled:          $ac_coverage"
1085.1.3 by Monty Taylor
Split out warnings - start using the pandora build system.
154
echo "   * Warnings as failure:       $ac_cv_warnings_as_errors"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
155
echo "   * C++ cstdint location:      $ac_cv_cxx_cstdint"
156
echo "   * C++ hash_map location:     $ac_cv_cxx_hash_map"
157
echo "   * C++ hash namespace:        $ac_cv_cxx_hash_namespace"
919.2.19 by Monty Taylor
Added check for shared_ptr in advance of actually thinking about using it. I think this should cover all platforms we care about... but let's doublecheck.
158
echo "   * C++ shared_ptr namespace:  $ac_cv_shared_ptr_namespace"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
159
echo ""
160
echo "---"
908.1.4 by Monty Taylor
Fix to fake-out libtoolize, since AC_INIT is in bzr_version.m4 now.
161
162
dnl libtoolize scans configure.ac  and needs to see some text
163
m4_define([LIBTOOLIZE_AC_INIT], [])