diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 106 |
1 files changed, 90 insertions, 16 deletions
diff --git a/configure.in b/configure.in index 121d54009f1..5b2328fea0f 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ 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.42) +AM_INIT_AUTOMAKE(mysql, 4.0.0-alpha) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -188,7 +188,7 @@ AC_DEFUN(AC_SYS_COMPILER_FLAG, [ CFLAGS="[$]OLD_CFLAGS $1" AC_TRY_RUN([int main(){exit(0);}],mysql_cv_option_$2=yes,mysql_cv_option_$2=no,mysql_cv_option_$2=no) - ]) + ]) CFLAGS="[$]OLD_CFLAGS" @@ -681,6 +681,39 @@ int main() if test -z "$atom_ops"; then atom_ops="no"; fi AC_MSG_RESULT($atom_ops) + + AC_ARG_WITH(pstack, + [ --without-pstack Don't use the pstack backtrace library], + [USE_PSTACK=$withval], + [USE_PSTACK=yes]) + pstack_libs= pstack_dirs= + if test "$USE_PSTACK" = yes + then + have_libiberty= have_libbfd= + my_save_LIBS="$LIBS" +dnl I have no idea if this is a good test - can't 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" + + AC_MSG_CHECKING([for pstack libs]) + if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes + then + pstack_dirs='$(top_srcdir)'/pstack + pstack_libs="$pstack_dirs/libpstack.a -lbfd -liberty" + AC_SUBST([pstack_dirs]) + AC_SUBST([pstack_libs]) + AC_DEFINE([USE_PSTACK]) + AC_MSG_RESULT([yes]) +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 + AC_MSG_RESULT([no (missing libbfd)]) + fi + fi fi # Check for gtty if termio.h doesn't exists @@ -1108,11 +1141,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") @@ -1131,7 +1167,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); ], @@ -1140,6 +1178,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>], @@ -1150,6 +1189,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>], @@ -1160,6 +1200,7 @@ else then with_mit_threads="yes" LIBS="$ac_save_LIBS" + TOOLS_LIBS="$ac_save_TOOLS_LIBS" fi fi fi @@ -1684,6 +1725,45 @@ 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(extra-tools, + [ --without-extra-tools Skip building utilites in the tools \ + directory.], + [with_tools=$withval], + [with_tools=yes] +) + +if test "$with_tools" = "yes" +then + tools_dirs="tools" +else + tools_dirs="" +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.], @@ -1996,20 +2076,16 @@ AC_SUBST(CLIENT_LIBS) AC_SUBST(sql_client_dirs) 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 + AC_DEFINE(THREAD) # 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" + sql_server_dirs="strings dbug mysys extra regex isam merge myisam myisammrg heap vio sql" + server_scripts="mysqld_safe mysql_install_db" if test X"$have_berkeley_db" != Xno; then if test X"$have_berkeley_db" != Xyes; then # we must build berkeley db from source @@ -2098,10 +2174,7 @@ EOF 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 @@ -2138,17 +2211,18 @@ AC_SUBST(server_scripts) # Some usefull subst AC_SUBST(CC) AC_SUBST(GXX) +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 readline/Makefile vio/Makefile \ + libmysql_r/Makefile libmysqld/Makefile libmysql/Makefile client/Makefile \ + pstack/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 |