~eday/drizzle/eday-dev

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Eric Day
  • Date: 2010-01-07 20:02:38 UTC
  • mfrom: (971.3.291 staging)
  • Revision ID: eday@oddments.org-20100107200238-uqw8v6kv9pl7nny5
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
AC_CONFIG_HEADERS([config.h])
27
27
AC_CONFIG_MACRO_DIR([m4])
28
28
 
29
 
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, use-gnulib, require-cxx, force-gcc42)
30
 
PANDORA_VC_VERSION
 
29
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, use-gnulib, require-cxx, force-gcc42, skip-visibility, version-from-vc)
31
30
 
 
31
dnl Set the default datadir location to /usr/local/var/drizzle. If a
 
32
dnl localstatedir is explicitly given, just use that.
 
33
AS_IF([test "x${localstatedir}" = 'x${prefix}/var'],[
 
34
  localstatedir='${prefix}/var/drizzle'
 
35
])
32
36
 
33
37
AC_PATH_PROG(GPERF, gperf)
34
38
AS_IF([test "x$GPERF" = "x"],
60
64
PANDORA_USE_BETTER_MALLOC
61
65
 
62
66
PANDORA_DRIZZLE_BUILD
 
67
AC_DEFINE([BUILDING_DRIZZLE],[1],
 
68
          [Define indicating we are building and not consuming drizzle.])
63
69
 
64
70
 
65
71
AC_ARG_WITH([server-suffix],
66
72
    [AS_HELP_STRING([--with-server-suffix],
67
73
      [Append value to the version string.])],
68
 
    [ DRIZZLE_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
69
 
    [ DRIZZLE_SERVER_SUFFIX= ]
70
 
    )
 
74
    [ DRIZZLE_SERVER_SUFFIX="$withval" ]
 
75
    [ DRIZZLE_SERVER_SUFFIX= ])
 
76
 
71
77
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
72
78
                   [Append value to the version string])
73
79
 
74
80
 
75
 
# The port that was assigned by IANA.
76
 
DRIZZLE_TCP_PORT_DEFAULT=4427
77
 
 
78
 
 
79
 
AC_ARG_WITH([tcp-port],
80
 
    [AS_HELP_STRING([--with-tcp-port=port-number],
81
 
            [Which port to use for Drizzle TCP services @<:@default=4427@:>@])],
82
 
    [ DRIZZLE_TCP_PORT=$withval ],
83
 
    [ DRIZZLE_TCP_PORT=$DRIZZLE_TCP_PORT_DEFAULT
84
 
      # if we actually defaulted (as opposed to the pathological case of
85
 
      # --with-tcp-port=<DRIZZLE_TCP_PORT_DEFAULT> which might in theory
86
 
      # happen if whole batch of servers was built from a script), set
87
 
      # the default to zero to indicate that; we don't lose information
88
 
      # that way, because 0 obviously indicates that we can get the
89
 
      # default value from DRIZZLE_TCP_PORT. this seems really evil, but
90
 
      # testing for DRIZZLE_TCP_PORT==DRIZZLE_TCP_PORT_DEFAULT would make a
91
 
      # a port of DRIZZLE_TCP_PORT_DEFAULT magic even if the builder did not
92
 
      # intend it to mean "use the default, in fact, look up a good default
93
 
      # from /etc/services if you can", but really, really meant 4427 when
94
 
      # they passed in 4427. When they pass in a specific value, let them
95
 
      # have it; don't second guess user and think we know better, this will
96
 
      # just make people cross.  this makes the the logic work like this
97
 
      # (which is complicated enough):
98
 
      #
99
 
      # - if a port was set during build, use that as a default.
100
 
      #
101
 
      # - otherwise, try to look up a port in /etc/services; if that fails,
102
 
      #   use DRIZZLE_TCP_PORT_DEFAULT (at the time of this writing 4427)
103
 
      #
104
 
      # - allow the DRIZZLE_TCP_PORT environment variable to override that.
105
 
      #
106
 
      # - allow command-line parameters to override all of the above.
107
 
      #
108
 
      # the top-most DRIZZLE_TCP_PORT_DEFAULT is read from win/configure.js,
109
 
      # so don't mess with that.
110
 
      DRIZZLE_TCP_PORT_DEFAULT=0 ]
111
 
    )
