summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in687
1 files changed, 179 insertions, 508 deletions
diff --git a/configure.in b/configure.in
index 3cb871ff94f..a3eb0ceb713 100644
--- a/configure.in
+++ b/configure.in
@@ -6,8 +6,8 @@ AC_PREREQ(2.52)dnl Minimum Autoconf version required.
AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
-# remember to also change ndb version below and update version.c in ndb
-AM_INIT_AUTOMAKE(mysql, 5.0.36)
+# remember to also update version.c in ndb
+AM_INIT_AUTOMAKE(mysql, 5.1.16-beta)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
@@ -15,13 +15,6 @@ DOT_FRM_VERSION=6
# See the libtool docs for information on how to do shared lib versions.
SHARED_LIB_MAJOR_VERSION=15
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
-
-# ndb version
-NDB_VERSION_MAJOR=5
-NDB_VERSION_MINOR=0
-NDB_VERSION_BUILD=36
-NDB_VERSION_STATUS=""
-
# Set all version vars based on $VERSION. How do we do this more elegant ?
# Remember that regexps needs to quote [ and ] since this is run through m4
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
@@ -37,19 +30,12 @@ sinclude(config/ac-macros/alloca.m4)
sinclude(config/ac-macros/check_cpu.m4)
sinclude(config/ac-macros/character_sets.m4)
sinclude(config/ac-macros/compiler_flag.m4)
-sinclude(config/ac-macros/ha_archive.m4)
-sinclude(config/ac-macros/ha_berkeley.m4)
-sinclude(config/ac-macros/ha_blackhole.m4)
-sinclude(config/ac-macros/ha_example.m4)
-sinclude(config/ac-macros/ha_federated.m4)
-sinclude(config/ac-macros/ha_innodb.m4)
+sinclude(config/ac-macros/plugins.m4)
sinclude(config/ac-macros/ha_ndbcluster.m4)
-sinclude(config/ac-macros/ha_tina.m4)
sinclude(config/ac-macros/large_file.m4)
sinclude(config/ac-macros/misc.m4)
-sinclude(config/ac-macros/openssl.m4)
sinclude(config/ac-macros/readline.m4)
-sinclude(config/ac-macros/yassl.m4)
+sinclude(config/ac-macros/ssl.m4)
sinclude(config/ac-macros/zlib.m4)
# Remember to add a directory sql/share/LANGUAGE
@@ -74,19 +60,6 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
AC_SUBST(SHARED_LIB_VERSION)
AC_SUBST(AVAILABLE_LANGUAGES)
-AC_SUBST([NDB_VERSION_MAJOR])
-AC_SUBST([NDB_VERSION_MINOR])
-AC_SUBST([NDB_VERSION_BUILD])
-AC_SUBST([NDB_VERSION_STATUS])
-AC_DEFINE_UNQUOTED([NDB_VERSION_MAJOR], [$NDB_VERSION_MAJOR],
- [NDB major version])
-AC_DEFINE_UNQUOTED([NDB_VERSION_MINOR], [$NDB_VERSION_MINOR],
- [NDB minor version])
-AC_DEFINE_UNQUOTED([NDB_VERSION_BUILD], [$NDB_VERSION_BUILD],
- [NDB build version])
-AC_DEFINE_UNQUOTED([NDB_VERSION_STATUS], ["$NDB_VERSION_STATUS"],
- [NDB status version])
-
# Canonicalize the configuration name.
SYSTEM_TYPE="$host_vendor-$host_os"
@@ -440,15 +413,6 @@ AC_SUBST(HOSTNAME)
AC_SUBST(PERL)
AC_SUBST(PERL5)
-# for build ndb docs
-
-AC_PATH_PROG(DOXYGEN, doxygen, no)
-AC_PATH_PROG(PDFLATEX, pdflatex, no)
-AC_PATH_PROG(MAKEINDEX, makeindex, no)
-AC_SUBST(DOXYGEN)
-AC_SUBST(PDFLATEX)
-AC_SUBST(MAKEINDEX)
-
# icheck, used for ABI check
AC_PATH_PROG(ICHECK, icheck, no)
AC_SUBST(ICHECK)
@@ -639,10 +603,10 @@ AC_ARG_WITH(named-curses-libs,
# Make thread safe client
AC_ARG_ENABLE(thread-safe-client,
- [ --enable-thread-safe-client
- Compile the client with threads.],
+ [ --disable-thread-safe-client
+ Compile the client without threads.],
[ THREAD_SAFE_CLIENT=$enableval ],
- [ THREAD_SAFE_CLIENT=no ]
+ [ THREAD_SAFE_CLIENT=yes ]
)
# compile with strings functions in assembler
@@ -750,6 +714,8 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
sys/resource.h sys/param.h)
+AC_CHECK_HEADERS([xfs/xfs.h])
+
#--------------------------------------------------------------------
# Check for system libraries. Adds the library to $LIBS
# and defines HAVE_LIBM etc
@@ -834,48 +800,6 @@ struct request_info *req;
AC_SUBST(WRAPLIBS)
if test "$TARGET_LINUX" = "true"; then
- AC_MSG_CHECKING([for atomic operations])
-
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
-
- atom_ops=
- AC_TRY_RUN([
-#include <asm/atomic.h>
-int main()
-{
- atomic_t v;
-
- atomic_set(&v, 23);
- atomic_add(5, &v);
- return atomic_read(&v) == 28 ? 0 : -1;
-}
- ],
- [AC_DEFINE([HAVE_ATOMIC_ADD], [1],
- [atomic_add() from <asm/atomic.h> (Linux only)])
- atom_ops="${atom_ops}atomic_add "],
- )
- AC_TRY_RUN([
-#include <asm/atomic.h>
-int main()
-{
- atomic_t v;
-
- atomic_set(&v, 23);
- atomic_sub(5, &v);
- return atomic_read(&v) == 18 ? 0 : -1;
-}
- ],
- [AC_DEFINE([HAVE_ATOMIC_SUB], [1],
- [atomic_sub() from <asm/atomic.h> (Linux only)])
- atom_ops="${atom_ops}atomic_sub "],
- )
-
- if test -z "$atom_ops"; then atom_ops="no"; fi
- AC_MSG_RESULT($atom_ops)
-
- AC_LANG_RESTORE
-
AC_ARG_WITH(pstack,
[ --with-pstack Use the pstack backtrace library],
[ USE_PSTACK=$withval ],
@@ -927,38 +851,20 @@ fi
# Later in this script LIBS will be augmented with a threads library.
NON_THREADED_LIBS="$LIBS"
-AC_MSG_CHECKING([for int8])
-case $SYSTEM_TYPE in
- *netware)
- AC_MSG_RESULT([no])
- ;;
- *)
-AC_TRY_RUN([
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
+AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64,
+ uchar, uint, ulong],[],[], [
#include <sys/types.h>
-#endif
-
-int main()
-{
- int8 i;
- return 0;
-}
-],
-[AC_DEFINE([HAVE_INT_8_16_32], [1],
- [whether int8, int16 and int32 types exist])
-AC_MSG_RESULT([yes])],
-[AC_MSG_RESULT([no])]
-)
- ;;
-esac
+])
+AC_CHECK_TYPES([in_addr_t], [], [], [
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+])
+AC_CHECK_TYPES([fp_except], [], [], [
+#include <sys/types.h>
+#include <ieeefp.h>
+])
#
# Some system specific hacks
@@ -967,24 +873,6 @@ esac
MAX_C_OPTIMIZE="-O3"
MAX_CXX_OPTIMIZE="-O3"
-ndb_cxxflags_fix=
-case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc in
-# workaround for Sun Forte/x86 see BUG#4681
- *solaris*-i?86-no)
- CFLAGS="$CFLAGS -DBIG_TABLES"
- CXXFLAGS="$CXXFLAGS -DBIG_TABLES"
- ;;
- *) ;;
-esac
-case $SYSTEM_TYPE-$ac_cv_prog_gcc in
-# workaround for Sun Forte compile problem for ndb
- *solaris*-no)
- ndb_cxxflags_fix="$ndb_cxxflags_fix -instances=static"
- ;;
- *) ;;
-esac
-
-
case $SYSTEM_TYPE in
*solaris2.7*)
# Solaris 2.7 has a broken /usr/include/widec.h
@@ -1162,7 +1050,7 @@ dnl Is this the right match for DEC OSF on alpha?
# Edit Makefile.in files.
#
echo -n "configuring Makefile.in files for NetWare... "
- for file in sql/Makefile.in libmysql/Makefile.in libmysql_r/Makefile.in extra/Makefile.in strings/Makefile.in client/Makefile.in
+ for file in sql/Makefile.in extra/Makefile.in client/Makefile.in
do
# echo "#### $file ####"
filedir="`dirname $file`"
@@ -1181,11 +1069,10 @@ dnl Is this the right match for DEC OSF on alpha?
sql/Makefile.in)
# Use gen_lex_hash.linux instead of gen_lex_hash
# Add library dependencies to mysqld_DEPENDENCIES
- lib_DEPENDENCIES="\$(bdb_libs_with_path) \$(innodb_libs) \$(ndbcluster_libs) \$(pstack_libs) \$(innodb_system_libs) \$(openssl_libs) \$(yassl_libs)"
+ lib_DEPENDENCIES="\$(pstack_libs) \$(openssl_libs) \$(yassl_libs)"
cat > $filesed << EOF
-s,\(^.*\$(MAKE) gen_lex_hash\)\$(EXEEXT),#\1,
s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux,
-s%\(mysqld_DEPENDENCIES = \) %\1$lib_DEPENDENCIES %
+s%\(mysqld_DEPENDENCIES = \)%\1$lib_DEPENDENCIES %
EOF
;;
extra/Makefile.in)
@@ -1195,26 +1082,16 @@ EOF
;;
libmysql/Makefile.in)
cat > $filesed << EOF
-s,\(\./conf_to_src\)\( \$(top_srcdir)\),\1.linux\2,
-s,\(: conf_to_src\),\1.linux,
s,libyassl.la,.libs/libyassl.a,
s,libtaocrypt.la,.libs/libtaocrypt.a,
EOF
;;
libmysql_r/Makefile.in)
cat > $filesed << EOF
-s,\(\./conf_to_src\)\( \$(top_srcdir)\),\1.linux\2,
-s,\(: conf_to_src\),\1.linux,
s,libyassl.la,.libs/libyassl.a,
s,libtaocrypt.la,.libs/libtaocrypt.a,
EOF
;;
- strings/Makefile.in)
- cat > $filesed << EOF
-s,\(\./conf_to_src\)\( \$(top_srcdir)\),\1.linux\2,
-s,\(: conf_to_src\),\1.linux,
-EOF
- ;;
client/Makefile.in)
#
cat > $filesed << EOF
@@ -1523,6 +1400,7 @@ AC_MSG_CHECKING("named thread libs:")
if test "$with_named_thread" != "no"
then
LIBS="$with_named_thread $LIBS $with_named_thread"
+ CLIENT_THREAD_LIBS="$with_named_thread"
with_posix_threads="yes"
AC_MSG_RESULT("$with_named_thread")
else
@@ -1539,6 +1417,7 @@ else
AC_MSG_CHECKING("for pthread_create in -lpthread");
ac_save_LIBS="$LIBS"
LIBS="$LIBS -lpthread"
+ CLIENT_THREAD_LIBS="-lpthread"
AC_TRY_LINK(
[#include <pthread.h>],
[ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
@@ -1547,6 +1426,7 @@ else
if test "$with_posix_threads" = "no"
then
LIBS=" $ac_save_LIBS -lpthreads"
+ CLIENT_THREAD_LIBS="-lpthreads"
AC_MSG_CHECKING("for pthread_create in -lpthreads");
AC_TRY_LINK(
[#include <pthread.h>],
@@ -1557,6 +1437,7 @@ else
then
# This is for FreeBSD
LIBS="$ac_save_LIBS -pthread"
+ CLIENT_THREAD_LIBS="-pthread"
AC_MSG_CHECKING("for pthread_create in -pthread");
AC_TRY_LINK(
[#include <pthread.h>],
@@ -1592,9 +1473,9 @@ fi
# dlopen, dlerror
case "$with_mysqld_ldflags " in
- *"-static "*)
+ *"-all-static "*)
# No need to check for dlopen when mysqld is linked with
- # -all-static or -static as it won't be able to load any functions.
+ # -all-static as it won't be able to load any functions.
# NOTE! It would be better if it was possible to test if dlopen
# can be used, but a good way to test it couldn't be found
@@ -1675,25 +1556,74 @@ then
fi
AC_ARG_WITH(debug,
- [ --without-debug Build a production version without debugging code],
+ [ --with-debug Add debug code
+ --with-debug=full Add debug code (adds memory checker, very slow)],
[with_debug=$withval],
[with_debug=no])
if test "$with_debug" = "yes"
then
# Medium debug.
- CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS"
- CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DDBUG_ON -DSAFE_MUTEX $CXXFLAGS"
+ AC_DEFINE([DBUG_ON], [1], [Use libdbug])
+ CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DSAFE_MUTEX $CFLAGS"
+ CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS"
elif test "$with_debug" = "full"
then
# Full debug. Very slow in some cases
- CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
- CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
+ AC_DEFINE([DBUG_ON], [1], [Use libdbug])
+ CFLAGS="$DEBUG_CFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
+ CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
else
# Optimized version. No debug
- CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
- CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS"
+ AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug])
+ CFLAGS="$OPTIMIZE_CFLAGS $CFLAGS"
+ CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
+fi
+
+# If we should allow error injection tests
+AC_ARG_WITH(error-inject,
+ AC_HELP_STRING([--with-error-inject],[Enable error injection in MySQL Server]),
+ [ with_error_inject=$withval ],
+ [ with_error_inject=no ])
+
+if test $with_debug != "no"
+then
+ if test "$with_error_inject" = "yes"
+ then
+ AC_DEFINE([ERROR_INJECT_SUPPORT], [1],
+ [Enable error injection in MySQL Server])
+ fi
fi
+AC_ARG_WITH([fast-mutexes],
+ AC_HELP_STRING([--with-fast-mutexes],
+ [Compile with fast mutexes (default is disabled)]),
+ [with_fast_mutexes=$withval], [with_fast_mutexes=no])
+
+if test "$with_fast_mutexes" != "no"
+then
+ if test "$with_debug" != "no"
+ then
+ AC_MSG_WARN(['--with-fast-mutexes' ignored when '--with-debug' is given])
+ else
+ AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1],
+ [Define to 1 if you want to use fast mutexes])
+ fi
+fi
+
+AC_ARG_WITH([atomic-ops],
+ AC_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
+ [Implement atomic operations using pthread rwlocks or atomic CPU
+ instructions for multi-processor (default) or uniprocessor
+ configuration]), , [with_atomic_ops=smp])
+case "$with_atomic_ops" in
+ "up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1],
+ [Assume single-CPU mode, no concurrency]) ;;
+ "rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1],
+ [Use pthread rwlocks for atomic ops]) ;;
+ "smp") ;;
+ *) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;;
+esac
+
# Force static compilation to avoid linking problems/get more speed
AC_ARG_WITH(mysqld-ldflags,
[ --with-mysqld-ldflags Extra linking arguments for mysqld],
@@ -1792,7 +1722,7 @@ then
AC_MSG_ERROR("MySQL needs a long long type.")
fi
# off_t is not a builtin type
-MYSQL_CHECK_SIZEOF(off_t, 4)
+AC_CHECK_SIZEOF(off_t, 4)
if test "$ac_cv_sizeof_off_t" -eq 0
then
AC_MSG_ERROR("MySQL needs a off_t type.")
@@ -1832,16 +1762,6 @@ MYSQL_FUNC_ALLOCA
MYSQL_TIMESPEC_TS
# Do we have the tzname variable
MYSQL_TZNAME
-# Do the system files define ulong
-MYSQL_CHECK_ULONG
-# Do the system files define uchar
-MYSQL_CHECK_UCHAR
-# Do the system files define uint
-MYSQL_CHECK_UINT
-# Check for fp_except in ieeefp.h
-MYSQL_CHECK_FP_EXCEPT
-# Check for IN_ADDR_T
-MYSQL_CHECK_IN_ADDR_T
# Do the c++ compiler have a bool type
MYSQL_CXX_BOOL
# Check some common bugs with gcc 2.8.# on sparc
@@ -1947,21 +1867,23 @@ MYSQL_TYPE_QSORT
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
+AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
+ chsize cuserid fchmod fcntl \
fconvert fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
getpwuid getrlimit getrusage getwd gmtime_r index initgroups isnan \
localtime_r locking longjmp lrand48 madvise mallinfo memcpy memmove \
- mkstemp mlockall perror poll pread pthread_attr_create mmap getpagesize \
+ mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
realpath rename rint rwlock_init setupterm \
shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
- sighold sigset sigthreadmask \
+ sighold sigset sigthreadmask sleep \
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr strtol \
- strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr)
+ strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
+ posix_fallocate)
#
#
@@ -2048,7 +1970,7 @@ fi
# Check definition of gethostbyname_r (glibc2.0.100 is different from Solaris)
ac_save_CXXFLAGS="$CXXFLAGS"
-AC_CACHE_CHECK([style of gethostname_r routines], mysql_cv_gethostname_style,
+AC_CACHE_CHECK([style of gethostbyname_r routines], mysql_cv_gethostbyname_style,
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
@@ -2070,10 +1992,10 @@ AC_TRY_COMPILE(
skr = gethostbyname_r((const char *) 0,
(struct hostent*) 0, (char*) 0, 0, (struct hostent **) 0, &skr);],
-mysql_cv_gethostname_style=glibc2, mysql_cv_gethostname_style=other))
+mysql_cv_gethostbyname_style=glibc2, mysql_cv_gethostbyname_style=other))
AC_LANG_RESTORE
CXXFLAGS="$ac_save_CXXFLAGS"
-if test "$mysql_cv_gethostname_style" = "glibc2"
+if test "$mysql_cv_gethostbyname_style" = "glibc2"
then
AC_DEFINE([HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE], [1],
[Solaris define gethostbyname_r with 5 arguments. glibc2 defines this with 6 arguments])
@@ -2081,7 +2003,7 @@ fi
# Check 3rd argument of getthostbyname_r
ac_save_CXXFLAGS="$CXXFLAGS"
-AC_CACHE_CHECK([3 argument to gethostname_r routines], mysql_cv_gethostname_arg,
+AC_CACHE_CHECK([3 argument to gethostbyname_r routines], mysql_cv_gethostbyname_arg,
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
@@ -2102,13 +2024,13 @@ AC_TRY_COMPILE(
[int skr;
skr = gethostbyname_r((const char *) 0, (struct hostent*) 0, (struct hostent_data*) 0);],
-mysql_cv_gethostname_arg=hostent_data, mysql_cv_gethostname_arg=char))
+mysql_cv_gethostbyname_arg=hostent_data, mysql_cv_gethostbyname_arg=char))
AC_LANG_RESTORE
CXXFLAGS="$ac_save_CXXFLAGS"
-if test "$mysql_cv_gethostname_arg" = "hostent_data"
+if test "$mysql_cv_gethostbyname_arg" = "hostent_data"
then
AC_DEFINE([HAVE_GETHOSTBYNAME_R_RETURN_INT], [1],
- [In OSF 4.0f the 3'd argument to gethostname_r is hostent_data *])
+ [In OSF 4.0f the 3'd argument to gethostbyname_r is hostent_data *])
fi
@@ -2243,6 +2165,28 @@ then
fi
AC_MSG_RESULT("$netinet_inc")
+#--------------------------------------------------------------------
+# Check for requested features
+#--------------------------------------------------------------------
+
+MYSQL_CHECK_BIG_TABLES
+MYSQL_CHECK_MAX_INDEXES
+MYSQL_CHECK_VIO
+MYSQL_CHECK_SSL
+
+#--------------------------------------------------------------------
+# Declare our plugin modules
+# Has to be done late, as the plugin may need to check for existence of
+# functions tested above
+#--------------------------------------------------------------------
+
+MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support],
+ [MySQL Partitioning Support], [max,max-no-ndb])
+
+dnl -- ndbcluster requires partition to be enabled
+
+MYSQL_CONFIGURE_PLUGINS([none])
+
# Only build client code?
AC_ARG_WITH(server,
[ --without-server Only build the client.],
@@ -2293,40 +2237,21 @@ then
[Access checks in embedded library])
fi
-AC_ARG_WITH(extra-tools,
- [ --without-extra-tools Skip building utilites in the tools directory.],
- [with_tools=$withval],
- [with_tools=yes]
-)
-
tools_dirs=""
-if test "$with_tools" = "yes"
-then
- if test "$THREAD_SAFE_CLIENT" = "no"
- then
- AC_MSG_WARN([extra-tools disabled because --enable-thread-safe-client wasn't used])
- else
- tools_dirs="tools"
- AC_CONFIG_FILES(tools/Makefile)
- fi
-fi
AC_ARG_WITH([mysqlmanager],
- AC_HELP_STRING([--with-mysqlmanager], [Build the mysqlmanager binary: yes/no (default: build if server is built.)]),
- [if test "x${withval}" != "xno"; then
- tools_dirs="$tools_dirs server-tools"
- fi],
- [if test "x${with_server}" = "xyes"; then
- tools_dirs="$tools_dirs server-tools"
- fi]
-)
+ AC_HELP_STRING([--with-mysqlmanager], [Build the mysqlmanager binary: yes/no (default: build if server is built.)]),,)
+
+if test "$with_mysqlmanager" = "yes" -o \
+ '(' "$with_mysqlmanager:$with_server" = ":yes" -a \
+ -d "$srcdir/server-tools" ')' ; then
+ tools_dirs="$tools_dirs server-tools"
+ AC_CONFIG_FILES(server-tools/Makefile server-tools/instance-manager/Makefile)
+fi
AC_SUBST(tools_dirs)
#MYSQL_CHECK_CPU
-MYSQL_CHECK_VIO
-MYSQL_CHECK_OPENSSL
-MYSQL_CHECK_YASSL
libmysqld_dirs=
linked_libmysqld_targets=
@@ -2383,22 +2308,6 @@ AC_SUBST(man_dirs)
AC_SUBST(man1_files)
AC_SUBST(man8_files)
-# Shall we build the bench code?
-AC_ARG_WITH(bench,
- [ --without-bench Skip building of the benchmark suite.],
- [with_bench=$withval],
- [with_bench=yes]
-)
-
-if test "$with_bench" = "yes"
-then
- bench_dirs="sql-bench"
-else
- bench_dirs=""
-fi
-bench_dirs="$bench_dirs mysql-test"
-AC_SUBST(bench_dirs)
-
# Don't build readline, i have it already
AC_ARG_WITH(readline,
[ --without-readline Use system readline instead of bundled copy.],
@@ -2412,6 +2321,12 @@ AC_ARG_WITH(libedit,
[ with_libedit=undefined ]
)
+if test "$with_readline/$with_libedit" = "undefined/undefined" -a ! -e "$srcdir/cmd-line-utils"
+then
+ with_readline=no
+ with_libedit=no
+fi
+
#
# We support next variants of compilation:
# --with-readline
@@ -2441,7 +2356,8 @@ readline_h_ln_cmd=""
readline_link=""
want_to_use_readline="no"
-if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then
+if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
+then
# For NetWare, do not need readline
echo "Skipping readline"
else
@@ -2480,7 +2396,8 @@ else
# this way we avoid linking commercial source with GPL readline
readline_link="-lreadline"
want_to_use_readline="yes"
- elif [test "$mysql_cv_libedit_interface" = "yes"]; then
+ elif [test "$mysql_cv_libedit_interface" = "yes"]
+ then
# Use libedit
readline_link="-ledit"
else
@@ -2498,6 +2415,16 @@ then
the bundled version of libedit instead.])
fi
+#
+# if either readline or libedit is enabled - generate Makefile's for both
+# (to make sure both are included in 'make dist')
+#
+if test -n "$readline_basedir"
+then
+ AC_CONFIG_FILES(cmd-line-utils/Makefile dnl
+ cmd-line-utils/libedit/Makefile dnl
+ cmd-line-utils/readline/Makefile)
+fi
fi
AC_SUBST(readline_dir)
@@ -2506,19 +2433,10 @@ AC_SUBST(readline_basedir)
AC_SUBST(readline_link)
AC_SUBST(readline_h_ln_cmd)
-MYSQL_CHECK_BIG_TABLES
-MYSQL_CHECK_MAX_INDEXES
-MYSQL_CHECK_BDB
-MYSQL_CHECK_INNODB
-MYSQL_CHECK_EXAMPLEDB
-MYSQL_CHECK_ARCHIVEDB
-MYSQL_CHECK_CSVDB
-MYSQL_CHECK_BLACKHOLEDB
-MYSQL_CHECK_NDBCLUSTER
-MYSQL_CHECK_FEDERATED
# If we have threads generate some library functions and test programs
sql_server_dirs=
+sql_server=
server_scripts=
thread_dirs=
@@ -2527,6 +2445,8 @@ dnl client is just using plain-old libs.
sql_client_dirs=
linked_client_targets="linked_libmysql_sources"
+AM_CONDITIONAL(THREAD_SAFE_CLIENT, test "$THREAD_SAFE_CLIENT" != "no")
+
if test "$THREAD_SAFE_CLIENT" = "no"
then
sql_client_dirs="strings regex mysys dbug extra libmysql client"
@@ -2534,12 +2454,13 @@ else
sql_client_dirs="strings regex mysys dbug extra libmysql libmysql_r client"
linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
AC_CONFIG_FILES(libmysql_r/Makefile)
- AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe])
+ AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should the client be thread safe])
fi
CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
AC_SUBST(CLIENT_LIBS)
+AC_SUBST(CLIENT_THREAD_LIBS)
AC_SUBST(NON_THREADED_LIBS)
AC_SUBST(STATIC_NSS_FLAGS)
AC_SUBST(sql_client_dirs)
@@ -2548,7 +2469,8 @@ AC_SUBST(linked_client_targets)
# If configuring for NetWare, set up to link sources from and build the netware directory
netware_dir=
linked_netware_sources=
-if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then
+if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
+then
netware_dir="netware"
linked_netware_sources="linked_netware_sources"
fi
@@ -2556,10 +2478,6 @@ AC_SUBST(netware_dir)
AC_SUBST(linked_netware_sources)
AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware")
-# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
-export CC CXX CFLAGS CXXFLAGS LD LDFLAGS AR
-ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'"
-
if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"
then
AC_DEFINE([THREAD], [1],
@@ -2574,112 +2492,7 @@ then
server_scripts="mysqld_safe mysql_install_db"
sql_server_dirs="strings mysys dbug extra regex"
-
- #
- # Configuration for optional table handlers
- #
-
- if test X"$have_berkeley_db" != Xno; then
- if test X"$have_berkeley_db" != Xyes; then
- # we must build berkeley db from source
- sql_server_dirs="$sql_server_dirs $have_berkeley_db"
- AC_CONFIG_FILES(bdb/Makefile)
-
- echo "CONFIGURING FOR BERKELEY DB"
- bdb_conf_flags="--disable-shared --build=$build_alias"
- if test $with_debug = "yes"
- then
- bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
- fi
- # NOTICE: if you're compiling BDB, it needs to be a SUBDIR
- # of $srcdir (i.e., you can 'cd $srcdir/$bdb'). It won't
- # work otherwise.
- if test -d "$bdb"; then :
- else
- # This should only happen when doing a VPATH build
- echo "NOTICE: I have to make the BDB directory: `pwd`:$bdb"
- mkdir "$bdb" || exit 1
- fi
- if test -d "$bdb"/build_unix; then :
- else
- # This should only happen when doing a VPATH build
- echo "NOTICE: I have to make the build_unix directory: `pwd`:$bdb/build_unix"
- mkdir "$bdb/build_unix" || exit 1
- fi
- rel_srcdir=
- case "$srcdir" in
- /* ) rel_srcdir="$srcdir" ;;
- * ) rel_srcdir="../../$srcdir" ;;
- esac
- (cd $bdb/build_unix && \
- sh $rel_srcdir/$bdb/dist/configure $bdb_conf_flags) || \
- AC_MSG_ERROR([could not configure Berkeley DB])
-
-dnl echo "bdb = '$bdb'; inc = '$bdb_includes', lib = '$bdb_libs'"
- echo "END OF BERKELEY DB CONFIGURATION"
- fi
-
- AC_DEFINE([HAVE_BERKELEY_DB], [1], [Have berkeley db installed])
- else
- if test -d bdb; then :
- else
- mkdir bdb && mkdir bdb/build_unix
- fi
-
- if test -r bdb/build_unix/db.h; then :
- else
- cat <<EOF > bdb/build_unix/db.h
-
-This file is a placeholder to fool make. The way that automake
-and GNU make work together causes some files to depend on this
-header, even if we're not building with Berkeley DB.
-
-Obviously, if this file *is* used, it'll break and hopefully we can find
-out why this file was generated by ${top_srcdir}/configure instead of
-the real db.h.
-
-If you run into some problems because of this file, please use mysql_bug
-to generate a bug report, and give the exact output of make and any
-details you can think of. Send the message to bugs@lists.mysql.com.
-
-Thank you!
-
-EOF
- fi
- fi
-
- if test X"$have_innodb" = Xyes
- then
- innodb_conf_flags=""
- sql_server_dirs="$sql_server_dirs innobase"
- AC_CONFIG_SUBDIRS(innobase)
- fi
-
-case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc-$have_ndbcluster in
- *solaris*-i?86-no-yes)
- # ndb fail for whatever strange reason to link Sun Forte/x86
- # unless using incremental linker
- CXXFLAGS="$CXXFLAGS -xildon"
- ;;
- *) ;;
-esac
-
- if test X"$have_ndbcluster" = Xyes
- then
- if test X"$mysql_cv_compress" != Xyes
- then
- echo
- echo "MySQL Cluster table handler ndbcluster requires compress/uncompress."
- echo "Commonly available in libzlib.a. Please install and rerun configure."
- echo
- exit 1
- fi
- sql_server_dirs="$sql_server_dirs ndb"
- fi
- #
- # END of configuration for optional table handlers
- #
- sql_server_dirs="$sql_server_dirs myisam myisammrg heap vio sql"
+ sql_server="$sql_server vio sql"
fi
# IMPORTANT - do not modify LIBS past this line - this hack is the only way
@@ -2690,9 +2503,15 @@ LDFLAGS="$LDFLAGS $OTHER_LIBC_LIB"
LIBS="$LIBS $STATIC_NSS_FLAGS"
AC_SUBST(sql_server_dirs)
+AC_SUBST(sql_server)
AC_SUBST(thread_dirs)
AC_SUBST(server_scripts)
+AC_SUBST(mysql_plugin_dirs)
+AC_SUBST(mysql_plugin_libs)
+AC_SUBST(mysql_plugin_defs)
+
+
# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
# Start with the (longer) server list, add each client item not yet present.
sql_union_dirs=" $sql_server_dirs "
@@ -2712,178 +2531,30 @@ AC_SUBST(CC)
AC_SUBST(GXX)
# Set configuration options for make_binary_distribution
-case $SYSTEM_TYPE in
- *netware*)
- MAKE_BINARY_DISTRIBUTION_OPTIONS=--no-strip
- ;;
- *)
- MAKE_BINARY_DISTRIBUTION_OPTIONS=
- ;;
-esac
-
-
-if test X"$have_ndbcluster" = Xyes
-then
- MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster"
-
- CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)"
- if test "$have_ndb_debug" = "default"
- then
- have_ndb_debug=$with_debug
- fi
-
- if test "$have_ndb_debug" = "yes"
- then
- # Medium debug.
- NDB_DEFS="-DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
- elif test "$have_ndb_debug" = "full"
- then
- NDB_DEFS="-DNDB_DEBUG_FULL -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
- else
- # no extra ndb debug but still do asserts if debug version
- if test "$with_debug" = "yes" -o "$with_debug" = "full"
- then
- NDB_DEFS=""
- else
- NDB_DEFS="-DNDEBUG"
- fi
- fi
-
-AC_SUBST([NDB_DEFS])
-AC_SUBST([ndb_cxxflags_fix])
-
-
-if test X"$ndb_port" = Xdefault
-then
- ndb_port="1186"
-fi
-AC_SUBST([ndb_port])
-
-ndb_transporter_opt_objs=""
-if test "$ac_cv_func_shmget" = "yes" &&
- test "$ac_cv_func_shmat" = "yes" &&
- test "$ac_cv_func_shmdt" = "yes" &&
- test "$ac_cv_func_shmctl" = "yes" &&
- test "$ac_cv_func_sigaction" = "yes" &&
- test "$ac_cv_func_sigemptyset" = "yes" &&
- test "$ac_cv_func_sigaddset" = "yes" &&
- test "$ac_cv_func_pthread_sigmask" = "yes"
-then
- AC_DEFINE([NDB_SHM_TRANSPORTER], [1],
- [Including Ndb Cluster DB shared memory transporter])
- AC_MSG_RESULT([Including ndb shared memory transporter])
- ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo"
-else
- AC_MSG_RESULT([Not including ndb shared memory transporter])
-fi
-
-if test X"$have_ndb_sci" = Xyes
-then
- ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo"
-fi
-AC_SUBST([ndb_transporter_opt_objs])
-
-ndb_opt_subdirs=
-ndb_bin_am_ldflags="-static"
-if test X"$have_ndb_test" = Xyes
-then
- ndb_opt_subdirs="test"
- ndb_bin_am_ldflags=""
-fi
-if test X"$have_ndb_docs" = Xyes
-then
- ndb_opt_subdirs="$ndb_opt_subdirs docs"
- ndb_bin_am_ldflags=""
-fi
-AC_SUBST([ndb_bin_am_ldflags])
-AC_SUBST([ndb_opt_subdirs])
-
-NDB_SIZEOF_CHARP="$ac_cv_sizeof_charp"
-NDB_SIZEOF_CHAR="$ac_cv_sizeof_char"
-NDB_SIZEOF_SHORT="$ac_cv_sizeof_short"
-NDB_SIZEOF_INT="$ac_cv_sizeof_int"
-NDB_SIZEOF_LONG="$ac_cv_sizeof_long"
-NDB_SIZEOF_LONG_LONG="$ac_cv_sizeof_long_long"
-AC_SUBST([NDB_SIZEOF_CHARP])
-AC_SUBST([NDB_SIZEOF_CHAR])
-AC_SUBST([NDB_SIZEOF_SHORT])
-AC_SUBST([NDB_SIZEOF_INT])
-AC_SUBST([NDB_SIZEOF_LONG])
-AC_SUBST([NDB_SIZEOF_LONG_LONG])
-
-AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
- ndb/src/Makefile ndb/src/common/Makefile dnl
- ndb/docs/Makefile dnl
- ndb/tools/Makefile dnl
- ndb/src/common/debugger/Makefile dnl
- ndb/src/common/debugger/signaldata/Makefile dnl
- ndb/src/common/portlib/Makefile dnl
- ndb/src/common/util/Makefile dnl
- ndb/src/common/logger/Makefile dnl
- ndb/src/common/transporter/Makefile dnl
- ndb/src/common/mgmcommon/Makefile dnl
- ndb/src/kernel/Makefile dnl
- ndb/src/kernel/error/Makefile dnl
- ndb/src/kernel/blocks/Makefile dnl
- ndb/src/kernel/blocks/cmvmi/Makefile dnl
- ndb/src/kernel/blocks/dbacc/Makefile dnl
- ndb/src/kernel/blocks/dbdict/Makefile dnl
- ndb/src/kernel/blocks/dbdih/Makefile dnl
- ndb/src/kernel/blocks/dblqh/Makefile dnl
- ndb/src/kernel/blocks/dbtc/Makefile dnl
- ndb/src/kernel/blocks/dbtup/Makefile dnl
- ndb/src/kernel/blocks/ndbfs/Makefile dnl
- ndb/src/kernel/blocks/ndbcntr/Makefile dnl
- ndb/src/kernel/blocks/qmgr/Makefile dnl
- ndb/src/kernel/blocks/trix/Makefile dnl
- ndb/src/kernel/blocks/backup/Makefile dnl
- ndb/src/kernel/blocks/dbutil/Makefile dnl
- ndb/src/kernel/blocks/suma/Makefile dnl
- ndb/src/kernel/blocks/dbtux/Makefile dnl
- ndb/src/kernel/vm/Makefile dnl
- ndb/src/mgmapi/Makefile dnl
- ndb/src/ndbapi/Makefile dnl
- ndb/src/mgmsrv/Makefile dnl
- ndb/src/mgmclient/Makefile dnl
- ndb/src/cw/Makefile dnl
- ndb/src/cw/cpcd/Makefile dnl
- ndb/test/Makefile dnl
- ndb/test/src/Makefile dnl
- ndb/test/ndbapi/Makefile dnl
- ndb/test/ndbapi/bank/Makefile dnl
- ndb/test/tools/Makefile dnl
- ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl
- ndb/include/ndb_version.h ndb/include/ndb_global.h dnl
- ndb/include/ndb_types.h dnl
- )
-fi
-
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
# Output results
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
- strings/Makefile regex/Makefile heap/Makefile dnl
- myisam/Makefile myisammrg/Makefile dnl
- os2/Makefile os2/include/Makefile os2/include/sys/Makefile dnl
+ unittest/Makefile unittest/mytap/Makefile unittest/mytap/t/Makefile dnl
+ unittest/mysys/Makefile unittest/examples/Makefile dnl
+ strings/Makefile regex/Makefile storage/Makefile dnl
man/Makefile BUILD/Makefile vio/Makefile dnl
libmysql/Makefile client/Makefile dnl
pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile dnl
- sql-common/Makefile SSL/Makefile dnl
- dbug/Makefile scripts/Makefile dnl
- include/Makefile sql-bench/Makefile dnl
- server-tools/Makefile server-tools/instance-manager/Makefile dnl
+ sql/sql_builtin.cc sql-common/Makefile dnl
+ dbug/Makefile scripts/Makefile include/Makefile dnl
tests/Makefile Docs/Makefile support-files/Makefile dnl
support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
mysql-test/Makefile dnl
- netware/Makefile dnl
- include/mysql_version.h dnl
- cmd-line-utils/Makefile dnl
- cmd-line-utils/libedit/Makefile dnl
- win/Makefile dnl
- zlib/Makefile dnl
- cmd-line-utils/readline/Makefile)
- AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
- AC_OUTPUT
+ mysql-test/ndb/Makefile netware/Makefile sql-bench/Makefile dnl
+ include/mysql_version.h plugin/Makefile win/Makefile)
+
+AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
+
+# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
+AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'")
+
+AC_OUTPUT
echo
echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"