summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in188
1 files changed, 144 insertions, 44 deletions
diff --git a/configure.in b/configure.in
index a7102261410..58823b7d9b1 100644
--- a/configure.in
+++ b/configure.in
@@ -4,13 +4,13 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
-AM_INIT_AUTOMAKE(mysql, 3.23.51)
+AM_INIT_AUTOMAKE(mysql, 4.0.2-alpha)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
DOT_FRM_VERSION=6
# See the libtool docs for information on how to do shared lib versions.
-SHARED_LIB_VERSION=10:0:0
+SHARED_LIB_VERSION=11:0:0
# 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
@@ -452,7 +452,6 @@ fi
NOINST_LDFLAGS=
-
AC_ARG_WITH(other-libc,
[ --with-other-libc=/path/to/other/libc/dir Link against libc and other standard libraries installed in the specified non-standard location overriding default. Originally added to be able to link against glibc 2.2 without making the user upgrade the standard libc installation ],
[
@@ -638,7 +637,6 @@ AC_ARG_ENABLE(local-infile,
[ ENABLED_LOCAL_INFILE=$enableval ],
[ ENABLED_LOCAL_INFILE=no ]
)
-
if test "$ENABLED_LOCAL_INFILE" = "yes"
then
AC_MSG_RESULT([yes])
@@ -766,7 +764,46 @@ int main()
if test -z "$atom_ops"; then atom_ops="no"; fi
AC_MSG_RESULT($atom_ops)
+
+ AC_ARG_WITH(pstack,
+ [ --with-pstack Use the pstack backtrace library],
+ [ USE_PSTACK=$withval ],
+ [ USE_PSTACK=no ])
+ pstack_libs=
+ pstack_dirs=
+ if test "$USE_PSTACK" = yes -a "$IS_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no"
+ then
+ have_libiberty= have_libbfd=
+ my_save_LIBS="$LIBS"
+dnl I have no idea if this is a good test - can not find docs for libiberty
+ AC_CHECK_LIB([iberty], [fdmatch],
+ [have_libiberty=yes
+ AC_CHECK_LIB([bfd], [bfd_openr], [have_libbfd=yes], , [-liberty])])
+ LIBS="$my_save_LIBS"
+
+ if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes
+ then
+ pstack_dirs='$(top_srcdir)'/pstack
+ pstack_libs="../pstack/libpstack.a -lbfd -liberty"
+ # We must link staticly when using pstack
+ with_mysqld_ldflags="-all-static"
+ AC_SUBST([pstack_dirs])
+ AC_SUBST([pstack_libs])
+ AC_DEFINE([USE_PSTACK])
+dnl This check isn't needed, but might be nice to give some feedback....
+dnl AC_CHECK_HEADER(libiberty.h,
+dnl have_libiberty_h=yes,
+dnl have_libiberty_h=no)
+ else
+ USE_PSTACK="no"
+ fi
+ else
+ USE_PSTACK="no"
+ fi
fi
+AM_CONDITIONAL(COMPILE_PSTACK, test "$USE_PSTACK" = "yes")
+AC_MSG_CHECKING([if we should use pstack])
+AC_MSG_RESULT([$USE_PSTACK])
# Check for gtty if termio.h doesn't exists
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
@@ -952,7 +989,7 @@ then
AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], ,
AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual]))
# RedHat 5.0 does not work with dynamic linking of this. -static also
- # gives a spped increase in linux so it does not hurt on other systems.
+ # gives a speed increase in linux so it does not hurt on other systems.
with_named_thread="-lpthread"
else
AC_MSG_RESULT("Not found")
@@ -968,7 +1005,8 @@ Reference Manual.])
if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
then
with_named_thread="-lpthread -lmach -lexc"
- #with_named_thread="-lpthread -lmach -lexc -lc"
+ CFLAGS="$CFLAGS -D_REENTRANT"
+ CXXFLAGS="$CXXFLAGS -D_REENTRANT"
AC_DEFINE(HAVE_DEC_THREADS)
AC_MSG_RESULT("yes")
else
@@ -1195,11 +1233,14 @@ then
fi
fi
+TOOLS_LIBS="$NON_THREADED_CLIENT_LIBS"
+
# Should we use named pthread library ?
AC_MSG_CHECKING("named thread libs:")
if test "$with_named_thread" != "no"
then
LIBS="$with_named_thread $LIBS $with_named_thread"
+ TOOLS_LIBS="$with_named_thread $TOOLS_LIBS $with_named_thread"
with_posix_threads="yes"
with_mit_threads="no"
AC_MSG_RESULT("$with_named_thread")
@@ -1218,7 +1259,9 @@ else
then
AC_MSG_CHECKING("for pthread_create in -lpthread");
ac_save_LIBS="$LIBS"
+ ac_save_TOOLS_LIBS="$TOOLS_LIBS"
LIBS="$LIBS -lpthread"
+ TOOLS_LIBS="$TOOLS_LIBS -lpthread"
AC_TRY_LINK(
[#include <pthread.h>],
[ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
@@ -1227,6 +1270,7 @@ else
if test "$with_posix_threads" = "no"
then
LIBS=" $ac_save_LIBS -lpthreads"
+ TOOLS_LIBS=" $ac_save_TOOLS_LIBS -lpthreads"
AC_MSG_CHECKING("for pthread_create in -lpthreads");
AC_TRY_LINK(
[#include <pthread.h>],
@@ -1237,6 +1281,7 @@ else
then
# This is for FreeBSD
LIBS="$ac_save_LIBS -pthread"
+ TOOLS_LIBS="$ac_save_TOOLS_LIBS -pthread"
AC_MSG_CHECKING("for pthread_create in -pthread");
AC_TRY_LINK(
[#include <pthread.h>],
@@ -1247,6 +1292,7 @@ else
then
with_mit_threads="yes"
LIBS="$ac_save_LIBS"
+ TOOLS_LIBS="$ac_save_TOOLS_LIBS"
fi
fi
fi
@@ -1777,6 +1823,59 @@ AC_ARG_WITH(server,
[with_server=yes]
)
+AC_ARG_WITH(embedded-server,
+ [ --with-embedded-server Build the embedded server (libmysqld).],
+ [with_embedded_server=$withval],
+ [with_embedded_server=no]
+)
+
+AC_ARG_WITH(query_cache,
+ [ --without-query-cache Do not build query cache.],
+ [with_query_cache=$withval],
+ [with_query_cache=yes]
+)
+
+if test "$with_query_cache" = "yes"
+then
+ AC_DEFINE(HAVE_QUERY_CACHE)
+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
+ echo "Warning: extra-tools disabled because --enable-thread-safe-client wasn't used"
+ else
+ tools_dirs="tools"
+ fi
+fi
+AC_SUBST(tools_dirs)
+
+#MYSQL_CHECK_CPU
+MYSQL_CHECK_MYSQLFS
+MYSQL_CHECK_VIO
+MYSQL_CHECK_OPENSSL
+
+libmysqld_dirs=
+if test "$with_embedded_server" = "yes"
+then
+ libmysqld_dirs=libmysqld
+ # We can't build embedded library without building the server, because
+ # we depend on libmysys, libmystrings, libmyisam, etc.
+ with_server=yes
+fi
+# XXX: We need to add @libmysqld_extra_libs@ (or whatever) so that
+# mysql_config --libmysqld-libs will print out something like
+# -L/path/to/lib/mysql -lmysqld -lmyisam -lmysys -lmystrings -ldbug ...
+AC_SUBST([libmysqld_dirs])
+
# Shall we build the docs?
AC_ARG_WITH(docs,
[ --without-docs Skip building of the documentation.],
@@ -1833,17 +1932,17 @@ dnl If the character set uses strcoll or other special handling,
dnl you must also create strings/ctype-$charset_name.c
AC_DIVERT_PUSH(0)
-CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 latin5 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
+CHARSETS_AVAILABLE="big5 cp1251 cp1257
+ croat czech danish dec8 dos estonia euc_kr gb2312 gbk
+ german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
+ latin1 latin1_de latin2 latin5 sjis swe7 tis620 ujis
+ usa7 win1250 win1251ukr"
+CHARSETS_DEPRECATED="win1251"
DEFAULT_CHARSET=latin1
AC_DIVERT_POP
-dnl win1251 is deprecated - it's available, but not listed here in the help
AC_ARG_WITH(charset,
- [ --with-charset=CHARSET Use CHARSET by default (one of: big5 cp1251 cp1257
- croat czech danish dec8 dos estonia euc_kr gb2312 gbk
- german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
- latin1 latin2 latin5 swe7 usa7 win1250 win1251ukr
- ujis sjis tis620; Default is latin1)],
+ [ --with-charset=CHARSET Use CHARSET by default (one of: $CHARSETS_AVAILABLE; Default is $DEFAULT_CHARSET)],
[default_charset="$withval"],
[default_charset="$DEFAULT_CHARSET"])
@@ -1864,7 +1963,7 @@ elif test "$extra_charsets" = complex; then
CHARSETS=`echo $CHARSETS` # get rid of line breaks
else
if test "$extra_charsets" = all; then
- CHARSETS="$CHARSETS_AVAILABLE"
+ CHARSETS="$CHARSETS_AVAILABLE $CHARSETS_DEPRECATED"
else
CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
fi
@@ -1885,7 +1984,7 @@ CHARSETS=$TMP_CHARSETS
for cs in $CHARSETS
do
charset_okay=0
- for charset in $CHARSETS_AVAILABLE
+ for charset in $CHARSETS_AVAILABLE $CHARSETS_DEPRECATED
do
if test $cs = $charset; then charset_okay=1; fi
done
@@ -2065,9 +2164,9 @@ EOF
AC_MSG_RESULT([default: $default_charset; compiled in: $CHARSETS])
+MYSQL_CHECK_ISAM
MYSQL_CHECK_BDB
MYSQL_CHECK_INNODB
-MYSQL_CHECK_GEMINI
# If we have threads generate some library functions and test programs
sql_server_dirs=
@@ -2098,21 +2197,28 @@ AC_SUBST(linked_client_targets)
if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
then
AC_DEFINE(THREAD)
-fi
-
-if test "$with_server" = "yes"
-then
# Avoid _PROGRAMS names
THREAD_LPROGRAMS="test_thr_alarm test_thr_lock"
AC_SUBST(THREAD_LPROGRAMS)
THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o"
AC_SUBST(THREAD_LOBJECTS)
- sql_server_dirs="strings dbug mysys extra regex isam merge myisam myisammrg heap sql"
- server_scripts="safe_mysqld mysql_install_db"
+ server_scripts="mysqld_safe mysql_install_db"
+ sql_server_dirs="strings dbug mysys extra regex"
+
+
+ #
+ # Configuration for optional table handlers
+ #
+
+ if test X"$have_isam" != Xno
+ then
+ sql_server_dirs="$sql_server_dirs isam merge"
+ fi
+
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="$have_berkeley_db $sql_server_dirs"
+ sql_server_dirs="$sql_server_dirs $have_berkeley_db"
echo "CONFIGURING FOR BERKELEY DB"
bdb_conf_flags=
@@ -2179,7 +2285,7 @@ EOF
if test X"$have_innodb" = Xyes
then
- sql_server_dirs="innobase $sql_server_dirs"
+ sql_server_dirs="$sql_server_dirs innobase"
echo "CONFIGURING FOR INNODB"
if test ! -d "innobase"; then
# This should only happen when doing a VPATH build
@@ -2196,21 +2302,11 @@ EOF
echo "END OF INNODB CONFIGURATION"
fi
+ #
+ # END of configuration for optional table handlers
+ #
+ sql_server_dirs="$sql_server_dirs myisam myisammrg heap vio sql"
- if test "X$have_gemini_db" = "Xyes"; then
- sql_server_dirs="gemini $sql_server_dirs"
- echo "CONFIGURING FOR GEMINI DB"
- (cd gemini && sh ./configure) \
- || AC_MSG_ERROR([could not configure Gemini DB])
-
- echo "END OF GEMINI DB CONFIGURATION"
-
- AC_DEFINE(HAVE_GEMINI_DB)
- fi
-fi
-
-if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
-then
if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
then
# MIT user level threads
@@ -2258,17 +2354,20 @@ AC_SUBST(server_scripts)
# Some usefull subst
AC_SUBST(CC)
AC_SUBST(GXX)
+#Remove TOOLS_LIBS, because this is included in LIBRARIES
+#AC_SUBST(TOOLS_LIBS)
# Output results
AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \
strings/Makefile regex/Makefile heap/Makefile \
bdb/Makefile \
myisam/Makefile myisammrg/Makefile \
- man/Makefile \
- readline/Makefile libmysql_r/Makefile libmysql/Makefile client/Makefile \
- sql/Makefile sql/share/Makefile \
+ man/Makefile BUILD/Makefile readline/Makefile vio/Makefile \
+ libmysql_r/Makefile libmysqld/Makefile libmysqld/examples/Makefile \
+ libmysql/Makefile client/Makefile \
+ pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile \
merge/Makefile dbug/Makefile scripts/Makefile \
- include/Makefile sql-bench/Makefile \
+ include/Makefile sql-bench/Makefile tools/Makefile \
tests/Makefile Docs/Makefile support-files/Makefile \
mysql-test/Makefile \
include/mysql_version.h
@@ -2283,8 +2382,9 @@ echo "latest release, upcoming features, and other information to make your"
echo "work or play with MySQL more productive. There you can also find"
echo "information about mailing lists for MySQL discussion."
echo
-echo "Remember to check the platform specific part in the reference manual for"
-echo "hints about installing on your platfrom. See the Docs directory."
+echo "Remember to check the platform specific part of the reference manual for"
+echo "hints about installing MySQL on your platform. Also have a look at the"
+echo "files in the Docs directory."
echo
# The following text is checked in ./Do-compile to se that the configure ends.
echo "Thank you for choosing MySQL!"