112
 
 
113
 
AC_SUBST(DRIZZLE_TCP_PORT)
114
 
AC_SUBST(DRIZZLE_TCP_PORT_DEFAULT)
115
 
AC_DEFINE_UNQUOTED([DRIZZLE_TCP_PORT],[$DRIZZLE_TCP_PORT],
116
 
                   [Drizzle port to use])
117
 
AC_DEFINE_UNQUOTED([DRIZZLE_TCP_PORT_DEFAULT],[$DRIZZLE_TCP_PORT_DEFAULT],
118
 
                   [If we defaulted to DRIZZLE_PORT, then this will be zero])
119
 
 
120
 
 
121
 
# Use this to set the place used for unix socket used to local communication.
122
81
AC_ARG_WITH([drizzled-user],
123
82
    [AS_HELP_STRING([--with-drizzled-user=username],
124
83
            [What user the drizzled daemon shall be run as.
125
84
                @<:@default=drizzle@:>@])],
126
 
    [ DRIZZLED_USER=$withval ],
127
 
    [ DRIZZLED_USER=drizzle ]
128
 
    )
 
85
    [ DRIZZLED_USER="$withval" ],
 
86
    [ DRIZZLED_USER=drizzle ])
129
87
AC_SUBST(DRIZZLED_USER)
130
88
 
131
 
# If we should allow LOAD DATA LOCAL
132
 
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
133
 
AC_ARG_ENABLE(local-infile,
134
 
    [  --enable-local-infile   Enable LOAD DATA LOCAL INFILE (default: disabled)],
135
 
    [ ENABLED_LOCAL_INFILE=$enableval ],
136
 
    [ ENABLED_LOCAL_INFILE=no ]
137
 
    )
138
 
if test "$ENABLED_LOCAL_INFILE" = "yes"
139
 
then
140
 
  AC_MSG_RESULT([yes])
141
 
  AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
142
 
            [If LOAD DATA LOCAL INFILE should be enabled by default])
143
 
else
144
 
  AC_MSG_RESULT([no])
145
 
fi
146
89
 
147
90
AC_ARG_WITH([comment],
148
91
    [AS_HELP_STRING([--with-comment],
158
101
                   [Comment about compilation environment])
159
102
 
160
103
 
161
 
AC_ARG_WITH([max-indexes],
162
 
            AS_HELP_STRING([--with-max-indexes=N],
163
 
                           [Sets the maximum number of indexes per table, default 64]),
164
 
            [max_indexes="$withval"],
165
 
            [max_indexes=64])
166
 
AC_MSG_CHECKING([max indexes per table])
167
 
AC_DEFINE_UNQUOTED([MAX_INDEXES], [$max_indexes],
168
 
                   [Maximum number of indexes per table])
169
 
AC_MSG_RESULT([$max_indexes])
170
 
 
171
 
 
172
104
#########################################################################
173
105
 
174
106
 
175
107
dnl Has to be done late, as the plugin may need to check for existence of
176
108
dnl functions tested above
177
 
PANDORA_PLUGINS([drizzled/plugin/config.h])
 
109
PANDORA_PLUGINS([drizzled/plugin/load_list.h])
178
110
 
179
111
dnl GCC Precompiled Header Support
180
112
dnl re-enable later
184
116
AC_CONFIG_FILES(Makefile dnl
185
117
 gnulib/Makefile dnl
186
118
 po/Makefile.in dnl
187
 
 drizzled/hash/Makefile dnl
188
 
 drizzled/util/Makefile dnl
189
 
 drizzled/message/Makefile dnl
190
 
 drizzled/Makefile dnl
191
 
 support-files/Makefile dnl
192
 
 tests/Makefile tests/install_test_db dnl
 
119
 tests/Makefile dnl
 
120
 drizzled/plugin/version.h dnl
193
121
 support-files/drizzle.server support-files/drizzle-log-rotate
194
 
 support-files/smf/Makefile dnl
195
122
 support-files/smf/install.sh dnl
196
123
 support-files/smf/drizzle.xml dnl
197
124
 support-files/smf/drizzle)