2
2
dnl Process this file with autoconf to produce a configure script.
4
AC_PREREQ(2.52)dnl Minimum Autoconf version required.
4
# Minimum Autoconf version required.
7
dnl Various people throughout the community may parse configure.in to
8
dnl get the MySQL version from the source branch. If the formatting
9
dnl of this line is going to be changed, please announce the change to
10
dnl internals@lists.mysql.com in advance of pushing the change.
12
dnl When changing the major version number please also check the switch
13
dnl statement in mysqlbinlog::check_master_version(). You may also need
14
dnl to update version.c in ndb.
15
AC_INIT([MySQL Server], [5.1.61], [], [mysql])
17
AC_CONFIG_SRCDIR([sql/mysqld.cc])
8
# The Docs Makefile.am parses this line!
9
# remember to also update version.c in ndb
11
# When changing major version number please also check switch statement
12
# in mysqlbinlog::check_master_version().
13
AM_INIT_AUTOMAKE(mysql, 5.1.41)
14
AM_CONFIG_HEADER([include/config.h:config.h.in])
19
# USTAR format gives us the possibility to store longer path names in
20
# TAR files, the path name is split into two parts, a 155 chacater
21
# first part and a 100 character second part.
22
AM_INIT_AUTOMAKE([1.9 tar-ustar])
25
AM_CONFIG_HEADER([include/config.h])
27
# Request support for automake silent-rules if available.
28
# Default to verbose output. One can use the configure-time
29
# option --enable-silent-rules or make V=0 to activate
31
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
16
33
PROTOCOL_VERSION=10
25
42
# Remember that regexps needs to quote [ and ] since this is run through m4
26
43
# We take some made up examples
28
# VERSION 5.1.40sp1-alpha 5.0.34a
29
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a
30
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34
31
# MYSQL_BASE_VERSION 5.1 5.0
32
# MYSQL_VERSION_ID 50140 50034
45
# VERSION 5.1.40sp1-alpha 5.0.34a 5.5.1-m2
46
# MYSQL_U_SCORE_VERSION 5.1.40sp1_alpha 5.0.34a 5.5.1_m2
47
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a 5.5.1
48
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 5.5.1
49
# MYSQL_BASE_VERSION 5.1 5.0 5.5
50
# MYSQL_VERSION_ID 50140 50034 50501
52
MYSQL_U_SCORE_VERSION=`echo $VERSION | sed -e "s|-|_|"`
34
53
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
35
54
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
36
55
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
46
65
MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock"
68
sinclude(config/ac-macros/maintainer.m4)
49
69
sinclude(config/ac-macros/alloca.m4)
50
70
sinclude(config/ac-macros/check_cpu.m4)
51
71
sinclude(config/ac-macros/character_sets.m4)
82
103
AC_SUBST(SHARED_LIB_VERSION)
83
104
AC_SUBST(AVAILABLE_LANGUAGES)
106
# Check whether a debug mode should be enabled.
108
AS_HELP_STRING([--with-debug@<:@=full@:>@],
109
[Enable various amounts of debugging support (full adds a slow memory checker).]),
110
[with_debug=$withval],
113
# Whether the maintainer mode should be enabled.
86
116
# Canonicalize the configuration name.
255
285
AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf)
256
286
AC_CHECK_PROG(DVIS, tex, manual.dvi)
258
#check the return type of sprintf
259
AC_MSG_CHECKING("return type of sprintf")
265
if((int)sprintf(buf, s) == strlen(s))
271
[AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
272
AC_MSG_RESULT("int")],
278
if((char*)sprintf(buf,s) == buf + strlen(s))
282
[AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf])
283
AC_MSG_RESULT("ptr")],
284
[AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf])
285
AC_MSG_RESULT("garbage")]
287
# Cross compile, assume POSIX
288
[AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
289
AC_MSG_RESULT("int (we assume)")]
292
288
AC_PATH_PROG(uname_prog, uname, no)
294
290
# We should go through this and put all the explictly system dependent
820
816
AC_HEADER_SYS_WAIT
821
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h ieeefp.h limits.h \
822
memory.h pwd.h select.h \
817
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h fpu_control.h \
818
ieeefp.h limits.h memory.h pwd.h select.h \
823
819
stdlib.h stddef.h \
824
820
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
825
821
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
915
911
AC_SUBST(WRAPLIBS)
917
if test "$TARGET_LINUX" = "true"; then
919
[ --with-pstack Use the pstack backtrace library],
920
[ USE_PSTACK=$withval ],
924
if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386"
926
have_libiberty= have_libbfd=
928
dnl I have no idea if this is a good test - can not find docs for libiberty
929
AC_CHECK_LIB([iberty], [fdmatch],
931
AC_CHECK_LIB([bfd], [bfd_openr], [have_libbfd=yes], , [-liberty])])
934
if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes
937
pstack_libs="../pstack/libpstack.a -lbfd -liberty"
938
# We must link staticly when using pstack
939
with_mysqld_ldflags="-all-static"
940
AC_SUBST([pstack_dir])
941
AC_SUBST([pstack_libs])
942
AC_DEFINE([USE_PSTACK], [1], [the pstack backtrace library])
943
dnl This check isn't needed, but might be nice to give some feedback....
944
dnl AC_CHECK_HEADER(libiberty.h,
945
dnl have_libiberty_h=yes,
946
dnl have_libiberty_h=no)
954
AC_MSG_CHECKING([if we should use pstack])
955
AC_MSG_RESULT([$USE_PSTACK])
957
913
# Check for gtty if termio.h doesn't exists
958
914
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
1182
1138
sql/Makefile.in)
1183
1139
# Use gen_lex_hash.linux instead of gen_lex_hash
1184
1140
# Add library dependencies to mysqld_DEPENDENCIES
1185
lib_DEPENDENCIES="\$(pstack_libs) \$(openssl_libs) \$(yassl_libs)"
1141
lib_DEPENDENCIES="\$(openssl_libs) \$(yassl_libs)"
1186
1142
cat > $filesed << EOF
1187
1143
s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux,
1188
1144
s%\(mysqld_DEPENDENCIES = \)%\1$lib_DEPENDENCIES %
1709
1660
CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
1663
AC_ARG_WITH([valgrind],
1664
[AS_HELP_STRING([--with-valgrind],
1665
[Valgrind instrumentation @<:@default=no@:>@])],
1666
[], [with_valgrind=no])
1668
if test "$with_valgrind" != "no"
1670
AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
1671
[AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
1712
1674
# Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it.
1713
1675
AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
1714
1676
AC_ARG_ENABLE(debug_sync,
1923
1885
MYSQL_CHECK_TIME_T
1888
dnl check size of time_t
1891
AC_CHECK_SIZEOF(time_t, 8)
1892
if test "$ac_cv_sizeof_time_t" -eq 0
1894
AC_MSG_ERROR("MySQL needs a time_t type.")
1926
1897
# do we need #pragma interface/#pragma implementation ?
1927
1898
# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin
1992
1963
[AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
1994
1965
AC_CHECK_FUNCS(strlcat strlcpy)
1995
AC_CHECK_FUNCS(issetugid)
1966
AC_CHECK_FUNCS(issetugid getuid geteuid getgid getegid)
1996
1967
AC_CHECK_FUNCS(fgetln)
1997
1968
AC_CHECK_FUNCS(getline flockfile)
2071
2042
AC_FUNC_UTIME_NULL
2072
2043
AC_FUNC_VPRINTF
2074
AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
2045
AC_CHECK_DECLS([fdatasync, bzero])
2047
AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
2075
2048
chsize cuserid fchmod fcntl \
2076
2049
fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
2077
2050
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
2088
2061
sighold sigset sigthreadmask port_create sleep \
2089
2062
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
2090
2063
strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
2091
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
2064
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack \
2693
2667
# if there is no readline, but we want to build with readline, we fail
2694
if [test "$want_to_use_readline" = "yes"] && [test ! -d "./cmd-line-utils/readline"]
2668
if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"]
2696
2670
AC_MSG_ERROR([This commercially licensed MySQL source package can't
2697
2671
be built with libreadline. Please use --with-libedit to use
2737
2711
MAN_DROP="$MAN_DROP embedded"
2738
2712
grep -v 'embedded' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
2740
if test X"$with_plugin_innobase" != Xyes
2714
if test X"$with_plugin_innobase" != Xyes -a X"$with_plugin_innodb_plugin" != Xyes
2742
2716
MAN_DROP="$MAN_DROP innodb"
2743
2717
grep -v 'inno' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
2818
2792
# "innochecksum" is not in the "innobase/" subdirectory, but should be switched
2819
AM_CONDITIONAL([BUILD_INNODB_TOOLS], [test X"$with_plugin_innobase" = Xyes])
2793
AM_CONDITIONAL([BUILD_INNODB_TOOLS], [test X"$with_plugin_innobase" = Xyes -o X"$with_plugin_innodb_plugin" = Xyes ])
2821
2795
# IMPORTANT - do not modify LIBS past this line - this hack is the only way
2822
2796
# I know to add the static NSS magic if we have static NSS libraries with
2865
2845
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
2867
2847
# Output results
2868
if test -d "$srcdir/pstack" ; then
2869
AC_CONFIG_FILES(pstack/Makefile pstack/aout/Makefile)
2871
2848
if test -d "$srcdir/cmd-line-utils/readline" ; then
2872
2849
AC_CONFIG_FILES(cmd-line-utils/readline/Makefile)
2875
2852
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
2876
2853
unittest/Makefile unittest/mytap/Makefile unittest/mytap/t/Makefile dnl
2877
unittest/mysys/Makefile unittest/examples/Makefile dnl
2854
unittest/mysys/Makefile unittest/strings/Makefile dnl
2855
unittest/examples/Makefile dnl
2878
2856
strings/Makefile regex/Makefile storage/Makefile dnl
2879
2857
man/Makefile BUILD/Makefile vio/Makefile dnl
2880
2858
libmysql/Makefile libmysql_r/Makefile client/Makefile dnl
2901
echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"
2902
echo "latest release, upcoming features, and other information to make your"
2903
echo "work or play with MySQL more productive. There you can also find"
2904
echo "information about mailing lists for MySQL discussion."
2906
echo "Remember to check the platform specific part of the reference manual for"
2907
echo "hints about installing MySQL on your platform. Also have a look at the"
2908
echo "files in the Docs directory."
2910
# The following text is checked in ./Do-compile to verify that configure
2878
# Add warning if user configures with --with-ndbcluster
2879
if test X"$with_plugin_ndbcluster" = Xyes ; then
2881
echo This version of MySQL Cluster is no longer maintained.
2882
echo Please use the separate sources provided for MySQL Cluster instead.
2883
echo See http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster.html
2884
echo for more details.
2887
# The first line "Thank you ..." is checked in ./Do-compile to verify that configure
2911
2888
# ended sucessfully - don't remove it.
2912
2890
echo "Thank you for choosing MySQL!"
2892
echo "Remember to check the platform specific part of the reference manual"
2893
echo "for hints about installing MySQL on your platform."
2894
echo "Also have a look at the files in the Docs directory."