26
26
AC_CONFIG_HEADERS([config.h])
27
27
AC_CONFIG_MACRO_DIR([m4])
29
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, use-gnulib, require-cxx, force-gcc42)
29
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, use-gnulib, require-cxx, force-gcc42, skip-visibility, version-from-vc)
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'
33
37
AC_PATH_PROG(GPERF, gperf)
34
38
AS_IF([test "x$GPERF" = "x"],
65
69
AC_ARG_WITH([server-suffix],
66
70
[AS_HELP_STRING([--with-server-suffix],
67
71
[Append value to the version string.])],
68
[ DRIZZLE_SERVER_SUFFIX=`echo "$withval" | sed -e 's/^\(...................................\)..*$/\1/'` ],
69
[ DRIZZLE_SERVER_SUFFIX= ]
72
[ DRIZZLE_SERVER_SUFFIX="$withval" ]
73
[ DRIZZLE_SERVER_SUFFIX= ])
71
75
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
72
76
[Append value to the version string])
75
# The port that was assigned by IANA.
76
DRIZZLE_TCP_PORT_DEFAULT=4427
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):
99
# - if a port was set during build, use that as a default.
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)
104
# - allow the DRIZZLE_TCP_PORT environment variable to override that.
106
# - allow command-line parameters to override all of the above.
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 ]
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])
121
# Use this to set the place used for unix socket used to local communication.
122
79
AC_ARG_WITH([drizzled-user],
123
80
[AS_HELP_STRING([--with-drizzled-user=username],
124
81
[What user the drizzled daemon shall be run as.
125
82
@<:@default=drizzle@:>@])],
126
[ DRIZZLED_USER=$withval ],
127
[ DRIZZLED_USER=drizzle ]
83
[ DRIZZLED_USER="$withval" ],
84
[ DRIZZLED_USER=drizzle ])
129
85
AC_SUBST(DRIZZLED_USER)
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 ]
138
if test "$ENABLED_LOCAL_INFILE" = "yes"
141
AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
142
[If LOAD DATA LOCAL INFILE should be enabled by default])
147
88
AC_ARG_WITH([comment],
148
89
[AS_HELP_STRING([--with-comment],