diff options
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 262 |
1 files changed, 242 insertions, 20 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index a88957ea3df..5e642c547c3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,5 +1,45 @@ # Local macros for automake & autoconf +AC_DEFUN(MYSQL_CHECK_LIBEDIT_INTERFACE,[ + AC_CACHE_CHECK([libedit variant of rl_completion_entry_function], mysql_cv_libedit_interface, + AC_TRY_COMPILE( + [ + #include "stdio.h" + #include "readline/readline.h" + ], + [ + char res= *(*rl_completion_entry_function)(0,0); + completion_matches(0,0); + ], + [ + mysql_cv_libedit_interface=yes + AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE) + ], + [mysql_cv_libedit_interface=no] + ) + ) +]) + +AC_DEFUN(MYSQL_CHECK_NEW_RL_INTERFACE,[ + AC_CACHE_CHECK([defined rl_compentry_func_t and rl_completion_func_t], mysql_cv_new_rl_interface, + AC_TRY_COMPILE( + [ + #include "stdio.h" + #include "readline/readline.h" + ], + [ + rl_completion_func_t *func1= (rl_completion_func_t*)0; + rl_compentry_func_t *func2= (rl_compentry_func_t*)0; + ], + [ + mysql_cv_new_rl_interface=yes + AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE) + ], + [mysql_cv_new_rl_interface=no] + ) + ) +]) + # A local version of AC_CHECK_SIZEOF that includes sys/types.h dnl MYSQL_CHECK_SIZEOF(TYPE [, CROSS-SIZE]) AC_DEFUN(MYSQL_CHECK_SIZEOF, @@ -902,9 +942,9 @@ AC_SUBST(orbit_idl) AC_DEFUN([MYSQL_CHECK_ISAM], [ AC_ARG_WITH([isam], [ - --without-isam Disable the ISAM table type], + --with-isam Enable the ISAM table type], [with_isam="$withval"], - [with_isam=yes]) + [with_isam=no]) isam_libs= if test X"$with_isam" = X"yes" @@ -1137,24 +1177,28 @@ AC_DEFUN([MYSQL_CHECK_BDB_VERSION], [ test -z "$db_patch" && db_patch=0 # This is ugly, but about as good as it can get - mysql_bdb= - if test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3 - then - mysql_bdb=h - elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 9 - then - want_bdb_version="3.2.9a" # hopefully this will stay up-to-date - mysql_bdb=a - fi - - if test -n "$mysql_bdb" && \ - grep "DB_VERSION_STRING.*:.*$mysql_bdb: " [$1] > /dev/null - then - bdb_version_ok=yes - else - bdb_version_ok="invalid version $db_major.$db_minor.$db_patch" - bdb_version_ok="$bdb_version_ok (must be version 3.2.3h or $want_bdb_version)" - fi +# mysql_bdb= +# if test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3 +# then +# mysql_bdb=h +# elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 9 +# then +# want_bdb_version="3.2.9a" # hopefully this will stay up-to-date +# mysql_bdb=a +# fi + +dnl RAM: +want_bdb_version="4.1.24" +bdb_version_ok=yes + +# if test -n "$mysql_bdb" && \ +# grep "DB_VERSION_STRING.*:.*$mysql_bdb: " [$1] > /dev/null +# then +# bdb_version_ok=yes +# else +# bdb_version_ok="invalid version $db_major.$db_minor.$db_patch" +# bdb_version_ok="$bdb_version_ok (must be version 3.2.3h or $want_bdb_version)" +# fi ]) AC_DEFUN([MYSQL_TOP_BUILDDIR], [ @@ -1259,6 +1303,184 @@ dnl --------------------------------------------------------------------------- dnl END OF MYSQL_CHECK_INNODB SECTION dnl --------------------------------------------------------------------------- +dnl --------------------------------------------------------------------------- +dnl Macro: MYSQL_CHECK_EXAMPLEDB +dnl Sets HAVE_EXAMPLE_DB if --with-example-storage-engine is used +dnl --------------------------------------------------------------------------- +AC_DEFUN([MYSQL_CHECK_EXAMPLEDB], [ + AC_ARG_WITH([example-storage-engine], + [ + --with-example-storage-engine + Enable the Example Storage Engine], + [exampledb="$withval"], + [exampledb=no]) + AC_MSG_CHECKING([for example storage engine]) + + case "$exampledb" in + yes ) + AC_DEFINE(HAVE_EXAMPLE_DB) + AC_MSG_RESULT([yes]) + [exampledb=yes] + ;; + * ) + AC_MSG_RESULT([no]) + [exampledb=no] + ;; + esac + +]) +dnl --------------------------------------------------------------------------- +dnl END OF MYSQL_CHECK_EXAMPLE SECTION +dnl --------------------------------------------------------------------------- + +dnl --------------------------------------------------------------------------- +dnl Macro: MYSQL_CHECK_ARCHIVEDB +dnl Sets HAVE_ARCHIVE_DB if --with-archive-storage-engine is used +dnl --------------------------------------------------------------------------- +AC_DEFUN([MYSQL_CHECK_ARCHIVEDB], [ + AC_ARG_WITH([archive-storage-engine], + [ + --with-archive-storage-engine + Enable the Archive Storage Engine], + [archivedb="$withval"], + [archivedb=no]) + AC_MSG_CHECKING([for archive storage engine]) + + case "$archivedb" in + yes ) + AC_DEFINE(HAVE_ARCHIVE_DB) + AC_MSG_RESULT([yes]) + [archivedb=yes] + ;; + * ) + AC_MSG_RESULT([no]) + [archivedb=no] + ;; + esac + +]) +dnl --------------------------------------------------------------------------- +dnl END OF MYSQL_CHECK_ARCHIVE SECTION +dnl --------------------------------------------------------------------------- + +dnl --------------------------------------------------------------------------- +dnl Macro: MYSQL_CHECK_NDBCLUSTER +dnl Sets HAVE_NDBCLUSTER_DB if --with-ndbcluster is used +dnl --------------------------------------------------------------------------- + +AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ + AC_ARG_WITH([ndb-shm], + [ + --with-ndb-shm Include the NDB Cluster shared memory transporter], + [ndb_shm="$withval"], + [ndb_shm=no]) + AC_ARG_WITH([ndb-sci], + [ + --with-ndb-sci Include the NDB Cluster sci transporter], + [ndb_sci="$withval"], + [ndb_sci=no]) + AC_ARG_WITH([ndb-test], + [ + --with-ndb-test Include the NDB Cluster ndbapi test programs], + [ndb_test="$withval"], + [ndb_test=no]) + AC_ARG_WITH([ndb-docs], + [ + --with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation], + [ndb_docs="$withval"], + [ndb_docs=no]) + + AC_MSG_CHECKING([for NDB Cluster options]) + AC_MSG_RESULT([]) + + have_ndb_shm=no + case "$ndb_shm" in + yes ) + AC_MSG_RESULT([-- including shared memory transporter]) + AC_DEFINE(NDB_SHM_TRANSPORTER) + have_ndb_shm="yes" + ;; + * ) + AC_MSG_RESULT([-- not including shared memory transporter]) + ;; + esac + + have_ndb_sci=no + case "$ndb_sci" in + yes ) + AC_MSG_RESULT([-- including sci transporter]) + AC_DEFINE(NDB_SCI_TRANSPORTER) + have_ndb_sci="yes" + ;; + * ) + AC_MSG_RESULT([-- not including sci transporter]) + ;; + esac + + have_ndb_test=no + case "$ndb_test" in + yes ) + AC_MSG_RESULT([-- including ndbapi test programs]) + have_ndb_test="yes" + ;; + * ) + AC_MSG_RESULT([-- not including ndbapi test programs]) + ;; + esac + + have_ndb_docs=no + case "$ndb_docs" in + yes ) + AC_MSG_RESULT([-- including ndbapi and mgmapi documentation]) + have_ndb_docs="yes" + ;; + * ) + AC_MSG_RESULT([-- not including ndbapi and mgmapi documentation]) + ;; + esac + + AC_MSG_RESULT([done.]) +]) + +AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [ + AC_ARG_WITH([ndbcluster], + [ + --with-ndbcluster Include the NDB Cluster table handler], + [ndbcluster="$withval"], + [ndbcluster=no]) + + AC_MSG_CHECKING([for NDB Cluster]) + + have_ndbcluster=no + ndbcluster_includes= + ndbcluster_libs= + case "$ndbcluster" in + yes ) + AC_MSG_RESULT([Using NDB Cluster]) + AC_DEFINE(HAVE_NDBCLUSTER_DB) + have_ndbcluster="yes" + ndbcluster_includes="-I../ndb/include -I../ndb/include/ndbapi" + ndbcluster_libs="\$(top_builddir)/ndb/src/.libs/libndbclient.a" + ndbcluster_system_libs="" + MYSQL_CHECK_NDB_OPTIONS + ;; + * ) + AC_MSG_RESULT([Not using NDB Cluster]) + ;; + esac + + AM_CONDITIONAL([HAVE_NDBCLUSTER_DB], [ test "$have_ndbcluster" = "yes" ]) + AC_SUBST(ndbcluster_includes) + AC_SUBST(ndbcluster_libs) + AC_SUBST(ndbcluster_system_libs) +]) + +dnl --------------------------------------------------------------------------- +dnl END OF MYSQL_CHECK_NDBCLUSTER SECTION +dnl --------------------------------------------------------------------------- + + +>>>>>>> dnl By default, many hosts won't let programs access large files; dnl one must use special compiler options to get large-file access to work. dnl For more details about this brain damage please see: |