35
35
awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
37
37
# The port should be constant for a LONG time
38
MYSQL_TCP_PORT_DEFAULT=4427
38
DRIZZLE_TCP_PORT_DEFAULT=4427
41
41
sinclude(m4/alloca.m4)
620
620
AC_ARG_WITH([tcp-port],
621
621
[AS_HELP_STRING([--with-tcp-port=port-number],
622
622
[Which port to use for Drizzle services @<:@default=4427@:>@])],
623
[ MYSQL_TCP_PORT=$withval ],
624
[ MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT
623
[ DRIZZLE_TCP_PORT=$withval ],
624
[ DRIZZLE_TCP_PORT=$DRIZZLE_TCP_PORT_DEFAULT
625
625
# if we actually defaulted (as opposed to the pathological case of
626
# --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory
626
# --with-tcp-port=<DRIZZLE_TCP_PORT_DEFAULT> which might in theory
627
627
# happen if whole batch of servers was built from a script), set
628
628
# the default to zero to indicate that; we don't lose information
629
629
# that way, because 0 obviously indicates that we can get the
630
# default value from MYSQL_TCP_PORT. this seems really evil, but
631
# testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a
632
# a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not
630
# default value from DRIZZLE_TCP_PORT. this seems really evil, but
631
# testing for DRIZZLE_TCP_PORT==DRIZZLE_TCP_PORT_DEFAULT would make a
632
# a port of DRIZZLE_TCP_PORT_DEFAULT magic even if the builder did not
633
633
# intend it to mean "use the default, in fact, look up a good default
634
634
# from /etc/services if you can", but really, really meant 4427 when
635
635
# they passed in 4427. When they pass in a specific value, let them
640
640
# - if a port was set during build, use that as a default.
642
642
# - otherwise, try to look up a port in /etc/services; if that fails,
643
# use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 4427)
643
# use DRIZZLE_TCP_PORT_DEFAULT (at the time of this writing 4427)
645
# - allow the MYSQL_TCP_PORT environment variable to override that.
645
# - allow the DRIZZLE_TCP_PORT environment variable to override that.
647
647
# - allow command-line parameters to override all of the above.
649
# the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js,
649
# the top-most DRIZZLE_TCP_PORT_DEFAULT is read from win/configure.js,
650
650
# so don't mess with that.
651
MYSQL_TCP_PORT_DEFAULT=0 ]
651
DRIZZLE_TCP_PORT_DEFAULT=0 ]
653
AC_SUBST(MYSQL_TCP_PORT)
653
AC_SUBST(DRIZZLE_TCP_PORT)
654
654
# We might want to document the assigned port in the manual.
655
AC_SUBST(MYSQL_TCP_PORT_DEFAULT)
655
AC_SUBST(DRIZZLE_TCP_PORT_DEFAULT)
657
657
# Use this to set the place used for unix socket used to local communication.
658
658
AC_ARG_WITH([mysqld-user],